(window.webpackJsonp=window.webpackJsonp||[]).push([[284,6,7,8,11],{"+NIl":function(pt,at,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";fe.defineMode("stex",function(Z,_){"use strict";function J(L,w){L.cmdState.push(w)}function U(L){return L.cmdState.length>0?L.cmdState[L.cmdState.length-1]:null}function D(L){var w=L.cmdState.pop();w&&w.closeBracket()}function z(L){for(var w=L.cmdState,y=w.length-1;y>=0;y--){var h=w[y];if(h.name=="DEFAULT")continue;return h}return{styleIdentifier:function(){return null}}}function H(L,w,y){return function(){this.name=L,this.bracketNo=0,this.style=w,this.styles=y,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var B={};B.importmodule=H("importmodule","tag",["string","builtin"]),B.documentclass=H("documentclass","tag",["","atom"]),B.usepackage=H("usepackage","tag",["atom"]),B.begin=H("begin","tag",["atom"]),B.end=H("end","tag",["atom"]),B.label=H("label","tag",["atom"]),B.ref=H("ref","tag",["atom"]),B.eqref=H("eqref","tag",["atom"]),B.cite=H("cite","tag",["atom"]),B.bibitem=H("bibitem","tag",["atom"]),B.Bibitem=H("Bibitem","tag",["atom"]),B.RBibitem=H("RBibitem","tag",["atom"]),B.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function O(L,w){L.f=w}function b(L,w){var y;if(L.match(/^\\[a-zA-Z@]+/)){var h=L.current().slice(1);return y=B.hasOwnProperty(h)?B[h]:B.DEFAULT,y=new y,J(w,y),O(w,P),y.style}if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/\\]/))return"tag";if(L.match("\\["))return O(w,function(l,u){return A(l,u,"\\]")}),"keyword";if(L.match("\\("))return O(w,function(l,u){return A(l,u,"\\)")}),"keyword";if(L.match("$$"))return O(w,function(l,u){return A(l,u,"$$")}),"keyword";if(L.match("$"))return O(w,function(l,u){return A(l,u,"$")}),"keyword";var o=L.next();if(o=="%")return L.skipToEnd(),"comment";if(o=="}"||o=="]"){if(y=U(w),y)y.closeBracket(o),O(w,P);else return"error";return"bracket"}else return o=="{"||o=="["?(y=B.DEFAULT,y=new y,J(w,y),"bracket"):/\d/.test(o)?(L.eatWhile(/[\w.%]/),"atom"):(L.eatWhile(/[\w\-_]/),y=z(w),y.name=="begin"&&(y.argument=L.current()),y.styleIdentifier())}function A(L,w,y){if(L.eatSpace())return null;if(y&&L.match(y))return O(w,b),"keyword";if(L.match(/^\\[a-zA-Z@]+/))return"tag";if(L.match(/^[a-zA-Z]+/))return"variable-2";if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/]/))return"tag";if(L.match(/^[\^_&]/))return"tag";if(L.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(L.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var h=L.next();return h=="{"||h=="}"||h=="["||h=="]"||h=="("||h==")"?"bracket":h=="%"?(L.skipToEnd(),"comment"):"error"}function P(L,w){var y=L.peek(),h;return y=="{"||y=="["?(h=U(w),h.openBracket(y),L.eat(y),O(w,b),"bracket"):/[ \t\r]/.test(y)?(L.eat(y),null):(O(w,b),D(w),b(L,w))}return{startState:function(){var L=_.inMathMode?function(w,y){return A(w,y)}:b;return{cmdState:[],f:L}},copyState:function(L){return{cmdState:L.cmdState.slice(),f:L.f}},token:function(L,w){return w.f(L,w)},blankLine:function(L){L.f=b,L.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},"19Vz":function(pt,at,pe){(function(fe){fe(pe("VrN/"))})(function(fe){fe.defineOption("placeholder","",function(H,B,O){var b=O&&O!=fe.Init;if(B&&!b)H.on("blur",U),H.on("change",D),H.on("swapDoc",D),fe.on(H.getInputField(),"compositionupdate",H.state.placeholderCompose=function(){J(H)}),D(H);else if(!B&&b){H.off("blur",U),H.off("change",D),H.off("swapDoc",D),fe.off(H.getInputField(),"compositionupdate",H.state.placeholderCompose),Z(H);var A=H.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}B&&!H.hasFocus()&&U(H)});function Z(H){H.state.placeholder&&(H.state.placeholder.parentNode.removeChild(H.state.placeholder),H.state.placeholder=null)}function _(H){Z(H);var B=H.state.placeholder=document.createElement("pre");B.style.cssText="height: 0; overflow: visible",B.style.direction=H.getOption("direction"),B.className="CodeMirror-placeholder CodeMirror-line-like";var O=H.getOption("placeholder");typeof O=="string"&&(O=document.createTextNode(O)),B.appendChild(O),H.display.lineSpace.insertBefore(B,H.display.lineSpace.firstChild)}function J(H){setTimeout(function(){var B=!1,O=H.getInputField();O.nodeName=="TEXTAREA"?B=!O.value:H.lineCount()==1&&(B=!/[^\u200b]/.test(O.querySelector(".CodeMirror-line").textContent)),B?_(H):Z(H)},20)}function U(H){z(H)&&_(H)}function D(H){var B=H.getWrapperElement(),O=z(H);B.className=B.className.replace(" CodeMirror-empty","")+(O?" CodeMirror-empty":""),O?_(H):Z(H)}function z(H){return H.lineCount()===1&&H.getLine(0)===""}})},"1eCo":function(pt,at,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";var Z={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(J,U){var D=J.indentUnit,z={},H=U.htmlMode?Z:_;for(var B in H)z[B]=H[B];for(var B in U)z[B]=U[B];var O,b;function A(a,E){function g(W){return E.tokenize=W,W(a,E)}var S=a.next();if(S=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?g(w("atom","]]>")):null:a.match("--")?g(w("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),g(y(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),E.tokenize=w("meta","?>"),"meta"):(O=a.eat("/")?"closeTag":"openTag",E.tokenize=P,"tag bracket");if(S=="&"){var F;return a.eat("#")?a.eat("x")?F=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):F=a.eatWhile(/[\d]/)&&a.eat(";"):F=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),F?"atom":"error"}else return a.eatWhile(/[^&<]/),null}A.isInText=!0;function P(a,E){var g=a.next();if(g==">"||g=="/"&&a.eat(">"))return E.tokenize=A,O=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return O="equals",null;if(g=="<"){E.tokenize=A,E.state=u,E.tagName=E.tagStart=null;var S=E.tokenize(a,E);return S?S+" tag error":"tag error"}else return/[\'\"]/.test(g)?(E.tokenize=L(g),E.stringStartCol=a.column(),E.tokenize(a,E)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function L(a){var E=function(g,S){for(;!g.eol();)if(g.next()==a){S.tokenize=P;break}return"string"};return E.isInAttribute=!0,E}function w(a,E){return function(g,S){for(;!g.eol();){if(g.match(E)){S.tokenize=A;break}g.next()}return a}}function y(a){return function(E,g){for(var S;(S=E.next())!=null;){if(S=="<")return g.tokenize=y(a+1),g.tokenize(E,g);if(S==">")if(a==1){g.tokenize=A;break}else return g.tokenize=y(a-1),g.tokenize(E,g)}return"meta"}}function h(a,E,g){this.prev=a.context,this.tagName=E,this.indent=a.indented,this.startOfLine=g,(z.doNotIndent.hasOwnProperty(E)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function l(a,E){for(var g;;){if(!a.context)return;if(g=a.context.tagName,!z.contextGrabbers.hasOwnProperty(g)||!z.contextGrabbers[g].hasOwnProperty(E))return;o(a)}}function u(a,E,g){return a=="openTag"?(g.tagStart=E.column(),C):a=="closeTag"?v:u}function C(a,E,g){return a=="word"?(g.tagName=E.current(),b="tag",x):z.allowMissingTagName&&a=="endTag"?(b="tag bracket",x(a,E,g)):(b="error",C)}function v(a,E,g){if(a=="word"){var S=E.current();return g.context&&g.context.tagName!=S&&z.implicitlyClosed.hasOwnProperty(g.context.tagName)&&o(g),g.context&&g.context.tagName==S||z.matchClosing===!1?(b="tag",m):(b="tag error",k)}else return z.allowMissingTagName&&a=="endTag"?(b="tag bracket",m(a,E,g)):(b="error",k)}function m(a,E,g){return a!="endTag"?(b="error",m):(o(g),u)}function k(a,E,g){return b="error",m(a,E,g)}function x(a,E,g){if(a=="word")return b="attribute",f;if(a=="endTag"||a=="selfcloseTag"){var S=g.tagName,F=g.tagStart;return g.tagName=g.tagStart=null,a=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(S)?l(g,S):(l(g,S),g.context=new h(g,S,F==g.indented)),u}return b="error",x}function f(a,E,g){return a=="equals"?p:(z.allowMissing||(b="error"),x(a,E,g))}function p(a,E,g){return a=="string"?d:a=="word"&&z.allowUnquoted?(b="string",x):(b="error",x(a,E,g))}function d(a,E,g){return a=="string"?d:x(a,E,g)}return{startState:function(a){var E={tokenize:A,state:u,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(E.baseIndent=a),E},token:function(a,E){if(!E.tagName&&a.sol()&&(E.indented=a.indentation()),a.eatSpace())return null;O=null;var g=E.tokenize(a,E);return(g||O)&&g!="comment"&&(b=null,E.state=E.state(O||g,a,E),b&&(g=b=="error"?g+" error":b)),g},indent:function(a,E,g){var S=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+D;if(S&&S.noIndent)return fe.Pass;if(a.tokenize!=P&&a.tokenize!=A)return g?g.match(/^(\s*)/)[0].length:0;if(a.tagName)return z.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+D*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/$/,blockCommentStart:"",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(a){a.state==p&&(a.state=x)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var E=[],g=a.context;g;g=g.prev)g.tagName&&E.push(g.tagName);return E.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7Cbv":function(pt,at,pe){"use strict";var fe=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Z=new Uint8Array(16);function _(){if(!fe)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fe(Z)}var J=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function U(P){return typeof P=="string"&&J.test(P)}for(var D=U,z=[],H=0;H<256;++H)z.push((H+256).toString(16).substr(1));function B(P){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(z[P[L+0]]+z[P[L+1]]+z[P[L+2]]+z[P[L+3]]+"-"+z[P[L+4]]+z[P[L+5]]+"-"+z[P[L+6]]+z[P[L+7]]+"-"+z[P[L+8]]+z[P[L+9]]+"-"+z[P[L+10]]+z[P[L+11]]+z[P[L+12]]+z[P[L+13]]+z[P[L+14]]+z[P[L+15]]).toLowerCase();if(!D(w))throw TypeError("Stringified UUID is invalid");return w}var O=B;function b(P,L,w){P=P||{};var y=P.random||(P.rng||_)();if(y[6]=y[6]&15|64,y[8]=y[8]&63|128,L){w=w||0;for(var h=0;h<16;++h)L[w+h]=y[h];return L}return O(y)}var A=at.a=b},"7ahc":function(pt,at,pe){"use strict";pe.d(at,"a",function(){return C});var fe=pe("k1fw"),Z=pe("0Owb"),_=pe("+L6B"),J=pe("2/Rp"),U=pe("y8nQ"),D=pe("Vl3Y"),z=pe("tJVT"),H=pe("OaEy"),B=pe("2fM7"),O=pe("q1tI"),b=pe.n(O),A=pe("VrN/"),P=pe.n(A),L=pe("p77/"),w=pe.n(L),y=pe("c5Ni"),h=pe.n(y),o=B.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};at.b=function(v){var m=v.callback,k=v.onCancel,x=Object(O.useState)("python"),f=Object(z.a)(x,2),p=f[0],d=f[1];function a(g){d(u[g][1])}function E(g){m(g)}return b.a.createElement(D.a,Object(Z.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),b.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(B.a,{onChange:a},Object.keys(u).map(function(g){return b.a.createElement(o,{key:g,value:g},u[g][0])}))),b.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(C,{mode:p})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(J.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function C(v){var m=v.value,k=v.onChange,x=v.mode,f=v.options,p=f===void 0?{}:f,d=Object(O.useRef)(),a=Object(O.useState)(),E=Object(z.a)(a,2),g=E[0],S=E[1];return Object(O.useEffect)(function(){if(g){function F(W){var K=W.getValue();k&&k(K)}return g.on("change",F),function(){g.off("change",F)}}},[g,k]),Object(O.useEffect)(function(){g&&g.setOption("mode",x)},[g,x]),Object(O.useEffect)(function(){g&&((m!==g.getValue()||m==="")&&setTimeout(function(){g.setValue(m||" ")},300))},[g,m]),Object(O.useEffect)(function(){if(d.current&&!g){var F=P.a.fromTextArea(d.current,Object(fe.a)({mode:x,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},p));S(F)}},[d.current,g]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:d}))}},"8EBN":function(pt,at,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";fe.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z-1&&J.substring(z+1,J.length);if(H)return fe.findModeByExtension(H)},fe.findModeByName=function(J){J=J.toLowerCase();for(var U=0;U=ne.length?le.slice(ne.length):le}).join(`
`)}var h=[],o=[""],l=new L.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){h.length=0,o=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(se,q,ee,ne){if(q>=se.length||se[q].level<=ee)return q;var le=se[q];ne.push("- "+le.text+""),q++;var te=[];return q=m(se,q,le.level,te),te.length>0&&(ne.push("
"),te.forEach(function(ie){ne.push(ie)}),ne.push("
")),ne.push(" "),q=m(se,q,ee,ne),q}function k(){return m(h,0,0,o),o.push("
"),o.join("")}var x={heading:function(q){var ee=u.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function(q){var ee=this.rules.block.fences.exec(q);if(ee){var ne=ee[0],le=y(ne,ee[3]||""),te=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(te)>=0){var ie=d(),ue=le;le=ie,a[ie]={type:"block",expression:ue}}return{type:"code",raw:ne,lang:te,text:le}}}},f=/(?:\${2})([^\n`]+?)(?:\${2})/gi,p=0,d=function(){return"__special_katext_id_".concat(p++,"__")},a={};function E(){return a}function g(){p=0,a={}}function S(se){return se=se.replace(f,function(q,ee){var ne=d();return a[ne]={type:"inline",expression:ee},ne}),se}var F=l.listitem;l.listitem=function(se){return F(S(se))};var W=l.paragraph;l.paragraph=function(se){return W(S(se))};var K=l.tablecell;l.tablecell=function(se,q){return K(S(se),q)},l.code=function(se,q,ee){var ne=(q||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"".concat(se,"
"):'
').concat(ee?se:Object(w.escape)(se,!0),`
`):''+(ee?se:Object(w.escape)(se,!0))+"
"},l.heading=function(se,q,ee){var ne=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:ne,level:q,text:se}),"'+se+""},L.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),L.a.use({tokenizer:x,renderer:l});var V=L.a,M=pe("SJMd"),I=pe("ulZh"),$=pe.n(I),ae=pe("m3rI"),he=pe("Oy/b"),ge=pe("p5ED"),De=pe("ErOA"),Se=pe("STEk");/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Re=function(se,q){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ne){ee.__proto__=ne}||function(ee,ne){for(var le in ne)Object.prototype.hasOwnProperty.call(ne,le)&&(ee[le]=ne[le])})(se,q)};function Ce(se,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function ee(){this.constructor=se}Re(se,q),se.prototype=q===null?Object.create(q):(ee.prototype=q.prototype,new ee)}function xe(se,q,ee,ne){return new(ee||(ee=Promise))(function(le,te){function ie(ye){try{de(ne.next(ye))}catch(Ee){te(Ee)}}function ue(ye){try{de(ne.throw(ye))}catch(Ee){te(Ee)}}function de(ye){var Ee;ye.done?le(ye.value):(Ee=ye.value,Ee instanceof ee?Ee:new ee(function(Pe){Pe(Ee)})).then(ie,ue)}de((ne=ne.apply(se,q||[])).next())})}function me(se,q){var ee,ne,le,te,ie={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:ue(0),throw:ue(1),return:ue(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function ue(de){return function(ye){return function(Ee){if(ee)throw new TypeError("Generator is already executing.");for(;ie;)try{if(ee=1,ne&&(le=2&Ee[0]?ne.return:Ee[0]?ne.throw||((le=ne.return)&&le.call(ne),0):ne.next)&&!(le=le.call(ne,Ee[1])).done)return le;switch(ne=0,le&&(Ee=[2&Ee[0],le.value]),Ee[0]){case 0:case 1:le=Ee;break;case 4:return ie.label++,{value:Ee[1],done:!1};case 5:ie.label++,ne=Ee[1],Ee=[0];continue;case 7:Ee=ie.ops.pop(),ie.trys.pop();continue;default:if(!(le=ie.trys,(le=le.length>0&&le[le.length-1])||Ee[0]!==6&&Ee[0]!==2)){ie=0;continue}if(Ee[0]===3&&(!le||Ee[1]>le[0]&&Ee[1]0&&ee>0){var ne=new Le(q,ee),le=ne.ratio>=1?20:ne.getHorizontalLength(20),te=ne.ratio<1?20:ne.getVerticalLength(20),ie=document.createElementNS("http://www.w3.org/2000/svg","svg");ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ie);var ue=s.createDefs();ie.appendChild(ue);var de=s.createElement("clipPath",[["id","text-bg-clip"]]);ue.appendChild(de);var ye=s.createPath(s.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));ie.appendChild(ye);var Ee=s.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ee.appendChild(s.createTSpan(q+":"+ee)),ie.appendChild(Ee);var Pe=Ee.getBBox();s.setAttributes(Ee,[["x",((24-Pe.width)/2).toString()],["y",((24-Pe.height)/2-Pe.y).toString()]]);var Ue=s.createPath(s.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Pe.width))/2,(24-Math.ceil(Pe.height))/2,Math.ceil(Pe.width),Math.ceil(Pe.height)));return de.appendChild(Ue),s.setAttributes(ye,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ie),ie.outerHTML}return''},se}(),Me=function(se){function q(ee,ne,le){var te=se.call(this,ee,ne)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return Ce(q,se),q.prototype.setupDropdown=function(){var ee=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=ee.className,ne.colorsClassName=ee.colorsClassName,ee.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},q.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},q.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},q.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},q.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},q.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},q}(we),Be=function(){function se(q,ee){this.GRIP_SIZE=10,this.color=q,this.fillColor=ee,this.visual=s.createGroup(),this.visual.appendChild(s.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(s.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(q){return q===this.visual||q===this.visual.childNodes[0]||q===this.visual.childNodes[1]},se.prototype.setCenter=function(q,ee){this.visual.childNodes.forEach(function(ne){return s.setAttributes(ne,[["cx",q.toString()],["cy",ee.toString()]])})},se}(),Ve=function(){function se(q,ee,ne,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=q,this.canvasHeight=ee,this.margin=ne,this.container=le,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(q){this._aspectRatio=q,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.gridContainer&&s.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(q){this._zoomFactor=q,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var q=this;this.cropShadeElement=s.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=s.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var ee=0;eethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-ee.height/2),s.setAttributes(this.cropRectElement,[["x",ee.x.toString()],["y",ee.y.toString()],["width",ee.width.toString()],["height",ee.height.toString()]]);var ne=ee.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,ie){var ue=ee.y+ne*(ie+1);s.setAttributes(te,[["x1",""+ee.x],["y1",""+ue],["x2",""+(ee.x+ee.width)],["y2",""+ue]])});var le=ee.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,ie){var ue=ee.x+le*(ie+1);s.setAttributes(te,[["x1",""+ue],["y1",""+ee.y],["x2",""+ue],["y2",""+(ee.y+ee.height)]])}),s.setAttributes(this.cropShadeElement,[["d",s.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,ee.x,ee.y,ee.width,ee.height)]]),this.topLeftGrip.setCenter(ee.x,ee.y),this.topRightGrip.setCenter(ee.x+ee.width,ee.y),this.bottomLeftGrip.setCenter(ee.x,ee.y+ee.height),this.bottomRightGrip.setCenter(ee.x+ee.width,ee.y+ee.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},se.prototype.clientToLocalCoordinates=function(q,ee){var ne=this.container.getBoundingClientRect();return{x:q-ne.left+this.margin,y:ee-ne.top+this.margin}},se.prototype.onPointerDown=function(q){this.container.setPointerCapture(q.pointerId),this.previousPoint=this.clientToLocalCoordinates(q.clientX,q.clientY),this.cropRectElement===q.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(q.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(q.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(q.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(q.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(q){if(this.isMoving)this.move(this.clientToLocalCoordinates(q.clientX,q.clientY));else if(this.activeGrip){var ee=this.clientToLocalCoordinates(q.clientX,q.clientY);this.resize(ee)}q.preventDefault()},se.prototype.onPointerUp=function(q){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(q.pointerId)},se.prototype.move=function(q){var ee=q.x-this.previousPoint.x,ne=q.y-this.previousPoint.y;this.zoomFactor!==1&&(ee=-ee/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+ee),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=q},se.prototype.resize=function(q){var ee=Object.assign({},this.cropRect),ne=q.x-this.previousPoint.x,le=q.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:ee.x+nethis.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-ee.width),ee.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(ee.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),ee.height=this.aspectRatio.getVerticalLength(ee.width)):(ee.y+=le,ee.height=this.cropRect.y+this.cropRect.height-ee.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?ee.height=this.aspectRatio.getVerticalLength(ee.width):ee.height+=le}ee.width<10&&(ee.x=this.cropRect.x,ee.width=10),ee.height<10&&(ee.y=this.cropRect.y,ee.height=10),this.previousPoint=q,ee.x>=this.margin&&ee.y>=this.margin&&ee.x-this.margin+ee.width<=this.canvasWidth&&ee.y-this.margin+ee.height<=this.canvasHeight&&(this.cropRect=ee,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var q=this.cropRect.x+this.cropRect.width/2,ee=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=q-this.cropRect.width/2,this.cropRect.y=ee-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(q,ee,ne,le,te,ie){var ue=ne/q,de=le/ee;return{x:(te.x-ie)*ue+ie,y:(te.y-ie)*de+ie,width:te.width*ue,height:te.height*de}},se.prototype.scaleCanvas=function(q,ee){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,q,ee,this.cropRect,this.margin);this.canvasWidth=q,this.canvasHeight=ee,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),Xe=function(){function se(q){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=q,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(se.prototype,"angle",{get:function(){return this._angle},set:function(q){this._angle=q,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},se.prototype.onPointerDown=function(q){this.controlContainer.setPointerCapture(q.pointerId),this.isDragging=!0,this.previousPoint={x:q.clientX,y:q.clientY}},se.prototype.onPointerMove=function(q){this.isDragging&&(this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.previousPoint.x=q.clientX)},se.prototype.onPointerUp=function(q){this.isDragging&&this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(q.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var q=this.angleLabelText.getBBox();s.setAttributes(this.angleLabelElement,[["x",((this.width-q.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var q=this.scaleShape.transform.baseVal.getItem(0);q.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(q,0)}},se.prototype.getVisual=function(){var q=document.createElementNS("http://www.w3.org/2000/svg","svg");q.setAttribute("xmlns","http://www.w3.org/2000/svg"),q.setAttribute("width",this.width+"px"),q.setAttribute("height",this.height+"px"),q.setAttribute("viewBox","0 0 "+this.width+" "+this.height),q.style.flexShrink="0",document.body.appendChild(q);for(var ee="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var le=ne%5==0?this.height/3:this.height/6;ee+="h4v"+-le+"h1v"+le}ee+="v1H0Z",this.scaleShape=s.createPath(ee);var te=s.createTransform();this.scaleShape.transform.baseVal.appendItem(te),q.appendChild(this.scaleShape),this.angleLabelElement=s.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=s.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ie=s.createTSpan("");return ie.innerHTML="°",this.angleLabelElement.appendChild(ie),q.appendChild(this.angleLabelElement),document.body.removeChild(q),q},se}(),ze=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(q,ee,ne,le,te,ie,ue){var de=this;return new Promise(function(ye){var Ee=document.createElement("canvas");Ee.width=q.width.baseVal.value-2*le,Ee.height=q.height.baseVal.value-2*le;var Pe=1,Ue=1;de.naturalSize===!0?(Pe=ee.naturalWidth/(q.width.baseVal.value-2*le)/ie,Ue=ee.naturalHeight/(q.height.baseVal.value-2*le)/ue,Ee.width=ee.naturalWidth/ie,Ee.height=ee.naturalHeight/ue):de.width!==void 0&&de.height!==void 0&&(Pe=de.width/ne.width,Ue=de.height/ne.height,Ee.width*=Pe,Ee.height*=Ue);var Qe=Ee.getContext("2d");Qe.translate(Ee.width/2,Ee.height/2),Qe.rotate(te*Math.PI/180),Qe.scale(ie,ue),Qe.translate(-Ee.width/2,-Ee.height/2),Qe.drawImage(ee,0,0,Ee.width,Ee.height);var tt=document.createElement("canvas");tt.width=ne.width*Pe,tt.height=ne.height*Ue,tt.getContext("2d").putImageData(Qe.getImageData((ne.x-le)*Pe,(ne.y-le)*Ue,ne.width*Pe,ne.height*Ue),0,0),ye(tt.toDataURL(de.imageType,de.imageQuality))})},se}(),rt=function(){function se(q){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=se.instanceCounter++,this.styles=new c(this.instanceNo),this.target=q,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(q){this._zoomToCropEnabled=q,q?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(q){this._gridLines=q,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(q){this._rotationAngle=q,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var q;return(q=this._aspectRatio)!==null&&q!==void 0?q:this.aspectRatios[0]},set:function(q){this._aspectRatio=q},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(q){q===void 0&&(q=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),q||this.closeEventListeners.forEach(function(ee){return ee()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(q){this.renderEventListeners.push(q)},se.prototype.removeRenderEventListener=function(q){this.renderEventListeners.indexOf(q)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(q),1)},se.prototype.addCloseEventListener=function(q){this.closeEventListeners.push(q)},se.prototype.removeCloseEventListener=function(q){this.closeEventListeners.indexOf(q)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(q),1)},se.prototype.setupResizeObserver=function(){var q=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){q.resize(q.target.clientWidth,q.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var q=1*this.target.clientWidth/this.target.clientHeight,ee=this.contentDiv.clientWidth/q>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*q:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=ee+2*this.CANVAS_MARGINq+this.CANVAS_MARGIN?this.target.offsetTop-(q+this.CANVAS_MARGIN):0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var q=this;this.topToolbar=new N,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(ee);var ne=[];this.aspectRatios.forEach(function(Ue){var Qe=new we(Oe.getIcon(Ue.horizontal,Ue.vertical),Ue.horizontal===0&&Ue.vertical===0?"FREE":Ue.horizontal+":"+Ue.vertical);Qe.onClick=function(){return q.ratioButtonClicked(Ue)},ne.push(Qe)}),this.aspectRatioButton=new Me(Oe.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,ee.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new we('',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){q.isGridVisible=!q.isGridVisible,le.isActive=q.isGridVisible},ee.addButton(le);var te=new we('',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){q.zoomToCropEnabled=!q.zoomToCropEnabled,te.isActive=q.zoomToCropEnabled},ee.addButton(te),!G.isLicensed){var ie=new _e;this.topToolbar.addElementBlock(ie);var ue=document.createElement("div");ue.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var de=document.createElement("a");de.style.color="currentColor",de.href="https://markerjs.com/products/cropro",de.target="_blank",de.innerHTML='',ue.appendChild(de),ie.addElement(ue)}var ye=new be;ye.minWidth=3*this.toolbarHeight+"px",ye.contentAlign="end",this.topToolbar.addButtonBlock(ye);var Ee=new we('',"OK");Ee.onClick=this.startRenderAndClose,ye.addButton(Ee),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ee.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Pe=new we('',"Close");Pe.onClick=this.close,ye.addButton(Pe),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Pe.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var q=this;this.bottomToolbar=new N,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(ee);var ne=new we('',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,ee.addButton(ne);var le=new we('',"Rotate right");le.onClick=this.rotateRightButtonClicked,ee.addButton(le);var te=new _e;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new Xe("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ye){q.rotateBy(ye),q.straightener.angle=q.rotationAngle},te.addElement(this.straightener.getUI());var ie=new be;ie.minWidth=2*this.toolbarHeight+"px",ie.contentAlign="end",this.bottomToolbar.addButtonBlock(ie);var ue=new we('',"Flip horizontal");ue.onClick=this.flipHorizontallyButtonClicked,ie.addButton(ue);var de=new we('',"Flip vertical");de.onClick=this.flipVerticallyButtonClicked,ie.addButton(de)},se.prototype.ratioButtonClicked=function(q){this.aspectRatio=q,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Oe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(q){if(q){var ee=this.cropLayer.getRescaledRect(q.width,q.height,this.imageWidth,this.imageHeight,q.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(ee),this.cropRectChanged(ee),this.flippedHorizontally=q.flippedHorizontally,this.flippedVertically=q.flippedVertically,this.applyFlip(),this.rotationAngle=q.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(q,ee){var ne=this.cropImage.getBoundingClientRect();return{x:q-ne.left,y:ee-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var q=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=q+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},se.prototype.rotateLeftButtonClicked=function(){var q=this.rotationAngle-90;this.rotationAngle%90!=0&&(q+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(q)},se.prototype.rotateRightButtonClicked=function(){var q=this.rotationAngle+90;this.rotationAngle%90!=0&&(q-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(q)},se.prototype.rotateTo=function(q){q=(q=q>180?q-360:q)<=-180?q+360:q,this.rotationAngle=q,this.applyRotation()},se.prototype.rotateBy=function(q){this.rotateTo((this.rotationAngle+q)%360)},se.prototype.applyRotation=function(){var q=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var ee=this.editingTargetRotationContainer.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(ee,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=q},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return xe(this,void 0,void 0,function(){var q,ee;return me(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return q=ne.sent(),ee=this.getState(),this.renderEventListeners.forEach(function(le){return le(q,ee)}),this.close(!0),[2]}})})},se.prototype.render=function(){return xe(this,void 0,void 0,function(){var q;return me(this,function(ee){switch(ee.label){case 0:return(q=new ze).naturalSize=this.renderAtNaturalSize,q.imageType=this.renderImageType,q.imageQuality=this.renderImageQuality,q.width=this.renderWidth,q.height=this.renderHeight,this.unzoomFromCrop(),s.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return ee.sent(),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,ee.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new X("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new X("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new X("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var q=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new X("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*q)+`px;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new X("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new X("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new R("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new R("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new X("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new X("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new X("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new X("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new X("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),je=pe("8hTe"),We=pe.n(je),ke=/]*>/g;function Je(se){var q=document.createElement("div");return q.innerHTML=se,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var qe=at.a=function(se){var q=se.value,ee=q===void 0?"":q,ne=se.edit,le=ne===void 0?!1:ne,te=se.className,ie=se.showTextOnly,ue=se.showLines,de=se.replaces,ye=se.zoomImg,Ee=se.hasMask,Pe=se.style,Ue=Pe===void 0?{}:Pe,Qe=se.stylesPrev,tt=Qe===void 0?{}:Qe,xt=String(ee),st=Object(O.useRef)(),nt=Object(O.useRef)(),wt=Object(O.useState)(""),ot=Object(z.a)(wt,2),vt=ot[0],bt=ot[1],Ke=Object(O.useState)("office"),ir=Object(z.a)(Ke,2),nr=ir[0],Kt=ir[1],Ot=function(){var At=new rt(nt.current);At.displayMode="popup",At.addRenderEventListener(function(){var Qt=Object(D.a)(B.a.mark(function yt(gt){var kt;return B.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return st.current.style.display="none",jt.next=3,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:gt}});case 3:kt=jt.sent,kt!=null&&kt.id&&de(nt.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(kt==null?void 0:kt.id,"?type=").concat(kt.content_type));case 5:case"end":return jt.stop()}},yt)}));return function(yt){return Qt.apply(this,arguments)}}()),At.show()},ar=function(){var At=new Se.a(nt.current);At.settings.displayMode="popup",At.addEventListener("render",function(){var Qt=Object(D.a)(B.a.mark(function yt(gt){var kt;return B.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(st.current.style.display="none",!nt.current){jt.next=6;break}return jt.next=4,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:gt.dataUrl}});case 4:kt=jt.sent,kt!=null&&kt.id&&de(nt.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(kt==null?void 0:kt.id,"?type=").concat(kt.content_type));case 6:case"end":return jt.stop()}},yt)}));return function(yt){return Qt.apply(this,arguments)}}()),At.show(),window.markerArea=At},wr=Object(O.useMemo)(function(){st.current&&(st.current.style.zIndex=-1);try{var Ze=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,At=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Qt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;xt=xt.replace(Ze,"("+ae.a.API_SERVER+"/api/attachments/").replace(At,'"'+ae.a.API_SERVER+"/api/attachments/").replace(Qt,'"'+ae.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(br){}var yt=V(xt),gt=E();if(xt.match(/\[TOC\]/)&&(yt=yt.replace("[TOC]
",k()),C()),yt=yt.replace(/(__special_katext_id_\d+__)/g,function(br,jt){var Fe=gt[jt],ct=Fe.type,ri=Fe.expression;return Object(he.renderToString)(Je(ri)||"",{displayMode:ct==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581"),g(),ie){var kt=document.createElement("div");return kt.innerHTML=yt,kt.innerText}return setTimeout(function(){return ti()},500),yt},[xt]),Vt=Object(O.useRef)();v.WebkitLineClamp=ue,ue&&(Ue=Object(U.a)(Object(U.a)({},Ue),v));function ur(Ze){var At=Ze.target;if(At.tagName.toUpperCase()==="IMG"){if(ye){var Qt=At.getAttribute("src");bt(Qt),Kt("image")}}else if(At.tagName.toUpperCase()==="A"){var yt=At.getAttribute("href");if(yt.indexOf("office")>-1)Ze.preventDefault(),bt(yt),Kt("office");else if(yt.indexOf("application/pdf")>-1)Ze.preventDefault(),bt(yt),Kt("pdf");else if(yt.indexOf("text/html")>-1)Ze.preventDefault(),bt(yt),Kt("html");else if(yt.startsWith("#")){Ze.preventDefault();var gt=document.getElementById(yt.replace("#",""));gt&>.scrollIntoView(!0)}}}var ti=function(){var At,Qt=(At=Vt.current)===null||At===void 0?void 0:At.querySelectorAll("video");Qt==null||Qt.forEach(function(yt){if(yt.oncontextmenu=function(){return!1},yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var gt=new $.a;gt.loadSource(yt.src),gt.attachMedia(yt)}}})};Object(O.useEffect)(function(){if(Vt.current&&wr&&(wr.match(ke)&&window.PR.prettyPrint()),Vt.current)return Vt.current.addEventListener("click",ur),function(){Vt.current.removeEventListener("click",ur),g(),C()}},[wr,Vt.current,ur]);var It=function(At){if(!le)return;At.target.nodeName==="IMG"?(st.current.style.zIndex=1,st.current.style.display="flex",st.current.style.width=At.target.clientWidth+"px",st.current.style.height=At.target.clientHeight+"px",st.current.style.top=At.target.offsetTop+"px",st.current.style.left=At.target.offsetLeft+"px",nt.current.src=At.target.getAttribute("src")):st.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:Vt,style:Object(U.a)({},Ue),className:"".concat(te||""," markdown-body ").concat(We.a.mdBody),onMouseOver:It,dangerouslySetInnerHTML:{__html:wr}}),b.a.createElement("div",{ref:st,className:We.a.button},b.a.createElement(Z.a,null,b.a.createElement(J.a,{onClick:function(){return Ot()}},"\u88C1\u526A"),b.a.createElement(J.a,{onClick:function(){return ar()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:nt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),b.a.createElement(ge.a,{close:!0,data:vt,type:vt!=null&&vt.length?nr:"",style:Object(U.a)({},tt),onClose:function(){return bt("")}}))}},"9VGf":function(pt,at,pe){"use strict";pe.d(at,"a",function(){return _});var fe=pe("q1tI"),Z=pe.n(fe);function _(J,U){var D=Object(fe.useRef)();Object(fe.useEffect)(function(){D.current=J}),Object(fe.useEffect)(function(){function z(){D.current()}if(U!==null){var H=setInterval(z,U);return function(){return clearInterval(H)}}},[U])}},Bd2K:function(pt,at,pe){(function(fe){fe(pe("VrN/"),pe("osHv"))})(function(fe){fe.defineOption("autoCloseTags",!1,function(B,O,b){if(b!=fe.Init&&b&&B.removeKeyMap("autoCloseTags"),!O)return;var A={name:"autoCloseTags"};(typeof O!="object"||O.whenClosing!==!1)&&(A["'/'"]=function(P){return D(P)}),(typeof O!="object"||O.whenOpening!==!1)&&(A["'>'"]=function(P){return J(P)}),B.addKeyMap(A)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=["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 J(B){if(B.getOption("disableInput"))return fe.Pass;for(var O=B.listSelections(),b=[],A=B.getOption("autoCloseTags"),P=0;PL.ch&&(l=l.slice(0,l.length-w.end+L.ch));var m=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=L.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&o.close||w.string.indexOf("/")==L.ch-w.start-1||C&&z(C,m)>-1||H(B,y.mode.xmlCurrentContext&&y.mode.xmlCurrentContext(h)||[],l,L,!0))return fe.Pass;var k=typeof A=="object"&&A.emptyTags;if(k&&z(k,l)>-1){b[P]={text:"/>",newPos:fe.Pos(L.line,L.ch+2)};continue}var x=v&&z(v,m)>-1;b[P]={indent:x,text:">"+(x?`
`:"")+""+l+">",newPos:x?fe.Pos(L.line+1,0):fe.Pos(L.line,L.ch+1)}}for(var f=typeof A=="object"&&A.dontIndentOnAutoClose,P=O.length-1;P>=0;P--){var p=b[P];B.replaceRange(p.text,O[P].head,O[P].anchor,"+insert");var d=B.listSelections().slice(0);d[P]={head:p.newPos,anchor:p.newPos},B.setSelections(d),!f&&p.indent&&(B.indentLine(p.newPos.line,null,!0),B.indentLine(p.newPos.line+1,null,!0))}}function U(B,O){for(var b=B.listSelections(),A=[],P=O?"/":"",L=B.getOption("autoCloseTags"),w=typeof L=="object"&&L.dontIndentOnSlash,y=0;y"&&(C+=">"),A[y]=C}if(B.replaceSelections(A),b=B.listSelections(),!w)for(var y=0;y=0&&O[h]==b;h--)++y;A=w.to;for(var h=1;h0){for(var O=0;O1&&arguments[1]!==void 0?arguments[1]:"",O=[],b=0;bee.length)&&(ne=ee.length);for(var le=0,te=new Array(ne);le=ee.length?{done:!0}:{done:!1,value:ee[te++]}}}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 le=ee[Symbol.iterator](),le.next.bind(le)}function D(ee,ne){return ne={exports:{}},ee(ne,ne.exports),ne.exports}var z=D(function(ee){function ne(){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 le(te){ee.exports.defaults=te}ee.exports={defaults:ne(),getDefaults:ne,changeDefaults:le}}),H=z.defaults,B=z.getDefaults,O=z.changeDefaults,b=/[&<>"']/,A=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,L=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},y=function(ne){return w[ne]};function h(ee,ne){if(ne){if(b.test(ee))return ee.replace(A,y)}else if(P.test(ee))return ee.replace(L,y);return ee}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ee){return ee.replace(o,function(ne,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var u=/(^|[^\[])\^/g;function C(ee,ne){ee=ee.source||ee,ne=ne||"";var le={replace:function(ie,ue){return ue=ue.source||ue,ue=ue.replace(u,"$1"),ee=ee.replace(ie,ue),le},getRegex:function(){return new RegExp(ee,ne)}};return le}var v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(ee,ne,le){if(ee){var te;try{te=decodeURIComponent(l(le)).replace(v,"").toLowerCase()}catch(ie){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ne&&!m.test(le)&&(le=a(ne,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(ie){return null}return le}var x={},f=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(ee,ne){x[" "+ee]||(f.test(ee)?x[" "+ee]=ee+"/":x[" "+ee]=F(ee,"/",!0)),ee=x[" "+ee];var le=ee.indexOf(":")===-1;return ne.substring(0,2)==="//"?le?ne:ee.replace(p,"$1")+ne:ne.charAt(0)==="/"?le?ne:ee.replace(d,"$1")+ne:ee+ne}var E={exec:function(){}};function g(ee){for(var ne=1,le,te;ne=0&&ye[Pe]==="\\";)Ee=!Ee;return Ee?"|":" |"}),te=le.split(/ \|/),ie=0;if(te.length>ne)te.splice(ne);else for(;te.length=te.length?ie.slice(te.length):ie}).join(`
`)}var Se=function(){function ee(le){this.options=le||M}var ne=ee.prototype;return ne.space=function(te){var ie=this.rules.block.newline.exec(te);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},ne.code=function(te,ie){var ue=this.rules.block.code.exec(te);if(ue){var de=ie[ie.length-1];if(de&&de.type==="paragraph")return{raw:ue[0],text:ue[0].trimRight()};var ye=ue[0].replace(/^ {4}/gm,"");return{type:"code",raw:ue[0],codeBlockStyle:"indented",text:this.options.pedantic?ye:I(ye,`
`)}}},ne.fences=function(te){var ie=this.rules.block.fences.exec(te);if(ie){var ue=ie[0],de=De(ue,ie[3]||"");return{type:"code",raw:ue,lang:ie[2]?ie[2].trim():ie[2],text:de}}},ne.heading=function(te){var ie=this.rules.block.heading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},ne.nptable=function(te){var ie=this.rules.block.nptable.exec(te);if(ie){var ue={type:"table",header:$(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(ue.header.length===ue.align.length){var de=ue.align.length,ye;for(ye=0;ye ?/gm,"");return{type:"blockquote",raw:ie[0],text:ue}}},ne.list=function(te){var ie=this.rules.block.list.exec(te);if(ie){for(var ue=ie[0],de=ie[2],ye=de.length>1,Ee=de[de.length-1]===")",Pe={type:"list",raw:ue,ordered:ye,start:ye?+de.slice(0,-1):"",loose:!1,items:[]},Ue=ie[0].match(this.rules.block.item),Qe=!1,tt,xt,st,nt,wt,ot,vt,bt=Ue.length,Ke=0;Ke1||this.options.smartLists&&st!==de)&&(nt=Ue.slice(Ke+1).join(`
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-nt.length),Ke=bt-1)),wt=Qe||/\n\n(?!\s*$)/.test(tt),Ke!==bt-1&&(Qe=tt.charAt(tt.length-1)===`
`,wt||(wt=Qe)),wt&&(Pe.loose=!0),ot=/^\[[ xX]\] /.test(tt),vt=void 0,ot&&(vt=tt[1]!==" ",tt=tt.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:ue,task:ot,checked:vt,loose:wt,text:tt});return Pe}},ne.html=function(te){var ie=this.rules.block.html.exec(te);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):ae(ie[0]):ie[0]}},ne.def=function(te){var ie=this.rules.block.def.exec(te);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var ue=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:ue,raw:ie[0],href:ie[2],title:ie[3]}}},ne.table=function(te){var ie=this.rules.block.table.exec(te);if(ie){var ue={type:"table",header:$(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(ue.header.length===ue.align.length){ue.raw=ie[0];var de=ue.align.length,ye;for(ye=0;ye/i.test(de[0])&&(ie=!1),!ue&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?ue=!0:ue&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(ue=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ie,inRawBlock:ue,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ae(de[0]):de[0]}},ne.link=function(te){var ie=this.rules.inline.link.exec(te);if(ie){var ue=he(ie[2],"()");if(ue>-1){var de=ie[0].indexOf("!")===0?5:4,ye=de+ie[1].length+ue;ie[2]=ie[2].substring(0,ue),ie[0]=ie[0].substring(0,ye).trim(),ie[3]=""}var Ee=ie[2],Pe="";if(this.options.pedantic){var Ue=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ee);Ue?(Ee=Ue[1],Pe=Ue[3]):Pe=""}else Pe=ie[3]?ie[3].slice(1,-1):"";Ee=Ee.trim().replace(/^<([\s\S]*)>$/,"$1");var Qe=ge(ie,{href:Ee&&Ee.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},ie[0]);return Qe}},ne.reflink=function(te,ie){var ue;if((ue=this.rules.inline.reflink.exec(te))||(ue=this.rules.inline.nolink.exec(te))){var de=(ue[2]||ue[1]).replace(/\s+/g," ");if(de=ie[de.toLowerCase()],!de||!de.href){var ye=ue[0].charAt(0);return{type:"text",raw:ye,text:ye}}var Ee=ge(ue,de,ue[0]);return Ee}},ne.strong=function(te,ie,ue){ue===void 0&&(ue="");var de=this.rules.inline.strong.start.exec(te);if(de&&(!de[1]||de[1]&&(ue===""||this.rules.inline.punctuation.exec(ue)))){ie=ie.slice(-1*te.length);var ye=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ye.lastIndex=0;for(var Ee;(de=ye.exec(ie))!=null;)if(Ee=this.rules.inline.strong.middle.exec(ie.slice(0,de.index+3)),Ee)return{type:"strong",raw:te.slice(0,Ee[0].length),text:te.slice(2,Ee[0].length-2)}}},ne.em=function(te,ie,ue){ue===void 0&&(ue="");var de=this.rules.inline.em.start.exec(te);if(de&&(!de[1]||de[1]&&(ue===""||this.rules.inline.punctuation.exec(ue)))){ie=ie.slice(-1*te.length);var ye=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ye.lastIndex=0;for(var Ee;(de=ye.exec(ie))!=null;)if(Ee=this.rules.inline.em.middle.exec(ie.slice(0,de.index+2)),Ee)return{type:"em",raw:te.slice(0,Ee[0].length),text:te.slice(1,Ee[0].length-1)}}},ne.codespan=function(te){var ie=this.rules.inline.code.exec(te);if(ie){var ue=ie[2].replace(/\n/g," "),de=/[^ ]/.test(ue),ye=ue.startsWith(" ")&&ue.endsWith(" ");return de&&ye&&(ue=ue.substring(1,ue.length-1)),ue=ae(ue,!0),{type:"codespan",raw:ie[0],text:ue}}},ne.br=function(te){var ie=this.rules.inline.br.exec(te);if(ie)return{type:"br",raw:ie[0]}},ne.del=function(te){var ie=this.rules.inline.del.exec(te);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},ne.autolink=function(te,ie){var ue=this.rules.inline.autolink.exec(te);if(ue){var de,ye;return ue[2]==="@"?(de=ae(this.options.mangle?ie(ue[1]):ue[1]),ye="mailto:"+de):(de=ae(ue[1]),ye=de),{type:"link",raw:ue[0],text:de,href:ye,tokens:[{type:"text",raw:de,text:de}]}}},ne.url=function(te,ie){var ue;if(ue=this.rules.inline.url.exec(te)){var de,ye;if(ue[2]==="@")de=ae(this.options.mangle?ie(ue[0]):ue[0]),ye="mailto:"+de;else{var Ee;do Ee=ue[0],ue[0]=this.rules.inline._backpedal.exec(ue[0])[0];while(Ee!==ue[0]);de=ae(ue[0]),ue[1]==="www."?ye="http://"+de:ye=de}return{type:"link",raw:ue[0],text:de,href:ye,tokens:[{type:"text",raw:de,text:de}]}}},ne.inlineText=function(te,ie,ue){var de=this.rules.inline.text.exec(te);if(de){var ye;return ie?ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ae(de[0]):de[0]:ye=ae(this.options.smartypants?ue(de[0]):de[0]),{type:"text",raw:de[0],text:ye}}},ee}(),Re=V.noopTest,Ce=V.edit,xe=V.merge,me={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\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:Re,table:Re,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};me._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,me._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,me.def=Ce(me.def).replace("label",me._label).replace("title",me._title).getRegex(),me.bullet=/(?:[*+-]|\d{1,9}[.)])/,me.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,me.item=Ce(me.item,"gm").replace(/bull/g,me.bullet).getRegex(),me.list=Ce(me.list).replace(/bull/g,me.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+me.def.source+")").getRegex(),me._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",me._comment=//,me.html=Ce(me.html,"i").replace("comment",me._comment).replace("tag",me._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me.paragraph=Ce(me._paragraph).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.blockquote=Ce(me.blockquote).replace("paragraph",me.paragraph).getRegex(),me.normal=xe({},me),me.gfm=xe({},me.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),me.gfm.nptable=Ce(me.gfm.nptable).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.gfm.table=Ce(me.gfm.table).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.pedantic=xe({},me.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",me._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Re,paragraph:Ce(me.normal._paragraph).replace("hr",me.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",me.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Re,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:Re,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",G.punctuation=Ce(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=Ce(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=Ce(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=Ce(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=Ce(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=Ce(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=Ce(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=Ce(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=Ce(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=Ce(G._blockSkip,"g").getRegex(),G.overlapSkip=Ce(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=Ce(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=Ce(G.tag).replace("comment",me._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=Ce(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=Ce(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=Ce(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=xe({},G),G.pedantic=xe({},G.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:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=xe({},G.normal,{escape:Ce(G.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]*?(?:(?=[\\.5&&(te="x"+te.toString(16)),ne+=""+te+";";return ne}var be=function(){function ee(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||c,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:R.normal,inline:X.normal};this.options.pedantic?(te.block=R.pedantic,te.inline=X.pedantic):this.options.gfm&&(te.block=R.gfm,this.options.breaks?te.inline=X.breaks:te.inline=X.gfm),this.tokenizer.rules=te}ee.lex=function(te,ie){var ue=new ee(ie);return ue.lex(te)};var ne=ee.prototype;return ne.lex=function(te){return te=te.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},ne.blockTokens=function(te,ie,ue){ie===void 0&&(ie=[]),ue===void 0&&(ue=!0),te=te.replace(/^ +$/gm,"");for(var de,ye,Ee,Pe;te;){if(de=this.tokenizer.space(te)){te=te.substring(de.raw.length),de.type&&ie.push(de);continue}if(de=this.tokenizer.code(te,ie)){te=te.substring(de.raw.length),de.type?ie.push(de):(Pe=ie[ie.length-1],Pe.raw+=`
`+de.raw,Pe.text+=`
`+de.text);continue}if(de=this.tokenizer.fences(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.heading(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.nptable(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.hr(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.blockquote(te)){te=te.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],ue),ie.push(de);continue}if(de=this.tokenizer.list(te)){for(te=te.substring(de.raw.length),Ee=de.items.length,ye=0;ye0)for(;(Ue=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)Qe.includes(Ue[0].slice(Ue[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ue=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Ee=this.tokenizer.escape(te)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.tag(te,ue,de)){te=te.substring(Ee.raw.length),ue=Ee.inLink,de=Ee.inRawBlock,ie.push(Ee);continue}if(Ee=this.tokenizer.link(te)){te=te.substring(Ee.raw.length),Ee.type==="link"&&(Ee.tokens=this.inlineTokens(Ee.text,[],!0,de)),ie.push(Ee);continue}if(Ee=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Ee.raw.length),Ee.type==="link"&&(Ee.tokens=this.inlineTokens(Ee.text,[],!0,de)),ie.push(Ee);continue}if(Ee=this.tokenizer.strong(te,Pe,ye)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],ue,de),ie.push(Ee);continue}if(Ee=this.tokenizer.em(te,Pe,ye)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],ue,de),ie.push(Ee);continue}if(Ee=this.tokenizer.codespan(te)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.br(te)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.del(te)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],ue,de),ie.push(Ee);continue}if(Ee=this.tokenizer.autolink(te,oe)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(!ue&&(Ee=this.tokenizer.url(te,oe))){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.inlineText(te,de,N)){te=te.substring(Ee.raw.length),ye=Ee.raw.slice(-1),ie.push(Ee);continue}if(te){var tt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return ie},Z(ee,null,[{key:"rules",get:function(){return{block:R,inline:X}}}]),ee}(),we=z.defaults,_e=V.cleanUrl,Le=V.escape,Oe=function(){function ee(le){this.options=le||we}var ne=ee.prototype;return ne.code=function(te,ie,ue){var de=(ie||"").match(/\S*/)[0];if(this.options.highlight){var ye=this.options.highlight(te,de);ye!=null&&ye!==te&&(ue=!0,te=ye)}return de?''+(ue?te:Le(te,!0))+`
`:""+(ue?te:Le(te,!0))+`
`},ne.blockquote=function(te){return`
`+te+`
`},ne.html=function(te){return te},ne.heading=function(te,ie,ue,de){return this.options.headerIds?"
`:""+te+"
`},ne.hr=function(){return this.options.xhtml?`
`:`
`},ne.list=function(te,ie,ue){var de=ie?"ol":"ul",ye=ie&&ue!==1?' start="'+ue+'"':"";return"<"+de+ye+`>
`+te+""+de+`>
`},ne.listitem=function(te){return""+te+`
`},ne.checkbox=function(te){return" "},ne.paragraph=function(te){return""+te+`
`},ne.table=function(te,ie){return ie&&(ie=""+ie+""),`
`},ne.tablerow=function(te){return`
`+te+`
`},ne.tablecell=function(te,ie){var ue=ie.header?"th":"td",de=ie.align?"<"+ue+' align="'+ie.align+'">':"<"+ue+">";return de+te+""+ue+`>
`},ne.strong=function(te){return""+te+""},ne.em=function(te){return""+te+""},ne.codespan=function(te){return""+te+""},ne.br=function(){return this.options.xhtml?"
":"
"},ne.del=function(te){return""+te+""},ne.link=function(te,ie,ue){if(te=_e(this.options.sanitize,this.options.baseUrl,te),te===null)return ue;var de='"+ue+"",de},ne.image=function(te,ie,ue){if(te=_e(this.options.sanitize,this.options.baseUrl,te),te===null)return ue;var de='
":">",de},ne.text=function(te){return te},ee}(),Me=function(){function ee(){}var ne=ee.prototype;return ne.strong=function(te){return te},ne.em=function(te){return te},ne.codespan=function(te){return te},ne.del=function(te){return te},ne.html=function(te){return te},ne.text=function(te){return te},ne.link=function(te,ie,ue){return""+ue},ne.image=function(te,ie,ue){return""+ue},ne.br=function(){return""},ee}(),Be=function(){function ee(){this.seen={}}var ne=ee.prototype;return ne.slug=function(te){var ie=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ie)){var ue=ie;do this.seen[ue]++,ie=ue+"-"+this.seen[ue];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},ee}(),Ve=z.defaults,Xe=V.unescape,ze=function(){function ee(le){this.options=le||Ve,this.options.renderer=this.options.renderer||new Oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me,this.slugger=new Be}ee.parse=function(te,ie){var ue=new ee(ie);return ue.parse(te)};var ne=ee.prototype;return ne.parse=function(te,ie){ie===void 0&&(ie=!0);var ue="",de,ye,Ee,Pe,Ue,Qe,tt,xt,st,nt,wt,ot,vt,bt,Ke,ir,nr,Kt,Ot=te.length;for(de=0;de0&&Ke.tokens[0].type==="text"?(Ke.tokens[0].text=Kt+" "+Ke.tokens[0].text,Ke.tokens[0].tokens&&Ke.tokens[0].tokens.length>0&&Ke.tokens[0].tokens[0].type==="text"&&(Ke.tokens[0].tokens[0].text=Kt+" "+Ke.tokens[0].tokens[0].text)):Ke.tokens.unshift({type:"text",text:Kt}):bt+=Kt),bt+=this.parse(Ke.tokens,vt),st+=this.renderer.listitem(bt,nr,ir);ue+=this.renderer.list(st,wt,ot);continue}case"html":{ue+=this.renderer.html(nt.text);continue}case"paragraph":{ue+=this.renderer.paragraph(this.parseInline(nt.tokens));continue}case"text":{for(st=nt.tokens?this.parseInline(nt.tokens):nt.text;de+1An error occurred:
"+We(Ee.message+"",!0)+"
";throw Ee}}se.options=se.setOptions=function(ee){return rt(se.defaults,ee),Je(se.defaults),se},se.getDefaults=ke,se.defaults=qe,se.use=function(ee){var ne=rt({},ee);if(ee.renderer&&function(){var te=se.defaults.renderer||new Oe,ie=function(ye){var Ee=te[ye];te[ye]=function(){for(var Pe=arguments.length,Ue=new Array(Pe),Qe=0;Qe`,triples:"",explode:"[]{}"},_=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(w,y,h){h&&h!=fe.Init&&(w.removeKeyMap(U),w.state.closeBrackets=null),y&&(D(J(y,"pairs")),w.state.closeBrackets=y,w.addKeyMap(U))});function J(w,y){return y=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[y]!=null?w[y]:Z[y]}var U={Backspace:B,Enter:O};function D(w){for(var y=0;y=0;l--){var C=o[l].head;w.replaceRange("",_(C.line,C.ch-1),_(C.line,C.ch+1),"+delete")}}function O(w){var y=H(w),h=y&&J(y,"explode");if(!h||w.getOption("disableInput"))return fe.Pass;for(var o=w.listSelections(),l=0;l0;return{anchor:new _(w.anchor.line,w.anchor.ch+(y?-1:1)),head:new _(w.head.line,w.head.ch+(y?1:-1))}}function A(w,y){var h=H(w);if(!h||w.getOption("disableInput"))return fe.Pass;var o=J(h,"pairs"),l=o.indexOf(y);if(l==-1)return fe.Pass;for(var u=J(h,"closeBefore"),C=J(h,"triples"),v=o.charAt(l+1)==y,m=w.listSelections(),k=l%2==0,x,f=0;f=0&&w.getRange(d,_(d.line,d.ch+3))==y+y+y?a="skipThree":a="skip";else if(v&&d.ch>1&&C.indexOf(y)>=0&&w.getRange(_(d.line,d.ch-2),d)==y+y){if(d.ch>2&&/\bstring/.test(w.getTokenTypeAt(_(d.line,d.ch-2))))return fe.Pass;a="addFour"}else if(v){var g=d.ch==0?" ":w.getRange(_(d.line,d.ch-1),d);if(!fe.isWordChar(E)&&g!=y&&!fe.isWordChar(g))a="both";else return fe.Pass}else if(k&&(E.length===0||/\s/.test(E)||u.indexOf(E)>-1))a="both";else return fe.Pass;if(!x)x=a;else if(x!=a)return fe.Pass}var S=l%2?o.charAt(l-1):y,F=l%2?y:o.charAt(l+1);w.operation(function(){if(x=="skip")w.execCommand("goCharRight");else if(x=="skipThree")for(var W=0;W<3;W++)w.execCommand("goCharRight");else if(x=="surround"){for(var K=w.getSelections(),W=0;W0&&(he.percent=he.loaded/he.total*100),V.onProgress(he)});var I=new FormData;V.data&&Object.keys(V.data).forEach(function(ae){var he=V.data[ae];if(Array.isArray(he)){he.forEach(function(ge){I.append(ae+"[]",ge)});return}I.append(ae,V.data[ae])}),V.file instanceof Blob?I.append(V.filename,V.file,V.file.name):I.append(V.filename,V.file),M.onerror=function(he){V.onError(he)},M.onload=function(){return M.status<200||M.status>=300?V.onError(U(V,M),D(M)):V.onSuccess(D(M),M)},M.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in M&&(M.withCredentials=!0);var $=V.headers||{};return $["X-Requested-With"]!==null&&M.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys($).forEach(function(ae){$[ae]!==null&&M.setRequestHeader(ae,$[ae])}),M.send(I),{abort:function(){M.abort()}}}var H=+new Date,B=0;function O(){return"rc-upload-"+H+"-"+ ++B}function b(V,M){return V.indexOf(M,V.length-M.length)!==-1}var A=function(V,M){if(V&&M){var I=Array.isArray(M)?M:M.split(","),$=V.name||"",ae=V.type||"",he=ae.replace(/\/.*$/,"");return I.some(function(ge){var De=ge.trim();return De.charAt(0)==="."?b($.toLowerCase(),De.toLowerCase()):/\/\*$/.test(De)?he===De.replace(/\/.*$/,""):ae===De})}return!0};function P(V,M){var I=V.createReader(),$=[];function ae(){I.readEntries(function(he){var ge=Array.prototype.slice.apply(he);$=$.concat(ge);var De=!ge.length;De?M($):ae()})}ae()}var L=function(M,I,$){var ae=function he(ge,De){De=De||"",ge.isFile?ge.file(function(Se){$(Se)&&(ge.fullPath&&!Se.webkitRelativePath&&(Object.defineProperties(Se,{webkitRelativePath:{writable:!0}}),Se.webkitRelativePath=ge.fullPath.replace(/^\//,""),Object.defineProperties(Se,{webkitRelativePath:{writable:!1}})),I([Se]))}):ge.isDirectory&&P(ge,function(Se){Se.forEach(function(Re){he(Re,""+De+ge.name+"/")})})};M.forEach(function(he){ae(he.webkitGetAsEntry())})},w=L,y=Object.assign||function(V){for(var M=1;M=0)continue;if(!Object.prototype.hasOwnProperty.call(V,$))continue;I[$]=V[$]}return I}function C(V,M){if(!(V instanceof M))throw new TypeError("Cannot call a class as a function")}function v(V,M){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:V}function m(V,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);V.prototype=Object.create(M&&M.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(V,M):V.__proto__=M)}var k=function(M){return Object.keys(M).reduce(function(I,$){return($.substr(0,5)==="data-"||$.substr(0,5)==="aria-"||$==="role")&&(I[$]=M[$]),I},{})},x=function(V){m(M,V);function M(){var I,$,ae,he;C(this,M);for(var ge=arguments.length,De=Array(ge),Se=0;Se1&&arguments[1]!==void 0?arguments[1]:1,le=Me.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(I).map(function(ae,he){if(!U.isValidElement(ae)||!ae.type)return null;var ge=ae.type.isSelectOptGroup,De=ae.key,Se=ae.props,Re=Se.children,Ce=Object(z.a)(Se,["children"]);return $||!ge?x(ae):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(De===null?he:De,"__"),label:De},Ce),{},{options:f(Re)})}).filter(function(ae){return ae})}var p=pe("2Qr1"),d=pe("qNPg"),a=pe("U8pU"),E=pe("Kwbf"),g=pe("WKfj");function S(I){var $=I.mode,ae=I.options,he=I.children,ge=I.backfill,De=I.allowClear,Se=I.placeholder,Re=I.getInputElement,Ce=I.showSearch,xe=I.onSearch,me=I.defaultOpen,G=I.autoFocus,s=I.labelInValue,c=I.value,R=I.inputValue,X=I.optionLabelProp,N=$==="multiple"||$==="tags",oe=Ce!==void 0?Ce:N||$==="combobox",be=ae||f(he);if(Object(E.a)($!=="tags"||be.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var we=be.some(function(Oe){return Oe.options?Oe.options.some(function(Me){return typeof("value"in Me?Me.value:Me.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});Object(E.a)(!we,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)($!=="combobox"||!X,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)($==="combobox"||!ge,"`backfill` only works with `combobox` mode."),Object(E.a)($==="combobox"||!Re,"`getInputElement` only work with `combobox` mode."),Object(E.b)($!=="combobox"||!Re||!De||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!oe&&$!=="combobox"&&$!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!me||G,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),c!=null){var _e=Object(g.d)(c);Object(E.a)(!s||_e.every(function(Oe){return Object(a.a)(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!N||Array.isArray(c),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Le=null;Object(k.a)(he).some(function(Oe){if(!U.isValidElement(Oe)||!Oe.type)return!1;var Me=Oe.type;if(Me.isSelectOption)return!1;if(Me.isSelectOptGroup){var Be=Object(k.a)(Oe.props.children).every(function(Ve){return!U.isValidElement(Ve)||!Oe.type||Ve.type.isSelectOption?!0:(Le=Ve.type,!1)});return!Be}return Le=Me,!0}),Le&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(E.a)(R===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=S,W=Object(d.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:f,flattenOptions:p.d,getLabeledValue:p.e,filterOptions:p.b,isValueDisabled:p.g,findValueOption:p.c,warningProps:F,fillOptionsWithMissingValue:p.a}),K=function(I){Object(_.a)(ae,I);var $=Object(J.a)(ae);function ae(){var he;return Object(fe.a)(this,ae),he=$.apply(this,arguments),he.selectRef=U.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(Z.a)(ae,[{key:"render",value:function(){return U.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),ae}(U.Component);K.Option=u,K.OptGroup=v;var V=K,M=at.c=V},M8RZ:function(pt,at,pe){"use strict";pe.d(at,"a",function(){return B});var fe=pe("fWQN"),Z=pe("mtLc"),_=pe("yKVA"),J=pe("879j"),U=pe("q1tI"),D=pe.n(U),z=pe("i8i4"),H=pe.n(z),B=function(O){Object(_.a)(A,O);var b=Object(J.a)(A);function A(P){var L;Object(fe.a)(this,A),L=b.call(this,P);var w=window.document;return L.node=w.createElement("div"),w.body.appendChild(L.node),L}return Object(Z.a)(A,[{key:"render",value:function(){var L=this.props.children;return Object(z.createPortal)(L,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),A}(D.a.Component)},Ot1p:function(pt,at,pe){"use strict";var fe=pe("2qtc"),Z=pe("kLXV"),_=pe("rAM+"),J=pe("miYZ"),U=pe("tsqr"),D=pe("9og8"),z=pe("tJVT"),H=pe("jrin"),B=pe("WmNS"),O=pe.n(B),b=pe("q1tI"),A=pe.n(b),P=pe("VrN/"),L=pe.n(P),w=pe("bdgK"),y=pe("p77/"),h=pe("Bd2K"),o=pe("ELLl"),l=pe("19Vz"),u=pe("lZu9"),C=pe("+NIl"),v=pe("kSUc"),m=pe("9Bee"),k=function(ye){var Ee=ye.value,Pe=Ee===void 0?"":Ee,Ue=ye.className,Qe=ye.showTextOnly,tt=ye.showLines,xt=ye.style,st=xt===void 0?{}:xt,nt=Object(b.useMemo)(function(){return""},[Pe]);return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{dangerouslySetInnerHTML:{__html:nt}}))},x=pe("0Owb"),f=pe("dejd"),p=pe("C+DQ"),d=pe("1vsH"),a=pe("m3rI"),E=[{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 g(ye){var Ee=ye.onActionCallback,Pe=ye.title,Ue=ye.icon,Qe=ye.actionName,tt=ye.className,xt=tt===void 0?"":tt,st=ye.children;function nt(){Ee(Qe)}return A.a.createElement("a",{title:Pe,className:xt,onClick:nt},A.a.createElement("i",{className:"md-iconfont ".concat(Ue)}),st)}var S=function(ye){var Ee=ye.watch,Pe=ye.showNullButton,Ue=ye.onActionCallback,Qe=ye.fullScreen,tt=ye.insertTemp,xt=ye.hidetoolBar,st=ye.uuid,nt=ye.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(d.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(d.F)("_educoder_session"),"&key=").concat(st,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var wt=[].concat(E,[{title:"".concat(Ee?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ee?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return A.a.createElement("ul",{className:"markdown-toolbar-container"},!xt&&wt.map(function(ot,vt){return A.a.createElement("li",{key:vt},ot.actionName?A.a.createElement(g,Object(x.a)({},ot,{onActionCallback:Ue})):A.a.createElement("span",{className:"v-line"}))}),Pe?A.a.createElement("li",null,A.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ue},A.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,tt&&A.a.createElement("li",null,A.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(tt),onActionCallback:Ue},A.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),A.a.createElement("li",{className:"btn-full-screen"},A.a.createElement(g,{icon:"".concat(Qe?"icon-shrink":"icon-enlarge"),title:Qe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ue})))},F=pe("M8RZ"),W=pe("+L6B"),K=pe("2/Rp"),V=pe("y8nQ"),M=pe("Vl3Y"),I=pe("5NDa"),$=pe("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},he=function(ye){var Ee=ye.callback,Pe=ye.onCancel;function Ue(Qe){Ee(Qe)}return A.a.createElement(M.a,Object(x.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ue}),A.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},A.a.createElement($.a,null)),A.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},A.a.createElement($.a,null)),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},ge=pe("7ahc"),De=pe("HmJG"),Se=pe("BjJ7"),Re=M.a.useForm,Ce={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}},me=function(ye){var Ee=ye.callback,Pe=ye.onCancel,Ue=Re(),Qe=Object(z.a)(Ue,1),tt=Qe[0];function xt(wt){Ee(wt)}function st(wt,ot){if(wt.status===-1){U.b.error(wt.message);return}tt.setFieldsValue({src:"/api/attachments/".concat(wt.id),type:ot.type})}function nt(wt){var ot=wt.target.files[0];s(ot,st)}return A.a.createElement(M.a,Object(x.a)({form:tt},xe,{className:"upload-image-panel",onFinish:xt}),A.a.createElement(M.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},A.a.createElement("div",{className:"flex-container"},A.a.createElement(M.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},A.a.createElement($.a,{style:Ce})),A.a.createElement(G,{onFileChange:nt}))),A.a.createElement(M.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},A.a.createElement($.a,{style:{width:264}})),A.a.createElement(M.a.Item,{style:{textAlign:"right"}},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function G(ye){var Ee=ye.onFileChange;return A.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",A.a.createElement("input",{type:"file",onChange:Ee}))}function s(ye,Ee){if(!ye)throw new String("\u6CA1\u6709\u6587\u4EF6");var Pe=new FormData;Pe.append("editormd-image-file",ye),Pe.append("file_param_name","editormd-image-file"),Pe.append("byxhr","true");var Ue=new window.XMLHttpRequest;Ue.withCredentials=!0,Ue.addEventListener("load",function(Qe){Ee(JSON.parse(Qe.target.responseText),ye)},!1),Ue.addEventListener("error",function(Qe){console.error(Qe)},!1),Ue.open("POST","".concat(Se.a,"/api/attachments.json")),Ue.send(Pe)}var c=pe("giR+"),R=pe("fyUT"),X=pe("7Kak"),N=pe("9yH6"),oe=N.a.Group,be={margin:"0 8px"},we=function(ye){var Ee=ye.callback,Pe=ye.onCancel;function Ue(Qe){Ee(Qe)}return A.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ue},A.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},A.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),A.a.createElement("span",{style:be},"\u884C\u6570"),A.a.createElement(M.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},A.a.createElement(R.a,null)),A.a.createElement("span",{style:be},"\u5217\u6570"),A.a.createElement(M.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},A.a.createElement(R.a,null))),A.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},A.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),A.a.createElement(M.a.Item,{name:"align"},A.a.createElement(oe,null,A.a.createElement(N.a,{value:"default"},A.a.createElement("i",{className:"fa fa-align-justify"})),A.a.createElement(N.a,{value:"left"},A.a.createElement("i",{className:"fa fa-align-left"})),A.a.createElement(N.a,{value:"center"},A.a.createElement("i",{className:"fa fa-align-center"})),A.a.createElement(N.a,{value:"right"},A.a.createElement("i",{className:"fa fa-align-right"}))))),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},_e=pe("ErOA"),Le=pe("7Cbv"),Oe="link",Me="upload-image",Be="code-block",Ve="add-table",Xe="------------",ze={default:Xe,left:":".concat(Xe),center:":".concat(Xe,":"),right:"".concat(Xe,":")},rt=pe("9VGf"),je,We;function ke(){}var Je=0,qe=1e4,se="\u2581",q=`
**\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 ee(ye){return/^\d+$/.test(ye)?"".concat(ye,"px"):ye}var ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,le=ne?"Cmd":"Ctrl",te=["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"],ie=(je={},Object(H.a)(je,le+"-B","bold"),Object(H.a)(je,le+"-I","italic"),je),ue=(We={},Object(H.a)(We,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(H.a)(We,Be,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(H.a)(We,Me,"\u6DFB\u52A0\u6587\u4EF6"),Object(H.a)(We,Ve,"\u6DFB\u52A0\u8868\u683C"),We),de=at.a=function(ye){var Ee=ye.defaultValue,Pe=Ee===void 0?"":Ee,Ue=ye.onChange,Qe=ye.width,tt=Qe===void 0?"100%":Qe,xt=ye.height,st=xt===void 0?400:xt,nt=ye.miniToolbar,wt=nt===void 0?!1:nt,ot=ye.isFocus,vt=ot===void 0?!1:ot,bt=ye.watch,Ke=ye.insertTemp,ir=ye.mode,nr=ir===void 0?"markdown":ir,Kt=ye.id,Ot=Kt===void 0?"markdown-editor-id":Kt,ar=ye.showResizeBar,wr=ar===void 0?!1:ar,Vt=ye.noStorage,ur=Vt===void 0?!1:Vt,ti=ye.showNullButton,It=ti===void 0?!1:ti,Ze=ye.hidetoolBar,At=Ze===void 0?!1:Ze,Qt=ye.fullScreen,yt=Qt===void 0?!1:Qt,gt=ye.onBlur,kt=ye.onCMBeforeChange,br=ye.onFullScreen,jt=ye.className,Fe=jt===void 0?"":jt,ct=ye.disablePaste,ri=ct===void 0?!1:ct,bi=ye.placeholder,xi=bi===void 0?"":bi,ii=ye.values,Ei=ii===void 0?"":ii,mt=Object(b.useState)(null),Ln=Object(z.a)(mt,2),He=Ln[0],Si=Ln[1],Tr=Object(b.useState)(Pe),Ki=Object(z.a)(Tr,2),ni=Ki[0],Ar=Ki[1],Vi=Object(b.useState)(bt),Xi=Object(z.a)(Vi,2),Lr=Xi[0],Yi=Xi[1],kn=Object(b.useState)(yt),$i=Object(z.a)(kn,2),kr=$i[0],Dn=$i[1],aa=Object(b.useState)(""),Zi=Object(z.a)(aa,2),or=Zi[0],Kr=Zi[1],oa=Object(b.useState)(0),ai=Object(z.a)(oa,2),Dr=ai[0],Qi=ai[1],sa=Object(b.useState)(st),Rn=Object(z.a)(sa,2),_n=Rn[0],Ti=Rn[1],On=Object(b.useState)(!1),Mn=Object(z.a)(On,2),la=Mn[0],Ci=Mn[1],oi=Object(b.useRef)(Object(Le.a)()),si=Object(b.useRef)(!1),wi=Object(b.useRef)(),Fr=Object(b.useRef)(),Ur=Object(b.useRef)(),jr=Object(b.useRef)(),Ai=Object(b.useRef)(),Pn=function(){var lt=Object(D.a)(O.a.mark(function ft(){var ht,St;return O.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,Object(_e.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:oi.current}});case 2:St=Mt.sent,St!=null&&(ht=St.attachments)!==null&&ht!==void 0&&ht.length&&(console.log("cm:",He,Fr),St.attachments.map(function(Ct){Ct.content_type.indexOf("image")>-1?He.replaceSelection(".concat(Ct.content_type,")")):Ct.content_type.indexOf("video")>-1?He.replaceSelection('')):Ct.content_type.indexOf("pdf")>-1?He.replaceSelection('').concat(Ct.name,"")):He.replaceSelection("[".concat(Ct.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,")"))}));case 4:case"end":return Mt.stop()}},ft)}));return function(){return lt.apply(this,arguments)}}();Object(b.useEffect)(function(){Ar(Ei),He==null||He.setValue(Ei)},[Ei]),Object(b.useEffect)(function(){br==null||br(kr)},[kr]),Object(b.useEffect)(function(){if(Fr.current){var lt=L.a.fromTextArea(Fr.current,{mode:nr,lineNumbers:!wt,lineWrapping:!0,value:Pe,autoCloseTags:!0,autoCloseBrackets:!0});vt&<.focus();function ft(ht,St){if(ri){St.preventDefault();return}var Lt=St.clipboardData;if(Lt){var Mt=Lt.types.toString(),Ct=Lt.items;if(Mt==="Files"||Lt.types.indexOf("Files")>-1){if(St.preventDefault(),nr=="stex")return;try{var Gt,hr=Ct[1];((Gt=Ct[0])===null||Gt===void 0?void 0:Gt.kind)==="file"&&(hr=Ct[0]);var Tt=hr.getAsFile(),Wr=Tt.name.split(".").pop();s(Tt,function(Dt){if(Dt.id){var dr,er,Cr;(Tt==null||((dr=Tt.type)===null||dr===void 0)?void 0:dr.indexOf("image"))>-1?lt.replaceSelection(".concat(Dt.content_type,")")):(Tt==null||((er=Tt.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?lt.replaceSelection('')):(Tt==null||((Cr=Tt.type)===null||Cr===void 0)?void 0:Cr.indexOf("pdf"))>-1?lt.replaceSelection('').concat(Tt.name,"")):te.includes(Wr)?lt.replaceSelection('').concat(Tt.name,"")):lt.replaceSelection("[".concat(Tt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Dt.id,"?type=").concat(Dt.content_type,")"))}else(Dt==null?void 0:Dt.status)===401&&(document.location.href="/user/login")})}catch(Dt){U.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return lt.on("paste",ft),lt.on("dragleave",function(ht,St){Ur.current.classList.remove("mouse-hover-md")}),lt.on("dragover",function(ht,St){Ur.current.classList.add("mouse-hover-md")}),lt.on("drop",function(ht,St){Ur.current.classList.add("mouse-hover-md");var Lt;if(Lt=St.dataTransfer.files,Lt.length>0){St.preventDefault(),St.stopPropagation();for(var Mt=function(hr){var Tt=Lt[hr],Wr=Tt.name.split(".").pop();s(Tt,function(Dt){if(Dt.id){var dr,er,Cr;(Tt==null||((dr=Tt.type)===null||dr===void 0)?void 0:dr.indexOf("image"))>-1?lt.replaceSelection(".concat(Dt.content_type,")")):(Tt==null||((er=Tt.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?lt.replaceSelection('')):(Tt==null||((Cr=Tt.type)===null||Cr===void 0)?void 0:Cr.indexOf("pdf"))>-1?lt.replaceSelection('').concat(Tt.name,"")):te.includes(Wr)?lt.replaceSelection('').concat(Tt.name,"")):lt.replaceSelection("[".concat(Tt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Dt.id,"?type=").concat(Dt.content_type,")"))}else(Dt==null?void 0:Dt.status)===401&&(document.location.href="/user/login")})},Ct=0;Ct0||Ct.target.offsetWidth>0)&&(xr(),He.setSize("100%","100%"),He.refresh())}}catch(Gt){Lt.e(Gt)}finally{Lt.f()}});return ht.observe(Fr.current.parentElement),ht}if(He){var ft=lt();return function(){ft.unobserve(Fr.current.parentElement)}}},[He,xr]),Object(b.useEffect)(function(){if(He){for(var lt=[],ft=function(){var Ct=St[ht];Lt=Object(z.a)(Ct,2);var Gt=Lt[0],hr=Lt[1],Tt=Object(H.a)({},Gt,function(){In(hr)});lt.push(Tt),He.addKeyMap(Tt)},ht=0,St=Object.entries(ie);ht0){var lt=new Date().getTime(),ft=window.sessionStorage.getItem(Ot);lt>=Dr+qe&&(!ft||ft!==ni)&&(window.sessionStorage.setItem(Ot,ni),Ci(!0))}},qe),Object(b.useEffect)(function(){Yi(bt)},[He,bt]),Object(b.useEffect)(function(){He&&(vt&&He.focus())},[He,vt]),Object(b.useEffect)(function(){if(Lr&&He){var lt=He.getScrollerElement();function ft(ht){var St=ht.target;if(Ai.current){var Lt=St.scrollTop/St.scrollHeight;Ai.current.scrollTop=Ai.current.scrollHeight*Lt}}return lt.addEventListener("scroll",ft),function(){lt.removeEventListener("scroll",ft)}}},[He,Lr]),Object(b.useEffect)(function(){if(He&&kt){function lt(ft,ht){kt(ft,ht)}return He.on("beforeChange",lt),function(){He.off("beforeChange",lt)}}},[He,kt]),Object(b.useEffect)(function(){if(He&>){function lt(){gt(He.getValue())}return He.on("blur",lt),function(){He.off("blur",lt)}}},[He,gt]),Object(b.useEffect)(function(){if(He){function lt(ft){var ht=ft.getValue();Ar(ht),Qi(new Date().getTime()),ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ue&&Ue(ht)}return He.on("change",lt),function(){He.off("change",lt)}}},[He,Ue]),Object(b.useEffect)(function(){He&&(Pe==null?(He.setValue(""),Ar("")):Pe!==He.getValue()&&(He.setValue(Pe),Ar(Pe),He.setCursor(He.lineCount(),0)))},[He,Pe]);var In=Object(b.useCallback)(function(lt){var ft=He.getCursor(),ht=He.getSelection(),St=ht.split(`
`);switch(lt){case"bold":return He.replaceSelection("**"+ht+"**"),ht===""&&He.setCursor(ft.line,ft.ch+2),He.focus();case"italic":return He.replaceSelection("*"+ht+"*"),ht===""&&He.setCursor(ft.line,ft.ch+1),He.focus();case"code":return He.replaceSelection("`"+ht+"`"),ht===""&&He.setCursor(ft.line,ft.ch+1),He.focus();case"inline-latex":return He.replaceSelection("`$$"+ht+"$$`"),ht===""&&He.setCursor(ft.line,ft.ch+3),He.focus();case"latex":return He.replaceSelection("```latex\n"+ht+"\n```"),He.setCursor(ft.line+1,ht.length+1),He.focus();case"line-break":return He.replaceSelection(`
`),He.focus();case"list-ul":return ht===""?He.replaceSelection("- "+ht):He.replaceSelection(St.map(function(Lt){return Lt===""?"":"- ".concat(Lt)}).join(`
`)),He.focus();case"list-ol":return ht===""?He.replaceSelection("1. "+ht):He.replaceSelection(St.map(function(Lt,Mt){return Lt===""?"":"".concat(Mt+1,". ").concat(Lt)}).join(`
`)),He.focus();case"add-null-ch":return ht===""&&He.setCursor(ft.line,ft.ch+1),He.replaceSelection(se),He.focus();case"inster-template-1":return ht===""&&He.setCursor(ft.line,ft.ch),He.replaceSelection(q),He.focus();case"eraser":return He.setValue(""),He.focus();case"trigger-watch":return Yi(!Lr),He.focus();case"trigger-full-screen":return Dn(!kr),He.focus();case Oe:Kr(Oe);return;case Be:Kr(Be);return;case Me:Kr(Me);return;case Ve:Kr(Ve);return;default:throw new Error}},[He,Lr,kr]),Li=Object(b.useCallback)(function(lt){Kr("");switch(or){case Oe:var ft=lt.title,ht=lt.link;return He.replaceSelection("[".concat(ft,"](").concat(ht,")")),He.focus();case Be:var St=lt.language,Lt=lt.content;return He.replaceSelection(["```"+St,Lt,"```"].join(`
`)),He.focus();case Me:var Mt=lt.src,Ct=lt.alt;return Ct?He.replaceSelection(".concat(Mt,' "').concat(Ct,'" )')):He.replaceSelection("")),He.focus();case Ve:for(var Gt=lt.row,hr=lt.col,Tt=lt.align,Wr=`
`,Dt=0;Dt300&&(Gt=300);var hr=st+Gt+"px";Ti(hr)}}return lt.addEventListener("mousedown",St),document.addEventListener("mousemove",Mt),document.addEventListener("mouseup",Lt),function(){lt.removeEventListener("mousedown",St),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",Lt)}}},[He,jr]),Object(b.useEffect)(function(){Ti(st)},[st]);var Pr=ee(tt),qi=ee(_n),Rr={width:Pr,height:qi},en=Object(b.useMemo)(function(){if(Dr){var lt=new Date(Dr),ft=lt.getHours(),ht=lt.getMinutes(),St=lt.getSeconds();return ft=ft<10?"0"+ft:ft,ht=ht<10?"0"+ht:ht,St=St<10?"0"+St:St,"".concat(ft,":").concat(ht,":").concat(St)}return 0},[Dr]);function Nn(){window.sessionStorage.removeItem(Ot),Ci(!1),Qi(0)}function li(){Ci(!1),Qi(0),He.setValue(window.sessionStorage.getItem(Ot))}function ua(lt,ft){var ht=He.getValue();ht=ht.replace(lt,ft),Ar(ht),He==null||He.setValue(ht)}return A.a.createElement(b.Fragment,null,A.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ur},A.a.createElement("div",{className:"markdown-editor-container ".concat(Fe," ").concat(Lr?"on-preview":""," ").concat(wt?"mini":""," ").concat(kr?"full-screen":""),style:Rr},A.a.createElement(S,{insertTemp:Ke,watch:Lr,fullScreen:kr,showNullButton:It,onActionCallback:In,hidetoolBar:At,uuid:oi.current,setOpenPhones:function(){si.current=!0}}),A.a.createElement("div",{className:"markdown-editor-body"},A.a.createElement("div",{className:"codemirror-container"},A.a.createElement("textarea",{ref:Fr,placeholder:xi})),Lr?A.a.createElement("div",{ref:Ai,className:"preview-container"},nr==="stex"&&A.a.createElement(k,{value:ni}),nr!=="stex"&&A.a.createElement(m.a,{edit:!0,value:ni,replaces:ua})):null))),wr?A.a.createElement("a",{ref:jr,className:"editor-resize"}):null,A.a.createElement(F.a,null,ue[or]?A.a.createElement(Z.a,{centered:!0,title:ue[or],visible:!0,onCancel:Vr,footer:null,className:"markdown-popup-form"},Ji):null))}},SJMd:function(pt,at){/**
* @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 pe,fe,Z,_=!1,J,U;window.PR_SHOULD_USE_CONTINUATION=!0;var D,z;(function(){var H=window,B=["break,continue,do,else,for,if,return,while"],O=[B,"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"],b=[O,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[b,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],P=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],L=[b,"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"],w="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",y=[b,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],h="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[B,"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"],l=[B,"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"],u=[B,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[A,L,P,y,h,o,l,u],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",k="kwd",x="com",f="typ",p="lit",d="pun",a="pln",E="tag",g="dec",S="src",F="atn",W="atv",K="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function M(oe){for(var be=0,we=!1,_e=!1,Le=0,Oe=oe.length;Le122||(te<65||le>90||Je.push([Math.max(65,le)|32,Math.min(te,90)|32]),te<97||le>122||Je.push([Math.max(97,le)&~32,Math.min(te,122)&~32]))}}Je.sort(function(ye,Ee){return ye[0]-Ee[0]||Ee[1]-ye[1]});for(var ie=[],ue=[],q=0;qde[0]&&(de[1]+1>de[0]&&se.push("-"),se.push(Xe(de[1])))}return se.push("]"),se.join("")}function rt(We){for(var ke=We.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Je=ke.length,qe=[],se=0,q=0;se=2&&le==="["?ke[se]=ze(ee):le!=="\\"&&(ke[se]=ee.replace(/[a-zA-Z]/g,function(ue){var de=ue.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return ke.join("")}for(var je=[],Le=0,Oe=oe.length;Le=0;)we[je.charAt(We)]=rt;var ke=rt[1],Je=""+ke;Ve.hasOwnProperty(Je)||(Be.push(ke),Ve[Je]=null)}Be.push(/[\0-\uffff]/),_e=M(Be)})();var Le=be.length,Oe=function(Me){for(var Be=Me.sourceCode,Ve=Me.basePos,Xe=Me.sourceNode,ze=[Ve,a],rt=0,je=Be.match(_e)||[],We={},ke=0,Je=je.length;ke=5&&se.substring(0,5)==="lang-",ee&&!(q&&typeof q[1]=="string")&&(ee=!1,se=S),ee||(We[qe]=se)}var te=rt;if(rt+=qe.length,!ee)ze.push(Ve+te,se);else{var ie=q[1],ue=qe.indexOf(ie),de=ue+ie.length;q[2]&&(de=qe.length-q[2].length,ue=de-ie.length);var ye=se.substring(5);$(Xe,Ve+te,qe.substring(0,ue),Oe,ze),$(Xe,Ve+te+ue,ie,G(ye,ie),ze),$(Xe,Ve+te+de,qe.substring(de),Oe,ze)}}Me.decorations=ze};return Oe}function De(oe){var be=[],we=[];oe.tripleQuotedStrings?be.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?be.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):be.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&we.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var _e=oe.hashComments;_e&&(oe.cStyleComments?(_e>1?be.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):be.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),we.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):be.push([x,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(we.push([x,/^\/\/[^\r\n]*/,null]),we.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=oe.regexLiterals;if(Le){var Oe=Le>1?"":`
\r`,Me=Oe?".":"[\\S\\s]",Be="/(?=[^/*"+Oe+"])(?:[^/\\x5B\\x5C"+Oe+"]|\\x5C"+Me+"|\\x5B(?:[^\\x5C\\x5D"+Oe+"]|\\x5C"+Me+")*(?:\\x5D|$))+/";we.push(["lang-regex",RegExp("^"+V+"("+Be+")")])}var Ve=oe.types;Ve&&we.push([f,Ve]);var Xe=(""+oe.keywords).replace(/^ | $/g,"");Xe.length&&we.push([k,new RegExp("^(?:"+Xe.replace(/[\s,]+/g,"|")+")\\b"),null]),be.push([a,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(ze+="(?!s*/)"),we.push([p,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[p,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[d,new RegExp(ze),null]),ge(be,we)}var Se=De({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Re(oe,be,we){for(var _e=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,Oe=oe.ownerDocument,Me=Oe.createElement("li");oe.firstChild;)Me.appendChild(oe.firstChild);var Be=[Me];function Ve(ke){var Je=ke.nodeType;if(Je==1&&!_e.test(ke.className))if(ke.nodeName==="br")Xe(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var qe=ke.firstChild;qe;qe=qe.nextSibling)Ve(qe);else if((Je==3||Je==4)&&we){var se=ke.nodeValue,q=se.match(Le);if(q){var ee=se.substring(0,q.index);ke.nodeValue=ee;var ne=se.substring(q.index+q[0].length);if(ne){var le=ke.parentNode;le.insertBefore(Oe.createTextNode(ne),ke.nextSibling)}Xe(ke),ee||ke.parentNode.removeChild(ke)}}}function Xe(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function Je(q,ee){var ne=ee?q.cloneNode(!1):q,le=q.parentNode;if(le){var te=Je(le,1),ie=q.nextSibling;te.appendChild(ne);for(var ue=ie;ue;ue=ie)ie=ue.nextSibling,te.appendChild(ue)}return ne}for(var qe=Je(ke.nextSibling,0),se;(se=qe.parentNode)&&se.nodeType===1;)qe=se;Be.push(qe)}for(var ze=0;ze=le&&(Ve+=2),Oe>=te&&(rt+=2)}}finally{se&&(se.style.display=q)}}var xe={};function me(oe,be){for(var we=be.length;--we>=0;){var _e=be[we];xe.hasOwnProperty(_e)?H.console&&console.warn("cannot override language handler %s",_e):xe[_e]=oe}}function G(oe,be){return oe&&xe.hasOwnProperty(oe)||(oe=/^\s*]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[d,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^