(window.webpackJsonp=window.webpackJsonp||[]).push([[179,3,5,7,8,17,20],{"+NIl": /*!***************************************************!*\ !*** ./node_modules/codemirror/mode/stex/stex.js ***! \***************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.defineMode("stex",(function(t,e){function n(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(t,e){t.f=e}function s(t,e){var i;if(t.match(/^\\[a-zA-Z@]+/)){var s=t.current().slice(1);return n(e,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(e,c),i.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(e))?(i.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(n(e,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(i=function(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(i.argument=t.current()),i.styleIdentifier())}function l(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return o(e,s),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function c(t,e){var n=t.peek();return"{"==n||"["==n?(r(e).openBracket(n),t.eat(n),o(e,s),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(o(e,s),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),s(t,e))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:s}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=s,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"+k/U": /*!*********************************************************************!*\ !*** ./src/pages/MyProblem/LeftPanel/SubmitList/index.less?modules ***! \*********************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={pagination:"pagination___2XcQw",info:"info___12Y4R"}},"07cG": /*!***************************************************!*\ !*** ./src/components/Spinner/index.less?modules ***! \***************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"19Vz": /*!**************************************************************!*\ !*** ./node_modules/codemirror/addon/display/placeholder.js ***! \**************************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=t.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=t.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function r(t){a(t)&&n(t)}function i(t){var r=t.getWrapperElement(),i=a(t);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(t):e(t)}function a(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=t.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),t.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(t){setTimeout((function(){var r=!1,i=t.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==t.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(t):e(t)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),t.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),e(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1eCo": /*!*************************************************!*\ !*** ./node_modules/codemirror/mode/xml/xml.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=h,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=h;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,n){return"word"==t?(n.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,n)):(o="error",y)}function b(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,n)):(o="error",S)}function x(t,e,n){return"endTag"!=t?(o="error",x):(g(n),v)}function S(t,e,n){return o="error",x(t,0,n)}function C(t,e,n){if("word"==t)return o="attribute",E;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",C}function E(t,e,n){return"equals"==t?w:(l.allowMissing||(o="error"),C(t,0,n))}function w(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,n))}function k(t,e,n){return"string"==t?k:C(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;a=null;var n=e.tokenize(t,e);return(n||a)&&"comment"!=n&&(o=null,e.state=e.state(a||n,t,e),o&&(n="error"==o?n+" error":o)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==w&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w": /*!*******************************************************!*\ !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! \*******************************************************/ /*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ /*! exports used: Divider, Item, ItemGroup, SubMenu, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"d",(function(){return ot})),n.d(e,"b",(function(){return xt})),n.d(e,"c",(function(){return Ct})),n.d(e,"a",(function(){return wt}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),h=n("BGR+"),d=n("wx14"),f=n("rePB"),p=n("4IlW"),g=n("2GS6"),m=n("Gytx"),v=n.n(m),y=n("TSYQ"),b=n.n(y),x=n("U8pU"),S=n("ODXe"),C=/iPhone/i,E=/iPod/i,w=/iPad/i,k=/\bAndroid(?:.+)Mobile\b/i,T=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,A=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,L=/Windows Phone/i,D=/\bWindows(?:.+)ARM\b/i,R=/BlackBerry/i,I=/BB10/i,_=/Opera Mini/i,M=/\b(CriOS|Chrome)(?:.+)Mobile/i,N=/Mobile(?:.+)Firefox\b/i;function P(t,e){return t.test(e)}function F(t){var e=t||("undefined"!=typeof navigator?navigator.userAgent:""),n=e.split("[FBAN");if(void 0!==n[1]){var r=n;e=Object(S.a)(r,1)[0]}if(void 0!==(n=e.split("Twitter"))[1]){var i=n;e=Object(S.a)(i,1)[0]}var a={apple:{phone:P(C,e)&&!P(L,e),ipod:P(E,e),tablet:!P(C,e)&&P(w,e)&&!P(L,e),device:(P(C,e)||P(E,e)||P(w,e))&&!P(L,e)},amazon:{phone:P(O,e),tablet:!P(O,e)&&P(A,e),device:P(O,e)||P(A,e)},android:{phone:!P(L,e)&&P(O,e)||!P(L,e)&&P(k,e),tablet:!P(L,e)&&!P(O,e)&&!P(k,e)&&(P(A,e)||P(T,e)),device:!P(L,e)&&(P(O,e)||P(A,e)||P(k,e)||P(T,e))||P(/\bokhttp\b/i,e)},windows:{phone:P(L,e),tablet:P(D,e),device:P(L,e)||P(D,e)},other:{blackberry:P(R,e),blackberry10:P(I,e),opera:P(_,e),firefox:P(N,e),chrome:P(M,e),device:P(R,e)||P(I,e)||P(_,e)||P(N,e)||P(M,e)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var j=Object(r.a)(Object(r.a)({},F()),{},{isMobile:F});function B(){}function U(t,e,n){var r=e||"";return t.key||"".concat(r,"item_").concat(n)}function H(t){return"".concat(t,"-menu-")}function G(t,e){var n=-1;c.Children.forEach(t,(function(t){n+=1,t&&t.type&&t.type.isMenuItemGroup?c.Children.forEach(t.props.children,(function(t){e(t,n+=1)})):e(t,n)}))}var z=["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"],W=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t&&"function"==typeof t.getBoundingClientRect&&t.getBoundingClientRect().width;if(n){if(e){var r=getComputedStyle(t),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},V=function(t,e,n){t&&"object"===Object(x.a)(t.style)&&(t.style[e]=n)},K=n("KQm4"),q=n("Ff2n"),Y=n("i8i4"),X=n("bdgK"),$=n("uciX"),J=n("8XRh"),Z={adjustX:1,adjustY:1},Q={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},tt={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},et=0,nt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},rt=function(t,e,n){var i=H(e),a=t.getState();t.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},it=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(t){var a;Object(i.a)(this,n),(a=e.call(this,t)).onDestroy=function(t){a.props.onDestroy(t)},a.onKeyDown=function(t){var e=t.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(e===p.a.ENTER)return a.onTitleClick(t),rt(o,a.props.eventKey,!0),!0;if(e===p.a.RIGHT)return i?n.onKeyDown(t):(a.triggerOpenChange(!0),rt(o,a.props.eventKey,!0)),!0;if(e===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(t))||(a.triggerOpenChange(!1),s=!0),s}return!i||e!==p.a.UP&&e!==p.a.DOWN?void 0:n.onKeyDown(t)},a.onOpenChange=function(t){a.props.onOpenChange(t)},a.onPopupVisibleChange=function(t){a.triggerOpenChange(t,t?"mouseenter":"mouseleave")},a.onMouseEnter=function(t){var e=a.props,n=e.eventKey,r=e.onMouseEnter,i=e.store;rt(i,a.props.eventKey,!1),r({key:n,domEvent:t})},a.onMouseLeave=function(t){var e=a.props,n=e.parentMenu,r=e.eventKey,i=e.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:t})},a.onTitleMouseEnter=function(t){var e=a.props,n=e.eventKey,r=e.onItemHover,i=e.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:t})},a.onTitleMouseLeave=function(t){var e=a.props,n=e.parentMenu,r=e.eventKey,i=e.onItemHover,s=e.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:t})},a.onTitleClick=function(t){var e=Object(o.a)(a).props;e.onTitleClick({key:e.eventKey,domEvent:t}),"hover"!==e.triggerSubMenuAction&&(a.triggerOpenChange(!e.isOpen,"click"),rt(e.store,a.props.eventKey,!1))},a.onSubMenuClick=function(t){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(t))},a.onSelect=function(t){a.props.onSelect(t)},a.onDeselect=function(t){a.props.onDeselect(t)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(t){a.menuInstance=t},a.addKeyPath=function(t){return Object(r.a)(Object(r.a)({},t),{},{keyPath:(t.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(t,e){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:e,open:t})};"mouseenter"===e?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var t={find:!1};return function t(e,n,r){e&&!r.find&&c.Children.forEach(e,(function(e){if(e){var i=e.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(e.key)?r.find=!0:e.props.children&&t(e.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,t),t.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var t=Y.findDOMNode(a.menuInstance);t.offsetWidth>=a.subMenuTitle.offsetWidth||(t.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(t){a.subMenuTitle=t},a.getBaseProps=function(){var t=Object(o.a)(a).props;return{mode:"horizontal"===t.mode?"vertical":t.mode,visible:a.props.isOpen,level:t.level+1,inlineIndent:t.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:t.selectedKeys,eventKey:"".concat(t.eventKey,"-menu-"),openKeys:t.openKeys,motion:t.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:t.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:t.subMenuCloseDelay,forceSubMenuRender:t.forceSubMenuRender,triggerSubMenuAction:t.triggerSubMenuAction,builtinPlacements:t.builtinPlacements,defaultActiveFirst:t.store.getState().defaultActiveFirst[H(t.eventKey)],multiple:t.multiple,prefixCls:t.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:t.itemIcon,expandIcon:t.expandIcon,direction:t.direction}},a.getMotion=function(t,e){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!e||"inline"!==t})};var s=t.store,l=t.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var h=!1;return u&&(h=u[l]),rt(s,l,h),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t=this,e=this.props,n=e.mode,r=e.parentMenu,i=e.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return t.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.onDestroy,n=t.eventKey;e&&e(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(t){var e=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(J.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=b()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pt,Object.assign({},n,{id:e.internalMenuId,className:s,style:o}),t)}))}},{key:"render",value:function(){var t,e=Object(r.a)({},this.props),n=e.isOpen,i=this.getPrefixCls(),a="inline"===e.mode,o=b()(i,"".concat(i,"-").concat(e.mode),(t={},Object(f.a)(t,e.className,!!e.className),Object(f.a)(t,this.getOpenClassName(),n),Object(f.a)(t,this.getActiveClassName(),e.active||n&&!a),Object(f.a)(t,this.getDisabledClassName(),e.disabled),Object(f.a)(t,this.getSelectedClassName(),this.isChildrenSelected()),t));this.internalMenuId||(e.eventKey?this.internalMenuId="".concat(e.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var s={},l={},u={};e.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var h={},d=e.direction;a&&("rtl"===d?h.paddingRight=e.inlineIndent*e.level:h.paddingLeft=e.inlineIndent*e.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var g=null;"horizontal"!==e.mode&&(g=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(g=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var m=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:h,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof e.title?e.title:void 0}),e.title,g||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(e.children),y=e.parentMenu.isRootMenu?e.parentMenu.props.getPopupContainer:function(t){return t.parentNode},x=nt[e.mode],S=e.popupOffset?{offset:e.popupOffset}:{},C="inline"===e.mode?"":e.popupClassName;C+="rtl"===d?" ".concat(i,"-rtl"):"";var E=e.disabled,w=e.triggerSubMenuAction,k=e.subMenuOpenDelay,T=e.forceSubMenuRender,O=e.subMenuCloseDelay,A=e.builtinPlacements;z.forEach((function(t){return delete e[t]})),delete e.onClick;var L="rtl"===d?Object.assign({},tt,A):Object.assign({},Q,A);return delete e.direction,c.createElement("li",Object.assign({},e,s,{className:o,role:"menuitem"}),a&&m,a&&v,!a&&c.createElement($.a,{prefixCls:i,popupClassName:b()("".concat(i,"-popup"),C),getPopupContainer:y,builtinPlacements:L,popupPlacement:x,popupVisible:n,popupAlign:S,popup:v,action:E?[]:[w],mouseEnterDelay:k,mouseLeaveDelay:O,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:T},m))}}]),n}(c.Component);it.defaultProps={onMouseEnter:B,onMouseLeave:B,onTitleMouseEnter:B,onTitleMouseLeave:B,onTitleClick:B,manualRef:B,mode:"vertical",title:""};var at=Object(u.b)((function(t,e){var n=t.openKeys,r=t.activeKey,i=t.selectedKeys,a=e.eventKey,o=e.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(it);at.isSubMenu=!0;var ot=at,st=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(){var t;return Object(i.a)(this,n),(t=e.apply(this,arguments)).resizeObserver=null,t.mutationObserver=null,t.originalTotalWidth=0,t.overflowedItems=[],t.menuItemSizes=[],t.cancelFrameId=null,t.state={lastVisibleIndex:void 0},t.getMenuItemNodes=function(){var e=t.props.prefixCls,n=Y.findDOMNode(Object(o.a)(t));return n?[].slice.call(n.children).filter((function(t){return t.className.split(" ").indexOf("".concat(e,"-overflowed-submenu"))<0})):[]},t.getOverflowedSubMenuItem=function(e,n,i){var a=t.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,h=a.theme;if(1!==s||"horizontal"!==l)return null;var d=t.props.children[0].props,f=(d.children,d.title,d.style),p=Object(q.a)(d,["children","title","style"]),g=Object(r.a)({},f),m="".concat(e,"-overflowed-indicator"),v="".concat(e,"-overflowed-indicator");0===n.length&&!0!==i?g=Object(r.a)(Object(r.a)({},g),{},{display:"none"}):i&&(g=Object(r.a)(Object(r.a)({},g),{},{visibility:"hidden",position:"absolute"}),m="".concat(m,"-placeholder"),v="".concat(v,"-placeholder"));var y=h?"".concat(u,"-").concat(h):"",b={};return z.forEach((function(t){void 0!==p[t]&&(b[t]=p[t])})),c.createElement(ot,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:y},b,{key:m,eventKey:v,disabled:!1,style:g}),n)},t.setChildrenWidthAndResize=function(){if("horizontal"===t.props.mode){var e=Y.findDOMNode(Object(o.a)(t));if(e){var n=e.children;if(n&&0!==n.length){var r=e.children[n.length-1];V(r,"display","inline-block");var i=t.getMenuItemNodes(),a=i.filter((function(t){return t.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(t){V(t,"display","inline-block")})),t.menuItemSizes=i.map((function(t){return W(t,!0)})),a.forEach((function(t){V(t,"display","none")})),t.overflowedIndicatorWidth=W(e.children[e.children.length-1],!0),t.originalTotalWidth=t.menuItemSizes.reduce((function(t,e){return t+e}),0),t.handleResize(),V(r,"display","none")}}}},t.handleResize=function(){if("horizontal"===t.props.mode){var e=Y.findDOMNode(Object(o.a)(t));if(e){var n=W(e);t.overflowedItems=[];var r,i=0;t.originalTotalWidth>n+.5&&(r=-1,t.menuItemSizes.forEach((function(e){(i+=e)+t.overflowedIndicatorWidth<=n&&(r+=1)}))),t.setState({lastVisibleIndex:r})}}},t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var e=Y.findDOMNode(this);if(!e)return;this.resizeObserver=new X.default((function(e){e.forEach((function(){var e=t.cancelFrameId;cancelAnimationFrame(e),t.cancelFrameId=requestAnimationFrame(t.setChildrenWidthAndResize)}))})),[].slice.call(e.children).concat(e).forEach((function(e){t.resizeObserver.observe(e)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){t.resizeObserver.disconnect(),[].slice.call(e.children).concat(e).forEach((function(e){t.resizeObserver.observe(e)})),t.setChildrenWidthAndResize()})),this.mutationObserver.observe(e,{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(t){var e=this,n=this.state.lastVisibleIndex;return(t||[]).reduce((function(r,i,a){var o=i;if("horizontal"===e.props.mode){var s=e.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==e.props.className.indexOf("".concat(e.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(e.overflowedItems=t.slice(n+1).map((function(t){return c.cloneElement(t,{key:t.props.eventKey,mode:"vertical-left"})})),s=e.getOverflowedSubMenuItem(i.props.eventKey,e.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===t.length-1&&l.push(e.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var t=this.props,e=(t.visible,t.prefixCls,t.overflowedIndicator,t.mode,t.level,t.tag),n=t.children,r=(t.theme,Object(q.a)(t,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=e;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);st.defaultProps={tag:"div",className:""};var lt=st;function ct(t,e,n){var i=t.getState();t.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},e,n))})}function ut(t){return t.eventKey||"0-menu-"}function ht(t,e){var n,r=e,i=t.children,a=t.eventKey;if(r&&(G(i,(function(t,e){t&&t.props&&!t.props.disabled&&r===U(t,a,e)&&(n=!0)})),n))return r;return r=null,t.defaultActiveFirst?(G(i,(function(t,e){r||!t||t.props.disabled||(r=U(t,a,e))})),r):r}function dt(t){if(t){var e=this.instanceArray.indexOf(t);-1!==e?this.instanceArray[e]=t:this.instanceArray.push(t)}}var ft=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(t){var a;return Object(i.a)(this,n),(a=e.call(this,t)).onKeyDown=function(t,e){var n,r=t.keyCode;if(a.getFlatInstanceArray().forEach((function(e){e&&e.props.active&&e.onKeyDown&&(n=e.onKeyDown(t))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(t.preventDefault(),ct(a.props.store,ut(a.props),i.props.eventKey),"function"==typeof e&&e(i),1):void 0},a.onItemHover=function(t){var e=t.key,n=t.hover;ct(a.props.store,ut(a.props),n?e:null)},a.onDeselect=function(t){a.props.onDeselect(t)},a.onSelect=function(t){a.props.onSelect(t)},a.onClick=function(t){a.props.onClick(t)},a.onOpenChange=function(t){a.props.onOpenChange(t)},a.onDestroy=function(t){a.props.onDestroy(t)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(t){var e=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ut(a.props)],r=e.length;if(!r)return null;t<0&&(e=e.concat().reverse());var i=-1;if(e.every((function(t,e){return!t||t.props.eventKey!==n||(i=e,!1)})),a.props.defaultActiveFirst||-1===i||(o=e.slice(i,r-1)).length&&!o.every((function(t){return!!t.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=e[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(t,e,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=U(t,s.eventKey,e),u=t.props;if(!u||"string"==typeof t.type)return t;var h=l===i.activeKey,d=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:e,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(g.a)(t.ref,dt.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&h,multiple:s.multiple,onClick:function(t){(u.onClick||B)(t),a.onClick(t)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||j.any)&&(d.triggerSubMenuAction="click"),c.cloneElement(t,d)},a.renderMenuItem=function(t,e,n){if(!t)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(t,e,i)},t.store.setState({activeKey:Object(r.a)(Object(r.a)({},t.store.getState().activeKey),{},Object(f.a)({},t.eventKey,ht(t,t.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(t){return this.props.visible||t.visible||this.props.className!==t.className||!v()(this.props.style,t.style)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n="activeKey"in e?e.activeKey:e.store.getState().activeKey[ut(e)],r=ht(e,n);if(r!==n)ct(e.store,ut(e),r);else if("activeKey"in t){r!==ht(t,t.activeKey)&&ct(e.store,ut(e),r)}}},{key:"render",value:function(){var t=this,e=Object(d.a)({},this.props);this.instanceArray=[];var n={className:b()(e.prefixCls,e.className,"".concat(e.prefixCls,"-").concat(e.mode)),role:e.role||"menu"};e.id&&(n.id=e.id),e.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=e.prefixCls,i=e.eventKey,a=e.visible,o=e.level,s=e.mode,l=e.overflowedIndicator,u=e.theme;return z.forEach((function(t){return delete e[t]})),delete e.onClick,c.createElement(lt,Object.assign({},e,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(e.children,(function(e,n){return t.renderMenuItem(e,n,i||"0-menu-")})))}}]),n}(c.Component);ft.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:B};var pt=Object(u.b)()(ft),gt=n("Kwbf");function mt(t,e,n){var r=t.prefixCls,i=t.motion,a=t.defaultMotions,o=void 0===a?{}:a,s=t.openAnimation,l=t.openTransitionName,c=e.switchingModeFromInline;if(i)return i;if("object"===Object(x.a)(s)&&s)Object(gt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var vt=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(t){var a;Object(i.a)(this,n),(a=e.call(this,t)).inlineOpenKeys=[],a.onSelect=function(t){var e=Object(o.a)(a).props;if(e.selectable){var n=a.store.getState().selectedKeys,i=t.key;n=e.multiple?n.concat([i]):[i],"selectedKeys"in e||a.store.setState({selectedKeys:n}),e.onSelect(Object(r.a)(Object(r.a)({},t),{},{selectedKeys:n}))}},a.onClick=function(t){var e=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===e||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(t)},a.onKeyDown=function(t,e){a.innerMenu.getWrappedInstance().onKeyDown(t,e)},a.onOpenChange=function(t){var e=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(t){var e=!1;if(t.open)(e=-1===n.indexOf(t.key))&&n.push(t.key);else{var i=n.indexOf(t.key);(e=-1!==i)&&n.splice(i,1)}r=r||e};Array.isArray(t)?t.forEach(i):i(t),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),e.onOpenChange(n))},a.onDeselect=function(t){var e=Object(o.a)(a).props;if(e.selectable){var n=a.store.getState().selectedKeys.concat(),i=t.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in e||a.store.setState({selectedKeys:n}),e.onDeselect(Object(r.a)(Object(r.a)({},t),{},{selectedKeys:n}))}},a.onMouseEnter=function(t){a.restoreModeVerticalFromInline();var e=a.props.onMouseEnter;e&&e(t)},a.onTransitionEnd=function(t){var e="width"===t.propertyName&&t.target===t.currentTarget,n=t.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===t.propertyName&&r.indexOf("anticon")>=0;(e||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(t){a.innerMenu=t},a.isRootMenu=!0;var s=t.defaultSelectedKeys,l=t.defaultOpenKeys;return"selectedKeys"in t&&(s=t.selectedKeys||[]),"openKeys"in t&&(l=t.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":ht(t,t.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(t){this.updateOpentKeysWhenSwitchMode(t),this.updateMiniStore();var e=this.props,n=e.siderCollapsed,r=e.inlineCollapsed,i=e.onOpenChange;(!t.inlineCollapsed&&r||!t.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(t){var e=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===t.mode&&"inline"!==e.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in e||((e.inlineCollapsed&&!t.inlineCollapsed||e.siderCollapsed&&!t.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!e.inlineCollapsed&&t.inlineCollapsed||!e.siderCollapsed&&t.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var t=this.props.collapsedWidth,e=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===t||"0"===t||"0px"===t)?(this.prevOpenKeys=e.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var t=this.props.mode,e=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return e&&n?"inline":n?"vertical":t}},{key:"getInlineCollapsed",value:function(){var t=this.props,e=t.inlineCollapsed,n=t.siderCollapsed;return void 0!==n?n:e}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&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 t=Object(r.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),e=this.getRealMenuMode();return t.className+=" ".concat(t.prefixCls,"-root"),"rtl"===t.direction&&(t.className+=" ".concat(t.prefixCls,"-rtl")),delete(t=Object(r.a)(Object(r.a)({},t),{},{mode:e,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:mt(this.props,this.state,e)})).openAnimation,delete t.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pt,Object.assign({},t,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);vt.defaultProps={selectable:!0,onClick:B,onSelect:B,onOpenChange:B,onDeselect:B,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var yt=vt,bt=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(){var t;return Object(i.a)(this,n),(t=e.apply(this,arguments)).onKeyDown=function(e){if(e.keyCode===p.a.ENTER)return t.onClick(e),!0},t.onMouseLeave=function(e){var n=t.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:e})},t.onMouseEnter=function(e){var n=t.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:e})},t.onClick=function(e){var n=t.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(t),domEvent:e};a(u),i?c?l(u):s(u):c||s(u)},t.saveNode=function(e){t.node=e},t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var t=this.props;t.onDestroy&&t.onDestroy(t.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 t,e=Object(r.a)({},this.props),n=b()(this.getPrefixCls(),e.className,(t={},Object(f.a)(t,this.getActiveClassName(),!e.disabled&&e.active),Object(f.a)(t,this.getSelectedClassName(),e.isSelected),Object(f.a)(t,this.getDisabledClassName(),e.disabled),t)),i=Object(r.a)(Object(r.a)({},e.attribute),{},{title:"string"==typeof e.title?e.title:void 0,className:n,role:e.role||"menuitem","aria-disabled":e.disabled});"option"===e.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":e.isSelected}):null!==e.role&&"none"!==e.role||(i.role="none");var a={onClick:e.disabled?null:this.onClick,onMouseLeave:e.disabled?null:this.onMouseLeave,onMouseEnter:e.disabled?null:this.onMouseEnter},o=Object(r.a)({},e.style);"inline"===e.mode&&("rtl"===e.direction?o.paddingRight=e.inlineIndent*e.level:o.paddingLeft=e.inlineIndent*e.level),z.forEach((function(t){return delete e[t]})),delete e.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(h.default)(e,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),e.children,s)}}]),n}(c.Component);bt.isMenuItem=!0,bt.defaultProps={onSelect:B,onMouseEnter:B,onMouseLeave:B,manualRef:B};var xt=Object(u.b)((function(t,e){var n=t.activeKey,r=t.selectedKeys,i=e.eventKey;return{active:n[e.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(bt),St=function(t){Object(s.a)(n,t);var e=Object(l.a)(n);function n(){var t;return Object(i.a)(this,n),(t=e.apply(this,arguments)).renderInnerMenuItem=function(e){var n=t.props;return(0,n.renderMenuItem)(e,n.index,t.props.subMenuKey)},t}return Object(a.a)(n,[{key:"render",value:function(){var t=Object(d.a)({},this.props),e=t.className,n=void 0===e?"":e,r=t.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=t.title,s=t.children;return z.forEach((function(e){return delete t[e]})),delete t.onClick,delete t.direction,c.createElement("li",Object.assign({},t,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);St.isMenuItemGroup=!0,St.defaultProps={disabled:!0};var Ct=St,Et=function(t){var e=t.className,n=t.rootPrefixCls,r=t.style;return c.createElement("li",{className:"".concat(e," ").concat(n,"-item-divider"),style:r})};Et.defaultProps={disabled:!0,className:"",style:{}};var wt=Et;e.e=yt},"55Ip": /*!***************************************************************!*\ !*** ./node_modules/react-router-dom/esm/react-router-dom.js ***! \***************************************************************/ /*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */ /*! exports used: Link, NavLink */function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(t,e){return"function"==typeof t?t(e):t},d=function(t,e){return"string"==typeof t?Object(s.c)(t,null,null,e):t},f=function(t){return t},p=o.a.forwardRef;void 0===p&&(p=f);var g=p((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,a=Object(c.a)(t,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return u.ref=f!==p&&e||n,o.a.createElement("a",u)}));var m=p((function(t,e){var n=t.component,i=void 0===n?g:n,a=t.replace,s=t.to,m=t.innerRef,v=Object(c.a)(t,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(t){t||Object(u.a)(!1);var n=t.history,r=d(h(s,t.location),t.location),c=r?n.createHref(r):"",g=Object(l.a)({},v,{href:c,navigate:function(){var e=h(s,t.location);(a?n.replace:n.push)(e)}});return f!==p?g.ref=e||m:g.innerRef=m,o.a.createElement(i,g)}))})),v=function(t){return t},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,a=t.activeClassName,s=void 0===a?"active":a,f=t.activeStyle,p=t.className,g=t.exact,b=t.isActive,x=t.location,S=t.sensitive,C=t.strict,E=t.style,w=t.to,k=t.innerRef,T=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(t){t||Object(u.a)(!1);var n=x||t.location,a=d(h(w,n),n),c=a.pathname,O=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=O?Object(r.f)(n.pathname,{path:O,exact:g,sensitive:S,strict:C}):null,L=!!(b?b(A,n):A),D=L?function(){for(var t=arguments.length,e=new Array(t),n=0;n=0||e.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(t.setState({goInputText:""}),i(t.getValidValue()))},t.go=function(e){""!==t.state.goInputText&&(e.keyCode!==g&&"click"!==e.type||(t.setState({goInputText:""}),t.props.quickGo(t.getValidValue())))},t}return Object(s.a)(n,[{key:"getValidValue",value:function(){var t=this.state,e=t.goInputText,n=t.current;return!e||isNaN(e)?n:Number(e)}},{key:"getPageSizeOptions",value:function(){var t=this.props,e=t.pageSize,n=t.pageSizeOptions;return n.some((function(t){return t.toString()===e.toString()}))?n:n.concat([e.toString()]).sort((function(t,e){return(isNaN(Number(t))?0:Number(t))-(isNaN(Number(e))?0:Number(e))}))}},{key:"render",value:function(){var t=this,e=this.props,n=e.pageSize,r=e.locale,i=e.rootPrefixCls,a=e.changeSize,o=e.quickGo,s=e.goButton,l=e.selectComponentClass,c=e.buildOptionText,u=e.selectPrefixCls,d=e.disabled,f=this.state.goInputText,p="".concat(i,"-options"),g=l,m=null,v=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&g){var x=b.map((function(e,n){return h.a.createElement(g.Option,{key:n,value:e.toString()},(c||t.buildOptionText)(e))}));m=h.a.createElement(g,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(t){return t.parentNode}},x)}return o&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},m,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function S(){}function C(t,e,n){var r=void 0===t?e.pageSize:t;return Math.floor((n.total-1)/r)+1}var E=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(t){var r;Object(o.a)(this,n),(r=e.call(this,t)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(C(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(t,e){var n=r.props.prefixCls,i=t||h.a.createElement("button",{type:"button","aria-label":e,className:"".concat(n,"-item-link")});return"function"==typeof t&&(i=h.a.createElement(t,Object(a.a)({},r.props))),i},r.savePaginationNode=function(t){r.paginationNode=t},r.isValid=function(t){return"number"==typeof(e=t)&&isFinite(e)&&Math.floor(e)===e&&t!==r.state.current;var e},r.shouldDisplayQuickJumper=function(){var t=r.props,e=t.showQuickJumper,n=t.pageSize;return!(t.total<=n)&&e},r.handleKeyDown=function(t){t.keyCode!==m&&t.keyCode!==v||t.preventDefault()},r.handleKeyUp=function(t){var e=r.getValidValue(t);e!==r.state.currentInputValue&&r.setState({currentInputValue:e}),t.keyCode===g?r.handleChange(e):t.keyCode===m?r.handleChange(e-1):t.keyCode===v&&r.handleChange(e+1)},r.changePageSize=function(t){var e=r.state.current,n=C(t,r.state,r.props);e=e>n?n:e,0===n&&(e=r.state.current),"number"==typeof t&&("pageSize"in r.props||r.setState({pageSize:t}),"current"in r.props||r.setState({current:e,currentInputValue:e})),r.props.onShowSizeChange(e,t),"onChange"in r.props&&r.props.onChange&&r.props.onChange(e,t)},r.handleChange=function(t){var e=r.props.disabled,n=t;if(r.isValid(n)&&!e){var i=C(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(e)}},{key:"getShowSizeChanger",value:function(){var t=this.props,e=t.showSizeChanger,n=t.total,r=t.totalBoundaryShowSizeChanger;return void 0!==e?e:n>r}},{key:"renderPrev",value:function(t){var e=this.props,n=e.prevIcon,r=(0,e.itemRender)(t,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(t){var e=this.props,n=e.nextIcon,r=(0,e.itemRender)(t,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var t=this,e=this.props,n=e.prefixCls,a=e.className,o=e.style,s=e.disabled,l=e.hideOnSinglePage,c=e.total,d=e.locale,g=e.showQuickJumper,m=e.showLessItems,v=e.showTitle,y=e.showTotal,x=e.simple,S=e.itemRender,E=e.showPrevNextJumpers,w=e.jumpPrevIcon,k=e.jumpNextIcon,T=e.selectComponentClass,O=e.selectPrefixCls,A=e.pageSizeOptions,L=this.state,D=L.current,R=L.pageSize,I=L.currentInputValue;if(!0===l&&c<=R)return null;var _=C(void 0,this.state,this.props),M=[],N=null,P=null,F=null,j=null,B=null,U=g&&g.goButton,H=m?1:2,G=D-1>0?D-1:0,z=D+1<_?D+1:_,W=Object.keys(this.props).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t.props[n]),e}),{});if(x)return U&&(B="boolean"==typeof U?h.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},d.jump_to_confirm):h.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},U),B=h.a.createElement("li",{title:v?"".concat(d.jump_to).concat(D,"/").concat(_):null,className:"".concat(n,"-simple-pager")},B)),h.a.createElement("ul",Object(r.a)({className:f()(n,"".concat(n,"-simple"),Object(i.a)({},"".concat(n,"-disabled"),s),a),style:o,ref:this.savePaginationNode},W),h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(G)),h.a.createElement("li",{title:v?"".concat(D,"/").concat(_):null,className:"".concat(n,"-simple-pager")},h.a.createElement("input",{type:"text",value:I,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(n,"-slash")},"/"),_),h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(z)),B);if(_<=3+2*H){var V={locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:S};_||M.push(h.a.createElement(p,Object(r.a)({},V,{key:"noPager",page:_,className:"".concat(n,"-disabled")})));for(var K=1;K<=_;K+=1){var q=D===K;M.push(h.a.createElement(p,Object(r.a)({},V,{key:K,page:K,active:q})))}}else{var Y=m?d.prev_3:d.prev_5,X=m?d.next_3:d.next_5;E&&(N=h.a.createElement("li",{title:v?Y:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(n,"-jump-prev"),Object(i.a)({},"".concat(n,"-jump-prev-custom-icon"),!!w))},S(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(w,"prev page"))),P=h.a.createElement("li",{title:v?X:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(n,"-jump-next"),Object(i.a)({},"".concat(n,"-jump-next-custom-icon"),!!k))},S(this.getJumpNextPage(),"jump-next",this.getItemIcon(k,"next page")))),j=h.a.createElement(p,{locale:d,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:_,page:_,active:!1,showTitle:v,itemRender:S}),F=h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:S});var $=Math.max(1,D-H),J=Math.min(D+H,_);D-1<=H&&(J=1+2*H),_-D<=H&&($=_-2*H);for(var Z=$;Z<=J;Z+=1){var Q=D===Z;M.push(h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:Q,showTitle:v,itemRender:S}))}D-1>=2*H&&3!==D&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(N)),_-D>=2*H&&D!==_-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(P)),1!==$&&M.unshift(F),J!==_&&M.push(j)}var tt=null;y&&(tt=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(D-1)*R+1,D*R>c?c:D*R])));var et=!this.hasPrev()||!_,nt=!this.hasNext()||!_;return h.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},W),tt,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:et?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),et)),"aria-disabled":et},this.renderPrev(G)),M,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:nt?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),nt)),"aria-disabled":nt},this.renderNext(z)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:T,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:D,pageSize:R,pageSizeOptions:A,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n={};if("current"in t&&(n.current=t.current,t.current!==e.current&&(n.currentInputValue=n.current)),"pageSize"in t&&t.pageSize!==e.pageSize){var r=e.current,i=C(t.pageSize,e,t);r=r>i?i:r,"current"in t||(n.current=r,n.currentInputValue=r),n.pageSize=t.pageSize}return n}}]),n}(h.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:S,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:S,locale:x.a,style:{},itemRender:function(t,e,n){return n},totalBoundaryShowSizeChanger:50};var w=E},"6RRn": /*!*******************************************!*\ !*** ./node_modules/rc-table/es/index.js ***! \*******************************************/ /*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ /*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(t,e,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(e,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(e,"a",(function(){return a.a})),e.c=r.b},"6eGT": /*!*******************************************************!*\ !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";e.a=function(t){return null}},"7Cbv": /*!**************************************************************!*\ !*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&o.test(t)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return u(r)}},"7ahc": /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /*! exports provided: default, MyCodeMirror */ /*! exports used: MyCodeMirror, default */function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,n=t.onChange,i=t.mode,a=t.options,o=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();n&&n(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,n=t.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7ixt": /*!**************************************************!*\ !*** ./node_modules/rc-tooltip/es/placements.js ***! \**************************************************/ /*! exports provided: placements, default */ /*! exports used: placements */function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r={adjustX:1,adjustY:1},i=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:i}}},"815F": /*!***************************************************!*\ !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! \***************************************************/ /*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ /*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(t,e,n){"use strict";n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"b",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(t,e){return null!=t?t:e}function u(t){return function t(e){return Object(o.a)(e).map((function(e){if(!Object(l.i)(e))return Object(s.a)(!e,"Tree/TreeNode can only accept TreeNode as children."),null;var n=e.key,r=e.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),h=t(o);return h.length&&(u.children=h),u})).filter((function(t){return t}))}(t)}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===e?[]:e),a=[];function o(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===t.length-1])});return a.push(p),!0===e||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(t),a}function d(t,e,n){var r;n?"string"==typeof n?r=function(t){return t[n]}:"function"==typeof n&&(r=function(t){return n(t)}):r=function(t,e){return c(t.key,e)},function n(i,a,o){var s=i?i.children:t,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),h={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};e(h)}s&&s.forEach((function(t,e){n(t,e,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.initWrapper,r=e.processEntity,i=e.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),d(t,(function(t){var e=t.node,n=t.index,i=t.pos,a=t.key,u=t.parentPos,h={node:e,index:n,key:a,pos:i,level:t.level},d=c(a,i);o[i]=h,s[d]=h,h.parent=o[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),a),i&&i(l),l}function p(t,e){var n=e.expandedKeys,r=e.selectedKeys,i=e.loadedKeys,a=e.loadingKeys,o=e.checkedKeys,s=e.halfCheckedKeys,l=e.dragOverNodeKey,c=e.dropPosition,u=e.keyEntities[t];return{eventKey:t,expanded:-1!==n.indexOf(t),selected:-1!==r.indexOf(t),loaded:-1!==i.indexOf(t),loading:-1!==a.indexOf(t),checked:-1!==o.indexOf(t),halfChecked:-1!==s.indexOf(t),pos:String(u?u.pos:""),dragOver:l===t&&0===c,dragOverGapTop:l===t&&-1===c,dragOverGapBottom:l===t&&1===c}}function g(t){var e=t.data,n=t.expanded,r=t.selected,a=t.checked,o=t.loaded,l=t.loading,c=t.halfChecked,u=t.dragOver,h=t.dragOverGapTop,d=t.dragOverGapBottom,f=t.pos,p=t.active,g=Object(i.a)(Object(i.a)({},e),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),g}},"8EBN": /*!**********************************************!*\ !*** ./node_modules/codemirror/mode/meta.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.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 e=0;e-1&&e.substring(i+1,e.length);if(a)return t.findModeByExtension(a)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
    "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,n,r,i){if(n>=e.length||e[n].level<=r)return n;var a=e[n];i.push("
  • "+a.text+"");var o=[];return n=t(e,++n,a.level,o),o.length>0&&(i.push("
      "),o.forEach((function(t){i.push(t)})),i.push("
    ")),i.push("
  • "),n=t(e,n,r,i)}(g,0,0,m),m.push("
"),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(s.a)(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||""),i=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(i)>=0){var a=k(),o=r;r=a,T[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,k=function(){return"__special_katext_id_".concat(w++,"__")},T={};function O(){w=0,T={}}function A(t){return t=t.replace(E,(function(t,e){var n=k();return T[n]={type:"inline",expression:e},n}))}var L=v.listitem;v.listitem=function(t){return L(A(t))};var D=v.paragraph;v.paragraph=function(t){return D(A(t))};var R=v.tablecell;v.tablecell=function(t,e){return R(A(t),e)},v.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

".concat(t,"

"):'
').concat(n?t:Object(p.escape)(t,!0),"
\n"):'
'+(n?t:Object(p.escape)(t,!0))+"
"},v.heading=function(t,e,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:r,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var I=f.a,_=(n("SJMd"),n("ulZh")),M=n.n(_),N=n("m3rI"),P=n("Oy/b"),F=n("p5ED"),j=n("ErOA"),B=function(t,e){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function U(t,e){function n(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function H(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{l(r.next(t))}catch(t){a(t)}}function s(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((r=r.apply(t,e||[])).next())}))}function G(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(t){var n=document.createElement("div");n.className=""+e.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",t.typeName),n.innerHTML=t.icon,n.addEventListener("click",(function(){e.markerToolbarButtonClicked(n,t)})),e.buttons.push(n),e.markerButtons.push(n)})),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 r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Z=function(){function t(t,e,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,n,r=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(e=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:r.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){r.panelButtonClick(t)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,n=-1;if(t!==this.activePanel){n=this.panels.indexOf(t),this.panelRow.innerHTML="";var r=t.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,r){var i,a;t.className=e.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:e.toolboxButtonStyleColorsClass.name))}))},t}(),Q=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=t.getColorBox(n);e.appendChild(r),t.colorBoxes.push(r)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentColor(t,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=t,a.style.borderRadius=r/2+"px","transparent"===t&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},e.prototype.setCurrentColor=function(t,e){var n=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(Q),et=function(){function t(t,e,n){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),nt=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),rt=function(){function t(){this.GRIP_SIZE=10,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),it=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),at=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(W.createTransform()),i.setupControlBox(),i}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=W.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(e);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+t.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),n=W.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var n=W.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var t=W.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=W.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=W.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 nt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},e.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,r=(this.width+this.CB_DISTANCE)/2-t/2,i=(this.height+this.CB_DISTANCE)/2-t/2,a=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,e,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*e,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(et),ot=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=W.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)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.title="Rectangle marker",e}(at),st=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentWidth(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),t.widthBoxes.push(r)})),e},e.prototype.setCurrentWidth=function(t,e){var n=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(Q),lt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.styles.length-5+"%",r.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentStyle(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),t.styleBoxes.push(r)})),e},e.prototype.setCurrentStyle=function(t,e){var n=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(Q),ct=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=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},ht=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&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(e),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.x1=this.x1*e,this.y1=this.y1*n,this.x2=this.x2*e,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorLine=W.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=W.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)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.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()),W.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.fonts.length-5+"%",r.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentFont(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),t.fontBoxes.push(r)})),e},e.prototype.setCurrentFont=function(t,e){var n=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(Q),pt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(n=!0)})),n},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.bgRectangle=W.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=W.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=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(e){t.textElement.appendChild(W.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,r=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,r)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,r=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,r=this.height/2-e.height*t/2),{x:n,y:r}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),n=this.getTextPosition(e);n.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=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(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*t,y:n.height*t};e.x-=r.x/2,e.y-=r.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&W.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&W.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(at),gt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var t=W.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.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)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=e[0],r=e[1],i=e[2],a=e[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(at),mt=function(t){function e(e,n,r){var i=t.call(this,e,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){t.setCurrentType(i,a)})),e.appendChild(a),"both"===i||"start"===i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return e},e.prototype.setCurrentType=function(t,e){var n=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(Q),vt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new mt("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+r/2)+" "+t+","+(e-r/2)+" "+(t+n/2)+","+(e+r/2)},e.prototype.createTips=function(){this.arrow1=W.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=W.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",W.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),W.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new tt("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentOpacity(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),t.opacityBoxes.push(r)})),e},e.prototype.setCurrentOpacity=function(t,e){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(Q),xt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new tt("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new tt("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new tt("Fill color",r.defaultColorSet,i.bgColor,St),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new rt,i.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){W.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=W.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,n){"new"===this.state&&t.prototype.pointerDown.call(this,e,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var n="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(n),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var n=this.unrotatePoint(e);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",t]]),W.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:e+n/2,y:this.height+20});var r=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?r.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),kt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(Et),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorCurve=W.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=W.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)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),W.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=W.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=W.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)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/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()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,n){this.curveX=this.curveX*e,this.curveY=this.curveY*n,t.prototype.scale.call(this,e,n)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),At=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Lt=function(t){function e(e,n,r){var i=t.call(this,e,!1)||this;return i.dataUrl=n,i.state=r,i}return U(e,t),e}(At),Dt=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,r)||this;return i.marker=n,i}return U(e,t),e}(At),Rt=function(){function t(){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 t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var n=this[t].indexOf(e);n>-1&&this[t].splice(n,1)},t}(),It=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,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 Rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.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(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,kt,Et,xt,Ct,wt,yt,dt,Ot]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var n=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==n&&e._availableMarkerTypes.push(n)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),V.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new At(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var n=!1;t||this.eventListeners.beforeclose.forEach((function(t){var r=new At(e,!0);t(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new At(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},t.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"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Dt(t,t._currentMarker,!0);n(r),r.defaultPrevented&&(e=!0)})),!e){var n=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(e){return e(new Dt(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Dt(t,void 0,!0);n(r),r.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=r.markers[e];r.setCurrentMarker(r.markers[e]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(e){return e(new Dt(t,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(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=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===e.width&&n.height===e.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),r1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.markerImage.getBoundingClientRect();return{x:(t-n.left)/this.zoomLevel,y:(e-n.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.addLicenseKey=function(t){V.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new At(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new At(t))})))},t.instanceCounter=0,t}(),_t=function(t,e){return(_t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}; /* ********************************** 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. ***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_t(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Nt(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{l(r.next(t))}catch(t){a(t)}}function s(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((r=r.apply(t,e||[])).next())}))}function Pt(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&e>0){var n=new qt(t,e),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=jt.createDefs();a.appendChild(o);var s=jt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=jt.createPath(jt.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=jt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(jt.createTSpan(t+":"+e)),a.appendChild(c);var u=c.getBBox();jt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=jt.createPath(jt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),jt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},t}(),Xt=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Vt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=jt.createGroup(),this.visual.appendChild(jt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(jt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(n){return jt.setAttributes(n,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Jt=function(){function t(t,e,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=n,this.container=r,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(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&jt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=jt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=jt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),jt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var n=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,r){var i=e.y+n*(r+1);jt.setAttributes(t,[["x1",""+e.x],["y1",""+i],["x2",""+(e.x+e.width)],["y2",""+i]])}));var r=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,n){var i=e.x+r*(n+1);jt.setAttributes(t,[["x1",""+i],["y1",""+e.y],["x2",""+i],["y2",""+(e.y+e.height)]])})),jt.setAttributes(this.cropShadeElement,[["d",jt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,e.x,e.y,e.width,e.height)]]),this.topLeftGrip.setCenter(e.x,e.y),this.topRightGrip.setCenter(e.x+e.width,e.y),this.bottomLeftGrip.setCenter(e.x,e.y+e.height),this.bottomRightGrip.setCenter(e.x+e.width,e.y+e.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},t.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)},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.container.getBoundingClientRect();return{x:t-n.left+this.margin,y:e-n.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,n=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+e),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),n=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-e.width),e.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(e.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=r,e.height=this.cropRect.y+this.cropRect.height-e.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?e.height=this.aspectRatio.getVerticalLength(e.width):e.height+=r}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,e.x>=this.margin&&e.y>=this.margin&&e.x-this.margin+e.width<=this.canvasWidth&&e.y-this.margin+e.height<=this.canvasHeight&&(this.cropRect=e,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=t-this.cropRect.width/2,this.cropRect.y=e-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)}},t.prototype.getRescaledRect=function(t,e,n,r,i,a){var o=n/t,s=r/e;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},t.prototype.scaleCanvas=function(t,e){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},t}(),Zt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,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(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.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},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();jt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;e+="h4v"+-r+"h1v"+r}e+="v1H0Z",this.scaleShape=jt.createPath(e);var i=jt.createTransform();this.scaleShape.transform.baseVal.appendItem(i),t.appendChild(this.scaleShape),this.angleLabelElement=jt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=jt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=jt.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Qt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*r,c.height=t.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/a,h=e.naturalHeight/(t.height.baseVal.value-2*r)/o,c.width=e.naturalWidth/a,c.height=e.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(a,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},t}(),te=function(){function t(e){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=t.instanceCounter++,this.styles=new Bt(this.instanceNo),this.target=e,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+this.CANVAS_MARGIN):0;this.coverDiv.style.top=e+"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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,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 e=new Wt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var n=[];this.aspectRatios.forEach((function(e){var r=new Vt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);r.onClick=function(){return t.ratioButtonClicked(e)},n.push(r)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,e.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Vt('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var i=new Vt('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,i.isActive=t.zoomToCropEnabled},e.addButton(i),!Ft.isLicensed){var a=new Kt;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new Wt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Vt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Vt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,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 e=new Wt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var n=new Vt('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,e.addButton(n);var r=new Vt('',"Rotate right");r.onClick=this.rotateRightButtonClicked,e.addButton(r);var i=new Kt;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Zt("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(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},i.addElement(this.straightener.getUI());var a=new Wt;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new Vt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new Vt('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.cropImage.getBoundingClientRect();return{x:t-n.left,y:e-n.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var e=this.editingTargetRotationContainer.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(e,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Nt(this,void 0,void 0,(function(){var t,e;return Pt(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return t=n.sent(),e=this.getState(),this.renderEventListeners.forEach((function(n){return n(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Nt(this,void 0,void 0,(function(){var t;return Pt(this,(function(e){switch(e.label){case 0:return(t=new Qt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),jt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.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 e.sent(),[4,t.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,e.sent()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=n("8hTe"),ne=n.n(ee),re=/]*>/g;e.a=function(t){var e=t.value,n=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,E=void 0===C?{}:C,w=t.stylesPrev,k=void 0===w?{}:w,A=String(n),L=Object(u.useRef)(),D=Object(u.useRef)(),R=Object(u.useState)(""),_=Object(s.a)(R,2),B=_[0],U=_[1],H=Object(u.useState)("office"),G=Object(s.a)(H,2),z=G[0],W=G[1],V=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+N.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+N.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+N.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,"\n")).replace(new RegExp("(?[TOC]

",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,n){var r=e[n],i=r.type,a=r.expression;return Object(P.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),O(),p){var n=document.createElement("div");return n.innerHTML=t,n.innerText}return setTimeout((function(){return Y()}),500),t}),[A]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var n=e.getAttribute("src");U(n),W("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),W("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),W("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),W("html");else if(r.startsWith("#")){t.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(E=Object(a.a)(Object(a.a)({},E),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&V&&V.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),O(),b()}}),[V,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(a.a)({},E),className:"".concat(f||""," markdown-body ").concat(ne.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(L.current.style.display="flex",L.current.style.width=t.target.clientWidth+"px",L.current.style.height=t.target.clientHeight+"px",L.current.style.top=t.target.offsetTop+"px",L.current.style.left=t.target.offsetLeft+"px",D.current.src=t.target.getAttribute("src")):L.current.style.display="none")},dangerouslySetInnerHTML:{__html:V}}),h.a.createElement("div",{ref:L,className:ne.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(t=new te(D.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L.current.style.display="none",t.next=3,Object(j.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(n=t.sent)&&n.id&&m(D.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(t=new It(D.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(L.current.style.display="none",!D.current){t.next=6;break}return t.next=4,Object(j.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(n=t.sent)&&n.id&&m(D.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:D,src:"https://ali-cdn.educoder.net/images/avatars/PortalImage/170?t=1659681136",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),h.a.createElement(F.a,{close:!0,data:B,hasMask:y,type:null!=B&&B.length?z:"",style:Object(a.a)({},k),onClose:function(){return U("")}}))}},"9VGf": /*!****************************************!*\ !*** ./src/components/useInterval.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(t,e){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=t})),Object(r.useEffect)((function(){if(null!==e){var t=setInterval((function(){n.current()}),e);return function(){return clearInterval(t)}}}),[e])}},AMnG: /*!*********************************************************************!*\ !*** ./src/pages/tasks/left-panel/discuss/discuss-editor/index.tsx ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n.n(a),s=(n(/*! ./index.less */"nWbc"),n(/*! @/components/markdown-editor */"Ot1p"));e.a=function(t){var e=t.id,n=t.activeDiscussIndex,l=t.onReplyDiscuss,c=Object(a.useState)(""),u=Object(i.a)(c,2),h=u[0],d=u[1];return o.a.createElement("div",{key:e,className:"discuss-item-editor",style:{display:n===e?"block":"none",width:"100%"}},o.a.createElement(s.a,{miniToolbar:!0,startInit:n===e,defaultValue:h,id:e,noStorage:!0,watch:!1,height:155,placeholder:"我要回复",showResizeBar:!0,onChange:function(t){d(t)}}),o.a.createElement("a",{onClick:function(){h?(l(e,h),d("")):r.b.info("回复内容不能为空!")},className:"btn-send"},"发送"))}},BU3w: /*!***************************************************!*\ !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! \***************************************************/ /*! exports provided: injectCSS, updateCSS */ /*! exports used: updateCSS */function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(e=n.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=t;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=a(t,n);return f["rc-util-key"]=e,f}},Bd2K: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closetag.js ***! \********************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){t.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=t.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:r(e,!0)}(e)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||a(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,g)>-1)s[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&i(y,b)>-1;s[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var E=s[c];r.replaceRange(E.text,o[c].head,o[c].anchor,"+insert");var w=r.listSelections().slice(0);w[c]={head:E.newPos,anchor:E.newPos},r.setSelections(w),!C&&E.indent&&(r.indentLine(E.newPos.line,null,!0),r.indentLine(E.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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 r(e,n){for(var r=e.listSelections(),i=[],o=n?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(e.replaceSelections(i),r=e.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r=0;e--){var n=i().key(e);t(a(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},D1Df: /*!************************************************!*\ !*** ./node_modules/qrcode.react/lib/index.js ***! \************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){return(i=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n>6),e+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(e+=String.fromCharCode(224|r>>12),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&t.charCodeAt(n)),e+=String.fromCharCode(240|r>>18),e+=String.fromCharCode(128|r>>12&63),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r))}return e}var S={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function C(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return t.forEach((function(t,r){var i=null;t.forEach((function(a,o){if(!a&&null!==i)return n.push("M".concat(i+e," ").concat(r+e,"h").concat(o-i,"v1H").concat(i+e,"z")),void(i=null);if(o!==t.length-1)a&&null===i&&(i=o);else{if(!a)return;null===i?n.push("M".concat(o+e,",").concat(r+e," h1v1H").concat(o+e,"z")):n.push("M".concat(i+e,",").concat(r+e," h").concat(o+1-i,"v1H").concat(i+e,"z"))}}))})),n.join("")}function E(t,e){return t.slice().map((function(t,n){return n=e.y+e.h?t:t.map((function(t,n){return(n=e.x+e.w)&&t}))}))}function w(t,e){var n=t.imageSettings,r=t.size,i=t.includeMargin;if(null==n)return null;var a=i?4:0,o=e.length+2*a,s=Math.floor(.1*r),l=o/r,c=(n.width||s)*l,u=(n.height||s)*l,h=null==n.x?e.length/2-c/2:n.x*l,d=null==n.y?e.length/2-u/2:n.y*l,f=null;if(n.excavate){var p=Math.floor(h),g=Math.floor(d);f={x:p,y:g,w:Math.ceil(c+h-p),h:Math.ceil(u+d-g)}}return{x:h,y:d,h:u,w:c,excavation:f}}var k=function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}return!0}(),T=function(t){function e(){var t,n;l(this,e);for(var r=arguments.length,i=new Array(r),a=0;at.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}var r=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){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}}t.exports={defaults:{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},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var n=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(y,"$1")+e:t+e}function x(t,e,n){var r=t.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>e)n.splice(e);else for(;n.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var n=this.rules.block.code.exec(t);if(n){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:_(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var n,r,i,a,o,s,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(n),v!==m-1&&(g="\n"===n.charAt(n.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:_(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=N(e[2],"()");if(n>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,r).trim(),e[3]=""}var i=e[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=e[3]?e[3].slice(1,-1):"";return P(e,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},e[0])}},e.reflink=function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return P(n,r,n[0])}},e.strong=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}},e.em=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:e[0],text:n}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?e(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},e.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?e(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.inlineText=function(t,e,n){var r,i=this.rules.inline.text.exec(t);if(i)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},t}(),j=k,B=E,U=T,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:j,table:j,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=B(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=B(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=B(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=B(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=B(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=B(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=B(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=B(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:j,paragraph:B(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:j,tag:"^comment|^|^<[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:j,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=B(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=B(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=B(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=B(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=B(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=B(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=B(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=B(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=B(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=B(G._blockSkip,"g").getRegex(),G.overlapSkip=B(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=B(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=B(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=B(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=B(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=B(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:B(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||W,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:K.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,n){return new e(n).lex(t)};var n,r,i,a=e.prototype;return a.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(t,e,n){var r,i,a,o;for(void 0===e&&(e=[]),void 0===n&&(n=!0),t=t.replace(/^ +$/gm,"");t;)if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),r.type&&e.push(r);else if(r=this.tokenizer.code(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((o=e[e.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.nptable(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),e.push(r);else if(r=this.tokenizer.list(t)){for(t=t.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a=this.tokenizer.escape(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.tag(t,n,r))t=t.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,e.push(a);else if(a=this.tokenizer.link(t))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.strong(t,s,i))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.em(t,s,i))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.codespan(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.br(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.del(t))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.autolink(t,Y))t=t.substring(a.raw.length),e.push(a);else if(n||!(a=this.tokenizer.url(t,Y))){if(a=this.tokenizer.inlineText(t,r,q))t=t.substring(a.raw.length),i=a.raw.slice(-1),e.push(a);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(a.raw.length),e.push(a);return e},n=e,i=[{key:"rules",get:function(){return{block:V,inline:K}}}],(r=null)&&t(n.prototype,r),i&&t(n,i),e}(),$=r.defaults,J=w,Z=S,Q=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return r?'
'+(n?t:Z(t,!0))+"
\n":"
"+(n?t:Z(t,!0))+"
\n"},e.blockquote=function(t){return"
\n"+t+"
\n"},e.html=function(t){return t},e.heading=function(t,e,n,r){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.list=function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
  • "+t+"
  • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

    "+t+"

    \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
    ":"
    "},e.del=function(t){return""+t+""},e.link=function(t,e,n){if(null===(t=J(this.options.sanitize,this.options.baseUrl,t)))return n;var r='"},e.image=function(t,e,n){if(null===(t=J(this.options.sanitize,this.options.baseUrl,t)))return n;var r=''+n+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,n){return""+n},e.image=function(t,e,n){return""+n},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var n=e;do{this.seen[n]++,e=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),nt=r.defaults,rt=C,it=function(){function t(t){this.options=t||nt,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,n){return new t(n).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var n,r,i,a,o,s,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+st(t.message+"",!0)+"
    ";throw t}}return ht.options=ht.setOptions=function(t){return at(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=at({},t);if(t.renderer&&function(){var n=ht.defaults.renderer||new Q,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o=0;n--)if(a(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function l(t){t&&c(t)&&(o.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(o.cookie)}},EHPI: /*!*******************************************************!*\ !*** ./src/pages/Problems/OjForm/CodePanel/index.tsx ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/drawer/style */"bbsP");var r,i=n(/*! antd/es/drawer */"/wGt"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! @/components/monaco-editor */"ZW9T"),u=n(/*! @/components/tpi-code-setting/CodeSetting */"ZD9Y"),h=n(/*! @/components/modal */"M8RZ"),d=n(/*! @/utils/urlTool */"bCnd"),f=(n(/*! ./index.less */"fcyK"),{theme:Object(d.a)("cmCodeMode","vs-dark"),fontSize:Object(d.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(d.a)("cmTabToSpace",!0)});function p(t,e){switch(e.type){case r.set_show_editor_setting:return Object(o.a)(Object(o.a)({},t),{},{showEditorSetting:e.payload});case r.set_theme:return Object(o.a)(Object(o.a)({},t),{},{theme:e.payload});case r.set_font_size:return Object(o.a)(Object(o.a)({},t),{},{fontSize:e.payload});case r.on_tab_to_space:return Object(o.a)(Object(o.a)({},t),{},{tabToSpace:e.payload});default:throw new Error}}function g(t){var e=t.onShowCodeSetting;return l.a.createElement("div",{className:"action-bar"},l.a.createElement("span",null,"学员初始代码文件"),l.a.createElement("a",{onClick:e},l.a.createElement("i",{className:"iconfont icon-shezhi"})))}!function(t){t[t.set_font_size=0]="set_font_size",t[t.set_theme=1]="set_theme",t[t.on_tab_to_space=2]="on_tab_to_space",t[t.set_show_editor_setting=3]="set_show_editor_setting"}(r||(r={})),e.a=function(t){var e=t.value,n=t.onChange,o=t.language,m=t.ActionBarRender,v=void 0===m?function(t){return l.a.createElement(g,{onShowCodeSetting:t})}:m,y=Object(s.useReducer)(p,f),b=Object(a.a)(y,2),x=b[0],S=b[1],C=x.theme,E=x.fontSize,w=x.showEditorSetting,k=x.tabToSpace,T={onFontSizeChange:function(t){S({type:r.set_font_size,payload:t}),Object(d.b)("cmFontSize",t)},tabToSpace:k,cmFontSize:E,className:"oj",cmCodeMode:C,onTabToSpace:function(t){S({type:r.on_tab_to_space,payload:t}),Object(d.b)("cmTabToSpace",t)},onCodeModeChange:function(t){S({type:r.set_theme,payload:t}),Object(d.b)("cmCodeMode",t)}};var O={value:e,language:o,onChange:n,theme:C,height:"calc(100% - 56px)",options:{fontSize:E,insertSpaces:k}};return l.a.createElement(s.Fragment,null,l.a.createElement("div",{className:"code-panel-container"},v((function(){S({type:r.set_show_editor_setting,payload:!0})})),l.a.createElement(c.b,O)),l.a.createElement(h.a,null,l.a.createElement(i.a,{className:"oj",title:null,placement:"right",closable:!1,visible:w,onClose:function(){S({type:r.set_show_editor_setting,payload:!1})}},l.a.createElement(u.a,T))))}},ELLl: /*!*************************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closebrackets.js ***! \*************************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=t.Pos;function r(t,n){return"pairs"==n&&"string"==typeof t?t:"object"==typeof t&&null!=t[n]?t[n]:e[n]}t.defineOption("autoCloseBrackets",!1,(function(e,n,o){o&&o!=t.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),n&&(a(r(n,"pairs")),e.state.closeBrackets=n,e.addKeyMap(i))}));var i={Backspace:function(e){var i=s(e);if(!i||e.getOption("disableInput"))return t.Pass;for(var a=r(i,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(e){var n=s(e),i=n&&r(n,"explode");if(!i||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o1&&d.indexOf(i)>=0&&e.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(n(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(n(b.line,b.ch-1),b);if(t.isWordChar(x)||S==i||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(i)>=0&&e.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):i,E=l%2?i:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)e.execCommand("goCharRight");else if("surround"==u){var i=e.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});e.setSelections(i)}else"both"==u?(e.replaceSelection(C+E,null),e.triggerElectric(C+E),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var a,o}))}(i,e)}}function s(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var r=t.getRange(n(e.line,e.ch-1),n(e.line,e.ch+1));return 2==r.length?r:null}function c(t,e){var r=t.getTokenAt(n(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}a(e.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FOrL: /*!********************************************!*\ !*** ./src/assets/images/icons/nodata.png ***! \********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/nodata.a6b3f948.png"},Gytx: /*!********************************************!*\ !*** ./node_modules/shallowequal/index.js ***! \********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports=function(t,e,n,r){var i=n?n.call(r,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var a=Object.keys(t),o=Object.keys(e);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},c.setupPositionProbePattern=function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=o.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},c.createMovieClip=function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!t&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++){a=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!t},c.mapData=function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;a>>i&1)),o.getMask(e,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--i&&(a++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(t,e,n){for(var r=i.getRSBlocks(t,e),s=new a,c=0;c8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(l.PAD0,8),s.getLengthInBits()>=8*h));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(t,e){for(var n=0,r=0,i=0,a=new Array(e.length),l=new Array(e.length),c=0;c=0?p.get(g):0}}var m=0;for(d=0;d=0;)e^=p.G15<=0;)e^=p.G18<>>=1;return e},getPatternPosition:function(t){return p.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case o:return(e+n)%2==0;case s:return e%2==0;case l:return n%3==0;case c:return(e+n)%3==0;case u:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case h:return e*n%2+e*n%3==0;case d:return(e*n%2+e*n%3)%2==0;case f:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new i([1],0),n=0;n5&&(n+=3+a-5)}for(r=0;r>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(t){return t.replace(u,c)},d=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),e>=2?"=":o.charAt(n>>>6&63),e>=1?"=":o.charAt(63&n)].join("")},f=n.btoa&&"function"==typeof n.btoa?function(t){return n.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,d)},p=function(t){return f(h(String(t)))},g=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},m=function(t,e){return e?g(p(t)):p(t)};n.Uint8Array&&(i=function(t,e){for(var n="",r=0,i=t.length;r>>18)+o.charAt(c>>>12&63)+(void 0!==s?o.charAt(c>>>6&63):"=")+(void 0!==l?o.charAt(63&c):"=")}return e?g(n):n});var v,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return l(55296+(e>>>10))+l(56320+(1023&e));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},x=function(t){return t.replace(y,b)},S=function(t){var e=t.length,n=e%4,r=(e>0?s[t.charAt(0)]<<18:0)|(e>1?s[t.charAt(1)]<<12:0)|(e>2?s[t.charAt(2)]<<6:0)|(e>3?s[t.charAt(3)]:0),i=[l(r>>>16),l(r>>>8&255),l(255&r)];return i.length-=[0,0,2,1][n],i.join("")},C=n.atob&&"function"==typeof n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/\S{1,4}/g,S)},E=function(t){return C(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},k=function(t){return function(t){return x(C(t))}(w(t))};n.Uint8Array&&(v=function(t){return Uint8Array.from(E(w(t)),(function(t){return t.charCodeAt(0)}))});var T=function(){var t=n.Base64;return n.Base64=a,t};if(n.Base64={VERSION:"2.6.4",atob:E,btoa:f,fromBase64:k,toBase64:m,utob:h,encode:m,encodeURI:function(t){return m(t,!0)},btou:x,decode:k,noConflict:T,fromUint8Array:i,toUint8Array:v},"function"==typeof Object.defineProperty){var O=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O((function(){return k(this)}))),Object.defineProperty(String.prototype,"toBase64",O((function(t){return m(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",O((function(){return m(this,!0)})))}}n.Meteor&&(Base64=n.Base64);t.exports?t.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(e,[]))||(t.exports=r);return{Base64:n.Base64}}(n)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this)}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},JB8y: /*!******************************************!*\ !*** ./src/pages/MyProblem/interface.ts ***! \******************************************/ /*! exports provided: ExecuteStatus */ /*! exports used: ExecuteStatus */function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.NOMATCH=-1]="NOMATCH",t[t.OK=0]="OK",t[t.TIMEOUT=2]="TIMEOUT",t[t.PODFAILURE=3]="PODFAILURE",t[t.COMPILEFAILURE=4]="COMPILEFAILURE",t[t.EXECUTEFAILURE=5]="EXECUTEFAILURE"}(r||(r={}))},JPnl: /*!*****************************************************!*\ !*** ./src/pages/MyProblem/TestCasePanel/index.tsx ***! \*****************************************************/ /*! exports provided: ExecuteDict, getDetailCommitOut, getCommitOut, default */ /*! exports used: ExecuteDict, default, getDetailCommitOut */function(t,e,n){"use strict";n.d(e,"a",(function(){return S})),n.d(e,"c",(function(){return E}));n(/*! antd/es/button/style */"+L6B");var r,i,a=n(/*! antd/es/button */"2/Rp"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),c=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! @ant-design/icons */"8Skl"),f=n(/*! @ant-design/icons */"y3Kf"),p=n(/*! ../interface */"JB8y"),g=n(/*! js-base64 */"J66h"),m=(n(/*! ./index.less */"a4uL"),n(/*! @/components/Spinner */"IxHN")),v=n(/*! @/components/RenderHtml */"9Bee"),y=n(/*! @/utils/util */"1vsH"),b=c.a.TextArea,x={visible:!1,tabIndex:"0"},S=(r={},Object(l.a)(r,p.a.NOMATCH,"测试用例结果不匹配"),Object(l.a)(r,p.a.OK,"调试通过"),Object(l.a)(r,2,"调试超时"),Object(l.a)(r,3,"调试pod失败"),Object(l.a)(r,4,"编译失败"),Object(l.a)(r,5,"执行失败"),r);function C(t,e){switch(e.type){case i.SET_VISIBLE:return Object(s.a)(Object(s.a)({},t),{},{visible:e.payload});case i.SET_TABINDEX:return Object(s.a)(Object(s.a)({},t),{},{tabIndex:e.payload});default:throw new Error}}function E(t){var e=t.status,n=t.error_msg,r=t.output,i=t.input,a=t.expected_output,o=t.is_file,s=t.input_file_url,l=t.output_file_url,c=t.expected_output_file_url,u=null,d={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(e){case p.a.NOMATCH:u=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",{className:"c-red"},"实际输入:"),!o&&h.a.createElement(v.a,{value:i,style:d}),o&&h.a.createElement("div",{style:d},h.a.createElement("a",{onClick:function(){return Object(y.w)(s,i)}},i)),h.a.createElement("p",{className:"c-red"},"实际输出:"),!o&&h.a.createElement(v.a,{value:r&&g.Base64.decode(r)||"",style:d}),o&&h.a.createElement("div",{style:d},h.a.createElement("a",{onClick:function(){return Object(y.w)(l,r)}},r)),h.a.createElement("p",{className:"c-red"},"预期输出:"),!o&&h.a.createElement(v.a,{value:a&&g.Base64.decode(a)||"",style:d}),o&&h.a.createElement("div",{style:d},h.a.createElement("a",{onClick:function(){return Object(y.w)(c,a)}},a)));break;case p.a.EXECUTEFAILURE:case p.a.COMPILEFAILURE:u=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"最后执行的输入:"),!o&&h.a.createElement(v.a,{value:i,style:d}),o&&h.a.createElement("div",{style:d},h.a.createElement("a",{onClick:function(){return Object(y.w)(s,i)}},i)),h.a.createElement("p",null,"执行出错信息:"),h.a.createElement("pre",{className:"error"},g.Base64.decode(n)));break;case p.a.PODFAILURE:u=h.a.createElement("p",null,"创建pod失败,请稍后重试");break;case p.a.TIMEOUT:u=h.a.createElement("p",null,"评测超时,请稍后重试")}return h.a.createElement(h.a.Fragment,null," ",u," ")}!function(t){t[t.SET_VISIBLE=0]="SET_VISIBLE",t[t.SET_TABINDEX=1]="SET_TABINDEX"}(i||(i={})),e.b=function(t){var e=t.input,n=t.debuging,r=t.submitting,s=t.executingMessage,l=t.debugResult,c=t.onChangeInput,v=t.onDebugCode,y=t.onSubmitCode,S=Object(u.useReducer)(C,x),E=Object(o.a)(S,2),w=E[0],k=E[1],T=w.visible,O=w.tabIndex;function A(t){var e=t.target.id;k({type:i.SET_TABINDEX,payload:e})}var L=Object(u.useMemo)((function(){if(l){l.status;return h.a.createElement(h.a.Fragment,null,function(t){var e=t.status,n=t.error_msg,r=t.execute_time,i=t.output,a=t.input,o=t.expected_output,s=(t.is_file,t.input_file_url,t.output_file_url,t.expected_output_file_url,null);switch(e){case p.a.OK:s=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"执行用时:",r),h.a.createElement("p",null,"执行结果:"),h.a.createElement("pre",null,g.Base64.decode(i)));break;case p.a.NOMATCH:s=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"输入:",h.a.createElement("pre",null,a)),h.a.createElement("p",null,"输出:",i&&g.Base64.decode(i)),h.a.createElement("p",null,"预期输出:",o&&g.Base64.decode(o)));break;case p.a.EXECUTEFAILURE:case p.a.COMPILEFAILURE:s=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"最后执行的输入:",h.a.createElement("pre",null,a)),h.a.createElement("p",null,"执行出错信息:"),h.a.createElement("pre",{className:"error"},g.Base64.decode(n)));break;case p.a.PODFAILURE:s=h.a.createElement("p",null,"创建pod失败,请稍后重试");break;case p.a.TIMEOUT:s=h.a.createElement("p",null,"评测超时,请稍后重试")}return h.a.createElement(h.a.Fragment,null," ",s," ")}(l))}return null}),[l]);return h.a.createElement("div",{className:"test-case-panel"},h.a.createElement("div",{className:"test-case-panel-body ".concat(T?"active":"")},h.a.createElement("ul",{className:"s-navs"},h.a.createElement("li",null,h.a.createElement("a",{className:"0"===O?"active":"",id:"0",onClick:A},"自定义测试用例")),h.a.createElement("li",null,h.a.createElement("a",{className:"1"===O?"active":"",id:"1",onClick:A},"代码执行结果"))),h.a.createElement("div",{className:"tab-panel-body ".concat("0"===O?"":"hide")},h.a.createElement(b,{placeholder:"请填写测试用例的输入值,点击“调试代码”",value:e,onChange:c})),h.a.createElement("div",{className:"tab-panel-body ".concat("1"===O?"":"hide")},n?h.a.createElement(m.a,{message:s}):l?h.a.createElement("section",{style:{height:200}}," ",L," "):h.a.createElement("p",{className:"tip"},"请填写测试用例的输入值,点击“调试代码”"))),h.a.createElement("a",{className:"btn-collapse ".concat(T?"up":""),onClick:function(){k({type:i.SET_VISIBLE,payload:!T})}},T?h.a.createElement(d.a,null):h.a.createElement(f.a,null)),h.a.createElement("footer",{className:"footer"},h.a.createElement("span",null,"控制台"),h.a.createElement("div",{className:"flex-container"},h.a.createElement(a.a,{className:"btn-green",type:"ghost",loading:n,onClick:function(){k({type:i.SET_VISIBLE,payload:!0}),k({type:i.SET_TABINDEX,payload:"1"}),v()}},"调试代码"),h.a.createElement(a.a,{type:"primary",loading:r,disabled:r,onClick:function(){k({type:i.SET_VISIBLE,payload:!1}),y()}},"评测并提交"))))}},LdHM: /*!********************************************************!*\ !*** ./node_modules/rc-select/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: Option, OptGroup, default */ /*! exports used: OptGroup, Option, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return E}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),g=n.n(p),m=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(t,e){var n=t.prefixCls,r=t.id,i=t.flattenOptions,a=t.childrenAsData,o=t.values,p=t.searchValue,y=t.multiple,b=t.defaultActiveFirstOption,x=t.height,S=t.itemHeight,C=t.notFoundContent,E=t.open,w=t.menuItemSelectedIcon,k=t.virtual,T=t.onSelect,O=t.onToggleOpen,A=t.onActiveValue,L=t.onScroll,D=t.onMouseEnter,R="".concat(n,"-item"),I=Object(f.a)((function(){return i}),[E,i],(function(t,e){return e[0]&&t[1]!==e[1]})),_=s.useRef(null),M=function(t){t.preventDefault()},N=function(t){_.current&&_.current.scrollTo({index:t})},P=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(t).map((function(t,n){if(!s.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,i=t.key,a=t.props,o=a.children,l=Object(c.a)(a,["children"]);return e||!r?T(t):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:O(o)})})).filter((function(t){return t}))}var A=n("2Qr1"),L=n("qNPg"),D=n("U8pU"),R=n("Kwbf"),I=n("WKfj");var _=function(t){var e=t.mode,n=t.options,r=t.children,i=t.backfill,a=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=n||O(r);if(Object(R.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(R.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(R.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(R.a)("combobox"===e||!i,"`backfill` only works with `combobox` mode."),Object(R.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(R.b)("combobox"!==e||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(R.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(R.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(I.d)(p);Object(R.a)(!f||S.every((function(t){return"object"===Object(D.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(R.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(k.a)(r).some((function(t){if(!s.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(k.a)(t.props.children).every((function(e){return!(s.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(R.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(R.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(L.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:O,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:_,fillOptionsWithMissingValue:A.a}),N=function(t){Object(a.a)(n,t);var e=Object(o.a)(n);function n(){var t;return Object(r.a)(this,n),(t=e.apply(this,arguments)).selectRef=s.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);N.Option=S,N.OptGroup=E;var P=N;e.c=P},M8RZ: /*!**********************************!*\ !*** ./src/components/modal.tsx ***! \**********************************/ /*! exports provided: default */ /*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(t){Object(a.a)(n,t);var e=Object(o.a)(n);function n(t){var i;Object(r.a)(this,n),i=e.call(this,t);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MFOe: /*!****************************************!*\ !*** ./node_modules/store/src/util.js ***! \****************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){(function(e){var n=Object.assign?Object.assign:function(t,e,n,r){for(var i=1;i=0;c-=1){(e.get(c)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!r(n)&&t.parent&&!l.has(t.parent.key))if(r(t.parent.node))l.add(e.key);else{var i=!0,s=!1;(e.children||[]).filter((function(t){return!r(t.node)})).forEach((function(t){var e=t.key,n=a.has(e);i&&!n&&(i=!1),s||!n&&!o.has(e)||(s=!0)})),i&&a.add(e.key),s&&o.add(e.key),l.add(e.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,h,s):function(t,e,n,r,a){for(var o=new Set(t),s=new Set(e),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(t){var e=t.key,n=t.node,r=t.children,i=void 0===r?[]:r;o.has(e)||s.has(e)||a(n)||i.filter((function(t){return!a(t.node)})).forEach((function(t){o.delete(t.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!a(n)&&t.parent&&!c.has(t.parent.key))if(a(t.parent.node))c.add(e.key);else{var r=!0,i=!1;(e.children||[]).filter((function(t){return!a(t.node)})).forEach((function(t){var e=t.key,n=o.has(e);r&&!n&&(r=!1),i||!n&&!s.has(e)||(i=!0)})),r||o.delete(e.key),i&&s.add(e.key),c.add(e.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,e.halfCheckedKeys,u,h,s)}},OJz4: /*!****************************************!*\ !*** ./src/pages/MyProblem/service.ts ***! \****************************************/ /*! exports provided: getProgrammingTopic, sumbitCode, debugCode, getSubmitRecords, getRecordDetail, getOperationResult, addNotes, resetCode, syncCode, updateCode, updateCostTime, triggerPlus */ /*! exports used: addNotes, debugCode, getOperationResult, getProgrammingTopic, getRecordDetail, getSubmitRecords, resetCode, sumbitCode, syncCode, triggerPlus, updateCode, updateCostTime */function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"h",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"f",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"g",(function(){return h})),n.d(e,"i",(function(){return d})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"j",(function(){return g}));var r=n(/*! @/utils/fetch.ts */"ErOA");function i(t){return Object(r.c)("myproblems/".concat(t,".json"),{hidePopLogin:!0})}function a(t,e){return Object(r.f)("myproblems/".concat(t,"/code_submit.json"),e)}function o(t,e){return Object(r.c)("myproblems/".concat(t,"/code_debug.json"),e)}function s(t,e){return Object(r.c)("myproblems/".concat(t,"/submit_records.json"),e)}function l(t){return Object(r.c)("myproblems/record_detail.json",{id:t})}function c(t,e){return Object(r.c)("myproblems/".concat(t,"/result.json"),{mode:e})}function u(t,e){return Object(r.f)("myproblems/".concat(t,"/add_notes.json"),e)}function h(t){return Object(r.f)("myproblems/".concat(t,"/restore_initial_code.json"))}function d(t){return Object(r.f)("myproblems/".concat(t,"/sync_code.json"))}function f(t,e){return Object(r.f)("myproblems/".concat(t,"/update_code.json"),e)}function p(t){return Object(r.f)("myproblems/".concat(t,"/cost_time.json"))}function g(t,e){return Object(r.f)("discusses/".concat(t,"/plus.json"),e)}},OLES: /*!*********************************************************!*\ !*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***! \*********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(t){var e=t.overlay,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof e?e():e)},u=Object(o.forwardRef)((function(t,e){var n=t.overlayClassName,u=t.trigger,h=void 0===u?["hover"]:u,d=t.mouseEnterDelay,f=void 0===d?0:d,p=t.mouseLeaveDelay,g=void 0===p?.1:p,m=t.overlayStyle,v=t.prefixCls,y=void 0===v?"rc-tooltip":v,b=t.children,x=t.onVisibleChange,S=t.afterVisibleChange,C=t.transitionName,E=t.animation,w=t.placement,k=void 0===w?"right":w,T=t.align,O=void 0===T?{}:T,A=t.destroyTooltipOnHide,L=void 0!==A&&A,D=t.defaultVisible,R=t.getTooltipContainer,I=t.overlayInnerStyle,_=Object(a.a)(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),M=Object(o.useRef)(null);Object(o.useImperativeHandle)(e,(function(){return M.current}));var N=Object(i.a)({},_);"visible"in t&&(N.popupVisible=t.visible);var P=!1,F=!1;if("boolean"==typeof L)P=L;else if(L&&"object"===Object(r.a)(L)){var j=L.keepParent;P=!0===j,F=!1===j}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var e=t.arrowContent,n=void 0===e?null:e,r=t.overlay,i=t.id;return[o.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:y,id:i,overlay:r,overlayInnerStyle:I})]},action:h,builtinPlacements:l.a,popupPlacement:k,ref:M,popupAlign:O,getPopupContainer:R,onPopupVisibleChange:x,afterPopupVisibleChange:S,popupTransitionName:C,popupAnimation:E,defaultPopupVisible:D,destroyPopupOnHide:P,autoDestroy:F,mouseLeaveDelay:g,popupStyle:m,mouseEnterDelay:f},N),b)}));e.a=u},OZM5: /*!*****************************************!*\ !*** ./node_modules/rc-tree/es/util.js ***! \*****************************************/ /*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ /*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"g",(function(){return h})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"e",(function(){return g})),n.d(e,"f",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(t,e){var n=t.slice(),r=n.indexOf(e);return r>=0&&n.splice(r,1),n}function s(t,e){var n=t.slice();return-1===n.indexOf(e)&&n.push(e),n}function l(t){return t.split("-")}function c(t,e){return"".concat(t,"-").concat(e)}function u(t){return t&&t.type&&t.type.isTreeNode}function h(t,e){var n=[t];return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){var r=e.key,i=e.children;n.push(r),t(i)}))}(e[t].children),n}function d(t,e){var n=t.clientY,r=e.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(t,e){if(t)return e.multiple?t.slice():t.length?[t[0]]:t}function p(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(t))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0}}return e}function g(t,e){var n=new Set;return(t||[]).forEach((function(t){!function t(r){if(!n.has(r)){var i=e[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&t(a.key)}}}(t)})),Object(r.a)(n)}function m(t){var e={};return Object.keys(t).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(e[n]=t[n])})),e}},Ot1p: /*!**************************************************************!*\ !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/qrcode.react/lib/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),g=n("bdgK"),m=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(t){var e=t.value,n=void 0===e?"":e,r=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=(n("Q9mQ"),n("diRs")),b=n("0Owb"),x=(n("dejd"),n("C+DQ"),n("D1Df")),S=n.n(x),C=n("1vsH"),E=n("m3rI"),w=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function k(t){var e=t.onActionCallback,n=t.title,r=t.icon,i=t.actionName,a=t.className,o=void 0===a?"":a,s=t.children;return d.a.createElement("a",{title:n,className:o,onClick:function(){e(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var T=function(t){var e=t.watch,n=t.showNullButton,r=t.onActionCallback,i=t.fullScreen,a=t.insertTemp,o=t.hidetoolBar,s=t.uuid,l=t.setOpenPhones,c=Object(C.E)("_educoder_session_login"),u=Object(C.E)("_educoder_session"),h=[].concat(w,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&h.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(k,Object(b.a)({},t,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",null,d.a.createElement(y.a,{title:"打开手机扫一扫",content:d.a.createElement("div",null,d.a.createElement("span",{style:{display:"none"}},"test----",location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(E.a.API_SERVER)),d.a.createElement(S.a,{size:150,fgColor:"#000",value:location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(E.a.API_SERVER)}))},d.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return l(!0)}},"手机上传文件"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},O=n("M8RZ"),A=(n("+L6B"),n("2/Rp")),L=(n("y8nQ"),n("Vl3Y")),D=(n("5NDa"),n("5rEg")),R={labelCol:{span:4},wrapperCol:{span:20}},I=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(L.a,Object(b.a)({},R,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(L.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(D.a,null)),d.a.createElement(L.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(D.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))},_=n("7ahc"),M=n("k1fw"),N=(n("HmJG"),n("BjJ7")),P=L.a.useForm,F={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},B=function(t){var e=t.callback,n=t.onCancel,r=P(),i=Object(s.a)(r,1)[0],a=Object(h.useRef)();function o(t,e){i.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(L.a,Object(b.a)({form:i},j,{className:"upload-image-panel",onFinish:function(t){e(Object(M.a)(Object(M.a)({},t),{},{name:a.current}))}}),d.a.createElement(L.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(L.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(D.a,{style:F})),d.a.createElement(U,{onFileChange:function(t){var e=t.target.files[0];a.current=e.name,H(e,o)}}))),d.a.createElement(L.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(D.a,{style:{width:264}})),d.a.createElement(L.a.Item,{style:{textAlign:"right"}},d.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))};function U(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function H(t,e){if(!t)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",t),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){e(JSON.parse(n.target.responseText),t)}),!1),r.addEventListener("error",(function(t){console.error(t)}),!1),r.open("POST","".concat(N.a,"/api/attachments.json")),r.send(n)}n("giR+");var G,z,W=n("fyUT"),V=(n("7Kak"),n("9yH6")),K=V.a.Group,q={margin:"0 8px"},Y=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(L.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:q},"单元格数:"),d.a.createElement("span",{style:q},"行数"),d.a.createElement(L.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(W.a,null)),d.a.createElement("span",{style:q},"列数"),d.a.createElement(L.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(W.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:q},"对齐方式:"),d.a.createElement(L.a.Item,{name:"align"},d.a.createElement(K,null,d.a.createElement(V.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(V.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(V.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(V.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))},X=n("ErOA"),$=n("7Cbv"),J="------------",Z={default:J,left:":".concat(J),center:":".concat(J,":"),right:"".concat(J,":")},Q=n("9VGf");function tt(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var et=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",nt=["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"],rt=(G={},Object(l.a)(G,et+"-B","bold"),Object(l.a)(G,et+"-I","italic"),G),it=(z={},Object(l.a)(z,"link","添加链接"),Object(l.a)(z,"code-block","添加代码块"),Object(l.a)(z,"upload-image","添加文件"),Object(l.a)(z,"add-table","添加表格"),z);e.a=function(t){var e=t.defaultValue,n=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,x=void 0===b?400:b,S=t.miniToolbar,C=void 0!==S&&S,w=t.isFocus,k=void 0!==w&&w,A=t.watch,L=t.insertTemp,D=t.mode,R=void 0===D?"markdown":D,M=t.id,N=void 0===M?"markdown-editor-id":M,P=t.showResizeBar,F=void 0!==P&&P,j=t.noStorage,U=void 0!==j&&j,G=t.showNullButton,z=void 0!==G&&G,W=t.hidetoolBar,V=void 0!==W&&W,K=t.fullScreen,q=void 0!==K&&K,J=t.onBlur,et=t.onCMBeforeChange,at=t.onFullScreen,ot=t.className,st=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(s.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(n),bt=Object(s.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),Et=Object(s.a)(Ct,2),wt=Et[0],kt=Et[1],Tt=Object(h.useState)(q),Ot=Object(s.a)(Tt,2),At=Ot[0],Lt=Ot[1],Dt=Object(h.useState)(""),Rt=Object(s.a)(Dt,2),It=Rt[0],_t=Rt[1],Mt=Object(h.useState)(0),Nt=Object(s.a)(Mt,2),Pt=Nt[0],Ft=Nt[1],jt=Object(h.useState)(x),Bt=Object(s.a)(jt,2),Ut=Bt[0],Ht=Bt[1],Gt=Object(h.useState)(!1),zt=Object(s.a)(Gt,2),Wt=(zt[0],zt[1]),Vt=Object(h.useRef)(Object($.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Jt=Object(h.useRef)(),Zt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(X.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vt.current}});case 2:null!=(n=t.sent)&&null!==(e=n.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),n.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('
    ').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==at||at(At)}),[At]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:R,lineNumbers:!C,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,n){if(!ct){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==R)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();H(c,(function(e){var n,r,i;e.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):nt.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return k&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,n){var r;if(Xt.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(e){var n=r[e],i=n.name.split(".").pop();H(n,(function(e){var r,a,o;e.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(n.name,"")):nt.includes(i)?t.replaceSelection('').concat(n.name,"")):t.replaceSelection("[".concat(n.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&(Qt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Qt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=r[n],i=(a=Object(s.a)(e,2))[0],o=a[1],c=Object(l.a)({},i,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},n=0,r=Object.entries(rt);n0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(N);t>=Pt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(N,xt),Wt(!0))}}),1e4),Object(h.useEffect)((function(){kt(A)}),[mt,A]),Object(h.useEffect)((function(){mt&&k&&mt.focus()}),[mt,k]),Object(h.useEffect)((function(){if(wt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Jt.current){var n=e.scrollTop/e.scrollHeight;Jt.current.scrollTop=Jt.current.scrollHeight*n}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,wt]),Object(h.useEffect)((function(){if(mt&&et){function t(t,e){et(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,et]),Object(h.useEffect)((function(){if(mt&&J){function t(){J(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,J]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==n?(mt.setValue(""),St("")):n!==mt.getValue()&&(mt.setValue(n),St(n),mt.setCursor(mt.lineCount(),0)))}),[mt,n]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),n=mt.getSelection(),r=n.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+n+"**"),""===n&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+n+"*"),""===n&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+n+"`"),""===n&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+n+"$$`"),""===n&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+n+"\n```"),mt.setCursor(e.line+1,n.length+1),mt.focus();case"line-break":return mt.replaceSelection("
    \n"),mt.focus();case"list-ul":return""===n?mt.replaceSelection("- "+n):mt.replaceSelection(r.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===n?mt.replaceSelection("1. "+n):mt.replaceSelection(r.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===n&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===n&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return kt(!wt),mt.focus();case"trigger-full-screen":return Lt(!At),mt.focus();case"link":return void _t("link");case"code-block":return void _t("code-block");case"upload-image":return void _t("upload-image");case"add-table":return void _t("add-table");default:throw new Error}}),[mt,wt,At]),ee=Object(h.useCallback)((function(t){switch(_t(""),It){case"link":var e=t.title,n=t.link;return mt.replaceSelection("[".concat(e,"](").concat(n,")")),mt.focus();case"code-block":var r=t.language,i=t.content;return mt.replaceSelection(["```"+r,i,"```"].join("\n")),mt.focus();case"upload-image":var a=t.src,o=t.alt,s=t.name;return a.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(s,"")):mt.replaceSelection('').concat(s,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(r=300),Ht(x+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(x)}),[x]);var ie={width:tt(y),height:tt(Ut)};Object(h.useMemo)((function(){if(Pt){var t=new Date(Pt),e=t.getHours(),n=t.getMinutes(),r=t.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(r)}return 0}),[Pt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(st," ").concat(wt?"on-preview":""," ").concat(C?"mini":""," ").concat(At?"full-screen":""),style:ie},d.a.createElement(T,{insertTemp:L,watch:wt,fullScreen:At,showNullButton:z,onActionCallback:te,hidetoolBar:V,uuid:Vt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),wt?d.a.createElement("div",{ref:Jt,className:"preview-container"},"stex"===R&&d.a.createElement(v,{value:xt}),"stex"!==R&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var n=mt.getValue();n=n.replace(t,e),St(n),null==mt||mt.setValue(n)}})):null))),F?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(O.a,null,it[It]?d.a.createElement(r.a,{centered:!0,title:it[It],visible:!0,onCancel:re,footer:null},ne):null))}},PD8m: /*!******************************************************!*\ !*** ./node_modules/store/storages/memoryStorage.js ***! \******************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports={name:"memoryStorage",read:function(t){return n[t]},write:function(t,e){n[t]=e},each:function(t){for(var e in n)n.hasOwnProperty(e)&&t(n[e],e)},remove:function(t){delete n[t]},clearAll:function(t){n={}}};var n={}},QUZ3: /*!***************************************************!*\ !*** ./src/pages/MyProblem/index.tsx + 9 modules ***! \***************************************************/ /*! exports provided: default */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CopyOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/FormOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PoweroffOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/LeftPanel/Description/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/LeftPanel/Discuss/discuss-input-editor/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/LeftPanel/SubmitList/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/LeftPanel/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problems/OjForm/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/SplitContainer/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/TestCasePanel/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/interface.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/MyProblem/service.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problems/OjForm/CodePanel/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/left-panel/discuss/discuss-editor/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fullscreen.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/code-repository/action-bar/notice.gif (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/statistic/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/statistic/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/js-base64/base64.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.r(e);var r=n("0Owb"),i=n("PpiC"),a=(n("T2oS"),n("W9HT")),o=(n("+L6B"),n("2/Rp")),s=(n("2qtc"),n("kLXV")),l=n("9og8"),c=n("tJVT"),u=n("k1fw"),h=(n("aHsQ"),n("sGsY")),d=n("WmNS"),f=n.n(d),p=n("q1tI"),g=n.n(p),m=n("Fvcw"),v=n("GIiI"),y=n("Ty5D"),b=n("55Ip"),x=n("OJz4"),S=n("V0Rq"),C=n("bntm"),E=n("cDPC"),w=n("m3rI"),k=n("RCxd"),T=n("EHPI"),O=n("S+dL"),A=n.n(O),L=n("J66h"),D=n("uMZB"),R=n.n(D),I=(n("p/48"),n("JPnl")),_=(n("y8nQ"),n("Vl3Y")),M=(n("5NDa"),n("5rEg").a.TextArea),N=function(t){var e=t.callback,n=t.onCancel,r=t.notes;return g.a.createElement(_.a,{className:"note-form-panel",onFinish:function(t){e(t)},initialValues:{notes:r}},g.a.createElement(_.a.Item,{name:"notes",rules:[{required:!0,message:"请输入笔记内容"},{max:5e3,message:"笔记最大字数为".concat(5e3)}]},g.a.createElement(M,{placeholder:"请输入笔记内容",rows:5})),g.a.createElement(_.a.Item,{style:{textAlign:"right"}},g.a.createElement(o.a,{type:"ghost",onClick:n,style:{marginRight:10}}," 取消 "),g.a.createElement(o.a,{type:"primary",htmlType:"submit"}," 提交 ")))},P=n("H2Ag"),F=n.n(P),j=(n("DjyN"),n("NUBc")),B=(n("miYZ"),n("tsqr")),U=(n("g9YV"),n("wCAj")),H=n("+k/U"),G=n.n(H),z=n("ye1Q"),W=n("lfch"),V=n("JB8y"),K=n("1vsH"),q=n("wd/R"),Y=n.n(q),X=U.a.Column,$=function(t){var e=t.submitResult,n=t.submitting,r=t.submitRecords,i=t.page,o=t.onPageChange,s=t.topicId,l=e||{},c=l.status,u=l.id,h=l.input,d=l.output,f=l.expected_output,p=l.is_file,m=l.input_file_url,v=l.output_file_url,y=l.expected_output_file_url,x=l.error_msg,S=r||{},C=S.records,E=S.records_count;return g.a.createElement(a.a,{spinning:n,tip:"评测中...",indicator:g.a.createElement(z.a,{style:{fontSize:24},spin:!0})},u?g.a.createElement(g.a.Fragment,null,g.a.createElement("ul",{className:G.a.info},g.a.createElement("li",null,"执行结果:",g.a.createElement("span",{className:c===V.a.OK?"c-green":"c-red"},I.a[c])),g.a.createElement("li",{className:G.a.error},g.a.createElement("a",{onClick:function(){p?navigator.clipboard.writeText(L.Base64.decode(x)).then((function(){B.b.success("复制错误信息成功")})):navigator.clipboard.writeText(L.Base64.decode(d)).then((function(){B.b.success("复制错误信息成功")}))}},"复制错误信息 ",g.a.createElement(W.a,null)," ")),g.a.createElement("li",null,g.a.createElement(b.a,{to:"/myproblems/".concat(s,"/record-detail/").concat(u)},"显示详情 >"," "))),c!==V.a.OK?g.a.createElement(g.a.Fragment,null,g.a.createElement("p",{className:"c-red"},"实际输入:"),g.a.createElement("pre",null,!p&&h,p&&g.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(K.w)(m,h)}},h)),g.a.createElement("p",{className:"c-red"},"实际输出:"),g.a.createElement("pre",null,(4===c||5===c)&&L.Base64.decode(x),4!=c&&5!=c&&(p?g.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(K.w)(v,d)}},d):L.Base64.decode(d))),g.a.createElement("p",{className:"c-red"},"预期输出:"),g.a.createElement("pre",null,!p&&L.Base64.decode(f),p&&g.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(K.w)(y,f)}},f))):null):null,(null==C?void 0:C.length)>0?g.a.createElement(U.a,{dataSource:C,rowKey:"id",pagination:!1},g.a.createElement(X,{title:"提交时间",dataIndex:"created_at",key:"created_at",render:function(t,e){return g.a.createElement("span",null," ",Y()(t).format("YYYY-MM-DD HH:mm:ss"))}}),g.a.createElement(X,{title:"提交结果",dataIndex:"status",key:"status",render:function(t,e){var n;return g.a.createElement(b.a,{className:0===t?"c-green":"c-red",to:"/myproblems/".concat(s,"/record-detail/").concat(e.id)},null===(n=I.a[t])||void 0===n?void 0:n.replace("调试","评测"))}}),g.a.createElement(X,{title:"执行用时 (S)",dataIndex:"execute_time",key:"execute_time"}),g.a.createElement(X,{title:"内存消耗(MB)",dataIndex:"execute_memory",key:"execute_memory"}),g.a.createElement(X,{title:"语言",dataIndex:"language",key:"language"}),g.a.createElement(X,{title:"操作",dataIndex:"status",key:"status",render:function(t,e){return g.a.createElement(b.a,{className:"c-light-primary",to:"/myproblems/".concat(s,"/record-detail/").concat(e.id)},"查看")}})):g.a.createElement("div",{style:{height:300,width:"100%"}}),E>15?g.a.createElement(j.a,{className:G.a.pagination,current:i,pageSize:15,total:E,onChange:o}):null)},J=n("BdwD"),Z=(n("DYRE"),n("zeV3")),Q=(n("+BJd"),n("mr32")),tt=n("pPuO"),et=n.n(tt),nt=n("9Bee"),rt={1:{name:"简单",color:"#52c41a"},2:{name:"中等",color:"#faad14"},3:{name:"困难",color:"#f5222d"}},it=function(t){var e=t.hack,n=(t.onTriggerPraise,t.toDiscuss),r=e.language,i=e.difficult,a=e.time_limit,o=(e.username,e.user_path,e.user_praise,e.comments_count),s=(e.praises_count,e.description),l=e.pass_count,c=e.submit_count,u=Object(y.h)(),h=rt[i];return g.a.createElement(g.a.Fragment,null,g.a.createElement("ul",{className:et.a.info},g.a.createElement("li",null,"编程语:",g.a.createElement("b",null,r)),g.a.createElement("li",null,"难度:",g.a.createElement(Q.a,{color:h.color},h.name)),g.a.createElement("li",null,"评测时长限制:",g.a.createElement("b",null,a,"秒"))),g.a.createElement(nt.a,{value:s,className:et.a.desc}),g.a.createElement("ul",{className:et.a["commit-info"]},g.a.createElement("li",null,g.a.createElement(Z.a,{size:4},g.a.createElement("span",null,"通过次数")," ",g.a.createElement("b",null,l))),g.a.createElement("li",null,g.a.createElement(Z.a,{size:4},g.a.createElement("span",null,"提交次数")," ",g.a.createElement("b",null,c))," "),g.a.createElement("li",{style:{flex:"1 0 0"}}),"exercises"!==u.query.type&&g.a.createElement("li",null,g.a.createElement(Z.a,{size:4},g.a.createElement("i",{className:"iconfont icon-huifu1",onClick:n})," ",g.a.createElement("b",null,o))," ")))},at=n("dhSg"),ot=n("oBTY"),st=n("M8RZ"),lt=(n("qJ4+"),n("ErOA"));function ct(t,e){return Object(lt.c)("/problems/".concat(t,"/comments.json?page=").concat(e,"&limit=10"))}function ut(t){return Object(lt.f)("/discusses/".concat(t,"/plus.json"),{container_type:"Discuss",type:1})}function ht(t,e,n){return Object(lt.f)("/problems/".concat(t,"/comments/reply.json"),{comments:{content:n,parent_id:e}})}function dt(t,e){return Object(lt.f)("/problems/".concat(t,"/comments.json"),{comments:{content:e}})}function ft(t,e,n){return Object(lt.f)("/problems/".concat(t,"/comments/").concat(e,"/hidden.json"),n)}function pt(t,e){return Object(lt.b)("/problems/".concat(t,"/comments/").concat(e))}n("U7T7");var gt=n("AMnG");function mt(t){var e=t.author;return g.a.createElement("a",{href:"/users/".concat(e.login),target:"_blank"},g.a.createElement("img",{alt:"用户头像",height:"50",style:{borderRadius:"50%"},src:"".concat(w.a.IMG_SERVER,"/images/").concat(e.image_url),width:"50"}))}function vt(t){var e=t.data,n=t.index,r=t.parentDiscussIndex,i=t.user,a=t.onSetActionType,o=e.author,s=e.can_delete,l=e.content,c=e.id,u=e.time;var h=i.admin||s||o.user_id===i.user_id;return g.a.createElement("div",{className:"discuss-item-container second-discuss "},g.a.createElement(mt,{author:o}),g.a.createElement("section",null,g.a.createElement("div",{className:"discuss-info"},g.a.createElement("a",{href:"/users/".concat(o.login),target:"_blank"},o.name),g.a.createElement("span",{className:"grey"},u),g.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},h?g.a.createElement("a",{onClick:function(){a({id:c,index:n,type:"delete-discuss",parentDiscussIndex:r,message:"确定要删除该条回复吗"})},title:"删除"},g.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),g.a.createElement(nt.a,{className:"discuss-content",value:l})))}var yt,bt=function(t){var e=t.user,n=t.data,r=t.index,i=t.onPlusDiscuss,a=t.onSetActionType,o=t.activeDiscussIndex,s=t.onReplyDiscuss,l=t.onSetActiveDiscussIndex,c=n.content,u=n.children,h=n.hidden,d=n.id,f=n.praise_count,p=n.time,m=n.user_praise,v=n.can_delete,y=n.author;var b=e.admin||e.user_id===y.user_id;return g.a.createElement("div",{className:"discuss-item-container",key:d},g.a.createElement(mt,{author:y}),g.a.createElement("section",null,g.a.createElement("div",{className:"discuss-info"},g.a.createElement("a",{href:"/users/".concat(y.login),target:"_blank"}," ",y.name," "),g.a.createElement("span",{className:"grey"},p)),g.a.createElement(nt.a,{className:"discuss-content",value:c}),u&&u.length>0?g.a.createElement("div",{className:"reply-discuss-container"},u.map((function(t,n){return g.a.createElement(vt,{key:t.id,data:t,index:n,user:e,onSetActionType:a,parentDiscussIndex:r})}))):null,g.a.createElement("div",{className:"btn-group"},b?g.a.createElement("a",{onClick:function(){a({id:d,index:r,params:{hidden:h?"0":"1"},type:"hidden-discuss",message:h?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:h?"取消隐藏":"隐藏评论"},g.a.createElement("i",{className:h?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,!v||u&&0!=u.length?null:g.a.createElement("a",{onClick:function(){a({id:d,index:r,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除"},g.a.createElement("i",{className:"iconfont icon-shanchu"})),g.a.createElement("a",{onClick:function(){l(d)},title:"回复"}," ",g.a.createElement("i",{className:"iconfont icon-huifu1"})," "),g.a.createElement("a",{onClick:function(){i(d,!m,r)},className:m?"c-orange":""},g.a.createElement("i",{className:m?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),g.a.createElement("span",null,f||""))),g.a.createElement(gt.a,{id:d,activeDiscussIndex:o,onReplyDiscuss:s})))},xt=n("kaH+"),St=n("uD2n"),Ct=n.n(St),Et=n("Ot1p"),wt=function(t){var e=t.user_praise,n=t.praise_count,r=t.praisePlus,i=t.onCreateDiscuss,a=t.discuss_count,o=Object(p.useState)(!1),s=Object(c.a)(o,2),u=s[0],h=s[1],d=Object(p.useState)(""),m=Object(c.a)(d,2),v=m[0],y=m[1];function b(){h(!1)}function x(){return(x=Object(l.a)(f.a.mark((function t(){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i(v),y(""),h(!1);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return g.a.createElement("div",{className:"".concat(Ct.a["dis-input-editor-container"]," ").concat(u?Ct.a.active:""," ")},g.a.createElement("div",{className:u?"hide ".concat(Ct.a["text-area"]):Ct.a["text-area"]},g.a.createElement("input",{placeholder:"说点什么",onClick:function(){h(!0)}}),g.a.createElement("a",null," ",g.a.createElement("i",{className:"iconfont icon-huifu1"}),"    ",a," "),g.a.createElement("a",{className:"c-light-black",onClick:r,title:e?"取消点赞":"点赞"},g.a.createElement("i",{className:"mr3 ".concat(e?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),n?g.a.createElement("span",null,n):"")),u?g.a.createElement("div",{className:Ct.a["input-mask"],onClick:b}):null,g.a.createElement("div",{className:u?Ct.a["md-container"]:"".concat(Ct.a["md-container"]," hide")},g.a.createElement(Et.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:v,height:240,onChange:function(t){y(t)}}),g.a.createElement("div",{className:Ct.a["tip-container"],onClick:b},g.a.createElement("a",{className:Ct.a["btn-send"],onClick:function(){return x.apply(this,arguments)}}," 发送 "))))},kt={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};function Tt(t,e){switch(e.type){case yt.SHOW_DISCUSSES_LOADING:return Object(u.a)(Object(u.a)({},t),{},{loading:!0});case yt.GET_DISCUSSES:case yt.TOP_OR_DOWN_DISCUSS:case yt.SET_ACTION_TYPE:case yt.PLUS_DISCUSS:return Object(u.a)(Object(u.a)({},t),e.payload);case yt.SET_PAGE:return Object(u.a)(Object(u.a)({},t),{},{page:e.payload});case yt.ACTIVE_DISCUSS_INDEX:return Object(u.a)(Object(u.a)({},t),e.payload);default:throw new Error}}!function(t){t[t.GET_DISCUSSES=0]="GET_DISCUSSES",t[t.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",t[t.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",t[t.PLUS_DISCUSS=3]="PLUS_DISCUSS",t[t.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",t[t.SET_PAGE=5]="SET_PAGE",t[t.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"}(yt||(yt={}));var Ot,At=function(t){var e=t.user,n=t.identifier,r=t.hack,i=t.onTriggerPraise,a=Object(p.useReducer)(Tt,kt),o=Object(c.a)(a,2),u=o[0],h=o[1],d=(u.loading,u.page),m=u.data,v=u.count,y=u.actionType,b=u.activeDiscussIndex,x=Object(p.useCallback)(Object(l.a)(f.a.mark((function t(){var e,r,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h({type:yt.SHOW_DISCUSSES_LOADING}),t.next=3,ct(n,d);case 3:e=t.sent,r=e.comments,i=e.disscuss_count,h({type:yt.GET_DISCUSSES,payload:{data:r,count:i,loading:!1}});case 6:case"end":return t.stop()}}),t)}))),[d,n]);function S(t){h({type:yt.SET_ACTION_TYPE,payload:{actionType:t}})}function C(t){h(b===t?{type:yt.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}:{type:yt.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:t}})}function E(t,e,n){return w.apply(this,arguments)}function w(){return(w=Object(l.a)(f.a.mark((function t(e,n,r){var i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ut(e);case 3:i=t.sent,m[r].user_praise=n,m[r].praise_count=i.praise_count,h({type:yt.PLUS_DISCUSS,payload:{data:Object(ot.a)(m)}}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function k(){return(k=Object(l.a)(f.a.mark((function t(){var e,r,i,a,o,s,l,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=y.id,r=y.params,i=y.type,a=y.index,o=y.parentDiscussIndex,"hidden-discuss"!==i){t.next=6;break}return t.next=4,ft(n,e,r);case 4:o?m[o].children[a].hidden=1==r.hidden:m[a].hidden=1==r.hidden,h({type:yt.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ot.a)(m)}});case 6:if("delete-discuss"!==i){t.next=31;break}return t.next=9,pt(n,e);case 9:if(!o&&0!==o){t.next=22;break}s=m[o].children,l=s.length-1;case 12:if(!(l>=0)){t.next=19;break}if(s[l].id!==e){t.next=16;break}return s.splice(l,1),t.abrupt("break",19);case 16:l--,t.next=12;break;case 19:m[o].children=s,t.next=30;break;case 22:c=m.length-1;case 23:if(!(c>=0)){t.next=30;break}if(m[c].id!==e){t.next=27;break}return m.splice(c,1),t.abrupt("break",30);case 27:c--,t.next=23;break;case 30:h({type:yt.SET_ACTION_TYPE,payload:{actionType:null,data:Object(ot.a)(m)}});case 31:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t,e){return O.apply(this,arguments)}function O(){return(O=Object(l.a)(f.a.mark((function t(e,r){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ht(n,e,r);case 3:x(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function A(){return(A=Object(l.a)(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h({type:yt.SHOW_DISCUSSES_LOADING}),t.next=3,dt(n,e);case 3:x();case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Object(p.useEffect)((function(){x()}),[n,d]),g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{className:"discuss-panel"},0===m.length?g.a.createElement(J.a,null):m.map((function(t,n){return g.a.createElement(bt,{onReplyDiscuss:T,onPlusDiscuss:E,onSetActiveDiscussIndex:C,onSetActionType:S,data:t,index:n,user:e,activeDiscussIndex:b})})),v>10?g.a.createElement("div",{className:"pagination-container"},g.a.createElement(j.a,{showQuickJumper:!0,onChange:function(t){h({type:yt.SET_PAGE,page:t})},current:d,total:v})):null),g.a.createElement(wt,{user_praise:r.user_praise,praise_count:r.praises_count,praisePlus:i,discuss_count:r.comments_count,onCreateDiscuss:function(t){return A.apply(this,arguments)}}),g.a.createElement(st.a,null,g.a.createElement(s.a,{centered:!0,title:"提示",visible:!!y,onOk:function(){return k.apply(this,arguments)},onCancel:function(){h({type:yt.SET_ACTION_TYPE,payload:{actionType:null}})}},g.a.createElement("p",null,y?y.message:"")),g.a.createElement(xt.a,null)))},Lt=function(t){var e=t.hack;return g.a.createElement("div",{style:{padding:20}},g.a.createElement("div",{className:"font16 c-grey-333"},"样例代码:"),g.a.createElement(nt.a,{hasMask:!0,value:null==e?void 0:e.standard_answer,zoomImg:!0}))},Dt=function(t){var e=t.hack,n=t.onTriggerPraise,r=t.topicId,i=t.page,a=t.onPageChange,o=t.user,s=t.submitRecords,l=t.submitting,u=t.submitResult,h=Object(p.useState)("0"),d=Object(c.a)(h,2),f=d[0],m=d[1],v=Object(y.h)();function b(t){var e=t.target.id;m(e)}return Object(p.useEffect)((function(){return at.a.subscribe("to-commit-info",(function(){m("1")}))}),[]),console.log(s,"submitRecords"),g.a.createElement("div",{className:F.a["left-panel"]},g.a.createElement("ul",{className:"".concat(F.a["s-navs"],' "bg-white"')},g.a.createElement("li",null,g.a.createElement("a",{className:"0"===f?F.a.active:"",id:"0",onClick:b},"任务描述")),g.a.createElement("li",null,g.a.createElement("a",{className:"1"===f?F.a.active:"",id:"1",onClick:b},"提交记录")),"exercises"!==v.query.type&&g.a.createElement("li",null,g.a.createElement("a",{className:"2"===f?F.a.active:"",id:"2",onClick:b},"评论")),g.a.createElement("li",null,g.a.createElement("a",{className:"3"===f?F.a.active:"",id:"3",onClick:b},"样例代码"))),g.a.createElement("div",{className:"".concat(F.a["tab-panel-body"]," ").concat("0"===f?"":"hide")},g.a.createElement(it,{hack:e,onTriggerPraise:n,toDiscuss:function(){m("2")}})),g.a.createElement("div",{className:"".concat(F.a["tab-panel-body"]," ").concat("1"===f?"":"hide")},null!=s&&s.records_count||l?g.a.createElement($,{page:i,onPageChange:a,topicId:r,submitting:l,submitRecords:s,submitResult:u}):g.a.createElement(J.a,null)),g.a.createElement("div",{className:"".concat(F.a["tab-panel-body"]," ").concat("2"===f?"":"hide"),style:{padding:0}},g.a.createElement(At,{user:o,identifier:e.identifier,hack:e,onTriggerPraise:n})),g.a.createElement("div",{className:"".concat(F.a["tab-panel-body"]," ").concat("3"===f?"":"hide"),style:{padding:0}},g.a.createElement(Lt,{hack:e})))},Rt=h.a.Countdown,It={Java:"java",C:"c",Python:"py","C++":"c"};function _t(){return(new Date).getTime()}!function(t){t[t.SET_LOADING=0]="SET_LOADING",t[t.GET_DATA=1]="GET_DATA",t[t.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",t[t.SET_DATA=3]="SET_DATA",t[t.SET_DEBUGING=4]="SET_DEBUGING",t[t.SET_SUBMITING=5]="SET_SUBMITING",t[t.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",t[t.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",t[t.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",t[t.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",t[t.SET_PAGE=10]="SET_PAGE"}(Ot||(Ot={}));var Mt={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function Nt(t,e){switch(e.type){case Ot.GET_DATA:return Object(u.a)(Object(u.a)({},t),e.payload);case Ot.SET_DATA:return Object(u.a)(Object(u.a)({},t),{},{data:e.payload});case Ot.SET_LOADING:return Object(u.a)(Object(u.a)({},t),{},{loading:e.payload});case Ot.SET_SHOW_NOTE:return Object(u.a)(Object(u.a)({},t),{},{showNote:e.payload});case Ot.SET_DEBUGING:return Object(u.a)(Object(u.a)({},t),{},{debuging:e.payload});case Ot.SET_SUBMITING:return Object(u.a)(Object(u.a)({},t),{},{submitting:e.payload});case Ot.GET_SUBMIT_RECORDS:return Object(u.a)(Object(u.a)({},t),{},{submitRecords:e.payload});case Ot.SET_PAGE:return Object(u.a)(Object(u.a)({},t),{},{submitRecordPage:e.payload});case Ot.SET_EXECUTE_MESSAGE:return Object(u.a)(Object(u.a)({},t),{},{executingMessage:e.payload});case Ot.SET_EXECUTE_RESULT:case Ot.SET_SUBMIT_RESULT:return Object(u.a)(Object(u.a)({},t),e.payload);default:throw new Error}}e.default=function(t){t.children;var e,n,r,i=Object(p.useReducer)(Nt,Mt),h=Object(c.a)(i,2),d=h[0],k=h[1],T=Object(y.i)().id,O=Object(y.g)(),A=Object(y.h)(),D=d.loading,I=d.data,_=d.debugResult,M=d.submitResult,N=d.submitRecords,P=d.submitRecordPage,F=d.showNote,j=d.debuging,B=d.submitting,U=d.executingMessage,H=Object(p.useState)("#FFF"),G=Object(c.a)(H,2),z=G[0],W=G[1],V=Object(p.useState)(null),K=Object(c.a)(V,2),q=K[0],Y=K[1],X=Object(p.useState)({}),$=Object(c.a)(X,2),J=$[0],Z=$[1],Q=Object(p.useState)(!0),tt=Object(c.a)(Q,2),et=tt[0],nt=tt[1],rt=null==I?void 0:I.user,it=null==I?void 0:I.hack;Object(p.useEffect)((function(){function t(){return(t=Object(l.a)(f.a.mark((function t(){var e,n,r,i,a,o,s,l,c,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return nt(!0),t.next=3,Object(x.d)(T);case 3:if(e=t.sent,setTimeout((function(){nt(!1)}),800),401===e.status?document.location.href="/user/login":(e.hack.code=L.Base64.decode(e.hack.code),k({type:Ot.GET_DATA,payload:{loading:!1,data:e}})),"exercises"!==A.query.type){t.next=18;break}if("coursesId"!=A.query.coursesId){t.next=13;break}return t.next=10,Object(S.X)({categoryId:A.query.exercisesId,login:A.query.login});case 10:a=t.sent,t.next=16;break;case 13:return t.next=15,Object(S.y)({categoryId:A.query.exercisesId,login:A.query.login});case 15:a=t.sent;case 16:Z(Object(u.a)({},a)),null!==(n=a)&&void 0!==n&&n.left_banner_id&&null!==(r=a)&&void 0!==r&&null!==(i=r.exercise)&&void 0!==i&&i.left_time&&(Y(Date.now()+1e3*(null===(o=a)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.left_time)),setTimeout((function(){W("red")}),1e3*((null===(l=a)||void 0===l||null===(c=l.exercise)||void 0===c?void 0:c.left_time)-300>0?(null===(h=a)||void 0===h||null===(d=h.exercise)||void 0===d?void 0:d.left_time)-300:0)));case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}T&&function(){t.apply(this,arguments)}()}),[T]),Object(p.useEffect)((function(){return function(){st.apply(this,arguments)}(),"exercises"===A.query.type&&(document.addEventListener(Object(C.c)(),ot),window.focus(),window.onblur=function(){Object(C.a)()&&Object(C.b)()}),function(){document.removeEventListener(Object(C.c)(),ot)}}),[T,P]);var ot=function(){window.parent.postMessage("backExercise","*")};function st(){return(st=Object(l.a)(f.a.mark((function t(){var e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(x.f)(T,{limit:15,page:P});case 3:e=t.sent,k({type:Ot.GET_SUBMIT_RECORDS,payload:e}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}function lt(){return ct.apply(this,arguments)}function ct(){return(ct=Object(l.a)(f.a.mark((function t(){var e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.k)(T,{code:L.Base64.encode(it.code)});case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ut(){return(ut=Object(l.a)(f.a.mark((function t(){var e,n,r,i,a,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!B){t.next=2;break}return t.abrupt("return");case 2:return k({type:Ot.SET_SUBMITING,payload:!0}),t.prev=3,t.next=6,Object(x.l)(T);case 6:return at.a.publish("to-commit-info"),t.next=9,lt();case 9:if(e=t.sent,console.log(e,1),0!==e.status){t.next=25;break}return o=function(){return(o=Object(l.a)(f.a.mark((function t(){var e,n,o,l,c,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.c)(T,"submit");case 2:if(e=t.sent,n=e.status,o=e.data,l=_t(),c=l-i>1e3*(r+3),0===n||c||setTimeout(a,1e3),!c){t.next=12;break}return s.a.error({centered:!0,okText:"知道啦",content:"评测代码超时"}),k({type:Ot.SET_SUBMITING,payload:!1}),t.abrupt("return");case 12:if(0!==n){t.next=18;break}return 2===o.status&&s.a.error({centered:!0,okText:"知道啦",content:"评测代码超时"}),t.next=16,Object(x.f)(T,{limit:15,page:P});case 16:h=t.sent,k({type:Ot.SET_SUBMIT_RESULT,payload:Object(u.a)(Object(u.a)({},d),{},{submitResult:o,submitting:!1,submitRecords:h})});case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)},a=function(){return o.apply(this,arguments)},n={},"exercises"===A.query.type&&(n.extras={exercise_id:A.query.exercisesId,question_id:A.query.questionId}),t.next=18,Object(x.h)(T,n);case 18:if(-1!==t.sent.status){t.next=22;break}return window.parent.location.href="/classrooms/".concat(A.query.coursesId,"/exercise/").concat(A.query.exercisesId,"/detail"),t.abrupt("return");case 22:r=it.time_limit,i=_t(),a();case 25:t.next=31;break;case 27:t.prev=27,t.t0=t.catch(3),console.log(t.t0),k({type:Ot.SET_SUBMITING,payload:!1});case 31:case"end":return t.stop()}}),t,null,[[3,27]])})))).apply(this,arguments)}function ht(){return(ht=Object(l.a)(f.a.mark((function t(){var e,n,r,i,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d.debuging=!0,k({type:Ot.SET_DEBUGING,payload:!0}),t.prev=2,t.next=5,lt();case 5:if(0!==t.sent.status){t.next=22;break}return a=function(){return(a=Object(l.a)(f.a.mark((function t(){var n,a,o,l,c,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.c)(T,"debug");case 2:if(n=t.sent,a=n.status,o=n.message,l=n.data,c=_t(),h=c-r>1e3*(e+3),0===a||h||(k({type:Ot.SET_EXECUTE_MESSAGE,payload:o}),setTimeout(i,1e3)),!h){t.next=13;break}return s.a.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),k({type:Ot.SET_DEBUGING,payload:!1}),t.abrupt("return");case 13:0===a&&(k({type:Ot.SET_DEBUGING,payload:!1}),2===l.status&&s.a.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),2===l.status&&s.a.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),k({type:Ot.SET_EXECUTE_RESULT,payload:Object(u.a)(Object(u.a)({},d),{},{debugResult:l,debuging:!1})}));case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)},i=function(){return a.apply(this,arguments)},e=it.time_limit,n={input:encodeURIComponent(I.test_case.input)},"exercises"===A.query.type&&(n.exercise_id=A.query.exercisesId),t.next=14,Object(x.b)(T,n);case 14:if(-1!==t.sent.status){t.next=18;break}return window.parent.location.href="/classrooms/".concat(A.query.coursesId,"/exercise/").concat(A.query.exercisesId,"/detail"),t.abrupt("return");case 18:r=_t(),i(),t.next=23;break;case 22:k({type:Ot.SET_DEBUGING,payload:!1});case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(2),console.log(t.t0);case 28:return t.prev=28,t.finish(28);case 30:case"end":return t.stop()}}),t,null,[[2,25,28,30]])})))).apply(this,arguments)}function dt(t){k({type:Ot.SET_DATA,payload:Object(u.a)(Object(u.a)({},I),{},{hack:Object(u.a)(Object(u.a)({},it),{},{code:t})})})}function ft(){return(ft=Object(l.a)(f.a.mark((function t(){var e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(x.g)(T);case 3:401===(e=t.sent).status?O.replace("/login",{from:A.pathname}):dt(L.Base64.decode(e.code)),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}function pt(){return(pt=Object(l.a)(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.a)(T,e);case 2:k({type:Ot.GET_DATA,payload:{showNote:!1,data:Object(u.a)(Object(u.a)({},I),{},{hack:Object(u.a)(Object(u.a)({},it),{},{notes:e.notes})})}});case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var gt={input:null==I||null===(e=I.test_case)||void 0===e?void 0:e.input,language:null==it?void 0:it.language,code:null==it?void 0:it.code,title:"main."+It[null==it?void 0:it.language],modify_code:null==it?void 0:it.modify_code,notes:null==it?void 0:it.notes,debugResult:_,debuging:j,submitting:B,executingMessage:U,onCancelNote:function(){k({type:Ot.SET_SHOW_NOTE,payload:!1})},onAddNote:function(t){return pt.apply(this,arguments)},showNote:F,onShowNote:function(){k({type:Ot.SET_SHOW_NOTE,payload:!0})},onSubmitCode:function(){return ut.apply(this,arguments)},onChangeCode:dt,onChangeInput:function(t){var e=t.target.value;k({type:Ot.SET_DATA,payload:Object(u.a)(Object(u.a)({},I),{},{test_case:{input:e}})})},onDebugCode:function(){return ht.apply(this,arguments)},onResetCode:function(){return ft.apply(this,arguments)},onSyncCode:function(){s.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:g.a.createElement("p",null,"初始代码有修改,更新后将覆盖现有代码哦~ ",g.a.createElement("br",null),"请将您编辑的代码保存至本地,以防丢失"),onOk:function(){return Object(l.a)(f.a.mark((function t(){var e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.i)(T);case 2:401===(e=t.sent).status?O.replace("/login",{from:A.pathname}):dt(L.Base64.decode(e.code));case 4:case"end":return t.stop()}}),t)})))()}})},onUpdateCode:lt};function mt(){return(mt=Object(l.a)(f.a.mark((function t(){var e,n,r;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.j)(it.id,{container_type:"Hack",type:1});case 2:e=t.sent,n=e.praise_count,r=Object(u.a)(Object(u.a)({},I),{},{hack:Object(u.a)(Object(u.a)({},it),{},{praises_count:n,user_praise:!it.user_praise})}),k({type:Ot.SET_DATA,payload:r});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt={topicId:T,submitResult:M,submitRecords:N,submitting:B,page:P,onPageChange:function(t){k({type:Ot.SET_PAGE,payload:t})},hack:it,user:null==I?void 0:I.user,onTriggerPraise:function(){return mt.apply(this,arguments)}};return g.a.createElement(g.a.Fragment,null,g.a.createElement(a.a,{spinning:D,delay:500},I?g.a.createElement(g.a.Fragment,null,g.a.createElement("header",{className:R.a.header},"exercises"!==A.query.type&&g.a.createElement("div",null,g.a.createElement("img",{src:"".concat(w.a.IMG_SERVER,"/images/").concat(rt.image_url),alt:"user",width:30}),g.a.createElement("span",null,rt.name)),g.a.createElement("h2",null," ",it.name," "),rt.hack_manager?g.a.createElement(b.a,{className:R.a.btn_back,to:"/problems/".concat(it.identifier,"/edit"),style:{marginRight:10}}," ",g.a.createElement(m.a,null)," 编辑"):null,(null==J||null===(n=J.exercise)||void 0===n?void 0:n.left_time)&&g.a.createElement(g.a.Fragment,null,g.a.createElement("span",{style:{color:z},className:"iconfont icon-kaoshishichang mr5"}),g.a.createElement("span",{className:"c-white mr20"},g.a.createElement(Rt,{valueStyle:{color:z,fontSize:16,fontWeight:"normal"},title:g.a.createElement("span",{style:{color:z,fontSize:16}},"剩余时间:"),value:q,onFinish:Object(l.a)(f.a.mark((function t(){var e,n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(S.Y)({categoryId:A.query.exercisesId,commit_method:2});case 2:0===(null==(e=t.sent)?void 0:e.status)&&(lt(),s.a.info({width:530,title:"提示",centered:!0,okText:"确定",content:g.a.createElement("div",{className:"tc font16"},"答题结束了,系统已自动提交试卷",g.a.createElement("br",null),"不能再修改答题"),onOk:function(){var t=Object(l.a)(f.a.mark((function t(){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.parent.location.href="/classrooms/".concat(A.query.coursesId,"/exercise/").concat(A.query.exercisesId,"/detail");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()})),-3===(null==e?void 0:e.status)&&(n=parseInt(null==e?void 0:e.message),Y(Date.now()+1e3*n));case 5:case"end":return t.stop()}}),t)})))}))),"exercises"===(null==A||null===(r=A.query)||void 0===r?void 0:r.type)?g.a.createElement(o.a,{type:"primary",onClick:function(){var t;lt(),s.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:g.a.createElement("div",{className:"tc"},"请确认你的答题内容已经提交?"),onOk:(t=Object(l.a)(f.a.mark((function t(){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.l)(T);case 2:ot();case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}},g.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," 返回试卷"):g.a.createElement(b.a,{className:R.a.btn_back,to:"/problemset"}," ",g.a.createElement(v.a,null),"退出")),g.a.createElement(a.a,{size:"large",spinning:et},g.a.createElement(E.a,{className:"my-problems",leftChild:g.a.createElement(Dt,vt),rightChild:g.a.createElement(Ft,gt)}))):null))};function Pt(t){t.title;var e=t.modify_code,n=t.onSyncCode,r=t.onShowCodeSetting,i=t.onResetCode;return g.a.createElement("div",{className:"action-bar"},g.a.createElement("span",null),e?g.a.createElement("a",{title:"更新通知",onClick:n},g.a.createElement("img",{src:A.a,alt:"notice"})):null,g.a.createElement("a",{title:"恢复初始代码",onClick:function(){s.a.confirm({title:"恢复初始代码",icon:g.a.createElement(k.a,null),content:"你在本文件中修改的内容将丢失,是否确定重新加载初始代码?",centered:!0,okText:"确定",cancelText:"取消",onOk:i})}},g.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),g.a.createElement("a",{onClick:r},g.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Ft(t){var e=t.input,n=t.showNote,a=(t.onShowNote,t.notes),o=t.onCancelNote,s=t.onAddNote,l=t.debugResult,c=t.language,u=t.debuging,h=t.submitting,d=t.executingMessage,f=t.code,p=t.onSubmitCode,m=t.onDebugCode,v=t.onChangeCode,y=t.onChangeInput,b=(t.onUpdateCode,Object(i.a)(t,["input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]));var x={input:e,debugResult:l,debuging:u,submitting:h,executingMessage:d,onDebugCode:m,onChangeCode:v,onSubmitCode:p,onChangeInput:y};return g.a.createElement("div",{className:"right-panel"},g.a.createElement(T.a,{language:c,value:f,onChange:v,ActionBarRender:function(t){return g.a.createElement(Pt,Object(r.a)({},b,{onShowCodeSetting:t}))}}),g.a.createElement("div",{className:"note-form-area ".concat(n?"active":"")},g.a.createElement(N,{onCancel:o,notes:a,callback:s})),g.a.createElement(I.b,x))}},RELg: /*!**************************************************************!*\ !*** ./node_modules/store/storages/oldIE-userDataStorage.js ***! \**************************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe").Global;t.exports={name:"oldIE-userDataStorage",write:function(t,e){if(o)return;var n=l(t);a((function(t){t.setAttribute(n,e),t.save("storejs")}))},read:function(t){if(o)return;var e=l(t),n=null;return a((function(t){n=t.getAttribute(e)})),n},each:function(t){a((function(e){for(var n=e.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];t(e.getAttribute(i.name),i.name)}}))},remove:function(t){var e=l(t);a((function(t){t.removeAttribute(e),t.save("storejs")}))},clearAll:function(){a((function(t){var e=t.XMLDocument.documentElement.attributes;t.load("storejs");for(var n=e.length-1;n>=0;n--)t.removeAttribute(e[n].name);t.save("storejs")}))}};var i=r.document,a=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var t,e,n;try{(e=new ActiveXObject("htmlfile")).open(),e.write('