|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[175,7,8],{"+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 i(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function r(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 o={};function a(t,e){t.f=e}function s(t,e){var r;if(t.match(/^\\[a-zA-Z@]+/)){var s=t.current().slice(1);return n(e,r=new(r=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(e,c),r.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return a(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return a(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return a(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return a(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(r=i(e))?(r.closeBracket(u),a(e,c),"bracket"):"error":"{"==u||"["==u?(n(e,r=new(r=o.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(r=function(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var i=e[n];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}(e)).name&&(r.argument=t.current()),r.styleIdentifier())}function l(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return a(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 i=t.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(t.skipToEnd(),"comment"):"error"}function c(t,e){var n=t.peek();return"{"==n||"["==n?(i(e).openBracket(n),t.eat(n),a(e,s),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(a(e,s),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),s(t,e))}return o.importmodule=r("importmodule","tag",["string","builtin"]),o.documentclass=r("documentclass","tag",["","atom"]),o.usepackage=r("usepackage","tag",["atom"]),o.begin=r("begin","tag",["atom"]),o.end=r("end","tag",["atom"]),o.label=r("label","tag",["atom"]),o.ref=r("ref","tag",["atom"]),o.eqref=r("eqref","tag",["atom"]),o.cite=r("cite","tag",["atom"]),o.bibitem=r("bibitem","tag",["atom"]),o.Bibitem=r("Bibitem","tag",["atom"]),o.RBibitem=r("RBibitem","tag",["atom"]),o.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/"))},"+RXH":
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/assets/images/paper/shu.svg ***!
|
|
|
\*****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/shu.46896d7d.svg"},"+ua5":
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/components/monaco-editor/index.css ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},"+yhJ":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/assets/images/paper/xixi.svg ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/xixi.e1179cb8.svg"},"/cxE":
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/errors.js ***!
|
|
|
\*****************************************************************/
|
|
|
/*! exports provided: ErrorHandler, errorHandler, onUnexpectedError, onUnexpectedExternalError, transformErrorForSerialization, isPromiseCanceledError, canceled, illegalArgument, illegalState */
|
|
|
/*! exports used: canceled, illegalArgument, illegalState, isPromiseCanceledError, onUnexpectedError, onUnexpectedExternalError, transformErrorForSerialization */function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u}));var i=new(function(){function t(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout((function(){if(t.stack)throw new Error(t.message+"\n\n"+t.stack);throw t}),0)}}return t.prototype.emit=function(t){this.listeners.forEach((function(e){e(t)}))},t.prototype.onUnexpectedError=function(t){this.unexpectedErrorHandler(t),this.emit(t)},t.prototype.onUnexpectedExternalError=function(t){this.unexpectedErrorHandler(t)},t}());function r(t){s(t)||i.onUnexpectedError(t)}function o(t){s(t)||i.onUnexpectedExternalError(t)}function a(t){return t instanceof Error?{$isError:!0,name:t.name,message:t.message,stack:t.stacktrace||t.stack}:t}function s(t){return t instanceof Error&&"Canceled"===t.name&&"Canceled"===t.message}function l(){var t=new Error("Canceled");return t.name=t.message,t}function c(t){return t?new Error("Illegal argument: "+t):new Error("Illegal argument")}function u(t){return t?new Error("Illegal state: "+t):new Error("Illegal state")}},"0eGx":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/paper/zhong.svg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/zhong.e01397e1.svg"},"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 i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function i(t){o(t)&&n(t)}function r(t){var i=t.getWrapperElement(),r=o(t);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(t):e(t)}function o(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=t.Init;if(a&&!l)o.on("blur",i),o.on("change",r),o.on("swapDoc",r),t.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(t){setTimeout((function(){var i=!1,r=t.getInputField();"TEXTAREA"==r.nodeName?i=!r.value:1==t.lineCount()&&(i=!/[^\u200b]/.test(r.querySelector(".CodeMirror-line").textContent)),i?n(t):e(t)}),20)}(o)}),r(o);else if(!a&&l){o.off("blur",i),o.off("change",r),o.off("swapDoc",r),t.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),e(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&i(o)}))}(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(i,r){var o,a,s=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(p("atom","]]>")):null:t.match("--")?n(p("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,i){for(var r;null!=(r=n.next());){if("<"==r)return i.tokenize=t(e+1),i.tokenize(n,i);if(">"==r){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(n,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=p("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(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,i,r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=h,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(r)?(e.tokenize=(n=r,(i=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=d;break}return"string"}).isInAttribute=!0,i),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=h;break}n.next()}return t}}function f(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 m(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;m(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(),a="tag",w):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",y)}function b(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(a="tag",x):(a="tag error",C)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,0,n)):(a="error",C)}function x(t,e,n){return"endTag"!=t?(a="error",x):(m(n),v)}function C(t,e,n){return a="error",x(t,0,n)}function w(t,e,n){if("word"==t)return a="attribute",k;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?g(n,i):(g(n,i),n.context=new f(n,i,r==n.indented)),v}return a="error",w}function k(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),w(t,0,n))}function S(t,e,n){return"string"==t?E:"word"==t&&l.allowUnquoted?(a="string",w):(a="error",w(t,0,n))}function E(t,e,n){return"string"==t?E:w(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;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.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&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=l.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=w)},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/"))},"24hK":
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js ***!
|
|
|
\*********************************************************************/
|
|
|
/*! exports provided: LinkedList */
|
|
|
/*! exports used: LinkedList */function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(/*! ./iterator.js */"JYp7"),r=function(){function t(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}return t.Undefined=new t(void 0),t}(),o=function(){function t(){this._first=r.Undefined,this._last=r.Undefined,this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return this._first===r.Undefined},t.prototype.clear=function(){this._first=r.Undefined,this._last=r.Undefined,this._size=0},t.prototype.unshift=function(t){return this._insert(t,!1)},t.prototype.push=function(t){return this._insert(t,!0)},t.prototype._insert=function(t,e){var n=this,i=new r(t);if(this._first===r.Undefined)this._first=i,this._last=i;else if(e){var o=this._last;this._last=i,i.prev=o,o.next=i}else{var a=this._first;this._first=i,i.next=a,a.prev=i}this._size+=1;var s=!1;return function(){s||(s=!0,n._remove(i))}},t.prototype.shift=function(){if(this._first!==r.Undefined){var t=this._first.element;return this._remove(this._first),t}},t.prototype.pop=function(){if(this._last!==r.Undefined){var t=this._last.element;return this._remove(this._last),t}},t.prototype._remove=function(t){if(t.prev!==r.Undefined&&t.next!==r.Undefined){var e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===r.Undefined&&t.next===r.Undefined?(this._first=r.Undefined,this._last=r.Undefined):t.next===r.Undefined?(this._last=this._last.prev,this._last.next=r.Undefined):t.prev===r.Undefined&&(this._first=this._first.next,this._first.prev=r.Undefined);this._size-=1},t.prototype.iterator=function(){var t,e=this._first;return{next:function(){return e===r.Undefined?i.c:(t?t.value=e.element:t={done:!1,value:e.element},e=e.next,t)}}},t.prototype.toArray=function(){for(var t=[],e=this._first;e!==r.Undefined;e=e.next)t.push(e.element);return t},t}()},"2sxD":
|
|
|
/*!*********************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/List/index.less?modules ***!
|
|
|
\*********************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={list:"list___3_VOx",head:"head___37dUf",name:"name___1VbnU",right:"right___gDdSx",body:"body___1wO_8",top:"top___cjRoo",bottom:"bottom___O44ku",l:"l___3de2t",ListGroup:"ListGroup___22jzr",a:"a___3Rx6Z",b:"b___S9Ybp",c:"c___3CVXw",c1:"c1___3b8Zq",radio:"radio___LnwQZ",d:"d___2-cs-"}},"51dB":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/sc.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/sc.e4548a72.svg"},"5MlY":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/sm.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/sm.8d9933e4.svg"},"6+eU":
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
|
|
|
\************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: 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/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/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.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,"a",(function(){return S}));var i=n("wx14"),r=n("rePB"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),p=n.n(d),f=function(t){var e,n="".concat(t.rootPrefixCls,"-item"),i=p()(n,"".concat(n,"-").concat(t.page),(e={},Object(r.a)(e,"".concat(n,"-active"),t.active),Object(r.a)(e,t.className,!!t.className),Object(r.a)(e,"".concat(n,"-disabled"),!t.page),e));return h.a.createElement("li",{title:t.showTitle?t.page:null,className:i,onClick:function(){t.onClick(t.page)},onKeyPress:function(e){t.onKeyPress(e,t.onClick,t.page)},tabIndex:"0"},t.itemRender(t.page,"page",h.a.createElement("a",{rel:"nofollow"},t.page)))},m=13,g=38,v=40,y=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(){var t;Object(a.a)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).state={goInputText:""},t.buildOptionText=function(e){return"".concat(e," ").concat(t.props.locale.items_per_page)},t.changeSize=function(e){t.props.changeSize(Number(e))},t.handleChange=function(e){t.setState({goInputText:e.target.value})},t.handleBlur=function(e){var n=t.props,i=n.goButton,r=n.quickGo,o=n.rootPrefixCls,a=t.state.goInputText;i||""===a||e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(o,"-prev"))>=0||e.relatedTarget.className.indexOf("".concat(o,"-next"))>=0)||(t.setState({goInputText:""}),r(t.getValidValue()))},t.go=function(e){""!==t.state.goInputText&&(e.keyCode!==m&&"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,i=e.locale,r=e.rootPrefixCls,o=e.changeSize,a=e.quickGo,s=e.goButton,l=e.selectComponentClass,c=e.buildOptionText,u=e.selectPrefixCls,d=e.disabled,p=this.state.goInputText,f="".concat(r,"-options"),m=l,g=null,v=null,y=null;if(!o&&!a)return null;var b=this.getPageSizeOptions();if(o&&m){var x=b.map((function(e,n){return h.a.createElement(m.Option,{key:n,value:e.toString()},(c||t.buildOptionText)(e))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(f,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(t){return t.parentNode}},x)}return a&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(f,"-quick-jumper-button")},i.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(f,"-quick-jumper")},i.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:p,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),i.page,y)),h.a.createElement("li",{className:"".concat(f)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function C(){}function w(t,e,n){var i=void 0===t?e.pageSize:t;return Math.floor((n.total-1)/i)+1}var k=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(t){var i;Object(a.a)(this,n),(i=e.call(this,t)).getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(w(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(t,e){var n=i.props.prefixCls,r=t||h.a.createElement("button",{type:"button","aria-label":e,className:"".concat(n,"-item-link")});return"function"==typeof t&&(r=h.a.createElement(t,Object(o.a)({},i.props))),r},i.savePaginationNode=function(t){i.paginationNode=t},i.isValid=function(t){return"number"==typeof(e=t)&&isFinite(e)&&Math.floor(e)===e&&t!==i.state.current;var e},i.shouldDisplayQuickJumper=function(){var t=i.props,e=t.showQuickJumper,n=t.pageSize;return!(t.total<=n)&&e},i.handleKeyDown=function(t){t.keyCode!==g&&t.keyCode!==v||t.preventDefault()},i.handleKeyUp=function(t){var e=i.getValidValue(t);e!==i.state.currentInputValue&&i.setState({currentInputValue:e}),t.keyCode===m?i.handleChange(e):t.keyCode===g?i.handleChange(e-1):t.keyCode===v&&i.handleChange(e+1)},i.changePageSize=function(t){var e=i.state.current,n=w(t,i.state,i.props);e=e>n?n:e,0===n&&(e=i.state.current),"number"==typeof t&&("pageSize"in i.props||i.setState({pageSize:t}),"current"in i.props||i.setState({current:e,currentInputValue:e})),i.props.onShowSizeChange(e,t),"onChange"in i.props&&i.props.onChange&&i.props.onChange(e,t)},i.handleChange=function(t){var e=i.props.disabled,n=t;if(i.isValid(n)&&!e){var r=w(void 0,i.state,i.props);n>r?n=r:n<1&&(n=1),"current"in i.props||i.setState({current:n,currentInputValue:n});var o=i.state.pageSize;return i.props.onChange(n,o),n}return i.state.current},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current<w(void 0,i.state,i.props)},i.runIfEnter=function(t,e){if("Enter"===t.key||13===t.charCode){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];e.apply(void 0,i)}},i.runIfEnterPrev=function(t){i.runIfEnter(t,i.prev)},i.runIfEnterNext=function(t){i.runIfEnter(t,i.next)},i.runIfEnterJumpPrev=function(t){i.runIfEnter(t,i.jumpPrev)},i.runIfEnterJumpNext=function(t){i.runIfEnter(t,i.jumpNext)},i.handleGoTO=function(t){t.keyCode!==m&&"click"!==t.type||i.handleChange(i.state.currentInputValue)};var r=t.onChange!==C;"current"in t&&!r&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=t.defaultCurrent;"current"in t&&(s=t.current);var l=t.defaultPageSize;return"pageSize"in t&&(l=t.pageSize),s=Math.min(s,w(l,void 0,t)),i.state={current:s,currentInputValue:s,pageSize:l},i}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(t,e){var n=this.props.prefixCls;if(e.current!==this.state.current&&this.paginationNode){var i=this.paginationNode.querySelector(".".concat(n,"-item-").concat(e.current));i&&document.activeElement===i&&i.blur()}}},{key:"getValidValue",value:function(t){var e=t.target.value,n=w(void 0,this.state,this.props),i=this.state.currentInputValue;return""===e?e:isNaN(Number(e))?i:e>=n?n:Number(e)}},{key:"getShowSizeChanger",value:function(){var t=this.props,e=t.showSizeChanger,n=t.total,i=t.totalBoundaryShowSizeChanger;return void 0!==e?e:n>i}},{key:"renderPrev",value:function(t){var e=this.props,n=e.prevIcon,i=(0,e.itemRender)(t,"prev",this.getItemIcon(n,"prev page")),r=!this.hasPrev();return Object(u.isValidElement)(i)?Object(u.cloneElement)(i,{disabled:r}):i}},{key:"renderNext",value:function(t){var e=this.props,n=e.nextIcon,i=(0,e.itemRender)(t,"next",this.getItemIcon(n,"next page")),r=!this.hasNext();return Object(u.isValidElement)(i)?Object(u.cloneElement)(i,{disabled:r}):i}},{key:"render",value:function(){var t=this,e=this.props,n=e.prefixCls,o=e.className,a=e.style,s=e.disabled,l=e.hideOnSinglePage,c=e.total,d=e.locale,m=e.showQuickJumper,g=e.showLessItems,v=e.showTitle,y=e.showTotal,x=e.simple,C=e.itemRender,k=e.showPrevNextJumpers,S=e.jumpPrevIcon,E=e.jumpNextIcon,_=e.selectComponentClass,O=e.selectPrefixCls,N=e.pageSizeOptions,T=this.state,L=T.current,A=T.pageSize,M=T.currentInputValue;if(!0===l&&c<=A)return null;var j=w(void 0,this.state,this.props),D=[],I=null,P=null,R=null,B=null,z=null,F=m&&m.goButton,H=g?1:2,W=L-1>0?L-1:0,V=L+1<j?L+1:j,G=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 F&&(z="boolean"==typeof F?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},F),z=h.a.createElement("li",{title:v?"".concat(d.jump_to).concat(L,"/").concat(j):null,className:"".concat(n,"-simple-pager")},z)),h.a.createElement("ul",Object(i.a)({className:p()(n,"".concat(n,"-simple"),Object(r.a)({},"".concat(n,"-disabled"),s),o),style:a,ref:this.savePaginationNode},G),h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:p()("".concat(n,"-prev"),Object(r.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(W)),h.a.createElement("li",{title:v?"".concat(L,"/").concat(j):null,className:"".concat(n,"-simple-pager")},h.a.createElement("input",{type:"text",value:M,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(n,"-slash")},"/"),j),h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:p()("".concat(n,"-next"),Object(r.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),z);if(j<=3+2*H){var U={locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:C};j||D.push(h.a.createElement(f,Object(i.a)({},U,{key:"noPager",page:j,className:"".concat(n,"-disabled")})));for(var K=1;K<=j;K+=1){var q=L===K;D.push(h.a.createElement(f,Object(i.a)({},U,{key:K,page:K,active:q})))}}else{var $=g?d.prev_3:d.prev_5,Y=g?d.next_3:d.next_5;k&&(I=h.a.createElement("li",{title:v?$:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:p()("".concat(n,"-jump-prev"),Object(r.a)({},"".concat(n,"-jump-prev-custom-icon"),!!S))},C(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(S,"prev page"))),P=h.a.createElement("li",{title:v?Y:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:p()("".concat(n,"-jump-next"),Object(r.a)({},"".concat(n,"-jump-next-custom-icon"),!!E))},C(this.getJumpNextPage(),"jump-next",this.getItemIcon(E,"next page")))),B=h.a.createElement(f,{locale:d,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:j,page:j,active:!1,showTitle:v,itemRender:C}),R=h.a.createElement(f,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:C});var X=Math.max(1,L-H),Z=Math.min(L+H,j);L-1<=H&&(Z=1+2*H),j-L<=H&&(X=j-2*H);for(var J=X;J<=Z;J+=1){var Q=L===J;D.push(h.a.createElement(f,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:J,page:J,active:Q,showTitle:v,itemRender:C}))}L-1>=2*H&&3!==L&&(D[0]=Object(u.cloneElement)(D[0],{className:"".concat(n,"-item-after-jump-prev")}),D.unshift(I)),j-L>=2*H&&L!==j-2&&(D[D.length-1]=Object(u.cloneElement)(D[D.length-1],{className:"".concat(n,"-item-before-jump-next")}),D.push(P)),1!==X&&D.unshift(R),Z!==j&&D.push(B)}var tt=null;y&&(tt=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*A+1,L*A>c?c:L*A])));var et=!this.hasPrev()||!j,nt=!this.hasNext()||!j;return h.a.createElement("ul",Object(i.a)({className:p()(n,o,Object(r.a)({},"".concat(n,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},G),tt,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:et?null:0,onKeyPress:this.runIfEnterPrev,className:p()("".concat(n,"-prev"),Object(r.a)({},"".concat(n,"-disabled"),et)),"aria-disabled":et},this.renderPrev(W)),D,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:nt?null:0,onKeyPress:this.runIfEnterNext,className:p()("".concat(n,"-next"),Object(r.a)({},"".concat(n,"-disabled"),nt)),"aria-disabled":nt},this.renderNext(V)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:_,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:A,pageSizeOptions:N,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:F}))}}],[{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 i=e.current,r=w(t.pageSize,e,t);i=i>r?r:i,"current"in t||(n.current=i,n.currentInputValue=i),n.pageSize=t.pageSize}return n}}]),n}(h.a.Component);k.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:C,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:C,locale:x.a,style:{},itemRender:function(t,e,n){return n},totalBoundaryShowSizeChanger:50};var S=k},"6K3P":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/jinshi.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/jinshi.4887ef37.svg"},"746U":
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/types.js ***!
|
|
|
\****************************************************************/
|
|
|
/*! exports provided: isArray, isString, isObject, isNumber, isBoolean, isUndefined, isUndefinedOrNull, assertType, isEmptyObject, isFunction, validateConstraints, validateConstraint, getAllPropertyNames, getAllMethodNames, createProxyObject, withNullAsUndefined, withUndefinedAsNull */
|
|
|
/*! exports used: assertType, createProxyObject, getAllMethodNames, isArray, isBoolean, isEmptyObject, isFunction, isNumber, isObject, isString, isUndefined, isUndefinedOrNull, validateConstraints, withNullAsUndefined, withUndefinedAsNull */function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"j",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"h",(function(){return h})),n.d(e,"e",(function(){return d})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"a",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return y})),n.d(e,"m",(function(){return b})),n.d(e,"c",(function(){return C})),n.d(e,"b",(function(){return w})),n.d(e,"n",(function(){return k})),n.d(e,"o",(function(){return S}));var i="number",r="string",o="undefined",a="object",s="function";function l(t){return Array.isArray?Array.isArray(t):!(!t||typeof t.length!==i||t.constructor!==Array)}function c(t){return typeof t===r||t instanceof String}function u(t){return!(typeof t!==a||null===t||Array.isArray(t)||t instanceof RegExp||t instanceof Date)}function h(t){return(typeof t===i||t instanceof Number)&&!isNaN(t)}function d(t){return!0===t||!1===t}function p(t){return typeof t===o}function f(t){return p(t)||null===t}function m(t,e){if(!t)throw new Error(e?"Unexpected type, expected '"+e+"'":"Unexpected type")}var g=Object.prototype.hasOwnProperty;function v(t){if(!u(t))return!1;for(var e in t)if(g.call(t,e))return!1;return!0}function y(t){return typeof t===s}function b(t,e){for(var n=Math.min(t.length,e.length),i=0;i<n;i++)x(t[i],e[i])}function x(t,e){if(c(e)){if(typeof t!==e)throw new Error("argument does not match constraint: typeof "+e)}else if(y(e)){try{if(t instanceof e)return}catch(t){}if(!f(t)&&t.constructor===e)return;if(1===e.length&&!0===e.call(void 0,t))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function C(t){for(var e=[],n=0,i=function(t){for(var e=[],n=Object.getPrototypeOf(t);Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}(t);n<i.length;n++){var r=i[n];"function"==typeof t[r]&&e.push(r)}return e}function w(t,e){for(var n=function(t){return function(){var n=Array.prototype.slice.call(arguments,0);return e(t,n)}},i={},r=0,o=t;r<o.length;r++){var a=o[r];i[a]=n(a)}return i}function k(t){return null===t?void 0:t}function S(t){return void 0===t?null:t}},"7Cbv":
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function o(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}var a=/^(?:[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&&a.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 i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var r=0;r<16;++r)e[n+r]=i[r];return e}return u(i)}},"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 g}));var i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=(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),p=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),f={labelCol:{span:4},wrapperCol:{span:20}},m={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 g(t){var e=t.value,n=t.onChange,r=t.mode,o=t.options,a=void 0===o?{}:o,l=Object(c.useRef)(),h=Object(c.useState)(),p=Object(s.a)(h,2),f=p[0],m=p[1];return Object(c.useEffect)((function(){if(f){function t(t){var e=t.getValue();n&&n(e)}return f.on("change",t),function(){f.off("change",t)}}}),[f,n]),Object(c.useEffect)((function(){f&&f.setOption("mode",r)}),[f,r]),Object(c.useEffect)((function(){f&&(e===f.getValue()&&""!==e||setTimeout((function(){f.setValue(e||" ")}),300))}),[f,e]),Object(c.useEffect)((function(){if(l.current&&!f){var t=d.a.fromTextArea(l.current,Object(i.a)({mode:r,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));m(t)}}),[l.current,f]),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,i=Object(c.useState)("python"),h=Object(s.a)(i,2),d=h[0],v=h[1];return u.a.createElement(a.a,Object(r.a)({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(a.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(m[t][1])}},Object.keys(m).map((function(t){return u.a.createElement(p,{key:t,value:t},m[t][0])})))),u.a.createElement(a.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(o.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(o.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 o}));var i={adjustX:1,adjustY:1},r=[0,0],o={left:{points:["cr","cl"],overflow:i,offset:[-4,0],targetOffset:r},right:{points:["cl","cr"],overflow:i,offset:[4,0],targetOffset:r},top:{points:["bc","tc"],overflow:i,offset:[0,-4],targetOffset:r},bottom:{points:["tc","bc"],overflow:i,offset:[0,4],targetOffset:r},topLeft:{points:["bl","tl"],overflow:i,offset:[0,-4],targetOffset:r},leftTop:{points:["tr","tl"],overflow:i,offset:[-4,0],targetOffset:r},topRight:{points:["br","tr"],overflow:i,offset:[0,-4],targetOffset:r},rightTop:{points:["tl","tr"],overflow:i,offset:[4,0],targetOffset:r},bottomRight:{points:["tr","br"],overflow:i,offset:[0,4],targetOffset:r},rightBottom:{points:["bl","br"],overflow:i,offset:[4,0],targetOffset:r},bottomLeft:{points:["tl","bl"],overflow:i,offset:[0,4],targetOffset:r},leftBottom:{points:["br","bl"],overflow:i,offset:[-4,0],targetOffset:r}}},"7qnI":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.js ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/tooltip/style */"5Dmo");var i=n(/*! antd/es/tooltip */"3S7+"),r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),o=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"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! ./index.less?modules */"O2Wb"),d=n.n(h),p=l.a.TextArea,f=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){return Object(r.a)(this,n),e.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var t=this,e=this.props,n=e.index,r=e.onAnswerChange,o=e.addChildAnswer,a=e.exerciseIsPublish,s=e.answers,l=e.activeOptionErrorIndex,c=e.flex,h=void 0===c?"0 0 1000px":c;return u.a.createElement("div",{className:d.a.flex},u.a.createElement("div",{className:"".concat(d.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"答案(填空",n+1,"):"),u.a.createElement("div",{className:"".concat(d.a.flex," ").concat(d.a.flex1),style:{flexDirection:"column"}},s.map((function(e,c){var f="".concat(n,"-").concat(c);return u.a.createElement("div",{className:"".concat(d.a.flex," ").concat(d.a.flex1),key:c},u.a.createElement("div",{className:d.a.flex1,style:{flex:h}},u.a.createElement("div",null,u.a.createElement(p,{className:f===l?d.a.error:"",spellCheck:!1,rows:4,value:e||"",defaultValue:"请输入参考答案".concat(0==c?"":"(可选)"),onChange:function(t){return r(n,c,t.target.value)},style:{minHeight:95}}))),!a&&u.a.createElement(u.a.Fragment,null,0!=c&&u.a.createElement(i.a,{title:"删除"},u.a.createElement("i",{className:"".concat(d.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return t.props.deleteChildAnswer(n,c)},style:{float:"right"}})),0===c&&u.a.createElement(i.a,{title:"删除"},u.a.createElement("i",{className:"".concat(d.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return t.props.deleteChildAnswermain(n,c)},style:{float:"right"}})),u.a.createElement(i.a,{title:"新增参考答案"},u.a.createElement("i",{className:"".concat(d.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return o(n)},style:{float:"right",visibility:c==s.length-1?"":"hidden"}}))))}))))}}]),n}(c.Component);e.a=f},"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 p})),n.d(e,"f",(function(){return f})),n.d(e,"b",(function(){return m}));var i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=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(a.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,i=e.props,a=i.children,c=Object(o.a)(i,["children"]),u=Object(r.a)({key:n},c),h=t(a);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),o=[];function a(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),p=c(u.key,d),f=Object(r.a)(Object(r.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(i.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(i.a)(s?s.isEnd:[]),[h===t.length-1])});return o.push(f),!0===e||n.has(p)?f.children=a(u.children||[],f):f.children=[],f}))}return a(t),o}function d(t,e,n){var i;n?"string"==typeof n?i=function(t){return t[n]}:"function"==typeof n&&(i=function(t){return n(t)}):i=function(t,e){return c(t.key,e)},function n(r,o,a){var s=r?r.children:t,c=r?Object(l.h)(a.pos,o):"0";if(r){var u=i(r,c),h={node:r,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};e(h)}s&&s.forEach((function(t,e){n(t,e,{node:r,pos:c,level:a?a.level+1:-1})}))}(null)}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.initWrapper,i=e.processEntity,r=e.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return n&&(l=n(l)||l),d(t,(function(t){var e=t.node,n=t.index,r=t.pos,o=t.key,u=t.parentPos,h={node:e,index:n,key:o,pos:r,level:t.level},d=c(o,r);a[r]=h,s[d]=h,h.parent=a[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),i&&i(h,l)}),o),r&&r(l),l}function f(t,e){var n=e.expandedKeys,i=e.selectedKeys,r=e.loadedKeys,o=e.loadingKeys,a=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!==i.indexOf(t),loaded:-1!==r.indexOf(t),loading:-1!==o.indexOf(t),checked:-1!==a.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 m(t){var e=t.data,n=t.expanded,i=t.selected,o=t.checked,a=t.loaded,l=t.loading,c=t.halfChecked,u=t.dragOver,h=t.dragOverGapTop,d=t.dragOverGapBottom,p=t.pos,f=t.active,m=Object(r.a)(Object(r.a)({},e),{},{expanded:n,selected:i,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:p,active:f});return"props"in m||Object.defineProperty(m,"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}}),m}},"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<t.modeInfo.length;e++){var n=t.modeInfo[e];n.mimes&&(n.mime=n.mimes[0])}t.findModeByMIME=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.mime==e)return i;if(i.mimes)for(var r=0;r<i.mimes.length;r++)if(i.mimes[r]==e)return i}return/\+xml$/.test(e)?t.findModeByMIME("application/xml"):/\+json$/.test(e)?t.findModeByMIME("application/json"):void 0},t.findModeByExtension=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.ext)for(var r=0;r<i.ext.length;r++)if(i.ext[r]==e)return i}},t.findModeByFileName=function(e){for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.file&&i.file.test(e))return i}var r=e.lastIndexOf("."),o=r>-1&&e.substring(r+1,e.length);if(o)return t.findModeByExtension(o)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.name.toLowerCase()==e)return i;if(i.alias)for(var r=0;r<i.alias.length;r++)if(i.alias[r].toLowerCase()==e)return i}}}(n(/*! ../lib/codemirror */"VrN/"))},"8HAY":
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/actions.js ***!
|
|
|
\******************************************************************/
|
|
|
/*! exports provided: Action, ActionRunner */
|
|
|
/*! exports used: Action, ActionRunner */function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var i,r=n(/*! ./lifecycle.js */"pmY6"),o=n(/*! ./event.js */"MI8n"),a=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))},l=function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},c=function(t){function e(e,n,i,r,a){void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=!0);var s=t.call(this)||this;return s._onDidChange=s._register(new o.a),s.onDidChange=s._onDidChange.event,s._enabled=!0,s._checked=!1,s._id=e,s._label=n,s._cssClass=i,s._enabled=r,s._actionCallback=a,s}return a(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._setLabel(t)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(t){this._setTooltip(t)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(t){this._setClass(t)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._setEnabled(t)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){this._setChecked(t)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))},e.prototype.run=function(t,e){return this._actionCallback?this._actionCallback(t):Promise.resolve(!0)},e}(r.a),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._onDidBeforeRun=e._register(new o.a),e.onDidBeforeRun=e._onDidBeforeRun.event,e._onDidRun=e._register(new o.a),e.onDidRun=e._onDidRun.event,e}return a(e,t),e.prototype.run=function(t,e){return s(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:if(!t.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:t}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.runAction(t,e)];case 2:return n=r.sent(),this._onDidRun.fire({action:t,result:n}),[3,4];case 3:return i=r.sent(),this._onDidRun.fire({action:t,error:i}),[3,4];case 4:return[2]}}))}))},e.prototype.runAction=function(t,e){var n=e?t.run(e):t.run();return Promise.resolve(n)},e}(r.a)},"8hTe":
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.less?modules ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={button:"button___1wy9m"}},"9Bee":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.tsx + 3 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/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.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! 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/space/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n("DYRE");var i=n("zeV3"),r=(n("+L6B"),n("2/Rp")),o=n("k1fw"),a=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),p=n.n(d),f=n("rUJ1");var m=[],g=["<ul>"],v=new p.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["<ul>"]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function C(){return function t(e,n,i,r){if(n>=e.length||e[n].level<=i)return n;var o=e[n];r.push("<li><a href='#"+o.anchor+"'>"+o.text+"</a>");var a=[];return n=t(e,++n,o.level,a),a.length>0&&(r.push("<ul>"),a.forEach((function(t){r.push(t)})),r.push("</ul>")),r.push("</li>"),n=t(e,n,i,r)}(m,0,0,g),g.push("</ul>"),g.join("")}var w={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],i=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var i=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>=i.length?t.slice(i.length):t})).join("\n")}(n,e[3]||""),r=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(r)>=0){var o=E(),a=i;i=o,_[o]={type:"block",expression:a}}return{type:"code",raw:n,lang:r,text:i}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,E=function(){return"__special_katext_id_".concat(S++,"__")},_={};function O(){S=0,_={}}function N(t){return t=t.replace(k,(function(t,e){var n=E();return _[n]={type:"inline",expression:e},n}))}var T=v.listitem;v.listitem=function(t){return T(N(t))};var L=v.paragraph;v.paragraph=function(t){return L(N(t))};var A=v.tablecell;v.tablecell=function(t,e){return A(N(t),e)},v.code=function(t,e,n){var i=(e||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(t,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(e,'">').concat(n?t:Object(f.escape)(t,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?t:Object(f.escape)(t,!0))+"</code></pre>"},v.heading=function(t,e,n){var i=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:i,level:e,text:t}),"<h"+e+' id="'+i+'">'+t+"</h"+e+">"},p.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),p.a.use({tokenizer:w,renderer:v});var M=p.a,j=(n("SJMd"),n("ulZh")),D=n.n(j),I=n("m3rI"),P=n("Oy/b"),R=n("p5ED"),B=n("ErOA"),z=function(t,e){return(z=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 F(t,e){function n(){this.constructor=t}z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function H(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function W(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function V(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}var G=function(){function t(){}return t.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},t.setAttributes=function(t,e){for(var n=0,i=e;n<i.length;n++){var r=i[n],o=r[0],a=r[1];t.setAttribute(o,a)}},t.createRect=function(e,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",n.toString()),i&&t.setAttributes(r,i),r},t.createLine=function(e,n,i,r,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",e.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",i.toString()),a.setAttribute("y2",r.toString()),o&&t.setAttributes(a,o),a},t.createPolygon=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","polygon");return i.setAttribute("points",e),n&&t.setAttributes(i,n),i},t.createCircle=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",(e/2).toString()),i.setAttribute("cy",(e/2).toString()),i.setAttribute("r",e.toString()),n&&t.setAttributes(i,n),i},t.createEllipse=function(e,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(n/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(n/2).toString()),i&&t.setAttributes(r,i),r},t.createGroup=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&t.setAttributes(n,e),n},t.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},t.createMarker=function(e,n,i,r,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return t.setAttributes(l,[["id",e],["orient",n],["markerWidth",i.toString()],["markerHeight",r.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},t.createText=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),e&&t.setAttributes(n,e),n},t.createTSpan=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");return i.textContent=e,n&&t.setAttributes(i,n),i},t.createImage=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&t.setAttributes(n,e),n},t.createPoint=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=t,n.y=e,n},t.createPath=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",e),n&&t.setAttributes(i,n),i},t}(),U=function(){function t(){}return t.addKey=function(e){t.key=e},Object.defineProperty(t,"isLicensed",{get:function(){return!!t.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(t.key)},enumerable:!1,configurable:!0}),t}(),K=function(){function t(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return t.prototype.rasterize=function(t,e,n){var i=this;return new Promise((function(r){var o=void 0!==n?n:document.createElement("canvas");null===t&&(i.markersOnly=!0,i.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",e.width.baseVal.valueAsString),a.setAttribute("height",e.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+e.viewBox.baseVal.width.toString()+" "+e.viewBox.baseVal.height.toString()),a.innerHTML=e.innerHTML,!0===i.naturalSize?(a.width.baseVal.value=t.naturalWidth,a.height.baseVal.value=t.naturalHeight):void 0!==i.width&&void 0!==i.height&&(a.width.baseVal.value=i.width,a.height.baseVal.value=i.height),o.width=a.width.baseVal.value,o.height=a.height.baseVal.value;var s=a.outerHTML,l=o.getContext("2d");!0!==i.markersOnly&&l.drawImage(t,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var h=new Blob([s],{type:"image/svg+xml"}),d=c.createObjectURL(h);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(d);var t=o.toDataURL(i.imageType,i.imageQuality);r(t)},u.src=d}))},t}(),q=function(){},$=function(){function t(t){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+t+"_"}return Object.defineProperty(t.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),t.prototype.addClass=function(t){return void 0===this.styleSheet&&this.addStyleSheet(),t.name=""+this.classNamePrefix+t.localName,this.classes.push(t),this.styleSheet.sheet.insertRule("."+t.name+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length),t},t.prototype.addRule=function(t){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(t),this.styleSheet.sheet.insertRule(t.selector+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length)},t.prototype.addStyleSheet=function(){var t;this.styleSheet=document.createElement("style"),(null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).appendChild(this.styleSheet),this.addRule(new Y("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new X("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new X("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},t.prototype.removeStyleSheet=function(){var t;this.styleSheet&&((null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},t}(),Y=function(t,e){this.selector=t,this.style=e},X=function(t,e){this.localName=t,this.style=e},Z=function(){function t(t,e,n,i,r){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=t,this.displayMode=e,this.markerItems=n,this.uiStyleSettings=i,this.styles=r,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return t.prototype.show=function(t){var e=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"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;e<this.markerButtons.length;e++)e<t||e===t&&this.markerButtons.length-1===t?this.markerButtonBlock.appendChild(this.markerButtons[e]):(e===t&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[e]))}},t.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},t.prototype.resetButtonStyles=function(){var t=this;this.buttons.forEach((function(e){e.className=e.className.replace(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name,"").trim(),e.className=e.className.replace(t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:t.toolbarActiveButtonStyleColorsClass.name,"").trim(),e.className+=" "+(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name)}))},t.prototype.addActionButton=function(t,e,n){var i=this,r=document.createElement("div");switch(r.className=""+this.toolbarButtonStyleClass.name,r.innerHTML=e,r.setAttribute("data-action",n),r.addEventListener("click",(function(){i.actionToolbarButtonClicked(r,n)})),n){case"select":r.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":r.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":r.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":r.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":r.style.fill=this.uiStyleSettings.closeButtonColor}t.appendChild(r),this.buttons.push(r)},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new X("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new X("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new X("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new X("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new X("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new X("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new X("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new X("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},t.prototype.markerToolbarButtonClicked=function(t,e){this.setActiveButton(t),this.buttonClickListeners&&this.buttonClickListeners.length>0&&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}(),J=function(){function t(t,e,n,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new X("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 X("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new X("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new X("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new X("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 X("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 X("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 X("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new X("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+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,i=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=i.uiStyleSettings;var n=document.createElement("div");n.className=i.toolboxButtonStyleClass.name+" "+(null!==(e=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:i.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){i.panelButtonClick(t)})),i.panelButtons.push(n),i.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 i=t.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),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,i){var r,o;t.className=e.toolboxButtonStyleClass.name+" "+(i===n?""+(null!==(r=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:e.toolboxButtonStyleColorsClass.name))}))},t}(),Q=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=i,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return F(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 i=t.getColorBox(n);e.appendChild(i),t.colorBoxes.push(i)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-n,r=document.createElement("div");r.style.display="inline-block",r.style.boxSizing="content-box",r.style.width=i-2+"px",r.style.height=i-2+"px",r.style.padding="1px",r.style.marginRight="2px",r.style.marginBottom="2px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderRadius=(i+2)/2+"px",r.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentColor(t,r)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=i-2+"px",o.style.height=i-2+"px",o.style.backgroundColor=t,o.style.borderRadius=i/2+"px","transparent"===t&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),r.appendChild(o),r},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}(),it=function(){function t(){this.GRIP_SIZE=10,this.visual=G.createGroup(),this.visual.appendChild(G.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(G.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}(),rt=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}(),ot=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.left=0,r.top=0,r.width=0,r.height=0,r.defaultSize={x:50,y:20},r.offsetX=0,r.offsetY=0,r.rotationAngle=0,r.CB_DISTANCE=10,r._suppressMarkerCreateEvent=!1,r.container.transform.baseVal.appendItem(G.createTransform()),r.setupControlBox(),r}return F(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=G.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 i=this.unrotatePoint(e);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.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 r=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=r.x-this.width/2,this.top=r.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,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,i=this.manipulationStartTop,r=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:i=this.manipulationStartTop+t.y-this.manipulationStartY,r=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:r=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),r>=0?(this.top=i,this.height=r):(this.top=i+r,this.height=-r),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=G.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=G.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=G.createGroup();var t=G.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=G.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=G.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 it;return t.visual.transform.baseVal.appendItem(G.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,i=(this.width+this.CB_DISTANCE)/2-t/2,r=(this.height+this.CB_DISTANCE)/2-t/2,o=this.height+this.CB_DISTANCE-t/2,a=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,i,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,r),this.positionGrip(this.controlGrips.centerRight.visual,a,r),this.positionGrip(this.controlGrips.bottomLeft.visual,e,o),this.positionGrip(this.controlGrips.bottomCenter.visual,i,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,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:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.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(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var i=this.rotatePoint({x:this.left,y:this.top}),r=this.unrotatePoint({x:i.x*e,y:i.y*n});this.left=r.x,this.top=r.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(et),at=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r}return F(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=G.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),G.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&&G.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&G.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&G.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&G.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}(ot),st=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=i,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return F(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 i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=n.toString(),r.style.marginRight="5px",i.appendChild(r);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),i.appendChild(o),t.widthBoxes.push(i)})),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,i,r){var o=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=i,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return F(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 i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";r.innerHTML=o,i.appendChild(r),t.styleBoxes.push(i)})),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,i){var r=t.call(this,e,n,i)||this;return r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new st("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return F(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='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',e}(at),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,i){var r=t.call(this,e,n,i)||this;return r.x1=0,r.y1=0,r.x2=0,r.y2=0,r.defaultLength=50,r.manipulationStartX=0,r.manipulationStartY=0,r.manipulationStartX1=0,r.manipulationStartY1=0,r.manipulationStartX2=0,r.manipulationStartY2=0,r.setupControlBox(),r}return F(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=G.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 it;return t.visual.transform.baseVal.appendItem(G.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 i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,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,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new st("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return F(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=G.createGroup(),this.selectorLine=G.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=G.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()),G.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),G.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),G.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='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',e}(ht),pt=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=i,o.setCurrentFont=o.setCurrentFont.bind(o),o}return F(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 i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.display="flex",r.style.minHeight="20px",r.style.flexGrow="2",r.style.fontFamily=n,r.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",r.appendChild(o),i.appendChild(r),t.fontBoxes.push(i)})),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),ft=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.padding=5,r.DEFAULT_TEXT="your text here",r.text=r.DEFAULT_TEXT,r.isMoved=!1,r.color=i.defaultColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setColor=r.setColor.bind(r),r.setFont=r.setFont.bind(r),r.renderText=r.renderText.bind(r),r.sizeText=r.sizeText.bind(r),r.textEditDivClicked=r.textEditDivClicked.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.setSize=r.setSize.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.fontFamilyPanel=new pt("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r}return F(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=G.createGroup(),this.bgRectangle=G.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=G.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(G.createTransform()),this.textElement.transform.baseVal.appendItem(G.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(G.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,i=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,i)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,i=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,i=this.height/2-e.height*t/2),{x:n,y:i}},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&&(G.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),G.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(),i={x:n.width*t,y:n.height*t};e.x-=i.x/2,e.y-=i.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&&G.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&&G.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='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',e}(ot),mt=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.lineWidth=3,r.drawing=!1,r.pixelRatio=1,r.color=i.defaultColor,r.lineWidth=i.defaultStrokeWidth,r.pixelRatio=i.freehandPixelRatio,r.setColor=r.setColor.bind(r),r.addCanvas=r.addCanvas.bind(r),r.finishCreation=r.finishCreation.bind(r),r.setLineWidth=r.setLineWidth.bind(r),r.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.lineWidthPanel=new st("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.lineWidthPanel.onWidthChanged=r.setLineWidth,r}return F(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=G.createGroup(),this.drawingImage=G.createImage(),this.visual.appendChild(this.drawingImage);var t=G.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),G.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),G.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],i=e[1],r=e[2],o=e[3],a=!1,s=0;s<this.canvasElement.height;s++)for(var l=0;l<this.canvasElement.width;l++)t.data[s*this.canvasElement.width*4+4*l+3]>0&&(a=!0,s<i&&(i=s),l<n&&(n=l),s>o&&(o=s),l>r&&(r=l));if(a){this.left=n/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(r-n)/this.pixelRatio,this.height=(o-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=r-n,c.height=o-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,i,r-n,o-i),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(){G.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),G.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='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',e}(ot),gt=function(t){function e(e,n,i){var r=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return r.typeBoxes=[],r.currentType=n,r.setCurrentType=r.setCurrentType.bind(r),r}return F(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 r="both";switch(n){case 0:r="both";break;case 1:r="start";break;case 2:r="end";break;case 3:r="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=r===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentType(r,o)})),e.appendChild(o),"both"===r||"start"===r){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',a.style.marginLeft="5px",o.appendChild(a)}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!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===r||"end"===r){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}i.typeBoxes.push(o)},i=this,r=0;r<4;r++)n(r);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,i){var r=t.call(this,e,n,i)||this;return r.arrowType="end",r.arrowBaseHeight=10,r.arrowBaseWidth=10,r.getArrowPoints=r.getArrowPoints.bind(r),r.setArrowType=r.setArrowType.bind(r),r.arrowTypePanel=new gt("Arrow type","end"),r.arrowTypePanel.onArrowTypeChanged=r.setArrowType,r}return F(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,i=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+i/2)+" "+t+","+(e-i/2)+" "+(t+n/2)+","+(e+i/2)},e.prototype.createTips=function(){this.arrow1=G.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=G.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(G.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",G.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),G.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 i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,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='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e}(dt),yt=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor=i.defaultFillColor,r.strokeWidth=0,r.fillPanel=new tt("Color",i.defaultColorSet,i.defaultFillColor),r.fillPanel.onColorChanged=r.setFillColor,r}return F(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='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e}(at),bt=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=i,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return F(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 i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=100*n+"%",i.appendChild(r),t.opacityBoxes.push(i)})),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,i){var r=t.call(this,e,n,i)||this;return r.setOpacity=r.setOpacity.bind(r),r.fillColor=i.defaultHighlightColor,r.strokeWidth=0,r.opacity=i.defaultHighlightOpacity,r.fillPanel=new tt("Color",i.defaultColorSet,r.fillColor),r.fillPanel.onColorChanged=r.setFillColor,r.opacityPanel=new bt("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return F(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&G.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='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e}(yt),Ct='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',wt=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.bgColor="transparent",r.tipPosition={x:0,y:0},r.tipBase1Position={x:0,y:0},r.tipBase2Position={x:0,y:0},r.tipMoving=!1,r.color=i.defaultStrokeColor,r.bgColor=i.defaultFillColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setBgColor=r.setBgColor.bind(r),r.getTipPoints=r.getTipPoints.bind(r),r.positionTip=r.positionTip.bind(r),r.setTipPoints=r.setTipPoints.bind(r),r.colorPanel=new tt("Text color",i.defaultColorSet,r.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),r.colorPanel.onColorChanged=r.setColor,r.bgColorPanel=new tt("Fill color",i.defaultColorSet,r.bgColor,Ct),r.bgColorPanel.onColorChanged=r.setBgColor,r.fontFamilyPanel=new pt("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.tipGrip=new it,r.tipGrip.visual.transform.baseVal.appendItem(G.createTransform()),r.controlBox.appendChild(r.tipGrip.visual),r}return F(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(){G.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=G.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&&(G.setAttributes(this.bgRectangle,[["fill",t]]),G.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 i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:0},this.tipBase2Position={x:e+n,y:0}):(this.tipBase1Position={x:0,y:e},this.tipBase2Position={x:0,y:e+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-n,y:0},this.tipBase2Position={x:this.width-e,y:0}):(this.tipBase1Position={x:this.width,y:e},this.tipBase2Position={x:this.width,y:e+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-n,y:this.height},this.tipBase2Position={x:this.width-e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-e-n},this.tipBase2Position={x:this.width,y:this.height-e}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:this.height},this.tipBase2Position={x:e+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-e},this.tipBase2Position={x:0,y:this.height-e-n})},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.positionTip()},e.prototype.positionTip=function(){G.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),t.prototype.select.call(this)},e.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,t.prototype.restoreState.call(this,e),this.createTip(),this.setTipPoints()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.tipPosition={x:this.tipPosition.x*e,y:this.tipPosition.y*n},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e}(ft),kt=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.setOpacity=r.setOpacity.bind(r),r.createVisual=r.createVisual.bind(r),r.strokePanel=new tt("Line color",V(i.defaultColorSet,["transparent"]),i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new tt("Fill color",V(i.defaultColorSet,["transparent"]),r.fillColor,Ct),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new st("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.opacityPanel=new bt("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return F(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=G.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},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),G.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&G.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&G.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&G.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&G.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&G.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this));return n.typeName=e.typeName,n},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.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e}(ot),St=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return F(e,t),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.tip1&&e!==this.tip2)},e.prototype.createTips=function(){this.tip1=G.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.tip1),this.tip2=G.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.tip2)},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.tip1&&this.tip2&&(G.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),G.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var 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 i=this.tip2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,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='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e}(dt),Et=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokePanel.colors=i.defaultColorSet,r.fillColor="transparent",r}return F(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='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e}(kt),_t=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,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.curveX=0,r.curveY=0,r.manipulationStartCurveX=0,r.manipulationStartCurveY=0,r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.positionGrips=r.positionGrips.bind(r),r.addControlGrips=r.addControlGrips.bind(r),r.adjustVisual=r.adjustVisual.bind(r),r.setupControlBox=r.setupControlBox.bind(r),r.resize=r.resize.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new st("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return F(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=G.createGroup(),this.selectorCurve=G.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=G.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()),G.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),G.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),G.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=G.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=G.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='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e}(ht),Nt=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}(),Tt=function(t){function e(e,n,i){var r=t.call(this,e,!1)||this;return r.dataUrl=n,r.state=i,r}return F(e,t),e}(Nt),Lt=function(t){function e(e,n,i){void 0===i&&(i=!1);var r=t.call(this,e,i)||this;return r.marker=n,r}return F(e,t),e}(Nt),At=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}(),Mt=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 _t,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 At,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new $(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,mt,vt,ft,Et,kt,xt,wt,St,yt,dt,Ot]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,mt,vt,ft,kt,xt,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,mt,vt,ft,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(),U.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 Nt(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return W(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 i=new Nt(e,!0);t(i),i.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 Nt(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this._availableMarkerTypes).push.apply(t,e)},t.prototype.addRenderEventListener=function(t){this.addEventListener("render",(function(e){t(e.dataUrl,e.state)}))},t.prototype.removeRenderEventListener=function(t){},t.prototype.addCloseEventListener=function(t){this.addEventListener("close",(function(){t()}))},t.prototype.removeCloseEventListener=function(t){},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return t.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupTargetResize=function(){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.editorCanvas.clientWidth/t>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/t;this.resize(e,n)},t.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},t.prototype.resize=function(t,e){this._isResizing=!0;var n=t/this.imageWidth,i=e/this.imageHeight;this.imageWidth=Math.round(t),this.imageHeight=Math.round(e),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,i),this._isResizing=!1},t.prototype.scaleMarkers=function(t,e){var n,i=this;this._currentMarker&&this._currentMarker instanceof ft?this._currentMarker.scale(t,e):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==i._currentMarker&&n.scale(t,e)})),void 0!==n&&this.setCurrentMarker(n)},t.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},t.prototype.setTopLeft=function(){var t=this.editingTarget.getBoundingClientRect(),e=this.editorCanvas.getBoundingClientRect();this.left=t.left-e.left,this.top=t.top-e.top},t.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},t.prototype.addDefs=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.defs=G.createDefs(),this.addDefsToImage(),(t=this.defs).append.apply(t,e)},t.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},t.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},t.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},t.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},t.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},t.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},t.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},t.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var t=document.createElement("a");t.href="https://markerjs.com/",t.target="_blank",t.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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 Z(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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new J(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},t.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.removeMarker=function(t){this.markerImage.removeChild(t.container),this.markers.indexOf(t)>-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 i=new Lt(t,t._currentMarker,!0);n(i),i.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 Lt(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new Lt(t,void 0,!0);n(i),i.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=i.markers[e];i.setCurrentMarker(i.markers[e]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(e){return e(new Lt(t,n))}))},i=this,r=this.markers.length-1;r>=0;r--)n(r);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 i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),i<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(e){return e(new Nt(t))}))}else this.undoRedoManager.replaceLastUndoStep(e),this.eventListeners.statechange.forEach((function(e){return e(new Nt(t))}))}},t.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},t.prototype.undoStep=function(){var t=this,e=this.undoRedoManager.undo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new Nt(t))})))},t.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},t.prototype.redoStep=function(){var t=this,e=this.undoRedoManager.redo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new Nt(t))})))},t.prototype.stepZoom=function(){var t=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=t<this.zoomSteps.length-1?this.zoomSteps[t+1]:this.zoomSteps[0]},t.prototype.panTo=function(t){this.contentDiv.scrollBy({left:this.prevPanPoint.x-t.x,top:this.prevPanPoint.y-t.y}),this.prevPanPoint=t},t.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var t,e,n=this;return W(this,(function(i){switch(i.label){case 0:return[4,this.render()];case 1:return t=i.sent(),e=this.getState(),this.eventListeners.render.forEach((function(i){return i(new Tt(n,t,e))})),this.close(!0),[2]}}))}))},t.prototype.getState=function(t){!0===t&&this.setCurrentMarker();var e={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(t){return e.markers.push(t.getState())})),e},t.prototype.restoreState=function(t){var e=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);t.markers.forEach((function(t){var n=e._availableMarkerTypes.find((function(e){return e.typeName===t.typeName}));if(void 0!==n){var i=e.addNewMarker(n);i.restoreState(t),e.markers.push(i)}})),t.width&&t.height&&(t.width!==this.imageWidth||t.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/t.width,this.imageHeight/t.height),this.eventListeners.restorestate.forEach((function(t){return t(new Nt(e))}))},t.prototype.addNewMarker=function(t){var e=G.createGroup();return this.markerImage.appendChild(e),new t(e,this.overlayContainer,this.settings)},t.prototype.createNewMarker=function(t){var e,n=this;(e="string"==typeof t?this._availableMarkerTypes.find((function(e){return e.typeName===t})):t)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(e),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(e.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(t){return t(new Lt(n,n._currentMarker))})))},t.prototype.markerCreated=function(t){var e=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(t),this.setCurrentMarker(t),t instanceof mt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(mt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(t){return t(new Lt(e,e._currentMarker))}))},t.prototype.colorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=t,this.settings.defaultStrokeColor=t)},t.prototype.fillColorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=t)},t.prototype.markerStateChanged=function(t){var e=this;this.eventListeners.markerchange.forEach((function(n){return n(new Lt(e,t))}))},t.prototype.setCurrentMarker=function(t){var e=this;this._currentMarker!==t&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(t){return t(new Lt(e,e._currentMarker))}))),this._currentMarker=t,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(t){return t(new Lt(e,e._currentMarker))})))},t.prototype.onPointerDown=function(t){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==t.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e?(this.setCurrentMarker(e),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:t.clientX,y:t.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY))},t.prototype.onDblClick=function(t){if(this._isFocused||this.focus(),"select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e&&e!==this._currentMarker&&this.setCurrentMarker(e),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target):this.setCurrentMarker()}},t.prototype.onPointerMove=function(t){1!==this.touchPoints&&"touch"===t.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||t.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(t.clientX,t.clientY)):this.zoomLevel>1&&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){U.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 Nt(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 Nt(t))})))},t.instanceCounter=0,t}(),jt=function(t,e){return(jt=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 Dt(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}jt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function It(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function Pt(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var Rt=function(){function t(){}return t.addKey=function(e){t.key=e},Object.defineProperty(t,"isLicensed",{get:function(){return!!t.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(t.key)},enumerable:!1,configurable:!0}),t}(),Bt=function(){function t(){}return t.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},t.setAttributes=function(t,e){for(var n=0,i=e;n<i.length;n++){var r=i[n],o=r[0],a=r[1];t.setAttribute(o,a)}},t.createRect=function(e,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",n.toString()),i&&t.setAttributes(r,i),r},t.createLine=function(e,n,i,r,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",e.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",i.toString()),a.setAttribute("y2",r.toString()),o&&t.setAttributes(a,o),a},t.createPolygon=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","polygon");return i.setAttribute("points",e),n&&t.setAttributes(i,n),i},t.createCircle=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",(e/2).toString()),i.setAttribute("cy",(e/2).toString()),i.setAttribute("r",e.toString()),n&&t.setAttributes(i,n),i},t.createEllipse=function(e,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(n/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(n/2).toString()),i&&t.setAttributes(r,i),r},t.createGroup=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&t.setAttributes(n,e),n},t.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},t.createMarker=function(e,n,i,r,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return t.setAttributes(l,[["id",e],["orient",n],["markerWidth",i.toString()],["markerHeight",r.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},t.createText=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),e&&t.setAttributes(n,e),n},t.createTSpan=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");return i.textContent=e,n&&t.setAttributes(i,n),i},t.createImage=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&t.setAttributes(n,e),n},t.createPoint=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=t,n.y=e,n},t.createPath=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",e),n&&t.setAttributes(i,n),i},t.createElement=function(e,n){var i=document.createElementNS("http://www.w3.org/2000/svg",e);return n&&t.setAttributes(i,n),i},t.getHollowRectanglePath=function(t,e,n,i,r,o,a,s){return"M"+t+","+e+"V"+(e+i)+"H"+(t+n)+"V"+e+"H"+r+"V"+o+"H"+(r+a)+"V"+(o+s)+"H"+r+"V"+e+"Z"},t}(),zt=function(){function t(t){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+t+"_"}return Object.defineProperty(t.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),t.prototype.addClass=function(t){return void 0===this.styleSheet&&this.addStyleSheet(),t.name=""+this.classNamePrefix+t.localName,this.classes.push(t),this.styleSheet.sheet.insertRule("."+t.name+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length),t},t.prototype.addRule=function(t){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(t),this.styleSheet.sheet.insertRule(t.selector+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length)},t.prototype.addStyleSheet=function(){var t;this.styleSheet=document.createElement("style"),(null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new Ht("_fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new Ht("_fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},t.prototype.removeStyleSheet=function(){var t;this.styleSheet&&((null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},t}(),Ft=function(t,e){this.selector=t,this.style=e},Ht=function(t,e){this.localName=t,this.style=e},Wt=function(){function t(){this.blocks=[],this.display=""}return t.prototype.addButtonBlock=function(t){t.className=this.blockClassName,t.buttonClassName=this.buttonClassName,t.buttonColorsClassName=this.buttonColorsClassName,t.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(t)},t.prototype.addElementBlock=function(t){void 0===t.className&&(t.className=this.blockClassName),this.blocks.push(t)},t.prototype.getUI=function(){var t=document.createElement("div");return t.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,t.style.display=this.display,this.blocks.forEach((function(e){return t.appendChild(e.getUI())})),t},t}(),Vt=function(){function t(){}return t.prototype.getUI=function(){var t=document.createElement("div");if(t.className=this.className,void 0!==this.minWidth&&(t.style.minWidth=this.minWidth),void 0!==this.contentAlign)switch(this.contentAlign){case"start":t.style.justifyContent="flex-start";break;case"center":t.style.justifyContent="center";break;case"end":t.style.justifyContent="flex-end"}return t.style.whiteSpace="nowrap",t},t}(),Gt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttons=[],e}return Dt(e,t),e.prototype.addButton=function(t){t.className=this.buttonClassName,t.colorsClassName=this.buttonColorsClassName,t.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(t)},e.prototype.getUI=function(){var e=t.prototype.getUI.call(this);return this.buttons.forEach((function(t){return e.appendChild(t.getUI())})),e},e}(Vt),Ut=function(){function t(t,e){this._isActive=!1,this._isHidden=!1,this._icon=t,this.title=e,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},set:function(t){this._isActive=t,this.adjustClassName()},enumerable:!1,configurable:!0}),t.prototype.getUI=function(){var t=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",(function(){return t.onClick()})),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},t.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},t.prototype.hide=function(){this._isHidden=!0},t}(),Kt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.elements=[],e}return Dt(e,t),e.prototype.addElement=function(t){this.elements.push(t)},e.prototype.getUI=function(){var e=t.prototype.getUI.call(this);return this.elements.forEach((function(t){return e.appendChild(t)})),e},e}(Vt),qt=function(){function t(t,e){this.horizontal=t,this.vertical=e}return Object.defineProperty(t.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),t.prototype.getVerticalLength=function(t){return t/this.ratio},t.prototype.getHorizontalLength=function(t){return t*this.ratio},t}(),$t=function(){function t(){}return t.getIcon=function(t,e){if(t>0&&e>0){var n=new qt(t,e),i=n.ratio>=1?20:n.getHorizontalLength(20),r=n.ratio<1?20:n.getVerticalLength(20),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(o);var a=Bt.createDefs();o.appendChild(a);var s=Bt.createElement("clipPath",[["id","text-bg-clip"]]);a.appendChild(s);var l=Bt.createPath(Bt.getHollowRectanglePath((24-i)/2,(24-r)/2,i,r,(24-i)/2+2,(24-r)/2+2,i-4,r-4));o.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),o.appendChild(c);var u=c.getBBox();Bt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Bt.createPath(Bt.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),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(o),o.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},t}(),Yt=function(t){function e(e,n,i){var r=t.call(this,e,n)||this;return r.isDropdownOpen=!1,r.onClick=r.dropdownButtonClicked,r.dropdownButtons=i,r}return Dt(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}(Ut),Xt=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.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 Bt.setAttributes(n,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,n,i){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=i,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&&Bt.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=Bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;e<this.numberOfGridLines;e++)this.horizontalGridLines.push(Bt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Bt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach((function(e){return t.gridContainer.appendChild(e)})),this.verticalGridLines.forEach((function(e){return t.gridContainer.appendChild(e)})),this.cropRectElement=Bt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Xt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Xt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Xt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Xt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},t.prototype.setCropRectangle=function(t){this.cropRect=t;var e=Object.assign({},this.cropRect);1!==this.zoomFactor&&(e.width=this.cropRect.width*this.zoomFactor,e.height=this.cropRect.height*this.zoomFactor,e.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-e.width/2,e.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Bt.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,i){var r=e.y+n*(i+1);Bt.setAttributes(t,[["x1",""+e.x],["y1",""+r],["x2",""+(e.x+e.width)],["y2",""+r]])}));var i=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,n){var r=e.x+i*(n+1);Bt.setAttributes(t,[["x1",""+r],["y1",""+e.y],["x2",""+r],["y2",""+(e.y+e.height)]])})),Bt.setAttributes(this.cropShadeElement,[["d",Bt.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,i=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+n<this.margin&&(n=this.margin-e.x),e.x+=n,e.width=this.cropRect.x+this.cropRect.width-e.x;break;case this.bottomRightGrip:case this.topRightGrip:e.width+n>this.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+=i,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+=i}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),i=this.aspectRatio.getVerticalLength(this.cropRect.width);n/this.canvasWidth<i/this.canvasHeight?this.cropRect.width=n:this.cropRect.height=i,this.cropRect.width>this.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,i,r,o){var a=n/t,s=i/e;return{x:(r.x-o)*a+o,y:(r.y-o)*s+o,width:r.width*a,height:r.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}(),Jt=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();Bt.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 i=n%5==0?this.height/3:this.height/6;e+="h4v"+-i+"h1v"+i}e+="v1H0Z",this.scaleShape=Bt.createPath(e);var r=Bt.createTransform();this.scaleShape.transform.baseVal.appendItem(r),t.appendChild(this.scaleShape),this.angleLabelElement=Bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var o=Bt.createTSpan("");return o.innerHTML="°",this.angleLabelElement.appendChild(o),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,i,r,o,a){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*i,c.height=t.height.baseVal.value-2*i;var u=1,h=1;!0===s.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*i)/o,h=e.naturalHeight/(t.height.baseVal.value-2*i)/a,c.width=e.naturalWidth/o,c.height=e.naturalHeight/a):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(r*Math.PI/180),d.scale(o,a),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var p=document.createElement("canvas");p.width=n.width*u,p.height=n.height*h,p.getContext("2d").putImageData(d.getImageData((n.x-i)*u,(n.y-i)*h,n.width*u,n.height*h),0,0),l(p.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 zt(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_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/t;this.resize(e,n)}},t.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},t.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Bt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},t.prototype.resize=function(t,e){this.imageWidth=Math.round(t),this.imageHeight=Math.round(e),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px","popup"!==this.displayMode?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},t.prototype.setEditingTarget=function(){var t=document.createElement("canvas");t.width=this.target.naturalWidth,t.height=this.target.naturalHeight,t.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var e=t.toDataURL();Bt.setAttributes(this.editingTarget,[["href",e]]),this.setEditingTargetSize()},t.prototype.setTopLeft=function(){var t=this.target.getBoundingClientRect(),e=this.editorCanvas.getBoundingClientRect();this.left=t.left-e.left-this.CANVAS_MARGIN,this.top=t.top-e.top-this.CANVAS_MARGIN},t.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Bt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Bt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Bt.createGroup(),this.editingTargetRotationScaleContainer=Bt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var t=Bt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(t);var e=Bt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(e),this.editingTargetContainer=Bt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},t.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},t.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Bt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Zt(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},t.prototype.zoomToCrop=function(){if(this.cropRect){var t=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,e=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=t+"px "+e+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-t+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-e+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},t.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},t.prototype.cropRectChanged=function(t){this.cropRect=t,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},t.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},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(this.addStyles(),"popup"===this.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,e=this.target.offsetTop>t+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 Wt,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 Gt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var n=[];this.aspectRatios.forEach((function(e){var i=new Ut($t.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);i.onClick=function(){return t.ratioButtonClicked(e)},n.push(i)})),this.aspectRatioButton=new Yt($t.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 i=new Ut('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");i.isActive=this.isGridVisible,i.onClick=function(){t.isGridVisible=!t.isGridVisible,i.isActive=t.isGridVisible},e.addButton(i);var r=new Ut('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(r.isActive=this.zoomToCropEnabled,r.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,r.isActive=t.zoomToCropEnabled},e.addButton(r),!Rt.isLicensed){var o=new Kt;this.topToolbar.addElementBlock(o);var a=document.createElement("div");a.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='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',a.appendChild(s),o.addElement(a)}var l=new Gt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Ut('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Ut('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"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 Wt,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 Gt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var n=new Ut('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");n.onClick=this.rotateLeftButtonClicked,e.addButton(n);var i=new Ut('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");i.onClick=this.rotateRightButtonClicked,e.addButton(i);var r=new Kt;r.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(r),this.straightener=new Jt("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},r.addElement(this.straightener.getUI());var o=new Gt;o.minWidth=2*this.toolbarHeight+"px",o.contentAlign="end",this.bottomToolbar.addButtonBlock(o);var a=new Ut('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");a.onClick=this.flipHorizontallyButtonClicked,o.addButton(a);var s=new Ut('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,o.addButton(s)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=$t.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 It(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 It(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(),Bt.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 Ft("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ft("."+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),ie=/<pre[^>]*>/g;e.a=function(t){var e=t.value,n=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,p=t.className,f=t.showTextOnly,m=t.showLines,g=t.replaces,v=t.zoomImg,y=t.hasMask,w=t.style,k=void 0===w?{}:w,S=t.stylesPrev,E=void 0===S?{}:S,N=String(n),T=Object(u.useRef)(),L=Object(u.useRef)(),A=Object(u.useState)(""),j=Object(s.a)(A,2),z=j[0],F=j[1],H=Object(u.useState)("office"),W=Object(s.a)(H,2),V=W[0],G=W[1],U=Object(u.useMemo)((function(){try{N=(N=N.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+I.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+I.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+I.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("(?<!\\n)\\n(?!\\n)","g")," \n")}catch(t){}var t=M(N),e=_;if(N.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",C()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,n){var i=e[n],r=i.type,o=i.expression;return Object(P.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),O(),f){var n=document.createElement("div");return n.innerHTML=t,n.innerText}return setTimeout((function(){return $()}),500),t}),[N]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var n=e.getAttribute("src");F(n),G("image")}}else if("A"===e.tagName.toUpperCase()){var i=e.getAttribute("href");if(i.indexOf("office")>-1)t.preventDefault(),F(i),G("office");else if(i.indexOf("application/pdf")>-1)t.preventDefault(),F(i),G("pdf");else if(i.indexOf("type=text")>-1)t.preventDefault(),F(i),G("html");else if(i.startsWith("#")){t.preventDefault();var r=document.getElementById(i.replace("#",""));r&&r.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(k=Object(o.a)(Object(o.a)({},k),x));var $=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(D.a.isSupported()){var e=new D.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&U&&U.match(ie)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),O(),b()}}),[U,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(o.a)({},k),className:"".concat(p||""," markdown-body ").concat(ne.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(T.current.style.display="flex",T.current.style.width=t.target.clientWidth+"px",T.current.style.height=t.target.clientHeight+"px",T.current.style.top=t.target.offsetTop+"px",T.current.style.left=t.target.offsetLeft+"px",L.current.src=t.target.getAttribute("src")):T.current.style.display="none")},dangerouslySetInnerHTML:{__html:U}}),h.a.createElement("div",{ref:T,className:ne.a.button},h.a.createElement(i.a,null,h.a.createElement(r.a,{onClick:function(){return(t=new te(L.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(a.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return T.current.style.display="none",t.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(n=t.sent)&&n.id&&g(L.current.getAttribute("src").replace(I.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(r.a,{onClick:function(){return(t=new Mt(L.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(a.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(T.current.style.display="none",!L.current){t.next=6;break}return t.next=4,Object(B.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&&g(L.current.getAttribute("src").replace(I.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:L,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(R.a,{close:!0,data:z,hasMask:y,type:null!=z&&z.length?V:"",style:Object(o.a)({},E),onClose:function(){return F("")}}))}},"9VGf":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/components/useInterval.tsx ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(/*! react */"q1tI");function r(t,e){var n=Object(i.useRef)();Object(i.useEffect)((function(){n.current=t})),Object(i.useEffect)((function(){if(null!==e){var t=setInterval((function(){n.current()}),e);return function(){return clearInterval(t)}}}),[e])}},"A+k2":
|
|
|
/*!*************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/Tabs/index.less?modules ***!
|
|
|
\*************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={tabs:"tabs___2hYAP",active:"active___2Xkwd"}},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(a,s,l){if(l!=t.Init&&l&&a.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:i(e,!0)}(e)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return t.Pass;for(var a=i.listSelections(),s=[],l=i.getOption("autoCloseTags"),c=0;c<a.length;c++){if(!a[c].empty())return t.Pass;var u=a[c].head,h=i.getTokenAt(u),d=t.innerMode(i.getMode(),h.state),p=d.state,f=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(p),m=f&&f.name;if(!m)return t.Pass;var g="html"==d.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&e,y="object"==typeof l&&l.indentTags||g&&n;h.end>u.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&f.close||h.string.indexOf("/")==u.ch-h.start-1||v&&r(v,b)>-1||o(i,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p)||[],m,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&r(x,m)>-1)s[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var C=y&&r(y,b)>-1;s[c]={indent:C,text:">"+(C?"\n\n":"")+"</"+m+">",newPos:C?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var w="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var k=s[c];i.replaceRange(k.text,a[c].head,a[c].anchor,"+insert");var S=i.listSelections().slice(0);S[c]={head:k.newPos,anchor:k.newPos},i.setSelections(S),!w&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}(i)}),a.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 i(e,n){for(var i=e.listSelections(),r=[],a=n?"/":"</",s=e.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return t.Pass;var u=i[c].head,h=e.getTokenAt(u),d=t.innerMode(e.getMode(),h.state),p=d.state;if(n&&("string"==h.type||"<"!=h.string.charAt(0)||h.start!=u.ch-1))return t.Pass;var f,m="xml"!=d.mode.name&&"htmlmixed"==e.getMode().name;if(m&&"javascript"==d.mode.name)f=a+"script";else if(m&&"css"==d.mode.name)f=a+"style";else{var g=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p);if(!g||g.length&&o(e,g,g[g.length-1],u))return t.Pass;f=a+g[g.length-1]}">"!=e.getLine(u.line).charAt(h.end)&&(f+=">"),r[c]=f}if(e.replaceSelections(r),i=e.listSelections(),!l)for(c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&e.indentLine(i[c].head.line)}function r(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;++n)if(t[n]==e)return n;return-1}function o(e,n,i,r,o){if(!t.scanForClosingTag)return!1;var a=Math.min(e.lastLine()+1,r.line+500),s=t.scanForClosingTag(e,r,null,a);if(!s||s.tag!=i)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==i;c--)++l;for(r=s.to,c=1;c<l;c++){var u=t.scanForClosingTag(e,r,null,a);if(!u||u.tag!=i)return!1;r=u.to}return!0}t.commands.closeTag=function(t){return i(t)}}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../fold/xml-fold */"osHv"))},BjJ7:
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/pages/tasks/util.js ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: isCompileOk, getTreeData, processTreeData, debounce, isProd, apiPref */
|
|
|
/*! exports used: apiPref, debounce, getTreeData, isCompileOk, processTreeData */function(t,e,n){"use strict";function i(t){var e=!0;if(t.length>0){for(var n=0;n<t.length;n++)if(0==t[n].compile_success||!t[n].compile_success){e=!1;break}}else e=!1;return e}function r(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=0;i<t.length;i++){var r=t[i],o=e?"".concat(e,"/").concat(r.name):"".concat(r.name);n.push({title:r.name,isLeaf:"tree"!==r.type,key:o})}return n}function o(t,e,n){for(var i=0;i<t.length;i++){var r=t[i];if(r.key===e){r.children=n;break}r.children&&o(r.children,e,n)}return t}function a(t,e,n){var i;return function(){var r=this,o=arguments,a=function(){i=null,n||t.apply(r,o)},s=n&&!i;clearTimeout(i),i=setTimeout(a,e),s&&t.apply(r,o)}}n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s}));var s=n(/*! @/utils/env */"m3rI").a.API_SERVER},"C+DQ":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/css/iconfont.css ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},"C/vA":
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/functional.js ***!
|
|
|
\*********************************************************************/
|
|
|
/*! exports provided: once */
|
|
|
/*! exports used: once */function(t,e,n){"use strict";function i(t){var e,n=this,i=!1;return function(){return i?e:(i=!0,e=t.apply(n,arguments))}}n.d(e,"a",(function(){return i}))},"Cg/j":
|
|
|
/*!******************************************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js ***!
|
|
|
\******************************************************************************************/
|
|
|
/*! exports provided: _util, IInstantiationService, createDecorator, optional */
|
|
|
/*! exports used: IInstantiationService, _util, createDecorator, optional */function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies",t.getServiceDependencies=function(e){return e[t.DI_DEPENDENCIES]||[]}}(i||(i={}));var r=a("instantiationService");function o(t,e,n,r){e[i.DI_TARGET]===e?e[i.DI_DEPENDENCIES].push({id:t,index:n,optional:r}):(e[i.DI_DEPENDENCIES]=[{id:t,index:n,optional:r}],e[i.DI_TARGET]=e)}function a(t){if(i.serviceIds.has(t))return i.serviceIds.get(t);var e=function(t,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");o(e,t,i,!1)};return e.toString=function(){return t},i.serviceIds.set(t,e),e}function s(t){return function(e,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");o(t,e,i,!0)}}},DlQD:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/marked/lib/marked.js ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function n(t,n){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}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(i=t[Symbol.iterator]()).next.bind(i)}var i=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}}})),r=(i.defaults,i.getDefaults,i.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\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,p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){m[" "+t]||(g.test(t)?m[" "+t]=t+"/":m[" "+t]=x(t,"/",!0));var n=-1===(t=m[" "+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 i=t.length;if(0===i)return"";for(var r=0;r<i;){var o=t.charAt(i-r-1);if(o!==e||n){if(o===e||!n)break;r++}else r++}return t.substr(0,i-r)}var C=function(t,e){if(e){if(r.test(t))return t.replace(o,c)}else if(a.test(t))return t.replace(s,c);return t},w=h,k=function(t,e){t=t.source||t,e=e||"";var n={replace:function(e,i){return i=(i=i.source||i).replace(d,"$1"),t=t.replace(e,i),n},getRegex:function(){return new RegExp(t,e)}};return n},S=function(t,e,n){if(t){var i;try{i=decodeURIComponent(h(n)).replace(p,"").toLowerCase()}catch(t){return null}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return null}e&&!f.test(n)&&(n=b(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},E={exec:function(){}},_=function(t){for(var e,n,i=1;i<arguments.length;i++)for(n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},O=function(t,e){var n=t.replace(/\|/g,(function(t,e,n){for(var i=!1,r=e;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n},N=x,T=function(t,e){if(-1===t.indexOf(e[1]))return-1;for(var n=t.length,i=0,r=0;r<n;r++)if("\\"===t[r])r++;else if(t[r]===e[0])i++;else if(t[r]===e[1]&&--i<0)return r;return-1},L=function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},A=i.defaults,M=N,j=O,D=C,I=T;function P(t,e,n){var i=e.href,r=e.title?D(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:i,title:r,text:o}:{type:"image",raw:n,href:i,title:r,text:D(o)}}var R=function(){function t(t){this.options=t||A}var e=t.prototype;return e.space=function(t){var e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var n=this.rules.block.code.exec(t);if(n){var i=e[e.length-1];if(i&&"paragraph"===i.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:M(r,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],i=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var i=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=i.length?t.slice(i.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:i}}},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:j(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 i,r=n.align.length;for(i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=j(n.cells[i],n.header.length);return n}}},e.hr=function(t){var e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}},e.blockquote=function(t){var e=this.rules.block.blockquote.exec(t);if(e){var n=e[0].replace(/^ *> ?/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,i,r,o,a,s,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],p={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},f=e[0].match(this.rules.block.item),m=!1,g=f.length,v=0;v<g;v++)c=n=f[v],i=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(i-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+i+"}","gm"),"")),v!==g-1&&(r=this.rules.block.bullet.exec(f[v+1])[0],(h?1===r.length||!d&&")"===r[r.length-1]:r.length>1||this.options.smartLists&&r!==u)&&(o=f.slice(v+1).join("\n"),p.raw=p.raw.substring(0,p.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(p.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),p.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return p}},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]):D(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:j(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 i,r=n.align.length;for(i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=j(n.cells[i].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},e.lheading=function(t){var e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}},e.paragraph=function(t){var e=this.rules.block.paragraph.exec(t);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}},e.text=function(t,e){var n=this.rules.block.text.exec(t);if(n){var i=e[e.length-1];return i&&"text"===i.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},e.escape=function(t){var e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:D(e[1])}},e.tag=function(t,e,n){var i=this.rules.inline.tag.exec(t);if(i)return!e&&/^<a /i.test(i[0])?e=!0:e&&/^<\/a>/i.test(i[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):D(i[0]):i[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=I(e[2],"()");if(n>-1){var i=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,i).trim(),e[3]=""}var r=e[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);a?(r=a[1],o=a[3]):o=""}else o=e[3]?e[3].slice(1,-1):"";return P(e,{href:(r=r.trim().replace(/^<([\s\S]*)>$/,"$1"))?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},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 i=(n[2]||n[1]).replace(/\s+/g," ");if(!(i=e[i.toLowerCase()])||!i.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return P(n,i,n[0])}},e.strong=function(t,e,n){void 0===n&&(n="");var i=this.rules.inline.strong.start.exec(t);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var r,o="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(i=o.exec(e));)if(r=this.rules.inline.strong.middle.exec(e.slice(0,i.index+3)))return{type:"strong",raw:t.slice(0,r[0].length),text:t.slice(2,r[0].length-2)}}},e.em=function(t,e,n){void 0===n&&(n="");var i=this.rules.inline.em.start.exec(t);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var r,o="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(i=o.exec(e));)if(r=this.rules.inline.em.middle.exec(e.slice(0,i.index+2)))return{type:"em",raw:t.slice(0,r[0].length),text:t.slice(1,r[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),i=/[^ ]/.test(n),r=n.startsWith(" ")&&n.endsWith(" ");return i&&r&&(n=n.substring(1,n.length-1)),n=D(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,i,r=this.rules.inline.autolink.exec(t);if(r)return i="@"===r[2]?"mailto:"+(n=D(this.options.mangle?e(r[1]):r[1])):n=D(r[1]),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},e.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var i,r;if("@"===n[2])r="mailto:"+(i=D(this.options.mangle?e(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);i=D(n[0]),r="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}},e.inlineText=function(t,e,n){var i,r=this.rules.inline.text.exec(t);if(r)return i=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):D(r[0]):r[0]:D(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}},t}(),B=E,z=k,F=_,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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,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=z(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=z(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=z(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=/<!--(?!-?>)[\s\S]*?-->/,H.html=z(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=z(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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=z(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=F({},H),H.gfm=F({},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=z(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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=z(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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=F({},H.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:z(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 W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};W.punctuation=z(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",W._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",W.em.start=z(W.em.start).replace(/punctuation/g,W._punctuation).getRegex(),W.em.middle=z(W.em.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.em.endAst=z(W.em.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.em.endUnd=z(W.em.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.start=z(W.strong.start).replace(/punctuation/g,W._punctuation).getRegex(),W.strong.middle=z(W.strong.middle).replace(/punctuation/g,W._punctuation).replace(/blockSkip/g,W._blockSkip).getRegex(),W.strong.endAst=z(W.strong.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.endUnd=z(W.strong.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=z(W._blockSkip,"g").getRegex(),W.overlapSkip=z(W._overlapSkip,"g").getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._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])?)+(?![-_])/,W.autolink=z(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=z(W.tag).replace("comment",H._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=z(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=z(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=z(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=F({},W),W.pedantic=F({},W.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:z(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=F({},W.normal,{escape:z(W.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),W.gfm.url=z(W.gfm.url,"i").replace("email",W.gfm._extended_email).getRegex(),W.breaks=F({},W.gfm,{br:z(W.br).replace("{2,}","*").getRegex(),text:z(W.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var V={block:H,inline:W},G=i.defaults,U=V.block,K=V.inline;function q(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function $(t){var e,n,i="",r=t.length;for(e=0;e<r;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}var Y=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||G,this.options.tokenizer=this.options.tokenizer||new R,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:U.normal,inline:K.normal};this.options.pedantic?(e.block=U.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=U.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,i,r,o=e.prototype;return o.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},o.blockTokens=function(t,e,n){var i,r,o,a;for(void 0===e&&(e=[]),void 0===n&&(n=!0),t=t.replace(/^ +$/gm,"");t;)if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),i.type&&e.push(i);else if(i=this.tokenizer.code(t,e))t=t.substring(i.raw.length),i.type?e.push(i):((a=e[e.length-1]).raw+="\n"+i.raw,a.text+="\n"+i.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.nptable(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],n),e.push(i);else if(i=this.tokenizer.list(t)){for(t=t.substring(i.raw.length),o=i.items.length,r=0;r<o;r++)i.items[r].tokens=this.blockTokens(i.items[r].text,[],!1);e.push(i)}else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(n&&(i=this.tokenizer.def(t)))t=t.substring(i.raw.length),this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else if(n&&(i=this.tokenizer.paragraph(t)))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.text(t,e))t=t.substring(i.raw.length),i.type?e.push(i):((a=e[e.length-1]).raw+="\n"+i.raw,a.text+="\n"+i.text);else if(t){var s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return e},o.inline=function(t){var e,n,i,r,o,a,s=t.length;for(e=0;e<s;e++)switch((a=t[e]).type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},r=a.header.length,n=0;n<r;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(r=a.cells.length,n=0;n<r;n++)for(o=a.cells[n],a.tokens.cells[n]=[],i=0;i<o.length;i++)a.tokens.cells[n][i]=[],this.inlineTokens(o[i],a.tokens.cells[n][i]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(r=a.items.length,n=0;n<r;n++)this.inline(a.items[n].tokens)}return t},o.inlineTokens=function(t,e,n,i,r){var o;void 0===e&&(e=[]),void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===r&&(r="");var a,s=t;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(o=this.tokenizer.escape(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.tag(t,n,i))t=t.substring(o.raw.length),n=o.inLink,i=o.inRawBlock,e.push(o);else if(o=this.tokenizer.link(t))t=t.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,i)),e.push(o);else if(o=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,i)),e.push(o);else if(o=this.tokenizer.strong(t,s,r))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),e.push(o);else if(o=this.tokenizer.em(t,s,r))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),e.push(o);else if(o=this.tokenizer.codespan(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.br(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.del(t))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),e.push(o);else if(o=this.tokenizer.autolink(t,$))t=t.substring(o.raw.length),e.push(o);else if(n||!(o=this.tokenizer.url(t,$))){if(o=this.tokenizer.inlineText(t,i,q))t=t.substring(o.raw.length),r=o.raw.slice(-1),e.push(o);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(o.raw.length),e.push(o);return e},n=e,r=[{key:"rules",get:function(){return{block:U,inline:K}}}],(i=null)&&t(n.prototype,i),r&&t(n,r),e}(),X=i.defaults,Z=S,J=C,Q=function(){function t(t){this.options=t||X}var e=t.prototype;return e.code=function(t,e,n){var i=(e||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(t,i);null!=r&&r!==t&&(n=!0,t=r)}return i?'<pre><code class="'+this.options.langPrefix+J(i,!0)+'">'+(n?t:J(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:J(t,!0))+"</code></pre>\n"},e.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},e.html=function(t){return t},e.heading=function(t,e,n,i){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+i.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"},e.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},e.list=function(t,e,n){var i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+i+">\n"},e.listitem=function(t){return"<li>"+t+"</li>\n"},e.checkbox=function(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},e.paragraph=function(t){return"<p>"+t+"</p>\n"},e.table=function(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"},e.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},e.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"},e.strong=function(t){return"<strong>"+t+"</strong>"},e.em=function(t){return"<em>"+t+"</em>"},e.codespan=function(t){return"<code>"+t+"</code>"},e.br=function(){return this.options.xhtml?"<br/>":"<br>"},e.del=function(t){return"<del>"+t+"</del>"},e.link=function(t,e,n){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return n;var i='<a href="'+J(t)+'"';return e&&(i+=' title="'+e+'"'),i+=">"+n+"</a>"},e.image=function(t,e,n){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return n;var i='<img src="'+t+'" alt="'+n+'"';return e&&(i+=' title="'+e+'"'),i+=this.options.xhtml?"/>":">"},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=i.defaults,it=w,rt=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,i,r,o,a,s,l,c,u,h,d,p,f,m,g,v,y,b,x="",C=t.length;for(n=0;n<C;n++)switch((h=t[n]).type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(h.tokens),h.depth,it(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",l="",o=h.header.length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(h.tokens.header[i]),{header:!0,align:h.align[i]});for(c+=this.renderer.tablerow(l),u="",o=h.cells.length,i=0;i<o;i++){for(l="",a=(s=h.tokens.cells[i]).length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(s[r]),{header:!1,align:h.align[r]});u+=this.renderer.tablerow(l)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(d=h.ordered,p=h.start,f=h.loose,o=h.items.length,u="",i=0;i<o;i++)v=(g=h.items[i]).checked,y=g.task,m="",g.task&&(b=this.renderer.checkbox(v),f?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,f),u+=this.renderer.listitem(m,y,v);x+=this.renderer.list(u,d,p);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+1<C&&"text"===t[n+1].type;)u+="\n"+((h=t[++n]).tokens?this.parseInline(h.tokens):h.text);x+=e?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return x},e.parseInline=function(t,e){e=e||this.renderer;var n,i,r="",o=t.length;for(n=0;n<o;n++)switch((i=t[n]).type){case"escape":r+=e.text(i.text);break;case"html":r+=e.html(i.text);break;case"link":r+=e.link(i.href,i.title,this.parseInline(i.tokens,e));break;case"image":r+=e.image(i.href,i.title,i.text);break;case"strong":r+=e.strong(this.parseInline(i.tokens,e));break;case"em":r+=e.em(this.parseInline(i.tokens,e));break;case"codespan":r+=e.codespan(i.text);break;case"br":r+=e.br();break;case"del":r+=e.del(this.parseInline(i.tokens,e));break;case"text":r+=e.text(i.text);break;default:var a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return r},t}(),ot=_,at=L,st=C,lt=i.getDefaults,ct=i.changeDefaults,ut=i.defaults;function ht(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),e=ot({},ht.defaults,e||{}),at(e),n){var i,r=e.highlight;try{i=Y.lex(t,e)}catch(t){return n(t)}var o=function(t){var o;if(!t)try{o=rt.parse(i,e)}catch(e){t=e}return e.highlight=r,t?n(t):n(null,o)};if(!r||r.length<3)return o();if(delete e.highlight,!i.length)return o();var a=0;return ht.walkTokens(i,(function(t){"code"===t.type&&(a++,setTimeout((function(){r(t.text,t.lang,(function(e,n){if(e)return o(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),0==--a&&o()}))}),0))})),void(0===a&&o())}try{var s=Y.lex(t,e);return e.walkTokens&&ht.walkTokens(s,e.walkTokens),rt.parse(s,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+st(t.message+"",!0)+"</pre>";throw t}}return ht.options=ht.setOptions=function(t){return ot(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=ot({},t);if(t.renderer&&function(){var n=ht.defaults.renderer||new Q,i=function(e){var i=n[e];n[e]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var s=t.renderer[e].apply(n,o);return!1===s&&(s=i.apply(n,o)),s}};for(var r in t.renderer)i(r);e.renderer=n}(),t.tokenizer&&function(){var n=ht.defaults.tokenizer||new R,i=function(e){var i=n[e];n[e]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var s=t.tokenizer[e].apply(n,o);return!1===s&&(s=i.apply(n,o)),s}};for(var r in t.tokenizer)i(r);e.tokenizer=n}(),t.walkTokens){var n=ht.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens(e),n&&n(e)}}ht.setOptions(e)},ht.walkTokens=function(t,e){for(var i,r=n(t);!(i=r()).done;){var o=i.value;switch(e(o),o.type){case"table":for(var a,s=n(o.tokens.header);!(a=s()).done;){var l=a.value;ht.walkTokens(l,e)}for(var c,u=n(o.tokens.cells);!(c=u()).done;)for(var h,d=n(c.value);!(h=d()).done;){var p=h.value;ht.walkTokens(p,e)}break;case"list":ht.walkTokens(o.items,e);break;default:o.tokens&&ht.walkTokens(o.tokens,e)}}},ht.Parser=rt,ht.parser=rt.parse,ht.Renderer=Q,ht.TextRenderer=tt,ht.Lexer=Y,ht.lexer=Y.lex,ht.Tokenizer=R,ht.Slugger=et,ht.parse=ht,ht}()},"Dvv+":
|
|
|
/*!************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/index.tsx + 4 modules ***!
|
|
|
\************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! all exports used */
|
|
|
/*! 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/Paperlibrary/Random/AddAndEdit/components/StepTwo/CustomTree/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/ProCheckout/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/Tabs/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/AddTags/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/List/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/problemset.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/bi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/median.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/shu.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/sren.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/te.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/wenhao.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/wenjian.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/xixi.svg (<- 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/checkbox/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/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/radio/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! 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);n("cWXX");var i=n("/ezw"),r=(n("+L6B"),n("2/Rp")),o=(n("7Kak"),n("9yH6")),a=(n("giR+"),n("fyUT")),s=n("9og8"),l=n("k1fw"),c=(n("y8nQ"),n("Vl3Y")),u=n("tJVT"),h=(n("5NDa"),n("5rEg")),d=n("WmNS"),p=n.n(d),f=n("q1tI"),m=n.n(f),g=n("Ty5D"),v=n("9kvl"),y=n("m3fD"),b=n.n(y),x=n("A+k2"),C=n.n(x),w=function(t){var e=t.value,n=void 0===e?[]:e,i=t.onChange,r=t.className,o=void 0===r?"":r;return m.a.createElement("div",{className:"".concat(C.a.tabs," ").concat(o," ")},m.a.createElement("div",{onClick:function(){return i(0)},className:0===n?C.a.active:""},m.a.createElement("div",null,"1"),m.a.createElement("div",null,"录入信息")," "),m.a.createElement("div",{onClick:function(){return i(1)},className:1===n?C.a.active:""},m.a.createElement("div",null,"2"),m.a.createElement("div",null,"配置组卷")))},k=(n("2qtc"),n("kLXV")),S=(n("sRBo"),n("kaz8")),E=(n("5Dmo"),n("3S7+")),_=(n("miYZ"),n("tsqr")),O=n("oBTY"),N=n("IlMy"),T=n.n(N),L=n("WCUW"),A=n("QSKd"),M=n.n(A),j=n("Hfvn"),D=n.n(j),I=n("HPRh"),P=n.n(I),R=n("+RXH"),B=n.n(R),z=n("+yhJ"),F=n.n(z),H=n("RZ/O"),W=n.n(H),V=n("exQ7"),G=n.n(V),U=n("HG2Q"),K=n.n(U),q=n("k4n4"),$=n("eS0+"),Y=n("PpiC"),X=n("K5AI"),Z=n.n(X),J=n("LvDl"),Q=S.a.Group,tt=function(t){var e=t.value,n=void 0===e?[]:e,i=t.onChange,r=t.options,o=t.search,a=(Object(Y.a)(t,["value","onChange","options","search"]),m.a.useState(!1)),s=Object(u.a)(a,2),c=s[0],h=s[1];Object(f.useEffect)((function(){var t,e=null==r||null===(t=r.tag_disciplines)||void 0===t?void 0:t.map((function(t){return t.id})),i=null==n?void 0:n.filter((function(t){return e.includes(t)}));h(i.length===(null==e?void 0:e.length))}),[n]);console.log(r,"options");return 0!==(null==r?void 0:r.item_count)&&function(){var t,e=!1;o?null===(t=r.tag_disciplines)||void 0===t||t.forEach((function(t){var n;e||(e=(null===(n=t.name)||void 0===n?void 0:n.includes(o))&&0!==t.item_count)})):e=!0;return e}()?m.a.createElement("div",{className:Z.a.cInput},m.a.createElement("div",{className:Z.a.cl},m.a.createElement(S.a,{checked:c,onChange:function(t){var e,o=null==r||null===(e=r.tag_disciplines)||void 0===e?void 0:e.map((function(t){return t.id}));i(t.target.checked?Object(J.uniq)([].concat(Object(O.a)(n),Object(O.a)(o))):null==n?void 0:n.filter((function(t){return!o.includes(t)}))),h(t.target.checked)}},m.a.createElement("span",{className:Z.a.box},m.a.createElement("span",{className:"font14 c-light-primary"},m.a.createElement("span",{title:null==r?void 0:r.name,className:Z.a.box1}," ",null==r?void 0:r.name),m.a.createElement("span",null," ","(".concat(null==r?void 0:r.item_count,")"))),m.a.createElement("i",{className:"iconfont icon-lujing font12 ml5"})))),m.a.createElement("div",{className:Z.a.cr},m.a.createElement(Q,{options:function(){var t,e,n,i=(null==r?void 0:r.tag_disciplines)||[];o&&(i=null===(n=i)||void 0===n?void 0:n.filter((function(t){var e;return null==t||null===(e=t.name)||void 0===e?void 0:e.includes(o)})));return i=null===(e=i=null===(t=i)||void 0===t?void 0:t.map((function(t){return Object(l.a)(Object(l.a)({},t),{},{label:"".concat(t.name,"(".concat(null==t?void 0:t.item_count,")")),value:t.id})})))||void 0===e?void 0:e.filter((function(t){return 0!==t.item_count}))}(),value:n,onChange:function(t){var e,o,a=null==r||null===(e=r.tag_disciplines)||void 0===e?void 0:e.map((function(t){return t.id})),s=null==n?void 0:n.filter((function(t){return a.includes(t)})),l=Object(J.uniq)([].concat(Object(O.a)(n),Object(O.a)(t)));if(s.length>t.length){var c=Object(J.xor)(s,t);console.log(c,"newLevel"),l=l.filter((function(t){return!c.includes(t)}))}i(l),h(t.length===(null==r||null===(o=r.tag_disciplines)||void 0===o?void 0:o.length))}}))):m.a.createElement(m.a.Fragment,null)},et=n("ErOA"),nt=(n("ozfa"),n("MJZm")),it=n("0Owb"),rt=n("tmPe"),ot=n.n(rt),at=function(t){var e=t.value,n=t.onChange,i=t.defaultValue,r=t.treeData,o=void 0===r?[]:r,a=Object(Y.a)(t,["value","onChange","defaultValue","treeData"]);return m.a.createElement("div",{className:ot.a.customTree},m.a.createElement(nt.a,Object(it.a)({multiple:!0,showIcon:!0,selectedKeys:e,defaultExpandedKeys:i,treeData:o,onSelect:n},a)))},st=n("sbIO"),lt=h.a.Search,ct=function(t){var e,n=t.formValue,o=t.setFatherTabs,a=t.tabs,c=t.editData,h=t.dispatch,d=Object(g.i)().id,y=Object(f.useState)(["mine"]),b=Object(u.a)(y,2),x=b[0],C=b[1],N=Object(f.useState)(!0),A=Object(u.a)(N,2),j=A[0],I=A[1],R=Object(f.useState)(!1),z=Object(u.a)(R,2),H=z[0],V=z[1],U=Object(f.useState)(!1),Y=Object(u.a)(U,2),X=Y[0],Z=Y[1],Q=Object(f.useState)(""),nt=Object(u.a)(Q,2),it=nt[0],rt=nt[1],ot=Object(f.useState)(!1),ct=Object(u.a)(ot,2),ut=ct[0],ht=ct[1],dt=Object(f.useState)(!1),pt=Object(u.a)(dt,2),ft=pt[0],mt=pt[1],gt=Object(f.useState)({}),vt=Object(u.a)(gt,2),yt=vt[0],bt=vt[1],xt=Object(f.useState)([]),Ct=Object(u.a)(xt,2),wt=Ct[0],kt=Ct[1],St=Object(f.useState)([]),Et=Object(u.a)(St,2),_t=Et[0],Ot=Et[1],Nt=Object(f.useState)([]),Tt=Object(u.a)(Nt,2),Lt=Tt[0],At=Tt[1],Mt=Object(f.useState)([]),jt=Object(u.a)(Mt,2),Dt=jt[0],It=jt[1],Pt=Object(f.useState)(null),Rt=Object(u.a)(Pt,2),Bt=Rt[0],zt=Rt[1],Ft=Object(f.useRef)([]),Ht=Object(f.useState)(!1),Wt=Object(u.a)(Ht,2),Vt=Wt[0],Gt=Wt[1],Ut=Object(f.useState)([]),Kt=Object(u.a)(Ut,2),qt=Kt[0],$t=Kt[1],Yt=Object(f.useState)([0]),Xt=Object(u.a)(Yt,2),Zt=Xt[0],Jt=Xt[1],Qt=Object(f.useState)([]),te=Object(u.a)(Qt,2),ee=te[0],ne=te[1],ie=Object(f.useRef)([]),re=Object(f.useState)(!1),oe=Object(u.a)(re,2),ae=oe[0],se=oe[1],le=Object(f.useState)([]),ce=Object(u.a)(le,2),ue=ce[0],he=ce[1],de=Object(f.useState)([]),pe=Object(u.a)(de,2),fe=pe[0],me=pe[1],ge=Object(f.useRef)([]),ve=Object(f.useState)([]),ye=Object(u.a)(ve,2),be=ye[0],xe=ye[1],Ce=Object(f.useState)(!1),we=Object(u.a)(Ce,2),ke=we[0],Se=we[1],Ee=Object(f.useRef)([]),_e=Object(f.useState)(0),Oe=Object(u.a)(_e,2),Ne=Oe[0],Te=Oe[1],Le=null==ee?void 0:ee.filter((function(t){return null==qt?void 0:qt.includes(t.id)})),Ae=null==fe?void 0:fe.filter((function(t){return null==ue?void 0:ue.includes(t.id)}));Object(f.useEffect)((function(){Re()}),[]),Object(f.useEffect)((function(){return 1===a&&(h({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),h({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1})),function(){h({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),h({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}}),[a]),Object(f.useEffect)((function(){d?c&&Be():(Fe(x),He(),I(!1))}),[c]),Object(f.useEffect)((function(){it&&Ie()}),[it]);var Me,je,De,Ie=function(){var t=null;null==_t||_t.forEach((function(e){var n;null===(n=e.sub_disciplines)||void 0===n||n.forEach((function(n){var i;null===(i=n.tag_disciplines)||void 0===i||i.forEach((function(n){var i;(null===(i=n.name)||void 0===i?void 0:i.includes(it))&&0!==n.item_count&&!t&&(t=e.id)}))}))})),t&&zt(t)},Pe=function(t){return null==t?void 0:t.map((function(t){return function t(e){var n=e.children,i=Array.isArray(n)&&n.length>0,r=null==e?void 0:e.group_id;return Ee.current.push({name:null==e?void 0:e.name,id:r,count:null==e?void 0:e.count}),{title:m.a.createElement("div",{title:null==e?void 0:e.name,className:T.a.name},null==e?void 0:e.name,"(".concat(null==e?void 0:e.count,")")),value:r,name:null==e?void 0:e.name,key:r,count:null==e?void 0:e.count,id:r,icon:m.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:i?null==n?void 0:n.map((function(e){return t(e)})):[]}}(t)}))},Re=function(){var t=Object(s.a)(p.a.mark((function t(){var e,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(L.y)({});case 2:e=t.sent,Ee.current=[{id:0,name:"根目录",count:null==e?void 0:e.root_count}],null!=e&&e.data&&(n=[{title:m.a.createElement("div",{title:"根目录",className:T.a.name},"根目录","(".concat((null==e?void 0:e.root_count)||0,")")),value:0,id:0,key:0,count:null==e?void 0:e.root_count,name:"根目录",icon:m.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Pe(e.data||[])}],ne(Ee.current),xe(n));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Be=function(){var t=Object(s.a)(p.a.mark((function t(){var e,n,i,r,o,a,s,u,h,d,f,m,g,v,y,b,x,w;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d=null==c||null===(e=c.tag_disciplines)||void 0===e?void 0:e.map((function(t){return t.tag_discipline_id})),f=null==c||null===(n=c.groups)||void 0===n?void 0:n.map((function(t){return t.id})),m={source:null==c||null===(i=c.examination_bank)||void 0===i?void 0:i.source,group_ids:f,tag_discipline_ids:d,teach_group_ids:null==c?void 0:c.teach_group_ids},t.next=5,Object(et.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:m});case 5:if(-1!==(null==(g=t.sent)?void 0:g.status)){t.next=8;break}return t.abrupt("return");case 8:v=(v=null==g?void 0:g.filter((function(t){var e;return!(null==t||null===(e=t.item_banks)||void 0===e||!e.length)}))).map((function(t){return Object(l.a)(Object(l.a)({},t),{},{scoreTotal:0,score:0,questionTotal:0})})),v=null===(r=v)||void 0===r?void 0:r.map((function(t,e){var n,i,r;return Object(l.a)(Object(l.a)({},t),{},{score:(null==c||null===(n=c.score_settings)||void 0===n||null===(i=n.find((function(e){return e.item_type===(null==t?void 0:t.item_type)})))||void 0===i?void 0:i.score)||0,item_banks:null==t||null===(r=t.item_banks)||void 0===r?void 0:r.map((function(e){var n;return Object(l.a)(Object(l.a)({},e),{},{tag_disciplines:null==e||null===(n=e.tag_disciplines)||void 0===n?void 0:n.map((function(n){var i;return Object(l.a)(Object(l.a)({},n),{},{difficulties:null==n||null===(i=n.difficulties)||void 0===i?void 0:i.map((function(i){var r=null==c?void 0:c.contents.find((function(r){return r.item_type===t.item_type&&r.sub_discipline_id===e.sub_discipline_id&&r.tag_discipline_id===n.tag_discipline_id&&r.difficulty===i.difficulty}));return r?Object(l.a)(Object(l.a)({},i),{},{num:null==r?void 0:r.quanlity}):Object(l.a)({},i)}))})}))})}))})})),y=Ge(v),b=y.panel,x=y.score_num_item,v=null===(o=v)||void 0===o?void 0:o.map((function(t,e){var n,i=(null==b||null===(n=b[e])||void 0===n?void 0:n.reduce((function(t,e){return t+e}),0))||0;return Object(l.a)(Object(l.a)({},t),{},{scoreTotal:i*(x[e]||0),questionTotal:i})})),w=[],null==c||null===(a=c.sort_by_item_type)||void 0===a||a.forEach((function(t){var e=v.find((function(e){var n;return(null===(n=qe.find((function(t){return t.type===(null==e?void 0:e.item_type)})))||void 0===n?void 0:n.name)===t}));w.push(e)})),w=Object(J.compact)(w),Fe(null==c||null===(s=c.examination_bank)||void 0===s?void 0:s.source),He(),C(null==c||null===(u=c.examination_bank)||void 0===u?void 0:u.source),It(d),Ft.current=d,$t(f),he((null==c?void 0:c.teach_group_ids)||[]),Te(null==c||null===(h=c.groups)||void 0===h?void 0:h.map((function(t){return t.count})).reduce((function(t,e){return t+e}),0)),ie.current=f,Jt(null!=f&&f.length?f:[0]),kt(Object(J.cloneDeep)(w)),I(!1);case 29:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ze=function(){var t=Object(s.a)(p.a.mark((function t(){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:We({source:x,group_ids:qt,tag_discipline_ids:Dt,teach_group_ids:ue}),Ft.current=Dt,ht(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Fe=function(){var t=Object(s.a)(p.a.mark((function t(e){var n,i,r,o,a,s;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.a)("/api/disciplines.json",{method:"get",params:{source:"question",question_source:e}});case 2:r=t.sent,o=[],null==r||null===(n=r.disciplines)||void 0===n||n.forEach((function(t){var e;null==t||null===(e=t.sub_disciplines)||void 0===e||e.forEach((function(t){o=o.concat((null==t?void 0:t.tag_disciplines)||[])}))})),a=null,s=null==r||null===(i=r.disciplines)||void 0===i?void 0:i.map((function(t){var e,n=null==t||null===(e=t.sub_disciplines)||void 0===e?void 0:e.reduce((function(t,e){return t+e.item_count}),0);return a||0===n||(a=t.id),Object(l.a)(Object(l.a)({},t),{},{item_count:n})})),console.log(s,48767874),Ot(s),At(o),zt(a);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),He=function(){var t=Object(s.a)(p.a.mark((function t(){var e;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.a)("/api/teach_groups.json",{method:"get",params:{is_random_exam:!0}});case 2:e=t.sent,me((null==e?void 0:e.groups)||[]);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),We=function(){var t=Object(s.a)(p.a.mark((function t(e){var n,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return I(!0),t.next=3,Object(et.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:e});case 3:n=t.sent,i=(i=null==n?void 0:n.filter((function(t){var e;return!(null==t||null===(e=t.item_banks)||void 0===e||!e.length)}))).map((function(t){return Object(l.a)(Object(l.a)({},t),{},{scoreTotal:0,score:0,questionTotal:0})})),kt(i),I(!1);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ve=function(t){It(t)},Ge=function(t){var e={contents:[],panel:[],score_num_item:[],score_total:[],error_tips:[]};return null==t||t.forEach((function(t,n){var i,r,o;e.panel.push([]),e.score_num_item.push(null==t?void 0:t.score),e.score_total.push(null==t?void 0:t.scoreTotal),null===(i=e.error_tips)||void 0===i||i.push({name:null===(r=qe.find((function(e){return e.type===(null==t?void 0:t.item_type)})))||void 0===r?void 0:r.name,score:(null==t?void 0:t.score)||0,scoreTotal:null==t?void 0:t.scoreTotal,item_type:null==t?void 0:t.item_type}),null==t||null===(o=t.item_banks)||void 0===o||o.forEach((function(i){var r;null==i||null===(r=i.tag_disciplines)||void 0===r||r.forEach((function(r){var o;null==r||null===(o=r.difficulties)||void 0===o||o.forEach((function(o){o.num&&(e.panel[n].push(o.num),e.contents.push({difficulty:o.difficulty,item_type:t.item_type,items_count:o.num,sub_discipline_id:i.sub_discipline_id,tag_discipline_id:r.tag_discipline_id}))}))}))}))})),e},Ue=function(){var t=Object(s.a)(p.a.mark((function t(e){var i,r,o,a,s,u,h,d,f,m,g,y,b,C,w,k;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(qt.length||Dt.length||ue.length){t.next=3;break}return _.b.warn("必须选择考察范围或试题文件夹或教研团队的其中一项"),t.abrupt("return");case 3:i=[],r=[],o=Ge(wt),a=0;case 7:if(!(a<o.error_tips.length)){t.next=23;break}if(h=null==o||null===(s=o.panel)||void 0===s||null===(u=s[a])||void 0===u?void 0:u.reduce((function(t,e){return t+e}),0),0!==o.error_tips[a].score||0===h){t.next=14;break}return(f=document.getElementById("".concat(null===(d=o.error_tips[a])||void 0===d?void 0:d.item_type,"_score"))).classList.add("customError"),f.scrollIntoView({block:"start",behavior:"smooth"}),t.abrupt("return");case 14:if(0===o.error_tips[a].score||0!==h){t.next=19;break}return(g=document.getElementById("".concat(null===(m=o.error_tips[a])||void 0===m?void 0:m.item_type,"_sum"))).classList.add("customError"),g.scrollIntoView({block:"start",behavior:"smooth"}),t.abrupt("return");case 19:0!==o.error_tips[a].score&&0!==h&&(null==i||i.push({item_type:null===(y=o.error_tips[a])||void 0===y?void 0:y.item_type,score:(null===(b=o.error_tips[a])||void 0===b?void 0:b.score)||0}),r.push(o.error_tips[a].name));case 20:a++,t.next=7;break;case 23:if(0!==i.length){t.next=26;break}return _.b.warn("不允许每个题型的总分和抽题数量都为0"),t.abrupt("return");case 26:if(V(!0),C=Object(l.a)({contents:o.contents,group_ids:qt,teach_group_ids:ue,score_settings:i,source:x,sub_discipline_id:0,sort_by_item_type:r,tag_discipline_ids:Dt},n),!e){t.next=36;break}return w=Object(l.a)(Object(l.a)({},C),e),t.next=32,Object(et.a)("/api/examination_banks/save_question_list.json",{method:"post",body:w});case 32:return 0===t.sent.status&&_.b.success("保存成功"),V(!1),t.abrupt("return");case 36:if(k={},!c){t.next=43;break}return t.next=40,Object(et.a)("/api/examination_banks/".concat(null==c?void 0:c.id,"/update_random_exam.json"),{method:"post",body:C});case 40:k=t.sent,t.next=46;break;case 43:return t.next=45,Object(et.a)("/api/examination_banks/create_random_exam.json",{method:"post",body:C});case 45:k=t.sent;case 46:0===k.status&&(_.b.success("操作成功"),v.d.push("/paperlibrary?defaultActiveKey=0")),V(!1);case 48:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ke=function(){var t=Object(s.a)(p.a.mark((function t(e,i){var r,o,a,s,c,u,h,d,f,m,g,v,y,b,C,w,k,S,E,O,N,T,L;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(qt.length||Dt.length||ue.length){t.next=3;break}return _.b.warn("必须选择考察范围或试题文件夹或教研团队的其中一项"),t.abrupt("return");case 3:r=[],o=[],a=Ge(wt),s=0;case 7:if(!(s<a.error_tips.length)){t.next=23;break}if(h=null==a||null===(c=a.panel)||void 0===c||null===(u=c[s])||void 0===u?void 0:u.reduce((function(t,e){return t+e}),0),0!==a.error_tips[s].score||0===h){t.next=14;break}return(f=document.getElementById("".concat(null===(d=a.error_tips[s])||void 0===d?void 0:d.item_type,"_score"))).classList.add("customError"),f.scrollIntoView({block:"start",behavior:"smooth"}),t.abrupt("return");case 14:if(0===a.error_tips[s].score||0!==h){t.next=19;break}return(g=document.getElementById("".concat(null===(m=a.error_tips[s])||void 0===m?void 0:m.item_type,"_sum"))).classList.add("customError"),g.scrollIntoView({block:"start",behavior:"smooth"}),t.abrupt("return");case 19:0!==a.error_tips[s].score&&0!==h&&(null==r||r.push({item_type:null===(v=a.error_tips[s])||void 0===v?void 0:v.item_type,score:(null===(y=a.error_tips[s])||void 0===y?void 0:y.score)||0}),o.push(a.error_tips[s].name));case 20:s++,t.next=7;break;case 23:if(0!==r.length){t.next=26;break}return _.b.warn("不允许每个题型的总分和抽题数量都为0"),t.abrupt("return");case 26:if(Z(!0),b=Object(l.a)({contents:a.contents,group_ids:qt,teach_group_ids:ue,score_settings:r,sort_by_item_type:o,tag_discipline_ids:Dt,source:x,sub_discipline_id:0},n),void 0===e||null!=e&&e.single_question_id){t.next=36;break}return b.seleted_item_bank_ids=null==e?void 0:e.seleted_item_bank_ids,t.next=32,Object(et.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:b});case 32:return null!=(C=t.sent)&&C.questions&&((k=Object(J.cloneDeep)(yt)).questionList=null==k||null===(w=k.questionList)||void 0===w?void 0:w.map((function(t){var e;return t.type===i.type?Object(l.a)(Object(l.a)({},t),{},{questions:(null==C||null===(e=C.questions)||void 0===e?void 0:e.questions)||[]}):t})),bt(k)),Z(!1),t.abrupt("return");case 36:if(null==e||void 0===e||!e.single_question_id){t.next=45;break}return b.seleted_item_bank_ids=null==e?void 0:e.seleted_item_bank_ids,b.single_question_id=null==e?void 0:e.single_question_id,t.next=41,Object(et.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:b});case 41:return(S=t.sent)&&((O=Object(J.cloneDeep)(yt)).questionList=null==O||null===(E=O.questionList)||void 0===E?void 0:E.map((function(t){if(t.type===i.type){var e,n,r=Object(J.cloneDeep)(null==t?void 0:t.questions);return r.splice(i.index,1,null==S||null===(e=S.questions)||void 0===e||null===(n=e.questions)||void 0===n?void 0:n[0]),console.log(null==t?void 0:t.questions,r,i.index,"new_questions"),Object(l.a)(Object(l.a)({},t),{},{questions:r})}return t})),bt(O)),Z(!1),t.abrupt("return");case 45:return t.next=47,Object(et.a)("/api/examination_banks/preview_random_questions.json",{method:"post",body:b});case 47:(N=t.sent).exam&&(T=Xe(N),L=[],null==o||o.forEach((function(t){var e,n=null==T||null===(e=T.questionList)||void 0===e?void 0:e.find((function(e){var n;return(null===(n=qe.find((function(t){return t.type===(null==e?void 0:e.type)})))||void 0===n?void 0:n.name)===t}));L.push(n)})),L=Object(J.compact)(L),T.questionList=L,bt(Object(l.a)({},T)),console.log(JSON.stringify(T)),mt(!0),document.body.scrollIntoView()),Z(!1);case 50:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),qe=[{type:"SINGLE",name:"单选题"},{type:"MULTIPLE",name:"多选题"},{type:"COMPLETION",name:"填空题"},{type:"JUDGMENT",name:"判断题"},{type:"SUBJECTIVE",name:"简答题"},{type:"PROGRAM",name:"编程题"},{type:"PRACTICAL",name:"实训题"},{type:"COMBINATION",name:"组合题"}],$e=function(t,e,n){return t[e]=t.splice(n,1,t[e])[0],t},Ye=function(){var t=Object(s.a)(p.a.mark((function t(e){var n,i,r,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=Object(O.a)(x),x.includes(e)?r=r.filter((function(t){return t!==e})):r.push(e),0!==r.length){t.next=5;break}return _.b.warn("试题来源为必选项"),t.abrupt("return");case 5:null!==(n=r)&&void 0!==n&&n.includes("mine")||($t([]),ie.current=[]),null!==(i=r)&&void 0!==i&&i.includes("teach_groups")||(he([]),ge.current=[]),C(r),Fe(r),It([]),Ft.current=[],o={source:r,group_ids:ie.current,tag_discipline_ids:[],teach_group_ids:ge.current},We(o);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Xe=function(t){var e={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七"};if(t){var n=t||{},i=n.exam,r=n.single_questions,o=n.multiple_questions,a=n.judgement_questions,s=n.program_questions,c=n.completion_questions,u=n.subjective_questions,h=n.practical_questions,d=n.combination_questions,p=[Object(l.a)({type:"SINGLE",name:"单选题"},r),Object(l.a)({type:"MULTIPLE",name:"多选题"},o),Object(l.a)({type:"COMPLETION",name:"填空题"},c),Object(l.a)({type:"JUDGMENT",name:"判断题"},a),Object(l.a)({type:"SUBJECTIVE",name:"简答题"},u),Object(l.a)({type:"PROGRAM",name:"编程题"},s),Object(l.a)({type:"PRACTICAL",name:"实训题"},h),Object(l.a)({type:"COMBINATION",name:"组合题"},d)],f=[],m=0,g=0,v=p.filter((function(t){return t.questions_count>0})).map((function(t,n){var i;return null===(i=t.questions)||void 0===i||i.forEach((function(t){f.push(t.id),m+=t.score,g+=1})),Object(l.a)(Object(l.a)({},t),{number:e[n+1]})}));return{all_questions_count:g,all_score:m,questionList:v,ids:f,exam:i}}},Ze=null==_t||null===(e=_t.find((function(t){return t.id===Bt})))||void 0===e?void 0:e.sub_disciplines,Je=function(){for(var t=null==Lt?void 0:Lt.filter((function(t){return null==Dt?void 0:Dt.includes(t.id)})),e=Object(O.a)(t),n=0,i=[],r=0;r<e.length;r++){for(var o="",a=0;a<i.length;a++)if(i[a][0].parent_name==e[r].parent_name){n=1,o=a;break}if(1==n)i[o].push(e[r]),n=0;else if(0==n){var s=new Array;s.push(e[r]),i.push(s)}}return i}();return ft?m.a.createElement(st.a,{loading:H,submit:Ue,goBack:function(){return mt(!1)},data:yt,onTypeScore:function(t){var e,n,i=Object(J.cloneDeep)(yt),r=Object(J.cloneDeep)(wt);i.questionList=null==i||null===(e=i.questionList)||void 0===e?void 0:e.map((function(e){return e.type===t.type?Object(l.a)(Object(l.a)({},e),{},{questions_score:t.scoreTotal}):e})),r=null===(n=r)||void 0===n?void 0:n.map((function(e){return e.item_type===t.type?Object(l.a)(Object(l.a)({},e),{},{score:t.score,scoreTotal:t.scoreTotal}):e})),kt(r),bt(i),console.log(t,yt,wt)},onExchange:Ke}):m.a.createElement("section",{className:T.a.wrap,style:{display:a?"flex":"none"}},m.a.createElement("div",{id:"id_left",className:T.a.left,onMouseEnter:function(t){document.getElementById("id_left").style.overflowY="auto"},onMouseLeave:function(t){document.getElementById("id_left").style.overflowY="hidden"}},m.a.createElement(i.a,{loading:j,active:!0,paragraph:{rows:5}},wt.map((function(t,e){var n;return m.a.createElement("div",{className:T.a.list,key:e},m.a.createElement("div",{className:T.a.name},m.a.createElement("b",null),m.a.createElement("span",null,null===(n=qe.find((function(e){return e.type===(null==t?void 0:t.item_type)})))||void 0===n?void 0:n.name)),m.a.createElement("aside",null,m.a.createElement("div",null,"共",m.a.createElement("span",{className:T.a.b},t.questionTotal),"题",m.a.createElement("span",{className:T.a.l},"|"),"共",m.a.createElement("span",{className:T.a.r},t.scoreTotal),"分"),m.a.createElement("div",null,e>0?m.a.createElement(E.a,{getPopupContainer:function(t){return document.getElementById("id_left")},title:"上移"},m.a.createElement("span",{onClick:function(){return t=e,n=[],(i=Object(J.cloneDeep)(wt)).length>1&&0!==t&&(n=$e(i,t,t-1)),void kt(n);var t,n,i},className:"mb20",style:{transform:"rotate(270deg)"}}," ",m.a.createElement("i",{className:"icon-jiantou1"}))):m.a.createElement("span",{className:"mb20",style:{transform:"rotate(270deg)",cursor:"not-allowed"}}," ",m.a.createElement("i",{className:"icon-jiantou1"})),e<wt.length-1?m.a.createElement(E.a,{getPopupContainer:function(t){return document.getElementById("id_left")},title:"下移"},m.a.createElement("span",{onClick:function(){return t=e,n=[],(i=Object(J.cloneDeep)(wt)).length>1&&t!==i.length-1&&(n=$e(i,t,t+1)),void kt(n);var t,n,i},style:{transform:"rotate(90deg)"}}," ",m.a.createElement("i",{className:"icon-jiantou1"}))):m.a.createElement("span",{style:{transform:"rotate(90deg)",cursor:"not-allowed"}}," ",m.a.createElement("i",{className:"icon-jiantou1"})))))}))),(Me=Ge(wt),je=Me.panel,De=(De=Me.score_total).reduce((function(t,e){return t+e}),0),je=Object(J.flatten)(je).reduce((function(t,e){return t+e}),0),m.a.createElement("div",{className:T.a.total},m.a.createElement("div",null,m.a.createElement("img",{src:F.a}),m.a.createElement("span",null,"题数(道)"),m.a.createElement("aside",null,je)),m.a.createElement("aside",null),m.a.createElement("div",null,m.a.createElement("img",{src:W.a}),m.a.createElement("span",null,"总分(分)"),m.a.createElement("aside",null,De))))),m.a.createElement("div",{className:T.a.right},m.a.createElement(w,{className:T.a.tabs,value:1,onChange:function(){return o(0)}}),m.a.createElement("section",{className:T.a.topWarp},m.a.createElement("div",{className:T.a.title},m.a.createElement("b",null),m.a.createElement("span",null,"抽题组卷"),m.a.createElement("div",null,"STEP2")," "),m.a.createElement("div",{className:T.a.source},m.a.createElement("b",null,"*"),m.a.createElement("span",null,"试题来源"),m.a.createElement("aside",null,m.a.createElement("div",{onClick:function(){return Ye("mine")}}," ",m.a.createElement(S.a,{checked:null==x?void 0:x.includes("mine")}),m.a.createElement("span",{style:{color:null!=x&&x.includes("mine")?"#007DFE":"#666666"}},"仅我创建的")),m.a.createElement("div",{className:"mb20",onClick:function(){return Ye("teach_groups")}}," ",m.a.createElement(S.a,{checked:null==x?void 0:x.includes("teach_groups")}),m.a.createElement("span",{style:{color:null!=x&&x.includes("teach_groups")?"#007DFE":"#666666"}},"教研共享")),m.a.createElement("div",{onClick:function(){return Ye("public")}},m.a.createElement(S.a,{checked:null==x?void 0:x.includes("public")}),m.a.createElement("span",{style:{color:null!=x&&x.includes("public")?"#007DFE":"#666666"}},"公共题库"))),m.a.createElement("aside",null,(null==x?void 0:x.includes("mine"))&&m.a.createElement("div",{style:{marginBottom:14},className:T.a.folder,onClick:function(){Se(!0),Gt(!0),ie.current=qt,Te((null==Le?void 0:Le.map((function(t){return t.count})).reduce((function(t,e){return t+e}),0))||0)}},m.a.createElement("img",{src:D.a}),m.a.createElement("span",null,"选择试题文件夹"),m.a.createElement(E.a,{title:"选中项仅包括该文件夹下的试题,不包括子文件夹,且系统取您选中的文件夹和考查范围中的试题的并集作为随机对象。"},m.a.createElement("img",{src:M.a}))),(null==x?void 0:x.includes("teach_groups"))&&m.a.createElement("div",{className:T.a.folder,onClick:function(){se(!0),ge.current=ue}},m.a.createElement("img",{src:G.a}),m.a.createElement("span",null,"选择教研团队")))),(null==x?void 0:x.includes("mine"))&&m.a.createElement("div",{className:T.a.choice},m.a.createElement("div",{className:T.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"已选文件夹")),m.a.createElement(q.a,{type:2,value:Le,onChange:function(t){var e=qt.filter((function(e){return e!==t}));We({source:x,group_ids:e,tag_discipline_ids:Dt,teach_group_ids:ue}),$t(e),ie.current=e}})),(null==x?void 0:x.includes("teach_groups"))&&m.a.createElement("div",{className:T.a.choice},m.a.createElement("div",{className:T.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"已选教研团队")),m.a.createElement(q.a,{icon:K.a,type:2,value:Ae,onChange:function(t){var e=ue.filter((function(e){return e!==t}));We({source:x,group_ids:qt,tag_discipline_ids:Dt,teach_group_ids:e}),he(e),ge.current=e}})),m.a.createElement("div",{className:T.a.range},m.a.createElement("div",{className:T.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"考察范围")),m.a.createElement("div",{onClick:function(){null!==Bt?(Ft.current=Dt,ht(!0)):_.b.warn("考察范围没有知识点可以选择")},className:T.a.btn},m.a.createElement("img",{src:P.a})," 选择范围"),m.a.createElement("div",{className:T.a.name},m.a.createElement("b",{className:T.a.num}),m.a.createElement("span",null,"已选知识点")),m.a.createElement("div",{className:T.a.knWarp},null==Je?void 0:Je.map((function(t,e){return m.a.createElement(m.a.Fragment,{key:e},m.a.createElement("div",{className:T.a.kn},m.a.createElement("span",null,e+1)," ",m.a.createElement("span",null,null==t?void 0:t[0].parent_name)),m.a.createElement(q.a,{type:1,value:null==t?void 0:t.filter((function(t){return!!t.item_count})),onChange:function(t){var e=Dt.filter((function(e){return e!==t}));We({source:x,group_ids:qt,tag_discipline_ids:e,teach_group_ids:ue}),It(e),Ft.current=e}}))}))))),console.log("-----",wt),m.a.createElement(i.a,{loading:j,active:!0,paragraph:{rows:5}},wt.map((function(t,e){return m.a.createElement($.a,{key:e,value:t,onChange:function(t){return function(t,e){var n,i,r=Object(J.cloneDeep)(wt);r[e]=t;var o=Ge([r[e]]),a=null==o||null===(n=o.panel)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.reduce((function(t,e){return t+e}),0);r[e].questionTotal=a,kt(r);var s=document.getElementsByClassName("customError");null==s||s.forEach((function(t){var e;null==t||null===(e=t.classList)||void 0===e||e.remove("customError")}))}(t,e)}})})),m.a.createElement("div",{className:T.a.btns},m.a.createElement(r.a,{onClick:function(){o(0),document.body.scrollIntoView()}},"上一步"),m.a.createElement(r.a,{loading:H,onClick:function(){return Ue()}},"提交"),m.a.createElement(r.a,{loading:X,onClick:function(){return Ke()},type:"primary"},"预览")))),m.a.createElement(k.a,{centered:!0,closable:!1,destroyOnClose:!0,className:T.a.modal,visible:ut,title:null,width:"1200px",onOk:ze,onCancel:function(){It(Ft.current),ht(!1),rt("")}},m.a.createElement("div",{className:T.a.modalBody},m.a.createElement("div",{className:T.a.left},m.a.createElement("div",{className:T.a.title},m.a.createElement("img",{src:B.a}),m.a.createElement("span",null,"试题范围")),m.a.createElement("div",{className:T.a.l},null==_t?void 0:_t.map((function(t){var e,n=!1;it?null===(e=t.sub_disciplines)||void 0===e||e.forEach((function(t){var e;null===(e=t.tag_disciplines)||void 0===e||e.forEach((function(t){var e;n||(n=(null===(e=t.name)||void 0===e?void 0:e.includes(it))&&0!==t.item_count)}))})):n=!0;return m.a.createElement(m.a.Fragment,{key:t.id},!!t.item_count&&n&&m.a.createElement("div",{onClick:function(){return zt(t.id)},className:"".concat(T.a.name," ").concat(t.id===Bt?T.a.active:"")},m.a.createElement("b",null),m.a.createElement("span",null,t.name)))})))),m.a.createElement("div",{className:T.a.right},m.a.createElement("div",{className:T.a.inputWarp},m.a.createElement(lt,{onChange:function(t){return rt(t.target.value)},placeholder:"请输入知识点",value:it})),m.a.createElement("div",{className:T.a.l},null==Ze?void 0:Ze.map((function(t,e){var n,i=Object(l.a)(Object(l.a)({},t),{},{tag_disciplines:null==t||null===(n=t.tag_disciplines)||void 0===n?void 0:n.filter((function(t){return 0!==t.item_count}))});return m.a.createElement(tt,{search:it,onChange:Ve,key:t.id,value:Dt,options:i})})))))),m.a.createElement(k.a,{centered:!0,title:"选择文件夹",visible:Vt,width:718,destroyOnClose:!0,onCancel:function(){$t(ie.current),Gt(!1),Te(0)},footer:m.a.createElement("div",{style:{display:"flex",alignItems:"center"}},m.a.createElement("span",{style:{flex:"1",textAlign:"left"}},"已选",qt.length||0,"个文件夹,共(",Ne||0,")道题"),m.a.createElement(r.a,{onClick:function(){$t(ie.current),Te(0),Gt(!1)}},"取消"),m.a.createElement(r.a,{type:"primary",onClick:function(){We({source:x,group_ids:qt,tag_discipline_ids:Dt,teach_group_ids:ue}),ie.current=qt,Gt(!1)}},"确认"))},m.a.createElement("aside",{className:T.a.exportModal},ke&&m.a.createElement(at,{treeData:be,defaultValue:Zt,value:qt,onChange:function(t,e){var n;Te(null===(n=e.selectedNodes)||void 0===n?void 0:n.map((function(t){return t.count})).reduce((function(t,e){return t+e}),0)),$t(t)}}))),m.a.createElement(k.a,{centered:!0,title:"选择教研团队",visible:ae,width:718,destroyOnClose:!0,onCancel:function(){he(ge.current),se(!1)},onOk:function(){We({source:x,group_ids:qt,tag_discipline_ids:Dt,teach_group_ids:ue}),ge.current=ue,se(!1)}},m.a.createElement("aside",{className:T.a.teachModal},m.a.createElement("div",{className:T.a.head},m.a.createElement("div",{className:T.a.li}),m.a.createElement("div",{className:T.a.li},"团队名称"),m.a.createElement("div",{className:T.a.li},"共享题目数量")),m.a.createElement("div",{className:T.a.wraps},null==fe?void 0:fe.map((function(t){return m.a.createElement("div",{key:t.id,className:T.a.body},m.a.createElement("div",{className:T.a.li},m.a.createElement(S.a,{onChange:function(){var e=t.id,n=Object(O.a)(ue);ue.includes(e)?n=n.filter((function(t){return t!==e})):n.push(e),he(n)},checked:null==ue?void 0:ue.includes(t.id)})),m.a.createElement("div",{title:t.name,className:T.a.li},t.name),m.a.createElement("div",{className:T.a.li},t.item_bank_count))}))))))},ut=h.a.TextArea;e.default=Object(v.a)((function(t){return{paperlibrary:t.paperlibrary,user:t.user,globalSetting:t.globalSetting}}))((function(t){t.paperlibrary,t.user,t.globalSetting;var e=t.dispatch,n=Object(f.useState)(0),d=Object(u.a)(n,2),y=d[0],x=d[1],C=c.a.useForm(),k=Object(u.a)(C,1)[0],S=Object(f.useState)({}),E=Object(u.a)(S,2),_=E[0],O=E[1],N=Object(f.useState)(!0),T=Object(u.a)(N,2),L=T[0],A=T[1],M=Object(f.useState)(null),j=Object(u.a)(M,2),D=j[0],I=j[1],P=Object(g.i)().id;console.log(P,"editId"),Object(f.useEffect)((function(){return e({type:"globalSetting/footerToggle",payload:!1}),function(){e({type:"globalSetting/footerToggle",payload:!0})}}),[]),Object(f.useEffect)((function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}}),[]);Object(f.useEffect)((function(){P?R():A(!1)}),[P]);var R=function(){var t=Object(s.a)(p.a.mark((function t(){var e,n,i,r,o,a;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.a)("/api/examination_banks/".concat(P,"/edit_random_exam.json"),{method:"get",params:{}});case 2:null!=(e=t.sent)&&e.examination_bank&&(a={difficulty:null==e||null===(n=e.examination_bank)||void 0===n?void 0:n.difficulty,exam_notes:null==e||null===(i=e.examination_bank)||void 0===i?void 0:i.exam_notes,name:null==e||null===(r=e.examination_bank)||void 0===r?void 0:r.name,time:null==e||null===(o=e.examination_bank)||void 0===o?void 0:o.time},A(!1),O(Object(l.a)({},a)),k.setFieldsValue(Object(l.a)({},a)),I(Object(l.a)(Object(l.a)({},e),{},{id:P})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=Object(s.a)(p.a.mark((function t(e){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e){t.next=3;break}return x(e),t.abrupt("return");case 3:return t.next=5,k.validateFields();case 5:x(e);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return m.a.createElement("section",{className:b.a.wrap},m.a.createElement(i.a,{loading:L,active:!0,paragraph:{rows:5}},m.a.createElement("div",{className:b.a.crumbs},m.a.createElement("b",null),m.a.createElement("span",{className:"current",onClick:function(){return v.d.push("/")}},"首页>"),m.a.createElement("span",{className:"current",onClick:function(){return v.d.push("/paperlibrary")}},"试卷库>"),m.a.createElement("span",{style:{color:"#bebebe"}},"随机组卷")),0===y&&m.a.createElement(w,{value:y,onChange:B}),0===y&&m.a.createElement("section",{className:b.a.oneWrap},m.a.createElement("div",{className:b.a.title},m.a.createElement("b",null),m.a.createElement("span",null,"基本信息"),m.a.createElement("div",null,"STEP1")," "),m.a.createElement(c.a,{className:b.a.formWrap,form:k,layout:"horizontal",onValuesChange:function(t){O(Object(l.a)({},k.getFieldsValue()))}},m.a.createElement(c.a.Item,{label:"试卷名称",name:"name",rules:[{required:!0,message:"试卷名称不能为空"},{pattern:/^(?!(\s+$))/,message:"输入框不能全为空格"}]},m.a.createElement(h.a,{className:b.a.in,bordered:!1,placeholder:"请输入试卷名称,最多60个字",maxLength:60})),m.a.createElement("div",{style:{position:"relative"}},m.a.createElement(c.a.Item,{label:"答题时长:",name:"time",rules:[{required:!0,message:"答题时长不能为空"}]},m.a.createElement(a.a,{min:1,parser:function(t){var e=parseInt(t);return Object(J.isNaN)(e)?"":e},max:9999,placeholder:"请输入答题时长",style:{width:190}})),m.a.createElement("span",{style:{position:"absolute",top:26,left:310}},"分钟")),m.a.createElement(c.a.Item,{label:"试题难度",name:"difficulty",rules:[{required:!0,message:"请选择难度"}]},m.a.createElement(o.a.Group,{style:{display:"flex",width:286,justifyContent:"space-between"},size:"large"},m.a.createElement(o.a.Button,{className:b.a.rb,value:1},"简单"),m.a.createElement(o.a.Button,{className:b.a.rb,value:2},"适中"),m.a.createElement(o.a.Button,{className:b.a.rb,value:3},"困难"))),m.a.createElement(c.a.Item,{label:"考试须知",name:"exam_notes"},m.a.createElement(ut,{placeholder:"考生必须严格遵守考场纪律,不准冒名顶替,不准有任何作弊行为。如发现违纪,并给予严厉处分。",rows:4,maxLength:300}))),m.a.createElement("div",{className:b.a.btns},m.a.createElement(r.a,{className:"mr40",onClick:function(){return v.d.push("/paperlibrary")}},"返回"),m.a.createElement(r.a,{type:"primary",onClick:Object(s.a)(p.a.mark((function t(){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k.validateFields();case 2:x(1);case 3:case"end":return t.stop()}}),t)})))},"下一步"))),m.a.createElement(ct,{tabs:y,dispatch:e,editData:D,setFatherTabs:x,formValue:_})))}))},"E/GV":
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./src/assets/images/paper/swenjianjia.svg ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/swenjianjia.a86ae489.svg"},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 i(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,a){a&&a!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),n&&(o(i(n,"pairs")),e.state.closeBrackets=n,e.addKeyMap(r))}));var r={Backspace:function(e){var r=s(e);if(!r||e.getOption("disableInput"))return t.Pass;for(var o=i(r,"pairs"),a=e.listSelections(),c=0;c<a.length;c++){if(!a[c].empty())return t.Pass;var u=l(e,a[c].head);if(!u||o.indexOf(u)%2!=0)return t.Pass}for(c=a.length-1;c>=0;c--){var h=a[c].head;e.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(e){var n=s(e),r=n&&i(n,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var o=e.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return t.Pass;var c=l(e,o[a].head);if(!c||r.indexOf(c)%2!=0)return t.Pass}e.operation((function(){var t=e.lineSeparator()||"\n";e.replaceSelection(t+t,null),e.execCommand("goCharLeft"),o=e.listSelections();for(var n=0;n<o.length;n++){var i=o[n].head.line;e.indentLine(i,null,!0),e.indentLine(i+1,null,!0)}}))}};function o(t){for(var e=0;e<t.length;e++){var n=t.charAt(e),i="'"+n+"'";r[i]||(r[i]=a(n))}}function a(e){return function(r){return function(e,r){var o=s(e);if(!o||e.getOption("disableInput"))return t.Pass;var a=i(o,"pairs"),l=a.indexOf(r);if(-1==l)return t.Pass;for(var u,h=i(o,"closeBefore"),d=i(o,"triples"),p=a.charAt(l+1)==r,f=e.listSelections(),m=l%2==0,g=0;g<f.length;g++){var v,y=f[g],b=y.head,x=e.getRange(b,n(b.line,b.ch+1));if(m&&!y.empty())v="surround";else if(!p&&m||x!=r)if(p&&b.ch>1&&d.indexOf(r)>=0&&e.getRange(n(b.line,b.ch-2),b)==r+r){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(n(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(p){var C=0==b.ch?" ":e.getRange(n(b.line,b.ch-1),b);if(t.isWordChar(x)||C==r||t.isWordChar(C))return t.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=p&&c(e,b)?"both":d.indexOf(r)>=0&&e.getRange(b,n(b.line,b.ch+3))==r+r+r?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var w=l%2?a.charAt(l-1):r,k=l%2?r:a.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var i=0;i<3;i++)e.execCommand("goCharRight");else if("surround"==u){var r=e.getSelections();for(i=0;i<r.length;i++)r[i]=w+r[i]+k;for(e.replaceSelections(r,"around"),r=e.listSelections().slice(),i=0;i<r.length;i++)r[i]=(o=r[i],a=void 0,a=t.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});e.setSelections(r)}else"both"==u?(e.replaceSelection(w+k,null),e.triggerElectric(w+k),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(w+w+w+w,"before"),e.execCommand("goCharRight"));var o,a}))}(r,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 i=t.getRange(n(e.line,e.ch-1),n(e.line,e.ch+1));return 2==i.length?i:null}function c(t,e){var i=t.getTokenAt(n(e.line,e.ch+1));return/\bstring/.test(i.type)&&i.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}o(e.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FTkQ:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/assets/images/icons/tagDelete.png ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABjUlEQVQ4T61VsUoDQRB9s+eVYifkUlqIWCW3sbBMqYUR0cbfUPETxPgZ2giigpZaCnKXpBK1sMydpIx25+7ISu5ILhsjclvuzLx5M292lmA57PtuF2gIYIMBSYBn3BiICAg1cF0GrqjVSvLhlL+IqtVNEDUZWLAlS+8IeAPzvtduXw77ZYAMiEjKI2LeY2AskQ2cAGaiEy8MDwnQxicL7Ep5bDL+xmqijahZDsODDHBQ5sVfmVn6xmDeMuWTESAGnqf1bBpz09MSsESx729r4DwfIIA6hPjUSt2AaP7Hztwj5nXHdd0vpR7yMQzsUOT7pwzsjgEKsVIKgiCu1Za1UvfGLhynXgqCp6hSkSxEYCn9jLq+/wJgcawk5l4KYECN3YBlCVLWo4GvhmGfgVlrj4ZAjX0KmBmZD8Owj4IAMQAsvGSrKKR1zet0QpsosZQrmvnRKsqksZlxnFWVJAkT3Y6MDbAmgDlFdGcdm8IH22Qp9OmltAtdDoPlWez6SpkWtmCHFTNCvQMN/scX8A1e4fnIOEHt8AAAAABJRU5ErkJggg=="},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,i){var r=n?n.call(i,t,e):void 0;if(void 0!==r)return!!r;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var c=o[l];if(!s(c))return!1;var u=t[c],h=e[c];if(!1===(r=n?n.call(i,u,h,c):void 0)||void 0===r&&u!==h)return!1}return!0}},HG2Q:
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/assets/images/paper/sren.svg ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/sren.1eb1974f.svg"},HPRh:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/median.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/median.a4540c4f.svg"},Hfvn:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/paper/wenjian.svg ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/wenjian.3da927fc.svg"},HmJG:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/upload-image/index.less ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},IlMy:
|
|
|
/*!****************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/index.less?modules ***!
|
|
|
\****************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex_box_center:"flex_box_center___1Rd7-",flex_space_between:"flex_space_between___1qdJI",flex_box_vertical_center:"flex_box_vertical_center___3PScB",flex_box_center_end:"flex_box_center_end___gmzWk",flex_box_column:"flex_box_column___qhFY7",wrap:"wrap___2CDxR",left:"left___21M_k",list:"list___ahv58",name:"name___3cBep",b:"b___1CRFh",r:"r___2F_9I",l:"l___3XCXI",total:"total___2VTdV",topWarp:"topWarp___y9feY",right:"right___U2Z5M",tabs:"tabs___3eZK5",title:"title___3iKxF",source:"source___3rkh5",folder:"folder___AxGOK",choice:"choice___1AdWh",range:"range___23nFr",btn:"btn___1QiCj",knWarp:"knWarp___3eQQ5",kn:"kn___1OLj0",btns:"btns___26z5C",modalBody:"modalBody___1b2lK",active:"active___kELz6",inputWarp:"inputWarp___1leis",modal:"modal___1Ehn0",exportModal:"exportModal___1Vsj-",teachModal:"teachModal___CwfeZ",head:"head___2_Y6a",wraps:"wraps___3-f7m",body:"body___2Jb5Z"}},JYp7:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/iterator.js ***!
|
|
|
\*******************************************************************/
|
|
|
/*! exports provided: FIN, Iterator, ChainableIterator, getSequenceIterator, ArrayIterator, ArrayNavigator, MappedIterator */
|
|
|
/*! exports used: ArrayIterator, ArrayNavigator, FIN, Iterator, MappedIterator, getSequenceIterator */function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return r})),n.d(e,"f",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return h}));var i,r,o=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a={done:!0,value:void 0};!function(t){var e={next:function(){return a}};t.empty=function(){return e},t.single=function(t){var e=!1;return{next:function(){return e?a:(e=!0,{done:!1,value:t})}}},t.fromArray=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.length),{next:function(){return e>=n?a:{done:!1,value:t[e++]}}}},t.fromNativeIterator=function(t){return{next:function(){var e=t.next();return e.done?a:{done:!1,value:e.value}}}},t.from=function(e){return e?Array.isArray(e)?t.fromArray(e):e:t.empty()},t.map=function(t,e){return{next:function(){var n=t.next();return n.done?a:{done:!1,value:e(n.value)}}}},t.filter=function(t,e){return{next:function(){for(;;){var n=t.next();if(n.done)return a;if(e(n.value))return{done:!1,value:n.value}}}}},t.forEach=function(t,e){for(var n=t.next();!n.done;n=t.next())e(n.value)},t.collect=function(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY);var n=[];if(0===e)return n;for(var i=0,r=t.next();!r.done&&(n.push(r.value),!(++i>=e));r=t.next());return n},t.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=0;return{next:function(){if(n>=t.length)return a;var e=t[n].next();return e.done?(n++,this.next()):e}}},t.chain=function(t){return new s(t)}}(r||(r={}));var s=function(){function t(t){this.it=t}return t.prototype.next=function(){return this.it.next()},t}();function l(t){return Array.isArray(t)?r.fromArray(t):t||r.empty()}var c=function(){function t(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=e-1),this.items=t,this.start=e,this.end=n,this.index=i}return t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},t.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},t}(),u=function(t){function e(e,n,i,r){return void 0===n&&(n=0),void 0===i&&(i=e.length),void 0===r&&(r=n-1),t.call(this,e,n,i,r)||this}return o(e,t),e.prototype.current=function(){return t.prototype.current.call(this)},e.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.last=function(){return this.index=this.end-1,this.current()},e.prototype.parent=function(){return null},e}(c),h=function(){function t(t,e){this.iterator=t,this.fn=e}return t.prototype.next=function(){return this.fn(this.iterator.next())},t}()},K5AI:
|
|
|
/*!****************************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/ProCheckout/index.less?modules ***!
|
|
|
\****************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={cInput:"cInput___2BJRi",cl:"cl___AbKoK",box:"box___3gRA9",box1:"box1___S3u_s",cr:"cr___16yEi"}},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 C})),n.d(e,"a",(function(){return k}));var i=n("1OyB"),r=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),p=n("YrtM"),f=n("TSYQ"),m=n.n(f),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(t,e){var n=t.prefixCls,i=t.id,r=t.flattenOptions,o=t.childrenAsData,a=t.values,f=t.searchValue,y=t.multiple,b=t.defaultActiveFirstOption,x=t.height,C=t.itemHeight,w=t.notFoundContent,k=t.open,S=t.menuItemSelectedIcon,E=t.virtual,_=t.onSelect,O=t.onToggleOpen,N=t.onActiveValue,T=t.onScroll,L=t.onMouseEnter,A="".concat(n,"-item"),M=Object(p.a)((function(){return r}),[k,r],(function(t,e){return e[0]&&t[1]!==e[1]})),j=s.useRef(null),D=function(t){t.preventDefault()},I=function(t){j.current&&j.current.scrollTo({index:t})},P=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=M.length,i=0;i<n;i+=1){var r=(t+i*e+n)%n,o=M[r],a=o.group,s=o.data;if(!a&&!s.disabled)return r}return-1},R=s.useState((function(){return P(0)})),B=Object(u.a)(R,2),z=B[0],F=B[1],H=function(t){F(t);var e=M[t];e?N(e.data.value,t):N(null,-1)};s.useEffect((function(){H(!1!==b?P(0):-1)}),[M.length,f]),s.useEffect((function(){var t=setTimeout((function(){if(!y&&k&&1===a.size){var t=Array.from(a)[0],e=M.findIndex((function(e){return e.data.value===t}));H(e),I(e)}}));return function(){return clearTimeout(t)}}),[k]);var W=function(t){void 0!==t&&_(t,{selected:!a.has(t)}),y||O(!1)};if(s.useImperativeHandle(e,(function(){return{onKeyDown:function(t){var e=t.which;switch(e){case h.a.UP:case h.a.DOWN:var n=0;if(e===h.a.UP?n=-1:e===h.a.DOWN&&(n=1),0!==n){var i=P(z+n,n);I(i),H(i)}break;case h.a.ENTER:var r=M[z];r&&!r.data.disabled?W(r.data.value):W(void 0),k&&t.preventDefault();break;case h.a.ESC:O(!1)}},onKeyUp:function(){},scrollTo:function(t){I(t)}}})),0===M.length)return s.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(A,"-empty"),onMouseDown:D},w);function V(t){var e=M[t];if(!e)return null;var n=e.data||{},r=n.value,l=n.label,c=n.children,u=Object(d.a)(n,!0),h=o?c:l;return e?s.createElement("div",Object.assign({"aria-label":"string"==typeof h?h:null},u,{key:t,role:"option",id:"".concat(i,"_list_").concat(t),"aria-selected":a.has(r)}),r):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(i,"_list"),style:{height:0,width:0,overflow:"hidden"}},V(z-1),V(z),V(z+1)),s.createElement(g.a,{itemKey:"key",ref:j,data:M,height:x,itemHeight:C,fullHeight:!1,onMouseDown:D,onScroll:T,virtual:E,onMouseEnter:L},(function(t,e){var n,i=t.group,r=t.groupOption,u=t.data,h=u.label,d=u.key;if(i)return s.createElement("div",{className:m()(A,"".concat(A,"-group"))},void 0!==h?h:d);var p=u.disabled,f=u.value,g=u.title,y=u.children,b=u.style,x=u.className,C=Object(c.a)(u,["disabled","value","title","children","style","className"]),w=a.has(f),k="".concat(A,"-option"),E=m()(A,k,x,(n={},Object(l.a)(n,"".concat(k,"-grouped"),r),Object(l.a)(n,"".concat(k,"-active"),z===e&&!p),Object(l.a)(n,"".concat(k,"-disabled"),p),Object(l.a)(n,"".concat(k,"-selected"),w),n)),_=o?y:h,O=!S||"function"==typeof S||w;return s.createElement("div",Object.assign({},C,{"aria-selected":w,className:E,title:g,onMouseMove:function(){z===e||p||H(e)},onClick:function(){p||W(f)},style:b}),s.createElement("div",{className:"".concat(k,"-content")},_||f),s.isValidElement(S)||w,O&&s.createElement(v.a,{className:"".concat(A,"-option-state"),customizeIcon:S,customizeIconProps:{isSelected:w}},w?"✓":null))})))}));y.displayName="OptionList";var b=y,x=function(){return null};x.isSelectOption=!0;var C=x,w=function(){return null};w.isSelectOptGroup=!0;var k=w,S=n("VTBJ"),E=n("Zm9Q");function _(t){var e=t.key,n=t.props,i=n.children,r=n.value,o=Object(c.a)(n,["children","value"]);return Object(S.a)({key:e,value:void 0!==r?r:e,children:i},o)}function O(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,n){if(!s.isValidElement(t)||!t.type)return null;var i=t.type.isSelectOptGroup,r=t.key,o=t.props,a=o.children,l=Object(c.a)(o,["children"]);return e||!i?_(t):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(null===r?n:r,"__"),label:r},l),{},{options:O(a)})})).filter((function(t){return t}))}var N=n("2Qr1"),T=n("qNPg"),L=n("U8pU"),A=n("Kwbf"),M=n("WKfj");var j=function(t){var e=t.mode,n=t.options,i=t.children,r=t.backfill,o=t.allowClear,a=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,p=t.labelInValue,f=t.value,m=t.inputValue,g=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=n||O(i);if(Object(A.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(A.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(A.a)("combobox"!==e||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(A.a)("combobox"===e||!r,"`backfill` only works with `combobox` mode."),Object(A.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(A.b)("combobox"!==e||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(A.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(A.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!=f){var C=Object(M.d)(f);Object(A.a)(!p||C.every((function(t){return"object"===Object(L.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(A.a)(!v||Array.isArray(f),"`value` should be array when `mode` is `multiple` or `tags`")}if(i){var w=null;Object(E.a)(i).some((function(t){if(!s.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(E.a)(t.props.children).every((function(e){return!(s.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(w=e.type,!1)})):(w=e,!0))})),w&&Object(A.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(w.displayName||w.name||w,"`.")),Object(A.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},D=Object(T.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:O,flattenOptions:N.d,getLabeledValue:N.e,filterOptions:N.b,isValueDisabled:N.g,findValueOption:N.c,warningProps:j,fillOptionsWithMissingValue:N.a}),I=function(t){Object(o.a)(n,t);var e=Object(a.a)(n);function n(){var t;return Object(i.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(r.a)(n,[{key:"render",value:function(){return s.createElement(D,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);I.Option=C,I.OptGroup=k;var P=I;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 i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=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(o.a)(n,t);var e=Object(a.a)(n);function n(t){var r;Object(i.a)(this,n),r=e.call(this,t);var o=window.document;return r.node=o.createElement("div"),o.body.appendChild(r.node),r}return Object(r.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)},MI8n:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/event.js ***!
|
|
|
\****************************************************************/
|
|
|
/*! exports provided: Event, Emitter, PauseableEmitter, EventMultiplexer, EventBufferer, Relay */
|
|
|
/*! exports used: Emitter, Event, EventBufferer, EventMultiplexer, PauseableEmitter, Relay */function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return u})),n.d(e,"e",(function(){return h})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return p})),n.d(e,"f",(function(){return f}));var i,r,o=n(/*! ./errors.js */"/cxE"),a=n(/*! ./functional.js */"C/vA"),s=n(/*! ./lifecycle.js */"pmY6"),l=n(/*! ./linkedList.js */"24hK"),c=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});!function(t){function e(t){return function(e,n,i){void 0===n&&(n=null);var r,o=!1;return r=t((function(t){if(!o)return r?r.dispose():o=!0,e.call(n,t)}),null,i),o&&r.dispose(),r}}function n(t,e){return a((function(n,i,r){return void 0===i&&(i=null),t((function(t){return n.call(i,e(t))}),null,r)}))}function i(t,e){return a((function(n,i,r){return void 0===i&&(i=null),t((function(t){e(t),n.call(i,t)}),null,r)}))}function r(t,e){return a((function(n,i,r){return void 0===i&&(i=null),t((function(t){return e(t)&&n.call(i,t)}),null,r)}))}function o(t,e,i){var r=i;return n(t,(function(t){return r=e(r,t)}))}function a(t){var e,n=new u({onFirstListenerAdd:function(){e=t(n.fire,n)},onLastListenerRemove:function(){e.dispose()}});return n.event}function l(t,e,n,i,r){var o;void 0===n&&(n=100),void 0===i&&(i=!1);var a=void 0,s=void 0,l=0,c=new u({leakWarningThreshold:r,onFirstListenerAdd:function(){o=t((function(t){l++,a=e(a,t),i&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var t=a;a=void 0,s=void 0,(!i||l>1)&&c.fire(t),l=0}),n)}))},onLastListenerRemove:function(){o.dispose()}});return c.event}function c(t){var e,n=!0;return r(t,(function(t){var i=n||t!==e;return n=!1,e=t,i}))}t.None=function(){return s.a.None},t.once=e,t.map=n,t.forEach=i,t.filter=r,t.signal=function(t){return t},t.any=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n,i){return void 0===n&&(n=null),s.e.apply(void 0,t.map((function(t){return t((function(t){return e.call(n,t)}),null,i)})))}},t.reduce=o,t.snapshot=a,t.debounce=l,t.stopwatch=function(t){var i=(new Date).getTime();return n(e(t),(function(t){return(new Date).getTime()-i}))},t.latch=c,t.buffer=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[]);var i=n.slice(),r=t((function(t){i?i.push(t):a.fire(t)})),o=function(){i&&i.forEach((function(t){return a.fire(t)})),i=null},a=new u({onFirstListenerAdd:function(){r||(r=t((function(t){return a.fire(t)})))},onFirstListenerDidAdd:function(){i&&(e?setTimeout(o):o())},onLastListenerRemove:function(){r&&r.dispose(),r=null}});return a.event};var h=function(){function t(t){this.event=t}return t.prototype.map=function(e){return new t(n(this.event,e))},t.prototype.forEach=function(e){return new t(i(this.event,e))},t.prototype.filter=function(e){return new t(r(this.event,e))},t.prototype.reduce=function(e,n){return new t(o(this.event,e,n))},t.prototype.latch=function(){return new t(c(this.event))},t.prototype.debounce=function(e,n,i,r){return void 0===n&&(n=100),void 0===i&&(i=!1),new t(l(this.event,e,n,i,r))},t.prototype.on=function(t,e,n){return this.event(t,e,n)},t.prototype.once=function(t,n,i){return e(this.event)(t,n,i)},t}();t.chain=function(t){return new h(t)},t.fromNodeEventEmitter=function(t,e,n){void 0===n&&(n=function(t){return t});var i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.fire(n.apply(void 0,t))},r=new u({onFirstListenerAdd:function(){return t.on(e,i)},onLastListenerRemove:function(){return t.removeListener(e,i)}});return r.event},t.fromDOMEventEmitter=function(t,e,n){void 0===n&&(n=function(t){return t});var i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.fire(n.apply(void 0,t))},r=new u({onFirstListenerAdd:function(){return t.addEventListener(e,i)},onLastListenerRemove:function(){return t.removeEventListener(e,i)}});return r.event},t.fromPromise=function(t){var e=new u,n=!1;return t.then(void 0,(function(){return null})).then((function(){n?e.fire(void 0):setTimeout((function(){return e.fire(void 0)}),0)})),n=!0,e.event},t.toPromise=function(t){return new Promise((function(n){return e(t)(n)}))}}(r||(r={}));!function(){function t(t,e){void 0===e&&(e=Math.random().toString(18).slice(2,5)),this.customThreshold=t,this.name=e,this._warnCountdown=0}t.prototype.dispose=function(){this._stacks&&this._stacks.clear()},t.prototype.check=function(t){var e=this,n=-1;if("number"==typeof this.customThreshold&&(n=this.customThreshold),!(n<=0||t<n)){this._stacks||(this._stacks=new Map);var i=(new Error).stack.split("\n").slice(3).join("\n"),r=this._stacks.get(i)||0;if(this._stacks.set(i,r+1),this._warnCountdown-=1,this._warnCountdown<=0){var o;this._warnCountdown=.5*n;var a=0;this._stacks.forEach((function(t,e){(!o||a<t)&&(o=e,a=t)})),console.warn("["+this.name+"] potential listener LEAK detected, having "+t+" listeners already. MOST frequent listener ("+a+"):"),console.warn(o)}return function(){var t=e._stacks.get(i)||0;e._stacks.set(i,t-1)}}}}();var u=function(){function t(t){this._disposed=!1,this._options=t,this._leakageMon=void 0}return Object.defineProperty(t.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(n,i,r){e._listeners||(e._listeners=new l.a);var o=e._listeners.isEmpty();o&&e._options&&e._options.onFirstListenerAdd&&e._options.onFirstListenerAdd(e);var a,c,u=e._listeners.push(i?[n,i]:n);return o&&e._options&&e._options.onFirstListenerDidAdd&&e._options.onFirstListenerDidAdd(e),e._options&&e._options.onListenerDidAdd&&e._options.onListenerDidAdd(e,n,i),e._leakageMon&&(a=e._leakageMon.check(e._listeners.size)),c={dispose:function(){(a&&a(),c.dispose=t._noop,e._disposed)||(u(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}},r instanceof s.b?r.add(c):Array.isArray(r)&&r.push(c),c}),this._event},enumerable:!0,configurable:!0}),t.prototype.fire=function(t){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new l.a);for(var e=this._listeners.iterator(),n=e.next();!n.done;n=e.next())this._deliveryQueue.push([n.value,t]);for(;this._deliveryQueue.size>0;){var i=this._deliveryQueue.shift(),r=i[0],a=i[1];try{"function"==typeof r?r.call(void 0,a):r[0].call(r[1],a)}catch(n){Object(o.e)(n)}}}},t.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},t._noop=function(){},t}(),h=function(t){function e(e){var n=t.call(this,e)||this;return n._isPaused=0,n._eventQueue=new l.a,n._mergeFn=e&&e.merge,n}return c(e,t),e.prototype.pause=function(){this._isPaused++},e.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var e=this._eventQueue.toArray();this._eventQueue.clear(),t.prototype.fire.call(this,this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)t.prototype.fire.call(this,this._eventQueue.shift())},e.prototype.fire=function(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):t.prototype.fire.call(this,e))},e}(u),d=function(){function t(){var t=this;this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:function(){return t.onFirstListenerAdd()},onLastListenerRemove:function(){return t.onLastListenerRemove()}})}return Object.defineProperty(t.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this,n={event:t,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return Object(s.h)(Object(a.a)((function(){e.hasListeners&&e.unhook(n);var t=e.events.indexOf(n);e.events.splice(t,1)})))},t.prototype.onFirstListenerAdd=function(){var t=this;this.hasListeners=!0,this.events.forEach((function(e){return t.hook(e)}))},t.prototype.onLastListenerRemove=function(){var t=this;this.hasListeners=!1,this.events.forEach((function(e){return t.unhook(e)}))},t.prototype.hook=function(t){var e=this;t.listener=t.event((function(t){return e.emitter.fire(t)}))},t.prototype.unhook=function(t){t.listener&&t.listener.dispose(),t.listener=null},t.prototype.dispose=function(){this.emitter.dispose()},t}(),p=function(){function t(){this.buffers=[]}return t.prototype.wrapEvent=function(t){var e=this;return function(n,i,r){return t((function(t){var r=e.buffers[e.buffers.length-1];r?r.push((function(){return n.call(i,t)})):n.call(i,t)}),void 0,r)}},t.prototype.bufferEvents=function(t){var e=[];this.buffers.push(e);var n=t();return this.buffers.pop(),e.forEach((function(t){return t()})),n},t}(),f=function(){function t(){var t=this;this.listening=!1,this.inputEvent=r.None,this.inputEventListener=s.a.None,this.emitter=new u({onFirstListenerDidAdd:function(){t.listening=!0,t.inputEventListener=t.inputEvent(t.emitter.fire,t.emitter)},onLastListenerRemove:function(){t.listening=!1,t.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(t.prototype,"input",{set:function(t){this.inputEvent=t,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=t(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},t}()},N0LK:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/strings.js ***!
|
|
|
\******************************************************************/
|
|
|
/*! exports provided: isFalsyOrWhitespace, pad, format, escape, escapeRegExpCharacters, trim, ltrim, rtrim, convertSimple2RegExpPattern, startsWith, endsWith, createRegExp, regExpLeadsToEndlessLoop, regExpFlags, firstNonWhitespaceIndex, getLeadingWhitespace, lastNonWhitespaceIndex, compare, compareIgnoreCase, isLowerAsciiLetter, isUpperAsciiLetter, equalsIgnoreCase, startsWithIgnoreCase, commonPrefixLength, commonSuffixLength, isHighSurrogate, isLowSurrogate, getNextCodePoint, nextCharLength, prevCharLength, containsRTL, containsEmoji, isBasicASCII, containsFullWidthCharacter, isFullWidthCharacter, isEmojiImprecise, UTF8_BOM_CHARACTER, startsWithUTF8BOM, safeBtoa, repeat, containsUppercaseCharacter, singleLetterHash, getGraphemeBreakType, breakBetweenGraphemeBreakType */
|
|
|
/*! exports used: UTF8_BOM_CHARACTER, breakBetweenGraphemeBreakType, commonPrefixLength, commonSuffixLength, compare, compareIgnoreCase, containsEmoji, containsFullWidthCharacter, containsRTL, containsUppercaseCharacter, convertSimple2RegExpPattern, createRegExp, endsWith, equalsIgnoreCase, escape, escapeRegExpCharacters, firstNonWhitespaceIndex, format, getGraphemeBreakType, getLeadingWhitespace, getNextCodePoint, isBasicASCII, isEmojiImprecise, isFalsyOrWhitespace, isFullWidthCharacter, isHighSurrogate, isLowSurrogate, isLowerAsciiLetter, isUpperAsciiLetter, lastNonWhitespaceIndex, nextCharLength, pad, prevCharLength, regExpFlags, regExpLeadsToEndlessLoop, repeat, rtrim, safeBtoa, singleLetterHash, startsWith, startsWithIgnoreCase, startsWithUTF8BOM, trim */function(t,e,n){"use strict";function i(t){return!t||"string"!=typeof t||0===t.trim().length}function r(t,e,n){void 0===n&&(n="0");for(var i=""+t,r=[i],o=i.length;o<e;o++)r.push(n);return r.reverse().join("")}n.d(e,"x",(function(){return i})),n.d(e,"F",(function(){return r})),n.d(e,"r",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"p",(function(){return l})),n.d(e,"Q",(function(){return c})),n.d(e,"K",(function(){return u})),n.d(e,"k",(function(){return h})),n.d(e,"N",(function(){return d})),n.d(e,"m",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"I",(function(){return m})),n.d(e,"H",(function(){return g})),n.d(e,"q",(function(){return v})),n.d(e,"t",(function(){return y})),n.d(e,"D",(function(){return b})),n.d(e,"e",(function(){return x})),n.d(e,"f",(function(){return C})),n.d(e,"B",(function(){return w})),n.d(e,"C",(function(){return k})),n.d(e,"n",(function(){return E})),n.d(e,"O",(function(){return O})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return T})),n.d(e,"z",(function(){return L})),n.d(e,"A",(function(){return A})),n.d(e,"u",(function(){return M})),n.d(e,"E",(function(){return D})),n.d(e,"G",(function(){return I})),n.d(e,"i",(function(){return R})),n.d(e,"g",(function(){return z})),n.d(e,"v",(function(){return H})),n.d(e,"h",(function(){return W})),n.d(e,"y",(function(){return V})),n.d(e,"w",(function(){return G})),n.d(e,"a",(function(){return U})),n.d(e,"P",(function(){return K})),n.d(e,"L",(function(){return q})),n.d(e,"J",(function(){return $})),n.d(e,"j",(function(){return Y})),n.d(e,"M",(function(){return X})),n.d(e,"s",(function(){return Z})),n.d(e,"b",(function(){return J}));var o=/{(\d+)}/g;function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return 0===e.length?t:t.replace(o,(function(t,n){var i=parseInt(n,10);return isNaN(i)||i<0||i>=e.length?t:e[i]}))}function s(t){return t.replace(/[<>&]/g,(function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";default:return t}}))}function l(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function c(t,e){return void 0===e&&(e=" "),u(function(t,e){if(!t||!e)return t;var n=e.length;if(0===n||0===t.length)return t;var i=0;for(;t.indexOf(e,i)===i;)i+=n;return t.substring(i)}(t,e),e)}function u(t,e){if(!t||!e)return t;var n=e.length,i=t.length;if(0===n||0===i)return t;for(var r=i,o=-1;-1!==(o=t.lastIndexOf(e,r-1))&&o+n===r;){if(0===o)return"";r=o}return t.substring(0,r)}function h(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(t,e){if(t.length<e.length)return!1;if(t===e)return!0;for(var n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function p(t,e){var n=t.length-e.length;return n>0?t.indexOf(e,n)===n:0===n&&t===e}function f(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("Cannot create regex from empty string");e||(t=l(t)),n.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(t,i)}function m(t){return"^"!==t.source&&"^$"!==t.source&&"$"!==t.source&&"^\\s*$"!==t.source&&!(!t.exec("")||0!==t.lastIndex)}function g(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")}function v(t){for(var e=0,n=t.length;e<n;e++){var i=t.charCodeAt(e);if(32!==i&&9!==i)return e}return-1}function y(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);for(var i=e;i<n;i++){var r=t.charCodeAt(i);if(32!==r&&9!==r)return t.substring(e,i)}return t.substring(e,n)}function b(t,e){void 0===e&&(e=t.length-1);for(var n=e;n>=0;n--){var i=t.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function x(t,e){return t<e?-1:t>e?1:0}function C(t,e){for(var n=Math.min(t.length,e.length),i=0;i<n;i++){var r=t.charCodeAt(i),o=e.charCodeAt(i);if(r!==o){k(r)&&(r+=32),k(o)&&(o+=32);var a=r-o;if(0!==a)return w(r)&&w(o)?a:x(t.toLowerCase(),e.toLowerCase())}}return t.length<e.length?-1:t.length>e.length?1:0}function w(t){return t>=97&&t<=122}function k(t){return t>=65&&t<=90}function S(t){return w(t)||k(t)}function E(t,e){return t.length===e.length&&_(t,e)}function _(t,e,n){void 0===n&&(n=t.length);for(var i=0;i<n;i++){var r=t.charCodeAt(i),o=e.charCodeAt(i);if(r!==o)if(S(r)&&S(o)){var a=Math.abs(r-o);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(r).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function O(t,e){var n=e.length;return!(e.length>t.length)&&_(t,e,n)}function N(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n++)if(t.charCodeAt(n)!==e.charCodeAt(n))return n;return i}function T(t,e){var n,i=Math.min(t.length,e.length),r=t.length-1,o=e.length-1;for(n=0;n<i;n++)if(t.charCodeAt(r-n)!==e.charCodeAt(o-n))return n;return i}function L(t){return 55296<=t&&t<=56319}function A(t){return 56320<=t&&t<=57343}function M(t,e,n){var i=t.charCodeAt(n);if(L(i)&&n+1<e){var r=t.charCodeAt(n+1);if(A(r))return r-56320+(i-55296<<10)+65536}return i}function j(t,e){var n=t.charCodeAt(e-1);if(A(n)&&e>1){var i=t.charCodeAt(e-2);if(L(i))return n-56320+(i-55296<<10)+65536}return n}function D(t,e){var n=Q.getInstance(),i=e,r=t.length,o=M(t,r,e);e+=o>=65536?2:1;for(var a=n.getGraphemeBreakType(o);e<r;){var s=M(t,r,e),l=n.getGraphemeBreakType(s);if(J(a,l))break;e+=s>=65536?2:1,a=l}return e-i}function I(t,e){var n=Q.getInstance(),i=e,r=j(t,e);e-=r>=65536?2:1;for(var o=n.getGraphemeBreakType(r);e>0;){var a=j(t,e),s=n.getGraphemeBreakType(a);if(J(s,o))break;e-=a>=65536?2:1,o=s}return i-e}var P=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function R(t){return P.test(t)}var B=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function z(t){return B.test(t)}var F=/^[\t\n\r\x20-\x7E]*$/;function H(t){return F.test(t)}function W(t){for(var e=0,n=t.length;e<n;e++)if(V(t.charCodeAt(e)))return!0;return!1}function V(t){return(t=+t)>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374}function G(t){return t>=127462&&t<=127487||t>=9728&&t<=10175||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129003||t>=129280&&t<=129535||t>=129648&&t<=129651||t>=129656&&t<=129666||t>=129680&&t<=129685}var U=String.fromCharCode(65279);function K(t){return!!(t&&t.length>0&&65279===t.charCodeAt(0))}function q(t){return btoa(encodeURIComponent(t))}function $(t,e){for(var n="",i=0;i<e;i++)n+=t;return n}function Y(t,e){return void 0===e&&(e=!1),!!t&&(e&&(t=t.replace(/\\./g,"")),t.toLowerCase()!==t)}function X(t){return(t%=52)<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}function Z(t){return Q.getInstance().getGraphemeBreakType(t)}function J(t,e){return 0===t?5!==e&&7!==e:(2!==t||3!==e)&&(4===t||2===t||3===t||(4===e||2===e||3===e||(8!==t||8!==e&&9!==e&&11!==e&&12!==e)&&((11!==t&&9!==t||9!==e&&10!==e)&&((12!==t&&10!==t||10!==e)&&(5!==e&&13!==e&&(7!==e&&(1!==t&&((13!==t||14!==e)&&(6!==t||6!==e)))))))))}var Q=function(){function t(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}return t.getInstance=function(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE},t.prototype.getGraphemeBreakType=function(t){if(t<32)return 10===t?3:13===t?2:4;if(t<127)return 0;for(var e=this._data,n=e.length/3,i=1;i<=n;)if(t<e[3*i])i*=2;else{if(!(t>e[3*i+1]))return e[3*i+2];i=2*i+1}return 0},t._INSTANCE=null,t}()},NvD2:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: isCheckDisabled, conductCheck */
|
|
|
/*! exports used: conductCheck */function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(/*! rc-util/es/warning */"Kwbf");function r(t,e){var n=new Set;return t.forEach((function(t){e.has(t)||n.add(t)})),n}function o(t){var e=t||{},n=e.disabled,i=e.disableCheckbox,r=e.checkable;return!(!n&&!i)||!1===r}function a(t,e,n,a){var s,l=[];s=a||o;var c=new Set(t.filter((function(t){var e=!!n[t];return e||l.push(t),e}))),u=new Map,h=0;return Object.keys(n).forEach((function(t){var e=n[t],i=e.level,r=u.get(i);r||(r=new Set,u.set(i,r)),r.add(e),h=Math.max(h,i)})),Object(i.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(t){return"'".concat(t,"'")})).join(", "))),!0===e?function(t,e,n,i){for(var o=new Set(t),a=new Set,s=0;s<=n;s+=1){(e.get(s)||new Set).forEach((function(t){var e=t.key,n=t.node,r=t.children,a=void 0===r?[]:r;o.has(e)&&!i(n)&&a.filter((function(t){return!i(t.node)})).forEach((function(t){o.add(t.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(e.get(c)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!i(n)&&t.parent&&!l.has(t.parent.key))if(i(t.parent.node))l.add(e.key);else{var r=!0,s=!1;(e.children||[]).filter((function(t){return!i(t.node)})).forEach((function(t){var e=t.key,n=o.has(e);r&&!n&&(r=!1),s||!n&&!a.has(e)||(s=!0)})),r&&o.add(e.key),s&&a.add(e.key),l.add(e.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(r(a,o))}}(c,u,h,s):function(t,e,n,i,o){for(var a=new Set(t),s=new Set(e),l=0;l<=i;l+=1){(n.get(l)||new Set).forEach((function(t){var e=t.key,n=t.node,i=t.children,r=void 0===i?[]:i;a.has(e)||s.has(e)||o(n)||r.filter((function(t){return!o(t.node)})).forEach((function(t){a.delete(t.key)}))}))}s=new Set;for(var c=new Set,u=i;u>=0;u-=1){(n.get(u)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!o(n)&&t.parent&&!c.has(t.parent.key))if(o(t.parent.node))c.add(e.key);else{var i=!0,r=!1;(e.children||[]).filter((function(t){return!o(t.node)})).forEach((function(t){var e=t.key,n=a.has(e);i&&!n&&(i=!1),r||!n&&!s.has(e)||(r=!0)})),i||a.delete(e.key),r&&s.add(e.key),c.add(e.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(r(s,a))}}(c,e.halfCheckedKeys,u,h,s)}},O2Wb:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.less?modules ***!
|
|
|
\******************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},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 i=n("U8pU"),r=n("VTBJ"),o=n("Ff2n"),a=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(t){var e=t.overlay,n=t.prefixCls,i=t.id,r=t.overlayInnerStyle;return a.createElement("div",{className:"".concat(n,"-inner"),id:i,role:"tooltip",style:r},"function"==typeof e?e():e)},u=Object(a.forwardRef)((function(t,e){var n=t.overlayClassName,u=t.trigger,h=void 0===u?["hover"]:u,d=t.mouseEnterDelay,p=void 0===d?0:d,f=t.mouseLeaveDelay,m=void 0===f?.1:f,g=t.overlayStyle,v=t.prefixCls,y=void 0===v?"rc-tooltip":v,b=t.children,x=t.onVisibleChange,C=t.afterVisibleChange,w=t.transitionName,k=t.animation,S=t.placement,E=void 0===S?"right":S,_=t.align,O=void 0===_?{}:_,N=t.destroyTooltipOnHide,T=void 0!==N&&N,L=t.defaultVisible,A=t.getTooltipContainer,M=t.overlayInnerStyle,j=Object(o.a)(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),D=Object(a.useRef)(null);Object(a.useImperativeHandle)(e,(function(){return D.current}));var I=Object(r.a)({},j);"visible"in t&&(I.popupVisible=t.visible);var P=!1,R=!1;if("boolean"==typeof T)P=T;else if(T&&"object"===Object(i.a)(T)){var B=T.keepParent;P=!0===B,R=!1===B}return a.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var e=t.arrowContent,n=void 0===e?null:e,i=t.overlay,r=t.id;return[a.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),a.createElement(c,{key:"content",prefixCls:y,id:r,overlay:i,overlayInnerStyle:M})]},action:h,builtinPlacements:l.a,popupPlacement:E,ref:D,popupAlign:O,getPopupContainer:A,onPopupVisibleChange:x,afterPopupVisibleChange:C,popupTransitionName:w,popupAnimation:k,defaultPopupVisible:L,destroyPopupOnHide:P,autoDestroy:R,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:p},I),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 a})),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 p})),n.d(e,"j",(function(){return f})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return g}));var i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function a(t,e){var n=t.slice(),i=n.indexOf(e);return i>=0&&n.splice(i,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 i=e.key,r=e.children;n.push(i),t(r)}))}(e[t].children),n}function d(t,e){var n=t.clientY,i=e.selectHandle.getBoundingClientRect(),r=i.top,o=i.bottom,a=i.height,s=Math.max(.25*a,2);return n<=r+s?-1:n>=o-s?1:0}function p(t,e){if(t)return e.multiple?t.slice():t.length?[t[0]]:t}function f(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else{if("object"!==Object(r.a)(t))return Object(o.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 m(t,e){var n=new Set;return(t||[]).forEach((function(t){!function t(i){if(!n.has(i)){var r=e[i];if(r){n.add(i);var o=r.parent;r.node.disabled||o&&t(o.key)}}}(t)})),Object(i.a)(n)}function g(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/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/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 i=n("kLXV"),r=n("rAM+"),o=(n("miYZ"),n("tsqr")),a=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),p=n("VrN/"),f=n.n(p),m=n("bdgK"),g=(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,i=(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:i}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),C=[{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 w(t){var e=t.onActionCallback,n=t.title,i=t.icon,r=t.actionName,o=t.className,a=void 0===o?"":o,s=t.children;return d.a.createElement("a",{title:n,className:a,onClick:function(){e(r)}},d.a.createElement("i",{className:"md-iconfont ".concat(i)}),s)}var k=function(t){var e=t.watch,n=t.showNullButton,i=t.onActionCallback,r=t.fullScreen,o=t.insertTemp,a=t.hidetoolBar,s=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(C,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(w,Object(y.a)({},t,{onActionCallback:i})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(w,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&d.a.createElement("li",null,d.a.createElement(w,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(w,{icon:"".concat(r?"icon-shrink":"icon-enlarge"),title:r?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})))},S=n("M8RZ"),E=(n("+L6B"),n("2/Rp")),_=(n("y8nQ"),n("Vl3Y")),O=(n("5NDa"),n("5rEg")),N={labelCol:{span:4},wrapperCol:{span:20}},T=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(_.a,Object(y.a)({},N,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(_.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(O.a,null)),d.a.createElement(_.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(O.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:n},"取消")))},L=n("7ahc"),A=n("k1fw"),M=(n("HmJG"),n("BjJ7")),j=_.a.useForm,D={width:280,marginRight:10},I={labelCol:{span:5},wrapperCol:{span:19}},P=function(t){var e=t.callback,n=t.onCancel,i=j(),r=Object(s.a)(i,1)[0],o=Object(h.useRef)();function a(t,e){r.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(_.a,Object(y.a)({form:r},I,{className:"upload-image-panel",onFinish:function(t){e(Object(A.a)(Object(A.a)({},t),{},{name:o.current}))}}),d.a.createElement(_.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(_.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(O.a,{style:D})),d.a.createElement(R,{onFileChange:function(t){var e=t.target.files[0];o.current=e.name,B(e,a)}}))),d.a.createElement(_.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(O.a,{style:{width:264}})),d.a.createElement(_.a.Item,{style:{textAlign:"right"}},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:n},"取消")))};function R(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function B(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 i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(n){e(JSON.parse(n.target.responseText),t)}),!1),i.addEventListener("error",(function(t){console.error(t)}),!1),i.open("POST","".concat(M.a,"/api/attachments.json")),i.send(n)}n("giR+");var z,F,H=n("fyUT"),W=(n("7Kak"),n("9yH6")),V=W.a.Group,G={margin:"0 8px"},U=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(_.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:G},"单元格数:"),d.a.createElement("span",{style:G},"行数"),d.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:G},"列数"),d.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:G},"对齐方式:"),d.a.createElement(_.a.Item,{name:"align"},d.a.createElement(V,null,d.a.createElement(W.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(W.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(W.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(W.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),q=n("7Cbv"),$="------------",Y={default:$,left:":".concat($),center:":".concat($,":"),right:"".concat($,":")},X=n("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var J=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Q=["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"],tt=(z={},Object(l.a)(z,J+"-B","bold"),Object(l.a)(z,J+"-I","italic"),z),et=(F={},Object(l.a)(F,"link","添加链接"),Object(l.a)(F,"code-block","添加代码块"),Object(l.a)(F,"upload-image","添加文件"),Object(l.a)(F,"add-table","添加表格"),F);e.a=function(t){var e=t.defaultValue,n=void 0===e?"":e,c=t.onChange,p=t.width,y=void 0===p?"100%":p,b=t.height,C=void 0===b?400:b,w=t.miniToolbar,E=void 0!==w&&w,_=t.isFocus,O=void 0!==_&&_,N=t.watch,A=t.insertTemp,M=t.mode,j=void 0===M?"markdown":M,D=t.id,I=void 0===D?"markdown-editor-id":D,R=t.showResizeBar,z=void 0!==R&&R,F=t.noStorage,H=void 0!==F&&F,W=t.showNullButton,V=void 0!==W&&W,G=t.hidetoolBar,$=void 0!==G&&G,J=t.fullScreen,nt=void 0!==J&&J,it=t.onBlur,rt=t.onCMBeforeChange,ot=t.onFullScreen,at=t.className,st=void 0===at?"":at,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,pt=void 0===dt?"":dt,ft=Object(h.useState)(null),mt=Object(s.a)(ft,2),gt=mt[0],vt=mt[1],yt=Object(h.useState)(n),bt=Object(s.a)(yt,2),xt=bt[0],Ct=bt[1],wt=Object(h.useState)(N),kt=Object(s.a)(wt,2),St=kt[0],Et=kt[1],_t=Object(h.useState)(nt),Ot=Object(s.a)(_t,2),Nt=Ot[0],Tt=Ot[1],Lt=Object(h.useState)(""),At=Object(s.a)(Lt,2),Mt=At[0],jt=At[1],Dt=Object(h.useState)(0),It=Object(s.a)(Dt,2),Pt=It[0],Rt=It[1],Bt=Object(h.useState)(C),zt=Object(s.a)(Bt,2),Ft=zt[0],Ht=zt[1],Wt=Object(h.useState)(!1),Vt=Object(s.a)(Wt,2),Gt=(Vt[0],Vt[1]),Ut=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),$t=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),Zt=Object(h.useRef)(),Jt=function(){var t=Object(a.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(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ut.current}});case 2:null!=(n=t.sent)&&null!==(e=n.attachments)&&void 0!==e&&e.length&&(console.log("cm:",gt,$t),n.attachments.map((function(t){t.content_type.indexOf("image")>-1?gt.replaceSelection(".concat(t.content_type,")")):t.content_type.indexOf("video")>-1?gt.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):t.content_type.indexOf("pdf")>-1?gt.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,'&disposition=inline" target="_blank">').concat(t.name,"</a>")):gt.replaceSelection("[".concat(t.name,"](").concat(x.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(){Ct(pt),null==gt||gt.setValue(pt)}),[pt]),Object(h.useEffect)((function(){null==ot||ot(Nt)}),[Nt]),Object(h.useEffect)((function(){if($t.current){var t=f.a.fromTextArea($t.current,{mode:j,lineNumbers:!E,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,n){if(!ct){var i=n.clipboardData;if(i){var r=i.types.toString(),a=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==j)return;try{var s,l=a[1];"file"===(null===(s=a[0])||void 0===s?void 0:s.kind)&&(l=a[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(e){var n,i,r;e.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection(".concat(e.content_type,")")):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?t.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):Q.includes(u)?t.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):t.replaceSelection("[".concat(c.name,"](").concat(x.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){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return O&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Yt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Yt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,n){var i;if(Yt.current.classList.add("mouse-hover-md"),(i=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var r=function(e){var n=i[e],r=n.name.split(".").pop();B(n,(function(e){var i,o,a;e.id?(null==n||null===(i=n.type)||void 0===i?void 0:i.indexOf("image"))>-1?t.replaceSelection(".concat(e.content_type,")")):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?t.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(n.type,'&disposition=inline" target="_blank">').concat(n.name,"</a>")):Q.includes(r)?t.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(n.name,"</a>")):t.replaceSelection("[".concat(n.name,"](").concat(x.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")}))},o=0;o<i.length;o++)r(o)}})),vt(t),function(){t.off("paste",e)}}}),[]);var Qt=Object(h.useCallback)((function(){Yt.current}),[Ft,Yt,Nt]);Object(h.useEffect)((function(){if(gt){var t=function(){var t=new m.default((function(t){var e,n=Object(r.a)(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(Qt(),gt.setSize("100%","100%"),gt.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe($t.current.parentElement),t}();return function(){t.unobserve($t.current.parentElement)}}}),[gt,Qt]),Object(h.useEffect)((function(){if(gt){for(var t=[],e=function(){var e=i[n],r=(o=Object(s.a)(e,2))[0],a=o[1],c=Object(l.a)({},r,(function(){te(a)}));t.push(c),gt.addKeyMap(c)},n=0,i=Object.entries(tt);n<i.length;n++){var o;e()}return qt.current=setInterval((function(){Kt.current&&Jt()}),4e3),function(){clearInterval(qt.current);var e,n=Object(r.a)(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;gt.removeKeyMap(i)}}catch(t){n.e(t)}finally{n.f()}}}}),[gt]),Object(h.useEffect)((function(){nt!==Nt&&Tt(nt)}),[nt]),Object(X.a)((function(){if(!H&&Pt>0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(I);t>=Pt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(I,xt),Gt(!0))}}),1e4),Object(h.useEffect)((function(){Et(N)}),[gt,N]),Object(h.useEffect)((function(){gt&&O&>.focus()}),[gt,O]),Object(h.useEffect)((function(){if(St&>){var t=gt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var n=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*n}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[gt,St]),Object(h.useEffect)((function(){if(gt&&rt){function t(t,e){rt(t,e)}return gt.on("beforeChange",t),function(){gt.off("beforeChange",t)}}}),[gt,rt]),Object(h.useEffect)((function(){if(gt&&it){function t(){it(gt.getValue())}return gt.on("blur",t),function(){gt.off("blur",t)}}}),[gt,it]),Object(h.useEffect)((function(){if(gt){function t(t){var e=t.getValue();Ct(e),Rt((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return gt.on("change",t),function(){gt.off("change",t)}}}),[gt,c]),Object(h.useEffect)((function(){gt&&(null==n?(gt.setValue(""),Ct("")):n!==gt.getValue()&&(gt.setValue(n),Ct(n),gt.setCursor(gt.lineCount(),0)))}),[gt,n]);var te=Object(h.useCallback)((function(t){var e=gt.getCursor(),n=gt.getSelection(),i=n.split("\n");switch(t){case"bold":return gt.replaceSelection("**"+n+"**"),""===n&>.setCursor(e.line,e.ch+2),gt.focus();case"italic":return gt.replaceSelection("*"+n+"*"),""===n&>.setCursor(e.line,e.ch+1),gt.focus();case"code":return gt.replaceSelection("`"+n+"`"),""===n&>.setCursor(e.line,e.ch+1),gt.focus();case"inline-latex":return gt.replaceSelection("`$$"+n+"$$`"),""===n&>.setCursor(e.line,e.ch+3),gt.focus();case"latex":return gt.replaceSelection("```latex\n"+n+"\n```"),gt.setCursor(e.line+1,n.length+1),gt.focus();case"line-break":return gt.replaceSelection("<br/>\n"),gt.focus();case"list-ul":return""===n?gt.replaceSelection("- "+n):gt.replaceSelection(i.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),gt.focus();case"list-ol":return""===n?gt.replaceSelection("1. "+n):gt.replaceSelection(i.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),gt.focus();case"add-null-ch":return""===n&>.setCursor(e.line,e.ch+1),gt.replaceSelection("▁"),gt.focus();case"inster-template-1":return""===n&>.setCursor(e.line,e.ch),gt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),gt.focus();case"eraser":return gt.setValue(""),gt.focus();case"trigger-watch":return Et(!St),gt.focus();case"trigger-full-screen":return Tt(!Nt),gt.focus();case"link":return void jt("link");case"code-block":return void jt("code-block");case"upload-image":return void jt("upload-image");case"add-table":return void jt("add-table");default:throw new Error}}),[gt,St,Nt]),ee=Object(h.useCallback)((function(t){switch(jt(""),Mt){case"link":var e=t.title,n=t.link;return gt.replaceSelection("[".concat(e,"](").concat(n,")")),gt.focus();case"code-block":var i=t.language,r=t.content;return gt.replaceSelection(["```"+i,r,"```"].join("\n")),gt.focus();case"upload-image":var o=t.src,a=t.alt,s=t.name;return o.indexOf("type=image")>-1?gt.replaceSelection(".concat(o,' "').concat(a||"",'" )')):o.indexOf("type=application/pdf")>-1?gt.replaceSelection('<a href="'.concat(o,'&disposition=inline" target="_blank">').concat(s,"</a>")):gt.replaceSelection('<a href="'.concat(o,'" target="_blank">').concat(s,"</a>")),gt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d<l;d++){for(var p=[],f=[],m=0;m<c;m++)1===d&&f.push(Y[u]),p.push(" ");1===d&&(h+="| ".concat(f.join(" | ")," |\n")),h+="| ".concat(p.join(1===c?"":" | ")," |\n")}return gt.replaceSelection(h+"\n"),gt.focus();default:throw new Error}}),[gt,Mt]),ne=Object(h.useMemo)((function(){switch(Mt){case"link":return d.a.createElement(T,{callback:ee,onCancel:ie});case"code-block":return d.a.createElement(L.b,{callback:ee,onCancel:ie});case"upload-image":return d.a.createElement(P,{callback:ee,onCancel:ie});case"add-table":return d.a.createElement(U,{callback:ee,onCancel:ie});default:return null}}),[Mt]);function ie(){jt("")}Object(h.useEffect)((function(){if(Xt.current){var t=Xt.current,e=!1,n=0;function i(t){e=!0,n=t.pageY}function r(){e=!1}function o(t){if(e){var i=t.pageY-n;i<0&&(i=0),i>300&&(i=300),Ht(C+i+"px")}}return t.addEventListener("mousedown",i),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),function(){t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)}}}),[gt,Xt]),Object(h.useEffect)((function(){Ht(C)}),[C]);var re={width:Z(y),height:Z(Ft)};Object(h.useMemo)((function(){if(Pt){var t=new Date(Pt),e=t.getHours(),n=t.getMinutes(),i=t.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(i)}return 0}),[Pt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Yt},d.a.createElement("div",{className:"markdown-editor-container ".concat(st," ").concat(St?"on-preview":""," ").concat(E?"mini":""," ").concat(Nt?"full-screen":""),style:re},d.a.createElement(k,{insertTemp:A,watch:St,fullScreen:Nt,showNullButton:V,onActionCallback:te,hidetoolBar:$,uuid:Ut.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:$t,placeholder:ht})),St?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===j&&d.a.createElement(v,{value:xt}),"stex"!==j&&d.a.createElement(g.a,{edit:!0,value:xt,replaces:function(t,e){var n=gt.getValue();n=n.replace(t,e),Ct(n),null==gt||gt.setValue(n)}})):null))),z?d.a.createElement("a",{ref:Xt,className:"editor-resize"}):null,d.a.createElement(S.a,null,et[Mt]?d.a.createElement(i.a,{centered:!0,title:et[Mt],visible:!0,onCancel:ie,footer:null},ne):null))}},PGNT:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/components/editor.less?modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrap:"wrap___orWmH",modal:"modal___142IN",titleWrap:"titleWrap___2UWGN",required:"required___lXOtq",title:"title___2wqMf",colorGray:"colorGray___3FkLm",choiceWrap:"choiceWrap___3pbic",answer:"answer___30LSv",activeAnswer:"activeAnswer___3ayAN",deleteIcon:"deleteIcon___2HHly",addIcon:"addIcon___29vcx",editorWrap:"editorWrap___ANVP6",htmlWrap:"htmlWrap___38sLf",radio:"radio___15wok",color333:"color333___sNPjh",color999:"color999___1ofkl",fold:"fold___6rnoE",head:"head___2muph"}},PsQE:
|
|
|
/*!********************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.less?modules ***!
|
|
|
\********************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex_box_center:"flex_box_center___2PkN_",flex_space_between:"flex_space_between___36cDA",flex_box_vertical_center:"flex_box_vertical_center___2c88u",flex_box_center_end:"flex_box_center_end___14cXO",flex_box_column:"flex_box_column___3nalt",wrap:"wrap___3xZrs",left:"left___19hOK",title:"title___3Ti2k",total:"total___3MRC5",list:"list___3pdfL",name:"name___2IcTs",b:"b___2W0Sn",r:"r___2Tpj8",l:"l___1rMKQ",tag:"tag___jj2X5",right:"right___16831",examName:"examName___2TmgX",t:"t___1CJZd",num:"num___1qX6C",topWarp:"topWarp___3WuSr",head:"head___3z9Hq",so:"so___m2B6Z",btn:"btn___20VL7",content:"content___2tTuo",titleWrap:"titleWrap___1cYdQ",single:"single___1BKtz",analysis:"analysis___1qm4Y",text:"text___1JQUf",btnsElse:"btnsElse___2IzAs",btnsWrap:"btnsWrap___3ib37",btns:"btns___2DbBT",modalColumn:"modalColumn___1zs36",modalRow:"modalRow___14b2N",sup:"sup___1CIjI",popover:"popover___Mmcvb"}},QDVR:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/map.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: values, keys, StringIterator, PathIterator, TernarySearchTree, ResourceMap, LinkedMap, LRUCache */
|
|
|
/*! exports used: LRUCache, ResourceMap, TernarySearchTree, keys, values */function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var i,r=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=[];return t.forEach((function(t){return e.push(t)})),e}function a(t){var e=[];return t.forEach((function(t,n){return e.push(n)})),e}var s=function(){function t(){this._value="",this._pos=0}return t.prototype.reset=function(t){return this._value=t,this._pos=0,this},t.prototype.next=function(){return this._pos+=1,this},t.prototype.hasNext=function(){return this._pos<this._value.length-1},t.prototype.cmp=function(t){return t.charCodeAt(0)-this._value.charCodeAt(this._pos)},t.prototype.value=function(){return this._value[this._pos]},t}(),l=function(){function t(t){void 0===t&&(t=!0),this._splitOnBackslash=t}return t.prototype.reset=function(t){return this._value=t.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},t.prototype.hasNext=function(){return this._to<this._value.length},t.prototype.next=function(){this._from=this._to;for(var t=!0;this._to<this._value.length;this._to++){var e=this._value.charCodeAt(this._to);if(47===e||this._splitOnBackslash&&92===e){if(!t)break;this._from++}else t=!1}return this},t.prototype.cmp=function(t){for(var e=0,n=t.length,i=this._from;e<n&&i<this._to;){var r=t.charCodeAt(e)-this._value.charCodeAt(i);if(0!==r)return r;e+=1,i+=1}return n===this._to-this._from?0:e<n?-1:1},t.prototype.value=function(){return this._value.substring(this._from,this._to)},t}(),c=function(){},u=function(){function t(t){this._iter=t}return t.forPaths=function(){return new t(new l)},t.forStrings=function(){return new t(new s)},t.prototype.clear=function(){this._root=void 0},t.prototype.set=function(t,e){var n,i=this._iter.reset(t);for(this._root||(this._root=new c,this._root.segment=i.value()),n=this._root;;){var r=i.cmp(n.segment);if(r>0)n.left||(n.left=new c,n.left.segment=i.value()),n=n.left;else if(r<0)n.right||(n.right=new c,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new c,n.mid.segment=i.value()),n=n.mid}}var o=n.value;return n.value=e,n.key=t,o},t.prototype.get=function(t){for(var e=this._iter.reset(t),n=this._root;n;){var i=e.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!e.hasNext())break;e.next(),n=n.mid}}return n?n.value:void 0},t.prototype.findSubstr=function(t){for(var e=this._iter.reset(t),n=this._root,i=void 0;n;){var r=e.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!e.hasNext())break;e.next(),i=n.value||i,n=n.mid}}return n&&n.value||i},t.prototype.forEach=function(t){this._forEach(this._root,t)},t.prototype._forEach=function(t,e){t&&(this._forEach(t.left,e),t.value&&e(t.value,t.key),this._forEach(t.mid,e),this._forEach(t.right,e))},t}(),h=function(){function t(){this.map=new Map,this.ignoreCase=!1}return t.prototype.set=function(t,e){this.map.set(this.toKey(t),e)},t.prototype.get=function(t){return this.map.get(this.toKey(t))},t.prototype.toKey=function(t){var e=t.toString();return this.ignoreCase&&(e=e.toLowerCase()),e},t}(),d=function(t){function e(e,n){void 0===n&&(n=1);var i=t.call(this)||this;return i._limit=e,i._ratio=Math.min(Math.max(0,n),1),i}return r(e,t),e.prototype.get=function(e){return t.prototype.get.call(this,e,2)},e.prototype.peek=function(e){return t.prototype.get.call(this,e,0)},e.prototype.set=function(e,n){t.prototype.set.call(this,e,n,2),this.checkTrim()},e.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},e}(function(){function t(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return t.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),t.prototype.get=function(t,e){void 0===e&&(e=0);var n=this._map.get(t);if(n)return 0!==e&&this.touch(n,e),n.value},t.prototype.set=function(t,e,n){void 0===n&&(n=0);var i=this._map.get(t);if(i)i.value=e,0!==n&&this.touch(i,n);else{switch(i={key:t,value:e,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i)}this._map.set(t,i),this._size++}},t.prototype.delete=function(t){return!!this.remove(t)},t.prototype.remove=function(t){var e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value},t.prototype.forEach=function(t,e){for(var n=this._head;n;)e?t.bind(e)(n.value,n.key,this):t(n.value,n.key,this),n=n.next},t.prototype.trimOld=function(t){if(!(t>=this.size))if(0!==t){for(var e=this._head,n=this.size;e&&n>t;)this._map.delete(e.key),e=e.next,n--;this._head=e,this._size=n,e&&(e.previous=void 0)}else this.clear()},t.prototype.addItemFirst=function(t){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");t.next=this._head,this._head.previous=t}else this._tail=t;this._head=t},t.prototype.addItemLast=function(t){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");t.previous=this._tail,this._tail.next=t}else this._head=t;this._tail=t},t.prototype.removeItem=function(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{var e=t.next,n=t.previous;if(!e||!n)throw new Error("Invalid list");e.previous=n,n.next=e}t.next=void 0,t.previous=void 0},t.prototype.touch=function(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===e||2===e)if(1===e){if(t===this._head)return;var n=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t}else if(2===e){if(t===this._tail)return;n=t.next,i=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t}},t.prototype.toJSON=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),t},t}())},QSKd:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/wenhao.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/wenhao.35e7ea02.svg"},"RZ/O":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/bi.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/bi.c00a7d71.svg"},SJMd:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/code-prettify/src/prettify.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],n=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],i=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],r=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,n,i,r){if(n){var o={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:e,decorations:null};i(o),r.push.apply(r,o.decorations)}}var p=/\S/;function f(t){for(var e=void 0,n=t.firstChild;n;n=n.nextSibling){var i=n.nodeType;e=1===i?e?t:n:3===i&&p.test(n.nodeValue)?t:e}return e===t?void 0:e}function m(t,e){var n,i={};!function(){for(var r=t.concat(e),o=[],a={},s=0,l=r.length;s<l;++s){var c=r[s],u=c[3];if(u)for(var h=u.length;--h>=0;)i[u.charAt(h)]=c;var d=c[1],p=""+d;a.hasOwnProperty(p)||(o.push(d),a[p]=null)}o.push(/[\0-\uffff]/),n=function(t){for(var e=0,n=!1,i=!1,r=0,o=t.length;r<o;++r){if((d=t[r]).ignoreCase)i=!0;else if(/[a-z]/i.test(d.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,i=!1;break}}var a={b:8,t:9,n:10,v:11,f:12,r:13};function s(t){var e=t.charCodeAt(0);if(92!==e)return e;var n=t.charAt(1);return(e=a[n])||("0"<=n&&n<="7"?parseInt(t.substring(1),8):"u"===n||"x"===n?parseInt(t.substring(2),16):t.charCodeAt(1))}function l(t){if(t<32)return(t<16?"\\x0":"\\x")+t.toString(16);var e=String.fromCharCode(t);return"\\"===e||"-"===e||"]"===e||"^"===e?"\\"+e:e}function c(t){var e=t.substring(1,t.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],i="^"===e[0],r=["["];i&&r.push("^");for(var o=i?1:0,a=e.length;o<a;++o){var c=e[o];if(/\\[bdsw]/i.test(c))r.push(c);else{var u,h=s(c);o+2<a&&"-"===e[o+1]?(u=s(e[o+2]),o+=2):u=h,n.push([h,u]),u<65||h>122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],p=[];for(o=0;o<n.length;++o){(f=n[o])[0]<=p[1]+1?p[1]=Math.max(p[1],f[1]):d.push(p=f)}for(o=0;o<d.length;++o){var f=d[o];r.push(l(f[0])),f[1]>f[0]&&(f[1]+1>f[0]&&r.push("-"),r.push(l(f[1])))}return r.push("]"),r.join("")}function u(t){for(var i=t.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),r=i.length,o=[],a=0,s=0;a<r;++a){if("("===(h=i[a]))++s;else if("\\"===h.charAt(0)){(u=+h.substring(1))&&(u<=s?o[u]=-1:i[a]=l(u))}}for(a=1;a<o.length;++a)-1===o[a]&&(o[a]=++e);for(a=0,s=0;a<r;++a){if("("===(h=i[a]))o[++s]||(i[a]="(?:");else if("\\"===h.charAt(0)){var u;(u=+h.substring(1))&&u<=s&&(i[a]="\\"+o[u])}}for(a=0;a<r;++a)"^"===i[a]&&"^"!==i[a+1]&&(i[a]="");if(t.ignoreCase&&n)for(a=0;a<r;++a){var h,d=(h=i[a]).charAt(0);h.length>=2&&"["===d?i[a]=c(h):"\\"!==d&&(i[a]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return i.join("")}var h=[];for(r=0,o=t.length;r<o;++r){var d;if((d=t[r]).global||d.multiline)throw new Error(""+d);h.push("(?:"+u(d)+")")}return new RegExp(h.join("|"),i?"gi":"g")}(o)}();var r=e.length,o=function(t){for(var a=t.sourceCode,s=t.basePos,l=t.sourceNode,c=[s,"pln"],u=0,h=a.match(n)||[],p={},f=0,m=h.length;f<m;++f){var g,v=h[f],y=p[v],b=void 0;if("string"==typeof y)g=!1;else{var x=i[v.charAt(0)];if(x)b=v.match(x[1]),y=x[0];else{for(var w=0;w<r;++w)if(x=e[w],b=v.match(x[1])){y=x[0];break}b||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(p[v]=y)}var k=u;if(u+=v.length,g){var S=b[1],E=v.indexOf(S),_=E+S.length;b[2]&&(E=(_=v.length-b[2].length)-S.length);var O=y.substring(5);d(l,s+k,v.substring(0,E),o,c),d(l,s+k+E,S,C(O,S),c),d(l,s+k+_,v.substring(_),o,c)}else c.push(s+k,y)}t.decorations=c};return o}function g(t){var e=[],n=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var i=t.hashComments;i&&(t.cStyleComments?(i>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var r=t.regexLiterals;if(r){var o=r>1?"":"\n\r",a=o?".":"[\\S\\s]",s="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+a+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=t.types;l&&n.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(e,n)}var v=g({keywords:[i,o,r,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,n){for(var i=/(?:^|\s)nocode(?:\s|$)/,r=/\r\n?|\n/,o=t.ownerDocument,a=o.createElement("li");t.firstChild;)a.appendChild(t.firstChild);var s=[a];function l(t){var e=t.nodeType;if(1!=e||i.test(t.className)){if((3==e||4==e)&&n){var a=t.nodeValue,s=a.match(r);if(s){var u=a.substring(0,s.index);t.nodeValue=u;var h=a.substring(s.index+s[0].length);if(h)t.parentNode.insertBefore(o.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,n=function t(e,n){var i=n?e.cloneNode(!1):e,r=e.parentNode;if(r){var o=t(r,1),a=e.nextSibling;o.appendChild(i);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return i}(t.nextSibling,0);(e=n.parentNode)&&1===e.nodeType;)n=e;s.push(n)}for(var u=0;u<s.length;++u)l(s[u]);e===(0|e)&&s[0].setAttribute("value",e);var h=o.createElement("ol");h.className="linenums";for(var d=Math.max(0,e-1|0)||0,p=(u=0,s.length);u<p;++u)(a=s[u]).className="L"+(u+d)%10,a.firstChild||a.appendChild(o.createTextNode(" ")),h.appendChild(a);t.appendChild(h)}var b={};function x(e,n){for(var i=n.length;--i>=0;){var r=n[i];b.hasOwnProperty(r)?t.console&&console.warn("cannot override language handler %s",r):b[r]=e}}function C(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*</.test(e)?"default-markup":"default-code"),b[t]}function w(e){var n,i,r,o,a,s,l,c=e.langExtension;try{var u=(n=e.sourceNode,i=e.pre,r=/(?:^|\s)nocode(?:\s|$)/,o=[],a=0,s=[],l=0,function t(e){var n=e.nodeType;if(1==n){if(r.test(e.className))return;for(var c=e.firstChild;c;c=c.nextSibling)t(c);var u=e.nodeName.toLowerCase();"br"!==u&&"li"!==u||(o[l]="\n",s[l<<1]=a++,s[l++<<1|1]=e)}else if(3==n||4==n){var h=e.nodeValue;h.length&&(h=i?h.replace(/\r\n?/g,"\n"):h.replace(/[ \t\r\n]+/g," "),o[l]=h,s[l<<1]=a,a+=h.length,s[l++<<1|1]=e)}}(n),{sourceCode:o.join("").replace(/\n$/,""),spans:s}),h=u.sourceCode;e.sourceCode=h,e.spans=u.spans,e.basePos=0,C(c,h)(e),function(t){var e=/\bMSIE\s(\d+)/.exec(navigator.userAgent);e=e&&+e[1]<=8;var n,i,r=/\n/g,o=t.sourceCode,a=o.length,s=0,l=t.spans,c=l.length,u=0,h=t.decorations,d=h.length,p=0;for(h[d]=a,i=n=0;i<d;)h[i]!==h[i+2]?(h[n++]=h[i++],h[n++]=h[i++]):i+=2;for(d=n,i=n=0;i<d;){for(var f=h[i],m=h[i+1],g=i+2;g+2<=d&&h[g+1]===m;)g+=2;h[n++]=f,h[n++]=m,i=g}d=h.length=n;var v=t.sourceNode,y="";v&&(y=v.style.display,v.style.display="none");try{for(;u<c;){l[u];var b,x=l[u+2]||a,C=h[p+2]||a,w=(g=Math.min(x,C),l[u+1]);if(1!==w.nodeType&&(b=o.substring(s,g))){e&&(b=b.replace(r,"\r")),w.nodeValue=b;var k=w.ownerDocument,S=k.createElement("span");S.className=h[p+1];var E=w.parentNode;E.replaceChild(S,w),S.appendChild(w),s<x&&(l[u+1]=w=k.createTextNode(o.substring(g,x)),E.insertBefore(w,S.nextSibling))}(s=g)>=x&&(u+=2),s>=C&&(p+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function k(t,e,n){var i=n||!1,r=e||null,o=document.createElement("div");return o.innerHTML="<pre>"+t+"</pre>",o=o.firstChild,i&&y(o,i,!0),w({langExtension:r,numberLines:i,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function S(e,n){var i=n||document.body,r=i.ownerDocument||document;function o(t){return i.getElementsByTagName(t)}for(var a=[o("pre"),o("code"),o("xmp")],s=[],l=0;l<a.length;++l)for(var c=0,u=a[l].length;c<u;++c)s.push(a[l][c]);a=null;var h=Date;h.now||(h={now:function(){return+new Date}});var d=0,p=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,b=/^code$/i,x=/^(?:pre|code|xmp)$/i,C={};!function n(){for(var i=t.PR_SHOULD_USE_CONTINUATION?h.now()+250:1/0;d<s.length&&h.now()<i;d++){for(var o=s[d],a=C,l=o;l=l.previousSibling;){var c=l.nodeType,u=(7===c||8===c)&&l.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(l.nodeValue))break;if(u){a={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(t,e,n){a[e]=n}));break}}var k=o.className;if((a!==C||m.test(k))&&!g.test(k)){for(var S=!1,E=o.parentNode;E;E=E.parentNode){var _=E.tagName;if(x.test(_)&&E.className&&m.test(E.className)){S=!0;break}}if(!S){o.className+=" prettyprinted";var O,N,T=a.lang;if(!T)!(T=k.match(p))&&(O=f(o))&&b.test(O.tagName)&&(T=O.className.match(p)),T&&(T=T[1]);if(v.test(o.tagName))N=1;else{var L=o.currentStyle,A=r.defaultView,M=L?L.whiteSpace:A&&A.getComputedStyle?A.getComputedStyle(o,null).getPropertyValue("white-space"):0;N=M&&"pre"===M.substring(0,3)}var j=a.linenums;(j="true"===j||+j)||(j=!!(j=k.match(/\blinenums\b(?::(\d+))?/))&&(!j[1]||!j[1].length||+j[1])),j&&y(o,j,N),w({langExtension:T,sourceNode:o,numberLines:j,pre:N,sourceCode:null,basePos:null,spans:null,decorations:null})}}}d<s.length?t.setTimeout(n,250):"function"==typeof e&&e()}()}x(v,["default-code"]),x(m([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),x(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:i,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:r,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(m([],[["str",/^[\s\S]+/]]),["regex"]);var E=t.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:k,prettyPrint:S},_=t.define;"function"==typeof _&&_.amd&&_("google-code-prettify",[],(function(){return E}))}()},T8No:
|
|
|
/*!************************************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js ***!
|
|
|
\************************************************************************************/
|
|
|
/*! exports provided: ContextKeyExpr, ContextKeyDefinedExpr, ContextKeyEqualsExpr, ContextKeyNotEqualsExpr, ContextKeyNotExpr, ContextKeyRegexExpr, ContextKeyNotRegexExpr, ContextKeyAndExpr, ContextKeyOrExpr, RawContextKey, IContextKeyService, SET_CONTEXT_COMMAND_ID */
|
|
|
/*! exports used: ContextKeyExpr, ContextKeyOrExpr, IContextKeyService, RawContextKey, SET_CONTEXT_COMMAND_ID */function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return g})),n.d(e,"d",(function(){return v})),n.d(e,"c",(function(){return y})),n.d(e,"e",(function(){return b}));var i,r=n(/*! ../../../base/common/strings.js */"N0LK"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(){function t(){}return t.has=function(t){return c.create(t)},t.equals=function(t,e){return u.create(t,e)},t.regex=function(t,e){return p.create(t,e)},t.not=function(t){return d.create(t)},t.and=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return m.create(t)},t.or=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return g.create(t)},t.deserialize=function(t,e){if(void 0===e&&(e=!1),t)return this._deserializeOrExpression(t,e)},t._deserializeOrExpression=function(t,e){var n=this,i=t.split("||");return g.create(i.map((function(t){return n._deserializeAndExpression(t,e)})))},t._deserializeAndExpression=function(t,e){var n=this,i=t.split("&&");return m.create(i.map((function(t){return n._deserializeOne(t,e)})))},t._deserializeOne=function(t,e){if((t=t.trim()).indexOf("!=")>=0){var n=t.split("!=");return h.create(n[0].trim(),this._deserializeValue(n[1],e))}if(t.indexOf("==")>=0){n=t.split("==");return u.create(n[0].trim(),this._deserializeValue(n[1],e))}if(t.indexOf("=~")>=0){n=t.split("=~");return p.create(n[0].trim(),this._deserializeRegexValue(n[1],e))}return/^\!\s*/.test(t)?d.create(t.substr(1).trim()):c.create(t)},t._deserializeValue=function(t,e){if("true"===(t=t.trim()))return!0;if("false"===t)return!1;var n=/^'([^']*)'$/.exec(t);return n?n[1].trim():t},t._deserializeRegexValue=function(t,e){if(Object(r.x)(t)){if(e)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var n=t.indexOf("/"),i=t.lastIndexOf("/");if(n===i||n<0){if(e)throw new Error("bad regexp-value '"+t+"', missing /-enclosure");return console.warn("bad regexp-value '"+t+"', missing /-enclosure"),null}var o=t.slice(n+1,i),a="i"===t[i+1]?"i":"";try{return new RegExp(o,a)}catch(n){if(e)throw new Error("bad regexp-value '"+t+"', parse error: "+n);return console.warn("bad regexp-value '"+t+"', parse error: "+n),null}},t}();function l(t,e){var n=t.getType(),i=e.getType();if(n!==i)return n-i;switch(n){case 1:case 2:case 3:case 4:case 6:case 7:case 5:return t.cmp(e);default:throw new Error("Unknown ContextKeyExpr!")}}var c=function(){function t(t){this.key=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 1},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:0},t.prototype.equals=function(e){return e instanceof t&&this.key===e.key},t.prototype.evaluate=function(t){return!!t.getValue(this.key)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return d.create(this.key)},t}(),u=function(){function t(t,e){this.key=t,this.value=e}return t.create=function(e,n){return"boolean"==typeof n?n?c.create(e):d.create(e):new t(e,n)},t.prototype.getType=function(){return 3},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:this.value<t.value?-1:this.value>t.value?1:0},t.prototype.equals=function(e){return e instanceof t&&(this.key===e.key&&this.value===e.value)},t.prototype.evaluate=function(t){return t.getValue(this.key)==this.value},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return h.create(this.key,this.value)},t}(),h=function(){function t(t,e){this.key=t,this.value=e}return t.create=function(e,n){return"boolean"==typeof n?n?d.create(e):c.create(e):new t(e,n)},t.prototype.getType=function(){return 4},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:this.value<t.value?-1:this.value>t.value?1:0},t.prototype.equals=function(e){return e instanceof t&&(this.key===e.key&&this.value===e.value)},t.prototype.evaluate=function(t){return t.getValue(this.key)!=this.value},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return u.create(this.key,this.value)},t}(),d=function(){function t(t){this.key=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 2},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:0},t.prototype.equals=function(e){return e instanceof t&&this.key===e.key},t.prototype.evaluate=function(t){return!t.getValue(this.key)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return c.create(this.key)},t}(),p=function(){function t(t,e){this.key=t,this.regexp=e}return t.create=function(e,n){return new t(e,n)},t.prototype.getType=function(){return 6},t.prototype.cmp=function(t){if(this.key<t.key)return-1;if(this.key>t.key)return 1;var e=this.regexp?this.regexp.source:"",n=t.regexp?t.regexp.source:"";return e<n?-1:e>n?1:0},t.prototype.equals=function(e){if(e instanceof t){var n=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&n===i}return!1},t.prototype.evaluate=function(t){var e=t.getValue(this.key);return!!this.regexp&&this.regexp.test(e)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return f.create(this)},t}(),f=function(){function t(t){this._actual=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 7},t.prototype.cmp=function(t){return this._actual.cmp(t._actual)},t.prototype.equals=function(e){return e instanceof t&&this._actual.equals(e._actual)},t.prototype.evaluate=function(t){return!this._actual.evaluate(t)},t.prototype.keys=function(){return this._actual.keys()},t.prototype.negate=function(){return this._actual},t}(),m=function(){function t(t){this.expr=t}return t.create=function(e){var n=t._normalizeArr(e);if(0!==n.length)return 1===n.length?n[0]:new t(n)},t.prototype.getType=function(){return 5},t.prototype.cmp=function(t){if(this.expr.length<t.expr.length)return-1;if(this.expr.length>t.expr.length)return 1;for(var e=0,n=this.expr.length;e<n;e++){var i=l(this.expr[e],t.expr[e]);if(0!==i)return i}return 0},t.prototype.equals=function(e){if(e instanceof t){if(this.expr.length!==e.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1},t.prototype.evaluate=function(t){for(var e=0,n=this.expr.length;e<n;e++)if(!this.expr[e].evaluate(t))return!1;return!0},t._normalizeArr=function(e){var n=[];if(e){for(var i=0,r=e.length;i<r;i++){var o=e[i];if(o)if(o instanceof t)n=n.concat(o.expr);else{if(o instanceof g)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');n.push(o)}}n.sort(l)}return n},t.prototype.keys=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var i=n[e];t.push.apply(t,i.keys())}return t},t.prototype.negate=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var i=n[e];t.push(i.negate())}return g.create(t)},t}(),g=function(){function t(t){this.expr=t}return t.create=function(e){var n=t._normalizeArr(e);if(0!==n.length)return 1===n.length?n[0]:new t(n)},t.prototype.getType=function(){return 8},t.prototype.equals=function(e){if(e instanceof t){if(this.expr.length!==e.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1},t.prototype.evaluate=function(t){for(var e=0,n=this.expr.length;e<n;e++)if(this.expr[e].evaluate(t))return!0;return!1},t._normalizeArr=function(e){var n=[];if(e){for(var i=0,r=e.length;i<r;i++){var o=e[i];o&&(o instanceof t?n=n.concat(o.expr):n.push(o))}n.sort(l)}return n},t.prototype.keys=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var i=n[e];t.push.apply(t,i.keys())}return t},t.prototype.negate=function(){for(var e=[],n=0,i=this.expr;n<i.length;n++){var r=i[n];e.push(r.negate())}for(var o=function(e){return e instanceof t?e.expr:[e]};e.length>1;){for(var a=e.shift(),l=e.shift(),c=[],u=0,h=o(a);u<h.length;u++)for(var d=h[u],p=0,f=o(l);p<f.length;p++){var m=f[p];c.push(s.and(d,m))}e.unshift(s.or.apply(s,c))}return e[0]},t}(),v=function(t){function e(e,n){var i=t.call(this,e)||this;return i._defaultValue=n,i}return a(e,t),e.prototype.bindTo=function(t){return t.createKey(this.key,this._defaultValue)},e.prototype.getValue=function(t){return t.getContextKeyValue(this.key)},e.prototype.toNegated=function(){return s.not(this.key)},e}(c),y=Object(o.c)("contextKeyService"),b="setContext"},"VrN/":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=i||r||o,s=a&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),C=h&&t.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(h=!1,l=!0);var w=y&&(c||h&&(null==C||C<12.11)),k=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,_=function(t,e){var n=t.className,i=S(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function O(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function N(t,e){return O(t).appendChild(e)}function T(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function L(t,e,n,i){var r=T(t,e,n,i);return r.setAttribute("role","presentation"),r}function A(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function M(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function j(t,e){var n=t.className;S(e).test(n)||(t.className+=(n?" ":"")+e)}function D(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!S(n[i]).test(e)&&(e+=" "+n[i]);return e}E=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var I=function(t){t.select()};function P(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function R(t,e,n){for(var i in e||(e={}),t)!t.hasOwnProperty(i)||!1===n&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function B(t,e,n,i,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,a=r||0;;){var s=t.indexOf("\t",o);if(s<0||s>=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(I=function(t){try{t.select()}catch(t){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function F(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}z.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},z.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},W={scroll:!1},V={origin:"*mouse"},G={origin:"+move"};function U(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var a=o-i;if(o==t.length||r+a>=e)return i+Math.min(a,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var K=[""];function q(t){for(;K.length<=t;)K.push($(K)+" ");return K[t]}function $(t){return t[t.length-1]}function Y(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function X(){}function Z(t,e){var n;return Object.create?n=Object.create(t):(X.prototype=t,n=new X),e&&R(e,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&nt.test(t)}function rt(t,e,n){for(;(n<0?e>0:e<t.length)&&it(t.charAt(e));)e+=n;return e}function ot(t,e,n){for(var i=e>n?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}var at=null;function st(t,e,n){var i;at=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:at=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:at=r)}return null!=i?i:at}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,r=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,h=[],d=0;d<u;++d)h.push((c=a.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var p=0,f=l;p<u;++p){var m=h[p];"m"==m?h[p]=f:f=m}for(var g=0,v=l;g<u;++g){var y=h[g];"1"==y&&"r"==v?h[g]="n":n.test(y)&&(v=y,"r"==y&&(h[g]="R"))}for(var b=1,x=h[0];b<u-1;++b){var C=h[b];"+"==C&&"1"==x&&"1"==h[b+1]?h[b]="1":","!=C||x!=h[b+1]||"1"!=x&&"n"!=x||(h[b]=x),x=C}for(var w=0;w<u;++w){var k=h[w];if(","==k)h[w]="N";else if("%"==k){var S=void 0;for(S=w+1;S<u&&"%"==h[S];++S);for(var E=w&&"!"==h[w-1]||S<u&&"1"==h[S]?"1":"N",_=w;_<S;++_)h[_]=E;w=S-1}}for(var O=0,N=l;O<u;++O){var T=h[O];"L"==N&&"1"==T?h[O]="L":n.test(T)&&(N=T)}for(var L=0;L<u;++L)if(e.test(h[L])){var A=void 0;for(A=L+1;A<u&&e.test(h[A]);++A);for(var M="L"==(L?h[L-1]:l),j=M==("L"==(A<u?h[A]:l))?M?"L":"R":l,D=L;D<A;++D)h[D]=j;L=A-1}for(var I,P=[],R=0;R<u;)if(i.test(h[R])){var B=R;for(++R;R<u&&i.test(h[R]);++R);P.push(new o(0,B,R))}else{var z=R,F=P.length,H="rtl"==s?1:0;for(++R;R<u&&"L"!=h[R];++R);for(var W=z;W<R;)if(r.test(h[W])){z<W&&(P.splice(F,0,new o(1,z,W)),F+=H);var V=W;for(++W;W<R&&r.test(h[W]);++W);P.splice(F,0,new o(2,V,W)),F+=H,z=W}else++W;z<R&&P.splice(F,0,new o(1,z,R))}return"ltr"==s&&(1==P[0].level&&(I=a.match(/^\s+/))&&(P[0].from=I[0].length,P.unshift(new o(0,0,I[0].length))),1==$(P).level&&(I=a.match(/\s+$/))&&($(P).to-=I[0].length,P.push(new o(0,u-I[0].length,u)))),"rtl"==s?P.reverse():P}}();function ct(t,e){var n=t.order;return null==n&&(n=t.order=lt(t.text,e)),n}var ut=[],ht=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||ut).concat(n)}};function dt(t,e){return t._handlers&&t._handlers[e]||ut}function pt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=F(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function ft(t,e){var n=dt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function mt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),ft(t,n||e.type,t,e),Ct(e)||e.codemirrorIgnore}function gt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==F(n,e[i])&&n.push(e[i])}function vt(t,e){return dt(t,e).length>0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ct(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function wt(t){bt(t),xt(t)}function kt(t){return t.target||t.srcElement}function St(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Et,_t,Ot=function(){if(a&&s<9)return!1;var t=T("div");return"draggable"in t||"dragDrop"in t}();function Nt(t){if(null==Et){var e=T("span","");N(t,T("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Et?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Tt(t){if(null!=_t)return _t;var e=N(t,document.createTextNode("AخA")),n=E(e,0,1).getBoundingClientRect(),i=E(e,1,2).getBoundingClientRect();return O(t),!(!n||n.left==n.right)&&(_t=i.right-n.right<3)}var Lt,At=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Mt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},jt="oncopy"in(Lt=T("div"))||(Lt.setAttribute("oncopy","return;"),"function"==typeof Lt.oncopy),Dt=null,It={},Pt={};function Rt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Bt(t){if("string"==typeof t&&Pt.hasOwnProperty(t))t=Pt[t];else if(t&&"string"==typeof t.name&&Pt.hasOwnProperty(t.name)){var e=Pt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function zt(t,e){e=Bt(e);var n=It[e.name];if(!n)return zt(t,"text/plain");var i=n(t,e);if(Ft.hasOwnProperty(e.name)){var r=Ft[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)i[a]=e.modeProps[a];return i}var Ft={};function Ht(t,e){R(e,Ft.hasOwnProperty(t)?Ft[t]:Ft[t]={})}function Wt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Vt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Gt(t,e,n){return!t.startState||t.startState(e,n)}var Ut=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e<o){n=r;break}e-=o}return n.lines[e]}function qt(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r})),i}function $t(t,e,n){var i=[];return t.iter(e,n,(function(t){i.push(t.text)})),i}function Yt(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function Xt(t){if(null==t.parent)return null;for(var e=t.parent,n=F(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function Zt(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(e<o){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function Jt(t,e){return e>=t.first&&e<t.first+t.size}function Qt(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function te(t,e,n){if(void 0===n&&(n=null),!(this instanceof te))return new te(t,e,n);this.line=t,this.ch=e,this.sticky=n}function ee(t,e){return t.line-e.line||t.ch-e.ch}function ne(t,e){return t.sticky==e.sticky&&0==ee(t,e)}function ie(t){return te(t.line,t.ch)}function re(t,e){return ee(t,e)<0?e:t}function oe(t,e){return ee(t,e)<0?t:e}function ae(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function se(t,e){if(e.line<t.first)return te(t.first,0);var n=t.first+t.size-1;return e.line>n?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=se(t,e[i]);return n}Ut.prototype.eol=function(){return this.pos>=this.string.length},Ut.prototype.sol=function(){return this.pos==this.lineStart},Ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ut.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Ut.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Ut.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Ut.prototype.skipToEnd=function(){this.pos=this.string.length},Ut.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Ut.prototype.backUp=function(t){this.pos-=t},Ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.match=function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},Ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ut.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Ut.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Ut.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,i){var r=[t.state.modeGen],o={};xe(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),o,i);for(var a=n.state,s=function(i){n.baseTokens=r;var s=t.state.overlays[i],l=1,c=0;n.state=!0,xe(t,e.text,s.mode,n,(function(t,e){for(var n=l;c<t;){var i=r[l];i>t&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+e}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)s(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function de(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=pe(t,Xt(e)),r=e.text.length>t.options.maxHighlightLength&&Wt(t.doc.mode,i.state),o=he(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new ue(i,!0,e);var o=function(t,e,n){for(var i,r,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Kt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=B(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}(t,e,n),a=o>i.first&&Kt(i,o-1).stateAfter,s=a?ue.fromSaved(i,a,o):new ue(i,Gt(i.mode),o);return i.iter(o,e,(function(n){fe(t,n.text,s);var i=s.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?s.save():null,s.nextLine()})),n&&(i.modeFrontier=s.line),s}function fe(t,e,n,i){var r=t.doc.mode,o=new Ut(e,t.options.tabSize,n);for(o.start=o.pos=i||0,""==e&&me(r,n.state);!o.eol();)ge(r,o,n.state),o.start=o.pos}function me(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Vt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function ge(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=Vt(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,Wt(t.mode,e.state),n,e.lookAhead):new ue(t,Wt(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,i){var r,o,a=t.doc,s=a.mode,l=Kt(a,(e=se(a,e)).line),c=pe(t,e.line,n),u=new Ut(l.text,t.options.tabSize,c);for(i&&(o=[]);(i||u.pos<e.ch)&&!u.eol();)u.start=u.pos,r=ge(s,u,c.state),i&&o.push(new ve(u,r,Wt(a.mode,c.state)));return i?o:new ve(u,r,c.state)}function be(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[i])||(e[i]+=" "+n[2])}return t}function xe(t,e,n,i,r,o,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,c=0,u=null,h=new Ut(e,t.options.tabSize,i),d=t.options.addModeClass&&[null];for(""==e&&be(me(n,i.state),o);!h.eol();){if(h.pos>t.options.maxHighlightLength?(s=!1,a&&fe(t,e,i,h.pos),h.pos=e.length,l=null):l=be(ge(n,h,i.state,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<h.start;)r(c=Math.min(h.start,c+5e3),u);u=l}h.start=h.pos}for(;c<h.pos;){var f=Math.min(h.pos,c+5e3);r(f,u),c=f}}var Ce=!1,we=!1;function ke(t,e,n){this.marker=t,this.from=e,this.to=n}function Se(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function Ee(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function _e(t,e){if(e.full)return null;var n=Jt(t,e.from.line)&&Kt(t,e.from.line).markedSpans,i=Jt(t,e.to.line)&&Kt(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,a=0==ee(e.from,e.to),s=function(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new ke(a,o.from,s?null:o.to))}}return i}(n,r,a),l=function(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new ke(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return i}(i,o,a),c=1==e.text.length,u=$(e.text).length+(c?r:0);if(s)for(var h=0;h<s.length;++h){var d=s[h];if(null==d.to){var p=Se(l,d.marker);p?c&&(d.to=null==p.to?null:p.to+u):d.to=r}}if(l)for(var f=0;f<l.length;++f){var m=l[f];null!=m.to&&(m.to+=u),null==m.from?Se(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Oe(s)),l&&l!=s&&(l=Oe(l));var g=[s];if(!c){var v,y=e.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new ke(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Oe(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Ne(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function Te(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function Le(t){return t.inclusiveLeft?-1:0}function Ae(t){return t.inclusiveRight?1:0}function Me(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=ee(i.from,r.from)||Le(t)-Le(e);if(o)return-o;var a=ee(i.to,r.to)||Ae(t)-Ae(e);return a||e.id-t.id}function je(t,e){var n,i=we&&t.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!n||Me(n,r.marker)<0)&&(n=r.marker);return n}function De(t){return je(t,!0)}function Ie(t){return je(t,!1)}function Pe(t,e){var n,i=we&&t.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Me(n,o.marker)<0)&&(n=o.marker)}return n}function Re(t,e,n,i,r){var o=Kt(t,e),a=we&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ee(c.from,n)||Le(l.marker)-Le(r),h=ee(c.to,i)||Ae(l.marker)-Ae(r);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ee(c.from,i)<=0:ee(c.from,i)<0)))return!0}}}function Be(t){for(var e;e=De(t);)t=e.find(-1,!0).line;return t}function ze(t,e){var n=Kt(t,e),i=Be(n);return n==i?e:Xt(i)}function Fe(t,e){if(e>t.lastLine())return e;var n,i=Kt(t,e);if(!He(t,i))return e;for(;n=Ie(i);)i=n.find(1,!0).line;return Xt(i)+1}function He(t,e){var n=we&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&We(t,e,i))return!0}}function We(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return We(t,i.line,Se(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if((r=e.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&We(t,e,r))return!0}function Ve(t){for(var e=0,n=(t=Be(t)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;e+=s.height}return e}function Ge(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=De(i);){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=t;e=Ie(i);){var o=e.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function Ue(t){var e=t.display,n=t.doc;e.maxLine=Kt(n,n.first),e.maxLineLength=Ge(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=Ge(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Te(this,e),this.height=n?n(this):1};function qe(t){t.parent=null,Ne(t)}Ke.prototype.lineNo=function(){return Xt(this)},yt(Ke);var $e={},Ye={};function Xe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Ye:$e;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=L("span",null,null,l?"padding-right: .1px":null),i={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o=r?e.rest[r-1]:e.line,a=void 0;i.pos=0,i.addToken=Qe,Tt(t.display.measure)&&(a=ct(o,t.doc.direction))&&(i.addToken=tn(i.addToken,a)),i.map=[],nn(o,i,de(t,o,e!=t.display.externalMeasured&&Xt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=D(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=D(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Nt(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ft(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=D(i.pre.className,i.textClass||"")),i}function Je(t){var e=T("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,i,r,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}(e,t.trailingSpace):e,h=t.cm.state.specialChars,d=!1;if(h.test(e)){c=document.createDocumentFragment();for(var p=0;;){h.lastIndex=p;var f=h.exec(e),m=f?f.index-p:e.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!f)break;p+=m+1;var v=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;(v=c.appendChild(T("span",q(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(T("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?c.appendChild(T("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),a&&s<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||i||r||d||o||l){var x=n||"";i&&(x+=i),r&&(x+=r);var C=T("span",[c],x,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&C.setAttribute(w,l[w]);return t.content.appendChild(C)}t.content.appendChild(c)}}function tn(t,e){return function(n,i,r,o,a,s,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var h=void 0,d=0;d<e.length&&!((h=e[d]).to>c&&h.from<=c);d++);if(h.to>=u)return t(n,i,r,o,a,s,l);t(n,i.slice(0,h.to-c),r,o,null,s,l),o=null,i=i.slice(h.to-c),c=h.to}}}function en(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,c,u,h,d,p=r.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;x<i.length;++x){var C=i[x],w=C.marker;if("bookmark"==w.type&&C.from==f&&w.widgetNode)y.push(w);else if(C.from<=f&&(null==C.to||C.to>f||w.collapsed&&C.to==f&&C.from==f)){if(null!=C.to&&C.to!=f&&v>C.to&&(v=C.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&C.from==f&&(u+=" "+w.startStyle),w.endStyle&&C.to==v&&(b||(b=[])).push(w.endStyle,C.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var k in w.attributes)(d||(d={}))[k]=w.attributes[k];w.collapsed&&(!h||Me(h.marker,w)<0)&&(h=C)}else C.from>f&&v>C.from&&(v=C.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]);if(!h||h.from==f)for(var E=0;E<y.length;++E)en(e,0,y[E]);if(h&&(h.from||0)==f){if(en(e,(null==h.to?p+1:h.to)-f,h.marker,null==h.from),null==h.to)return;h.to==f&&(h=!1)}}if(f>=p)break;for(var _=Math.min(p,v);;){if(g){var O=f+g.length;if(!h){var N=O>_?g.slice(0,_-f):g;e.addToken(e,N,a?a+l:l,u,f+N.length==v?c:"",s,d)}if(O>=_){g=g.slice(_-f),f=_;break}f=O,u=""}g=r.slice(o,o=n[m++]),a=Xe(n[m++],e.cm.options)}}else for(var T=1;T<n.length;T+=2)e.addToken(e,r.slice(o,o=n[T]),Xe(n[T+1],e.cm.options))}function rn(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=Ie(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?Xt($(this.rest))-n+1:1,this.node=this.text=null,this.hidden=He(t,e)}function on(t,e,n){for(var i,r=[],o=e;o<n;o=i){var a=new rn(t.doc,Kt(t.doc,o),o);i=o+a.size,r.push(a)}return r}var an=null,sn=null;function ln(t,e){var n=dt(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);an?i=an.delayedCallbacks:sn?i=sn:(i=sn=[],setTimeout(cn,0));for(var o=function(t){i.push((function(){return n[t].apply(null,r)}))},a=0;a<n.length;++a)o(a)}}function cn(){var t=sn;sn=null;for(var e=0;e<t.length;++e)t[e]()}function un(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?pn(t,e):"gutter"==o?mn(t,e,n,i):"class"==o?fn(t,e):"widget"==o&&gn(t,e,i)}e.changes=null}function hn(t){return t.node==t.text&&(t.node=T("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),a&&s<8&&(t.node.style.zIndex=2)),t.node}function dn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Ze(t,e)}function pn(t,e){var n=e.text.className,i=dn(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,fn(t,e)):n&&(e.text.className=n)}function fn(t,e){!function(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var i=hn(e);e.background=i.insertBefore(T("div",null,n),i.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?hn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function mn(t,e,n,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=hn(e);e.gutterBackground=T("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var a=hn(e),s=e.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(T("div",Qt(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(T("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function gn(t,e,n){e.alignable&&(e.alignable=null);for(var i=S("CodeMirror-linewidget"),r=e.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,i.test(r.className)&&e.node.removeChild(r);yn(t,e,n)}function vn(t,e,n,i){var r=dn(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),fn(t,e),mn(t,e,n,i),yn(t,e,i),e.node}function yn(t,e,n){if(bn(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)bn(t,e.rest[i],e,n,!1)}function bn(t,e,n,i,r){if(e.widgets)for(var o=hn(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(l,c,n,i),t.display.input.setUneditable(c),r&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ln(l,"redraw")}}function xn(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function Cn(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!A(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),N(e.display.measure,T("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function wn(t,e){for(var n=kt(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function kn(t){return t.lineSpace.offsetTop}function Sn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function En(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=N(t.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function _n(t){return 50-t.display.nativeBarWidth}function On(t){return t.display.scroller.clientWidth-_n(t)-t.display.barWidth}function Nn(t){return t.display.scroller.clientHeight-_n(t)-t.display.barHeight}function Tn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var r=0;r<t.rest.length;r++)if(Xt(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ln(t,e,n,i){return jn(t,Mn(t,e),n,i)}function An(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[ui(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function Mn(t,e){var n=Xt(e),i=An(t,n);i&&!i.text?i=null:i&&i.changes&&(un(t,i,n,oi(t)),t.curOp.forceUpdate=!0),i||(i=function(t,e){var n=Xt(e=Be(e)),i=t.display.externalMeasured=new rn(t.doc,e,n);i.lineN=n;var r=i.built=Ze(t,i);return i.text=r.pre,N(t.display.lineMeasure,r.pre),i}(t,e));var r=Tn(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function jn(t,e,n,i,r){e.before&&(n=-1);var o,l=n+(i||"");return e.cache.hasOwnProperty(l)?o=e.cache[l]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,n){var i=t.options.lineWrapping,r=i&&On(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,i){var r,o=Pn(e.map,n,i),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&it(e.line.text.charAt(o.coverStart+u));)++u;if((r=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Rn(E(l,c,u).getClientRects(),i)).left||r.right||0==c)break;u=c,c-=1,h="right"}a&&s<11&&(r=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Dt)return Dt;var e=N(t,T("span","x")),n=e.getBoundingClientRect(),i=E(e,0,1).getBoundingClientRect();return Dt=Math.abs(n.left-i.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,r))}else{var p;c>0&&(h=i="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+ri(t.display),top:f.top,bottom:f.bottom}:In}for(var m=r.top-e.rect.top,g=r.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,C=y[b],w={left:("right"==h?r.right:r.left)-e.rect.left,right:("left"==h?r.left:r.right)-e.rect.left,top:x,bottom:C};return r.left||r.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}(t,e,n,i)).bogus||(e.cache[l]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var Dn,In={left:0,right:0,top:0,bottom:0};function Pn(t,e,n){for(var i,r,o,a,s,l,c=0;c<t.length;c+=3)if(s=t[c],l=t[c+1],e<s?(r=0,o=1,a="left"):e<l?o=1+(r=e-s):(c==t.length-3||e==l&&t[c+3]>e)&&(r=(o=l-s)-1,e>=l&&(a="right")),null!=r){if(i=t[c+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],a="left";if("right"==n&&r==l-s)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)i=t[(c+=3)+2],a="right";break}return{node:i,start:r,end:o,collapse:a,coverStart:s,coverEnd:l}}function Rn(t,e){var n=In;if("left"==e)for(var i=0;i<t.length&&(n=t[i]).left==n.right;i++);else for(var r=t.length-1;r>=0&&(n=t[r]).left==n.right;r--);return n}function Bn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function zn(t){t.display.externalMeasure=null,O(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Bn(t.display.view[e])}function Fn(t){zn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Vn(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=Cn(t.widgets[n]));return e}function Gn(t,e,n,i,r){if(!r){var o=Vn(e);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=Ve(e);if("local"==i?a+=kn(t.display):a-=t.display.viewOffset,"page"==i||"window"==i){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:Wn());var l=s.left+("window"==i?0:Hn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Un(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=Hn(),r-=Wn();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function Kn(t,e,n,i,r){return i||(i=Kt(t.doc,e.line)),Gn(t,i,Ln(t,i,e.ch,r),n)}function qn(t,e,n,i,r,o){function a(e,a){var s=jn(t,r,e,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Gn(t,i,s,n)}i=i||Kt(t.doc,e.line),r||(r=Mn(t,i));var s=ct(i,t.doc.direction),l=e.ch,c=e.sticky;if(l>=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),d=at,p=u(l,h,"before"==c);return null!=d&&(p.other=u(l,d,"before"!=c)),p}function $n(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ri(t.display)*e.ch);var i=Kt(t.doc,e.line),r=Ve(i)+kn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Yn(t,e,n,i,r){var o=te(t,e,n);return o.xRel=r,i&&(o.outside=i),o}function Xn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Yn(i.first,0,null,-1,-1);var r=Zt(i,n),o=i.first+i.size-1;if(r>o)return Yn(i.first+i.size-1,Kt(i,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(i,r);;){var s=ti(t,a,r,e,n),l=Pe(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;a=Kt(i,r=c.line)}}function Zn(t,e,n,i){i-=Vn(e);var r=e.text.length,o=ot((function(e){return jn(t,n,e-1).bottom<=i}),r,0);return{begin:o,end:r=ot((function(e){return jn(t,n,e).top>i}),o,r)}}function Jn(t,e,n,i){return n||(n=Mn(t,e)),Zn(t,e,n,Gn(t,e,jn(t,n,i),"line").top)}function Qn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function ti(t,e,n,i,r){r-=Ve(e);var o=Mn(t,e),a=Vn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?ni:ei)(t,e,n,o,u,i,r);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,p,f=null,m=null,g=ot((function(e){var n=jn(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=e,m=n),!0)}),s,l),v=!1;if(m){var y=i-m.left<m.right-i,b=y==c;g=f+(b?0:1),p=b?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==e.text.length?"before":jn(t,o,g-(c?1:0)).bottom+a<=r==c?"after":"before";var x=qn(t,te(n,g,p),"line",e,o);d=x.left,v=r<x.top?-1:r>=x.bottom?1:0}return Yn(n,g=rt(e.text,g,1),p,v,i-d)}function ei(t,e,n,i,r,o,a){var s=ot((function(s){var l=r[s],c=1!=l.level;return Qn(qn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,a,!0)}),0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=qn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Qn(u,o,a,!0)&&u.top>a&&(l=r[s-1])}return l}function ni(t,e,n,i,r,o,a){var s=Zn(t,e,i,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d<r.length;d++){var p=r[d];if(!(p.from>=c||p.to<=l)){var f=jn(t,i,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=f<o?o-f+1e9:f-o;(!u||h>m)&&(u=p,h=m)}}return u||(u=r[r.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function ii(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Dn){Dn=T("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(T("br"));Dn.appendChild(document.createTextNode("x"))}N(t.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),O(t.measure),n||1}function ri(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=T("span","xxxxxxxxxx"),n=T("pre",[e],"CodeMirror-line-like");N(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function oi(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+r,i[s]=o.clientWidth}return{fixedPos:ai(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ai(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function si(t){var e=ii(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/ri(t.display)-3);return function(r){if(He(t.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*e:o+e}}function li(t){var e=t.doc,n=si(t);e.iter((function(t){var e=n(t);e!=t.height&&Yt(t,e)}))}function ci(t,e,n,i){var r=t.display;if(!n&&"true"==kt(e).getAttribute("cm-not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(t){return null}var l,c=Xn(t,o,a);if(i&&c.xRel>0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-En(t.display).left)/ri(t.display))-u))}return c}function ui(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if((e-=n[i].size)<0)return i}function hi(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)we&&ze(t.doc,e)<r.viewTo&&pi(t);else if(n<=r.viewFrom)we&&Fe(t.doc,n+i)>r.viewFrom?pi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)pi(t);else if(e<=r.viewFrom){var o=fi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):pi(t)}else if(n>=r.viewTo){var a=fi(t,e,e,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):pi(t)}else{var s=fi(t,e,e,-1),l=fi(t,n,n+i,1);s&&l?(r.view=r.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):pi(t)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=i:e<c.lineN+c.size&&(r.externalMeasured=null))}function di(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[ui(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==F(a,n)&&a.push(n)}}}function pi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function fi(t,e,n,i){var r,o=ui(t,e),a=t.display.view;if(!we||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=e){if(i>0){if(o==a.length-1)return null;r=s+a[o].size-e,o++}else r=s-e;e+=r,n+=r}for(;ze(t.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function mi(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function gi(t){t.display.input.showSelection(t.display.input.prepareSelection())}function vi(t,e){void 0===e&&(e=!0);for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&yi(t,s.head,r),l||xi(t,s,o)}}return i}function yi(t,e,n){var i=qn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(T("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",i.other){var o=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function bi(t,e){return t.top-e.top||t.left-e.left}function xi(t,e,n){var i=t.display,r=t.doc,o=document.createDocumentFragment(),a=En(t.display),s=a.left,l=Math.max(i.sizerWidth,On(t)-i.sizer.offsetLeft)-a.right,c="ltr"==r.direction;function u(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(i-e)+"px"))}function h(e,n,i){var o,a,h=Kt(r,e),d=h.text.length;function p(n,i){return Kn(t,te(e,n),"div",h,i)}function f(e,n,i){var r=Jn(t,h,null,e),o="ltr"==n==("after"==i)?"left":"right";return p("after"==i?r.begin:r.end-(/\s/.test(h.text.charAt(r.end-1))?2:1),o)[o]}var m=ct(h,r.direction);return function(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var a=t[o];(a.from<n&&a.to>e||e==n&&a.to==e)&&(i(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}(m,n||0,null==i?d:i,(function(t,e,r,h){var g="ltr"==r,v=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==n&&0==t,x=null==i&&e==d,C=0==h,w=!m||h==m.length-1;if(y.top-v.top<=3){var k=(c?x:b)&&w,S=(c?b:x)&&C?s:(g?v:y).left,E=k?l:(g?y:v).right;u(S,v.top,E-S,v.bottom)}else{var _,O,N,T;g?(_=c&&b&&C?s:v.left,O=c?l:f(t,r,"before"),N=c?s:f(e,r,"after"),T=c&&x&&w?l:y.right):(_=c?f(t,r,"before"):s,O=!c&&b&&C?l:v.right,N=!c&&x&&w?s:y.left,T=c?f(e,r,"after"):l),u(_,v.top,O-_,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(N,y.top,T-N,y.bottom)}(!o||bi(v,o)<0)&&(o=v),bi(y,o)<0&&(o=y),(!a||bi(v,a)<0)&&(a=v),bi(y,a)<0&&(a=y)})),{start:o,end:a}}var d=e.from(),p=e.to();if(d.line==p.line)h(d.line,d.ch,p.ch);else{var f=Kt(r,d.line),m=Kt(r,p.line),g=Be(f)==Be(m),v=h(d.line,d.ch,g?f.text.length+1:null).end,y=h(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function Ci(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||Ei(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function wi(t){t.state.focused||(t.display.input.focus(),Si(t))}function ki(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Ei(t))}),100)}function Si(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(ft(t,"focus",t,e),t.state.focused=!0,j(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Ci(t))}function Ei(t,e){t.state.delayingBlurEvent||(t.state.focused&&(ft(t,"blur",t,e),t.state.focused=!1,_(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function _i(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r=e.view[i],o=t.options.lineWrapping,l=void 0,c=0;if(!r.hidden){if(a&&s<8){var u=r.node.offsetTop+r.node.offsetHeight;l=u-n,n=u}else{var h=r.node.getBoundingClientRect();l=h.bottom-h.top,!o&&r.text.firstChild&&(c=r.text.firstChild.getBoundingClientRect().right-h.left-1)}var d=r.line.height-l;if((d>.005||d<-.005)&&(Yt(r.line,l),Oi(r.line),r.rest))for(var p=0;p<r.rest.length;p++)Oi(r.rest[p]);if(c>t.display.sizerWidth){var f=Math.ceil(c/ri(t.display));f>t.display.maxLineLength&&(t.display.maxLineLength=f,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function Oi(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function Ni(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-kn(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=Zt(e,i),a=Zt(e,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Zt(e,Ve(Kt(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(o=Zt(e,Ve(Kt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ti(t,e){var n=t.display,i=ii(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Nn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+Sn(n),l=e.top<i,c=e.bottom>s-i;if(e.top<r)a.scrollTop=l?0:e.top;else if(e.bottom>r+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=r&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=On(t)-n.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.left<d?a.scrollLeft=Math.max(0,e.left+h-(f?0:10)):e.right>p+d-3&&(a.scrollLeft=e.right+(f?0:10)-p),a}function Li(t,e){null!=e&&(ji(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ai(t){ji(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Mi(t,e,n){null==e&&null==n||ji(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function ji(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Di(t,$n(t,e.from),$n(t,e.to),e.margin))}function Di(t,e,n,i){var r=Ti(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Mi(t,r.scrollLeft,r.scrollTop)}function Ii(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||lr(t,{top:e}),Pi(t,e,!0),n&&lr(t),ir(t,100))}function Pi(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ri(t,e,n,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,hr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Bi(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Sn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+_n(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var zi=function(t,e,n){this.cm=n;var i=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),ht(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),ht(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zi.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},zi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zi.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},zi.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}))},zi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Fi=function(){};function Hi(t,e){e||(e=Bi(t));var n=t.display.barWidth,i=t.display.barHeight;Wi(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&_i(t),Wi(t,Bi(t)),n=t.display.barWidth,i=t.display.barHeight}function Wi(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Fi.prototype.update=function(){return{bottom:0,right:0}},Fi.prototype.setScrollLeft=function(){},Fi.prototype.setScrollTop=function(){},Fi.prototype.clear=function(){};var Vi={native:zi,null:Fi};function Gi(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&_(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Vi[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Ri(t,e):Ii(t,e)}),t),t.display.scrollbars.addClass&&j(t.display.wrapper,t.display.scrollbars.addClass)}var Ui=0;function Ki(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ui},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function qi(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}(n)}finally{an=null,e(n)}}(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,n=0;n<e.length;n++)$i(e[n]);for(var i=0;i<e.length;i++)Yi(e[i]);for(var r=0;r<e.length;r++)Xi(e[r]);for(var o=0;o<e.length;o++)Zi(e[o]);for(var a=0;a<e.length;a++)Ji(e[a])}(t)}))}function $i(t){var e=t.cm,n=e.display;!function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=_n(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=_n(t)+"px",e.scrollbarsClipped=!0)}(e),t.updateMaxLine&&Ue(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new or(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yi(t){t.updatedDisplay=t.mustUpdate&&ar(t.cm,t.update)}function Xi(t){var e=t.cm,n=e.display;t.updatedDisplay&&_i(e),t.barMeasure=Bi(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ln(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+_n(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-On(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zi(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Ri(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==M();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&Hi(e,t.barMeasure),t.updatedDisplay&&ur(e,t.barMeasure),t.selectionChanged&&Ci(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&wi(t.cm)}function Ji(t){var e=t.cm,n=e.display,i=e.doc;t.updatedDisplay&&sr(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&Pi(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Ri(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!mt(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var o=T("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-kn(t.display))+"px;\n height: "+(e.bottom-e.top+_n(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=qn(t,e),l=n&&n!=e?qn(t,n):s,c=Ti(t,r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Ii(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Ri(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return r}(e,se(i,t.scrollToPos.from),se(i,t.scrollToPos.to),t.scrollToPos.margin));var r=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(r)for(var a=0;a<r.length;++a)r[a].lines.length||ft(r[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ft(o[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&ft(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Qi(t,e){if(t.curOp)return e();Ki(t);try{return e()}finally{qi(t)}}function tr(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Ki(t);try{return e.apply(t,arguments)}finally{qi(t)}}}function er(t){return function(){if(this.curOp)return t.apply(this,arguments);Ki(this);try{return t.apply(this,arguments)}finally{qi(this)}}}function nr(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Ki(e);try{return t.apply(this,arguments)}finally{qi(e)}}}function ir(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,P(rr,t))}function rr(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=pe(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(i.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Wt(e.mode,i.state):null,l=he(t,o,i,!0);s&&(i.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&d<a.length;++d)h=a[d]!=o.styles[d];h&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=t.options.maxHighlightLength&&fe(t,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return ir(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Qi(t,(function(){for(var e=0;e<r.length;e++)di(t,r[e],"text")}))}}var or=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Ni(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=On(t),this.force=n,this.dims=oi(t),this.events=[]};function ar(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return pi(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mi(t))return!1;dr(t)&&(pi(t),e.dims=oi(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),we&&(o=ze(t.doc,o),a=Fe(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=on(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=on(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(ui(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(on(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,ui(t,n)))),i.viewTo=n}(t,o,a),n.viewOffset=Ve(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=mi(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=M();if(!e||!A(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&A(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,h=0;h<c.length;h++){var d=c[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var p=r&&null!=e&&e<=u&&d.lineNumber;d.changes&&(F(d.changes,"gutter")>-1&&(p=!1),un(t,d,u,n)),p&&(O(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=d.node.nextSibling}else{var f=vn(t,d,u,n);o.insertBefore(f,a)}u+=d.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=M()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&A(document.body,t.anchorNode)&&A(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ir(t,400)),n.updateLineNumbers=null,!0}function sr(t,e){for(var n=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=On(t))i&&(e.visible=Ni(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Sn(t.display)-Nn(t),n.top)}),e.visible=Ni(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ar(t,e))break;_i(t);var r=Bi(t);gi(t),Hi(t,r),ur(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function lr(t,e){var n=new or(t,e);if(ar(t,n)){_i(t),sr(t,n);var i=Bi(t);gi(t),Hi(t,i),ur(t,i),n.finish()}}function cr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ur(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+_n(t)+"px"}function hr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ai(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function dr(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=Qt(t.options,e.first+e.size-1),i=t.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",cr(t.display),!0}return!1}function pr(t,e){for(var n=[],i=!1,r=0;r<t.length;r++){var o=t[r],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;i=!0}n.push({className:o,style:a})}return e&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function fr(t){var e=t.gutters,n=t.gutterSpecs;O(e),t.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,a=r.style,s=e.appendChild(T("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(t.lineGutter=s,s.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",cr(t)}function mr(t){fr(t.display),hi(t),hr(t)}function gr(t,e,i,r){var o=this;this.input=i,o.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=L("div",null,"CodeMirror-code"),o.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=T("div",null,"CodeMirror-cursors"),o.measure=T("div",null,"CodeMirror-measure"),o.lineMeasure=T("div",null,"CodeMirror-measure"),o.lineSpace=L("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=L("div",[o.lineSpace],"CodeMirror-lines");o.mover=T("div",[c],null,"position: relative"),o.sizer=T("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=T("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=T("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=T("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=pr(r.gutters,r.lineNumbers),fr(o),i.init(o)}or.prototype.signal=function(t,e){vt(t,e)&&this.events.push(arguments)},or.prototype.finish=function(){for(var t=0;t<this.events.length;t++)ft.apply(null,this.events[t])};var vr=0,yr=null;function br(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function xr(t){var e=br(t);return e.x*=yr,e.y*=yr,e}function Cr(t,e){var i=br(e),r=i.x,o=i.y,a=t.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(r&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,p=a.view;d!=s;d=d.parentNode)for(var f=0;f<p.length;f++)if(p[f].node==d){t.display.currentWheelTarget=d;break t}if(r&&!n&&!h&&null!=yr)return o&&u&&Ii(t,Math.max(0,s.scrollTop+o*yr)),Ri(t,Math.max(0,s.scrollLeft+r*yr)),(!o||o&&u)&&bt(e),void(a.wheelStartX=null);if(o&&null!=yr){var m=o*yr,g=t.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(t.doc.height,v+m+50),lr(t,{top:g,bottom:v})}vr<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=r,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var t=s.scrollLeft-a.wheelStartX,e=s.scrollTop-a.wheelStartY,n=e&&a.wheelDY&&e/a.wheelDY||t&&a.wheelDX&&t/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(yr=(yr*vr+n)/(vr+1),++vr)}}),200)):(a.wheelDX+=r,a.wheelDY+=o))}}a?yr=-.53:n?yr=15:u?yr=-.7:d&&(yr=-1/3);var wr=function(t,e){this.ranges=t,this.primIndex=e};wr.prototype.primary=function(){return this.ranges[this.primIndex]},wr.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],i=t.ranges[e];if(!ne(n.anchor,i.anchor)||!ne(n.head,i.head))return!1}return!0},wr.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new kr(ie(this.ranges[e].anchor),ie(this.ranges[e].head));return new wr(t,this.primIndex)},wr.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},wr.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(ee(e,i.from())>=0&&ee(t,i.to())<=0)return n}return-1};var kr=function(t,e){this.anchor=t,this.head=e};function Sr(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=F(e,r);for(var o=1;o<e.length;o++){var a=e[o],s=e[o-1],l=ee(s.to(),a.from());if(i&&!a.empty()?l>0:l>=0){var c=oe(s.from(),a.from()),u=re(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new kr(h?u:c,h?c:u))}}return new wr(e,n)}function Er(t,e){return new wr([new kr(t,e||t)],0)}function _r(t){return t.text?te(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Or(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return _r(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=_r(e).ch-e.to.ch),te(n,i)}function Nr(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new kr(Or(r.anchor,e),Or(r.head,e)))}return Sr(t.cm,n,t.sel.primIndex)}function Tr(t,e,n){return t.line==e.line?te(n.line,t.ch-e.ch+n.ch):te(n.line+(t.line-e.line),t.ch)}function Lr(t){t.doc.mode=zt(t.options,t.doc.modeOption),Ar(t)}function Ar(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,ir(t,100),t.state.modeGen++,t.curOp&&hi(t)}function Mr(t,e){return 0==e.from.ch&&0==e.to.ch&&""==$(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function jr(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){!function(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ne(t),Te(t,n);var r=i?i(t):1;r!=t.height&&Yt(t,r)}(t,n,r,i),ln(t,"change",t,e)}function a(t,e){for(var n=[],o=t;o<e;++o)n.push(new Ke(c[o],r(o),i));return n}var s=e.from,l=e.to,c=e.text,u=Kt(t,s.line),h=Kt(t,l.line),d=$(c),p=r(c.length-1),f=l.line-s.line;if(e.full)t.insert(0,a(0,c.length)),t.remove(c.length,t.size-c.length);else if(Mr(t,e)){var m=a(0,c.length-1);o(h,h.text,p),f&&t.remove(s.line,f),m.length&&t.insert(s.line,m)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new Ke(d+u.text.slice(l.ch),p,i)),o(u,u.text.slice(0,s.ch)+c[0],r(0)),t.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+h.text.slice(l.ch),r(0)),t.remove(s.line+1,f);else{o(u,u.text.slice(0,s.ch)+c[0],r(0)),o(h,d+h.text.slice(l.ch),p);var v=a(1,c.length-1);f>1&&t.remove(s.line+1,f-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function Dr(t,e,n){!function t(i,r,o){if(i.linked)for(var a=0;a<i.linked.length;++a){var s=i.linked[a];if(s.doc!=r){var l=o&&s.sharedHist;n&&!l||(e(s.doc,l),t(s.doc,i,l))}}}(t,null,!0)}function Ir(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,li(t),Lr(t),Pr(t),t.options.lineWrapping||Ue(t),t.options.mode=e.modeOption,hi(t)}function Pr(t){("rtl"==t.doc.direction?j:_)(t.display.lineDiv,"CodeMirror-rtl")}function Rr(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function Br(t,e){var n={from:ie(e.from),to:_r(e),text:qt(t,e.from,e.to)};return Vr(t,n,e.from.line,e.to.line+1),Dr(t,(function(t){return Vr(t,n,e.from.line,e.to.line+1)}),!0),n}function zr(t){for(;t.length&&$(t).ranges;)t.pop()}function Fr(t,e,n,i){var r=t.history;r.undone.length=0;var o,a,s=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(zr(t.done),$(t.done)):t.done.length&&!$(t.done).ranges?$(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),$(t.done)):void 0}(r,r.lastOp==i)))a=$(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=_r(e):o.changes.push(Br(t,e));else{var l=$(r.done);for(l&&l.ranges||Wr(t.sel,r.done),o={changes:[Br(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,a||ft(t,"historyAdded")}function Hr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,$(r.done),e))?r.done[r.done.length-1]=e:Wr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&zr(r.undone)}function Wr(t,e){var n=$(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Vr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Gr(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function Ur(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(Gr(n[r]));return i}(t,e),i=_e(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else a&&(n[r]=a)}return n}function Kr(t,e,n){for(var i=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)i.push(n?wr.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),e)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&F(e,Number(u[1]))>-1&&($(s)[h]=c[h],delete c[h])}}}return i}function qr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=ee(e,r)<0;o!=ee(n,r)<0?(r=e,e=n):o!=ee(e,n)<0&&(e=n)}return new kr(r,e)}return new kr(n||e,e)}function $r(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Qr(t,new wr([qr(t.sel.primary(),e,n,r)],0),i)}function Yr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)i[o]=qr(t.sel.ranges[o],e[o],null,r);Qr(t,Sr(t.cm,i,t.sel.primIndex),n)}function Xr(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,Qr(t,Sr(t.cm,r,t.sel.primIndex),i)}function Zr(t,e,n,i){Qr(t,Er(e,n),i)}function Jr(t,e,n){var i=t.history.done,r=$(i);r&&r.ranges?(i[i.length-1]=e,to(t,e,n)):Qr(t,e,n)}function Qr(t,e,n){to(t,e,n),Hr(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function to(t,e,n){(vt(t,"beforeSelectionChange")||t.cm&&vt(t.cm,"beforeSelectionChange"))&&(e=function(t,e,n){var i={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new kr(se(t,e[n].anchor),se(t,e[n].head))},origin:n&&n.origin};return ft(t,"beforeSelectionChange",t,i),t.cm&&ft(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?Sr(t.cm,i.ranges,i.ranges.length-1):e}(t,e,n));var i=n&&n.bias||(ee(e.primary().head,t.sel.primary().head)<0?-1:1);eo(t,io(t,e,i,!0)),n&&!1===n.scroll||!t.cm||Ai(t.cm)}function eo(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,gt(t.cm)),ln(t,"cursorActivity",t))}function no(t){eo(t,io(t,t.sel,null,!1))}function io(t,e,n,i){for(var r,o=0;o<e.ranges.length;o++){var a=e.ranges[o],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=oo(t,a.anchor,s&&s.anchor,n,i),c=oo(t,a.head,s&&s.head,n,i);(r||l!=a.anchor||c!=a.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new kr(l,c))}return r?Sr(t.cm,r,e.primIndex):e}function ro(t,e,n,i,r){var o=Kt(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(u?s.to>=e.ch:s.to>e.ch))){if(r&&(ft(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(i<0?1:-1),d=void 0;if((i<0?u:c)&&(h=ao(t,h,-i,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(d=ee(h,n))&&(i<0?d<0:d>0))return ro(t,h,e,i,r)}var p=l.find(i<0?-1:1);return(i<0?c:u)&&(p=ao(t,p,i,p.line==e.line?o:null)),p?ro(t,p,e,i,r):null}}return e}function oo(t,e,n,i,r){var o=i||1,a=ro(t,e,n,o,r)||!r&&ro(t,e,n,o,!0)||ro(t,e,n,-o,r)||!r&&ro(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(i||Kt(t,e.line)).text.length?e.line<t.first+t.size-1?te(e.line+1,0):null:new te(e.line,e.ch+n)}function so(t){t.setSelection(te(t.firstLine(),0),te(t.lastLine()),W)}function lo(t,e,n){var i={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(e,n,r,o){e&&(i.from=se(t,e)),n&&(i.to=se(t,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),ft(t,"beforeChange",t,i),t.cm&&ft(t.cm,"beforeChange",t.cm,i),i.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function co(t,e,n){if(t.cm){if(!t.cm.curOp)return tr(t.cm,co)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(vt(t,"beforeChange")||t.cm&&vt(t.cm,"beforeChange"))||(e=lo(t,e,!0))){var i=Ce&&!n&&function(t,e,n){var i=null;if(t.iter(e.line,n.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&-1!=F(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var a=i[o],s=a.find(0),l=0;l<r.length;++l){var c=r[l];if(!(ee(c.to,s.from)<0||ee(c.from,s.to)>0)){var u=[l,1],h=ee(c.from,s.from),d=ee(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)uo(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=Nr(t,e);Fr(t,e,n,t.cm?t.cm.curOp.id:NaN),fo(t,e,n,_e(t,e));var i=[];Dr(t,(function(t,n){n||-1!=F(i,t.history)||(yo(t.history,e),i.push(t.history)),fo(t,e,null,_e(t,e))}))}}function ho(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<s.length&&(r=s[c],n?!r.ranges||r.equals(t.sel):r.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=s.pop()).ranges){if(i)return void s.push(r);break}if(Wr(r,l),n&&!r.equals(t.sel))return void Qr(t,r,{clearRedo:!1});a=r}var u=[];Wr(a,l),l.push({changes:u,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var h=vt(t,"beforeChange")||t.cm&&vt(t.cm,"beforeChange"),d=function(n){var i=r.changes[n];if(i.origin=e,h&&!lo(t,i,!1))return s.length=0,{};u.push(Br(t,i));var o=n?Nr(t,i):$(s);fo(t,i,o,Ur(t,i)),!n&&t.cm&&t.cm.scrollIntoView({from:i.from,to:_r(i)});var a=[];Dr(t,(function(t,e){e||-1!=F(a,t.history)||(yo(t.history,i),a.push(t.history)),fo(t,i,null,Ur(t,i))}))},p=r.changes.length-1;p>=0;--p){var f=d(p);if(f)return f.v}}}}function po(t,e){if(0!=e&&(t.first+=e,t.sel=new wr(Y(t.sel.ranges,(function(t){return new kr(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)di(t.cm,i,"gutter")}}function fo(t,e,n,i){if(t.cm&&!t.cm.curOp)return tr(t.cm,fo)(t,e,n,i);if(e.to.line<t.first)po(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);po(t,r),e={from:te(t.first,0),to:te(e.to.line+r,e.to.ch),text:[$(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),n||(n=Nr(t,e)),t.cm?function(t,e,n){var i=t.doc,r=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=Xt(Be(Kt(i,o.line))),i.iter(l,a.line+1,(function(t){if(t==r.maxLine)return s=!0,!0}))),i.sel.contains(e.from,e.to)>-1&>(t),jr(i,e,n,si(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,(function(t){var e=Ge(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,i=e-1;i>n;i--){var r=Kt(t,i).stateAfter;if(r&&(!(r instanceof ce)||i+r.lookAhead<e)){n=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}(i,o.line),ir(t,400);var c=e.text.length-(a.line-o.line)-1;e.full?hi(t):o.line!=a.line||1!=e.text.length||Mr(t.doc,e)?hi(t,o.line,a.line+1,c):di(t,o.line,"text");var u=vt(t,"changes"),h=vt(t,"change");if(h||u){var d={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};h&&ln(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}(t.cm,e,i):jr(t,e,i),to(t,n,W),t.cantEdit&&oo(t,te(t.firstLine(),0))&&(t.cantEdit=!1)}}function mo(t,e,n,i,r){var o;i||(i=n),ee(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),co(t,{from:n,to:i,text:e,origin:r})}function go(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function vo(t,e,n,i){for(var r=0;r<t.length;++r){var o=t[r],a=!0;if(o.ranges){o.copied||((o=t[r]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)go(o.ranges[s].anchor,e,n,i),go(o.ranges[s].head,e,n,i)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=te(c.from.line+i,c.from.ch),c.to=te(c.to.line+i,c.to.ch);else if(e<=c.to.line){a=!1;break}}a||(t.splice(0,r+1),r=0)}}}function yo(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;vo(t.done,n,i,r),vo(t.undone,n,i,r)}function bo(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=Kt(t,ae(t,e)):r=Xt(e),null==r?null:(i(o,r)&&t.cm&&di(t.cm,r,n),o)}function xo(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function Co(t){this.children=t;for(var e=0,n=0,i=0;i<t.length;++i){var r=t[i];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}kr.prototype.from=function(){return oe(this.anchor,this.head)},kr.prototype.to=function(){return re(this.anchor,this.head)},kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,i=t+e;n<i;++n){var r=this.lines[n];this.height-=r.height,qe(r),ln(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=this},iterN:function(t,e,n){for(var i=t+e;t<i;++t)if(n(this.lines[t]))return!0}},Co.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(t<r){var o=Math.min(e,r-t),a=i.height;if(i.removeInner(t,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<=o){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,s=a;s<r.lines.length;){var l=new xo(r.lines.slice(s,s+=25));r.height-=l.height,this.children.splice(++i,0,l),l.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new Co(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=F(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var i=new Co(t.children);i.parent=t,t.children=[i,e],t=i}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<o){var a=Math.min(e,o-t);if(r.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=o}}};var wo=function(t,e,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=t,this.node=e};function ko(t,e,n){Ve(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Li(t,n)}wo.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,i=Xt(n);if(null!=i&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(n.widgets=null);var o=Cn(this);Yt(n,Math.max(0,n.height-o)),t&&(Qi(t,(function(){ko(t,n,-o),di(t,i,"widget")})),ln(t,"lineWidgetCleared",t,this,i))}},wo.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=Cn(this)-e;r&&(He(this.doc,i)||Yt(i,i.height+r),n&&Qi(n,(function(){n.curOp.forceUpdate=!0,ko(n,i,r),ln(n,"lineWidgetChanged",n,t,Xt(i))})))},yt(wo);var So=0,Eo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++So};function _o(t,e,n,i,r){if(i&&i.shared)return function(t,e,n,i,r){(i=R(i)).shared=!1;var o=[_o(t,e,n,i,r)],a=o[0],s=i.widgetNode;return Dr(t,(function(t){s&&(i.widgetNode=s.cloneNode(!0)),o.push(_o(t,se(t,e),se(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;a=$(o)})),new Oo(o,a)}(t,e,n,i,r);if(t.cm&&!t.cm.curOp)return tr(t.cm,_o)(t,e,n,i,r);var o=new Eo(t,r),a=ee(e,n);if(i&&R(i,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Re(t,e.line,e,n,o)||e.line!=n.line&&Re(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");we=!0}o.addToHistory&&Fr(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Yt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new ke(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){He(t,e)&&Yt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ce=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++So,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hi(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)di(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}Eo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Ki(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Se(a.markedSpans,this);t&&!this.collapsed?di(t,Xt(a),"text"):t&&(null!=s.to&&(r=Xt(a)),null!=s.from&&(i=Xt(a))),a.markedSpans=Ee(a.markedSpans,s),null==s.from&&this.collapsed&&!He(this.doc,a)&&t&&Yt(a,ii(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Be(this.lines[l]),u=Ge(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&hi(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&ln(t,"markerCleared",t,this,i,r),e&&qi(t),this.parent&&this.parent.clear()}},Eo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],a=Se(o.markedSpans,this);if(null!=a.from&&(n=te(e?o:Xt(o),a.from),-1==t))return n;if(null!=a.to&&(i=te(e?o:Xt(o),a.to),1==t))return i}return n&&{from:n,to:i}},Eo.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,i=this.doc.cm;e&&i&&Qi(i,(function(){var r=e.line,o=Xt(e.line),a=An(i,o);if(a&&(Bn(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!He(n.doc,r)&&null!=n.height){var s=n.height;n.height=null;var l=Cn(n)-s;l&&Yt(r,r.height+l)}ln(i,"markerChanged",i,t)}))},Eo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=F(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Eo.prototype.detachLine=function(t){if(this.lines.splice(F(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},yt(Eo);var Oo=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function No(t){return t.findMarks(te(t.first,0),t.clipPos(te(t.lastLine())),(function(t){return t.parent}))}function To(t){for(var e=function(e){var n=t[e],i=[n.primary.doc];Dr(n.primary.doc,(function(t){return i.push(t)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==F(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<t.length;n++)e(n)}Oo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();ln(this,"clear")}},Oo.prototype.find=function(t,e){return this.primary.find(t,e)},yt(Oo);var Lo=0,Ao=function(t,e,n,i,r){if(!(this instanceof Ao))return new Ao(t,e,n,i,r);null==n&&(n=0),Co.call(this,[new xo([new Ke("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=te(n,0);this.sel=Er(o),this.history=new Rr(null),this.id=++Lo,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),jr(this,{from:o,to:o,text:t}),Qr(this,Er(o),W)};Ao.prototype=Z(Co.prototype,{constructor:Ao,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=$t(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:nr((function(t){var e=te(this.first,0),n=this.first+this.size-1;co(this,{from:e,to:te(n,Kt(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Mi(this.cm,0,0),Qr(this,Er(e),W)})),replaceRange:function(t,e,n,i){mo(this,t,e=se(this,e),n=n?se(this,n):e,i)},getRange:function(t,e,n){var i=qt(this,se(this,t),se(this,e));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(Jt(this,t))return Kt(this,t)},getLineNumber:function(t){return Xt(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Kt(this,t)),Be(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return se(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:nr((function(t,e,n){Zr(this,se(this,"number"==typeof t?te(t,e||0):t),null,n)})),setSelection:nr((function(t,e,n){Zr(this,se(this,t),se(this,e||t),n)})),extendSelection:nr((function(t,e,n){$r(this,se(this,t),e&&se(this,e),n)})),extendSelections:nr((function(t,e){Yr(this,le(this,t),e)})),extendSelectionsBy:nr((function(t,e){Yr(this,le(this,Y(this.sel.ranges,t)),e)})),setSelections:nr((function(t,e,n){if(t.length){for(var i=[],r=0;r<t.length;r++)i[r]=new kr(se(this,t[r].anchor),se(this,t[r].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Qr(this,Sr(this.cm,i,e),n)}})),addSelection:nr((function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new kr(se(this,t),se(this,e||t))),Qr(this,Sr(this.cm,i,i.length-1),n)})),getSelection:function(t){for(var e,n=this.sel.ranges,i=0;i<n.length;i++){var r=qt(this,n[i].from(),n[i].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=qt(this,n[i].from(),n[i].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[i]=r}return e},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:nr((function(t,e,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:this.splitLines(t[o]),origin:n}}for(var s=e&&"end"!=e&&function(t,e,n){for(var i=[],r=te(t.first,0),o=r,a=0;a<e.length;a++){var s=e[a],l=Tr(s.from,r,o),c=Tr(_r(s),r,o);if(r=s.to,o=c,"around"==n){var u=t.sel.ranges[a],h=ee(u.head,u.anchor)<0;i[a]=new kr(h?c:l,h?l:c)}else i[a]=new kr(l,l)}return new wr(i,t.sel.primIndex)}(this,i,e),l=i.length-1;l>=0;l--)co(this,i[l]);s?Jr(this,s):this.cm&&Ai(this.cm)})),undo:nr((function(){ho(this,"undo")})),redo:nr((function(){ho(this,"redo")})),undoSelection:nr((function(){ho(this,"undo",!0)})),redoSelection:nr((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new Rr(this.history.maxGeneration),Dr(this,(function(e){return e.history=t.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Kr(this.history.done),undone:Kr(this.history.undone)}},setHistory:function(t){var e=this.history=new Rr(this.history.maxGeneration);e.done=Kr(t.done.slice(0),null,!0),e.undone=Kr(t.undone.slice(0),null,!0)},setGutterMarker:nr((function(t,e,n){return bo(this,t,"gutter",(function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&et(i)&&(t.gutterMarkers=null),!0}))})),clearGutter:nr((function(t){var e=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&bo(e,n,"gutter",(function(){return n.gutterMarkers[t]=null,et(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!Jt(this,t))return null;if(e=t,!(t=Kt(this,t)))return null}else if(null==(e=Xt(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:nr((function(t,e,n){return bo(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[i]){if(S(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0}))})),removeLineClass:nr((function(t,e,n){return bo(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[i];if(!r)return!1;if(null==n)t[i]=null;else{var o=r.match(S(n));if(!o)return!1;var a=o.index+o[0].length;t[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0}))})),addLineWidget:nr((function(t,e,n){return function(t,e,n,i){var r=new wo(t,n,i),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),bo(t,e,"widget",(function(e){var n=e.widgets||(e.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!He(t,e)){var i=Ve(e)<t.scrollTop;Yt(e,e.height+Cn(r)),i&&Li(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&ln(o,"lineWidgetAdded",o,r,"number"==typeof e?e:Xt(e)),r}(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return _o(this,se(this,t),se(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return _o(this,t=se(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=Kt(this,(t=se(this,t)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&t.push(n[i].marker)})),t},posFromIndex:function(t){var e,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;if(o>t)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+n})),e},copy:function(t){var e=new Ao($t(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new Ao($t(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),a=t.clipPos(r.to);if(ee(o,a)){var s=_o(t,o,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}(i,No(this)),i},unlinkDoc:function(t){if(t instanceof Oa&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),To(No(this));break}if(t.history==this.history){var n=[t.id];Dr(t,(function(t){return n.push(t.id)}),!0),t.history=new Rr(null),t.history.done=Kr(this.history.done,n),t.history.undone=Kr(this.history.undone,n)}},iterLinkedDocs:function(t){Dr(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):At(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:nr((function(t){var e;"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&Qi(e=this.cm,(function(){Pr(e),hi(e)})))}))}),Ao.prototype.eachLine=Ao.prototype.iter;var Mo=0;function jo(t){var e=this;if(Do(e),!mt(e,t)&&!wn(e.display,t)){bt(t),a&&(Mo=+new Date);var n=ci(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,l=function(){++s==r&&tr(e,(function(){var t={from:n=se(e.doc,n),to:n,text:e.doc.splitLines(o.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};co(e.doc,t),Jr(e.doc,Er(se(e.doc,n),se(e.doc,_r(t))))}))()},c=function(t,n){if(e.options.allowDropFileTypes&&-1==F(e.options.allowDropFileTypes,t.type))l();else{var i=new FileReader;i.onerror=function(){return l()},i.onload=function(){var t=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(o[n]=t),l()},i.readAsText(t)}},u=0;u<i.length;u++)c(i[u],u);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),to(e.doc,Er(n,n)),d)for(var p=0;p<d.length;++p)mo(e.doc,"",d[p].anchor,d[p].head,"drag");e.replaceSelection(h,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Do(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Io(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<e.length;i++){var r=e[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation((function(){for(var e=0;e<n.length;e++)t(n[e])}))}}var Po=!1;function Ro(){var t;Po||(ht(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Io(Bo)}),100))})),ht(window,"blur",(function(){return Io(Ei)})),Po=!0)}function Bo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var zo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Fo=0;Fo<10;Fo++)zo[Fo+48]=zo[Fo+96]=String(Fo);for(var Ho=65;Ho<=90;Ho++)zo[Ho]=String.fromCharCode(Ho);for(var Wo=1;Wo<=12;Wo++)zo[Wo+111]=zo[Wo+63235]="F"+Wo;var Vo={};function Go(t){var e,n,i,r,o=t.split(/-(?!$)/);t=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function Uo(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=Y(n.split(" "),Go),o=0;o<r.length;o++){var a=void 0,s=void 0;o==r.length-1?(s=r.join(" "),a=i):(s=r.slice(0,o+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var c in e)t[c]=e[c];return t}function Ko(t,e,n,i){var r=(e=Xo(e)).call?e.call(t,i):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Ko(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var a=Ko(t,e.fallthrough[o],n,i);if(a)return a}}}function qo(t){var e="string"==typeof t?t:zo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function $o(t,e,n){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(w?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(w?e.ctrlKey:e.metaKey)&&"Mod"!=i&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function Yo(t,e){if(h&&34==t.keyCode&&t.char)return!1;var n=zo[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),$o(n,t,e))}function Xo(t){return"string"==typeof t?Vo[t]:t}function Zo(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&&ee(o.from,$(i).to)<=0;){var a=i.pop();if(ee(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}Qi(t,(function(){for(var e=i.length-1;e>=0;e--)mo(t.doc,"",i[e].from,i[e].to,"+delete");Ai(t)}))}function Jo(t,e,n){var i=rt(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Qo(t,e,n){var i=Jo(t,e.ch,n);return null==i?null:new te(e.line,i,n<0?"after":"before")}function ta(t,e,n,i,r){if(t){"rtl"==e.doc.direction&&(r=-r);var o=ct(n,e.doc.direction);if(o){var a,s=r<0?$(o):o[0],l=r<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Mn(e,n);a=r<0?n.text.length-1:0;var u=jn(e,c,a).top;a=ot((function(t){return jn(e,c,t).top==u}),r<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=r<0?s.to:s.from;return new te(i,a,l)}}return new te(i,r<0?n.text.length:0,r<0?"before":"after")}Vo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vo.default=y?Vo.macDefault:Vo.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),W)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:te(e.head.line+1,0)}:{from:e.head,to:te(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Zo(t,(function(e){return{from:te(e.from().line,0),to:se(t.doc,te(e.to().line+1,0))}}))},delLineLeft:function(t){return Zo(t,(function(t){return{from:te(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Zo(t,(function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return Zo(t,(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:i}}))},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(te(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(te(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return na(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return ia(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return function(t,e){var n=Kt(t.doc,e),i=function(t){for(var e;e=Ie(t);)t=e.find(1,!0).line;return t}(n);return i!=n&&(e=Xt(i)),ta(!0,t,n,e,-1)}(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")}),G)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")}),G)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?ia(t,e.head):i}),G)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=B(t.getLine(o.line),o.ch,i);e.push(q(i-a%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Qi(t,(function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++)if(e[i].empty()){var r=e[i].head,o=Kt(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new te(r.line,r.ch-1)),r.ch>0)r=new te(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),te(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=Kt(t.doc,r.line-1).text;a&&(r=new te(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(r.line-1,a.length-1),r,"+transpose"))}n.push(new kr(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qi(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i<e.length;i++)t.indentLine(e[i].from().line,null,!0);Ai(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function na(t,e){var n=Kt(t.doc,e),i=Be(n);return i!=n&&(e=Xt(i)),ta(!0,t,i,e,1)}function ia(t,e){var n=na(t,e.line),i=Kt(t.doc,n.line),r=ct(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(n.ch,i.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return te(n.line,a?0:o,n.sticky)}return n}function ra(t,e,n){if("string"==typeof e&&!(e=ea[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=H}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}var oa=new z;function aa(t,e,n,i){var r=t.state.keySeq;if(r){if(qo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:oa.set(50,(function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())})),sa(t,r+" "+e,n,i))return!0}return sa(t,e,n,i)}function sa(t,e,n,i){var r=function(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=Ko(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&Ko(e,t.options.extraKeys,n,t)||Ko(e,t.options.keyMap,n,t)}(t,e,i);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&ln(t,"keyHandled",t,e,n),"handled"!=r&&"multi"!=r||(bt(n),Ci(t)),!!r}function la(t,e){var n=Yo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?aa(t,"Shift-"+n,e,(function(e){return ra(t,e,!0)}))||aa(t,n,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return ra(t,e)})):aa(t,n,e,(function(e){return ra(t,e)})))}var ca=null;function ua(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=M(),mt(e,t)))){a&&s<11&&27==t.keyCode&&(t.returnValue=!1);var i=t.keyCode;e.display.shift=16==i||t.shiftKey;var r=la(e,t);h&&(ca=r?i:null,r||88!=i||jt||!(y?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!y&&!r&&46==i&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(_(e,"CodeMirror-crosshair"),pt(document,"keyup",n),pt(document,"mouseover",n))}j(e,"CodeMirror-crosshair"),ht(document,"keyup",n),ht(document,"mouseover",n)}(e)}}function ha(t){16==t.keyCode&&(this.doc.sel.shift=!1),mt(this,t)}function da(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||wn(e.display,t)||mt(e,t)||t.ctrlKey&&!t.altKey||y&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(h&&n==ca)return ca=null,void bt(t);if(!h||t.which&&!(t.which<10)||!la(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(function(t,e,n){return aa(t,"'"+n+"'",e,(function(e){return ra(t,e,!0)}))}(e,t,r)||e.display.input.onKeyPress(t))}}}var pa,fa,ma=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ga(t){var e=this,n=e.display;if(!(mt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,wn(n,t))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ba(e,t)){var i=ci(e,t),r=St(t),o=i?function(t,e){var n=+new Date;return fa&&fa.compare(n,t,e)?(pa=fa=null,"triple"):pa&&pa.compare(n,t,e)?(fa=new ma(n,t,e),pa=null,"double"):(pa=new ma(n,t,e),fa=null,"single")}(i,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),i&&function(t,e,n,i,r){var o="Click";return"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o),aa(t,$o(o=(1==e?"Left":2==e?"Middle":"Right")+o,r),r,(function(e){if("string"==typeof e&&(e=ea[e]),!e)return!1;var i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i=e(t,n)!=H}finally{t.state.suppressEdits=!1}return i}))}(e,r,i,o,t)||(1==r?i?function(t,e,n,i){a?setTimeout(P(wi,t),0):t.curOp.focus=M();var r,o=function(t,e,n){var i=t.getOption("configureMouse"),r=i?i(t,e,n):{};if(null==r.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=y?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(y?n.altKey:n.ctrlKey)),r}(t,n,i),c=t.doc.sel;t.options.dragDrop&&Ot&&!t.isReadOnly()&&"single"==n&&(r=c.contains(e))>-1&&(ee((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(ee(r.to(),e)>0||e.xRel<0)?function(t,e,n,i){var r=t.display,o=!1,c=tr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,pt(r.wrapper.ownerDocument,"mouseup",c),pt(r.wrapper.ownerDocument,"mousemove",u),pt(r.scroller,"dragstart",h),pt(r.scroller,"drop",c),o||(bt(e),i.addNew||$r(t.doc,n,null,null,i.extend),l&&!d||a&&9==s?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),ht(r.wrapper.ownerDocument,"mouseup",c),ht(r.wrapper.ownerDocument,"mousemove",u),ht(r.scroller,"dragstart",h),ht(r.scroller,"drop",c),ki(t),setTimeout((function(){return r.input.focus()}),20)}(t,i,e,o):function(t,e,n,i){var r=t.display,o=t.doc;bt(e);var a,s,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new kr(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new kr(n,n)),n=ci(t,e,!0,!0),s=-1;else{var u=va(t,n,i.unit);a=i.extend?qr(a,u.anchor,u.head,i.extend):u}i.addNew?-1==s?(s=c.length,Qr(o,Sr(t,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==i.unit&&!i.extend?(Qr(o,Sr(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Xr(o,s,a,V):(s=0,Qr(o,new wr([a],0),V),l=o.sel);var h=n;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=B(Kt(o,n.line).text,n.ch,c),d=B(Kt(o,e.line).text,e.ch,c),p=Math.min(u,d),f=Math.max(u,d),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=U(v,p,c);p==f?r.push(new kr(te(m,y),te(m,y))):v.length>y&&r.push(new kr(te(m,y),te(m,U(v,f,c))))}r.length||r.push(new kr(n,n)),Qr(o,Sr(t,l.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=a,C=va(t,e,i.unit),w=x.anchor;ee(C.anchor,w)>0?(b=C.head,w=oe(x.from(),C.anchor)):(b=C.anchor,w=re(x.to(),C.head));var k=l.ranges.slice(0);k[s]=function(t,e){var n=e.anchor,i=e.head,r=Kt(t.doc,n.line);if(0==ee(n,i)&&n.sticky==i.sticky)return e;var o=ct(r);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,i.ch,i.sticky),h=u-a||(i.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],p=l==(1==d.level),f=p?d.from:d.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?e:new kr(new te(n.line,f,m),i)}(t,new kr(se(o,w),b)),Qr(o,Sr(t,k,s),V)}}var p=r.wrapper.getBoundingClientRect(),f=0;function m(e){t.state.selectingText=!1,f=1/0,e&&(bt(e),r.input.focus()),pt(r.wrapper.ownerDocument,"mousemove",g),pt(r.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=tr(t,(function(e){0!==e.buttons&&St(e)?function e(n){var a=++f,s=ci(t,n,!0,"rectangle"==i.unit);if(s)if(0!=ee(s,h)){t.curOp.focus=M(),d(s);var l=Ni(r,o);(s.line>=l.to||s.line<l.from)&&setTimeout(tr(t,(function(){f==a&&e(n)})),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(tr(t,(function(){f==a&&(r.scroller.scrollTop+=c,e(n))})),50)}}(e):m(e)})),v=tr(t,m);t.state.selectingText=v,ht(r.wrapper.ownerDocument,"mousemove",g),ht(r.wrapper.ownerDocument,"mouseup",v)}(t,i,e,o)}(e,i,o,t):kt(t)==n.scroller&&bt(t):2==r?(i&&$r(e.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(k?e.display.input.onContextMenu(t):ki(e)))}}function va(t,e,n){if("char"==n)return new kr(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new kr(te(e.line,0),se(t.doc,te(e.line+1,0)));var i=n(t,e);return new kr(i.from,i.to)}function ya(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return Ct(e);o-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r)return ft(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ct(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function xa(t,e){wn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||k||t.display.input.onContextMenu(e)}function Ca(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fn(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var wa={toString:function(){return"CodeMirror.Init"}},ka={},Sa={};function Ea(t,e,n){if(!e!=!(n&&n!=wa)){var i=t.display.dragFunctions,r=e?ht:pt;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function _a(t){t.options.lineWrapping?(j(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(_(t.display.wrapper,"CodeMirror-wrap"),Ue(t)),li(t),hi(t),Fn(t),setTimeout((function(){return Hi(t)}),100)}function Oa(t,e){var n=this;if(!(this instanceof Oa))return new Oa(t,e);this.options=e=e?R(e):{},R(ka,e,!1);var i=e.value;"string"==typeof i?i=new Ao(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Oa.inputStyles[e.inputStyle](this),o=this.display=new gr(t,i,r,e);for(var c in o.wrapper.CodeMirror=this,Ca(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",tr(t,ga)),ht(e.scroller,"dblclick",a&&s<11?tr(t,(function(e){if(!mt(t,e)){var n=ci(t,e);if(n&&!ba(t,e)&&!wn(t.display,e)){bt(e);var i=t.findWordAt(n);$r(t.doc,i.anchor,i.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xa(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||xa(t,n)}));var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(i=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}ht(e.scroller,"touchstart",(function(r){if(!mt(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!ba(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var i=e.activeTouch;if(i&&!wn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!i.prev||o(i,i.prev)?new kr(s,s):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(s):new kr(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}r()})),ht(e.scroller,"touchcancel",r),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Ii(t,e.scroller.scrollTop),Ri(t,e.scroller.scrollLeft,!0),ft(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Cr(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Cr(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||wt(e)},over:function(e){mt(t,e)||(function(t,e){var n=ci(t,e);if(n){var i=document.createDocumentFragment();yi(t,n,i),t.display.dragCursor||(t.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),N(t.display.dragCursor,i)}}(t,e),wt(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Mo<100))wt(e);else if(!mt(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:tr(t,jo),leave:function(e){mt(t,e)||Do(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",tr(t,ua)),ht(l,"keypress",tr(t,da)),ht(l,"focus",(function(e){return Si(t,e)})),ht(l,"blur",(function(e){return Ei(t,e)}))}(this),Ro(),Ki(this),this.curOp.forceUpdate=!0,Ir(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Si(n)}),20):Ei(this),Sa)Sa.hasOwnProperty(c)&&Sa[c](this,e[c],wa);dr(this),e.finishInit&&e.finishInit(this);for(var u=0;u<Na.length;++u)Na[u](this);qi(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Oa.defaults=ka,Oa.optionHandlers=Sa;var Na=[];function Ta(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=pe(t,e).state:n="prev");var a=t.options.tabSize,s=Kt(o,e),l=B(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(r,s.text.slice(u.length),s.text))==H||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?B(Kt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)d+=a,h+="\t";if(d<c&&(h+=q(c-d)),h!=u)return mo(o,h,te(e,0),te(e,u.length),"+input"),s.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==e&&m.head.ch<u.length){var g=te(e,u.length);Xr(o,f,new kr(g,g));break}}}Oa.defineInitHook=function(t){return Na.push(t)};var La=null;function Aa(t){La=t}function Ma(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var a=+new Date-200,s="paste"==r||t.state.pasteIncoming>a,l=At(e),c=null;if(s&&i.ranges.length>1)if(La&&La.text.join("\n")==e){if(i.ranges.length%La.text.length==0){c=[];for(var u=0;u<La.text.length;u++)c.push(o.splitLines(La.text[u]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(c=Y(l,(function(t){return[t]})));for(var h=t.curOp.updateInput,d=i.ranges.length-1;d>=0;d--){var p=i.ranges[d],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=te(f.line,f.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+$(l).length)):s&&La&&La.lineWise&&La.text.join("\n")==l.join("\n")&&(f=m=te(f.line,0)));var g={from:f,to:m,text:c?c[d%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,g),ln(t,"inputRead",t,g)}e&&!s&&Da(t,e),Ai(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function ja(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qi(e,(function(){return Ma(e,n,0,null,"paste")})),!0}function Da(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(e.indexOf(o.electricChars.charAt(s))>-1){a=Ta(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Ta(t,r.head.line,"smart"));a&&ln(t,"electricInput",t,r.head.line)}}}function Ia(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:te(r,0),head:te(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function Pa(t,e,n,i){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",i?"":"off"),t.setAttribute("spellcheck",!!e)}function Ra(){var t=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=T("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),m&&(t.style.border="1px solid black"),Pa(t),e}function Ba(t,e,n,i,r){var o=e,a=n,s=Kt(t,e.line),l=r&&"rtl"==t.direction?-n:n;function c(o){var a,c;if("codepoint"==i){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));a=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=r?function(t,e,n,i){var r=ct(e,t.doc.direction);if(!r)return Qo(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(r,n.ch,n.sticky),a=r[o];if("ltr"==t.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return Qo(e,n,i);var s,l=function(t,n){return Jo(e,t instanceof te?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(s=s||Mn(t,e),Jn(t,e,s,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==a.level){var h=1==a.level==i<0,d=l(n,h?1:-1);if(null!=d&&(h?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var p=h?"before":"after";return new te(n.line,d,p)}}var f=function(t,e,i){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t<r.length;t+=e){var a=r[t],s=e>0==(1!=a.level),c=s?i.begin:l(i.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),i.begin<=c&&c<i.end)return o(c,s)}},m=f(o+i,i,u);if(m)return m;var g=i>0?u.end:l(u.begin,-1);return null==g||i>0&&g==e.text.length||!(m=f(i>0?0:r.length-1,i,c(g)))?null:m}(t.cm,s,e,n):Qo(s,e,n);if(null==a){if(o||(c=e.line+l)<t.first||c>=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=ta(r,t.cm,s,e.line,l)}else e=a;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var f=s.text.charAt(e.ch)||"\n",m=tt(f,d)?"w":h&&"\n"==f?"n":!h||/\s/.test(f)?null:"p";if(!h||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),e.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function za(t,e,n,i){var r,o,a=t.doc,s=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ii(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Xn(t,s,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}var Fa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(t,e){var n=An(t,e.line);if(!n||n.hidden)return null;var i=Kt(t.doc,e.line),r=Tn(n,i,e.line),o=ct(i,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=Pn(r.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Wa(t,e){return e&&(t.bad=!0),t}function Va(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return Wa(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return Ga(o,e,n)}}function Ga(t,e,n){var i=t.text.firstChild,r=!1;if(!e||!A(i,e))return Wa(te(Xt(t.line),0),!0);if(e==i&&(r=!0,e=i.childNodes[n],n=0,!e)){var o=t.rest?$(t.rest):t.line;return Wa(te(Xt(o),o.text.length),r)}var a=3==e.nodeType?e:null,s=e;for(a||1!=e.childNodes.length||3!=e.firstChild.nodeType||(a=e.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var l=t.measure,c=l.maps;function u(e,n,i){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?l.map:c[r],a=0;a<o.length;a+=3){var s=o[a+2];if(s==e||s==n){var u=Xt(r<0?t.line:t.rest[r]),h=o[a]+i;return(i<0||s!=e)&&(h=o[a+(i?1:0)]),te(u,h)}}}var h=u(a,s,n);if(h)return Wa(h,r);for(var d=s.nextSibling,p=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(h=u(d,d.firstChild,0))return Wa(te(h.line,h.ch-p),r);p+=d.textContent.length}for(var f=s.previousSibling,m=n;f;f=f.previousSibling){if(h=u(f,f.firstChild,-1))return Wa(te(h.line,h.ch+m),r);m+=f.textContent.length}}Fa.prototype.init=function(t){var e=this,n=this,i=n.cm,r=n.div=t.lineDiv;function o(t){for(var e=t.target;e;e=e.parentNode){if(e==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function a(t){if(o(t)&&!mt(i,t)){if(i.somethingSelected())Aa({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=Ia(i);Aa({lineWise:!0,text:e.text}),"cut"==t.type&&i.operation((function(){i.setSelections(e.ranges,0,W),i.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var a=La.text.join("\n");if(t.clipboardData.setData("Text",a),t.clipboardData.getData("Text")==a)return void t.preventDefault()}var s=Ra(),l=s.firstChild;i.display.lineSpace.insertBefore(s,i.display.lineSpace.firstChild),l.value=La.text.join("\n");var c=document.activeElement;I(l),setTimeout((function(){i.display.lineSpace.removeChild(s),c.focus(),c==r&&n.showPrimarySelection()}),50)}}Pa(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),ht(r,"paste",(function(t){!o(t)||mt(i,t)||ja(t,i)||s<=11&&setTimeout(tr(i,(function(){return e.updateFromDOM()})),20)})),ht(r,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),ht(r,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),ht(r,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),ht(r,"touchstart",(function(){return n.forceCompositionEnd()})),ht(r,"input",(function(){e.composing||e.readFromDOMSoon()})),ht(r,"copy",a),ht(r,"cut",a)},Fa.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Fa.prototype.prepareSelection=function(){var t=vi(this.cm,!1);return t.focus=document.activeElement==this.div,t},Fa.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Fa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fa.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,i=e.doc.sel.primary(),r=i.from(),o=i.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var a=Va(e,t.anchorNode,t.anchorOffset),s=Va(e,t.focusNode,t.focusOffset);if(!a||a.bad||!s||s.bad||0!=ee(oe(a,s),r)||0!=ee(re(a,s),o)){var l=e.display.view,c=r.line>=e.display.viewFrom&&Ha(e,r)||{node:l[0].measure.map[2],offset:0},u=o.line<e.display.viewTo&&Ha(e,o);if(!u){var h=l[l.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var p,f=t.rangeCount&&t.getRangeAt(0);try{p=E(c.node,c.offset,u.offset,u.node)}catch(t){}p&&(!n&&e.state.focused?(t.collapse(c.node,c.offset),p.collapsed||(t.removeAllRanges(),t.addRange(p))):(t.removeAllRanges(),t.addRange(p)),f&&null==t.anchorNode?t.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Fa.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){return t.cm.curOp.selectionChanged=!0}))}),20)},Fa.prototype.showMultipleSelections=function(t){N(this.cm.display.cursorDiv,t.cursors),N(this.cm.display.selectionDiv,t.selection)},Fa.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Fa.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return A(this.div,e)},Fa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fa.prototype.blur=function(){this.div.blur()},Fa.prototype.getField=function(){return this.div},Fa.prototype.supportsTouch=function(){return!0},Fa.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Qi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Fa.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Fa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Va(e,t.anchorNode,t.anchorOffset),i=Va(e,t.focusNode,t.focusOffset);n&&i&&Qi(e,(function(){Qr(e.doc,Er(n,i),W),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)}))}}},Fa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>i.firstLine()&&(a=te(a.line-1,Kt(i.doc,a.line-1).length)),s.ch==Kt(i.doc,s.line).text.length&&s.line<i.lastLine()&&(s=te(s.line+1,0)),a.line<r.viewFrom||s.line>r.viewTo-1)return!1;a.line==r.viewFrom||0==(t=ui(i,a.line))?(e=Xt(r.view[0].line),n=r.view[0].node):(e=Xt(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=ui(i,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=Xt(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(function(t,e,n,i,r){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var p=t.findMarks(te(i,0),te(r+1,0),(g=+d,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(qt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;f&&c();for(var m=0;m<e.childNodes.length;m++)h(e.childNodes[m]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),f&&(a=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;h(e),e!=n;)e=e.nextSibling,l=!1;return o}(i,n,c,e,l)),d=qt(i.doc,te(e,0),te(l,Kt(i.doc,l).text.length));h.length>1&&d.length>1;)if($(h)==$(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var p=0,f=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=$(h),b=$(d),x=Math.min(y.length-(1==h.length?p:0),b.length-(1==d.length?p:0));f<x&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)++f;if(1==h.length&&1==d.length&&e==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)p--,f++;h[h.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var C=te(e,p),w=te(l,d.length?$(d).length-f:0);return h.length>1||h[0]||ee(C,w)?(mo(i.doc,h,C,w,"+input"),!0):void 0},Fa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fa.prototype.reset=function(){this.forceCompositionEnd()},Fa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Fa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qi(this.cm,(function(){return hi(t.cm)}))},Fa.prototype.setUneditable=function(t){t.contentEditable="false"},Fa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||tr(this.cm,Ma)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Fa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Fa.prototype.onContextMenu=function(){},Fa.prototype.resetPosition=function(){},Fa.prototype.needsContentAttribute=!0;var Ua=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!mt(i,t)){if(i.somethingSelected())Aa({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Ia(i);Aa({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,W):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(r.style.width="0px"),ht(r,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(r,"paste",(function(t){mt(i,t)||ja(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),ht(r,"cut",o),ht(r,"copy",o),ht(t.scroller,"paste",(function(e){if(!wn(t,e)&&!mt(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,r.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){wn(t,e)||bt(e)})),ht(r,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ua.prototype.createField=function(t){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Ua.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=vi(t);if(t.options.moveInputWithCursor){var r=qn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},Ua.prototype.showSelection=function(t){var e=this.cm.display;N(e.cursorDiv,t.cursors),N(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ua.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Ua.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Ua.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Mt(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l<c&&i.charCodeAt(l)==r.charCodeAt(l);)++l;return Qi(e,(function(){Ma(e,r.slice(l),i.length-l,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ci(n,t),c=i.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&tr(n,Qr)(n.doc,Er(o),W);var u,d=r.style.cssText,p=e.wrapper.style.cssText,f=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-f.top-5)+"px; left: "+(t.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&s>=9&&g(),k){wt(t);var m=function(){pt(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=r.selectionStart){var t=n.somethingSelected(),o=""+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,r.style.cssText=d,a&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==e.prevInput?tr(n,so)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Ua.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=wa&&r(t,e,n)}:r)}t.defineOption=n,t.Init=wa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Lr(t)}),!0),n("indentUnit",2,Lr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ar(t),Fn(t),hi(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(te(i,o))}i++}));for(var r=n.length-1;r>=0;r--)mo(t.doc,e,n[r],te(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=wa&&t.refresh()})),n("specialCharPlaceholder",Je,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ca(t),mr(t)}),!0),n("keyMap","default",(function(t,e,n){var i=Xo(e),r=n!=wa&&Xo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pr(e,t.options.lineNumbers),mr(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ai(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Hi(t)}),!0),n("scrollbarStyle","native",(function(t){Gi(t),Hi(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pr(t.options.gutters,e),mr(t)}),!0),n("firstLineNumber",1,mr,!0),n("lineNumberFormatter",(function(t){return t}),mr,!0),n("showCursorWhenSelecting",!1,gi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Ei(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ea),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gi,!0),n("singleCursorHeightPerLine",!0,gi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ar,!0),n("addModeClass",!1,Ar,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ar,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Oa),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&tr(this,e[t])(this,n,r),ft(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:er((function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");!function(t,e,n){for(var i=0,r=n(e);i<t.length&&n(t[i])<=r;)i++;t.splice(i,0,e)}(this.state.overlays,{mode:i,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(t){return t.priority})),this.state.modeGen++,hi(this)})),removeOverlay:er((function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var i=e[n].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return e.splice(n,1),this.state.modeGen++,void hi(this)}})),indentLine:er((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),Jt(this.doc,t)&&Ta(this,t,e,n)})),indentSelection:er((function(t){for(var e=this.doc.sel.ranges,n=-1,i=0;i<e.length;i++){var r=e[i];if(r.empty())r.head.line>n&&(Ta(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Ai(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Ta(this,l,t);var c=this.doc.sel.ranges;0==o.ch&&e.length==c.length&&c[i].from().ch>0&&Xr(this.doc,i,new kr(o,c[i].to()),W)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=de(this,Kt(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){e=n[2*a+2];break}i=a+1}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var i=[];if(!n.hasOwnProperty(e))return i;var r=n[e],o=this.getModeAt(t);if("string"==typeof o[e])r[o[e]]&&i.push(r[o[e]]);else if(o[e])for(var a=0;a<o[e].length;a++){var s=r[o[e][a]];s&&i.push(s)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(o,this)&&-1==F(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(t,e){var n=this.doc;return pe(this,(t=ae(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return qn(this,null==t?n.head:"object"==typeof t?se(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return Kn(this,se(this.doc,t),e||"page")},coordsChar:function(t,e){return Xn(this,(t=Un(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Un(this,{top:t,left:0},e||"page").top,Zt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,r=!0),i=Kt(this.doc,t)}else i=t;return Gn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-Ve(i):0)},defaultTextHeight:function(){return ii(this.display)},defaultCharWidth:function(){return ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o,a,s,l=this.display,c=(t=qn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==i)c=t.top;else if("above"==i||"near"==i){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==r?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?u=0:"middle"==r&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Ti(o,a)).scrollTop&&Ii(o,s.scrollTop),null!=s.scrollLeft&&Ri(o,s.scrollLeft))},triggerOnKeyDown:er(ua),triggerOnKeyPress:er(da),triggerOnKeyUp:ha,triggerOnMouseDown:er(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:er((function(t){Da(this,t)})),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=se(this.doc,t),a=0;a<e&&!(o=Ba(this.doc,o,r,n,i)).hitSide;++a);return o},moveH:er((function(t,e){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Ba(n.doc,i.head,t,e,n.options.rtlMoveVisually):t<0?i.from():i.to()}),G)})),deleteH:er((function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Zo(this,(function(n){var r=Ba(i,n.head,t,e,!1);return t<0?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(t,e,n,i){var r=1,o=i;e<0&&(r=-1,e=-e);for(var a=se(this.doc,t),s=0;s<e;++s){var l=qn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=za(this,l,r,n)).hitSide)break}return a},moveV:er((function(t,e){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return t<0?a.from():a.to();var s=qn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=za(n,s,t,e);return"page"==e&&a==i.sel.primary()&&Li(n,Kn(n,l,"div").top-s.top),l}),G),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]})),findWordAt:function(t){var e=Kt(this.doc,t.line).text,n=t.ch,i=t.ch;if(e){var r=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=e.length||!n?++i:--n;for(var o=e.charAt(n),a=tt(o,r)?function(t){return tt(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!tt(t)};n>0&&a(e.charAt(n-1));)--n;for(;i<e.length&&a(e.charAt(i));)++i}return new kr(te(t.line,n),te(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),ft(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==M()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:er((function(t,e){Mi(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-_n(this)-this.display.barHeight,width:t.scrollWidth-_n(this)-this.display.barWidth,clientHeight:Nn(this),clientWidth:On(this)}},scrollIntoView:er((function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:te(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?function(t,e){ji(t),t.curOp.scrollToPos=e}(this,t):Di(this,t.from,t.to,t.margin)})),setSize:er((function(t,e){var n=this,i=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=i(t)),null!=e&&(this.display.wrapper.style.height=i(e)),this.options.lineWrapping&&zn(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){di(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,ft(this,"refresh",this)})),operation:function(t){return Qi(this,t)},startOperation:function(){return Ki(this)},endOperation:function(){return qi(this)},refresh:er((function(){var t=this.display.cachedTextHeight;hi(this),this.curOp.forceUpdate=!0,Fn(this),Mi(this,this.doc.scrollLeft,this.doc.scrollTop),cr(this.display),(null==t||Math.abs(t-ii(this.display))>.5||this.options.lineWrapping)&&li(this),ft(this,"refresh",this)})),swapDoc:er((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ir(this,t),Fn(this),this.display.input.reset(),Mi(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(Oa);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var qa in Ao.prototype)Ao.prototype.hasOwnProperty(qa)&&F(Ka,qa)<0&&(Oa.prototype[qa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ao.prototype[qa]));return yt(Ao),Oa.inputStyles={textarea:Ua,contenteditable:Fa},Oa.defineMode=function(t){Oa.defaults.mode||"null"==t||(Oa.defaults.mode=t),Rt.apply(this,arguments)},Oa.defineMIME=function(t,e){Pt[t]=e},Oa.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(t,e){Oa.prototype[t]=e},Oa.defineDocExtension=function(t,e){Ao.prototype[t]=e},Oa.fromTextArea=function(t,e){if((e=e?R(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=M();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=s.getValue()}var r;if(t.form&&(ht(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=i,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,i(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=Oa((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=xr,t.Doc=Ao,t.splitLines=At,t.countColumn=B,t.findColumn=U,t.isWordChar=Q,t.Pass=H,t.signal=ft,t.Line=Ke,t.changeEnd=_r,t.scrollbarModel=Vi,t.Pos=te,t.cmpPos=ee,t.modes=It,t.mimeModes=Pt,t.resolveMode=Bt,t.getMode=zt,t.modeExtensions=Ft,t.extendMode=Ht,t.copyState=Wt,t.startState=Gt,t.innerMode=Vt,t.commands=ea,t.keyMap=Vo,t.keyName=Yo,t.isModifierKey=qo,t.lookupKey=Ko,t.normalizeKeyMap=Uo,t.StringStream=Ut,t.SharedTextMarker=Oo,t.TextMarker=Eo,t.LineWidget=wo,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=wt,t.addClass=j,t.contains=A,t.rmClass=_,t.keyNames=zo}(Oa),Oa.version="5.58.2",Oa}()},WaYH:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: InternalTreeNode, default */
|
|
|
/*! exports used: 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/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/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var i=n("rePB"),r=n("Ff2n"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),p=n.n(d),f=n("sboe"),m=n("OZM5"),g=function(t){var e=t.prefixCls,n=t.level,r=t.isStart,o=t.isEnd;if(!n)return null;for(var a="".concat(e,"-indent-unit"),s=[],l=0;l<n;l+=1){var c;s.push(h.createElement("span",{key:l,className:p()(a,(c={},Object(i.a)(c,"".concat(a,"-start"),r[l+1]),Object(i.a)(c,"".concat(a,"-end"),o[l+1]),Object(i.a)(c,"".concat(a,"-end-first-level"),!l&&o[0]),c))}))}return h.createElement("span",{"aria-hidden":"true",className:"".concat(e,"-indent")},s)},v=n("815F"),y=function(t){Object(c.a)(n,t);var e=Object(u.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.apply(this,arguments)).state={dragNodeHighlight:!1},t.onSelectorClick=function(e){(0,t.props.context.onNodeClick)(e,Object(v.b)(t.props)),t.isSelectable()?t.onSelect(e):t.onCheck(e)},t.onSelectorDoubleClick=function(e){(0,t.props.context.onNodeDoubleClick)(e,Object(v.b)(t.props))},t.onSelect=function(e){if(!t.isDisabled()){var n=t.props.context.onNodeSelect;e.preventDefault(),n(e,Object(v.b)(t.props))}},t.onCheck=function(e){if(!t.isDisabled()){var n=t.props,i=n.disableCheckbox,r=n.checked,o=t.props.context.onNodeCheck;if(t.isCheckable()&&!i){e.preventDefault();var a=!r;o(e,Object(v.b)(t.props),a)}}},t.onMouseEnter=function(e){(0,t.props.context.onNodeMouseEnter)(e,Object(v.b)(t.props))},t.onMouseLeave=function(e){(0,t.props.context.onNodeMouseLeave)(e,Object(v.b)(t.props))},t.onContextMenu=function(e){(0,t.props.context.onNodeContextMenu)(e,Object(v.b)(t.props))},t.onDragStart=function(e){var n=t.props.context.onNodeDragStart;e.stopPropagation(),t.setState({dragNodeHighlight:!0}),n(e,Object(l.a)(t));try{e.dataTransfer.setData("text/plain","")}catch(t){}},t.onDragEnter=function(e){var n=t.props.context.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragOver=function(e){var n=t.props.context.onNodeDragOver;e.preventDefault(),e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragLeave=function(e){var n=t.props.context.onNodeDragLeave;e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragEnd=function(e){var n=t.props.context.onNodeDragEnd;e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,Object(l.a)(t))},t.onDrop=function(e){var n=t.props.context.onNodeDrop;e.preventDefault(),e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,Object(l.a)(t))},t.onExpand=function(e){(0,t.props.context.onNodeExpand)(e,Object(v.b)(t.props))},t.setSelectHandle=function(e){t.selectHandle=e},t.getNodeState=function(){var e=t.props.expanded;return t.isLeaf()?null:e?"open":"close"},t.hasChildren=function(){var e=t.props.eventKey;return!!((t.props.context.keyEntities[e]||{}).children||[]).length},t.isLeaf=function(){var e=t.props,n=e.isLeaf,i=e.loaded,r=t.props.context.loadData,o=t.hasChildren();return!1!==n&&(n||!r&&!o||r&&i&&!o)},t.isDisabled=function(){var e=t.props.disabled;return!(!t.props.context.disabled&&!e)},t.isCheckable=function(){var e=t.props.checkable,n=t.props.context.checkable;return!(!n||!1===e)&&n},t.syncLoadData=function(e){var n=e.expanded,i=e.loading,r=e.loaded,o=t.props.context,a=o.loadData,s=o.onNodeLoad;i||a&&n&&!t.isLeaf()&&(t.hasChildren()||r||s(Object(v.b)(t.props)))},t.renderSwitcher=function(){var e=t.props,n=e.expanded,i=e.switcherIcon,r=t.props.context,a=r.prefixCls,s=r.switcherIcon,l=i||s;if(t.isLeaf())return h.createElement("span",{className:p()("".concat(a,"-switcher"),"".concat(a,"-switcher-noop"))},"function"==typeof l?l(Object(o.a)(Object(o.a)({},t.props),{},{isLeaf:!0})):l);var c=p()("".concat(a,"-switcher"),"".concat(a,"-switcher_").concat(n?"open":"close"));return h.createElement("span",{onClick:t.onExpand,className:c},"function"==typeof l?l(Object(o.a)(Object(o.a)({},t.props),{},{isLeaf:!1})):l)},t.renderCheckbox=function(){var e=t.props,n=e.checked,i=e.halfChecked,r=e.disableCheckbox,o=t.props.context.prefixCls,a=t.isDisabled(),s=t.isCheckable();if(!s)return null;var l="boolean"!=typeof s?s:null;return h.createElement("span",{className:p()("".concat(o,"-checkbox"),n&&"".concat(o,"-checkbox-checked"),!n&&i&&"".concat(o,"-checkbox-indeterminate"),(a||r)&&"".concat(o,"-checkbox-disabled")),onClick:t.onCheck},l)},t.renderIcon=function(){var e=t.props.loading,n=t.props.context.prefixCls;return h.createElement("span",{className:p()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(t.getNodeState()||"docu"),e&&"".concat(n,"-icon_loading"))})},t.renderSelector=function(){var e,n,i=t.state.dragNodeHighlight,r=t.props,o=r.title,a=r.selected,s=r.icon,l=r.loading,c=r.data,u=t.props.context,d=u.prefixCls,f=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,y=u.titleRender,b=t.isDisabled(),x="".concat(d,"-node-content-wrapper");if(f){var C=s||m;e=C?h.createElement("span",{className:p()("".concat(d,"-iconEle"),"".concat(d,"-icon__customize"))},"function"==typeof C?C(t.props):C):t.renderIcon()}else v&&l&&(e=t.renderIcon());n="function"==typeof o?o(c):y?y(c):o;var w=h.createElement("span",{className:"".concat(d,"-title")},n);return h.createElement("span",{ref:t.setSelectHandle,title:"string"==typeof o?o:"",className:p()("".concat(x),"".concat(x,"-").concat(t.getNodeState()||"normal"),!b&&(a||i)&&"".concat(d,"-node-selected"),!b&&g&&"draggable"),draggable:!b&&g||void 0,"aria-grabbed":!b&&g||void 0,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick,onDragStart:g?t.onDragStart:void 0},e,w)},t}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var t=this.props.selectable,e=this.props.context.selectable;return"boolean"==typeof t?t:e}},{key:"render",value:function(){var t,e=this.props,n=e.eventKey,o=e.className,a=e.style,s=e.dragOver,l=e.dragOverGapTop,c=e.dragOverGapBottom,u=e.isLeaf,d=e.isStart,f=e.isEnd,y=e.expanded,b=e.selected,x=e.checked,C=e.halfChecked,w=e.loading,k=e.domRef,S=e.active,E=e.onMouseMove,_=Object(r.a)(e,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),O=this.props.context,N=O.prefixCls,T=O.filterTreeNode,L=O.draggable,A=O.keyEntities,M=this.isDisabled(),j=Object(m.f)(_),D=(A[n]||{}).level,I=f[f.length-1];return h.createElement("div",Object.assign({ref:k,className:p()(o,"".concat(N,"-treenode"),(t={},Object(i.a)(t,"".concat(N,"-treenode-disabled"),M),Object(i.a)(t,"".concat(N,"-treenode-switcher-").concat(y?"open":"close"),!u),Object(i.a)(t,"".concat(N,"-treenode-checkbox-checked"),x),Object(i.a)(t,"".concat(N,"-treenode-checkbox-indeterminate"),C),Object(i.a)(t,"".concat(N,"-treenode-selected"),b),Object(i.a)(t,"".concat(N,"-treenode-loading"),w),Object(i.a)(t,"".concat(N,"-treenode-active"),S),Object(i.a)(t,"".concat(N,"-treenode-leaf-last"),I),Object(i.a)(t,"drag-over",!M&&s),Object(i.a)(t,"drag-over-gap-top",!M&&l),Object(i.a)(t,"drag-over-gap-bottom",!M&&c),Object(i.a)(t,"filter-node",T&&T(Object(v.b)(this.props))),t)),style:a,onDragEnter:L?this.onDragEnter:void 0,onDragOver:L?this.onDragOver:void 0,onDragLeave:L?this.onDragLeave:void 0,onDrop:L?this.onDrop:void 0,onDragEnd:L?this.onDragEnd:void 0,onMouseMove:E},j),h.createElement(g,{prefixCls:N,level:D,isStart:d,isEnd:f}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(h.Component),b=function(t){return h.createElement(f.a.Consumer,null,(function(e){return h.createElement(y,Object.assign({},t,{context:e}))}))};b.displayName="TreeNode",b.defaultProps={title:"---"},b.isTreeNode=1;e.a=b},Y1PL:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: ResizableTextArea, default */
|
|
|
/*! all exports used */
|
|
|
/*! 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/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! 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.r(e),n.d(e,"ResizableTextArea",(function(){return j}));var i=n("wx14"),r=n("1OyB"),o=n("vuIU"),a=n("Ji7U"),s=n("LK+K"),l=n("q1tI"),c=n("VTBJ"),u=n("rePB"),h=n("Zm9Q"),d=(n("Kwbf"),n("c+Xe")),p=n("m+aA"),f=n("bdgK"),m=new Map;var g=new f.default((function(t){t.forEach((function(t){var e,n=t.target;null===(e=m.get(n))||void 0===e||e.forEach((function(t){return t(n)}))}))}));var v=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){return Object(r.a)(this,n),e.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component),y=l.createContext(null);function b(t){var e=t.children,n=t.disabled,i=l.useRef(null),r=l.useRef(null),o=l.useContext(y),a=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(e)&&Object(d.c)(e),u=s?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,i)}),[u,i]),f=l.useRef(t);f.current=t;var b=l.useCallback((function(t){var e=f.current,n=e.onResize,i=e.data,r=t.getBoundingClientRect(),s=r.width,l=r.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(s),p=Math.floor(l);if(a.current.width!==d||a.current.height!==p||a.current.offsetWidth!==u||a.current.offsetHeight!==h){var m={width:d,height:p,offsetWidth:u,offsetHeight:h};a.current=m;var g=u===Math.round(s)?s:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==o||o(y,t,i),n&&Promise.resolve().then((function(){n(y,t)}))}}),[]);return l.useEffect((function(){var t,e,o=Object(p.a)(i.current)||Object(p.a)(r.current);return o&&!n&&(t=o,e=b,m.has(t)||(m.set(t,new Set),g.observe(t)),m.get(t).add(e)),function(){return function(t,e){m.has(t)&&(m.get(t).delete(e),m.get(t).size||(g.unobserve(t),m.delete(t)))}(o,b)}}),[i.current,n]),l.createElement(v,{ref:r},s?l.cloneElement(e,{ref:h}):e)}function x(t){var e=t.children;return Object(h.a)(e).map((function(e,n){var r=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(n);return l.createElement(b,Object(i.a)({},t,{key:r}),e)}))}x.Collection=function(t){var e=t.children,n=t.onBatchResize,i=l.useRef(0),r=l.useRef([]),o=l.useContext(y),a=l.useCallback((function(t,e,a){i.current+=1;var s=i.current;r.current.push({size:t,element:e,data:a}),Promise.resolve().then((function(){s===i.current&&(null==n||n(r.current),r.current=[])})),null==o||o(t,e,a)}),[n,o]);return l.createElement(y.Provider,{value:a},e)};var C,w=x,k=n("bT9E"),S=n("TSYQ"),E=n.n(S),_="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",O=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],N={};function T(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&N[n])return N[n];var i=window.getComputedStyle(t),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),o=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),s=O.map((function(t){return"".concat(t,":").concat(i.getPropertyValue(t))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:r};return e&&n&&(N[n]=l),l}var L,A=n("Gytx"),M=n.n(A);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(L||(L={}));var j=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var o;return Object(r.a)(this,n),(o=e.call(this,t)).nextFrameActionId=void 0,o.resizeFrameId=void 0,o.textArea=void 0,o.saveTextArea=function(t){o.textArea=t},o.handleResize=function(t){var e=o.state.resizeStatus,n=o.props,i=n.autoSize,r=n.onResize;e===L.NONE&&("function"==typeof r&&r(t),i&&o.resizeOnNextFrame())},o.resizeOnNextFrame=function(){cancelAnimationFrame(o.nextFrameActionId),o.nextFrameActionId=requestAnimationFrame(o.resizeTextarea)},o.resizeTextarea=function(){var t=o.props.autoSize;if(t&&o.textArea){var e=t.minRows,n=t.maxRows,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;C||((C=document.createElement("textarea")).setAttribute("tab-index","-1"),C.setAttribute("aria-hidden","true"),document.body.appendChild(C)),t.getAttribute("wrap")?C.setAttribute("wrap",t.getAttribute("wrap")):C.removeAttribute("wrap");var r=T(t,e),o=r.paddingSize,a=r.borderSize,s=r.boxSizing,l=r.sizingStyle;C.setAttribute("style","".concat(l,";").concat(_)),C.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=C.scrollHeight;if("border-box"===s?d+=a:"content-box"===s&&(d-=o),null!==n||null!==i){C.value=" ";var p=C.scrollHeight-o;null!==n&&(u=p*n,"border-box"===s&&(u=u+o+a),d=Math.max(u,d)),null!==i&&(h=p*i,"border-box"===s&&(h=h+o+a),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(o.textArea,!1,e,n);o.setState({textareaStyles:i,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(o.resizeFrameId),o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.RESIZED},(function(){o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.NONE}),o.fixFirefoxAutoScroll()}))}))}))}))}},o.renderTextArea=function(){var t=o.props,e=t.prefixCls,n=void 0===e?"rc-textarea":e,r=t.autoSize,a=t.onResize,s=t.className,h=t.disabled,d=o.state,p=d.textareaStyles,f=d.resizeStatus,m=Object(k.a)(o.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=E()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},o.props.style),p),f===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(w,{onResize:o.handleResize,disabled:!(r||a)},l.createElement("textarea",Object(i.a)({},m,{className:g,style:v,ref:o.saveTextArea})))},o.state={textareaStyles:{},resizeStatus:L.NONE},o}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&M()(t.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),D=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var i;Object(r.a)(this,n),(i=e.call(this,t)).resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(t){i.resizableTextArea=t},i.handleChange=function(t){var e=i.props.onChange;i.setValue(t.target.value,(function(){i.resizableTextArea.resizeTextarea()})),e&&e(t)},i.handleKeyDown=function(t){var e=i.props,n=e.onPressEnter,r=e.onKeyDown;13===t.keyCode&&n&&n(t),r&&r(t)};var o=void 0===t.value||null===t.value?t.defaultValue:t.value;return i.state={value:o},i}return Object(o.a)(n,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(j,Object(i.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),n}(l.Component);e.default=D},YBdh:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/paper/xiren.svg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/xiren.7fdb5947.svg"},ZW9T:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./src/components/monaco-editor/index.jsx + 1 modules ***!
|
|
|
\************************************************************/
|
|
|
/*! exports provided: getLanguageByMirrorName, default, DiffEditor */
|
|
|
/*! exports used: DiffEditor, 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/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 ./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/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js */
|
|
|
/*! 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)) */function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var i=n("k1fw"),r=n("oBTY"),o=n("9og8"),a=(n("miYZ"),n("tsqr")),s=n("rAM+"),l=n("tJVT"),c=n("PpiC"),u=n("WmNS"),h=n.n(u),d=n("q1tI"),p=n.n(d),f=n("bdgK");function m(t,e,n,r,o){var a=e.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn},l=r.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return o.map((function(t){l.push(Object(i.a)(Object(i.a)({},t),{},{range:s}))})),l}var g=n("fjLI"),v=n("LvDl");n("+ua5");function y(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function b(){}var x={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale"};function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var n=0;n<t.length;n++){var i=x[t[n]];if(i)return i}return e[0]}return x[e]||e}var w=null;e.b=function(t){var e=t.width,u=void 0===e?"100%":e,x=t.height,k=void 0===x?"100%":x,S=t.value,E=t.language,_=void 0===E?"javascript":E,O=t.style,N=void 0===O?{}:O,T=t.options,L=void 0===T?{}:T,A=t.overrideServices,M=void 0===A?{}:A,j=t.theme,D=void 0===j?"vs-dark":j,I=t.onEditBlur,P=t.onSave,R=t.autoHeight,B=void 0!==R&&R,z=t.forbidCopy,F=void 0!==z&&z,H=t.onChange,W=void 0===H?b:H,V=t.editorDidMount,G=void 0===V?b:V,U=t.onFocus,K=void 0===U?b:U,q=t.onBreakPoint,$=void 0===q?b:q,Y=t.breakPointValue,X=void 0===Y?[]:Y,Z=t.filename,J=void 0===Z?"educoder.txt":Z,Q=t.errorLine,tt=t.errorContent,et=void 0===tt?"":tt,nt=t.highlightLine,it=t.openBreakPoint,rt=void 0!==it&&it,ot=(Object(c.a)(t,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Object(d.useRef)()),at=Object(d.useRef)({}),st=Object(d.useRef)(),lt=Object(d.useRef)(),ct=Object(d.useRef)([]),ut=Object(d.useRef)(!1),ht=Object(d.useRef)(),dt=Object(d.useState)(!1),pt=Object(l.a)(dt,2),ft=pt[0],mt=pt[1];function gt(){var t=at.current.instance;if(t){var e=t.getSelection(),n=at.current.pastePos||{},i=new w.Range(n.startLineNumber||e.endLineNumber,n.startColumn||e.endColumn,n.endLineNumber||e.endLineNumber,n.endColumn||e.endColumn);setTimeout((function(){t.executeEdits("",[{range:i,text:""}])}),300)}}function vt(t){(window.navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)&&83==t.keyCode&&(t.preventDefault(),P())}Object(d.useEffect)((function(){var t,e=at.current.instance;lt.current&&clearTimeout(lt.current),lt.current=setTimeout((function(){!function(){var t=at.current.instance;if(null!=S&&t&&ft){var e=t.getModel();e&&S!==e.getValue()&&(!0,e.setValue(S),t.layout(),!1)}}()}),500),null==e||null===(t=e.updateOptions)||void 0===t||t.call(e,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(S.split(/\r\n|\r|\n/g).length))+3,5)})}),[S,ft,at.current]),Object(d.useEffect)((function(){if(Q&&at.current&&at.current.instance){var t=at.current.instance;t.changeViewZones((function(t){var e=document.createElement("div");e.style.padding="10px 20px",e.style.width="calc(100% - 20px)",e.className="my-error-line-wrp",e.innerHTML=et,t.addZone({afterLineNumber:Q||11,heightInLines:3,domNode:e})}));var e={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};t.addOverlayWidget(e),t.revealPositionInCenter({lineNumber:20,column:1})}}),[Q,at.current,ft]),Object(d.useEffect)((function(){var t;if(null!==(t=at.current)&&void 0!==t&&t.instance&&ft&&rt){var e=at.current.instance,n=e.getModel();if(!n)return;!function(){var t,i=[],r=[],o=n.getAllDecorations(),a=Object(s.a)(o);try{for(a.s();!(t=a.n()).done;){var l,c=t.value;if("highlighted-line"===c.options.className)i.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),r.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}n.deltaDecorations(r,[]);var u=n.getLineCount();nt&&nt<=u&&(e.deltaDecorations([],[{range:new w.Range(nt,1,nt,n.getLineMaxColumn(nt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),e.revealLineInCenter(nt))}();var i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],o=n.getAllDecorations(),a=Object(s.a)(o);try{for(a.s();!(t=a.n()).done;){var l,c=t.value;if("breakpoints"===c.options.linesDecorationsClassName)i.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),r.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}if(e)return{lines:i,ids:r};$(i)},r=function(){var t=Object(o.a)(h.a.mark((function t(e){var r;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={range:new w.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},t.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),a=function(){var t=Object(o.a)(h.a.mark((function t(r){var o,a,l,c,u;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=[],a=e.getLineDecorations(r),l=Object(s.a)(a);try{for(l.s();!(c=l.n()).done;)"breakpoints"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(t){l.e(t)}finally{l.f()}return t.next=6,n.deltaDecorations(o,[]);case 6:i();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),l=function(t){var n,i=e.getLineDecorations(t),r=Object(s.a)(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints"===n.value.options.linesDecorationsClassName)return!0}}catch(t){r.e(t)}finally{r.f()}return!1};if(!Object(v.isEqual)(X,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var c=X.map((function(t){return{range:new w.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}}));n.deltaDecorations([],c)}var u=e.onDidChangeModelContent((function(t){var i=e.getPosition();if(i){var o=i.lineNumber;""===n.getLineContent(o).trim()?a(o):l(o)&&(a(o),r(o))}})),d=e.onMouseDown((function(t){var e,i,o;if(t.target.detail&&null!==(e=t.target)&&void 0!==e&&null!==(i=e.element)&&void 0!==i&&null!==(o=i.className)&&void 0!==o&&o.includes("line-numbers")){var s=t.target.position.lineNumber;if(""===n.getLineContent(s).trim())return;l(s)?a(s):r(s)}})),p=function(){ct.current=e.deltaDecorations(ct.current,[])},f=e.onMouseMove((function(t){var i,r,o;if(p(),t.target.detail&&null!==(i=t.target)&&void 0!==i&&null!==(r=i.element)&&void 0!==r&&null!==(o=r.className)&&void 0!==o&&o.includes("line-numbers")){var a=t.target.position.lineNumber;if(""===n.getLineContent(a).trim())return;!function(t){var n={range:new w.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ct.current=e.deltaDecorations(ct.current,[n])}(a)}})),m=e.onMouseLeave((function(){p()}));return function(){u.dispose(),d.dispose(),f.dispose(),m.dispose()}}}),[at.current,ft,X,nt,rt]);var yt=function(){if(B&&at.current.instance){var t=at.current.instance.getContentHeight();Ot(t<k?k:t)}else Ot(k)};var bt=function(t){var e=t.keyCode,n=t.ctrlKey,i=t.metaKey,r=t.target;return"paste"!==t.type&&(67!==e&&86!==e||!i&&!n)||"TEXTAREA"!==r.nodeName||(a.b.warn({content:decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"),key:"monaco-editor-tip"}),t.preventDefault()),!1};function xt(t,e){var n,i,r=window.URL||window.webkitURL||window,o=new Blob([e]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=r.createObjectURL(o),a.download=t,n=a,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}Object(d.useEffect)((function(){yt()}),[yt]),Object(d.useEffect)((function(){ot.current&&!ft&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){try{w=t,at.current.instance=w.editor.create(ot.current,{value:S,language:C(_),theme:D,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},M);var e=at.current.instance,n=g.c._menuItems,i=Object(r.a)(n).find((function(t){return"EditorContext"==t[0]._debugName}))[1];if(G(e,w),setTimeout((function(){yt(),at.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xt(J||"educoder.txt",e.getValue())}}),e.getDomNode().addEventListener("input",(function(){st.current.autoFormat&&e.getAction("editor.action.formatDocument").run()}))}),500),at.current.subscription=e.onDidChangeModelContent((function(t){ut.current?clearTimeout(ht.current):(yt(),W(e.getValue(),t)),ht.current=setTimeout((function(){ut.current=!1}),500)})),window.Monaco||function(t){var e={label:"ifelse",kind:t.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet},n=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];t.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(i,r){return{suggestions:m(t,i,r,n,[e])}}});var i=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];t.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(e,n){var r=[{label:"print",kind:t.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:m(t,e,n,i,r)}}});var r=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];t.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,i){var o=[e,{label:"main",kind:t.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:t.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:m(t,n,i,r,o)}}})}(w,C(_)),F&&(!function(t,e){var n=t._first;do{var i,r;e.includes(null===(i=n.element)||void 0===i||null===(r=i.command)||void 0===r?void 0:r.id)&&t._remove(n)}while(n=n.next)}(i,["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"]),ot.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",bt),window.removeEventListener("paste",bt),window.addEventListener("keydown",bt),window.addEventListener("paste",bt)),window.Monaco=w,I&&e.onDidBlurEditorWidget((function(){I(e.getValue())})),K&&e.onDidFocusEditorText((function(){K(e.getValue())})),F)try{window.addEventListener("paste",gt)}catch(t){}var o=function(){var t;return ot.current&&(t=new f.default((function(t){var e,n=Object(s.a)(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&at.current.instance.layout()}}catch(t){n.e(t)}finally{n.f()}}))).observe(ot.current),t}();return mt(!0),function(){var t=at.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),at.current.subscription&&at.current.subscription.dispose(),F&&window.removeEventListener("paste",gt),o.unobserve(ot.current)}}catch(t){}}))}),[]),Object(d.useEffect)((function(){if(at.current.instance&&ft)return document.addEventListener("keydown",vt,!1),function(){document.removeEventListener("keydown",vt)}}),[P,ft]),Object(d.useEffect)((function(){var t=at.current.instance;if(t&&ft){var e=C(_);w.editor.setModelLanguage(t.getModel(),e)}}),[_,ft]),Object(d.useEffect)((function(){at.current.instance&&ft&&w.editor.setTheme(D)}),[D,ft]),Object(d.useEffect)((function(){var t=at.current.instance;st.current=L,t&&ft&&(t.updateOptions(Object(i.a)({},L)),setTimeout((function(){t.getModel().updateOptions(Object(i.a)({},L))}),200))}),[JSON.stringify(L),ft]),Object(d.useEffect)((function(){var t=at.current.instance;t&&ft&&t.layout()}),[u,k,ft]);var Ct=Object(d.useState)(y(u)),wt=Object(l.a)(Ct,2),kt=wt[0],St=(wt[1],Object(d.useState)(y(k))),Et=Object(l.a)(St,2),_t=Et[0],Ot=Et[1],Nt=Object(i.a)(Object(i.a)({},N),{},{width:kt,height:_t});return p.a.createElement("div",{className:"my-monaco-editor",ref:ot,style:Nt})};function k(t){var e=t.width,r=void 0===e?"100%":e,o=t.height,a=void 0===o?"100%":o,c=t.original,u=t.modified,h=t.language,m=t.options,g=void 0===m?{}:m,v=Object(d.useRef)(),b=Object(d.useState)(null),x=Object(l.a)(b,2),C=x[0],k=x[1];Object(d.useEffect)((function(){return v.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(w=t).editor.createDiffEditor(v.current,Object(i.a)(Object(i.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},g),{},{wordWrap:!0}));k(e);var n=function(t){var e;return v.current&&(e=new f.default((function(e){var n,i=Object(s.a)(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&t.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(v.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),n.unobserve(v.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),Object(d.useEffect)((function(){C&&C.setModel({original:w.editor.createModel(c,h),modified:w.editor.createModel(u,h)})}),[c,u,h,C]);var S={width:y(r),height:y(a)};return p.a.createElement("div",{className:"my-diff-editor",ref:v,style:S})}},ZpRC:
|
|
|
/*!*************************************************************************!*\
|
|
|
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
|
|
|
\*************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";function i(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function r(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function o(t,e){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var n=getComputedStyle(t,null);return r(n.overflowY,e)||r(n.overflowX,e)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function a(t,e,n,i,r,o,a,s){return o<t&&a>e||o>t&&a<e?0:o<=t&&s<=n||a>=e&&s>=n?o-t-i:a>e&&s<n||o<t&&s>n?a-e+r:0}var s=function(t,e){var n=window,r=e.scrollMode,s=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!i(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,p=[],f=t;i(f)&&h(f);){if((f=f.parentElement)===d){p.push(f);break}null!=f&&f===document.body&&o(f)&&!o(document.documentElement)||null!=f&&o(f,u)&&p.push(f)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,C=b.width,w=b.top,k=b.right,S=b.bottom,E=b.left,_="start"===s||"nearest"===s?w:"end"===s?S:w+x/2,O="center"===l?E+C/2:"end"===l?k:E,N=[],T=0;T<p.length;T++){var L=p[T],A=L.getBoundingClientRect(),M=A.height,j=A.width,D=A.top,I=A.right,P=A.bottom,R=A.left;if("if-needed"===r&&w>=0&&E>=0&&S<=g&&k<=m&&w>=D&&S<=P&&E>=R&&k<=I)return N;var B=getComputedStyle(L),z=parseInt(B.borderLeftWidth,10),F=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),W=parseInt(B.borderBottomWidth,10),V=0,G=0,U="offsetWidth"in L?L.offsetWidth-L.clientWidth-z-H:0,K="offsetHeight"in L?L.offsetHeight-L.clientHeight-F-W:0;if(d===L)V="start"===s?_:"end"===s?_-g:"nearest"===s?a(y,y+g,g,F,W,y+_,y+_+x,x):_-g/2,G="start"===l?O:"center"===l?O-m/2:"end"===l?O-m:a(v,v+m,m,z,H,v+O,v+O+C,C),V=Math.max(0,V+y),G=Math.max(0,G+v);else{V="start"===s?_-D-F:"end"===s?_-P+W+K:"nearest"===s?a(D,P,M,F,W+K,_,_+x,x):_-(D+M/2)+K/2,G="start"===l?O-R-z:"center"===l?O-(R+j/2)+U/2:"end"===l?O-I+H+U:a(R,I,j,z,H+U,O,O+C,C);var q=L.scrollLeft,$=L.scrollTop;_+=$-(V=Math.max(0,Math.min($+V,L.scrollHeight-M+K))),O+=q-(G=Math.max(0,Math.min(q+G,L.scrollWidth-j+U)))}N.push({el:L,top:V,left:G})}return N};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var n=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(n?[]:s(t,e));if(!n){var i=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach((function(t){var i=t.el,r=t.top,o=t.left;i.scroll&&n?i.scroll({top:r,left:o,behavior:e}):(i.scrollTop=r,i.scrollLeft=o)}))}(s(t,i),i.behavior)}}},bT9E:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/omit.js ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function r(t,e){var n=Object(i.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete n[t]})),n}},c5Ni:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/codemirror/theme/blackboard.css ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},dejd:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/toolbar/index.less ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},dmUQ:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/rc-input-number/es/index.js + 1 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: 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/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.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/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.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-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var i=n("Ff2n"),r=n("rePB"),o=n("1OyB"),a=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),p=n.n(d),f=n("4IlW");function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(l.a)(this,n)}}function y(){}function b(t){t.preventDefault()}var x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,C=function(t){return null!=t},w=function(t,e){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},k=function(t){Object(s.a)(n,t);var e=v(n);function n(t){var i;Object(o.a)(this,n),(i=e.call(this,t)).onKeyDown=function(t){var e=i.props,n=e.onKeyDown,r=e.onPressEnter;if(t.keyCode===f.a.UP){var o=i.getRatio(t);i.up(t,o,null),i.stop()}else if(t.keyCode===f.a.DOWN){var a=i.getRatio(t);i.down(t,a,null),i.stop()}else t.keyCode===f.a.ENTER&&r&&r(t);if(i.recordCursorPosition(),i.lastKeyCode=t.keyCode,n){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];n.apply(void 0,[t].concat(l))}},i.onKeyUp=function(t){var e=i.props.onKeyUp;if(i.stop(),i.recordCursorPosition(),e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.apply(void 0,[t].concat(r))}},i.onChange=function(t){var e=i.props.onChange;i.state.focused&&(i.inputting=!0),i.rawInput=i.props.parser(i.getValueFromEvent(t)),i.setState({inputValue:i.rawInput}),e(i.toNumber(i.rawInput))},i.onMouseUp=function(){var t=i.props.onMouseUp;i.recordCursorPosition(),t&&t.apply(void 0,arguments)},i.onFocus=function(){var t;i.setState({focused:!0}),(t=i.props).onFocus.apply(t,arguments)},i.onBlur=function(){var t=i.props.onBlur;i.inputting=!1,i.setState({focused:!1});var e=i.getCurrentValidValue(i.state.inputValue),n=i.setValue(e,y);if(t){var r=i.input.value,o=i.getInputDisplayValue({focus:!1,value:n});i.input.value=o?Number(o):o,t.apply(void 0,arguments),i.input.value=r}},i.getRatio=function(t){var e=1;return t.metaKey||t.ctrlKey?e=.1:t.shiftKey&&(e=10),e},i.getFullNum=function(t){return isNaN(t)?t:/e/i.test(String(t))?Number(t).toFixed(18).replace(/\.?0+$/,""):t},i.getPrecision=function(t){if(C(i.props.precision))return i.props.precision;var e=String(t);if(e.indexOf("e-")>=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var n=0;return e.indexOf(".")>=0&&(n=e.length-e.indexOf(".")-1),n},i.getInputDisplayValue=function(t){var e,n=t||i.state,r=n.focused,o=n.inputValue,a=n.value;null==(e=r?o:i.toPrecisionAsStep(a))&&(e="");var s=i.formatWrapper(e);return C(i.props.decimalSeparator)&&(s=s.toString().replace(".",i.props.decimalSeparator)),s},i.recordCursorPosition=function(){try{i.cursorStart=i.input.selectionStart,i.cursorEnd=i.input.selectionEnd,i.currentValue=i.input.value,i.cursorBefore=i.input.value.substring(0,i.cursorStart),i.cursorAfter=i.input.value.substring(i.cursorEnd)}catch(t){}},i.restoreByAfter=function(t){if(void 0===t)return!1;var e=i.input.value,n=e.lastIndexOf(t);if(-1===n)return!1;var r=i.cursorBefore.length;return i.lastKeyCode===f.a.DELETE&&i.cursorBefore.charAt(r-1)===t[0]?(i.fixCaret(r,r),!0):n+t.length===e.length&&(i.fixCaret(n,n),!0)},i.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,n){var r=t.substring(n);return i.restoreByAfter(r)}))},i.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},i.stop=function(){i.autoStepTimer&&clearTimeout(i.autoStepTimer)},i.down=function(t,e,n){i.pressingUpOrDown=!0,i.step("down",t,e,n)},i.up=function(t,e,n){i.pressingUpOrDown=!0,i.step("up",t,e,n)},i.saveInput=function(t){i.input=t};var r=t.value;void 0===r&&(r=t.defaultValue),i.state={focused:t.autoFocus};var a=i.getValidValue(i.toNumber(r));return i.state=g(g({},i.state),{},{inputValue:i.toPrecisionAsStep(a),value:a}),i}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.value,i=e.onChange,r=e.max,o=e.min,a=this.state.focused;if(t){if(!w(t.value,n)||!w(t.max,r)||!w(t.min,o)){var s,l=a?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&t.max!==r&&"number"==typeof c&&c>r&&i&&i(r),"min"in this.props&&t.min!==o&&"number"==typeof c&&c<o&&i&&i(o)}try{if(void 0!==this.cursorStart&&this.state.focused)if(this.partRestoreByAfter(this.cursorAfter)||this.state.value===this.props.value){if(this.currentValue===this.input.value)switch(this.lastKeyCode){case f.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case f.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===f.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===f.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(t){}this.lastKeyCode=null,this.pressingUpOrDown&&this.props.focusOnUpDown&&this.state.focused&&document.activeElement!==this.input&&this.focus()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(t){var e=t;return e=""===e?"":this.isNotCompleteNumber(parseFloat(e))?this.state.value:this.getValidValue(e),this.toNumber(e)}},{key:"getValueFromEvent",value:function(t){var e=t.target.value.trim().replace(/。/g,".");return C(this.props.decimalSeparator)&&(e=e.replace(this.props.decimalSeparator,".")),e}},{key:"getValidValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,i=parseFloat(t);return isNaN(i)?t:(i<e&&(i=e),i>n&&(i=n),i)}},{key:"setValue",value:function(t,e){var n=this.props.precision,i=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),r=this.state.value,o=void 0===r?null:r,a=this.state.inputValue,s=void 0===a?null:a,l="number"==typeof i?i.toFixed(n):"".concat(i),c=i!==o||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},e)):this.setState({value:i,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(i),i}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,i=n.precision,r=n.step;if(C(i))return i;var o=this.getPrecision(e),a=this.getPrecision(r),s=this.getPrecision(t);return t?Math.max(s,o+a):o+a}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(t,e);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,n=this.state.focused,i=t&&t.length>16&&n;return this.isNotCompleteNumber(t)||i?t:C(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var n=this.props.step,i=this.getPrecisionFactor(t,e),r=Math.abs(this.getMaxPrecision(t,e)),o=((i*t+i*n*e)/i).toFixed(r);return this.toNumber(o)}},{key:"downStep",value:function(t,e){var n=this.props.step,i=this.getPrecisionFactor(t,e),r=Math.abs(this.getMaxPrecision(t,e)),o=((i*t-i*n*e)/i).toFixed(r);return this.toNumber(o)}},{key:"step",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var o=this.props;if(!o.disabled){var a=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(a)){var s=this["".concat(t,"Step")](a,i),l=s>o.max||s<o.min;s>o.max?s=o.max:s<o.min&&(s=o.min),this.setValue(s,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){n[t](e,i,!0)}),r?200:600))}}}},{key:"fixCaret",value:function(t,e){if(void 0!==t&&void 0!==e&&this.input&&this.input.value)try{var n=this.input.selectionStart,i=this.input.selectionEnd;t===n&&e===i||this.input.setSelectionRange(t,e)}catch(t){}}},{key:"render",value:function(){var t,e=this.props,n=e.prefixCls,o=e.disabled,a=e.readOnly,s=e.useTouch,l=e.autoComplete,c=e.upHandler,u=e.downHandler,d=e.className,f=e.max,m=e.min,g=e.style,v=e.title,x=e.onMouseEnter,C=e.onMouseLeave,w=e.onMouseOver,k=e.onMouseOut,S=e.required,E=e.onClick,_=e.tabIndex,O=e.type,N=e.placeholder,T=e.id,L=e.inputMode,A=e.pattern,M=e.step,j=e.maxLength,D=e.autoFocus,I=e.name,P=e.onPaste,R=e.onInput,B=Object(i.a)(e,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),z=this.state,F=z.value,H=z.focused,W=p()(n,(t={},Object(r.a)(t,d,!!d),Object(r.a)(t,"".concat(n,"-disabled"),o),Object(r.a)(t,"".concat(n,"-focused"),H),t)),V={};Object.keys(B).forEach((function(t){"data-"!==t.substr(0,5)&&"aria-"!==t.substr(0,5)&&"role"!==t||(V[t]=B[t])}));var G=!a&&!o,U=this.getInputDisplayValue(null),K=(F||0===F)&&(isNaN(F)||Number(F)>=f)||o||a,q=(F||0===F)&&(isNaN(F)||Number(F)<=m)||o||a,$=p()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(r.a)({},"".concat(n,"-handler-up-disabled"),K)),Y=p()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(r.a)({},"".concat(n,"-handler-down-disabled"),q)),X=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:W,style:g,title:v,onMouseEnter:x,onMouseLeave:C,onMouseOver:w,onMouseOut:k,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},X,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:$}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":F,required:S,type:O,placeholder:N,onPaste:P,onClick:E,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:_,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:G?this.onKeyDown:y,onKeyUp:G?this.onKeyUp:y,autoFocus:D,maxLength:j,readOnly:a,disabled:o,max:f,min:m,step:M,name:I,title:v,id:T,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(U),pattern:A,inputMode:L,onInput:R},V))))}}]),n}(h.a.Component);k.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var S=k;e.a=S},"e+RI":
|
|
|
/*!************************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/AddTags/index.less?modules ***!
|
|
|
\************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={btn:"btn___35XHi",s1:"s1___yzdGB",s2:"s2___3kxXm",btnDisabled:"btnDisabled___lI9pA",btn2:"btn2___2KLJQ"}},"eS0+":
|
|
|
/*!************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/List/index.tsx ***!
|
|
|
\************************************************************************************/
|
|
|
/*! exports provided: ListGroup, default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/input-number/style */"giR+");var i=n(/*! antd/es/input-number */"fyUT"),r=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/objectWithoutProperties */"PpiC"),a=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! ./index.less?modules */"2sxD"),u=n.n(c),h=n(/*! @/assets/images/paper/sc.svg */"51dB"),d=n.n(h),p=n(/*! @/assets/images/paper/sm.svg */"5MlY"),f=n.n(p),m=n(/*! @/assets/images/paper/up.svg */"lnNo"),g=n.n(m),v=n(/*! @/assets/images/paper/xiren.svg */"YBdh"),y=n.n(v),b=n(/*! lodash */"LvDl"),x=n(/*! classnames */"TSYQ"),C=n.n(x),w=(a.a.Option,function(t){var e=parseInt(t);return Object(b.isNaN)(e)?0:e}),k=function(t){var e,n,a=t.index,c=t.value,h=void 0===c?[]:c,d=t.onChange,p=t.type,f=t.disabled,m=void 0!==f&&f,v=t.expansion,y=void 0===v||v,x=(Object(o.a)(t,["index","value","onChange","type","disabled","expansion"]),Object(s.useState)(!0)),C=Object(r.a)(x,2),k=C[0],S=C[1],E=function(t,e){var n=Object(b.cloneDeep)(h);n.difficulties[e].num=t,console.log(n,444),d(n)};return l.a.createElement("div",{className:u.a.ListGroup,style:{borderWidth:a?1:0}},l.a.createElement("div",{className:u.a.a},a+1),l.a.createElement("div",{"data-type":"width",className:u.a.b},null==h?void 0:h.name),l.a.createElement("div",{className:u.a.c},null==h||null===(e=h.difficulties)||void 0===e?void 0:e.map((function(t,e){return l.a.createElement("div",{key:e,style:{display:k?"flex":e?"none":"flex"},className:u.a.c1},l.a.createElement("span",{style:{color:"#777777",marginRight:5}},"难度"),1===t.difficulty&&l.a.createElement("span",{className:u.a.radio},"简单"),2===t.difficulty&&l.a.createElement("span",{className:u.a.radio},"适中"),3===t.difficulty&&l.a.createElement("span",{className:u.a.radio},"困难"),l.a.createElement("span",{style:{color:"#777777",marginRight:5,marginLeft:50}},"抽题数量"),0===a&&0===e?l.a.createElement("div",{id:"".concat(p,"_sum")},l.a.createElement(i.a,{disabled:m,parser:w,onChange:function(t){return E(t,e)},min:0,max:null==t?void 0:t.count,value:(null==t?void 0:t.num)||0,style:{width:66}}),l.a.createElement("span",{style:{display:"none"}},"请输入数量")):l.a.createElement(i.a,{disabled:m,parser:w,onChange:function(t){return E(t,e)},min:0,max:null==t?void 0:t.count,value:(null==t?void 0:t.num)||0,style:{width:66}}),l.a.createElement("span",{style:{marginLeft:5}},"/",null==t?void 0:t.count))}))),l.a.createElement("div",{style:{display:1!==(null==h||null===(n=h.difficulties)||void 0===n?void 0:n.length)&&y?"block":"none"},onClick:function(){return S(!k)},className:u.a.d},k?"收起":"展开",l.a.createElement("img",{style:{marginTop:-2,transform:k?"rotate(0deg)":"rotate(180deg)"},src:g.a,className:"ml5"})))};e.a=function(t){var e,n,a=t.value,c=void 0===a?[]:a,h=t.onChange,p=t.listClassName,m=t.disabled,v=void 0!==m&&m,x=t.expansion,S=void 0===x||x,E=(Object(o.a)(t,["value","onChange","listClassName","disabled","expansion"]),Object(s.useState)(!0)),_=Object(r.a)(E,2),O=_[0],N=_[1],T=function(t){var e,n=t.score||0,i=[];return null==t||null===(e=t.item_banks)||void 0===e||e.forEach((function(t){var e;null==t||null===(e=t.tag_disciplines)||void 0===e||e.forEach((function(t){var e;null==t||null===(e=t.difficulties)||void 0===e||e.forEach((function(t){t.num&&i.push(t.num)}))}))})),i.reduce((function(t,e){return t+e}),0)*n},L=function(t,e,n){var i=Object(b.cloneDeep)(c);i.item_banks[e].tag_disciplines[n]=t;var r=T(i);i.scoreTotal=r,console.log(i,"newValue"),h(i)};return l.a.createElement("div",{className:C()(u.a.list,p)},l.a.createElement("div",{className:u.a.head},l.a.createElement("div",{className:u.a.name},l.a.createElement("b",null),l.a.createElement("span",null,null===(e=[{type:"SINGLE",name:"单选题"},{type:"MULTIPLE",name:"多选题"},{type:"COMPLETION",name:"填空题"},{type:"JUDGMENT",name:"判断题"},{type:"SUBJECTIVE",name:"简答题"},{type:"PROGRAM",name:"编程题"},{type:"PRACTICAL",name:"实训题"},{type:"COMBINATION",name:"组合题"}].find((function(t){return t.type===(null==c?void 0:c.item_type)})))||void 0===e?void 0:e.name)),l.a.createElement("div",{className:u.a.right},S&&l.a.createElement("div",{onClick:function(){return N(!O)},className:"current c-light-primary mb10"},O?"收起":"展开",l.a.createElement("img",{style:{marginTop:-2,transform:O?"rotate(0deg)":"rotate(180deg)"},src:g.a,className:"ml5"})),l.a.createElement("div",null,l.a.createElement("img",{src:d.a}),l.a.createElement("span",{className:"ml10 mr20"},"总分",c.scoreTotal,"分"),l.a.createElement("img",{className:"mr10",src:f.a}),l.a.createElement("span",null,"COMBINATION"===(null==c?void 0:c.item_type)?"每小题":"每题"),l.a.createElement("div",{id:"".concat(null==c?void 0:c.item_type,"_score")},l.a.createElement(i.a,{disabled:v,parser:w,min:0,onChange:function(t){var e=Object(b.cloneDeep)(c);e.score=t;var n=T(e);e.scoreTotal=n,h(e)},value:c.score,style:{margin:"0 5px"}}),l.a.createElement("span",{style:{display:"none"}},"请输入每题分数")),l.a.createElement("span",null,"分")))),l.a.createElement("div",{className:u.a.body,style:{display:O?"block":"none"}},null==c||null===(n=c.item_banks)||void 0===n?void 0:n.map((function(t,e){var n;return l.a.createElement(l.a.Fragment,{key:e},l.a.createElement("div",{className:u.a.top},l.a.createElement("img",{src:y.a}),l.a.createElement("span",null,"方向/课程"),l.a.createElement("b",null),l.a.createElement("aside",null,null==t?void 0:t.disciplines,"/",null==t?void 0:t.sub_discipline)),l.a.createElement("div",{className:u.a.bottom},l.a.createElement("div",{className:u.a.l},"知识点"),l.a.createElement("div",{className:u.a.r},null==t||null===(n=t.tag_disciplines)||void 0===n?void 0:n.map((function(t,n){return l.a.createElement(k,{expansion:S,disabled:v,type:null==c?void 0:c.item_type,key:"".concat(e,"-").concat(n),value:t,index:n,onChange:function(t){return L(t,e,n)}})})))))}))))}},exQ7:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/te.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/te.22809158.svg"},fAei:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/index.js + 4 modules ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: TreeNode, default */
|
|
|
/*! exports used: TreeNode, 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/toConsumableArray.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-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-tree/es/TreeNode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/conductUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.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,"a",(function(){return w.a}));var i=n("rePB"),r=n("VTBJ"),o=n("KQm4"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n("4IlW"),d=n("Kwbf"),p=n("TSYQ"),f=n.n(p),m=n("sboe"),g=n("OZM5"),v=n("815F"),y=n("ODXe"),b=n("Ff2n"),x=n("+nKL"),C=n("8XRh"),w=n("WaYH"),k=function(t,e){var n=t.className,i=t.style,r=t.motion,o=t.motionNodes,a=t.motionType,s=t.onMotionStart,l=t.onMotionEnd,c=t.active,h=t.treeNodeRequiredProps,d=Object(b.a)(t,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),p=u.useState(!0),g=Object(y.a)(p,2),x=g[0],k=g[1],S=u.useContext(m.a).prefixCls,E=u.useRef(!1),_=function(){E.current||l(),E.current=!0};return Object(u.useEffect)((function(){o&&"hide"===a&&x&&k(!1)}),[o]),Object(u.useEffect)((function(){return o&&s(),function(){o&&_()}}),[]),o?u.createElement(C.default,Object.assign({ref:e,visible:x},r,{motionAppear:"show"===a,onAppearEnd:_,onLeaveEnd:_}),(function(t,e){var n=t.className,i=t.style;return u.createElement("div",{ref:e,className:f()("".concat(S,"-treenode-motion"),n),style:i},o.map((function(t){var e=t.data,n=e.key,i=Object(b.a)(e,["key"]),r=t.isStart,o=t.isEnd;delete i.children;var a=Object(v.f)(n,h);return u.createElement(w.a,Object.assign({},i,a,{active:c,data:t.data,key:n,isStart:r,isEnd:o}))})))})):u.createElement(w.a,Object.assign({domRef:e,className:n,style:i},d,{active:c}))};k.displayName="MotionTreeNode";var S=u.forwardRef(k);function E(t,e,n){var i=t.findIndex((function(t){return t.data.key===n})),r=t[i+1],o=e.findIndex((function(t){return t.data.key===n}));if(r){var a=e.findIndex((function(t){return t.data.key===r.data.key}));return e.slice(o+1,a)}return e.slice(o+1)}var _={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},O=function(){},N="RC_TREE_MOTION_".concat(Math.random()),T={key:N},L={key:N,level:0,index:0,pos:"0",node:T},A={parent:null,children:[],pos:L.pos,data:T,isStart:[],isEnd:[]};function M(t,e,n,i){return!1!==e&&n?t.slice(0,Math.ceil(n/i)+1):t}function j(t){var e=t.data.key,n=t.pos;return Object(v.e)(e,n)}var D=u.forwardRef((function(t,e){var n=t.prefixCls,i=t.data,r=(t.selectable,t.checkable,t.expandedKeys),o=t.selectedKeys,a=t.checkedKeys,s=t.loadedKeys,l=t.loadingKeys,c=t.halfCheckedKeys,h=t.keyEntities,d=t.disabled,p=t.dragging,f=t.dragOverNodeKey,m=t.dropPosition,g=t.motion,C=t.height,w=t.itemHeight,k=t.virtual,T=t.focusable,L=t.activeItem,D=t.focused,I=t.tabIndex,P=t.onKeyDown,R=t.onFocus,B=t.onBlur,z=t.onActiveChange,F=t.onListChangeStart,H=t.onListChangeEnd,W=Object(b.a)(t,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),V=u.useRef(null);u.useImperativeHandle(e,(function(){return{scrollTo:function(t){V.current.scrollTo(t)}}}));var G=u.useState(r),U=Object(y.a)(G,2),K=U[0],q=U[1],$=u.useState(i),Y=Object(y.a)($,2),X=Y[0],Z=Y[1],J=u.useState(i),Q=Object(y.a)(J,2),tt=Q[0],et=Q[1],nt=u.useState([]),it=Object(y.a)(nt,2),rt=it[0],ot=it[1],at=u.useState(null),st=Object(y.a)(at,2),lt=st[0],ct=st[1];function ut(){Z(i),et(i),ot([]),ct(null),H()}u.useEffect((function(){q(r);var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length,i=e.length;if(1!==Math.abs(n-i))return{add:!1,key:null};function r(t,e){var n=new Map;t.forEach((function(t){n.set(t,!0)}));var i=e.filter((function(t){return!n.has(t)}));return 1===i.length?i[0]:null}return n<i?{add:!0,key:r(t,e)}:{add:!1,key:r(e,t)}}(K,r);if(null!==t.key)if(t.add){var e=X.findIndex((function(e){return e.data.key===t.key})),n=M(E(X,i,t.key),k,C,w),o=X.slice();o.splice(e+1,0,A),et(o),ot(n),ct("show")}else{var a=i.findIndex((function(e){return e.data.key===t.key})),s=M(E(i,X,t.key),k,C,w),l=i.slice();l.splice(a+1,0,A),et(l),ot(s),ct("hide")}else X!==i&&(Z(i),et(i))}),[r,i]),u.useEffect((function(){p||ut()}),[p]);var ht=g?tt:i,dt={expandedKeys:r,selectedKeys:o,loadedKeys:s,loadingKeys:l,checkedKeys:a,halfCheckedKeys:c,dragOverNodeKey:f,dropPosition:m,keyEntities:h};return u.createElement(u.Fragment,null,D&&L&&u.createElement("span",{style:_,"aria-live":"assertive"},function(t){for(var e=String(t.data.key),n=t;n.parent;)n=n.parent,e="".concat(n.data.key," > ").concat(e);return e}(L)),u.createElement("div",{role:"tree"},u.createElement("input",{style:_,disabled:!1===T||d,tabIndex:!1!==T?I:null,onKeyDown:P,onFocus:R,onBlur:B,value:"",onChange:O})),u.createElement(x.a,Object.assign({},W,{data:ht,itemKey:j,height:C,fullHeight:!1,virtual:k,itemHeight:w,prefixCls:"".concat(n,"-list"),ref:V}),(function(t){var e=t.pos,n=t.data,i=n.key,r=Object(b.a)(n,["key"]),o=t.isStart,a=t.isEnd,s=Object(v.e)(i,e);delete r.children;var l=Object(v.f)(s,dt);return u.createElement(S,Object.assign({},r,l,{active:L&&i===L.data.key,pos:e,data:t.data,isStart:o,isEnd:a,motion:g,motionNodes:i===N?rt:null,motionType:lt,onMotionStart:F,onMotionEnd:ut,treeNodeRequiredProps:dt,onMouseMove:function(){z(null)}}))})))}));D.displayName="NodeList";var I=D,P=n("NvD2"),R=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.apply(this,arguments)).destroyed=!1,t.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},t.listRef=u.createRef(),t.onNodeDragStart=function(e,n){var i=t.state,r=i.expandedKeys,o=i.keyEntities,a=t.props.onDragStart,s=n.props.eventKey;t.dragNode=n;var l=Object(g.b)(r,s);t.setState({dragging:!0,dragNodesKeys:Object(g.g)(s,o)}),t.setExpandedKeys(l),a&&a({event:e,node:Object(v.b)(n.props)})},t.onNodeDragEnter=function(e,n){var i=t.state,r=i.expandedKeys,a=i.keyEntities,s=i.dragNodesKeys,l=t.props.onDragEnter,c=n.props,u=c.pos,h=c.eventKey;if(t.dragNode&&-1===s.indexOf(h)){var d=Object(g.c)(e,n);t.dragNode.props.eventKey!==h||0!==d?setTimeout((function(){t.setState({dragOverNodeKey:h,dropPosition:d}),t.delayedDragEnterLogic||(t.delayedDragEnterLogic={}),Object.keys(t.delayedDragEnterLogic).forEach((function(e){clearTimeout(t.delayedDragEnterLogic[e])})),t.delayedDragEnterLogic[u]=window.setTimeout((function(){if(t.state.dragging){var i=Object(o.a)(r),s=a[h];s&&(s.children||[]).length&&(i=Object(g.a)(r,h)),"expandedKeys"in t.props||t.setExpandedKeys(i),l&&l({event:e,node:Object(v.b)(n.props),expandedKeys:i})}}),400)}),0):t.setState({dragOverNodeKey:"",dropPosition:null})}},t.onNodeDragOver=function(e,n){var i=t.state.dragNodesKeys,r=t.props.onDragOver,o=n.props.eventKey;if(-1===i.indexOf(o)){if(t.dragNode&&o===t.state.dragOverNodeKey){var a=Object(g.c)(e,n);if(a===t.state.dropPosition)return;t.setState({dropPosition:a})}r&&r({event:e,node:Object(v.b)(n.props)})}},t.onNodeDragLeave=function(e,n){var i=t.props.onDragLeave;t.setState({dragOverNodeKey:""}),i&&i({event:e,node:Object(v.b)(n.props)})},t.onNodeDragEnd=function(e,n){var i=t.props.onDragEnd;t.setState({dragOverNodeKey:""}),t.cleanDragState(),i&&i({event:e,node:Object(v.b)(n.props)}),t.dragNode=null},t.onNodeDrop=function(e,n){var i=t.state,r=i.dragNodesKeys,o=void 0===r?[]:r,a=i.dropPosition,s=t.props.onDrop,l=n.props,c=l.eventKey,u=l.pos;if(t.setState({dragOverNodeKey:""}),t.cleanDragState(),-1===o.indexOf(c)){var h=Object(g.k)(u),p={event:e,node:Object(v.b)(n.props),dragNode:t.dragNode?Object(v.b)(t.dragNode.props):null,dragNodesKeys:o.slice(),dropPosition:a+Number(h[h.length-1]),dropToGap:!1};0!==a&&(p.dropToGap=!0),s&&s(p),t.dragNode=null}else Object(d.a)(!1,"Can not drop to dragNode(include it's children node)")},t.cleanDragState=function(){t.state.dragging&&t.setState({dragging:!1})},t.onNodeClick=function(e,n){var i=t.props.onClick;i&&i(e,n)},t.onNodeDoubleClick=function(e,n){var i=t.props.onDoubleClick;i&&i(e,n)},t.onNodeSelect=function(e,n){var i=t.state.selectedKeys,r=t.state.keyEntities,o=t.props,a=o.onSelect,s=o.multiple,l=n.selected,c=n.key,u=!l,h=(i=u?s?Object(g.a)(i,c):[c]:Object(g.b)(i,c)).map((function(t){var e=r[t];return e?e.node:null})).filter((function(t){return t}));t.setUncontrolledState({selectedKeys:i}),a&&a(i,{event:"select",selected:u,node:n,selectedNodes:h,nativeEvent:e.nativeEvent})},t.onNodeCheck=function(e,n,i){var r,a=t.state,s=a.keyEntities,l=a.checkedKeys,c=a.halfCheckedKeys,u=t.props,h=u.checkStrictly,d=u.onCheck,p=n.key,f={event:"check",node:n,checked:i,nativeEvent:e.nativeEvent};if(h){var m=i?Object(g.a)(l,p):Object(g.b)(l,p);r={checked:m,halfChecked:Object(g.b)(c,p)},f.checkedNodes=m.map((function(t){return s[t]})).filter((function(t){return t})).map((function(t){return t.node})),t.setUncontrolledState({checkedKeys:m})}else{var v=Object(P.a)([].concat(Object(o.a)(l),[p]),!0,s),y=v.checkedKeys,b=v.halfCheckedKeys;if(!i){var x=new Set(y);x.delete(p);var C=Object(P.a)(Array.from(x),{checked:!1,halfCheckedKeys:b},s);y=C.checkedKeys,b=C.halfCheckedKeys}r=y,f.checkedNodes=[],f.checkedNodesPositions=[],f.halfCheckedKeys=b,y.forEach((function(t){var e=s[t];if(e){var n=e.node,i=e.pos;f.checkedNodes.push(n),f.checkedNodesPositions.push({node:n,pos:i})}})),t.setUncontrolledState({checkedKeys:y},!1,{halfCheckedKeys:b})}d&&d(r,f)},t.onNodeLoad=function(e){return new Promise((function(n){t.setState((function(i){var r=i.loadedKeys,o=void 0===r?[]:r,a=i.loadingKeys,s=void 0===a?[]:a,l=t.props,c=l.loadData,u=l.onLoad,h=e.key;return c&&-1===o.indexOf(h)&&-1===s.indexOf(h)?(c(e).then((function(){var i=t.state,r=i.loadedKeys,o=i.loadingKeys,a=Object(g.a)(r,h),s=Object(g.b)(o,h);u&&u(a,{event:"load",node:e}),t.setUncontrolledState({loadedKeys:a}),t.setState({loadingKeys:s}),n()})),{loadingKeys:Object(g.a)(s,h)}):{}}))}))},t.onNodeMouseEnter=function(e,n){var i=t.props.onMouseEnter;i&&i({event:e,node:n})},t.onNodeMouseLeave=function(e,n){var i=t.props.onMouseLeave;i&&i({event:e,node:n})},t.onNodeContextMenu=function(e,n){var i=t.props.onRightClick;i&&(e.preventDefault(),i({event:e,node:n}))},t.onFocus=function(){var e=t.props.onFocus;t.setState({focused:!0}),e&&e.apply(void 0,arguments)},t.onBlur=function(){var e=t.props.onBlur;t.setState({focused:!1}),t.onActiveChange(null),e&&e.apply(void 0,arguments)},t.getTreeNodeRequiredProps=function(){var e=t.state;return{expandedKeys:e.expandedKeys||[],selectedKeys:e.selectedKeys||[],loadedKeys:e.loadedKeys||[],loadingKeys:e.loadingKeys||[],checkedKeys:e.checkedKeys||[],halfCheckedKeys:e.halfCheckedKeys||[],dragOverNodeKey:e.dragOverNodeKey,dropPosition:e.dropPosition,keyEntities:e.keyEntities}},t.setExpandedKeys=function(e){var n=t.state.treeData,i=Object(v.d)(n,e);t.setUncontrolledState({expandedKeys:e,flattenNodes:i},!0)},t.onNodeExpand=function(e,n){var i=t.state.expandedKeys,r=t.state.listChanging,o=t.props,a=o.onExpand,s=o.loadData,l=n.key,c=n.expanded;if(!r){var u=i.indexOf(l),h=!c;if(Object(d.a)(c&&-1!==u||!c&&-1===u,"Expand state not sync with index check"),i=h?Object(g.a)(i,l):Object(g.b)(i,l),t.setExpandedKeys(i),a&&a(i,{node:n,expanded:h,nativeEvent:e.nativeEvent}),h&&s){var p=t.onNodeLoad(n);p&&p.then((function(){var e=Object(v.d)(t.state.treeData,i);t.setUncontrolledState({flattenNodes:e})}))}}},t.onListChangeStart=function(){t.setUncontrolledState({listChanging:!0})},t.onListChangeEnd=function(){setTimeout((function(){t.setUncontrolledState({listChanging:!1})}))},t.onActiveChange=function(e){var n=t.state.activeKey,i=t.props.onActiveChange;n!==e&&(t.setState({activeKey:e}),null!==e&&t.scrollTo({key:e}),i&&i(e))},t.getActiveItem=function(){var e=t.state,n=e.activeKey,i=e.flattenNodes;return null===n?null:i.find((function(t){return t.data.key===n}))||null},t.offsetActiveKey=function(e){var n=t.state,i=n.flattenNodes,r=n.activeKey,o=i.findIndex((function(t){return t.data.key===r}));-1===o&&e<0&&(o=i.length);var a=i[o=(o+e+i.length)%i.length];if(a){var s=a.data.key;t.onActiveChange(s)}else t.onActiveChange(null)},t.onKeyDown=function(e){var n=t.state,i=n.activeKey,o=n.expandedKeys,a=n.checkedKeys,s=t.props,l=s.onKeyDown,c=s.checkable,u=s.selectable;switch(e.which){case h.a.UP:t.offsetActiveKey(-1),e.preventDefault();break;case h.a.DOWN:t.offsetActiveKey(1),e.preventDefault()}var d=t.getActiveItem();if(d&&d.data){var p=t.getTreeNodeRequiredProps(),f=!1===d.data.isLeaf||!!(d.data.children||[]).length,m=Object(v.b)(Object(r.a)(Object(r.a)({},Object(v.f)(i,p)),{},{data:d.data,active:!0}));switch(e.which){case h.a.LEFT:f&&o.includes(i)?t.onNodeExpand({},m):d.parent&&t.onActiveChange(d.parent.data.key),e.preventDefault();break;case h.a.RIGHT:f&&!o.includes(i)?t.onNodeExpand({},m):d.children&&d.children.length&&t.onActiveChange(d.children[0].data.key),e.preventDefault();break;case h.a.ENTER:case h.a.SPACE:!c||m.disabled||!1===m.checkable||m.disableCheckbox?c||!u||m.disabled||!1===m.selectable||t.onNodeSelect({},m):t.onNodeCheck({},m,!a.includes(i))}}l&&l(e)},t.setUncontrolledState=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t.destroyed){var o=!1,a=!0,s={};Object.keys(e).forEach((function(n){n in t.props?a=!1:(o=!0,s[n]=e[n])})),!o||n&&!a||t.setState(Object(r.a)(Object(r.a)({},s),i))}},t.scrollTo=function(e){t.listRef.current.scrollTo(e)},t}return Object(s.a)(n,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var t,e=this.state,n=e.focused,r=e.flattenNodes,o=e.keyEntities,a=e.dragging,s=e.activeKey,l=this.props,c=l.prefixCls,h=l.className,d=l.style,p=l.showLine,v=l.focusable,y=l.tabIndex,b=void 0===y?0:y,x=l.selectable,C=l.showIcon,w=l.icon,k=l.switcherIcon,S=l.draggable,E=l.checkable,_=l.checkStrictly,O=l.disabled,N=l.motion,T=l.loadData,L=l.filterTreeNode,A=l.height,M=l.itemHeight,j=l.virtual,D=l.titleRender,P=l.onContextMenu,R=Object(g.f)(this.props);return u.createElement(m.a.Provider,{value:{prefixCls:c,selectable:x,showIcon:C,icon:w,switcherIcon:k,draggable:S,checkable:E,checkStrictly:_,disabled:O,keyEntities:o,loadData:T,filterTreeNode:L,titleRender:D,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},u.createElement("div",{className:f()(c,h,(t={},Object(i.a)(t,"".concat(c,"-show-line"),p),Object(i.a)(t,"".concat(c,"-focused"),n),Object(i.a)(t,"".concat(c,"-active-focused"),null!==s),t))},u.createElement(I,Object.assign({ref:this.listRef,prefixCls:c,style:d,data:r,disabled:O,selectable:x,checkable:!!E,motion:N,dragging:a,height:A,itemHeight:M,virtual:j,focusable:v,focused:n,tabIndex:b,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:P},this.getTreeNodeRequiredProps(),R))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n,o=e.prevProps,a={prevProps:t};function s(e){return!o&&e in t||o&&o[e]!==t[e]}if(s("treeData")?n=t.treeData:s("children")&&(Object(d.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=Object(v.c)(t.children)),n){a.treeData=n;var l=Object(v.a)(n);a.keyEntities=Object(r.a)(Object(i.a)({},N,L),l.keyEntities)}var c,u=a.keyEntities||e.keyEntities;if(s("expandedKeys")||o&&s("autoExpandParent"))a.expandedKeys=t.autoExpandParent||!o&&t.defaultExpandParent?Object(g.e)(t.expandedKeys,u):t.expandedKeys;else if(!o&&t.defaultExpandAll){var h=Object(r.a)({},u);delete h[N],a.expandedKeys=Object.keys(h).map((function(t){return h[t].key}))}else!o&&t.defaultExpandedKeys&&(a.expandedKeys=t.autoExpandParent||t.defaultExpandParent?Object(g.e)(t.defaultExpandedKeys,u):t.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,n||a.expandedKeys){var p=Object(v.d)(n||e.treeData,a.expandedKeys||e.expandedKeys);a.flattenNodes=p}if((t.selectable&&(s("selectedKeys")?a.selectedKeys=Object(g.d)(t.selectedKeys,t):!o&&t.defaultSelectedKeys&&(a.selectedKeys=Object(g.d)(t.defaultSelectedKeys,t))),t.checkable)&&(s("checkedKeys")?c=Object(g.j)(t.checkedKeys)||{}:!o&&t.defaultCheckedKeys?c=Object(g.j)(t.defaultCheckedKeys)||{}:n&&(c=Object(g.j)(t.checkedKeys)||{checkedKeys:e.checkedKeys,halfCheckedKeys:e.halfCheckedKeys}),c)){var f=c,m=f.checkedKeys,y=void 0===m?[]:m,b=f.halfCheckedKeys,x=void 0===b?[]:b;if(!t.checkStrictly){var C=Object(P.a)(y,!0,u);y=C.checkedKeys,x=C.halfCheckedKeys}a.checkedKeys=y,a.halfCheckedKeys=x}return s("loadedKeys")&&(a.loadedKeys=t.loadedKeys),a}}]),n}(u.Component);R.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},R.TreeNode=w.a;var B=R;e.b=B},fjLI:
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js ***!
|
|
|
\******************************************************************************/
|
|
|
/*! exports provided: isIMenuItem, IMenuService, MenuRegistry, ExecuteCommandAction, SubmenuItemAction, MenuItemAction */
|
|
|
/*! exports used: IMenuService, MenuItemAction, MenuRegistry, SubmenuItemAction, isIMenuItem */function(t,e,n){"use strict";n.d(e,"e",(function(){return p})),n.d(e,"a",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return v})),n.d(e,"b",(function(){return y}));var i,r=n(/*! ../../../base/common/actions.js */"8HAY"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=n(/*! ../../contextkey/common/contextkey.js */"T8No"),s=n(/*! ../../commands/common/commands.js */"nnTU"),l=n(/*! ../../../base/common/event.js */"MI8n"),c=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},h=function(t,e){return function(n,i){e(n,i,t)}},d=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i};function p(t){return void 0!==t.command}var f=Object(o.c)("menuService"),m=new(function(){function t(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return t.prototype.addCommand=function(t){var e=this;return this._commands.set(t.id,t),this._onDidChangeMenu.fire(0),{dispose:function(){e._commands.delete(t.id)&&e._onDidChangeMenu.fire(0)}}},t.prototype.getCommand=function(t){return this._commands.get(t)},t.prototype.getCommands=function(){var t=new Map;return this._commands.forEach((function(e,n){return t.set(n,e)})),t},t.prototype.appendMenuItem=function(t,e){var n=this,i=this._menuItems.get(t);return i?i.push(e):(i=[e],this._menuItems.set(t,i)),this._onDidChangeMenu.fire(t),{dispose:function(){var r=i.indexOf(e);r>=0&&(i.splice(r,1),n._onDidChangeMenu.fire(t))}}},t.prototype.getMenuItems=function(t){var e=(this._menuItems.get(t)||[]).slice(0);return 0===t&&this._appendImplicitItems(e),e},t.prototype._appendImplicitItems=function(t){for(var e=new Set,n=0,i=t.filter((function(t){return p(t)}));n<i.length;n++){var r=i[n],o=r.command,a=r.alt;e.add(o.id),a&&e.add(a.id)}this._commands.forEach((function(n,i){e.has(i)||t.push({command:n})}))},t}()),g=function(t){function e(e,n,i){var r=t.call(this,e,n)||this;return r._commandService=i,r}return c(e,t),e.prototype.run=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._commandService).executeCommand.apply(t,d([this.id],e))},e=u([h(2,s.b)],e)}(r.a),v=function(t){function e(e){var n=this;return(n="string"==typeof e.title?t.call(this,"",e.title,"submenu")||this:t.call(this,"",e.title.value,"submenu")||this).item=e,n}return c(e,t),e}(r.a),y=function(t){function e(n,i,r,o,a){var s=this;return(s="string"==typeof n.title?t.call(this,n.id,n.title,a)||this:t.call(this,n.id,n.title.value,a)||this)._cssClass=void 0,s._enabled=!n.precondition||o.contextMatchesRules(n.precondition),s._checked=Boolean(n.toggled&&o.contextMatchesRules(n.toggled)),s._options=r||{},s.item=n,s.alt=i?new e(i,void 0,s._options,o,a):void 0,s}return c(e,t),e.prototype.dispose=function(){this.alt&&this.alt.dispose(),t.prototype.dispose.call(this)},e.prototype.run=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return this._options.arg&&(i=d(i,[this._options.arg])),this._options.shouldForwardArgs&&(i=d(i,e)),t.prototype.run.apply(this,i)},e=u([h(3,a.c),h(4,s.b)],e)}(g)},k4n4:
|
|
|
/*!***************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/AddTags/index.tsx ***!
|
|
|
\***************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";var i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),r=n(/*! react */"q1tI"),o=n.n(r),a=n(/*! ./index.less?modules */"e+RI"),s=n.n(a),l=n(/*! @/assets/images/icons/tagDelete.png */"FTkQ"),c=n.n(l),u=n(/*! @/assets/images/paper/swenjianjia.svg */"E/GV"),h=n.n(u);e.a=function(t){var e=t.type,n=void 0===e?1:e,a=t.value,l=void 0===a?[]:a,u=t.onChange,d=t.disabled,p=void 0!==d&&d,f=t.icon,m=Object(r.useState)(),g=Object(i.a)(m,2),v=(g[0],g[1],function(t){u(t)});return 1===n?o.a.createElement("div",null,null==l?void 0:l.map((function(t,e){return o.a.createElement("div",{key:e,className:p?"".concat(s.a.btn," ").concat(s.a.btnDisabled):s.a.btn},o.a.createElement("span",{className:s.a.s1},t.name),o.a.createElement("img",{src:c.a,className:s.a.s2,onClick:function(){return v(t.id)}}))}))):o.a.createElement("div",null,null==l?void 0:l.map((function(t,e){return o.a.createElement("div",{key:e,className:s.a.btn2},o.a.createElement("span",{className:s.a.s1},o.a.createElement("img",{src:f||h.a}),t.name),o.a.createElement("img",{src:c.a,className:s.a.s2,onClick:function(){return v(t.id)}}))})))}},kSUc:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.less ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},kqOp:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/components/Editor/NullMDEditor.js ***!
|
|
|
\***********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),o=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"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=n(/*! react */"q1tI"),c=n.n(l),u=n(/*! ../markdown-editor */"Ot1p"),h=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){var t;Object(r.a)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))).getChCountBeforeCursor=function(t,e){for(var n=e.line,i=0,r=0;r<n;r++)i+=t.getLine(r).split("▁").length-1;return i+=t.getLine(n).substring(0,e.ch).split("▁").length-1},t.onCMBeforeChange=function(e,n){var i=e.getRange(n.from,n.to),r=0;if(n.text.forEach((function(t){r+=t.split("▁").length-1})),i&&-1!=i.indexOf("▁")){var o=i.split("▁").length-1,a=t.getChCountBeforeCursor(e,n.from);console.log("删除".concat(o,"个, 之前有").concat(a,"个,新增").concat(r,"个")),t.props.deleteEmptyDisabled?n.cancel():t.props.onPlaceholderChange&&t.props.onPlaceholderChange(a,o,r)}else if(r){var s=t.getChCountBeforeCursor(e,n.from);console.log("新增".concat(r,"个,之前有").concat(s,"个")),t.props.onPlaceholderChange&&t.props.onPlaceholderChange(s,0,r)}},t}return Object(o.a)(n,[{key:"render",value:function(){return c.a.createElement(u.a,Object(i.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),n}(l.Component)},lZu9:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.defineMode("markdown",(function(e,n){var i=t.getMode(e,"text/html"),r="null"==i.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(t,e,n){return e.f=e.inline=n,n(t,e)}function v(t,e,n){return e.f=e.block=n,n(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var n=r;if(!n){var o=t.innerMode(i,e.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(e.f=S,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(i,r){var a,d=i.column()===r.indentation,m=!(a=r.prevLine.stream)||!/\S/.test(a.string),v=r.indentedCode,y=r.prevLine.hr,b=!1!==r.list,x=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var k=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,b)){for(r.list=null;k<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=k-r.listStack[r.listStack.length-1])}var S=!(m||y||r.prevLine.header||b&&v||r.prevLine.fencedCodeEnd),E=(!1===r.list||y||m)&&r.indentation<=x&&i.match(s),_=null;if(r.indentationDiff>=4&&(v||r.prevLine.fencedCodeEnd||r.prevLine.header||m))return i.skipToEnd(),r.indentedCode=!0,o.code;if(i.eatSpace())return null;if(d&&r.indentation<=x&&(_=i.match(u))&&_[1].length<=6)return r.quote=0,r.header=_[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,w(r);if(r.indentation<=x&&i.eat(">"))return r.quote=d?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),i.eatSpace(),w(r);if(!E&&!r.setext&&d&&r.indentation<=x&&(_=i.match(l))){var O=_[1]?"ol":"ul";return r.indentation=k+i.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&i.match(c,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+O]),w(r)}return d&&r.indentation<=x&&(_=i.match(p,!0))?(r.quote=0,r.fencedEndRE=new RegExp(_[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&function(n){if(t.findModeByName){var i=t.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=t.getMode(e,n);return"null"==r.name?null:r}(_[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=t.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,w(r)):r.setext||!(S&&b||r.quote||!1!==r.list||r.code||E||f.test(i.string))&&(_=i.lookAhead(1))&&(_=_.match(h))?(r.setext?(r.header=r.setext,r.setext=0,i.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==_[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,w(r)):E?(i.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr):"["===i.peek()?g(i,r,N):g(i,r,r.inline)}function x(e,n){var o=i.token(e,n.htmlState);if(!r){var a=t.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&e.current().indexOf(">")>-1)&&(n.f=S,n.block=b,n.htmlState=null)}return o}function C(t,e){var i,r=e.listStack[e.listStack.length-1]||0,a=e.indentation<r,s=r+3;return e.fencedEndRE&&e.indentation<=s&&(a||t.match(e.fencedEndRE))?(n.highlightFormatting&&(e.formatting="code-block"),a||(i=w(e)),e.localMode=e.localState=null,e.block=b,e.f=S,e.fencedEndRE=null,e.code=0,e.thisLine.fencedCodeEnd=!0,a?v(t,e,e.block):i):e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),o.code)}function w(t){var e=[];if(t.formatting){e.push(o.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var i=0;i<t.formatting.length;i++)e.push(o.formatting+"-"+t.formatting[i]),"header"===t.formatting[i]&&e.push(o.formatting+"-"+t.formatting[i]+"-"+t.header),"quote"===t.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(o.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(o.linkHref,"url"):(t.strong&&e.push(o.strong),t.em&&e.push(o.em),t.strikethrough&&e.push(o.strikethrough),t.emoji&&e.push(o.emoji),t.linkText&&e.push(o.linkText),t.code&&e.push(o.code),t.image&&e.push(o.image),t.imageAltText&&e.push(o.imageAltText,"link"),t.imageMarker&&e.push(o.imageMarker)),t.header&&e.push(o.header,o.header+"-"+t.header),t.quote&&(e.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(o.quote+"-"+t.quote):e.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var r=(t.listStack.length-1)%3;r?1===r?e.push(o.list2):e.push(o.list3):e.push(o.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function k(t,e){if(t.match(d,!0))return w(e)}function S(e,r){var a=r.text(e,r);if(void 0!==a)return a;if(r.list)return r.list=null,w(r);if(r.taskList)return" "===e.match(c,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,w(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),w(r);var s=e.next();if(r.linkTitle){r.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var h=r.formatting;n.highlightFormatting&&(r.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=r.code||r.quote&&1!=d){if(d==r.code){var p=w(r);return r.code=0,p}return r.formatting=h,w(r)}return r.code=d,w(r)}if(r.code)return w(r);if("\\"===s&&(e.next(),n.highlightFormatting)){var f=w(r),g=o.formatting+"-escape";return f?f+" "+g:g}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),w(r);if("["===s&&r.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),w(r);if("]"===s&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var f=w(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=_,f}if("["===s&&!r.image)return r.linkText&&e.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),w(r);if("]"===s&&r.linkText){n.highlightFormatting&&(r.formatting="link");var f=w(r);return r.linkText=!1,r.inline=r.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?_:S,f}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=E,n.highlightFormatting&&(r.formatting="link"),(f=w(r))?f+=" ":f="",f+o.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=E,n.highlightFormatting&&(r.formatting="link"),(f=w(r))?f+=" ":f="",f+o.linkEmail;if(n.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(r.md_inside=!0)}return e.backUp(1),r.htmlState=t.startState(i),v(e,r,x)}if(n.xml&&"<"===s&&e.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===s||"_"===s){for(var C=1,k=1==e.pos?" ":e.string.charAt(e.pos-2);C<3&&e.eat(s);)C++;var O=e.peek()||" ",N=!/\s/.test(O)&&(!m.test(O)||/\s/.test(k)||m.test(k)),T=!/\s/.test(k)&&(!m.test(k)||/\s/.test(O)||m.test(O)),L=null,A=null;if(C%2&&(r.em||!N||"*"!==s&&T&&!m.test(k)?r.em!=s||!T||"*"!==s&&N&&!m.test(O)||(L=!1):L=!0),C>1&&(r.strong||!N||"*"!==s&&T&&!m.test(k)?r.strong!=s||!T||"*"!==s&&N&&!m.test(O)||(A=!1):A=!0),null!=A||null!=L)return n.highlightFormatting&&(r.formatting=null==L?"strong":null==A?"em":"strong em"),!0===L&&(r.em=s),!0===A&&(r.strong=s),p=w(r),!1===L&&(r.em=!1),!1===A&&(r.strong=!1),p}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return w(r);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),p=w(r),r.strikethrough=!1,p;if(e.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),w(r)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return w(r);e.backUp(2)}if(n.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var M=w(r);return r.emoji=!1,M}return" "===s&&(e.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),w(r)}function E(t,e){if(">"===t.next()){e.f=e.inline=S,n.highlightFormatting&&(e.formatting="link");var i=w(e);return i?i+=" ":i="",i+o.linkInline}return t.match(/^[^>]+/,!0),o.linkInline}function _(t,e){if(t.eatSpace())return null;var i,r=t.next();return"("===r||"["===r?(e.f=e.inline=(i="("===r?")":"]",function(t,e){if(t.next()===i){e.f=e.inline=S,n.highlightFormatting&&(e.formatting="link-string");var r=w(e);return e.linkHref=!1,r}return t.match(O[i]),e.linkHref=!0,w(e)}),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,w(e)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=T,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,w(e)):g(t,e,S)}function T(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=L,n.highlightFormatting&&(e.formatting="link");var i=w(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function L(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=S,o.linkHref+" url")}var A={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:S,text:k,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(i,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var n=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=n,e.indentationDiff=null,n>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:i}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:A}},indent:function(e,n,r){return e.block==x&&i.indent?i.indent(e.htmlState,n,r):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},blankLine:y,getType:w,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return A}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},lnNo:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/up.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/up.a9d336fc.svg"},m3fD:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/index.less?modules ***!
|
|
|
\*********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex_box_center:"flex_box_center___1w3aZ",flex_space_between:"flex_space_between___26eB1",flex_box_vertical_center:"flex_box_vertical_center___LffUi",flex_box_center_end:"flex_box_center_end___2AiD3",flex_box_column:"flex_box_column___hZDm1",wrap:"wrap___3Du1e",btns:"btns___35pkF",crumbs:"crumbs___3CPsi",oneWrap:"oneWrap___3F99r",title:"title___2n1na",formWrap:"formWrap___3CHwR",rb:"rb___19sZ1"}},nnTU:
|
|
|
/*!********************************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js ***!
|
|
|
\********************************************************************************/
|
|
|
/*! exports provided: ICommandService, CommandsRegistry */
|
|
|
/*! exports used: CommandsRegistry, ICommandService */function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return h}));var i=n(/*! ../../../base/common/lifecycle.js */"pmY6"),r=n(/*! ../../../base/common/types.js */"746U"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=n(/*! ../../../base/common/event.js */"MI8n"),s=n(/*! ../../../base/common/linkedList.js */"24hK"),l=n(/*! ../../../base/common/map.js */"QDVR"),c=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i},u=Object(o.c)("commandService"),h=new(function(){function t(){this._commands=new Map,this._onDidRegisterCommand=new a.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return t.prototype.registerCommand=function(t,e){var n=this;if(!t)throw new Error("invalid command");if("string"==typeof t){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e})}if(t.description){for(var o=[],a=0,l=t.description.args;a<l.length;a++){var u=l[a];o.push(u.constraint)}var h=t.handler;t.handler=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Object(r.m)(e,o),h.apply(void 0,c([t],e))}}var d=t.id,p=this._commands.get(d);p||(p=new s.a,this._commands.set(d,p));var f=p.unshift(t),m=Object(i.h)((function(){f();var t=n._commands.get(d);(null==t?void 0:t.isEmpty())&&n._commands.delete(d)}));return this._onDidRegisterCommand.fire(d),m},t.prototype.registerCommandAlias=function(t,e){return h.registerCommand(t,(function(t){for(var n,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];return(n=t.get(u)).executeCommand.apply(n,c([e],i))}))},t.prototype.getCommand=function(t){var e=this._commands.get(t);if(e&&!e.isEmpty())return e.iterator().next().value},t.prototype.getCommands=function(){for(var t=new Map,e=0,n=Object(l.d)(this._commands);e<n.length;e++){var i=n[e],r=this.getCommand(i);r&&t.set(i,r)}return t},t}())},osHv:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/fold/xml-fold.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=t.Pos;function n(t,e){return t.line-e.line||t.ch-e.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(t,e,n,i){this.line=e,this.ch=n,this.cm=t,this.text=t.getLine(e),this.min=i?Math.max(i.from,t.firstLine()):t.firstLine(),this.max=i?Math.min(i.to-1,t.lastLine()):t.lastLine()}function a(t,n){var i=t.cm.getTokenTypeAt(e(t.line,n));return i&&/\btag\b/.test(i)}function s(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(s(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),i=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){r.lastIndex=e,t.ch=e;var n=r.exec(t.text);if(n&&n.index==e)return n}else t.ch=e}}function h(t){for(;;){r.lastIndex=t.ch;var e=r.exec(t.text);if(!e){if(s(t))continue;return}if(a(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),i=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e}}function p(t,n){for(var i=[];;){var r,o=h(t),a=t.line,s=t.ch-(o?o[0].length:0);if(!o||!(r=c(t)))return;if("selfClose"!=r)if(o[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:e(a,s),to:e(t.line,t.ch)}}else i.push(o[2])}}function f(t,n){for(var i=[];;){var r=d(t);if(!r)return;if("selfClose"!=r){var o=t.line,a=t.ch,s=u(t);if(!s)return;if(s[1])i.push(s[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:e(t.line,t.ch),to:e(o,a)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,i){for(var r=new o(t,i.line,0);;){var a=h(r);if(!a||r.line!=i.line)return;var s=c(r);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=e(r.line,r.ch),u=p(r,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,i,r){var a=new o(t,i.line,i.ch,r);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&e(a.line,a.ch),h=s&&u(a);if(s&&h&&!(n(a,i)>0)){var d={from:e(a.line,a.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:f(a,h[2]),close:d,at:"close"}:{open:d,close:p(a=new o(t,l.line,l.ch,r),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,n,i){for(var r=new o(t,e.line,e.ch,n);;){var a=f(r,i);if(!a)break;var s=p(new o(t,e.line,e.ch,n),a.tag);if(s)return{open:a,close:s}}},t.scanForClosingTag=function(t,e,n,i){return p(new o(t,e.line,e.ch,i?{from:0,to:i}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.tsx ***!
|
|
|
\*********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/button/style */"+L6B");var i=n(/*! antd/es/button */"2/Rp"),r=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),p=n.n(d),f=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");e.a=function(t){var e,n,l,d,b,x,C=t.editOffice,w=void 0===C?"view":C,k=(t.name,t.data),S=(t.theme,t.type),E=t.filename,_=t.monacoEditor,O=t.className,N=t.style,T=t.close,L=t.onClose,A=t.hasMask,M=t.disabledDownload,j=t.onImgDimensions,D=t.otherData,I=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),P=Object(s.a)(I,2),R=(P[0],P[1],Object(u.useState)("")),B=Object(s.a)(R,2),z=(B[0],B[1]),F=Object(u.useState)(),H=Object(s.a)(F,2),W=H[0],V=H[1],G="build"===window.ENV?"/react/build":"",U=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(e=k)&&void 0!==e&&e.startsWith("/api")&&"txt"!==S&&(k=y.a.API_SERVER+k),"office"===S&&Object(g.P)(k).filesize>10485760&&(S="other"),E&&(_.filename=E),Object(u.useEffect)((function(){var t,e,n=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&z(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===S&&q()}),[S,k]);var q=function(){var t=Object(a.a)(c.a.mark((function t(){var e,n,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",k),e=k,k.startsWith("http")||(e=location.origin+e),n=new URL(e).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:n});case 6:i=t.sent,V(i);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(){k.startsWith("http")||k.startsWith("blob:")?Y():Object(g.x)(E||"educoder",k,E)},Y=function(){Object(g.v)(E||"educoder",decodeURIComponent(k))};return h.a.createElement("div",{style:Object(o.a)({},N||{}),className:"".concat(A&&p.a.bgBlack," ").concat(S?p.a.wrp:"hide")},T&&h.a.createElement("div",{className:p.a.close,ref:K},!!j&&h.a.createElement(r.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){L(),j()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!M&&h.a.createElement(r.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:Y},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(r.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:L},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(p.a[O]," ").concat(O," ").concat(p.a.monaco," ").concat("txt"===S?"show":"hide")},"txt"===S&&h.a.createElement(m.b,_)),"audio"===S&&h.a.createElement("audio",{src:"".concat((null===(n=k)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=k)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===S&&h.a.createElement(h.a.Fragment,null,(null===(d=k)||void 0===d?void 0:d.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(k),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})),"office"===S&&W&&h.a.createElement("iframe",{src:"".concat(G,"/office.html?key=").concat(W.key,"&url=").concat(U+W.url,"&callbackUrl=").concat(U+W.callbackUrl,"&fileType=").concat(W.fileType,"&title=").concat(W.title,"&model=").concat(w,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!M)}),("xlsx"===S||"doc"===S||"pptx"===S||"docx"===S)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(D.key,"&url=").concat(y.a.API_SERVER+D.url,"&callbackUrl=").concat(y.a.API_SERVER+D.callbackUrl,"&fileType=").concat(D.fileType,"&title=").concat(D.title,"&model=").concat(D.model)}),"html"===S&&h.a.createElement("iframe",{src:k+"&disposition=inline"}),"pdf"===S&&h.a.createElement("embed",{className:p.a.embed,src:k}),"image"===S&&h.a.createElement("img",{src:"".concat((null===(b=k)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(x=k)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),"other"===S&&h.a.createElement("div",null,h.a.createElement(i.a,{type:"primary",size:"large",onClick:$},h.a.createElement(f.a,null),"点击下载")),"download"===S&&h.a.createElement(i.a,{type:"primary",size:"large",onClick:$},h.a.createElement(f.a,null),"点击下载"))}},"p77/":
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.css ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},pmY6:
|
|
|
/*!********************************************************************!*\
|
|
|
!*** ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js ***!
|
|
|
\********************************************************************/
|
|
|
/*! exports provided: isDisposable, dispose, combinedDisposable, toDisposable, DisposableStore, Disposable, MutableDisposable, ImmortalReference */
|
|
|
/*! exports used: Disposable, DisposableStore, ImmortalReference, MutableDisposable, combinedDisposable, dispose, isDisposable, toDisposable */function(t,e,n){"use strict";n.d(e,"g",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return h}));function i(t){}function r(t){return"function"==typeof t.dispose&&0===t.dispose.length}function o(t){return Array.isArray(t)?(t.forEach((function(t){t&&t.dispose()})),[]):t?(t.dispose(),t):void 0}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(i),{dispose:function(){return o(t)}}}function s(t){var e={dispose:function(){t()}};return e}var l=function(){function t(){this._toDispose=new Set,this._isDisposed=!1}return t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.clear())},t.prototype.clear=function(){this._toDispose.forEach((function(t){return t.dispose()})),this._toDispose.clear()},t.prototype.add=function(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t},t}(),c=function(){function t(){this._store=new l}return t.prototype.dispose=function(){this._store.dispose()},t.prototype._register=function(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)},t.None=Object.freeze({dispose:function(){}}),t}(),u=function(){function t(){this._isDisposed=!1}return Object.defineProperty(t.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(t){this._isDisposed||t===this._value||(this._value&&this._value.dispose(),this._value=t)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.value=void 0},t.prototype.dispose=function(){this._isDisposed=!0,this._value&&this._value.dispose(),this._value=void 0},t}(),h=function(){function t(t){this.object=t}return t.prototype.dispose=function(){},t}()},"rAM+":
|
|
|
/*!*******************************************************************************************************************!*\
|
|
|
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
|
|
|
\*******************************************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function r(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(i.a)(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},rUJ1:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/marked/src/helpers.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: escape */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){const n=/[&<>"']/,i=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},s=t=>a[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const p={},f=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){p[" "+t]||(f.test(t)?p[" "+t]=t+"/":p[" "+t]=y(t,"/",!0));const n=-1===(t=p[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(m,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(g,"$1")+e:t+e}function y(t,e,n){const i=t.length;if(0===i)return"";let r=0;for(;r<i;){const o=t.charAt(i-r-1);if(o!==e||n){if(o===e||!n)break;r++}else r++}return t.substr(0,i-r)}t.exports={escape:function(t,e){if(e){if(n.test(t))return t.replace(i,s)}else if(r.test(t))return t.replace(o,s);return t},unescape:c,edit:function(t,e){t=t.source||t,e=e||"";const n={replace:(e,i)=>(i=(i=i.source||i).replace(u,"$1"),t=t.replace(e,i),n),getRegex:()=>new RegExp(t,e)};return n},cleanUrl:function(t,e,n){if(t){let t;try{t=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(n)&&(n=v(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,n,i=1;for(;i<arguments.length;i++)for(n in e=arguments[i],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},splitCells:function(t,e){const n=t.replace(/\|/g,(t,e,n)=>{let i=!1,r=e;for(;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"}).split(/ \|/);let i=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n},rtrim:y,findClosingBracket:function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let i=0,r=0;for(;r<n;r++)if("\\"===t[r])r++;else if(t[r]===e[0])i++;else if(t[r]===e[1]&&(i--,i<0))return r;return-1},checkSanitizeDeprecation:function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},sbIO:
|
|
|
/*!***********************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/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/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/Paperlibrary/Random/AddAndEdit/components/StepPreview/components/editor.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullChildEditor/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullMDEditor.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/bi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/jinshi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/xixi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/zhong.svg (<- 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/checkbox/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/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/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/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/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! 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("DjyN");var i=n("NUBc"),r=(n("5Dmo"),n("3S7+")),o=(n("/zsF"),n("PArb")),a=(n("Q9mQ"),n("diRs")),s=(n("+L6B"),n("2/Rp")),l=(n("5NDa"),n("5rEg")),c=(n("miYZ"),n("tsqr")),u=n("9og8"),h=(n("giR+"),n("fyUT")),d=(n("2qtc"),n("kLXV")),p=n("tJVT"),f=n("WmNS"),m=n.n(f),g=n("q1tI"),v=n.n(g),y=n("PsQE"),b=n.n(y),x=n("0eGx"),C=n.n(x),w=n("9Bee"),k=n("Ty5D"),S=n("9kvl"),E=n("ErOA"),_=n("+yhJ"),O=n.n(_),N=n("RZ/O"),T=n.n(N),L=n("LvDl"),A=n("6K3P"),M=n.n(A),j=(n("sRBo"),n("kaz8")),D=n("oBTY"),I=n("PpiC"),P=n("Ot1p"),R=n("kqOp"),B=n("7qnI"),z=n("1vsH"),F=n("PGNT"),H=n.n(F),W=function(t,e){t.globalSetting,t.loading,t.dispatch;var n=t.isEdit,i=t.editData,r=(Object(I.a)(t,["globalSetting","loading","dispatch","isEdit","editData"]),Object(g.useState)("")),o=Object(p.a)(r,2),a=o[0],s=o[1],l=Object(g.useState)(""),u=Object(p.a)(l,2),h=u[0],f=u[1],m=Object(g.useState)([]),y=Object(p.a)(m,2),b=y[0],x=y[1],C=Object(g.useState)(""),w=Object(p.a)(C,2),k=w[0],S=w[1],E=Object(g.useState)(),_=Object(p.a)(E,2),O=_[0],N=_[1],T=Object(g.useState)(!1),L=Object(p.a)(T,2),A=L[0],M=L[1];Object(g.useEffect)((function(){i&&n&&(s(null==i?void 0:i.name),f(null==i?void 0:i.analysis),N(null==i?void 0:i.is_ordered),M(!0))}),[i]),Object(g.useEffect)((function(){if(A){var t=null==i?void 0:i.standard_answer.map((function(t){return t.answer_text}));x(t),M(!1)}}),[A]),Object(g.useImperativeHandle)(e,(function(){return{onSave:F,Clear:W}}));var F=function(){var t=[],e=!1;return a?(b.forEach((function(n,i){t.push({position:i+1,answer_text:[]}),n.forEach((function(n,r){t[i].answer_text.push(n),n&&Object(z.Z)(n,1e4)||(S("".concat(i,"-").concat(r)),c.b.info(n?"答案不能超过10000字符":"答案:不能为空"),e=!0)}))})),!e&&((null==t?void 0:t.length)>20?(c.b.warn("填空题标准答案不能为空/不能超过20个!"),!1):{name:a,analysis:h,standard_answers:t,is_ordered:O})):(c.b.info("请您输入题干"),!1)},W=function(){s(""),f(""),x([]),N(!1)},V=function(t,e,n){S("");var i=b.slice();i[t][e]=n,x(i)},G=function(t){var e=b.slice();e[t]=[].concat(Object(D.a)(e[t]),[""]),x(e)},U=function(t,e){var n=b.slice();if(!n[t][e])return n[t]=n[t].filter((function(t,n){return n!==e})),void x(n);d.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:H.a.modal,onOk:function(){n[t]=n[t].filter((function(t,n){return n!==e})),x(n)}})},K=function(t){d.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:H.a.modal,onOk:function(){var e=b.slice();e=b.filter((function(e,n){return t!==n})),x(e)}})};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement("div",null,v.a.createElement(R.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:a,onChange:function(t){return s(t)},showNullButton:!0,onPlaceholderChange:function(t,e,n){var i=b.slice();if(e&&i.splice(t,e),n)for(var r=0;r<n;r++)i.splice(t+r,0,[""]);x(i)}})),v.a.createElement("div",{className:"mt20"},b.map((function(t,e){return v.a.createElement(B.a,{key:e,answers:t,index:e,flex:1,is_md:!0,activeOptionErrorIndex:k,onAnswerChange:V,addChildAnswer:G,deleteChildAnswer:U,deleteChildAnswermain:K})}))),v.a.createElement("div",{className:"mt20"},b.length>1&&v.a.createElement("span",null,v.a.createElement(j.a,{checked:O,onChange:function(t){return N(t.target.checked)},className:"".concat(H.a.color333," font14")},"多个填空的答案有顺序要求"),v.a.createElement("span",{className:"".concat(H.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:h,onChange:function(t){return f(t)}}))},V=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(W)),G=(n("7Kak"),n("9yH6")),U=function(t,e){t.globalSetting,t.loading;var n=t.editData,i=(t.dispatch,t.onRef,t.isEdit),r=(Object(I.a)(t,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Object(g.useState)()),o=Object(p.a)(r,2),a=o[0],s=o[1],l=Object(g.useState)(""),u=Object(p.a)(l,2),h=u[0],d=u[1],f=Object(g.useState)(""),m=Object(p.a)(f,2),y=m[0],b=m[1];Object(g.useEffect)((function(){if(n&&i){d(null==n?void 0:n.name),b(null==n?void 0:n.analysis);var t=null==n?void 0:n.choices.find((function(t){return t.is_answer}));s("正确"===t.choice_text?"0":"1")}}),[n]),Object(g.useImperativeHandle)(e,(function(){return{onSave:x,Clear:C}}));var x=function(){return h?a?{name:h,choices:[{choice_text:"正确",is_answer:"0"===a?1:0},{choice_text:"错误",is_answer:"1"===a?1:0}],analysis:y}:(c.b.info("请先点击选择本选择题的正确选项"),!1):(c.b.info("请您输入题干"),!1)},C=function(){d(""),b(""),s("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:h,onChange:function(t){return d(t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),v.a.createElement(G.a.Group,{buttonStyle:"solid",value:a,onChange:function(t){return s(t.target.value)}},v.a.createElement(G.a.Button,{value:"0",className:"".concat(H.a.radio," mr40")},"正确"),v.a.createElement(G.a.Button,{value:"1",className:H.a.radio},"错误")),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:y,onChange:function(t){return b(t)}}))},K=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(U)),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],$=function(t,e){var n=t.editData,i=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),o=(Object(I.a)(t,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),a=Object(p.a)(o,2),s=a[0],l=a[1],u=Object(g.useState)(),h=Object(p.a)(u,2),d=h[0],f=h[1],m=Object(g.useState)([]),y=Object(p.a)(m,2),b=y[0],x=y[1],C=Object(g.useState)(""),k=Object(p.a)(C,2),S=k[0],E=k[1],_=Object(g.useState)(""),O=Object(p.a)(_,2),N=O[0],T=O[1];Object(g.useEffect)((function(){l(["","","",""])}),[]),Object(g.useEffect)((function(){if(n&&i){E(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(t){return t.choice_text})));var t=[];null==n||n.choices.map((function(e,n){e.is_answer&&t.push(n)})),x(t)}}),[n]),Object(g.useImperativeHandle)(e,(function(){return{onSave:L,Clear:A}}));var L=function(){if(!S)return c.b.info("请您输入题干"),!1;var t=s.findIndex((function(t){return!t}));if(t>-1)return c.b.info("请先输入 ".concat(q[t]," 选项的内容")),!1;if(!b.length)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;if(b.length<2)return c.b.info("多选题最小正确选项为2个"),!1;var e=s.map((function(t,e){return{choice_text:t,is_answer:b.includes(e)?1:0}}));return{name:S,choices:e,analysis:N}},A=function(){l(["","","",""]),E(""),T(""),x("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:S,onChange:function(t){return E(t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),s.map((function(t,e){return v.a.createElement("div",{className:H.a.choiceWrap,key:e},v.a.createElement(r.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(b.includes(e)?H.a.activeAnswer:""),onClick:function(){b.includes(e)?x(b.filter((function(t){return t!==e}))):x([].concat(Object(D.a)(b),[e]))}},q[e])),v.a.createElement("div",{className:H.a.editorWrap},d===e?v.a.createElement(P.a,{id:"single-question-option-".concat(e),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:t,onChange:function(t){s[e]=t,l(s)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return f(e)}},v.a.createElement(w.a,{value:t}))),e>1&&v.a.createElement(r.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(t,n){return n!==e}))),b.includes(e)?x(b.filter((function(t){return t!==e}))):x([].concat(Object(D.a)(b),[e]))}})),e<7&&e===s.length-1&&v.a.createElement(r.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(D.a)(s),[""]))}})))})),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(t){return T(t)}}))},Y=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)($)),X=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Z=function(t,e){var n=t.editData,i=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),o=(Object(I.a)(t,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),a=Object(p.a)(o,2),s=a[0],l=a[1],u=Object(g.useState)(),h=Object(p.a)(u,2),d=h[0],f=h[1],m=Object(g.useState)(),y=Object(p.a)(m,2),b=y[0],x=y[1],C=Object(g.useState)(""),k=Object(p.a)(C,2),S=k[0],E=k[1],_=Object(g.useState)(""),O=Object(p.a)(_,2),N=O[0],T=O[1];Object(g.useEffect)((function(){l(["","","",""])}),[]),Object(g.useEffect)((function(){n&&i&&(E(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(t){return t.choice_text}))),x(null==n?void 0:n.choices.findIndex((function(t){return t.is_answer}))))}),[n]),Object(g.useImperativeHandle)(e,(function(){return{onSave:L,Clear:A}}));var L=function(){if(!S)return c.b.info("请您输入题干"),!1;var t=s.findIndex((function(t){return!t}));if(t>-1)return c.b.info("请先输入 ".concat(X[t]," 选项的内容")),!1;if(console.log("activeAnswer: ",b),"number"!=typeof b)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;var e=s.map((function(t,e){return{choice_text:t,is_answer:b===e?1:0}}));return{name:S,choices:e,analysis:N}},A=function(){l(["","","",""]),E(""),T(""),x("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:S,onChange:function(t){return E(t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),s.map((function(t,e){return v.a.createElement("div",{className:H.a.choiceWrap,key:e},v.a.createElement(r.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(b===e?H.a.activeAnswer:""),onClick:function(){return x(e)}},X[e])),v.a.createElement("div",{className:H.a.editorWrap},d===e?v.a.createElement(P.a,{id:"single-question-option-".concat(e),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:t,onChange:function(t){s[e]=t,l(s)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return f(e)}},v.a.createElement(w.a,{value:t}))),e>1&&v.a.createElement(r.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(t,n){return n!==e}))),e===b&&x(null)}})),e<7&&e===s.length-1&&v.a.createElement(r.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(D.a)(s),[""]))}})))})),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(t){return T(t)}}))},J=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(Z)),Q=function(t,e){var n=t.editData,i=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),r=(Object(I.a)(t,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)("")),o=Object(p.a)(r,2),a=o[0],s=o[1],l=Object(g.useState)(""),u=Object(p.a)(l,2),h=u[0],d=u[1],f=Object(g.useState)(""),m=Object(p.a)(f,2),y=m[0],b=m[1];Object(g.useEffect)((function(){var t;n&&i&&(s(null==n?void 0:n.name),d(null==n?void 0:n.analysis),b(null==n||null===(t=n.answer_texts)||void 0===t?void 0:t[0]))}),[n]),Object(g.useImperativeHandle)(e,(function(){return{onSave:x,Clear:C}}));var x=function(){return a?y?{name:a,answer_texts:[y],analysis:h}:(c.b.info("请您输入参考答案"),!1):(c.b.info("请您输入题干"),!1)},C=function(){s(""),d(""),b("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:a,onChange:function(t){return s(t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"参考答案:")),v.a.createElement(P.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:y,onChange:function(t){return b(t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:h,onChange:function(t){return d(t)}}))},tt=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(Q)),et=n("k1fw"),nt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],it=function(t,e){t.globalSetting,t.loading,t.dispatch;var n=t.editData,i=(t.onRef,t.isEdit),o=(Object(I.a)(t,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Object(g.useState)("")),a=Object(p.a)(o,2),s=a[0],l=a[1],u=Object(g.useState)([]),h=Object(p.a)(u,2),d=h[0],f=h[1];console.log(d),Object(g.useEffect)((function(){var t;if(n&&i){l(null==n?void 0:n.name);var e=null==n||null===(t=n.sub_item_banks)||void 0===t?void 0:t.map((function(t){var e,n,i;return Object(et.a)(Object(et.a)({},t),{},{id:t.id,open:!1,qusList:null==t||null===(e=t.choices)||void 0===e?void 0:e.map((function(t){return t.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==t||null===(i=t.choices)||void 0===i?void 0:i.findIndex((function(t){return t.is_answer}))])||void 0===n?void 0:n.filter((function(t){return-1!==t}))})}));f(e)}}),[n]),Object(g.useImperativeHandle)(e,(function(){return{onSave:m,Clear:y}}));var m=function(){if(!s)return c.b.info("请您输入题干"),!1;if(0===d.length)return c.b.info("请您添加小题"),!1;for(var t=0;t<d.length;t++){var e,n=d[t];if(null==n||!n.name)return c.b.info("请您输入第".concat(t+1,"小题题干")),!1;var i=null==n||null===(e=n.qusList)||void 0===e?void 0:e.findIndex((function(t){return!t}));if(i>-1)return c.b.info("请先输入第".concat(t+1,"小题").concat(nt[i],"选项的内容")),!1;if(null==n||!n.qusAnswer.length)return c.b.info("请设置第".concat(t+1,"小题的正确答案,点击选项A/B...即可完成设置")),!1}var r=d.map((function(t){return{id:t.id>1?t.id:null,name:t.name,item_type:t.item_type,analysis:t.analysis,choices:t.qusList.map((function(e,n){return{choice_text:e,is_answer:t.qusAnswer[0]===n?1:0}}))}}));return{name:s,sub_item_banks:r}},y=function(){l(""),f([])},b=function(t,e,n){var i,r=Object(L.cloneDeep)(d);("open"===t&&(r[e].open=!r[e].open),"delete"===t&&r.splice(e,1),"value"===t&&(r[e].name=n),"answer"===t&&(r[e].qusAnswer=[n]),"edit"===t&&(r[e].activeQusEditor=n),"details"===t&&(r[e].qusList[r[e].activeQusEditor]=n),"addQus"===t&&(r[e].qusList=r[e].qusList.concat("")),"deleteQus"===t)&&(r[e].qusList=r[e].qusList.filter((function(t,e){return e!==n})),r[e].qusAnswer=null===(i=r[e].qusAnswer)||void 0===i?void 0:i.filter((function(t){return t!==n})));"analysis"===t&&(r[e].analysis=n),f(r)};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(P.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:s,onChange:function(t){return l(t)}}),null==d?void 0:d.map((function(t,e){var n;return v.a.createElement("div",{className:H.a.fold,key:t.id},v.a.createElement("div",{onClick:function(){return b("open",e)},className:H.a.head},v.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:t.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),v.a.createElement("span",null,"第",e+1,"小题(单选题)"),v.a.createElement("b",{style:{visibility:"hidden"},onClick:function(t){t.stopPropagation(),b("delete",e)},className:"iconfont icon-shanchu8"})),v.a.createElement("div",{className:"mb10",style:{display:t.open?"block":"none"}},v.a.createElement(P.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==t?void 0:t.name,onChange:function(t){return b("value",e,t)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),null==t||null===(n=t.qusList)||void 0===n?void 0:n.map((function(n,i){var o,a;return v.a.createElement("div",{className:H.a.choiceWrap,key:i},v.a.createElement(r.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(null!=t&&null!==(o=t.qusAnswer)&&void 0!==o&&o.includes(i)?H.a.activeAnswer:""),onClick:function(){return b("answer",e,i)}},nt[i])),v.a.createElement("div",{className:H.a.editorWrap},(null==t?void 0:t.activeQusEditor)===i?v.a.createElement(P.a,{id:"single-question-option-".concat(i),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(t){return b("details",e,t)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return b("edit",e,i)}},v.a.createElement(w.a,{value:n}))),i>1&&v.a.createElement(r.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return b("deleteQus",e,i)}})),i<7&&i===(null==t||null===(a=t.qusList)||void 0===a?void 0:a.length)-1&&v.a.createElement(r.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return b("addQus",e)}})))})),v.a.createElement("p",{className:"mb10 mt10"},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:t.analysis,onChange:function(t){return b("analysis",e,t)}})))})))},rt=Object(S.a)((function(t){var e=t.loading;return{globalSetting:t.globalSetting,loading:e.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(it));e.a=function(t){var e,n,f,y,x,_,N,A,j=t.data,D=t.submit,I=t.goBack,P=t.loading,R=t.onTypeScore,B=t.editPreview,z=void 0!==B&&B,F=t.onSkipExamination,H=t.selectValue,W=t.onExchange,G=Object(g.useRef)(),U=Object(g.useRef)(Object(L.debounce)((function(){return st()}),100,{leading:!0,trailing:!0})),q=Object(g.useState)(null),$=Object(p.a)(q,2),X=$[0],Z=$[1],Q=Object(g.useState)(!1),et=Object(p.a)(Q,2),nt=et[0],it=et[1],ot=Object(k.i)();Object(g.useEffect)((function(){return window.addEventListener("scroll",null==U?void 0:U.current),function(){window.removeEventListener("scroll",null==U?void 0:U.current)}}),[]),Object(g.useEffect)((function(){it(!0)}),[]),Object(g.useEffect)((function(){var t,e,n,i,r=null===(t=document.getElementById("examName"))||void 0===t||null===(e=t.getElementsByClassName("ant-pagination-options-quick-jumper"))||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.childNodes)||void 0===i?void 0:i[2];r&&(r.nodeValue="份")}),[j]);var at=function(t){var e=parseInt(t);return isNaN(e)?"":e};var st=function(){var t,e,n,i,r=document.getElementById("preview_btns"),o=document.getElementById("preview_btns_else");n=0,i=0,document.body&&(n=document.body.scrollTop),document.documentElement&&(i=document.documentElement.scrollTop),(n-i>0?n:i)+("CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight)>=(t=0,e=0,document.body&&(t=document.body.scrollHeight),document.documentElement&&(e=document.documentElement.scrollHeight),(t-e>0?t:e)-68)?(r.style.visibility="hidden",o.style.visibility="visible"):(r.style.visibility="visible",o.style.visibility="hidden")},lt=["容易","简单","适中","困难"],ct=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ut=function(t){console.log(t,"key"),F(t-1)},ht=function(){return v.a.createElement(v.a.Fragment,null,v.a.createElement(a.a,{color:"#55575D",overlayClassName:b.a.popover,visible:nt,getPopupContainer:function(t){return null==t?void 0:t.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷"},v.a.createElement(s.a,{onMouseEnter:function(){return it(!0)},onMouseLeave:function(){return it(!1)},onClick:function(){var t,e;e="",d.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"保存试卷",content:v.a.createElement("div",{className:b.a.modalColumn},v.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},v.a.createElement("img",{style:{marginRight:5},src:M.a}),"保存后单独生成一份人工组卷类型的固定试卷。"),v.a.createElement("div",{className:b.a.modalRow,style:{marginTop:20}},v.a.createElement("sup",{className:b.a.sup},"*"),v.a.createElement("span",{style:{flexShrink:0}},"试卷名称:"),v.a.createElement(l.a,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:e,onChange:function(t){e=t.target.value}}))),okText:"确认",cancelText:"取消",onOk:(t=Object(u.a)(m.a.mark((function t(){var n,i,r,o,a;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=3;break}return c.b.warn("试卷名称不能为空"),t.abrupt("return",Promise.reject());case 3:return i=[],r=[],o=[],null==j||null===(n=j.questionList)||void 0===n||n.forEach((function(t){var e;null===(e=t.questions)||void 0===e||e.forEach((function(e){i.push(e.id),r.push(t.questions_score/t.questions_count),"COMBINATION"===t.type&&o.push({id:e.id,sub_item_bank_ids:e.sub_item_banks.map((function(t){return t.id}))})}))})),console.log("-----",o),a={item_bank_ids:i,item_bank_scores:r,name:e,combination_item_banks:o},t.next=11,D(a);case 11:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}},"保存")),v.a.createElement(s.a,{onClick:function(){document.body.scrollIntoView(),I()}},"返回"),v.a.createElement(s.a,{loading:P,onClick:function(){return D()},type:"primary"},"提交"))},dt=function(){var t;return v.a.createElement(v.a.Fragment,null,v.a.createElement(s.a,{onClick:I},"返回"),H>0&&v.a.createElement(s.a,{onClick:function(){return ut(H)},type:"primary"},"上一份"),H<(null==j||null===(t=j.exam)||void 0===t?void 0:t.total_num)-1&&v.a.createElement(s.a,{onClick:function(){return ut(H+2)}},"下一份"))},pt=function(){var t=Object(u.a)(m.a.mark((function t(e,n){var i,r,o,a,s,l,u,h,d,p;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(i=G.current)||void 0===i?void 0:i.onSave();case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return");case 5:return o={question_score:n.score,analysis:r.analysis},console.log(r,"editorData"),"SINGLE"!==e&&"MULTIPLE"!==e&&"JUDGMENT"!==e||(s=[],l=[],o.question_type="JUDGMENT"===e?2:1,o.question_title=null==r?void 0:r.name,null==r||null===(a=r.choices)||void 0===a||a.forEach((function(t,e){s.push(t.choice_text),null!=t&&t.is_answer&&l.push(e+1)})),o.question_choices=s,o.standard_answers=l),"COMPLETION"===e&&(o.is_ordered=r.is_ordered,o.question_title=null==r?void 0:r.name,o.question_type=3,h=[],null==r||null===(u=r.standard_answers)||void 0===u||u.forEach((function(t,e){h.push({choice_id:t.position,answer_text:t.answer_text})})),o.standard_answers=h),"SUBJECTIVE"===e&&(o.question_title=null==r?void 0:r.name,o.question_type=3,o.standard_answers=null==r?void 0:r.answer_texts),"COMBINATION"===e&&(o.question_title=null==r?void 0:r.name,o.question_type=7,o.sub_questions=null==r||null===(d=r.sub_item_banks)||void 0===d?void 0:d.map((function(t,e){return{id:t.id,question_title:t.name,question_type:1,question_choices:t.choices.map((function(t){return t.choice_text})),standard_answers:[t.choices.findIndex((function(t){return t.is_answer}))+1],analysis:t.analysis}})),delete o.analysis),t.next=13,Object(E.a)("/api/exercise_questions/".concat(n.id,".json"),{method:"put",body:o});case 13:0===(null==(p=t.sent)?void 0:p.status)&&(c.b.success("编辑成功"),ut(H+1)),Z(null);case 16:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();console.log(function(){for(var t=[],e=0;e<(null==j||null===(n=j.exam)||void 0===n?void 0:n.total_num);e++){var n;t.push({})}return t}(),"data");var ft=null==j||null===(e=j.questionList)||void 0===e?void 0:e.reduce((function(t,e){return t+e.questions_score}),0),mt=z&&1!==(null==j||null===(n=j.exam)||void 0===n?void 0:n.exercise_status);return v.a.createElement("section",{className:b.a.wrap},v.a.createElement("div",{id:"id_left_preview",className:b.a.left,onMouseEnter:function(t){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(t){document.getElementById("id_left_preview").style.overflowY="hidden"}},v.a.createElement("div",{className:b.a.title},v.a.createElement("div",null,v.a.createElement("b",null),v.a.createElement("span",null,"答题卡"))),v.a.createElement("div",{className:b.a.total},v.a.createElement("div",null,v.a.createElement("img",{src:O.a}),v.a.createElement("span",null,"题数(道)"),v.a.createElement("aside",null,null==j?void 0:j.all_questions_count)),v.a.createElement("div",{className:"mr30 ml30"},v.a.createElement("img",{src:T.a}),v.a.createElement("span",null,"总分(分)"),v.a.createElement("aside",null,ft)),v.a.createElement("div",null,v.a.createElement("img",{src:C.a}),v.a.createElement("span",null,"时长(分)"),v.a.createElement("aside",null,null==j||null===(f=j.exam)||void 0===f?void 0:f.time))),null==j||null===(y=j.questionList)||void 0===y?void 0:y.map((function(t,e){var n;return v.a.createElement("div",{className:b.a.list,key:e},v.a.createElement("div",{className:b.a.name},v.a.createElement("b",null),v.a.createElement("span",null,t.name)),v.a.createElement("aside",null,v.a.createElement("div",null,"共",v.a.createElement("span",{className:b.a.b},t.questions_count),"题 ",v.a.createElement("span",{className:b.a.l},"|"),"共",v.a.createElement("span",{className:b.a.r},t.questions_score),"分"),v.a.createElement("div",{className:b.a.answerSheet},null==t||null===(n=t.questions)||void 0===n?void 0:n.map((function(t,e){return v.a.createElement("div",{onClick:function(){var e="Anchor_".concat(t.id),n=document.getElementById(e);n&&setTimeout((function(){return n.scrollIntoView({block:"center",behavior:"smooth"})}))},key:t.id,className:b.a.tag},e+1)})))))}))),v.a.createElement("div",{className:b.a.right},v.a.createElement("div",{className:b.a.examName,id:"examName"},v.a.createElement("div",{className:b.a.name},v.a.createElement(r.a,{title:null==j||null===(x=j.exam)||void 0===x?void 0:x.name,getPopupContainer:function(t){return t.parentNode}},v.a.createElement("span",{className:b.a.t},null==j||null===(_=j.exam)||void 0===_?void 0:_.name))),z?v.a.createElement(i.a,{showTotal:function(t){return v.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"共计",v.a.createElement("span",{className:"c-light-primary"},t),"份试卷")},total:null==j||null===(N=j.exam)||void 0===N?void 0:N.total_num,pageSize:1,current:H+1,showSizeChanger:!1,onChange:ut,showQuickJumper:!0,hideOnSinglePage:!1}):v.a.createElement(s.a,{onClick:function(){var t,e=d.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(t=Object(u.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.update({cancelButtonProps:{disabled:!0}}),t.next=3,W();case 3:e.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成整张试题");case 5:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},type:"primary"},"随机更换")),v.a.createElement("div",{className:b.a.topWarp},null==j||null===(A=j.questionList)||void 0===A?void 0:A.map((function(t,e){var n,i;return v.a.createElement(v.a.Fragment,{key:e},v.a.createElement("div",{className:b.a.head,style:0===e?{border:0,marginTop:-16}:{}},v.a.createElement("div",{className:b.a.name},v.a.createElement("b",null),v.a.createElement("span",null,t.name)),v.a.createElement("div",{className:b.a.so},"共",v.a.createElement("span",{className:b.a.b},t.questions_count," "),"题 ","COMBINATION"===t.type&&"(包含".concat(null==t||null===(n=t.questions)||void 0===n?void 0:n.map((function(t){var e;return null==t||null===(e=t.sub_item_banks)||void 0===e?void 0:e.length})).reduce((function(t,e){return t+e})),"小题)"),v.a.createElement("span",{className:b.a.l},"|"),"共",v.a.createElement("span",{className:b.a.r},t.questions_score),"分"),!z&&v.a.createElement("div",{className:b.a.btn},v.a.createElement(s.a,{onClick:function(){!function(t){console.log("---",t);var e=[];t.questions.map((function(t){return null==t?void 0:t.sub_item_banks.map((function(t){e.push(t)}))}));var n,i=0;i="COMBINATION"===t.type?t.questions_score/e.length:t.questions_score/t.questions_count,d.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"分数设置",content:v.a.createElement("div",{className:b.a.modalColumn},v.a.createElement("div",{className:b.a.modalRow,style:{justifyContent:"flex-start"}},v.a.createElement("sup",{className:b.a.sup},"*"),v.a.createElement("span",null,null==t?void 0:t.name,"COMBINATION"===(null==t?void 0:t.type)&&"中的每小题",":"),v.a.createElement(h.a,{min:1,parser:at,defaultValue:i,onChange:function(t){i=t}}),v.a.createElement("span",{className:"ml5"},"分/题"))),okText:"确认",cancelText:"取消",onOk:(n=Object(u.a)(m.a.mark((function n(){var r,o;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i){n.next=3;break}return c.b.warn("分数不能为空或为0"),n.abrupt("return",Promise.reject());case 3:"COMBINATION"===t.type?(r={type:null==t?void 0:t.type,score:i,scoreTotal:i*(null==e?void 0:e.length)},R(r)):(o={type:null==t?void 0:t.type,score:i,scoreTotal:i*t.questions_count},R(o));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}(t)},type:"primary",ghost:!0,className:"mr20"},"设置得分"),v.a.createElement(s.a,{onClick:function(){return r=null===(n=(e=t).questions)||void 0===n?void 0:n.map((function(t){return t.id})),o=e.name,void(a=d.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换".concat(o,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(i=Object(u.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a.update({cancelButtonProps:{disabled:!0}}),t.next=3,W({seleted_item_bank_ids:r},{type:e.type});case 3:a.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成".concat(o,"试题"));case 5:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})}));var e,n,i,r,o,a},type:"primary",ghost:!0},"随机更换"))),null==t||null===(i=t.questions)||void 0===i?void 0:i.map((function(e,n){return X===e.id?v.a.createElement("div",{id:"Anchor_".concat(e.id),className:b.a.content,style:{padding:0,marginTop:10},key:e.id},v.a.createElement("div",{style:{float:"right",marginTop:-6}},v.a.createElement(s.a,{onClick:function(){return Z(null)},className:"mr20",type:"primary",ghost:!0},"取消"),v.a.createElement(s.a,{onClick:function(){return pt(null==t?void 0:t.type,e)},type:"primary"},"保存")),function(t,e){if(console.log(t,222),"SINGLE"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(J,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));if("MULTIPLE"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(Y,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));if("JUDGMENT"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(K,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));if("COMPLETION"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(V,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));if("SUBJECTIVE"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(tt,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));if("COMBINATION"===e)return v.a.createElement(v.a.Fragment,null,v.a.createElement(rt,{ref:G,editData:t,isEdit:!0}),v.a.createElement(o.a,null));var n;"PROGRAM"===e&&S.d.push("/problems/".concat(null==t||null===(n=t.program_attr)||void 0===n?void 0:n.identifier,"/edit?type=exercises&express_id=").concat(ot.categoryId,"&question_id=").concat(null==t?void 0:t.id,"&score=").concat(null==t?void 0:t.score,"&callback_url=").concat(location.pathname,"&select=").concat(H,"&exercise=true"))}(e,t.type)):v.a.createElement("div",{id:"Anchor_".concat(e.id),className:b.a.content,key:e.id},v.a.createElement("div",{className:b.a.titleWrap},v.a.createElement(w.a,{style:{paddingRight:10},className:b.a.titleHtml,value:n+1+"、"+"".concat("combination"===(null==e?void 0:e.item_type)?"(题干)":"")+e.name}),z&&v.a.createElement(s.a,{disabled:mt,onClick:function(){X?c.b.warn("先保存或取消当前正在编辑的试题"):Z(e.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"编辑"),v.a.createElement(s.a,{disabled:mt,onClick:function(){return function(t,e,n,i){var r,o,a=null===(r=i.questions)||void 0===r?void 0:r.map((function(t){return t.id})),s=d.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认要更换该试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(o=Object(u.a)(m.a.mark((function i(){return m.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s.update({cancelButtonProps:{disabled:!0}}),i.next=3,W({single_question_id:t,seleted_item_bank_ids:a},{type:e,index:n});case 3:s.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成试题");case 5:case"end":return i.stop()}}),i)}))),function(){return o.apply(this,arguments)})})}(e.id,t.type,n,t)},type:"primary",ghost:!0},"换一题")),("SINGLE"===t.type||"JUDGMENT"===t.type||"MULTIPLE"===t.type)&&(l=e,p=[],v.a.createElement(v.a.Fragment,null,v.a.createElement("aside",{className:b.a.single},null==l||null===(h=l.choices)||void 0===h?void 0:h.map((function(t,e){return t.is_answer&&p.push(ct[e]),v.a.createElement("ul",{key:e},v.a.createElement("li",null,ct[e],"、"),v.a.createElement("li",null,v.a.createElement(w.a,{value:t.choice_text})))}))),v.a.createElement("div",{className:b.a.analysis},v.a.createElement("div",null,"正确答案:",p.join(""),v.a.createElement("span",{className:"ml30"},"难度:",lt[l.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:b.a.text},"解析:"),v.a.createElement(w.a,{value:l.analysis?l.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==l?void 0:l.discipline_name,"/").concat(null==l?void 0:l.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==l?void 0:l.tag_discipline_name))))),"COMPLETION"===t.type&&function(t){var e,n=null==t||null===(e=t.standard_answer)||void 0===e?void 0:e.map((function(t){var e;return"答案(填空".concat(t.position,"):").concat(null==t||null===(e=t.answer_text)||void 0===e?void 0:e.join("、"))}));return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:b.a.analysis},v.a.createElement("div",null,"正确答案:",n),v.a.createElement("aside",null,v.a.createElement("span",{className:b.a.text},"解析:"),v.a.createElement(w.a,{value:t.analysis?t.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==t?void 0:t.discipline_name,"/").concat(null==t?void 0:t.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==t?void 0:t.tag_discipline_name))))}(e),"SUBJECTIVE"===t.type&&function(t){var e;return v.a.createElement("div",{className:b.a.analysis},v.a.createElement("div",null,"正确答案:",null==t||null===(e=t.answer_texts)||void 0===e?void 0:e[0]),v.a.createElement("aside",null,v.a.createElement("span",{className:b.a.text},"解析:"),v.a.createElement(w.a,{value:t.analysis?t.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==t?void 0:t.discipline_name,"/").concat(null==t?void 0:t.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==t?void 0:t.tag_discipline_name)))}(e),"PROGRAM"===t.type&&function(t){var e;return v.a.createElement("div",{className:b.a.analysis},v.a.createElement("aside",null,v.a.createElement("span",{className:b.a.text},"预期输出:"),v.a.createElement(w.a,{value:null==t||null===(e=t.program_attr)||void 0===e?void 0:e.description})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==t?void 0:t.discipline_name,"/").concat(null==t?void 0:t.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==t?void 0:t.tag_discipline_name)))}(e),"COMBINATION"===t.type&&(i=e,r=n,v.a.createElement("div",null,null==i||null===(a=i.sub_item_banks)||void 0===a?void 0:a.map((function(t,e){var n,o=[];return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},r+1+"."+(e+1),"(单选题)",t.name),v.a.createElement("aside",{className:b.a.single},null==t||null===(n=t.choices)||void 0===n?void 0:n.map((function(t,e){return t.is_answer&&o.push(ct[e]),v.a.createElement("ul",{key:e},v.a.createElement("li",null,ct[e],"、"),v.a.createElement("li",null,v.a.createElement(w.a,{value:t.choice_text})))}))),v.a.createElement("div",{className:b.a.analysis},v.a.createElement("div",null,"正确答案:",o.join(""),v.a.createElement("span",{className:"ml30"},"难度:",lt[t.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:b.a.text},"解析:"),v.a.createElement(w.a,{value:t.analysis?t.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==i?void 0:i.discipline_name,"/").concat(null==i?void 0:i.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==i?void 0:i.tag_discipline_name))))})))),v.a.createElement("div",null));var i,r,a,l,h,p})))}))),v.a.createElement("div",{className:b.a.btnsElse,id:"preview_btns_else"},z?dt():ht()),v.a.createElement("div",{className:b.a.btnsWrap,id:"preview_btns"},v.a.createElement("div",{className:b.a.btns},z?dt():ht()))))}},sboe:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
|
|
|
\*************************************************/
|
|
|
/*! exports provided: TreeContext */
|
|
|
/*! exports used: TreeContext */function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(/*! react */"q1tI"),r=i.createContext(null)},tmPe:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/CustomTree/index.less?modules ***!
|
|
|
\***************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex_box_center:"flex_box_center___ivyUy",flex_space_between:"flex_space_between___1h8Qq",flex_box_vertical_center:"flex_box_vertical_center___3eC95",flex_box_center_end:"flex_box_center_end___nrhvX",flex_box_column:"flex_box_column___2po4_",customTree:"customTree___1LpRW",name:"name___17ZTs"}},vHTk:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.less?modules ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]); |