(window.webpackJsonp=window.webpackJsonp||[]).push([[107,3,5,7,8,17],{"+NIl":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(Q,O){"use strict";function j(o,i){o.cmdState.push(i)}function D(o){return o.cmdState.length>0?o.cmdState[o.cmdState.length-1]:null}function B(o){var i=o.cmdState.pop();i&&i.closeBracket()}function I(o){for(var i=o.cmdState,d=i.length-1;d>=0;d--){var s=i[d];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function v(o,i,d){return function(){this.name=o,this.bracketNo=0,this.style=i,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var T={};T.importmodule=v("importmodule","tag",["string","builtin"]),T.documentclass=v("documentclass","tag",["","atom"]),T.usepackage=v("usepackage","tag",["atom"]),T.begin=v("begin","tag",["atom"]),T.end=v("end","tag",["atom"]),T.label=v("label","tag",["atom"]),T.ref=v("ref","tag",["atom"]),T.eqref=v("eqref","tag",["atom"]),T.cite=v("cite","tag",["atom"]),T.bibitem=v("bibitem","tag",["atom"]),T.Bibitem=v("Bibitem","tag",["atom"]),T.RBibitem=v("RBibitem","tag",["atom"]),T.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(o,i){o.f=i}function n(o,i){var d;if(o.match(/^\\[a-zA-Z@]+/)){var s=o.current().slice(1);return d=T.hasOwnProperty(s)?T[s]:T.DEFAULT,d=new d,j(i,d),E(i,c),d.style}if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/\\]/))return"tag";if(o.match("\\["))return E(i,function(a,p){return u(a,p,"\\]")}),"keyword";if(o.match("\\("))return E(i,function(a,p){return u(a,p,"\\)")}),"keyword";if(o.match("$$"))return E(i,function(a,p){return u(a,p,"$$")}),"keyword";if(o.match("$"))return E(i,function(a,p){return u(a,p,"$")}),"keyword";var A=o.next();if(A=="%")return o.skipToEnd(),"comment";if(A=="}"||A=="]"){if(d=D(i),d)d.closeBracket(A),E(i,c);else return"error";return"bracket"}else return A=="{"||A=="["?(d=T.DEFAULT,d=new d,j(i,d),"bracket"):/\d/.test(A)?(o.eatWhile(/[\w.%]/),"atom"):(o.eatWhile(/[\w\-_]/),d=I(i),d.name=="begin"&&(d.argument=o.current()),d.styleIdentifier())}function u(o,i,d){if(o.eatSpace())return null;if(d&&o.match(d))return E(i,n),"keyword";if(o.match(/^\\[a-zA-Z@]+/))return"tag";if(o.match(/^[a-zA-Z]+/))return"variable-2";if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/]/))return"tag";if(o.match(/^[\^_&]/))return"tag";if(o.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(o.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=o.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(o.skipToEnd(),"comment"):"error"}function c(o,i){var d=o.peek(),s;return d=="{"||d=="["?(s=D(i),s.openBracket(d),o.eat(d),E(i,n),"bracket"):/[ \t\r]/.test(d)?(o.eat(d),null):(E(i,n),B(i),n(o,i))}return{startState:function(){var o=O.inMathMode?function(i,d){return u(i,d)}:n;return{cmdState:[],f:o}},copyState:function(o){return{cmdState:o.cmdState.slice(),f:o.f}},token:function(o,i){return i.f(o,i)},blankLine:function(o){o.f=n,o.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"+ua5":function(qe,pe,G){},"06Qe":function(qe,pe,G){var q=G("ItGF"),Q="urn:schemas-microsoft-com:vml",O=typeof window=="undefined"?null:window,j=!1,D=O&&O.document;function B(T){return I(T)}var I;if(D&&!q.canvasSupported)try{!D.namespaces.zrvml&&D.namespaces.add("zrvml",Q),I=function(T){return D.createElement("')}}catch(T){I=function(E){return D.createElement("<"+E+' xmlns="'+Q+'" class="zrvml">')}}function v(){if(j||!D)return;j=!0;var T=D.styleSheets;T.length<31?D.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):T[0].addRule(".zrvml","behavior:url(#default#VML)")}pe.doc=D,pe.createNode=B,pe.initVML=v},"0s+r":function(qe,pe,G){var q=G("bYtY"),Q=G("QBsz"),O=G("y23F"),j=G("H6uX"),D=G("YH21"),B=G("C0SR"),I="silent";function v(d,s,A){return{type:d,event:A,target:s.target,topTarget:s.topTarget,cancelBubble:!1,offsetX:A.zrX,offsetY:A.zrY,gestureEvent:A.gestureEvent,pinchX:A.pinchX,pinchY:A.pinchY,pinchScale:A.pinchScale,wheelDelta:A.zrDelta,zrByTouch:A.zrByTouch,which:A.which,stop:T}}function T(){D.stop(this.event)}function E(){}E.prototype.dispose=function(){};var n=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],u=function(d,s,A,a){j.call(this),this.storage=d,this.painter=s,this.painterRoot=a,A=A||new E,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,O.call(this),this.setHandlerProxy(A)};u.prototype={constructor:u,setHandlerProxy:function(d){this.proxy&&this.proxy.dispose(),d&&(q.each(n,function(s){d.on&&d.on(s,this[s],this)},this),d.handler=this),this.proxy=d},mousemove:function(d){var s=d.zrX,A=d.zrY,a=o(this,s,A),p=this._hovered,w=p.target;w&&!w.__zr&&(p=this.findHover(p.x,p.y),w=p.target);var S=this._hovered=a?{x:s,y:A}:this.findHover(s,A),x=S.target,L=this.proxy;L.setCursor&&L.setCursor(x?x.cursor:"default"),w&&x!==w&&this.dispatchToElement(p,"mouseout",d),this.dispatchToElement(S,"mousemove",d),x&&x!==w&&this.dispatchToElement(S,"mouseover",d)},mouseout:function(d){var s=d.zrEventControl,A=d.zrIsToLocalDOM;s!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",d),s!=="no_globalout"&&(!A&&this.trigger("globalout",{type:"globalout",event:d}))},resize:function(d){this._hovered={}},dispatch:function(d,s){var A=this[d];A&&A.call(this,s)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(d){var s=this.proxy;s.setCursor&&s.setCursor(d)},dispatchToElement:function(d,s,A){d=d||{};var a=d.target;if(a&&a.silent)return;for(var p="on"+s,w=v(s,d,A);a&&!(a[p]&&(w.cancelBubble=a[p].call(a,w)),a.trigger(s,w),a=a.parent,w.cancelBubble););w.cancelBubble||(this.trigger(s,w),this.painter&&this.painter.eachOtherLayer(function(S){typeof S[p]=="function"&&S[p].call(S,w),S.trigger&&S.trigger(s,w)}))},findHover:function(d,s,A){for(var a=this.storage.getDisplayList(),p={x:d,y:s},w=a.length-1;w>=0;w--){var S;if(a[w]!==A&&!a[w].ignore&&(S=c(a[w],d,s))&&(!p.topTarget&&(p.topTarget=a[w]),S!==I)){p.target=a[w];break}}return p},processGesture:function(d,s){this._gestureMgr||(this._gestureMgr=new B);var A=this._gestureMgr;s==="start"&&A.clear();var a=A.recognize(d,this.findHover(d.zrX,d.zrY,null).target,this.proxy.dom);if(s==="end"&&A.clear(),a){var p=a.type;d.gestureEvent=p,this.dispatchToElement({target:a.target},p,a.event)}}},q.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(d){u.prototype[d]=function(s){var A=s.zrX,a=s.zrY,p=o(this,A,a),w,S;if((d!=="mouseup"||!p)&&(w=this.findHover(A,a),S=w.target),d==="mousedown")this._downEl=S,this._downPoint=[s.zrX,s.zrY],this._upEl=S;else if(d==="mouseup")this._upEl=S;else if(d==="click"){if(this._downEl!==this._upEl||!this._downPoint||Q.dist(this._downPoint,[s.zrX,s.zrY])>4)return;this._downPoint=null}this.dispatchToElement(w,d,s)}});function c(d,s,A){if(d[d.rectHover?"rectContain":"contain"](s,A)){for(var a=d,p;a;){if(a.clipPath&&!a.clipPath.contain(s,A))return!1;a.silent&&(p=!0),a=a.parent}return p?I:!0}return!1}function o(d,s,A){var a=d.painter;return s<0||s>a.getWidth()||A<0||A>a.getHeight()}q.mixin(u,j),q.mixin(u,O);var i=u;qe.exports=i},"19Vz":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){q.defineOption("placeholder","",function(v,T,E){var n=E&&E!=q.Init;if(T&&!n)v.on("blur",D),v.on("change",B),v.on("swapDoc",B),q.on(v.getInputField(),"compositionupdate",v.state.placeholderCompose=function(){j(v)}),B(v);else if(!T&&n){v.off("blur",D),v.off("change",B),v.off("swapDoc",B),q.off(v.getInputField(),"compositionupdate",v.state.placeholderCompose),Q(v);var u=v.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}T&&!v.hasFocus()&&D(v)});function Q(v){v.state.placeholder&&(v.state.placeholder.parentNode.removeChild(v.state.placeholder),v.state.placeholder=null)}function O(v){Q(v);var T=v.state.placeholder=document.createElement("pre");T.style.cssText="height: 0; overflow: visible",T.style.direction=v.getOption("direction"),T.className="CodeMirror-placeholder CodeMirror-line-like";var E=v.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),T.appendChild(E),v.display.lineSpace.insertBefore(T,v.display.lineSpace.firstChild)}function j(v){setTimeout(function(){var T=!1,E=v.getInputField();E.nodeName=="TEXTAREA"?T=!E.value:v.lineCount()==1&&(T=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),T?O(v):Q(v)},20)}function D(v){I(v)&&O(v)}function B(v){var T=v.getWrapperElement(),E=I(v);T.className=T.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?O(v):Q(v)}function I(v){return v.lineCount()===1&&v.getLine(0)===""}})},"1Jh7":function(qe,pe,G){var q=G("y+Vt"),Q=G("T6xi"),O=q.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(j,D){Q.buildPath(j,D,!1)}});qe.exports=O},"1MYJ":function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var O=this.__dirtyPath,j=this.shape.paths,D=0;D=this._maxSize&&n>0){var c=v.head;v.remove(c),delete T[c.key],E=c.value,this._lastRemovedEntry=c}u?u.value=I:u=new Q(I),u.key=B,v.insertEntry(u),T[B]=u}return E},j.get=function(B){var I=this._map[B],v=this._list;if(I!=null)return I!==v.tail&&(v.remove(I),v.insertEntry(I)),I.value},j.clear=function(){this._list.clear(),this._map={}};var D=O;qe.exports=D},"1bdT":function(qe,pe,G){var q=G("3gBT"),Q=G("H6uX"),O=G("DN4a"),j=G("vWvF"),D=G("bYtY"),B=function(v){O.call(this,v),Q.call(this,v),j.call(this,v),this.id=v.id||q()};B.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(v,T){switch(this.draggable){case"horizontal":T=0;break;case"vertical":v=0;break}var E=this.transform;E||(E=this.transform=[1,0,0,1,0,0]),E[4]+=v,E[5]+=T,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(v,T){},attrKV:function(v,T){if(v==="position"||v==="scale"||v==="origin"){if(T){var E=this[v];E||(E=this[v]=[]),E[0]=T[0],E[1]=T[1]}}else this[v]=T},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(v,T){if(typeof v=="string")this.attrKV(v,T);else if(D.isObject(v))for(var E in v)v.hasOwnProperty(E)&&this.attrKV(E,v[E]);return this.dirty(!1),this},setClipPath:function(v){var T=this.__zr;T&&v.addSelfToZr(T),this.clipPath&&this.clipPath!==v&&this.removeClipPath(),this.clipPath=v,v.__zr=T,v.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var v=this.clipPath;v&&(v.__zr&&v.removeSelfFromZr(v.__zr),v.__zr=null,v.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(v){this.__zr=v;var T=this.animators;if(T)for(var E=0;E")):null:f.match("--")?g(i("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),g(d(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),C.tokenize=i("meta","?>"),"meta"):(E=f.eat("/")?"closeTag":"openTag",C.tokenize=c,"tag bracket");if(m=="&"){var F;return f.eat("#")?f.eat("x")?F=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):F=f.eatWhile(/[\d]/)&&f.eat(";"):F=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),F?"atom":"error"}else return f.eatWhile(/[^&<]/),null}u.isInText=!0;function c(f,C){var g=f.next();if(g==">"||g=="/"&&f.eat(">"))return C.tokenize=u,E=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return E="equals",null;if(g=="<"){C.tokenize=u,C.state=p,C.tagName=C.tagStart=null;var m=C.tokenize(f,C);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(g)?(C.tokenize=o(g),C.stringStartCol=f.column(),C.tokenize(f,C)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(f){var C=function(g,m){for(;!g.eol();)if(g.next()==f){m.tokenize=c;break}return"string"};return C.isInAttribute=!0,C}function i(f,C){return function(g,m){for(;!g.eol();){if(g.match(C)){m.tokenize=u;break}g.next()}return f}}function d(f){return function(C,g){for(var m;(m=C.next())!=null;){if(m=="<")return g.tokenize=d(f+1),g.tokenize(C,g);if(m==">")if(f==1){g.tokenize=u;break}else return g.tokenize=d(f-1),g.tokenize(C,g)}return"meta"}}function s(f,C,g){this.prev=f.context,this.tagName=C,this.indent=f.indented,this.startOfLine=g,(I.doNotIndent.hasOwnProperty(C)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function A(f){f.context&&(f.context=f.context.prev)}function a(f,C){for(var g;;){if(!f.context)return;if(g=f.context.tagName,!I.contextGrabbers.hasOwnProperty(g)||!I.contextGrabbers[g].hasOwnProperty(C))return;A(f)}}function p(f,C,g){return f=="openTag"?(g.tagStart=C.column(),w):f=="closeTag"?S:p}function w(f,C,g){return f=="word"?(g.tagName=C.current(),n="tag",b):I.allowMissingTagName&&f=="endTag"?(n="tag bracket",b(f,C,g)):(n="error",w)}function S(f,C,g){if(f=="word"){var m=C.current();return g.context&&g.context.tagName!=m&&I.implicitlyClosed.hasOwnProperty(g.context.tagName)&&A(g),g.context&&g.context.tagName==m||I.matchClosing===!1?(n="tag",x):(n="tag error",L)}else return I.allowMissingTagName&&f=="endTag"?(n="tag bracket",x(f,C,g)):(n="error",L)}function x(f,C,g){return f!="endTag"?(n="error",x):(A(g),p)}function L(f,C,g){return n="error",x(f,C,g)}function b(f,C,g){if(f=="word")return n="attribute",h;if(f=="endTag"||f=="selfcloseTag"){var m=g.tagName,F=g.tagStart;return g.tagName=g.tagStart=null,f=="selfcloseTag"||I.autoSelfClosers.hasOwnProperty(m)?a(g,m):(a(g,m),g.context=new s(g,m,F==g.indented)),p}return n="error",b}function h(f,C,g){return f=="equals"?r:(I.allowMissing||(n="error"),b(f,C,g))}function r(f,C,g){return f=="string"?l:f=="word"&&I.allowUnquoted?(n="string",b):(n="error",b(f,C,g))}function l(f,C,g){return f=="string"?l:b(f,C,g)}return{startState:function(f){var C={tokenize:u,state:p,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(C.baseIndent=f),C},token:function(f,C){if(!C.tagName&&f.sol()&&(C.indented=f.indentation()),f.eatSpace())return null;E=null;var g=C.tokenize(f,C);return(g||E)&&g!="comment"&&(n=null,C.state=C.state(E||g,f,C),n&&(g=n=="error"?g+" error":n)),g},indent:function(f,C,g){var m=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+B;if(m&&m.noIndent)return q.Pass;if(f.tokenize!=c&&f.tokenize!=u)return g?g.match(/^(\s*)/)[0].length:0;if(f.tagName)return I.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+B*(I.multilineTagIndentFactor||1);if(I.alignCDATA&&/$/,blockCommentStart:"",configuration:I.htmlMode?"html":"xml",helperType:I.htmlMode?"html":"xml",skipAttribute:function(f){f.state==r&&(f.state=b)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var C=[],g=f.context;g;g=g.prev)g.tagName&&C.push(g.tagName);return C.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function(qe,pe,G){qe.exports={md:"md___1fRow"}},"1j5w":function(qe,pe,G){"use strict";G.d(pe,"d",function(){return ct}),G.d(pe,"b",function(){return De}),G.d(pe,"c",function(){return ht}),G.d(pe,"a",function(){return kt});var q=G("VTBJ"),Q=G("1OyB"),O=G("vuIU"),j=G("JX7q"),D=G("Ji7U"),B=G("LK+K"),I=G("q1tI"),v=G("I8Z2"),T=G("BGR+"),E=G("wx14"),n=G("rePB"),u=G("4IlW"),c=G("2GS6"),o=G("Gytx"),i=G.n(o),d=G("TSYQ"),s=G.n(d),A=G("U8pU"),a=G("ODXe"),p=/iPhone/i,w=/iPod/i,S=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,b=/\bAndroid(?:.+)SD4930UR\b/i,h=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,r=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,C=/BB10/i,g=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,F=/Mobile(?:.+)Firefox\b/i;function P(St,ut){return St.test(ut)}function z(St){var ut=St||(typeof navigator!="undefined"?navigator.userAgent:""),nt=ut.split("[FBAN");if(typeof nt[1]!="undefined"){var tt=nt,Ce=Object(a.a)(tt,1);ut=Ce[0]}if(nt=ut.split("Twitter"),typeof nt[1]!="undefined"){var Pe=nt,pt=Object(a.a)(Pe,1);ut=pt[0]}var it={apple:{phone:P(p,ut)&&!P(r,ut),ipod:P(w,ut),tablet:!P(p,ut)&&P(S,ut)&&!P(r,ut),device:(P(p,ut)||P(w,ut)||P(S,ut))&&!P(r,ut)},amazon:{phone:P(b,ut),tablet:!P(b,ut)&&P(h,ut),device:P(b,ut)||P(h,ut)},android:{phone:!P(r,ut)&&P(b,ut)||!P(r,ut)&&P(x,ut),tablet:!P(r,ut)&&!P(b,ut)&&!P(x,ut)&&(P(h,ut)||P(L,ut)),device:!P(r,ut)&&(P(b,ut)||P(h,ut)||P(x,ut)||P(L,ut))||P(/\bokhttp\b/i,ut)},windows:{phone:P(r,ut),tablet:P(l,ut),device:P(r,ut)||P(l,ut)},other:{blackberry:P(f,ut),blackberry10:P(C,ut),opera:P(g,ut),firefox:P(F,ut),chrome:P(m,ut),device:P(f,ut)||P(C,ut)||P(g,ut)||P(F,ut)||P(m,ut)},any:null,phone:null,tablet:null};return it.any=it.apple.device||it.android.device||it.windows.device||it.other.device,it.phone=it.apple.phone||it.android.phone||it.windows.phone,it.tablet=it.apple.tablet||it.android.tablet||it.windows.tablet,it}var Z=Object(q.a)(Object(q.a)({},z()),{},{isMobile:z}),V=Z;function M(){}function J(St,ut,nt){var tt=ut||"";return St.key||"".concat(tt,"item_").concat(nt)}function X(St){return"".concat(St,"-menu-")}function re(St,ut){var nt=-1;I.Children.forEach(St,function(tt){nt+=1,tt&&tt.type&&tt.type.isMenuItemGroup?I.Children.forEach(tt.props.children,function(Ce){nt+=1,ut(Ce,nt)}):ut(tt,nt)})}function se(St,ut,nt){if(!St||nt.find)return;I.Children.forEach(St,function(tt){if(tt){var Ce=tt.type;if(!Ce||!(Ce.isSubMenu||Ce.isMenuItem||Ce.isMenuItemGroup))return;ut.indexOf(tt.key)!==-1?nt.find=!0:tt.props.children&&se(tt.props.children,ut,nt)}})}var _e=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ge=function(ut){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=ut&&typeof ut.getBoundingClientRect=="function"&&ut.getBoundingClientRect().width;if(tt){if(nt){var Ce=getComputedStyle(ut),Pe=Ce.marginLeft,pt=Ce.marginRight;tt+=+Pe.replace("px","")+ +pt.replace("px","")}tt=+tt.toFixed(6)}return tt||0},we=function(ut,nt,tt){ut&&Object(A.a)(ut.style)==="object"&&(ut.style[nt]=tt)},Re=function(){return V.any},He=G("KQm4"),Se=G("Ff2n"),Te=G("i8i4"),$e=G("bdgK"),bt=G("uciX"),Ie=G("8XRh"),ze={adjustX:1,adjustY:1},at={topLeft:{points:["bl","tl"],overflow:ze,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ze,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ze,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ze,offset:[4,0]}},Ae={topLeft:{points:["bl","tl"],overflow:ze,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ze,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ze,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ze,offset:[4,0]}},ne=at,ae=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},xe=function(ut,nt,tt){var Ce=X(nt),Pe=ut.getState();ut.setState({defaultActiveFirst:Object(q.a)(Object(q.a)({},Pe.defaultActiveFirst),{},Object(n.a)({},Ce,tt))})},Fe=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.onDestroy=function(Xe){Ce.props.onDestroy(Xe)},Ce.onKeyDown=function(Xe){var mt=Xe.keyCode,Pt=Ce.menuInstance,Rt=Ce.props,Qt=Rt.isOpen,Ir=Rt.store;if(mt===u.a.ENTER)return Ce.onTitleClick(Xe),xe(Ir,Ce.props.eventKey,!0),!0;if(mt===u.a.RIGHT)return Qt?Pt.onKeyDown(Xe):(Ce.triggerOpenChange(!0),xe(Ir,Ce.props.eventKey,!0)),!0;if(mt===u.a.LEFT){var Fr;if(Qt)Fr=Pt.onKeyDown(Xe);else return;return Fr||(Ce.triggerOpenChange(!1),Fr=!0),Fr}return Qt&&(mt===u.a.UP||mt===u.a.DOWN)?Pt.onKeyDown(Xe):void 0},Ce.onOpenChange=function(Xe){Ce.props.onOpenChange(Xe)},Ce.onPopupVisibleChange=function(Xe){Ce.triggerOpenChange(Xe,Xe?"mouseenter":"mouseleave")},Ce.onMouseEnter=function(Xe){var mt=Ce.props,Pt=mt.eventKey,Rt=mt.onMouseEnter,Qt=mt.store;xe(Qt,Ce.props.eventKey,!1),Rt({key:Pt,domEvent:Xe})},Ce.onMouseLeave=function(Xe){var mt=Ce.props,Pt=mt.parentMenu,Rt=mt.eventKey,Qt=mt.onMouseLeave;Pt.subMenuInstance=Object(j.a)(Ce),Qt({key:Rt,domEvent:Xe})},Ce.onTitleMouseEnter=function(Xe){var mt=Ce.props,Pt=mt.eventKey,Rt=mt.onItemHover,Qt=mt.onTitleMouseEnter;Rt({key:Pt,hover:!0}),Qt({key:Pt,domEvent:Xe})},Ce.onTitleMouseLeave=function(Xe){var mt=Ce.props,Pt=mt.parentMenu,Rt=mt.eventKey,Qt=mt.onItemHover,Ir=mt.onTitleMouseLeave;Pt.subMenuInstance=Object(j.a)(Ce),Qt({key:Rt,hover:!1}),Ir({key:Rt,domEvent:Xe})},Ce.onTitleClick=function(Xe){var mt=Object(j.a)(Ce),Pt=mt.props;if(Pt.onTitleClick({key:Pt.eventKey,domEvent:Xe}),Pt.triggerSubMenuAction==="hover")return;Ce.triggerOpenChange(!Pt.isOpen,"click"),xe(Pt.store,Ce.props.eventKey,!1)},Ce.onSubMenuClick=function(Xe){typeof Ce.props.onClick=="function"&&Ce.props.onClick(Ce.addKeyPath(Xe))},Ce.onSelect=function(Xe){Ce.props.onSelect(Xe)},Ce.onDeselect=function(Xe){Ce.props.onDeselect(Xe)},Ce.getPrefixCls=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu")},Ce.getActiveClassName=function(){return"".concat(Ce.getPrefixCls(),"-active")},Ce.getDisabledClassName=function(){return"".concat(Ce.getPrefixCls(),"-disabled")},Ce.getSelectedClassName=function(){return"".concat(Ce.getPrefixCls(),"-selected")},Ce.getOpenClassName=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu-open")},Ce.saveMenuInstance=function(Xe){Ce.menuInstance=Xe},Ce.addKeyPath=function(Xe){return Object(q.a)(Object(q.a)({},Xe),{},{keyPath:(Xe.keyPath||[]).concat(Ce.props.eventKey)})},Ce.triggerOpenChange=function(Xe,mt){var Pt=Ce.props.eventKey,Rt=function(){Ce.onOpenChange({key:Pt,item:Object(j.a)(Ce),trigger:mt,open:Xe})};mt==="mouseenter"?Ce.mouseenterTimeout=setTimeout(function(){Rt()},0):Rt()},Ce.isChildrenSelected=function(){var Xe={find:!1};return se(Ce.props.children,Ce.props.selectedKeys,Xe),Xe.find},Ce.isOpen=function(){return Ce.props.openKeys.indexOf(Ce.props.eventKey)!==-1},Ce.adjustWidth=function(){if(!Ce.subMenuTitle||!Ce.menuInstance)return;var Xe=Te.findDOMNode(Ce.menuInstance);if(Xe.offsetWidth>=Ce.subMenuTitle.offsetWidth)return;Xe.style.minWidth="".concat(Ce.subMenuTitle.offsetWidth,"px")},Ce.saveSubMenuTitle=function(Xe){Ce.subMenuTitle=Xe},Ce.getBaseProps=function(){var Xe=Object(j.a)(Ce),mt=Xe.props;return{mode:mt.mode==="horizontal"?"vertical":mt.mode,visible:Ce.props.isOpen,level:mt.level+1,inlineIndent:mt.inlineIndent,focusable:!1,onClick:Ce.onSubMenuClick,onSelect:Ce.onSelect,onDeselect:Ce.onDeselect,onDestroy:Ce.onDestroy,selectedKeys:mt.selectedKeys,eventKey:"".concat(mt.eventKey,"-menu-"),openKeys:mt.openKeys,motion:mt.motion,onOpenChange:Ce.onOpenChange,subMenuOpenDelay:mt.subMenuOpenDelay,parentMenu:Object(j.a)(Ce),subMenuCloseDelay:mt.subMenuCloseDelay,forceSubMenuRender:mt.forceSubMenuRender,triggerSubMenuAction:mt.triggerSubMenuAction,builtinPlacements:mt.builtinPlacements,defaultActiveFirst:mt.store.getState().defaultActiveFirst[X(mt.eventKey)],multiple:mt.multiple,prefixCls:mt.rootPrefixCls,id:Ce.internalMenuId,manualRef:Ce.saveMenuInstance,itemIcon:mt.itemIcon,expandIcon:mt.expandIcon,direction:mt.direction}},Ce.getMotion=function(Xe,mt){var Pt=Object(j.a)(Ce),Rt=Pt.haveRendered,Qt=Ce.props,Ir=Qt.motion,Fr=Qt.rootPrefixCls,wr=Object(q.a)(Object(q.a)({},Ir),{},{leavedClassName:"".concat(Fr,"-hidden"),removeOnLeave:!1,motionAppear:Rt||!mt||Xe!=="inline"});return wr};var Pe=tt.store,pt=tt.eventKey,it=Pe.getState(),xt=it.defaultActiveFirst;Ce.isRootMenu=!1;var _t=!1;return xt&&(_t=xt[pt]),xe(Pe,pt,_t),Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ce=this,Pe=this.props,pt=Pe.mode,it=Pe.parentMenu,xt=Pe.manualRef;if(xt&&xt(this),pt!=="horizontal"||!it.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ce=this.props,Pe=Ce.onDestroy,pt=Ce.eventKey;Pe&&Pe(pt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Ce){var Pe=this,pt=this.getBaseProps(),it=this.getMotion(pt.mode,pt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||pt.visible||pt.forceSubMenuRender,!this.haveOpened)return I.createElement("div",null);var xt=pt.direction;return I.createElement(Ie.default,Object.assign({visible:pt.visible},it),function(_t){var Xe=_t.className,mt=_t.style,Pt=s()("".concat(pt.prefixCls,"-sub"),Xe,Object(n.a)({},"".concat(pt.prefixCls,"-rtl"),xt==="rtl"));return I.createElement(je,Object.assign({},pt,{id:Pe.internalMenuId,className:Pt,style:mt}),Ce)})}},{key:"render",value:function(){var Ce,Pe=Object(q.a)({},this.props),pt=Pe.isOpen,it=this.getPrefixCls(),xt=Pe.mode==="inline",_t=s()(it,"".concat(it,"-").concat(Pe.mode),(Ce={},Object(n.a)(Ce,Pe.className,!!Pe.className),Object(n.a)(Ce,this.getOpenClassName(),pt),Object(n.a)(Ce,this.getActiveClassName(),Pe.active||pt&&!xt),Object(n.a)(Ce,this.getDisabledClassName(),Pe.disabled),Object(n.a)(Ce,this.getSelectedClassName(),this.isChildrenSelected()),Ce));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(ae+=1,this.internalMenuId="$__$".concat(ae,"$Menu")));var Xe={},mt={},Pt={};Pe.disabled||(Xe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},mt={onClick:this.onTitleClick},Pt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Rt={},Qt=Pe.direction;xt&&(Qt==="rtl"?Rt.paddingRight=Pe.inlineIndent*Pe.level:Rt.paddingLeft=Pe.inlineIndent*Pe.level);var Ir={};this.props.isOpen&&(Ir={"aria-owns":this.internalMenuId});var Fr=null;Pe.mode!=="horizontal"&&(Fr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Fr=I.createElement(this.props.expandIcon,Object(q.a)({},this.props))));var wr=I.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Rt,className:"".concat(it,"-title"),role:"button"},Pt,mt,{"aria-expanded":pt},Ir,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,Fr||I.createElement("i",{className:"".concat(it,"-arrow")})),Kt=this.renderChildren(Pe.children),Ur=Pe.parentMenu.isRootMenu?Pe.parentMenu.props.getPopupContainer:function(et){return et.parentNode},Kr=ce[Pe.mode],Rr=Pe.popupOffset?{offset:Pe.popupOffset}:{},pr=Pe.mode==="inline"?"":Pe.popupClassName;pr+=Qt==="rtl"?" ".concat(it,"-rtl"):"";var Or=Pe.disabled,pn=Pe.triggerSubMenuAction,un=Pe.subMenuOpenDelay,fe=Pe.forceSubMenuRender,be=Pe.subMenuCloseDelay,Ue=Pe.builtinPlacements;_e.forEach(function(et){return delete Pe[et]}),delete Pe.onClick;var rt=Qt==="rtl"?Object.assign({},Ae,Ue):Object.assign({},at,Ue);return delete Pe.direction,I.createElement("li",Object.assign({},Pe,Xe,{className:_t,role:"menuitem"}),xt&&wr,xt&&Kt,!xt&&I.createElement(bt.a,{prefixCls:it,popupClassName:s()("".concat(it,"-popup"),pr),getPopupContainer:Ur,builtinPlacements:rt,popupPlacement:Kr,popupVisible:pt,popupAlign:Rr,popup:Kt,action:Or?[]:[pn],mouseEnterDelay:un,mouseLeaveDelay:be,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fe},wr))}}]),nt}(I.Component);Fe.defaultProps={onMouseEnter:M,onMouseLeave:M,onTitleMouseEnter:M,onTitleMouseLeave:M,onTitleClick:M,manualRef:M,mode:"vertical",title:""};var ke=Object(v.b)(function(St,ut){var nt=St.openKeys,tt=St.activeKey,Ce=St.selectedKeys,Pe=ut.eventKey,pt=ut.subMenuKey;return{isOpen:nt.indexOf(Pe)>-1,active:tt[pt]===Pe,selectedKeys:Ce}})(Fe);ke.isSubMenu=!0;var ct=ke,ft="menuitem-overflowed",yt=.5,Et=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.resizeObserver=null,tt.mutationObserver=null,tt.originalTotalWidth=0,tt.overflowedItems=[],tt.menuItemSizes=[],tt.cancelFrameId=null,tt.state={lastVisibleIndex:void 0},tt.getMenuItemNodes=function(){var Ce=tt.props.prefixCls,Pe=Te.findDOMNode(Object(j.a)(tt));return Pe?[].slice.call(Pe.children).filter(function(pt){return pt.className.split(" ").indexOf("".concat(Ce,"-overflowed-submenu"))<0}):[]},tt.getOverflowedSubMenuItem=function(Ce,Pe,pt){var it=tt.props,xt=it.overflowedIndicator,_t=it.level,Xe=it.mode,mt=it.prefixCls,Pt=it.theme;if(_t!==1||Xe!=="horizontal")return null;var Rt=tt.props.children[0],Qt=Rt.props,Ir=Qt.children,Fr=Qt.title,wr=Qt.style,Kt=Object(Se.a)(Qt,["children","title","style"]),Ur=Object(q.a)({},wr),Kr="".concat(Ce,"-overflowed-indicator"),Rr="".concat(Ce,"-overflowed-indicator");Pe.length===0&&pt!==!0?Ur=Object(q.a)(Object(q.a)({},Ur),{},{display:"none"}):pt&&(Ur=Object(q.a)(Object(q.a)({},Ur),{},{visibility:"hidden",position:"absolute"}),Kr="".concat(Kr,"-placeholder"),Rr="".concat(Rr,"-placeholder"));var pr=Pt?"".concat(mt,"-").concat(Pt):"",Or={};return _e.forEach(function(pn){Kt[pn]!==void 0&&(Or[pn]=Kt[pn])}),I.createElement(ct,Object.assign({title:xt,className:"".concat(mt,"-overflowed-submenu"),popupClassName:pr},Or,{key:Kr,eventKey:Rr,disabled:!1,style:Ur}),Pe)},tt.setChildrenWidthAndResize=function(){if(tt.props.mode!=="horizontal")return;var Ce=Te.findDOMNode(Object(j.a)(tt));if(!Ce)return;var Pe=Ce.children;if(!Pe||Pe.length===0)return;var pt=Ce.children[Pe.length-1];we(pt,"display","inline-block");var it=tt.getMenuItemNodes(),xt=it.filter(function(_t){return _t.className.split(" ").indexOf(ft)>=0});xt.forEach(function(_t){we(_t,"display","inline-block")}),tt.menuItemSizes=it.map(function(_t){return ge(_t,!0)}),xt.forEach(function(_t){we(_t,"display","none")}),tt.overflowedIndicatorWidth=ge(Ce.children[Ce.children.length-1],!0),tt.originalTotalWidth=tt.menuItemSizes.reduce(function(_t,Xe){return _t+Xe},0),tt.handleResize(),we(pt,"display","none")},tt.handleResize=function(){if(tt.props.mode!=="horizontal")return;var Ce=Te.findDOMNode(Object(j.a)(tt));if(!Ce)return;var Pe=ge(Ce);tt.overflowedItems=[];var pt=0,it;tt.originalTotalWidth>Pe+yt&&(it=-1,tt.menuItemSizes.forEach(function(xt){pt+=xt,pt+tt.overflowedIndicatorWidth<=Pe&&(it+=1)})),tt.setState({lastVisibleIndex:it})},tt}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){var Ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=Te.findDOMNode(this);if(!Pe)return;this.resizeObserver=new $e.default(function(pt){pt.forEach(function(){var it=Ce.cancelFrameId;cancelAnimationFrame(it),Ce.cancelFrameId=requestAnimationFrame(Ce.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(pt){Ce.resizeObserver.observe(pt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ce.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(pt){Ce.resizeObserver.observe(pt)}),Ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ce){var Pe=this,pt=this.state.lastVisibleIndex;return(Ce||[]).reduce(function(it,xt,_t){var Xe=xt;if(Pe.props.mode==="horizontal"){var mt=Pe.getOverflowedSubMenuItem(xt.props.eventKey,[]);pt!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(_t>pt&&(Xe=I.cloneElement(xt,{style:{display:"none"},eventKey:"".concat(xt.props.eventKey,"-hidden"),className:"".concat(ft)})),_t===pt+1&&(Pe.overflowedItems=Ce.slice(pt+1).map(function(Rt){return I.cloneElement(Rt,{key:Rt.props.eventKey,mode:"vertical-left"})}),mt=Pe.getOverflowedSubMenuItem(xt.props.eventKey,Pe.overflowedItems)));var Pt=[].concat(Object(He.a)(it),[mt,Xe]);return _t===Ce.length-1&&Pt.push(Pe.getOverflowedSubMenuItem(xt.props.eventKey,[],!0)),Pt}return[].concat(Object(He.a)(it),[Xe])},[])}},{key:"render",value:function(){var Ce=this.props,Pe=Ce.visible,pt=Ce.prefixCls,it=Ce.overflowedIndicator,xt=Ce.mode,_t=Ce.level,Xe=Ce.tag,mt=Ce.children,Pt=Ce.theme,Rt=Object(Se.a)(Ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Qt=Xe;return I.createElement(Qt,Object.assign({},Rt),this.renderChildren(mt))}}]),nt}(I.Component);Et.defaultProps={tag:"div",className:""};var Ot=Et;function Mt(St){return St.length?St.every(function(ut){return!!ut.props.disabled}):!0}function Qe(St,ut,nt){var tt=St.getState();St.setState({activeKey:Object(q.a)(Object(q.a)({},tt.activeKey),{},Object(n.a)({},ut,nt))})}function Ne(St){return St.eventKey||"0-menu-"}function lt(St,ut){var nt=ut,tt=St.children,Ce=St.eventKey;if(nt){var Pe;if(re(tt,function(pt,it){pt&&pt.props&&!pt.props.disabled&&nt===J(pt,Ce,it)&&(Pe=!0)}),Pe)return nt}return nt=null,St.defaultActiveFirst&&re(tt,function(pt,it){!nt&&pt&&!pt.props.disabled&&(nt=J(pt,Ce,it))}),nt}function dt(St){if(St){var ut=this.instanceArray.indexOf(St);ut!==-1?this.instanceArray[ut]=St:this.instanceArray.push(St)}}var Ye=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;return Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.onKeyDown=function(Pe,pt){var it=Pe.keyCode,xt;if(Ce.getFlatInstanceArray().forEach(function(Xe){Xe&&Xe.props.active&&Xe.onKeyDown&&(xt=Xe.onKeyDown(Pe))}),xt)return 1;var _t=null;return(it===u.a.UP||it===u.a.DOWN)&&(_t=Ce.step(it===u.a.UP?-1:1)),_t?(Pe.preventDefault(),Qe(Ce.props.store,Ne(Ce.props),_t.props.eventKey),typeof pt=="function"&&pt(_t),1):void 0},Ce.onItemHover=function(Pe){var pt=Pe.key,it=Pe.hover;Qe(Ce.props.store,Ne(Ce.props),it?pt:null)},Ce.onDeselect=function(Pe){Ce.props.onDeselect(Pe)},Ce.onSelect=function(Pe){Ce.props.onSelect(Pe)},Ce.onClick=function(Pe){Ce.props.onClick(Pe)},Ce.onOpenChange=function(Pe){Ce.props.onOpenChange(Pe)},Ce.onDestroy=function(Pe){Ce.props.onDestroy(Pe)},Ce.getFlatInstanceArray=function(){return Ce.instanceArray},Ce.step=function(Pe){var pt=Ce.getFlatInstanceArray(),it=Ce.props.store.getState().activeKey[Ne(Ce.props)],xt=pt.length;if(!xt)return null;Pe<0&&(pt=pt.concat().reverse());var _t=-1;if(pt.every(function(Rt,Qt){return Rt&&Rt.props.eventKey===it?(_t=Qt,!1):!0}),!Ce.props.defaultActiveFirst&&_t!==-1&&Mt(pt.slice(_t,xt-1)))return;var Xe=(_t+1)%xt,mt=Xe;do{var Pt=pt[mt];if(!Pt||Pt.props.disabled)mt=(mt+1)%xt;else return Pt}while(mt!==Xe);return null},Ce.renderCommonMenuItem=function(Pe,pt,it){var xt=Ce.props.store.getState(),_t=Object(j.a)(Ce),Xe=_t.props,mt=J(Pe,Xe.eventKey,pt),Pt=Pe.props;if(!Pt||typeof Pe.type=="string")return Pe;var Rt=mt===xt.activeKey,Qt=Object(q.a)(Object(q.a)({mode:Pt.mode||Xe.mode,level:Xe.level,inlineIndent:Xe.inlineIndent,renderMenuItem:Ce.renderMenuItem,rootPrefixCls:Xe.prefixCls,index:pt,parentMenu:Xe.parentMenu,manualRef:Pt.disabled?void 0:Object(c.a)(Pe.ref,dt.bind(Object(j.a)(Ce))),eventKey:mt,active:!Pt.disabled&&Rt,multiple:Xe.multiple,onClick:function(Fr){(Pt.onClick||M)(Fr),Ce.onClick(Fr)},onItemHover:Ce.onItemHover,motion:Xe.motion,subMenuOpenDelay:Xe.subMenuOpenDelay,subMenuCloseDelay:Xe.subMenuCloseDelay,forceSubMenuRender:Xe.forceSubMenuRender,onOpenChange:Ce.onOpenChange,onDeselect:Ce.onDeselect,onSelect:Ce.onSelect,builtinPlacements:Xe.builtinPlacements,itemIcon:Pt.itemIcon||Ce.props.itemIcon,expandIcon:Pt.expandIcon||Ce.props.expandIcon},it),{},{direction:Xe.direction});return(Xe.mode==="inline"||Re())&&(Qt.triggerSubMenuAction="click"),I.cloneElement(Pe,Qt)},Ce.renderMenuItem=function(Pe,pt,it){if(!Pe)return null;var xt=Ce.props.store.getState(),_t={openKeys:xt.openKeys,selectedKeys:xt.selectedKeys,triggerSubMenuAction:Ce.props.triggerSubMenuAction,subMenuKey:it};return Ce.renderCommonMenuItem(Pe,pt,_t)},tt.store.setState({activeKey:Object(q.a)(Object(q.a)({},tt.store.getState().activeKey),{},Object(n.a)({},tt.eventKey,lt(tt,tt.activeKey)))}),Ce.instanceArray=[],Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ce){return this.props.visible||Ce.visible||this.props.className!==Ce.className||!i()(this.props.style,Ce.style)}},{key:"componentDidUpdate",value:function(Ce){var Pe=this.props,pt="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[Ne(Pe)],it=lt(Pe,pt);if(it!==pt)Qe(Pe.store,Ne(Pe),it);else if("activeKey"in Ce){var xt=lt(Ce,Ce.activeKey);it!==xt&&Qe(Pe.store,Ne(Pe),it)}}},{key:"render",value:function(){var Ce=this,Pe=Object(E.a)({},this.props);this.instanceArray=[];var pt=s()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),it={className:pt,role:Pe.role||"menu"};Pe.id&&(it.id=Pe.id),Pe.focusable&&(it.tabIndex=0,it.onKeyDown=this.onKeyDown);var xt=Pe.prefixCls,_t=Pe.eventKey,Xe=Pe.visible,mt=Pe.level,Pt=Pe.mode,Rt=Pe.overflowedIndicator,Qt=Pe.theme;return _e.forEach(function(Ir){return delete Pe[Ir]}),delete Pe.onClick,I.createElement(Ot,Object.assign({},Pe,{prefixCls:xt,mode:Pt,tag:"ul",level:mt,theme:Qt,visible:Xe,overflowedIndicator:Rt},it),I.Children.map(Pe.children,function(Ir,Fr){return Ce.renderMenuItem(Ir,Fr,_t||"0-menu-")}))}}]),nt}(I.Component);Ye.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:M};var st=Object(v.b)()(Ye),je=st,Le=G("Kwbf");function Me(St,ut,nt){var tt=St.prefixCls,Ce=St.motion,Pe=St.defaultMotions,pt=Pe===void 0?{}:Pe,it=St.openAnimation,xt=St.openTransitionName,_t=ut.switchingModeFromInline;if(Ce)return Ce;if(Object(A.a)(it)==="object"&&it)Object(Le.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof it=="string")return{motionName:"".concat(tt,"-open-").concat(it)};if(xt)return{motionName:xt};var Xe=pt[nt];return Xe||(_t?null:pt.other)}var me=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.inlineOpenKeys=[],Ce.onSelect=function(it){var xt=Object(j.a)(Ce),_t=xt.props;if(_t.selectable){var Xe=Ce.store.getState(),mt=Xe.selectedKeys,Pt=it.key;_t.multiple?mt=mt.concat([Pt]):mt=[Pt],"selectedKeys"in _t||Ce.store.setState({selectedKeys:mt}),_t.onSelect(Object(q.a)(Object(q.a)({},it),{},{selectedKeys:mt}))}},Ce.onClick=function(it){var xt=Ce.getRealMenuMode(),_t=Object(j.a)(Ce),Xe=_t.store,mt=_t.props.onOpenChange;xt!=="inline"&&!("openKeys"in Ce.props)&&(Xe.setState({openKeys:[]}),mt([])),Ce.props.onClick(it)},Ce.onKeyDown=function(it,xt){Ce.innerMenu.getWrappedInstance().onKeyDown(it,xt)},Ce.onOpenChange=function(it){var xt=Object(j.a)(Ce),_t=xt.props,Xe=Ce.store.getState().openKeys.concat(),mt=!1,Pt=function(Qt){var Ir=!1;if(Qt.open)Ir=Xe.indexOf(Qt.key)===-1,Ir&&Xe.push(Qt.key);else{var Fr=Xe.indexOf(Qt.key);Ir=Fr!==-1,Ir&&Xe.splice(Fr,1)}mt=mt||Ir};Array.isArray(it)?it.forEach(Pt):Pt(it),mt&&("openKeys"in Ce.props||Ce.store.setState({openKeys:Xe}),_t.onOpenChange(Xe))},Ce.onDeselect=function(it){var xt=Object(j.a)(Ce),_t=xt.props;if(_t.selectable){var Xe=Ce.store.getState().selectedKeys.concat(),mt=it.key,Pt=Xe.indexOf(mt);Pt!==-1&&Xe.splice(Pt,1),"selectedKeys"in _t||Ce.store.setState({selectedKeys:Xe}),_t.onDeselect(Object(q.a)(Object(q.a)({},it),{},{selectedKeys:Xe}))}},Ce.onMouseEnter=function(it){Ce.restoreModeVerticalFromInline();var xt=Ce.props.onMouseEnter;xt&&xt(it)},Ce.onTransitionEnd=function(it){var xt=it.propertyName==="width"&&it.target===it.currentTarget,_t=it.target.className,Xe=Object.prototype.toString.call(_t)==="[object SVGAnimatedString]"?_t.animVal:_t,mt=it.propertyName==="font-size"&&Xe.indexOf("anticon")>=0;(xt||mt)&&Ce.restoreModeVerticalFromInline()},Ce.setInnerMenu=function(it){Ce.innerMenu=it},Ce.isRootMenu=!0;var Pe=tt.defaultSelectedKeys,pt=tt.defaultOpenKeys;return"selectedKeys"in tt&&(Pe=tt.selectedKeys||[]),"openKeys"in tt&&(pt=tt.openKeys||[]),Ce.store=Object(v.c)({selectedKeys:Pe,openKeys:pt,activeKey:{"0-menu-":lt(tt,tt.activeKey)}}),Ce.state={switchingModeFromInline:!1},Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ce){this.updateOpentKeysWhenSwitchMode(Ce),this.updateMiniStore();var Pe=this.props,pt=Pe.siderCollapsed,it=Pe.inlineCollapsed,xt=Pe.onOpenChange;(!Ce.inlineCollapsed&&it||!Ce.siderCollapsed&&pt)&&xt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Ce){var Pe=this.props,pt=this.store,it=this.inlineOpenKeys,xt=pt.getState(),_t={};Ce.mode==="inline"&&Pe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Pe||((Pe.inlineCollapsed&&!Ce.inlineCollapsed||Pe.siderCollapsed&&!Ce.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=xt.openKeys.concat(),_t.openKeys=[]),(!Pe.inlineCollapsed&&Ce.inlineCollapsed||!Pe.siderCollapsed&&Ce.siderCollapsed)&&(_t.openKeys=it,this.inlineOpenKeys=[])),Object.keys(_t).length&&pt.setState(_t)}},{key:"updateMenuDisplay",value:function(){var Ce=this.props.collapsedWidth,Pe=this.store,pt=this.prevOpenKeys,it=this.getInlineCollapsed()&&(Ce===0||Ce==="0"||Ce==="0px");it?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):pt&&(this.store.setState({openKeys:pt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ce=this.props.mode,Pe=this.state.switchingModeFromInline,pt=this.getInlineCollapsed();return Pe&&pt?"inline":pt?"vertical":Ce}},{key:"getInlineCollapsed",value:function(){var Ce=this.props,Pe=Ce.inlineCollapsed,pt=Ce.siderCollapsed;return pt!==void 0?pt:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var Ce=this.state.switchingModeFromInline;Ce&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Ce=Object(q.a)({},Object(T.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return Ce.className+=" ".concat(Ce.prefixCls,"-root"),Ce.direction==="rtl"&&(Ce.className+=" ".concat(Ce.prefixCls,"-rtl")),Ce=Object(q.a)(Object(q.a)({},Ce),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Me(this.props,this.state,Pe)}),delete Ce.openAnimation,delete Ce.openTransitionName,I.createElement(v.a,{store:this.store},I.createElement(je,Object.assign({},Ce,{ref:this.setInnerMenu}),this.props.children))}}]),nt}(I.Component);me.defaultProps={selectable:!0,onClick:M,onSelect:M,onOpenChange:M,onDeselect:M,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:I.createElement("span",null,"\xB7\xB7\xB7")};var ye=me,Ee=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.onKeyDown=function(Ce){var Pe=Ce.keyCode;return Pe===u.a.ENTER?(tt.onClick(Ce),!0):void 0},tt.onMouseLeave=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.onItemHover,xt=Pe.onMouseLeave;it({key:pt,hover:!1}),xt({key:pt,domEvent:Ce})},tt.onMouseEnter=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.onItemHover,xt=Pe.onMouseEnter;it({key:pt,hover:!0}),xt({key:pt,domEvent:Ce})},tt.onClick=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.multiple,xt=Pe.onClick,_t=Pe.onSelect,Xe=Pe.onDeselect,mt=Pe.isSelected,Pt={key:pt,keyPath:[pt],item:Object(j.a)(tt),domEvent:Ce};xt(Pt),it?mt?Xe(Pt):_t(Pt):mt||_t(Pt)},tt.saveNode=function(Ce){tt.node=Ce},tt}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ce=this.props;Ce.onDestroy&&Ce.onDestroy(Ce.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Ce,Pe=Object(q.a)({},this.props),pt=s()(this.getPrefixCls(),Pe.className,(Ce={},Object(n.a)(Ce,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(n.a)(Ce,this.getSelectedClassName(),Pe.isSelected),Object(n.a)(Ce,this.getDisabledClassName(),Pe.disabled),Ce)),it=Object(q.a)(Object(q.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:pt,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?it=Object(q.a)(Object(q.a)({},it),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(it.role="none");var xt={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},_t=Object(q.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?_t.paddingRight=Pe.inlineIndent*Pe.level:_t.paddingLeft=Pe.inlineIndent*Pe.level),_e.forEach(function(mt){return delete Pe[mt]}),delete Pe.direction;var Xe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Xe=I.createElement(this.props.itemIcon,this.props)),I.createElement("li",Object.assign({},Object(T.default)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),it,xt,{style:_t,ref:this.saveNode}),Pe.children,Xe)}}]),nt}(I.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:M,onMouseEnter:M,onMouseLeave:M,manualRef:M};var Oe=Object(v.b)(function(St,ut){var nt=St.activeKey,tt=St.selectedKeys,Ce=ut.eventKey,Pe=ut.subMenuKey;return{active:nt[Pe]===Ce,isSelected:tt.indexOf(Ce)!==-1}})(Ee),De=Oe,Ze=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.renderInnerMenuItem=function(Ce){var Pe=tt.props,pt=Pe.renderMenuItem,it=Pe.index;return pt(Ce,it,tt.props.subMenuKey)},tt}return Object(O.a)(nt,[{key:"render",value:function(){var Ce=Object(E.a)({},this.props),Pe=Ce.className,pt=Pe===void 0?"":Pe,it=Ce.rootPrefixCls,xt="".concat(it,"-item-group-title"),_t="".concat(it,"-item-group-list"),Xe=Ce.title,mt=Ce.children;return _e.forEach(function(Pt){return delete Ce[Pt]}),delete Ce.onClick,delete Ce.direction,I.createElement("li",Object.assign({},Ce,{className:"".concat(pt," ").concat(it,"-item-group")}),I.createElement("div",{className:xt,title:typeof Xe=="string"?Xe:void 0},Xe),I.createElement("ul",{className:_t},I.Children.map(mt,this.renderInnerMenuItem)))}}]),nt}(I.Component);Ze.isMenuItemGroup=!0,Ze.defaultProps={disabled:!0};var ht=Ze,Tt=function(ut){var nt=ut.className,tt=ut.rootPrefixCls,Ce=ut.style;return I.createElement("li",{className:"".concat(nt," ").concat(tt,"-item-divider"),style:Ce})};Tt.defaultProps={disabled:!0,className:"",style:{}};var kt=Tt,It=pe.e=ye},"24YM":function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.SensorTabIndex=pe.SensorClassName=pe.SizeSensorId=void 0;var q="size-sensor-id";pe.SizeSensorId=q;var Q="size-sensor-object";pe.SensorClassName=Q;var O="-1";pe.SensorTabIndex=O},"2DNl":function(qe,pe,G){var q=G("IMiH"),Q=G("loD1"),O=G("59Ip"),j=G("aKvl"),D=G("n1HI"),B=G("hX1E"),I=B.normalizeRadian,v=G("Sj9i"),T=G("hyiK"),E=q.CMD,n=Math.PI*2,u=1e-4;function c(x,L){return Math.abs(x-L)L&&m>h&&m>l&&m>C||m1&&d(),Z=v.cubicAt(L,h,l,C,i[0]),z>1&&(V=v.cubicAt(L,h,l,C,i[1]))),z===2?JL&&C>h&&C>l||C=0&&m<=1){for(var F=0,P=v.quadraticAt(L,h,l,m),z=0;zb||C<-b)return 0;var g=Math.sqrt(b*b-C*C);o[0]=-g,o[1]=g;var m=Math.abs(h-r);if(m<1e-4)return 0;if(m%n<1e-4){h=0,r=n;var F=l?1:-1;return f>=o[0]+x&&f<=o[1]+x?F:0}if(l){var g=h;h=I(r),r=I(g)}else h=I(h),r=I(r);h>r&&(r+=n);for(var P=0,z=0;z<2;z++){var Z=o[z];if(Z+x>f){var V=Math.atan2(C,Z),F=l?1:-1;V<0&&(V=n+V),(V>=h&&V<=r||V+n>=h&&V+n<=r)&&(V>Math.PI/2&&V1&&(b||(l+=T(f,C,g,m,h,r))),F===1&&(f=x[F],C=x[F+1],g=f,m=C);switch(P){case E.M:g=x[F++],m=x[F++],f=g,C=m;break;case E.L:if(b){if(Q.containStroke(f,C,x[F],x[F+1],L,h,r))return!0}else l+=T(f,C,x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.C:if(b){if(O.containStroke(f,C,x[F++],x[F++],x[F++],x[F++],x[F],x[F+1],L,h,r))return!0}else l+=s(f,C,x[F++],x[F++],x[F++],x[F++],x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.Q:if(b){if(j.containStroke(f,C,x[F++],x[F++],x[F],x[F+1],L,h,r))return!0}else l+=A(f,C,x[F++],x[F++],x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.A:var z=x[F++],Z=x[F++],V=x[F++],M=x[F++],J=x[F++],X=x[F++];F+=1;var re=1-x[F++],se=Math.cos(J)*V+z,_e=Math.sin(J)*M+Z;F>1?l+=T(f,C,se,_e,h,r):(g=se,m=_e);var ge=(h-z)*M/V+z;if(b){if(D.containStroke(z,Z,M,J,J+X,re,L,ge,r))return!0}else l+=a(z,Z,M,J,J+X,re,ge,r);f=Math.cos(J+X)*V+z,C=Math.sin(J+X)*M+Z;break;case E.R:g=f=x[F++],m=C=x[F++];var we=x[F++],Re=x[F++],se=g+we,_e=m+Re;if(b){if(Q.containStroke(g,m,se,m,L,h,r)||Q.containStroke(se,m,se,_e,L,h,r)||Q.containStroke(se,_e,g,_e,L,h,r)||Q.containStroke(g,_e,g,m,L,h,r))return!0}else l+=T(se,m,se,_e,h,r),l+=T(g,_e,g,m,h,r);break;case E.Z:if(b){if(Q.containStroke(f,C,g,m,L,h,r))return!0}else l+=T(f,C,g,m,h,r);f=g,C=m;break}}return!b&&!c(C,m)&&(l+=T(f,C,g,m,h,r)||0),l!==0}function w(x,L,b){return p(x,0,!1,L,b)}function S(x,L,b,h){return p(x,L,!0,b,h)}pe.contain=w,pe.containStroke=S},"2fw6":function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(O,j,D){D&&O.moveTo(j.cx+j.r,j.cy),O.arc(j.cx,j.cy,j.r,0,Math.PI*2,!0)}});qe.exports=Q},"3C/r":function(qe,pe){var G=function(Q,O){this.image=Q,this.repeat=O,this.type="pattern"};G.prototype.getCanvasPattern=function(Q){return Q.createPattern(this.image,this.repeat||"repeat")};var q=G;qe.exports=q},"3CBa":function(qe,pe,G){var q=G("hydK"),Q=q.createElement,O=G("bYtY"),j=G("SUKs"),D=G("y+Vt"),B=G("Dagg"),I=G("dqUG"),v=G("DBLp"),T=G("sW+o"),E=G("n6Mw"),n=G("vKoX"),u=G("P47w"),c=u.path,o=u.image,i=u.text;function d(r){return parseInt(r,10)}function s(r){return r instanceof D?c:r instanceof B?o:r instanceof I?i:c}function A(r,l){return l&&r&&l.parentNode!==r}function a(r,l,f){if(A(r,l)&&f){var C=f.nextSibling;C?r.insertBefore(l,C):r.appendChild(l)}}function p(r,l){if(A(r,l)){var f=r.firstChild;f?r.insertBefore(l,f):r.appendChild(l)}}function w(r,l){l&&r&&l.parentNode===r&&r.removeChild(l)}function S(r){return r.__textSvgEl}function x(r){return r.__svgEl}var L=function(r,l,f,C){this.root=r,this.storage=l,this._opts=f=O.extend({},f||{});var g=Q("svg");g.setAttribute("xmlns","http://www.w3.org/2000/svg"),g.setAttribute("version","1.1"),g.setAttribute("baseProfile","full"),g.style.cssText="user-select:none;position:absolute;left:0;top:0;";var m=Q("g");g.appendChild(m);var F=Q("g");g.appendChild(F),this.gradientManager=new T(C,F),this.clipPathManager=new E(C,F),this.shadowManager=new n(C,F);var P=document.createElement("div");P.style.cssText="overflow:hidden;position:relative",this._svgDom=g,this._svgRoot=F,this._backgroundRoot=m,this._viewport=P,r.appendChild(P),P.appendChild(g),this.resize(f.width,f.height),this._visibleList=[]};L.prototype={constructor:L,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},refresh:function(){var r=this.storage.getDisplayList(!0);this._paintList(r)},setBackgroundColor:function(r){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var l=Q("rect");l.setAttribute("width",this.getWidth()),l.setAttribute("height",this.getHeight()),l.setAttribute("x",0),l.setAttribute("y",0),l.setAttribute("id",0),l.style.fill=r,this._backgroundRoot.appendChild(l),this._backgroundNode=l},_paintList:function(r){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var l=this._svgRoot,f=this._visibleList,C=r.length,g=[],m;for(m=0;m=0;--F)if(m[F]===g)return!0;return!1}),f}else return null;else return f[0]},resize:function(r,l){var f=this._viewport;f.style.display="none";var C=this._opts;if(r!=null&&(C.width=r),l!=null&&(C.height=l),r=this._getSize(0),l=this._getSize(1),f.style.display="",this._width!==r||this._height!==l){this._width=r,this._height=l;var g=f.style;g.width=r+"px",g.height=l+"px";var m=this._svgDom;m.setAttribute("width",r),m.setAttribute("height",l)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",r),this._backgroundNode.setAttribute("height",l))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(r){var l=this._opts,f=["width","height"][r],C=["clientWidth","clientHeight"][r],g=["paddingLeft","paddingTop"][r],m=["paddingRight","paddingBottom"][r];if(l[f]!=null&&l[f]!=="auto")return parseFloat(l[f]);var F=this.root,P=document.defaultView.getComputedStyle(F);return(F[C]||d(P[f])||d(F.style[f]))-(d(P[g])||0)-(d(P[m])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var r=encodeURIComponent(this._svgDom.outerHTML.replace(/>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+r}};function b(r){return function(){j('In SVG mode painter not support method "'+r+'"')}}O.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(r){L.prototype[r]=b(r)});var h=L;qe.exports=h},"3e3G":function(qe,pe,G){var q=G("bYtY"),Q=G("QuXc"),O=function(D,B,I,v,T){this.x=D==null?.5:D,this.y=B==null?.5:B,this.r=I==null?.5:I,this.type="radial",this.global=T||!1,Q.call(this,v)};O.prototype={constructor:O},q.inherits(O,Q);var j=O;qe.exports=j},"3gBT":function(qe,pe){var G=2311;function q(){return G++}qe.exports=q},"49sm":function(qe,pe){var G={}.toString;qe.exports=Array.isArray||function(q){return G.call(q)=="[object Array]"}},"4fz+":function(qe,pe,G){var q=G("bYtY"),Q=G("1bdT"),O=G("mFDi"),j=function(B){B=B||{},Q.call(this,B);for(var I in B)B.hasOwnProperty(I)&&(this[I]=B[I]);this._children=[],this.__storage=null,this.__dirty=!0};j.prototype={constructor:j,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(B){return this._children[B]},childOfName:function(B){for(var I=this._children,v=0;v=0&&(v.splice(T,0,B),this._doAdd(B))}return this},_doAdd:function(B){B.parent&&B.parent.remove(B),B.parent=this;var I=this.__storage,v=this.__zr;I&&I!==B.__storage&&(I.addToStorage(B),B instanceof j&&B.addChildrenToStorage(I)),v&&v.refresh()},remove:function(B){var I=this.__zr,v=this.__storage,T=this._children,E=q.indexOf(T,B);return E<0?this:(T.splice(E,1),B.parent=null,v&&(v.delFromStorage(B),B instanceof j&&B.delChildrenFromStorage(v)),I&&I.refresh(),this)},removeAll:function(){var B=this._children,I=this.__storage,v,T;for(T=0;T1e-4){b[0]=A-p,b[1]=a-w,h[0]=A+p,h[1]=a+w;return}if(v[0]=B(S)*p+A,v[1]=D(S)*w+a,T[0]=B(x)*p+A,T[1]=D(x)*w+a,r(b,v,T),l(h,v,T),S=S%I,S<0&&(S=S+I),x=x%I,x<0&&(x=x+I),S>x&&!L?x+=I:SS&&(E[0]=B(g)*p+A,E[1]=D(g)*w+a,r(b,E,b),l(h,E,h))}pe.fromPoints=n,pe.fromLine=u,pe.fromCubic=i,pe.fromQuadratic=d,pe.fromArc=s},"55Ip":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return a});var q=G("Ty5D"),Q=G("dI71"),O=G("q1tI"),j=G.n(O),D=G("YS25"),B=G("17x9"),I=G.n(B),v=G("wx14"),T=G("zLVn"),E=G("9R94"),n=function(r){Object(Q.a)(l,r);function l(){for(var C,g=arguments.length,m=new Array(g),F=0;Fj+o&&c>B+o&&c>v+o&&c>E+o||cO+o&&u>D+o&&u>I+o&&u>T+o||u\u5B66\u53F7\uFF1A "+Rt.user_id+"
\u6548\u7387\uFF1A"+((Or=Rt.echart_data)===null||Or===void 0?void 0:Or.myself_eff[1])}else return pr.name+":"+pr.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:(Kt=Rt.echart_data)===null||Kt===void 0?void 0:Kt.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:Rt.username,xAxis:Qt,yAxis:(Ur=Rt.echart_data)===null||Ur===void 0?void 0:Ur.myself_eff[1],value:(Kr=Rt.echart_data)===null||Kr===void 0?void 0:Kr.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},Fr=function(){var Kt,Ur,Kr,Rr;return{title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Or){var pn=Or.value;if(Or.name===Rt.username){var un;return"\u59D3\u540D\uFF1A"+Rt.username+"
\u5B66\u53F7\uFF1A "+Rt.user_id+"
\u5F97\u5206\uFF1A"+((un=Rt.echart_data)===null||un===void 0?void 0:un.myself_object[1])}}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Re,data:(Kt=Rt.echart_data)===null||Kt===void 0?void 0:Kt.consume_list,symbolSize:function(Or){return Math.round(Or[2])},markPoint:{data:[{name:Rt.username,xAxis:(Ur=Rt.echart_data)===null||Ur===void 0?void 0:Ur.myself_object[0],yAxis:(Kr=Rt.echart_data)===null||Kr===void 0?void 0:Kr.myself_object[1],value:(Rr=Rt.echart_data)===null||Rr===void 0?void 0:Rr.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return r.a.createElement(r.a.Fragment,null,r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(v.a,null,r.a.createElement(u.a,{flex:"800px"},r.a.createElement(_e.a,{style:{width:750,height:580},option:Ir()})),r.a.createElement(u.a,{flex:"1"},r.a.createElement("aside",{className:we.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Rt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Rt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",r.a.createElement("span",{className:"ml30 c-orange"},(ht=Rt.echart_data)===null||ht===void 0?void 0:ht.myself_eff[1])),r.a.createElement("li",null,r.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Tt=Rt.echart_data)===null||Tt===void 0?void 0:Tt.myself_eff[0]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",r.a.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(v.a,null,r.a.createElement(u.a,{flex:"800px"},r.a.createElement(_e.a,{style:{width:750,height:580},option:Fr()})),r.a.createElement(u.a,{flex:"1"},r.a.createElement("aside",{className:we.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Rt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Rt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u80FD\u529B")," ",r.a.createElement("span",{className:"ml30 c-orange"},(kt=Rt.echart_data)===null||kt===void 0?void 0:kt.myself_object[1]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",r.a.createElement("br",null)))))))},Se=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(He),Te=G("giR+"),$e=G("fyUT"),bt=function(Ee){var Oe=Ee.defaultValue,De=Ee.onBlur,Ze=Ee.max,ht=Ee.className,Tt=ht===void 0?"game-score":ht,kt=Object(h.useState)(Oe),It=Object(S.a)(kt,2),St=It[0],ut=It[1];Object(h.useEffect)(function(){ut(Oe)},[Oe]);function nt(Ce){ut(Ce)}function tt(){St!==Oe&&De(St>Ze?Ze:St)}return r.a.createElement($e.a,{max:Ze,min:0,className:Tt,value:St,onChange:nt,onBlur:tt})},Ie=G("OaEy"),ze=G("2fM7"),at=G("ZW9T"),Ae=G("Ot1p"),ne=G("1eJ8"),ae=G.n(ne),ce=ze.a.Option,xe={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Fe;(function(Ee){Ee[Ee.SET_PATH=0]="SET_PATH",Ee[Ee.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Fe||(Fe={}));function ke(Ee,Oe){switch(Oe.type){case Fe.SET_PATH:return Object(w.a)(Object(w.a)({},Ee),{},{selectedPath:Oe.payload});case Fe.GET_PASSED_CONTENT:return Object(w.a)(Object(w.a)({},Ee),{},{passedContent:Oe.payload});default:throw new Error}}var ct=function(Ee){var Oe,De,Ze,ht,Tt=Ee.path,kt=Ee.game_id,It=Ee.onPathChange,St=Ee.autoHeight,ut=Ee.diff_code_count,nt=Ee.data,tt=Ee.game_codes_cn,Ce=Tt.split("\uFF1B").filter(function(Rt){return!!Rt}),Pe=Object(h.useReducer)(ke,{selectedPath:Ce[0],passedContent:{language:"python",content:""}}),pt=Object(S.a)(Pe,2),it=pt[0],xt=pt[1],_t=it.selectedPath,Xe=it.passedContent;function mt(Rt){xt({type:Fe.SET_PATH,payload:Rt})}var Pt={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return console.log(nt,22),r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null," ",r.a.createElement("span",null,tt,tt&&r.a.createElement("span",{className:"ml5 font12 c-grey-999"},Pt[tt])),ut&&r.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ut),r.a.createElement("span",null,r.a.createElement(ze.a,{style:{width:200},value:_t,onChange:mt}," ",Ce.map(function(Rt){return r.a.createElement(ce,{key:Rt,value:Rt},Rt)})," "))," "),(_t==null?void 0:_t.split(".")[1])==="md"&&r.a.createElement(Ae.a,{height:300,autoHeight:St,defaultValue:(nt==null||((Oe=nt.filter(function(Rt){return Rt.path===_t}))===null||Oe===void 0||((De=Oe[0])===null||De===void 0))?void 0:De.content)||"",className:ae.a.md}),(_t==null?void 0:_t.split(".")[1])!=="md"&&r.a.createElement(at.b,{height:300,language:Xe.language,value:(nt==null||((Ze=nt.filter(function(Rt){return Rt.path===_t}))===null||Ze===void 0||((ht=Ze[0])===null||ht===void 0))?void 0:ht.content)||"",autoHeight:St,theme:"default",options:xe}))},ft=G("ErOA"),yt=function(Oe){var De=Oe.shixunHomeworks,Ze=Oe.autoHeight,ht=Oe.dispatch,Tt=De.shixunWorkReport,kt=Tt.stage_list,It=Tt.work_id,St=Object(m.i)(),ut=Object(X.c)(),nt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time"},{title:"\u5185\u5B58\u6D88\u8017(MB)",dataIndex:"ts_mem"}];function tt(it,xt){return Ce.apply(this,arguments)}function Ce(){return Ce=Object(a.a)(b.a.mark(function it(xt,_t){var Xe,mt;return b.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Xe=kt[xt].challenge_id,Rt.next=3,ht({type:"shixunHomeworks/changeScore",payload:{categoryId:St.homeworkId,type:"report",score:_t,challenge_id:Xe}});case 3:return mt=Rt.sent,Rt.next=6,ht({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},St)});case 6:mt.status===0&&d.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return Rt.stop()}},it)})),Ce.apply(this,arguments)}function Pe(it,xt){return Object(ft.c)("student_works/".concat(It,"/rep_passed_content.json"),{path:xt,game_id:it})}var pt=Object(re.p)(5,Tt.shixun_detail);return r.a.createElement(r.a.Fragment,null,pt==null?void 0:pt.map(function(it,xt){return r.a.createElement("div",{key:xt},it.map(function(_t,Xe){var mt;return r.a.createElement("aside",{className:"pl30 pr30",key:Xe},r.a.createElement("div",{className:"".concat(we.a.shixunTitle," mt10")},r.a.createElement("div",null,r.a.createElement("span",{className:"fa fa-code "}),r.a.createElement("strong",{className:"c-black"},"\u7B2C",xt*5+Xe+1,"\u5173 ",r.a.createElement(P.a,{className:"c-black",to:"/tasks/".concat(_t.game_identifier)},_t.subject))),ut?r.a.createElement("span",null,"\u8C03\u5206\uFF1A",r.a.createElement(bt,{className:"game-score",max:kt[Xe].game_score_full,defaultValue:kt[Xe].game_score,onBlur:function(Rt){tt(Xe,Rt)}})):null),r.a.createElement("div",{className:"font16 mt10"},_t.st===0&&(_t.path?r.a.createElement("aside",{className:we.a.shixunWrp},r.a.createElement(ct,{game_codes_cn:_t==null?void 0:_t.game_codes_cn,autoHeight:Ze,path:_t.path,game_id:_t.id,data:_t.game_codes,diff_code_count:_t.diff_code_count,onPathChange:Pe})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),_t.st===1&&(_t.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),r.a.createElement("aside",{className:"mt10 font16"},(mt=_t.outputs)!==null&&mt!==void 0&&mt.length?r.a.createElement(j.a,{columns:nt,pagination:{hideOnSinglePage:!0},dataSource:_t.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},Et=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(yt),Ot=G("5NDa"),Mt=G("5rEg"),Qe=G("y8nQ"),Ne=G("Vl3Y"),lt=function(Oe){var De=Oe.shixunHomeworks,Ze=Oe.dispatch,ht=Object(x.a)(Oe,["shixunHomeworks","dispatch"]),Tt=Object(m.i)(),kt=Object(h.useState)(!1),It=Object(S.a)(kt,2),St=It[0],ut=It[1],nt=Ne.a.useForm(),tt=Object(S.a)(nt,1),Ce=tt[0];Object(h.useEffect)(function(){var pt,it,xt,_t;De.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Ce.setFieldsValue({comment:(pt=De.actionTabs.selectArrs)===null||pt===void 0||((it=pt.data)===null||it===void 0)?void 0:it.work_comment,hidden_comment:(xt=De.actionTabs.selectArrs)===null||xt===void 0||((_t=xt.data)===null||_t===void 0)?void 0:_t.work_comment_hidden})},[De.actionTabs.key]);var Pe=function(){var pt=Object(a.a)(b.a.mark(function it(){var xt,_t;return b.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return xt=Ce.getFieldValue(),mt.next=3,Object(ft.a)("/api/student_works/".concat(Tt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:xt.hidden_comment,comment:xt.comment}});case 3:_t=mt.sent,_t.status===0&&(d.b.success("\u8BC4\u9605\u6210\u529F"),Ce.resetFields(),Ze({type:"shixunHomeworks/setActionTabs",payload:{}}),Ze({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},Tt)}));case 5:case"end":return mt.stop()}},it)}));return function(){return pt.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(A.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:De.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(a.a)(b.a.mark(function pt(){var it;return b.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:it=Ce.getFieldValue(),JSON.stringify(it)==="{}"||it.hidden_comment===""&&it.comment===""?ut(!0):Pe();case 2:case"end":return _t.stop()}},pt)})),onCancel:function(){Ze({type:"shixunHomeworks/setActionTabs",payload:{}})}},r.a.createElement(Ne.a,{form:Ce,onChange:function(){St&&ut(!1)}},r.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Ne.a.Item,{name:"comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),r.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Ne.a.Item,{name:"hidden_comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),St&&r.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},dt=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks;return{shixunHomeworks:Oe}})(lt),Ye=G("Xm8N"),st=G("9Bee"),je=G("XYT7"),Le=G("1n7x"),Me=G.n(Le),me=function(Oe){var De,Ze,ht=Oe.shixunHomeworks,Tt=Oe.globalSetting,kt=Oe.loading,It=Oe.dispatch,St=Object(x.a)(Oe,["shixunHomeworks","globalSetting","loading","dispatch"]),ut=Object(h.useState)(Object(w.a)({},Object(m.i)())),nt=Object(S.a)(ut,2),tt=nt[0],Ce=nt[1],Pe=Object(m.i)(),pt=Object(h.useState)([]),it=Object(p.a)(pt),xt=Object(h.useState)({last:!1}),_t=Object(S.a)(xt,2),Xe=_t[0],mt=_t[1],Pt=Object(h.useState)({last:!1}),Rt=Object(S.a)(Pt,2),Qt=Rt[0],Ir=Rt[1],Fr=Object(h.useRef)(),wr=Object(h.useRef)(),Kt=Object(h.useState)(!1),Ur=Object(S.a)(Kt,2),Kr=Ur[0],Rr=Ur[1],pr=Object(h.useState)(!1),Or=Object(S.a)(pr,2),pn=Or[0],un=Or[1],fe=Object(h.useState)(!1),be=Object(S.a)(fe,2),Ue=be[0],rt=be[1],et=ht.shixunWorkReport,Dt=Object(X.c)(),ee=Object(h.useState)(new g.a),U=Object(S.a)(ee,2),N=U[0],$=U[1],le=Object(h.useState)(0),te=Object(S.a)(le,2),Ke=te[0],Ct=te[1],Ut=Object(h.useState)([]),Ht=Object(S.a)(Ut,2),wt=Ht[0],Yt=Ht[1],Xt=Object(h.useState)(!1),qt=Object(S.a)(Xt,2),Ar=qt[0],Br=qt[1],yr=Object(h.useState)(!1),Lr=Object(S.a)(yr,2),cr=Lr[0],Dr=Lr[1];Object(h.useEffect)(function(){return It({type:"globalSetting/footerToggle",payload:!1}),function(){It({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(h.useEffect)(function(){ht.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&wt.length>0&&$r("all")},[wt]),Object(h.useEffect)(function(){Ce(Object(w.a)({},Pe))},[St.location.pathname]);var Pr=function(){document.body.scrollIntoView()};function An(){return zr.apply(this,arguments)}function zr(){return zr=Object(a.a)(b.a.mark(function br(){var dr,tr,nr,$t,vr,mr,xr;return b.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),On.next=3,It({type:"shixunHomeworks/getAllStudentWorks",payload:Object(w.a)(Object(w.a)({},tt),nr)});case 3:$t=On.sent,Yt($t.all_student_works),vr=(dr=$t.all_student_works)===null||dr===void 0?void 0:dr.map(function(Gr){return String(Gr.student_work_id)}).indexOf(tt.homeworkId),vr===((tr=$t.all_student_works)===null||tr===void 0?void 0:tr.length)-1?mt({last:!0}):mt((mr=$t.all_student_works)===null||mr===void 0?void 0:mr[vr+1]),vr===0?Ir({last:!0}):Ir((xr=$t.all_student_works)===null||xr===void 0?void 0:xr[vr-1]);case 8:case"end":return On.stop()}},br)})),zr.apply(this,arguments)}var Jr=function(){document.querySelectorAll("canvas").forEach(function(dr){(!dr.clientWidth||!dr.clientHeight)&&dr.remove()})},bn=function(){Fr.current.offsetHeight>62e3?rt(!1):rt(!0)},$r=function(){var br=Object(a.a)(b.a.mark(function dr(tr){var nr,$t,vr,mr,xr,Er;return b.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(xr=function(){return xr=Object(a.a)(b.a.mark(function Qn(){var wn;return b.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,It({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:wt[nr].student_work_id}});case 2:wn=Ln.sent,Pr(),nr++,setTimeout(Object(a.a)(b.a.mark(function In(){var Jn,Fn,si,Un,gn,kn,er;return b.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:Jr(),Fn=N.folder("".concat(wn==null?void 0:wn.username)),si=document.querySelector("#export-all").children,Un=Me()(),gn=b.a.mark(function gr(Tr){return b.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.next=2,Un.set(vr).from(si[Tr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var on=Object(a.a)(b.a.mark(function Dn(Mr){return b.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(!(Tr"},r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework")},et.course_name)),r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.category.main?"":et.category.category_id)},et.category.category_name)),r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),r.a.createElement(o.a.Item,null,et.username))),r.a.createElement("aside",{className:[we.a.title1,"mt20"].join(" ")},r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:1},r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.homework_common_id,"/detail")},r.a.createElement(z.a,{className:"font16 c-black"})),r.a.createElement("strong",{className:"font20 ml5"},et.shixun_name),r.a.createElement(re.m,{temporary:!0,status:et.homework_status})),r.a.createElement(u.a,{className:we.a.title1_right},et.view_tpi&&r.a.createElement(E.a,null,r.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),r.a.createElement(P.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(et==null||((De=et.shixun_detail)===null||De===void 0||((Ze=De[0])===null||Ze===void 0))?void 0:Ze.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(X.c)()&&et.homework_end===!1&&!!et.myshixun_id&&r.a.createElement(E.a,{className:"ml10",onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:et.myshixun_identifier}}});case 2:case"end":return tr.stop()}},br)}))},r.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),r.a.createElement(E.a,{className:"ml10",onClick:function(){return $r("")},loading:Kr},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(X.c)()&&(wt==null?void 0:wt.length)>1&&r.a.createElement(E.a,{className:"ml10",onClick:function(){return $r("all")}},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),r.a.createElement("aside",{className:"mt30 relative"})),r.a.createElement("aside",{className:"edu-container bg-white",ref:Fr},r.a.createElement("div",{id:"export-all",ref:wr},r.a.createElement("div",{id:"export-all-1"},r.a.createElement("div",{className:we.a.title},r.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),r.a.createElement("div",null,Object(X.c)()&&r.a.createElement(E.a,{className:"mr20",type:"primary",onClick:function(){It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:et.user_id,data:Object(w.a)({},et)}}})}},r.a.createElement(Z.a,null),et.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),r.a.createElement(B.a,{style:{marginTop:0}}),r.a.createElement(v.a,{className:"pl30 pr30"},r.a.createElement(u.a,null,r.a.createElement("img",{className:we.a.userPic,src:"".concat(J.a.IMG_SERVER,"/images/").concat(et.image_url),alt:et.username})),r.a.createElement(u.a,null,r.a.createElement("span",{className:"font16 ml40"},et.username),r.a.createElement(re.g,{status:et.compelete_status}),r.a.createElement("ul",{className:we.a.userInfo},r.a.createElement("li",null,"\u5B66\u53F7\uFF1A",et.student_id||"--"),r.a.createElement("li",null,"\u5206\u73ED\uFF1A",et.group_name||"--"),r.a.createElement("br",null),r.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},et.complete_count),"/",r.a.createElement("span",{className:"c-red"},et.challenges_count)),r.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},et.current_complete_count||"-"),"/",r.a.createElement("span",{className:"c-red"},et.challenges_count)),r.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",et&&et.efficiency===null?"--":et&&et.efficiency),r.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",et&&et.max_efficiency===null?"--":et&&et.max_efficiency))),r.a.createElement("ul",{className:[we.a.listItem,"mt10"].join(" ")},r.a.createElement("li",null,r.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),r.a.createElement("div",{className:"c-light-black mt20"},et&&et.passed_time===null||et&&et.passed_time==="--"?"--":f()(et&&et.passed_time).format("YYYY-MM-DD HH:mm"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Br(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},et==null?void 0:et.human_training_time_rules)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Dr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},et.time_consuming)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),r.a.createElement("div",{className:"mt20"},et.evaluate_count)),(et==null?void 0:et.eff_score_full)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,r.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.challenge_score),"/",r.a.createElement("span",{className:"c-light-black"},et.challenge_score_full))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6548\u7387\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.eff_score),"/",r.a.createElement("span",{className:"c-light-black"},et.eff_score_full)))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",null,et.late_penalty||"- -"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.work_score),"/",r.a.createElement("span",{className:"c-light-black"},et.all_work_score))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u603B\u8BC4"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.overall_appraisal))))),r.a.createElement(B.a,{style:{margin:0}}),(et.work_comment_hidden||et.work_comment)&&r.a.createElement("div",null,r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:1},r.a.createElement("h1",{className:we.a.title},"\u70B9\u8BC4\u5185\u5BB9")),r.a.createElement(u.a,{className:"pr30"},Object(X.c)()&&r.a.createElement(E.a,{onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:A.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:r.a.createElement(V.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(a.a)(b.a.mark(function $t(){var vr;return b.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Object(je.m)({comment_id:et.comment_id,homeworkId:tt.homeworkId});case 2:vr=xr.sent,vr.status===0&&(d.b.success("\u5220\u9664\u6210\u529F"),It({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},tt)}));case 4:case"end":return xr.stop()}},$t)}))()}});case 1:case"end":return tr.stop()}},br)}))},r.a.createElement(M.a,null),"\u5220\u9664"))),r.a.createElement(B.a,{style:{margin:0}}),et.work_comment&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:et.work_comment})),et.work_comment_hidden&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:et.work_comment_hidden}))),r.a.createElement("h1",{className:we.a.title},"\u9636\u6BB5\u6210\u7EE9"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(j.a,{dataSource:et.stage_list,pagination:!1,columns:cn})),(et==null?void 0:et.work_description)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:we.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(st.a,{value:et==null?void 0:et.work_description}))),r.a.createElement("h1",{className:we.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),r.a.createElement(Se,null),r.a.createElement("h1",{className:we.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),r.a.createElement(Et,{autoHeight:Ue}))),Object(X.c)()&&r.a.createElement("aside",{className:"".concat(we.a.footerBar," ").concat(Kr?we.a.footerBarStatic:"")},r.a.createElement("aside",{className:"edu-container"},r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:"1"},r.a.createElement(P.a,{className:we.a.exitComment,to:"/classrooms/".concat(tt.coursesId,"/shixun_homework/").concat(tt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),r.a.createElement(u.a,{flex:"1",className:"tr"},r.a.createElement(E.a,{type:"default",disabled:Qt==null?void 0:Qt.last,onClick:function(){return mn()}},"\u4E0A\u4E00\u4E2A"),r.a.createElement(E.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:Xe==null?void 0:Xe.last,onClick:function(){return mn("next")}},"\u4E0B\u4E00\u4E2A"),Object(X.c)()&&r.a.createElement(E.a,{type:"primary",onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:et.user_id,data:Object(w.a)({},et)}}});case 1:case"end":return tr.stop()}},br)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),r.a.createElement(dt,null),r.a.createElement(Ye.a,null),r.a.createElement(A.a,{visible:Ar,width:860,centered:!0,onCancel:function(){Br(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},r.a.createElement("div",{style:{color:"#333333",fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),r.a.createElement("br",null),r.a.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),r.a.createElement(A.a,{visible:cr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Dr(!1)},width:600},r.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},r.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},ye=pe.default=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(me)},"6+eU":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return x});var q=G("wx14"),Q=G("rePB"),O=G("VTBJ"),j=G("1OyB"),D=G("vuIU"),B=G("Ji7U"),I=G("LK+K"),v=G("q1tI"),T=G.n(v),E=G("TSYQ"),n=G.n(E),u=function(b){var h,r="".concat(b.rootPrefixCls,"-item"),l=n()(r,"".concat(r,"-").concat(b.page),(h={},Object(Q.a)(h,"".concat(r,"-active"),b.active),Object(Q.a)(h,b.className,!!b.className),Object(Q.a)(h,"".concat(r,"-disabled"),!b.page),h)),f=function(){b.onClick(b.page)},C=function(m){b.onKeyPress(m,b.onClick,b.page)};return T.a.createElement("li",{title:b.showTitle?b.page:null,className:l,onClick:f,onKeyPress:C,tabIndex:"0"},b.itemRender(b.page,"page",T.a.createElement("a",{rel:"nofollow"},b.page)))},c=u,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(L){Object(B.a)(h,L);var b=Object(I.a)(h);function h(){var r;Object(j.a)(this,h);for(var l=arguments.length,f=new Array(l),C=0;C=0||g.relatedTarget.className.indexOf("".concat(z,"-next"))>=0))return;r.setState({goInputText:""}),P(r.getValidValue())},r.go=function(g){var m=r.state.goInputText;if(m==="")return;(g.keyCode===o.ENTER||g.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Object(D.a)(h,[{key:"getValidValue",value:function(){var l=this.state,f=l.goInputText,C=l.current;return!f||isNaN(f)?C:Number(f)}},{key:"getPageSizeOptions",value:function(){var l=this.props,f=l.pageSize,C=l.pageSizeOptions;return C.some(function(g){return g.toString()===f.toString()})?C:C.concat([f.toString()]).sort(function(g,m){var F=isNaN(Number(g))?0:Number(g),P=isNaN(Number(m))?0:Number(m);return F-P})}},{key:"render",value:function(){var l=this,f=this.props,C=f.pageSize,g=f.locale,m=f.rootPrefixCls,F=f.changeSize,P=f.quickGo,z=f.goButton,Z=f.selectComponentClass,V=f.buildOptionText,M=f.selectPrefixCls,J=f.disabled,X=this.state.goInputText,re="".concat(m,"-options"),se=Z,_e=null,ge=null,we=null;if(!F&&!P)return null;var Re=this.getPageSizeOptions();if(F&&se){var He=Re.map(function(Se,Te){return T.a.createElement(se.Option,{key:Te,value:Se.toString()},(V||l.buildOptionText)(Se))});_e=T.a.createElement(se,{disabled:J,prefixCls:M,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Te){return Te.parentNode}},He)}return P&&(z&&(we=typeof z=="boolean"?T.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:J,className:"".concat(re,"-quick-jumper-button")},g.jump_to_confirm):T.a.createElement("span",{onClick:this.go,onKeyUp:this.go},z)),ge=T.a.createElement("div",{className:"".concat(re,"-quick-jumper")},g.jump_to,T.a.createElement("input",{disabled:J,type:"text",value:X,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,we)),T.a.createElement("li",{className:"".concat(re)},_e,ge)}}]),h}(T.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=i,s=G("N2Kk");function A(){}function a(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function p(L,b,h){return h}function w(L,b,h){var r=typeof L=="undefined"?b.pageSize:L;return Math.floor((h.total-1)/r)+1}var S=function(L){Object(B.a)(h,L);var b=Object(I.a)(h);function h(r){var l;Object(j.a)(this,h),l=b.call(this,r),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(w(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(F,P){var z=l.props.prefixCls,Z=F||T.a.createElement("button",{type:"button","aria-label":P,className:"".concat(z,"-item-link")});return typeof F=="function"&&(Z=T.a.createElement(F,Object(O.a)({},l.props))),Z},l.savePaginationNode=function(F){l.paginationNode=F},l.isValid=function(F){return a(F)&&F!==l.state.current},l.shouldDisplayQuickJumper=function(){var F=l.props,P=F.showQuickJumper,z=F.pageSize,Z=F.total;return Z<=z?!1:P},l.handleKeyDown=function(F){(F.keyCode===o.ARROW_UP||F.keyCode===o.ARROW_DOWN)&&F.preventDefault()},l.handleKeyUp=function(F){var P=l.getValidValue(F),z=l.state.currentInputValue;P!==z&&l.setState({currentInputValue:P}),F.keyCode===o.ENTER?l.handleChange(P):F.keyCode===o.ARROW_UP?l.handleChange(P-1):F.keyCode===o.ARROW_DOWN&&l.handleChange(P+1)},l.changePageSize=function(F){var P=l.state.current,z=w(F,l.state,l.props);P=P>z?z:P,z===0&&(P=l.state.current),typeof F=="number"&&("pageSize"in l.props||l.setState({pageSize:F}),"current"in l.props||l.setState({current:P,currentInputValue:P})),l.props.onShowSizeChange(P,F),"onChange"in l.props&&l.props.onChange&&l.props.onChange(P,F)},l.handleChange=function(F){var P=l.props.disabled,z=F;if(l.isValid(z)&&!P){var Z=w(void 0,l.state,l.props);z>Z?z=Z:z<1&&(z=1),"current"in l.props||l.setState({current:z,currentInputValue:z});var V=l.state.pageSize;return l.props.onChange(z,V),z}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current2?z-2:0),V=2;V=C?m=C:m=Number(f),m}},{key:"getShowSizeChanger",value:function(){var l=this.props,f=l.showSizeChanger,C=l.total,g=l.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:C>g}},{key:"renderPrev",value:function(l){var f=this.props,C=f.prevIcon,g=f.itemRender,m=g(l,"prev",this.getItemIcon(C,"prev page")),F=!this.hasPrev();return Object(v.isValidElement)(m)?Object(v.cloneElement)(m,{disabled:F}):m}},{key:"renderNext",value:function(l){var f=this.props,C=f.nextIcon,g=f.itemRender,m=g(l,"next",this.getItemIcon(C,"next page")),F=!this.hasNext();return Object(v.isValidElement)(m)?Object(v.cloneElement)(m,{disabled:F}):m}},{key:"render",value:function(){var l=this,f=this.props,C=f.prefixCls,g=f.className,m=f.style,F=f.disabled,P=f.hideOnSinglePage,z=f.total,Z=f.locale,V=f.showQuickJumper,M=f.showLessItems,J=f.showTitle,X=f.showTotal,re=f.simple,se=f.itemRender,_e=f.showPrevNextJumpers,ge=f.jumpPrevIcon,we=f.jumpNextIcon,Re=f.selectComponentClass,He=f.selectPrefixCls,Se=f.pageSizeOptions,Te=this.state,$e=Te.current,bt=Te.pageSize,Ie=Te.currentInputValue;if(P===!0&&z<=bt)return null;var ze=w(void 0,this.state,this.props),at=[],Ae=null,ne=null,ae=null,ce=null,xe=null,Fe=V&&V.goButton,ke=M?1:2,ct=$e-1>0?$e-1:0,ft=$e+1=ke*2&&$e!==1+2&&(at[0]=Object(v.cloneElement)(at[0],{className:"".concat(C,"-item-after-jump-prev")}),at.unshift(Ae)),ze-$e>=ke*2&&$e!==ze-2&&(at[at.length-1]=Object(v.cloneElement)(at[at.length-1],{className:"".concat(C,"-item-before-jump-next")}),at.push(ne)),lt!==1&&at.unshift(ae),dt!==ze&&at.push(ce)}var je=null;X&&(je=T.a.createElement("li",{className:"".concat(C,"-total-text")},X(z,[z===0?0:($e-1)*bt+1,$e*bt>z?z:$e*bt])));var Le=!this.hasPrev()||!ze,Me=!this.hasNext()||!ze;return T.a.createElement("ul",Object(q.a)({className:n()(C,g,Object(Q.a)({},"".concat(C,"-disabled"),F)),style:m,unselectable:"unselectable",ref:this.savePaginationNode},yt),je,T.a.createElement("li",{title:J?Z.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(C,"-prev"),Object(Q.a)({},"".concat(C,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(ct)),at,T.a.createElement("li",{title:J?Z.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(C,"-next"),Object(Q.a)({},"".concat(C,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(ft)),T.a.createElement(d,{disabled:F,locale:Z,rootPrefixCls:C,selectComponentClass:Re,selectPrefixCls:He,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:$e,pageSize:bt,pageSizeOptions:Se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Fe}))}}],[{key:"getDerivedStateFromProps",value:function(l,f){var C={};if("current"in l&&(C.current=l.current,l.current!==f.current&&(C.currentInputValue=C.current)),"pageSize"in l&&l.pageSize!==f.pageSize){var g=f.current,m=w(l.pageSize,f,l);g=g>m?m:g,"current"in l||(C.current=g,C.currentInputValue=g),C.pageSize=l.pageSize}return C}}]),h}(T.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:A,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:A,locale:s.a,style:{},itemRender:p,totalBoundaryShowSizeChanger:50};var x=S},"6GrX":function(qe,pe,G){var q=G("mFDi"),Q=G("Xnb7"),O=G("bYtY"),j=O.getContext,D=O.extend,B=O.retrieve2,I=O.retrieve3,v=O.trim,T={},E=0,n=5e3,u=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,c="12px sans-serif",o={};function i(P,z){o[P]=z}function d(P,z){z=z||c;var Z=P+":"+z;if(T[Z])return T[Z];for(var V=(P+"").split(`
`),M=0,J=0,X=V.length;Jn&&(E=0,T={}),E++,T[Z]=M,M}function s(P,z,Z,V,M,J,X,re){return X?a(P,z,Z,V,M,J,X,re):A(P,z,Z,V,M,J,re)}function A(P,z,Z,V,M,J,X){var re=C(P,z,M,J,X),se=d(P,z);M&&(se+=M[1]+M[3]);var _e=re.outerHeight,ge=p(0,se,Z),we=w(0,_e,V),Re=new q(ge,we,se,_e);return Re.lineHeight=re.lineHeight,Re}function a(P,z,Z,V,M,J,X,re){var se=g(P,{rich:X,truncate:re,font:z,textAlign:Z,textPadding:M,textLineHeight:J}),_e=se.outerWidth,ge=se.outerHeight,we=p(0,_e,Z),Re=w(0,ge,V);return new q(we,Re,_e,ge)}function p(P,z,Z){return Z==="right"?P-=z:Z==="center"&&(P-=z/2),P}function w(P,z,Z){return Z==="middle"?P-=z/2:Z==="bottom"&&(P-=z),P}function S(P,z,Z){var V=z.textPosition,M=z.textDistance,J=Z.x,X=Z.y;M=M||0;var re=Z.height,se=Z.width,_e=re/2,ge="left",we="top";switch(V){case"left":J-=M,X+=_e,ge="right",we="middle";break;case"right":J+=M+se,X+=_e,we="middle";break;case"top":J+=se/2,X-=M,ge="center",we="bottom";break;case"bottom":J+=se/2,X+=re+M,ge="center";break;case"inside":J+=se/2,X+=_e,ge="center",we="middle";break;case"insideLeft":J+=M,X+=_e,we="middle";break;case"insideRight":J+=se-M,X+=_e,ge="right",we="middle";break;case"insideTop":J+=se/2,X+=M,ge="center";break;case"insideBottom":J+=se/2,X+=re-M,ge="center",we="bottom";break;case"insideTopLeft":J+=M,X+=M;break;case"insideTopRight":J+=se-M,X+=M,ge="right";break;case"insideBottomLeft":J+=M,X+=re-M,we="bottom";break;case"insideBottomRight":J+=se-M,X+=re-M,ge="right",we="bottom";break}return P=P||{},P.x=J,P.y=X,P.textAlign=ge,P.textVerticalAlign=we,P}function x(P,z,Z){var V={textPosition:P,textDistance:Z};return S({},V,z)}function L(P,z,Z,V,M){if(!z)return"";var J=(P+"").split(`
`);M=b(z,Z,V,M);for(var X=0,re=J.length;X=J;re++)X-=J;var se=d(Z,z);return se>X&&(Z="",se=0),X=P-se,V.ellipsis=Z,V.ellipsisWidth=se,V.contentWidth=X,V.containerWidth=P,V}function h(P,z){var Z=z.containerWidth,V=z.font,M=z.contentWidth;if(!Z)return"";var J=d(P,V);if(J<=Z)return P;for(var X=0;;X++){if(J<=M||X>=z.maxIterations){P+=z.ellipsis;break}var re=X===0?r(P,M,z.ascCharWidth,z.cnCharWidth):J>0?Math.floor(P.length*M/J):0;P=P.substr(0,re),J=d(P,V)}return P===""&&(P=z.placeholder),P}function r(P,z,Z,V){for(var M=0,J=0,X=P.length;Jge)P="",X=[];else if(we!=null)for(var Re=b(we-(Z?Z[1]+Z[3]:0),z,M.ellipsis,{minChar:M.minChar,placeholder:M.placeholder}),He=0,Se=X.length;HeV&&m(Z,P.substring(V,J)),m(Z,M[2],M[1]),V=u.lastIndex}VHe)return{lines:[],width:0,height:0};ze.textWidth=d(ze.text,ne);var ce=at.textWidth,xe=ce==null||ce==="auto";if(typeof ce=="string"&&ce.charAt(ce.length-1)==="%")ze.percentWidth=ce,_e.push(ze),ce=0;else{if(xe){ce=ze.textWidth;var Fe=at.textBackgroundColor,ke=Fe&&Fe.image;ke&&(ke=Q.findExistImage(ke),Q.isImageReady(ke)&&(ce=Math.max(ce,ke.width*ae/ke.height)))}var ct=Ae?Ae[1]+Ae[3]:0;ce+=ct;var ft=Re!=null?Re-bt:null;ft!=null&&ftX&&(X=M.line_indent_level));var re={mode:J,parent:M,last_token:M?M.last_token:new c(a.START_BLOCK,""),last_word:M?M.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:X,alignment:0,line_indent_level:M?M.line_indent_level:X,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},Z.prototype._reset=function(M){var J=M.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new u(this._options,J),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var X=new d(M,this._options);return this._tokens=X.tokenize(),M},Z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M,J=this._reset(this._source_text),X=this._options.eol;this._options.eol==="auto"&&(X=`
`,J&&o.lineBreak.test(J||"")&&(X=J.match(o.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return M=this._output.get_code(X),M},Z.prototype.handle_token=function(M,J){M.type===a.START_EXPR?this.handle_start_expr(M):M.type===a.END_EXPR?this.handle_end_expr(M):M.type===a.START_BLOCK?this.handle_start_block(M):M.type===a.END_BLOCK?this.handle_end_block(M):M.type===a.WORD?this.handle_word(M):M.type===a.RESERVED?this.handle_word(M):M.type===a.SEMICOLON?this.handle_semicolon(M):M.type===a.STRING?this.handle_string(M):M.type===a.EQUALS?this.handle_equals(M):M.type===a.OPERATOR?this.handle_operator(M):M.type===a.COMMA?this.handle_comma(M):M.type===a.BLOCK_COMMENT?this.handle_block_comment(M,J):M.type===a.COMMENT?this.handle_comment(M,J):M.type===a.DOT?this.handle_dot(M):M.type===a.EOF?this.handle_eof(M):M.type===a.UNKNOWN?this.handle_unknown(M,J):this.handle_unknown(M,J)},Z.prototype.handle_whitespace_and_comments=function(M,J){var X=M.newlines,re=this._options.keep_array_indentation&&m(this._flags.mode);if(M.comments_before)for(var se=M.comments_before.next();se;)this.handle_whitespace_and_comments(se,J),this.handle_token(se,J),se=M.comments_before.next();if(re)for(var _e=0;_e0,J);else if(this._options.max_preserve_newlines&&X>this._options.max_preserve_newlines&&(X=this._options.max_preserve_newlines),this._options.preserve_newlines&&X>1){this.print_newline(!1,J);for(var ge=1;ge0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.set_mode=function(M){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,M),this._flags=this.create_flags(this._previous_flags,M),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===f.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.start_of_object_property=function(){return this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},Z.prototype.start_of_statement=function(M){var J=!1;return J=J||L(this._flags.last_token,["var","let","const"])&&M.type===a.WORD,J=J||x(this._flags.last_token,"do"),J=J||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&L(this._flags.last_token,V)&&!M.newlines,J=J||x(this._flags.last_token,"else")&&!(x(M,"if")&&!M.comments_before),J=J||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),J=J||this._flags.last_token.type===a.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(M.text==="--"||M.text==="++")&&this._last_last_text!=="function"&&M.type!==a.WORD&&M.type!==a.RESERVED,J=J||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),J?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(M,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M,L(M,["do","for","if","while"])),!0):!1},Z.prototype.handle_start_expr=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M);var J=f.Expression;if(M.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(M),this.set_mode(J),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}J=f.ArrayLiteral,m(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),p(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,J=f.ForInitializer):p(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,J=f.Conditional):p(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&M.whitespace_before===""?this._output.space_before_token=!1:(p(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var X=this._tokens.peek(-3);if(this._options.space_after_named_function&&X){var re=this._tokens.peek(-4);L(X,["async","function"])||X.text==="*"&&L(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(X.text==="{"||X.text===","||X.text==="*"&&(re.text==="{"||re.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(M);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&p(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(M,M.newlines),this.print_token(M),this.set_mode(J),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Z.prototype.handle_end_expr=function(M){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(M,M.text==="]"&&m(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(M),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===f.Conditional&&(this._previous_flags.mode=f.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Z.prototype.handle_start_block=function(M){this.handle_whitespace_and_comments(M);var J=this._tokens.peek(),X=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):X&&(p(X.text,[":",","])&&p(J.type,[a.STRING,a.WORD,a.RESERVED])||p(J.text,["get","set","..."])&&p(X.type,[a.WORD,a.RESERVED]))?p(this._last_last_text,["class","interface"])&&!p(X.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):p(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!J.comments_before&&J.text==="}",se=re&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,ge=null;this._flags.inline_frame=!0;do if(_e+=1,ge=this._tokens.peek(_e-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==a.EOF&&!(ge.type===a.END_BLOCK&&ge.opened===M))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(se||this._flags.last_token.type===a.EQUALS||L(this._flags.last_token,b)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(m(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(M),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(M),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Z.prototype.handle_end_block=function(M){for(this.handle_whitespace_and_comments(M);this._flags.mode===f.Statement;)this.restore_mode();var J=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!J?this._output.space_before_token=!0:this._options.brace_style==="expand"?J||this.print_newline():J||(m(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(M)},Z.prototype.handle_word=function(M){if(M.type===a.RESERVED){if(p(M.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)M.type=a.WORD;else if(M.text==="import"&&p(this._tokens.peek().text,["(","."]))M.type=a.WORD;else if(p(M.text,["as","from"])&&!this._flags.import_block)M.type=a.WORD;else if(this._flags.mode===f.ObjectLiteral){var J=this._tokens.peek();J.text===":"&&(M.type=a.WORD)}}if(this.start_of_statement(M)?L(this._flags.last_token,["var","let","const"])&&M.type===a.WORD&&(this._flags.declaration_statement=!0):M.newlines&&!F(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(M),this.print_newline()):this.handle_whitespace_and_comments(M),this._flags.do_block&&!this._flags.do_while)if(x(M,"while")){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&x(M,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===f.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(M,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(M),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M)),x(M,"function")){(p(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(p(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!M.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,V)?this._output.space_before_token=!0:x(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(F(this._flags.mode)||m(this._flags.mode))||this.print_newline(),this.print_token(M),this._flags.last_word=M.text;return}var X="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?X="SPACE":L(M,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines?X="NEWLINE":(X="SPACE",this._output.space_before_token=!0):X="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===f.BlockStatement?X="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&F(this._flags.mode)?X="SPACE":this._flags.last_token.type===a.STRING?X="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&p(this._last_last_text,["{",","]))?X="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?X="SPACE":X="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,X="NEWLINE"),L(M,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?X="SPACE":X="NEWLINE"),L(M,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else X==="NEWLINE"?L(this._flags.last_token,b)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(M,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!L(M,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(M,"if")&&x(M.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(M,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&m(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():X==="SPACE"&&(this._output.space_before_token=!0);M.previous&&(M.previous.type===a.WORD||M.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(M),this._flags.last_word=M.text,M.type===a.RESERVED&&(M.text==="do"?this._flags.do_block=!0:M.text==="if"?this._flags.if_block=!0:M.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(M,"from")&&(this._flags.import_block=!1))},Z.prototype.handle_semicolon=function(M){this.start_of_statement(M)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(M);for(var J=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&x(J,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(M)},Z.prototype.handle_string=function(M){M.text.startsWith("`")&&M.newlines===0&&M.whitespace_before===""&&(M.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(M)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(M),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M):M.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(M.previous.text==="]"||M.previous.text===")")&&M.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(M)},Z.prototype.handle_equals=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0},Z.prototype.handle_comma=function(M){this.handle_whitespace_and_comments(M,!0),this.print_token(M),this._output.space_before_token=!0,this._flags.declaration_statement?(F(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)):this._flags.mode===f.ObjectLiteral||this._flags.mode===f.Statement&&this._flags.parent.mode===f.ObjectLiteral?(this._flags.mode===f.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)},Z.prototype.handle_operator=function(M){var J=M.text==="*"&&(L(this._flags.last_token,["function","yield"])||p(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),X=p(M.text,["-","+"])&&(p(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||p(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(M)){var re=!J;this.handle_whitespace_and_comments(M,re)}if(M.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(M);return}if(M.text==="::"){this.print_token(M);return}if(this._flags.last_token.type===a.OPERATOR&&p(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(M),M.text===":"&&this._flags.in_case){this.print_token(M),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var se=!0,_e=!0,ge=!1;if(M.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):M.text==="?"&&(this._flags.ternary_depth+=1),!X&&!J&&this._options.preserve_newlines&&p(M.text,A)){var we=M.text===":",Re=we&&ge,He=we&&!ge;switch(this._options.operator_position){case r.before_newline:this._output.space_before_token=!He,this.print_token(M),(!we||Re)&&this.allow_wrap_or_preserved_newline(M),this._output.space_before_token=!0;return;case r.after_newline:this._output.space_before_token=!0,!we||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(M):this._output.space_before_token=!1,this.print_token(M),this._output.space_before_token=!0;return;case r.preserve_newline:He||this.allow_wrap_or_preserved_newline(M),se=!(this._output.just_added_newline()||He),this._output.space_before_token=se,this.print_token(M),this._output.space_before_token=!0;return}}if(J){this.allow_wrap_or_preserved_newline(M),se=!1;var Se=this._tokens.peek();_e=Se&&p(Se.type,[a.WORD,a.RESERVED])}else if(M.text==="...")this.allow_wrap_or_preserved_newline(M),se=this._flags.last_token.type===a.START_BLOCK,_e=!1;else if(p(M.text,["--","++","!","~"])||X){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(M),se=!1,_e=!1,M.newlines&&(M.text==="--"||M.text==="++"||M.text==="~")){var Te=L(this._flags.last_token,b)&&M.newlines;Te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Te,!0)}this._flags.last_token.text===";"&&F(this._flags.mode)&&(se=!0),this._flags.last_token.type===a.RESERVED?se=!0:this._flags.last_token.type===a.END_EXPR?se=!(this._flags.last_token.text==="]"&&(M.text==="--"||M.text==="++")):this._flags.last_token.type===a.OPERATOR&&(se=p(M.text,["--","-","++","+"])&&p(this._flags.last_token.text,["--","-","++","+"]),p(M.text,["+","-"])&&p(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===f.BlockStatement&&!this._flags.inline_frame||this._flags.mode===f.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||se,this.print_token(M),this._output.space_before_token=_e},Z.prototype.handle_block_comment=function(M,J){if(this._output.raw){this._output.add_raw_token(M),M.directives&&M.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(M.directives){this.print_newline(!1,J),this.print_token(M),M.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!o.newline.test(M.text)&&!M.newlines){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0;return}else this.print_block_commment(M,J)},Z.prototype.print_block_commment=function(M,J){var X=g(M.text),re,se=!1,_e=!1,ge=M.whitespace_before,we=ge.length;if(this.print_newline(!1,J),this.print_token_line_indentation(M),this._output.add_token(X[0]),this.print_newline(!1,J),X.length>1){for(X=X.slice(1),se=P(X,"*"),_e=z(X,ge),se&&(this._flags.alignment=1),re=0;re=0;o--)if(this.__items[o].match(c))return!0;return!1},E.prototype.set_indent=function(c,o){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(c){this.__items.push(c);var o=c.lastIndexOf(`
`);o!==-1?this.__character_count=c.length-o:this.__character_count+=c.length},E.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function n(c,o){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),o=o||"",c.indent_level>0&&(o=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}n.prototype.get_indent_size=function(c,o){var i=this.__base_string_length;return o=o||0,c<0&&(i=0),i+=c*this.__indent_size,i+=o,i},n.prototype.get_indent_string=function(c,o){var i=this.__base_string;return o=o||0,c<0&&(c=0,i=""),o+=c*this.__indent_size,this.__ensure_cache(o),i+=this.__cache[o],i},n.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var c=this.__cache.length,o=0,i="";this.__indent_size&&c>=this.__indent_size&&(o=Math.floor(c/this.__indent_size),c-=o*this.__indent_size,i=new Array(o+1).join(this.__indent_string)),c&&(i+=new Array(c+1).join(" ")),this.__cache.push(i)};function u(c,o){this.__indent_cache=new n(c,o),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(c,o){return this.__indent_cache.get_indent_string(c,o)},u.prototype.get_indent_size=function(c,o){return this.__indent_cache.get_indent_size(c,o)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(c){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
`);return c!==`
`&&(i=i.replace(/[\n]/g,c)),i},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(c,o){return c=c||0,o=o||0,this.next_line.set_indent(c,o),this.__lines.length>1?(this.current_line.set_indent(c,o),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(c){for(var o=0;o1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(c,o){for(var i=this.__lines.length-2;i>=0;){var d=this.__lines[i];if(d.is_empty())break;if(d.item(0).indexOf(c)!==0&&d.item(-1)!==o){this.__lines.splice(i+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},T.exports.Output=u},function(T){function E(n,u,c,o){this.type=n,this.text=u,this.comments_before=null,this.newlines=c||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}T.exports.Token=E},function(T,E){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",o="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+n+c+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+u+c+o+"])*";E.identifier=new RegExp(i+d,"g"),E.identifierStart=new RegExp(i),E.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+u+c+o+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;E.newline=/[\n\r\u2028\u2029]/,E.lineBreak=new RegExp(`\r
|`+E.newline.source),E.allLineBreaks=new RegExp(E.lineBreak.source,"g")},function(T,E,n){var u=n(6).Options,c=["before-newline","after-newline","preserve-newline"];function o(i){u.call(this,i,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var A=0;A>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var r=new RegExp(h),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+f.join("|")+")$"),g,m=function(P,z){c.call(this,P,z),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Z=new s(this._input),V=new A(this._input).read_options(this._options);this.__patterns={template:V,identifier:V.starting_with(d.identifier).matching(d.identifierMatch),number:Z.matching(S),punct:Z.matching(r),comment:Z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Z.matching(//),include:Z.starting_with(/#include/).until_after(d.lineBreak),shebang:Z.starting_with(/#!/).until_after(d.lineBreak),xml:Z.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:V.until(/['\\\n\r\u2028\u2029]/),double_quote:V.until(/["\\\n\r\u2028\u2029]/),template_text:V.until(/[`\\$]/),template_expression:V.until(/[`}\\]/)}};m.prototype=new c,m.prototype._is_comment=function(P){return P.type===p.COMMENT||P.type===p.BLOCK_COMMENT||P.type===p.UNKNOWN},m.prototype._is_opening=function(P){return P.type===p.START_BLOCK||P.type===p.START_EXPR},m.prototype._is_closing=function(P,z){return(P.type===p.END_BLOCK||P.type===p.END_EXPR)&&z&&(P.text==="]"&&z.text==="["||P.text===")"&&z.text==="("||P.text==="}"&&z.text==="{")},m.prototype._reset=function(){g=!1},m.prototype._get_next_token=function(P,z){var Z=null;this._readWhitespace();var V=this._input.peek();return V===null?this._create_token(p.EOF,""):(Z=Z||this._read_non_javascript(V),Z=Z||this._read_string(V),Z=Z||this._read_word(P),Z=Z||this._read_singles(V),Z=Z||this._read_comment(V),Z=Z||this._read_regexp(V,P),Z=Z||this._read_xml(V,P),Z=Z||this._read_punctuation(),Z=Z||this._create_token(p.UNKNOWN,this._input.next()),Z)},m.prototype._read_word=function(P){var z;if(z=this.__patterns.identifier.read(),z!=="")return z=z.replace(d.allLineBreaks,`
`),!(P.type===p.DOT||P.type===p.RESERVED&&(P.text==="set"||P.text==="get"))&&C.test(z)?(z==="in"||z==="of")&&(P.type===p.WORD||P.type===p.STRING)?this._create_token(p.OPERATOR,z):this._create_token(p.RESERVED,z):this._create_token(p.WORD,z);if(z=this.__patterns.number.read(),z!=="")return this._create_token(p.WORD,z)},m.prototype._read_singles=function(P){var z=null;return P==="("||P==="["?z=this._create_token(p.START_EXPR,P):P===")"||P==="]"?z=this._create_token(p.END_EXPR,P):P==="{"?z=this._create_token(p.START_BLOCK,P):P==="}"?z=this._create_token(p.END_BLOCK,P):P===";"?z=this._create_token(p.SEMICOLON,P):P==="."&&L.test(this._input.peek(1))?z=this._create_token(p.DOT,P):P===","&&(z=this._create_token(p.COMMA,P)),z&&this._input.next(),z},m.prototype._read_punctuation=function(){var P=this.__patterns.punct.read();if(P!=="")return P==="="?this._create_token(p.EQUALS,P):P==="?."?this._create_token(p.DOT,P):this._create_token(p.OPERATOR,P)},m.prototype._read_non_javascript=function(P){var z="";if(P==="#"){if(this._is_first_token()&&(z=this.__patterns.shebang.read(),z))return this._create_token(p.UNKNOWN,z.trim()+`
`);if(z=this.__patterns.include.read(),z)return this._create_token(p.UNKNOWN,z.trim()+`
`);P=this._input.next();var Z="#";if(this._input.hasNext()&&this._input.testChar(x)){do P=this._input.next(),Z+=P;while(this._input.hasNext()&&P!=="#"&&P!=="=");return P==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Z+="{}",this._input.next(),this._input.next())),this._create_token(p.WORD,Z)}this._input.back()}else if(P==="<"&&this._is_first_token()){if(z=this.__patterns.html_comment_start.read(),z){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)z+=this._input.next();return g=!0,this._create_token(p.COMMENT,z)}}else if(g&&P==="-"&&(z=this.__patterns.html_comment_end.read(),z))return g=!1,this._create_token(p.COMMENT,z);return null},m.prototype._read_comment=function(P){var z=null;if(P==="/"){var Z="";if(this._input.peek(1)==="*"){Z=this.__patterns.block_comment.read();var V=w.get_directives(Z);V&&V.ignore==="start"&&(Z+=w.readIgnored(this._input)),Z=Z.replace(d.allLineBreaks,`
`),z=this._create_token(p.BLOCK_COMMENT,Z),z.directives=V}else this._input.peek(1)==="/"&&(Z=this.__patterns.comment.read(),z=this._create_token(p.COMMENT,Z))}return z},m.prototype._read_string=function(P){if(P==="`"||P==="'"||P==='"'){var z=this._input.next();return this.has_char_escapes=!1,P==="`"?z+=this._read_string_recursive("`",!0,"${"):z+=this._read_string_recursive(P),this.has_char_escapes&&this._options.unescape_strings&&(z=F(z)),this._input.peek()===P&&(z+=this._input.next()),z=z.replace(d.allLineBreaks,`
`),this._create_token(p.STRING,z)}return null},m.prototype._allow_regexp_or_xml=function(P){return P.type===p.RESERVED&&a(P.text,["return","case","throw","else","do","typeof","yield"])||P.type===p.END_EXPR&&P.text===")"&&P.opened.previous.type===p.RESERVED&&a(P.opened.previous.text,["if","while","for"])||a(P.type,[p.COMMENT,p.START_EXPR,p.START_BLOCK,p.START,p.END_BLOCK,p.OPERATOR,p.EQUALS,p.EOF,p.SEMICOLON,p.COMMA])},m.prototype._read_regexp=function(P,z){if(P==="/"&&this._allow_regexp_or_xml(z)){for(var Z=this._input.next(),V=!1,M=!1;this._input.hasNext()&&(V||M||this._input.peek()!==P)&&!this._input.testChar(d.newline);)Z+=this._input.peek(),V?V=!1:(V=this._input.peek()==="\\",this._input.peek()==="["?M=!0:this._input.peek()==="]"&&(M=!1)),this._input.next();return this._input.peek()===P&&(Z+=this._input.next(),Z+=this._input.read(d.identifier)),this._create_token(p.STRING,Z)}return null},m.prototype._read_xml=function(P,z){if(this._options.e4x&&P==="<"&&this._allow_regexp_or_xml(z)){var Z="",V=this.__patterns.xml.read_match();if(V){for(var M=V[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),J=M.indexOf("{")===0,X=0;V;){var re=!!V[1],se=V[2],_e=!!V[V.length-1]||se.slice(0,8)==="![CDATA[";if(!_e&&(se===M||J&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--X:++X),Z+=V[0],X<=0)break;V=this.__patterns.xml.read_match()}return V||(Z+=this._input.match(/[\s\S]*/g)[0]),Z=Z.replace(d.allLineBreaks,`
`),this._create_token(p.STRING,Z)}}return null};function F(P){for(var z="",Z=0,V=new u(P),M=null;V.hasNext();)if(M=V.match(/([\s]|[^\\]|\\\\)+/g),M&&(z+=M[0]),V.peek()==="\\"){if(V.next(),V.peek()==="x")M=V.match(/x([0-9A-Fa-f]{2})/g);else if(V.peek()==="u")M=V.match(/u([0-9A-Fa-f]{4})/g);else{z+="\\",V.hasNext()&&(z+=V.next());continue}if(!M)return P;if(Z=parseInt(M[1],16),Z>126&&Z<=255&&M[0].indexOf("x")===0)return P;if(Z>=0&&Z<32){z+="\\"+M[0];continue}else Z===34||Z===39||Z===92?z+="\\"+String.fromCharCode(Z):z+=String.fromCharCode(Z)}return z}m.prototype._read_string_recursive=function(P,z,Z){var V,M;P==="'"?M=this.__patterns.single_quote:P==='"'?M=this.__patterns.double_quote:P==="`"?M=this.__patterns.template_text:P==="}"&&(M=this.__patterns.template_expression);for(var J=M.read(),X="";this._input.hasNext();){if(X=this._input.next(),X===P||!z&&d.newline.test(X)){this._input.back();break}else X==="\\"&&this._input.hasNext()?(V=this._input.peek(),V==="x"||V==="u"?this.has_char_escapes=!0:V==="\r"&&this._input.peek(1)===`
`&&this._input.next(),X+=this._input.next()):Z&&(Z==="${"&&X==="$"&&this._input.peek()==="{"&&(X+=this._input.next()),Z===X&&(P==="`"?X+=this._read_string_recursive("}",z,"`"):X+=this._read_string_recursive("`",z,"${"),this._input.hasNext()&&(X+=this._input.next())));X+=M.read(),J+=X}return J},T.exports.Tokenizer=m,T.exports.TOKEN=p,T.exports.positionable_operators=b.slice(),T.exports.line_starters=l.slice()},function(T){var E=RegExp.prototype.hasOwnProperty("sticky");function n(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&u=0&&c=u.length&&this.__input.substring(c-u.length,c).toLowerCase()===u},T.exports.InputScanner=n},function(T,E,n){var u=n(8).InputScanner,c=n(3).Token,o=n(10).TokenStream,i=n(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(A,a){this._input=new u(A),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var A,a=new c(d.START,""),p=null,w=[],S=new o;a.type!==d.EOF;){for(A=this._get_next_token(a,p);this._is_comment(A);)S.add(A),A=this._get_next_token(a,p);S.isEmpty()||(A.comments_before=S,S=new o),A.parent=p,this._is_opening(A)?(w.push(p),p=A):p&&this._is_closing(A,p)&&(A.opened=p,p.closed=A,p=w.pop(),A.parent=p),A.previous=a,a.next=A,this.__tokens.add(A),a=A}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(A,a){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(d.RAW,p):this._create_token(d.EOF,"")},s.prototype._is_comment=function(A){return!1},s.prototype._is_opening=function(A){return!1},s.prototype._is_closing=function(A,a){return!1},s.prototype._create_token=function(A,a){var p=new c(A,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},T.exports.Tokenizer=s,T.exports.TOKEN=d},function(T){function E(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position=0&&n/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new u,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(i){var d=this._create();return d._disabled[i]=!0,d._update(),d},o.prototype.read_options=function(i){var d=this._create();for(var s in c)d._disabled[s]=i.templating.indexOf(s)===-1;return d._update(),d},o.prototype.exclude=function(i){var d=this._create();return d._excluded[i]=!0,d._update(),d},o.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),i+=d,d=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},o.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},o.prototype._read_template=function(){var i="",d=this._input.peek();if(d==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(i=i||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},T.exports.TemplatablePattern=o}],B={};function I(T){var E=B[T];if(E!==void 0)return E.exports;var n=B[T]={exports:{}};return D[T](n,n.exports,I),n.exports}var v=I(0);O=v})();var j=O;!(q=[],Q=function(){return{js_beautify:j}}.apply(pe,q),Q!==void 0&&(qe.exports=Q))})()},"6eGT":function(qe,pe,G){"use strict";function q(Q){return null}pe.a=q},"6fms":function(qe,pe,G){var q=G("SUKs"),Q=G("06Qe"),O=G("bYtY"),j=O.each;function D(T){return parseInt(T,10)}function B(T,E){Q.initVML(),this.root=T,this.storage=E;var n=document.createElement("div"),u=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",u.style.cssText="position:absolute;left:0;top:0;",T.appendChild(n),this._vmlRoot=u,this._vmlViewport=n,this.resize();var c=E.delFromStorage,o=E.addToStorage;E.delFromStorage=function(i){c.call(E,i),i&&(i.onRemove&&i.onRemove(u))},E.addToStorage=function(i){i.onAdd&&i.onAdd(u),o.call(E,i)},this._firstPaint=!0}B.prototype={constructor:B,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var T=this.getViewportRoot();if(T)return{offsetLeft:T.offsetLeft||0,offsetTop:T.offsetTop||0}},refresh:function(){var T=this.storage.getDisplayList(!0,!0);this._paintList(T)},_paintList:function(T){for(var E=this._vmlRoot,n=0;n1&&arguments[1]!==void 0?arguments[1]:0,i=(I[c[o+0]]+I[c[o+1]]+I[c[o+2]]+I[c[o+3]]+"-"+I[c[o+4]]+I[c[o+5]]+"-"+I[c[o+6]]+I[c[o+7]]+"-"+I[c[o+8]]+I[c[o+9]]+"-"+I[c[o+10]]+I[c[o+11]]+I[c[o+12]]+I[c[o+13]]+I[c[o+14]]+I[c[o+15]]).toLowerCase();if(!B(i))throw TypeError("Stringified UUID is invalid");return i}var E=T;function n(c,o,i){c=c||{};var d=c.random||(c.rng||O)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=d[s];return o}return E(d)}var u=pe.a=n},"7SHv":function(qe,pe,G){var q=G("LPTA"),Q=q.devicePixelRatio,O=G("bYtY"),j=G("SUKs"),D=G("mFDi"),B=G("BPZU"),I=G("Xmg4"),v=G("mLcG"),T=G("Dagg"),E=G("ItGF"),n=1e5,u=314159,c=.01,o=.001;function i(b){return parseInt(b,10)}function d(b){return b?b.__builtin__?!0:!(typeof b.resize!="function"||typeof b.refresh!="function"):!1}var s=new D(0,0,0,0),A=new D(0,0,0,0);function a(b,h,r){return s.copy(b.getBoundingRect()),b.transform&&s.applyTransform(b.transform),A.width=h,A.height=r,!s.intersect(A)}function p(b,h){if(b===h)return!1;if(!b||!h||b.length!==h.length)return!0;for(var r=0;r=0&&r.splice(l,1),b.__hoverMir=null},clearHover:function(b){for(var h=this._hoverElements,r=0;r15)break}}C.__drawIndex=X,C.__drawIndex0&&b>l[0]){for(g=0;gb);g++);C=r[l[g]]}if(l.splice(g+1,0,b),r[b]=h,!h.virtual)if(C){var F=C.dom;F.nextSibling?m.insertBefore(h.dom,F.nextSibling):m.appendChild(h.dom)}else m.firstChild?m.insertBefore(h.dom,m.firstChild):m.appendChild(h.dom)},eachLayer:function(b,h){var r=this._zlevelList,l,f;for(f=0;f0?c:0),this._needsManuallyCompositing),F.__builtin__||j("ZLevel "+m+" has been used by unkown layer "+F.id),F!==f&&(F.__used=!0,F.__startIndex!==r&&(F.__dirty=!0),F.__startIndex=r,F.incremental?F.__drawIndex=-1:F.__drawIndex=r,h(r),f=F),l.__dirty&&(F.__dirty=!0,F.incremental&&F.__drawIndex<0&&(F.__drawIndex=r))}h(r),this.eachBuiltinLayer(function(P,z){!P.__used&&P.getElementCount()>0&&(P.__dirty=!0,P.__startIndex=P.__endIndex=P.__drawIndex=0),P.__dirty&&P.__drawIndex<0&&(P.__drawIndex=P.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(b){b.clear()},setBackgroundColor:function(b){this._backgroundColor=b},configLayer:function(b,h){if(h){var r=this._layerConfig;r[b]?O.merge(r[b],h,!0):r[b]=h;for(var l=0;l0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function s(A){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(A||[]).forEach(function(p){var w=p.key,S=p.children;Object(D.a)(w!=null,"Tree node must have a certain key: [".concat(a).concat(w,"]"));var x=String(w);Object(D.a)(!d.has(x)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(x)),d.set(x,!0),s(S,"".concat(a).concat(x," > "))})}s(i)}function T(i){function d(s){var A=Object(j.a)(s);return A.map(function(a){if(!Object(B.i)(a))return Object(D.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var p=a.key,w=a.props,S=w.children,x=Object(O.a)(w,["children"]),L=Object(Q.a)({key:p},x),b=d(S);return b.length&&(L.children=b),L}).filter(function(a){return a})}return d(i)}function E(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(d===!0?[]:d),A=[];function a(p){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(S,x){var L=Object(B.h)(w?w.pos:"0",x),b=I(S.key,L),h=Object(Q.a)(Object(Q.a)({},S),{},{parent:w,pos:L,children:null,data:S,isStart:[].concat(Object(q.a)(w?w.isStart:[]),[x===0]),isEnd:[].concat(Object(q.a)(w?w.isEnd:[]),[x===p.length-1])});return A.push(h),d===!0||s.has(b)?h.children=a(S.children||[],h):h.children=[],h})}return a(i),A}function n(i,d,s){var A;s?typeof s=="string"?A=function(w){return w[s]}:typeof s=="function"&&(A=function(w){return s(w)}):A=function(w,S){return I(w.key,S)};function a(p,w,S){var x=p?p.children:i,L=p?Object(B.h)(S.pos,w):"0";if(p){var b=A(p,L),h={node:p,index:w,pos:L,key:b,parentPos:S.node?S.pos:null,level:S.level+1};d(h)}x&&x.forEach(function(r,l){a(r,l,{node:p,pos:L,level:S?S.level+1:-1})})}a(null)}function u(i){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=d.initWrapper,A=d.processEntity,a=d.onProcessFinished,p=arguments.length>2?arguments[2]:void 0,w={},S={},x={posEntities:w,keyEntities:S};return s&&(x=s(x)||x),n(i,function(L){var b=L.node,h=L.index,r=L.pos,l=L.key,f=L.parentPos,C=L.level,g={node:b,index:h,key:l,pos:r,level:C},m=I(l,r);w[r]=g,S[m]=g,g.parent=w[f],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),A&&A(g,x)},p),a&&a(x),x}function c(i,d){var s=d.expandedKeys,A=d.selectedKeys,a=d.loadedKeys,p=d.loadingKeys,w=d.checkedKeys,S=d.halfCheckedKeys,x=d.dragOverNodeKey,L=d.dropPosition,b=d.keyEntities,h=b[i],r={eventKey:i,expanded:s.indexOf(i)!==-1,selected:A.indexOf(i)!==-1,loaded:a.indexOf(i)!==-1,loading:p.indexOf(i)!==-1,checked:w.indexOf(i)!==-1,halfChecked:S.indexOf(i)!==-1,pos:String(h?h.pos:""),dragOver:x===i&&L===0,dragOverGapTop:x===i&&L===-1,dragOverGapBottom:x===i&&L===1};return r}function o(i){var d=i.data,s=i.expanded,A=i.selected,a=i.checked,p=i.loaded,w=i.loading,S=i.halfChecked,x=i.dragOver,L=i.dragOverGapTop,b=i.dragOverGapBottom,h=i.pos,r=i.active,l=Object(Q.a)(Object(Q.a)({},d),{},{expanded:s,selected:A,checked:a,loaded:p,loading:w,halfChecked:S,dragOver:x,dragOverGapTop:L,dragOverGapBottom:b,pos:h,active:r});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8EBN":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){"use strict";q.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 Q=0;Q-1&&j.substring(I+1,j.length);if(v)return q.findModeByExtension(v)},q.findModeByName=function(j){j=j.toLowerCase();for(var D=0;D=$.length?le.slice($.length):le}).join(`
`)}var s=[],A=[""],a=new o.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){s.length=0,A=[""]}var S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ee,U,N,$){if(U>=ee.length||ee[U].level<=N)return U;var le=ee[U];$.push("- "+le.text+""),U++;var te=[];return U=x(ee,U,le.level,te),te.length>0&&($.push("
"),te.forEach(function(Ke){$.push(Ke)}),$.push("
")),$.push(" "),U=x(ee,U,N,$),U}function L(){return x(s,0,0,A),A.push("
"),A.join("")}var b={heading:function(U){var N=p.exec(U);if(N)return{type:"heading",raw:N[0],depth:N[1].length,text:N[2]}},fences:function(U){var N=this.rules.block.fences.exec(U);if(N){var $=N[0],le=d($,N[3]||""),te=N[2]?N[2].trim():N[2];if(["latex","katex","math"].indexOf(te)>=0){var Ke=l(),Ct=le;le=Ke,f[Ke]={type:"block",expression:Ct}}return{type:"code",raw:$,lang:te,text:le}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,r=0,l=function(){return"__special_katext_id_".concat(r++,"__")},f={};function C(){return f}function g(){r=0,f={}}function m(ee){return ee=ee.replace(h,function(U,N){var $=l();return f[$]={type:"inline",expression:N},$}),ee}var F=a.listitem;a.listitem=function(ee){return F(m(ee))};var P=a.paragraph;a.paragraph=function(ee){return P(m(ee))};var z=a.tablecell;a.tablecell=function(ee,U){return z(m(ee),U)},a.code=function(ee,U,N){var $=(U||"").match(/\S*/)[0];return $?["latex","katex","math"].indexOf($)>=0?"".concat(ee,"
"):'
').concat(N?ee:Object(i.escape)(ee,!0),`
`):''+(N?ee:Object(i.escape)(ee,!0))+"
"},a.heading=function(ee,U,N){var $=this.options.headerPrefix+N.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:$,level:U,text:ee}),"'+ee+""},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:b,renderer:a});var Z=o.a,V=G("SJMd"),M=G("ulZh"),J=G.n(M),X=G("m3rI"),re=G("Oy/b"),se=G("p5ED"),_e=G("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 ge=function(ee,U){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,$){N.__proto__=$}||function(N,$){for(var le in $)Object.prototype.hasOwnProperty.call($,le)&&(N[le]=$[le])})(ee,U)};function we(ee,U){function N(){this.constructor=ee}ge(ee,U),ee.prototype=U===null?Object.create(U):(N.prototype=U.prototype,new N)}function Re(ee,U,N,$){return new(N||(N=Promise))(function(le,te){function Ke(Ht){try{Ut($.next(Ht))}catch(wt){te(wt)}}function Ct(Ht){try{Ut($.throw(Ht))}catch(wt){te(wt)}}function Ut(Ht){var wt;Ht.done?le(Ht.value):(wt=Ht.value,wt instanceof N?wt:new N(function(Yt){Yt(wt)})).then(Ke,Ct)}Ut(($=$.apply(ee,U||[])).next())})}function He(ee,U){var N,$,le,te,Ke={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ct(Ut){return function(Ht){return function(wt){if(N)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(N=1,$&&(le=2&wt[0]?$.return:wt[0]?$.throw||((le=$.return)&&le.call($),0):$.next)&&!(le=le.call($,wt[1])).done)return le;switch($=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return Ke.label++,{value:wt[1],done:!1};case 5:Ke.label++,$=wt[1],wt=[0];continue;case 7:wt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(le=Ke.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){Ke=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]',"select"),this.addActionButton($,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton($,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton($,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton($,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton($,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton($,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton($,'',"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(te){var Ke=document.createElement("div");Ke.className=""+N.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",te.typeName),Ke.innerHTML=te.icon,Ke.addEventListener("click",function(){N.markerToolbarButtonClicked(Ke,te)}),N.buttons.push(Ke),N.markerButtons.push(Ke)}),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 le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'',"render"),this.addActionButton(le,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ee.prototype.addButtonClickListener=function(U){this.buttonClickListeners.push(U)},ee.prototype.removeButtonClickListener=function(U){this.buttonClickListeners.indexOf(U)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(U),1)},ee.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ee.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var U=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var N=0;N0&&this.buttonClickListeners.forEach(function($){return $("marker",N)}),this.markerButtonOverflowBlock.style.display="none"},ee.prototype.actionToolbarButtonClicked=function(U,N){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("action",N)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ee.prototype.setActiveButton=function(U){this.resetButtonStyles(),U.className=U.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),U.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ee.prototype.setActiveMarkerButton=function(U){var N=this.markerButtons.find(function($){return $.getAttribute("data-type-name")===U});N&&this.setActiveButton(N)},ee.prototype.setCurrentMarker=function(U){var N=this;this.currentMarker=U,this.buttons.filter(function($){return/delete|notes/.test($.getAttribute("data-action"))}).forEach(function($){N.currentMarker===void 0?($.style.fillOpacity="0.4",$.style.pointerEvents="none"):($.style.fillOpacity="1",$.style.pointerEvents="all")})},ee}(),ae=function(){function ee(U,N,$,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=U,this.displayMode=N,this.uiStyleSettings=$,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ee.prototype.addStyles=function(){var U;this.toolboxStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var N=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ae("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox-panel-row_colors",`
background-color: `+((U=this.uiStyleSettings.toolboxBackgroundColor)!==null&&U!==void 0?U:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ae("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px;
padding: `+N+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ee.prototype.show=function(U){var N;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=U,this.uiContainer.className=this.toolboxStyleClass.name+" "+((N=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ee.prototype.setPanelButtons=function(U){var N,$,le=this;this.panels=U,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((N=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(te){var Ke;te.uiStyleSettings=le.uiStyleSettings;var Ct=document.createElement("div");Ct.className=le.toolboxButtonStyleClass.name+" "+((Ke=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:le.toolboxButtonStyleColorsClass.name),Ct.innerHTML=te.icon,Ct.title=te.title,Ct.addEventListener("click",function(){le.panelButtonClick(te)}),le.panelButtons.push(Ct),le.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ee.prototype.panelButtonClick=function(U){var N=this,$=-1;if(U!==this.activePanel){$=this.panels.indexOf(U),this.panelRow.innerHTML="";var le=U.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),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=U}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){N.displayMode==="inline"?N.panelRow.style.display="none":N.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(te,Ke){var Ct,Ut;te.className=N.toolboxButtonStyleClass.name+" "+(Ke===$?""+((Ct=N.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:N.toolboxActiveButtonStyleColorsClass.name):""+((Ut=N.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ut!==void 0?Ut:N.toolboxButtonStyleColorsClass.name))})},ee}(),ce=function(ee,U){this.title=ee,this.icon=U},xe=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=$,Ke.currentColor=le,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.whiteSpace="nowrap",this.colors.forEach(function(le){var te=N.getColorBox(le);$.appendChild(te),N.colorBoxes.push(te)}),$},U.prototype.getColorBox=function(N){var $=this,le=this.uiStyleSettings.toolbarHeight/4,te=this.uiStyleSettings.toolbarHeight-le,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=te-2+"px",Ke.style.height=te-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(te+2)/2+"px",Ke.style.borderColor=N===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){$.setCurrentColor(N,Ke)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=te-2+"px",Ct.style.height=te-2+"px",Ct.style.backgroundColor=N,Ct.style.borderRadius=te/2+"px",N==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.innerHTML=``),Ke.appendChild(Ct),Ke},U.prototype.setCurrentColor=function(N,$){var le=this;this.currentColor=N,this.colorBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(N)},U}(ce),Fe=function(){function ee(U,N,$){this._state="new",this._isSelected=!1,this._container=U,this._overlayContainer=N,this.globalSettings=$,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ee.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(U){return!1},Object.defineProperty(ee.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ee.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ee.prototype.pointerDown=function(U,N){},ee.prototype.dblClick=function(U,N){},ee.prototype.manipulate=function(U){},ee.prototype.pointerUp=function(U){this.stateChanged()},ee.prototype.dispose=function(){},ee.prototype.addMarkerVisualToContainer=function(U){this.container.childNodes.length>0?this.container.insertBefore(U,this.container.childNodes[0]):this.container.appendChild(U)},ee.prototype.getState=function(){return{typeName:ee.typeName,state:this.state,notes:this.notes}},ee.prototype.restoreState=function(U){this._state=U.state,this.notes=U.notes},ee.prototype.scale=function(U,N){},ee.prototype.colorChanged=function(U){this.onColorChanged&&this.onColorChanged(U),this.stateChanged()},ee.prototype.fillColorChanged=function(U){this.onFillColorChanged&&this.onFillColorChanged(U),this.stateChanged()},ee.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var U=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),U.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(U)&&this.onStateChanged(this)}},ee.typeName="MarkerBase",ee}(),ke=function(){function ee(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ee.prototype.findGripByVisual=function(U){return this.topLeft.ownsTarget(U)?this.topLeft:this.topCenter.ownsTarget(U)?this.topCenter:this.topRight.ownsTarget(U)?this.topRight:this.centerLeft.ownsTarget(U)?this.centerLeft:this.centerRight.ownsTarget(U)?this.centerRight:this.bottomLeft.ownsTarget(U)?this.bottomLeft:this.bottomCenter.ownsTarget(U)?this.bottomCenter:this.bottomRight.ownsTarget(U)?this.bottomRight:void 0},ee}(),ct=function(){function ee(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(U){return U===this.visual||U===this.visual.childNodes[0]||U===this.visual.childNodes[1]},ee}(),ft=function(){function ee(){}return ee.toITransformMatrix=function(U){return{a:U.a,b:U.b,c:U.c,d:U.d,e:U.e,f:U.f}},ee.toSVGMatrix=function(U,N){return U.a=N.a,U.b=N.b,U.c=N.c,U.d=N.d,U.e=N.e,U.f=N.f,U},ee}(),yt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.left=0,te.top=0,te.width=0,te.height=0,te.defaultSize={x:50,y:20},te.offsetX=0,te.offsetY=0,te.rotationAngle=0,te.CB_DISTANCE=10,te._suppressMarkerCreateEvent=!1,te.container.transform.baseVal.appendItem(Te.createTransform()),te.setupControlBox(),te}return we(U,ee),Object.defineProperty(U.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"visual",{get:function(){return this._visual},set:function(N){this._visual=N;var $=Te.createTransform();this._visual.transform.baseVal.appendItem($)},enumerable:!1,configurable:!0}),U.prototype.ownsTarget=function(N){return!!ee.prototype.ownsTarget.call(this,N)||!!(this.controlGrips.findGripByVisual(N)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(N))},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.left=N.x,this.top=N.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(N);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($)){this.activeGrip=this.rotatorGrip;var te=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=te.x-this.width/2,this.top=te.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},U.prototype.pointerUp=function(N){var $=this.state;ee.prototype.pointerUp.call(this,N),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(N),this._state="select",$==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},U.prototype.moveVisual=function(N){this.visual.style.transform="translate("+N.x+"px, "+N.y+"px)"},U.prototype.manipulate=function(N){var $=this.unrotatePoint(N);this.state==="creating"?this.resize(N):this.state==="move"?(this.left=this.manipulationStartLeft+($.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($):this.state==="rotate"&&this.rotate(N)},U.prototype.resize=function(N){var $=this.manipulationStartLeft,le=this.manipulationStartWidth,te=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$=this.manipulationStartLeft+N.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-$;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+N.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:te=this.manipulationStartTop+N.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-te;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+N.y-this.manipulationStartY}le>=0?(this.left=$,this.width=le):(this.left=$+le,this.width=-le),Ke>=0?(this.top=te,this.height=Ke):(this.top=te+Ke,this.height=-Ke),this.setSize()},U.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},U.prototype.rotate=function(N){if(Math.abs(N.x-this.centerX)>.1){var $=Math.sign(N.x-this.centerX);this.rotationAngle=180*Math.atan((N.y-this.centerY)/(N.x-this.centerX))/Math.PI+90*$,this.applyRotation()}},U.prototype.applyRotation=function(){var N=this.container.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(N,0)},U.prototype.rotatePoint=function(N){if(this.rotationAngle===0)return N;var $=this.container.getCTM(),le=Te.createPoint(N.x,N.y);return{x:(le=le.matrixTransform($)).x,y:le.y}},U.prototype.unrotatePoint=function(N){if(this.rotationAngle===0)return N;var $=this.container.getCTM();$=$.inverse();var le=Te.createPoint(N.x,N.y);return{x:(le=le.matrixTransform($)).x,y:le.y}},U.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},U.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},U.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var N=Te.createTransform();N.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(N),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.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 ke,this.addControlGrips(),this.controlBox.style.display="none"},U.prototype.adjustControlBox=function(){var N=this.controlBox.transform.baseVal.getItem(0);N.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(N,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()},U.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()},U.prototype.createGrip=function(){var N=new ct;return N.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(N.visual),N},U.prototype.positionGrips=function(){var N=this.controlGrips.topLeft.GRIP_SIZE,$=-N/2,le=$,te=(this.width+this.CB_DISTANCE)/2-N/2,Ke=(this.height+this.CB_DISTANCE)/2-N/2,Ct=this.height+this.CB_DISTANCE-N/2,Ut=this.width+this.CB_DISTANCE-N/2;this.positionGrip(this.controlGrips.topLeft.visual,$,le),this.positionGrip(this.controlGrips.topCenter.visual,te,le),this.positionGrip(this.controlGrips.topRight.visual,Ut,le),this.positionGrip(this.controlGrips.centerLeft.visual,$,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Ut,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,$,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,te,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Ut,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,te,le-3*this.CB_DISTANCE)},U.prototype.positionGrip=function(N,$,le){var te=N.transform.baseVal.getItem(0);te.setTranslate($,le),N.transform.baseVal.replaceItem(te,0)},U.prototype.hideControlBox=function(){this.controlBox.style.display="none"},U.prototype.showControlBox=function(){this.controlBox.style.display=""},U.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.left=$.left,this.top=$.top,this.width=$.width,this.height=$.height,this.rotationAngle=$.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$.containerTransformMatrix))},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$);var le=this.rotatePoint({x:this.left,y:this.top}),te=this.unrotatePoint({x:le.x*N,y:le.y*$});this.left=te.x,this.top=te.y,this.width=this.width*N,this.height=this.height*$,this.adjustControlBox()},U}(Fe),Et=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.createVisual=te.createVisual.bind(te),te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual)},U.prototype.createVisual=function(){this.visual=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},U.prototype.manipulate=function(N){ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.setSize()},U.prototype.setSize=function(){ee.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},U.prototype.pointerUp=function(N){ee.prototype.pointerUp.call(this,N),this.setSize()},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(N),this.stateChanged()},U.prototype.setFillColor=function(N){this.fillColor=N,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},U.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){var $=N;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),ee.prototype.restoreState.call(this,N),this.setSize()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setSize()},U.title="Rectangle marker",U}(yt),Ot=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=$,Ke.currentWidth=le,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.widths.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.flexGrow="2",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===N.currentWidth?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentWidth(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.innerText=le.toString(),Ke.style.marginRight="5px",te.appendChild(Ke);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Ut=document.createElement("hr");Ut.style.minWidth="20px",Ut.style.border="0px",Ut.style.borderTop=le+"px solid "+N.uiStyleSettings.toolboxColor,Ut.style.flexGrow="2",Ct.appendChild(Ut),te.appendChild(Ct),N.widthBoxes.push(te)}),$},U.prototype.setCurrentWidth=function(N,$){var le=this;this.currentWidth=N,this.widthBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},U}(ce),Mt=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=$,Ke.currentStyle=le,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.styles.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/N.styles.length-5+"%",te.style.borderColor=le===N.currentStyle?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentStyle(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Ct=``;Ke.innerHTML=Ct,te.appendChild(Ke),N.styleBoxes.push(te)}),$},U.prototype.setCurrentStyle=function(N,$){var le=this;this.currentStyle=N,this.styleBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},U}(ce),Qe=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="FrameMarker",U.title="Frame marker",U.icon='',U}(Et),Ne=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},lt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.x1=0,te.y1=0,te.x2=0,te.y2=0,te.defaultLength=50,te.manipulationStartX=0,te.manipulationStartY=0,te.manipulationStartX1=0,te.manipulationStartY1=0,te.manipulationStartX2=0,te.manipulationStartY2=0,te.setupControlBox(),te}return we(U,ee),U.prototype.ownsTarget=function(N){return!!ee.prototype.ownsTarget.call(this,N)||!(!this.grip1.ownsTarget(N)&&!this.grip2.ownsTarget(N))},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.manipulationStartX=N.x,this.manipulationStartY=N.y,this.state==="new"&&(this.x1=N.x,this.y1=N.y,this.x2=N.x,this.y2=N.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($)?this.activeGrip=this.grip1:this.grip2.ownsTarget($)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},U.prototype.pointerUp=function(N){var $=this.state;ee.prototype.pointerUp.call(this,N),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(N),this._state="select",$==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},U.prototype.adjustVisual=function(){},U.prototype.manipulate=function(N){this.state==="creating"?this.resize(N):this.state==="move"?(this.x1=this.manipulationStartX1+N.x-this.manipulationStartX,this.y1=this.manipulationStartY1+N.y-this.manipulationStartY,this.x2=this.manipulationStartX2+N.x-this.manipulationStartX,this.y2=this.manipulationStartY2+N.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(N)},U.prototype.resize=function(N){switch(this.activeGrip){case this.grip1:this.x1=N.x,this.y1=N.y;break;case this.grip2:case void 0:this.x2=N.x,this.y2=N.y}this.adjustVisual(),this.adjustControlBox()},U.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},U.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},U.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},U.prototype.adjustControlBox=function(){this.positionGrips()},U.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},U.prototype.createGrip=function(){var N=new ct;return N.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(N.visual),N},U.prototype.positionGrips=function(){var N=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-N/2,this.y1-N/2),this.positionGrip(this.grip2.visual,this.x2-N/2,this.y2-N/2)},U.prototype.positionGrip=function(N,$,le){var te=N.transform.baseVal.getItem(0);te.setTranslate($,le),N.transform.baseVal.replaceItem(te,0)},U.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.x1=$.x1,this.y1=$.y1,this.x2=$.x2,this.y2=$.y2},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.x1=this.x1*N,this.y1=this.y1*$,this.x2=this.x2*N,this.y2=this.y2*$,this.adjustVisual(),this.adjustControlBox()},U}(Fe),dt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorLine&&N!==this.visibleLine)},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},U.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.createVisual(),this.adjustVisual()},U.typeName="LineMarker",U.title="Line marker",U.icon='',U}(lt),Ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=$,Ke.currentFont=le,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.flexGrow="2",this.fonts.forEach(function(le){var te=document.createElement("div");te.style.display="inline-block",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/N.fonts.length-5+"%",te.style.borderColor=le===N.currentFont?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentFont(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=le,Ke.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Ct),te.appendChild(Ke),N.fontBoxes.push(te)}),$},U.prototype.setCurrentFont=function(N,$){var le=this;this.currentFont=N,this.fontBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},U}(ce),st=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.color="transparent",te.padding=5,te.DEFAULT_TEXT="your text here",te.text=te.DEFAULT_TEXT,te.isMoved=!1,te.color=le.defaultColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setColor=te.setColor.bind(te),te.setFont=te.setFont.bind(te),te.renderText=te.renderText.bind(te),te.sizeText=te.sizeText.bind(te),te.textEditDivClicked=te.textEditDivClicked.bind(te),te.showTextEditor=te.showTextEditor.bind(te),te.setSize=te.setSize.bind(te),te.positionTextEditor=te.positionTextEditor.bind(te),te.colorPanel=new xe("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.fontFamilyPanel=new Ye("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te}return we(U,ee),U.prototype.ownsTarget=function(N){if(ee.prototype.ownsTarget.call(this,N)||N===this.visual||N===this.textElement||N===this.bgRectangle)return!0;var $=!1;return this.textElement.childNodes.forEach(function(le){le===N&&($=!0)}),$},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.isMoved=!1,this.pointerDownPoint=N,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},U.prototype.renderText=function(){var N=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($){N.textElement.appendChild(Te.createTSpan($.trim()===""?" ":$.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},U.prototype.getTextScale=function(){var N=this.textElement.getBBox(),$=1;if(N.width>0&&N.height>0){var le=(1*this.width-this.width*this.padding*2/100)/N.width,te=(1*this.height-this.height*this.padding*2/100)/N.height;$=Math.min(le,te)}return $},U.prototype.getTextPosition=function(N){var $=this.textElement.getBBox(),le=0,te=0;return $.width>0&&$.height>0&&(le=(this.width-$.width*N)/2,te=this.height/2-$.height*N/2),{x:le,y:te}},U.prototype.sizeText=function(){var N=this.textElement.getBBox(),$=this.getTextScale(),le=this.getTextPosition($);le.y-=N.y*$,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+$+", "+$+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale($,$))},U.prototype.manipulate=function(N){ee.prototype.manipulate.call(this,N),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(N.x-this.pointerDownPoint.x)>5||Math.abs(N.y-this.pointerDownPoint.y)>5)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.isMoved=!0,this.setSize(),this.sizeText()},U.prototype.setSize=function(){ee.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},U.prototype.pointerUp=function(N){var $=this.state;$==="creating"&&(this._suppressMarkerCreateEvent=!0),ee.prototype.pointerUp.call(this,N),this.setSize(),($==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},U.prototype.showTextEditor=function(){var N=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($){$.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $=Number.parseFloat(N.textEditor.style.fontSize);N.textEditor.clientWidth>=Number.parseInt(N.textEditor.style.maxWidth)&&$>.9;)$-=.1,N.textEditor.style.fontSize=Math.max($,.9)+"em"}),this.textEditor.addEventListener("keyup",function($){$.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($){if($.clipboardData){var le=$.clipboardData.getData("text"),te=window.getSelection();if(!te.rangeCount)return!1;te.deleteFromDocument(),te.getRangeAt(0).insertNode(document.createTextNode(le)),$.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){N.textEditDivClicked(N.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},U.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var N=this.getTextScale(),$=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),te={x:le.width*N,y:le.height*N};$.x-=te.x/2,$.y-=te.y/2,this.textEditor.style.top=$.y+"px",this.textEditor.style.left=$.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$.x+"px",this.textEditor.style.fontSize=Math.max(16*N,12)+"px",this.textElement.style.display="none"}},U.prototype.textEditDivClicked=function(N){this.text=N.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},U.prototype.select=function(){ee.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},U.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ee.prototype.deselect.call(this)},U.prototype.dblClick=function(N,$){ee.prototype.dblClick.call(this,N,$),this.showTextEditor()},U.prototype.setColor=function(N){this.textElement&&Te.setAttributes(this.textElement,[["fill",N]]),this.color=N,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(N)},U.prototype.setFont=function(N){this.textElement&&Te.setAttributes(this.textElement,[["font-family",N]]),this.fontFamily=N,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},U.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},U.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){var $=N;this.color=$.color,this.fontFamily=$.fontFamily,this.padding=$.padding,this.text=$.text,this.createVisual(),ee.prototype.restoreState.call(this,N),this.setSize()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setSize(),this.sizeText(),this.positionTextEditor()},U.typeName="TextMarker",U.title="Text marker",U.icon='',U}(yt),je=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.color="transparent",te.lineWidth=3,te.drawing=!1,te.pixelRatio=1,te.color=le.defaultColor,te.lineWidth=le.defaultStrokeWidth,te.pixelRatio=le.freehandPixelRatio,te.setColor=te.setColor.bind(te),te.addCanvas=te.addCanvas.bind(te),te.finishCreation=te.finishCreation.bind(te),te.setLineWidth=te.setLineWidth.bind(te),te.colorPanel=new xe("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.lineWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.lineWidthPanel.onWidthChanged=te.setLineWidth,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.drawingImage)},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var N=Te.createTransform();this.visual.transform.baseVal.appendItem(N),this.addMarkerVisualToContainer(this.visual)},U.prototype.pointerDown=function(N,$){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(N.x,N.y),this.drawing=!0):ee.prototype.pointerDown.call(this,N,$)},U.prototype.manipulate=function(N){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(N.x,N.y),this.canvasContext.stroke()):ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},U.prototype.pointerUp=function(N){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ee.prototype.pointerUp.call(this,N)},U.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)},U.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.select.call(this)},U.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.deselect.call(this)},U.prototype.finishCreation=function(){for(var N=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=$[0],te=$[1],Ke=$[2],Ct=$[3],Ut=!1,Ht=0;Ht0&&(Ut=!0,HtCt&&(Ct=Ht),wt>Ke&&(Ke=wt));if(Ut){this.left=le/this.pixelRatio,this.top=te/this.pixelRatio,this.width=(Ke-le)/this.pixelRatio,this.height=(Ct-te)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=Ke-le,Yt.height=Ct-te,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(le,te,Ke-le,Ct-te),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},U.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},U.prototype.setColor=function(N){this.color=N,this.colorChanged(N)},U.prototype.setLineWidth=function(N){this.lineWidth=N},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({drawingImgUrl:this.drawingImgUrl},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){this.createVisual(),ee.prototype.restoreState.call(this,N),this.drawingImgUrl=N.drawingImgUrl,this.setDrawingImage()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setDrawingImage()},U.typeName="FreehandMarker",U.title="Freehand marker",U.icon='',U}(yt),Le=function(ee){function U(N,$,le){var te=ee.call(this,N,le||'')||this;return te.typeBoxes=[],te.currentType=$,te.setCurrentType=te.setCurrentType.bind(te),te}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");$.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2";for(var le=function(Ct){var Ut="both";switch(Ct){case 0:Ut="both";break;case 1:Ut="start";break;case 2:Ut="end";break;case 3:Ut="none"}var Ht=document.createElement("div");if(Ht.style.display="flex",Ht.style.flexGrow="2",Ht.style.alignItems="center",Ht.style.justifyContent="space-between",Ht.style.padding="5px",Ht.style.borderWidth="2px",Ht.style.borderStyle="solid",Ht.style.borderColor=Ut===te.currentType?te.uiStyleSettings.toolboxAccentColor:"transparent",Ht.addEventListener("click",function(){N.setCurrentType(Ut,Ht)}),$.appendChild(Ht),Ut==="both"||Ut==="start"){var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.innerHTML=``,wt.style.marginLeft="5px",Ht.appendChild(wt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var Xt=document.createElement("hr");if(Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop="3px solid "+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee"),Xt.style.flexGrow="2",Yt.appendChild(Xt),Ht.appendChild(Yt),Ut==="both"||Ut==="end"){var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.innerHTML=``,qt.style.marginRight="5px",Ht.appendChild(qt)}te.typeBoxes.push(Ht)},te=this,Ke=0;Ke<4;Ke++)le(Ke);return $},U.prototype.setCurrentType=function(N,$){var le=this;this.currentType=N,this.typeBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},U}(ce),Me=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.arrowType="end",te.arrowBaseHeight=10,te.arrowBaseWidth=10,te.getArrowPoints=te.getArrowPoints.bind(te),te.setArrowType=te.setArrowType.bind(te),te.arrowTypePanel=new Le("Arrow type","end"),te.arrowTypePanel.onArrowTypeChanged=te.setArrowType,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.arrow1&&N!==this.arrow2)},U.prototype.getArrowPoints=function(N,$){var le=this.arrowBaseWidth+2*this.strokeWidth,te=this.arrowBaseHeight+2*this.strokeWidth;return N-le/2+","+($+te/2)+" "+N+","+($-te/2)+" "+(N+le/2)+","+($+te/2)},U.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="creating"&&this.createTips()},U.prototype.adjustVisual=function(){if(ee.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.arrow1.transform.baseVal.getItem(0);$.setRotate(N,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(N+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},U.prototype.setArrowType=function(N){this.arrowType=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({arrowType:this.arrowType},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.arrowType=$.arrowType,this.createTips(),this.adjustVisual()},U.typeName="ArrowMarker",U.title="Arrow marker",U.icon='',U}(dt),me=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.fillColor=le.defaultFillColor,te.strokeWidth=0,te.fillPanel=new xe("Color",le.defaultColorSet,le.defaultFillColor),te.fillPanel.onColorChanged=te.setFillColor,te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="CoverMarker",U.title="Cover marker",U.icon='',U}(Et),ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=$,Ke.currentOpacity=le,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",$.style.justifyContent="space-between",this.opacities.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="center",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===N.currentOpacity?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentOpacity(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.innerText=100*le+"%",te.appendChild(Ke),N.opacityBoxes.push(te)}),$},U.prototype.setCurrentOpacity=function(N,$){var le=this;this.currentOpacity=N,this.opacityBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},U}(ce),Ee=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.setOpacity=te.setOpacity.bind(te),te.fillColor=le.defaultHighlightColor,te.strokeWidth=0,te.opacity=le.defaultHighlightOpacity,te.fillPanel=new xe("Color",le.defaultColorSet,te.fillColor),te.fillPanel.onColorChanged=te.setFillColor,te.opacityPanel=new ye("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return we(U,ee),U.prototype.setOpacity=function(N){this.opacity=N,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="HighlightMarker",U.title="Highlight marker",U.icon='',U}(me),Oe='',De=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.bgColor="transparent",te.tipPosition={x:0,y:0},te.tipBase1Position={x:0,y:0},te.tipBase2Position={x:0,y:0},te.tipMoving=!1,te.color=le.defaultStrokeColor,te.bgColor=le.defaultFillColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setBgColor=te.setBgColor.bind(te),te.getTipPoints=te.getTipPoints.bind(te),te.positionTip=te.positionTip.bind(te),te.setTipPoints=te.setTipPoints.bind(te),te.colorPanel=new xe("Text color",le.defaultColorSet,te.color,''),te.colorPanel.onColorChanged=te.setColor,te.bgColorPanel=new xe("Fill color",le.defaultColorSet,te.bgColor,Oe),te.bgColorPanel.onColorChanged=te.setBgColor,te.fontFamilyPanel=new Ye("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te.tipGrip=new ct,te.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),te.controlBox.appendChild(te.tipGrip.visual),te}return we(U,ee),U.prototype.ownsTarget=function(N){return ee.prototype.ownsTarget.call(this,N)||this.tipGrip.ownsTarget(N)||this.tip===N},U.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},U.prototype.pointerDown=function(N,$){this.state==="new"&&ee.prototype.pointerDown.call(this,N,$),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ee.prototype.pointerDown.call(this,N,$)},U.prototype.pointerUp=function(N){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ee.prototype.pointerUp.call(this,N);else{var $=this.state==="creating";ee.prototype.pointerUp.call(this,N),this.setTipPoints($),this.positionTip()}},U.prototype.manipulate=function(N){if(this.tipMoving){var $=this.unrotatePoint(N);this.tipPosition={x:$.x-this.manipulationStartLeft,y:$.y-this.manipulationStartTop},this.positionTip()}else ee.prototype.manipulate.call(this,N)},U.prototype.setBgColor=function(N){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",N]]),Te.setAttributes(this.tip,[["fill",N]])),this.bgColor=N,this.fillColorChanged(N)},U.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},U.prototype.setTipPoints=function(N){N===void 0&&(N=!1);var $=Math.min(this.height/2,15),le=this.height/5;N&&(this.tipPosition={x:$+le/2,y:this.height+20});var te=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?te',U}(st),Ze=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.fillColor=le.defaultFillColor,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.setOpacity=te.setOpacity.bind(te),te.createVisual=te.createVisual.bind(te),te.strokePanel=new xe("Line color",Se(le.defaultColorSet,["transparent"]),le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.fillPanel=new xe("Fill color",Se(le.defaultColorSet,["transparent"]),te.fillColor,Oe),te.fillPanel.onColorChanged=te.setFillColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te.opacityPanel=new ye("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual)},U.prototype.createVisual=function(){this.visual=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},U.prototype.manipulate=function(N){ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.setSize()},U.prototype.setSize=function(){ee.prototype.setSize.call(this),Te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},U.prototype.pointerUp=function(N){ee.prototype.pointerUp.call(this,N),this.setSize()},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(N),this.stateChanged()},U.prototype.setFillColor=function(N){this.fillColor=N,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(N),this.stateChanged()},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},U.prototype.setOpacity=function(N){this.opacity=N,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){var $=N;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),ee.prototype.restoreState.call(this,N),this.setSize()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setSize()},U.typeName="EllipseMarker",U.title="Ellipse marker",U.icon='',U}(yt),ht=function(ee){function U(N,$,le){return ee.call(this,N,$,le)||this}return we(U,ee),Object.defineProperty(U.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.tip1&&N!==this.tip2)},U.prototype.createTips=function(){this.tip1=Te.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(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.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(Te.createTransform()),this.visual.appendChild(this.tip2)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="creating"&&this.createTips()},U.prototype.adjustVisual=function(){if(ee.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Te.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()]]),Te.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 N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.tip1.transform.baseVal.getItem(0);$.setRotate(N,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(N+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N),this.createTips(),this.adjustVisual()},U.typeName="MeasurementMarker",U.title="Measurement marker",U.icon='',U}(dt),Tt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokePanel.colors=le.defaultColorSet,te.fillColor="transparent",te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="EllipseFrameMarker",U.title="Ellipse frame marker",U.icon='',U}(Ze),kt=function(){function ee(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ee.prototype.addUndoStep=function(U){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(U)||(this.undoStack.push(U),JSON.stringify(this.lastRedoStep)!==JSON.stringify(U)&&this.redoStack.splice(0,this.redoStack.length))},ee.prototype.replaceLastUndoStep=function(U){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=U)},ee.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ee.prototype.undo=function(){if(this.undoStack.length>1){var U=this.undoStack.pop();return U!==void 0&&this.redoStack.push(U),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ee.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ee}(),It=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.curveX=0,te.curveY=0,te.manipulationStartCurveX=0,te.manipulationStartCurveY=0,te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.positionGrips=te.positionGrips.bind(te),te.addControlGrips=te.addControlGrips.bind(te),te.adjustVisual=te.adjustVisual.bind(te),te.setupControlBox=te.setupControlBox.bind(te),te.resize=te.resize.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorCurve&&N!==this.visibleCurve&&!this.curveGrip.ownsTarget(N))},U.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=N.x,this.curveY=N.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($)&&(this.activeGrip=this.curveGrip,this._state="resize")},U.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},U.prototype.setupControlBox=function(){ee.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.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)},U.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ee.prototype.addControlGrips.call(this)},U.prototype.positionGrips=function(){ee.prototype.positionGrips.call(this);var N=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-N/2,this.curveY-N/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()))},U.prototype.manipulate=function(N){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+N.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+N.y-this.manipulationStartY),ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){this.activeGrip===this.curveGrip&&(this.curveX=N.x,this.curveY=N.y),ee.prototype.resize.call(this,N),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual()},U.prototype.scale=function(N,$){this.curveX=this.curveX*N,this.curveY=this.curveY*$,ee.prototype.scale.call(this,N,$)},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.curveX=$.curveX,this.curveY=$.curveY,this.createVisual(),this.adjustVisual()},U.typeName="CurveMarker",U.title="Curve marker",U.icon='',U}(lt),St=function(){function ee(U,N){N===void 0&&(N=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=U,this.cancelable=N}return Object.defineProperty(ee.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ee.prototype.preventDefault=function(){this._defaultPrevented=!0},ee}(),ut=function(ee){function U(N,$,le){var te=ee.call(this,N,!1)||this;return te.dataUrl=$,te.state=le,te}return we(U,ee),U}(St),nt=function(ee){function U(N,$,le){le===void 0&&(le=!1);var te=ee.call(this,N,le)||this;return te.marker=$,te}return we(U,ee),U}(St),tt=function(){function ee(){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 ee.prototype.addEventListener=function(U,N){this[U].push(N)},ee.prototype.removeEventListener=function(U,N){var $=this[U].indexOf(N);$>-1&&this[U].splice($,1)},ee}(),Ce=function(){function ee(U){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new kt,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 tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ee.instanceCounter++,this.styles=new ze(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=U,this.targetRoot=document.body,this.width=U.clientWidth,this.height=U.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(ee.prototype,"ALL_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Tt,Ze,Ee,De,ht,me,dt,It]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Ze,Ee,De]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(U){var N=this;this._availableMarkerTypes.splice(0),U.forEach(function($){if(typeof $=="string"){var le=N.ALL_MARKER_TYPES.find(function(te){return te.typeName===$});le!==void 0&&N._availableMarkerTypes.push(le)}else N._availableMarkerTypes.push($)})},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(U){this._zoomLevel=U,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ee.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),$e.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ee.prototype.show=function(){var U=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(N){return N(new St(U))})},ee.prototype.render=function(){return Re(this,void 0,void 0,function(){var U;return He(this,function(N){switch(N.label){case 0:return this.setCurrentMarker(),(U=new bt).naturalSize=this.renderAtNaturalSize,U.imageType=this.renderImageType,U.imageQuality=this.renderImageQuality,U.markersOnly=this.renderMarkersOnly,U.width=this.renderWidth,U.height=this.renderHeight,[4,U.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return N.sent(),[4,U.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,N.sent()]}})})},ee.prototype.close=function(U){var N=this;if(U===void 0&&(U=!1),this.isOpen){var $=!1;U||this.eventListeners.beforeclose.forEach(function(le){var te=new St(N,!0);le(te),te.defaultPrevented&&($=!0)}),$||(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(le){return le(new St(N))}),this.detachEvents(),this._isOpen=!1)}},ee.prototype.addMarkersToToolbar=function(){for(var U,N=[],$=0;$this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*U:this.editorCanvas.clientWidth,$=N',U.title="Powered by marker.js",U.style.display="grid",U.style.alignItems="center",U.style.justifyItems="center",U.style.padding="3px",U.style.width="20px",U.style.height="20px",this.logoUI.appendChild(U),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ee.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")},ee.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"},ee.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ee.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 U=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=U+"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 ne(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(U),1),U.dispose()},ee.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())},ee.prototype.toolbarButtonClicked=function(U,N){if(U==="marker"&&N!==void 0)this.createNewMarker(N);else if(U==="action")switch(N){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()}},ee.prototype.deleteSelectedMarker=function(){var U=this;if(this._currentMarker!==void 0){var N=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var te=new nt(U,U._currentMarker,!0);le(te),te.defaultPrevented&&(N=!0)}),!N){var $=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(le){return le(new nt(U,$))})}}},ee.prototype.clear=function(){var U=this,N=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ct=new nt(U,void 0,!0);Ke(Ct),Ct.defaultPrevented&&(N=!0)}),!N)){this.setCurrentMarker();for(var $=function(Ke){var Ct=le.markers[Ke];le.setCurrentMarker(le.markers[Ke]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(Ut){return Ut(new nt(U,Ct))})},le=this,te=this.markers.length-1;te>=0;te--)$(te);this.addUndoStep()}},Object.defineProperty(ee.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ee.prototype.showNotesEditor=function(){var U;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=(U=this._currentMarker.notes)!==null&&U!==void 0?U:"",this.overlayContainer.appendChild(this.notesArea))},ee.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)},ee.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ee.prototype.addUndoStep=function(){var U=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var N=this.getState(),$=this.undoRedoManager.getLastUndoStep();if(!$||$.width===N.width&&$.height===N.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(N),le1&&this.panTo({x:U.clientX,y:U.clientY}))},ee.prototype.onPointerUp=function(U){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(U.clientX,U.clientY)),this.isDragging=!1,this.addUndoStep()},ee.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ee.prototype.onKeyUp=function(U){this._currentMarker===void 0||this.notesArea!==void 0||U.key!=="Delete"&&U.key!=="Backspace"||this.deleteSelectedMarker()},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.markerImage.getBoundingClientRect();return{x:(U-$.left)/this.zoomLevel,y:(N-$.top)/this.zoomLevel}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var U=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=U+"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()},ee.prototype.addLicenseKey=function(U){$e.addKey(U)},ee.prototype.addEventListener=function(U,N){this.eventListeners.addEventListener(U,N)},ee.prototype.removeEventListener=function(U,N){this.eventListeners.removeEventListener(U,N)},ee.prototype.renderState=function(U){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(U),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ee.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ee.prototype.focus=function(){var U=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(N){return N(new St(U))}))},ee.prototype.blur=function(){var U=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(N){return N(new St(U))}))},ee.instanceCounter=0,ee}();/* **********************************
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 Pe=function(ee,U){return(Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,$){N.__proto__=$}||function(N,$){for(var le in $)Object.prototype.hasOwnProperty.call($,le)&&(N[le]=$[le])})(ee,U)};function pt(ee,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");function N(){this.constructor=ee}Pe(ee,U),ee.prototype=U===null?Object.create(U):(N.prototype=U.prototype,new N)}function it(ee,U,N,$){return new(N||(N=Promise))(function(le,te){function Ke(Ht){try{Ut($.next(Ht))}catch(wt){te(wt)}}function Ct(Ht){try{Ut($.throw(Ht))}catch(wt){te(wt)}}function Ut(Ht){var wt;Ht.done?le(Ht.value):(wt=Ht.value,wt instanceof N?wt:new N(function(Yt){Yt(wt)})).then(Ke,Ct)}Ut(($=$.apply(ee,U||[])).next())})}function xt(ee,U){var N,$,le,te,Ke={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ct(Ut){return function(Ht){return function(wt){if(N)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(N=1,$&&(le=2&wt[0]?$.return:wt[0]?$.throw||((le=$.return)&&le.call($),0):$.next)&&!(le=le.call($,wt[1])).done)return le;switch($=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return Ke.label++,{value:wt[1],done:!1};case 5:Ke.label++,$=wt[1],wt=[0];continue;case 7:wt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(le=Ke.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){Ke=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]0&&N>0){var $=new Ur(U,N),le=$.ratio>=1?20:$.getHorizontalLength(20),te=$.ratio<1?20:$.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var Ct=Xe.createDefs();Ke.appendChild(Ct);var Ut=Xe.createElement("clipPath",[["id","text-bg-clip"]]);Ct.appendChild(Ut);var Ht=Xe.createPath(Xe.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));Ke.appendChild(Ht);var wt=Xe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);wt.appendChild(Xe.createTSpan(U+":"+N)),Ke.appendChild(wt);var Yt=wt.getBBox();Xe.setAttributes(wt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var Xt=Xe.createPath(Xe.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 Ut.appendChild(Xt),Xe.setAttributes(Ht,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},ee}(),Rr=function(ee){function U(N,$,le){var te=ee.call(this,N,$)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return pt(U,ee),U.prototype.setupDropdown=function(){var N=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function($){$.className=N.className,$.colorsClassName=N.colorsClassName,N.dropdownBlock.appendChild($.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},U.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},U.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},U.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},U.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},U.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},U}(wr),pr=function(){function ee(U,N){this.GRIP_SIZE=10,this.color=U,this.fillColor=N,this.visual=Xe.createGroup(),this.visual.appendChild(Xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Xe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(U){return U===this.visual||U===this.visual.childNodes[0]||U===this.visual.childNodes[1]},ee.prototype.setCenter=function(U,N){this.visual.childNodes.forEach(function($){return Xe.setAttributes($,[["cx",U.toString()],["cy",N.toString()]])})},ee}(),Or=function(){function ee(U,N,$,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=U,this.canvasHeight=N,this.margin=$,this.container=le,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ee.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(U){this._aspectRatio=U,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(U){this._isGridVisible=U,this.gridContainer&&Xe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(U){this._zoomFactor=U,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ee.prototype.open=function(){var U=this;this.cropShadeElement=Xe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Xe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var N=0;Nthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-N.height/2),Xe.setAttributes(this.cropRectElement,[["x",N.x.toString()],["y",N.y.toString()],["width",N.width.toString()],["height",N.height.toString()]]);var $=N.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,Ke){var Ct=N.y+$*(Ke+1);Xe.setAttributes(te,[["x1",""+N.x],["y1",""+Ct],["x2",""+(N.x+N.width)],["y2",""+Ct]])});var le=N.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,Ke){var Ct=N.x+le*(Ke+1);Xe.setAttributes(te,[["x1",""+Ct],["y1",""+N.y],["x2",""+Ct],["y2",""+(N.y+N.height)]])}),Xe.setAttributes(this.cropShadeElement,[["d",Xe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,N.x,N.y,N.width,N.height)]]),this.topLeftGrip.setCenter(N.x,N.y),this.topRightGrip.setCenter(N.x+N.width,N.y),this.bottomLeftGrip.setCenter(N.x,N.y+N.height),this.bottomRightGrip.setCenter(N.x+N.width,N.y+N.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ee.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)},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.container.getBoundingClientRect();return{x:U-$.left+this.margin,y:N-$.top+this.margin}},ee.prototype.onPointerDown=function(U){this.container.setPointerCapture(U.pointerId),this.previousPoint=this.clientToLocalCoordinates(U.clientX,U.clientY),this.cropRectElement===U.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(U.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(U.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(U.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(U.target)&&(this.activeGrip=this.bottomRightGrip)},ee.prototype.onPointerMove=function(U){if(this.isMoving)this.move(this.clientToLocalCoordinates(U.clientX,U.clientY));else if(this.activeGrip){var N=this.clientToLocalCoordinates(U.clientX,U.clientY);this.resize(N)}U.preventDefault()},ee.prototype.onPointerUp=function(U){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(U.pointerId)},ee.prototype.move=function(U){var N=U.x-this.previousPoint.x,$=U.y-this.previousPoint.y;this.zoomFactor!==1&&(N=-N/this.zoomFactor,$=-$/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+N),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+$),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=U},ee.prototype.resize=function(U){var N=Object.assign({},this.cropRect),$=U.x-this.previousPoint.x,le=U.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:N.x+$this.canvasWidth*this.zoomFactor&&($=this.canvasWidth*this.zoomFactor-N.width),N.width+=$}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(N.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength($),N.height=this.aspectRatio.getVerticalLength(N.width)):(N.y+=le,N.height=this.cropRect.y+this.cropRect.height-N.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?N.height=this.aspectRatio.getVerticalLength(N.width):N.height+=le}N.width<10&&(N.x=this.cropRect.x,N.width=10),N.height<10&&(N.y=this.cropRect.y,N.height=10),this.previousPoint=U,N.x>=this.margin&&N.y>=this.margin&&N.x-this.margin+N.width<=this.canvasWidth&&N.y-this.margin+N.height<=this.canvasHeight&&(this.cropRect=N,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ee.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var U=this.cropRect.x+this.cropRect.width/2,N=this.cropRect.y+this.cropRect.height/2,$=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);$/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=U-this.cropRect.width/2,this.cropRect.y=N-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)}},ee.prototype.getRescaledRect=function(U,N,$,le,te,Ke){var Ct=$/U,Ut=le/N;return{x:(te.x-Ke)*Ct+Ke,y:(te.y-Ke)*Ut+Ke,width:te.width*Ct,height:te.height*Ut}},ee.prototype.scaleCanvas=function(U,N){var $=this.getRescaledRect(this.canvasWidth,this.canvasHeight,U,N,this.cropRect,this.margin);this.canvasWidth=U,this.canvasHeight=N,this.onCropChange&&this.onCropChange($),this.setCropRectangle($)},ee}(),pn=function(){function ee(U){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=U,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(ee.prototype,"angle",{get:function(){return this._angle},set:function(U){this._angle=U,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ee.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},ee.prototype.onPointerDown=function(U){this.controlContainer.setPointerCapture(U.pointerId),this.isDragging=!0,this.previousPoint={x:U.clientX,y:U.clientY}},ee.prototype.onPointerMove=function(U){this.isDragging&&(this.onAngleChange&&this.onAngleChange((U.clientX-this.previousPoint.x)/5),this.previousPoint.x=U.clientX)},ee.prototype.onPointerUp=function(U){this.isDragging&&this.onAngleChange&&this.onAngleChange((U.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(U.pointerId)},ee.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var U=this.angleLabelText.getBBox();Xe.setAttributes(this.angleLabelElement,[["x",((this.width-U.width)/2).toString()],["y",(this.height/2).toString()]])}},ee.prototype.positionScaleShape=function(){if(this.scaleShape){var U=this.scaleShape.transform.baseVal.getItem(0);U.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(U,0)}},ee.prototype.getVisual=function(){var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.setAttribute("xmlns","http://www.w3.org/2000/svg"),U.setAttribute("width",this.width+"px"),U.setAttribute("height",this.height+"px"),U.setAttribute("viewBox","0 0 "+this.width+" "+this.height),U.style.flexShrink="0",document.body.appendChild(U);for(var N="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,$=1;$<=this.width/5+10;$++){var le=$%5==0?this.height/3:this.height/6;N+="h4v"+-le+"h1v"+le}N+="v1H0Z",this.scaleShape=Xe.createPath(N);var te=Xe.createTransform();this.scaleShape.transform.baseVal.appendItem(te),U.appendChild(this.scaleShape),this.angleLabelElement=Xe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Xe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Xe.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),U.appendChild(this.angleLabelElement),document.body.removeChild(U),U},ee}(),un=function(){function ee(){this.naturalSize=!1,this.imageType="image/png"}return ee.prototype.rasterize=function(U,N,$,le,te,Ke,Ct){var Ut=this;return new Promise(function(Ht){var wt=document.createElement("canvas");wt.width=U.width.baseVal.value-2*le,wt.height=U.height.baseVal.value-2*le;var Yt=1,Xt=1;Ut.naturalSize===!0?(Yt=N.naturalWidth/(U.width.baseVal.value-2*le)/Ke,Xt=N.naturalHeight/(U.height.baseVal.value-2*le)/Ct,wt.width=N.naturalWidth/Ke,wt.height=N.naturalHeight/Ct):Ut.width!==void 0&&Ut.height!==void 0&&(Yt=Ut.width/$.width,Xt=Ut.height/$.height,wt.width*=Yt,wt.height*=Xt);var qt=wt.getContext("2d");qt.translate(wt.width/2,wt.height/2),qt.rotate(te*Math.PI/180),qt.scale(Ke,Ct),qt.translate(-wt.width/2,-wt.height/2),qt.drawImage(N,0,0,wt.width,wt.height);var Ar=document.createElement("canvas");Ar.width=$.width*Yt,Ar.height=$.height*Xt,Ar.getContext("2d").putImageData(qt.getImageData(($.x-le)*Yt,($.y-le)*Xt,$.width*Yt,$.height*Xt),0,0),Ht(Ar.toDataURL(Ut.imageType,Ut.imageQuality))})},ee}(),fe=function(){function ee(U){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=ee.instanceCounter++,this.styles=new mt(this.instanceNo),this.target=U,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(U){this._zoomToCropEnabled=U,U?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(U){this._isGridVisible=U,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"gridLines",{get:function(){return this._gridLines},set:function(U){this._gridLines=U,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(U){this._rotationAngle=U,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"aspectRatio",{get:function(){var U;return(U=this._aspectRatio)!==null&&U!==void 0?U:this.aspectRatios[0]},set:function(U){this._aspectRatio=U},enumerable:!1,configurable:!0}),ee.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},ee.prototype.show=function(){this.showUI(),this.open()},ee.prototype.close=function(U){U===void 0&&(U=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),U||this.closeEventListeners.forEach(function(N){return N()}),this._isOpen=!1)},ee.prototype.addRenderEventListener=function(U){this.renderEventListeners.push(U)},ee.prototype.removeRenderEventListener=function(U){this.renderEventListeners.indexOf(U)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(U),1)},ee.prototype.addCloseEventListener=function(U){this.closeEventListeners.push(U)},ee.prototype.removeCloseEventListener=function(U){this.closeEventListeners.indexOf(U)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(U),1)},ee.prototype.setupResizeObserver=function(){var U=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){U.resize(U.target.clientWidth,U.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))},ee.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var U=1*this.target.clientWidth/this.target.clientHeight,N=this.contentDiv.clientWidth/U>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*U:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,$=N+2*this.CANVAS_MARGINU+this.CANVAS_MARGIN?this.target.offsetTop-(U+this.CANVAS_MARGIN):0;this.coverDiv.style.top=N+"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},ee.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ee.prototype.addTopToolbar=function(){var U=this;this.topToolbar=new Qt,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 N=new Fr;N.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(N);var $=[];this.aspectRatios.forEach(function(Xt){var qt=new wr(Kr.getIcon(Xt.horizontal,Xt.vertical),Xt.horizontal===0&&Xt.vertical===0?"FREE":Xt.horizontal+":"+Xt.vertical);qt.onClick=function(){return U.ratioButtonClicked(Xt)},$.push(qt)}),this.aspectRatioButton=new Rr(Kr.getIcon(0,0),"Aspect ratio",$),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,N.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new wr('',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){U.isGridVisible=!U.isGridVisible,le.isActive=U.isGridVisible},N.addButton(le);var te=new wr('',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){U.zoomToCropEnabled=!U.zoomToCropEnabled,te.isActive=U.zoomToCropEnabled},N.addButton(te),!_t.isLicensed){var Ke=new Kt;this.topToolbar.addElementBlock(Ke);var Ct=document.createElement("div");Ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ut=document.createElement("a");Ut.style.color="currentColor",Ut.href="https://markerjs.com/products/cropro",Ut.target="_blank",Ut.innerHTML='',Ct.appendChild(Ut),Ke.addElement(Ct)}var Ht=new Fr;Ht.minWidth=3*this.toolbarHeight+"px",Ht.contentAlign="end",this.topToolbar.addButtonBlock(Ht);var wt=new wr('',"OK");wt.onClick=this.startRenderAndClose,Ht.addButton(wt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(wt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new wr('',"Close");Yt.onClick=this.close,Ht.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ee.prototype.addBottomToolbar=function(){var U=this;this.bottomToolbar=new Qt,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 N=new Fr;N.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(N);var $=new wr('',"Rotate left");$.onClick=this.rotateLeftButtonClicked,N.addButton($);var le=new wr('',"Rotate right");le.onClick=this.rotateRightButtonClicked,N.addButton(le);var te=new Kt;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new pn("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(Ht){U.rotateBy(Ht),U.straightener.angle=U.rotationAngle},te.addElement(this.straightener.getUI());var Ke=new Fr;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Ct=new wr('',"Flip horizontal");Ct.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ct);var Ut=new wr('',"Flip vertical");Ut.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Ut)},ee.prototype.ratioButtonClicked=function(U){this.aspectRatio=U,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ee.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Kr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ee.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ur(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ee.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ee.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ee.prototype.restoreState=function(U){if(U){var N=this.cropLayer.getRescaledRect(U.width,U.height,this.imageWidth,this.imageHeight,U.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(N),this.cropRectChanged(N),this.flippedHorizontally=U.flippedHorizontally,this.flippedVertically=U.flippedVertically,this.applyFlip(),this.rotationAngle=U.rotationAngle,this.applyRotation()}},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.cropImage.getBoundingClientRect();return{x:U-$.left,y:N-$.top}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var U=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=U+"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()},ee.prototype.rotateLeftButtonClicked=function(){var U=this.rotationAngle-90;this.rotationAngle%90!=0&&(U+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(U)},ee.prototype.rotateRightButtonClicked=function(){var U=this.rotationAngle+90;this.rotationAngle%90!=0&&(U-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(U)},ee.prototype.rotateTo=function(U){U=(U=U>180?U-360:U)<=-180?U+360:U,this.rotationAngle=U,this.applyRotation()},ee.prototype.rotateBy=function(U){this.rotateTo((this.rotationAngle+U)%360)},ee.prototype.applyRotation=function(){var U=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var N=this.editingTargetRotationContainer.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(N,0);var $=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/$.width,this.imageHeight/$.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=U},ee.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ee.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ee.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ee.prototype.startRenderAndClose=function(){return it(this,void 0,void 0,function(){var U,N;return xt(this,function($){switch($.label){case 0:return[4,this.render()];case 1:return U=$.sent(),N=this.getState(),this.renderEventListeners.forEach(function(le){return le(U,N)}),this.close(!0),[2]}})})},ee.prototype.render=function(){return it(this,void 0,void 0,function(){var U;return xt(this,function(N){switch(N.label){case 0:return(U=new un).naturalSize=this.renderAtNaturalSize,U.imageType=this.renderImageType,U.imageQuality=this.renderImageQuality,U.width=this.renderWidth,U.height=this.renderHeight,this.unzoomFromCrop(),Xe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,U.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 N.sent(),[4,U.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,N.sent()]}})})},ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Rt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var U=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Rt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*U)+`px;
height: `+(this.toolbarHeight-2*U)+`px;
padding: `+U+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Rt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Rt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*U)+`px;
padding: `+U+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Rt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},ee.instanceCounter=0,ee}(),be=G("8hTe"),Ue=G.n(be),rt=/]*>/g;function et(ee){var U=document.createElement("div");return U.innerHTML=ee,U.childNodes.length===0?"":U.childNodes[0].nodeValue}var Dt=pe.a=function(ee){var U=ee.value,N=U===void 0?"":U,$=ee.edit,le=$===void 0?!1:$,te=ee.className,Ke=ee.showTextOnly,Ct=ee.showLines,Ut=ee.replaces,Ht=ee.zoomImg,wt=ee.hasMask,Yt=ee.style,Xt=Yt===void 0?{}:Yt,qt=ee.stylesPrev,Ar=qt===void 0?{}:qt,Br=String(N),yr=Object(E.useRef)(),Lr=Object(E.useRef)(),cr=Object(E.useState)(""),Dr=Object(I.a)(cr,2),Pr=Dr[0],An=Dr[1],zr=Object(E.useState)("office"),Jr=Object(I.a)(zr,2),bn=Jr[0],$r=Jr[1],en=function(){var $t=new fe(Lr.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var vr=Object(B.a)(T.a.mark(function mr(xr){var Er;return T.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return yr.current.style.display="none",Gr.next=3,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr}});case 3:Er=Gr.sent,Er!=null&&Er.id&&Ut(Lr.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 5:case"end":return Gr.stop()}},mr)}));return function(mr){return vr.apply(this,arguments)}}()),$t.show()},an=function(){var $t=new Ce(Lr.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var vr=Object(B.a)(T.a.mark(function mr(xr){var Er;return T.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(yr.current.style.display="none",!Lr.current){Gr.next=6;break}return Gr.next=4,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr.dataUrl}});case 4:Er=Gr.sent,Er!=null&&Er.id&&Ut(Lr.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 6:case"end":return Gr.stop()}},mr)}));return function(mr){return vr.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},cn=Object(E.useMemo)(function(){yr.current&&(yr.current.style.zIndex=-1);try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,vr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Br=Br.replace(nr,"("+X.a.API_SERVER+"/api/attachments/").replace($t,'"'+X.a.API_SERVER+"/api/attachments/").replace(vr,'"'+X.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(On){}var mr=Z(Br),xr=C();if(Br.match(/\[TOC\]/)&&(mr=mr.replace("[TOC]
",L()),w()),mr=mr.replace(/(__special_katext_id_\d+__)/g,function(On,Gr){var En=xr[Gr],Qn=En.type,wn=En.expression;return Object(re.renderToString)(et(wn)||"",{displayMode:Qn==="block",throwOnError:!1,output:"html"})}),mr=mr.replace(/▁/g,"\u2581\u2581\u2581"),g(),Ke){var Er=document.createElement("div");return Er.innerHTML=mr,Er.innerText}return setTimeout(function(){return dr()},500),mr},[Br]),mn=Object(E.useRef)();S.WebkitLineClamp=Ct,Ct&&(Xt=Object(D.a)(Object(D.a)({},Xt),S));function br(nr){var $t=nr.target;if($t.tagName.toUpperCase()==="IMG"){if(Ht){var vr=$t.getAttribute("src");An(vr),$r("image")}}else if($t.tagName.toUpperCase()==="A"){var mr=$t.getAttribute("href");if(mr.indexOf("office")>-1)nr.preventDefault(),An(mr),$r("office");else if(mr.indexOf("application/pdf")>-1)nr.preventDefault(),An(mr),$r("pdf");else if(mr.indexOf("text/html")>-1)nr.preventDefault(),An(mr),$r("html");else if(mr.startsWith("#")){nr.preventDefault();var xr=document.getElementById(mr.replace("#",""));xr&&xr.scrollIntoView(!0)}}}var dr=function(){var $t,vr=($t=mn.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");vr==null||vr.forEach(function(mr){if(mr.oncontextmenu=function(){return!1},mr.src.indexOf(".m3u8")>-1&&!mr.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var xr=new J.a;xr.loadSource(mr.src),xr.attachMedia(mr)}}})};Object(E.useEffect)(function(){if(mn.current&&cn&&(cn.match(rt)&&window.PR.prettyPrint()),mn.current)return mn.current.addEventListener("click",br),function(){mn.current.removeEventListener("click",br),g(),w()}},[cn,mn.current,br]);var tr=function($t){if(!le)return;$t.target.nodeName==="IMG"?(yr.current.style.zIndex=1,yr.current.style.display="flex",yr.current.style.width=$t.target.clientWidth+"px",yr.current.style.height=$t.target.clientHeight+"px",yr.current.style.top=$t.target.offsetTop+"px",yr.current.style.left=$t.target.offsetLeft+"px",Lr.current.src=$t.target.getAttribute("src")):yr.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:mn,style:Object(D.a)({},Xt),className:"".concat(te||""," markdown-body ").concat(Ue.a.mdBody),onMouseOver:tr,dangerouslySetInnerHTML:{__html:cn}}),n.a.createElement("div",{ref:yr,className:Ue.a.button},n.a.createElement(Q.a,null,n.a.createElement(j.a,{onClick:function(){return en()}},"\u88C1\u526A"),n.a.createElement(j.a,{onClick:function(){return an()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Lr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(se.a,{close:!0,data:Pr,type:Pr!=null&&Pr.length?bn:"",style:Object(D.a)({},Ar),onClose:function(){return An("")}}))}},"9VGf":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return O});var q=G("q1tI"),Q=G.n(q);function O(j,D){var B=Object(q.useRef)();Object(q.useEffect)(function(){B.current=j}),Object(q.useEffect)(function(){function I(){B.current()}if(D!==null){var v=setInterval(I,D);return function(){return clearInterval(v)}}},[D])}},BPZU:function(qe,pe){var G=32,q=7,Q=256;function O(n){for(var u=0;n>=G;)u|=n&1,n>>=1;return n+u}function j(n,u,c,o){var i=u+1;if(i===c)return 1;if(o(n[i++],n[u])<0){for(;i=0;)i++;return i-u}function D(n,u,c){for(c--;u>>1,i(d,n[a])<0?A=a:s=a+1;var p=o-s;switch(p){case 3:n[s+3]=n[s+2];case 2:n[s+2]=n[s+1];case 1:n[s+1]=n[s];break;default:for(;p>0;)n[s+p]=n[s+p-1],p--}n[s]=d}}function I(n,u,c,o,i,d){var s=0,A=0,a=1;if(d(n,u[c+i])>0){for(A=o-i;a0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}else{for(A=i+1;aA&&(a=A);var p=s;s=i-a,a=i-p}for(s++;s>>1);d(n,u[c+w])>0?s=w+1:a=w}return a}function v(n,u,c,o,i,d){var s=0,A=0,a=1;if(d(n,u[c+i])<0){for(A=i+1;aA&&(a=A);var p=s;s=i-a,a=i-p}else{for(A=o-i;a=0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}for(s++;s>>1);d(n,u[c+w])<0?a=w:s=w+1}return a}function T(n,u){var c=q,o=0,i=Q,d=0,s,A,a=0;o=n.length,o<2*Q&&(i=o>>>1);var p=[];d=o<120?5:o<1542?10:o<119151?19:40,s=[],A=[];function w(r,l){s[a]=r,A[a]=l,a+=1}function S(){for(;a>1;){var r=a-2;if(r>=1&&A[r-1]<=A[r]+A[r+1]||r>=2&&A[r-2]<=A[r]+A[r-1])A[r-1]A[r+1])break;L(r)}}function x(){for(;a>1;){var r=a-2;r>0&&A[r-1]=q||V>=q);if(M)break;z<0&&(z=0),z+=2}if(c=z,c<1&&(c=1),l===1){for(g=0;g=0;g--)n[Z+g]=n[z+g];n[P]=p[F];return}for(var V=c;;){var M=0,J=0,X=!1;do if(u(p[F],n[m])<0){if(n[P--]=n[m--],M++,J=0,--l===0){X=!0;break}}else if(n[P--]=p[F--],J++,M=0,--C===1){X=!0;break}while((M|J)=0;g--)n[Z+g]=n[z+g];if(l===0){X=!0;break}}if(n[P--]=p[F--],--C===1){X=!0;break}if(J=C-I(n[m],p,0,C,C-1,u),J!==0){for(P-=J,F-=J,C-=J,Z=P+1,z=F+1,g=0;g=q||J>=q);if(X)break;V<0&&(V=0),V+=2}if(c=V,c<1&&(c=1),C===1){for(P-=l,m-=l,Z=P+1,z=m+1,g=l-1;g>=0;g--)n[Z+g]=n[z+g];n[P]=p[F]}else{if(C===0)throw new Error;for(z=P-(C-1),g=0;gA&&(a=A),B(n,c,c+a,c+d,u),d=a}s.pushRun(c,d),s.mergeRuns(),i-=d,c+=d}while(i!==0);s.forceMergeRuns()}qe.exports=E},BU3w:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return B});var q=G("MNnm"),Q="rc-util-key";function O(I){if(I.attachTo)return I.attachTo;var v=document.querySelector("head");return v||document.body}function j(I){var v,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(q.a)())return null;var E=document.createElement("style");if((v=T.csp)===null||v===void 0?void 0:v.nonce){var n;E.nonce=(n=T.csp)===null||n===void 0?void 0:n.nonce}E.innerHTML=I;var u=O(T),c=u.firstChild;return T.prepend&&u.prepend?u.prepend(E):T.prepend&&c?u.insertBefore(E,c):u.appendChild(E),E}var D=new Map;function B(I,v){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=O(T);if(!D.has(E)){var n=j("",T),u=n.parentNode;D.set(E,u),u.removeChild(n)}var c=Array.from(D.get(E).children).find(function(A){return A.tagName==="STYLE"&&A[Q]===v});if(c){var o,i;if(((o=T.csp)===null||o===void 0?void 0:o.nonce)&&c.nonce!==((i=T.csp)===null||i===void 0?void 0:i.nonce)){var d;c.nonce=(d=T.csp)===null||d===void 0?void 0:d.nonce}return c.innerHTML!==I&&(c.innerHTML=I),c}var s=j(I,T);return s[Q]=v,s}},Bd2K:function(qe,pe,G){(function(q){q(G("VrN/"),G("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(T,E,n){if(n!=q.Init&&n&&T.removeKeyMap("autoCloseTags"),!E)return;var u={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(u["'/'"]=function(c){return B(c)}),(typeof E!="object"||E.whenOpening!==!1)&&(u["'>'"]=function(c){return j(c)}),T.addKeyMap(u)});var Q=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function j(T){if(T.getOption("disableInput"))return q.Pass;for(var E=T.listSelections(),n=[],u=T.getOption("autoCloseTags"),c=0;co.ch&&(a=a.slice(0,a.length-i.end+o.ch));var x=a.toLowerCase();if(!a||i.type=="string"&&(i.end!=o.ch||!/[\"\']/.test(i.string.charAt(i.string.length-1))||i.string.length==1)||i.type=="tag"&&A.close||i.string.indexOf("/")==o.ch-i.start-1||w&&I(w,x)>-1||v(T,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(s)||[],a,o,!0))return q.Pass;var L=typeof u=="object"&&u.emptyTags;if(L&&I(L,a)>-1){n[c]={text:"/>",newPos:q.Pos(o.line,o.ch+2)};continue}var b=S&&I(S,x)>-1;n[c]={indent:b,text:">"+(b?`
`:"")+""+a+">",newPos:b?q.Pos(o.line+1,0):q.Pos(o.line,o.ch+1)}}for(var h=typeof u=="object"&&u.dontIndentOnAutoClose,c=E.length-1;c>=0;c--){var r=n[c];T.replaceRange(r.text,E[c].head,E[c].anchor,"+insert");var l=T.listSelections().slice(0);l[c]={head:r.newPos,anchor:r.newPos},T.setSelections(l),!h&&r.indent&&(T.indentLine(r.newPos.line,null,!0),T.indentLine(r.newPos.line+1,null,!0))}}function D(T,E){for(var n=T.listSelections(),u=[],c=E?"/":"",o=T.getOption("autoCloseTags"),i=typeof o=="object"&&o.dontIndentOnSlash,d=0;d"&&(w+=">"),u[d]=w}if(T.replaceSelections(u),n=T.listSelections(),!i)for(var d=0;d=0&&E[s]==n;s--)++d;u=i.to;for(var s=1;s0){for(var E=0;E1&&arguments[1]!==void 0?arguments[1]:"",E=[],n=0;n.5?S:w}function E(w,S,x,L,b){var h=w.length;if(b===1)for(var r=0;rb;if(h)w.length=b;else for(var r=L;r=0&&!(V[ce]<=ae);ce--);ce=Math.min(ce,C-2)}else{for(ce=we;ceae);ce++);ce=Math.min(ce-1,C-2)}we=ce,Re=ae;var xe=V[ce+1]-V[ce];if(xe===0)return;if(Se=(ae-V[ce])/xe,f)if($e=M[ce],Te=M[ce===0?ce:ce-1],bt=M[ce>C-2?C-1:ce+1],Ie=M[ce>C-3?C-1:ce+2],m)c(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se,r(ne,b),z);else{var Fe;if(F)Fe=c(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se,ze,1),Fe=d(ze);else{if(P)return T($e,bt,Se);Fe=o(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se)}l(ne,b,Fe)}else if(m)E(M[ce],M[ce+1],Se,r(ne,b),z);else{var Fe;if(F)E(M[ce],M[ce+1],Se,ze,1),Fe=d(ze);else{if(P)return T(M[ce],M[ce+1],Se);Fe=v(M[ce],M[ce+1],Se)}l(ne,b,Fe)}},Ae=new q({target:w._target,life:Z,loop:w._loop,delay:w._delay,onframe:at,ondestroy:x});return S&&S!=="spline"&&(Ae.easing=S),Ae}var a=function(w,S,x,L){this._tracks={},this._target=w,this._loop=S||!1,this._getter=x||B,this._setter=L||I,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};a.prototype={when:function(w,S){var x=this._tracks;for(var L in S){if(!S.hasOwnProperty(L))continue;if(!x[L]){x[L]=[];var b=this._getter(this._target,L);if(b==null)continue;w!==0&&x[L].push({time:0,value:i(b)})}x[L].push({time:w,value:S[L]})}return this},during:function(w){return this._onframeList.push(w),this},pause:function(){for(var w=0;w1&&E&&E.length>1){var u=O(E)/O(n);!isFinite(u)&&(u=1),v.pinchScale=u;var c=j(E);return v.pinchX=c[0],v.pinchY=c[1],{type:"pinch",target:I[0].target,event:v}}}},B=Q;qe.exports=B},DBLp:function(qe,pe){function G(){}G.prototype={diff:function(D,B,I){I||(I=function(a,p){return a===p}),this.equals=I;var v=this;D=D.slice(),B=B.slice();var T=B.length,E=D.length,n=1,u=T+E,c=[{newPos:-1,components:[]}],o=this.extractCommon(c[0],B,D,0);if(c[0].newPos+1>=T&&o+1>=E){for(var i=[],d=0;d=T&&x+1>=E)return q(v,p.components,B,D);c[a]=p}n++}for(;n<=u;){var A=s();if(A)return A}},pushComponent:function(D,B,I){var v=D[D.length-1];v&&v.added===B&&v.removed===I?D[D.length-1]={count:v.count+1,added:B,removed:I}:D.push({count:1,added:B,removed:I})},extractCommon:function(D,B,I,v){for(var T=B.length,E=I.length,n=D.newPos,u=n-v,c=0;n+1j||u<-j}var B=function(u){u=u||{},u.position||(this.position=[0,0]),u.rotation==null&&(this.rotation=0),u.scale||(this.scale=[1,1]),this.origin=this.origin||null},I=B.prototype;I.transform=null,I.needLocalTransform=function(){return D(this.rotation)||D(this.position[0])||D(this.position[1])||D(this.scale[0]-1)||D(this.scale[1]-1)};var v=[];I.updateTransform=function(){var u=this.parent,c=u&&u.transform,o=this.needLocalTransform(),i=this.transform;if(!(o||c)){i&&O(i);return}i=i||q.create(),o?this.getLocalTransform(i):O(i),c&&(o?q.mul(i,u.transform,i):q.copy(i,u.transform)),this.transform=i;var d=this.globalScaleRatio;if(d!=null&&d!==1){this.getGlobalScale(v);var s=v[0]<0?-1:1,A=v[1]<0?-1:1,a=((v[0]-s)*d+s)/v[0]||0,p=((v[1]-A)*d+A)/v[1]||0;i[0]*=a,i[1]*=a,i[2]*=p,i[3]*=p}this.invTransform=this.invTransform||q.create(),q.invert(this.invTransform,i)},I.getLocalTransform=function(u){return B.getLocalTransform(this,u)},I.setTransform=function(u){var c=this.transform,o=u.dpr||1;c?u.setTransform(o*c[0],o*c[1],o*c[2],o*c[3],o*c[4],o*c[5]):u.setTransform(o,0,0,o,0,0)},I.restoreTransform=function(u){var c=u.dpr||1;u.setTransform(c,0,0,c,0,0)};var T=[],E=q.create();I.setLocalTransform=function(u){if(!u)return;var c=u[0]*u[0]+u[1]*u[1],o=u[2]*u[2]+u[3]*u[3],i=this.position,d=this.scale;D(c-1)&&(c=Math.sqrt(c)),D(o-1)&&(o=Math.sqrt(o)),u[0]<0&&(c=-c),u[3]<0&&(o=-o),i[0]=u[4],i[1]=u[5],d[0]=c,d[1]=o,this.rotation=Math.atan2(-u[1]/o,u[0]/c)},I.decomposeTransform=function(){if(!this.transform)return;var u=this.parent,c=this.transform;u&&u.transform&&(q.mul(T,u.invTransform,c),c=T);var o=this.origin;o&&(o[0]||o[1])&&(E[4]=o[0],E[5]=o[1],q.mul(T,c,E),T[4]-=o[0],T[5]-=o[1],c=T),this.setLocalTransform(c)},I.getGlobalScale=function(u){var c=this.transform;return u=u||[],c?(u[0]=Math.sqrt(c[0]*c[0]+c[1]*c[1]),u[1]=Math.sqrt(c[2]*c[2]+c[3]*c[3]),c[0]<0&&(u[0]=-u[0]),c[3]<0&&(u[1]=-u[1]),u):(u[0]=1,u[1]=1,u)},I.transformCoordToLocal=function(u,c){var o=[u,c],i=this.invTransform;return i&&Q.applyTransform(o,o,i),o},I.transformCoordToGlobal=function(u,c){var o=[u,c],i=this.transform;return i&&Q.applyTransform(o,o,i),o},B.getLocalTransform=function(u,c){c=c||[],O(c);var o=u.origin,i=u.scale||[1,1],d=u.rotation||0,s=u.position||[0,0];return o&&(c[4]-=o[0],c[5]-=o[1]),q.scale(c,c,i),d&&q.rotate(c,c,d),o&&(c[4]+=o[0],c[5]+=o[1]),c[4]+=s[0],c[5]+=s[1],c};var n=B;qe.exports=n},Dagg:function(qe,pe,G){var q=G("Gev7"),Q=G("mFDi"),O=G("bYtY"),j=G("Xnb7");function D(I){q.call(this,I)}D.prototype={constructor:D,type:"image",brush:function(I,v){var T=this.style,E=T.image;T.bind(I,this,v);var n=this._image=j.createOrUpdateImage(E,this._image,this,this.onload);if(!n||!j.isImageReady(n))return;var u=T.x||0,c=T.y||0,o=T.width,i=T.height,d=n.width/n.height;if(o==null&&i!=null?o=i*d:i==null&&o!=null?i=o/d:o==null&&i==null&&(o=n.width,i=n.height),this.setTransform(I),T.sWidth&&T.sHeight){var s=T.sx||0,A=T.sy||0;I.drawImage(n,s,A,T.sWidth,T.sHeight,u,c,o,i)}else if(T.sx&&T.sy){var s=T.sx,A=T.sy,a=o-s,p=i-A;I.drawImage(n,s,A,a,p,u,c,o,i)}else I.drawImage(n,u,c,o,i);T.text!=null&&(this.restoreTransform(I),this.drawRectText(I,this.getBoundingRect()))},getBoundingRect:function(){var I=this.style;return this._rect||(this._rect=new Q(I.x||0,I.y||0,I.width||0,I.height||0)),this._rect}},O.inherits(D,q);var B=D;qe.exports=B},DlQD:function(qe,pe,G){(function(q,Q){qe.exports=Q()})(this,function(){"use strict";function q(je,Le){for(var Me=0;Meje.length)&&(Le=je.length);for(var Me=0,me=new Array(Le);Me=je.length?{done:!0}:{done:!1,value:je[me++]}}}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 Me=je[Symbol.iterator](),Me.next.bind(Me)}function B(je,Le){return Le={exports:{}},je(Le,Le.exports),Le.exports}var I=B(function(je){function Le(){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 Me(me){je.exports.defaults=me}je.exports={defaults:Le(),getDefaults:Le,changeDefaults:Me}}),v=I.defaults,T=I.getDefaults,E=I.changeDefaults,n=/[&<>"']/,u=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(Le){return i[Le]};function s(je,Le){if(Le){if(n.test(je))return je.replace(u,d)}else if(c.test(je))return je.replace(o,d);return je}var A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(je){return je.replace(A,function(Le,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var p=/(^|[^\[])\^/g;function w(je,Le){je=je.source||je,Le=Le||"";var Me={replace:function(ye,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(p,"$1"),je=je.replace(ye,Ee),Me},getRegex:function(){return new RegExp(je,Le)}};return Me}var S=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(je,Le,Me){if(je){var me;try{me=decodeURIComponent(a(Me)).replace(S,"").toLowerCase()}catch(ye){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}Le&&!x.test(Me)&&(Me=f(Le,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(ye){return null}return Me}var b={},h=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(je,Le){b[" "+je]||(h.test(je)?b[" "+je]=je+"/":b[" "+je]=F(je,"/",!0)),je=b[" "+je];var Me=je.indexOf(":")===-1;return Le.substring(0,2)==="//"?Me?Le:je.replace(r,"$1")+Le:Le.charAt(0)==="/"?Me?Le:je.replace(l,"$1")+Le:je+Le}var C={exec:function(){}};function g(je){for(var Le=1,Me,me;Le=0&&De[ht]==="\\";)Ze=!Ze;return Ze?"|":" |"}),me=Me.split(/ \|/),ye=0;if(me.length>Le)me.splice(Le);else for(;me.length=me.length?ye.slice(me.length):ye}).join(`
`)}var ge=function(){function je(Me){this.options=Me||V}var Le=je.prototype;return Le.space=function(me){var ye=this.rules.block.newline.exec(me);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
`}},Le.code=function(me,ye){var Ee=this.rules.block.code.exec(me);if(Ee){var Oe=ye[ye.length-1];if(Oe&&Oe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var De=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?De:M(De,`
`)}}},Le.fences=function(me){var ye=this.rules.block.fences.exec(me);if(ye){var Ee=ye[0],Oe=_e(Ee,ye[3]||"");return{type:"code",raw:Ee,lang:ye[2]?ye[2].trim():ye[2],text:Oe}}},Le.heading=function(me){var ye=this.rules.block.heading.exec(me);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Le.nptable=function(me){var ye=this.rules.block.nptable.exec(me);if(ye){var Ee={type:"table",header:J(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[],raw:ye[0]};if(Ee.header.length===Ee.align.length){var Oe=Ee.align.length,De;for(De=0;De ?/gm,"");return{type:"blockquote",raw:ye[0],text:Ee}}},Le.list=function(me){var ye=this.rules.block.list.exec(me);if(ye){for(var Ee=ye[0],Oe=ye[2],De=Oe.length>1,Ze=Oe[Oe.length-1]===")",ht={type:"list",raw:Ee,ordered:De,start:De?+Oe.slice(0,-1):"",loose:!1,items:[]},Tt=ye[0].match(this.rules.block.item),kt=!1,It,St,ut,nt,tt,Ce,Pe,pt=Tt.length,it=0;it1||this.options.smartLists&&ut!==Oe)&&(nt=Tt.slice(it+1).join(`
`),ht.raw=ht.raw.substring(0,ht.raw.length-nt.length),it=pt-1)),tt=kt||/\n\n(?!\s*$)/.test(It),it!==pt-1&&(kt=It.charAt(It.length-1)===`
`,tt||(tt=kt)),tt&&(ht.loose=!0),Ce=/^\[[ xX]\] /.test(It),Pe=void 0,Ce&&(Pe=It[1]!==" ",It=It.replace(/^\[[ xX]\] +/,"")),ht.items.push({type:"list_item",raw:Ee,task:Ce,checked:Pe,loose:tt,text:It});return ht}},Le.html=function(me){var ye=this.rules.block.html.exec(me);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):X(ye[0]):ye[0]}},Le.def=function(me){var ye=this.rules.block.def.exec(me);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Ee=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ye[0],href:ye[2],title:ye[3]}}},Le.table=function(me){var ye=this.rules.block.table.exec(me);if(ye){var Ee={type:"table",header:J(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ye[0];var Oe=Ee.align.length,De;for(De=0;De/i.test(Oe[0])&&(ye=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:ye,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):X(Oe[0]):Oe[0]}},Le.link=function(me){var ye=this.rules.inline.link.exec(me);if(ye){var Ee=re(ye[2],"()");if(Ee>-1){var Oe=ye[0].indexOf("!")===0?5:4,De=Oe+ye[1].length+Ee;ye[2]=ye[2].substring(0,Ee),ye[0]=ye[0].substring(0,De).trim(),ye[3]=""}var Ze=ye[2],ht="";if(this.options.pedantic){var Tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ze);Tt?(Ze=Tt[1],ht=Tt[3]):ht=""}else ht=ye[3]?ye[3].slice(1,-1):"";Ze=Ze.trim().replace(/^<([\s\S]*)>$/,"$1");var kt=se(ye,{href:Ze&&Ze.replace(this.rules.inline._escapes,"$1"),title:ht&&ht.replace(this.rules.inline._escapes,"$1")},ye[0]);return kt}},Le.reflink=function(me,ye){var Ee;if((Ee=this.rules.inline.reflink.exec(me))||(Ee=this.rules.inline.nolink.exec(me))){var Oe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Oe=ye[Oe.toLowerCase()],!Oe||!Oe.href){var De=Ee[0].charAt(0);return{type:"text",raw:De,text:De}}var Ze=se(Ee,Oe,Ee[0]);return Ze}},Le.strong=function(me,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.strong.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*me.length);var De=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;De.lastIndex=0;for(var Ze;(Oe=De.exec(ye))!=null;)if(Ze=this.rules.inline.strong.middle.exec(ye.slice(0,Oe.index+3)),Ze)return{type:"strong",raw:me.slice(0,Ze[0].length),text:me.slice(2,Ze[0].length-2)}}},Le.em=function(me,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.em.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*me.length);var De=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;De.lastIndex=0;for(var Ze;(Oe=De.exec(ye))!=null;)if(Ze=this.rules.inline.em.middle.exec(ye.slice(0,Oe.index+2)),Ze)return{type:"em",raw:me.slice(0,Ze[0].length),text:me.slice(1,Ze[0].length-1)}}},Le.codespan=function(me){var ye=this.rules.inline.code.exec(me);if(ye){var Ee=ye[2].replace(/\n/g," "),Oe=/[^ ]/.test(Ee),De=Ee.startsWith(" ")&&Ee.endsWith(" ");return Oe&&De&&(Ee=Ee.substring(1,Ee.length-1)),Ee=X(Ee,!0),{type:"codespan",raw:ye[0],text:Ee}}},Le.br=function(me){var ye=this.rules.inline.br.exec(me);if(ye)return{type:"br",raw:ye[0]}},Le.del=function(me){var ye=this.rules.inline.del.exec(me);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Le.autolink=function(me,ye){var Ee=this.rules.inline.autolink.exec(me);if(Ee){var Oe,De;return Ee[2]==="@"?(Oe=X(this.options.mangle?ye(Ee[1]):Ee[1]),De="mailto:"+Oe):(Oe=X(Ee[1]),De=Oe),{type:"link",raw:Ee[0],text:Oe,href:De,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Le.url=function(me,ye){var Ee;if(Ee=this.rules.inline.url.exec(me)){var Oe,De;if(Ee[2]==="@")Oe=X(this.options.mangle?ye(Ee[0]):Ee[0]),De="mailto:"+Oe;else{var Ze;do Ze=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Ze!==Ee[0]);Oe=X(Ee[0]),Ee[1]==="www."?De="http://"+Oe:De=Oe}return{type:"link",raw:Ee[0],text:Oe,href:De,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Le.inlineText=function(me,ye,Ee){var Oe=this.rules.inline.text.exec(me);if(Oe){var De;return ye?De=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):X(Oe[0]):Oe[0]:De=X(this.options.smartypants?Ee(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:De}}},je}(),we=Z.noopTest,Re=Z.edit,He=Z.merge,Se={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:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Se.def=Re(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex(),Se.bullet=/(?:[*+-]|\d{1,9}[.)])/,Se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Se.item=Re(Se.item,"gm").replace(/bull/g,Se.bullet).getRegex(),Se.list=Re(Se.list).replace(/bull/g,Se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Se.def.source+")").getRegex(),Se._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",Se._comment=//,Se.html=Re(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Se.paragraph=Re(Se._paragraph).replace("hr",Se.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",Se._tag).getRegex(),Se.blockquote=Re(Se.blockquote).replace("paragraph",Se.paragraph).getRegex(),Se.normal=He({},Se),Se.gfm=He({},Se.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*|$)"}),Se.gfm.nptable=Re(Se.gfm.nptable).replace("hr",Se.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",Se._tag).getRegex(),Se.gfm.table=Re(Se.gfm.table).replace("hr",Se.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",Se._tag).getRegex(),Se.pedantic=He({},Se.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Se._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:we,paragraph:Re(Se.normal._paragraph).replace("hr",Se.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,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:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Te.punctuation=Re(Te.punctuation).replace(/punctuation/g,Te._punctuation).getRegex(),Te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Te.em.start=Re(Te.em.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.middle=Re(Te.em.middle).replace(/punctuation/g,Te._punctuation).replace(/overlapSkip/g,Te._overlapSkip).getRegex(),Te.em.endAst=Re(Te.em.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.endUnd=Re(Te.em.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.start=Re(Te.strong.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.middle=Re(Te.strong.middle).replace(/punctuation/g,Te._punctuation).replace(/blockSkip/g,Te._blockSkip).getRegex(),Te.strong.endAst=Re(Te.strong.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.endUnd=Re(Te.strong.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.blockSkip=Re(Te._blockSkip,"g").getRegex(),Te.overlapSkip=Re(Te._overlapSkip,"g").getRegex(),Te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Te._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])?)+(?![-_])/,Te.autolink=Re(Te.autolink).replace("scheme",Te._scheme).replace("email",Te._email).getRegex(),Te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Te.tag=Re(Te.tag).replace("comment",Se._comment).replace("attribute",Te._attribute).getRegex(),Te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Te.link=Re(Te.link).replace("label",Te._label).replace("href",Te._href).replace("title",Te._title).getRegex(),Te.reflink=Re(Te.reflink).replace("label",Te._label).getRegex(),Te.reflinkSearch=Re(Te.reflinkSearch,"g").replace("reflink",Te.reflink).replace("nolink",Te.nolink).getRegex(),Te.normal=He({},Te),Te.pedantic=He({},Te.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Te._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Te._label).getRegex()}),Te.gfm=He({},Te.normal,{escape:Re(Te.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&&(me="x"+me.toString(16)),Le+=""+me+";";return Le}var ne=function(){function je(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||bt,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var me={block:Ie.normal,inline:ze.normal};this.options.pedantic?(me.block=Ie.pedantic,me.inline=ze.pedantic):this.options.gfm&&(me.block=Ie.gfm,this.options.breaks?me.inline=ze.breaks:me.inline=ze.gfm),this.tokenizer.rules=me}je.lex=function(me,ye){var Ee=new je(ye);return Ee.lex(me)};var Le=je.prototype;return Le.lex=function(me){return me=me.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(me,this.tokens,!0),this.inline(this.tokens),this.tokens},Le.blockTokens=function(me,ye,Ee){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!0),me=me.replace(/^ +$/gm,"");for(var Oe,De,Ze,ht;me;){if(Oe=this.tokenizer.space(me)){me=me.substring(Oe.raw.length),Oe.type&&ye.push(Oe);continue}if(Oe=this.tokenizer.code(me,ye)){me=me.substring(Oe.raw.length),Oe.type?ye.push(Oe):(ht=ye[ye.length-1],ht.raw+=`
`+Oe.raw,ht.text+=`
`+Oe.text);continue}if(Oe=this.tokenizer.fences(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.heading(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.nptable(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.hr(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.blockquote(me)){me=me.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],Ee),ye.push(Oe);continue}if(Oe=this.tokenizer.list(me)){for(me=me.substring(Oe.raw.length),Ze=Oe.items.length,De=0;De0)for(;(Tt=this.tokenizer.rules.inline.reflinkSearch.exec(ht))!=null;)kt.includes(Tt[0].slice(Tt[0].lastIndexOf("[")+1,-1))&&(ht=ht.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Tt=this.tokenizer.rules.inline.blockSkip.exec(ht))!=null;)ht=ht.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;me;){if(Ze=this.tokenizer.escape(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.tag(me,Ee,Oe)){me=me.substring(Ze.raw.length),Ee=Ze.inLink,Oe=Ze.inRawBlock,ye.push(Ze);continue}if(Ze=this.tokenizer.link(me)){me=me.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Oe)),ye.push(Ze);continue}if(Ze=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Oe)),ye.push(Ze);continue}if(Ze=this.tokenizer.strong(me,ht,De)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.em(me,ht,De)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.codespan(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.br(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.del(me)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.autolink(me,Ae)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(!Ee&&(Ze=this.tokenizer.url(me,Ae))){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.inlineText(me,Oe,at)){me=me.substring(Ze.raw.length),De=Ze.raw.slice(-1),ye.push(Ze);continue}if(me){var It="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(It);break}else throw new Error(It)}}return ye},Q(je,null,[{key:"rules",get:function(){return{block:Ie,inline:ze}}}]),je}(),ae=I.defaults,ce=Z.cleanUrl,xe=Z.escape,Fe=function(){function je(Me){this.options=Me||ae}var Le=je.prototype;return Le.code=function(me,ye,Ee){var Oe=(ye||"").match(/\S*/)[0];if(this.options.highlight){var De=this.options.highlight(me,Oe);De!=null&&De!==me&&(Ee=!0,me=De)}return Oe?''+(Ee?me:xe(me,!0))+`
`:""+(Ee?me:xe(me,!0))+`
`},Le.blockquote=function(me){return`
`+me+`
`},Le.html=function(me){return me},Le.heading=function(me,ye,Ee,Oe){return this.options.headerIds?"
`:""+me+"
`},Le.hr=function(){return this.options.xhtml?`
`:`
`},Le.list=function(me,ye,Ee){var Oe=ye?"ol":"ul",De=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+De+`>
`+me+""+Oe+`>
`},Le.listitem=function(me){return""+me+`
`},Le.checkbox=function(me){return" "},Le.paragraph=function(me){return""+me+`
`},Le.table=function(me,ye){return ye&&(ye=""+ye+""),`
`},Le.tablerow=function(me){return`
`+me+`
`},Le.tablecell=function(me,ye){var Ee=ye.header?"th":"td",Oe=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return Oe+me+""+Ee+`>
`},Le.strong=function(me){return""+me+""},Le.em=function(me){return""+me+""},Le.codespan=function(me){return""+me+""},Le.br=function(){return this.options.xhtml?"
":"
"},Le.del=function(me){return""+me+""},Le.link=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='"+Ee+"",Oe},Le.image=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='
":">",Oe},Le.text=function(me){return me},je}(),ke=function(){function je(){}var Le=je.prototype;return Le.strong=function(me){return me},Le.em=function(me){return me},Le.codespan=function(me){return me},Le.del=function(me){return me},Le.html=function(me){return me},Le.text=function(me){return me},Le.link=function(me,ye,Ee){return""+Ee},Le.image=function(me,ye,Ee){return""+Ee},Le.br=function(){return""},je}(),ct=function(){function je(){this.seen={}}var Le=je.prototype;return Le.slug=function(me){var ye=me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Ee=ye;do this.seen[Ee]++,ye=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},je}(),ft=I.defaults,yt=Z.unescape,Et=function(){function je(Me){this.options=Me||ft,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new ct}je.parse=function(me,ye){var Ee=new je(ye);return Ee.parse(me)};var Le=je.prototype;return Le.parse=function(me,ye){ye===void 0&&(ye=!0);var Ee="",Oe,De,Ze,ht,Tt,kt,It,St,ut,nt,tt,Ce,Pe,pt,it,xt,_t,Xe,mt=me.length;for(Oe=0;Oe0&&it.tokens[0].type==="text"?(it.tokens[0].text=Xe+" "+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=Xe+" "+it.tokens[0].tokens[0].text)):it.tokens.unshift({type:"text",text:Xe}):pt+=Xe),pt+=this.parse(it.tokens,Pe),ut+=this.renderer.listitem(pt,_t,xt);Ee+=this.renderer.list(ut,tt,Ce);continue}case"html":{Ee+=this.renderer.html(nt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(nt.tokens));continue}case"text":{for(ut=nt.tokens?this.parseInline(nt.tokens):nt.text;Oe+1An error occurred:
"+Qe(Ze.message+"",!0)+"
";throw Ze}}Ye.options=Ye.setOptions=function(je){return Ot(Ye.defaults,je),lt(Ye.defaults),Ye},Ye.getDefaults=Ne,Ye.defaults=dt,Ye.use=function(je){var Le=Ot({},je);if(je.renderer&&function(){var me=Ye.defaults.renderer||new Fe,ye=function(De){var Ze=me[De];me[De]=function(){for(var ht=arguments.length,Tt=new Array(ht),kt=0;kt`,triples:"",explode:"[]{}"},O=q.Pos;q.defineOption("autoCloseBrackets",!1,function(i,d,s){s&&s!=q.Init&&(i.removeKeyMap(D),i.state.closeBrackets=null),d&&(B(j(d,"pairs")),i.state.closeBrackets=d,i.addKeyMap(D))});function j(i,d){return d=="pairs"&&typeof i=="string"?i:typeof i=="object"&&i[d]!=null?i[d]:Q[d]}var D={Backspace:T,Enter:E};function B(i){for(var d=0;d=0;a--){var w=A[a].head;i.replaceRange("",O(w.line,w.ch-1),O(w.line,w.ch+1),"+delete")}}function E(i){var d=v(i),s=d&&j(d,"explode");if(!s||i.getOption("disableInput"))return q.Pass;for(var A=i.listSelections(),a=0;a0;return{anchor:new O(i.anchor.line,i.anchor.ch+(d?-1:1)),head:new O(i.head.line,i.head.ch+(d?1:-1))}}function u(i,d){var s=v(i);if(!s||i.getOption("disableInput"))return q.Pass;var A=j(s,"pairs"),a=A.indexOf(d);if(a==-1)return q.Pass;for(var p=j(s,"closeBefore"),w=j(s,"triples"),S=A.charAt(a+1)==d,x=i.listSelections(),L=a%2==0,b,h=0;h=0&&i.getRange(l,O(l.line,l.ch+3))==d+d+d?f="skipThree":f="skip";else if(S&&l.ch>1&&w.indexOf(d)>=0&&i.getRange(O(l.line,l.ch-2),l)==d+d){if(l.ch>2&&/\bstring/.test(i.getTokenTypeAt(O(l.line,l.ch-2))))return q.Pass;f="addFour"}else if(S){var g=l.ch==0?" ":i.getRange(O(l.line,l.ch-1),l);if(!q.isWordChar(C)&&g!=d&&!q.isWordChar(g))f="both";else return q.Pass}else if(L&&(C.length===0||/\s/.test(C)||p.indexOf(C)>-1))f="both";else return q.Pass;if(!b)b=f;else if(b!=f)return q.Pass}var m=a%2?A.charAt(a-1):d,F=a%2?d:A.charAt(a+1);i.operation(function(){if(b=="skip")i.execCommand("goCharRight");else if(b=="skipThree")for(var P=0;P<3;P++)i.execCommand("goCharRight");else if(b=="surround"){for(var z=i.getSelections(),P=0;P3&&(v=G.call(v,1));for(var E=B.length,n=0;n4&&(v=G.call(v,1,v.length-1));for(var E=v[v.length-1],n=B.length,u=0;u0)throw new Error("Invalid string. Length must be a multiple of 4");var d=o.indexOf("=");d===-1&&(d=i);var s=d===i?0:4-d%4;return[d,s]}function v(o){var i=I(o),d=i[0],s=i[1];return(d+s)*3/4-s}function T(o,i,d){return(i+d)*3/4-d}function E(o){var i,d=I(o),s=d[0],A=d[1],a=new O(T(o,s,A)),p=0,w=A>0?s-4:s,S;for(S=0;S>16&255,a[p++]=i>>8&255,a[p++]=i&255;return A===2&&(i=Q[o.charCodeAt(S)]<<2|Q[o.charCodeAt(S+1)]>>4,a[p++]=i&255),A===1&&(i=Q[o.charCodeAt(S)]<<10|Q[o.charCodeAt(S+1)]<<4|Q[o.charCodeAt(S+2)]>>2,a[p++]=i>>8&255,a[p++]=i&255),a}function n(o){return q[o>>18&63]+q[o>>12&63]+q[o>>6&63]+q[o&63]}function u(o,i,d){for(var s,A=[],a=i;aw?w:p+a));return s===1?(i=o[d-1],A.push(q[i>>2]+q[i<<4&63]+"==")):s===2&&(i=(o[d-2]<<8)+o[d-1],A.push(q[i>>10]+q[i>>4&63]+q[i<<2&63]+"=")),A.join("")}},HDXh:function(qe,pe,G){"use strict";(function(q){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/var Q=G("H7XF"),O=G("kVK+"),j=G("49sm");pe.Buffer=v,pe.SlowBuffer=A,pe.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=q.TYPED_ARRAY_SUPPORT!==void 0?q.TYPED_ARRAY_SUPPORT:D(),pe.kMaxLength=B();function D(){try{var Ae=new Uint8Array(1);return Ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ae.foo()===42&&typeof Ae.subarray=="function"&&Ae.subarray(1,1).byteLength===0}catch(ne){return!1}}function B(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(Ae,ne){if(B()=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return Ae|0}function A(Ae){return+Ae!=Ae&&(Ae=0),v.alloc(+Ae)}v.isBuffer=function(ne){return!!(ne!=null&&ne._isBuffer)},v.compare=function(ne,ae){if(!v.isBuffer(ne)||!v.isBuffer(ae))throw new TypeError("Arguments must be Buffers");if(ne===ae)return 0;for(var ce=ne.length,xe=ae.length,Fe=0,ke=Math.min(ce,xe);Fe>>1;case"base64":return Ie(Ae).length;default:if(ce)return Te(Ae).length;ne=(""+ne).toLowerCase(),ce=!0}}v.byteLength=a;function p(Ae,ne,ae){var ce=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length)return"";if((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)return"";if(ae>>>=0,ne>>>=0,ae<=ne)return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return Z(this,ne,ae);case"utf8":case"utf-8":return g(this,ne,ae);case"ascii":return P(this,ne,ae);case"latin1":case"binary":return z(this,ne,ae);case"base64":return C(this,ne,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,ne,ae);default:if(ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),ce=!0}}v.prototype._isBuffer=!0;function w(Ae,ne,ae){var ce=Ae[ne];Ae[ne]=Ae[ae],Ae[ae]=ce}v.prototype.swap16=function(){var ne=this.length;if(ne%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;ae0&&(ne=this.toString("hex",0,ae).match(/.{2}/g).join(" "),this.length>ae&&(ne+=" ... ")),""},v.prototype.compare=function(ne,ae,ce,xe,Fe){if(!v.isBuffer(ne))throw new TypeError("Argument must be a Buffer");if(ae===void 0&&(ae=0),ce===void 0&&(ce=ne?ne.length:0),xe===void 0&&(xe=0),Fe===void 0&&(Fe=this.length),ae<0||ce>ne.length||xe<0||Fe>this.length)throw new RangeError("out of range index");if(xe>=Fe&&ae>=ce)return 0;if(xe>=Fe)return-1;if(ae>=ce)return 1;if(ae>>>=0,ce>>>=0,xe>>>=0,Fe>>>=0,this===ne)return 0;for(var ke=Fe-xe,ct=ce-ae,ft=Math.min(ke,ct),yt=this.slice(xe,Fe),Et=ne.slice(ae,ce),Ot=0;Ot2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,isNaN(ae)&&(ae=xe?0:Ae.length-1),ae<0&&(ae=Ae.length+ae),ae>=Ae.length){if(xe)return-1;ae=Ae.length-1}else if(ae<0)if(xe)ae=0;else return-1;if(typeof ne=="string"&&(ne=v.from(ne,ce)),v.isBuffer(ne))return ne.length===0?-1:x(Ae,ne,ae,ce,xe);if(typeof ne=="number")return ne=ne&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?xe?Uint8Array.prototype.indexOf.call(Ae,ne,ae):Uint8Array.prototype.lastIndexOf.call(Ae,ne,ae):x(Ae,[ne],ae,ce,xe);throw new TypeError("val must be string, number or Buffer")}function x(Ae,ne,ae,ce,xe){var Fe=1,ke=Ae.length,ct=ne.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(Ae.length<2||ne.length<2)return-1;Fe=2,ke/=2,ct/=2,ae/=2}function ft(Qe,Ne){return Fe===1?Qe[Ne]:Qe.readUInt16BE(Ne*Fe)}var yt;if(xe){var Et=-1;for(yt=ae;ytke&&(ae=ke-ct),yt=ae;yt>=0;yt--){for(var Ot=!0,Mt=0;Mtxe&&(ce=xe)):ce=xe;var Fe=ne.length;if(Fe%2!==0)throw new TypeError("Invalid hex string");ce>Fe/2&&(ce=Fe/2);for(var ke=0;keFe)&&(ce=Fe),ne.length>0&&(ce<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");for(var ke=!1;;)switch(xe){case"hex":return L(this,ne,ae,ce);case"utf8":case"utf-8":return b(this,ne,ae,ce);case"ascii":return h(this,ne,ae,ce);case"latin1":case"binary":return r(this,ne,ae,ce);case"base64":return l(this,ne,ae,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,ne,ae,ce);default:if(ke)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),ke=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(Ae,ne,ae){return ne===0&&ae===Ae.length?Q.fromByteArray(Ae):Q.fromByteArray(Ae.slice(ne,ae))}function g(Ae,ne,ae){ae=Math.min(Ae.length,ae);for(var ce=[],xe=ne;xe239?4:Fe>223?3:Fe>191?2:1;if(xe+ct<=ae){var ft,yt,Et,Ot;switch(ct){case 1:Fe<128&&(ke=Fe);break;case 2:ft=Ae[xe+1],(ft&192)===128&&(Ot=(Fe&31)<<6|ft&63,Ot>127&&(ke=Ot));break;case 3:ft=Ae[xe+1],yt=Ae[xe+2],(ft&192)===128&&(yt&192)===128&&(Ot=(Fe&15)<<12|(ft&63)<<6|yt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(ke=Ot));break;case 4:ft=Ae[xe+1],yt=Ae[xe+2],Et=Ae[xe+3],(ft&192)===128&&(yt&192)===128&&(Et&192)===128&&(Ot=(Fe&15)<<18|(ft&63)<<12|(yt&63)<<6|Et&63,Ot>65535&&Ot<1114112&&(ke=Ot))}}ke===null?(ke=65533,ct=1):ke>65535&&(ke-=65536,ce.push(ke>>>10&1023|55296),ke=56320|ke&1023),ce.push(ke),xe+=ct}return F(ce)}var m=4096;function F(Ae){var ne=Ae.length;if(ne<=m)return String.fromCharCode.apply(String,Ae);for(var ae="",ce=0;cece)&&(ae=ce);for(var xe="",Fe=ne;Fece&&(ne=ce),ae<0?(ae+=ce,ae<0&&(ae=0)):ae>ce&&(ae=ce),aeae)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=this[ne],Fe=1,ke=0;++ke0&&(Fe*=256);)xe+=this[ne+--ae]*Fe;return xe},v.prototype.readUInt8=function(ne,ae){return ae||M(ne,1,this.length),this[ne]},v.prototype.readUInt16LE=function(ne,ae){return ae||M(ne,2,this.length),this[ne]|this[ne+1]<<8},v.prototype.readUInt16BE=function(ne,ae){return ae||M(ne,2,this.length),this[ne]<<8|this[ne+1]},v.prototype.readUInt32LE=function(ne,ae){return ae||M(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+this[ne+3]*16777216},v.prototype.readUInt32BE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]*16777216+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},v.prototype.readIntLE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=this[ne],Fe=1,ke=0;++ke=Fe&&(xe-=Math.pow(2,8*ae)),xe},v.prototype.readIntBE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=ae,Fe=1,ke=this[ne+--xe];xe>0&&(Fe*=256);)ke+=this[ne+--xe]*Fe;return Fe*=128,ke>=Fe&&(ke-=Math.pow(2,8*ae)),ke},v.prototype.readInt8=function(ne,ae){return ae||M(ne,1,this.length),this[ne]&128?(255-this[ne]+1)*-1:this[ne]},v.prototype.readInt16LE=function(ne,ae){ae||M(ne,2,this.length);var ce=this[ne]|this[ne+1]<<8;return ce&32768?ce|4294901760:ce},v.prototype.readInt16BE=function(ne,ae){ae||M(ne,2,this.length);var ce=this[ne+1]|this[ne]<<8;return ce&32768?ce|4294901760:ce},v.prototype.readInt32LE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},v.prototype.readInt32BE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},v.prototype.readFloatLE=function(ne,ae){return ae||M(ne,4,this.length),O.read(this,ne,!0,23,4)},v.prototype.readFloatBE=function(ne,ae){return ae||M(ne,4,this.length),O.read(this,ne,!1,23,4)},v.prototype.readDoubleLE=function(ne,ae){return ae||M(ne,8,this.length),O.read(this,ne,!0,52,8)},v.prototype.readDoubleBE=function(ne,ae){return ae||M(ne,8,this.length),O.read(this,ne,!1,52,8)};function J(Ae,ne,ae,ce,xe,Fe){if(!v.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>xe||neAe.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,ce=ce|0,!xe){var Fe=Math.pow(2,8*ce)-1;J(this,ne,ae,ce,Fe,0)}var ke=1,ct=0;for(this[ae]=ne&255;++ct=0&&(ct*=256);)this[ae+ke]=ne/ct&255;return ae+ce},v.prototype.writeUInt8=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,1,255,0),v.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),this[ae]=ne&255,ae+1};function X(Ae,ne,ae,ce){ne<0&&(ne=65535+ne+1);for(var xe=0,Fe=Math.min(Ae.length-ae,2);xe>>(ce?xe:1-xe)*8}v.prototype.writeUInt16LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8):X(this,ne,ae,!0),ae+2},v.prototype.writeUInt16BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>8,this[ae+1]=ne&255):X(this,ne,ae,!1),ae+2};function re(Ae,ne,ae,ce){ne<0&&(ne=4294967295+ne+1);for(var xe=0,Fe=Math.min(Ae.length-ae,4);xe>>(ce?xe:3-xe)*8&255}v.prototype.writeUInt32LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[ae+3]=ne>>>24,this[ae+2]=ne>>>16,this[ae+1]=ne>>>8,this[ae]=ne&255):re(this,ne,ae,!0),ae+4},v.prototype.writeUInt32BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>24,this[ae+1]=ne>>>16,this[ae+2]=ne>>>8,this[ae+3]=ne&255):re(this,ne,ae,!1),ae+4},v.prototype.writeIntLE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,!xe){var Fe=Math.pow(2,8*ce-1);J(this,ne,ae,ce,Fe-1,-Fe)}var ke=0,ct=1,ft=0;for(this[ae]=ne&255;++ke>0)-ft&255;return ae+ce},v.prototype.writeIntBE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,!xe){var Fe=Math.pow(2,8*ce-1);J(this,ne,ae,ce,Fe-1,-Fe)}var ke=ce-1,ct=1,ft=0;for(this[ae+ke]=ne&255;--ke>=0&&(ct*=256);)ne<0&&ft===0&&this[ae+ke+1]!==0&&(ft=1),this[ae+ke]=(ne/ct>>0)-ft&255;return ae+ce},v.prototype.writeInt8=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,1,127,-128),v.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),ne<0&&(ne=255+ne+1),this[ae]=ne&255,ae+1},v.prototype.writeInt16LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8):X(this,ne,ae,!0),ae+2},v.prototype.writeInt16BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>8,this[ae+1]=ne&255):X(this,ne,ae,!1),ae+2},v.prototype.writeInt32LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8,this[ae+2]=ne>>>16,this[ae+3]=ne>>>24):re(this,ne,ae,!0),ae+4},v.prototype.writeInt32BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>24,this[ae+1]=ne>>>16,this[ae+2]=ne>>>8,this[ae+3]=ne&255):re(this,ne,ae,!1),ae+4};function se(Ae,ne,ae,ce,xe,Fe){if(ae+ce>Ae.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function _e(Ae,ne,ae,ce,xe){return xe||se(Ae,ne,ae,4,34028234663852886e22,-34028234663852886e22),O.write(Ae,ne,ae,ce,23,4),ae+4}v.prototype.writeFloatLE=function(ne,ae,ce){return _e(this,ne,ae,!0,ce)},v.prototype.writeFloatBE=function(ne,ae,ce){return _e(this,ne,ae,!1,ce)};function ge(Ae,ne,ae,ce,xe){return xe||se(Ae,ne,ae,8,17976931348623157e292,-17976931348623157e292),O.write(Ae,ne,ae,ce,52,8),ae+8}v.prototype.writeDoubleLE=function(ne,ae,ce){return ge(this,ne,ae,!0,ce)},v.prototype.writeDoubleBE=function(ne,ae,ce){return ge(this,ne,ae,!1,ce)},v.prototype.copy=function(ne,ae,ce,xe){if(ce||(ce=0),!xe&&xe!==0&&(xe=this.length),ae>=ne.length&&(ae=ne.length),ae||(ae=0),xe>0&&xe=this.length)throw new RangeError("sourceStart out of bounds");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),ne.length-ae=0;--ke)ne[ke+ae]=this[ke+ce];else if(Fe<1e3||!v.TYPED_ARRAY_SUPPORT)for(ke=0;ke>>0,ce=ce===void 0?this.length:ce>>>0,ne||(ne=0);var ke;if(typeof ne=="number")for(ke=ae;ke55295&&ae<57344){if(!xe){if(ae>56319){(ne-=3)>-1&&Fe.push(239,191,189);continue}else if(ke+1===ce){(ne-=3)>-1&&Fe.push(239,191,189);continue}xe=ae;continue}if(ae<56320){(ne-=3)>-1&&Fe.push(239,191,189),xe=ae;continue}ae=(xe-55296<<10|ae-56320)+65536}else xe&&((ne-=3)>-1&&Fe.push(239,191,189));if(xe=null,ae<128){if((ne-=1)<0)break;Fe.push(ae)}else if(ae<2048){if((ne-=2)<0)break;Fe.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((ne-=3)<0)break;Fe.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((ne-=4)<0)break;Fe.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return Fe}function $e(Ae){for(var ne=[],ae=0;ae>8,xe=ae%256,Fe.push(xe),Fe.push(ce);return Fe}function Ie(Ae){return Q.toByteArray(Re(Ae))}function ze(Ae,ne,ae,ce){for(var xe=0;xe=ne.length||xe>=Ae.length);++xe)ne[xe+ae]=Ae[xe];return xe}function at(Ae){return Ae!==Ae}}).call(this,G("IyRk"))},HmJG:function(qe,pe,G){},I8Z2:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return j}),G.d(pe,"b",function(){return c}),G.d(pe,"c",function(){return i});var q=G("q1tI"),Q=function(){var d=function(s,A){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var w in p)p.hasOwnProperty(w)&&(a[w]=p[w])},d(s,A)};return function(s,A){d(s,A);function a(){this.constructor=s}s.prototype=A===null?Object.create(A):(a.prototype=A.prototype,new a)}}(),O=q.createContext(null),j=function(d){Q(s,d);function s(){return d!==null&&d.apply(this,arguments)||this}return s.prototype.render=function(){return q.createElement(O.Provider,{value:this.props.store},this.props.children)},s}(q.Component),D=G("Gytx"),B=G.n(D),I=G("2mql"),v=G.n(I),T=function(){var d=function(s,A){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var w in p)p.hasOwnProperty(w)&&(a[w]=p[w])},d(s,A)};return function(s,A){d(s,A);function a(){this.constructor=s}s.prototype=A===null?Object.create(A):(a.prototype=A.prototype,new a)}}(),E=function(){return E=Object.assign||function(d){for(var s,A=1,a=arguments.length;Athis._ux||s(S-this._yi)>this._uy||this._len<5;return this.addData(I.L,w,S),this._ctx&&x&&(this._needsDash()?this._dashedLineTo(w,S):this._ctx.lineTo(w,S)),x&&(this._xi=w,this._yi=S),this},bezierCurveTo:function(w,S,x,L,b,h){return this.addData(I.C,w,S,x,L,b,h),this._ctx&&(this._needsDash()?this._dashedBezierTo(w,S,x,L,b,h):this._ctx.bezierCurveTo(w,S,x,L,b,h)),this._xi=b,this._yi=h,this},quadraticCurveTo:function(w,S,x,L){return this.addData(I.Q,w,S,x,L),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(w,S,x,L):this._ctx.quadraticCurveTo(w,S,x,L)),this._xi=x,this._yi=L,this},arc:function(w,S,x,L,b,h){return this.addData(I.A,w,S,x,x,L,b-L,0,h?0:1),this._ctx&&this._ctx.arc(w,S,x,L,b,h),this._xi=o(b)*x+w,this._yi=i(b)*x+S,this},arcTo:function(w,S,x,L,b){return this._ctx&&this._ctx.arcTo(w,S,x,L,b),this},rect:function(w,S,x,L){return this._ctx&&this._ctx.rect(w,S,x,L),this.addData(I.R,w,S,x,L),this},closePath:function(){this.addData(I.Z);var w=this._ctx,S=this._x0,x=this._y0;return w&&(this._needsDash()&&this._dashedLineTo(S,x),w.closePath()),this._xi=S,this._yi=x,this},fill:function(w){w&&w.fill(),this.toStatic()},stroke:function(w){w&&w.stroke(),this.toStatic()},setLineDash:function(w){if(w instanceof Array){this._lineDash=w,this._dashIdx=0;for(var S=0,x=0;xS.length&&(this._expandData(),S=this.data);for(var x=0;x0&&m<=w||f<0&&m>=w||f===0&&(C>0&&F<=S||C<0&&F>=S);){if(Z=this._dashIdx,P=b[Z],m+=f*P,F+=C*P,this._dashIdx=(Z+1)%z,f>0&&mr||C>0&&Fl)continue;h[Z%2?"moveTo":"lineTo"](f>=0?u(m,w):c(m,w),C>=0?u(F,S):c(F,S))}f=m-w,C=F-S,this._dashOffset=-d(f*f+C*C)},_dashedBezierTo:function(w,S,x,L,b,h){var r=this._dashSum,l=this._dashOffset,f=this._lineDash,C=this._ctx,g=this._xi,m=this._yi,F,P,z,Z=q.cubicAt,V=0,M=this._dashIdx,J=f.length,X,re,se=0;for(l<0&&(l=r+l),l%=r,F=0;F<1;F+=.1)P=Z(g,w,x,b,F+.1)-Z(g,w,x,b,F),z=Z(m,S,L,h,F+.1)-Z(m,S,L,h,F),V+=d(P*P+z*z);for(;Ml);M++);for(F=(se-l)/V;F<=1;)X=Z(g,w,x,b,F),re=Z(m,S,L,h,F),M%2?C.moveTo(X,re):C.lineTo(X,re),F+=f[M]/V,M=(M+1)%J;M%2!==0&&C.lineTo(b,h),P=b-X,z=h-re,this._dashOffset=-d(P*P+z*z)},_dashedQuadraticTo:function(w,S,x,L){var b=x,h=L;x=(x+2*w)/3,L=(L+2*S)/3,w=(this._xi+2*w)/3,S=(this._yi+2*S)/3,this._dashedBezierTo(w,S,x,L,b,h)},toStatic:function(){var w=this.data;w instanceof Array&&(w.length=this._len,A&&(this.data=new Float32Array(w)))},getBoundingRect:function(){v[0]=v[1]=E[0]=E[1]=Number.MAX_VALUE,T[0]=T[1]=n[0]=n[1]=-Number.MAX_VALUE;for(var w=this.data,S=0,x=0,L=0,b=0,h=0;hf||s(l-h)>C||m===g-1)&&(w.lineTo(r,l),b=r,h=l);break;case I.C:w.bezierCurveTo(S[m++],S[m++],S[m++],S[m++],S[m++],S[m++]),b=S[m-2],h=S[m-1];break;case I.Q:w.quadraticCurveTo(S[m++],S[m++],S[m++],S[m++]),b=S[m-2],h=S[m-1];break;case I.A:var P=S[m++],z=S[m++],Z=S[m++],V=S[m++],M=S[m++],J=S[m++],X=S[m++],re=S[m++],se=Z>V?Z:V,_e=Z>V?1:Z/V,ge=Z>V?V/Z:1,we=Math.abs(Z-V)>.001,Re=M+J;we?(w.translate(P,z),w.rotate(X),w.scale(_e,ge),w.arc(0,0,se,M,Re,1-re),w.scale(1/_e,1/ge),w.rotate(-X),w.translate(-P,-z)):w.arc(P,z,se,M,Re,1-re),m===1&&(x=o(M)*Z+P,L=i(M)*V+z),b=o(Re)*Z+P,h=i(Re)*V+z;break;case I.R:x=b=S[m],L=h=S[m+1],w.rect(S[m++],S[m++],S[m++],S[m++]);break;case I.Z:w.closePath(),b=x,h=L}}}},a.CMD=I;var p=a;qe.exports=p},ItGF:function(qe,pe){var G={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?G={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?G={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?G={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:G=Q(navigator.userAgent);var q=G;function Q(O){var j={},D={},B=O.match(/Firefox\/([\d.]+)/),I=O.match(/MSIE\s([\d.]+)/)||O.match(/Trident\/.+?rv:(([\d.]+))/),v=O.match(/Edge\/([\d.]+)/),T=/micromessenger/i.test(O);return B&&(D.firefox=!0,D.version=B[1]),I&&(D.ie=!0,D.version=I[1]),v&&(D.edge=!0,D.version=v[1]),T&&(D.weChat=!0),{browser:D,os:j,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!D.ie&&!D.edge,pointerEventsSupported:"onpointerdown"in window&&(D.edge||D.ie&&D.version>=11),domSupported:typeof document!="undefined"}}qe.exports=q},K2GJ:function(qe,pe,G){var q=G("fW2E"),Q=G("gut8"),O=Q.ContextCachedBy,j=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],D=function(u){this.extendFrom(u,!1)};function B(u,c,o){var i=c.x==null?0:c.x,d=c.x2==null?1:c.x2,s=c.y==null?0:c.y,A=c.y2==null?0:c.y2;c.global||(i=i*o.width+o.x,d=d*o.width+o.x,s=s*o.height+o.y,A=A*o.height+o.y),i=isNaN(i)?0:i,d=isNaN(d)?1:d,s=isNaN(s)?0:s,A=isNaN(A)?0:A;var a=u.createLinearGradient(i,s,d,A);return a}function I(u,c,o){var i=o.width,d=o.height,s=Math.min(i,d),A=c.x==null?.5:c.x,a=c.y==null?.5:c.y,p=c.r==null?.5:c.r;c.global||(A=A*i+o.x,a=a*d+o.y,p=p*s);var w=u.createRadialGradient(A,a,0,A,a,p);return w}D.prototype={constructor:D,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(u,c,o){var i=this,d=o&&o.style,s=!d||u.__attrCachedBy!==O.STYLE_BIND;u.__attrCachedBy=O.STYLE_BIND;for(var A=0;A0},extendFrom:function(u,c){if(u)for(var o in u)u.hasOwnProperty(o)&&(c===!0||(c===!1?!this.hasOwnProperty(o):u[o]!=null))&&(this[o]=u[o])},set:function(u,c){typeof u=="string"?this[u]=c:this.extendFrom(u,!0)},clone:function(){var u=new this.constructor;return u.extendFrom(this,!0),u},getGradient:function(u,c,o){for(var i=c.type==="radial"?I:B,d=i(u,c,o),s=c.colorStops,A=0;A1&&arguments[1]!==void 0?arguments[1]:1,Me=ke.length,me=0;me1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(M).map(function(X,re){if(!D.isValidElement(X)||!X.type)return null;var se=X.type.isSelectOptGroup,_e=X.key,ge=X.props,we=ge.children,Re=Object(I.a)(ge,["children"]);return J||!se?b(X):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(_e===null?re:_e,"__"),label:_e},Re),{},{options:h(we)})}).filter(function(X){return X})}var r=G("2Qr1"),l=G("qNPg"),f=G("U8pU"),C=G("Kwbf"),g=G("WKfj");function m(M){var J=M.mode,X=M.options,re=M.children,se=M.backfill,_e=M.allowClear,ge=M.placeholder,we=M.getInputElement,Re=M.showSearch,He=M.onSearch,Se=M.defaultOpen,Te=M.autoFocus,$e=M.labelInValue,bt=M.value,Ie=M.inputValue,ze=M.optionLabelProp,at=J==="multiple"||J==="tags",Ae=Re!==void 0?Re:at||J==="combobox",ne=X||h(re);if(Object(C.a)(J!=="tags"||ne.every(function(Fe){return!Fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var ae=ne.some(function(Fe){return Fe.options?Fe.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Fe?Fe.value:Fe.key)=="number"});Object(C.a)(!ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(J!=="combobox"||!ze,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(J==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(C.a)(J==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(C.b)(J!=="combobox"||!we||!_e||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!Ae&&J!=="combobox"&&J!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!Se||Te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),bt!=null){var ce=Object(g.d)(bt);Object(C.a)(!$e||ce.every(function(Fe){return Object(f.a)(Fe)==="object"&&("key"in Fe||"value"in Fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!at||Array.isArray(bt),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var xe=null;Object(L.a)(re).some(function(Fe){if(!D.isValidElement(Fe)||!Fe.type)return!1;var ke=Fe.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var ct=Object(L.a)(Fe.props.children).every(function(ft){return!D.isValidElement(ft)||!Fe.type||ft.type.isSelectOption?!0:(xe=ft.type,!1)});return!ct}return xe=ke,!0}),xe&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(C.a)(Ie===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=m,P=Object(l.a)({prefixCls:"rc-select",components:{optionList:A},convertChildrenToData:h,flattenOptions:r.d,getLabeledValue:r.e,filterOptions:r.b,isValueDisabled:r.g,findValueOption:r.c,warningProps:F,fillOptionsWithMissingValue:r.a}),z=function(M){Object(O.a)(X,M);var J=Object(j.a)(X);function X(){var re;return Object(q.a)(this,X),re=J.apply(this,arguments),re.selectRef=D.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(Q.a)(X,[{key:"render",value:function(){return D.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),X}(D.Component);z.Option=p,z.OptGroup=S;var Z=z,V=pe.c=Z},M8RZ:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return T});var q=G("fWQN"),Q=G("mtLc"),O=G("yKVA"),j=G("879j"),D=G("q1tI"),B=G.n(D),I=G("i8i4"),v=G.n(I),T=function(E){Object(O.a)(u,E);var n=Object(j.a)(u);function u(c){var o;Object(q.a)(this,u),o=n.call(this,c);var i=window.document;return o.node=i.createElement("div"),i.body.appendChild(o.node),o}return Object(Q.a)(u,[{key:"render",value:function(){var o=this.props.children;return Object(I.createPortal)(o,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(B.a.Component)},MEGo:function(qe,pe,G){var q=G("4fz+"),Q=G("Dagg"),O=G("dqUG"),j=G("2fw6"),D=G("x6Kt"),B=G("rmlV"),I=G("yxFR"),v=G("y+Vt"),T=G("h7HQ"),E=G("1Jh7"),n=G("SKnc"),u=G("K2GJ"),c=G("Fofx"),o=G("NC18"),i=o.createFromString,d=G("bYtY"),s=d.isString,A=d.extend,a=d.defaults,p=d.trim,w=d.each,S=/[\s,]+/;function x(X){if(s(X)){var re=new DOMParser;X=re.parseFromString(X,"text/xml")}for(X.nodeType===9&&(X=X.firstChild);X.nodeName.toLowerCase()!=="svg"||X.nodeType!==1;)X=X.nextSibling;return X}function L(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}L.prototype.parse=function(X,re){re=re||{};var se=x(X);if(!se)throw new Error("Illegal svg");var _e=new q;this._root=_e;var ge=se.getAttribute("viewBox")||"",we=parseFloat(se.getAttribute("width")||re.width),Re=parseFloat(se.getAttribute("height")||re.height);isNaN(we)&&(we=null),isNaN(Re)&&(Re=null),g(se,_e,null,!0);for(var He=se.firstChild;He;)this._parseNode(He,_e),He=He.nextSibling;var Se,Te;if(ge){var $e=p(ge).split(S);$e.length>=4&&(Se={x:parseFloat($e[0]||0),y:parseFloat($e[1]||0),width:parseFloat($e[2]),height:parseFloat($e[3])})}if(Se&&we!=null&&Re!=null&&(Te=M(Se,we,Re),!re.ignoreViewBox)){var bt=_e;_e=new q,_e.add(bt),bt.scale=Te.scale.slice(),bt.position=Te.position.slice()}return!re.ignoreRootClip&&we!=null&&Re!=null&&_e.setClipPath(new D({shape:{x:0,y:0,width:we,height:Re}})),{root:_e,width:we,height:Re,viewBoxRect:Se,viewBoxTransform:Te}},L.prototype._parseNode=function(X,re){var se=X.nodeName.toLowerCase();se==="defs"?this._isDefine=!0:se==="text"&&(this._isText=!0);var _e;if(this._isDefine){var ge=h[se];if(ge){var we=ge.call(this,X),Re=X.getAttribute("id");Re&&(this._defs[Re]=we)}}else{var ge=b[se];ge&&(_e=ge.call(this,X,re),re.add(_e))}for(var He=X.firstChild;He;)He.nodeType===1&&this._parseNode(He,_e),He.nodeType===3&&this._isText&&this._parseText(He,_e),He=He.nextSibling;se==="defs"?this._isDefine=!1:se==="text"&&(this._isText=!1)},L.prototype._parseText=function(X,re){if(X.nodeType===1){var se=X.getAttribute("dx")||0,_e=X.getAttribute("dy")||0;this._textX+=parseFloat(se),this._textY+=parseFloat(_e)}var ge=new O({style:{text:X.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});l(re,ge),g(X,ge,this._defs);var we=ge.style.fontSize;we&&we<9&&(ge.style.fontSize=9,ge.scale=ge.scale||[1,1],ge.scale[0]*=we/9,ge.scale[1]*=we/9);var Re=ge.getBoundingRect();return this._textX+=Re.width,re.add(ge),ge};var b={g:function(X,re){var se=new q;return l(re,se),g(X,se,this._defs),se},rect:function(X,re){var se=new D;return l(re,se),g(X,se,this._defs),se.setShape({x:parseFloat(X.getAttribute("x")||0),y:parseFloat(X.getAttribute("y")||0),width:parseFloat(X.getAttribute("width")||0),height:parseFloat(X.getAttribute("height")||0)}),se},circle:function(X,re){var se=new j;return l(re,se),g(X,se,this._defs),se.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),r:parseFloat(X.getAttribute("r")||0)}),se},line:function(X,re){var se=new I;return l(re,se),g(X,se,this._defs),se.setShape({x1:parseFloat(X.getAttribute("x1")||0),y1:parseFloat(X.getAttribute("y1")||0),x2:parseFloat(X.getAttribute("x2")||0),y2:parseFloat(X.getAttribute("y2")||0)}),se},ellipse:function(X,re){var se=new B;return l(re,se),g(X,se,this._defs),se.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),rx:parseFloat(X.getAttribute("rx")||0),ry:parseFloat(X.getAttribute("ry")||0)}),se},polygon:function(X,re){var se=X.getAttribute("points");se&&(se=f(se));var _e=new T({shape:{points:se||[]}});return l(re,_e),g(X,_e,this._defs),_e},polyline:function(X,re){var se=new v;l(re,se),g(X,se,this._defs);var _e=X.getAttribute("points");_e&&(_e=f(_e));var ge=new E({shape:{points:_e||[]}});return ge},image:function(X,re){var se=new Q;return l(re,se),g(X,se,this._defs),se.setStyle({image:X.getAttribute("xlink:href"),x:X.getAttribute("x"),y:X.getAttribute("y"),width:X.getAttribute("width"),height:X.getAttribute("height")}),se},text:function(X,re){var se=X.getAttribute("x")||0,_e=X.getAttribute("y")||0,ge=X.getAttribute("dx")||0,we=X.getAttribute("dy")||0;this._textX=parseFloat(se)+parseFloat(ge),this._textY=parseFloat(_e)+parseFloat(we);var Re=new q;return l(re,Re),g(X,Re,this._defs),Re},tspan:function(X,re){var se=X.getAttribute("x"),_e=X.getAttribute("y");se!=null&&(this._textX=parseFloat(se)),_e!=null&&(this._textY=parseFloat(_e));var ge=X.getAttribute("dx")||0,we=X.getAttribute("dy")||0,Re=new q;return l(re,Re),g(X,Re,this._defs),this._textX+=ge,this._textY+=we,Re},path:function(X,re){var se=X.getAttribute("d")||"",_e=i(se);return l(re,_e),g(X,_e,this._defs),_e}},h={lineargradient:function(X){var re=parseInt(X.getAttribute("x1")||0,10),se=parseInt(X.getAttribute("y1")||0,10),_e=parseInt(X.getAttribute("x2")||10,10),ge=parseInt(X.getAttribute("y2")||0,10),we=new n(re,se,_e,ge);return r(X,we),we},radialgradient:function(X){}};function r(X,re){for(var se=X.firstChild;se;){if(se.nodeType===1){var _e=se.getAttribute("offset");_e.indexOf("%")>0?_e=parseInt(_e,10)/100:_e?_e=parseFloat(_e):_e=0;var ge=se.getAttribute("stop-color")||"#000000";re.addColorStop(_e,ge)}se=se.nextSibling}}function l(X,re){X&&X.__inheritedStyle&&(re.__inheritedStyle||(re.__inheritedStyle={}),a(re.__inheritedStyle,X.__inheritedStyle))}function f(X){for(var re=p(X).split(S),se=[],_e=0;_e0;we-=2){var Re=ge[we],He=ge[we-1];_e=_e||c.create();switch(He){case"translate":Re=p(Re).split(S),c.translate(_e,_e,[parseFloat(Re[0]),parseFloat(Re[1]||0)]);break;case"scale":Re=p(Re).split(S),c.scale(_e,_e,[parseFloat(Re[0]),parseFloat(Re[1]||Re[0])]);break;case"rotate":Re=p(Re).split(S),c.rotate(_e,_e,parseFloat(Re[0]));break;case"skew":Re=p(Re).split(S),console.warn("Skew transform is not supported yet");break;case"matrix":var Re=p(Re).split(S);_e[0]=parseFloat(Re[0]),_e[1]=parseFloat(Re[1]),_e[2]=parseFloat(Re[2]),_e[3]=parseFloat(Re[3]),_e[4]=parseFloat(Re[4]),_e[5]=parseFloat(Re[5]);break}}re.setLocalTransform(_e)}}var Z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function V(X){var re=X.getAttribute("style"),se={};if(!re)return se;var _e={};Z.lastIndex=0;for(var ge;(ge=Z.exec(re))!=null;)_e[ge[1]]=ge[2];for(var we in C)C.hasOwnProperty(we)&&_e[we]!=null&&(se[C[we]]=_e[we]);return se}function M(X,re,se){var _e=re/X.width,ge=se/X.height,we=Math.min(_e,ge),Re=[we,we],He=[-(X.x+X.width/2)*we+re/2,-(X.y+X.height/2)*we+se/2];return{scale:Re,position:He}}function J(X,re){var se=new L;return se.parse(X,re)}pe.parseXML=x,pe.makeViewBoxTransform=M,pe.parseSVG=J},MKOG:function(qe,pe,G){var q=G("bYtY"),Q=G("YH21"),O=Q.Dispatcher,j=G("mLcG"),D=G("Bq2U"),B=function(v){v=v||{},this.stage=v.stage||{},this.onframe=v.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,O.call(this)};B.prototype={constructor:B,addClip:function(v){this._clips.push(v)},addAnimator:function(v){v.animation=this;for(var T=v.getClips(),E=0;E=0&&this._clips.splice(T,1)},removeAnimator:function(v){for(var T=v.getClips(),E=0;E1&&(b*=j(F),h*=j(F));var P=(x===L?-1:1)*j((b*b*(h*h)-b*b*(m*m)-h*h*(g*g))/(b*b*(m*m)+h*h*(g*g)))||0,z=P*b*m/h,Z=P*-h*g/b,V=(a+w)/2+B(C)*z-D(C)*Z,M=(p+S)/2+D(C)*z+B(C)*Z,J=E([1,0],[(g-z)/b,(m-Z)/h]),X=[(g-z)/b,(m-Z)/h],re=[(-1*g-z)/b,(-1*m-Z)/h],se=E(X,re);T(X,re)<=-1&&(se=I),T(X,re)>=1&&(se=0),L===0&&se>0&&(se=se-2*I),L===1&&se<0&&(se=se+2*I),f.addData(l,V,M,b,h,J,se,C,L)}var u=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,c=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function o(a){if(!a)return new Q;for(var p=0,w=0,S=p,x=w,L,b=new Q,h=Q.CMD,r=a.match(u),l=0;l1&&arguments[1]!==void 0?arguments[1]:60,D=null;return function(){for(var B=this,I=arguments.length,v=new Array(I),T=0;T=0;d-=1){var s=v.get(d)||new Set;s.forEach(function(A){var a=A.parent,p=A.node;if(E(p)||!A.parent||i.has(A.parent.key))return;if(E(A.parent.node)){i.add(a.key);return}var w=!0,S=!1;(a.children||[]).filter(function(x){return!E(x.node)}).forEach(function(x){var L=x.key,b=n.has(L);w&&!b&&(w=!1),!S&&(b||u.has(L))&&(S=!0)}),w&&n.add(a.key),S&&u.add(a.key),i.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(Q(u,n))}}function D(I,v,T,E,n){for(var u=new Set(I),c=new Set(v),o=0;o<=E;o+=1){var i=T.get(o)||new Set;i.forEach(function(a){var p=a.key,w=a.node,S=a.children,x=S===void 0?[]:S;!u.has(p)&&!c.has(p)&&!n(w)&&x.filter(function(L){return!n(L.node)}).forEach(function(L){u.delete(L.key)})})}c=new Set;for(var d=new Set,s=E;s>=0;s-=1){var A=T.get(s)||new Set;A.forEach(function(a){var p=a.parent,w=a.node;if(n(w)||!a.parent||d.has(a.parent.key))return;if(n(a.parent.node)){d.add(p.key);return}var S=!0,x=!1;(p.children||[]).filter(function(L){return!n(L.node)}).forEach(function(L){var b=L.key,h=u.has(b);S&&!h&&(S=!1),!x&&(h||c.has(b))&&(x=!0)}),S||u.delete(p.key),x&&c.add(p.key),d.add(p.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(Q(c,u))}}function B(I,v,T,E){var n=[],u;E?u=E:u=O;var c=new Set(I.filter(function(s){var A=!!T[s];return A||n.push(s),A})),o=new Map,i=0;Object.keys(T).forEach(function(s){var A=T[s],a=A.level,p=o.get(a);p||(p=new Set,o.set(a,p)),p.add(A),i=Math.max(i,a)}),Object(q.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var d;return v===!0?d=j(c,o,i,u):d=D(c,v.halfCheckedKeys,o,i,u),d}},OLES:function(qe,pe,G){"use strict";var q=G("U8pU"),Q=G("VTBJ"),O=G("Ff2n"),j=G("q1tI"),D=G("uciX"),B=G("7ixt"),I=function(c){var o=c.overlay,i=c.prefixCls,d=c.id,s=c.overlayInnerStyle;return j.createElement("div",{className:"".concat(i,"-inner"),id:d,role:"tooltip",style:s},typeof o=="function"?o():o)},v=I,T=function(c,o){var i=c.overlayClassName,d=c.trigger,s=d===void 0?["hover"]:d,A=c.mouseEnterDelay,a=A===void 0?0:A,p=c.mouseLeaveDelay,w=p===void 0?.1:p,S=c.overlayStyle,x=c.prefixCls,L=x===void 0?"rc-tooltip":x,b=c.children,h=c.onVisibleChange,r=c.afterVisibleChange,l=c.transitionName,f=c.animation,C=c.placement,g=C===void 0?"right":C,m=c.align,F=m===void 0?{}:m,P=c.destroyTooltipOnHide,z=P===void 0?!1:P,Z=c.defaultVisible,V=c.getTooltipContainer,M=c.overlayInnerStyle,J=Object(O.a)(c,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),X=Object(j.useRef)(null);Object(j.useImperativeHandle)(o,function(){return X.current});var re=Object(Q.a)({},J);"visible"in c&&(re.popupVisible=c.visible);var se=function(){var He=c.arrowContent,Se=He===void 0?null:He,Te=c.overlay,$e=c.id;return[j.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},Se),j.createElement(v,{key:"content",prefixCls:L,id:$e,overlay:Te,overlayInnerStyle:M})]},_e=!1,ge=!1;if(typeof z=="boolean")_e=z;else if(z&&Object(q.a)(z)==="object"){var we=z.keepParent;_e=we===!0,ge=we===!1}return j.createElement(D.a,Object.assign({popupClassName:i,prefixCls:L,popup:se,action:s,builtinPlacements:B.a,popupPlacement:g,ref:X,popupAlign:F,getPopupContainer:V,onPopupVisibleChange:h,afterPopupVisibleChange:r,popupTransitionName:l,popupAnimation:f,defaultPopupVisible:Z,destroyPopupOnHide:_e,autoDestroy:ge,mouseLeaveDelay:w,popupStyle:S,mouseEnterDelay:a},re),b)},E=Object(j.forwardRef)(T),n=pe.a=E},OS9S:function(qe,pe,G){var q=G("bYtY"),Q=q.inherits,O=G("Gev7"),j=G("mFDi");function D(v){O.call(this,v),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}D.prototype.incremental=!0,D.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},D.prototype.addDisplayable=function(v,T){T?this._temporaryDisplayables.push(v):this._displayables.push(v),this.dirty()},D.prototype.addDisplayables=function(v,T){T=T||!1;for(var E=0;E=0&&b.splice(h,1),b}function n(x,L){var b=x.slice();return b.indexOf(L)===-1&&b.push(L),b}function u(x){return x.split("-")}function c(x,L){return"".concat(x,"-").concat(L)}function o(x){return x&&x.type&&x.type.isTreeNode}function i(x,L){var b=[x],h=L[x];function r(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(f){var C=f.key,g=f.children;b.push(C),r(g)})}return r(h.children),b}function d(x,L){var b=x.clientY,h=L.selectHandle.getBoundingClientRect(),r=h.top,l=h.bottom,f=h.height,C=Math.max(f*v,T);return b<=r+C?-1:b>=l-C?1:0}function s(x,L){if(!x)return;var b=L.multiple;return b?x.slice():x.length?[x[0]]:x}var A=function(L){return L};function a(x,L){if(!x)return[];var b=L||{},h=b.processProps,r=h===void 0?A:h,l=Array.isArray(x)?x:[x];return l.map(function(f){var C=f.children,g=Object(O.a)(f,["children"]),m=a(C,L);return D.a.createElement(I.a,Object.assign({},r(g)),m)})}function p(x){if(!x)return null;var L;if(Array.isArray(x))L={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(Q.a)(x)==="object")L={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(B.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function w(x,L){var b=new Set;function h(r){if(b.has(r))return;var l=L[r];if(!l)return;b.add(r);var f=l.parent,C=l.node;if(C.disabled)return;f&&h(f.key)}return(x||[]).forEach(function(r){h(r)}),Object(q.a)(b)}function S(x){var L={};return Object.keys(x).forEach(function(b){(b.startsWith("data-")||b.startsWith("aria-"))&&(L[b]=x[b])}),L}},Ot1p:function(qe,pe,G){"use strict";var q=G("2qtc"),Q=G("kLXV"),O=G("rAM+"),j=G("miYZ"),D=G("tsqr"),B=G("9og8"),I=G("tJVT"),v=G("jrin"),T=G("WmNS"),E=G.n(T),n=G("q1tI"),u=G.n(n),c=G("VrN/"),o=G.n(c),i=G("bdgK"),d=G("p77/"),s=G("Bd2K"),A=G("ELLl"),a=G("19Vz"),p=G("lZu9"),w=G("+NIl"),S=G("kSUc"),x=G("9Bee"),L=function(De){var Ze=De.value,ht=Ze===void 0?"":Ze,Tt=De.className,kt=De.showTextOnly,It=De.showLines,St=De.style,ut=St===void 0?{}:St,nt=Object(n.useMemo)(function(){return""},[ht]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:nt}}))},b=G("0Owb"),h=G("dejd"),r=G("C+DQ"),l=G("1vsH"),f=G("m3rI"),C=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function g(De){var Ze=De.onActionCallback,ht=De.title,Tt=De.icon,kt=De.actionName,It=De.className,St=It===void 0?"":It,ut=De.children;function nt(){Ze(kt)}return u.a.createElement("a",{title:ht,className:St,onClick:nt},u.a.createElement("i",{className:"md-iconfont ".concat(Tt)}),ut)}var m=function(De){var Ze=De.watch,ht=De.showNullButton,Tt=De.onActionCallback,kt=De.fullScreen,It=De.insertTemp,St=De.hidetoolBar,ut=De.uuid,nt=De.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(l.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(l.F)("_educoder_session"),"&key=").concat(ut,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var tt=[].concat(C,[{title:"".concat(Ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&tt.map(function(Ce,Pe){return u.a.createElement("li",{key:Pe},Ce.actionName?u.a.createElement(g,Object(b.a)({},Ce,{onActionCallback:Tt})):u.a.createElement("span",{className:"v-line"}))}),ht?u.a.createElement("li",null,u.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tt},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,It&&u.a.createElement("li",null,u.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(It),onActionCallback:Tt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(g,{icon:"".concat(kt?"icon-shrink":"icon-enlarge"),title:kt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tt})))},F=G("M8RZ"),P=G("+L6B"),z=G("2/Rp"),Z=G("y8nQ"),V=G("Vl3Y"),M=G("5NDa"),J=G("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},re=function(De){var Ze=De.callback,ht=De.onCancel;function Tt(kt){Ze(kt)}return u.a.createElement(V.a,Object(b.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Tt}),u.a.createElement(V.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(J.a,null)),u.a.createElement(V.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(J.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},se=G("7ahc"),_e=G("HmJG"),ge=G("BjJ7"),we=V.a.useForm,Re={width:280,marginRight:10},He={labelCol:{span:5},wrapperCol:{span:19}},Se=function(De){var Ze=De.callback,ht=De.onCancel,Tt=we(),kt=Object(I.a)(Tt,1),It=kt[0];function St(tt){Ze(tt)}function ut(tt,Ce){if(tt.status===-1){D.b.error(tt.message);return}It.setFieldsValue({src:"/api/attachments/".concat(tt.id),type:Ce.type})}function nt(tt){var Ce=tt.target.files[0];$e(Ce,ut)}return u.a.createElement(V.a,Object(b.a)({form:It},He,{className:"upload-image-panel",onFinish:St}),u.a.createElement(V.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(V.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},u.a.createElement(J.a,{style:Re})),u.a.createElement(Te,{onFileChange:nt}))),u.a.createElement(V.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(J.a,{style:{width:264}})),u.a.createElement(V.a.Item,{style:{textAlign:"right"}},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))};function Te(De){var Ze=De.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:Ze}))}function $e(De,Ze){if(!De)throw new String("\u6CA1\u6709\u6587\u4EF6");var ht=new FormData;ht.append("editormd-image-file",De),ht.append("file_param_name","editormd-image-file"),ht.append("byxhr","true");var Tt=new window.XMLHttpRequest;Tt.withCredentials=!0,Tt.addEventListener("load",function(kt){Ze(JSON.parse(kt.target.responseText),De)},!1),Tt.addEventListener("error",function(kt){console.error(kt)},!1),Tt.open("POST","".concat(ge.a,"/api/attachments.json")),Tt.send(ht)}var bt=G("giR+"),Ie=G("fyUT"),ze=G("7Kak"),at=G("9yH6"),Ae=at.a.Group,ne={margin:"0 8px"},ae=function(De){var Ze=De.callback,ht=De.onCancel;function Tt(kt){Ze(kt)}return u.a.createElement(V.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Tt},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:ne},"\u884C\u6570"),u.a.createElement(V.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(Ie.a,null)),u.a.createElement("span",{style:ne},"\u5217\u6570"),u.a.createElement(V.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(Ie.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(V.a.Item,{name:"align"},u.a.createElement(Ae,null,u.a.createElement(at.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(at.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(at.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(at.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},ce=G("ErOA"),xe=G("7Cbv"),Fe="link",ke="upload-image",ct="code-block",ft="add-table",yt="------------",Et={default:yt,left:":".concat(yt),center:":".concat(yt,":"),right:"".concat(yt,":")},Ot=G("9VGf"),Mt,Qe;function Ne(){}var lt=0,dt=1e4,Ye="\u2581",st=`
**\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 je(De){return/^\d+$/.test(De)?"".concat(De,"px"):De}var Le=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Le?"Cmd":"Ctrl",me=["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"],ye=(Mt={},Object(v.a)(Mt,Me+"-B","bold"),Object(v.a)(Mt,Me+"-I","italic"),Mt),Ee=(Qe={},Object(v.a)(Qe,Fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(v.a)(Qe,ct,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(v.a)(Qe,ke,"\u6DFB\u52A0\u6587\u4EF6"),Object(v.a)(Qe,ft,"\u6DFB\u52A0\u8868\u683C"),Qe),Oe=pe.a=function(De){var Ze=De.defaultValue,ht=Ze===void 0?"":Ze,Tt=De.onChange,kt=De.width,It=kt===void 0?"100%":kt,St=De.height,ut=St===void 0?400:St,nt=De.miniToolbar,tt=nt===void 0?!1:nt,Ce=De.isFocus,Pe=Ce===void 0?!1:Ce,pt=De.watch,it=De.insertTemp,xt=De.mode,_t=xt===void 0?"markdown":xt,Xe=De.id,mt=Xe===void 0?"markdown-editor-id":Xe,Pt=De.showResizeBar,Rt=Pt===void 0?!1:Pt,Qt=De.noStorage,Ir=Qt===void 0?!1:Qt,Fr=De.showNullButton,wr=Fr===void 0?!1:Fr,Kt=De.hidetoolBar,Ur=Kt===void 0?!1:Kt,Kr=De.fullScreen,Rr=Kr===void 0?!1:Kr,pr=De.onBlur,Or=De.onCMBeforeChange,pn=De.onFullScreen,un=De.className,fe=un===void 0?"":un,be=De.disablePaste,Ue=be===void 0?!1:be,rt=De.placeholder,et=rt===void 0?"":rt,Dt=De.values,ee=Dt===void 0?"":Dt,U=Object(n.useState)(null),N=Object(I.a)(U,2),$=N[0],le=N[1],te=Object(n.useState)(ht),Ke=Object(I.a)(te,2),Ct=Ke[0],Ut=Ke[1],Ht=Object(n.useState)(pt),wt=Object(I.a)(Ht,2),Yt=wt[0],Xt=wt[1],qt=Object(n.useState)(Rr),Ar=Object(I.a)(qt,2),Br=Ar[0],yr=Ar[1],Lr=Object(n.useState)(""),cr=Object(I.a)(Lr,2),Dr=cr[0],Pr=cr[1],An=Object(n.useState)(0),zr=Object(I.a)(An,2),Jr=zr[0],bn=zr[1],$r=Object(n.useState)(ut),en=Object(I.a)($r,2),an=en[0],cn=en[1],mn=Object(n.useState)(!1),br=Object(I.a)(mn,2),dr=br[0],tr=br[1],nr=Object(n.useRef)(Object(xe.a)()),$t=Object(n.useRef)(!1),vr=Object(n.useRef)(),mr=Object(n.useRef)(),xr=Object(n.useRef)(),Er=Object(n.useRef)(),On=Object(n.useRef)(),Gr=function(){var er=Object(B.a)(E.a.mark(function hr(){var Jt,gr;return E.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:return Xr.next=2,Object(ce.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:nr.current}});case 2:gr=Xr.sent,gr!=null&&(Jt=gr.attachments)!==null&&Jt!==void 0&&Jt.length&&(console.log("cm:",$,mr),gr.attachments.map(function(Cr){Cr.content_type.indexOf("image")>-1?$.replaceSelection(".concat(Cr.content_type,")")):Cr.content_type.indexOf("video")>-1?$.replaceSelection('')):Cr.content_type.indexOf("pdf")>-1?$.replaceSelection('').concat(Cr.name,"")):$.replaceSelection("[".concat(Cr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Cr.id,"?type=").concat(Cr.content_type,")"))}));case 4:case"end":return Xr.stop()}},hr)}));return function(){return er.apply(this,arguments)}}();Object(n.useEffect)(function(){Ut(ee),$==null||$.setValue(ee)},[ee]),Object(n.useEffect)(function(){pn==null||pn(Br)},[Br]),Object(n.useEffect)(function(){if(mr.current){var er=o.a.fromTextArea(mr.current,{mode:_t,lineNumbers:!tt,lineWrapping:!0,value:ht,autoCloseTags:!0,autoCloseBrackets:!0});Pe&&er.focus();function hr(Jt,gr){if(Ue){gr.preventDefault();return}var Tr=gr.clipboardData;if(Tr){var Xr=Tr.types.toString(),Cr=Tr.items;if(Xr==="Files"||Tr.types.indexOf("Files")>-1){if(gr.preventDefault(),_t=="stex")return;try{var on,Dn=Cr[1];((on=Cr[0])===null||on===void 0?void 0:on.kind)==="file"&&(Dn=Cr[0]);var Mr=Dn.getAsFile(),li=Mr.name.split(".").pop();$e(Mr,function(Nr){if(Nr.id){var jn,Kn,ui;(Mr==null||((jn=Mr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection(".concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('').concat(Mr.name,"")):me.includes(li)?er.replaceSelection('').concat(Mr.name,"")):er.replaceSelection("[".concat(Mr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})}catch(Nr){D.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return er.on("paste",hr),er.on("dragleave",function(Jt,gr){xr.current.classList.remove("mouse-hover-md")}),er.on("dragover",function(Jt,gr){xr.current.classList.add("mouse-hover-md")}),er.on("drop",function(Jt,gr){xr.current.classList.add("mouse-hover-md");var Tr;if(Tr=gr.dataTransfer.files,Tr.length>0){gr.preventDefault(),gr.stopPropagation();for(var Xr=function(Dn){var Mr=Tr[Dn],li=Mr.name.split(".").pop();$e(Mr,function(Nr){if(Nr.id){var jn,Kn,ui;(Mr==null||((jn=Mr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection(".concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('').concat(Mr.name,"")):me.includes(li)?er.replaceSelection('').concat(Mr.name,"")):er.replaceSelection("[".concat(Mr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})},Cr=0;Cr0||Cr.target.offsetWidth>0)&&(En(),$.setSize("100%","100%"),$.refresh())}}catch(on){Tr.e(on)}finally{Tr.f()}});return Jt.observe(mr.current.parentElement),Jt}if($){var hr=er();return function(){hr.unobserve(mr.current.parentElement)}}},[$,En]),Object(n.useEffect)(function(){if($){for(var er=[],hr=function(){var Cr=gr[Jt];Tr=Object(I.a)(Cr,2);var on=Tr[0],Dn=Tr[1],Mr=Object(v.a)({},on,function(){Qn(Dn)});er.push(Mr),$.addKeyMap(Mr)},Jt=0,gr=Object.entries(ye);Jt0){var er=new Date().getTime(),hr=window.sessionStorage.getItem(mt);er>=Jr+dt&&(!hr||hr!==Ct)&&(window.sessionStorage.setItem(mt,Ct),tr(!0))}},dt),Object(n.useEffect)(function(){Xt(pt)},[$,pt]),Object(n.useEffect)(function(){$&&(Pe&&$.focus())},[$,Pe]),Object(n.useEffect)(function(){if(Yt&&$){var er=$.getScrollerElement();function hr(Jt){var gr=Jt.target;if(On.current){var Tr=gr.scrollTop/gr.scrollHeight;On.current.scrollTop=On.current.scrollHeight*Tr}}return er.addEventListener("scroll",hr),function(){er.removeEventListener("scroll",hr)}}},[$,Yt]),Object(n.useEffect)(function(){if($&&Or){function er(hr,Jt){Or(hr,Jt)}return $.on("beforeChange",er),function(){$.off("beforeChange",er)}}},[$,Or]),Object(n.useEffect)(function(){if($&&pr){function er(){pr($.getValue())}return $.on("blur",er),function(){$.off("blur",er)}}},[$,pr]),Object(n.useEffect)(function(){if($){function er(hr){var Jt=hr.getValue();Ut(Jt),bn(new Date().getTime()),hr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Tt&&Tt(Jt)}return $.on("change",er),function(){$.off("change",er)}}},[$,Tt]),Object(n.useEffect)(function(){$&&(ht==null?($.setValue(""),Ut("")):ht!==$.getValue()&&($.setValue(ht),Ut(ht),$.setCursor($.lineCount(),0)))},[$,ht]);var Qn=Object(n.useCallback)(function(er){var hr=$.getCursor(),Jt=$.getSelection(),gr=Jt.split(`
`);switch(er){case"bold":return $.replaceSelection("**"+Jt+"**"),Jt===""&&$.setCursor(hr.line,hr.ch+2),$.focus();case"italic":return $.replaceSelection("*"+Jt+"*"),Jt===""&&$.setCursor(hr.line,hr.ch+1),$.focus();case"code":return $.replaceSelection("`"+Jt+"`"),Jt===""&&$.setCursor(hr.line,hr.ch+1),$.focus();case"inline-latex":return $.replaceSelection("`$$"+Jt+"$$`"),Jt===""&&$.setCursor(hr.line,hr.ch+3),$.focus();case"latex":return $.replaceSelection("```latex\n"+Jt+"\n```"),$.setCursor(hr.line+1,Jt.length+1),$.focus();case"line-break":return $.replaceSelection(`
`),$.focus();case"list-ul":return Jt===""?$.replaceSelection("- "+Jt):$.replaceSelection(gr.map(function(Tr){return Tr===""?"":"- ".concat(Tr)}).join(`
`)),$.focus();case"list-ol":return Jt===""?$.replaceSelection("1. "+Jt):$.replaceSelection(gr.map(function(Tr,Xr){return Tr===""?"":"".concat(Xr+1,". ").concat(Tr)}).join(`
`)),$.focus();case"add-null-ch":return Jt===""&&$.setCursor(hr.line,hr.ch+1),$.replaceSelection(Ye),$.focus();case"inster-template-1":return Jt===""&&$.setCursor(hr.line,hr.ch),$.replaceSelection(st),$.focus();case"eraser":return $.setValue(""),$.focus();case"trigger-watch":return Xt(!Yt),$.focus();case"trigger-full-screen":return yr(!Br),$.focus();case Fe:Pr(Fe);return;case ct:Pr(ct);return;case ke:Pr(ke);return;case ft:Pr(ft);return;default:throw new Error}},[$,Yt,Br]),wn=Object(n.useCallback)(function(er){Pr("");switch(Dr){case Fe:var hr=er.title,Jt=er.link;return $.replaceSelection("[".concat(hr,"](").concat(Jt,")")),$.focus();case ct:var gr=er.language,Tr=er.content;return $.replaceSelection(["```"+gr,Tr,"```"].join(`
`)),$.focus();case ke:var Xr=er.src,Cr=er.alt;return Cr?$.replaceSelection(".concat(Xr,' "').concat(Cr,'" )')):$.replaceSelection("")),$.focus();case ft:for(var on=er.row,Dn=er.col,Mr=er.align,li=`
`,Nr=0;Nr300&&(on=300);var Dn=ut+on+"px";cn(Dn)}}return er.addEventListener("mousedown",gr),document.addEventListener("mousemove",Xr),document.addEventListener("mouseup",Tr),function(){er.removeEventListener("mousedown",gr),document.removeEventListener("mousemove",Xr),document.removeEventListener("mouseup",Tr)}}},[$,Er]),Object(n.useEffect)(function(){cn(ut)},[ut]);var In=je(It),Jn=je(an),Fn={width:In,height:Jn},si=Object(n.useMemo)(function(){if(Jr){var er=new Date(Jr),hr=er.getHours(),Jt=er.getMinutes(),gr=er.getSeconds();return hr=hr<10?"0"+hr:hr,Jt=Jt<10?"0"+Jt:Jt,gr=gr<10?"0"+gr:gr,"".concat(hr,":").concat(Jt,":").concat(gr)}return 0},[Jr]);function Un(){window.sessionStorage.removeItem(mt),tr(!1),bn(0)}function gn(){tr(!1),bn(0),$.setValue(window.sessionStorage.getItem(mt))}function kn(er,hr){var Jt=$.getValue();Jt=Jt.replace(er,hr),Ut(Jt),$==null||$.setValue(Jt)}return u.a.createElement(n.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:xr},u.a.createElement("div",{className:"markdown-editor-container ".concat(fe," ").concat(Yt?"on-preview":""," ").concat(tt?"mini":""," ").concat(Br?"full-screen":""),style:Fn},u.a.createElement(m,{insertTemp:it,watch:Yt,fullScreen:Br,showNullButton:wr,onActionCallback:Qn,hidetoolBar:Ur,uuid:nr.current,setOpenPhones:function(){$t.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:mr,placeholder:et})),Yt?u.a.createElement("div",{ref:On,className:"preview-container"},_t==="stex"&&u.a.createElement(L,{value:Ct}),_t!=="stex"&&u.a.createElement(x.a,{edit:!0,value:Ct,replaces:kn})):null))),Rt?u.a.createElement("a",{ref:Er,className:"editor-resize"}):null,u.a.createElement(F.a,null,Ee[Dr]?u.a.createElement(Q.a,{centered:!0,title:Ee[Dr],visible:!0,onCancel:Ln,footer:null,className:"markdown-popup-form"},qr):null))}},P47w:function(qe,pe,G){var q=G("hydK"),Q=q.createElement,O=G("IMiH"),j=G("mFDi"),D=G("Fofx"),B=G("6GrX"),I=G("pzxd"),v=G("dqUG"),T=O.CMD,E=Array.prototype.join,n="none",u=Math.round,c=Math.sin,o=Math.cos,i=Math.PI,d=Math.PI*2,s=180/i,A=1e-4;function a(X){return u(X*1e4)/1e4}function p(X){return X-A}function w(X,re){var se=re?X.textFill:X.fill;return se!=null&&se!==n}function S(X,re){var se=re?X.textStroke:X.stroke;return se!=null&&se!==n}function x(X,re){re&&L(X,"transform","matrix("+E.call(re,",")+")")}function L(X,re,se){(!se||se.type!=="linear"&&se.type!=="radial")&&X.setAttribute(re,se)}function b(X,re,se){X.setAttributeNS("http://www.w3.org/1999/xlink",re,se)}function h(X,re,se,_e){if(w(re,se)){var ge=se?re.textFill:re.fill;ge=ge==="transparent"?n:ge,L(X,"fill",ge),L(X,"fill-opacity",re.fillOpacity!=null?re.fillOpacity*re.opacity:re.opacity)}else L(X,"fill",n);if(S(re,se)){var we=se?re.textStroke:re.stroke;we=we==="transparent"?n:we,L(X,"stroke",we);var Re=se?re.textStrokeWidth:re.lineWidth,He=!se&&re.strokeNoScale?_e.getLineScale():1;L(X,"stroke-width",Re/He),L(X,"paint-order",se?"stroke":"fill"),L(X,"stroke-opacity",re.strokeOpacity!=null?re.strokeOpacity:re.opacity);var Se=re.lineDash;Se?(L(X,"stroke-dasharray",re.lineDash.join(",")),L(X,"stroke-dashoffset",u(re.lineDashOffset||0))):L(X,"stroke-dasharray",""),re.lineCap&&L(X,"stroke-linecap",re.lineCap),re.lineJoin&&L(X,"stroke-linejoin",re.lineJoin),re.miterLimit&&L(X,"stroke-miterlimit",re.miterLimit)}else L(X,"stroke",n)}function r(X){for(var re=[],se=X.data,_e=X.len(),ge=0;ge<_e;){var we=se[ge++],Re="",He=0;switch(we){case T.M:Re="M",He=2;break;case T.L:Re="L",He=2;break;case T.Q:Re="Q",He=4;break;case T.C:Re="C",He=6;break;case T.A:var Se=se[ge++],Te=se[ge++],$e=se[ge++],bt=se[ge++],Ie=se[ge++],ze=se[ge++],at=se[ge++],Ae=se[ge++],ne=Math.abs(ze),ae=p(ne-d)||(Ae?ze>=d:-ze>=d),ce=ze>0?ze%d:ze%d+d,xe=!1;ae?xe=!0:p(ne)?xe=!1:xe=ce>=i===!!Ae;var Fe=a(Se+$e*o(Ie)),ke=a(Te+bt*c(Ie));ae&&(Ae?ze=d-1e-4:ze=-d+1e-4,xe=!0,ge===9&&re.push("M",Fe,ke));var ct=a(Se+$e*o(Ie+ze)),ft=a(Te+bt*c(Ie+ze));re.push("A",a($e),a(bt),u(at*s),+xe,+Ae,ct,ft);break;case T.Z:Re="Z";break;case T.R:var ct=a(se[ge++]),ft=a(se[ge++]),yt=a(se[ge++]),Et=a(se[ge++]);re.push("M",ct,ft,"L",ct+yt,ft,"L",ct+yt,ft+Et,"L",ct,ft+Et,"L",ct,ft);break}Re&&re.push(Re);for(var Ot=0;OtMt){for(;Et255?255:r}function j(r){return r=Math.round(r),r<0?0:r>360?360:r}function D(r){return r<0?0:r>1?1:r}function B(r){return r.length&&r.charAt(r.length-1)==="%"?O(parseFloat(r)/100*255):O(parseInt(r,10))}function I(r){return r.length&&r.charAt(r.length-1)==="%"?D(parseFloat(r)/100):D(parseFloat(r))}function v(r,l,f){return f<0?f+=1:f>1&&(f-=1),f*6<1?r+(l-r)*f*6:f*2<1?l:f*3<2?r+(l-r)*(2/3-f)*6:r}function T(r,l,f){return r+(l-r)*f}function E(r,l,f,C,g){return r[0]=l,r[1]=f,r[2]=C,r[3]=g,r}function n(r,l){return r[0]=l[0],r[1]=l[1],r[2]=l[2],r[3]=l[3],r}var u=new q(20),c=null;function o(r,l){c&&n(c,l),c=u.put(r,c||l.slice())}function i(r,l){if(!r)return;l=l||[];var f=u.get(r);if(f)return n(l,f);r=r+"";var C=r.replace(/ /g,"").toLowerCase();if(C in Q)return n(l,Q[C]),o(r,l),l;if(C.charAt(0)==="#"){if(C.length===4){var g=parseInt(C.substr(1),16);if(!(g>=0&&g<=4095)){E(l,0,0,0,1);return}return E(l,(g&3840)>>4|(g&3840)>>8,g&240|(g&240)>>4,g&15|(g&15)<<4,1),o(r,l),l}else if(C.length===7){var g=parseInt(C.substr(1),16);if(!(g>=0&&g<=16777215)){E(l,0,0,0,1);return}return E(l,(g&16711680)>>16,(g&65280)>>8,g&255,1),o(r,l),l}return}var m=C.indexOf("("),F=C.indexOf(")");if(m!==-1&&F+1===C.length){var P=C.substr(0,m),z=C.substr(m+1,F-(m+1)).split(","),Z=1;switch(P){case"rgba":if(z.length!==4){E(l,0,0,0,1);return}Z=I(z.pop());case"rgb":if(z.length!==3){E(l,0,0,0,1);return}return E(l,B(z[0]),B(z[1]),B(z[2]),Z),o(r,l),l;case"hsla":if(z.length!==4){E(l,0,0,0,1);return}return z[3]=I(z[3]),d(z,l),o(r,l),l;case"hsl":if(z.length!==3){E(l,0,0,0,1);return}return d(z,l),o(r,l),l;default:return}}E(l,0,0,0,1);return}function d(r,l){var f=(parseFloat(r[0])%360+360)%360/360,C=I(r[1]),g=I(r[2]),m=g<=.5?g*(C+1):g+C-g*C,F=g*2-m;return l=l||[],E(l,O(v(F,m,f+1/3)*255),O(v(F,m,f)*255),O(v(F,m,f-1/3)*255),1),r.length===4&&(l[3]=r[3]),l}function s(r){if(!r)return;var l=r[0]/255,f=r[1]/255,C=r[2]/255,g=Math.min(l,f,C),m=Math.max(l,f,C),F=m-g,P=(m+g)/2,z,Z;if(F===0)z=0,Z=0;else{P<.5?Z=F/(m+g):Z=F/(2-m-g);var V=((m-l)/6+F/2)/F,M=((m-f)/6+F/2)/F,J=((m-C)/6+F/2)/F;l===m?z=J-M:f===m?z=1/3+V-J:C===m&&(z=2/3+M-V),z<0&&(z+=1),z>1&&(z-=1)}var X=[z*360,Z,P];return r[3]!=null&&X.push(r[3]),X}function A(r,l){var f=i(r);if(f){for(var C=0;C<3;C++)l<0?f[C]=f[C]*(1-l)|0:f[C]=(255-f[C])*l+f[C]|0,f[C]>255?f[C]=255:r[C]<0&&(f[C]=0);return h(f,f.length===4?"rgba":"rgb")}}function a(r){var l=i(r);if(l)return((1<<24)+(l[0]<<16)+(l[1]<<8)+ +l[2]).toString(16).slice(1)}function p(r,l,f){if(!(l&&l.length)||!(r>=0&&r<=1))return;f=f||[];var C=r*(l.length-1),g=Math.floor(C),m=Math.ceil(C),F=l[g],P=l[m],z=C-g;return f[0]=O(T(F[0],P[0],z)),f[1]=O(T(F[1],P[1],z)),f[2]=O(T(F[2],P[2],z)),f[3]=D(T(F[3],P[3],z)),f}var w=p;function S(r,l,f){if(!(l&&l.length)||!(r>=0&&r<=1))return;var C=r*(l.length-1),g=Math.floor(C),m=Math.ceil(C),F=i(l[g]),P=i(l[m]),z=C-g,Z=h([O(T(F[0],P[0],z)),O(T(F[1],P[1],z)),O(T(F[2],P[2],z)),D(T(F[3],P[3],z))],"rgba");return f?{color:Z,leftIndex:g,rightIndex:m,value:C}:Z}var x=S;function L(r,l,f,C){if(r=i(r),r)return r=s(r),l!=null&&(r[0]=j(l)),f!=null&&(r[1]=I(f)),C!=null&&(r[2]=I(C)),h(d(r),"rgba")}function b(r,l){if(r=i(r),r&&l!=null)return r[3]=D(l),h(r,"rgba")}function h(r,l){if(!r||!r.length)return;var f=r[0]+","+r[1]+","+r[2];return(l==="rgba"||l==="hsva"||l==="hsla")&&(f+=","+r[3]),l+"("+f+")"}pe.parse=i,pe.lift=A,pe.toHex=a,pe.fastLerp=p,pe.fastMapToColor=w,pe.lerp=S,pe.mapToColor=x,pe.modifyHSL=L,pe.modifyAlpha=b,pe.stringify=h},QuXc:function(qe,pe){var G=function(Q){this.colorStops=Q||[]};G.prototype={constructor:G,addColorStop:function(Q,O){this.colorStops.push({offset:Q,color:O})}};var q=G;qe.exports=q},RDYZ:function(qe,pe,G){var q=G("dMvE");function Q(j){this._target=j.target,this._life=j.life||1e3,this._delay=j.delay||0,this._initialized=!1,this.loop=j.loop==null?!1:j.loop,this.gap=j.gap||0,this.easing=j.easing||"Linear",this.onframe=j.onframe,this.ondestroy=j.ondestroy,this.onrestart=j.onrestart,this._pausedTime=0,this._paused=!1}Q.prototype={constructor:Q,step:function(j,D){if(this._initialized||(this._startTime=j+this._delay,this._initialized=!0),this._paused){this._pausedTime+=D;return}var B=(j-this._startTime-this._pausedTime)/this._life;if(B<0)return;B=Math.min(B,1);var I=this.easing,v=typeof I=="string"?q[I]:I,T=typeof v=="function"?v(B):B;return this.fire("frame",T),B===1?this.loop?(this.restart(j),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(j){var D=(j-this._startTime-this._pausedTime)%this._life;this._startTime=j-D+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(j,D){j="on"+j,this[j]&&this[j](this._target,D)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var O=Q;qe.exports=O},RXMa:function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(O,j){var D=j.cx,B=j.cy,I=Math.PI*2;O.moveTo(D+j.r,B),O.arc(D,B,j.r,0,I,!1),O.moveTo(D+j.r0,B),O.arc(D,B,j.r0,0,I,!0)}});qe.exports=Q},"SA+Z":function(qe,pe,G){var q=G("wTVA"),Q=G("EbDI"),O=G("ZhPi"),j=G("wkBT");function D(B){return q(B)||Q(B)||O(B)||j()}qe.exports=D,qe.exports.__esModule=!0,qe.exports.default=qe.exports},SJMd:function(qe,pe){/**
* @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 G,q,Q,O=!1,j,D;window.PR_SHOULD_USE_CONTINUATION=!0;var B,I;(function(){var v=window,T=["break,continue,do,else,for,if,return,while"],E=[T,"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"],n=[E,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[n,"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"],c=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"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"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",d=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="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",A=[T,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],a=[T,"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"],p=[T,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[u,o,c,d,s,A,a,p],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",L="kwd",b="com",h="typ",r="lit",l="pun",f="pln",C="tag",g="dec",m="src",F="atn",P="atv",z="nocode",Z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function V(Ae){for(var ne=0,ae=!1,ce=!1,xe=0,Fe=Ae.length;xe122||(me<65||Me>90||lt.push([Math.max(65,Me)|32,Math.min(me,90)|32]),me<97||Me>122||lt.push([Math.max(97,Me)&~32,Math.min(me,122)&~32]))}}lt.sort(function(De,Ze){return De[0]-Ze[0]||Ze[1]-De[1]});for(var ye=[],Ee=[],st=0;stOe[0]&&(Oe[1]+1>Oe[0]&&Ye.push("-"),Ye.push(yt(Oe[1])))}return Ye.push("]"),Ye.join("")}function Ot(Qe){for(var Ne=Qe.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")),lt=Ne.length,dt=[],Ye=0,st=0;Ye=2&&Me==="["?Ne[Ye]=Et(je):Me!=="\\"&&(Ne[Ye]=je.replace(/[a-zA-Z]/g,function(Ee){var Oe=Ee.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return Ne.join("")}for(var Mt=[],xe=0,Fe=Ae.length;xe=0;)ae[Mt.charAt(Qe)]=Ot;var Ne=Ot[1],lt=""+Ne;ft.hasOwnProperty(lt)||(ct.push(Ne),ft[lt]=null)}ct.push(/[\0-\uffff]/),ce=V(ct)})();var xe=ne.length,Fe=function(ke){for(var ct=ke.sourceCode,ft=ke.basePos,yt=ke.sourceNode,Et=[ft,f],Ot=0,Mt=ct.match(ce)||[],Qe={},Ne=0,lt=Mt.length;Ne=5&&Ye.substring(0,5)==="lang-",je&&!(st&&typeof st[1]=="string")&&(je=!1,Ye=m),je||(Qe[dt]=Ye)}var me=Ot;if(Ot+=dt.length,!je)Et.push(ft+me,Ye);else{var ye=st[1],Ee=dt.indexOf(ye),Oe=Ee+ye.length;st[2]&&(Oe=dt.length-st[2].length,Ee=Oe-ye.length);var De=Ye.substring(5);J(yt,ft+me,dt.substring(0,Ee),Fe,Et),J(yt,ft+me+Ee,ye,Te(De,ye),Et),J(yt,ft+me+Oe,dt.substring(Oe),Fe,Et)}}ke.decorations=Et};return Fe}function _e(Ae){var ne=[],ae=[];Ae.tripleQuotedStrings?ne.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?ne.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&ae.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=Ae.hashComments;ce&&(Ae.cStyleComments?(ce>1?ne.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ae.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([b,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(ae.push([b,/^\/\/[^\r\n]*/,null]),ae.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=Ae.regexLiterals;if(xe){var Fe=xe>1?"":`
\r`,ke=Fe?".":"[\\S\\s]",ct="/(?=[^/*"+Fe+"])(?:[^/\\x5B\\x5C"+Fe+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Fe+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";ae.push(["lang-regex",RegExp("^"+Z+"("+ct+")")])}var ft=Ae.types;ft&&ae.push([h,ft]);var yt=(""+Ae.keywords).replace(/^ | $/g,"");yt.length&&ae.push([L,new RegExp("^(?:"+yt.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([f,/^\s+/,null,` \r
\xA0`]);var Et="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(Et+="(?!s*/)"),ae.push([r,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[a-z_$][a-z_$@0-9]*/i,null],[r,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[f,/^\\[\s\S]?/,null],[l,new RegExp(Et),null]),se(ne,ae)}var ge=_e({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(Ae,ne,ae){for(var ce=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,Fe=Ae.ownerDocument,ke=Fe.createElement("li");Ae.firstChild;)ke.appendChild(Ae.firstChild);var ct=[ke];function ft(Ne){var lt=Ne.nodeType;if(lt==1&&!ce.test(Ne.className))if(Ne.nodeName==="br")yt(Ne),Ne.parentNode&&Ne.parentNode.removeChild(Ne);else for(var dt=Ne.firstChild;dt;dt=dt.nextSibling)ft(dt);else if((lt==3||lt==4)&&ae){var Ye=Ne.nodeValue,st=Ye.match(xe);if(st){var je=Ye.substring(0,st.index);Ne.nodeValue=je;var Le=Ye.substring(st.index+st[0].length);if(Le){var Me=Ne.parentNode;Me.insertBefore(Fe.createTextNode(Le),Ne.nextSibling)}yt(Ne),je||Ne.parentNode.removeChild(Ne)}}}function yt(Ne){for(;!Ne.nextSibling;)if(Ne=Ne.parentNode,!Ne)return;function lt(st,je){var Le=je?st.cloneNode(!1):st,Me=st.parentNode;if(Me){var me=lt(Me,1),ye=st.nextSibling;me.appendChild(Le);for(var Ee=ye;Ee;Ee=ye)ye=Ee.nextSibling,me.appendChild(Ee)}return Le}for(var dt=lt(Ne.nextSibling,0),Ye;(Ye=dt.parentNode)&&Ye.nodeType===1;)dt=Ye;ct.push(dt)}for(var Et=0;Et=Me&&(ft+=2),Fe>=me&&(Ot+=2)}}finally{Ye&&(Ye.style.display=st)}}var He={};function Se(Ae,ne){for(var ae=ne.length;--ae>=0;){var ce=ne[ae];He.hasOwnProperty(ce)?v.console&&console.warn("cannot override language handler %s",ce):He[ce]=Ae}}function Te(Ae,ne){return Ae&&He.hasOwnProperty(Ae)||(Ae=/^\s*]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^