|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[174,7,8],{"+NIl":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function a(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,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 i={};function o(e,t){e.f=t}function l(e,t){var a;if(e.match(/^\\[a-zA-Z@]+/)){var l=e.current().slice(1);return n(t,a=new(a=i.hasOwnProperty(l)?i[l]:i.DEFAULT)),o(t,c),a.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return s(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return s(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return s(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return s(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(a=r(t))?(a.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,a=new(a=i.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(a=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(a.argument=e.current()),a.styleIdentifier())}function s(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,l),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,l),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,l),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),l(e,t))}return i.importmodule=a("importmodule","tag",["string","builtin"]),i.documentclass=a("documentclass","tag",["","atom"]),i.usepackage=a("usepackage","tag",["atom"]),i.begin=a("begin","tag",["atom"]),i.end=a("end","tag",["atom"]),i.label=a("label","tag",["atom"]),i.ref=a("ref","tag",["atom"]),i.eqref=a("eqref","tag",["atom"]),i.cite=a("cite","tag",["atom"]),i.bibitem=a("bibitem","tag",["atom"]),i.Bibitem=a("Bibitem","tag",["atom"]),i.RBibitem=a("RBibitem","tag",["atom"]),i.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return s(e,t)}:l}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=l,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.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(e,t,n){e.exports=n.p+"static/shu.a39bf729.svg"},"+yhJ":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/assets/images/paper/xixi.svg ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/xixi.d492fb65.svg"},"0eGx":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/paper/zhong.svg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/zhong.c1924b73.svg"},"19Vz":
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){i(e)&&n(e)}function a(e){var r=e.getWrapperElement(),a=i(e);r.className=r.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?n(e):t(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(i,o,l){var s=l&&l!=e.Init;if(o&&!s)i.on("blur",r),i.on("change",a),i.on("swapDoc",a),e.on(i.getInputField(),"compositionupdate",i.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,a=e.getInputField();"TEXTAREA"==a.nodeName?r=!a.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(i)}),a(i);else if(!o&&s){i.off("blur",r),i.off("change",a),i.off("swapDoc",a),e.off(i.getInputField(),"compositionupdate",i.state.placeholderCompose),t(i);var c=i.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!i.hasFocus()&&r(i)}))}(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(e,t,n){!function(e){"use strict";var t={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};e.defineMode("xml",(function(r,a){var i,o,l=r.indentUnit,s={},c=a.htmlMode?t:n;for(var u in c)s[u]=c[u];for(var u in a)s[u]=a[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var a;null!=(a=n.next());){if("<"==a)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==a){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,a=e.next();if(">"==a||"/"==a&&e.eat(">"))return t.tokenize=d,i=">"==a?"endTag":"selfcloseTag","tag bracket";if("="==a)return i="equals",null;if("<"==a){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(a)?(t.tokenize=(n=a,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(n)||!s.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?y:v}function b(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",w):s.allowMissingTagName&&"endTag"==e?(o="tag bracket",w(e,0,n)):(o="error",b)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&s.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===s.matchClosing?(o="tag",x):(o="tag error",k)}return s.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",k)}function x(e,t,n){return"endTag"!=e?(o="error",x):(m(n),v)}function k(e,t,n){return o="error",x(e,0,n)}function w(e,t,n){if("word"==e)return o="attribute",E;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,a=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new h(n,r,a==n.indented)),v}return o="error",w}function E(e,t,n){return"equals"==e?C:(s.allowMissing||(o="error"),w(e,0,n))}function C(e,t,n){return"string"==e?S:"word"==e&&s.allowUnquoted?(o="string",w):(o="error",w(e,0,n))}function S(e,t,n){return"string"==e?S:w(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var n=t.tokenize(e,t);return(n||i)&&"comment"!=n&&(o=null,t.state=t.state(i||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var i=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(i&&i[1])for(;a;){if(a.tagName==i[2]){a=a.prev;break}if(!s.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(i)for(;a;){var o=s.contextGrabbers[a.tagName];if(!o||!o.hasOwnProperty(i[2]))break;a=a.prev}for(;a&&a.prev&&!a.startOfLine;)a=a.prev;return a?a.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=w)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"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(e,t,n){e.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(e,t,n){e.exports=n.p+"static/sc.c1696770.svg"},"5MlY":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/sm.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/sm.8ccb50bf.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(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n("wx14"),a=n("rePB"),i=n("VTBJ"),o=n("1OyB"),l=n("vuIU"),s=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),d=n.n(u),f=n("TSYQ"),p=n.n(f),h=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=p()(n,"".concat(n,"-").concat(e.page),(t={},Object(a.a)(t,"".concat(n,"-active"),e.active),Object(a.a)(t,e.className,!!e.className),Object(a.a)(t,"".concat(n,"-disabled"),!e.page),t));return d.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",d.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,b=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,a=n.quickGo,i=n.rootPrefixCls,o=e.state.goInputText;r||""===o||t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(i,"-prev"))>=0||t.relatedTarget.className.indexOf("".concat(i,"-next"))>=0)||(e.setState({goInputText:""}),a(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(l.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,a=t.rootPrefixCls,i=t.changeSize,o=t.quickGo,l=t.goButton,s=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,f=t.disabled,p=this.state.goInputText,h="".concat(a,"-options"),m=s,g=null,v=null,b=null;if(!i&&!o)return null;var y=this.getPageSizeOptions();if(i&&m){var x=y.map((function(t,n){return d.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=d.a.createElement(m,{disabled:f,prefixCls:u,showSearch:!1,className:"".concat(h,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return o&&(l&&(b="boolean"==typeof l?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:f,className:"".concat(h,"-quick-jumper-button")},r.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},l)),v=d.a.createElement("div",{className:"".concat(h,"-quick-jumper")},r.jump_to,d.a.createElement("input",{disabled:f,type:"text",value:p,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,b)),d.a.createElement("li",{className:"".concat(h)},g,v)}}]),n}(d.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var y=b,x=n("N2Kk");function k(){}function w(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var E=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(w(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,a=e||d.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(a=d.a.createElement(e,Object(i.a)({},r.props))),a},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=w(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var a=w(void 0,r.state,r.props);n>a?n=a:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var i=r.state.pageSize;return r.props.onChange(n,i),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<w(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==m&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var a=e.onChange!==k;"current"in e&&!a&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var l=e.defaultCurrent;"current"in e&&(l=e.current);var s=e.defaultPageSize;return"pageSize"in e&&(s=e.pageSize),l=Math.min(l,w(s,void 0,e)),r.state={current:l,currentInputValue:l,pageSize:s},r}return Object(l.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=w(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),a=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:a}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),a=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:a}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,i=t.className,o=t.style,l=t.disabled,s=t.hideOnSinglePage,c=t.total,f=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,b=t.showTotal,x=t.simple,k=t.itemRender,E=t.showPrevNextJumpers,C=t.jumpPrevIcon,S=t.jumpNextIcon,O=t.selectComponentClass,_=t.selectPrefixCls,N=t.pageSizeOptions,j=this.state,T=j.current,L=j.pageSize,A=j.currentInputValue;if(!0===s&&c<=L)return null;var D=w(void 0,this.state,this.props),M=[],I=null,P=null,F=null,R=null,z=null,B=m&&m.goButton,W=g?1:2,K=T-1>0?T-1:0,q=T+1<D?T+1:D,H=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(x)return B&&(z="boolean"==typeof B?d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},f.jump_to_confirm):d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B),z=d.a.createElement("li",{title:v?"".concat(f.jump_to).concat(T,"/").concat(D):null,className:"".concat(n,"-simple-pager")},z)),d.a.createElement("ul",Object(r.a)({className:p()(n,"".concat(n,"-simple"),Object(a.a)({},"".concat(n,"-disabled"),l),i),style:o,ref:this.savePaginationNode},H),d.a.createElement("li",{title:v?f.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:p()("".concat(n,"-prev"),Object(a.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(K)),d.a.createElement("li",{title:v?"".concat(T,"/").concat(D):null,className:"".concat(n,"-simple-pager")},d.a.createElement("input",{type:"text",value:A,disabled:l,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(n,"-slash")},"/"),D),d.a.createElement("li",{title:v?f.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:p()("".concat(n,"-next"),Object(a.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(q)),z);if(D<=3+2*W){var V={locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:k};D||M.push(d.a.createElement(h,Object(r.a)({},V,{key:"noPager",page:D,className:"".concat(n,"-disabled")})));for(var U=1;U<=D;U+=1){var G=T===U;M.push(d.a.createElement(h,Object(r.a)({},V,{key:U,page:U,active:G})))}}else{var $=g?f.prev_3:f.prev_5,J=g?f.next_3:f.next_5;E&&(I=d.a.createElement("li",{title:v?$:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:p()("".concat(n,"-jump-prev"),Object(a.a)({},"".concat(n,"-jump-prev-custom-icon"),!!C))},k(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(C,"prev page"))),P=d.a.createElement("li",{title:v?J:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:p()("".concat(n,"-jump-next"),Object(a.a)({},"".concat(n,"-jump-next-custom-icon"),!!S))},k(this.getJumpNextPage(),"jump-next",this.getItemIcon(S,"next page")))),R=d.a.createElement(h,{locale:f,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:D,page:D,active:!1,showTitle:v,itemRender:k}),F=d.a.createElement(h,{locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:k});var Z=Math.max(1,T-W),Q=Math.min(T+W,D);T-1<=W&&(Q=1+2*W),D-T<=W&&(Z=D-2*W);for(var Y=Z;Y<=Q;Y+=1){var X=T===Y;M.push(d.a.createElement(h,{locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Y,page:Y,active:X,showTitle:v,itemRender:k}))}T-1>=2*W&&3!==T&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(I)),D-T>=2*W&&T!==D-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(P)),1!==Z&&M.unshift(F),Q!==D&&M.push(R)}var ee=null;b&&(ee=d.a.createElement("li",{className:"".concat(n,"-total-text")},b(c,[0===c?0:(T-1)*L+1,T*L>c?c:T*L])));var te=!this.hasPrev()||!D,ne=!this.hasNext()||!D;return d.a.createElement("ul",Object(r.a)({className:p()(n,i,Object(a.a)({},"".concat(n,"-disabled"),l)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},H),ee,d.a.createElement("li",{title:v?f.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:p()("".concat(n,"-prev"),Object(a.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(K)),M,d.a.createElement("li",{title:v?f.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:p()("".concat(n,"-next"),Object(a.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(q)),d.a.createElement(y,{disabled:l,locale:f,rootPrefixCls:n,selectComponentClass:O,selectPrefixCls:_,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:T,pageSize:L,pageSizeOptions:N,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:B}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,a=w(e.pageSize,t,e);r=r>a?a:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(d.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:k,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:k,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var C=E},"6K3P":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/jinshi.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/jinshi.9b74f304.svg"},"7ahc":
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
|
|
|
\*************************************************************/
|
|
|
/*! exports provided: default, MyCodeMirror */
|
|
|
/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=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/extends */"0Owb"),i=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! codemirror */"VrN/"),f=n.n(d),p=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),s.a.Option),h={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(e){var t=e.value,n=e.onChange,a=e.mode,i=e.options,o=void 0===i?{}:i,s=Object(c.useRef)(),d=Object(c.useState)(),p=Object(l.a)(d,2),h=p[0],m=p[1];return Object(c.useEffect)((function(){if(h){function e(e){var t=e.getValue();n&&n(t)}return h.on("change",e),function(){h.off("change",e)}}}),[h,n]),Object(c.useEffect)((function(){h&&h.setOption("mode",a)}),[h,a]),Object(c.useEffect)((function(){h&&(t===h.getValue()&&""!==t||setTimeout((function(){h.setValue(t||" ")}),300))}),[h,t]),Object(c.useEffect)((function(){if(s.current&&!h){var e=f.a.fromTextArea(s.current,Object(r.a)({mode:a,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));m(e)}}),[s.current,h]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:s}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),d=Object(l.a)(r,2),f=d[0],v=d[1];return u.a.createElement(o.a,Object(a.a)({},h,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(s.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(p,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:f})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(i.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(i.a,{type:"ghost",onClick:n},"取消")))}},"7ixt":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/rc-tooltip/es/placements.js ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: placements, default */
|
|
|
/*! exports used: placements */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r={adjustX:1,adjustY:1},a=[0,0],i={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:a},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:a},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:a},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:a},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:a},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:a},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:a},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:a},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:a},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:a},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:a},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:a}}},"7qnI":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.js ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/tooltip/style */"5Dmo");var r=n(/*! antd/es/tooltip */"3S7+"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! ./index.less?modules */"O2Wb"),f=n.n(d),p=s.a.TextArea,h=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.index,a=t.onAnswerChange,i=t.addChildAnswer,o=t.exerciseIsPublish,l=t.answers,s=t.activeOptionErrorIndex,c=t.flex,d=void 0===c?"0 0 1000px":c;return u.a.createElement("div",{className:f.a.flex},u.a.createElement("div",{className:"".concat(f.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"答案(填空",n+1,"):"),u.a.createElement("div",{className:"".concat(f.a.flex," ").concat(f.a.flex1),style:{flexDirection:"column"}},l.map((function(t,c){var h="".concat(n,"-").concat(c);return u.a.createElement("div",{className:"".concat(f.a.flex," ").concat(f.a.flex1),key:c},u.a.createElement("div",{className:f.a.flex1,style:{flex:d}},u.a.createElement("div",null,u.a.createElement(p,{className:h===s?f.a.error:"",spellCheck:!1,rows:4,value:t||"",defaultValue:"请输入参考答案".concat(0==c?"":"(可选)"),onChange:function(e){return a(n,c,e.target.value)},style:{minHeight:95}}))),!o&&u.a.createElement(u.a.Fragment,null,0!=c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(f.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswer(n,c)},style:{float:"right"}})),0===c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(f.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswermain(n,c)},style:{float:"right"}})),u.a.createElement(r.a,{title:"新增参考答案"},u.a.createElement("i",{className:"".concat(f.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return i(n)},style:{float:"right",visibility:c==l.length-1?"":"hidden"}}))))}))))}}]),n}(c.Component);t.a=h},"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(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),a=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),l=n(/*! rc-util/es/warning */"Kwbf"),s=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(o.a)(t).map((function(t){if(!Object(s.i)(t))return Object(l.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,c=Object(i.a)(r,["children"]),u=Object(a.a)({key:n},c),d=e(o);return d.length&&(u.children=d),u})).filter((function(e){return e}))}(e)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),i=[];function o(e){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,d){var f=Object(s.h)(l?l.pos:"0",d),p=c(u.key,f),h=Object(a.a)(Object(a.a)({},u),{},{parent:l,pos:f,children:null,data:u,isStart:[].concat(Object(r.a)(l?l.isStart:[]),[0===d]),isEnd:[].concat(Object(r.a)(l?l.isEnd:[]),[d===e.length-1])});return i.push(h),!0===t||n.has(p)?h.children=o(u.children||[],h):h.children=[],h}))}return o(e),i}function f(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(a,i,o){var l=a?a.children:e,c=a?Object(s.h)(o.pos,i):"0";if(a){var u=r(a,c),d={node:a,index:i,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(d)}l&&l.forEach((function(e,t){n(e,t,{node:a,pos:c,level:o?o.level+1:-1})}))}(null)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,a=t.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,o={},l={},s={posEntities:o,keyEntities:l};return n&&(s=n(s)||s),f(e,(function(e){var t=e.node,n=e.index,a=e.pos,i=e.key,u=e.parentPos,d={node:t,index:n,key:i,pos:a,level:e.level},f=c(i,a);o[a]=d,l[f]=d,d.parent=o[u],d.parent&&(d.parent.children=d.parent.children||[],d.parent.children.push(d)),r&&r(d,s)}),i),a&&a(s),s}function h(e,t){var n=t.expandedKeys,r=t.selectedKeys,a=t.loadedKeys,i=t.loadingKeys,o=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==a.indexOf(e),loading:-1!==i.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(u?u.pos:""),dragOver:s===e&&0===c,dragOverGapTop:s===e&&-1===c,dragOverGapBottom:s===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,o=e.loaded,s=e.loading,c=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,f=e.dragOverGapBottom,p=e.pos,h=e.active,m=Object(a.a)(Object(a.a)({},t),{},{expanded:n,selected:r,checked:i,loaded:o,loading:s,halfChecked:c,dragOver:u,dragOverGapTop:d,dragOverGapBottom:f,pos:p,active:h});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(l.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/meta.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var a=0;a<r.mimes.length;a++)if(r.mimes[a]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var a=0;a<r.ext.length;a++)if(r.ext[a]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var a=t.lastIndexOf("."),i=a>-1&&t.substring(a+1,t.length);if(i)return e.findModeByExtension(i)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var a=0;a<r.alias.length;a++)if(r.alias[a].toLowerCase()==t)return r}}}(n(/*! ../lib/codemirror */"VrN/"))},"9Bee":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! 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 ./src/components/PreviewAll/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! 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(e,t,n){"use strict";var r=n("k1fw"),a=n("tJVT"),i=n("q1tI"),o=n.n(i),l=(n("vg9a"),n("DlQD")),s=n.n(l),c=n("rUJ1");var u=[],d=["<ul>"],f=new s.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function h(){u.length=0,d=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(){return function e(t,n,r,a){if(n>=t.length||t[n].level<=r)return n;var i=t[n];a.push("<li><a href='#"+i.anchor+"'>"+i.text+"</a>");var o=[];return n=e(t,++n,i.level,o),o.length>0&&(a.push("<ul>"),o.forEach((function(e){a.push(e)})),a.push("</ul>")),a.push("</li>"),n=e(t,n,r,a)}(u,0,0,d),d.push("</ul>"),d.join("")}var v={heading:function(e){var t=p.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(a.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var o=x(),l=r;r=o,k[o]={type:"block",expression:l}}return{type:"code",raw:n,lang:i,text:r}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,y=0,x=function(){return"__special_katext_id_".concat(y++,"__")},k={};function w(){y=0,k={}}function E(e){return e=e.replace(b,(function(e,t){var n=x();return k[n]={type:"inline",expression:t},n}))}var C=f.listitem;f.listitem=function(e){return C(E(e))};var S=f.paragraph;f.paragraph=function(e){return S(E(e))};var O=f.tablecell;f.tablecell=function(e,t){return O(E(e),t)},f.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:Object(c.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:Object(c.escape)(e,!0))+"</code></pre>"},f.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+r+'">'+e+"</h"+t+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:v,renderer:f});var _=s.a,N=(n("SJMd"),n("ulZh")),j=n.n(N),T=n("m3rI"),L=n("Oy/b"),A=n("p5ED"),D=/<pre[^>]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.className,s=e.showTextOnly,c=e.showLines,u=e.style,d=void 0===u?{}:u,f=e.stylesPrev,p=void 0===f?{}:f,v=String(n),b=Object(i.useState)(""),y=Object(a.a)(b,2),x=y[0],E=y[1],C=Object(i.useMemo)((function(){try{v=(v=v.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+T.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+T.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+T.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(e){}var e=_(v),t=k;if(v.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",g()),h()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],a=r.type,i=r.expression;return Object(L.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(i)||"",{displayMode:"block"===a,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),w(),s){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return N()}),500),e}),[v]),S=Object(i.useRef)();function O(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),E(n);else if(n.startsWith("#")){e.preventDefault();var r=document.getElementById(n.replace("#",""));r&&r.scrollIntoView(!0)}}}m.WebkitLineClamp=c,c&&(d=Object(r.a)(Object(r.a)({},d),m));var N=function(){var e,t=null===(e=S.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(j.a.isSupported()){var t=new j.a;t.loadSource(e.src),t.attachMedia(e)}}))};return Object(i.useEffect)((function(){if(S.current&&C&&C.match(D)&&window.PR.prettyPrint(),S.current)return S.current.addEventListener("click",O),function(){S.current.removeEventListener("click",O),w(),h()}}),[C,S.current,O]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{ref:S,style:Object(r.a)({},d),className:"".concat(l||""," markdown-body "),dangerouslySetInnerHTML:{__html:C}}),o.a.createElement(A.a,{close:!0,data:x,type:null!=x&&x.length?"office":"",style:Object(r.a)({},p),onClose:function(){return E("")}}))}},"9VGf":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/components/useInterval.tsx ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! react */"q1tI");function a(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},"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(e,t,n){e.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(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,l,s){if(s!=e.Init&&s&&o.removeKeyMap("autoCloseTags"),l){var c={name:"autoCloseTags"};"object"==typeof l&&!1===l.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof l&&!1===l.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),l=[],s=r.getOption("autoCloseTags"),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=o[c].head,d=r.getTokenAt(u),f=e.innerMode(r.getMode(),d.state),p=f.state,h=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(p),m=h&&h.name;if(!m)return e.Pass;var g="html"==f.mode.configuration,v="object"==typeof s&&s.dontCloseTags||g&&t,b="object"==typeof s&&s.indentTags||g&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var y=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&h.close||d.string.indexOf("/")==u.ch-d.start-1||v&&a(v,y)>-1||i(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p)||[],m,u,!0))return e.Pass;var x="object"==typeof s&&s.emptyTags;if(x&&a(x,m)>-1)l[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var k=b&&a(b,y)>-1;l[c]={indent:k,text:">"+(k?"\n\n":"")+"</"+m+">",newPos:k?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var w="object"==typeof s&&s.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var E=l[c];r.replaceRange(E.text,o[c].head,o[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:E.newPos,anchor:E.newPos},r.setSelections(C),!w&&E.indent&&(r.indentLine(E.newPos.line,null,!0),r.indentLine(E.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(t,n){for(var r=t.listSelections(),a=[],o=n?"/":"</",l=t.getOption("autoCloseTags"),s="object"==typeof l&&l.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),f=e.innerMode(t.getMode(),d.state),p=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var h,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)h=o+"script";else if(m&&"css"==f.mode.name)h=o+"style";else{var g=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p);if(!g||g.length&&i(t,g,g[g.length-1],u))return e.Pass;h=o+g[g.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(h+=">"),a[c]=h}if(t.replaceSelections(a),r=t.listSelections(),!s)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function i(t,n,r,a,i){if(!e.scanForClosingTag)return!1;var o=Math.min(t.lastLine()+1,a.line+500),l=e.scanForClosingTag(t,a,null,o);if(!l||l.tag!=r)return!1;for(var s=i?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++s;for(a=l.to,c=1;c<s;c++){var u=e.scanForClosingTag(t,a,null,o);if(!u||u.tag!=r)return!1;a=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(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(e,t,n){"use strict";function r(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<e.length;r++){var a=e[r],i=t?"".concat(t,"/").concat(a.name):"".concat(a.name);n.push({title:a.name,isLeaf:"tree"!==a.type,key:i})}return n}function i(e,t,n){for(var r=0;r<e.length;r++){var a=e[r];if(a.key===t){a.children=n;break}a.children&&i(a.children,t,n)}return e}function o(e,t,n){var r;return function(){var a=this,i=arguments,o=function(){r=null,n||e.apply(a,i)},l=n&&!r;clearTimeout(r),r=setTimeout(o,t),l&&e.apply(a,i)}}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return l}));var l=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(e,t,n){},DlQD:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/marked/lib/marked.js ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.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:t,changeDefaults:function(t){e.exports.defaults=t}}})),a=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),i=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return s[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var f=/(^|[^\[])\^/g,p=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var a=0;a<r;){var i=e.charAt(r-a-1);if(i!==t||n){if(i===t||!n)break;a++}else a++}return e.substr(0,r-a)}var k=function(e,t){if(t){if(a.test(e))return e.replace(i,c)}else if(o.test(e))return e.replace(l,c);return e},w=d,E=function(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(f,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n},C=function(e,t,n){if(e){var r;try{r=decodeURIComponent(d(n)).replace(p,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!h.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},S={exec:function(){}},O=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},_=function(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,a=t;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},N=x,j=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,a=0;a<n;a++)if("\\"===e[a])a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&--r<0)return a;return-1},T=function(e){e&&e.sanitize&&!e.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")},L=r.defaults,A=N,D=_,M=k,I=j;function P(e,t,n){var r=t.href,a=t.title?M(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:a,text:i}:{type:"image",raw:n,href:r,title:a,text:M(i)}}var F=function(){function e(e){this.options=e||L}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var a=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?a:A(a,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,a=n.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(a=n.cells.length,r=0;r<a;r++)n.cells[r]=D(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,a,i,o,l,s,c=t[0],u=t[2],d=u.length>1,f=")"===u[u.length-1],p={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},h=t[0].match(this.rules.block.item),m=!1,g=h.length,v=0;v<g;v++)c=n=h[v],r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),v!==g-1&&(a=this.rules.block.bullet.exec(h[v+1])[0],(d?1===a.length||!f&&")"===a[a.length-1]:a.length>1||this.options.smartLists&&a!==u)&&(i=h.slice(v+1).join("\n"),p.raw=p.raw.substring(0,p.raw.length-i.length),v=g-1)),o=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(p.loose=!0),s=void 0,(l=/^\[[ xX]\] /.test(n))&&(s=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),p.items.push({type:"list_item",raw:c,task:l,checked:s,loose:o,text:n});return p}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):M(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,a=n.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(a=n.cells.length,r=0;r<a;r++)n.cells[r]=D(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:M(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=I(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var a=t[2],i="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);o?(a=o[1],i=o[3]):i=""}else i=t[3]?t[3].slice(1,-1):"";return P(t,{href:(a=a.trim().replace(/^<([\s\S]*)>$/,"$1"))?a.replace(this.rules.inline._escapes,"$1"):a,title:i?i.replace(this.rules.inline._escapes,"$1"):i},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return P(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var a,i="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(i.lastIndex=0;null!=(r=i.exec(t));)if(a=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,a[0].length),text:e.slice(2,a[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var a,i="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(i.lastIndex=0;null!=(r=i.exec(t));)if(a=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,a[0].length),text:e.slice(1,a[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),a=n.startsWith(" ")&&n.endsWith(" ");return r&&a&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,a=this.rules.inline.autolink.exec(e);if(a)return r="@"===a[2]?"mailto:"+(n=M(this.options.mangle?t(a[1]):a[1])):n=M(a[1]),{type:"link",raw:a[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,a;if("@"===n[2])a="mailto:"+(r=M(this.options.mangle?t(n[0]):n[0]));else{var i;do{i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(i!==n[0]);r=M(n[0]),a="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,a=this.rules.inline.text.exec(e);if(a)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):M(a[0]):a[0]:M(this.options.smartypants?n(a[0]):a[0]),{type:"text",raw:a[0],text:r}},e}(),R=S,z=E,B=O,W={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:R,table:R,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?'|\([^()]*\))/};W.def=z(W.def).replace("label",W._label).replace("title",W._title).getRegex(),W.bullet=/(?:[*+-]|\d{1,9}[.)])/,W.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,W.item=z(W.item,"gm").replace(/bull/g,W.bullet).getRegex(),W.list=z(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex(),W._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",W._comment=/<!--(?!-?>)[\s\S]*?-->/,W.html=z(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W.paragraph=z(W._paragraph).replace("hr",W.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",W._tag).getRegex(),W.blockquote=z(W.blockquote).replace("paragraph",W.paragraph).getRegex(),W.normal=B({},W),W.gfm=B({},W.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*|$)"}),W.gfm.nptable=z(W.gfm.nptable).replace("hr",W.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",W._tag).getRegex(),W.gfm.table=z(W.gfm.table).replace("hr",W.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",W._tag).getRegex(),W.pedantic=B({},W.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",W._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:R,paragraph:z(W.normal._paragraph).replace("hr",W.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var K={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,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:R,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};K.punctuation=z(K.punctuation).replace(/punctuation/g,K._punctuation).getRegex(),K._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",K._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",K.em.start=z(K.em.start).replace(/punctuation/g,K._punctuation).getRegex(),K.em.middle=z(K.em.middle).replace(/punctuation/g,K._punctuation).replace(/overlapSkip/g,K._overlapSkip).getRegex(),K.em.endAst=z(K.em.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.em.endUnd=z(K.em.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.start=z(K.strong.start).replace(/punctuation/g,K._punctuation).getRegex(),K.strong.middle=z(K.strong.middle).replace(/punctuation/g,K._punctuation).replace(/blockSkip/g,K._blockSkip).getRegex(),K.strong.endAst=z(K.strong.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.endUnd=z(K.strong.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.blockSkip=z(K._blockSkip,"g").getRegex(),K.overlapSkip=z(K._overlapSkip,"g").getRegex(),K._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,K._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,K._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])?)+(?![-_])/,K.autolink=z(K.autolink).replace("scheme",K._scheme).replace("email",K._email).getRegex(),K._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,K.tag=z(K.tag).replace("comment",W._comment).replace("attribute",K._attribute).getRegex(),K._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,K._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,K.link=z(K.link).replace("label",K._label).replace("href",K._href).replace("title",K._title).getRegex(),K.reflink=z(K.reflink).replace("label",K._label).getRegex(),K.reflinkSearch=z(K.reflinkSearch,"g").replace("reflink",K.reflink).replace("nolink",K.nolink).getRegex(),K.normal=B({},K),K.pedantic=B({},K.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",K._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K._label).getRegex()}),K.gfm=B({},K.normal,{escape:z(K.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),K.gfm.url=z(K.gfm.url,"i").replace("email",K.gfm._extended_email).getRegex(),K.breaks=B({},K.gfm,{br:z(K.br).replace("{2,}","*").getRegex(),text:z(K.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var q={block:W,inline:K},H=r.defaults,V=q.block,U=q.inline;function G(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function $(e){var t,n,r="",a=e.length;for(t=0;t<a;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var J=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:V.normal,inline:U.normal};this.options.pedantic?(t.block=V.pedantic,t.inline=U.pedantic):this.options.gfm&&(t.block=V.gfm,this.options.breaks?t.inline=U.breaks:t.inline=U.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,a,i=t.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,n){var r,a,i,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),i=r.items.length,a=0;a<i;a++)r.items[a].tokens=this.blockTokens(r.items[a].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(e){var l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return t},i.inline=function(e){var t,n,r,a,i,o,l=e.length;for(t=0;t<l;t++)switch((o=e[t]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},a=o.header.length,n=0;n<a;n++)o.tokens.header[n]=[],this.inlineTokens(o.header[n],o.tokens.header[n]);for(a=o.cells.length,n=0;n<a;n++)for(i=o.cells[n],o.tokens.cells[n]=[],r=0;r<i.length;r++)o.tokens.cells[n][r]=[],this.inlineTokens(i[r],o.tokens.cells[n][r]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(a=o.items.length,n=0;n<a;n++)this.inline(o.items[n].tokens)}return e},i.inlineTokens=function(e,t,n,r,a){var i;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===a&&(a="");var o,l=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)s.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e,l,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e,l,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,$))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,$))){if(i=this.tokenizer.inlineText(e,r,G))e=e.substring(i.raw.length),a=i.raw.slice(-1),t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=t,a=[{key:"rules",get:function(){return{block:V,inline:U}}}],(r=null)&&e(n.prototype,r),a&&e(n,a),t}(),Z=r.defaults,Q=C,Y=k,X=function(){function e(e){this.options=e||Z}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var a=this.options.highlight(e,r);null!=a&&a!==e&&(n=!0,e=a)}return r?'<pre><code class="'+this.options.langPrefix+Y(r,!0)+'">'+(n?e:Y(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Y(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+Y(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=w,ae=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new X,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,a,i,o,l,s,c,u,d,f,p,h,m,g,v,b,y,x="",k=e.length;for(n=0;n<k;n++)switch((d=e[n]).type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,re(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",s="",i=d.header.length,r=0;r<i;r++)s+=this.renderer.tablecell(this.parseInline(d.tokens.header[r]),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(s),u="",i=d.cells.length,r=0;r<i;r++){for(s="",o=(l=d.tokens.cells[r]).length,a=0;a<o;a++)s+=this.renderer.tablecell(this.parseInline(l[a]),{header:!1,align:d.align[a]});u+=this.renderer.tablerow(s)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(f=d.ordered,p=d.start,h=d.loose,i=d.items.length,u="",r=0;r<i;r++)v=(g=d.items[r]).checked,b=g.task,m="",g.task&&(y=this.renderer.checkbox(v),h?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+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=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,b,v);x+=this.renderer.list(u,f,p);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<k&&"text"===e[n+1].type;)u+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return x},t.parseInline=function(e,t){t=t||this.renderer;var n,r,a="",i=e.length;for(n=0;n<i;n++)switch((r=e[n]).type){case"escape":a+=t.text(r.text);break;case"html":a+=t.html(r.text);break;case"link":a+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":a+=t.image(r.href,r.title,r.text);break;case"strong":a+=t.strong(this.parseInline(r.tokens,t));break;case"em":a+=t.em(this.parseInline(r.tokens,t));break;case"codespan":a+=t.codespan(r.text);break;case"br":a+=t.br();break;case"del":a+=t.del(this.parseInline(r.tokens,t));break;case"text":a+=t.text(r.text);break;default:var o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return a},e}(),ie=O,oe=T,le=k,se=r.getDefaults,ce=r.changeDefaults,ue=r.defaults;function de(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=ie({},de.defaults,t||{}),oe(t),n){var r,a=t.highlight;try{r=J.lex(e,t)}catch(e){return n(e)}var i=function(e){var i;if(!e)try{i=ae.parse(r,t)}catch(t){e=t}return t.highlight=a,e?n(e):n(null,i)};if(!a||a.length<3)return i();if(delete t.highlight,!r.length)return i();var o=0;return de.walkTokens(r,(function(e){"code"===e.type&&(o++,setTimeout((function(){a(e.text,e.lang,(function(t,n){if(t)return i(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--o&&i()}))}),0))})),void(0===o&&i())}try{var l=J.lex(e,t);return t.walkTokens&&de.walkTokens(l,t.walkTokens),ae.parse(l,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+le(e.message+"",!0)+"</pre>";throw e}}return de.options=de.setOptions=function(e){return ie(de.defaults,e),ce(de.defaults),de},de.getDefaults=se,de.defaults=ue,de.use=function(e){var t=ie({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new X,r=function(t){var r=n[t];n[t]=function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];var l=e.renderer[t].apply(n,i);return!1===l&&(l=r.apply(n,i)),l}};for(var a in e.renderer)r(a);t.renderer=n}(),e.tokenizer&&function(){var n=de.defaults.tokenizer||new F,r=function(t){var r=n[t];n[t]=function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];var l=e.tokenizer[t].apply(n,i);return!1===l&&(l=r.apply(n,i)),l}};for(var a in e.tokenizer)r(a);t.tokenizer=n}(),e.walkTokens){var n=de.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}de.setOptions(t)},de.walkTokens=function(e,t){for(var r,a=n(e);!(r=a()).done;){var i=r.value;switch(t(i),i.type){case"table":for(var o,l=n(i.tokens.header);!(o=l()).done;){var s=o.value;de.walkTokens(s,t)}for(var c,u=n(i.tokens.cells);!(c=u()).done;)for(var d,f=n(c.value);!(d=f()).done;){var p=d.value;de.walkTokens(p,t)}break;case"list":de.walkTokens(i.items,t);break;default:i.tokens&&de.walkTokens(i.tokens,t)}}},de.Parser=ae,de.parser=ae.parse,de.Renderer=X,de.TextRenderer=ee,de.Lexer=J,de.lexer=J.lex,de.Tokenizer=F,de.Slugger=te,de.parse=de,de}()},"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(e,t,n){"use strict";n.r(t);n("cWXX");var r=n("/ezw"),a=(n("+L6B"),n("2/Rp")),i=(n("7Kak"),n("9yH6")),o=(n("giR+"),n("fyUT")),l=n("9og8"),s=n("k1fw"),c=(n("y8nQ"),n("Vl3Y")),u=n("tJVT"),d=(n("5NDa"),n("5rEg")),f=n("WmNS"),p=n.n(f),h=n("q1tI"),m=n.n(h),g=n("Ty5D"),v=n("9kvl"),b=n("m3fD"),y=n.n(b),x=n("A+k2"),k=n.n(x),w=function(e){var t=e.value,n=void 0===t?[]:t,r=e.onChange,a=e.className,i=void 0===a?"":a;return m.a.createElement("div",{className:"".concat(k.a.tabs," ").concat(i," ")},m.a.createElement("div",{onClick:function(){return r(0)},className:0===n?k.a.active:""},m.a.createElement("div",null,"1"),m.a.createElement("div",null,"录入信息")," "),m.a.createElement("div",{onClick:function(){return r(1)},className:1===n?k.a.active:""},m.a.createElement("div",null,"2"),m.a.createElement("div",null,"配置组卷")))},E=(n("2qtc"),n("kLXV")),C=(n("sRBo"),n("kaz8")),S=(n("5Dmo"),n("3S7+")),O=(n("miYZ"),n("tsqr")),_=n("oBTY"),N=n("IlMy"),j=n.n(N),T=n("WCUW"),L=n("QSKd"),A=n.n(L),D=n("Hfvn"),M=n.n(D),I=n("HPRh"),P=n.n(I),F=n("+RXH"),R=n.n(F),z=n("+yhJ"),B=n.n(z),W=n("RZ/O"),K=n.n(W),q=n("exQ7"),H=n.n(q),V=n("HG2Q"),U=n.n(V),G=n("k4n4"),$=n("eS0+"),J=n("PpiC"),Z=n("K5AI"),Q=n.n(Z),Y=n("LvDl"),X=C.a.Group,ee=function(e){var t=e.value,n=void 0===t?[]:t,r=e.onChange,a=e.options,i=e.search,o=(Object(J.a)(e,["value","onChange","options","search"]),m.a.useState(!1)),l=Object(u.a)(o,2),c=l[0],d=l[1];Object(h.useEffect)((function(){var e,t=null==a||null===(e=a.tag_disciplines)||void 0===e?void 0:e.map((function(e){return e.id})),r=null==n?void 0:n.filter((function(e){return t.includes(e)}));d(r.length===(null==t?void 0:t.length))}),[n]);console.log(a,"options");return 0!==(null==a?void 0:a.item_count)&&function(){var e,t=!1;i?null===(e=a.tag_disciplines)||void 0===e||e.forEach((function(e){var n;t||(t=(null===(n=e.name)||void 0===n?void 0:n.includes(i))&&0!==e.item_count)})):t=!0;return t}()?m.a.createElement("div",{className:Q.a.cInput},m.a.createElement("div",{className:Q.a.cl},m.a.createElement(C.a,{checked:c,onChange:function(e){var t,i=null==a||null===(t=a.tag_disciplines)||void 0===t?void 0:t.map((function(e){return e.id}));r(e.target.checked?Object(Y.uniq)([].concat(Object(_.a)(n),Object(_.a)(i))):null==n?void 0:n.filter((function(e){return!i.includes(e)}))),d(e.target.checked)}},m.a.createElement("span",{className:Q.a.box},m.a.createElement("span",{className:"font14 c-light-primary"},m.a.createElement("span",{title:null==a?void 0:a.name,className:Q.a.box1}," ",null==a?void 0:a.name),m.a.createElement("span",null," ","(".concat(null==a?void 0:a.item_count,")"))),m.a.createElement("i",{className:"iconfont icon-lujing font12 ml5"})))),m.a.createElement("div",{className:Q.a.cr},m.a.createElement(X,{options:function(){var e,t,n,r=(null==a?void 0:a.tag_disciplines)||[];i&&(r=null===(n=r)||void 0===n?void 0:n.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(i)})));return r=null===(t=r=null===(e=r)||void 0===e?void 0:e.map((function(e){return Object(s.a)(Object(s.a)({},e),{},{label:"".concat(e.name,"(".concat(null==e?void 0:e.item_count,")")),value:e.id})})))||void 0===t?void 0:t.filter((function(e){return 0!==e.item_count}))}(),value:n,onChange:function(e){var t,i,o=null==a||null===(t=a.tag_disciplines)||void 0===t?void 0:t.map((function(e){return e.id})),l=null==n?void 0:n.filter((function(e){return o.includes(e)})),s=Object(Y.uniq)([].concat(Object(_.a)(n),Object(_.a)(e)));if(l.length>e.length){var c=Object(Y.xor)(l,e);console.log(c,"newLevel"),s=s.filter((function(e){return!c.includes(e)}))}r(s),d(e.length===(null==a||null===(i=a.tag_disciplines)||void 0===i?void 0:i.length))}}))):m.a.createElement(m.a.Fragment,null)},te=n("ErOA"),ne=(n("ozfa"),n("MJZm")),re=n("0Owb"),ae=n("tmPe"),ie=n.n(ae),oe=function(e){var t=e.value,n=e.onChange,r=e.defaultValue,a=e.treeData,i=void 0===a?[]:a,o=Object(J.a)(e,["value","onChange","defaultValue","treeData"]);return m.a.createElement("div",{className:ie.a.customTree},m.a.createElement(ne.a,Object(re.a)({multiple:!0,showIcon:!0,selectedKeys:t,defaultExpandedKeys:r,treeData:i,onSelect:n},o)))},le=n("sbIO"),se=d.a.Search,ce=function(e){var t,n=e.formValue,i=e.setFatherTabs,o=e.tabs,c=e.editData,d=e.dispatch,f=Object(g.i)().id,b=Object(h.useState)(["mine"]),y=Object(u.a)(b,2),x=y[0],k=y[1],N=Object(h.useState)(!0),L=Object(u.a)(N,2),D=L[0],I=L[1],F=Object(h.useState)(!1),z=Object(u.a)(F,2),W=z[0],q=z[1],V=Object(h.useState)(!1),J=Object(u.a)(V,2),Z=J[0],Q=J[1],X=Object(h.useState)(""),ne=Object(u.a)(X,2),re=ne[0],ae=ne[1],ie=Object(h.useState)(!1),ce=Object(u.a)(ie,2),ue=ce[0],de=ce[1],fe=Object(h.useState)(!1),pe=Object(u.a)(fe,2),he=pe[0],me=pe[1],ge=Object(h.useState)({}),ve=Object(u.a)(ge,2),be=ve[0],ye=ve[1],xe=Object(h.useState)([]),ke=Object(u.a)(xe,2),we=ke[0],Ee=ke[1],Ce=Object(h.useState)([]),Se=Object(u.a)(Ce,2),Oe=Se[0],_e=Se[1],Ne=Object(h.useState)([]),je=Object(u.a)(Ne,2),Te=je[0],Le=je[1],Ae=Object(h.useState)([]),De=Object(u.a)(Ae,2),Me=De[0],Ie=De[1],Pe=Object(h.useState)(null),Fe=Object(u.a)(Pe,2),Re=Fe[0],ze=Fe[1],Be=Object(h.useRef)([]),We=Object(h.useState)(!1),Ke=Object(u.a)(We,2),qe=Ke[0],He=Ke[1],Ve=Object(h.useState)([]),Ue=Object(u.a)(Ve,2),Ge=Ue[0],$e=Ue[1],Je=Object(h.useState)([0]),Ze=Object(u.a)(Je,2),Qe=Ze[0],Ye=Ze[1],Xe=Object(h.useState)([]),et=Object(u.a)(Xe,2),tt=et[0],nt=et[1],rt=Object(h.useRef)([]),at=Object(h.useState)(!1),it=Object(u.a)(at,2),ot=it[0],lt=it[1],st=Object(h.useState)([]),ct=Object(u.a)(st,2),ut=ct[0],dt=ct[1],ft=Object(h.useState)([]),pt=Object(u.a)(ft,2),ht=pt[0],mt=pt[1],gt=Object(h.useRef)([]),vt=Object(h.useState)([]),bt=Object(u.a)(vt,2),yt=bt[0],xt=bt[1],kt=Object(h.useState)(!1),wt=Object(u.a)(kt,2),Et=wt[0],Ct=wt[1],St=Object(h.useRef)([]),Ot=Object(h.useState)(0),_t=Object(u.a)(Ot,2),Nt=_t[0],jt=_t[1],Tt=null==tt?void 0:tt.filter((function(e){return null==Ge?void 0:Ge.includes(e.id)})),Lt=null==ht?void 0:ht.filter((function(e){return null==ut?void 0:ut.includes(e.id)}));Object(h.useEffect)((function(){Ft()}),[]),Object(h.useEffect)((function(){return 1===o&&(d({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),d({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1})),function(){d({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),d({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}}),[o]),Object(h.useEffect)((function(){f?c&&Rt():(Bt(x),Wt(),I(!1))}),[c]),Object(h.useEffect)((function(){re&&It()}),[re]);var At,Dt,Mt,It=function(){var e=null;null==Oe||Oe.forEach((function(t){var n;null===(n=t.sub_disciplines)||void 0===n||n.forEach((function(n){var r;null===(r=n.tag_disciplines)||void 0===r||r.forEach((function(n){var r;(null===(r=n.name)||void 0===r?void 0:r.includes(re))&&0!==n.item_count&&!e&&(e=t.id)}))}))})),e&&ze(e)},Pt=function(e){return null==e?void 0:e.map((function(e){return function e(t){var n=t.children,r=Array.isArray(n)&&n.length>0,a=null==t?void 0:t.group_id;return St.current.push({name:null==t?void 0:t.name,id:a,count:null==t?void 0:t.count}),{title:m.a.createElement("div",{title:null==t?void 0:t.name,className:j.a.name},null==t?void 0:t.name,"(".concat(null==t?void 0:t.count,")")),value:a,name:null==t?void 0:t.name,key:a,count:null==t?void 0:t.count,id:a,icon:m.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:r?null==n?void 0:n.map((function(t){return e(t)})):[]}}(e)}))},Ft=function(){var e=Object(l.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(T.x)({});case 2:t=e.sent,St.current=[{id:0,name:"根目录",count:null==t?void 0:t.root_count}],null!=t&&t.data&&(n=[{title:m.a.createElement("div",{title:"根目录",className:j.a.name},"根目录","(".concat((null==t?void 0:t.root_count)||0,")")),value:0,id:0,key:0,count:null==t?void 0:t.root_count,name:"根目录",icon:m.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Pt(t.data||[])}],nt(St.current),xt(n));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rt=function(){var e=Object(l.a)(p.a.mark((function e(){var t,n,r,a,i,o,l,u,d,f,h,m,g,v,b,y,x,w;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=null==c||null===(t=c.tag_disciplines)||void 0===t?void 0:t.map((function(e){return e.tag_discipline_id})),h=null==c||null===(n=c.groups)||void 0===n?void 0:n.map((function(e){return e.id})),m={source:null==c||null===(r=c.examination_bank)||void 0===r?void 0:r.source,group_ids:h,tag_discipline_ids:f,teach_group_ids:null==c?void 0:c.teach_group_ids},e.next=5,Object(te.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:m});case 5:if(-1!==(null==(g=e.sent)?void 0:g.status)){e.next=8;break}return e.abrupt("return");case 8:v=(v=null==g?void 0:g.filter((function(e){var t;return!(null==e||null===(t=e.item_banks)||void 0===t||!t.length)}))).map((function(e){return Object(s.a)(Object(s.a)({},e),{},{scoreTotal:0,score:0,questionTotal:0})})),v=null===(a=v)||void 0===a?void 0:a.map((function(e,t){var n,r,a;return Object(s.a)(Object(s.a)({},e),{},{score:(null==c||null===(n=c.score_settings)||void 0===n||null===(r=n.find((function(t){return t.item_type===(null==e?void 0:e.item_type)})))||void 0===r?void 0:r.score)||0,item_banks:null==e||null===(a=e.item_banks)||void 0===a?void 0:a.map((function(t){var n;return Object(s.a)(Object(s.a)({},t),{},{tag_disciplines:null==t||null===(n=t.tag_disciplines)||void 0===n?void 0:n.map((function(n){var r;return Object(s.a)(Object(s.a)({},n),{},{difficulties:null==n||null===(r=n.difficulties)||void 0===r?void 0:r.map((function(r){var a=null==c?void 0:c.contents.find((function(a){return a.item_type===e.item_type&&a.sub_discipline_id===t.sub_discipline_id&&a.tag_discipline_id===n.tag_discipline_id&&a.difficulty===r.difficulty}));return a?Object(s.a)(Object(s.a)({},r),{},{num:null==a?void 0:a.quanlity}):Object(s.a)({},r)}))})}))})}))})})),b=Ht(v),y=b.panel,x=b.score_num_item,v=null===(i=v)||void 0===i?void 0:i.map((function(e,t){var n,r=(null==y||null===(n=y[t])||void 0===n?void 0:n.reduce((function(e,t){return e+t}),0))||0;return Object(s.a)(Object(s.a)({},e),{},{scoreTotal:r*(x[t]||0),questionTotal:r})})),w=[],null==c||null===(o=c.sort_by_item_type)||void 0===o||o.forEach((function(e){var t=v.find((function(t){var n;return(null===(n=Gt.find((function(e){return e.type===(null==t?void 0:t.item_type)})))||void 0===n?void 0:n.name)===e}));w.push(t)})),w=Object(Y.compact)(w),Bt(null==c||null===(l=c.examination_bank)||void 0===l?void 0:l.source),Wt(),k(null==c||null===(u=c.examination_bank)||void 0===u?void 0:u.source),Ie(f),Be.current=f,$e(h),dt((null==c?void 0:c.teach_group_ids)||[]),jt(null==c||null===(d=c.groups)||void 0===d?void 0:d.map((function(e){return e.count})).reduce((function(e,t){return e+t}),0)),rt.current=h,Ye(null!=h&&h.length?h:[0]),Ee(Object(Y.cloneDeep)(w)),I(!1);case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),zt=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Kt({source:x,group_ids:Ge,tag_discipline_ids:Me,teach_group_ids:ut}),Be.current=Me,de(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Bt=function(){var e=Object(l.a)(p.a.mark((function e(t){var n,r,a,i,o,l;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(te.a)("/api/disciplines.json",{method:"get",params:{source:"question",question_source:t}});case 2:a=e.sent,i=[],null==a||null===(n=a.disciplines)||void 0===n||n.forEach((function(e){var t;null==e||null===(t=e.sub_disciplines)||void 0===t||t.forEach((function(e){i=i.concat((null==e?void 0:e.tag_disciplines)||[])}))})),o=null,l=null==a||null===(r=a.disciplines)||void 0===r?void 0:r.map((function(e){var t,n=null==e||null===(t=e.sub_disciplines)||void 0===t?void 0:t.reduce((function(e,t){return e+t.item_count}),0);return o||0===n||(o=e.id),Object(s.a)(Object(s.a)({},e),{},{item_count:n})})),console.log(l,48767874),_e(l),Le(i),ze(o);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Wt=function(){var e=Object(l.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(te.a)("/api/teach_groups.json",{method:"get",params:{is_random_exam:!0}});case 2:t=e.sent,mt((null==t?void 0:t.groups)||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Kt=function(){var e=Object(l.a)(p.a.mark((function e(t){var n,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,Object(te.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:t});case 3:n=e.sent,r=(r=null==n?void 0:n.filter((function(e){var t;return!(null==e||null===(t=e.item_banks)||void 0===t||!t.length)}))).map((function(e){return Object(s.a)(Object(s.a)({},e),{},{scoreTotal:0,score:0,questionTotal:0})})),Ee(r),I(!1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),qt=function(e){Ie(e)},Ht=function(e){var t={contents:[],panel:[],score_num_item:[],score_total:[],error_tips:[]};return null==e||e.forEach((function(e,n){var r,a,i;t.panel.push([]),t.score_num_item.push(null==e?void 0:e.score),t.score_total.push(null==e?void 0:e.scoreTotal),null===(r=t.error_tips)||void 0===r||r.push({name:null===(a=Gt.find((function(t){return t.type===(null==e?void 0:e.item_type)})))||void 0===a?void 0:a.name,score:(null==e?void 0:e.score)||0,scoreTotal:null==e?void 0:e.scoreTotal,item_type:null==e?void 0:e.item_type}),null==e||null===(i=e.item_banks)||void 0===i||i.forEach((function(r){var a;null==r||null===(a=r.tag_disciplines)||void 0===a||a.forEach((function(a){var i;null==a||null===(i=a.difficulties)||void 0===i||i.forEach((function(i){i.num&&(t.panel[n].push(i.num),t.contents.push({difficulty:i.difficulty,item_type:e.item_type,items_count:i.num,sub_discipline_id:r.sub_discipline_id,tag_discipline_id:a.tag_discipline_id}))}))}))}))})),t},Vt=function(){var e=Object(l.a)(p.a.mark((function e(t){var r,a,i,o,l,u,d,f,h,m,g,b,y,k,w,E;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ge.length||Me.length||ut.length){e.next=3;break}return O.b.warn("必须选择考察范围或试题文件夹或教研团队的其中一项"),e.abrupt("return");case 3:r=[],a=[],i=Ht(we),o=0;case 7:if(!(o<i.error_tips.length)){e.next=23;break}if(d=null==i||null===(l=i.panel)||void 0===l||null===(u=l[o])||void 0===u?void 0:u.reduce((function(e,t){return e+t}),0),0!==i.error_tips[o].score||0===d){e.next=14;break}return(h=document.getElementById("".concat(null===(f=i.error_tips[o])||void 0===f?void 0:f.item_type,"_score"))).classList.add("customError"),h.scrollIntoView({block:"start",behavior:"smooth"}),e.abrupt("return");case 14:if(0===i.error_tips[o].score||0!==d){e.next=19;break}return(g=document.getElementById("".concat(null===(m=i.error_tips[o])||void 0===m?void 0:m.item_type,"_sum"))).classList.add("customError"),g.scrollIntoView({block:"start",behavior:"smooth"}),e.abrupt("return");case 19:0!==i.error_tips[o].score&&0!==d&&(null==r||r.push({item_type:null===(b=i.error_tips[o])||void 0===b?void 0:b.item_type,score:(null===(y=i.error_tips[o])||void 0===y?void 0:y.score)||0}),a.push(i.error_tips[o].name));case 20:o++,e.next=7;break;case 23:if(0!==r.length){e.next=26;break}return O.b.warn("不允许每个题型的总分和抽题数量都为0"),e.abrupt("return");case 26:if(q(!0),k=Object(s.a)({contents:i.contents,group_ids:Ge,teach_group_ids:ut,score_settings:r,source:x,sub_discipline_id:0,sort_by_item_type:a,tag_discipline_ids:Me},n),!t){e.next=36;break}return w=Object(s.a)(Object(s.a)({},k),t),e.next=32,Object(te.a)("/api/examination_banks/save_question_list.json",{method:"post",body:w});case 32:return 0===e.sent.status&&O.b.success("保存成功"),q(!1),e.abrupt("return");case 36:if(E={},!c){e.next=43;break}return e.next=40,Object(te.a)("/api/examination_banks/".concat(null==c?void 0:c.id,"/update_random_exam.json"),{method:"post",body:k});case 40:E=e.sent,e.next=46;break;case 43:return e.next=45,Object(te.a)("/api/examination_banks/create_random_exam.json",{method:"post",body:k});case 45:E=e.sent;case 46:0===E.status&&(O.b.success("操作成功"),v.d.push("/paperlibrary?defaultActiveKey=0")),q(!1);case 48:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ut=function(){var e=Object(l.a)(p.a.mark((function e(t,r){var a,i,o,l,c,u,d,f,h,m,g,v,b,y,k,w,E,C,S,_,N,j,T;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ge.length||Me.length||ut.length){e.next=3;break}return O.b.warn("必须选择考察范围或试题文件夹或教研团队的其中一项"),e.abrupt("return");case 3:a=[],i=[],o=Ht(we),l=0;case 7:if(!(l<o.error_tips.length)){e.next=23;break}if(d=null==o||null===(c=o.panel)||void 0===c||null===(u=c[l])||void 0===u?void 0:u.reduce((function(e,t){return e+t}),0),0!==o.error_tips[l].score||0===d){e.next=14;break}return(h=document.getElementById("".concat(null===(f=o.error_tips[l])||void 0===f?void 0:f.item_type,"_score"))).classList.add("customError"),h.scrollIntoView({block:"start",behavior:"smooth"}),e.abrupt("return");case 14:if(0===o.error_tips[l].score||0!==d){e.next=19;break}return(g=document.getElementById("".concat(null===(m=o.error_tips[l])||void 0===m?void 0:m.item_type,"_sum"))).classList.add("customError"),g.scrollIntoView({block:"start",behavior:"smooth"}),e.abrupt("return");case 19:0!==o.error_tips[l].score&&0!==d&&(null==a||a.push({item_type:null===(v=o.error_tips[l])||void 0===v?void 0:v.item_type,score:(null===(b=o.error_tips[l])||void 0===b?void 0:b.score)||0}),i.push(o.error_tips[l].name));case 20:l++,e.next=7;break;case 23:if(0!==a.length){e.next=26;break}return O.b.warn("不允许每个题型的总分和抽题数量都为0"),e.abrupt("return");case 26:if(Q(!0),y=Object(s.a)({contents:o.contents,group_ids:Ge,teach_group_ids:ut,score_settings:a,sort_by_item_type:i,tag_discipline_ids:Me,source:x,sub_discipline_id:0},n),void 0===t||null!=t&&t.single_question_id){e.next=36;break}return y.seleted_item_bank_ids=null==t?void 0:t.seleted_item_bank_ids,e.next=32,Object(te.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:y});case 32:return null!=(k=e.sent)&&k.questions&&((E=Object(Y.cloneDeep)(be)).questionList=null==E||null===(w=E.questionList)||void 0===w?void 0:w.map((function(e){var t;return e.type===r.type?Object(s.a)(Object(s.a)({},e),{},{questions:(null==k||null===(t=k.questions)||void 0===t?void 0:t.questions)||[]}):e})),ye(E)),Q(!1),e.abrupt("return");case 36:if(null==t||void 0===t||!t.single_question_id){e.next=45;break}return y.seleted_item_bank_ids=null==t?void 0:t.seleted_item_bank_ids,y.single_question_id=null==t?void 0:t.single_question_id,e.next=41,Object(te.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:y});case 41:return(C=e.sent)&&((_=Object(Y.cloneDeep)(be)).questionList=null==_||null===(S=_.questionList)||void 0===S?void 0:S.map((function(e){if(e.type===r.type){var t,n,a=Object(Y.cloneDeep)(null==e?void 0:e.questions);return a.splice(r.index,1,null==C||null===(t=C.questions)||void 0===t||null===(n=t.questions)||void 0===n?void 0:n[0]),console.log(null==e?void 0:e.questions,a,r.index,"new_questions"),Object(s.a)(Object(s.a)({},e),{},{questions:a})}return e})),ye(_)),Q(!1),e.abrupt("return");case 45:return e.next=47,Object(te.a)("/api/examination_banks/preview_random_questions.json",{method:"post",body:y});case 47:(N=e.sent).exam&&(j=Zt(N),T=[],null==i||i.forEach((function(e){var t,n=null==j||null===(t=j.questionList)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=Gt.find((function(e){return e.type===(null==t?void 0:t.type)})))||void 0===n?void 0:n.name)===e}));T.push(n)})),T=Object(Y.compact)(T),j.questionList=T,ye(Object(s.a)({},j)),console.log(JSON.stringify(j)),me(!0),document.body.scrollIntoView()),Q(!1);case 50:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Gt=[{type:"SINGLE",name:"单选题"},{type:"MULTIPLE",name:"多选题"},{type:"COMPLETION",name:"填空题"},{type:"JUDGMENT",name:"判断题"},{type:"SUBJECTIVE",name:"简答题"},{type:"PROGRAM",name:"编程题"},{type:"PRACTICAL",name:"实训题"},{type:"COMBINATION",name:"组合题"}],$t=function(e,t,n){return e[t]=e.splice(n,1,e[t])[0],e},Jt=function(){var e=Object(l.a)(p.a.mark((function e(t){var n,r,a,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Object(_.a)(x),x.includes(t)?a=a.filter((function(e){return e!==t})):a.push(t),0!==a.length){e.next=5;break}return O.b.warn("试题来源为必选项"),e.abrupt("return");case 5:null!==(n=a)&&void 0!==n&&n.includes("mine")||($e([]),rt.current=[]),null!==(r=a)&&void 0!==r&&r.includes("teach_groups")||(dt([]),gt.current=[]),k(a),Bt(a),Ie([]),Be.current=[],i={source:a,group_ids:rt.current,tag_discipline_ids:[],teach_group_ids:gt.current},Kt(i);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Zt=function(e){var t={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七"};if(e){var n=e||{},r=n.exam,a=n.single_questions,i=n.multiple_questions,o=n.judgement_questions,l=n.program_questions,c=n.completion_questions,u=n.subjective_questions,d=n.practical_questions,f=n.combination_questions,p=[Object(s.a)({type:"SINGLE",name:"单选题"},a),Object(s.a)({type:"MULTIPLE",name:"多选题"},i),Object(s.a)({type:"COMPLETION",name:"填空题"},c),Object(s.a)({type:"JUDGMENT",name:"判断题"},o),Object(s.a)({type:"SUBJECTIVE",name:"简答题"},u),Object(s.a)({type:"PROGRAM",name:"编程题"},l),Object(s.a)({type:"PRACTICAL",name:"实训题"},d),Object(s.a)({type:"COMBINATION",name:"组合题"},f)],h=[],m=0,g=0,v=p.filter((function(e){return e.questions_count>0})).map((function(e,n){var r;return null===(r=e.questions)||void 0===r||r.forEach((function(e){h.push(e.id),m+=e.score,g+=1})),Object(s.a)(Object(s.a)({},e),{number:t[n+1]})}));return{all_questions_count:g,all_score:m,questionList:v,ids:h,exam:r}}},Qt=null==Oe||null===(t=Oe.find((function(e){return e.id===Re})))||void 0===t?void 0:t.sub_disciplines,Yt=function(){for(var e=null==Te?void 0:Te.filter((function(e){return null==Me?void 0:Me.includes(e.id)})),t=Object(_.a)(e),n=0,r=[],a=0;a<t.length;a++){for(var i="",o=0;o<r.length;o++)if(r[o][0].parent_name==t[a].parent_name){n=1,i=o;break}if(1==n)r[i].push(t[a]),n=0;else if(0==n){var l=new Array;l.push(t[a]),r.push(l)}}return r}();return he?m.a.createElement(le.a,{loading:W,submit:Vt,goBack:function(){return me(!1)},data:be,onTypeScore:function(e){var t,n,r=Object(Y.cloneDeep)(be),a=Object(Y.cloneDeep)(we);r.questionList=null==r||null===(t=r.questionList)||void 0===t?void 0:t.map((function(t){return t.type===e.type?Object(s.a)(Object(s.a)({},t),{},{questions_score:e.scoreTotal}):t})),a=null===(n=a)||void 0===n?void 0:n.map((function(t){return t.item_type===e.type?Object(s.a)(Object(s.a)({},t),{},{score:e.score,scoreTotal:e.scoreTotal}):t})),Ee(a),ye(r),console.log(e,be,we)},onExchange:Ut}):m.a.createElement("section",{className:j.a.wrap,style:{display:o?"flex":"none"}},m.a.createElement("div",{id:"id_left",className:j.a.left,onMouseEnter:function(e){document.getElementById("id_left").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left").style.overflowY="hidden"}},m.a.createElement(r.a,{loading:D,active:!0,paragraph:{rows:5}},we.map((function(e,t){var n;return m.a.createElement("div",{className:j.a.list,key:t},m.a.createElement("div",{className:j.a.name},m.a.createElement("b",null),m.a.createElement("span",null,null===(n=Gt.find((function(t){return t.type===(null==e?void 0:e.item_type)})))||void 0===n?void 0:n.name)),m.a.createElement("aside",null,m.a.createElement("div",null,"共",m.a.createElement("span",{className:j.a.b},e.questionTotal),"题",m.a.createElement("span",{className:j.a.l},"|"),"共",m.a.createElement("span",{className:j.a.r},e.scoreTotal),"分"),m.a.createElement("div",null,t>0?m.a.createElement(S.a,{getPopupContainer:function(e){return document.getElementById("id_left")},title:"上移"},m.a.createElement("span",{onClick:function(){return e=t,n=[],(r=Object(Y.cloneDeep)(we)).length>1&&0!==e&&(n=$t(r,e,e-1)),void Ee(n);var e,n,r},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"})),t<we.length-1?m.a.createElement(S.a,{getPopupContainer:function(e){return document.getElementById("id_left")},title:"下移"},m.a.createElement("span",{onClick:function(){return e=t,n=[],(r=Object(Y.cloneDeep)(we)).length>1&&e!==r.length-1&&(n=$t(r,e,e+1)),void Ee(n);var e,n,r},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"})))))}))),(At=Ht(we),Dt=At.panel,Mt=(Mt=At.score_total).reduce((function(e,t){return e+t}),0),Dt=Object(Y.flatten)(Dt).reduce((function(e,t){return e+t}),0),m.a.createElement("div",{className:j.a.total},m.a.createElement("div",null,m.a.createElement("img",{src:B.a}),m.a.createElement("span",null,"题数(道)"),m.a.createElement("aside",null,Dt)),m.a.createElement("aside",null),m.a.createElement("div",null,m.a.createElement("img",{src:K.a}),m.a.createElement("span",null,"总分(分)"),m.a.createElement("aside",null,Mt))))),m.a.createElement("div",{className:j.a.right},m.a.createElement(w,{className:j.a.tabs,value:1,onChange:function(){return i(0)}}),m.a.createElement("section",{className:j.a.topWarp},m.a.createElement("div",{className:j.a.title},m.a.createElement("b",null),m.a.createElement("span",null,"抽题组卷"),m.a.createElement("div",null,"STEP2")," "),m.a.createElement("div",{className:j.a.source},m.a.createElement("b",null,"*"),m.a.createElement("span",null,"试题来源"),m.a.createElement("aside",null,m.a.createElement("div",{onClick:function(){return Jt("mine")}}," ",m.a.createElement(C.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 Jt("teach_groups")}}," ",m.a.createElement(C.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 Jt("public")}},m.a.createElement(C.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:j.a.folder,onClick:function(){Ct(!0),He(!0),rt.current=Ge,jt((null==Tt?void 0:Tt.map((function(e){return e.count})).reduce((function(e,t){return e+t}),0))||0)}},m.a.createElement("img",{src:M.a}),m.a.createElement("span",null,"选择试题文件夹"),m.a.createElement(S.a,{title:"选中项仅包括该文件夹下的试题,不包括子文件夹,且系统取您选中的文件夹和考查范围中的试题的并集作为随机对象。"},m.a.createElement("img",{src:A.a}))),(null==x?void 0:x.includes("teach_groups"))&&m.a.createElement("div",{className:j.a.folder,onClick:function(){lt(!0),gt.current=ut}},m.a.createElement("img",{src:H.a}),m.a.createElement("span",null,"选择教研团队")))),(null==x?void 0:x.includes("mine"))&&m.a.createElement("div",{className:j.a.choice},m.a.createElement("div",{className:j.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"已选文件夹")),m.a.createElement(G.a,{type:2,value:Tt,onChange:function(e){var t=Ge.filter((function(t){return t!==e}));Kt({source:x,group_ids:t,tag_discipline_ids:Me,teach_group_ids:ut}),$e(t),rt.current=t}})),(null==x?void 0:x.includes("teach_groups"))&&m.a.createElement("div",{className:j.a.choice},m.a.createElement("div",{className:j.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"已选教研团队")),m.a.createElement(G.a,{icon:U.a,type:2,value:Lt,onChange:function(e){var t=ut.filter((function(t){return t!==e}));Kt({source:x,group_ids:Ge,tag_discipline_ids:Me,teach_group_ids:t}),dt(t),gt.current=t}})),m.a.createElement("div",{className:j.a.range},m.a.createElement("div",{className:j.a.name},m.a.createElement("b",null),m.a.createElement("span",null,"考察范围")),m.a.createElement("div",{onClick:function(){null!==Re?(Be.current=Me,de(!0)):O.b.warn("考察范围没有知识点可以选择")},className:j.a.btn},m.a.createElement("img",{src:P.a})," 选择范围"),m.a.createElement("div",{className:j.a.name},m.a.createElement("b",{className:j.a.num}),m.a.createElement("span",null,"已选知识点")),m.a.createElement("div",{className:j.a.knWarp},null==Yt?void 0:Yt.map((function(e,t){return m.a.createElement(m.a.Fragment,{key:t},m.a.createElement("div",{className:j.a.kn},m.a.createElement("span",null,t+1)," ",m.a.createElement("span",null,null==e?void 0:e[0].parent_name)),m.a.createElement(G.a,{type:1,value:null==e?void 0:e.filter((function(e){return!!e.item_count})),onChange:function(e){var t=Me.filter((function(t){return t!==e}));Kt({source:x,group_ids:Ge,tag_discipline_ids:t,teach_group_ids:ut}),Ie(t),Be.current=t}}))}))))),console.log("-----",we),m.a.createElement(r.a,{loading:D,active:!0,paragraph:{rows:5}},we.map((function(e,t){return m.a.createElement($.a,{key:t,value:e,onChange:function(e){return function(e,t){var n,r,a=Object(Y.cloneDeep)(we);a[t]=e;var i=Ht([a[t]]),o=null==i||null===(n=i.panel)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.reduce((function(e,t){return e+t}),0);a[t].questionTotal=o,Ee(a);var l=document.getElementsByClassName("customError");null==l||l.forEach((function(e){var t;null==e||null===(t=e.classList)||void 0===t||t.remove("customError")}))}(e,t)}})})),m.a.createElement("div",{className:j.a.btns},m.a.createElement(a.a,{onClick:function(){i(0),document.body.scrollIntoView()}},"上一步"),m.a.createElement(a.a,{loading:W,onClick:function(){return Vt()}},"提交"),m.a.createElement(a.a,{loading:Z,onClick:function(){return Ut()},type:"primary"},"预览")))),m.a.createElement(E.a,{centered:!0,closable:!1,destroyOnClose:!0,className:j.a.modal,visible:ue,title:null,width:"1200px",onOk:zt,onCancel:function(){Ie(Be.current),de(!1),ae("")}},m.a.createElement("div",{className:j.a.modalBody},m.a.createElement("div",{className:j.a.left},m.a.createElement("div",{className:j.a.title},m.a.createElement("img",{src:R.a}),m.a.createElement("span",null,"试题范围")),m.a.createElement("div",{className:j.a.l},null==Oe?void 0:Oe.map((function(e){var t,n=!1;re?null===(t=e.sub_disciplines)||void 0===t||t.forEach((function(e){var t;null===(t=e.tag_disciplines)||void 0===t||t.forEach((function(e){var t;n||(n=(null===(t=e.name)||void 0===t?void 0:t.includes(re))&&0!==e.item_count)}))})):n=!0;return m.a.createElement(m.a.Fragment,{key:e.id},!!e.item_count&&n&&m.a.createElement("div",{onClick:function(){return ze(e.id)},className:"".concat(j.a.name," ").concat(e.id===Re?j.a.active:"")},m.a.createElement("b",null),m.a.createElement("span",null,e.name)))})))),m.a.createElement("div",{className:j.a.right},m.a.createElement("div",{className:j.a.inputWarp},m.a.createElement(se,{onChange:function(e){return ae(e.target.value)},placeholder:"请输入知识点",value:re})),m.a.createElement("div",{className:j.a.l},null==Qt?void 0:Qt.map((function(e,t){var n,r=Object(s.a)(Object(s.a)({},e),{},{tag_disciplines:null==e||null===(n=e.tag_disciplines)||void 0===n?void 0:n.filter((function(e){return 0!==e.item_count}))});return m.a.createElement(ee,{search:re,onChange:qt,key:e.id,value:Me,options:r})})))))),m.a.createElement(E.a,{centered:!0,title:"选择文件夹",visible:qe,width:718,destroyOnClose:!0,onCancel:function(){$e(rt.current),He(!1),jt(0)},footer:m.a.createElement("div",{style:{display:"flex",alignItems:"center"}},m.a.createElement("span",{style:{flex:"1",textAlign:"left"}},"已选",Ge.length||0,"个文件夹,共(",Nt||0,")道题"),m.a.createElement(a.a,{onClick:function(){$e(rt.current),jt(0),He(!1)}},"取消"),m.a.createElement(a.a,{type:"primary",onClick:function(){Kt({source:x,group_ids:Ge,tag_discipline_ids:Me,teach_group_ids:ut}),rt.current=Ge,He(!1)}},"确认"))},m.a.createElement("aside",{className:j.a.exportModal},Et&&m.a.createElement(oe,{treeData:yt,defaultValue:Qe,value:Ge,onChange:function(e,t){var n;jt(null===(n=t.selectedNodes)||void 0===n?void 0:n.map((function(e){return e.count})).reduce((function(e,t){return e+t}),0)),$e(e)}}))),m.a.createElement(E.a,{centered:!0,title:"选择教研团队",visible:ot,width:718,destroyOnClose:!0,onCancel:function(){dt(gt.current),lt(!1)},onOk:function(){Kt({source:x,group_ids:Ge,tag_discipline_ids:Me,teach_group_ids:ut}),gt.current=ut,lt(!1)}},m.a.createElement("aside",{className:j.a.teachModal},m.a.createElement("div",{className:j.a.head},m.a.createElement("div",{className:j.a.li}),m.a.createElement("div",{className:j.a.li},"团队名称"),m.a.createElement("div",{className:j.a.li},"共享题目数量")),m.a.createElement("div",{className:j.a.wraps},null==ht?void 0:ht.map((function(e){return m.a.createElement("div",{key:e.id,className:j.a.body},m.a.createElement("div",{className:j.a.li},m.a.createElement(C.a,{onChange:function(){var t=e.id,n=Object(_.a)(ut);ut.includes(t)?n=n.filter((function(e){return e!==t})):n.push(t),dt(n)},checked:null==ut?void 0:ut.includes(e.id)})),m.a.createElement("div",{title:e.name,className:j.a.li},e.name),m.a.createElement("div",{className:j.a.li},e.item_bank_count))}))))))},ue=d.a.TextArea;t.default=Object(v.a)((function(e){return{paperlibrary:e.paperlibrary,user:e.user,globalSetting:e.globalSetting}}))((function(e){e.paperlibrary,e.user,e.globalSetting;var t=e.dispatch,n=Object(h.useState)(0),f=Object(u.a)(n,2),b=f[0],x=f[1],k=c.a.useForm(),E=Object(u.a)(k,1)[0],C=Object(h.useState)({}),S=Object(u.a)(C,2),O=S[0],_=S[1],N=Object(h.useState)(!0),j=Object(u.a)(N,2),T=j[0],L=j[1],A=Object(h.useState)(null),D=Object(u.a)(A,2),M=D[0],I=D[1],P=Object(g.i)().id;console.log(P,"editId"),Object(h.useEffect)((function(){return t({type:"globalSetting/footerToggle",payload:!1}),function(){t({type:"globalSetting/footerToggle",payload:!0})}}),[]),Object(h.useEffect)((function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}}),[]);Object(h.useEffect)((function(){P?F():L(!1)}),[P]);var F=function(){var e=Object(l.a)(p.a.mark((function e(){var t,n,r,a,i,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(te.a)("/api/examination_banks/".concat(P,"/edit_random_exam.json"),{method:"get",params:{}});case 2:null!=(t=e.sent)&&t.examination_bank&&(o={difficulty:null==t||null===(n=t.examination_bank)||void 0===n?void 0:n.difficulty,exam_notes:null==t||null===(r=t.examination_bank)||void 0===r?void 0:r.exam_notes,name:null==t||null===(a=t.examination_bank)||void 0===a?void 0:a.name,time:null==t||null===(i=t.examination_bank)||void 0===i?void 0:i.time},L(!1),_(Object(s.a)({},o)),E.setFieldsValue(Object(s.a)({},o)),I(Object(s.a)(Object(s.a)({},t),{},{id:P})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=Object(l.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t){e.next=3;break}return x(t),e.abrupt("return");case 3:return e.next=5,E.validateFields();case 5:x(t);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return m.a.createElement("section",{className:y.a.wrap},m.a.createElement(r.a,{loading:T,active:!0,paragraph:{rows:5}},m.a.createElement("div",{className:y.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===b&&m.a.createElement(w,{value:b,onChange:R}),0===b&&m.a.createElement("section",{className:y.a.oneWrap},m.a.createElement("div",{className:y.a.title},m.a.createElement("b",null),m.a.createElement("span",null,"基本信息"),m.a.createElement("div",null,"STEP1")," "),m.a.createElement(c.a,{className:y.a.formWrap,form:E,layout:"horizontal",onValuesChange:function(e){_(Object(s.a)({},E.getFieldsValue()))}},m.a.createElement(c.a.Item,{label:"试卷名称",name:"name",rules:[{required:!0,message:"试卷名称不能为空"},{pattern:/^(?!(\s+$))/,message:"输入框不能全为空格"}]},m.a.createElement(d.a,{className:y.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(o.a,{min:1,parser:function(e){var t=parseInt(e);return Object(Y.isNaN)(t)?"":t},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(i.a.Group,{style:{display:"flex",width:286,justifyContent:"space-between"},size:"large"},m.a.createElement(i.a.Button,{className:y.a.rb,value:1},"简单"),m.a.createElement(i.a.Button,{className:y.a.rb,value:2},"适中"),m.a.createElement(i.a.Button,{className:y.a.rb,value:3},"困难"))),m.a.createElement(c.a.Item,{label:"考试须知",name:"exam_notes"},m.a.createElement(ue,{placeholder:"考生必须严格遵守考场纪律,不准冒名顶替,不准有任何作弊行为。如发现违纪,并给予严厉处分。",rows:4,maxLength:300}))),m.a.createElement("div",{className:y.a.btns},m.a.createElement(a.a,{className:"mr40",onClick:function(){return v.d.push("/paperlibrary")}},"返回"),m.a.createElement(a.a,{type:"primary",onClick:Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.validateFields();case 2:x(1);case 3:case"end":return e.stop()}}),e)})))},"下一步"))),m.a.createElement(ce,{tabs:b,dispatch:t,editData:M,setFatherTabs:x,formValue:O})))}))},"E/GV":
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./src/assets/images/paper/swenjianjia.svg ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/swenjianjia.1640bf70.svg"},ELLl:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
|
|
|
\*************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(a),t.state.closeBrackets=null),n&&(i(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(a))}));var a={Backspace:function(t){var a=l(t);if(!a||t.getOption("disableInput"))return e.Pass;for(var i=r(a,"pairs"),o=t.listSelections(),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=s(t,o[c].head);if(!u||i.indexOf(u)%2!=0)return e.Pass}for(c=o.length-1;c>=0;c--){var d=o[c].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=l(t),a=n&&r(n,"explode");if(!a||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),o=0;o<i.length;o++){if(!i[o].empty())return e.Pass;var c=s(t,i[o].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),i=t.listSelections();for(var n=0;n<i.length;n++){var r=i[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function i(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";a[r]||(a[r]=o(n))}}function o(t){return function(a){return function(t,a){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;var o=r(i,"pairs"),s=o.indexOf(a);if(-1==s)return e.Pass;for(var u,d=r(i,"closeBefore"),f=r(i,"triples"),p=o.charAt(s+1)==a,h=t.listSelections(),m=s%2==0,g=0;g<h.length;g++){var v,b=h[g],y=b.head,x=t.getRange(y,n(y.line,y.ch+1));if(m&&!b.empty())v="surround";else if(!p&&m||x!=a)if(p&&y.ch>1&&f.indexOf(a)>=0&&t.getRange(n(y.line,y.ch-2),y)==a+a){if(y.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(y.line,y.ch-2))))return e.Pass;v="addFour"}else if(p){var k=0==y.ch?" ":t.getRange(n(y.line,y.ch-1),y);if(e.isWordChar(x)||k==a||e.isWordChar(k))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;v="both"}else v=p&&c(t,y)?"both":f.indexOf(a)>=0&&t.getRange(y,n(y.line,y.ch+3))==a+a+a?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var w=s%2?o.charAt(s-1):a,E=s%2?a:o.charAt(s+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var a=t.getSelections();for(r=0;r<a.length;r++)a[r]=w+a[r]+E;for(t.replaceSelections(a,"around"),a=t.listSelections().slice(),r=0;r<a.length;r++)a[r]=(i=a[r],o=void 0,o=e.cmpPos(i.anchor,i.head)>0,{anchor:new n(i.anchor.line,i.anchor.ch+(o?-1:1)),head:new n(i.head.line,i.head.ch+(o?1:-1))});t.setSelections(a)}else"both"==u?(t.replaceSelection(w+E,null),t.triggerElectric(w+E),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(w+w+w+w,"before"),t.execCommand("goCharRight"));var i,o}))}(a,t)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function s(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(t.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(e,t){e.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(e,t){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var c=i[s];if(!l(c))return!1;var u=e[c],d=t[c];if(!1===(a=n?n.call(r,u,d,c):void 0)||void 0===a&&u!==d)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(e,t,n){e.exports=n.p+"static/sren.1cbce50b.svg"},HPRh:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/median.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/median.766cb706.svg"},Hfvn:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/paper/wenjian.svg ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/wenjian.ea3b4170.svg"},HmJG:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/upload-image/index.less ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,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(e,t,n){e.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"}},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(e,t,n){e.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(e,t,n){"use strict";n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return E}));var r=n("1OyB"),a=n("vuIU"),i=n("Ji7U"),o=n("LK+K"),l=n("q1tI"),s=n("rePB"),c=n("Ff2n"),u=n("ODXe"),d=n("4IlW"),f=n("bX4T"),p=n("YrtM"),h=n("TSYQ"),m=n.n(h),g=n("+nKL"),v=n("8OUc"),b=l.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,a=e.flattenOptions,i=e.childrenAsData,o=e.values,h=e.searchValue,b=e.multiple,y=e.defaultActiveFirstOption,x=e.height,k=e.itemHeight,w=e.notFoundContent,E=e.open,C=e.menuItemSelectedIcon,S=e.virtual,O=e.onSelect,_=e.onToggleOpen,N=e.onActiveValue,j=e.onScroll,T=e.onMouseEnter,L="".concat(n,"-item"),A=Object(p.a)((function(){return a}),[E,a],(function(e,t){return t[0]&&e[1]!==t[1]})),D=l.useRef(null),M=function(e){e.preventDefault()},I=function(e){D.current&&D.current.scrollTo({index:e})},P=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=A.length,r=0;r<n;r+=1){var a=(e+r*t+n)%n,i=A[a],o=i.group,l=i.data;if(!o&&!l.disabled)return a}return-1},F=l.useState((function(){return P(0)})),R=Object(u.a)(F,2),z=R[0],B=R[1],W=function(e){B(e);var t=A[e];t?N(t.data.value,e):N(null,-1)};l.useEffect((function(){W(!1!==y?P(0):-1)}),[A.length,h]),l.useEffect((function(){var e=setTimeout((function(){if(!b&&E&&1===o.size){var e=Array.from(o)[0],t=A.findIndex((function(t){return t.data.value===e}));W(t),I(t)}}));return function(){return clearTimeout(e)}}),[E]);var K=function(e){void 0!==e&&O(e,{selected:!o.has(e)}),b||_(!1)};if(l.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case d.a.UP:case d.a.DOWN:var n=0;if(t===d.a.UP?n=-1:t===d.a.DOWN&&(n=1),0!==n){var r=P(z+n,n);I(r),W(r)}break;case d.a.ENTER:var a=A[z];a&&!a.data.disabled?K(a.data.value):K(void 0),E&&e.preventDefault();break;case d.a.ESC:_(!1)}},onKeyUp:function(){},scrollTo:function(e){I(e)}}})),0===A.length)return l.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(L,"-empty"),onMouseDown:M},w);function q(e){var t=A[e];if(!t)return null;var n=t.data||{},a=n.value,s=n.label,c=n.children,u=Object(f.a)(n,!0),d=i?c:s;return t?l.createElement("div",Object.assign({"aria-label":"string"==typeof d?d:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":o.has(a)}),a):null}return l.createElement(l.Fragment,null,l.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},q(z-1),q(z),q(z+1)),l.createElement(g.a,{itemKey:"key",ref:D,data:A,height:x,itemHeight:k,fullHeight:!1,onMouseDown:M,onScroll:j,virtual:S,onMouseEnter:T},(function(e,t){var n,r=e.group,a=e.groupOption,u=e.data,d=u.label,f=u.key;if(r)return l.createElement("div",{className:m()(L,"".concat(L,"-group"))},void 0!==d?d:f);var p=u.disabled,h=u.value,g=u.title,b=u.children,y=u.style,x=u.className,k=Object(c.a)(u,["disabled","value","title","children","style","className"]),w=o.has(h),E="".concat(L,"-option"),S=m()(L,E,x,(n={},Object(s.a)(n,"".concat(E,"-grouped"),a),Object(s.a)(n,"".concat(E,"-active"),z===t&&!p),Object(s.a)(n,"".concat(E,"-disabled"),p),Object(s.a)(n,"".concat(E,"-selected"),w),n)),O=i?b:d,_=!C||"function"==typeof C||w;return l.createElement("div",Object.assign({},k,{"aria-selected":w,className:S,title:g,onMouseMove:function(){z===t||p||W(t)},onClick:function(){p||K(h)},style:y}),l.createElement("div",{className:"".concat(E,"-content")},O||h),l.isValidElement(C)||w,_&&l.createElement(v.a,{className:"".concat(L,"-option-state"),customizeIcon:C,customizeIconProps:{isSelected:w}},w?"✓":null))})))}));b.displayName="OptionList";var y=b,x=function(){return null};x.isSelectOption=!0;var k=x,w=function(){return null};w.isSelectOptGroup=!0;var E=w,C=n("VTBJ"),S=n("Zm9Q");function O(e){var t=e.key,n=e.props,r=n.children,a=n.value,i=Object(c.a)(n,["children","value"]);return Object(C.a)({key:t,value:void 0!==a?a:t,children:r},i)}function _(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(S.a)(e).map((function(e,n){if(!l.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,a=e.key,i=e.props,o=i.children,s=Object(c.a)(i,["children"]);return t||!r?O(e):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},s),{},{options:_(o)})})).filter((function(e){return e}))}var N=n("2Qr1"),j=n("qNPg"),T=n("U8pU"),L=n("Kwbf"),A=n("WKfj");var D=function(e){var t=e.mode,n=e.options,r=e.children,a=e.backfill,i=e.allowClear,o=e.placeholder,s=e.getInputElement,c=e.showSearch,u=e.onSearch,d=e.defaultOpen,f=e.autoFocus,p=e.labelInValue,h=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,b=void 0!==c?c:v||"combobox"===t,y=n||_(r);if(Object(L.a)("tags"!==t||y.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=y.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(L.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)("combobox"===t||!a,"`backfill` only works with `combobox` mode."),Object(L.a)("combobox"===t||!s,"`getInputElement` only work with `combobox` mode."),Object(L.b)("combobox"!==t||!s||!i||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&"combobox"!==t&&"tags"!==t&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!d||f,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=h){var k=Object(A.d)(h);Object(L.a)(!p||k.every((function(e){return"object"===Object(T.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(L.a)(!v||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var w=null;Object(S.a)(r).some((function(e){if(!l.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(S.a)(e.props.children).every((function(t){return!(l.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(w=t.type,!1)})):(w=t,!0))})),w&&Object(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(w.displayName||w.name||w,"`.")),Object(L.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(j.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:_,flattenOptions:N.d,getLabeledValue:N.e,filterOptions:N.b,isValueDisabled:N.g,findValueOption:N.c,warningProps:D,fillOptionsWithMissingValue:N.a}),I=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=l.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(a.a)(n,[{key:"render",value:function(){return l.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(l.Component);I.Option=k,I.OptGroup=E;var P=I;t.c=P},M8RZ:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/components/modal.tsx ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=n(/*! react */"q1tI"),s=n.n(l),c=n(/*! react-dom */"i8i4"),u=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e){var a;Object(r.a)(this,n),a=t.call(this,e);var i=window.document;return a.node=i.createElement("div"),i.body.appendChild(a.node),a}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(s.a.Component)},NvD2:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: isCheckDisabled, conductCheck */
|
|
|
/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function a(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function i(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,a=t.checkable;return!(!n&&!r)||!1===a}function o(e,t,n,o){var l,s=[];l=o||i;var c=new Set(e.filter((function(e){var t=!!n[e];return t||s.push(e),t}))),u=new Map,d=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,a=u.get(r);a||(a=new Set,u.set(r,a)),a.add(t),d=Math.max(d,r)})),Object(r.a)(!s.length,"Tree missing follow keys: ".concat(s.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var i=new Set(e),o=new Set,l=0;l<=n;l+=1){(t.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,a=e.children,o=void 0===a?[]:a;i.has(t)&&!r(n)&&o.filter((function(e){return!r(e.node)})).forEach((function(e){i.add(e.key)}))}))}for(var s=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!s.has(e.parent.key))if(r(e.parent.node))s.add(t.key);else{var a=!0,l=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);a&&!n&&(a=!1),l||!n&&!o.has(t)||(l=!0)})),a&&i.add(t.key),l&&o.add(t.key),s.add(t.key)}}))}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(a(o,i))}}(c,u,d,l):function(e,t,n,r,i){for(var o=new Set(e),l=new Set(t),s=0;s<=r;s+=1){(n.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,a=void 0===r?[]:r;o.has(t)||l.has(t)||i(n)||a.filter((function(e){return!i(e.node)})).forEach((function(e){o.delete(e.key)}))}))}l=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!c.has(e.parent.key))if(i(e.parent.node))c.add(t.key);else{var r=!0,a=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),a||!n&&!l.has(t)||(a=!0)})),r||o.delete(t.key),a&&l.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(a(l,o))}}(c,t.halfCheckedKeys,u,d,l)}},O2Wb:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.less?modules ***!
|
|
|
\******************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.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(e,t,n){"use strict";var r=n("U8pU"),a=n("VTBJ"),i=n("Ff2n"),o=n("q1tI"),l=n("uciX"),s=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,d=void 0===u?["hover"]:u,f=e.mouseEnterDelay,p=void 0===f?0:f,h=e.mouseLeaveDelay,m=void 0===h?.1:h,g=e.overlayStyle,v=e.prefixCls,b=void 0===v?"rc-tooltip":v,y=e.children,x=e.onVisibleChange,k=e.afterVisibleChange,w=e.transitionName,E=e.animation,C=e.placement,S=void 0===C?"right":C,O=e.align,_=void 0===O?{}:O,N=e.destroyTooltipOnHide,j=void 0!==N&&N,T=e.defaultVisible,L=e.getTooltipContainer,A=e.overlayInnerStyle,D=Object(i.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),M=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return M.current}));var I=Object(a.a)({},D);"visible"in e&&(I.popupVisible=e.visible);var P=!1,F=!1;if("boolean"==typeof j)P=j;else if(j&&"object"===Object(r.a)(j)){var R=j.keepParent;P=!0===R,F=!1===R}return o.createElement(l.a,Object.assign({popupClassName:n,prefixCls:b,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,a=e.id;return[o.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:b,id:a,overlay:r,overlayInnerStyle:A})]},action:d,builtinPlacements:s.a,popupPlacement:S,ref:M,popupAlign:_,getPopupContainer:L,onPopupVisibleChange:x,afterPopupVisibleChange:k,popupTransitionName:w,popupAnimation:E,defaultPopupVisible:T,destroyPopupOnHide:P,autoDestroy:F,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:p},I),y)}));t.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(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return l})),n.d(t,"k",(function(){return s})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"j",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),a=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),i=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function l(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function s(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function d(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,a=t.children;n.push(r),e(a)}))}(t[e].children),n}function f(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),a=r.top,i=r.bottom,o=r.height,l=Math.max(.25*o,2);return n<=a+l?-1:n>=i-l?1:0}function p(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function h(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(a.a)(e))return Object(i.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var a=t[r];if(a){n.add(r);var i=a.parent;a.node.disabled||i&&e(i.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},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/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/slicedToArray.js */
|
|
|
/*! 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 ./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)) */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),a=n("rAM+"),i=(n("miYZ"),n("tsqr")),o=n("tJVT"),l=n("jrin"),s=n("q1tI"),c=n.n(s),u=n("VrN/"),d=n.n(u),f=n("bdgK"),p=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),h=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(s.useMemo)((function(){return""}),[n]));return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},m=n("0Owb"),g=(n("dejd"),n("C+DQ"),[{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 v(e){var t=e.onActionCallback,n=e.title,r=e.icon,a=e.actionName,i=e.className,o=void 0===i?"":i,l=e.children;return c.a.createElement("a",{title:n,className:o,onClick:function(){t(a)}},c.a.createElement("i",{className:"md-iconfont ".concat(r)}),l)}var b=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,a=e.fullScreen,i=e.insertTemp,o=e.hidetoolBar,l=[].concat(g,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(e,t){return c.a.createElement("li",{key:t},e.actionName?c.a.createElement(v,Object(m.a)({},e,{onActionCallback:r})):c.a.createElement("span",{className:"v-line"}))})),n?c.a.createElement("li",null,c.a.createElement(v,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},c.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,i&&c.a.createElement("li",null,c.a.createElement(v,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(i),onActionCallback:r},c.a.createElement("span",{className:"fill-tip"},"插入模板"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(v,{icon:"".concat(a?"icon-shrink":"icon-enlarge"),title:a?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},y=n("M8RZ"),x=(n("+L6B"),n("2/Rp")),k=(n("y8nQ"),n("Vl3Y")),w=(n("5NDa"),n("5rEg")),E={labelCol:{span:4},wrapperCol:{span:20}},C=function(e){var t=e.callback,n=e.onCancel;return c.a.createElement(k.a,Object(m.a)({},E,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),c.a.createElement(k.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},c.a.createElement(w.a,null)),c.a.createElement(k.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},c.a.createElement(w.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:n},"取消")))},S=n("7ahc"),O=(n("HmJG"),n("BjJ7")),_=k.a.useForm,N={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},T=function(e){var t=e.callback,n=e.onCancel,r=_(),a=Object(o.a)(r,1)[0];function i(e,t){a.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type})}return c.a.createElement(k.a,Object(m.a)({form:a},j,{className:"upload-image-panel",onFinish:function(e){t(e)}}),c.a.createElement(k.a.Item,{label:"图片地址",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(k.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}]},c.a.createElement(w.a,{style:N})),c.a.createElement(L,{onFileChange:function(e){A(e.target.files[0],i)}}))),c.a.createElement(k.a.Item,{label:"图片描述",name:"alt",rules:[{required:!0,message:"请输入图片描述"}]},c.a.createElement(w.a,{style:{width:264}})),c.a.createElement(k.a.Item,{style:{textAlign:"right"}},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:n},"取消")))};function L(e){var t=e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"本地上传",c.a.createElement("input",{type:"file",onChange:t}))}function A(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(O.a,"/api/attachments.json")),r.send(n)}n("giR+");var D,M,I=n("fyUT"),P=(n("7Kak"),n("9yH6")),F=P.a.Group,R={margin:"0 8px"},z=function(e){var t=e.callback,n=e.onCancel;return c.a.createElement(k.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},c.a.createElement("div",{className:"flex-container"},c.a.createElement("span",{style:R},"单元格数:"),c.a.createElement("span",{style:R},"行数"),c.a.createElement(k.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},c.a.createElement(I.a,null)),c.a.createElement("span",{style:R},"列数"),c.a.createElement(k.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},c.a.createElement(I.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12}},c.a.createElement("span",{style:R},"对齐方式:"),c.a.createElement(k.a.Item,{name:"align"},c.a.createElement(F,null,c.a.createElement(P.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(P.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(P.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(P.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:n},"取消")))},B=n("m3rI"),W="------------",K={default:W,left:":".concat(W),center:":".concat(W,":"),right:"".concat(W,":")},q=n("9VGf");function H(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var V=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",U=(D={},Object(l.a)(D,V+"-B","bold"),Object(l.a)(D,V+"-I","italic"),D),G=(M={},Object(l.a)(M,"link","添加链接"),Object(l.a)(M,"code-block","添加代码块"),Object(l.a)(M,"upload-image","添加图片"),Object(l.a)(M,"add-table","添加表格"),M);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,u=e.onChange,m=e.width,g=void 0===m?"100%":m,v=e.height,x=void 0===v?400:v,k=e.miniToolbar,w=void 0!==k&&k,E=e.isFocus,O=void 0!==E&&E,_=e.watch,N=e.insertTemp,j=e.mode,L=void 0===j?"markdown":j,D=e.id,M=void 0===D?"markdown-editor-id":D,I=e.showResizeBar,P=void 0!==I&&I,F=e.noStorage,R=void 0!==F&&F,W=e.showNullButton,V=void 0!==W&&W,$=e.hidetoolBar,J=void 0!==$&&$,Z=e.fullScreen,Q=void 0!==Z&&Z,Y=e.onBlur,X=e.onCMBeforeChange,ee=e.onFullScreen,te=e.className,ne=void 0===te?"":te,re=e.disablePaste,ae=void 0!==re&&re,ie=e.placeholder,oe=void 0===ie?"":ie,le=e.values,se=void 0===le?"":le,ce=Object(s.useState)(null),ue=Object(o.a)(ce,2),de=ue[0],fe=ue[1],pe=Object(s.useState)(n),he=Object(o.a)(pe,2),me=he[0],ge=he[1],ve=Object(s.useState)(_),be=Object(o.a)(ve,2),ye=be[0],xe=be[1],ke=Object(s.useState)(Q),we=Object(o.a)(ke,2),Ee=we[0],Ce=we[1],Se=Object(s.useState)(""),Oe=Object(o.a)(Se,2),_e=Oe[0],Ne=Oe[1],je=Object(s.useState)(0),Te=Object(o.a)(je,2),Le=Te[0],Ae=Te[1],De=Object(s.useState)(x),Me=Object(o.a)(De,2),Ie=Me[0],Pe=Me[1],Fe=Object(s.useState)(!1),Re=Object(o.a)(Fe,2),ze=(Re[0],Re[1]),Be=Object(s.useRef)(),We=Object(s.useRef)(),Ke=Object(s.useRef)(),qe=Object(s.useRef)();Object(s.useEffect)((function(){ge(se),null==de||de.setValue(se)}),[se]),Object(s.useEffect)((function(){null==ee||ee(Ee)}),[Ee]),Object(s.useEffect)((function(){if(Be.current){var e=d.a.fromTextArea(Be.current,{mode:L,lineNumbers:!w,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ae){var r=n.clipboardData;if(r){var a=r.types.toString(),o=r.items,l=["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"];if("Files"===a||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==L)return;try{var s,c=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(c=o[0]);var u=c.getAsFile(),d=u.name.split(".").pop();A(u,(function(t){var n,r,a;t.id?(null==u||null===(n=u.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection(".concat(t.content_type,")")):(null==u||null===(r=u.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==u||null===(a=u.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(u.type,'&disposition=inline" target="_blank">').concat(u.name,"</a>")):l.includes(d)?e.replaceSelection('<a href="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(u.name,"</a>")):e.replaceSelection("[".concat(u.name,"](").concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){i.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return O&&e.focus(),e.on("paste",t),fe(e),function(){e.off("paste",t)}}}),[]);var He=Object(s.useCallback)((function(){We.current}),[Ie,We,Ee]);Object(s.useEffect)((function(){if(de){var e=function(){var e=new f.default((function(e){var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(He(),de.setSize("100%","100%"),de.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Be.current.parentElement),e}();return function(){e.unobserve(Be.current.parentElement)}}}),[de,He]),Object(s.useEffect)((function(){if(de){for(var e=[],t=function(){var t=r[n],a=(i=Object(o.a)(t,2))[0],s=i[1],c=Object(l.a)({},a,(function(){Ve(s)}));e.push(c),de.addKeyMap(c)},n=0,r=Object.entries(U);n<r.length;n++){var i;t()}return function(){var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;de.removeKeyMap(r)}}catch(e){n.e(e)}finally{n.f()}}}}),[de]),Object(s.useEffect)((function(){Q!==Ee&&Ce(Q)}),[Q]),Object(q.a)((function(){if(!R&&Le>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(M);e>=Le+1e4&&(!t||t!==me)&&(window.sessionStorage.setItem(M,me),ze(!0))}}),1e4),Object(s.useEffect)((function(){xe(_)}),[de,_]),Object(s.useEffect)((function(){de&&O&&de.focus()}),[de,O]),Object(s.useEffect)((function(){if(ye&&de){var e=de.getScrollerElement();function t(e){var t=e.target;if(qe.current){var n=t.scrollTop/t.scrollHeight;qe.current.scrollTop=qe.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[de,ye]),Object(s.useEffect)((function(){if(de&&X){function e(e,t){X(e,t)}return de.on("beforeChange",e),function(){de.off("beforeChange",e)}}}),[de,X]),Object(s.useEffect)((function(){if(de&&Y){function e(){Y(de.getValue())}return de.on("blur",e),function(){de.off("blur",e)}}}),[de,Y]),Object(s.useEffect)((function(){if(de){function e(e){var t=e.getValue();ge(t),Ae((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),u&&u(t)}return de.on("change",e),function(){de.off("change",e)}}}),[de,u]),Object(s.useEffect)((function(){de&&(null==n?(de.setValue(""),ge("")):n!==de.getValue()&&(de.setValue(n),ge(n),de.setCursor(de.lineCount(),0)))}),[de,n]);var Ve=Object(s.useCallback)((function(e){var t=de.getCursor(),n=de.getSelection(),r=n.split("\n");switch(e){case"bold":return de.replaceSelection("**"+n+"**"),""===n&&de.setCursor(t.line,t.ch+2),de.focus();case"italic":return de.replaceSelection("*"+n+"*"),""===n&&de.setCursor(t.line,t.ch+1),de.focus();case"code":return de.replaceSelection("`"+n+"`"),""===n&&de.setCursor(t.line,t.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+n+"$$`"),""===n&&de.setCursor(t.line,t.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+n+"\n```"),de.setCursor(t.line+1,n.length+1),de.focus();case"line-break":return de.replaceSelection("<br/>\n"),de.focus();case"list-ul":return""===n?de.replaceSelection("- "+n):de.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),de.focus();case"list-ol":return""===n?de.replaceSelection("1. "+n):de.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),de.focus();case"add-null-ch":return""===n&&de.setCursor(t.line,t.ch+1),de.replaceSelection("▁"),de.focus();case"inster-template-1":return""===n&&de.setCursor(t.line,t.ch),de.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return xe(!ye),de.focus();case"trigger-full-screen":return Ce(!Ee),de.focus();case"link":return void Ne("link");case"code-block":return void Ne("code-block");case"upload-image":return void Ne("upload-image");case"add-table":return void Ne("add-table");default:throw new Error}}),[de,ye,Ee]),Ue=Object(s.useCallback)((function(e){switch(Ne(""),_e){case"link":var t=e.title,n=e.link;return de.replaceSelection("[".concat(t,"](").concat(n,")")),de.focus();case"code-block":var r=e.language,a=e.content;return de.replaceSelection(["```"+r,a,"```"].join("\n")),de.focus();case"upload-image":var i=e.src,o=e.alt;return de.replaceSelection(".concat(i,' "').concat(o,'" )')),de.focus();case"add-table":for(var l=e.row,s=e.col,c=e.align,u="\n",d=0;d<l;d++){for(var f=[],p=[],h=0;h<s;h++)1===d&&p.push(K[c]),f.push(" ");1===d&&(u+="| ".concat(p.join(" | ")," |\n")),u+="| ".concat(f.join(1===s?"":" | ")," |\n")}return de.replaceSelection(u+"\n"),de.focus();default:throw new Error}}),[de,_e]),Ge=Object(s.useMemo)((function(){switch(_e){case"link":return c.a.createElement(C,{callback:Ue,onCancel:$e});case"code-block":return c.a.createElement(S.b,{callback:Ue,onCancel:$e});case"upload-image":return c.a.createElement(T,{callback:Ue,onCancel:$e});case"add-table":return c.a.createElement(z,{callback:Ue,onCancel:$e});default:return null}}),[_e]);function $e(){Ne("")}Object(s.useEffect)((function(){if(Ke.current){var e=Ke.current,t=!1,n=0;function r(e){t=!0,n=e.pageY}function a(){t=!1}function i(e){if(t){var r=e.pageY-n;r<0&&(r=0),r>300&&(r=300),Pe(x+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",i),document.addEventListener("mouseup",a),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)}}}),[de,Ke]),Object(s.useEffect)((function(){Pe(x)}),[x]);var Je={width:H(g),height:H(Ie)};Object(s.useMemo)((function(){if(Le){var e=new Date(Le),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Le]);return c.a.createElement(s.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:We},c.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(ye?"on-preview":""," ").concat(w?"mini":""," ").concat(Ee?"full-screen":""),style:Je},c.a.createElement(b,{insertTemp:N,watch:ye,fullScreen:Ee,showNullButton:V,onActionCallback:Ve,hidetoolBar:J}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Be,placeholder:oe})),ye?c.a.createElement("div",{ref:qe,className:"preview-container"},"stex"===L&&c.a.createElement(h,{value:me}),"stex"!==L&&c.a.createElement(p.a,{value:me})):null))),P?c.a.createElement("a",{ref:Ke,className:"editor-resize"}):null,c.a.createElement(y.a,null,G[_e]?c.a.createElement(r.a,{centered:!0,title:G[_e],visible:!0,onCancel:$e,footer:null},Ge):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(e,t,n){e.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(e,t,n){e.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"}},QSKd:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/wenhao.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/wenhao.50b63ac4.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(e,t,n){e.exports=n.p+"static/bi.9c9b0364.svg"},SJMd:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/code-prettify/src/prettify.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[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"],a=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[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"],o=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="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",s=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],d=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function f(e,t,n,r,a){if(n){var i={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(i),a.push.apply(a,i.decorations)}}var p=/\S/;function h(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&p.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var a=e.concat(t),i=[],o={},l=0,s=a.length;l<s;++l){var c=a[l],u=c[3];if(u)for(var d=u.length;--d>=0;)r[u.charAt(d)]=c;var f=c[1],p=""+f;o.hasOwnProperty(p)||(i.push(f),o[p]=null)}i.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,a=0,i=e.length;a<i;++a){if((f=e[a]).ignoreCase)r=!0;else if(/[a-z]/i.test(f.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var o={b:8,t:9,n:10,v:11,f:12,r:13};function l(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=o[n])||("0"<=n&&n<="7"?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1))}function s(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function c(e){var t=e.substring(1,e.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=[],r="^"===t[0],a=["["];r&&a.push("^");for(var i=r?1:0,o=t.length;i<o;++i){var c=t[i];if(/\\[bdsw]/i.test(c))a.push(c);else{var u,d=l(c);i+2<o&&"-"===t[i+1]?(u=l(t[i+2]),i+=2):u=d,n.push([d,u]),u<65||d>122||(u<65||d>90||n.push([32|Math.max(65,d),32|Math.min(u,90)]),u<97||d>122||n.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var f=[],p=[];for(i=0;i<n.length;++i){(h=n[i])[0]<=p[1]+1?p[1]=Math.max(p[1],h[1]):f.push(p=h)}for(i=0;i<f.length;++i){var h=f[i];a.push(s(h[0])),h[1]>h[0]&&(h[1]+1>h[0]&&a.push("-"),a.push(s(h[1])))}return a.push("]"),a.join("")}function u(e){for(var r=e.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")),a=r.length,i=[],o=0,l=0;o<a;++o){if("("===(d=r[o]))++l;else if("\\"===d.charAt(0)){(u=+d.substring(1))&&(u<=l?i[u]=-1:r[o]=s(u))}}for(o=1;o<i.length;++o)-1===i[o]&&(i[o]=++t);for(o=0,l=0;o<a;++o){if("("===(d=r[o]))i[++l]||(r[o]="(?:");else if("\\"===d.charAt(0)){var u;(u=+d.substring(1))&&u<=l&&(r[o]="\\"+i[u])}}for(o=0;o<a;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(o=0;o<a;++o){var d,f=(d=r[o]).charAt(0);d.length>=2&&"["===f?r[o]=c(d):"\\"!==f&&(r[o]=d.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var d=[];for(a=0,i=e.length;a<i;++a){var f;if((f=e[a]).global||f.multiline)throw new Error(""+f);d.push("(?:"+u(f)+")")}return new RegExp(d.join("|"),r?"gi":"g")}(i)}();var a=t.length,i=function(e){for(var o=e.sourceCode,l=e.basePos,s=e.sourceNode,c=[l,"pln"],u=0,d=o.match(n)||[],p={},h=0,m=d.length;h<m;++h){var g,v=d[h],b=p[v],y=void 0;if("string"==typeof b)g=!1;else{var x=r[v.charAt(0)];if(x)y=v.match(x[1]),b=x[0];else{for(var w=0;w<a;++w)if(x=t[w],y=v.match(x[1])){b=x[0];break}y||(b="pln")}!(g=b.length>=5&&"lang-"===b.substring(0,5))||y&&"string"==typeof y[1]||(g=!1,b="src"),g||(p[v]=b)}var E=u;if(u+=v.length,g){var C=y[1],S=v.indexOf(C),O=S+C.length;y[2]&&(S=(O=v.length-y[2].length)-C.length);var _=b.substring(5);f(s,l+E,v.substring(0,S),i,c),f(s,l+E+S,C,k(_,C),c),f(s,l+E+O,v.substring(O),i,c)}else c.push(l+E,b)}e.decorations=c};return i}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.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])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var a=e.regexLiterals;if(a){var i=a>1?"":"\n\r",o=i?".":"[\\S\\s]",l="/(?=[^/*"+i+"])(?:[^/\\x5B\\x5C"+i+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+i+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+l+")")])}var s=e.types;s&&n.push(["typ",s]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.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(t,n)}var v=g({keywords:[r,i,a,o,l,s,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function b(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,a=/\r\n?|\n/,i=e.ownerDocument,o=i.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var l=[o];function s(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,l=o.match(a);if(l){var u=o.substring(0,l.index);e.nodeValue=u;var d=o.substring(l.index+l[0].length);if(d)e.parentNode.insertBefore(i.createTextNode(d),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var f=e.firstChild;f;f=f.nextSibling)s(f)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,a=t.parentNode;if(a){var i=e(a,1),o=t.nextSibling;i.appendChild(r);for(var l=o;l;l=o)o=l.nextSibling,i.appendChild(l)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;l.push(n)}for(var u=0;u<l.length;++u)s(l[u]);t===(0|t)&&l[0].setAttribute("value",t);var d=i.createElement("ol");d.className="linenums";for(var f=Math.max(0,t-1|0)||0,p=(u=0,l.length);u<p;++u)(o=l[u]).className="L"+(u+f)%10,o.firstChild||o.appendChild(i.createTextNode(" ")),d.appendChild(o);e.appendChild(d)}var y={};function x(t,n){for(var r=n.length;--r>=0;){var a=n[r];y.hasOwnProperty(a)?e.console&&console.warn("cannot override language handler %s",a):y[a]=t}}function k(e,t){return e&&y.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),y[e]}function w(t){var n,r,a,i,o,l,s,c=t.langExtension;try{var u=(n=t.sourceNode,r=t.pre,a=/(?:^|\s)nocode(?:\s|$)/,i=[],o=0,l=[],s=0,function e(t){var n=t.nodeType;if(1==n){if(a.test(t.className))return;for(var c=t.firstChild;c;c=c.nextSibling)e(c);var u=t.nodeName.toLowerCase();"br"!==u&&"li"!==u||(i[s]="\n",l[s<<1]=o++,l[s++<<1|1]=t)}else if(3==n||4==n){var d=t.nodeValue;d.length&&(d=r?d.replace(/\r\n?/g,"\n"):d.replace(/[ \t\r\n]+/g," "),i[s]=d,l[s<<1]=o,o+=d.length,l[s++<<1|1]=t)}}(n),{sourceCode:i.join("").replace(/\n$/,""),spans:l}),d=u.sourceCode;t.sourceCode=d,t.spans=u.spans,t.basePos=0,k(c,d)(t),function(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n,r,a=/\n/g,i=e.sourceCode,o=i.length,l=0,s=e.spans,c=s.length,u=0,d=e.decorations,f=d.length,p=0;for(d[f]=o,r=n=0;r<f;)d[r]!==d[r+2]?(d[n++]=d[r++],d[n++]=d[r++]):r+=2;for(f=n,r=n=0;r<f;){for(var h=d[r],m=d[r+1],g=r+2;g+2<=f&&d[g+1]===m;)g+=2;d[n++]=h,d[n++]=m,r=g}f=d.length=n;var v=e.sourceNode,b="";v&&(b=v.style.display,v.style.display="none");try{for(;u<c;){s[u];var y,x=s[u+2]||o,k=d[p+2]||o,w=(g=Math.min(x,k),s[u+1]);if(1!==w.nodeType&&(y=i.substring(l,g))){t&&(y=y.replace(a,"\r")),w.nodeValue=y;var E=w.ownerDocument,C=E.createElement("span");C.className=d[p+1];var S=w.parentNode;S.replaceChild(C,w),C.appendChild(w),l<x&&(s[u+1]=w=E.createTextNode(i.substring(g,x)),S.insertBefore(w,C.nextSibling))}(l=g)>=x&&(u+=2),l>=k&&(p+=2)}}finally{v&&(v.style.display=b)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function E(e,t,n){var r=n||!1,a=t||null,i=document.createElement("div");return i.innerHTML="<pre>"+e+"</pre>",i=i.firstChild,r&&b(i,r,!0),w({langExtension:a,numberLines:r,sourceNode:i,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),i.innerHTML}function C(t,n){var r=n||document.body,a=r.ownerDocument||document;function i(e){return r.getElementsByTagName(e)}for(var o=[i("pre"),i("code"),i("xmp")],l=[],s=0;s<o.length;++s)for(var c=0,u=o[s].length;c<u;++c)l.push(o[s][c]);o=null;var d=Date;d.now||(d={now:function(){return+new Date}});var f=0,p=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,y=/^code$/i,x=/^(?:pre|code|xmp)$/i,k={};!function n(){for(var r=e.PR_SHOULD_USE_CONTINUATION?d.now()+250:1/0;f<l.length&&d.now()<r;f++){for(var i=l[f],o=k,s=i;s=s.previousSibling;){var c=s.nodeType,u=(7===c||8===c)&&s.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(s.nodeValue))break;if(u){o={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(e,t,n){o[t]=n}));break}}var E=i.className;if((o!==k||m.test(E))&&!g.test(E)){for(var C=!1,S=i.parentNode;S;S=S.parentNode){var O=S.tagName;if(x.test(O)&&S.className&&m.test(S.className)){C=!0;break}}if(!C){i.className+=" prettyprinted";var _,N,j=o.lang;if(!j)!(j=E.match(p))&&(_=h(i))&&y.test(_.tagName)&&(j=_.className.match(p)),j&&(j=j[1]);if(v.test(i.tagName))N=1;else{var T=i.currentStyle,L=a.defaultView,A=T?T.whiteSpace:L&&L.getComputedStyle?L.getComputedStyle(i,null).getPropertyValue("white-space"):0;N=A&&"pre"===A.substring(0,3)}var D=o.linenums;(D="true"===D||+D)||(D=!!(D=E.match(/\blinenums\b(?::(\d+))?/))&&(!D[1]||!D[1].length||+D[1])),D&&b(i,D,N),w({langExtension:j,sourceNode:i,numberLines:D,pre:N,sourceCode:null,basePos:null,spans:null,decorations:null})}}}f<l.length?e.setTimeout(n,250):"function"==typeof t&&t()}()}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:r,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),x(g({keywords:a,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:o,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 S=e.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:E,prettyPrint:C},O=e.define;"function"==typeof O&&O.amd&&O("google-code-prettify",[],(function(){return S}))}()},"VrN/":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),o=r||a||i,l=o&&(r?document.documentMode||6:+(i||a)[1]),s=!i&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),k=d&&e.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(d=!1,s=!0);var w=b&&(c||d&&(null==k||k<12.11)),E=n||o&&l>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,O=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var a=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(a?r[1]+a:"")}};function _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return _(e).appendChild(t)}function j(e,t,n,r){var a=document.createElement(e);if(n&&(a.className=n),r&&(a.style.cssText=r),"string"==typeof t)a.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)a.appendChild(t[i]);return a}function T(e,t,n,r){var a=j(e,t,n,r);return a.setAttribute("role","presentation"),a}function L(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function A(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function D(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function M(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var a=document.createRange();return a.setEnd(r||e,n),a.setStart(e,t),a}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var I=function(e){e.select()};function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function R(e,t,n,r,a){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,o=a||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return o+(t-i);o+=l-i,o+=n-o%n,i=l+1}}m?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(I=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var W={toString:function(){return"CodeMirror.Pass"}},K={scroll:!1},q={origin:"*mouse"},H={origin:"+move"};function V(e,t,n){for(var r=0,a=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var o=i-r;if(i==e.length||a+o>=t)return r+Math.min(o,t-a);if(a+=i-r,r=i+1,(a+=n-a%n)>=t)return r}}var U=[""];function G(e){for(;U.length<=e;)U.push($(U)+" ");return U[e]}function $(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Z(){}function Q(e,t){var n;return Object.create?n=Object.create(e):(Z.prototype=e,n=new Z),t&&F(t,n),n}var Y=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function X(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&X(e))||t.test(e):X(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ie(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var a=(t+n)/2,i=r<0?Math.ceil(a):Math.floor(a);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var oe=null;function le(e,t,n){var r;oe=null;for(var a=0;a<e.length;++a){var i=e[a];if(i.from<t&&i.to>t)return a;i.to==t&&(i.from!=i.to&&"before"==n?r=a:oe=a),i.from==t&&(i.from!=i.to&&"before"!=n?r=a:oe=a)}return null!=r?r:oe}var se=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,a=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,l){var s="ltr"==l?"L":"R";if(0==o.length||"ltr"==l&&!e.test(o))return!1;for(var c,u=o.length,d=[],f=0;f<u;++f)d.push((c=o.charCodeAt(f))<=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,h=s;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=s;g<u;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":n.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,x=d[0];y<u-1;++y){var k=d[y];"+"==k&&"1"==x&&"1"==d[y+1]?d[y]="1":","!=k||x!=d[y+1]||"1"!=x&&"n"!=x||(d[y]=x),x=k}for(var w=0;w<u;++w){var E=d[w];if(","==E)d[w]="N";else if("%"==E){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var S=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",O=w;O<C;++O)d[O]=S;w=C-1}}for(var _=0,N=s;_<u;++_){var j=d[_];"L"==N&&"1"==j?d[_]="L":n.test(j)&&(N=j)}for(var T=0;T<u;++T)if(t.test(d[T])){var L=void 0;for(L=T+1;L<u&&t.test(d[L]);++L);for(var A="L"==(T?d[T-1]:s),D=A==("L"==(L<u?d[L]:s))?A?"L":"R":s,M=T;M<L;++M)d[M]=D;T=L-1}for(var I,P=[],F=0;F<u;)if(r.test(d[F])){var R=F;for(++F;F<u&&r.test(d[F]);++F);P.push(new i(0,R,F))}else{var z=F,B=P.length,W="rtl"==l?1:0;for(++F;F<u&&"L"!=d[F];++F);for(var K=z;K<F;)if(a.test(d[K])){z<K&&(P.splice(B,0,new i(1,z,K)),B+=W);var q=K;for(++K;K<F&&a.test(d[K]);++K);P.splice(B,0,new i(2,q,K)),B+=W,z=K}else++K;z<F&&P.splice(B,0,new i(1,z,F))}return"ltr"==l&&(1==P[0].level&&(I=o.match(/^\s+/))&&(P[0].from=I[0].length,P.unshift(new i(0,0,I[0].length))),1==$(P).level&&(I=o.match(/\s+$/))&&($(P).to-=I[0].length,P.push(new i(0,u-I[0].length,u)))),"rtl"==l?P.reverse():P}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=se(e.text,t)),n}var ue=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function fe(e,t){return e._handlers&&e._handlers[t]||ue}function pe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,a=r&&r[t];if(a){var i=B(a,n);i>-1&&(r[t]=a.slice(0,i).concat(a.slice(i+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),a=0;a<n.length;++a)n[a].apply(null,r)}function me(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),he(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function ve(e,t){return fe(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){ye(e),xe(e)}function Ee(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,_e=function(){if(o&&l<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}();function Ne(e){if(null==Se){var t=j("span","");N(e,j("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&l<8))}var n=Se?j("span",""):j("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function je(e){if(null!=Oe)return Oe;var t=N(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return _(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Te,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var a=e.indexOf("\n",t);-1==a&&(a=e.length);var i=e.slice(t,"\r"==e.charAt(a-1)?a-1:a),o=i.indexOf("\r");-1!=o?(n.push(i.slice(0,o)),t+=o+1):(n.push(i),t=a+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ae=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},De="oncopy"in(Te=j("div"))||(Te.setAttribute("oncopy","return;"),"function"==typeof Te.oncopy),Me=null,Ie={},Pe={};function Fe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ie[e]=t}function Re(e){if("string"==typeof e&&Pe.hasOwnProperty(e))e=Pe[e];else if(e&&"string"==typeof e.name&&Pe.hasOwnProperty(e.name)){var t=Pe[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=Re(t);var n=Ie[t.name];if(!n)return ze(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var a=Be[t.name];for(var i in a)a.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=a[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Be={};function We(e,t){F(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var a=t[r];a instanceof Array&&(a=a.concat([])),n[r]=a}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function He(e,t,n){return!e.startState||e.startState(t,n)}var Ve=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ue(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var a=n.children[r],i=a.chunkSize();if(t<i){n=a;break}t-=i}return n.lines[t]}function Ge(e,t,n){var r=[],a=t.line;return e.iter(t.line,n.line+1,(function(e){var i=e.text;a==n.line&&(i=i.slice(0,n.ch)),a==t.line&&(i=i.slice(t.ch)),r.push(i),++a})),r}function $e(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Je(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ze(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var a=0;r.children[a]!=t;++a)n+=r.children[a].chunkSize();return n+t.first}function Qe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var a=e.children[r],i=a.height;if(t<i){e=a;continue e}t-=i,n+=a.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o].height;if(t<l)break;t-=l}return n+o}function Ye(e,t){return t>=e.first&&t<e.first+e.size}function Xe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function at(e,t){return tt(e,t)<0?t:e}function it(e,t){return tt(e,t)<0?e:t}function ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Ue(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ue(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=lt(e,t[r]);return n}Ve.prototype.eol=function(){return this.pos>=this.string.length},Ve.prototype.sol=function(){return this.pos==this.lineStart},Ve.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ve.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ve.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ve.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ve.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ve.prototype.skipToEnd=function(){this.pos=this.string.length},Ve.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ve.prototype.backUp=function(e){this.pos-=e},Ve.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var a=function(e){return n?e.toLowerCase():e};if(a(this.string.substr(this.pos,e.length))==a(e))return!1!==t&&(this.pos+=e.length),!0},Ve.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ve.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ve.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ve.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var a=[e.state.modeGen],i={};xt(e,t.text,e.doc.mode,n,(function(e,t){return a.push(e,t)}),i,r);for(var o=n.state,l=function(r){n.baseTokens=a;var l=e.state.overlays[r],s=1,c=0;n.state=!0,xt(e,t.text,l.mode,n,(function(e,t){for(var n=s;c<e;){var r=a[s];r>e&&a.splice(s,1,e,a[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)a.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var i=a[n+1];a[n+1]=(i?i+" ":"")+"overlay "+t}}),i),n.state=o,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:a,classes:i.bgClass||i.textClass?i:null}}function ft(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=pt(e,Ze(t)),a=t.text.length>e.options.maxHighlightLength&&Ke(e.doc.mode,r.state),i=dt(e,t,r);a&&(r.state=a),t.stateAfter=r.save(!a),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,a=e.display;if(!r.mode.startState)return new ut(r,!0,t);var i=function(e,t,n){for(var r,a,i=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=i.first)return i.first;var s=Ue(i,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof ct?c.lookAhead:0)<=i.modeFrontier))return l;var u=R(s.text,null,e.options.tabSize);(null==a||r>u)&&(a=l-1,r=u)}return a}(e,t,n),o=i>r.first&&Ue(r,i-1).stateAfter,l=o?ut.fromSaved(r,o,i):new ut(r,He(r.mode),i);return r.iter(i,t,(function(n){ht(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=a.viewFrom&&r<a.viewTo?l.save():null,l.nextLine()})),n&&(r.modeFrontier=l.line),l}function ht(e,t,n,r){var a=e.doc.mode,i=new Ve(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&mt(a,n.state);!i.eol();)gt(a,i,n.state),i.start=i.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=qe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var a=0;a<10;a++){r&&(r[0]=qe(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Ke(e.mode,t.state),n,t.lookAhead):new ut(e,Ke(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var a,i,o=e.doc,l=o.mode,s=Ue(o,(t=lt(o,t)).line),c=pt(e,t.line,n),u=new Ve(s.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=gt(l,u,c.state),r&&i.push(new vt(u,a,Ke(o.mode,c.state)));return r?i:new vt(u,a,c.state)}function yt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xt(e,t,n,r,a,i,o){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Ve(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&yt(mt(n,r.state),i);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,o&&ht(e,t,r,d.pos),d.pos=t.length,s=null):s=yt(gt(n,d,r.state,f),i),f){var p=f[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||u!=s){for(;c<d.start;)a(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);a(h,u),c=h}}var kt=!1,wt=!1;function Et(e,t,n){this.marker=e,this.from=t,this.to=n}function Ct(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function St(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ot(e,t){if(t.full)return null;var n=Ye(e,t.from.line)&&Ue(e,t.from.line).markedSpans,r=Ye(e,t.to.line)&&Ue(e,t.to.line).markedSpans;if(!n&&!r)return null;var a=t.from.ch,i=t.to.ch,o=0==tt(t.from,t.to),l=function(e,t,n){var r;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker;if(null==i.from||(o.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==o.type&&(!n||!i.marker.insertLeft)){var l=null==i.to||(o.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new Et(o,i.from,l?null:i.to))}}return r}(n,a,o),s=function(e,t,n){var r;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker;if(null==i.to||(o.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==o.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(o.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new Et(o,l?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,o),c=1==t.text.length,u=$(t.text).length+(c?a:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var p=Ct(s,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=a}}if(s)for(var h=0;h<s.length;++h){var m=s[h];null!=m.to&&(m.to+=u),null==m.from?Ct(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m)):(m.from+=u,c&&(l||(l=[])).push(m))}l&&(l=_t(l)),s&&s!=l&&(s=_t(s));var g=[l];if(!c){var v,b=t.text.length-2;if(b>0&&l)for(var y=0;y<l.length;++y)null==l[y].to&&(v||(v=[])).push(new Et(l[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(s)}return g}function _t(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Nt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function jt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Tt(e){return e.inclusiveLeft?-1:0}function Lt(e){return e.inclusiveRight?1:0}function At(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),a=t.find(),i=tt(r.from,a.from)||Tt(e)-Tt(t);if(i)return-i;var o=tt(r.to,a.to)||Lt(e)-Lt(t);return o||t.id-e.id}function Dt(e,t){var n,r=wt&&e.markedSpans;if(r)for(var a=void 0,i=0;i<r.length;++i)(a=r[i]).marker.collapsed&&null==(t?a.from:a.to)&&(!n||At(n,a.marker)<0)&&(n=a.marker);return n}function Mt(e){return Dt(e,!0)}function It(e){return Dt(e,!1)}function Pt(e,t){var n,r=wt&&e.markedSpans;if(r)for(var a=0;a<r.length;++a){var i=r[a];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||At(n,i.marker)<0)&&(n=i.marker)}return n}function Ft(e,t,n,r,a){var i=Ue(e,t),o=wt&&i.markedSpans;if(o)for(var l=0;l<o.length;++l){var s=o[l];if(s.marker.collapsed){var c=s.marker.find(0),u=tt(c.from,n)||Tt(s.marker)-Tt(a),d=tt(c.to,r)||Lt(s.marker)-Lt(a);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&a.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&a.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Rt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function zt(e,t){var n=Ue(e,t),r=Rt(n);return n==r?t:Ze(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=Ue(e,t);if(!Wt(e,r))return t;for(;n=It(r);)r=n.find(1,!0).line;return Ze(r)+1}function Wt(e,t){var n=wt&&t.markedSpans;if(n)for(var r=void 0,a=0;a<n.length;++a)if((r=n[a]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Kt(e,t,r))return!0}}function Kt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Kt(e,r.line,Ct(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var a=void 0,i=0;i<t.markedSpans.length;++i)if((a=t.markedSpans[i]).marker.collapsed&&!a.marker.widgetNode&&a.from==n.to&&(null==a.to||a.to!=n.from)&&(a.marker.inclusiveLeft||n.marker.inclusiveRight)&&Kt(e,t,a))return!0}function qt(e){for(var t=0,n=(e=Rt(e)).parent,r=0;r<n.lines.length;++r){var a=n.lines[r];if(a==e)break;t+=a.height}for(var i=n.parent;i;i=(n=i).parent)for(var o=0;o<i.children.length;++o){var l=i.children[o];if(l==n)break;t+=l.height}return t}function Ht(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Mt(r);){var a=t.find(0,!0);r=a.from.line,n+=a.from.ch-a.to.ch}for(r=e;t=It(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function Vt(e){var t=e.display,n=e.doc;t.maxLine=Ue(n,n.first),t.maxLineLength=Ht(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Ht(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Ut=function(e,t,n){this.text=e,jt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Nt(e)}Ut.prototype.lineNo=function(){return Ze(this)},be(Ut);var $t={},Jt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:$t;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=T("span",null,null,s?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var i=a?t.rest[a-1]:t.line,o=void 0;r.pos=0,r.addToken=Xt,je(e.display.measure)&&(o=ce(i,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(i,r,ft(e,i,t!=e.display.externalMeasured&&Ze(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=M(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=M(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ne(e.display.measure))),0==a?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Yt(e){var t=j("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Xt(e,t,n,r,a,i,s){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",a=0;a<e.length;a++){var i=e.charAt(a);" "!=i||!n||a!=e.length-1&&32!=e.charCodeAt(a+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));o&&l<9?c.appendChild(j("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=c.appendChild(j("span",G(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(j("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),o&&l<9?c.appendChild(j("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),o&&l<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||a||f||i||s){var x=n||"";r&&(x+=r),a&&(x+=a);var k=j("span",[c],x,i);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,s[w]);return e.content.appendChild(k)}e.content.appendChild(c)}}function en(e,t){return function(n,r,a,i,o,l,s){a=a?a+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,a,i,o,l,s);e(n,r.slice(0,d.to-c),a,i,null,l,s),i=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var a=!r&&n.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!r&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",n.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,a=e.text,i=0;if(r)for(var o,l,s,c,u,d,f,p=a.length,h=0,m=1,g="",v=0;;){if(v==h){s=c=u=l="",f=null,d=null,v=1/0;for(var b=[],y=void 0,x=0;x<r.length;++x){var k=r[x],w=k.marker;if("bookmark"==w.type&&k.from==h&&w.widgetNode)b.push(w);else if(k.from<=h&&(null==k.to||k.to>h||w.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&v>k.to&&(v=k.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==h&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(y||(y=[])).push(w.endStyle,k.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var E in w.attributes)(f||(f={}))[E]=w.attributes[E];w.collapsed&&(!d||At(d.marker,w)<0)&&(d=k)}else k.from>h&&v>k.from&&(v=k.from)}if(y)for(var C=0;C<y.length;C+=2)y[C+1]==v&&(c+=" "+y[C]);if(!d||d.from==h)for(var S=0;S<b.length;++S)tn(t,0,b[S]);if(d&&(d.from||0)==h){if(tn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var O=Math.min(p,v);;){if(g){var _=h+g.length;if(!d){var N=_>O?g.slice(0,O-h):g;t.addToken(t,N,o?o+s:s,u,h+N.length==v?c:"",l,f)}if(_>=O){g=g.slice(O-h),h=O;break}h=_,u=""}g=a.slice(i,i=n[m++]),o=Zt(n[m++],t.cm.options)}}else for(var j=1;j<n.length;j+=2)t.addToken(t,a.slice(i,i=n[j]),Zt(n[j+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=It(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ze($(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Wt(e,t)}function an(e,t,n){for(var r,a=[],i=t;i<n;i=r){var o=new rn(e.doc,Ue(e.doc,i),i);r=i+o.size,a.push(o)}return a}var on=null,ln=null;function sn(e,t){var n=fe(e,t);if(n.length){var r,a=Array.prototype.slice.call(arguments,2);on?r=on.delayedCallbacks:ln?r=ln:(r=ln=[],setTimeout(cn,0));for(var i=function(e){r.push((function(){return n[e].apply(null,a)}))},o=0;o<n.length;++o)i(o)}}function cn(){var e=ln;ln=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var a=0;a<t.changes.length;a++){var i=t.changes[a];"text"==i?pn(e,t):"gutter"==i?mn(e,t,n,r):"class"==i?hn(e,t):"widget"==i&&gn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=j("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&l<8&&(e.node.style.zIndex=2)),e.node}function fn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Qt(e,t)}function pn(e,t){var n=t.text.className,r=fn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,hn(e,t)):n&&(t.text.className=n)}function hn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(j("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var a=dn(t);t.gutterBackground=j("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),a.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=dn(t),l=t.gutter=j("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(j("div",Xe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=i.hasOwnProperty(c)&&i[c];u&&l.appendChild(j("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),a=t.node.firstChild,i=void 0;a;a=i)i=a.nextSibling,r.test(a.className)&&t.node.removeChild(a);bn(e,t,n)}function vn(e,t,n,r){var a=fn(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),hn(e,t),mn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(yn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)yn(e,t.rest[r],t,n,!1)}function yn(e,t,n,r,a){if(t.widgets)for(var i=dn(n),o=0,l=t.widgets;o<l.length;++o){var s=l[o],c=j("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(s,c,n,r),e.display.input.setUneditable(c),a&&s.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),sn(s,"redraw")}}function xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var a=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(a-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function kn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!L(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,j("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function wn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function En(e){return e.lineSpace.offsetTop}function Cn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Sn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,j("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function On(e){return 50-e.display.nativeBarWidth}function _n(e){return e.display.scroller.clientWidth-On(e)-e.display.barWidth}function Nn(e){return e.display.scroller.clientHeight-On(e)-e.display.barHeight}function jn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var a=0;a<e.rest.length;a++)if(Ze(e.rest[a])>n)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}function Tn(e,t,n,r){return Dn(e,An(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function An(e,t){var n=Ze(t),r=Ln(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ir(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ze(t=Rt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var a=r.built=Qt(e,r);return r.text=a.pre,N(e.display.lineMeasure,a.pre),r}(e,t));var a=jn(r,t,n);return{line:t,view:r,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function Dn(e,t,n,r,a){t.before&&(n=-1);var i,s=n+(r||"");return t.cache.hasOwnProperty(s)?i=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,a=r&&_n(e);if(!t.measure.heights||r&&t.measure.width!=a){var i=t.measure.heights=[];if(r){t.measure.width=a;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var s=o[l],c=o[l+1];Math.abs(s.bottom-c.bottom)>2&&i.push((s.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var a,i=Pn(t.map,n,r),s=i.node,c=i.start,u=i.end,d=i.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&re(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&re(t.line.text.charAt(i.coverStart+u));)++u;if((a=o&&l<9&&0==c&&u==i.coverEnd-i.coverStart?s.parentNode.getBoundingClientRect():Fn(S(s,c,u).getClientRects(),r)).left||a.right||0==c)break;u=c,c-=1,d="right"}o&&l<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Me)return Me;var t=N(e,j("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Me=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,a))}else{var p;c>0&&(d=r="right"),a=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==r?p.length-1:0]:s.getBoundingClientRect()}if(o&&l<9&&!c&&(!a||!a.left&&!a.right)){var h=s.parentNode.getClientRects()[0];a=h?{left:h.left,right:h.left+ar(e.display),top:h.top,bottom:h.bottom}:In}for(var m=a.top-t.rect.top,g=a.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,k=b[y],w={left:("right"==d?a.right:a.left)-t.rect.left,right:("left"==d?a.left:a.right)-t.rect.left,top:x,bottom:k};return a.left||a.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}(e,t,n,r)).bogus||(t.cache[s]=i)),{left:i.left,right:i.right,top:a?i.rtop:i.top,bottom:a?i.rbottom:i.bottom}}var Mn,In={left:0,right:0,top:0,bottom:0};function Pn(e,t,n){for(var r,a,i,o,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(a=0,i=1,o="left"):t<s?i=1+(a=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(a=(i=s-l)-1,t>=s&&(o="right")),null!=a){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==a)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&a==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],o="right";break}return{node:r,start:a,end:i,collapse:o,coverStart:l,coverEnd:s}}function Fn(e,t){var n=In;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var a=e.length-1;a>=0&&(n=e[a]).left==n.right;a--);return n}function Rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function zn(e){e.display.externalMeasure=null,_(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Rn(e.display.view[t])}function Bn(e){zn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Wn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Kn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=kn(e.widgets[n]));return t}function Hn(e,t,n,r,a){if(!a){var i=qn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var o=qt(t);if("local"==r?o+=En(e.display):o-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+("window"==r?0:Kn());var s=l.left+("window"==r?0:Wn());n.left+=s,n.right+=s}return n.top+=o,n.bottom+=o,n}function Vn(e,t,n){if("div"==n)return t;var r=t.left,a=t.top;if("page"==n)r-=Wn(),a-=Kn();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,a+=i.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:a-o.top}}function Un(e,t,n,r,a){return r||(r=Ue(e.doc,t.line)),Hn(e,r,Tn(e,r,t.ch,a),n)}function Gn(e,t,n,r,a,i){function o(t,o){var l=Dn(e,a,t,o?"right":"left",i);return o?l.left=l.right:l.right=l.left,Hn(e,r,l,n)}r=r||Ue(e.doc,t.line),a||(a=An(e,r));var l=ce(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return o("before"==c?s-1:s,"before"==c);function u(e,t,n){return o(n?e-1:e,1==l[t].level!=n)}var d=le(l,s,c),f=oe,p=u(s,d,"before"==c);return null!=f&&(p.other=u(s,f,"before"!=c)),p}function $n(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=ar(e.display)*t.ch);var r=Ue(e.doc,t.line),a=qt(r)+En(e.display);return{left:n,right:n,top:a,bottom:a+r.height}}function Jn(e,t,n,r,a){var i=et(e,t,n);return i.xRel=a,r&&(i.outside=r),i}function Zn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var a=Qe(r,n),i=r.first+r.size-1;if(a>i)return Jn(r.first+r.size-1,Ue(r,i).text.length,null,1,1);t<0&&(t=0);for(var o=Ue(r,a);;){var l=er(e,o,a,t,n),s=Pt(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==a)return c;o=Ue(r,a=c.line)}}function Qn(e,t,n,r){r-=qn(t);var a=t.text.length,i=ie((function(t){return Dn(e,n,t-1).bottom<=r}),a,0);return{begin:i,end:a=ie((function(t){return Dn(e,n,t).top>r}),i,a)}}function Yn(e,t,n,r){return n||(n=An(e,t)),Qn(e,t,n,Hn(e,t,Dn(e,n,r),"line").top)}function Xn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,a){a-=qt(t);var i=An(e,t),o=qn(t),l=0,s=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,i,u,r,a);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,p,h=null,m=null,g=ie((function(t){var n=Dn(e,i,t);return n.top+=o,n.bottom+=o,!!Xn(n,r,a,!1)&&(n.top<=a&&n.left<=r&&(h=t,m=n),!0)}),l,s),v=!1;if(m){var b=r-m.left<m.right-r,y=b==c;g=h+(y?0:1),p=y?"after":"before",f=b?m.left:m.right}else{c||g!=s&&g!=l||g++,p=0==g?"after":g==t.text.length?"before":Dn(e,i,g-(c?1:0)).bottom+o<=a==c?"after":"before";var x=Gn(e,et(n,g,p),"line",t,i);f=x.left,v=a<x.top?-1:a>=x.bottom?1:0}return Jn(n,g=ae(t.text,g,1),p,v,r-f)}function tr(e,t,n,r,a,i,o){var l=ie((function(l){var s=a[l],c=1!=s.level;return Xn(Gn(e,et(n,c?s.to:s.from,c?"before":"after"),"line",t,r),i,o,!0)}),0,a.length-1),s=a[l];if(l>0){var c=1!=s.level,u=Gn(e,et(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Xn(u,i,o,!0)&&u.top>o&&(s=a[l-1])}return s}function nr(e,t,n,r,a,i,o){var l=Qn(e,t,r,o),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<a.length;f++){var p=a[f];if(!(p.from>=c||p.to<=s)){var h=Dn(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(s,p.from)).right,m=h<i?i-h+1e9:h-i;(!u||d>m)&&(u=p,d=m)}}return u||(u=a[a.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=j("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(j("br"));Mn.appendChild(document.createTextNode("x"))}N(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_(e.measure),n||1}function ar(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=j("span","xxxxxxxxxx"),n=j("pre",[t],"CodeMirror-line-like");N(e.measure,n);var r=t.getBoundingClientRect(),a=(r.right-r.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function ir(e){for(var t=e.display,n={},r={},a=t.gutters.clientLeft,i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var l=e.display.gutterSpecs[o].className;n[l]=i.offsetLeft+i.clientLeft+a,r[l]=i.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ar(e.display)-3);return function(a){if(Wt(e.doc,a))return 0;var i=0;if(a.widgets)for(var o=0;o<a.widgets.length;o++)a.widgets[o].height&&(i+=a.widgets[o].height);return n?i+(Math.ceil(a.text.length/r)||1)*t:i+t}}function sr(e){var t=e.doc,n=lr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function cr(e,t,n,r){var a=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var i,o,l=a.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,o=t.clientY-l.top}catch(e){return null}var s,c=Zn(e,i,o);if(r&&c.xRel>0&&(s=Ue(e.doc,c.line).text).length==c.ch){var u=R(s,s.length,e.options.tabSize)-s.length;c=et(c.line,Math.max(0,Math.round((i-Sn(e.display).left)/ar(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var a=e.display;if(r&&n<a.viewTo&&(null==a.updateLineNumbers||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)wt&&zt(e.doc,t)<a.viewTo&&pr(e);else if(n<=a.viewFrom)wt&&Bt(e.doc,n+r)>a.viewFrom?pr(e):(a.viewFrom+=r,a.viewTo+=r);else if(t<=a.viewFrom&&n>=a.viewTo)pr(e);else if(t<=a.viewFrom){var i=hr(e,n,n+r,1);i?(a.view=a.view.slice(i.index),a.viewFrom=i.lineN,a.viewTo+=r):pr(e)}else if(n>=a.viewTo){var o=hr(e,t,t,-1);o?(a.view=a.view.slice(0,o.index),a.viewTo=o.lineN):pr(e)}else{var l=hr(e,t,t,-1),s=hr(e,n,n+r,1);l&&s?(a.view=a.view.slice(0,l.index).concat(an(e,l.lineN,s.lineN)).concat(a.view.slice(s.index)),a.viewTo+=r):pr(e)}var c=a.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(a.externalMeasured=null))}function fr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[ur(e,t)];if(null!=i.node){var o=i.changes||(i.changes=[]);-1==B(o,n)&&o.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var a,i=ur(e,t),o=e.display.view;if(!wt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=o[s].size;if(l!=t){if(r>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,n+=a}for(;zt(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var a=t[r];a.hidden||a.node&&!a.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},a=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),o=0;o<n.sel.ranges.length;o++)if(t||o!=n.sel.primIndex){var l=n.sel.ranges[o];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&br(e,l.head,a),s||xr(e,l,i)}}return r}function br(e,t,n){var r=Gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=n.appendChild(j("div"," ","CodeMirror-cursor"));if(a.style.left=r.left+"px",a.style.top=r.top+"px",a.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var i=n.appendChild(j("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function yr(e,t){return e.top-t.top||e.left-t.left}function xr(e,t,n){var r=e.display,a=e.doc,i=document.createDocumentFragment(),o=Sn(e.display),l=o.left,s=Math.max(r.sizerWidth,_n(e)-r.sizer.offsetLeft)-o.right,c="ltr"==a.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(j("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var i,o,d=Ue(a,t),f=d.text.length;function p(n,r){return Un(e,et(t,n),"div",d,r)}function h(t,n,r){var a=Yn(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return p("after"==r?a.begin:a.end-(/\s/.test(d.text.charAt(a.end-1))?2:1),i)[i]}var m=ce(d,a.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var a=!1,i=0;i<e.length;++i){var o=e[i];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",i),a=!0)}a||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,a,d){var g="ltr"==a,v=p(e,g?"left":"right"),b=p(t-1,g?"right":"left"),y=null==n&&0==e,x=null==r&&t==f,k=0==d,w=!m||d==m.length-1;if(b.top-v.top<=3){var E=(c?x:y)&&w,C=(c?y:x)&&k?l:(g?v:b).left,S=E?s:(g?b:v).right;u(C,v.top,S-C,v.bottom)}else{var O,_,N,j;g?(O=c&&y&&k?l:v.left,_=c?s:h(e,a,"before"),N=c?l:h(t,a,"after"),j=c&&x&&w?s:b.right):(O=c?h(e,a,"before"):l,_=!c&&y&&k?s:v.right,N=!c&&x&&w?l:b.left,j=c?h(t,a,"after"):s),u(O,v.top,_-O,v.bottom),v.bottom<b.top&&u(l,v.bottom,null,b.top),u(N,b.top,j-N,b.bottom)}(!i||yr(v,i)<0)&&(i=v),yr(b,i)<0&&(i=b),(!o||yr(v,o)<0)&&(o=v),yr(b,o)<0&&(o=b)})),{start:i,end:o}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=Ue(a,f.line),m=Ue(a,p.line),g=Rt(h)==Rt(m),v=d(f.line,f.ch,g?h.text.length+1:null).end,b=d(p.line,g?0:null,p.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(l,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(l,v.bottom,null,b.top)}n.appendChild(i)}function kr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wr(e){e.state.focused||(e.display.input.focus(),Cr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function Cr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,D(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),kr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var a=t.view[r],i=e.options.lineWrapping,s=void 0,c=0;if(!a.hidden){if(o&&l<8){var u=a.node.offsetTop+a.node.offsetHeight;s=u-n,n=u}else{var d=a.node.getBoundingClientRect();s=d.bottom-d.top,!i&&a.text.firstChild&&(c=a.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=a.line.height-s;if((f>.005||f<-.005)&&(Je(a.line,s),_r(a.line),a.rest))for(var p=0;p<a.rest.length;p++)_r(a.rest[p]);if(c>e.display.sizerWidth){var h=Math.ceil(c/ar(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Nr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-En(e));var a=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=Qe(t,r),o=Qe(t,a);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<i?(i=l,o=Qe(t,qt(Ue(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=o&&(i=Qe(t,qt(Ue(t,s))-e.wrapper.clientHeight),o=s)}return{from:i,to:Math.max(o,i+1)}}function jr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Nn(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Cn(n),s=t.top<r,c=t.bottom>l-r;if(t.top<a)o.scrollTop=s?0:t.top;else if(t.bottom>a+i){var u=Math.min(t.top,(c?l:t.bottom)-i);u!=a&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=_n(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(o.scrollLeft=t.right+(h?0:10)-p),o}function Tr(e,t){null!=t&&(Dr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){Dr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ar(e,t,n){null==t&&null==n||Dr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Dr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,$n(e,t.from),$n(e,t.to),t.margin))}function Mr(e,t,n,r){var a=jr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ar(e,a.scrollLeft,a.scrollTop)}function Ir(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||sa(e,{top:t}),Pr(e,t,!0),n&&sa(e),ra(e,100))}function Pr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,da(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var zr=function(e,t,n){this.cm=n;var r=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=a.tabIndex=-1,e(r),e(a),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(a,"scroll",(function(){a.clientWidth&&t(a.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var a=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},zr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zr.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},zr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var a=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},zr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Wr(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Kr(e,t);for(var a=0;a<4&&n!=e.display.barWidth||r!=e.display.barHeight;a++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),Kr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Kr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var qr={native:zr,null:Br};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Fr(e,t):Ir(e,t)}),e),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)}var Vr=0;function Ur(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Vr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var a=e.ops[r];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(n<t.length)}(n)}finally{on=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)$r(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var a=0;a<t.length;a++)Zr(t[a]);for(var i=0;i<t.length;i++)Qr(t[i]);for(var o=0;o<t.length;o++)Yr(t[o])}(e)}))}function $r(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=On(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=On(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Vt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ia(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&oa(e.cm,e.update)}function Zr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-_n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==A();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Wr(t,e.barMeasure),e.updatedDisplay&&ua(t,e.barMeasure),e.selectionChanged&&kr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&wr(e.cm)}function Yr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&la(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Pr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Fr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),a=null;if(t.top+r.top<0?a=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),null!=a&&!h){var i=j("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-En(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(a),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var a;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var o=!1,l=Gn(e,t),s=n&&n!=t?Gn(e,n):l,c=jr(e,a={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Ir(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Fr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return a}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin));var a=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(a)for(var o=0;o<a.length;++o)a[o].lines.length||he(a[o],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&he(i[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&he(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Xr(e,t){if(e.curOp)return t();Ur(e);try{return t()}finally{Gr(e)}}function ea(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ur(e);try{return t.apply(e,arguments)}finally{Gr(e)}}}function ta(e){return function(){if(this.curOp)return e.apply(this,arguments);Ur(this);try{return e.apply(this,arguments)}finally{Gr(this)}}}function na(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ur(t);try{return e.apply(this,arguments)}finally{Gr(t)}}}function ra(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,P(aa,e))}function aa(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),a=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var o=i.styles,l=i.text.length>e.options.maxHighlightLength?Ke(t.mode,r.state):null,s=dt(e,i,r,!0);l&&(r.state=l),i.styles=s.styles;var c=i.styleClasses,u=s.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!o||o.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=i.styles[f];d&&a.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&ht(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ra(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),a.length&&Xr(e,(function(){for(var t=0;t<a.length;t++)fr(e,a[t],"text")}))}}var ia=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Nr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=_n(e),this.force=n,this.dims=ir(e),this.events=[]};function oa(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return pr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fa(e)&&(pr(e),t.dims=ir(e));var a=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(a,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(a,n.viewTo)),wt&&(i=zt(e.doc,i),o=Bt(e.doc,o));var l=i!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(an(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,i,o),n.viewOffset=qt(Ue(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!l&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=A();if(!t||!L(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&L(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,a=e.options.lineNumbers,i=r.lineDiv,o=i.firstChild;function l(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==i){for(;o!=f.node;)o=l(o);var p=a&&null!=t&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(p=!1),un(e,f,u,n)),p&&(_(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Xe(e.options,u)))),o=f.node.nextSibling}else{var h=vn(e,f,u,n);i.insertBefore(h,o)}u+=f.size}for(;o;)o=l(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=A()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),_(n.cursorDiv),_(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ra(e,400)),n.updateLineNumbers=null,!0}function la(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=_n(e))r&&(t.visible=Nr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-Nn(e),n.top)}),t.visible=Nr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oa(e,t))break;Or(e);var a=Rr(e);gr(e),Wr(e,a),ua(e,a),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function sa(e,t){var n=new ia(e,t);if(oa(e,n)){Or(e),la(e,n);var r=Rr(e);gr(e),Wr(e,r),ua(e,r),n.finish()}}function ca(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ua(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function da(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,i=r+"px",o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=i),n[o].gutterBackground&&(n[o].gutterBackground.style.left=i));var l=n[o].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+a+"px")}}function fa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Xe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var a=r.measure.appendChild(j("div",[j("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=a.firstChild.offsetWidth,o=a.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ca(e.display),!0}return!1}function pa(e,t){for(var n=[],r=!1,a=0;a<e.length;a++){var i=e[a],o=null;if("string"!=typeof i&&(o=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;r=!0}n.push({className:i,style:o})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function ha(e){var t=e.gutters,n=e.gutterSpecs;_(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var a=n[r],i=a.className,o=a.style,l=t.appendChild(j("div",null,"CodeMirror-gutter "+i));o&&(l.style.cssText=o),"CodeMirror-linenumbers"==i&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ca(e)}function ma(e){ha(e.display),dr(e),da(e)}function ga(e,t,r,a){var i=this;this.input=r,i.scrollbarFiller=j("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=j("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=T("div",null,"CodeMirror-code"),i.selectionDiv=j("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=j("div",null,"CodeMirror-cursors"),i.measure=j("div",null,"CodeMirror-measure"),i.lineMeasure=j("div",null,"CodeMirror-measure"),i.lineSpace=T("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=T("div",[i.lineSpace],"CodeMirror-lines");i.mover=j("div",[c],null,"position: relative"),i.sizer=j("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=j("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=j("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=j("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=j("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||n&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=pa(a.gutters,a.lineNumbers),ha(i),r.init(i)}ia.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)he.apply(null,this.events[e])};var va=0,ba=null;function ya(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function xa(e){var t=ya(e);return t.x*=ba,t.y*=ba,t}function ka(e,t){var r=ya(t),a=r.x,i=r.y,o=e.display,l=o.scroller,c=l.scrollWidth>l.clientWidth,u=l.scrollHeight>l.clientHeight;if(a&&c||i&&u){if(i&&b&&s)e:for(var f=t.target,p=o.view;f!=l;f=f.parentNode)for(var h=0;h<p.length;h++)if(p[h].node==f){e.display.currentWheelTarget=f;break e}if(a&&!n&&!d&&null!=ba)return i&&u&&Ir(e,Math.max(0,l.scrollTop+i*ba)),Fr(e,Math.max(0,l.scrollLeft+a*ba)),(!i||i&&u)&&ye(t),void(o.wheelStartX=null);if(i&&null!=ba){var m=i*ba,g=e.doc.scrollTop,v=g+o.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),sa(e,{top:g,bottom:v})}va<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=a,o.wheelDY=i,setTimeout((function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(ba=(ba*va+n)/(va+1),++va)}}),200)):(o.wheelDX+=a,o.wheelDY+=i))}}o?ba=-.53:n?ba=15:u?ba=-.7:f&&(ba=-1/3);var wa=function(e,t){this.ranges=e,this.primIndex=t};wa.prototype.primary=function(){return this.ranges[this.primIndex]},wa.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},wa.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ea(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new wa(e,this.primIndex)},wa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},wa.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Ea=function(e,t){this.anchor=e,this.head=t};function Ca(e,t,n){var r=e&&e.options.selectionsMayTouch,a=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=B(t,a);for(var i=1;i<t.length;i++){var o=t[i],l=t[i-1],s=tt(l.to(),o.from());if(r&&!o.empty()?s>0:s>=0){var c=it(l.from(),o.from()),u=at(l.to(),o.to()),d=l.empty()?o.from()==o.head:l.from()==l.head;i<=n&&--n,t.splice(--i,2,new Ea(d?u:c,d?c:u))}}return new wa(t,n)}function Sa(e,t){return new wa([new Ea(e,t||e)],0)}function Oa(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function _a(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Oa(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Oa(t).ch-t.to.ch),et(n,r)}function Na(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var a=e.sel.ranges[r];n.push(new Ea(_a(a.anchor,t),_a(a.head,t)))}return Ca(e.cm,n,e.sel.primIndex)}function ja(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Ta(e){e.doc.mode=ze(e.options,e.doc.modeOption),La(e)}function La(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ra(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Aa(e,t){return 0==t.from.ch&&0==t.to.ch&&""==$(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Da(e,t,n,r){function a(e){return n?n[e]:null}function i(e,n,a){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Nt(e),jt(e,n);var a=r?r(e):1;a!=e.height&&Je(e,a)}(e,n,a,r),sn(e,"change",e,t)}function o(e,t){for(var n=[],i=e;i<t;++i)n.push(new Ut(c[i],a(i),r));return n}var l=t.from,s=t.to,c=t.text,u=Ue(e,l.line),d=Ue(e,s.line),f=$(c),p=a(c.length-1),h=s.line-l.line;if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Aa(e,t)){var m=o(0,c.length-1);i(d,d.text,p),h&&e.remove(l.line,h),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)i(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),p);else{var g=o(1,c.length-1);g.push(new Ut(f+u.text.slice(s.ch),p,r)),i(u,u.text.slice(0,l.ch)+c[0],a(0)),e.insert(l.line+1,g)}else if(1==c.length)i(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),a(0)),e.remove(l.line+1,h);else{i(u,u.text.slice(0,l.ch)+c[0],a(0)),i(d,f+d.text.slice(s.ch),p);var v=o(1,c.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,v)}sn(e,"change",e,t)}function Ma(e,t,n){!function e(r,a,i){if(r.linked)for(var o=0;o<r.linked.length;++o){var l=r.linked[o];if(l.doc!=a){var s=i&&l.sharedHist;n&&!s||(t(l.doc,s),e(l.doc,r,s))}}}(e,null,!0)}function Ia(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,sr(e),Ta(e),Pa(e),e.options.lineWrapping||Vt(e),e.options.mode=t.modeOption,dr(e)}function Pa(e){("rtl"==e.doc.direction?D:O)(e.display.lineDiv,"CodeMirror-rtl")}function Fa(e){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=e||1}function Ra(e,t){var n={from:rt(t.from),to:Oa(t),text:Ge(e,t.from,t.to)};return qa(e,n,t.from.line,t.to.line+1),Ma(e,(function(e){return qa(e,n,t.from.line,t.to.line+1)}),!0),n}function za(e){for(;e.length&&$(e).ranges;)e.pop()}function Ba(e,t,n,r){var a=e.history;a.undone.length=0;var i,o,l=+new Date;if((a.lastOp==r||a.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&a.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(za(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(a,a.lastOp==r)))o=$(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Oa(t):i.changes.push(Ra(e,t));else{var s=$(a.done);for(s&&s.ranges||Ka(e.sel,a.done),i={changes:[Ra(e,t)],generation:a.generation},a.done.push(i);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(n),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=l,a.lastOp=a.lastSelOp=r,a.lastOrigin=a.lastSelOrigin=t.origin,o||he(e,"historyAdded")}function Wa(e,t,n,r){var a=e.history,i=r&&r.origin;n==a.lastSelOp||i&&a.lastSelOrigin==i&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==i||function(e,t,n,r){var a=t.charAt(0);return"*"==a||"+"==a&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,$(a.done),t))?a.done[a.done.length-1]=t:Ka(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=i,a.lastSelOp=n,r&&!1!==r.clearRedo&&za(a.undone)}function Ka(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qa(e,t,n,r){var a=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((a||(a=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Ha(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Va(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],a=0;a<t.text.length;++a)r.push(Ha(n[a]));return r}(e,t),r=Ot(e,t);if(!n)return r;if(!r)return n;for(var a=0;a<n.length;++a){var i=n[a],o=r[a];if(i&&o)e:for(var l=0;l<o.length;++l){for(var s=o[l],c=0;c<i.length;++c)if(i[c].marker==s.marker)continue e;i.push(s)}else o&&(n[a]=o)}return n}function Ua(e,t,n){for(var r=[],a=0;a<e.length;++a){var i=e[a];if(i.ranges)r.push(n?wa.prototype.deepCopy.call(i):i);else{var o=i.changes,l=[];r.push({changes:l});for(var s=0;s<o.length;++s){var c=o[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&($(l)[d]=c[d],delete c[d])}}}return r}function Ga(e,t,n,r){if(r){var a=e.anchor;if(n){var i=tt(t,a)<0;i!=tt(n,a)<0?(a=t,t=n):i!=tt(t,n)<0&&(t=n)}return new Ea(a,t)}return new Ea(n||t,t)}function $a(e,t,n,r,a){null==a&&(a=e.cm&&(e.cm.display.shift||e.extend)),Xa(e,new wa([Ga(e.sel.primary(),t,n,a)],0),r)}function Ja(e,t,n){for(var r=[],a=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=Ga(e.sel.ranges[i],t[i],null,a);Xa(e,Ca(e.cm,r,e.sel.primIndex),n)}function Za(e,t,n,r){var a=e.sel.ranges.slice(0);a[t]=n,Xa(e,Ca(e.cm,a,e.sel.primIndex),r)}function Qa(e,t,n,r){Xa(e,Sa(t,n),r)}function Ya(e,t,n){var r=e.history.done,a=$(r);a&&a.ranges?(r[r.length-1]=t,ei(e,t,n)):Xa(e,t,n)}function Xa(e,t,n){ei(e,t,n),Wa(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ei(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ea(lt(e,t[n].anchor),lt(e,t[n].head))},origin:n&&n.origin};return he(e,"beforeSelectionChange",e,r),e.cm&&he(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Ca(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ti(e,ri(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Lr(e.cm)}function ti(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),sn(e,"cursorActivity",e))}function ni(e){ti(e,ri(e,e.sel,null,!1))}function ri(e,t,n,r){for(var a,i=0;i<t.ranges.length;i++){var o=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],s=ii(e,o.anchor,l&&l.anchor,n,r),c=ii(e,o.head,l&&l.head,n,r);(a||s!=o.anchor||c!=o.head)&&(a||(a=t.ranges.slice(0,i)),a[i]=new Ea(s,c))}return a?Ca(e.cm,a,t.primIndex):t}function ai(e,t,n,r,a){var i=Ue(e,t.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var l=i.markedSpans[o],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(a&&(he(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--o;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=oi(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(f=tt(d,n))&&(r<0?f<0:f>0))return ai(e,d,t,r,a)}var p=s.find(r<0?-1:1);return(r<0?c:u)&&(p=oi(e,p,r,p.line==t.line?i:null)),p?ai(e,p,t,r,a):null}}return t}function ii(e,t,n,r,a){var i=r||1,o=ai(e,t,n,i,a)||!a&&ai(e,t,n,i,!0)||ai(e,t,n,-i,a)||!a&&ai(e,t,n,-i,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oi(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,et(t.line-1)):null:n>0&&t.ch==(r||Ue(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function li(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),K)}function si(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,a,i){t&&(r.from=lt(e,t)),n&&(r.to=lt(e,n)),a&&(r.text=a),void 0!==i&&(r.origin=i)}),he(e,"beforeChange",e,r),e.cm&&he(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ci(e,t,n){if(e.cm){if(!e.cm.curOp)return ea(e.cm,ci)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=si(e,t,!0))){var r=kt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var a=[{from:t,to:n}],i=0;i<r.length;++i)for(var o=r[i],l=o.find(0),s=0;s<a.length;++s){var c=a[s];if(!(tt(c.to,l.from)<0||tt(c.from,l.to)>0)){var u=[s,1],d=tt(c.from,l.from),f=tt(c.to,l.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),a.splice.apply(a,u),s+=u.length-3}}return a}(e,t.from,t.to);if(r)for(var a=r.length-1;a>=0;--a)ui(e,{from:r[a].from,to:r[a].to,text:a?[""]:t.text,origin:t.origin});else ui(e,t)}}function ui(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Na(e,t);Ba(e,t,n,e.cm?e.cm.curOp.id:NaN),pi(e,t,n,Ot(e,t));var r=[];Ma(e,(function(e,n){n||-1!=B(r,e.history)||(vi(e.history,t),r.push(e.history)),pi(e,t,null,Ot(e,t))}))}}function di(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var a,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,c=0;c<l.length&&(a=l[c],n?!a.ranges||a.equals(e.sel):a.ranges);c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(a=l.pop()).ranges){if(r)return void l.push(a);break}if(Ka(a,s),n&&!a.equals(e.sel))return void Xa(e,a,{clearRedo:!1});o=a}var u=[];Ka(o,s),s.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),f=function(n){var r=a.changes[n];if(r.origin=t,d&&!si(e,r,!1))return l.length=0,{};u.push(Ra(e,r));var i=n?Na(e,r):$(l);pi(e,r,i,Va(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Oa(r)});var o=[];Ma(e,(function(e,t){t||-1!=B(o,e.history)||(vi(e.history,r),o.push(e.history)),pi(e,r,null,Va(e,r))}))},p=a.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function fi(e,t){if(0!=t&&(e.first+=t,e.sel=new wa(J(e.sel.ranges,(function(e){return new Ea(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)fr(e.cm,r,"gutter")}}function pi(e,t,n,r){if(e.cm&&!e.cm.curOp)return ea(e.cm,pi)(e,t,n,r);if(t.to.line<e.first)fi(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var a=t.text.length-1-(e.first-t.from.line);fi(e,a),t={from:et(e.first,0),to:et(t.to.line+a,t.to.ch),text:[$(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:et(i,Ue(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Na(e,t)),e.cm?function(e,t,n){var r=e.doc,a=e.display,i=t.from,o=t.to,l=!1,s=i.line;e.options.lineWrapping||(s=Ze(Rt(Ue(r,i.line))),r.iter(s,o.line+1,(function(e){if(e==a.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Da(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,(function(e){var t=Ht(e);t>a.maxLineLength&&(a.maxLine=e,a.maxLineLength=t,a.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var a=Ue(e,r).stateAfter;if(a&&(!(a instanceof ct)||r+a.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),ra(e,400);var c=t.text.length-(o.line-i.line)-1;t.full?dr(e):i.line!=o.line||1!=t.text.length||Aa(e.doc,t)?dr(e,i.line,o.line+1,c):fr(e,i.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var f={from:i,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&sn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,r):Da(e,t,r),ei(e,n,K),e.cantEdit&&ii(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function hi(e,t,n,r,a){var i;r||(r=n),tt(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof t&&(t=e.splitLines(t)),ci(e,{from:n,to:r,text:t,origin:a})}function mi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function gi(e,t,n,r){for(var a=0;a<e.length;++a){var i=e[a],o=!0;if(i.ranges){i.copied||((i=e[a]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)mi(i.ranges[l].anchor,t,n,r),mi(i.ranges[l].head,t,n,r)}else{for(var s=0;s<i.changes.length;++s){var c=i.changes[s];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){o=!1;break}}o||(e.splice(0,a+1),a=0)}}}function vi(e,t){var n=t.from.line,r=t.to.line,a=t.text.length-(r-n)-1;gi(e.done,n,r,a),gi(e.undone,n,r,a)}function bi(e,t,n,r){var a=t,i=t;return"number"==typeof t?i=Ue(e,ot(e,t)):a=Ze(t),null==a?null:(r(i,a)&&e.cm&&fr(e.cm,a,n),i)}function yi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function xi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var a=e[r];t+=a.chunkSize(),n+=a.height,a.parent=this}this.size=t,this.height=n,this.parent=null}Ea.prototype.from=function(){return it(this.anchor,this.head)},Ea.prototype.to=function(){return at(this.anchor,this.head)},Ea.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},yi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var a=this.lines[n];this.height-=a.height,Gt(a),sn(a,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},xi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],a=r.chunkSize();if(e<a){var i=Math.min(t,a-e),o=r.height;if(r.removeInner(e,i),this.height-=o-r.height,a==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof yi))){var l=[];this.collapse(l),this.children=[new yi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var a=this.children[r],i=a.chunkSize();if(e<=i){if(a.insertInner(e,t,n),a.lines&&a.lines.length>50){for(var o=a.lines.length%25+25,l=o;l<a.lines.length;){var s=new yi(a.lines.slice(l,l+=25));a.height-=s.height,this.children.splice(++r,0,s),s.parent=this}a.lines=a.lines.slice(0,o),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new xi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new xi(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var a=this.children[r],i=a.chunkSize();if(e<i){var o=Math.min(t,i-e);if(a.iterN(e,o,n))return!0;if(0==(t-=o))break;e=0}else e-=i}}};var ki=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function wi(e,t,n){qt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Tr(e,n)}ki.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ze(n);if(null!=r&&t){for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(n.widgets=null);var i=kn(this);Je(n,Math.max(0,n.height-i)),e&&(Xr(e,(function(){wi(e,n,-i),fr(e,r,"widget")})),sn(e,"lineWidgetCleared",e,this,r))}},ki.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var a=kn(this)-t;a&&(Wt(this.doc,r)||Je(r,r.height+a),n&&Xr(n,(function(){n.curOp.forceUpdate=!0,wi(n,r,a),sn(n,"lineWidgetChanged",n,e,Ze(r))})))},be(ki);var Ei=0,Ci=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ei};function Si(e,t,n,r,a){if(r&&r.shared)return function(e,t,n,r,a){(r=F(r)).shared=!1;var i=[Si(e,t,n,r,a)],o=i[0],l=r.widgetNode;return Ma(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),i.push(Si(e,lt(e,t),lt(e,n),r,a));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;o=$(i)})),new Oi(i,o)}(e,t,n,r,a);if(e.cm&&!e.cm.curOp)return ea(e.cm,Si)(e,t,n,r,a);var i=new Ci(e,a),o=tt(t,n);if(r&&F(r,i,!1),o>0||0==o&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=T("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ft(e,t.line,t,n,i)||t.line!=n.line&&Ft(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt=!0}i.addToHistory&&Ba(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(e){c&&i.collapsed&&!c.options.lineWrapping&&Rt(e)==c.display.maxLine&&(l=!0),i.collapsed&&s!=t.line&&Je(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Et(i,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Wt(e,t)&&Je(t,0)})),i.clearOnEnter&&de(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Ei,i.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),i.collapsed)dr(c,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)fr(c,u,"text");i.atomic&&ni(c.doc),sn(c,"markerAdded",c,i)}return i}Ci.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ur(e),ve(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,a=null,i=0;i<this.lines.length;++i){var o=this.lines[i],l=Ct(o.markedSpans,this);e&&!this.collapsed?fr(e,Ze(o),"text"):e&&(null!=l.to&&(a=Ze(o)),null!=l.from&&(r=Ze(o))),o.markedSpans=St(o.markedSpans,l),null==l.from&&this.collapsed&&!Wt(this.doc,o)&&e&&Je(o,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Rt(this.lines[s]),u=Ht(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ni(e.doc)),e&&sn(e,"markerCleared",e,this,r,a),t&&Gr(e),this.parent&&this.parent.clear()}},Ci.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var a=0;a<this.lines.length;++a){var i=this.lines[a],o=Ct(i.markedSpans,this);if(null!=o.from&&(n=et(t?i:Ze(i),o.from),-1==e))return n;if(null!=o.to&&(r=et(t?i:Ze(i),o.to),1==e))return r}return n&&{from:n,to:r}},Ci.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Xr(r,(function(){var a=t.line,i=Ze(t.line),o=Ln(r,i);if(o&&(Rn(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Wt(n.doc,a)&&null!=n.height){var l=n.height;n.height=null;var s=kn(n)-l;s&&Je(a,a.height+s)}sn(r,"markerChanged",r,e)}))},Ci.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ci.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(Ci);var Oi=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _i(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ni(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ma(n.primary.doc,(function(e){return r.push(e)}));for(var a=0;a<n.markers.length;a++){var i=n.markers[a];-1==B(r,i.doc)&&(i.parent=null,n.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}Oi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sn(this,"clear")}},Oi.prototype.find=function(e,t){return this.primary.find(e,t)},be(Oi);var ji=0,Ti=function(e,t,n,r,a){if(!(this instanceof Ti))return new Ti(e,t,n,r,a);null==n&&(n=0),xi.call(this,[new yi([new Ut("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=et(n,0);this.sel=Sa(i),this.history=new Fa(null),this.id=++ji,this.modeOption=t,this.lineSep=r,this.direction="rtl"==a?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Da(this,{from:i,to:i,text:e}),Xa(this,Sa(i),K)};Ti.prototype=Q(xi.prototype,{constructor:Ti,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=$e(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:na((function(e){var t=et(this.first,0),n=this.first+this.size-1;ci(this,{from:t,to:et(n,Ue(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ar(this.cm,0,0),Xa(this,Sa(t),K)})),replaceRange:function(e,t,n,r){hi(this,e,t=lt(this,t),n=n?lt(this,n):t,r)},getRange:function(e,t,n){var r=Ge(this,lt(this,e),lt(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ye(this,e))return Ue(this,e)},getLineNumber:function(e){return Ze(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ue(this,e)),Rt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return lt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:na((function(e,t,n){Qa(this,lt(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:na((function(e,t,n){Qa(this,lt(this,e),lt(this,t||e),n)})),extendSelection:na((function(e,t,n){$a(this,lt(this,e),t&<(this,t),n)})),extendSelections:na((function(e,t){Ja(this,st(this,e),t)})),extendSelectionsBy:na((function(e,t){Ja(this,st(this,J(this.sel.ranges,e)),t)})),setSelections:na((function(e,t,n){if(e.length){for(var r=[],a=0;a<e.length;a++)r[a]=new Ea(lt(this,e[a].anchor),lt(this,e[a].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Xa(this,Ca(this.cm,r,t),n)}})),addSelection:na((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ea(lt(this,e),lt(this,t||e))),Xa(this,Ca(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var a=Ge(this,n[r].from(),n[r].to());t=t?t.concat(a):a}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var a=Ge(this,n[r].from(),n[r].to());!1!==e&&(a=a.join(e||this.lineSeparator())),t[r]=a}return t},replaceSelection:function(e,t,n){for(var r=[],a=0;a<this.sel.ranges.length;a++)r[a]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:na((function(e,t,n){for(var r=[],a=this.sel,i=0;i<a.ranges.length;i++){var o=a.ranges[i];r[i]={from:o.from(),to:o.to(),text:this.splitLines(e[i]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],a=et(e.first,0),i=a,o=0;o<t.length;o++){var l=t[o],s=ja(l.from,a,i),c=ja(Oa(l),a,i);if(a=l.to,i=c,"around"==n){var u=e.sel.ranges[o],d=tt(u.head,u.anchor)<0;r[o]=new Ea(d?c:s,d?s:c)}else r[o]=new Ea(s,s)}return new wa(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)ci(this,r[s]);l?Ya(this,l):this.cm&&Lr(this.cm)})),undo:na((function(){di(this,"undo")})),redo:na((function(){di(this,"redo")})),undoSelection:na((function(){di(this,"undo",!0)})),redoSelection:na((function(){di(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var a=0;a<e.undone.length;a++)e.undone[a].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Fa(this.history.maxGeneration),Ma(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ua(this.history.done),undone:Ua(this.history.undone)}},setHistory:function(e){var t=this.history=new Fa(this.history.maxGeneration);t.done=Ua(e.done.slice(0),null,!0),t.undone=Ua(e.undone.slice(0),null,!0)},setGutterMarker:na((function(e,t,n){return bi(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:na((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bi(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ye(this,e))return null;if(t=e,!(e=Ue(this,e)))return null}else if(null==(t=Ze(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:na((function(e,t,n){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:na((function(e,t,n){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",a=e[r];if(!a)return!1;if(null==n)e[r]=null;else{var i=a.match(C(n));if(!i)return!1;var o=i.index+i[0].length;e[r]=a.slice(0,i.index)+(i.index&&o!=a.length?" ":"")+a.slice(o)||null}return!0}))})),addLineWidget:na((function(e,t,n){return function(e,t,n,r){var a=new ki(e,n,r),i=e.cm;return i&&a.noHScroll&&(i.display.alignWidgets=!0),bi(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==a.insertAt?n.push(a):n.splice(Math.min(n.length-1,Math.max(0,a.insertAt)),0,a),a.line=t,i&&!Wt(e,t)){var r=qt(t)<e.scrollTop;Je(t,t.height+kn(a)),r&&Tr(i,a.height),i.curOp.forceUpdate=!0}return!0})),i&&sn(i,"lineWidgetAdded",i,a,"number"==typeof t?t:Ze(t)),a}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Si(this,lt(this,e),lt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Si(this,e=lt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ue(this,(e=lt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var a=n[r];(null==a.from||a.from<=e.ch)&&(null==a.to||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],a=e.line;return this.iter(e.line,t.line+1,(function(i){var o=i.markedSpans;if(o)for(var l=0;l<o.length;l++){var s=o[l];null!=s.to&&a==e.line&&e.ch>=s.to||null==s.from&&a!=e.line||null!=s.from&&a==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++a})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(a){var i=a.text.length+r;if(i>e)return t=e,!0;e-=i,++n})),lt(this,et(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ti($e(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ti($e(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],a=r.find(),i=e.clipPos(a.from),o=e.clipPos(a.to);if(tt(i,o)){var l=Si(e,i,o,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,_i(this)),r},unlinkDoc:function(e){if(e instanceof _o&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ni(_i(this));break}if(e.history==this.history){var n=[e.id];Ma(e,(function(e){return n.push(e.id)}),!0),e.history=new Fa(null),e.history.done=Ua(this.history.done,n),e.history.undone=Ua(this.history.undone,n)}},iterLinkedDocs:function(e){Ma(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:na((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Xr(t=this.cm,(function(){Pa(t),dr(t)})))}))}),Ti.prototype.eachLine=Ti.prototype.iter;var Li=0;function Ai(e){var t=this;if(Di(t),!me(t,e)&&!wn(t.display,e)){ye(e),o&&(Li=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var a=r.length,i=Array(a),l=0,s=function(){++l==a&&ea(t,(function(){var e={from:n=lt(t.doc,n),to:n,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ci(t.doc,e),Ya(t.doc,Sa(lt(t.doc,n),lt(t.doc,Oa(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[n]=e),s()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),ei(t.doc,Sa(n,n)),f)for(var p=0;p<f.length;++p)hi(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Di(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Mi(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var a=t[r].CodeMirror;a&&n.push(a)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ii=!1;function Pi(){var e;Ii||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Mi(Fi)}),100))})),de(window,"blur",(function(){return Mi(Sr)})),Ii=!0)}function Fi(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ri={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"},zi=0;zi<10;zi++)Ri[zi+48]=Ri[zi+96]=String(zi);for(var Bi=65;Bi<=90;Bi++)Ri[Bi]=String.fromCharCode(Bi);for(var Wi=1;Wi<=12;Wi++)Ri[Wi+111]=Ri[Wi+63235]="F"+Wi;var Ki={};function qi(e){var t,n,r,a,i=e.split(/-(?!$)/);e=i[i.length-1];for(var o=0;o<i.length-1;o++){var l=i[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Hi(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var a=J(n.split(" "),qi),i=0;i<a.length;i++){var o=void 0,l=void 0;i==a.length-1?(l=a.join(" "),o=r):(l=a.slice(0,i+1).join(" "),o="...");var s=t[l];if(s){if(s!=o)throw new Error("Inconsistent bindings for "+l)}else t[l]=o}delete e[n]}for(var c in t)e[c]=t[c];return e}function Vi(e,t,n,r){var a=(t=Ji(t)).call?t.call(e,r):t[e];if(!1===a)return"nothing";if("..."===a)return"multi";if(null!=a&&n(a))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Vi(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var o=Vi(e,t.fallthrough[i],n,r);if(o)return o}}}function Ui(e){var t="string"==typeof e?e:Ri[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Gi(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function $i(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Ri[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Gi(n,e,t))}function Ji(e){return"string"==typeof e?Ki[e]:e}function Zi(e,t){for(var n=e.doc.sel.ranges,r=[],a=0;a<n.length;a++){for(var i=t(n[a]);r.length&&tt(i.from,$(r).to)<=0;){var o=r.pop();if(tt(o.from,i.from)<0){i.from=o.from;break}}r.push(i)}Xr(e,(function(){for(var t=r.length-1;t>=0;t--)hi(e.doc,"",r[t].from,r[t].to,"+delete");Lr(e)}))}function Qi(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Yi(e,t,n){var r=Qi(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Xi(e,t,n,r,a){if(e){"rtl"==t.doc.direction&&(a=-a);var i=ce(n,t.doc.direction);if(i){var o,l=a<0?$(i):i[0],s=a<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=An(t,n);o=a<0?n.text.length-1:0;var u=Dn(t,c,o).top;o=ie((function(e){return Dn(t,c,e).top==u}),a<0==(1==l.level)?l.from:l.to-1,o),"before"==s&&(o=Qi(n,o,1))}else o=a<0?l.to:l.from;return new et(r,o,s)}}return new et(r,a<0?n.text.length:0,a<0?"before":"after")}Ki.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"},Ki.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"},Ki.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"},Ki.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"]},Ki.default=b?Ki.macDefault:Ki.pcDefault;var eo={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),K)},killLine:function(e){return Zi(e,(function(t){if(t.empty()){var n=Ue(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Zi(e,(function(t){return{from:et(t.from().line,0),to:lt(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Zi(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Zi(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Zi(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return to(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return no(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ue(e.doc,t),r=function(e){for(var t;t=It(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ze(r)),Xi(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),H)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),H)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?no(e,t.head):r}),H)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,a=0;a<n.length;a++){var i=n[a].from(),o=R(e.getLine(i.line),i.ch,r);t.push(G(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Xr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var a=t[r].head,i=Ue(e.doc,a.line).text;if(i)if(a.ch==i.length&&(a=new et(a.line,a.ch-1)),a.ch>0)a=new et(a.line,a.ch+1),e.replaceRange(i.charAt(a.ch-1)+i.charAt(a.ch-2),et(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var o=Ue(e.doc,a.line-1).text;o&&(a=new et(a.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(a.line-1,o.length-1),a,"+transpose"))}n.push(new Ea(a,a))}e.setSelections(n)}))},newlineAndIndent:function(e){return Xr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Lr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function to(e,t){var n=Ue(e.doc,t),r=Rt(n);return r!=n&&(t=Ze(r)),Xi(!0,e,r,t,1)}function no(e,t){var n=to(e,t.line),r=Ue(e.doc,n.line),a=ce(r,e.doc.direction);if(!a||0==a[0].level){var i=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=i&&t.ch;return et(n.line,o?0:i,n.sticky)}return n}function ro(e,t,n){if("string"==typeof t&&!(t=eo[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),a=t(e)!=W}finally{e.display.shift=r,e.state.suppressEdits=!1}return a}var ao=new z;function io(e,t,n,r){var a=e.state.keySeq;if(a){if(Ui(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ao.set(50,(function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())})),oo(e,a+" "+t,n,r))return!0}return oo(e,t,n,r)}function oo(e,t,n,r){var a=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var a=Vi(t,e.state.keyMaps[r],n,e);if(a)return a}return e.options.extraKeys&&Vi(t,e.options.extraKeys,n,e)||Vi(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==a&&(e.state.keySeq=t),"handled"==a&&sn(e,"keyHandled",e,t,n),"handled"!=a&&"multi"!=a||(ye(n),kr(e)),!!a}function lo(e,t){var n=$i(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?io(e,"Shift-"+n,t,(function(t){return ro(e,t,!0)}))||io(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ro(e,t)})):io(e,n,t,(function(t){return ro(e,t)})))}var so=null;function co(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=A(),me(t,e)))){o&&l<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var a=lo(t,e);d&&(so=a?r:null,a||88!=r||De||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!a&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(O(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n))}D(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function uo(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function fo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||wn(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==so)return so=null,void ye(e);if(!d||e.which&&!(e.which<10)||!lo(t,e)){var a=String.fromCharCode(null==r?n:r);"\b"!=a&&(function(e,t,n){return io(e,"'"+n+"'",t,(function(t){return ro(e,t,!0)}))}(t,e,a)||t.display.input.onKeyPress(e))}}}var po,ho,mo=function(e,t,n){this.time=e,this.pos=t,this.button=n};function go(e){var t=this,n=t.display;if(!(me(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,wn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!yo(t,e)){var r=cr(t,e),a=Ce(e),i=r?function(e,t){var n=+new Date;return ho&&ho.compare(n,e,t)?(po=ho=null,"triple"):po&&po.compare(n,e,t)?(ho=new mo(n,e,t),po=null,"double"):(po=new mo(n,e,t),ho=null,"single")}(r,a):"single";window.focus(),1==a&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,a){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),io(e,Gi(i=(1==t?"Left":2==t?"Middle":"Right")+i,a),a,(function(t){if("string"==typeof t&&(t=eo[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=W}finally{e.state.suppressEdits=!1}return r}))}(t,a,r,i,e)||(1==a?r?function(e,t,n,r){o?setTimeout(P(wr,e),0):e.curOp.focus=A();var a,i=function(e,t,n){var r=e.getOption("configureMouse"),a=r?r(e,t,n):{};if(null==a.unit){var i=y?n.shiftKey&&n.metaKey:n.altKey;a.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==a.extend||e.doc.extend)&&(a.extend=e.doc.extend||n.shiftKey),null==a.addNew&&(a.addNew=b?n.metaKey:n.ctrlKey),null==a.moveOnDrag&&(a.moveOnDrag=!(b?n.altKey:n.ctrlKey)),a}(e,n,r),c=e.doc.sel;e.options.dragDrop&&_e&&!e.isReadOnly()&&"single"==n&&(a=c.contains(t))>-1&&(tt((a=c.ranges[a]).from(),t)<0||t.xRel>0)&&(tt(a.to(),t)>0||t.xRel<0)?function(e,t,n,r){var a=e.display,i=!1,c=ea(e,(function(t){s&&(a.scroller.draggable=!1),e.state.draggingText=!1,pe(a.wrapper.ownerDocument,"mouseup",c),pe(a.wrapper.ownerDocument,"mousemove",u),pe(a.scroller,"dragstart",d),pe(a.scroller,"drop",c),i||(ye(t),r.addNew||$a(e.doc,n,null,null,r.extend),s&&!f||o&&9==l?setTimeout((function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()}),20):a.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};s&&(a.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,a.scroller.dragDrop&&a.scroller.dragDrop(),de(a.wrapper.ownerDocument,"mouseup",c),de(a.wrapper.ownerDocument,"mousemove",u),de(a.scroller,"dragstart",d),de(a.scroller,"drop",c),Er(e),setTimeout((function(){return a.input.focus()}),20)}(e,r,t,i):function(e,t,n,r){var a=e.display,i=e.doc;ye(t);var o,l,s=i.sel,c=s.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(n),o=l>-1?c[l]:new Ea(n,n)):(o=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ea(n,n)),n=cr(e,t,!0,!0),l=-1;else{var u=vo(e,n,r.unit);o=r.extend?Ga(o,u.anchor,u.head,r.extend):u}r.addNew?-1==l?(l=c.length,Xa(i,Ca(e,c.concat([o]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(Xa(i,Ca(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=i.sel):Za(i,l,o,q):(l=0,Xa(i,new wa([o],0),q),s=i.sel);var d=n;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var a=[],c=e.options.tabSize,u=R(Ue(i,n.line).text,n.ch,c),f=R(Ue(i,t.line).text,t.ch,c),p=Math.min(u,f),h=Math.max(u,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ue(i,m).text,b=V(v,p,c);p==h?a.push(new Ea(et(m,b),et(m,b))):v.length>b&&a.push(new Ea(et(m,b),et(m,V(v,h,c))))}a.length||a.push(new Ea(n,n)),Xa(i,Ca(e,s.ranges.slice(0,l).concat(a),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=o,k=vo(e,t,r.unit),w=x.anchor;tt(k.anchor,w)>0?(y=k.head,w=it(x.from(),k.anchor)):(y=k.anchor,w=at(x.to(),k.head));var E=s.ranges.slice(0);E[l]=function(e,t){var n=t.anchor,r=t.head,a=Ue(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ce(a);if(!i)return t;var o=le(i,n.ch,n.sticky),l=i[o];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=o+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==i.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(i,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var f=i[c+(s?-1:0)],p=s==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new Ea(new et(n.line,h,m),r)}(e,new Ea(lt(i,w),y)),Xa(i,Ca(e,E,l),q)}}var p=a.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(ye(t),a.input.focus()),pe(a.wrapper.ownerDocument,"mousemove",g),pe(a.wrapper.ownerDocument,"mouseup",v),i.history.lastSelOrigin=null}var g=ea(e,(function(t){0!==t.buttons&&Ce(t)?function t(n){var o=++h,l=cr(e,n,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,d)){e.curOp.focus=A(),f(l);var s=Nr(a,i);(l.line>=s.to||l.line<s.from)&&setTimeout(ea(e,(function(){h==o&&t(n)})),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(ea(e,(function(){h==o&&(a.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ea(e,m);e.state.selectingText=v,de(a.wrapper.ownerDocument,"mousemove",g),de(a.wrapper.ownerDocument,"mouseup",v)}(e,r,t,i)}(t,r,i,e):Ee(e)==n.scroller&&ye(e):2==a?(r&&$a(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==a&&(E?t.display.input.onContextMenu(e):Er(t)))}}function vo(e,t,n){if("char"==n)return new Ea(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ea(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ea(r.from,r.to)}function bo(e,t,n,r){var a,i;if(t.touches)a=t.touches[0].clientX,i=t.touches[0].clientY;else try{a=t.clientX,i=t.clientY}catch(e){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(i>l.bottom||!ve(e,n))return ke(t);i-=l.top-o.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=o.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=a)return he(e,n,e,Qe(e.doc,i),e.display.gutterSpecs[s].className,t),ke(t)}}function yo(e,t){return bo(e,t,"gutterClick",!0)}function xo(e,t){wn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&bo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||E||e.display.input.onContextMenu(t)}function ko(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var wo={toString:function(){return"CodeMirror.Init"}},Eo={},Co={};function So(e,t,n){if(!t!=!(n&&n!=wo)){var r=e.display.dragFunctions,a=t?de:pe;a(e.display.scroller,"dragstart",r.start),a(e.display.scroller,"dragenter",r.enter),a(e.display.scroller,"dragover",r.over),a(e.display.scroller,"dragleave",r.leave),a(e.display.scroller,"drop",r.drop)}}function Oo(e){e.options.lineWrapping?(D(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),Vt(e)),sr(e),dr(e),Bn(e),setTimeout((function(){return Wr(e)}),100)}function _o(e,t){var n=this;if(!(this instanceof _o))return new _o(e,t);this.options=t=t?F(t):{},F(Eo,t,!1);var r=t.value;"string"==typeof r?r=new Ti(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var a=new _o.inputStyles[t.inputStyle](this),i=this.display=new ga(e,r,a,t);for(var c in i.wrapper.CodeMirror=this,ko(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(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},t.autofocus&&!v&&i.input.focus(),o&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ea(e,go)),de(t.scroller,"dblclick",o&&l<11?ea(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!yo(e,t)&&!wn(e.display,t)){ye(t);var r=e.findWordAt(n);$a(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return xo(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xo(e,n)}));var n,r={end:0};function a(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(a){if(!me(e,a)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(a)&&!yo(e,a)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==a.touches.length&&(t.activeTouch.left=a.touches[0].pageX,t.activeTouch.top=a.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!wn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||i(r,r.prev)?new Ea(l,l):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(l):new Ea(et(l.line,0),lt(e.doc,et(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ye(n)}a()})),de(t.scroller,"touchcancel",a),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Ir(e,t.scroller.scrollTop),Fr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return ka(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return ka(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||we(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=j("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,r)}}(e,t),we(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Li<100))we(t);else if(!me(e,t)&&!wn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=j("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ea(e,Ai),leave:function(t){me(e,t)||Di(e)}};var s=t.input.getField();de(s,"keyup",(function(t){return uo.call(e,t)})),de(s,"keydown",ea(e,co)),de(s,"keypress",ea(e,fo)),de(s,"focus",(function(t){return Cr(e,t)})),de(s,"blur",(function(t){return Sr(e,t)}))}(this),Pi(),Ur(this),this.curOp.forceUpdate=!0,Ia(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Cr(n)}),20):Sr(this),Co)Co.hasOwnProperty(c)&&Co[c](this,t[c],wo);fa(this),t.finishInit&&t.finishInit(this);for(var u=0;u<No.length;++u)No[u](this);Gr(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}_o.defaults=Eo,_o.optionHandlers=Co;var No=[];function jo(e,t,n,r){var a,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?a=pt(e,t).state:n="prev");var o=e.options.tabSize,l=Ue(i,t),s=R(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=i.mode.indent(a,l.text.slice(u.length),l.text))==W||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>i.first?R(Ue(i,t-1).text,null,o):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)f+=o,d+="\t";if(f<c&&(d+=G(c-f)),d!=u)return hi(i,d,et(t,0),et(t,u.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var m=i.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=et(t,u.length);Za(i,h,new Ea(g,g));break}}}_o.defineInitHook=function(e){return No.push(e)};var To=null;function Lo(e){To=e}function Ao(e,t,n,r,a){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var o=+new Date-200,l="paste"==a||e.state.pasteIncoming>o,s=Le(t),c=null;if(l&&r.ranges.length>1)if(To&&To.text.join("\n")==t){if(r.ranges.length%To.text.length==0){c=[];for(var u=0;u<To.text.length;u++)c.push(i.splitLines(To.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=J(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!l?m=et(m.line,Math.min(Ue(i,m.line).text.length,m.ch+$(s).length)):l&&To&&To.lineWise&&To.text.join("\n")==s.join("\n")&&(h=m=et(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:s,origin:a||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};ci(e.doc,g),sn(e,"inputRead",e,g)}t&&!l&&Mo(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Do(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Xr(t,(function(){return Ao(t,n,0,null,"paste")})),!0}function Mo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var a=n.ranges[r];if(!(a.head.ch>100||r&&n.ranges[r-1].head.line==a.head.line)){var i=e.getModeAt(a.head),o=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){o=jo(e,a.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ue(e.doc,a.head.line).text.slice(0,a.head.ch))&&(o=jo(e,a.head.line,"smart"));o&&sn(e,"electricInput",e,a.head.line)}}}function Io(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var a=e.doc.sel.ranges[r].head.line,i={anchor:et(a,0),head:et(a+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function Po(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Fo(){var e=j("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=j("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Po(e),t}function Ro(e,t,n,r,a){var i=t,o=n,l=Ue(e,t.line),s=a&&"rtl"==e.direction?-n:n;function c(i){var o,c;if("codepoint"==r){var u=l.text.charCodeAt(t.ch+(r>0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=a?function(e,t,n,r){var a=ce(t,e.doc.direction);if(!a)return Yi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=le(a,n.ch,n.sticky),o=a[i];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Yi(t,n,r);var l,s=function(e,n){return Qi(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||An(e,t),Yn(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==o.level){var d=1==o.level==r<0,f=s(n,d?1:-1);if(null!=f&&(d?f<=o.to&&f<=u.end:f>=o.from&&f>=u.begin)){var p=d?"before":"after";return new et(n.line,f,p)}}var h=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,s(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<a.length;e+=t){var o=a[e],l=t>0==(1!=o.level),c=l?r.begin:s(r.end,-1);if(o.from<=c&&c<o.to)return i(c,l);if(c=l?o.from:s(o.to,-1),r.begin<=c&&c<r.end)return i(c,l)}},m=h(i+r,r,u);if(m)return m;var g=r>0?u.end:s(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:a.length-1,r,c(g)))?null:m}(e.cm,l,t,n):Yi(l,t,n);if(null==o){if(i||(c=t.line+s)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(l=Ue(e,c))))return!1;t=Xi(a,e.cm,l,t.line,s)}else t=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var h=l.text.charAt(t.ch)||"\n",m=ee(h,f)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=ii(e,t,i,o,!0);return nt(i,g)&&(g.hitSide=!0),g}function zo(e,t,n,r){var a,i,o=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*rr(e.display),3);a=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(a=n>0?t.bottom+3:t.top-3);for(;(i=Zn(e,l,a)).outside;){if(n<0?a<=0:a>=o.height){i.hitSide=!0;break}a+=5*n}return i}var Bo=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Wo(e,t){var n=Ln(e,t.line);if(!n||n.hidden)return null;var r=Ue(e.doc,t.line),a=jn(n,r,t.line),i=ce(r,e.doc.direction),o="left";i&&(o=le(i,t.ch)%2?"right":"left");var l=Pn(a.map,t.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function Ko(e,t){return t&&(e.bad=!0),e}function qo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ko(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var a=0;a<e.display.view.length;a++){var i=e.display.view[a];if(i.node==r)return Ho(i,t,n)}}function Ho(e,t,n){var r=e.text.firstChild,a=!1;if(!t||!L(r,t))return Ko(et(Ze(e.line),0),!0);if(t==r&&(a=!0,t=r.childNodes[n],n=0,!t)){var i=e.rest?$(e.rest):e.line;return Ko(et(Ze(i),i.text.length),a)}var o=3==t.nodeType?t:null,l=t;for(o||1!=t.childNodes.length||3!=t.firstChild.nodeType||(o=t.firstChild,n&&(n=o.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,n,r){for(var a=-1;a<(c?c.length:0);a++)for(var i=a<0?s.map:c[a],o=0;o<i.length;o+=3){var l=i[o+2];if(l==t||l==n){var u=Ze(a<0?e.line:e.rest[a]),d=i[o]+r;return(r<0||l!=t)&&(d=i[o+(r?1:0)]),et(u,d)}}}var d=u(o,l,n);if(d)return Ko(d,a);for(var f=l.nextSibling,p=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return Ko(et(d.line,d.ch-p),a);p+=f.textContent.length}for(var h=l.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return Ko(et(d.line,d.ch+m),a);m+=h.textContent.length}}Bo.prototype.init=function(e){var t=this,n=this,r=n.cm,a=n.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function o(e){if(i(e)&&!me(r,e)){if(r.somethingSelected())Lo({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Io(r);Lo({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,K),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=To.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Fo(),s=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),s.value=To.text.join("\n");var c=document.activeElement;I(s),setTimeout((function(){r.display.lineSpace.removeChild(l),c.focus(),c==a&&n.showPrimarySelection()}),50)}}Po(a,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(a,"paste",(function(e){!i(e)||me(r,e)||Do(e,r)||l<=11&&setTimeout(ea(r,(function(){return t.updateFromDOM()})),20)})),de(a,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(a,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(a,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(a,"touchstart",(function(){return n.forceCompositionEnd()})),de(a,"input",(function(){t.composing||t.readFromDOMSoon()})),de(a,"copy",o),de(a,"cut",o)},Bo.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Bo.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Bo.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bo.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),a=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||a.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=qo(t,e.anchorNode,e.anchorOffset),l=qo(t,e.focusNode,e.focusOffset);if(!o||o.bad||!l||l.bad||0!=tt(it(o,l),a)||0!=tt(at(o,l),i)){var s=t.display.view,c=a.line>=t.display.viewFrom&&Wo(t,a)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Wo(t,i);if(!u){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Bo.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Bo.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},Bo.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Bo.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return L(this.div,t)},Bo.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bo.prototype.blur=function(){this.div.blur()},Bo.prototype.getField=function(){return this.div},Bo.prototype.supportsTouch=function(){return!0},Bo.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Xr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Bo.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Bo.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=qo(t,e.anchorNode,e.anchorOffset),r=qo(t,e.focusNode,e.focusOffset);n&&r&&Xr(t,(function(){Xa(t.doc,Sa(n,r),K),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Bo.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,a=r.display,i=r.doc.sel.primary(),o=i.from(),l=i.to();if(0==o.ch&&o.line>r.firstLine()&&(o=et(o.line-1,Ue(r.doc,o.line-1).length)),l.ch==Ue(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=et(l.line+1,0)),o.line<a.viewFrom||l.line>a.viewTo-1)return!1;o.line==a.viewFrom||0==(e=ur(r,o.line))?(t=Ze(a.view[0].line),n=a.view[0].node):(t=Ze(a.view[e].line),n=a.view[e-1].node.nextSibling);var s,c,u=ur(r,l.line);if(u==a.view.length-1?(s=a.viewTo-1,c=a.lineDiv.lastChild):(s=Ze(a.view[u+1].line)-1,c=a.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,a){var i="",o=!1,l=e.doc.lineSeparator(),s=!1;function c(){o&&(i+=l,s&&(i+=l),o=s=!1)}function u(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(et(r,0),et(a+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(i=p[0].find(0))&&u(Ge(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),h&&(o=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,s=!1;return i}(r,n,c,t,s)),f=Ge(r.doc,et(t,0),et(s,Ue(r.doc,s).text.length));d.length>1&&f.length>1;)if($(d)==$(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var b=$(d),y=$(f),x=Math.min(b.length-(1==d.length?p:0),y.length-(1==f.length?p:0));h<x&&b.charCodeAt(b.length-h-1)==y.charCodeAt(y.length-h-1);)++h;if(1==d.length&&1==f.length&&t==o.line)for(;p&&p>o.ch&&b.charCodeAt(b.length-h-1)==y.charCodeAt(y.length-h-1);)p--,h++;d[d.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var k=et(t,p),w=et(s,f.length?$(f).length-h:0);return d.length>1||d[0]||tt(k,w)?(hi(r.doc,d,k,w,"+input"),!0):void 0},Bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bo.prototype.reset=function(){this.forceCompositionEnd()},Bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bo.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Bo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Xr(this.cm,(function(){return dr(e.cm)}))},Bo.prototype.setUneditable=function(e){e.contentEditable="false"},Bo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ea(this.cm,Ao)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Bo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Bo.prototype.onContextMenu=function(){},Bo.prototype.resetPosition=function(){},Bo.prototype.needsContentAttribute=!0;var Vo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var a=this.textarea;function i(e){if(!me(r,e)){if(r.somethingSelected())Lo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Io(r);Lo({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,K):(n.prevInput="",a.value=t.text.join("\n"),I(a))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(a.style.width="0px"),de(a,"input",(function(){o&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(a,"paste",(function(e){me(r,e)||Do(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(a,"cut",i),de(a,"copy",i),de(e.scroller,"paste",(function(t){if(!wn(e,t)&&!me(r,t)){if(!a.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,a.dispatchEvent(i)}})),de(e.lineSpace,"selectstart",(function(t){wn(e,t)||ye(t)})),de(a,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(a,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Vo.prototype.createField=function(e){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var a=Gn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+o.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+o.left-i.left))}return r},Vo.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Vo.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&I(this.textarea),o&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&l>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||A()!=this.textarea))try{this.textarea.focus()}catch(e){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Vo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Vo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ae(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=n.value;if(a==r&&!t.somethingSelected())return!1;if(o&&l>=9&&this.hasSelection===a||b&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=a.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(r.length,a.length);s<c&&r.charCodeAt(s)==a.charCodeAt(s);)++s;return Xr(t,(function(){Ao(t,a.slice(s),r.length-s,null,e.composing?"*compose":null),a.length>1e3||a.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&l>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=cr(n,e),c=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&ea(n,Xa)(n.doc,Sa(i),K);var u,f=a.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=window.scrollY),r.input.focus(),s&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&l>=9&&g(),E){we(e);var m=function(){pe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=a.selectionStart){var e=n.somethingSelected(),i=""+(e?a.value:"");a.value="⇚",a.value=i,t.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,a.style.cssText=f,o&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=a.selectionStart)){(!o||o&&l<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==t.prevInput?ea(n,li)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Vo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,a,i){e.defaults[n]=r,a&&(t[n]=i?function(e,t,n){n!=wo&&a(e,t,n)}:a)}e.defineOption=n,e.Init=wo,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ta(e)}),!0),n("indentUnit",2,Ta,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){La(e),Bn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var a=0;;){var i=e.text.indexOf(t,a);if(-1==i)break;a=i+t.length,n.push(et(r,i))}r++}));for(var a=n.length-1;a>=0;a--)hi(e.doc,t,n[a],et(n[a].line,n[a].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=wo&&e.refresh()})),n("specialCharPlaceholder",Yt,(function(e){return e.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(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){ko(e),ma(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ji(t),a=n!=wo&&Ji(n);a&&a.detach&&a.detach(e,r),r.attach&&r.attach(e,a||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oo,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=pa(t,e.options.lineNumbers),ma(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Wr(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),Wr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pa(e.options.gutters,t),ma(e)}),!0),n("firstLineNumber",1,ma,!0),n("lineNumberFormatter",(function(e){return e}),ma,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,So),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,La,!0),n("addModeClass",!1,La,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,La,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(_o),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,a=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ea(this,t[e])(this,n,a),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ji(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ta((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,a=n(t);r<e.length&&n(e[r])<=a;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:ta((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:ta((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ye(this.doc,e)&&jo(this,e,t,n)})),indentSelection:ta((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var a=t[r];if(a.empty())a.head.line>n&&(jo(this,a.head.line,e,!0),n=a.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var i=a.from(),o=a.to(),l=Math.max(n,i.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var s=l;s<n;++s)jo(this,s,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[r].from().ch>0&&Za(this.doc,r,new Ea(i,c[r].to()),K)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=ft(this,Ue(this.doc,e.line)),r=0,a=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var o=r+a>>1;if((o?n[2*o-1]:0)>=i)a=o;else{if(!(n[2*o+1]<i)){t=n[2*o+2];break}r=o+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var a=n[t],i=this.getModeAt(e);if("string"==typeof i[t])a[i[t]]&&r.push(a[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var l=a[i[t][o]];l&&r.push(l)}else i.helperType&&a[i.helperType]?r.push(a[i.helperType]):a[i.name]&&r.push(a[i.name]);for(var s=0;s<a._global.length;s++){var c=a._global[s];c.pred(i,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return pt(this,(e=ot(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Gn(this,null==e?n.head:"object"==typeof e?lt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Un(this,lt(this.doc,e),t||"page")},coordsChar:function(e,t){return Zn(this,(e=Vn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Vn(this,{top:e,left:0},t||"page").top,Qe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,a=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,a=!0),r=Ue(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||a).top+(a?this.doc.height-qt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ar(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,a){var i,o,l,s=this.display,c=(e=Gn(this,lt(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==a?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==a?u=0:"middle"==a&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(l=jr(i,o)).scrollTop&&Ir(i,l.scrollTop),null!=l.scrollLeft&&Fr(i,l.scrollLeft))},triggerOnKeyDown:ta(co),triggerOnKeyPress:ta(fo),triggerOnKeyUp:uo,triggerOnMouseDown:ta(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ta((function(e){Mo(this,e)})),findPosH:function(e,t,n,r){var a=1;t<0&&(a=-1,t=-t);for(var i=lt(this.doc,e),o=0;o<t&&!(i=Ro(this.doc,i,a,n,r)).hitSide;++o);return i},moveH:ta((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ro(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),H)})),deleteH:ta((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Zi(this,(function(n){var a=Ro(r,n.head,e,t,!1);return e<0?{from:a,to:n.head}:{from:n.head,to:a}}))})),findPosV:function(e,t,n,r){var a=1,i=r;t<0&&(a=-1,t=-t);for(var o=lt(this.doc,e),l=0;l<t;++l){var s=Gn(this,o,"div");if(null==i?i=s.left:s.left=i,(o=zo(this,s,a,n)).hitSide)break}return o},moveV:ta((function(e,t){var n=this,r=this.doc,a=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(i)return e<0?o.from():o.to();var l=Gn(n,o.head,"div");null!=o.goalColumn&&(l.left=o.goalColumn),a.push(l.left);var s=zo(n,l,e,t);return"page"==t&&o==r.sel.primary()&&Tr(n,Un(n,s,"div").top-l.top),s}),H),a.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=a[o]})),findWordAt:function(e){var t=Ue(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var a=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var i=t.charAt(n),o=ee(i,a)?function(e){return ee(e,a)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&o(t.charAt(n-1));)--n;for(;r<t.length&&o(t.charAt(r));)++r}return new Ea(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?D(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),he(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==A()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ta((function(e,t){Ar(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-On(this)-this.display.barHeight,width:e.scrollWidth-On(this)-this.display.barWidth,clientHeight:Nn(this),clientWidth:_n(this)}},scrollIntoView:ta((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Dr(e),e.curOp.scrollToPos=t}(this,e):Mr(this,e.from,e.to,e.margin)})),setSize:ta((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&zn(this);var a=this.display.viewFrom;this.doc.iter(a,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){fr(n,a,"widget");break}++a})),this.curOp.forceUpdate=!0,he(this,"refresh",this)})),operation:function(e){return Xr(this,e)},startOperation:function(){return Ur(this)},endOperation:function(){return Gr(this)},refresh:ta((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Bn(this),Ar(this,this.doc.scrollLeft,this.doc.scrollTop),ca(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&sr(this),he(this,"refresh",this)})),swapDoc:ta((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ia(this,e),Bn(this),this.display.input.reset(),Ar(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},be(e),e.registerHelper=function(t,r,a){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=a},e.registerGlobalHelper=function(t,r,a,i){e.registerHelper(t,r,i),n[t]._global.push({pred:a,val:i})}}(_o);var Uo="iter insert remove copy getEditor constructor".split(" ");for(var Go in Ti.prototype)Ti.prototype.hasOwnProperty(Go)&&B(Uo,Go)<0&&(_o.prototype[Go]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ti.prototype[Go]));return be(Ti),_o.inputStyles={textarea:Vo,contenteditable:Bo},_o.defineMode=function(e){_o.defaults.mode||"null"==e||(_o.defaults.mode=e),Fe.apply(this,arguments)},_o.defineMIME=function(e,t){Pe[e]=t},_o.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),_o.defineMIME("text/plain","null"),_o.defineExtension=function(e,t){_o.prototype[e]=t},_o.defineDocExtension=function(e,t){Ti.prototype[e]=t},_o.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=A();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var a;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;a=i.submit;try{var o=i.submit=function(){r(),i.submit=a,i.submit(),i.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=a))}},e.style.display="none";var l=_o((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=pe,e.on=de,e.wheelEventPixels=xa,e.Doc=Ti,e.splitLines=Le,e.countColumn=R,e.findColumn=V,e.isWordChar=X,e.Pass=W,e.signal=he,e.Line=Ut,e.changeEnd=Oa,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=Ie,e.mimeModes=Pe,e.resolveMode=Re,e.getMode=ze,e.modeExtensions=Be,e.extendMode=We,e.copyState=Ke,e.startState=He,e.innerMode=qe,e.commands=eo,e.keyMap=Ki,e.keyName=$i,e.isModifierKey=Ui,e.lookupKey=Vi,e.normalizeKeyMap=Hi,e.StringStream=Ve,e.SharedTextMarker=Oi,e.TextMarker=Ci,e.LineWidget=ki,e.e_preventDefault=ye,e.e_stopPropagation=xe,e.e_stop=we,e.addClass=D,e.contains=L,e.rmClass=O,e.keyNames=Ri}(_o),_o.version="5.58.2",_o}()},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/tree/DirectoryTree.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/tree/DirectoryTree.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("rePB"),a=n("Ff2n"),i=n("VTBJ"),o=n("1OyB"),l=n("vuIU"),s=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),d=n("q1tI"),f=n("TSYQ"),p=n.n(f),h=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,a=e.isStart,i=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),l=[],s=0;s<n;s+=1){var c;l.push(d.createElement("span",{key:s,className:p()(o,(c={},Object(r.a)(c,"".concat(o,"-start"),a[s+1]),Object(r.a)(c,"".concat(o,"-end"),i[s+1]),Object(r.a)(c,"".concat(o,"-end-first-level"),!s&&i[0]),c))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},l)},v=n("815F"),b=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).state={dragNodeHighlight:!1},e.onSelectorClick=function(t){(0,e.props.context.onNodeClick)(t,Object(v.b)(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,Object(v.b)(e.props))},e.onSelect=function(t){if(!e.isDisabled()){var n=e.props.context.onNodeSelect;t.preventDefault(),n(t,Object(v.b)(e.props))}},e.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,a=n.checked,i=e.props.context.onNodeCheck;if(e.isCheckable()&&!r){t.preventDefault();var o=!a;i(t,Object(v.b)(e.props),o)}}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,Object(v.b)(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,Object(v.b)(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,Object(v.b)(e.props))},e.onDragStart=function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,Object(s.a)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,Object(s.a)(e))},e.onDragOver=function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,Object(s.a)(e))},e.onDragLeave=function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,Object(s.a)(e))},e.onDragEnd=function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(s.a)(e))},e.onDrop=function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(s.a)(e))},e.onExpand=function(t){(0,e.props.context.onNodeExpand)(t,Object(v.b)(e.props))},e.setSelectHandle=function(t){e.selectHandle=t},e.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?"open":"close"},e.hasChildren=function(){var t=e.props.eventKey;return!!((e.props.context.keyEntities[t]||{}).children||[]).length},e.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,a=e.props.context.loadData,i=e.hasChildren();return!1!==n&&(n||!a&&!i||a&&r&&!i)},e.isDisabled=function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)},e.isCheckable=function(){var t=e.props.checkable,n=e.props.context.checkable;return!(!n||!1===t)&&n},e.syncLoadData=function(t){var n=t.expanded,r=t.loading,a=t.loaded,i=e.props.context,o=i.loadData,l=i.onNodeLoad;r||o&&n&&!e.isLeaf()&&(e.hasChildren()||a||l(Object(v.b)(e.props)))},e.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.switcherIcon,a=e.props.context,o=a.prefixCls,l=a.switcherIcon,s=r||l;if(e.isLeaf())return d.createElement("span",{className:p()("".concat(o,"-switcher"),"".concat(o,"-switcher-noop"))},"function"==typeof s?s(Object(i.a)(Object(i.a)({},e.props),{},{isLeaf:!0})):s);var c=p()("".concat(o,"-switcher"),"".concat(o,"-switcher_").concat(n?"open":"close"));return d.createElement("span",{onClick:e.onExpand,className:c},"function"==typeof s?s(Object(i.a)(Object(i.a)({},e.props),{},{isLeaf:!1})):s)},e.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,a=t.disableCheckbox,i=e.props.context.prefixCls,o=e.isDisabled(),l=e.isCheckable();if(!l)return null;var s="boolean"!=typeof l?l:null;return d.createElement("span",{className:p()("".concat(i,"-checkbox"),n&&"".concat(i,"-checkbox-checked"),!n&&r&&"".concat(i,"-checkbox-indeterminate"),(o||a)&&"".concat(i,"-checkbox-disabled")),onClick:e.onCheck},s)},e.renderIcon=function(){var t=e.props.loading,n=e.props.context.prefixCls;return d.createElement("span",{className:p()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(n,"-icon_loading"))})},e.renderSelector=function(){var t,n,r=e.state.dragNodeHighlight,a=e.props,i=a.title,o=a.selected,l=a.icon,s=a.loading,c=a.data,u=e.props.context,f=u.prefixCls,h=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,b=u.titleRender,y=e.isDisabled(),x="".concat(f,"-node-content-wrapper");if(h){var k=l||m;t=k?d.createElement("span",{className:p()("".concat(f,"-iconEle"),"".concat(f,"-icon__customize"))},"function"==typeof k?k(e.props):k):e.renderIcon()}else v&&s&&(t=e.renderIcon());n="function"==typeof i?i(c):b?b(c):i;var w=d.createElement("span",{className:"".concat(f,"-title")},n);return d.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof i?i:"",className:p()("".concat(x),"".concat(x,"-").concat(e.getNodeState()||"normal"),!y&&(o||r)&&"".concat(f,"-node-selected"),!y&&g&&"draggable"),draggable:!y&&g||void 0,"aria-grabbed":!y&&g||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:g?e.onDragStart:void 0},t,w)},e}return Object(l.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"==typeof e?e:t}},{key:"render",value:function(){var e,t=this.props,n=t.eventKey,i=t.className,o=t.style,l=t.dragOver,s=t.dragOverGapTop,c=t.dragOverGapBottom,u=t.isLeaf,f=t.isStart,h=t.isEnd,b=t.expanded,y=t.selected,x=t.checked,k=t.halfChecked,w=t.loading,E=t.domRef,C=t.active,S=t.onMouseMove,O=Object(a.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),_=this.props.context,N=_.prefixCls,j=_.filterTreeNode,T=_.draggable,L=_.keyEntities,A=this.isDisabled(),D=Object(m.f)(O),M=(L[n]||{}).level,I=h[h.length-1];return d.createElement("div",Object.assign({ref:E,className:p()(i,"".concat(N,"-treenode"),(e={},Object(r.a)(e,"".concat(N,"-treenode-disabled"),A),Object(r.a)(e,"".concat(N,"-treenode-switcher-").concat(b?"open":"close"),!u),Object(r.a)(e,"".concat(N,"-treenode-checkbox-checked"),x),Object(r.a)(e,"".concat(N,"-treenode-checkbox-indeterminate"),k),Object(r.a)(e,"".concat(N,"-treenode-selected"),y),Object(r.a)(e,"".concat(N,"-treenode-loading"),w),Object(r.a)(e,"".concat(N,"-treenode-active"),C),Object(r.a)(e,"".concat(N,"-treenode-leaf-last"),I),Object(r.a)(e,"drag-over",!A&&l),Object(r.a)(e,"drag-over-gap-top",!A&&s),Object(r.a)(e,"drag-over-gap-bottom",!A&&c),Object(r.a)(e,"filter-node",j&&j(Object(v.b)(this.props))),e)),style:o,onDragEnter:T?this.onDragEnter:void 0,onDragOver:T?this.onDragOver:void 0,onDragLeave:T?this.onDragLeave:void 0,onDrop:T?this.onDrop:void 0,onDragEnd:T?this.onDragEnd:void 0,onMouseMove:S},D),d.createElement(g,{prefixCls:N,level:M,isStart:f,isEnd:h}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(d.Component),y=function(e){return d.createElement(h.a.Consumer,null,(function(t){return d.createElement(b,Object.assign({},e,{context:t}))}))};y.displayName="TreeNode",y.defaultProps={title:"---"},y.isTreeNode=1;t.a=y},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(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return D}));var r=n("wx14"),a=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),l=n("LK+K"),s=n("q1tI"),c=n("VTBJ"),u=n("rePB"),d=n("Zm9Q"),f=(n("Kwbf"),n("c+Xe")),p=n("m+aA"),h=n("bdgK"),m=new Map;var g=new h.default((function(e){e.forEach((function(e){var t,n=e.target;null===(t=m.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var v=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component),b=s.createContext(null);function y(e){var t=e.children,n=e.disabled,r=s.useRef(null),a=s.useRef(null),i=s.useContext(b),o=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),l=s.isValidElement(t)&&Object(f.c)(t),u=l?t.ref:null,d=s.useMemo((function(){return Object(f.a)(u,r)}),[u,r]),h=s.useRef(e);h.current=e;var y=s.useCallback((function(e){var t=h.current,n=t.onResize,r=t.data,a=e.getBoundingClientRect(),l=a.width,s=a.height,u=e.offsetWidth,d=e.offsetHeight,f=Math.floor(l),p=Math.floor(s);if(o.current.width!==f||o.current.height!==p||o.current.offsetWidth!==u||o.current.offsetHeight!==d){var m={width:f,height:p,offsetWidth:u,offsetHeight:d};o.current=m;var g=u===Math.round(l)?l:u,v=d===Math.round(s)?s:d,b=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==i||i(b,e,r),n&&Promise.resolve().then((function(){n(b,e)}))}}),[]);return s.useEffect((function(){var e,t,i=Object(p.a)(r.current)||Object(p.a)(a.current);return i&&!n&&(e=i,t=y,m.has(e)||(m.set(e,new Set),g.observe(e)),m.get(e).add(t)),function(){return function(e,t){m.has(e)&&(m.get(e).delete(t),m.get(e).size||(g.unobserve(e),m.delete(e)))}(i,y)}}),[r.current,n]),s.createElement(v,{ref:a},l?s.cloneElement(t,{ref:d}):t)}function x(e){var t=e.children;return Object(d.a)(t).map((function(t,n){var a=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(n);return s.createElement(y,Object(r.a)({},e,{key:a}),t)}))}x.Collection=function(e){var t=e.children,n=e.onBatchResize,r=s.useRef(0),a=s.useRef([]),i=s.useContext(b),o=s.useCallback((function(e,t,o){r.current+=1;var l=r.current;a.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){l===r.current&&(null==n||n(a.current),a.current=[])})),null==i||i(e,t,o)}),[n,i]);return s.createElement(b.Provider,{value:o},t)};var k,w=x,E=n("bT9E"),C=n("TSYQ"),S=n.n(C),O="\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",_=["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 j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&N[n])return N[n];var r=window.getComputedStyle(e),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l=_.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),s={sizingStyle:l,paddingSize:i,borderSize:o,boxSizing:a};return t&&n&&(N[n]=s),s}var T,L=n("Gytx"),A=n.n(L);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(T||(T={}));var D=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(e){var i;return Object(a.a)(this,n),(i=t.call(this,e)).nextFrameActionId=void 0,i.resizeFrameId=void 0,i.textArea=void 0,i.saveTextArea=function(e){i.textArea=e},i.handleResize=function(e){var t=i.state.resizeStatus,n=i.props,r=n.autoSize,a=n.onResize;t===T.NONE&&("function"==typeof a&&a(e),r&&i.resizeOnNextFrame())},i.resizeOnNextFrame=function(){cancelAnimationFrame(i.nextFrameActionId),i.nextFrameActionId=requestAnimationFrame(i.resizeTextarea)},i.resizeTextarea=function(){var e=i.props.autoSize;if(e&&i.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;k||((k=document.createElement("textarea")).setAttribute("tab-index","-1"),k.setAttribute("aria-hidden","true"),document.body.appendChild(k)),e.getAttribute("wrap")?k.setAttribute("wrap",e.getAttribute("wrap")):k.removeAttribute("wrap");var a=j(e,t),i=a.paddingSize,o=a.borderSize,l=a.boxSizing,s=a.sizingStyle;k.setAttribute("style","".concat(s,";").concat(O)),k.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,f=k.scrollHeight;if("border-box"===l?f+=o:"content-box"===l&&(f-=i),null!==n||null!==r){k.value=" ";var p=k.scrollHeight-i;null!==n&&(u=p*n,"border-box"===l&&(u=u+i+o),f=Math.max(u,f)),null!==r&&(d=p*r,"border-box"===l&&(d=d+i+o),c=f>d?"":"hidden",f=Math.min(d,f))}return{height:f,minHeight:u,maxHeight:d,overflowY:c,resize:"none"}}(i.textArea,!1,t,n);i.setState({textareaStyles:r,resizeStatus:T.RESIZING},(function(){cancelAnimationFrame(i.resizeFrameId),i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:T.RESIZED},(function(){i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:T.NONE}),i.fixFirefoxAutoScroll()}))}))}))}))}},i.renderTextArea=function(){var e=i.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,a=e.autoSize,o=e.onResize,l=e.className,d=e.disabled,f=i.state,p=f.textareaStyles,h=f.resizeStatus,m=Object(E.a)(i.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=S()(n,l,Object(u.a)({},"".concat(n,"-disabled"),d));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},i.props.style),p),h===T.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(w,{onResize:i.handleResize,disabled:!(a||o)},s.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:i.saveTextArea})))},i.state={textareaStyles:{},resizeStatus:T.NONE},i}return Object(i.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&A()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(s.Component),M=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,a=t.onKeyDown;13===e.keyCode&&n&&n(e),a&&a(e)};var i=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:i},r}return Object(i.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return s.createElement(D,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(s.Component);t.default=M},YBdh:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/paper/xiren.svg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/xiren.a6554bc1.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/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/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/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(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),a=(n("miYZ"),n("tsqr")),i=n("rAM+"),o=n("tJVT"),l=n("PpiC"),s=n("q1tI"),c=n.n(s),u=n("bdgK");function d(e,t,n,a,i){var o=t.getWordUntilPosition(n),l={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},s=a.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:l}}));return i.map((function(e){s.push(Object(r.a)(Object(r.a)({},e),{},{range:l}))})),s}n("LvDl");function f(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function p(){}var h={"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"};function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var r=h[e[n]];if(r)return r}return t[0]}return h[t]||t}var g=null;t.b=function(e){var t=e.width,h=void 0===t?"100%":t,v=e.height,b=void 0===v?"100%":v,y=e.value,x=e.language,k=void 0===x?"javascript":x,w=e.style,E=void 0===w?{}:w,C=e.options,S=void 0===C?{}:C,O=e.overrideServices,_=void 0===O?{}:O,N=e.theme,j=void 0===N?"vs-dark":N,T=e.onEditBlur,L=e.onSave,A=e.autoHeight,D=void 0!==A&&A,M=e.forbidCopy,I=void 0!==M&&M,P=e.onChange,F=void 0===P?p:P,R=e.editorDidMount,z=void 0===R?p:R,B=e.onFocus,W=void 0===B?p:B,K=e.filename,q=void 0===K?"educoder.txt":K,H=(Object(l.a)(e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Object(s.useRef)()),V=Object(s.useRef)({}),U=Object(s.useRef)(),G=Object(s.useRef)(!1),$=Object(s.useRef)(),J=Object(s.useState)(!1),Z=Object(o.a)(J,2),Q=Z[0],Y=Z[1];function X(){a.b.warn(decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"))}function ee(){var e=V.current.instance;if(e){var t=e.getSelection(),n=V.current.pastePos||{},r=new g.Range(n.startLineNumber||t.endLineNumber,n.startColumn||t.endColumn,n.endLineNumber||t.endLineNumber,n.endColumn||t.endColumn);setTimeout((function(){e.executeEdits("",[{range:r,text:""}])}),300)}}function te(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),L())}Object(s.useEffect)((function(){U.current&&clearTimeout(U.current),U.current=setTimeout((function(){!function(){var e=V.current.instance;if(null!=y&&e&&Q){var t=e.getModel();t&&y!==t.getValue()&&(!0,t.setValue(y),e.layout(),!1)}}()}),500)}),[y,Q,V.current]);var ne=function(){if(D&&V.current.instance){var e=V.current.instance.getContentHeight();ue(e<b?b:e)}else ue(b)};function re(e,t){var n,r,a=window.URL||window.webkitURL||window,i=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=a.createObjectURL(i),o.download=e,n=o,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}Object(s.useEffect)((function(){ne()}),[ne]),Object(s.useEffect)((function(){H.current&&!Q&&n.e(/*! import() | monaco-editor */26).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){try{g=e,V.current.instance=g.editor.create(H.current,{value:y,language:m(k),theme:j,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},_);var t=V.current.instance;if(z(t,g),setTimeout((function(){ne(),V.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(q||"educoder.txt",t.getValue())}})}),500),V.current.subscription=t.onDidChangeModelContent((function(e){G.current?clearTimeout($.current):(ne(),F(t.getValue(),e)),$.current=setTimeout((function(){G.current=!1}),500)})),window.Monaco||function(e){var t={label:"ifelse",kind:e.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:e.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"];e.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(r,a){return{suggestions:d(e,r,a,n,[t])}}});var r=["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"];e.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(t,n){var a=[{label:"print",kind:e.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,t,n,r,a)}}});var a=["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"];e.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,r){var i=[t,{label:"main",kind:e.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:e.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,n,r,a,i)}}})}(g),I&&(t.addCommand(g.KeyMod.CtrlCmd|g.KeyMod.Shift|g.KeyCode.KEY_V,(function(){return X(),null})),t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_C,(function(){return X(),null}))),window.Monaco=g,T&&t.onDidBlurEditorWidget((function(){T(t.getValue())})),W&&t.onDidFocusEditorText((function(){W(t.getValue())})),I){t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_V,(function(){return X(),null})),t.onDidPaste((function(e){V.current.pastePos=e}));try{window.addEventListener("paste",ee)}catch(e){}}var n=function(){var e;return H.current&&(e=new u.default((function(e){var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&V.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(H.current),e}();return Y(!0),function(){var e=V.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),V.current.subscription&&V.current.subscription.dispose(),I&&window.removeEventListener("paste",ee),n.unobserve(H.current)}}catch(e){}}))}),[]),Object(s.useEffect)((function(){if(V.current.instance&&Q)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[L,Q]),Object(s.useEffect)((function(){var e=V.current.instance;if(e&&Q){var t=m(k);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",k,e.getModel(),t)}}),[k,Q]),Object(s.useEffect)((function(){V.current.instance&&Q&&g.editor.setTheme(j)}),[j,Q]),Object(s.useEffect)((function(){var e=V.current.instance;e&&Q&&(e.updateOptions(Object(r.a)({},S)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},S))}),200))}),[JSON.stringify(S),Q]),Object(s.useEffect)((function(){var e=V.current.instance;e&&Q&&e.layout()}),[h,b,Q]);var ae=Object(s.useState)(f(h)),ie=Object(o.a)(ae,2),oe=ie[0],le=(ie[1],Object(s.useState)(f(b))),se=Object(o.a)(le,2),ce=se[0],ue=se[1],de=Object(r.a)(Object(r.a)({},E),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:H,style:de})};function v(e){var t=e.width,a=void 0===t?"100%":t,l=e.height,d=void 0===l?"100%":l,p=e.original,h=e.modified,m=e.language,v=e.options,b=void 0===v?{}:v,y=Object(s.useRef)(),x=Object(s.useState)(null),k=Object(o.a)(x,2),w=k[0],E=k[1];Object(s.useEffect)((function(){y.current&&n.e(/*! import() | monaco-editor */26).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(y.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},b),{},{wordWrap:!0}));E(t);var n=function(e){var t;return y.current&&(t=new u.default((function(t){var n,r=Object(i.a)(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(y.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(y.current)}}))}),[]),Object(s.useEffect)((function(){w&&w.setModel({original:g.editor.createModel(p,m),modified:g.editor.createModel(h,m)})}),[p,h,m,w]);var C={width:f(a),height:f(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:y,style:C})}},ZpRC:
|
|
|
/*!*************************************************************************!*\
|
|
|
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
|
|
|
\*************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function a(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return a(n.overflowY,t)||a(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function o(e,t,n,r,a,i,o,l){return i<e&&o>t||i>e&&o<t?0:i<=e&&l<=n||o>=t&&l>=n?i-e-r:o>t&&l<n||i<e&&l>n?o-t+a:0}var l=function(e,t){var n=window,a=t.scrollMode,l=t.block,s=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,p=[],h=e;r(h)&&d(h);){if((h=h.parentElement)===f){p.push(h);break}null!=h&&h===document.body&&i(h)&&!i(document.documentElement)||null!=h&&i(h,u)&&p.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),x=y.height,k=y.width,w=y.top,E=y.right,C=y.bottom,S=y.left,O="start"===l||"nearest"===l?w:"end"===l?C:w+x/2,_="center"===s?S+k/2:"end"===s?E:S,N=[],j=0;j<p.length;j++){var T=p[j],L=T.getBoundingClientRect(),A=L.height,D=L.width,M=L.top,I=L.right,P=L.bottom,F=L.left;if("if-needed"===a&&w>=0&&S>=0&&C<=g&&E<=m&&w>=M&&C<=P&&S>=F&&E<=I)return N;var R=getComputedStyle(T),z=parseInt(R.borderLeftWidth,10),B=parseInt(R.borderTopWidth,10),W=parseInt(R.borderRightWidth,10),K=parseInt(R.borderBottomWidth,10),q=0,H=0,V="offsetWidth"in T?T.offsetWidth-T.clientWidth-z-W:0,U="offsetHeight"in T?T.offsetHeight-T.clientHeight-B-K:0;if(f===T)q="start"===l?O:"end"===l?O-g:"nearest"===l?o(b,b+g,g,B,K,b+O,b+O+x,x):O-g/2,H="start"===s?_:"center"===s?_-m/2:"end"===s?_-m:o(v,v+m,m,z,W,v+_,v+_+k,k),q=Math.max(0,q+b),H=Math.max(0,H+v);else{q="start"===l?O-M-B:"end"===l?O-P+K+U:"nearest"===l?o(M,P,A,B,K+U,O,O+x,x):O-(M+A/2)+U/2,H="start"===s?_-F-z:"center"===s?_-(F+D/2)+V/2:"end"===s?_-I+W+V:o(F,I,D,z,W+V,_,_+k,k);var G=T.scrollLeft,$=T.scrollTop;O+=$-(q=Math.max(0,Math.min($+q,T.scrollHeight-A+U))),_+=G-(H=Math.max(0,Math.min(G+H,T.scrollWidth-D+V)))}N.push({el:T,top:q,left:H})}return N};function s(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(s(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:l(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:s(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,a=e.top,i=e.left;r.scroll&&n?r.scroll({top:a,left:i,behavior:t}):(r.scrollTop=a,r.scrollLeft=i)}))}(l(e,r),r.behavior)}}},bT9E:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/omit.js ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function a(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},c5Ni:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/codemirror/theme/blackboard.css ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dejd:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/toolbar/index.less ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,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(e,t,n){"use strict";var r=n("Ff2n"),a=n("rePB"),i=n("1OyB"),o=n("vuIU"),l=n("Ji7U"),s=n("md7G"),c=n("foSv"),u=n("q1tI"),d=n.n(u),f=n("TSYQ"),p=n.n(f),h=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){var t=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(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var a=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}function b(){}function y(e){e.preventDefault()}var x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,k=function(e){return null!=e},w=function(e,t){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},E=function(e){Object(l.a)(n,e);var t=v(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e){var t=r.props,n=t.onKeyDown,a=t.onPressEnter;if(e.keyCode===h.a.UP){var i=r.getRatio(e);r.up(e,i,null),r.stop()}else if(e.keyCode===h.a.DOWN){var o=r.getRatio(e);r.down(e,o,null),r.stop()}else e.keyCode===h.a.ENTER&&a&&a(e);if(r.recordCursorPosition(),r.lastKeyCode=e.keyCode,n){for(var l=arguments.length,s=new Array(l>1?l-1:0),c=1;c<l;c++)s[c-1]=arguments[c];n.apply(void 0,[e].concat(s))}},r.onKeyUp=function(e){var t=r.props.onKeyUp;if(r.stop(),r.recordCursorPosition(),t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t.apply(void 0,[e].concat(a))}},r.onChange=function(e){var t=r.props.onChange;r.state.focused&&(r.inputting=!0),r.rawInput=r.props.parser(r.getValueFromEvent(e)),r.setState({inputValue:r.rawInput}),t(r.toNumber(r.rawInput))},r.onMouseUp=function(){var e=r.props.onMouseUp;r.recordCursorPosition(),e&&e.apply(void 0,arguments)},r.onFocus=function(){var e;r.setState({focused:!0}),(e=r.props).onFocus.apply(e,arguments)},r.onBlur=function(){var e=r.props.onBlur;r.inputting=!1,r.setState({focused:!1});var t=r.getCurrentValidValue(r.state.inputValue),n=r.setValue(t,b);if(e){var a=r.input.value,i=r.getInputDisplayValue({focus:!1,value:n});r.input.value=i?Number(i):i,e.apply(void 0,arguments),r.input.value=a}},r.getRatio=function(e){var t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t},r.getFullNum=function(e){return isNaN(e)?e:/e/i.test(String(e))?Number(e).toFixed(18).replace(/\.?0+$/,""):e},r.getPrecision=function(e){if(k(r.props.precision))return r.props.precision;var t=String(e);if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,a=n.focused,i=n.inputValue,o=n.value;null==(t=a?i:r.toPrecisionAsStep(o))&&(t="");var l=r.formatWrapper(t);return k(r.props.decimalSeparator)&&(l=l.toString().replace(".",r.props.decimalSeparator)),l},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var a=r.cursorBefore.length;return r.lastKeyCode===h.a.DELETE&&r.cursorBefore.charAt(a-1)===e[0]?(r.fixCaret(a,a),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var a=e.substring(n);return r.restoreByAfter(a)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var a=e.value;void 0===a&&(a=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(a));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,a=t.max,i=t.min,o=this.state.focused;if(e){if(!w(e.value,n)||!w(e.max,a)||!w(e.min,i)){var l,s=o?n:this.getValidValue(n);l=this.pressingUpOrDown?s:this.inputting?this.rawInput:this.toPrecisionAsStep(s),this.setState({value:s,inputValue:l})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==a&&"number"==typeof c&&c>a&&r&&r(a),"min"in this.props&&e.min!==i&&"number"==typeof c&&c<i&&r&&r(i)}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 h.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case h.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===h.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===h.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(e){}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(e){var t=e;return t=""===t?"":this.isNotCompleteNumber(parseFloat(t))?this.state.value:this.getValidValue(t),this.toNumber(t)}},{key:"getValueFromEvent",value:function(e){var t=e.target.value.trim().replace(/。/g,".");return k(this.props.decimalSeparator)&&(t=t.replace(this.props.decimalSeparator,".")),t}},{key:"getValidValue",value:function(e){var t=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,r=parseFloat(e);return isNaN(r)?e:(r<t&&(r=t),r>n&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),a=this.state.value,i=void 0===a?null:a,o=this.state.inputValue,l=void 0===o?null:o,s="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==i||s!=="".concat(l);return"value"in this.props?(l=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:l},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,a=n.step;if(k(r))return r;var i=this.getPrecision(t),o=this.getPrecision(a),l=this.getPrecision(e);return e?Math.max(l,i+o):i+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);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(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:k(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),a=Math.abs(this.getMaxPrecision(e,t)),i=((r*e+r*n*t)/r).toFixed(a);return this.toNumber(i)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),a=Math.abs(this.getMaxPrecision(e,t)),i=((r*e-r*n*t)/r).toFixed(a);return this.toNumber(i)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var i=this.props;if(!i.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var l=this["".concat(e,"Step")](o,r),s=l>i.max||l<i.min;l>i.max?l=i.max:l<i.min&&(l=i.min),this.setValue(l,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),s||(this.autoStepTimer=setTimeout((function(){n[e](t,r,!0)}),a?200:600))}}}},{key:"fixCaret",value:function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(e){}}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,i=t.disabled,o=t.readOnly,l=t.useTouch,s=t.autoComplete,c=t.upHandler,u=t.downHandler,f=t.className,h=t.max,m=t.min,g=t.style,v=t.title,x=t.onMouseEnter,k=t.onMouseLeave,w=t.onMouseOver,E=t.onMouseOut,C=t.required,S=t.onClick,O=t.tabIndex,_=t.type,N=t.placeholder,j=t.id,T=t.inputMode,L=t.pattern,A=t.step,D=t.maxLength,M=t.autoFocus,I=t.name,P=t.onPaste,F=t.onInput,R=Object(r.a)(t,["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,B=z.value,W=z.focused,K=p()(n,(e={},Object(a.a)(e,f,!!f),Object(a.a)(e,"".concat(n,"-disabled"),i),Object(a.a)(e,"".concat(n,"-focused"),W),e)),q={};Object.keys(R).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(q[e]=R[e])}));var H=!o&&!i,V=this.getInputDisplayValue(null),U=(B||0===B)&&(isNaN(B)||Number(B)>=h)||i||o,G=(B||0===B)&&(isNaN(B)||Number(B)<=m)||i||o,$=p()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(a.a)({},"".concat(n,"-handler-up-disabled"),U)),J=p()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(a.a)({},"".concat(n,"-handler-down-disabled"),G)),Z=l?{onTouchStart:U?b:this.up,onTouchEnd:this.stop}:{onMouseDown:U?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Q=l?{onTouchStart:G?b:this.down,onTouchEnd:this.stop}:{onMouseDown:G?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:K,style:g,title:v,onMouseEnter:x,onMouseLeave:k,onMouseOver:w,onMouseOut:E,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(n,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Increase Value","aria-disabled":U,className:$}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:y})),d.a.createElement("span",Object.assign({unselectable:"on"},Q,{role:"button","aria-label":"Decrease Value","aria-disabled":G,className:J}),u||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:y}))),d.a.createElement("div",{className:"".concat(n,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":h,"aria-valuenow":B,required:C,type:_,placeholder:N,onPaste:P,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:O,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:H?this.onKeyDown:b,onKeyUp:H?this.onKeyUp:b,autoFocus:M,maxLength:D,readOnly:o,disabled:i,max:h,min:m,step:A,name:I,title:v,id:j,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:L,inputMode:T,onInput:F},q))))}}]),n}(d.a.Component);E.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var C=E;t.a=C},"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(e,t,n){e.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(e,t,n){"use strict";n(/*! antd/es/input-number/style */"giR+");var r=n(/*! antd/es/input-number */"fyUT"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),o=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),l=n(/*! react */"q1tI"),s=n.n(l),c=n(/*! ./index.less?modules */"2sxD"),u=n.n(c),d=n(/*! @/assets/images/paper/sc.svg */"51dB"),f=n.n(d),p=n(/*! @/assets/images/paper/sm.svg */"5MlY"),h=n.n(p),m=n(/*! @/assets/images/paper/up.svg */"lnNo"),g=n.n(m),v=n(/*! @/assets/images/paper/xiren.svg */"YBdh"),b=n.n(v),y=n(/*! lodash */"LvDl"),x=n(/*! classnames */"TSYQ"),k=n.n(x),w=(o.a.Option,function(e){var t=parseInt(e);return Object(y.isNaN)(t)?0:t}),E=function(e){var t,n,o=e.index,c=e.value,d=void 0===c?[]:c,f=e.onChange,p=e.type,h=e.disabled,m=void 0!==h&&h,v=e.expansion,b=void 0===v||v,x=(Object(i.a)(e,["index","value","onChange","type","disabled","expansion"]),Object(l.useState)(!0)),k=Object(a.a)(x,2),E=k[0],C=k[1],S=function(e,t){var n=Object(y.cloneDeep)(d);n.difficulties[t].num=e,console.log(n,444),f(n)};return s.a.createElement("div",{className:u.a.ListGroup,style:{borderWidth:o?1:0}},s.a.createElement("div",{className:u.a.a},o+1),s.a.createElement("div",{"data-type":"width",className:u.a.b},null==d?void 0:d.name),s.a.createElement("div",{className:u.a.c},null==d||null===(t=d.difficulties)||void 0===t?void 0:t.map((function(e,t){return s.a.createElement("div",{key:t,style:{display:E?"flex":t?"none":"flex"},className:u.a.c1},s.a.createElement("span",{style:{color:"#777777",marginRight:5}},"难度"),1===e.difficulty&&s.a.createElement("span",{className:u.a.radio},"简单"),2===e.difficulty&&s.a.createElement("span",{className:u.a.radio},"适中"),3===e.difficulty&&s.a.createElement("span",{className:u.a.radio},"困难"),s.a.createElement("span",{style:{color:"#777777",marginRight:5,marginLeft:50}},"抽题数量"),0===o&&0===t?s.a.createElement("div",{id:"".concat(p,"_sum")},s.a.createElement(r.a,{disabled:m,parser:w,onChange:function(e){return S(e,t)},min:0,max:null==e?void 0:e.count,value:(null==e?void 0:e.num)||0,style:{width:66}}),s.a.createElement("span",{style:{display:"none"}},"请输入数量")):s.a.createElement(r.a,{disabled:m,parser:w,onChange:function(e){return S(e,t)},min:0,max:null==e?void 0:e.count,value:(null==e?void 0:e.num)||0,style:{width:66}}),s.a.createElement("span",{style:{marginLeft:5}},"/",null==e?void 0:e.count))}))),s.a.createElement("div",{style:{display:1!==(null==d||null===(n=d.difficulties)||void 0===n?void 0:n.length)&&b?"block":"none"},onClick:function(){return C(!E)},className:u.a.d},E?"收起":"展开",s.a.createElement("img",{style:{marginTop:-2,transform:E?"rotate(0deg)":"rotate(180deg)"},src:g.a,className:"ml5"})))};t.a=function(e){var t,n,o=e.value,c=void 0===o?[]:o,d=e.onChange,p=e.listClassName,m=e.disabled,v=void 0!==m&&m,x=e.expansion,C=void 0===x||x,S=(Object(i.a)(e,["value","onChange","listClassName","disabled","expansion"]),Object(l.useState)(!0)),O=Object(a.a)(S,2),_=O[0],N=O[1],j=function(e){var t,n=e.score||0,r=[];return null==e||null===(t=e.item_banks)||void 0===t||t.forEach((function(e){var t;null==e||null===(t=e.tag_disciplines)||void 0===t||t.forEach((function(e){var t;null==e||null===(t=e.difficulties)||void 0===t||t.forEach((function(e){e.num&&r.push(e.num)}))}))})),r.reduce((function(e,t){return e+t}),0)*n},T=function(e,t,n){var r=Object(y.cloneDeep)(c);r.item_banks[t].tag_disciplines[n]=e;var a=j(r);r.scoreTotal=a,console.log(r,"newValue"),d(r)};return s.a.createElement("div",{className:k()(u.a.list,p)},s.a.createElement("div",{className:u.a.head},s.a.createElement("div",{className:u.a.name},s.a.createElement("b",null),s.a.createElement("span",null,null===(t=[{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(e){return e.type===(null==c?void 0:c.item_type)})))||void 0===t?void 0:t.name)),s.a.createElement("div",{className:u.a.right},C&&s.a.createElement("div",{onClick:function(){return N(!_)},className:"current c-light-primary mb10"},_?"收起":"展开",s.a.createElement("img",{style:{marginTop:-2,transform:_?"rotate(0deg)":"rotate(180deg)"},src:g.a,className:"ml5"})),s.a.createElement("div",null,s.a.createElement("img",{src:f.a}),s.a.createElement("span",{className:"ml10 mr20"},"总分",c.scoreTotal,"分"),s.a.createElement("img",{className:"mr10",src:h.a}),s.a.createElement("span",null,"COMBINATION"===(null==c?void 0:c.item_type)?"每小题":"每题"),s.a.createElement("div",{id:"".concat(null==c?void 0:c.item_type,"_score")},s.a.createElement(r.a,{disabled:v,parser:w,min:0,onChange:function(e){var t=Object(y.cloneDeep)(c);t.score=e;var n=j(t);t.scoreTotal=n,d(t)},value:c.score,style:{margin:"0 5px"}}),s.a.createElement("span",{style:{display:"none"}},"请输入每题分数")),s.a.createElement("span",null,"分")))),s.a.createElement("div",{className:u.a.body,style:{display:_?"block":"none"}},null==c||null===(n=c.item_banks)||void 0===n?void 0:n.map((function(e,t){var n;return s.a.createElement(s.a.Fragment,{key:t},s.a.createElement("div",{className:u.a.top},s.a.createElement("img",{src:b.a}),s.a.createElement("span",null,"方向/课程"),s.a.createElement("b",null),s.a.createElement("aside",null,null==e?void 0:e.disciplines,"/",null==e?void 0:e.sub_discipline)),s.a.createElement("div",{className:u.a.bottom},s.a.createElement("div",{className:u.a.l},"知识点"),s.a.createElement("div",{className:u.a.r},null==e||null===(n=e.tag_disciplines)||void 0===n?void 0:n.map((function(e,n){return s.a.createElement(E,{expansion:C,disabled:v,type:null==c?void 0:c.item_type,key:"".concat(t,"-").concat(n),value:e,index:n,onChange:function(e){return T(e,t,n)}})})))))}))))}},exQ7:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/te.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/te.6f9c0684.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(e,t,n){"use strict";n.d(t,"a",(function(){return w.a}));var r=n("rePB"),a=n("VTBJ"),i=n("KQm4"),o=n("1OyB"),l=n("vuIU"),s=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),d=n("4IlW"),f=n("Kwbf"),p=n("TSYQ"),h=n.n(p),m=n("sboe"),g=n("OZM5"),v=n("815F"),b=n("ODXe"),y=n("Ff2n"),x=n("+nKL"),k=n("8XRh"),w=n("WaYH"),E=function(e,t){var n=e.className,r=e.style,a=e.motion,i=e.motionNodes,o=e.motionType,l=e.onMotionStart,s=e.onMotionEnd,c=e.active,d=e.treeNodeRequiredProps,f=Object(y.a)(e,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),p=u.useState(!0),g=Object(b.a)(p,2),x=g[0],E=g[1],C=u.useContext(m.a).prefixCls,S=u.useRef(!1),O=function(){S.current||s(),S.current=!0};return Object(u.useEffect)((function(){i&&"hide"===o&&x&&E(!1)}),[i]),Object(u.useEffect)((function(){return i&&l(),function(){i&&O()}}),[]),i?u.createElement(k.default,Object.assign({ref:t,visible:x},a,{motionAppear:"show"===o,onAppearEnd:O,onLeaveEnd:O}),(function(e,t){var n=e.className,r=e.style;return u.createElement("div",{ref:t,className:h()("".concat(C,"-treenode-motion"),n),style:r},i.map((function(e){var t=e.data,n=t.key,r=Object(y.a)(t,["key"]),a=e.isStart,i=e.isEnd;delete r.children;var o=Object(v.f)(n,d);return u.createElement(w.a,Object.assign({},r,o,{active:c,data:e.data,key:n,isStart:a,isEnd:i}))})))})):u.createElement(w.a,Object.assign({domRef:t,className:n,style:r},f,{active:c}))};E.displayName="MotionTreeNode";var C=u.forwardRef(E);function S(e,t,n){var r=e.findIndex((function(e){return e.data.key===n})),a=e[r+1],i=t.findIndex((function(e){return e.data.key===n}));if(a){var o=t.findIndex((function(e){return e.data.key===a.data.key}));return t.slice(i+1,o)}return t.slice(i+1)}var O={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},_=function(){},N="RC_TREE_MOTION_".concat(Math.random()),j={key:N},T={key:N,level:0,index:0,pos:"0",node:j},L={parent:null,children:[],pos:T.pos,data:j,isStart:[],isEnd:[]};function A(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function D(e){var t=e.data.key,n=e.pos;return Object(v.e)(t,n)}var M=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.data,a=(e.selectable,e.checkable,e.expandedKeys),i=e.selectedKeys,o=e.checkedKeys,l=e.loadedKeys,s=e.loadingKeys,c=e.halfCheckedKeys,d=e.keyEntities,f=e.disabled,p=e.dragging,h=e.dragOverNodeKey,m=e.dropPosition,g=e.motion,k=e.height,w=e.itemHeight,E=e.virtual,j=e.focusable,T=e.activeItem,M=e.focused,I=e.tabIndex,P=e.onKeyDown,F=e.onFocus,R=e.onBlur,z=e.onActiveChange,B=e.onListChangeStart,W=e.onListChangeEnd,K=Object(y.a)(e,["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"]),q=u.useRef(null);u.useImperativeHandle(t,(function(){return{scrollTo:function(e){q.current.scrollTo(e)}}}));var H=u.useState(a),V=Object(b.a)(H,2),U=V[0],G=V[1],$=u.useState(r),J=Object(b.a)($,2),Z=J[0],Q=J[1],Y=u.useState(r),X=Object(b.a)(Y,2),ee=X[0],te=X[1],ne=u.useState([]),re=Object(b.a)(ne,2),ae=re[0],ie=re[1],oe=u.useState(null),le=Object(b.a)(oe,2),se=le[0],ce=le[1];function ue(){Q(r),te(r),ie([]),ce(null),W()}u.useEffect((function(){G(a);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function a(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:a(e,t)}:{add:!1,key:a(t,e)}}(U,a);if(null!==e.key)if(e.add){var t=Z.findIndex((function(t){return t.data.key===e.key})),n=A(S(Z,r,e.key),E,k,w),i=Z.slice();i.splice(t+1,0,L),te(i),ie(n),ce("show")}else{var o=r.findIndex((function(t){return t.data.key===e.key})),l=A(S(r,Z,e.key),E,k,w),s=r.slice();s.splice(o+1,0,L),te(s),ie(l),ce("hide")}else Z!==r&&(Q(r),te(r))}),[a,r]),u.useEffect((function(){p||ue()}),[p]);var de=g?ee:r,fe={expandedKeys:a,selectedKeys:i,loadedKeys:l,loadingKeys:s,checkedKeys:o,halfCheckedKeys:c,dragOverNodeKey:h,dropPosition:m,keyEntities:d};return u.createElement(u.Fragment,null,M&&T&&u.createElement("span",{style:O,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(T)),u.createElement("div",{role:"tree"},u.createElement("input",{style:O,disabled:!1===j||f,tabIndex:!1!==j?I:null,onKeyDown:P,onFocus:F,onBlur:R,value:"",onChange:_})),u.createElement(x.a,Object.assign({},K,{data:de,itemKey:D,height:k,fullHeight:!1,virtual:E,itemHeight:w,prefixCls:"".concat(n,"-list"),ref:q}),(function(e){var t=e.pos,n=e.data,r=n.key,a=Object(y.a)(n,["key"]),i=e.isStart,o=e.isEnd,l=Object(v.e)(r,t);delete a.children;var s=Object(v.f)(l,fe);return u.createElement(C,Object.assign({},a,s,{active:T&&r===T.data.key,pos:t,data:e.data,isStart:i,isEnd:o,motion:g,motionNodes:r===N?ae:null,motionType:se,onMotionStart:B,onMotionEnd:ue,treeNodeRequiredProps:fe,onMouseMove:function(){z(null)}}))})))}));M.displayName="NodeList";var I=M,P=n("NvD2"),F=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).destroyed=!1,e.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},e.listRef=u.createRef(),e.onNodeDragStart=function(t,n){var r=e.state,a=r.expandedKeys,i=r.keyEntities,o=e.props.onDragStart,l=n.props.eventKey;e.dragNode=n;var s=Object(g.b)(a,l);e.setState({dragging:!0,dragNodesKeys:Object(g.g)(l,i)}),e.setExpandedKeys(s),o&&o({event:t,node:Object(v.b)(n.props)})},e.onNodeDragEnter=function(t,n){var r=e.state,a=r.expandedKeys,o=r.keyEntities,l=r.dragNodesKeys,s=e.props.onDragEnter,c=n.props,u=c.pos,d=c.eventKey;if(e.dragNode&&-1===l.indexOf(d)){var f=Object(g.c)(t,n);e.dragNode.props.eventKey!==d||0!==f?setTimeout((function(){e.setState({dragOverNodeKey:d,dropPosition:f}),e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.delayedDragEnterLogic[u]=window.setTimeout((function(){if(e.state.dragging){var r=Object(i.a)(a),l=o[d];l&&(l.children||[]).length&&(r=Object(g.a)(a,d)),"expandedKeys"in e.props||e.setExpandedKeys(r),s&&s({event:t,node:Object(v.b)(n.props),expandedKeys:r})}}),400)}),0):e.setState({dragOverNodeKey:"",dropPosition:null})}},e.onNodeDragOver=function(t,n){var r=e.state.dragNodesKeys,a=e.props.onDragOver,i=n.props.eventKey;if(-1===r.indexOf(i)){if(e.dragNode&&i===e.state.dragOverNodeKey){var o=Object(g.c)(t,n);if(o===e.state.dropPosition)return;e.setState({dropPosition:o})}a&&a({event:t,node:Object(v.b)(n.props)})}},e.onNodeDragLeave=function(t,n){var r=e.props.onDragLeave;e.setState({dragOverNodeKey:""}),r&&r({event:t,node:Object(v.b)(n.props)})},e.onNodeDragEnd=function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:""}),e.cleanDragState(),r&&r({event:t,node:Object(v.b)(n.props)}),e.dragNode=null},e.onNodeDrop=function(t,n){var r=e.state,a=r.dragNodesKeys,i=void 0===a?[]:a,o=r.dropPosition,l=e.props.onDrop,s=n.props,c=s.eventKey,u=s.pos;if(e.setState({dragOverNodeKey:""}),e.cleanDragState(),-1===i.indexOf(c)){var d=Object(g.k)(u),p={event:t,node:Object(v.b)(n.props),dragNode:e.dragNode?Object(v.b)(e.dragNode.props):null,dragNodesKeys:i.slice(),dropPosition:o+Number(d[d.length-1]),dropToGap:!1};0!==o&&(p.dropToGap=!0),l&&l(p),e.dragNode=null}else Object(f.a)(!1,"Can not drop to dragNode(include it's children node)")},e.cleanDragState=function(){e.state.dragging&&e.setState({dragging:!1})},e.onNodeClick=function(t,n){var r=e.props.onClick;r&&r(t,n)},e.onNodeDoubleClick=function(t,n){var r=e.props.onDoubleClick;r&&r(t,n)},e.onNodeSelect=function(t,n){var r=e.state.selectedKeys,a=e.state.keyEntities,i=e.props,o=i.onSelect,l=i.multiple,s=n.selected,c=n.key,u=!s,d=(r=u?l?Object(g.a)(r,c):[c]:Object(g.b)(r,c)).map((function(e){var t=a[e];return t?t.node:null})).filter((function(e){return e}));e.setUncontrolledState({selectedKeys:r}),o&&o(r,{event:"select",selected:u,node:n,selectedNodes:d,nativeEvent:t.nativeEvent})},e.onNodeCheck=function(t,n,r){var a,o=e.state,l=o.keyEntities,s=o.checkedKeys,c=o.halfCheckedKeys,u=e.props,d=u.checkStrictly,f=u.onCheck,p=n.key,h={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(d){var m=r?Object(g.a)(s,p):Object(g.b)(s,p);a={checked:m,halfChecked:Object(g.b)(c,p)},h.checkedNodes=m.map((function(e){return l[e]})).filter((function(e){return e})).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:m})}else{var v=Object(P.a)([].concat(Object(i.a)(s),[p]),!0,l),b=v.checkedKeys,y=v.halfCheckedKeys;if(!r){var x=new Set(b);x.delete(p);var k=Object(P.a)(Array.from(x),{checked:!1,halfCheckedKeys:y},l);b=k.checkedKeys,y=k.halfCheckedKeys}a=b,h.checkedNodes=[],h.checkedNodesPositions=[],h.halfCheckedKeys=y,b.forEach((function(e){var t=l[e];if(t){var n=t.node,r=t.pos;h.checkedNodes.push(n),h.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:b},!1,{halfCheckedKeys:y})}f&&f(a,h)},e.onNodeLoad=function(t){return new Promise((function(n){e.setState((function(r){var a=r.loadedKeys,i=void 0===a?[]:a,o=r.loadingKeys,l=void 0===o?[]:o,s=e.props,c=s.loadData,u=s.onLoad,d=t.key;return c&&-1===i.indexOf(d)&&-1===l.indexOf(d)?(c(t).then((function(){var r=e.state,a=r.loadedKeys,i=r.loadingKeys,o=Object(g.a)(a,d),l=Object(g.b)(i,d);u&&u(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState({loadingKeys:l}),n()})),{loadingKeys:Object(g.a)(l,d)}):{}}))}))},e.onNodeMouseEnter=function(t,n){var r=e.props.onMouseEnter;r&&r({event:t,node:n})},e.onNodeMouseLeave=function(t,n){var r=e.props.onMouseLeave;r&&r({event:t,node:n})},e.onNodeContextMenu=function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))},e.onFocus=function(){var t=e.props.onFocus;e.setState({focused:!0}),t&&t.apply(void 0,arguments)},e.onBlur=function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null),t&&t.apply(void 0,arguments)},e.getTreeNodeRequiredProps=function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}},e.setExpandedKeys=function(t){var n=e.state.treeData,r=Object(v.d)(n,t);e.setUncontrolledState({expandedKeys:t,flattenNodes:r},!0)},e.onNodeExpand=function(t,n){var r=e.state.expandedKeys,a=e.state.listChanging,i=e.props,o=i.onExpand,l=i.loadData,s=n.key,c=n.expanded;if(!a){var u=r.indexOf(s),d=!c;if(Object(f.a)(c&&-1!==u||!c&&-1===u,"Expand state not sync with index check"),r=d?Object(g.a)(r,s):Object(g.b)(r,s),e.setExpandedKeys(r),o&&o(r,{node:n,expanded:d,nativeEvent:t.nativeEvent}),d&&l){var p=e.onNodeLoad(n);p&&p.then((function(){var t=Object(v.d)(e.state.treeData,r);e.setUncontrolledState({flattenNodes:t})}))}}},e.onListChangeStart=function(){e.setUncontrolledState({listChanging:!0})},e.onListChangeEnd=function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))},e.onActiveChange=function(t){var n=e.state.activeKey,r=e.props.onActiveChange;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t}),r&&r(t))},e.getActiveItem=function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find((function(e){return e.data.key===n}))||null},e.offsetActiveKey=function(t){var n=e.state,r=n.flattenNodes,a=n.activeKey,i=r.findIndex((function(e){return e.data.key===a}));-1===i&&t<0&&(i=r.length);var o=r[i=(i+t+r.length)%r.length];if(o){var l=o.data.key;e.onActiveChange(l)}else e.onActiveChange(null)},e.onKeyDown=function(t){var n=e.state,r=n.activeKey,i=n.expandedKeys,o=n.checkedKeys,l=e.props,s=l.onKeyDown,c=l.checkable,u=l.selectable;switch(t.which){case d.a.UP:e.offsetActiveKey(-1),t.preventDefault();break;case d.a.DOWN:e.offsetActiveKey(1),t.preventDefault()}var f=e.getActiveItem();if(f&&f.data){var p=e.getTreeNodeRequiredProps(),h=!1===f.data.isLeaf||!!(f.data.children||[]).length,m=Object(v.b)(Object(a.a)(Object(a.a)({},Object(v.f)(r,p)),{},{data:f.data,active:!0}));switch(t.which){case d.a.LEFT:h&&i.includes(r)?e.onNodeExpand({},m):f.parent&&e.onActiveChange(f.parent.data.key),t.preventDefault();break;case d.a.RIGHT:h&&!i.includes(r)?e.onNodeExpand({},m):f.children&&f.children.length&&e.onActiveChange(f.children[0].data.key),t.preventDefault();break;case d.a.ENTER:case d.a.SPACE:!c||m.disabled||!1===m.checkable||m.disableCheckbox?c||!u||m.disabled||!1===m.selectable||e.onNodeSelect({},m):e.onNodeCheck({},m,!o.includes(r))}}s&&s(t)},e.setUncontrolledState=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var i=!1,o=!0,l={};Object.keys(t).forEach((function(n){n in e.props?o=!1:(i=!0,l[n]=t[n])})),!i||n&&!o||e.setState(Object(a.a)(Object(a.a)({},l),r))}},e.scrollTo=function(t){e.listRef.current.scrollTo(t)},e}return Object(l.a)(n,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var e,t=this.state,n=t.focused,a=t.flattenNodes,i=t.keyEntities,o=t.dragging,l=t.activeKey,s=this.props,c=s.prefixCls,d=s.className,f=s.style,p=s.showLine,v=s.focusable,b=s.tabIndex,y=void 0===b?0:b,x=s.selectable,k=s.showIcon,w=s.icon,E=s.switcherIcon,C=s.draggable,S=s.checkable,O=s.checkStrictly,_=s.disabled,N=s.motion,j=s.loadData,T=s.filterTreeNode,L=s.height,A=s.itemHeight,D=s.virtual,M=s.titleRender,P=s.onContextMenu,F=Object(g.f)(this.props);return u.createElement(m.a.Provider,{value:{prefixCls:c,selectable:x,showIcon:k,icon:w,switcherIcon:E,draggable:C,checkable:S,checkStrictly:O,disabled:_,keyEntities:i,loadData:j,filterTreeNode:T,titleRender:M,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:h()(c,d,(e={},Object(r.a)(e,"".concat(c,"-show-line"),p),Object(r.a)(e,"".concat(c,"-focused"),n),Object(r.a)(e,"".concat(c,"-active-focused"),null!==l),e))},u.createElement(I,Object.assign({ref:this.listRef,prefixCls:c,style:f,data:a,disabled:_,selectable:x,checkable:!!S,motion:N,dragging:o,height:L,itemHeight:A,virtual:D,focusable:v,focused:n,tabIndex:y,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(),F))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,i=t.prevProps,o={prevProps:e};function l(t){return!i&&t in e||i&&i[t]!==e[t]}if(l("treeData")?n=e.treeData:l("children")&&(Object(f.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=Object(v.c)(e.children)),n){o.treeData=n;var s=Object(v.a)(n);o.keyEntities=Object(a.a)(Object(r.a)({},N,T),s.keyEntities)}var c,u=o.keyEntities||t.keyEntities;if(l("expandedKeys")||i&&l("autoExpandParent"))o.expandedKeys=e.autoExpandParent||!i&&e.defaultExpandParent?Object(g.e)(e.expandedKeys,u):e.expandedKeys;else if(!i&&e.defaultExpandAll){var d=Object(a.a)({},u);delete d[N],o.expandedKeys=Object.keys(d).map((function(e){return d[e].key}))}else!i&&e.defaultExpandedKeys&&(o.expandedKeys=e.autoExpandParent||e.defaultExpandParent?Object(g.e)(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,n||o.expandedKeys){var p=Object(v.d)(n||t.treeData,o.expandedKeys||t.expandedKeys);o.flattenNodes=p}if((e.selectable&&(l("selectedKeys")?o.selectedKeys=Object(g.d)(e.selectedKeys,e):!i&&e.defaultSelectedKeys&&(o.selectedKeys=Object(g.d)(e.defaultSelectedKeys,e))),e.checkable)&&(l("checkedKeys")?c=Object(g.j)(e.checkedKeys)||{}:!i&&e.defaultCheckedKeys?c=Object(g.j)(e.defaultCheckedKeys)||{}:n&&(c=Object(g.j)(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var h=c,m=h.checkedKeys,b=void 0===m?[]:m,y=h.halfCheckedKeys,x=void 0===y?[]:y;if(!e.checkStrictly){var k=Object(P.a)(b,!0,u);b=k.checkedKeys,x=k.halfCheckedKeys}o.checkedKeys=b,o.halfCheckedKeys=x}return l("loadedKeys")&&(o.loadedKeys=e.loadedKeys),o}}]),n}(u.Component);F.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:[]},F.TreeNode=w.a;var R=F;t.b=R},k4n4:
|
|
|
/*!***************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/AddTags/index.tsx ***!
|
|
|
\***************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),i=n.n(a),o=n(/*! ./index.less?modules */"e+RI"),l=n.n(o),s=n(/*! @/assets/images/icons/tagDelete.png */"FTkQ"),c=n.n(s),u=n(/*! @/assets/images/paper/swenjianjia.svg */"E/GV"),d=n.n(u);t.a=function(e){var t=e.type,n=void 0===t?1:t,o=e.value,s=void 0===o?[]:o,u=e.onChange,f=e.disabled,p=void 0!==f&&f,h=e.icon,m=Object(a.useState)(),g=Object(r.a)(m,2),v=(g[0],g[1],function(e){u(e)});return 1===n?i.a.createElement("div",null,null==s?void 0:s.map((function(e,t){return i.a.createElement("div",{key:t,className:p?"".concat(l.a.btn," ").concat(l.a.btnDisabled):l.a.btn},i.a.createElement("span",{className:l.a.s1},e.name),i.a.createElement("img",{src:c.a,className:l.a.s2,onClick:function(){return v(e.id)}}))}))):i.a.createElement("div",null,null==s?void 0:s.map((function(e,t){return i.a.createElement("div",{key:t,className:l.a.btn2},i.a.createElement("span",{className:l.a.s1},i.a.createElement("img",{src:h||d.a}),e.name),i.a.createElement("img",{src:c.a,className:l.a.s2,onClick:function(){return v(e.id)}}))})))}},kSUc:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.less ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},kqOp:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/components/Editor/NullMDEditor.js ***!
|
|
|
\***********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),c=n.n(s),u=n(/*! ../markdown-editor */"Ot1p"),d=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).getChCountBeforeCursor=function(e,t){for(var n=t.line,r=0,a=0;a<n;a++)r+=e.getLine(a).split("▁").length-1;return r+=e.getLine(n).substring(0,t.ch).split("▁").length-1},e.onCMBeforeChange=function(t,n){var r=t.getRange(n.from,n.to),a=0;if(n.text.forEach((function(e){a+=e.split("▁").length-1})),r&&-1!=r.indexOf("▁")){var i=r.split("▁").length-1,o=e.getChCountBeforeCursor(t,n.from);console.log("删除".concat(i,"个, 之前有").concat(o,"个,新增").concat(a,"个")),e.props.deleteEmptyDisabled?n.cancel():e.props.onPlaceholderChange&&e.props.onPlaceholderChange(o,i,a)}else if(a){var l=e.getChCountBeforeCursor(t,n.from);console.log("新增".concat(a,"个,之前有").concat(l,"个")),e.props.onPlaceholderChange&&e.props.onPlaceholderChange(l,0,a)}},e}return Object(i.a)(n,[{key:"render",value:function(){return c.a.createElement(u.a,Object(r.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),n}(s.Component)},lZu9:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),a="null"==r.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 i={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 o in i)i.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(i[o]=n.tokenTypeOverrides[o]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\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(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function b(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=a;if(!n){var i=e.innerMode(r,t.htmlState);n="xml"==i.mode.name&&null===i.state.tagStart&&!i.state.context&&i.state.tokenize.isInText}n&&(t.f=C,t.block=y,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function y(r,a){var o,f=r.column()===a.indentation,m=!(o=a.prevLine.stream)||!/\S/.test(o.string),v=a.indentedCode,b=a.prevLine.hr,y=!1!==a.list,x=(a.listStack[a.listStack.length-1]||0)+3;a.indentedCode=!1;var E=a.indentation;if(null===a.indentationDiff&&(a.indentationDiff=a.indentation,y)){for(a.list=null;E<a.listStack[a.listStack.length-1];)a.listStack.pop(),a.listStack.length?a.indentation=a.listStack[a.listStack.length-1]:a.list=!1;!1!==a.list&&(a.indentationDiff=E-a.listStack[a.listStack.length-1])}var C=!(m||b||a.prevLine.header||y&&v||a.prevLine.fencedCodeEnd),S=(!1===a.list||b||m)&&a.indentation<=x&&r.match(l),O=null;if(a.indentationDiff>=4&&(v||a.prevLine.fencedCodeEnd||a.prevLine.header||m))return r.skipToEnd(),a.indentedCode=!0,i.code;if(r.eatSpace())return null;if(f&&a.indentation<=x&&(O=r.match(u))&&O[1].length<=6)return a.quote=0,a.header=O[1].length,a.thisLine.header=!0,n.highlightFormatting&&(a.formatting="header"),a.f=a.inline,w(a);if(a.indentation<=x&&r.eat(">"))return a.quote=f?1:a.quote+1,n.highlightFormatting&&(a.formatting="quote"),r.eatSpace(),w(a);if(!S&&!a.setext&&f&&a.indentation<=x&&(O=r.match(s))){var _=O[1]?"ol":"ul";return a.indentation=E+r.current().length,a.list=!0,a.quote=0,a.listStack.push(a.indentation),a.em=!1,a.strong=!1,a.code=!1,a.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(a.taskList=!0),a.f=a.inline,n.highlightFormatting&&(a.formatting=["list","list-"+_]),w(a)}return f&&a.indentation<=x&&(O=r.match(p,!0))?(a.quote=0,a.fencedEndRE=new RegExp(O[1]+"+ *$"),a.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var a=e.getMode(t,n);return"null"==a.name?null:a}(O[2]||n.fencedCodeBlockDefaultMode),a.localMode&&(a.localState=e.startState(a.localMode)),a.f=a.block=k,n.highlightFormatting&&(a.formatting="code-block"),a.code=-1,w(a)):a.setext||!(C&&y||a.quote||!1!==a.list||a.code||S||h.test(r.string))&&(O=r.lookAhead(1))&&(O=O.match(d))?(a.setext?(a.header=a.setext,a.setext=0,r.skipToEnd(),n.highlightFormatting&&(a.formatting="header")):(a.header="="==O[0].charAt(0)?1:2,a.setext=a.header),a.thisLine.header=!0,a.f=a.inline,w(a)):S?(r.skipToEnd(),a.hr=!0,a.thisLine.hr=!0,i.hr):"["===r.peek()?g(r,a,N):g(r,a,a.inline)}function x(t,n){var i=r.token(t,n.htmlState);if(!a){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=C,n.block=y,n.htmlState=null)}return i}function k(e,t){var r,a=t.listStack[t.listStack.length-1]||0,o=t.indentation<a,l=a+3;return t.fencedEndRE&&t.indentation<=l&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=w(t)),t.localMode=t.localState=null,t.block=y,t.f=C,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?v(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),i.code)}function w(e){var t=[];if(e.formatting){t.push(i.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(i.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(i.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(i.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(i.linkHref,"url"):(e.strong&&t.push(i.strong),e.em&&t.push(i.em),e.strikethrough&&t.push(i.strikethrough),e.emoji&&t.push(i.emoji),e.linkText&&t.push(i.linkText),e.code&&t.push(i.code),e.image&&t.push(i.image),e.imageAltText&&t.push(i.imageAltText,"link"),e.imageMarker&&t.push(i.imageMarker)),e.header&&t.push(i.header,i.header+"-"+e.header),e.quote&&(t.push(i.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(i.quote+"-"+e.quote):t.push(i.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var a=(e.listStack.length-1)%3;a?1===a?t.push(i.list2):t.push(i.list3):t.push(i.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function E(e,t){if(e.match(f,!0))return w(t)}function C(t,a){var o=a.text(t,a);if(void 0!==o)return o;if(a.list)return a.list=null,w(a);if(a.taskList)return" "===t.match(c,!0)[1]?a.taskOpen=!0:a.taskClosed=!0,n.highlightFormatting&&(a.formatting="task"),a.taskList=!1,w(a);if(a.taskOpen=!1,a.taskClosed=!1,a.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(a.formatting="header"),w(a);var l=t.next();if(a.linkTitle){a.linkTitle=!1;var s=l;"("===l&&(s=")");var u="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(u),!0))return i.linkHref}if("`"===l){var d=a.formatting;n.highlightFormatting&&(a.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=a.code||a.quote&&1!=f){if(f==a.code){var p=w(a);return a.code=0,p}return a.formatting=d,w(a)}return a.code=f,w(a)}if(a.code)return w(a);if("\\"===l&&(t.next(),n.highlightFormatting)){var h=w(a),g=i.formatting+"-escape";return h?h+" "+g:g}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return a.imageMarker=!0,a.image=!0,n.highlightFormatting&&(a.formatting="image"),w(a);if("["===l&&a.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return a.imageMarker=!1,a.imageAltText=!0,n.highlightFormatting&&(a.formatting="image"),w(a);if("]"===l&&a.imageAltText){n.highlightFormatting&&(a.formatting="image");var h=w(a);return a.imageAltText=!1,a.image=!1,a.inline=a.f=O,h}if("["===l&&!a.image)return a.linkText&&t.match(/^.*?\]/)||(a.linkText=!0,n.highlightFormatting&&(a.formatting="link")),w(a);if("]"===l&&a.linkText){n.highlightFormatting&&(a.formatting="link");var h=w(a);return a.linkText=!1,a.inline=a.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?O:C,h}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return a.f=a.inline=S,n.highlightFormatting&&(a.formatting="link"),(h=w(a))?h+=" ":h="",h+i.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return a.f=a.inline=S,n.highlightFormatting&&(a.formatting="link"),(h=w(a))?h+=" ":h="",h+i.linkEmail;if(n.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var y=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(a.md_inside=!0)}return t.backUp(1),a.htmlState=e.startState(r),v(t,a,x)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return a.md_inside=!1,"tag";if("*"===l||"_"===l){for(var k=1,E=1==t.pos?" ":t.string.charAt(t.pos-2);k<3&&t.eat(l);)k++;var _=t.peek()||" ",N=!/\s/.test(_)&&(!m.test(_)||/\s/.test(E)||m.test(E)),j=!/\s/.test(E)&&(!m.test(E)||/\s/.test(_)||m.test(_)),T=null,L=null;if(k%2&&(a.em||!N||"*"!==l&&j&&!m.test(E)?a.em!=l||!j||"*"!==l&&N&&!m.test(_)||(T=!1):T=!0),k>1&&(a.strong||!N||"*"!==l&&j&&!m.test(E)?a.strong!=l||!j||"*"!==l&&N&&!m.test(_)||(L=!1):L=!0),null!=L||null!=T)return n.highlightFormatting&&(a.formatting=null==T?"strong":null==L?"em":"strong em"),!0===T&&(a.em=l),!0===L&&(a.strong=l),p=w(a),!1===T&&(a.em=!1),!1===L&&(a.strong=!1),p}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return w(a);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(a.strikethrough)return n.highlightFormatting&&(a.formatting="strikethrough"),p=w(a),a.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return a.strikethrough=!0,n.highlightFormatting&&(a.formatting="strikethrough"),w(a)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return w(a);t.backUp(2)}if(n.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){a.emoji=!0,n.highlightFormatting&&(a.formatting="emoji");var A=w(a);return a.emoji=!1,A}return" "===l&&(t.match(/^ +$/,!1)?a.trailingSpace++:a.trailingSpace&&(a.trailingSpaceNewLine=!0)),w(a)}function S(e,t){if(">"===e.next()){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link");var r=w(t);return r?r+=" ":r="",r+i.linkInline}return e.match(/^[^>]+/,!0),i.linkInline}function O(e,t){if(e.eatSpace())return null;var r,a=e.next();return"("===a||"["===a?(t.f=t.inline=(r="("===a?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link-string");var a=w(t);return t.linkHref=!1,a}return e.match(_[r]),t.linkHref=!0,w(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,w(t)):"error"}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=j,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,w(t)):g(e,t,C)}function j(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=T,n.highlightFormatting&&(t.formatting="link");var r=w(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),i.linkText}function T(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=C,i.linkHref+" url")}var L={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:C,text:E,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return b(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:L}},indent:function(t,n,a){return t.block==x&&r.indent?r.indent(t.htmlState,n,a):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,a):e.Pass},blankLine:b,getType:w,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return L}),"xml"),e.defineMIME("text/markdown","markdown"),e.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(e,t,n){e.exports=n.p+"static/up.69f3b3fd.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(e,t,n){e.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"}},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(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="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",a=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function l(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function s(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){a.lastIndex=t,e.ch=t;var n=a.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){a.lastIndex=e.ch;var t=a.exec(e.text);if(!t){if(l(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var a,i=d(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(a=c(e)))return;if("selfClose"!=a)if(i[1]){for(var s=r.length-1;s>=0;--s)if(r[s]==i[2]){r.length=s;break}if(s<0&&(!n||n==i[2]))return{tag:i[2],from:t(o,l),to:t(e.line,e.ch)}}else r.push(i[2])}}function h(e,n){for(var r=[];;){var a=f(e);if(!a)return;if("selfClose"!=a){var i=e.line,o=e.ch,l=u(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==l[2]){r.length=s;break}if(s<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(i,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var a=new i(e,r.line,0);;){var o=d(a);if(!o||a.line!=r.line)return;var l=c(a);if(!l)return;if(!o[1]&&"selfClose"!=l){var s=t(a.line,a.ch),u=p(a,o[2]);return u&&n(u.from,s)>0?{from:s,to:u.from}:null}}})),e.findMatchingTag=function(e,r,a){var o=new i(e,r.line,r.ch,a);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=c(o),s=l&&t(o.line,o.ch),d=l&&u(o);if(l&&d&&!(n(o,r)>0)){var f={from:t(o.line,o.ch),to:s,tag:d[2]};return"selfClose"==l?{open:f,close:null,at:"open"}:d[1]?{open:h(o,d[2]),close:f,at:"close"}:{open:f,close:p(o=new i(e,s.line,s.ch,a),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var a=new i(e,t.line,t.ch,n);;){var o=h(a,r);if(!o)break;var l=p(new i(e,t.line,t.ch,n),o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,r){return p(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.tsx ***!
|
|
|
\*********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),a=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! react */"q1tI"),s=n.n(l),c=n(/*! ./index.less?modules */"vHTk"),u=n.n(c),d=n(/*! @ant-design/icons */"yEEn"),f=n(/*! @/components/monaco-editor */"ZW9T"),p=n(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,n=e.data,c=(e.theme,e.type),h=e.filename,m=e.monacoEditor,g=e.className,v=e.style,b=e.close,y=e.onClose,x=e.hasMask,k=Object(l.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),w=Object(o.a)(k,2),E=(w[0],w[1],Object(l.useState)("")),C=Object(o.a)(E,2),S=(C[0],C[1]),O=Object(l.useRef)();h&&(m.filename=h),Object(l.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&S(t[1])}))}),[]);var _=function(){n.startsWith("http")||n.startsWith("/")?N():Object(p.x)(h||"educoder",n,h)},N=function(){Object(p.v)(h||t,n)};return console.log("data:",n,"fileanme:",h," name:",t),s.a.createElement("div",{style:Object(i.a)({},v||{}),className:"".concat(x&&u.a.bgBlack," ").concat(c?u.a.wrp:"hide")},b&&s.a.createElement("div",{className:u.a.close,ref:O},s.a.createElement(a.a,{title:"点击下载此文件",getPopupContainer:function(){return O.current}},s.a.createElement("span",{onClick:N},s.a.createElement("i",{className:"icon-quxiaozhiding"}))),s.a.createElement(a.a,{title:"关闭",getPopupContainer:function(){return O.current}},s.a.createElement("span",{className:"",onClick:y},s.a.createElement("i",{className:"icon-guanbi1"})))),s.a.createElement("div",{className:"".concat(u.a[g]," ").concat(g," ").concat(u.a.monaco," ").concat("txt"===c?"show":"hide")},"txt"===c&&s.a.createElement(f.b,m)),"audio"===c&&s.a.createElement("audio",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?n:"data:audio/mp3;base64,").concat(n),autoPlay:!0}),"video"===c&&s.a.createElement(s.a.Fragment,null,null!=n&&n.startsWith("/")?s.a.createElement("video",{controls:!0,src:"".concat(n),autoPlay:!0}):s.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(n),autoPlay:!0})),"pdf"===c&&s.a.createElement("embed",{className:u.a.embed,src:n}),"image"===c&&s.a.createElement(s.a.Fragment,null,s.a.createElement("img",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(n)})),"other"===c&&s.a.createElement("div",null,s.a.createElement(r.a,{type:"primary",size:"large",onClick:_},s.a.createElement(d.a,null),"点击下载")),("download"===c||"office"===c)&&s.a.createElement(r.a,{type:"primary",size:"large",onClick:_},s.a.createElement(d.a,null),"点击下载"))}},"p77/":
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.css ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"rAM+":
|
|
|
/*!*******************************************************************************************************************!*\
|
|
|
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
|
|
|
\*******************************************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw o}}}}},rUJ1:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/marked/src/helpers.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: escape */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>o[e];const s=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(s,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const d=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const p={},h=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){p[" "+e]||(h.test(e)?p[" "+e]=e+"/":p[" "+e]=b(e,"/",!0));const n=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function b(e,t,n){const r=e.length;if(0===r)return"";let a=0;for(;a<r;){const i=e.charAt(r-a-1);if(i!==t||n){if(i===t||!n)break;a++}else a++}return e.substr(0,r-a)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,l)}else if(a.test(e))return e.replace(i,l);return e},unescape:c,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(d,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,a=t;for(;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:b,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,a=0;for(;a<n;a++)if("\\"===e[a])a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.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(e,t,n){"use strict";n("DjyN");var r=n("NUBc"),a=(n("5Dmo"),n("3S7+")),i=(n("/zsF"),n("PArb")),o=(n("Q9mQ"),n("diRs")),l=(n("+L6B"),n("2/Rp")),s=(n("5NDa"),n("5rEg")),c=(n("miYZ"),n("tsqr")),u=n("9og8"),d=(n("giR+"),n("fyUT")),f=(n("2qtc"),n("kLXV")),p=n("tJVT"),h=n("WmNS"),m=n.n(h),g=n("q1tI"),v=n.n(g),b=n("PsQE"),y=n.n(b),x=n("0eGx"),k=n.n(x),w=n("9Bee"),E=n("Ty5D"),C=n("9kvl"),S=n("ErOA"),O=n("+yhJ"),_=n.n(O),N=n("RZ/O"),j=n.n(N),T=n("LvDl"),L=n("6K3P"),A=n.n(L),D=(n("sRBo"),n("kaz8")),M=n("oBTY"),I=n("PpiC"),P=n("Ot1p"),F=n("kqOp"),R=n("7qnI"),z=n("1vsH"),B=n("PGNT"),W=n.n(B),K=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.isEdit,r=e.editData,a=(Object(I.a)(e,["globalSetting","loading","dispatch","isEdit","editData"]),Object(g.useState)("")),i=Object(p.a)(a,2),o=i[0],l=i[1],s=Object(g.useState)(""),u=Object(p.a)(s,2),d=u[0],h=u[1],m=Object(g.useState)([]),b=Object(p.a)(m,2),y=b[0],x=b[1],k=Object(g.useState)(""),w=Object(p.a)(k,2),E=w[0],C=w[1],S=Object(g.useState)(),O=Object(p.a)(S,2),_=O[0],N=O[1],j=Object(g.useState)(!1),T=Object(p.a)(j,2),L=T[0],A=T[1];Object(g.useEffect)((function(){r&&n&&(l(null==r?void 0:r.name),h(null==r?void 0:r.analysis),N(null==r?void 0:r.is_ordered),A(!0))}),[r]),Object(g.useEffect)((function(){if(L){var e=null==r?void 0:r.standard_answer.map((function(e){return e.answer_text}));x(e),A(!1)}}),[L]),Object(g.useImperativeHandle)(t,(function(){return{onSave:B,Clear:K}}));var B=function(){var e=[],t=!1;return o?(y.forEach((function(n,r){e.push({position:r+1,answer_text:[]}),n.forEach((function(n,a){e[r].answer_text.push(n),n&&Object(z.bb)(n,1e4)||(C("".concat(r,"-").concat(a)),c.b.info(n?"答案不能超过10000字符":"答案:不能为空"),t=!0)}))})),!t&&((null==e?void 0:e.length)>20?(c.b.warn("填空题标准答案不能为空/不能超过20个!"),!1):{name:o,analysis:d,standard_answers:e,is_ordered:_})):(c.b.info("请您输入题干"),!1)},K=function(){l(""),h(""),x([]),N(!1)},q=function(e,t,n){C("");var r=y.slice();r[e][t]=n,x(r)},H=function(e){var t=y.slice();t[e]=[].concat(Object(M.a)(t[e]),[""]),x(t)},V=function(e,t){var n=y.slice();if(!n[e][t])return n[e]=n[e].filter((function(e,n){return n!==t})),void x(n);f.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:W.a.modal,onOk:function(){n[e]=n[e].filter((function(e,n){return n!==t})),x(n)}})},U=function(e){f.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:W.a.modal,onOk:function(){var t=y.slice();t=y.filter((function(t,n){return e!==n})),x(t)}})};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement("div",null,v.a.createElement(F.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:o,onChange:function(e){return l(e)},showNullButton:!0,onPlaceholderChange:function(e,t,n){var r=y.slice();if(t&&r.splice(e,t),n)for(var a=0;a<n;a++)r.splice(e+a,0,[""]);x(r)}})),v.a.createElement("div",{className:"mt20"},y.map((function(e,t){return v.a.createElement(R.a,{key:t,answers:e,index:t,flex:1,is_md:!0,activeOptionErrorIndex:E,onAnswerChange:q,addChildAnswer:H,deleteChildAnswer:V,deleteChildAnswermain:U})}))),v.a.createElement("div",{className:"mt20"},y.length>1&&v.a.createElement("span",null,v.a.createElement(D.a,{checked:_,onChange:function(e){return N(e.target.checked)},className:"".concat(W.a.color333," font14")},"多个填空的答案有顺序要求"),v.a.createElement("span",{className:"".concat(W.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return h(e)}}))},q=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(K)),H=(n("7Kak"),n("9yH6")),V=function(e,t){e.globalSetting,e.loading;var n=e.editData,r=(e.dispatch,e.onRef,e.isEdit),a=(Object(I.a)(e,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Object(g.useState)()),i=Object(p.a)(a,2),o=i[0],l=i[1],s=Object(g.useState)(""),u=Object(p.a)(s,2),d=u[0],f=u[1],h=Object(g.useState)(""),m=Object(p.a)(h,2),b=m[0],y=m[1];Object(g.useEffect)((function(){if(n&&r){f(null==n?void 0:n.name),y(null==n?void 0:n.analysis);var e=null==n?void 0:n.choices.find((function(e){return e.is_answer}));l("正确"===e.choice_text?"0":"1")}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:x,Clear:k}}));var x=function(){return d?o?{name:d,choices:[{choice_text:"正确",is_answer:"0"===o?1:0},{choice_text:"错误",is_answer:"1"===o?1:0}],analysis:b}:(c.b.info("请先点击选择本选择题的正确选项"),!1):(c.b.info("请您输入题干"),!1)},k=function(){f(""),y(""),l("")};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:d,onChange:function(e){return f(e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"答案选项:",v.a.createElement("span",{className:W.a.colorGray},"点击选项可设置正确答案"))),v.a.createElement(H.a.Group,{buttonStyle:"solid",value:o,onChange:function(e){return l(e.target.value)}},v.a.createElement(H.a.Button,{value:"0",className:"".concat(W.a.radio," mr40")},"正确"),v.a.createElement(H.a.Button,{value:"1",className:W.a.radio},"错误")),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:b,onChange:function(e){return y(e)}}))},U=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(V)),G=["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(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),i=(Object(I.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),o=Object(p.a)(i,2),l=o[0],s=o[1],u=Object(g.useState)(),d=Object(p.a)(u,2),f=d[0],h=d[1],m=Object(g.useState)([]),b=Object(p.a)(m,2),y=b[0],x=b[1],k=Object(g.useState)(""),E=Object(p.a)(k,2),C=E[0],S=E[1],O=Object(g.useState)(""),_=Object(p.a)(O,2),N=_[0],j=_[1];Object(g.useEffect)((function(){s(["","","",""])}),[]),Object(g.useEffect)((function(){if(n&&r){S(null==n?void 0:n.name),j(null==n?void 0:n.analysis),s(null==n?void 0:n.choices.map((function(e){return e.choice_text})));var e=[];null==n||n.choices.map((function(t,n){t.is_answer&&e.push(n)})),x(e)}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:T,Clear:L}}));var T=function(){if(!C)return c.b.info("请您输入题干"),!1;var e=l.findIndex((function(e){return!e}));if(e>-1)return c.b.info("请先输入 ".concat(G[e]," 选项的内容")),!1;if(!y.length)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;if(y.length<2)return c.b.info("多选题最小正确选项为2个"),!1;var t=l.map((function(e,t){return{choice_text:e,is_answer:y.includes(t)?1:0}}));return{name:C,choices:t,analysis:N}},L=function(){s(["","","",""]),S(""),j(""),x("")};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:C,onChange:function(e){return S(e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"答案选项:",v.a.createElement("span",{className:W.a.colorGray},"点击选项可设置正确答案"))),l.map((function(e,t){return v.a.createElement("div",{className:W.a.choiceWrap,key:t},v.a.createElement(a.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(W.a.answer," ").concat(y.includes(t)?W.a.activeAnswer:""),onClick:function(){y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(Object(M.a)(y),[t]))}},G[t])),v.a.createElement("div",{className:W.a.editorWrap},f===t?v.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){l[t]=e,s(l)}}):v.a.createElement("div",{className:W.a.htmlWrap,onClick:function(){return h(t)}},v.a.createElement(w.a,{value:e}))),t>1&&v.a.createElement(a.a,{title:"删除"},v.a.createElement("i",{className:"".concat(W.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){s(l.filter((function(e,n){return n!==t}))),y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(Object(M.a)(y),[t]))}})),t<7&&t===l.length-1&&v.a.createElement(a.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(W.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return s([].concat(Object(M.a)(l),[""]))}})))})),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(e){return j(e)}}))},J=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)($)),Z=["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"],Q=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),i=(Object(I.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),o=Object(p.a)(i,2),l=o[0],s=o[1],u=Object(g.useState)(),d=Object(p.a)(u,2),f=d[0],h=d[1],m=Object(g.useState)(),b=Object(p.a)(m,2),y=b[0],x=b[1],k=Object(g.useState)(""),E=Object(p.a)(k,2),C=E[0],S=E[1],O=Object(g.useState)(""),_=Object(p.a)(O,2),N=_[0],j=_[1];Object(g.useEffect)((function(){s(["","","",""])}),[]),Object(g.useEffect)((function(){n&&r&&(S(null==n?void 0:n.name),j(null==n?void 0:n.analysis),s(null==n?void 0:n.choices.map((function(e){return e.choice_text}))),x(null==n?void 0:n.choices.findIndex((function(e){return e.is_answer}))))}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:T,Clear:L}}));var T=function(){if(!C)return c.b.info("请您输入题干"),!1;var e=l.findIndex((function(e){return!e}));if(e>-1)return c.b.info("请先输入 ".concat(Z[e]," 选项的内容")),!1;if(console.log("activeAnswer: ",y),"number"!=typeof y)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;var t=l.map((function(e,t){return{choice_text:e,is_answer:y===t?1:0}}));return{name:C,choices:t,analysis:N}},L=function(){s(["","","",""]),S(""),j(""),x("")};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:C,onChange:function(e){return S(e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"答案选项:",v.a.createElement("span",{className:W.a.colorGray},"点击选项可设置正确答案"))),l.map((function(e,t){return v.a.createElement("div",{className:W.a.choiceWrap,key:t},v.a.createElement(a.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(W.a.answer," ").concat(y===t?W.a.activeAnswer:""),onClick:function(){return x(t)}},Z[t])),v.a.createElement("div",{className:W.a.editorWrap},f===t?v.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){l[t]=e,s(l)}}):v.a.createElement("div",{className:W.a.htmlWrap,onClick:function(){return h(t)}},v.a.createElement(w.a,{value:e}))),t>1&&v.a.createElement(a.a,{title:"删除"},v.a.createElement("i",{className:"".concat(W.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){s(l.filter((function(e,n){return n!==t}))),t===y&&x(null)}})),t<7&&t===l.length-1&&v.a.createElement(a.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(W.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return s([].concat(Object(M.a)(l),[""]))}})))})),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(e){return j(e)}}))},Y=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(Q)),X=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(Object(I.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)("")),i=Object(p.a)(a,2),o=i[0],l=i[1],s=Object(g.useState)(""),u=Object(p.a)(s,2),d=u[0],f=u[1],h=Object(g.useState)(""),m=Object(p.a)(h,2),b=m[0],y=m[1];Object(g.useEffect)((function(){var e;n&&r&&(l(null==n?void 0:n.name),f(null==n?void 0:n.analysis),y(null==n||null===(e=n.answer_texts)||void 0===e?void 0:e[0]))}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:x,Clear:k}}));var x=function(){return o?b?{name:o,answer_texts:[b],analysis:d}:(c.b.info("请您输入参考答案"),!1):(c.b.info("请您输入题干"),!1)},k=function(){l(""),f(""),y("")};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:o,onChange:function(e){return l(e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"参考答案:")),v.a.createElement(P.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:b,onChange:function(e){return y(e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return f(e)}}))},ee=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(X)),te=n("k1fw"),ne=["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"],re=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.editData,r=(e.onRef,e.isEdit),i=(Object(I.a)(e,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Object(g.useState)("")),o=Object(p.a)(i,2),l=o[0],s=o[1],u=Object(g.useState)([]),d=Object(p.a)(u,2),f=d[0],h=d[1];console.log(f),Object(g.useEffect)((function(){var e;if(n&&r){s(null==n?void 0:n.name);var t=null==n||null===(e=n.sub_item_banks)||void 0===e?void 0:e.map((function(e){var t,n,r;return Object(te.a)(Object(te.a)({},e),{},{id:e.id,open:!1,qusList:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return e.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==e||null===(r=e.choices)||void 0===r?void 0:r.findIndex((function(e){return e.is_answer}))])||void 0===n?void 0:n.filter((function(e){return-1!==e}))})}));h(t)}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:m,Clear:b}}));var m=function(){if(!l)return c.b.info("请您输入题干"),!1;if(0===f.length)return c.b.info("请您添加小题"),!1;for(var e=0;e<f.length;e++){var t,n=f[e];if(null==n||!n.name)return c.b.info("请您输入第".concat(e+1,"小题题干")),!1;var r=null==n||null===(t=n.qusList)||void 0===t?void 0:t.findIndex((function(e){return!e}));if(r>-1)return c.b.info("请先输入第".concat(e+1,"小题").concat(ne[r],"选项的内容")),!1;if(null==n||!n.qusAnswer.length)return c.b.info("请设置第".concat(e+1,"小题的正确答案,点击选项A/B...即可完成设置")),!1}var a=f.map((function(e){return{id:e.id>1?e.id:null,name:e.name,item_type:e.item_type,analysis:e.analysis,choices:e.qusList.map((function(t,n){return{choice_text:t,is_answer:e.qusAnswer[0]===n?1:0}}))}}));return{name:l,sub_item_banks:a}},b=function(){s(""),h([])},y=function(e,t,n){var r,a=Object(T.cloneDeep)(f);("open"===e&&(a[t].open=!a[t].open),"delete"===e&&a.splice(t,1),"value"===e&&(a[t].name=n),"answer"===e&&(a[t].qusAnswer=[n]),"edit"===e&&(a[t].activeQusEditor=n),"details"===e&&(a[t].qusList[a[t].activeQusEditor]=n),"addQus"===e&&(a[t].qusList=a[t].qusList.concat("")),"deleteQus"===e)&&(a[t].qusList=a[t].qusList.filter((function(e,t){return t!==n})),a[t].qusAnswer=null===(r=a[t].qusAnswer)||void 0===r?void 0:r.filter((function(e){return e!==n})));"analysis"===e&&(a[t].analysis=n),h(a)};return v.a.createElement("section",{className:W.a.wrap},v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"题干:")),v.a.createElement(P.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:l,onChange:function(e){return s(e)}}),null==f?void 0:f.map((function(e,t){var n;return v.a.createElement("div",{className:W.a.fold,key:e.id},v.a.createElement("div",{onClick:function(){return y("open",t)},className:W.a.head},v.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:e.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),v.a.createElement("span",null,"第",t+1,"小题(单选题)"),v.a.createElement("b",{style:{visibility:"hidden"},onClick:function(e){e.stopPropagation(),y("delete",t)},className:"iconfont icon-shanchu8"})),v.a.createElement("div",{className:"mb10",style:{display:e.open?"block":"none"}},v.a.createElement(P.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==e?void 0:e.name,onChange:function(e){return y("value",t,e)}}),v.a.createElement("p",{className:W.a.titleWrap},v.a.createElement("span",{className:W.a.required},"*"),v.a.createElement("span",{className:W.a.title},"答案选项:",v.a.createElement("span",{className:W.a.colorGray},"点击选项可设置正确答案"))),null==e||null===(n=e.qusList)||void 0===n?void 0:n.map((function(n,r){var i,o;return v.a.createElement("div",{className:W.a.choiceWrap,key:r},v.a.createElement(a.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(W.a.answer," ").concat(null!=e&&null!==(i=e.qusAnswer)&&void 0!==i&&i.includes(r)?W.a.activeAnswer:""),onClick:function(){return y("answer",t,r)}},ne[r])),v.a.createElement("div",{className:W.a.editorWrap},(null==e?void 0:e.activeQusEditor)===r?v.a.createElement(P.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(e){return y("details",t,e)}}):v.a.createElement("div",{className:W.a.htmlWrap,onClick:function(){return y("edit",t,r)}},v.a.createElement(w.a,{value:n}))),r>1&&v.a.createElement(a.a,{title:"删除"},v.a.createElement("i",{className:"".concat(W.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return y("deleteQus",t,r)}})),r<7&&r===(null==e||null===(o=e.qusList)||void 0===o?void 0:o.length)-1&&v.a.createElement(a.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(W.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return y("addQus",t)}})))})),v.a.createElement("p",{className:"mb10 mt10"},v.a.createElement("span",{className:W.a.title},"题目解析:")),v.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:e.analysis,onChange:function(e){return y("analysis",t,e)}})))})))},ae=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(re));t.a=function(e){var t,n,h,b,x,O,N,L,D=e.data,M=e.submit,I=e.goBack,P=e.loading,F=e.onTypeScore,R=e.editPreview,z=void 0!==R&&R,B=e.onSkipExamination,W=e.selectValue,K=e.onExchange,H=Object(g.useRef)(),V=Object(g.useRef)(Object(T.debounce)((function(){return le()}),100,{leading:!0,trailing:!0})),G=Object(g.useState)(null),$=Object(p.a)(G,2),Z=$[0],Q=$[1],X=Object(g.useState)(!1),te=Object(p.a)(X,2),ne=te[0],re=te[1],ie=Object(E.i)();Object(g.useEffect)((function(){return window.addEventListener("scroll",null==V?void 0:V.current),function(){window.removeEventListener("scroll",null==V?void 0:V.current)}}),[]),Object(g.useEffect)((function(){re(!0)}),[]),Object(g.useEffect)((function(){var e,t,n,r,a=null===(e=document.getElementById("examName"))||void 0===e||null===(t=e.getElementsByClassName("ant-pagination-options-quick-jumper"))||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.childNodes)||void 0===r?void 0:r[2];a&&(a.nodeValue="份")}),[D]);var oe=function(e){var t=parseInt(e);return isNaN(t)?"":t};var le=function(){var e,t,n,r,a=document.getElementById("preview_btns"),i=document.getElementById("preview_btns_else");n=0,r=0,document.body&&(n=document.body.scrollTop),document.documentElement&&(r=document.documentElement.scrollTop),(n-r>0?n:r)+("CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight)>=(e=0,t=0,document.body&&(e=document.body.scrollHeight),document.documentElement&&(t=document.documentElement.scrollHeight),(e-t>0?e:t)-68)?(a.style.visibility="hidden",i.style.visibility="visible"):(a.style.visibility="visible",i.style.visibility="hidden")},se=["容易","简单","适中","困难"],ce=["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"],ue=function(e){console.log(e,"key"),B(e-1)},de=function(){return v.a.createElement(v.a.Fragment,null,v.a.createElement(o.a,{color:"#55575D",overlayClassName:y.a.popover,visible:ne,getPopupContainer:function(e){return null==e?void 0:e.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷"},v.a.createElement(l.a,{onMouseEnter:function(){return re(!0)},onMouseLeave:function(){return re(!1)},onClick:function(){var e,t;t="",f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"保存试卷",content:v.a.createElement("div",{className:y.a.modalColumn},v.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},v.a.createElement("img",{style:{marginRight:5},src:A.a}),"保存后单独生成一份人工组卷类型的固定试卷。"),v.a.createElement("div",{className:y.a.modalRow,style:{marginTop:20}},v.a.createElement("sup",{className:y.a.sup},"*"),v.a.createElement("span",{style:{flexShrink:0}},"试卷名称:"),v.a.createElement(s.a,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:t,onChange:function(e){t=e.target.value}}))),okText:"确认",cancelText:"取消",onOk:(e=Object(u.a)(m.a.mark((function e(){var n,r,a,i,o;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return c.b.warn("试卷名称不能为空"),e.abrupt("return",Promise.reject());case 3:return r=[],a=[],i=[],null==D||null===(n=D.questionList)||void 0===n||n.forEach((function(e){var t;null===(t=e.questions)||void 0===t||t.forEach((function(t){r.push(t.id),a.push(e.questions_score/e.questions_count),"COMBINATION"===e.type&&i.push({id:t.id,sub_item_bank_ids:t.sub_item_banks.map((function(e){return e.id}))})}))})),console.log("-----",i),o={item_bank_ids:r,item_bank_scores:a,name:t,combination_item_banks:i},e.next=11,M(o);case 11:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}},"保存")),v.a.createElement(l.a,{onClick:function(){document.body.scrollIntoView(),I()}},"返回"),v.a.createElement(l.a,{loading:P,onClick:function(){return M()},type:"primary"},"提交"))},fe=function(){var e;return v.a.createElement(v.a.Fragment,null,v.a.createElement(l.a,{onClick:I},"返回"),W>0&&v.a.createElement(l.a,{onClick:function(){return ue(W)},type:"primary"},"上一份"),W<(null==D||null===(e=D.exam)||void 0===e?void 0:e.total_num)-1&&v.a.createElement(l.a,{onClick:function(){return ue(W+2)}},"下一份"))},pe=function(){var e=Object(u.a)(m.a.mark((function e(t,n){var r,a,i,o,l,s,u,d,f,p;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=H.current)||void 0===r?void 0:r.onSave();case 2:if(a=e.sent){e.next=5;break}return e.abrupt("return");case 5:return i={question_score:n.score,analysis:a.analysis},console.log(a,"editorData"),"SINGLE"!==t&&"MULTIPLE"!==t&&"JUDGMENT"!==t||(l=[],s=[],i.question_type="JUDGMENT"===t?2:1,i.question_title=null==a?void 0:a.name,null==a||null===(o=a.choices)||void 0===o||o.forEach((function(e,t){l.push(e.choice_text),null!=e&&e.is_answer&&s.push(t+1)})),i.question_choices=l,i.standard_answers=s),"COMPLETION"===t&&(i.is_ordered=a.is_ordered,i.question_title=null==a?void 0:a.name,i.question_type=3,d=[],null==a||null===(u=a.standard_answers)||void 0===u||u.forEach((function(e,t){d.push({choice_id:e.position,answer_text:e.answer_text})})),i.standard_answers=d),"SUBJECTIVE"===t&&(i.question_title=null==a?void 0:a.name,i.question_type=3,i.standard_answers=null==a?void 0:a.answer_texts),"COMBINATION"===t&&(i.question_title=null==a?void 0:a.name,i.question_type=7,i.sub_questions=null==a||null===(f=a.sub_item_banks)||void 0===f?void 0:f.map((function(e,t){return{id:e.id,question_title:e.name,question_type:1,question_choices:e.choices.map((function(e){return e.choice_text})),standard_answers:[e.choices.findIndex((function(e){return e.is_answer}))+1],analysis:e.analysis}})),delete i.analysis),e.next=13,Object(S.a)("/api/exercise_questions/".concat(n.id,".json"),{method:"put",body:i});case 13:0===(null==(p=e.sent)?void 0:p.status)&&(c.b.success("编辑成功"),ue(W+1)),Q(null);case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();console.log(function(){for(var e=[],t=0;t<(null==D||null===(n=D.exam)||void 0===n?void 0:n.total_num);t++){var n;e.push({})}return e}(),"data");var he=null==D||null===(t=D.questionList)||void 0===t?void 0:t.reduce((function(e,t){return e+t.questions_score}),0),me=z&&1!==(null==D||null===(n=D.exam)||void 0===n?void 0:n.exercise_status);return v.a.createElement("section",{className:y.a.wrap},v.a.createElement("div",{id:"id_left_preview",className:y.a.left,onMouseEnter:function(e){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left_preview").style.overflowY="hidden"}},v.a.createElement("div",{className:y.a.title},v.a.createElement("div",null,v.a.createElement("b",null),v.a.createElement("span",null,"答题卡"))),v.a.createElement("div",{className:y.a.total},v.a.createElement("div",null,v.a.createElement("img",{src:_.a}),v.a.createElement("span",null,"题数(道)"),v.a.createElement("aside",null,null==D?void 0:D.all_questions_count)),v.a.createElement("div",{className:"mr30 ml30"},v.a.createElement("img",{src:j.a}),v.a.createElement("span",null,"总分(分)"),v.a.createElement("aside",null,he)),v.a.createElement("div",null,v.a.createElement("img",{src:k.a}),v.a.createElement("span",null,"时长(分)"),v.a.createElement("aside",null,null==D||null===(h=D.exam)||void 0===h?void 0:h.time))),null==D||null===(b=D.questionList)||void 0===b?void 0:b.map((function(e,t){var n;return v.a.createElement("div",{className:y.a.list,key:t},v.a.createElement("div",{className:y.a.name},v.a.createElement("b",null),v.a.createElement("span",null,e.name)),v.a.createElement("aside",null,v.a.createElement("div",null,"共",v.a.createElement("span",{className:y.a.b},e.questions_count),"题 ",v.a.createElement("span",{className:y.a.l},"|"),"共",v.a.createElement("span",{className:y.a.r},e.questions_score),"分"),v.a.createElement("div",{className:y.a.answerSheet},null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e,t){return v.a.createElement("div",{onClick:function(){var t="Anchor_".concat(e.id),n=document.getElementById(t);n&&setTimeout((function(){return n.scrollIntoView({block:"center",behavior:"smooth"})}))},key:e.id,className:y.a.tag},t+1)})))))}))),v.a.createElement("div",{className:y.a.right},v.a.createElement("div",{className:y.a.examName,id:"examName"},v.a.createElement("div",{className:y.a.name},v.a.createElement(a.a,{title:null==D||null===(x=D.exam)||void 0===x?void 0:x.name,getPopupContainer:function(e){return e.parentNode}},v.a.createElement("span",{className:y.a.t},null==D||null===(O=D.exam)||void 0===O?void 0:O.name))),z?v.a.createElement(r.a,{showTotal:function(e){return v.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"共计",v.a.createElement("span",{className:"c-light-primary"},e),"份试卷")},total:null==D||null===(N=D.exam)||void 0===N?void 0:N.total_num,pageSize:1,current:W+1,showSizeChanger:!1,onChange:ue,showQuickJumper:!0,hideOnSinglePage:!1}):v.a.createElement(l.a,{onClick:function(){var e,t=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(e=Object(u.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.update({cancelButtonProps:{disabled:!0}}),e.next=3,K();case 3:t.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成整张试题");case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},type:"primary"},"随机更换")),v.a.createElement("div",{className:y.a.topWarp},null==D||null===(L=D.questionList)||void 0===L?void 0:L.map((function(e,t){var n,r;return v.a.createElement(v.a.Fragment,{key:t},v.a.createElement("div",{className:y.a.head,style:0===t?{border:0,marginTop:-16}:{}},v.a.createElement("div",{className:y.a.name},v.a.createElement("b",null),v.a.createElement("span",null,e.name)),v.a.createElement("div",{className:y.a.so},"共",v.a.createElement("span",{className:y.a.b},e.questions_count," "),"题 ","COMBINATION"===e.type&&"(包含".concat(null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e){var t;return null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.length})).reduce((function(e,t){return e+t})),"小题)"),v.a.createElement("span",{className:y.a.l},"|"),"共",v.a.createElement("span",{className:y.a.r},e.questions_score),"分"),!z&&v.a.createElement("div",{className:y.a.btn},v.a.createElement(l.a,{onClick:function(){!function(e){console.log("---",e);var t=[];e.questions.map((function(e){return null==e?void 0:e.sub_item_banks.map((function(e){t.push(e)}))}));var n,r=0;r="COMBINATION"===e.type?e.questions_score/t.length:e.questions_score/e.questions_count,f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"分数设置",content:v.a.createElement("div",{className:y.a.modalColumn},v.a.createElement("div",{className:y.a.modalRow,style:{justifyContent:"flex-start"}},v.a.createElement("sup",{className:y.a.sup},"*"),v.a.createElement("span",null,null==e?void 0:e.name,"COMBINATION"===(null==e?void 0:e.type)&&"中的每小题",":"),v.a.createElement(d.a,{min:1,parser:oe,defaultValue:r,onChange:function(e){r=e}}),v.a.createElement("span",{className:"ml5"},"分/题"))),okText:"确认",cancelText:"取消",onOk:(n=Object(u.a)(m.a.mark((function n(){var a,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r){n.next=3;break}return c.b.warn("分数不能为空或为0"),n.abrupt("return",Promise.reject());case 3:"COMBINATION"===e.type?(a={type:null==e?void 0:e.type,score:r,scoreTotal:r*(null==t?void 0:t.length)},F(a)):(i={type:null==e?void 0:e.type,score:r,scoreTotal:r*e.questions_count},F(i));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}(e)},type:"primary",ghost:!0,className:"mr20"},"设置得分"),v.a.createElement(l.a,{onClick:function(){return a=null===(n=(t=e).questions)||void 0===n?void 0:n.map((function(e){return e.id})),i=t.name,void(o=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换".concat(i,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(r=Object(u.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.update({cancelButtonProps:{disabled:!0}}),e.next=3,K({seleted_item_bank_ids:a},{type:t.type});case 3:o.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成".concat(i,"试题"));case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}));var t,n,r,a,i,o},type:"primary",ghost:!0},"随机更换"))),null==e||null===(r=e.questions)||void 0===r?void 0:r.map((function(t,n){return Z===t.id?v.a.createElement("div",{id:"Anchor_".concat(t.id),className:y.a.content,style:{padding:0,marginTop:10},key:t.id},v.a.createElement("div",{style:{float:"right",marginTop:-6}},v.a.createElement(l.a,{onClick:function(){return Q(null)},className:"mr20",type:"primary",ghost:!0},"取消"),v.a.createElement(l.a,{onClick:function(){return pe(null==e?void 0:e.type,t)},type:"primary"},"保存")),function(e,t){if(console.log(e,222),"SINGLE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(Y,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));if("MULTIPLE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(J,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));if("JUDGMENT"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(U,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));if("COMPLETION"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(q,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));if("SUBJECTIVE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(ee,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));if("COMBINATION"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(ae,{ref:H,editData:e,isEdit:!0}),v.a.createElement(i.a,null));var n;"PROGRAM"===t&&C.d.push("/problems/".concat(null==e||null===(n=e.program_attr)||void 0===n?void 0:n.identifier,"/edit?type=exercises&express_id=").concat(ie.categoryId,"&question_id=").concat(null==e?void 0:e.id,"&score=").concat(null==e?void 0:e.score,"&callback_url=").concat(location.pathname,"&select=").concat(W,"&exercise=true"))}(t,e.type)):v.a.createElement("div",{id:"Anchor_".concat(t.id),className:y.a.content,key:t.id},v.a.createElement("div",{className:y.a.titleWrap},v.a.createElement(w.a,{style:{paddingRight:10},className:y.a.titleHtml,value:n+1+"、"+"".concat("combination"===(null==t?void 0:t.item_type)?"(题干)":"")+t.name}),z&&v.a.createElement(l.a,{disabled:me,onClick:function(){Z?c.b.warn("先保存或取消当前正在编辑的试题"):Q(t.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"编辑"),v.a.createElement(l.a,{disabled:me,onClick:function(){return function(e,t,n,r){var a,i,o=null===(a=r.questions)||void 0===a?void 0:a.map((function(e){return e.id})),l=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认要更换该试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(i=Object(u.a)(m.a.mark((function r(){return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return l.update({cancelButtonProps:{disabled:!0}}),r.next=3,K({single_question_id:e,seleted_item_bank_ids:o},{type:t,index:n});case 3:l.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成试题");case 5:case"end":return r.stop()}}),r)}))),function(){return i.apply(this,arguments)})})}(t.id,e.type,n,e)},type:"primary",ghost:!0},"换一题")),("SINGLE"===e.type||"JUDGMENT"===e.type||"MULTIPLE"===e.type)&&(s=t,p=[],v.a.createElement(v.a.Fragment,null,v.a.createElement("aside",{className:y.a.single},null==s||null===(d=s.choices)||void 0===d?void 0:d.map((function(e,t){return e.is_answer&&p.push(ce[t]),v.a.createElement("ul",{key:t},v.a.createElement("li",null,ce[t],"、"),v.a.createElement("li",null,v.a.createElement(w.a,{value:e.choice_text})))}))),v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",p.join(""),v.a.createElement("span",{className:"ml30"},"难度:",se[s.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(w.a,{value:s.analysis?s.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==s?void 0:s.discipline_name,"/").concat(null==s?void 0:s.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==s?void 0:s.tag_discipline_name))))),"COMPLETION"===e.type&&function(e){var t,n=null==e||null===(t=e.standard_answer)||void 0===t?void 0:t.map((function(e){var t;return"答案(填空".concat(e.position,"):").concat(null==e||null===(t=e.answer_text)||void 0===t?void 0:t.join("、"))}));return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",n),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(w.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name))))}(t),"SUBJECTIVE"===e.type&&function(e){var t;return v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",null==e||null===(t=e.answer_texts)||void 0===t?void 0:t[0]),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(w.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))}(t),"PROGRAM"===e.type&&function(e){var t;return v.a.createElement("div",{className:y.a.analysis},v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"预期输出:"),v.a.createElement(w.a,{value:null==e||null===(t=e.program_attr)||void 0===t?void 0:t.description})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))}(t),"COMBINATION"===e.type&&(r=t,a=n,v.a.createElement("div",null,null==r||null===(o=r.sub_item_banks)||void 0===o?void 0:o.map((function(e,t){var n,i=[];return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},a+1+"."+(t+1),"(单选题)",e.name),v.a.createElement("aside",{className:y.a.single},null==e||null===(n=e.choices)||void 0===n?void 0:n.map((function(e,t){return e.is_answer&&i.push(ce[t]),v.a.createElement("ul",{key:t},v.a.createElement("li",null,ce[t],"、"),v.a.createElement("li",null,v.a.createElement(w.a,{value:e.choice_text})))}))),v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",i.join(""),v.a.createElement("span",{className:"ml30"},"难度:",se[e.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(w.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==r?void 0:r.discipline_name,"/").concat(null==r?void 0:r.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==r?void 0:r.tag_discipline_name))))})))),v.a.createElement("div",null));var r,a,o,s,d,p})))}))),v.a.createElement("div",{className:y.a.btnsElse,id:"preview_btns_else"},z?fe():de()),v.a.createElement("div",{className:y.a.btnsWrap,id:"preview_btns"},v.a.createElement("div",{className:y.a.btns},z?fe():de()))))}},sboe:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
|
|
|
\*************************************************/
|
|
|
/*! exports provided: TreeContext */
|
|
|
/*! exports used: TreeContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! react */"q1tI"),a=r.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(e,t,n){e.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(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]); |