(window.webpackJsonp=window.webpackJsonp||[]).push([[222,7,9],{"+NIl":function(Ie,Le,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";ie.defineMode("stex",function(X,R){"use strict";function Q(D,w){D.cmdState.push(w)}function B(D){return D.cmdState.length>0?D.cmdState[D.cmdState.length-1]:null}function _(D){var w=D.cmdState.pop();w&&w.closeBracket()}function G(D){for(var w=D.cmdState,A=w.length-1;A>=0;A--){var d=w[A];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function j(D,w,A){return function(){this.name=D,this.bracketNo=0,this.style=w,this.styles=A,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var O={};O.importmodule=j("importmodule","tag",["string","builtin"]),O.documentclass=j("documentclass","tag",["","atom"]),O.usepackage=j("usepackage","tag",["atom"]),O.begin=j("begin","tag",["atom"]),O.end=j("end","tag",["atom"]),O.label=j("label","tag",["atom"]),O.ref=j("ref","tag",["atom"]),O.eqref=j("eqref","tag",["atom"]),O.cite=j("cite","tag",["atom"]),O.bibitem=j("bibitem","tag",["atom"]),O.Bibitem=j("Bibitem","tag",["atom"]),O.RBibitem=j("RBibitem","tag",["atom"]),O.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function I(D,w){D.f=w}function y(D,w){var A;if(D.match(/^\\[a-zA-Z@]+/)){var d=D.current().slice(1);return A=O.hasOwnProperty(d)?O[d]:O.DEFAULT,A=new A,Q(w,A),I(w,k),A.style}if(D.match(/^\\[$&%#{}_]/))return"tag";if(D.match(/^\\[,;!\/\\]/))return"tag";if(D.match("\\["))return I(w,function(l,h){return T(l,h,"\\]")}),"keyword";if(D.match("\\("))return I(w,function(l,h){return T(l,h,"\\)")}),"keyword";if(D.match("$$"))return I(w,function(l,h){return T(l,h,"$$")}),"keyword";if(D.match("$"))return I(w,function(l,h){return T(l,h,"$")}),"keyword";var o=D.next();if(o=="%")return D.skipToEnd(),"comment";if(o=="}"||o=="]"){if(A=B(w),A)A.closeBracket(o),I(w,k);else return"error";return"bracket"}else return o=="{"||o=="["?(A=O.DEFAULT,A=new A,Q(w,A),"bracket"):/\d/.test(o)?(D.eatWhile(/[\w.%]/),"atom"):(D.eatWhile(/[\w\-_]/),A=G(w),A.name=="begin"&&(A.argument=D.current()),A.styleIdentifier())}function T(D,w,A){if(D.eatSpace())return null;if(A&&D.match(A))return I(w,y),"keyword";if(D.match(/^\\[a-zA-Z@]+/))return"tag";if(D.match(/^[a-zA-Z]+/))return"variable-2";if(D.match(/^\\[$&%#{}_]/))return"tag";if(D.match(/^\\[,;!\/]/))return"tag";if(D.match(/^[\^_&]/))return"tag";if(D.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(D.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=D.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(D.skipToEnd(),"comment"):"error"}function k(D,w){var A=D.peek(),d;return A=="{"||A=="["?(d=B(w),d.openBracket(A),D.eat(A),I(w,y),"bracket"):/[ \t\r]/.test(A)?(D.eat(A),null):(I(w,y),_(w),y(D,w))}return{startState:function(){var D=R.inMathMode?function(w,A){return T(w,A)}:y;return{cmdState:[],f:D}},copyState:function(D){return{cmdState:D.cmdState.slice(),f:D.f}},token:function(D,w){return w.f(D,w)},blankLine:function(D){D.f=y,D.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},"/GNS":function(Ie,Le,Z){Ie.exports=Z.p+"static/search1.c4136dd4.png"},"19Vz":function(Ie,Le,Z){(function(ie){ie(Z("VrN/"))})(function(ie){ie.defineOption("placeholder","",function(j,O,I){var y=I&&I!=ie.Init;if(O&&!y)j.on("blur",B),j.on("change",_),j.on("swapDoc",_),ie.on(j.getInputField(),"compositionupdate",j.state.placeholderCompose=function(){Q(j)}),_(j);else if(!O&&y){j.off("blur",B),j.off("change",_),j.off("swapDoc",_),ie.off(j.getInputField(),"compositionupdate",j.state.placeholderCompose),X(j);var T=j.getWrapperElement();T.className=T.className.replace(" CodeMirror-empty","")}O&&!j.hasFocus()&&B(j)});function X(j){j.state.placeholder&&(j.state.placeholder.parentNode.removeChild(j.state.placeholder),j.state.placeholder=null)}function R(j){X(j);var O=j.state.placeholder=document.createElement("pre");O.style.cssText="height: 0; overflow: visible",O.style.direction=j.getOption("direction"),O.className="CodeMirror-placeholder CodeMirror-line-like";var I=j.getOption("placeholder");typeof I=="string"&&(I=document.createTextNode(I)),O.appendChild(I),j.display.lineSpace.insertBefore(O,j.display.lineSpace.firstChild)}function Q(j){setTimeout(function(){var O=!1,I=j.getInputField();I.nodeName=="TEXTAREA"?O=!I.value:j.lineCount()==1&&(O=!/[^\u200b]/.test(I.querySelector(".CodeMirror-line").textContent)),O?R(j):X(j)},20)}function B(j){G(j)&&R(j)}function _(j){var O=j.getWrapperElement(),I=G(j);O.className=O.className.replace(" CodeMirror-empty","")+(I?" CodeMirror-empty":""),I?R(j):X(j)}function G(j){return j.lineCount()===1&&j.getLine(0)===""}})},"1eCo":function(Ie,Le,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";var X={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},R={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(Q,B){var _=Q.indentUnit,G={},j=B.htmlMode?X:R;for(var O in j)G[O]=j[O];for(var O in B)G[O]=B[O];var I,y;function T(a,b){function m(H){return b.tokenize=H,H(a,b)}var C=a.next();if(C=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?m(w("atom","]]>")):null:a.match("--")?m(w("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),m(A(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=w("meta","?>"),"meta"):(I=a.eat("/")?"closeTag":"openTag",b.tokenize=k,"tag bracket");if(C=="&"){var P;return a.eat("#")?a.eat("x")?P=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):P=a.eatWhile(/[\d]/)&&a.eat(";"):P=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),P?"atom":"error"}else return a.eatWhile(/[^&<]/),null}T.isInText=!0;function k(a,b){var m=a.next();if(m==">"||m=="/"&&a.eat(">"))return b.tokenize=T,I=m==">"?"endTag":"selfcloseTag","tag bracket";if(m=="=")return I="equals",null;if(m=="<"){b.tokenize=T,b.state=h,b.tagName=b.tagStart=null;var C=b.tokenize(a,b);return C?C+" tag error":"tag error"}else return/[\'\"]/.test(m)?(b.tokenize=D(m),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function D(a){var b=function(m,C){for(;!m.eol();)if(m.next()==a){C.tokenize=k;break}return"string"};return b.isInAttribute=!0,b}function w(a,b){return function(m,C){for(;!m.eol();){if(m.match(b)){C.tokenize=T;break}m.next()}return a}}function A(a){return function(b,m){for(var C;(C=b.next())!=null;){if(C=="<")return m.tokenize=A(a+1),m.tokenize(b,m);if(C==">")if(a==1){m.tokenize=T;break}else return m.tokenize=A(a-1),m.tokenize(b,m)}return"meta"}}function d(a,b,m){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=m,(G.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function l(a,b){for(var m;;){if(!a.context)return;if(m=a.context.tagName,!G.contextGrabbers.hasOwnProperty(m)||!G.contextGrabbers[m].hasOwnProperty(b))return;o(a)}}function h(a,b,m){return a=="openTag"?(m.tagStart=b.column(),E):a=="closeTag"?v:h}function E(a,b,m){return a=="word"?(m.tagName=b.current(),y="tag",x):G.allowMissingTagName&&a=="endTag"?(y="tag bracket",x(a,b,m)):(y="error",E)}function v(a,b,m){if(a=="word"){var C=b.current();return m.context&&m.context.tagName!=C&&G.implicitlyClosed.hasOwnProperty(m.context.tagName)&&o(m),m.context&&m.context.tagName==C||G.matchClosing===!1?(y="tag",g):(y="tag error",L)}else return G.allowMissingTagName&&a=="endTag"?(y="tag bracket",g(a,b,m)):(y="error",L)}function g(a,b,m){return a!="endTag"?(y="error",g):(o(m),h)}function L(a,b,m){return y="error",g(a,b,m)}function x(a,b,m){if(a=="word")return y="attribute",p;if(a=="endTag"||a=="selfcloseTag"){var C=m.tagName,P=m.tagStart;return m.tagName=m.tagStart=null,a=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(C)?l(m,C):(l(m,C),m.context=new d(m,C,P==m.indented)),h}return y="error",x}function p(a,b,m){return a=="equals"?c:(G.allowMissing||(y="error"),x(a,b,m))}function c(a,b,m){return a=="string"?u:a=="word"&&G.allowUnquoted?(y="string",x):(y="error",x(a,b,m))}function u(a,b,m){return a=="string"?u:x(a,b,m)}return{startState:function(a){var b={tokenize:T,state:h,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;I=null;var m=b.tokenize(a,b);return(m||I)&&m!="comment"&&(y=null,b.state=b.state(I||m,a,b),y&&(m=y=="error"?m+" error":y)),m},indent:function(a,b,m){var C=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+_;if(C&&C.noIndent)return ie.Pass;if(a.tokenize!=k&&a.tokenize!=T)return m?m.match(/^(\s*)/)[0].length:0;if(a.tagName)return G.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+_*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/$/,blockCommentStart:"",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(a){a.state==c&&(a.state=x)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var b=[],m=a.context;m;m=m.prev)m.tagName&&b.push(m.tagName);return b.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"4YB9":function(Ie,Le,Z){"use strict";var ie=Z("q1tI"),X=Z.n(ie),R=Z("Ty5D"),Q=Z("55Ip"),B=Z("W1YM"),_=Z.n(B);Le.a=function(G){var j=G.activeIndex,O=Object(R.i)(),I=O.id,y=O.challengesId,T=Object(ie.useMemo)(function(){return[{name:"1\u3001\u672C\u5173\u4EFB\u52A1",url:"/shixuns/".concat(I,"/challenges/").concat(y,"/editcheckpoint")},{name:"2\u3001\u8BC4\u6D4B\u8BBE\u7F6E",url:"/shixuns/".concat(I,"/challenges/").concat(y,"/tab=2")},{name:"3\u3001\u53C2\u8003\u7B54\u6848",url:"/shixuns/".concat(I,"/challenges/").concat(y,"/tab=3")},{name:"4\u3001\u5173\u5361\u6392\u884C\u699C",url:"/shixuns/".concat(I,"/challenges/").concat(y,"/tab=4")}]},[I,y]);return X.a.createElement("ul",{className:"challenge-nav"},T.map(function(k,D){return j===D?X.a.createElement("li",{key:k.url}," ",X.a.createElement("a",{className:"active"},k.name)," "):X.a.createElement("li",{key:k.url}," ",X.a.createElement(Q.a,{to:k.url},k.name)," ")}))}},"4qgm":function(Ie,Le){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKN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nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"55Ip":function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return l});var ie=Z("Ty5D"),X=Z("dI71"),R=Z("q1tI"),Q=Z.n(R),B=Z("YS25"),_=Z("17x9"),G=Z.n(_),j=Z("wx14"),O=Z("zLVn"),I=Z("9R94"),y=function(c){Object(X.a)(u,c);function u(){for(var b,m=arguments.length,C=new Array(m),P=0;P1&&arguments[1]!==void 0?arguments[1]:0,w=(G[k[D+0]]+G[k[D+1]]+G[k[D+2]]+G[k[D+3]]+"-"+G[k[D+4]]+G[k[D+5]]+"-"+G[k[D+6]]+G[k[D+7]]+"-"+G[k[D+8]]+G[k[D+9]]+"-"+G[k[D+10]]+G[k[D+11]]+G[k[D+12]]+G[k[D+13]]+G[k[D+14]]+G[k[D+15]]).toLowerCase();if(!_(w))throw TypeError("Stringified UUID is invalid");return w}var I=O;function y(k,D,w){k=k||{};var A=k.random||(k.rng||R)();if(A[6]=A[6]&15|64,A[8]=A[8]&63|128,D){w=w||0;for(var d=0;d<16;++d)D[w+d]=A[d];return D}return I(A)}var T=Le.a=y},"7ZXX":function(Ie,Le,Z){Ie.exports=Z.p+"static/err.6e7c5817.png"},"7ahc":function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return E});var ie=Z("k1fw"),X=Z("0Owb"),R=Z("+L6B"),Q=Z("2/Rp"),B=Z("y8nQ"),_=Z("Vl3Y"),G=Z("tJVT"),j=Z("OaEy"),O=Z("2fM7"),I=Z("q1tI"),y=Z.n(I),T=Z("VrN/"),k=Z.n(T),D=Z("p77/"),w=Z.n(D),A=Z("c5Ni"),d=Z.n(A),o=O.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},h={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"]};Le.b=function(v){var g=v.callback,L=v.onCancel,x=Object(I.useState)("python"),p=Object(G.a)(x,2),c=p[0],u=p[1];function a(m){u(h[m][1])}function b(m){g(m)}return y.a.createElement(_.a,Object(X.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:b}),y.a.createElement(_.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},y.a.createElement(O.a,{onChange:a},Object.keys(h).map(function(m){return y.a.createElement(o,{key:m,value:m},h[m][0])}))),y.a.createElement(_.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},y.a.createElement(E,{mode:c})),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(Q.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function E(v){var g=v.value,L=v.onChange,x=v.mode,p=v.options,c=p===void 0?{}:p,u=Object(I.useRef)(),a=Object(I.useState)(),b=Object(G.a)(a,2),m=b[0],C=b[1];return Object(I.useEffect)(function(){if(m){function P(H){var V=H.getValue();L&&L(V)}return m.on("change",P),function(){m.off("change",P)}}},[m,L]),Object(I.useEffect)(function(){m&&m.setOption("mode",x)},[m,x]),Object(I.useEffect)(function(){m&&((g!==m.getValue()||g==="")&&setTimeout(function(){m.setValue(g||" ")},300))},[m,g]),Object(I.useEffect)(function(){if(u.current&&!m){var P=k.a.fromTextArea(u.current,Object(ie.a)({mode:x,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));C(P)}},[u.current,m]),y.a.createElement("div",{className:"my-codemirror-container"},y.a.createElement("textarea",{ref:u}))}},"7ixt":function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return R});var ie={adjustX:1,adjustY:1},X=[0,0],R={left:{points:["cr","cl"],overflow:ie,offset:[-4,0],targetOffset:X},right:{points:["cl","cr"],overflow:ie,offset:[4,0],targetOffset:X},top:{points:["bc","tc"],overflow:ie,offset:[0,-4],targetOffset:X},bottom:{points:["tc","bc"],overflow:ie,offset:[0,4],targetOffset:X},topLeft:{points:["bl","tl"],overflow:ie,offset:[0,-4],targetOffset:X},leftTop:{points:["tr","tl"],overflow:ie,offset:[-4,0],targetOffset:X},topRight:{points:["br","tr"],overflow:ie,offset:[0,-4],targetOffset:X},rightTop:{points:["tl","tr"],overflow:ie,offset:[4,0],targetOffset:X},bottomRight:{points:["tr","br"],overflow:ie,offset:[0,4],targetOffset:X},rightBottom:{points:["bl","br"],overflow:ie,offset:[4,0],targetOffset:X},bottomLeft:{points:["tl","bl"],overflow:ie,offset:[0,4],targetOffset:X},leftBottom:{points:["br","bl"],overflow:ie,offset:[-4,0],targetOffset:X}},Q=R},"7v3h":function(Ie,Le,Z){Ie.exports=Z.p+"static/empty2.dd73f390.png"},"8/bI":function(Ie,Le,Z){Ie.exports=Z.p+"static/empty.8918e228.png"},"8EBN":function(Ie,Le,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";ie.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 X=0;X-1&&Q.substring(G+1,Q.length);if(j)return ie.findModeByExtension(j)},ie.findModeByName=function(Q){Q=Q.toLowerCase();for(var B=0;B=M.length?J.slice(M.length):J}).join(`
`)}var d=[],o=[""],l=new D.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,o=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(W,s,f,M){if(s>=W.length||W[s].level<=f)return s;var J=W[s];M.push("- "+J.text+""),s++;var F=[];return s=g(W,s,J.level,F),F.length>0&&(M.push("
"),F.forEach(function(he){M.push(he)}),M.push("
")),M.push(" "),s=g(W,s,f,M),s}function L(){return g(d,0,0,o),o.push("
"),o.join("")}var x={heading:function(s){var f=h.exec(s);if(f)return{type:"heading",raw:f[0],depth:f[1].length,text:f[2]}},fences:function(s){var f=this.rules.block.fences.exec(s);if(f){var M=f[0],J=A(M,f[3]||""),F=f[2]?f[2].trim():f[2];if(["latex","katex","math"].indexOf(F)>=0){var he=u(),Pe=J;J=he,a[he]={type:"block",expression:Pe}}return{type:"code",raw:M,lang:F,text:J}}}},p=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,u=function(){return"__special_katext_id_".concat(c++,"__")},a={};function b(){return a}function m(){c=0,a={}}function C(W){return W=W.replace(p,function(s,f){var M=u();return a[M]={type:"inline",expression:f},M}),W}var P=l.listitem;l.listitem=function(W){return P(C(W))};var H=l.paragraph;l.paragraph=function(W){return H(C(W))};var V=l.tablecell;l.tablecell=function(W,s){return V(C(W),s)},l.code=function(W,s,f){var M=(s||"").match(/\S*/)[0];return M?["latex","katex","math"].indexOf(M)>=0?"".concat(W,"
"):'
').concat(f?W:Object(w.escape)(W,!0),`
`):''+(f?W:Object(w.escape)(W,!0))+"
"},l.heading=function(W,s,f){var M=this.options.headerPrefix+f.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:M,level:s,text:W}),"'+W+""},D.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),D.a.use({tokenizer:x,renderer:l});var $=D.a,z=Z("SJMd"),U=Z("ulZh"),ee=Z.n(U),oe=Z("m3rI"),ce=Z("Oy/b"),ve=Z("p5ED"),Me=Z("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var xe=function(W,s){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,M){f.__proto__=M}||function(f,M){for(var J in M)Object.prototype.hasOwnProperty.call(M,J)&&(f[J]=M[J])})(W,s)};function Ae(W,s){function f(){this.constructor=W}xe(W,s),W.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}function Ee(W,s,f,M){return new(f||(f=Promise))(function(J,F){function he(ft){try{Je(M.next(ft))}catch(Ne){F(Ne)}}function Pe(ft){try{Je(M.throw(ft))}catch(Ne){F(Ne)}}function Je(ft){var Ne;ft.done?J(ft.value):(Ne=ft.value,Ne instanceof f?Ne:new f(function(yt){yt(Ne)})).then(he,Pe)}Je((M=M.apply(W,s||[])).next())})}function Ce(W,s){var f,M,J,F,he={label:0,sent:function(){if(1&J[0])throw J[1];return J[1]},trys:[],ops:[]};return F={next:Pe(0),throw:Pe(1),return:Pe(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Pe(Je){return function(ft){return function(Ne){if(f)throw new TypeError("Generator is already executing.");for(;he;)try{if(f=1,M&&(J=2&Ne[0]?M.return:Ne[0]?M.throw||((J=M.return)&&J.call(M),0):M.next)&&!(J=J.call(M,Ne[1])).done)return J;switch(M=0,J&&(Ne=[2&Ne[0],J.value]),Ne[0]){case 0:case 1:J=Ne;break;case 4:return he.label++,{value:Ne[1],done:!1};case 5:he.label++,M=Ne[1],Ne=[0];continue;case 7:Ne=he.ops.pop(),he.trys.pop();continue;default:if(!(J=he.trys,(J=J.length>0&&J[J.length-1])||Ne[0]!==6&&Ne[0]!==2)){he=0;continue}if(Ne[0]===3&&(!J||Ne[1]>J[0]&&Ne[1]',"select"),this.addActionButton(M,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(M,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(M,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(M,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(M,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(M,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(M,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(F){var he=document.createElement("div");he.className=""+f.toolbarButtonStyleClass.name,he.setAttribute("data-type-name",F.typeName),he.innerHTML=F.icon,he.addEventListener("click",function(){f.markerToolbarButtonClicked(he,F)}),f.buttons.push(he),f.markerButtons.push(he)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var J=document.createElement("div");J.className=this.toolbarBlockStyleClass.name,J.style.whiteSpace="nowrap",J.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(J),this.addActionButton(J,'',"render"),this.addActionButton(J,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},W.prototype.addButtonClickListener=function(s){this.buttonClickListeners.push(s)},W.prototype.removeButtonClickListener=function(s){this.buttonClickListeners.indexOf(s)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(s),1)},W.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},W.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var s=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var f=0;f0&&this.buttonClickListeners.forEach(function(M){return M("marker",f)}),this.markerButtonOverflowBlock.style.display="none"},W.prototype.actionToolbarButtonClicked=function(s,f){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(M){return M("action",f)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},W.prototype.setActiveButton=function(s){this.resetButtonStyles(),s.className=s.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),s.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},W.prototype.setActiveMarkerButton=function(s){var f=this.markerButtons.find(function(M){return M.getAttribute("data-type-name")===s});f&&this.setActiveButton(f)},W.prototype.setCurrentMarker=function(s){var f=this;this.currentMarker=s,this.buttons.filter(function(M){return/delete|notes/.test(M.getAttribute("data-action"))}).forEach(function(M){f.currentMarker===void 0?(M.style.fillOpacity="0.4",M.style.pointerEvents="none"):(M.style.fillOpacity="1",M.style.pointerEvents="all")})},W}(),Ue=function(){function W(s,f,M,J){this.panels=[],this.panelButtons=[],this.markerjsContainer=s,this.displayMode=f,this.uiStyleSettings=M,this.styles=J,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return W.prototype.addStyles=function(){var s;this.toolboxStyleClass=this.styles.addClass(new Se("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Se("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var f=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Se("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Se("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Se("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Se("toolbox-panel-row_colors",`
background-color: `+((s=this.uiStyleSettings.toolboxBackgroundColor)!==null&&s!==void 0?s:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Se("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
padding: `+f+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Se("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Se("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ye("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ye("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},W.prototype.show=function(s){var f;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=s,this.uiContainer.className=this.toolboxStyleClass.name+" "+((f=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&f!==void 0?f:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},W.prototype.setPanelButtons=function(s){var f,M,J=this;this.panels=s,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((f=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&f!==void 0?f:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((M=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&M!==void 0?M:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(F){var he;F.uiStyleSettings=J.uiStyleSettings;var Pe=document.createElement("div");Pe.className=J.toolboxButtonStyleClass.name+" "+((he=J.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&he!==void 0?he:J.toolboxButtonStyleColorsClass.name),Pe.innerHTML=F.icon,Pe.title=F.title,Pe.addEventListener("click",function(){J.panelButtonClick(F)}),J.panelButtons.push(Pe),J.buttonRow.appendChild(Pe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},W.prototype.panelButtonClick=function(s){var f=this,M=-1;if(s!==this.activePanel){M=this.panels.indexOf(s),this.panelRow.innerHTML="";var J=s.getUi();J.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(J),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=s}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){f.displayMode==="inline"?f.panelRow.style.display="none":f.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(F,he){var Pe,Je;F.className=f.toolboxButtonStyleClass.name+" "+(he===M?""+((Pe=f.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:f.toolboxActiveButtonStyleColorsClass.name):""+((Je=f.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Je!==void 0?Je:f.toolboxButtonStyleColorsClass.name))})},W}(),Xe=function(W,s){this.title=W,this.icon=s},Qe=function(W){function s(f,M,J,F){var he=W.call(this,f,F||'')||this;return he.colors=[],he.addTransparent=!1,he.colorBoxes=[],he.colors=M,he.currentColor=J,he.setCurrentColor=he.setCurrentColor.bind(he),he.getColorBox=he.getColorBox.bind(he),he}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.whiteSpace="nowrap",this.colors.forEach(function(J){var F=f.getColorBox(J);M.appendChild(F),f.colorBoxes.push(F)}),M},s.prototype.getColorBox=function(f){var M=this,J=this.uiStyleSettings.toolbarHeight/4,F=this.uiStyleSettings.toolbarHeight-J,he=document.createElement("div");he.style.display="inline-block",he.style.boxSizing="content-box",he.style.width=F-2+"px",he.style.height=F-2+"px",he.style.padding="1px",he.style.marginRight="2px",he.style.marginBottom="2px",he.style.borderWidth="2px",he.style.borderStyle="solid",he.style.borderRadius=(F+2)/2+"px",he.style.borderColor=f===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",he.addEventListener("click",function(){M.setCurrentColor(f,he)});var Pe=document.createElement("div");return Pe.style.display="inline-block",Pe.style.width=F-2+"px",Pe.style.height=F-2+"px",Pe.style.backgroundColor=f,Pe.style.borderRadius=F/2+"px",f==="transparent"&&(Pe.style.fill=this.uiStyleSettings.toolboxAccentColor,Pe.innerHTML=``),he.appendChild(Pe),he},s.prototype.setCurrentColor=function(f,M){var J=this;this.currentColor=f,this.colorBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(f)},s}(Xe),je=function(){function W(s,f,M){this._state="new",this._isSelected=!1,this._container=s,this._overlayContainer=f,this.globalSettings=M,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(W.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(s){return!1},Object.defineProperty(W.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),W.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},W.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},W.prototype.pointerDown=function(s,f){},W.prototype.dblClick=function(s,f){},W.prototype.manipulate=function(s){},W.prototype.pointerUp=function(s){this.stateChanged()},W.prototype.dispose=function(){},W.prototype.addMarkerVisualToContainer=function(s){this.container.childNodes.length>0?this.container.insertBefore(s,this.container.childNodes[0]):this.container.appendChild(s)},W.prototype.getState=function(){return{typeName:W.typeName,state:this.state,notes:this.notes}},W.prototype.restoreState=function(s){this._state=s.state,this.notes=s.notes},W.prototype.scale=function(s,f){},W.prototype.colorChanged=function(s){this.onColorChanged&&this.onColorChanged(s),this.stateChanged()},W.prototype.fillColorChanged=function(s){this.onFillColorChanged&&this.onFillColorChanged(s),this.stateChanged()},W.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var s=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),s.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(s)&&this.onStateChanged(this)}},W.typeName="MarkerBase",W}(),Be=function(){function W(){this.findGripByVisual=this.findGripByVisual.bind(this)}return W.prototype.findGripByVisual=function(s){return this.topLeft.ownsTarget(s)?this.topLeft:this.topCenter.ownsTarget(s)?this.topCenter:this.topRight.ownsTarget(s)?this.topRight:this.centerLeft.ownsTarget(s)?this.centerLeft:this.centerRight.ownsTarget(s)?this.centerRight:this.bottomLeft.ownsTarget(s)?this.bottomLeft:this.bottomCenter.ownsTarget(s)?this.bottomCenter:this.bottomRight.ownsTarget(s)?this.bottomRight:void 0},W}(),it=function(){function W(){this.GRIP_SIZE=10,this.visual=se.createGroup(),this.visual.appendChild(se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(se.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return W.prototype.ownsTarget=function(s){return s===this.visual||s===this.visual.childNodes[0]||s===this.visual.childNodes[1]},W}(),Ze=function(){function W(){}return W.toITransformMatrix=function(s){return{a:s.a,b:s.b,c:s.c,d:s.d,e:s.e,f:s.f}},W.toSVGMatrix=function(s,f){return s.a=f.a,s.b=f.b,s.c=f.c,s.d=f.d,s.e=f.e,s.f=f.f,s},W}(),qe=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.left=0,F.top=0,F.width=0,F.height=0,F.defaultSize={x:50,y:20},F.offsetX=0,F.offsetY=0,F.rotationAngle=0,F.CB_DISTANCE=10,F._suppressMarkerCreateEvent=!1,F.container.transform.baseVal.appendItem(se.createTransform()),F.setupControlBox(),F}return Ae(s,W),Object.defineProperty(s.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"visual",{get:function(){return this._visual},set:function(f){this._visual=f;var M=se.createTransform();this._visual.transform.baseVal.appendItem(M)},enumerable:!1,configurable:!0}),s.prototype.ownsTarget=function(f){return!!W.prototype.ownsTarget.call(this,f)||!!(this.controlGrips.findGripByVisual(f)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(f))},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="new"&&(this.left=f.x,this.top=f.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var J=this.unrotatePoint(f);if(this.manipulationStartX=J.x,this.manipulationStartY=J.y,this.offsetX=J.x-this.left,this.offsetY=J.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(M),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(M)){this.activeGrip=this.rotatorGrip;var F=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=F.x-this.width/2,this.top=F.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var he=this.container.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(he,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},s.prototype.pointerUp=function(f){var M=this.state;W.prototype.pointerUp.call(this,f),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(f),this._state="select",M==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},s.prototype.moveVisual=function(f){this.visual.style.transform="translate("+f.x+"px, "+f.y+"px)"},s.prototype.manipulate=function(f){var M=this.unrotatePoint(f);this.state==="creating"?this.resize(f):this.state==="move"?(this.left=this.manipulationStartLeft+(M.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(M.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(M):this.state==="rotate"&&this.rotate(f)},s.prototype.resize=function(f){var M=this.manipulationStartLeft,J=this.manipulationStartWidth,F=this.manipulationStartTop,he=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:M=this.manipulationStartLeft+f.x-this.manipulationStartX,J=this.manipulationStartWidth+this.manipulationStartLeft-M;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:J=this.manipulationStartWidth+f.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:F=this.manipulationStartTop+f.y-this.manipulationStartY,he=this.manipulationStartHeight+this.manipulationStartTop-F;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:he=this.manipulationStartHeight+f.y-this.manipulationStartY}J>=0?(this.left=M,this.width=J):(this.left=M+J,this.width=-J),he>=0?(this.top=F,this.height=he):(this.top=F+he,this.height=-he),this.setSize()},s.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},s.prototype.rotate=function(f){if(Math.abs(f.x-this.centerX)>.1){var M=Math.sign(f.x-this.centerX);this.rotationAngle=180*Math.atan((f.y-this.centerY)/(f.x-this.centerX))/Math.PI+90*M,this.applyRotation()}},s.prototype.applyRotation=function(){var f=this.container.transform.baseVal.getItem(0);f.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(f,0)},s.prototype.rotatePoint=function(f){if(this.rotationAngle===0)return f;var M=this.container.getCTM(),J=se.createPoint(f.x,f.y);return{x:(J=J.matrixTransform(M)).x,y:J.y}},s.prototype.unrotatePoint=function(f){if(this.rotationAngle===0)return f;var M=this.container.getCTM();M=M.inverse();var J=se.createPoint(f.x,f.y);return{x:(J=J.matrixTransform(M)).x,y:J.y}},s.prototype.select=function(){W.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},s.prototype.deselect=function(){W.prototype.deselect.call(this),this.controlBox.style.display="none"},s.prototype.setupControlBox=function(){this.controlBox=se.createGroup();var f=se.createTransform();f.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(f),this.container.appendChild(this.controlBox),this.controlRect=se.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=se.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Be,this.addControlGrips(),this.controlBox.style.display="none"},s.prototype.adjustControlBox=function(){var f=this.controlBox.transform.baseVal.getItem(0);f.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(f,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},s.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},s.prototype.createGrip=function(){var f=new it;return f.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild(f.visual),f},s.prototype.positionGrips=function(){var f=this.controlGrips.topLeft.GRIP_SIZE,M=-f/2,J=M,F=(this.width+this.CB_DISTANCE)/2-f/2,he=(this.height+this.CB_DISTANCE)/2-f/2,Pe=this.height+this.CB_DISTANCE-f/2,Je=this.width+this.CB_DISTANCE-f/2;this.positionGrip(this.controlGrips.topLeft.visual,M,J),this.positionGrip(this.controlGrips.topCenter.visual,F,J),this.positionGrip(this.controlGrips.topRight.visual,Je,J),this.positionGrip(this.controlGrips.centerLeft.visual,M,he),this.positionGrip(this.controlGrips.centerRight.visual,Je,he),this.positionGrip(this.controlGrips.bottomLeft.visual,M,Pe),this.positionGrip(this.controlGrips.bottomCenter.visual,F,Pe),this.positionGrip(this.controlGrips.bottomRight.visual,Je,Pe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,F,J-3*this.CB_DISTANCE)},s.prototype.positionGrip=function(f,M,J){var F=f.transform.baseVal.getItem(0);F.setTranslate(M,J),f.transform.baseVal.replaceItem(F,0)},s.prototype.hideControlBox=function(){this.controlBox.style.display="none"},s.prototype.showControlBox=function(){this.controlBox.style.display=""},s.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},W.prototype.getState.call(this))},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f);var M=f;this.left=M.left,this.top=M.top,this.width=M.width,this.height=M.height,this.rotationAngle=M.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,M.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,M.containerTransformMatrix))},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M);var J=this.rotatePoint({x:this.left,y:this.top}),F=this.unrotatePoint({x:J.x*f,y:J.y*M});this.left=F.x,this.top=F.y,this.width=this.width*f,this.height=this.height*M,this.adjustControlBox()},s}(je),tt=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.createVisual=F.createVisual.bind(F),F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.visual)},s.prototype.createVisual=function(){this.visual=se.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.manipulate=function(f){W.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){W.prototype.resize.call(this,f),this.setSize()},s.prototype.setSize=function(){W.prototype.setSize.call(this),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},s.prototype.pointerUp=function(f){W.prototype.pointerUp.call(this,f),this.setSize()},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(f),this.stateChanged()},s.prototype.setFillColor=function(f){this.fillColor=f,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.visual&&se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},s.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},W.prototype.getState.call(this))},s.prototype.restoreState=function(f){var M=f;this.fillColor=M.fillColor,this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.opacity=M.opacity,this.createVisual(),W.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M),this.setSize()},s.title="Rectangle marker",s}(qe),dt=function(W){function s(f,M,J,F){var he=W.call(this,f,F||'')||this;return he.widths=[],he.widthBoxes=[],he.widths=M,he.currentWidth=J,he.setCurrentWidth=he.setCurrentWidth.bind(he),he}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",this.widths.forEach(function(J){var F=document.createElement("div");F.style.display="flex",F.style.flexGrow="2",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=J===f.currentWidth?f.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){f.setCurrentWidth(J,F)}),M.appendChild(F);var he=document.createElement("div");he.innerText=J.toString(),he.style.marginRight="5px",F.appendChild(he);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.display="flex",Pe.style.alignItems="center";var Je=document.createElement("hr");Je.style.minWidth="20px",Je.style.border="0px",Je.style.borderTop=J+"px solid "+f.uiStyleSettings.toolboxColor,Je.style.flexGrow="2",Pe.appendChild(Je),F.appendChild(Pe),f.widthBoxes.push(F)}),M},s.prototype.setCurrentWidth=function(f,M){var J=this;this.currentWidth=f,this.widthBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},s}(Xe),rt=function(W){function s(f,M,J,F){var he=W.call(this,f,F||'')||this;return he.styles=[],he.styleBoxes=[],he.styles=M,he.currentStyle=J,he.setCurrentStyle=he.setCurrentStyle.bind(he),he}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",this.styles.forEach(function(J){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/f.styles.length-5+"%",F.style.borderColor=J===f.currentStyle?f.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){f.setCurrentStyle(J,F)}),M.appendChild(F);var he=document.createElement("div");he.style.minHeight="20px",he.style.flexGrow="2",he.style.overflow="hidden";var Pe=``;he.innerHTML=Pe,F.appendChild(he),f.styleBoxes.push(F)}),M},s.prototype.setCurrentStyle=function(f,M){var J=this;this.currentStyle=f,this.styleBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},s}(Xe),nt=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.strokeColor=J.defaultColor,F.strokeWidth=J.defaultStrokeWidth,F.strokeDasharray=J.defaultStrokeDasharray,F.strokePanel=new Qe("Line color",J.defaultColorSet,J.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new dt("Line width",J.defaultStrokeWidths,J.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new rt("Line style",J.defaultStrokeDasharrays,J.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return Ae(s,W),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=W.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="FrameMarker",s.title="Frame marker",s.icon='',s}(tt),we=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ut=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.x1=0,F.y1=0,F.x2=0,F.y2=0,F.defaultLength=50,F.manipulationStartX=0,F.manipulationStartY=0,F.manipulationStartX1=0,F.manipulationStartY1=0,F.manipulationStartX2=0,F.manipulationStartY2=0,F.setupControlBox(),F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!!W.prototype.ownsTarget.call(this,f)||!(!this.grip1.ownsTarget(f)&&!this.grip2.ownsTarget(f))},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.manipulationStartX=f.x,this.manipulationStartY=f.y,this.state==="new"&&(this.x1=f.x,this.y1=f.y,this.x2=f.x,this.y2=f.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(M)?this.activeGrip=this.grip1:this.grip2.ownsTarget(M)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},s.prototype.pointerUp=function(f){var M=this.state;W.prototype.pointerUp.call(this,f),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(f),this._state="select",M==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},s.prototype.adjustVisual=function(){},s.prototype.manipulate=function(f){this.state==="creating"?this.resize(f):this.state==="move"?(this.x1=this.manipulationStartX1+f.x-this.manipulationStartX,this.y1=this.manipulationStartY1+f.y-this.manipulationStartY,this.x2=this.manipulationStartX2+f.x-this.manipulationStartX,this.y2=this.manipulationStartY2+f.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(f)},s.prototype.resize=function(f){switch(this.activeGrip){case this.grip1:this.x1=f.x,this.y1=f.y;break;case this.grip2:case void 0:this.x2=f.x,this.y2=f.y}this.adjustVisual(),this.adjustControlBox()},s.prototype.select=function(){W.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},s.prototype.deselect=function(){W.prototype.deselect.call(this),this.controlBox.style.display="none"},s.prototype.setupControlBox=function(){this.controlBox=se.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},s.prototype.adjustControlBox=function(){this.positionGrips()},s.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},s.prototype.createGrip=function(){var f=new it;return f.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild(f.visual),f},s.prototype.positionGrips=function(){var f=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-f/2,this.y1-f/2),this.positionGrip(this.grip2.visual,this.x2-f/2,this.y2-f/2)},s.prototype.positionGrip=function(f,M,J){var F=f.transform.baseVal.getItem(0);F.setTranslate(M,J),f.transform.baseVal.replaceItem(F,0)},s.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},W.prototype.getState.call(this))},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f);var M=f;this.x1=M.x1,this.y1=M.y1,this.x2=M.x2,this.y2=M.y2},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M),this.x1=this.x1*f,this.y1=this.y1*M,this.x2=this.x2*f,this.y2=this.y2*M,this.adjustVisual(),this.adjustControlBox()},s}(je),at=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.strokeColor=J.defaultColor,F.strokeWidth=J.defaultStrokeWidth,F.strokeDasharray=J.defaultStrokeDasharray,F.strokePanel=new Qe("Line color",J.defaultColorSet,J.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new dt("Line width",J.defaultStrokeWidths,J.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new rt("Line style",J.defaultStrokeDasharrays,J.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.selectorLine&&f!==this.visibleLine)},s.prototype.createVisual=function(){this.visual=se.createGroup(),this.selectorLine=se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},s.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.adjustVisual(),this.colorChanged(f)},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.adjustVisual()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.adjustVisual(),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f);var M=f;this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.createVisual(),this.adjustVisual()},s.typeName="LineMarker",s.title="Line marker",s.icon='',s}(ut),Re=function(W){function s(f,M,J,F){var he=W.call(this,f,F||'')||this;return he.fonts=[],he.fontBoxes=[],he.fonts=M,he.currentFont=J,he.setCurrentFont=he.setCurrentFont.bind(he),he}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.flexGrow="2",this.fonts.forEach(function(J){var F=document.createElement("div");F.style.display="inline-block",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/f.fonts.length-5+"%",F.style.borderColor=J===f.currentFont?f.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){f.setCurrentFont(J,F)}),M.appendChild(F);var he=document.createElement("div");he.style.display="flex",he.style.minHeight="20px",he.style.flexGrow="2",he.style.fontFamily=J,he.style.overflow="hidden";var Pe=document.createElement("div");Pe.style.whiteSpace="nowrap",Pe.style.overflow="hidden",Pe.style.textOverflow="ellipsis",Pe.innerHTML="The quick brown fox jumps over the lazy dog",he.appendChild(Pe),F.appendChild(he),f.fontBoxes.push(F)}),M},s.prototype.setCurrentFont=function(f,M){var J=this;this.currentFont=f,this.fontBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},s}(Xe),He=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.color="transparent",F.padding=5,F.DEFAULT_TEXT="your text here",F.text=F.DEFAULT_TEXT,F.isMoved=!1,F.color=J.defaultColor,F.fontFamily=J.defaultFontFamily,F.defaultSize={x:100,y:30},F.setColor=F.setColor.bind(F),F.setFont=F.setFont.bind(F),F.renderText=F.renderText.bind(F),F.sizeText=F.sizeText.bind(F),F.textEditDivClicked=F.textEditDivClicked.bind(F),F.showTextEditor=F.showTextEditor.bind(F),F.setSize=F.setSize.bind(F),F.positionTextEditor=F.positionTextEditor.bind(F),F.colorPanel=new Qe("Color",J.defaultColorSet,J.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.fontFamilyPanel=new Re("Font",J.defaultFontFamilies,J.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F}return Ae(s,W),s.prototype.ownsTarget=function(f){if(W.prototype.ownsTarget.call(this,f)||f===this.visual||f===this.textElement||f===this.bgRectangle)return!0;var M=!1;return this.textElement.childNodes.forEach(function(J){J===f&&(M=!0)}),M},s.prototype.createVisual=function(){this.visual=se.createGroup(),this.bgRectangle=se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.isMoved=!1,this.pointerDownPoint=f,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.renderText=function(){var f=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(M){f.textElement.appendChild(se.createTSpan(M.trim()===""?" ":M.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},s.prototype.getTextScale=function(){var f=this.textElement.getBBox(),M=1;if(f.width>0&&f.height>0){var J=(1*this.width-this.width*this.padding*2/100)/f.width,F=(1*this.height-this.height*this.padding*2/100)/f.height;M=Math.min(J,F)}return M},s.prototype.getTextPosition=function(f){var M=this.textElement.getBBox(),J=0,F=0;return M.width>0&&M.height>0&&(J=(this.width-M.width*f)/2,F=this.height/2-M.height*f/2),{x:J,y:F}},s.prototype.sizeText=function(){var f=this.textElement.getBBox(),M=this.getTextScale(),J=this.getTextPosition(M);J.y-=f.y*M,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+J.x+"px, "+J.y+"px) scale("+M+", "+M+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(J.x,J.y),this.textElement.transform.baseVal.getItem(1).setScale(M,M))},s.prototype.manipulate=function(f){W.prototype.manipulate.call(this,f),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(f.x-this.pointerDownPoint.x)>5||Math.abs(f.y-this.pointerDownPoint.y)>5)},s.prototype.resize=function(f){W.prototype.resize.call(this,f),this.isMoved=!0,this.setSize(),this.sizeText()},s.prototype.setSize=function(){W.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},s.prototype.pointerUp=function(f){var M=this.state;M==="creating"&&(this._suppressMarkerCreateEvent=!0),W.prototype.pointerUp.call(this,f),this.setSize(),(M==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},s.prototype.showTextEditor=function(){var f=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(M){M.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var M=Number.parseFloat(f.textEditor.style.fontSize);f.textEditor.clientWidth>=Number.parseInt(f.textEditor.style.maxWidth)&&M>.9;)M-=.1,f.textEditor.style.fontSize=Math.max(M,.9)+"em"}),this.textEditor.addEventListener("keyup",function(M){M.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(M){if(M.clipboardData){var J=M.clipboardData.getData("text"),F=window.getSelection();if(!F.rangeCount)return!1;F.deleteFromDocument(),F.getRangeAt(0).insertNode(document.createTextNode(J)),M.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){f.textEditDivClicked(f.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},s.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var f=this.getTextScale(),M=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),J=this.textElement.getBBox(),F={x:J.width*f,y:J.height*f};M.x-=F.x/2,M.y-=F.y/2,this.textEditor.style.top=M.y+"px",this.textEditor.style.left=M.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-M.x+"px",this.textEditor.style.fontSize=Math.max(16*f,12)+"px",this.textElement.style.display="none"}},s.prototype.textEditDivClicked=function(f){this.text=f.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},s.prototype.select=function(){W.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},s.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),W.prototype.deselect.call(this)},s.prototype.dblClick=function(f,M){W.prototype.dblClick.call(this,f,M),this.showTextEditor()},s.prototype.setColor=function(f){this.textElement&&se.setAttributes(this.textElement,[["fill",f]]),this.color=f,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(f)},s.prototype.setFont=function(f){this.textElement&&se.setAttributes(this.textElement,[["font-family",f]]),this.fontFamily=f,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},s.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},s.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){var M=f;this.color=M.color,this.fontFamily=M.fontFamily,this.padding=M.padding,this.text=M.text,this.createVisual(),W.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M),this.setSize(),this.sizeText(),this.positionTextEditor()},s.typeName="TextMarker",s.title="Text marker",s.icon='',s}(qe),ge=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.color="transparent",F.lineWidth=3,F.drawing=!1,F.pixelRatio=1,F.color=J.defaultColor,F.lineWidth=J.defaultStrokeWidth,F.pixelRatio=J.freehandPixelRatio,F.setColor=F.setColor.bind(F),F.addCanvas=F.addCanvas.bind(F),F.finishCreation=F.finishCreation.bind(F),F.setLineWidth=F.setLineWidth.bind(F),F.colorPanel=new Qe("Color",J.defaultColorSet,J.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.lineWidthPanel=new dt("Line width",J.defaultStrokeWidths,J.defaultStrokeWidth),F.lineWidthPanel.onWidthChanged=F.setLineWidth,F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.drawingImage)},s.prototype.createVisual=function(){this.visual=se.createGroup(),this.drawingImage=se.createImage(),this.visual.appendChild(this.drawingImage);var f=se.createTransform();this.visual.transform.baseVal.appendItem(f),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,M){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(f.x,f.y),this.drawing=!0):W.prototype.pointerDown.call(this,f,M)},s.prototype.manipulate=function(f){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(f.x,f.y),this.canvasContext.stroke()):W.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){W.prototype.resize.call(this,f),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},s.prototype.pointerUp=function(f){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):W.prototype.pointerUp.call(this,f)},s.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},s.prototype.select=function(){this.state==="creating"&&this.finishCreation(),W.prototype.select.call(this)},s.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),W.prototype.deselect.call(this)},s.prototype.finishCreation=function(){for(var f=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),M=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],J=M[0],F=M[1],he=M[2],Pe=M[3],Je=!1,ft=0;ft0&&(Je=!0,ftPe&&(Pe=ft),Ne>he&&(he=Ne));if(Je){this.left=J/this.pixelRatio,this.top=F/this.pixelRatio,this.width=(he-J)/this.pixelRatio,this.height=(Pe-F)/this.pixelRatio;var yt=document.createElement("canvas");yt.width=he-J,yt.height=Pe-F,yt.getContext("2d").putImageData(this.canvasContext.getImageData(J,F,he-J,Pe-F),0,0),this.drawingImgUrl=yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},s.prototype.setDrawingImage=function(){se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},s.prototype.setColor=function(f){this.color=f,this.colorChanged(f)},s.prototype.setLineWidth=function(f){this.lineWidth=f},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({drawingImgUrl:this.drawingImgUrl},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){this.createVisual(),W.prototype.restoreState.call(this,f),this.drawingImgUrl=f.drawingImgUrl,this.setDrawingImage()},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M),this.setDrawingImage()},s.typeName="FreehandMarker",s.title="Freehand marker",s.icon='',s}(qe),de=function(W){function s(f,M,J){var F=W.call(this,f,J||'')||this;return F.typeBoxes=[],F.currentType=M,F.setCurrentType=F.setCurrentType.bind(F),F}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2";for(var J=function(Pe){var Je="both";switch(Pe){case 0:Je="both";break;case 1:Je="start";break;case 2:Je="end";break;case 3:Je="none"}var ft=document.createElement("div");if(ft.style.display="flex",ft.style.flexGrow="2",ft.style.alignItems="center",ft.style.justifyContent="space-between",ft.style.padding="5px",ft.style.borderWidth="2px",ft.style.borderStyle="solid",ft.style.borderColor=Je===F.currentType?F.uiStyleSettings.toolboxAccentColor:"transparent",ft.addEventListener("click",function(){f.setCurrentType(Je,ft)}),M.appendChild(ft),Je==="both"||Je==="start"){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.minHeight="20px",Ne.innerHTML=``,Ne.style.marginLeft="5px",ft.appendChild(Ne)}var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.style.flexGrow="2";var Bt=document.createElement("hr");if(Bt.style.minWidth="20px",Bt.style.border="0px",Bt.style.borderTop="3px solid "+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee"),Bt.style.flexGrow="2",yt.appendChild(Bt),ft.appendChild(yt),Je==="both"||Je==="end"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.innerHTML=``,Kt.style.marginRight="5px",ft.appendChild(Kt)}F.typeBoxes.push(ft)},F=this,he=0;he<4;he++)J(he);return M},s.prototype.setCurrentType=function(f,M){var J=this;this.currentType=f,this.typeBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings!==void 0?J.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},s}(Xe),fe=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.arrowType="end",F.arrowBaseHeight=10,F.arrowBaseWidth=10,F.getArrowPoints=F.getArrowPoints.bind(F),F.setArrowType=F.setArrowType.bind(F),F.arrowTypePanel=new de("Arrow type","end"),F.arrowTypePanel.onArrowTypeChanged=F.setArrowType,F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.arrow1&&f!==this.arrow2)},s.prototype.getArrowPoints=function(f,M){var J=this.arrowBaseWidth+2*this.strokeWidth,F=this.arrowBaseHeight+2*this.strokeWidth;return f-J/2+","+(M+F/2)+" "+f+","+(M-F/2)+" "+(f+J/2)+","+(M+F/2)},s.prototype.createTips=function(){this.arrow1=se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow2)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="creating"&&this.createTips()},s.prototype.adjustVisual=function(){if(W.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),se.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var f=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),M=this.arrow1.transform.baseVal.getItem(0);M.setRotate(f,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(M,0);var J=this.arrow2.transform.baseVal.getItem(0);J.setRotate(f+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(J,0)}},s.prototype.setArrowType=function(f){this.arrowType=f,this.adjustVisual(),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({arrowType:this.arrowType},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f);var M=f;this.arrowType=M.arrowType,this.createTips(),this.adjustVisual()},s.typeName="ArrowMarker",s.title="Arrow marker",s.icon='',s}(at),te=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.fillColor=J.defaultFillColor,F.strokeWidth=0,F.fillPanel=new Qe("Color",J.defaultColorSet,J.defaultFillColor),F.fillPanel.onColorChanged=F.setFillColor,F}return Ae(s,W),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=W.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="CoverMarker",s.title="Cover marker",s.icon='',s}(tt),re=function(W){function s(f,M,J,F){var he=W.call(this,f,F||'')||this;return he.opacities=[],he.opacityBoxes=[],he.opacities=M,he.currentOpacity=J,he.setCurrentOpacity=he.setCurrentOpacity.bind(he),he}return Ae(s,W),s.prototype.getUi=function(){var f=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",M.style.justifyContent="space-between",this.opacities.forEach(function(J){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="center",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=J===f.currentOpacity?f.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){f.setCurrentOpacity(J,F)}),M.appendChild(F);var he=document.createElement("div");he.innerText=100*J+"%",F.appendChild(he),f.opacityBoxes.push(F)}),M},s.prototype.setCurrentOpacity=function(f,M){var J=this;this.currentOpacity=f,this.opacityBoxes.forEach(function(F){F.style.borderColor=F===M?J.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},s}(Xe),ne=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.setOpacity=F.setOpacity.bind(F),F.fillColor=J.defaultHighlightColor,F.strokeWidth=0,F.opacity=J.defaultHighlightOpacity,F.fillPanel=new Qe("Color",J.defaultColorSet,F.fillColor),F.fillPanel.onColorChanged=F.setFillColor,F.opacityPanel=new re("Opacity",J.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return Ae(s,W),s.prototype.setOpacity=function(f){this.opacity=f,this.visual&&se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=W.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="HighlightMarker",s.title="Highlight marker",s.icon='',s}(te),ue='',me=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.bgColor="transparent",F.tipPosition={x:0,y:0},F.tipBase1Position={x:0,y:0},F.tipBase2Position={x:0,y:0},F.tipMoving=!1,F.color=J.defaultStrokeColor,F.bgColor=J.defaultFillColor,F.fontFamily=J.defaultFontFamily,F.defaultSize={x:100,y:30},F.setBgColor=F.setBgColor.bind(F),F.getTipPoints=F.getTipPoints.bind(F),F.positionTip=F.positionTip.bind(F),F.setTipPoints=F.setTipPoints.bind(F),F.colorPanel=new Qe("Text color",J.defaultColorSet,F.color,''),F.colorPanel.onColorChanged=F.setColor,F.bgColorPanel=new Qe("Fill color",J.defaultColorSet,F.bgColor,ue),F.bgColorPanel.onColorChanged=F.setBgColor,F.fontFamilyPanel=new Re("Font",J.defaultFontFamilies,J.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F.tipGrip=new it,F.tipGrip.visual.transform.baseVal.appendItem(se.createTransform()),F.controlBox.appendChild(F.tipGrip.visual),F}return Ae(s,W),s.prototype.ownsTarget=function(f){return W.prototype.ownsTarget.call(this,f)||this.tipGrip.ownsTarget(f)||this.tip===f},s.prototype.createTip=function(){se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},s.prototype.pointerDown=function(f,M){this.state==="new"&&W.prototype.pointerDown.call(this,f,M),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(M)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):W.prototype.pointerDown.call(this,f,M)},s.prototype.pointerUp=function(f){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,W.prototype.pointerUp.call(this,f);else{var M=this.state==="creating";W.prototype.pointerUp.call(this,f),this.setTipPoints(M),this.positionTip()}},s.prototype.manipulate=function(f){if(this.tipMoving){var M=this.unrotatePoint(f);this.tipPosition={x:M.x-this.manipulationStartLeft,y:M.y-this.manipulationStartTop},this.positionTip()}else W.prototype.manipulate.call(this,f)},s.prototype.setBgColor=function(f){this.bgRectangle&&this.tip&&(se.setAttributes(this.bgRectangle,[["fill",f]]),se.setAttributes(this.tip,[["fill",f]])),this.bgColor=f,this.fillColorChanged(f)},s.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},s.prototype.setTipPoints=function(f){f===void 0&&(f=!1);var M=Math.min(this.height/2,15),J=this.height/5;f&&(this.tipPosition={x:M+J/2,y:this.height+20});var F=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?F',s}(He),Te=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.strokeColor=J.defaultColor,F.strokeWidth=J.defaultStrokeWidth,F.strokeDasharray=J.defaultStrokeDasharray,F.fillColor=J.defaultFillColor,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.setOpacity=F.setOpacity.bind(F),F.createVisual=F.createVisual.bind(F),F.strokePanel=new Qe("Line color",pe(J.defaultColorSet,["transparent"]),J.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.fillPanel=new Qe("Fill color",pe(J.defaultColorSet,["transparent"]),F.fillColor,ue),F.fillPanel.onColorChanged=F.setFillColor,F.strokeWidthPanel=new dt("Line width",J.defaultStrokeWidths,J.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new rt("Line style",J.defaultStrokeDasharrays,J.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F.opacityPanel=new re("Opacity",J.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.visual)},s.prototype.createVisual=function(){this.visual=se.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.manipulate=function(f){W.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){W.prototype.resize.call(this,f),this.setSize()},s.prototype.setSize=function(){W.prototype.setSize.call(this),se.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},s.prototype.pointerUp=function(f){W.prototype.pointerUp.call(this,f),this.setSize()},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(f),this.stateChanged()},s.prototype.setFillColor=function(f){this.fillColor=f,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(f),this.stateChanged()},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.visual&&se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},s.prototype.setOpacity=function(f){this.opacity=f,this.visual&&se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){var M=f;this.fillColor=M.fillColor,this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.opacity=M.opacity,this.createVisual(),W.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,M){W.prototype.scale.call(this,f,M),this.setSize()},s.typeName="EllipseMarker",s.title="Ellipse marker",s.icon='',s}(qe),_e=function(W){function s(f,M,J){return W.call(this,f,M,J)||this}return Ae(s,W),Object.defineProperty(s.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.tip1&&f!==this.tip2)},s.prototype.createTips=function(){this.tip1=se.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=se.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.tip2)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.state==="creating"&&this.createTips()},s.prototype.adjustVisual=function(){if(W.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(se.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var f=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),M=this.tip1.transform.baseVal.getItem(0);M.setRotate(f,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(M,0);var J=this.tip2.transform.baseVal.getItem(0);J.setRotate(f+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(J,0)}},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=W.prototype.getState.call(this);return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f),this.createTips(),this.adjustVisual()},s.typeName="MeasurementMarker",s.title="Measurement marker",s.icon='',s}(at),ot=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.strokePanel.colors=J.defaultColorSet,F.fillColor="transparent",F}return Ae(s,W),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=W.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="EllipseFrameMarker",s.title="Ellipse frame marker",s.icon='',s}(Te),gt=function(){function W(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(W.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),W.prototype.addUndoStep=function(s){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(s)||(this.undoStack.push(s),JSON.stringify(this.lastRedoStep)!==JSON.stringify(s)&&this.redoStack.splice(0,this.redoStack.length))},W.prototype.replaceLastUndoStep=function(s){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=s)},W.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},W.prototype.undo=function(){if(this.undoStack.length>1){var s=this.undoStack.pop();return s!==void 0&&this.redoStack.push(s),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},W.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},W}(),pt=function(W){function s(f,M,J){var F=W.call(this,f,M,J)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.curveX=0,F.curveY=0,F.manipulationStartCurveX=0,F.manipulationStartCurveY=0,F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.positionGrips=F.positionGrips.bind(F),F.addControlGrips=F.addControlGrips.bind(F),F.adjustVisual=F.adjustVisual.bind(F),F.setupControlBox=F.setupControlBox.bind(F),F.resize=F.resize.bind(F),F.strokeColor=J.defaultColor,F.strokeWidth=J.defaultStrokeWidth,F.strokeDasharray=J.defaultStrokeDasharray,F.strokePanel=new Qe("Line color",J.defaultColorSet,J.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new dt("Line width",J.defaultStrokeWidths,J.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new rt("Line style",J.defaultStrokeDasharrays,J.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return Ae(s,W),s.prototype.ownsTarget=function(f){return!(!W.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.selectorCurve&&f!==this.visibleCurve&&!this.curveGrip.ownsTarget(f))},s.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},s.prototype.createVisual=function(){this.visual=se.createGroup(),this.selectorCurve=se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=se.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,M){W.prototype.pointerDown.call(this,f,M),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=f.x,this.curveY=f.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(M)&&(this.activeGrip=this.curveGrip,this._state="resize")},s.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},s.prototype.setupControlBox=function(){W.prototype.setupControlBox.call(this),this.curveControlLine1=se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=se.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},s.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,W.prototype.addControlGrips.call(this)},s.prototype.positionGrips=function(){W.prototype.positionGrips.call(this);var f=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-f/2,this.curveY-f/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},s.prototype.manipulate=function(f){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+f.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+f.y-this.manipulationStartY),W.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){this.activeGrip===this.curveGrip&&(this.curveX=f.x,this.curveY=f.y),W.prototype.resize.call(this,f),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.adjustVisual(),this.colorChanged(f)},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.adjustVisual()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.adjustVisual()},s.prototype.scale=function(f,M){this.curveX=this.curveX*f,this.curveY=this.curveY*M,W.prototype.scale.call(this,f,M)},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},W.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){W.prototype.restoreState.call(this,f);var M=f;this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.curveX=M.curveX,this.curveY=M.curveY,this.createVisual(),this.adjustVisual()},s.typeName="CurveMarker",s.title="Curve marker",s.icon='',s}(ut),Tt=function(){function W(s,f){f===void 0&&(f=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=s,this.cancelable=f}return Object.defineProperty(W.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),W.prototype.preventDefault=function(){this._defaultPrevented=!0},W}(),St=function(W){function s(f,M,J){var F=W.call(this,f,!1)||this;return F.dataUrl=M,F.state=J,F}return Ae(s,W),s}(Tt),ht=function(W){function s(f,M,J){J===void 0&&(J=!1);var F=W.call(this,f,J)||this;return F.marker=M,F}return Ae(s,W),s}(Tt),Ut=function(){function W(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return W.prototype.addEventListener=function(s,f){this[s].push(f)},W.prototype.removeEventListener=function(s,f){var M=this[s].indexOf(f);M>-1&&this[s].splice(M,1)},W}(),Mt=function(){function W(s){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new we,this._isOpen=!1,this.undoRedoManager=new gt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=W.instanceCounter++,this.styles=new Ke(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=s,this.targetRoot=document.body,this.width=s.clientWidth,this.height=s.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(W.prototype,"ALL_MARKER_TYPES",{get:function(){return[nt,ge,fe,He,ot,Te,ne,me,_e,te,at,pt]},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[nt,ge,fe,He,Te,ne,me]},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"BASIC_MARKER_TYPES",{get:function(){return[nt,ge,fe,He,ne]},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(s){var f=this;this._availableMarkerTypes.splice(0),s.forEach(function(M){if(typeof M=="string"){var J=f.ALL_MARKER_TYPES.find(function(F){return F.typeName===M});J!==void 0&&f._availableMarkerTypes.push(J)}else f._availableMarkerTypes.push(M)})},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(s){this._zoomLevel=s,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),W.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),De.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},W.prototype.show=function(){var s=this;this.styles.styleSheetRoot===void 0&&We.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=We.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(f){return f(new Tt(s))})},W.prototype.render=function(){return Ee(this,void 0,void 0,function(){var s;return Ce(this,function(f){switch(f.label){case 0:return this.setCurrentMarker(),(s=new ze).naturalSize=this.renderAtNaturalSize,s.imageType=this.renderImageType,s.imageQuality=this.renderImageQuality,s.markersOnly=this.renderMarkersOnly,s.width=this.renderWidth,s.height=this.renderHeight,[4,s.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return f.sent(),[4,s.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,f.sent()]}})})},W.prototype.close=function(s){var f=this;if(s===void 0&&(s=!1),this.isOpen){var M=!1;s||this.eventListeners.beforeclose.forEach(function(J){var F=new Tt(f,!0);J(F),F.defaultPrevented&&(M=!0)}),M||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(J){return J(new Tt(f))}),this.detachEvents(),this._isOpen=!1)}},W.prototype.addMarkersToToolbar=function(){for(var s,f=[],M=0;Mthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*s:this.editorCanvas.clientWidth,M=f',s.title="Powered by marker.js",s.style.display="grid",s.style.alignItems="center",s.style.justifyItems="center",s.style.padding="3px",s.style.width="20px",s.style.height="20px",this.logoUI.appendChild(s),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},W.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},W.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},W.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},W.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var s=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=s+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Oe(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(s),1),s.dispose()},W.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},W.prototype.toolbarButtonClicked=function(s,f){if(s==="marker"&&f!==void 0)this.createNewMarker(f);else if(s==="action")switch(f){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},W.prototype.deleteSelectedMarker=function(){var s=this;if(this._currentMarker!==void 0){var f=!1;if(this.eventListeners.markerbeforedelete.forEach(function(J){var F=new ht(s,s._currentMarker,!0);J(F),F.defaultPrevented&&(f=!0)}),!f){var M=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(J){return J(new ht(s,M))})}}},W.prototype.clear=function(){var s=this,f=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(he){var Pe=new ht(s,void 0,!0);he(Pe),Pe.defaultPrevented&&(f=!0)}),!f)){this.setCurrentMarker();for(var M=function(he){var Pe=J.markers[he];J.setCurrentMarker(J.markers[he]),J._currentMarker.dispose(),J.markerImage.removeChild(J._currentMarker.container),J.markers.splice(J.markers.indexOf(J._currentMarker),1),J.eventListeners.markerdelete.forEach(function(Je){return Je(new ht(s,Pe))})},J=this,F=this.markers.length-1;F>=0;F--)M(F);this.addUndoStep()}},Object.defineProperty(W.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),W.prototype.showNotesEditor=function(){var s;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(s=this._currentMarker.notes)!==null&&s!==void 0?s:"",this.overlayContainer.appendChild(this.notesArea))},W.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},W.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},W.prototype.addUndoStep=function(){var s=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var f=this.getState(),M=this.undoRedoManager.getLastUndoStep();if(!M||M.width===f.width&&M.height===f.height){var J=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(f),J1&&this.panTo({x:s.clientX,y:s.clientY}))},W.prototype.onPointerUp=function(s){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(s.clientX,s.clientY)),this.isDragging=!1,this.addUndoStep()},W.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},W.prototype.onKeyUp=function(s){this._currentMarker===void 0||this.notesArea!==void 0||s.key!=="Delete"&&s.key!=="Backspace"||this.deleteSelectedMarker()},W.prototype.clientToLocalCoordinates=function(s,f){var M=this.markerImage.getBoundingClientRect();return{x:(s-M.left)/this.zoomLevel,y:(f-M.top)/this.zoomLevel}},W.prototype.onWindowResize=function(){this.positionUI()},W.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var s=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=s+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},W.prototype.addLicenseKey=function(s){De.addKey(s)},W.prototype.addEventListener=function(s,f){this.eventListeners.addEventListener(s,f)},W.prototype.removeEventListener=function(s,f){this.eventListeners.removeEventListener(s,f)},W.prototype.renderState=function(s){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(s),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(W.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),W.prototype.focus=function(){var s=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(f){return f(new Tt(s))}))},W.prototype.blur=function(){var s=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(f){return f(new Tt(s))}))},W.instanceCounter=0,W}();/* **********************************
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 Jt=function(W,s){return(Jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,M){f.__proto__=M}||function(f,M){for(var J in M)Object.prototype.hasOwnProperty.call(M,J)&&(f[J]=M[J])})(W,s)};function Qt(W,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function f(){this.constructor=W}Jt(W,s),W.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}function It(W,s,f,M){return new(f||(f=Promise))(function(J,F){function he(ft){try{Je(M.next(ft))}catch(Ne){F(Ne)}}function Pe(ft){try{Je(M.throw(ft))}catch(Ne){F(Ne)}}function Je(ft){var Ne;ft.done?J(ft.value):(Ne=ft.value,Ne instanceof f?Ne:new f(function(yt){yt(Ne)})).then(he,Pe)}Je((M=M.apply(W,s||[])).next())})}function _r(W,s){var f,M,J,F,he={label:0,sent:function(){if(1&J[0])throw J[1];return J[1]},trys:[],ops:[]};return F={next:Pe(0),throw:Pe(1),return:Pe(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Pe(Je){return function(ft){return function(Ne){if(f)throw new TypeError("Generator is already executing.");for(;he;)try{if(f=1,M&&(J=2&Ne[0]?M.return:Ne[0]?M.throw||((J=M.return)&&J.call(M),0):M.next)&&!(J=J.call(M,Ne[1])).done)return J;switch(M=0,J&&(Ne=[2&Ne[0],J.value]),Ne[0]){case 0:case 1:J=Ne;break;case 4:return he.label++,{value:Ne[1],done:!1};case 5:he.label++,M=Ne[1],Ne=[0];continue;case 7:Ne=he.ops.pop(),he.trys.pop();continue;default:if(!(J=he.trys,(J=J.length>0&&J[J.length-1])||Ne[0]!==6&&Ne[0]!==2)){he=0;continue}if(Ne[0]===3&&(!J||Ne[1]>J[0]&&Ne[1]0&&f>0){var M=new Hr(s,f),J=M.ratio>=1?20:M.getHorizontalLength(20),F=M.ratio<1?20:M.getVerticalLength(20),he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(he);var Pe=Et.createDefs();he.appendChild(Pe);var Je=Et.createElement("clipPath",[["id","text-bg-clip"]]);Pe.appendChild(Je);var ft=Et.createPath(Et.getHollowRectanglePath((24-J)/2,(24-F)/2,J,F,(24-J)/2+2,(24-F)/2+2,J-4,F-4));he.appendChild(ft);var Ne=Et.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ne.appendChild(Et.createTSpan(s+":"+f)),he.appendChild(Ne);var yt=Ne.getBBox();Et.setAttributes(Ne,[["x",((24-yt.width)/2).toString()],["y",((24-yt.height)/2-yt.y).toString()]]);var Bt=Et.createPath(Et.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(yt.width))/2,(24-Math.ceil(yt.height))/2,Math.ceil(yt.width),Math.ceil(yt.height)));return Je.appendChild(Bt),Et.setAttributes(ft,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(he),he.outerHTML}return''},W}(),mr=function(W){function s(f,M,J){var F=W.call(this,f,M)||this;return F.isDropdownOpen=!1,F.onClick=F.dropdownButtonClicked,F.dropdownButtons=J,F}return Qt(s,W),s.prototype.setupDropdown=function(){var f=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(M){M.className=f.className,M.colorsClassName=f.colorsClassName,f.dropdownBlock.appendChild(M.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},s.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},s.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},s.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},s.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},s.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},s}(_t),Lt=function(){function W(s,f){this.GRIP_SIZE=10,this.color=s,this.fillColor=f,this.visual=Et.createGroup(),this.visual.appendChild(Et.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Et.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return W.prototype.ownsTarget=function(s){return s===this.visual||s===this.visual.childNodes[0]||s===this.visual.childNodes[1]},W.prototype.setCenter=function(s,f){this.visual.childNodes.forEach(function(M){return Et.setAttributes(M,[["cx",s.toString()],["cy",f.toString()]])})},W}(),Ur=function(){function W(s,f,M,J){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=s,this.canvasHeight=f,this.margin=M,this.container=J,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(W.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(s){this._aspectRatio=s,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(s){this._isGridVisible=s,this.gridContainer&&Et.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(s){this._zoomFactor=s,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),W.prototype.open=function(){var s=this;this.cropShadeElement=Et.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Et.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var f=0;fthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-f.height/2),Et.setAttributes(this.cropRectElement,[["x",f.x.toString()],["y",f.y.toString()],["width",f.width.toString()],["height",f.height.toString()]]);var M=f.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(F,he){var Pe=f.y+M*(he+1);Et.setAttributes(F,[["x1",""+f.x],["y1",""+Pe],["x2",""+(f.x+f.width)],["y2",""+Pe]])});var J=f.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(F,he){var Pe=f.x+J*(he+1);Et.setAttributes(F,[["x1",""+Pe],["y1",""+f.y],["x2",""+Pe],["y2",""+(f.y+f.height)]])}),Et.setAttributes(this.cropShadeElement,[["d",Et.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,f.x,f.y,f.width,f.height)]]),this.topLeftGrip.setCenter(f.x,f.y),this.topRightGrip.setCenter(f.x+f.width,f.y),this.bottomLeftGrip.setCenter(f.x,f.y+f.height),this.bottomRightGrip.setCenter(f.x+f.width,f.y+f.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},W.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)},W.prototype.clientToLocalCoordinates=function(s,f){var M=this.container.getBoundingClientRect();return{x:s-M.left+this.margin,y:f-M.top+this.margin}},W.prototype.onPointerDown=function(s){this.container.setPointerCapture(s.pointerId),this.previousPoint=this.clientToLocalCoordinates(s.clientX,s.clientY),this.cropRectElement===s.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(s.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(s.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(s.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(s.target)&&(this.activeGrip=this.bottomRightGrip)},W.prototype.onPointerMove=function(s){if(this.isMoving)this.move(this.clientToLocalCoordinates(s.clientX,s.clientY));else if(this.activeGrip){var f=this.clientToLocalCoordinates(s.clientX,s.clientY);this.resize(f)}s.preventDefault()},W.prototype.onPointerUp=function(s){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(s.pointerId)},W.prototype.move=function(s){var f=s.x-this.previousPoint.x,M=s.y-this.previousPoint.y;this.zoomFactor!==1&&(f=-f/this.zoomFactor,M=-M/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+f),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+M),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=s},W.prototype.resize=function(s){var f=Object.assign({},this.cropRect),M=s.x-this.previousPoint.x,J=s.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:f.x+Mthis.canvasWidth*this.zoomFactor&&(M=this.canvasWidth*this.zoomFactor-f.width),f.width+=M}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(f.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(M),f.height=this.aspectRatio.getVerticalLength(f.width)):(f.y+=J,f.height=this.cropRect.y+this.cropRect.height-f.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?f.height=this.aspectRatio.getVerticalLength(f.width):f.height+=J}f.width<10&&(f.x=this.cropRect.x,f.width=10),f.height<10&&(f.y=this.cropRect.y,f.height=10),this.previousPoint=s,f.x>=this.margin&&f.y>=this.margin&&f.x-this.margin+f.width<=this.canvasWidth&&f.y-this.margin+f.height<=this.canvasHeight&&(this.cropRect=f,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},W.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var s=this.cropRect.x+this.cropRect.width/2,f=this.cropRect.y+this.cropRect.height/2,M=this.aspectRatio.getHorizontalLength(this.cropRect.height),J=this.aspectRatio.getVerticalLength(this.cropRect.width);M/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=s-this.cropRect.width/2,this.cropRect.y=f-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)}},W.prototype.getRescaledRect=function(s,f,M,J,F,he){var Pe=M/s,Je=J/f;return{x:(F.x-he)*Pe+he,y:(F.y-he)*Je+he,width:F.width*Pe,height:F.height*Je}},W.prototype.scaleCanvas=function(s,f){var M=this.getRescaledRect(this.canvasWidth,this.canvasHeight,s,f,this.cropRect,this.margin);this.canvasWidth=s,this.canvasHeight=f,this.onCropChange&&this.onCropChange(M),this.setCropRectangle(M)},W}(),Vr=function(){function W(s){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=s,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(W.prototype,"angle",{get:function(){return this._angle},set:function(s){this._angle=s,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),W.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},W.prototype.onPointerDown=function(s){this.controlContainer.setPointerCapture(s.pointerId),this.isDragging=!0,this.previousPoint={x:s.clientX,y:s.clientY}},W.prototype.onPointerMove=function(s){this.isDragging&&(this.onAngleChange&&this.onAngleChange((s.clientX-this.previousPoint.x)/5),this.previousPoint.x=s.clientX)},W.prototype.onPointerUp=function(s){this.isDragging&&this.onAngleChange&&this.onAngleChange((s.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(s.pointerId)},W.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var s=this.angleLabelText.getBBox();Et.setAttributes(this.angleLabelElement,[["x",((this.width-s.width)/2).toString()],["y",(this.height/2).toString()]])}},W.prototype.positionScaleShape=function(){if(this.scaleShape){var s=this.scaleShape.transform.baseVal.getItem(0);s.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(s,0)}},W.prototype.getVisual=function(){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("width",this.width+"px"),s.setAttribute("height",this.height+"px"),s.setAttribute("viewBox","0 0 "+this.width+" "+this.height),s.style.flexShrink="0",document.body.appendChild(s);for(var f="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,M=1;M<=this.width/5+10;M++){var J=M%5==0?this.height/3:this.height/6;f+="h4v"+-J+"h1v"+J}f+="v1H0Z",this.scaleShape=Et.createPath(f);var F=Et.createTransform();this.scaleShape.transform.baseVal.appendItem(F),s.appendChild(this.scaleShape),this.angleLabelElement=Et.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Et.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=Et.createTSpan("");return he.innerHTML="°",this.angleLabelElement.appendChild(he),s.appendChild(this.angleLabelElement),document.body.removeChild(s),s},W}(),fi=function(){function W(){this.naturalSize=!1,this.imageType="image/png"}return W.prototype.rasterize=function(s,f,M,J,F,he,Pe){var Je=this;return new Promise(function(ft){var Ne=document.createElement("canvas");Ne.width=s.width.baseVal.value-2*J,Ne.height=s.height.baseVal.value-2*J;var yt=1,Bt=1;Je.naturalSize===!0?(yt=f.naturalWidth/(s.width.baseVal.value-2*J)/he,Bt=f.naturalHeight/(s.height.baseVal.value-2*J)/Pe,Ne.width=f.naturalWidth/he,Ne.height=f.naturalHeight/Pe):Je.width!==void 0&&Je.height!==void 0&&(yt=Je.width/M.width,Bt=Je.height/M.height,Ne.width*=yt,Ne.height*=Bt);var Kt=Ne.getContext("2d");Kt.translate(Ne.width/2,Ne.height/2),Kt.rotate(F*Math.PI/180),Kt.scale(he,Pe),Kt.translate(-Ne.width/2,-Ne.height/2),Kt.drawImage(f,0,0,Ne.width,Ne.height);var Ir=document.createElement("canvas");Ir.width=M.width*yt,Ir.height=M.height*Bt,Ir.getContext("2d").putImageData(Kt.getImageData((M.x-J)*yt,(M.y-J)*Bt,M.width*yt,M.height*Bt),0,0),ft(Ir.toDataURL(Je.imageType,Je.imageQuality))})},W}(),Ge=function(){function W(s){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=W.instanceCounter++,this.styles=new Br(this.instanceNo),this.target=s,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(W.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(s){this._zoomToCropEnabled=s,s?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(s){this._isGridVisible=s,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"gridLines",{get:function(){return this._gridLines},set:function(s){this._gridLines=s,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(s){this._rotationAngle=s,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"aspectRatio",{get:function(){var s;return(s=this._aspectRatio)!==null&&s!==void 0?s:this.aspectRatios[0]},set:function(s){this._aspectRatio=s},enumerable:!1,configurable:!0}),W.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},W.prototype.show=function(){this.showUI(),this.open()},W.prototype.close=function(s){s===void 0&&(s=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),s||this.closeEventListeners.forEach(function(f){return f()}),this._isOpen=!1)},W.prototype.addRenderEventListener=function(s){this.renderEventListeners.push(s)},W.prototype.removeRenderEventListener=function(s){this.renderEventListeners.indexOf(s)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(s),1)},W.prototype.addCloseEventListener=function(s){this.closeEventListeners.push(s)},W.prototype.removeCloseEventListener=function(s){this.closeEventListeners.indexOf(s)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(s),1)},W.prototype.setupResizeObserver=function(){var s=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){s.resize(s.target.clientWidth,s.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))},W.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var s=1*this.target.clientWidth/this.target.clientHeight,f=this.contentDiv.clientWidth/s>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*s:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,M=f+2*this.CANVAS_MARGINs+this.CANVAS_MARGIN?this.target.offsetTop-(s+this.CANVAS_MARGIN):0;this.coverDiv.style.top=f+"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},W.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},W.prototype.addTopToolbar=function(){var s=this;this.topToolbar=new Nr,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 f=new $r;f.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(f);var M=[];this.aspectRatios.forEach(function(Bt){var Kt=new _t(ei.getIcon(Bt.horizontal,Bt.vertical),Bt.horizontal===0&&Bt.vertical===0?"FREE":Bt.horizontal+":"+Bt.vertical);Kt.onClick=function(){return s.ratioButtonClicked(Bt)},M.push(Kt)}),this.aspectRatioButton=new mr(ei.getIcon(0,0),"Aspect ratio",M),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,f.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var J=new _t('',"Toggle grid");J.isActive=this.isGridVisible,J.onClick=function(){s.isGridVisible=!s.isGridVisible,J.isActive=s.isGridVisible},f.addButton(J);var F=new _t('',"Zoom to selection");if(F.isActive=this.zoomToCropEnabled,F.onClick=function(){s.zoomToCropEnabled=!s.zoomToCropEnabled,F.isActive=s.zoomToCropEnabled},f.addButton(F),!Kr.isLicensed){var he=new ct;this.topToolbar.addElementBlock(he);var Pe=document.createElement("div");Pe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Je=document.createElement("a");Je.style.color="currentColor",Je.href="https://markerjs.com/products/cropro",Je.target="_blank",Je.innerHTML='',Pe.appendChild(Je),he.addElement(Pe)}var ft=new $r;ft.minWidth=3*this.toolbarHeight+"px",ft.contentAlign="end",this.topToolbar.addButtonBlock(ft);var Ne=new _t('',"OK");Ne.onClick=this.startRenderAndClose,ft.addButton(Ne),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ne.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var yt=new _t('',"Close");yt.onClick=this.close,ft.addButton(yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},W.prototype.addBottomToolbar=function(){var s=this;this.bottomToolbar=new Nr,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 f=new $r;f.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(f);var M=new _t('',"Rotate left");M.onClick=this.rotateLeftButtonClicked,f.addButton(M);var J=new _t('',"Rotate right");J.onClick=this.rotateRightButtonClicked,f.addButton(J);var F=new ct;F.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(F),this.straightener=new Vr("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(ft){s.rotateBy(ft),s.straightener.angle=s.rotationAngle},F.addElement(this.straightener.getUI());var he=new $r;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var Pe=new _t('',"Flip horizontal");Pe.onClick=this.flipHorizontallyButtonClicked,he.addButton(Pe);var Je=new _t('',"Flip vertical");Je.onClick=this.flipVerticallyButtonClicked,he.addButton(Je)},W.prototype.ratioButtonClicked=function(s){this.aspectRatio=s,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},W.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ei.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},W.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Hr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},W.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},W.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},W.prototype.restoreState=function(s){if(s){var f=this.cropLayer.getRescaledRect(s.width,s.height,this.imageWidth,this.imageHeight,s.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(f),this.cropRectChanged(f),this.flippedHorizontally=s.flippedHorizontally,this.flippedVertically=s.flippedVertically,this.applyFlip(),this.rotationAngle=s.rotationAngle,this.applyRotation()}},W.prototype.clientToLocalCoordinates=function(s,f){var M=this.cropImage.getBoundingClientRect();return{x:s-M.left,y:f-M.top}},W.prototype.onWindowResize=function(){this.positionUI()},W.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var s=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=s+"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()},W.prototype.rotateLeftButtonClicked=function(){var s=this.rotationAngle-90;this.rotationAngle%90!=0&&(s+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(s)},W.prototype.rotateRightButtonClicked=function(){var s=this.rotationAngle+90;this.rotationAngle%90!=0&&(s-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(s)},W.prototype.rotateTo=function(s){s=(s=s>180?s-360:s)<=-180?s+360:s,this.rotationAngle=s,this.applyRotation()},W.prototype.rotateBy=function(s){this.rotateTo((this.rotationAngle+s)%360)},W.prototype.applyRotation=function(){var s=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var f=this.editingTargetRotationContainer.transform.baseVal.getItem(0);f.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(f,0);var M=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/M.width,this.imageHeight/M.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=s},W.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},W.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},W.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},W.prototype.startRenderAndClose=function(){return It(this,void 0,void 0,function(){var s,f;return _r(this,function(M){switch(M.label){case 0:return[4,this.render()];case 1:return s=M.sent(),f=this.getState(),this.renderEventListeners.forEach(function(J){return J(s,f)}),this.close(!0),[2]}})})},W.prototype.render=function(){return It(this,void 0,void 0,function(){var s;return _r(this,function(f){switch(f.label){case 0:return(s=new fi).naturalSize=this.renderAtNaturalSize,s.imageType=this.renderImageType,s.imageQuality=this.renderImageQuality,s.width=this.renderWidth,s.height=this.renderHeight,this.unzoomFromCrop(),Et.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,s.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 f.sent(),[4,s.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,f.sent()]}})})},W.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pr("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 pr("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pr("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var s=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pr("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*s)+`px;
height: `+(this.toolbarHeight-2*s)+`px;
padding: `+s+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new pr("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pr("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new hr("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new hr("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new pr("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 pr("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new pr("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 pr("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*s)+`px;
padding: `+s+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new pr("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},W.instanceCounter=0,W}(),Ct=Z("8hTe"),pi=Z.n(Ct),mi=/]*>/g;function gi(W){var s=document.createElement("div");return s.innerHTML=W,s.childNodes.length===0?"":s.childNodes[0].nodeValue}var vi=Le.a=function(W){var s=W.value,f=s===void 0?"":s,M=W.edit,J=M===void 0?!1:M,F=W.className,he=W.showTextOnly,Pe=W.showLines,Je=W.replaces,ft=W.zoomImg,Ne=W.hasMask,yt=W.style,Bt=yt===void 0?{}:yt,Kt=W.stylesPrev,Ir=Kt===void 0?{}:Kt,gr=String(f),vr=Object(I.useRef)(),Qr=Object(I.useRef)(),Ii=Object(I.useState)(""),nr=Object(G.a)(Ii,2),Fr=nr[0],oi=nr[1],si=Object(I.useState)("office"),Mr=Object(G.a)(si,2),Mi=Mr[0],yi=Mr[1],zi=function(){var Nt=new Ge(Qr.current);Nt.displayMode="popup",Nt.addRenderEventListener(function(){var dr=Object(_.a)(O.a.mark(function Rt($t){var jt;return O.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return vr.current.style.display="none",ar.next=3,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:$t}});case 3:jt=ar.sent,jt!=null&&jt.id&&Je(Qr.current.getAttribute("src").replace(oe.a.API_SERVER,""),"/api/attachments/".concat(jt==null?void 0:jt.id,"?type=").concat(jt.content_type));case 5:case"end":return ar.stop()}},Rt)}));return function(Rt){return dr.apply(this,arguments)}}()),Nt.show()},Ki=function(){var Nt=new Mt(Qr.current);Nt.settings.displayMode="popup",Nt.addEventListener("render",function(){var dr=Object(_.a)(O.a.mark(function Rt($t){var jt;return O.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(vr.current.style.display="none",!Qr.current){ar.next=6;break}return ar.next=4,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:$t.dataUrl}});case 4:jt=ar.sent,jt!=null&&jt.id&&Je(Qr.current.getAttribute("src").replace(oe.a.API_SERVER,""),"/api/attachments/".concat(jt==null?void 0:jt.id,"?type=").concat(jt.content_type));case 6:case"end":return ar.stop()}},Rt)}));return function(Rt){return dr.apply(this,arguments)}}()),Nt.show(),window.markerArea=Nt},Yr=Object(I.useMemo)(function(){vr.current&&(vr.current.style.zIndex=-1);try{var Zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Nt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,dr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;gr=gr.replace(Zt,"("+oe.a.API_SERVER+"/api/attachments/").replace(Nt,'"'+oe.a.API_SERVER+"/api/attachments/").replace(dr,'"'+oe.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(ti){}var Rt=$(gr),$t=b();if(gr.match(/\[TOC\]/)&&(Rt=Rt.replace("[TOC]
",L()),E()),Rt=Rt.replace(/(__special_katext_id_\d+__)/g,function(ti,ar){var xr=$t[ar],Vi=xr.type,xi=xr.expression;return Object(ce.renderToString)(gi(xi)||"",{displayMode:Vi==="block",throwOnError:!1,output:"html"})}),Rt=Rt.replace(/▁/g,"\u2581\u2581\u2581"),m(),he){var jt=document.createElement("div");return jt.innerHTML=Rt,jt.innerText}return setTimeout(function(){return dn()},500),Rt},[gr]),Gr=Object(I.useRef)();v.WebkitLineClamp=Pe,Pe&&(Bt=Object(B.a)(Object(B.a)({},Bt),v));function bi(Zt){var Nt=Zt.target;if(Nt.tagName.toUpperCase()==="IMG"){if(ft){var dr=Nt.getAttribute("src");oi(dr),yi("image")}}else if(Nt.tagName.toUpperCase()==="A"){var Rt=Nt.getAttribute("href");if(Rt.indexOf("office")>-1)Zt.preventDefault(),oi(Rt),yi("office");else if(Rt.indexOf("application/pdf")>-1)Zt.preventDefault(),oi(Rt),yi("pdf");else if(Rt.indexOf("text/html")>-1)Zt.preventDefault(),oi(Rt),yi("html");else if(Rt.startsWith("#")){Zt.preventDefault();var $t=document.getElementById(Rt.replace("#",""));$t&&$t.scrollIntoView(!0)}}}var dn=function(){var Nt,dr=(Nt=Gr.current)===null||Nt===void 0?void 0:Nt.querySelectorAll("video");dr==null||dr.forEach(function(Rt){if(Rt.oncontextmenu=function(){return!1},Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(ee.a.isSupported()){var $t=new ee.a;$t.loadSource(Rt.src),$t.attachMedia(Rt)}}})};Object(I.useEffect)(function(){if(Gr.current&&Yr&&(Yr.match(mi)&&window.PR.prettyPrint()),Gr.current)return Gr.current.addEventListener("click",bi),function(){Gr.current.removeEventListener("click",bi),m(),E()}},[Yr,Gr.current,bi]);var Ei=function(Nt){if(!J)return;Nt.target.nodeName==="IMG"?(vr.current.style.zIndex=1,vr.current.style.display="flex",vr.current.style.width=Nt.target.clientWidth+"px",vr.current.style.height=Nt.target.clientHeight+"px",vr.current.style.top=Nt.target.offsetTop+"px",vr.current.style.left=Nt.target.offsetLeft+"px",Qr.current.src=Nt.target.getAttribute("src")):vr.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:Gr,style:Object(B.a)({},Bt),className:"".concat(F||""," markdown-body ").concat(pi.a.mdBody),onMouseOver:Ei,dangerouslySetInnerHTML:{__html:Yr}}),y.a.createElement("div",{ref:vr,className:pi.a.button},y.a.createElement(X.a,null,y.a.createElement(Q.a,{onClick:function(){return zi()}},"\u88C1\u526A"),y.a.createElement(Q.a,{onClick:function(){return Ki()}},"\u7F16\u8F91"))),y.a.createElement("img",{ref:Qr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),y.a.createElement(ve.a,{close:!0,data:Fr,type:Fr!=null&&Fr.length?Mi:"",style:Object(B.a)({},Ir),onClose:function(){return oi("")}}))}},"9VGf":function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return R});var ie=Z("q1tI"),X=Z.n(ie);function R(Q,B){var _=Object(ie.useRef)();Object(ie.useEffect)(function(){_.current=Q}),Object(ie.useEffect)(function(){function G(){_.current()}if(B!==null){var j=setInterval(G,B);return function(){return clearInterval(j)}}},[B])}},"9ZNV":function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return I});var ie=Z("0Owb"),X=Z("+L6B"),R=Z("2/Rp"),Q=Z("q1tI"),B=Z.n(Q),_=Z("UUDw"),G=Z.n(_),j=Z("TSYQ"),O=Z.n(j),I=function(T){var k=T.cancelText,D=k===void 0?"\u53D6\u6D88":k,w=T.okText,A=w===void 0?"\u786E\u5B9A":w,d=T.loading,o=d===void 0?!1:d,l=T.hasOkBtn,h=l===void 0?!0:l,E=T.okButtonProps,v=E===void 0?{}:E,g=T.onCancel,L=g===void 0?function(){}:g,x=T.onOk,p=x===void 0?function(){}:x,c=T.className,u=c===void 0?"":c;return B.a.createElement("div",{className:O()(G.a.buttonFixed,u)},B.a.createElement("div",{className:G.a.buttonWrap},B.a.createElement(R.a,{size:"large",className:"".concat(G.a.button," mr20"),onClick:L},D),h&&B.a.createElement(R.a,Object(ie.a)({size:"large",type:"primary",className:"".concat(G.a.button," mr20"),loading:o,onClick:p},v),A)))}},"A/g1":function(Ie,Le){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2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qrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},Bd2K:function(Ie,Le,Z){(function(ie){ie(Z("VrN/"),Z("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(O,I,y){if(y!=ie.Init&&y&&O.removeKeyMap("autoCloseTags"),!I)return;var T={name:"autoCloseTags"};(typeof I!="object"||I.whenClosing!==!1)&&(T["'/'"]=function(k){return _(k)}),(typeof I!="object"||I.whenOpening!==!1)&&(T["'>'"]=function(k){return Q(k)}),O.addKeyMap(T)});var X=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],R=["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 Q(O){if(O.getOption("disableInput"))return ie.Pass;for(var I=O.listSelections(),y=[],T=O.getOption("autoCloseTags"),k=0;kD.ch&&(l=l.slice(0,l.length-w.end+D.ch));var g=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=D.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&o.close||w.string.indexOf("/")==D.ch-w.start-1||E&&G(E,g)>-1||j(O,A.mode.xmlCurrentContext&&A.mode.xmlCurrentContext(d)||[],l,D,!0))return ie.Pass;var L=typeof T=="object"&&T.emptyTags;if(L&&G(L,l)>-1){y[k]={text:"/>",newPos:ie.Pos(D.line,D.ch+2)};continue}var x=v&&G(v,g)>-1;y[k]={indent:x,text:">"+(x?`
`:"")+""+l+">",newPos:x?ie.Pos(D.line+1,0):ie.Pos(D.line,D.ch+1)}}for(var p=typeof T=="object"&&T.dontIndentOnAutoClose,k=I.length-1;k>=0;k--){var c=y[k];O.replaceRange(c.text,I[k].head,I[k].anchor,"+insert");var u=O.listSelections().slice(0);u[k]={head:c.newPos,anchor:c.newPos},O.setSelections(u),!p&&c.indent&&(O.indentLine(c.newPos.line,null,!0),O.indentLine(c.newPos.line+1,null,!0))}}function B(O,I){for(var y=O.listSelections(),T=[],k=I?"/":"",D=O.getOption("autoCloseTags"),w=typeof D=="object"&&D.dontIndentOnSlash,A=0;A"&&(E+=">"),T[A]=E}if(O.replaceSelections(T),y=O.listSelections(),!w)for(var A=0;A=0&&I[d]==y;d--)++A;T=w.to;for(var d=1;d0){for(var I=0;I1&&arguments[1]!==void 0?arguments[1]:"",I=[],y=0;y4||((h=g.detail)===null||h===void 0?void 0:h.identity)===void 0||((E=g.detail)===null||E===void 0?void 0:E.shixun_status)===2||((v=g.detail)===null||v===void 0?void 0:v.shixun_status)===1);return O.a.createElement("aside",{className:"bg-white mb10 pl20 pr20 ".concat(w.a.wrap)},O.a.createElement(X.a,{gutter:[20,20],align:"middle"},O.a.createElement(_.a,{flex:1},O.a.createElement("span",{className:w.a.icons},O.a.createElement("img",{src:k.d,width:"14"})),O.a.createElement("span",{className:"font16"},"\u7B2C ",u==null?void 0:u.position," \u5173\uFF1A",a)),O.a.createElement(_.a,null,(u==null?void 0:u.prev_challenge)&&O.a.createElement(Q.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var H,V=u.prev_challenge.st===0?"/editcheckpoint":"/editquestion",$="/shixuns/".concat(m.id,"/challenges/").concat(u==null||((H=u.prev_challenge)===null||H===void 0)?void 0:H.id).concat(V);y.d.replace($)}},"\u4E0A\u4E00\u5173"),u.next_challenge&&O.a.createElement(Q.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var H,V=u.next_challenge.st===0?"/editcheckpoint":"/editquestion",$="/shixuns/".concat(m.id,"/challenges/").concat(u==null||((H=u.next_challenge)===null||H===void 0)?void 0:H.id).concat(V);y.d.replace($)}},"\u4E0B\u4E00\u5173"),C&&O.a.createElement(Q.a,{type:"primary"},O.a.createElement(T.a,{to:"/shixuns/".concat(m.id,"/challenges/newquestion")},"\u65B0\u589E\u9009\u62E9\u9898\u4EFB\u52A1")),C&&O.a.createElement(Q.a,{type:"primary",className:"ml5"},O.a.createElement(T.a,{to:"/shixuns/".concat(m.id,"/challenges/new")},"\u65B0\u589E\u5B9E\u8DF5\u4EFB\u52A1")),O.a.createElement(Q.a,{type:"primary",className:"ml5"},O.a.createElement(T.a,{to:"/shixuns/".concat(m.id,"/challenges")},"\u8FD4\u56DE")))))};Le.a=Object(y.a)(function(d){var o=d.shixunsDetail,l=d.newCourse,h=d.loading,E=d.globalSetting;return{shixunsDetail:o,newCourse:l,globalSetting:E,loading:h.effects}})(A)},DlQD:function(Ie,Le,Z){(function(ie,X){Ie.exports=X()})(this,function(){"use strict";function ie(ge,de){for(var fe=0;fege.length)&&(de=ge.length);for(var fe=0,te=new Array(de);fe=ge.length?{done:!0}:{done:!1,value:ge[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 fe=ge[Symbol.iterator](),fe.next.bind(fe)}function _(ge,de){return de={exports:{}},ge(de,de.exports),de.exports}var G=_(function(ge){function de(){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 fe(te){ge.exports.defaults=te}ge.exports={defaults:de(),getDefaults:de,changeDefaults:fe}}),j=G.defaults,O=G.getDefaults,I=G.changeDefaults,y=/[&<>"']/,T=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(de){return w[de]};function d(ge,de){if(de){if(y.test(ge))return ge.replace(T,A)}else if(k.test(ge))return ge.replace(D,A);return ge}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ge){return ge.replace(o,function(de,fe){return fe=fe.toLowerCase(),fe==="colon"?":":fe.charAt(0)==="#"?fe.charAt(1)==="x"?String.fromCharCode(parseInt(fe.substring(2),16)):String.fromCharCode(+fe.substring(1)):""})}var h=/(^|[^\[])\^/g;function E(ge,de){ge=ge.source||ge,de=de||"";var fe={replace:function(re,ne){return ne=ne.source||ne,ne=ne.replace(h,"$1"),ge=ge.replace(re,ne),fe},getRegex:function(){return new RegExp(ge,de)}};return fe}var v=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(ge,de,fe){if(ge){var te;try{te=decodeURIComponent(l(fe)).replace(v,"").toLowerCase()}catch(re){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}de&&!g.test(fe)&&(fe=a(de,fe));try{fe=encodeURI(fe).replace(/%25/g,"%")}catch(re){return null}return fe}var x={},p=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(ge,de){x[" "+ge]||(p.test(ge)?x[" "+ge]=ge+"/":x[" "+ge]=P(ge,"/",!0)),ge=x[" "+ge];var fe=ge.indexOf(":")===-1;return de.substring(0,2)==="//"?fe?de:ge.replace(c,"$1")+de:de.charAt(0)==="/"?fe?de:ge.replace(u,"$1")+de:ge+de}var b={exec:function(){}};function m(ge){for(var de=1,fe,te;de=0&&me[_e]==="\\";)Te=!Te;return Te?"|":" |"}),te=fe.split(/ \|/),re=0;if(te.length>de)te.splice(de);else for(;te.length=te.length?re.slice(te.length):re}).join(`
`)}var xe=function(){function ge(fe){this.options=fe||z}var de=ge.prototype;return de.space=function(te){var re=this.rules.block.newline.exec(te);if(re)return re[0].length>1?{type:"space",raw:re[0]}:{raw:`
`}},de.code=function(te,re){var ne=this.rules.block.code.exec(te);if(ne){var ue=re[re.length-1];if(ue&&ue.type==="paragraph")return{raw:ne[0],text:ne[0].trimRight()};var me=ne[0].replace(/^ {4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?me:U(me,`
`)}}},de.fences=function(te){var re=this.rules.block.fences.exec(te);if(re){var ne=re[0],ue=Me(ne,re[3]||"");return{type:"code",raw:ne,lang:re[2]?re[2].trim():re[2],text:ue}}},de.heading=function(te){var re=this.rules.block.heading.exec(te);if(re)return{type:"heading",raw:re[0],depth:re[1].length,text:re[2]}},de.nptable=function(te){var re=this.rules.block.nptable.exec(te);if(re){var ne={type:"table",header:ee(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(`
`):[],raw:re[0]};if(ne.header.length===ne.align.length){var ue=ne.align.length,me;for(me=0;me ?/gm,"");return{type:"blockquote",raw:re[0],text:ne}}},de.list=function(te){var re=this.rules.block.list.exec(te);if(re){for(var ne=re[0],ue=re[2],me=ue.length>1,Te=ue[ue.length-1]===")",_e={type:"list",raw:ne,ordered:me,start:me?+ue.slice(0,-1):"",loose:!1,items:[]},ot=re[0].match(this.rules.block.item),gt=!1,pt,Tt,St,ht,Ut,Mt,Jt,Qt=ot.length,It=0;It1||this.options.smartLists&&St!==ue)&&(ht=ot.slice(It+1).join(`
`),_e.raw=_e.raw.substring(0,_e.raw.length-ht.length),It=Qt-1)),Ut=gt||/\n\n(?!\s*$)/.test(pt),It!==Qt-1&&(gt=pt.charAt(pt.length-1)===`
`,Ut||(Ut=gt)),Ut&&(_e.loose=!0),Mt=/^\[[ xX]\] /.test(pt),Jt=void 0,Mt&&(Jt=pt[1]!==" ",pt=pt.replace(/^\[[ xX]\] +/,"")),_e.items.push({type:"list_item",raw:ne,task:Mt,checked:Jt,loose:Ut,text:pt});return _e}},de.html=function(te){var re=this.rules.block.html.exec(te);if(re)return{type:this.options.sanitize?"paragraph":"html",raw:re[0],pre:!this.options.sanitizer&&(re[1]==="pre"||re[1]==="script"||re[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):oe(re[0]):re[0]}},de.def=function(te){var re=this.rules.block.def.exec(te);if(re){re[3]&&(re[3]=re[3].substring(1,re[3].length-1));var ne=re[1].toLowerCase().replace(/\s+/g," ");return{tag:ne,raw:re[0],href:re[2],title:re[3]}}},de.table=function(te){var re=this.rules.block.table.exec(te);if(re){var ne={type:"table",header:ee(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(`
`):[]};if(ne.header.length===ne.align.length){ne.raw=re[0];var ue=ne.align.length,me;for(me=0;me/i.test(ue[0])&&(re=!1),!ne&&/^<(pre|code|kbd|script)(\s|>)/i.test(ue[0])?ne=!0:ne&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ue[0])&&(ne=!1),{type:this.options.sanitize?"text":"html",raw:ue[0],inLink:re,inRawBlock:ne,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):oe(ue[0]):ue[0]}},de.link=function(te){var re=this.rules.inline.link.exec(te);if(re){var ne=ce(re[2],"()");if(ne>-1){var ue=re[0].indexOf("!")===0?5:4,me=ue+re[1].length+ne;re[2]=re[2].substring(0,ne),re[0]=re[0].substring(0,me).trim(),re[3]=""}var Te=re[2],_e="";if(this.options.pedantic){var ot=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Te);ot?(Te=ot[1],_e=ot[3]):_e=""}else _e=re[3]?re[3].slice(1,-1):"";Te=Te.trim().replace(/^<([\s\S]*)>$/,"$1");var gt=ve(re,{href:Te&&Te.replace(this.rules.inline._escapes,"$1"),title:_e&&_e.replace(this.rules.inline._escapes,"$1")},re[0]);return gt}},de.reflink=function(te,re){var ne;if((ne=this.rules.inline.reflink.exec(te))||(ne=this.rules.inline.nolink.exec(te))){var ue=(ne[2]||ne[1]).replace(/\s+/g," ");if(ue=re[ue.toLowerCase()],!ue||!ue.href){var me=ne[0].charAt(0);return{type:"text",raw:me,text:me}}var Te=ve(ne,ue,ne[0]);return Te}},de.strong=function(te,re,ne){ne===void 0&&(ne="");var ue=this.rules.inline.strong.start.exec(te);if(ue&&(!ue[1]||ue[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){re=re.slice(-1*te.length);var me=ue[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;me.lastIndex=0;for(var Te;(ue=me.exec(re))!=null;)if(Te=this.rules.inline.strong.middle.exec(re.slice(0,ue.index+3)),Te)return{type:"strong",raw:te.slice(0,Te[0].length),text:te.slice(2,Te[0].length-2)}}},de.em=function(te,re,ne){ne===void 0&&(ne="");var ue=this.rules.inline.em.start.exec(te);if(ue&&(!ue[1]||ue[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){re=re.slice(-1*te.length);var me=ue[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;me.lastIndex=0;for(var Te;(ue=me.exec(re))!=null;)if(Te=this.rules.inline.em.middle.exec(re.slice(0,ue.index+2)),Te)return{type:"em",raw:te.slice(0,Te[0].length),text:te.slice(1,Te[0].length-1)}}},de.codespan=function(te){var re=this.rules.inline.code.exec(te);if(re){var ne=re[2].replace(/\n/g," "),ue=/[^ ]/.test(ne),me=ne.startsWith(" ")&&ne.endsWith(" ");return ue&&me&&(ne=ne.substring(1,ne.length-1)),ne=oe(ne,!0),{type:"codespan",raw:re[0],text:ne}}},de.br=function(te){var re=this.rules.inline.br.exec(te);if(re)return{type:"br",raw:re[0]}},de.del=function(te){var re=this.rules.inline.del.exec(te);if(re)return{type:"del",raw:re[0],text:re[1]}},de.autolink=function(te,re){var ne=this.rules.inline.autolink.exec(te);if(ne){var ue,me;return ne[2]==="@"?(ue=oe(this.options.mangle?re(ne[1]):ne[1]),me="mailto:"+ue):(ue=oe(ne[1]),me=ue),{type:"link",raw:ne[0],text:ue,href:me,tokens:[{type:"text",raw:ue,text:ue}]}}},de.url=function(te,re){var ne;if(ne=this.rules.inline.url.exec(te)){var ue,me;if(ne[2]==="@")ue=oe(this.options.mangle?re(ne[0]):ne[0]),me="mailto:"+ue;else{var Te;do Te=ne[0],ne[0]=this.rules.inline._backpedal.exec(ne[0])[0];while(Te!==ne[0]);ue=oe(ne[0]),ne[1]==="www."?me="http://"+ue:me=ue}return{type:"link",raw:ne[0],text:ue,href:me,tokens:[{type:"text",raw:ue,text:ue}]}}},de.inlineText=function(te,re,ne){var ue=this.rules.inline.text.exec(te);if(ue){var me;return re?me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):oe(ue[0]):ue[0]:me=oe(this.options.smartypants?ne(ue[0]):ue[0]),{type:"text",raw:ue[0],text:me}}},ge}(),Ae=$.noopTest,Ee=$.edit,Ce=$.merge,pe={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:Ae,table:Ae,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=Ee(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=Ee(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=Ee(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._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",pe._comment=//,pe.html=Ee(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=Ee(pe._paragraph).replace("hr",pe.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",pe._tag).getRegex(),pe.blockquote=Ee(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Ce({},pe),pe.gfm=Ce({},pe.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*|$)"}),pe.gfm.nptable=Ee(pe.gfm.nptable).replace("hr",pe.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",pe._tag).getRegex(),pe.gfm.table=Ee(pe.gfm.table).replace("hr",pe.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",pe._tag).getRegex(),pe.pedantic=Ce({},pe.normal,{html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._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:Ae,paragraph:Ee(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ae,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:Ae,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",se.punctuation=Ee(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=Ee(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=Ee(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=Ee(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=Ee(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=Ee(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=Ee(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=Ee(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=Ee(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=Ee(se._blockSkip,"g").getRegex(),se.overlapSkip=Ee(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._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])?)+(?![-_])/,se.autolink=Ee(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=Ee(se.tag).replace("comment",pe._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=Ee(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=Ee(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=Ee(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=Ce({},se),se.pedantic=Ce({},se.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:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=Ce({},se.normal,{escape:Ee(se.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)),de+=""+te+";";return de}var Oe=function(){function ge(fe){this.tokens=[],this.tokens.links=Object.create(null),this.options=fe||ze,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:We.normal,inline:Ke.normal};this.options.pedantic?(te.block=We.pedantic,te.inline=Ke.pedantic):this.options.gfm&&(te.block=We.gfm,this.options.breaks?te.inline=Ke.breaks:te.inline=Ke.gfm),this.tokenizer.rules=te}ge.lex=function(te,re){var ne=new ge(re);return ne.lex(te)};var de=ge.prototype;return de.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},de.blockTokens=function(te,re,ne){re===void 0&&(re=[]),ne===void 0&&(ne=!0),te=te.replace(/^ +$/gm,"");for(var ue,me,Te,_e;te;){if(ue=this.tokenizer.space(te)){te=te.substring(ue.raw.length),ue.type&&re.push(ue);continue}if(ue=this.tokenizer.code(te,re)){te=te.substring(ue.raw.length),ue.type?re.push(ue):(_e=re[re.length-1],_e.raw+=`
`+ue.raw,_e.text+=`
`+ue.text);continue}if(ue=this.tokenizer.fences(te)){te=te.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.heading(te)){te=te.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.nptable(te)){te=te.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.hr(te)){te=te.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.blockquote(te)){te=te.substring(ue.raw.length),ue.tokens=this.blockTokens(ue.text,[],ne),re.push(ue);continue}if(ue=this.tokenizer.list(te)){for(te=te.substring(ue.raw.length),Te=ue.items.length,me=0;me0)for(;(ot=this.tokenizer.rules.inline.reflinkSearch.exec(_e))!=null;)gt.includes(ot[0].slice(ot[0].lastIndexOf("[")+1,-1))&&(_e=_e.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ot=this.tokenizer.rules.inline.blockSkip.exec(_e))!=null;)_e=_e.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Te=this.tokenizer.escape(te)){te=te.substring(Te.raw.length),re.push(Te);continue}if(Te=this.tokenizer.tag(te,ne,ue)){te=te.substring(Te.raw.length),ne=Te.inLink,ue=Te.inRawBlock,re.push(Te);continue}if(Te=this.tokenizer.link(te)){te=te.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,ue)),re.push(Te);continue}if(Te=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,ue)),re.push(Te);continue}if(Te=this.tokenizer.strong(te,_e,me)){te=te.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ne,ue),re.push(Te);continue}if(Te=this.tokenizer.em(te,_e,me)){te=te.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ne,ue),re.push(Te);continue}if(Te=this.tokenizer.codespan(te)){te=te.substring(Te.raw.length),re.push(Te);continue}if(Te=this.tokenizer.br(te)){te=te.substring(Te.raw.length),re.push(Te);continue}if(Te=this.tokenizer.del(te)){te=te.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ne,ue),re.push(Te);continue}if(Te=this.tokenizer.autolink(te,Se)){te=te.substring(Te.raw.length),re.push(Te);continue}if(!ne&&(Te=this.tokenizer.url(te,Se))){te=te.substring(Te.raw.length),re.push(Te);continue}if(Te=this.tokenizer.inlineText(te,ue,Ye)){te=te.substring(Te.raw.length),me=Te.raw.slice(-1),re.push(Te);continue}if(te){var pt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(pt);break}else throw new Error(pt)}}return re},X(ge,null,[{key:"rules",get:function(){return{block:We,inline:Ke}}}]),ge}(),Ue=G.defaults,Xe=$.cleanUrl,Qe=$.escape,je=function(){function ge(fe){this.options=fe||Ue}var de=ge.prototype;return de.code=function(te,re,ne){var ue=(re||"").match(/\S*/)[0];if(this.options.highlight){var me=this.options.highlight(te,ue);me!=null&&me!==te&&(ne=!0,te=me)}return ue?''+(ne?te:Qe(te,!0))+`
`:""+(ne?te:Qe(te,!0))+`
`},de.blockquote=function(te){return`
`+te+`
`},de.html=function(te){return te},de.heading=function(te,re,ne,ue){return this.options.headerIds?"
`:""+te+"
`},de.hr=function(){return this.options.xhtml?`
`:`
`},de.list=function(te,re,ne){var ue=re?"ol":"ul",me=re&&ne!==1?' start="'+ne+'"':"";return"<"+ue+me+`>
`+te+""+ue+`>
`},de.listitem=function(te){return""+te+`
`},de.checkbox=function(te){return" "},de.paragraph=function(te){return""+te+`
`},de.table=function(te,re){return re&&(re=""+re+""),`
`},de.tablerow=function(te){return`
`+te+`
`},de.tablecell=function(te,re){var ne=re.header?"th":"td",ue=re.align?"<"+ne+' align="'+re.align+'">':"<"+ne+">";return ue+te+""+ne+`>
`},de.strong=function(te){return""+te+""},de.em=function(te){return""+te+""},de.codespan=function(te){return""+te+""},de.br=function(){return this.options.xhtml?"
":"
"},de.del=function(te){return""+te+""},de.link=function(te,re,ne){if(te=Xe(this.options.sanitize,this.options.baseUrl,te),te===null)return ne;var ue='"+ne+"",ue},de.image=function(te,re,ne){if(te=Xe(this.options.sanitize,this.options.baseUrl,te),te===null)return ne;var ue='
":">",ue},de.text=function(te){return te},ge}(),Be=function(){function ge(){}var de=ge.prototype;return de.strong=function(te){return te},de.em=function(te){return te},de.codespan=function(te){return te},de.del=function(te){return te},de.html=function(te){return te},de.text=function(te){return te},de.link=function(te,re,ne){return""+ne},de.image=function(te,re,ne){return""+ne},de.br=function(){return""},ge}(),it=function(){function ge(){this.seen={}}var de=ge.prototype;return de.slug=function(te){var re=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(re)){var ne=re;do this.seen[ne]++,re=ne+"-"+this.seen[ne];while(this.seen.hasOwnProperty(re))}return this.seen[re]=0,re},ge}(),Ze=G.defaults,qe=$.unescape,tt=function(){function ge(fe){this.options=fe||Ze,this.options.renderer=this.options.renderer||new je,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Be,this.slugger=new it}ge.parse=function(te,re){var ne=new ge(re);return ne.parse(te)};var de=ge.prototype;return de.parse=function(te,re){re===void 0&&(re=!0);var ne="",ue,me,Te,_e,ot,gt,pt,Tt,St,ht,Ut,Mt,Jt,Qt,It,_r,Kr,Et,Br=te.length;for(ue=0;ue
0&&It.tokens[0].type==="text"?(It.tokens[0].text=Et+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=Et+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:Et}):Qt+=Et),Qt+=this.parse(It.tokens,Jt),St+=this.renderer.listitem(Qt,Kr,_r);ne+=this.renderer.list(St,Ut,Mt);continue}case"html":{ne+=this.renderer.html(ht.text);continue}case"paragraph":{ne+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(St=ht.tokens?this.parseInline(ht.tokens):ht.text;ue+1
An error occurred:
"+nt(Te.message+"",!0)+"
";throw Te}}Re.options=Re.setOptions=function(ge){return dt(Re.defaults,ge),ut(Re.defaults),Re},Re.getDefaults=we,Re.defaults=at,Re.use=function(ge){var de=dt({},ge);if(ge.renderer&&function(){var te=Re.defaults.renderer||new je,re=function(me){var Te=te[me];te[me]=function(){for(var _e=arguments.length,ot=new Array(_e),gt=0;gt<_e;gt++)ot[gt]=arguments[gt];var pt=ge.renderer[me].apply(te,ot);return pt===!1&&(pt=Te.apply(te,ot)),pt}};for(var ne in ge.renderer)re(ne);de.renderer=te}(),ge.tokenizer&&function(){var te=Re.defaults.tokenizer||new xe,re=function(me){var Te=te[me];te[me]=function(){for(var _e=arguments.length,ot=new Array(_e),gt=0;gt<_e;gt++)ot[gt]=arguments[gt];var pt=ge.tokenizer[me].apply(te,ot);return pt===!1&&(pt=Te.apply(te,ot)),pt}};for(var ne in ge.tokenizer)re(ne);de.tokenizer=te}(),ge.walkTokens){var fe=Re.defaults.walkTokens;de.walkTokens=function(te){ge.walkTokens(te),fe&&fe(te)}}Re.setOptions(de)},Re.walkTokens=function(ge,de){for(var fe=B(ge),te;!(te=fe()).done;){var re=te.value;de(re);switch(re.type){case"table":{for(var ne=B(re.tokens.header),ue;!(ue=ne()).done;){var me=ue.value;Re.walkTokens(me,de)}for(var Te=B(re.tokens.cells),_e;!(_e=Te()).done;)for(var ot=_e.value,gt=B(ot),pt;!(pt=gt()).done;){var Tt=pt.value;Re.walkTokens(Tt,de)}break}case"list":{Re.walkTokens(re.items,de);break}default:re.tokens&&Re.walkTokens(re.tokens,de)}}},Re.Parser=tt,Re.parser=tt.parse,Re.Renderer=je,Re.TextRenderer=Be,Re.Lexer=Oe,Re.lexer=Oe.lex,Re.Tokenizer=xe,Re.Slugger=it,Re.parse=Re;var He=Re;return He})},E3HF:function(Ie,Le,Z){Ie.exports={flex_box_center:"flex_box_center___9yD0l",flex_space_between:"flex_space_between___12_t1",flex_box_vertical_center:"flex_box_vertical_center____RzXy",flex_box_center_end:"flex_box_center_end___w5V55",flex_box_column:"flex_box_column___1O69H",bg:"bg___1SAB4",flexRow:"flexRow___TGonw",flexJustifyCenter:"flexJustifyCenter___FdZYv",flexAlignEnd:"flexAlignEnd___2MQGW",flexAlingCenter:"flexAlingCenter___HR4pS",flexAlignCenter:"flexAlignCenter___2tpRP",flexColumn:"flexColumn___2x5QM",formWrap:"formWrap___3nPVX",titleWrap:"titleWrap___2I_px",fieldWrap:"fieldWrap___q51w8",mdWrap:"mdWrap___1_3Z7",backgroundFa:"backgroundFa___3eVc8",button:"button___BK_yA",icons:"icons___FzVfz",navBar:"navBar___3G5De",active:"active___15cJu",tipWrap:"tipWrap___20yI4",tip:"tip___2Y6MS",width300:"width300___-1o3l",popover:"popover___2-F6L",groupWrap:"groupWrap___2_3AK"}},E7E6:function(Ie,Le){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6R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QSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(Ie,Le,Z){(function(ie){ie(Z("VrN/"))})(function(ie){var X={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},R=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(w,A,d){d&&d!=ie.Init&&(w.removeKeyMap(B),w.state.closeBrackets=null),A&&(_(Q(A,"pairs")),w.state.closeBrackets=A,w.addKeyMap(B))});function Q(w,A){return A=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[A]!=null?w[A]:X[A]}var B={Backspace:O,Enter:I};function _(w){for(var A=0;A=0;l--){var E=o[l].head;w.replaceRange("",R(E.line,E.ch-1),R(E.line,E.ch+1),"+delete")}}function I(w){var A=j(w),d=A&&Q(A,"explode");if(!d||w.getOption("disableInput"))return ie.Pass;for(var o=w.listSelections(),l=0;l0;return{anchor:new R(w.anchor.line,w.anchor.ch+(A?-1:1)),head:new R(w.head.line,w.head.ch+(A?1:-1))}}function T(w,A){var d=j(w);if(!d||w.getOption("disableInput"))return ie.Pass;var o=Q(d,"pairs"),l=o.indexOf(A);if(l==-1)return ie.Pass;for(var h=Q(d,"closeBefore"),E=Q(d,"triples"),v=o.charAt(l+1)==A,g=w.listSelections(),L=l%2==0,x,p=0;p=0&&w.getRange(u,R(u.line,u.ch+3))==A+A+A?a="skipThree":a="skip";else if(v&&u.ch>1&&E.indexOf(A)>=0&&w.getRange(R(u.line,u.ch-2),u)==A+A){if(u.ch>2&&/\bstring/.test(w.getTokenTypeAt(R(u.line,u.ch-2))))return ie.Pass;a="addFour"}else if(v){var m=u.ch==0?" ":w.getRange(R(u.line,u.ch-1),u);if(!ie.isWordChar(b)&&m!=A&&!ie.isWordChar(m))a="both";else return ie.Pass}else if(L&&(b.length===0||/\s/.test(b)||h.indexOf(b)>-1))a="both";else return ie.Pass;if(!x)x=a;else if(x!=a)return ie.Pass}var C=l%2?o.charAt(l-1):A,P=l%2?A:o.charAt(l+1);w.operation(function(){if(x=="skip")w.execCommand("goCharRight");else if(x=="skipThree")for(var H=0;H<3;H++)w.execCommand("goCharRight");else if(x=="surround"){for(var V=w.getSelections(),H=0;H1&&arguments[1]!==void 0?arguments[1]:1,fe=Be.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(U).map(function(oe,ce){if(!B.isValidElement(oe)||!oe.type)return null;var ve=oe.type.isSelectOptGroup,Me=oe.key,xe=oe.props,Ae=xe.children,Ee=Object(G.a)(xe,["children"]);return ee||!ve?x(oe):Object(g.a)(Object(g.a)({key:"__RC_SELECT_GRP__".concat(Me===null?ce:Me,"__"),label:Me},Ee),{},{options:p(Ae)})}).filter(function(oe){return oe})}var c=Z("2Qr1"),u=Z("qNPg"),a=Z("U8pU"),b=Z("Kwbf"),m=Z("WKfj");function C(U){var ee=U.mode,oe=U.options,ce=U.children,ve=U.backfill,Me=U.allowClear,xe=U.placeholder,Ae=U.getInputElement,Ee=U.showSearch,Ce=U.onSearch,pe=U.defaultOpen,se=U.autoFocus,De=U.labelInValue,ze=U.value,We=U.inputValue,Ke=U.optionLabelProp,Ye=ee==="multiple"||ee==="tags",Se=Ee!==void 0?Ee:Ye||ee==="combobox",Oe=oe||p(ce);if(Object(b.a)(ee!=="tags"||Oe.every(function(je){return!je.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ee==="tags"||ee==="combobox"){var Ue=Oe.some(function(je){return je.options?je.options.some(function(Be){return typeof("value"in Be?Be.value:Be.key)=="number"}):typeof("value"in je?je.value:je.key)=="number"});Object(b.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)(ee!=="combobox"||!Ke,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)(ee==="combobox"||!ve,"`backfill` only works with `combobox` mode."),Object(b.a)(ee==="combobox"||!Ae,"`getInputElement` only work with `combobox` mode."),Object(b.b)(ee!=="combobox"||!Ae||!Me||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ce&&!Se&&ee!=="combobox"&&ee!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!pe||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ze!=null){var Xe=Object(m.d)(ze);Object(b.a)(!De||Xe.every(function(je){return Object(a.a)(je)==="object"&&("key"in je||"value"in je)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!Ye||Array.isArray(ze),"`value` should be array when `mode` is `multiple` or `tags`")}if(ce){var Qe=null;Object(L.a)(ce).some(function(je){if(!B.isValidElement(je)||!je.type)return!1;var Be=je.type;if(Be.isSelectOption)return!1;if(Be.isSelectOptGroup){var it=Object(L.a)(je.props.children).every(function(Ze){return!B.isValidElement(Ze)||!je.type||Ze.type.isSelectOption?!0:(Qe=Ze.type,!1)});return!it}return Qe=Be,!0}),Qe&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Qe.displayName||Qe.name||Qe,"`.")),Object(b.a)(We===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=C,H=Object(u.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:p,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:P,fillOptionsWithMissingValue:c.a}),V=function(U){Object(R.a)(oe,U);var ee=Object(Q.a)(oe);function oe(){var ce;return Object(ie.a)(this,oe),ce=ee.apply(this,arguments),ce.selectRef=B.createRef(),ce.focus=function(){ce.selectRef.current.focus()},ce.blur=function(){ce.selectRef.current.blur()},ce}return Object(X.a)(oe,[{key:"render",value:function(){return B.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),oe}(B.Component);V.Option=h,V.OptGroup=v;var $=V,z=Le.c=$},M8RZ:function(Ie,Le,Z){"use strict";Z.d(Le,"a",function(){return O});var ie=Z("fWQN"),X=Z("mtLc"),R=Z("yKVA"),Q=Z("879j"),B=Z("q1tI"),_=Z.n(B),G=Z("i8i4"),j=Z.n(G),O=function(I){Object(R.a)(T,I);var y=Object(Q.a)(T);function T(k){var D;Object(ie.a)(this,T),D=y.call(this,k);var w=window.document;return D.node=w.createElement("div"),w.body.appendChild(D.node),D}return Object(X.a)(T,[{key:"render",value:function(){var D=this.props.children;return Object(G.createPortal)(D,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),T}(_.a.Component)},Nmxd:function(Ie,Le){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IA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UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},OLES:function(Ie,Le,Z){"use strict";var ie=Z("U8pU"),X=Z("VTBJ"),R=Z("Ff2n"),Q=Z("q1tI"),B=Z("uciX"),_=Z("7ixt"),G=function(k){var D=k.overlay,w=k.prefixCls,A=k.id,d=k.overlayInnerStyle;return Q.createElement("div",{className:"".concat(w,"-inner"),id:A,role:"tooltip",style:d},typeof D=="function"?D():D)},j=G,O=function(k,D){var w=k.overlayClassName,A=k.trigger,d=A===void 0?["hover"]:A,o=k.mouseEnterDelay,l=o===void 0?0:o,h=k.mouseLeaveDelay,E=h===void 0?.1:h,v=k.overlayStyle,g=k.prefixCls,L=g===void 0?"rc-tooltip":g,x=k.children,p=k.onVisibleChange,c=k.afterVisibleChange,u=k.transitionName,a=k.animation,b=k.placement,m=b===void 0?"right":b,C=k.align,P=C===void 0?{}:C,H=k.destroyTooltipOnHide,V=H===void 0?!1:H,$=k.defaultVisible,z=k.getTooltipContainer,U=k.overlayInnerStyle,ee=Object(R.a)(k,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),oe=Object(Q.useRef)(null);Object(Q.useImperativeHandle)(D,function(){return oe.current});var ce=Object(X.a)({},ee);"visible"in k&&(ce.popupVisible=k.visible);var ve=function(){var Ce=k.arrowContent,pe=Ce===void 0?null:Ce,se=k.overlay,De=k.id;return[Q.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},pe),Q.createElement(j,{key:"content",prefixCls:L,id:De,overlay:se,overlayInnerStyle:U})]},Me=!1,xe=!1;if(typeof V=="boolean")Me=V;else if(V&&Object(ie.a)(V)==="object"){var Ae=V.keepParent;Me=Ae===!0,xe=Ae===!1}return Q.createElement(B.a,Object.assign({popupClassName:w,prefixCls:L,popup:ve,action:d,builtinPlacements:_.a,popupPlacement:m,ref:oe,popupAlign:P,getPopupContainer:z,onPopupVisibleChange:p,afterPopupVisibleChange:c,popupTransitionName:u,popupAnimation:a,defaultPopupVisible:$,destroyPopupOnHide:Me,autoDestroy:xe,mouseLeaveDelay:E,popupStyle:v,mouseEnterDelay:l},ce),x)},I=Object(Q.forwardRef)(O),y=Le.a=I},Ohmc:function(Ie,Le,Z){Ie.exports=Z.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Ie,Le,Z){"use strict";var ie=Z("2qtc"),X=Z("kLXV"),R=Z("rAM+"),Q=Z("miYZ"),B=Z("tsqr"),_=Z("9og8"),G=Z("tJVT"),j=Z("jrin"),O=Z("WmNS"),I=Z.n(O),y=Z("q1tI"),T=Z.n(y),k=Z("VrN/"),D=Z.n(k),w=Z("bdgK"),A=Z("p77/"),d=Z("Bd2K"),o=Z("ELLl"),l=Z("19Vz"),h=Z("lZu9"),E=Z("+NIl"),v=Z("kSUc"),g=Z("9Bee"),L=function(me){var Te=me.value,_e=Te===void 0?"":Te,ot=me.className,gt=me.showTextOnly,pt=me.showLines,Tt=me.style,St=Tt===void 0?{}:Tt,ht=Object(y.useMemo)(function(){return""},[_e]);return T.a.createElement(T.a.Fragment,null,T.a.createElement("div",{dangerouslySetInnerHTML:{__html:ht}}))},x=Z("0Owb"),p=Z("dejd"),c=Z("C+DQ"),u=Z("1vsH"),a=Z("m3rI"),b=[{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 m(me){var Te=me.onActionCallback,_e=me.title,ot=me.icon,gt=me.actionName,pt=me.className,Tt=pt===void 0?"":pt,St=me.children;function ht(){Te(gt)}return T.a.createElement("a",{title:_e,className:Tt,onClick:ht},T.a.createElement("i",{className:"md-iconfont ".concat(ot)}),St)}var C=function(me){var Te=me.watch,_e=me.showNullButton,ot=me.onActionCallback,gt=me.fullScreen,pt=me.insertTemp,Tt=me.hidetoolBar,St=me.uuid,ht=me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(u.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(u.F)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var Ut=[].concat(b,[{title:"".concat(Te?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Te?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return T.a.createElement("ul",{className:"markdown-toolbar-container"},!Tt&&Ut.map(function(Mt,Jt){return T.a.createElement("li",{key:Jt},Mt.actionName?T.a.createElement(m,Object(x.a)({},Mt,{onActionCallback:ot})):T.a.createElement("span",{className:"v-line"}))}),_e?T.a.createElement("li",null,T.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ot},T.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,pt&&T.a.createElement("li",null,T.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(pt),onActionCallback:ot},T.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),T.a.createElement("li",{className:"btn-full-screen"},T.a.createElement(m,{icon:"".concat(gt?"icon-shrink":"icon-enlarge"),title:gt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ot})))},P=Z("M8RZ"),H=Z("+L6B"),V=Z("2/Rp"),$=Z("y8nQ"),z=Z("Vl3Y"),U=Z("5NDa"),ee=Z("5rEg"),oe={labelCol:{span:4},wrapperCol:{span:20}},ce=function(me){var Te=me.callback,_e=me.onCancel;function ot(gt){Te(gt)}return T.a.createElement(z.a,Object(x.a)({},oe,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ot}),T.a.createElement(z.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},T.a.createElement(ee.a,null)),T.a.createElement(z.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},T.a.createElement(ee.a,null)),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(V.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))},ve=Z("7ahc"),Me=Z("HmJG"),xe=Z("BjJ7"),Ae=z.a.useForm,Ee={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}},pe=function(me){var Te=me.callback,_e=me.onCancel,ot=Ae(),gt=Object(G.a)(ot,1),pt=gt[0];function Tt(Ut){Te(Ut)}function St(Ut,Mt){if(Ut.status===-1){B.b.error(Ut.message);return}pt.setFieldsValue({src:"/api/attachments/".concat(Ut.id),type:Mt.type})}function ht(Ut){var Mt=Ut.target.files[0];De(Mt,St)}return T.a.createElement(z.a,Object(x.a)({form:pt},Ce,{className:"upload-image-panel",onFinish:Tt}),T.a.createElement(z.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},T.a.createElement("div",{className:"flex-container"},T.a.createElement(z.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},T.a.createElement(ee.a,{style:Ee})),T.a.createElement(se,{onFileChange:ht}))),T.a.createElement(z.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},T.a.createElement(ee.a,{style:{width:264}})),T.a.createElement(z.a.Item,{style:{textAlign:"right"}},T.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(V.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))};function se(me){var Te=me.onFileChange;return T.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",T.a.createElement("input",{type:"file",onChange:Te}))}function De(me,Te){if(!me)throw new String("\u6CA1\u6709\u6587\u4EF6");var _e=new FormData;_e.append("editormd-image-file",me),_e.append("file_param_name","editormd-image-file"),_e.append("byxhr","true");var ot=new window.XMLHttpRequest;ot.withCredentials=!0,ot.addEventListener("load",function(gt){Te(JSON.parse(gt.target.responseText),me)},!1),ot.addEventListener("error",function(gt){console.error(gt)},!1),ot.open("POST","".concat(xe.a,"/api/attachments.json")),ot.send(_e)}var ze=Z("giR+"),We=Z("fyUT"),Ke=Z("7Kak"),Ye=Z("9yH6"),Se=Ye.a.Group,Oe={margin:"0 8px"},Ue=function(me){var Te=me.callback,_e=me.onCancel;function ot(gt){Te(gt)}return T.a.createElement(z.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ot},T.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},T.a.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),T.a.createElement("span",{style:Oe},"\u884C\u6570"),T.a.createElement(z.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},T.a.createElement(We.a,null)),T.a.createElement("span",{style:Oe},"\u5217\u6570"),T.a.createElement(z.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},T.a.createElement(We.a,null))),T.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},T.a.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),T.a.createElement(z.a.Item,{name:"align"},T.a.createElement(Se,null,T.a.createElement(Ye.a,{value:"default"},T.a.createElement("i",{className:"fa fa-align-justify"})),T.a.createElement(Ye.a,{value:"left"},T.a.createElement("i",{className:"fa fa-align-left"})),T.a.createElement(Ye.a,{value:"center"},T.a.createElement("i",{className:"fa fa-align-center"})),T.a.createElement(Ye.a,{value:"right"},T.a.createElement("i",{className:"fa fa-align-right"}))))),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(V.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))},Xe=Z("ErOA"),Qe=Z("7Cbv"),je="link",Be="upload-image",it="code-block",Ze="add-table",qe="------------",tt={default:qe,left:":".concat(qe),center:":".concat(qe,":"),right:"".concat(qe,":")},dt=Z("9VGf"),rt,nt;function we(){}var ut=0,at=1e4,Re="\u2581",He=`
**\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 ge(me){return/^\d+$/.test(me)?"".concat(me,"px"):me}var de=navigator.platform.toUpperCase().indexOf("MAC")>=0,fe=de?"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"],re=(rt={},Object(j.a)(rt,fe+"-B","bold"),Object(j.a)(rt,fe+"-I","italic"),rt),ne=(nt={},Object(j.a)(nt,je,"\u6DFB\u52A0\u94FE\u63A5"),Object(j.a)(nt,it,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(j.a)(nt,Be,"\u6DFB\u52A0\u6587\u4EF6"),Object(j.a)(nt,Ze,"\u6DFB\u52A0\u8868\u683C"),nt),ue=Le.a=function(me){var Te=me.defaultValue,_e=Te===void 0?"":Te,ot=me.onChange,gt=me.width,pt=gt===void 0?"100%":gt,Tt=me.height,St=Tt===void 0?400:Tt,ht=me.miniToolbar,Ut=ht===void 0?!1:ht,Mt=me.isFocus,Jt=Mt===void 0?!1:Mt,Qt=me.watch,It=me.insertTemp,_r=me.mode,Kr=_r===void 0?"markdown":_r,Et=me.id,Br=Et===void 0?"markdown-editor-id":Et,hr=me.showResizeBar,pr=hr===void 0?!1:hr,Nr=me.noStorage,ci=Nr===void 0?!1:Nr,$r=me.showNullButton,_t=$r===void 0?!1:$r,ct=me.hidetoolBar,Hr=ct===void 0?!1:ct,ei=me.fullScreen,mr=ei===void 0?!1:ei,Lt=me.onBlur,Ur=me.onCMBeforeChange,Vr=me.onFullScreen,fi=me.className,Ge=fi===void 0?"":fi,Ct=me.disablePaste,pi=Ct===void 0?!1:Ct,mi=me.placeholder,gi=mi===void 0?"":mi,vi=me.values,W=vi===void 0?"":vi,s=Object(y.useState)(null),f=Object(G.a)(s,2),M=f[0],J=f[1],F=Object(y.useState)(_e),he=Object(G.a)(F,2),Pe=he[0],Je=he[1],ft=Object(y.useState)(Qt),Ne=Object(G.a)(ft,2),yt=Ne[0],Bt=Ne[1],Kt=Object(y.useState)(mr),Ir=Object(G.a)(Kt,2),gr=Ir[0],vr=Ir[1],Qr=Object(y.useState)(""),Ii=Object(G.a)(Qr,2),nr=Ii[0],Fr=Ii[1],oi=Object(y.useState)(0),si=Object(G.a)(oi,2),Mr=si[0],Mi=si[1],yi=Object(y.useState)(St),zi=Object(G.a)(yi,2),Ki=zi[0],Yr=zi[1],Gr=Object(y.useState)(!1),bi=Object(G.a)(Gr,2),dn=bi[0],Ei=bi[1],Zt=Object(y.useRef)(Object(Qe.a)()),Nt=Object(y.useRef)(!1),dr=Object(y.useRef)(),Rt=Object(y.useRef)(),$t=Object(y.useRef)(),jt=Object(y.useRef)(),ti=Object(y.useRef)(),ar=function(){var mt=Object(_.a)(I.a.mark(function At(){var bt,Dt;return I.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.next=2,Object(Xe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Zt.current}});case 2:Dt=Gt.sent,Dt!=null&&(bt=Dt.attachments)!==null&&bt!==void 0&&bt.length&&(console.log("cm:",M,Rt),Dt.attachments.map(function(Ot){Ot.content_type.indexOf("image")>-1?M.replaceSelection(".concat(Ot.content_type,")")):Ot.content_type.indexOf("video")>-1?M.replaceSelection('')):Ot.content_type.indexOf("pdf")>-1?M.replaceSelection('').concat(Ot.name,"")):M.replaceSelection("[".concat(Ot.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,"?type=").concat(Ot.content_type,")"))}));case 4:case"end":return Gt.stop()}},At)}));return function(){return mt.apply(this,arguments)}}();Object(y.useEffect)(function(){Je(W),M==null||M.setValue(W)},[W]),Object(y.useEffect)(function(){Vr==null||Vr(gr)},[gr]),Object(y.useEffect)(function(){if(Rt.current){var mt=D.a.fromTextArea(Rt.current,{mode:Kr,lineNumbers:!Ut,lineWrapping:!0,value:_e,autoCloseTags:!0,autoCloseBrackets:!0});Jt&&mt.focus();function At(bt,Dt){if(pi){Dt.preventDefault();return}var Pt=Dt.clipboardData;if(Pt){var Gt=Pt.types.toString(),Ot=Pt.items;if(Gt==="Files"||Pt.types.indexOf("Files")>-1){if(Dt.preventDefault(),Kr=="stex")return;try{var rr,Ar=Ot[1];((rr=Ot[0])===null||rr===void 0?void 0:rr.kind)==="file"&&(Ar=Ot[0]);var kt=Ar.getAsFile(),li=kt.name.split(".").pop();De(kt,function(Ft){if(Ft.id){var Tr,yr,zr;(kt==null||((Tr=kt.type)===null||Tr===void 0)?void 0:Tr.indexOf("image"))>-1?mt.replaceSelection(".concat(Ft.content_type,")")):(kt==null||((yr=kt.type)===null||yr===void 0)?void 0:yr.indexOf("video"))>-1?mt.replaceSelection('')):(kt==null||((zr=kt.type)===null||zr===void 0)?void 0:zr.indexOf("pdf"))>-1?mt.replaceSelection('').concat(kt.name,"")):te.includes(li)?mt.replaceSelection('').concat(kt.name,"")):mt.replaceSelection("[".concat(kt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ft.id,"?type=").concat(Ft.content_type,")"))}else(Ft==null?void 0:Ft.status)===401&&(document.location.href="/user/login")})}catch(Ft){B.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return mt.on("paste",At),mt.on("dragleave",function(bt,Dt){$t.current.classList.remove("mouse-hover-md")}),mt.on("dragover",function(bt,Dt){$t.current.classList.add("mouse-hover-md")}),mt.on("drop",function(bt,Dt){$t.current.classList.add("mouse-hover-md");var Pt;if(Pt=Dt.dataTransfer.files,Pt.length>0){Dt.preventDefault(),Dt.stopPropagation();for(var Gt=function(Ar){var kt=Pt[Ar],li=kt.name.split(".").pop();De(kt,function(Ft){if(Ft.id){var Tr,yr,zr;(kt==null||((Tr=kt.type)===null||Tr===void 0)?void 0:Tr.indexOf("image"))>-1?mt.replaceSelection(".concat(Ft.content_type,")")):(kt==null||((yr=kt.type)===null||yr===void 0)?void 0:yr.indexOf("video"))>-1?mt.replaceSelection('')):(kt==null||((zr=kt.type)===null||zr===void 0)?void 0:zr.indexOf("pdf"))>-1?mt.replaceSelection('').concat(kt.name,"")):te.includes(li)?mt.replaceSelection('').concat(kt.name,"")):mt.replaceSelection("[".concat(kt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ft.id,"?type=").concat(Ft.content_type,")"))}else(Ft==null?void 0:Ft.status)===401&&(document.location.href="/user/login")})},Ot=0;Ot0||Ot.target.offsetWidth>0)&&(xr(),M.setSize("100%","100%"),M.refresh())}}catch(rr){Pt.e(rr)}finally{Pt.f()}});return bt.observe(Rt.current.parentElement),bt}if(M){var At=mt();return function(){At.unobserve(Rt.current.parentElement)}}},[M,xr]),Object(y.useEffect)(function(){if(M){for(var mt=[],At=function(){var Ot=Dt[bt];Pt=Object(G.a)(Ot,2);var rr=Pt[0],Ar=Pt[1],kt=Object(j.a)({},rr,function(){Vi(Ar)});mt.push(kt),M.addKeyMap(kt)},bt=0,Dt=Object.entries(re);bt0){var mt=new Date().getTime(),At=window.sessionStorage.getItem(Br);mt>=Mr+at&&(!At||At!==Pe)&&(window.sessionStorage.setItem(Br,Pe),Ei(!0))}},at),Object(y.useEffect)(function(){Bt(Qt)},[M,Qt]),Object(y.useEffect)(function(){M&&(Jt&&M.focus())},[M,Jt]),Object(y.useEffect)(function(){if(yt&&M){var mt=M.getScrollerElement();function At(bt){var Dt=bt.target;if(ti.current){var Pt=Dt.scrollTop/Dt.scrollHeight;ti.current.scrollTop=ti.current.scrollHeight*Pt}}return mt.addEventListener("scroll",At),function(){mt.removeEventListener("scroll",At)}}},[M,yt]),Object(y.useEffect)(function(){if(M&&Ur){function mt(At,bt){Ur(At,bt)}return M.on("beforeChange",mt),function(){M.off("beforeChange",mt)}}},[M,Ur]),Object(y.useEffect)(function(){if(M&&Lt){function mt(){Lt(M.getValue())}return M.on("blur",mt),function(){M.off("blur",mt)}}},[M,Lt]),Object(y.useEffect)(function(){if(M){function mt(At){var bt=At.getValue();Je(bt),Mi(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ot&&ot(bt)}return M.on("change",mt),function(){M.off("change",mt)}}},[M,ot]),Object(y.useEffect)(function(){M&&(_e==null?(M.setValue(""),Je("")):_e!==M.getValue()&&(M.setValue(_e),Je(_e),M.setCursor(M.lineCount(),0)))},[M,_e]);var Vi=Object(y.useCallback)(function(mt){var At=M.getCursor(),bt=M.getSelection(),Dt=bt.split(`
`);switch(mt){case"bold":return M.replaceSelection("**"+bt+"**"),bt===""&&M.setCursor(At.line,At.ch+2),M.focus();case"italic":return M.replaceSelection("*"+bt+"*"),bt===""&&M.setCursor(At.line,At.ch+1),M.focus();case"code":return M.replaceSelection("`"+bt+"`"),bt===""&&M.setCursor(At.line,At.ch+1),M.focus();case"inline-latex":return M.replaceSelection("`$$"+bt+"$$`"),bt===""&&M.setCursor(At.line,At.ch+3),M.focus();case"latex":return M.replaceSelection("```latex\n"+bt+"\n```"),M.setCursor(At.line+1,bt.length+1),M.focus();case"line-break":return M.replaceSelection(`
`),M.focus();case"list-ul":return bt===""?M.replaceSelection("- "+bt):M.replaceSelection(Dt.map(function(Pt){return Pt===""?"":"- ".concat(Pt)}).join(`
`)),M.focus();case"list-ol":return bt===""?M.replaceSelection("1. "+bt):M.replaceSelection(Dt.map(function(Pt,Gt){return Pt===""?"":"".concat(Gt+1,". ").concat(Pt)}).join(`
`)),M.focus();case"add-null-ch":return bt===""&&M.setCursor(At.line,At.ch+1),M.replaceSelection(Re),M.focus();case"inster-template-1":return bt===""&&M.setCursor(At.line,At.ch),M.replaceSelection(He),M.focus();case"eraser":return M.setValue(""),M.focus();case"trigger-watch":return Bt(!yt),M.focus();case"trigger-full-screen":return vr(!gr),M.focus();case je:Fr(je);return;case it:Fr(it);return;case Be:Fr(Be);return;case Ze:Fr(Ze);return;default:throw new Error}},[M,yt,gr]),xi=Object(y.useCallback)(function(mt){Fr("");switch(nr){case je:var At=mt.title,bt=mt.link;return M.replaceSelection("[".concat(At,"](").concat(bt,")")),M.focus();case it:var Dt=mt.language,Pt=mt.content;return M.replaceSelection(["```"+Dt,Pt,"```"].join(`
`)),M.focus();case Be:var Gt=mt.src,Ot=mt.alt;return Ot?M.replaceSelection(".concat(Gt,' "').concat(Ot,'" )')):M.replaceSelection("")),M.focus();case Ze:for(var rr=mt.row,Ar=mt.col,kt=mt.align,li=`
`,Ft=0;Ft300&&(rr=300);var Ar=St+rr+"px";Yr(Ar)}}return mt.addEventListener("mousedown",Dt),document.addEventListener("mousemove",Gt),document.addEventListener("mouseup",Pt),function(){mt.removeEventListener("mousedown",Dt),document.removeEventListener("mousemove",Gt),document.removeEventListener("mouseup",Pt)}}},[M,jt]),Object(y.useEffect)(function(){Yr(St)},[St]);var ri=ge(pt),fn=ge(Ki),Xr={width:ri,height:fn},pn=Object(y.useMemo)(function(){if(Mr){var mt=new Date(Mr),At=mt.getHours(),bt=mt.getMinutes(),Dt=mt.getSeconds();return At=At<10?"0"+At:At,bt=bt<10?"0"+bt:bt,Dt=Dt<10?"0"+Dt:Dt,"".concat(At,":").concat(bt,":").concat(Dt)}return 0},[Mr]);function Wn(){window.sessionStorage.removeItem(Br),Ei(!1),Mi(0)}function Oi(){Ei(!1),Mi(0),M.setValue(window.sessionStorage.getItem(Br))}function ua(mt,At){var bt=M.getValue();bt=bt.replace(mt,At),Je(bt),M==null||M.setValue(bt)}return T.a.createElement(y.Fragment,null,T.a.createElement("div",{className:"markdown-editor-wrapper",ref:$t},T.a.createElement("div",{className:"markdown-editor-container ".concat(Ge," ").concat(yt?"on-preview":""," ").concat(Ut?"mini":""," ").concat(gr?"full-screen":""),style:Xr},T.a.createElement(C,{insertTemp:It,watch:yt,fullScreen:gr,showNullButton:_t,onActionCallback:Vi,hidetoolBar:Hr,uuid:Zt.current,setOpenPhones:function(){Nt.current=!0}}),T.a.createElement("div",{className:"markdown-editor-body"},T.a.createElement("div",{className:"codemirror-container"},T.a.createElement("textarea",{ref:Rt,placeholder:gi})),yt?T.a.createElement("div",{ref:ti,className:"preview-container"},Kr==="stex"&&T.a.createElement(L,{value:Pe}),Kr!=="stex"&&T.a.createElement(g.a,{edit:!0,value:Pe,replaces:ua})):null))),pr?T.a.createElement("a",{ref:jt,className:"editor-resize"}):null,T.a.createElement(P.a,null,ne[nr]?T.a.createElement(X.a,{centered:!0,title:ne[nr],visible:!0,onCancel:Ci,footer:null,className:"markdown-popup-form"},cn):null))}},RMFE:function(Ie,Le){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAF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kD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(Ie,Le){/**
* @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 Z,ie,X,R=!1,Q,B;window.PR_SHOULD_USE_CONTINUATION=!0;var _,G;(function(){var j=window,O=["break,continue,do,else,for,if,return,while"],I=[O,"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"],y=[I,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],T=[y,"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"],k=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],D=[y,"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",A=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="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=[O,"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=[O,"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"],h=[O,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[T,D,k,A,d,o,l,h],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,g="str",L="kwd",x="com",p="typ",c="lit",u="pun",a="pln",b="tag",m="dec",C="src",P="atn",H="atv",V="nocode",$="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function z(Se){for(var Oe=0,Ue=!1,Xe=!1,Qe=0,je=Se.length;Qe122||(te<65||fe>90||ut.push([Math.max(65,fe)|32,Math.min(te,90)|32]),te<97||fe>122||ut.push([Math.max(97,fe)&~32,Math.min(te,122)&~32]))}}ut.sort(function(me,Te){return me[0]-Te[0]||Te[1]-me[1]});for(var re=[],ne=[],He=0;Heue[0]&&(ue[1]+1>ue[0]&&Re.push("-"),Re.push(qe(ue[1])))}return Re.push("]"),Re.join("")}function dt(nt){for(var we=nt.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")),ut=we.length,at=[],Re=0,He=0;Re=2&&fe==="["?we[Re]=tt(ge):fe!=="\\"&&(we[Re]=ge.replace(/[a-zA-Z]/g,function(ne){var ue=ne.charCodeAt(0);return"["+String.fromCharCode(ue&~32,ue|32)+"]"}))}return we.join("")}for(var rt=[],Qe=0,je=Se.length;Qe=0;)Ue[rt.charAt(nt)]=dt;var we=dt[1],ut=""+we;Ze.hasOwnProperty(ut)||(it.push(we),Ze[ut]=null)}it.push(/[\0-\uffff]/),Xe=z(it)})();var Qe=Oe.length,je=function(Be){for(var it=Be.sourceCode,Ze=Be.basePos,qe=Be.sourceNode,tt=[Ze,a],dt=0,rt=it.match(Xe)||[],nt={},we=0,ut=rt.length;we=5&&Re.substring(0,5)==="lang-",ge&&!(He&&typeof He[1]=="string")&&(ge=!1,Re=C),ge||(nt[at]=Re)}var te=dt;if(dt+=at.length,!ge)tt.push(Ze+te,Re);else{var re=He[1],ne=at.indexOf(re),ue=ne+re.length;He[2]&&(ue=at.length-He[2].length,ne=ue-re.length);var me=Re.substring(5);ee(qe,Ze+te,at.substring(0,ne),je,tt),ee(qe,Ze+te+ne,re,se(me,re),tt),ee(qe,Ze+te+ue,at.substring(ue),je,tt)}}Be.decorations=tt};return je}function Me(Se){var Oe=[],Ue=[];Se.tripleQuotedStrings?Oe.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Se.multiLineStrings?Oe.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Oe.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Se.verbatimStrings&&Ue.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Xe=Se.hashComments;Xe&&(Se.cStyleComments?(Xe>1?Oe.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Oe.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Oe.push([x,/^#[^\r\n]*/,null,"#"])),Se.cStyleComments&&(Ue.push([x,/^\/\/[^\r\n]*/,null]),Ue.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Qe=Se.regexLiterals;if(Qe){var je=Qe>1?"":`
\r`,Be=je?".":"[\\S\\s]",it="/(?=[^/*"+je+"])(?:[^/\\x5B\\x5C"+je+"]|\\x5C"+Be+"|\\x5B(?:[^\\x5C\\x5D"+je+"]|\\x5C"+Be+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+$+"("+it+")")])}var Ze=Se.types;Ze&&Ue.push([p,Ze]);var qe=(""+Se.keywords).replace(/^ | $/g,"");qe.length&&Ue.push([L,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),Oe.push([a,/^\s+/,null,` \r
\xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return Se.regexLiterals&&(tt+="(?!s*/)"),Ue.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[p,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[u,new RegExp(tt),null]),ve(Oe,Ue)}var xe=Me({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ae(Se,Oe,Ue){for(var Xe=/(?:^|\s)nocode(?:\s|$)/,Qe=/\r\n?|\n/,je=Se.ownerDocument,Be=je.createElement("li");Se.firstChild;)Be.appendChild(Se.firstChild);var it=[Be];function Ze(we){var ut=we.nodeType;if(ut==1&&!Xe.test(we.className))if(we.nodeName==="br")qe(we),we.parentNode&&we.parentNode.removeChild(we);else for(var at=we.firstChild;at;at=at.nextSibling)Ze(at);else if((ut==3||ut==4)&&Ue){var Re=we.nodeValue,He=Re.match(Qe);if(He){var ge=Re.substring(0,He.index);we.nodeValue=ge;var de=Re.substring(He.index+He[0].length);if(de){var fe=we.parentNode;fe.insertBefore(je.createTextNode(de),we.nextSibling)}qe(we),ge||we.parentNode.removeChild(we)}}}function qe(we){for(;!we.nextSibling;)if(we=we.parentNode,!we)return;function ut(He,ge){var de=ge?He.cloneNode(!1):He,fe=He.parentNode;if(fe){var te=ut(fe,1),re=He.nextSibling;te.appendChild(de);for(var ne=re;ne;ne=re)re=ne.nextSibling,te.appendChild(ne)}return de}for(var at=ut(we.nextSibling,0),Re;(Re=at.parentNode)&&Re.nodeType===1;)at=Re;it.push(at)}for(var tt=0;tt=fe&&(Ze+=2),je>=te&&(dt+=2)}}finally{Re&&(Re.style.display=He)}}var Ce={};function pe(Se,Oe){for(var Ue=Oe.length;--Ue>=0;){var Xe=Oe[Ue];Ce.hasOwnProperty(Xe)?j.console&&console.warn("cannot override language handler %s",Xe):Ce[Xe]=Se}}function se(Se,Oe){return Se&&Ce.hasOwnProperty(Se)||(Se=/^\s*]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[u,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^