|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[175,6,7,16],{"+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/"))},"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(h("atom","]]>")):null:e.match("--")?n(h("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=h("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=g,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 h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function p(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 v(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 g(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?y:g}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),g)}function k(e,t,n){return o="error",x(e,0,n)}function w(e,t,n){if("word"==e)return o="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,a=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,a==n.indented)),g}return o="error",w}function C(e,t,n){return"equals"==e?S:(s.allowMissing||(o="error"),w(e,0,n))}function S(e,t,n){return"string"==e?O:"word"==e&&s.allowUnquoted?(o="string",w):(o="error",w(e,0,n))}function O(e,t,n){return"string"==e?O:w(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:g,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==S&&(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/"))},"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 v}));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),h=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),s.a.Option),p={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 v(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)(),h=Object(l.a)(d,2),p=h[0],m=h[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",a)}),[p,a]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(s.current&&!p){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,p]),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],g=d[1];return u.a.createElement(o.a,Object(a.a)({},p,{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){g(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(h,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(v,{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}}},"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 h})),n.d(t,"f",(function(){return p})),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),h=c(u.key,f),p=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(p),!0===t||n.has(h)?p.children=o(u.children||[],p):p.children=[],p}))}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 h(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 p(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,h=e.pos,p=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:h,active:p});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/"))},"8Jsi":
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/rc-tree-select/es/index.js + 12 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: TreeNode, SHOW_ALL, SHOW_CHILD, SHOW_PARENT, default */
|
|
|
/*! exports used: SHOW_ALL, SHOW_CHILD, SHOW_PARENT, 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/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/interface/generator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/index.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/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/hooks/useMergedState.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) */function(e,t,n){"use strict";n.d(t,"d",(function(){return L})),n.d(t,"a",(function(){return H})),n.d(t,"b",(function(){return V})),n.d(t,"c",(function(){return B}));var r=n("1OyB"),a=n("vuIU"),i=n("Ji7U"),o=n("LK+K"),l=n("KQm4"),s=n("U8pU"),c=n("ODXe"),u=n("VTBJ"),d=n("q1tI"),f=n("qNPg"),h=n("2Qr1"),p=n("815F"),m=n("NvD2"),v=n("wPlo"),g=n("6cGi"),b=n("Kwbf"),y=n("4IlW"),x=n("YrtM"),k=n("fAei"),w=d.createContext(null);function C(e,t){if(!e)return!0;var n=e.data,r=n.disabled,a=n.disableCheckbox;switch(t){case"select":return r;case"checkbox":return r||a}return!1}function S(e,t){return[d.useCallback((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"select",r=arguments.length>2?arguments[2]:void 0,a=e.get(t);return!r&&C(a,n)?null:a}),[e]),d.useCallback((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"select",r=arguments.length>2?arguments[2]:void 0,a=t.get(e);return!r&&C(a,n)?null:a}),[t])]}function O(e){return d.useMemo((function(){var t=new Map,n=new Map;return e.forEach((function(e){t.set(e.key,e),n.set(e.data.value,e)})),[t,n]}),[e])}var E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},N=function(e,t){var n=e.prefixCls,r=e.height,a=e.itemHeight,i=e.virtual,o=e.options,s=e.flattenOptions,u=e.multiple,f=e.searchValue,h=e.onSelect,p=e.onToggleOpen,m=e.open,v=e.notFoundContent,g=e.onMouseEnter,b=d.useContext(w),C=b.checkable,N=b.checkedKeys,j=b.halfCheckedKeys,T=b.treeExpandedKeys,L=b.treeDefaultExpandAll,A=b.treeDefaultExpandedKeys,D=b.onTreeExpand,M=b.treeIcon,_=b.showTreeIcon,F=b.switcherIcon,P=b.treeLine,I=b.treeNodeFilterProp,R=b.loadData,z=b.treeLoadedKeys,W=b.treeMotion,K=b.onTreeLoad,H=d.useRef(),B=Object(x.a)((function(){return o}),[m,o],(function(e,t){return t[0]&&e[1]!==t[1]})),V=O(s),q=Object(c.a)(V,2),U=S(q[0],q[1]),$=Object(c.a)(U,2),G=$[0],X=$[1],Y=d.useMemo((function(){return N.map((function(e){var t=X(e);return t?t.key:null}))}),[N]),Z=d.useMemo((function(){return C?{checked:Y,halfChecked:j}:null}),[Y,j,C]);d.useEffect((function(){var e;m&&!u&&Y.length&&(null===(e=H.current)||void 0===e||e.scrollTo({key:Y[0]}))}),[m]);var J=String(f).toLowerCase(),Q=d.useState(A),ee=Object(c.a)(Q,2),te=ee[0],ne=ee[1],re=d.useState(null),ae=Object(c.a)(re,2),ie=ae[0],oe=ae[1],le=d.useMemo((function(){return T?Object(l.a)(T):f?ie:te}),[te,ie,J,T]);d.useEffect((function(){f&&oe(s.map((function(e){return e.key})))}),[f]);var se=function(e){e.preventDefault()},ce=function(e,t){var n=t.node.key,r=G(n,C?"checkbox":"select");null!==r&&h(r.data.value,{selected:!N.includes(r.data.value)}),u||p(!1)},ue=d.useState(null),de=Object(c.a)(ue,2),fe=de[0],he=de[1],pe=G(fe);if(d.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t;switch(e.which){case y.a.UP:case y.a.DOWN:case y.a.LEFT:case y.a.RIGHT:null===(t=H.current)||void 0===t||t.onKeyDown(e);break;case y.a.ENTER:null!==pe&&ce(0,{node:{key:fe},selected:!N.includes(pe.data.value)});break;case y.a.ESC:p(!1)}},onKeyUp:function(){}}})),0===B.length)return d.createElement("div",{role:"listbox",className:"".concat(n,"-empty"),onMouseDown:se},v);var me={};return z&&(me.loadedKeys=z),le&&(me.expandedKeys=le),d.createElement("div",{onMouseDown:se,onMouseEnter:g},pe&&m&&d.createElement("span",{style:E,"aria-live":"assertive"},pe.data.value),d.createElement(k.b,Object.assign({ref:H,focusable:!1,prefixCls:"".concat(n,"-tree"),treeData:B,height:r,itemHeight:a,virtual:i,multiple:u,icon:M,showIcon:_,switcherIcon:F,showLine:P,loadData:f?null:R,motion:W,checkable:C,checkStrictly:!0,checkedKeys:Z,selectedKeys:C?[]:Y,defaultExpandAll:L},me,{onActiveChange:he,onSelect:ce,onCheck:ce,onExpand:function(e){ne(e),oe(e),D&&D(e)},onLoad:K,filterTreeNode:function(e){return!!J&&String(e[I]).toLowerCase().includes(J)}})))},j=d.forwardRef(N);j.displayName="OptionList";var T=j,L=function(){return null},A=n("Ff2n"),D=n("Zm9Q");function M(e){if(!e)return e;var t=Object(u.a)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(b.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function _(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function F(e,t){var n=new Map;return t.forEach((function(e){var t=e.data;n.set(t.value,t)})),e.map((function(e){return M(n.get(e))}))}function P(e){return e.disabled||e.disableCheckbox||!1===e.checkable}function I(e){for(var t=0,n=e.parent;n;)n=n.parent,t+=1;return t}function R(e){return Object(p.d)(function e(t){return(t||[]).map((function(t){var n=t.value,r=t.key,a=t.children,i=Object(u.a)(Object(u.a)({},t),{},{key:"key"in t?r:n});return a&&(i.children=e(a)),i}))}(e),!0).map((function(e){return{key:e.data.key,data:e.data,level:I(e)}}))}function z(e,t,n,r){var a=new Map;return _(t).forEach((function(e){e&&"object"===Object(s.a)(e)&&"value"in e&&a.set(e.value,e)})),e.map((function(e){var t={value:e},i=n(e,"select",!0),o=i?r(i.data):e;if(a.has(e)){var l=a.get(e);t.label="label"in l?l.label:o,"halfChecked"in l&&(t.halfChecked=l.halfChecked)}else t.label=o;return t}))}function W(e,t){new Set;return function e(n){return(n||[]).map((function(n){var r=n.key,a=n.value,i=n.children,o=Object(A.a)(n,["key","value","children"]),l="value"in n?a:r,s=Object(u.a)(Object(u.a)({},o),{},{key:null!=r?r:l,value:l,title:t(n)});return"children"in n&&(s.children=e(i)),s}))}(e)}function K(e,t,n){var r=n.getLabelProp,a=n.simpleMode,i=d.useRef({});return e?(i.current.formatTreeData=i.current.treeData===e?i.current.formatTreeData:W(a?function(e,t){var n=t.id,r=t.pId,a=t.rootPId,i={},o=[];return e.map((function(e){var t=Object(u.a)({},e),r=t[n];return i[r]=t,t.key=t.key||r,t})).forEach((function(e){var t=e[r],n=i[t];n&&(n.children=n.children||[],n.children.push(e)),(t===a||!n&&null===a)&&o.push(e)})),o}(e,Object(u.a)({id:"id",pId:"pId",rootPId:null},!0!==a?a:{})):e,r),i.current.treeData=e):i.current.formatTreeData=i.current.children===t?i.current.formatTreeData:W(function e(t){return Object(D.a)(t).map((function(t){if(!d.isValidElement(t)||!t.type)return null;var n=t.key,r=t.props,a=r.children,i=r.value,o=Object(A.a)(r,["children","value"]),l=Object(u.a)({key:n,value:i},o),s=e(a);return s.length&&(l.children=s),l})).filter((function(e){return e}))}(t),r),i.current.formatTreeData}var H="SHOW_ALL",B="SHOW_PARENT",V="SHOW_CHILD";function q(e,t,n){var r=new Set(e);return t===V?e.filter((function(e){var t=n[e];return!(t&&t.children&&t.children.every((function(e){var t=e.node;return P(t)||r.has(t.key)})))})):t===B?e.filter((function(e){var t=n[e],a=t?t.parent:null;return!(a&&!P(a.node)&&r.has(a.node.key))})):e}var U=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],$=Object(f.a)({prefixCls:"rc-tree-select",components:{optionList:T},convertChildrenToData:function(){return null},flattenOptions:R,getLabeledValue:h.e,filterOptions:function(e,t,n){var r,a=n.optionFilterProp,i=n.filterOption;return!1===i?t:(r="function"==typeof i?i:function(e){return function(t,n){var r=n[e];return String(r).toLowerCase().includes(String(t).toLowerCase())}}(a),function t(n){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n.map((function(n){var i=n.children,o=a||r(e,M(n)),l=t(i||[],o);return o||l.length?Object(u.a)(Object(u.a)({},n),{},{children:l}):null})).filter((function(e){return e}))}(t))},isValueDisabled:function(e,t){var n=F([e],t)[0];return!!n&&n.disabled},findValueOption:F,omitDOMProps:function(e){var t=Object(u.a)({},e);return U.forEach((function(e){delete t[e]})),t}});$.displayName="Select";var G=d.forwardRef((function(e,t){var n=e.multiple,r=e.treeCheckable,a=e.treeCheckStrictly,i=e.showCheckedStrategy,o=void 0===i?"SHOW_CHILD":i,u=e.labelInValue,f=e.loadData,h=e.treeLoadedKeys,y=e.treeNodeFilterProp,x=void 0===y?"value":y,k=e.treeNodeLabelProp,C=e.treeDataSimpleMode,E=e.treeData,N=e.treeExpandedKeys,j=e.treeDefaultExpandedKeys,T=e.treeDefaultExpandAll,A=e.children,D=e.treeIcon,M=e.showTreeIcon,F=e.switcherIcon,P=e.treeLine,I=e.treeMotion,W=e.filterTreeNode,H=e.dropdownPopupAlign,B=e.onChange,V=e.onTreeExpand,U=e.onTreeLoad,G=e.onDropdownVisibleChange,X=e.onSelect,Y=e.onDeselect,Z=r||a,J=n||Z,Q=r&&!a,ee=a||u,te=d.useRef(null);d.useImperativeHandle(t,(function(){return{focus:te.current.focus,blur:te.current.blur}}));var ne=function(e){return E&&e.label||e.title},re=function(e){return k?e[k]:ne(e)},ae=K(E,A,{getLabelProp:ne,simpleMode:C}),ie=O(Object(d.useMemo)((function(){return R(ae)}),[ae])),oe=Object(c.a)(ie,2),le=S(oe[0],oe[1]),se=Object(c.a)(le,2),ce=se[0],ue=se[1],de=Object(d.useMemo)((function(){return Q?Object(p.a)(ae):{keyEntities:null}}),[ae,r,a]).keyEntities,fe=Object(g.a)(e.defaultValue,{value:e.value}),he=Object(c.a)(fe,2),pe=he[0],me=he[1],ve=function(e){var t=[],n=[];return e.forEach((function(e){ue(e)?n.push(e):t.push(e)})),{missingRawValues:t,existRawValues:n}},ge=Object(d.useMemo)((function(){var e=[],t=[];if(_(pe).forEach((function(n){if(n&&"object"===Object(s.a)(n)&&"value"in n)if(n.halfChecked&&a){var r=ue(n.value);e.push(r?r.key:n.value)}else t.push(n.value);else t.push(n)})),Q){var n=ve(t),r=n.missingRawValues,i=n.existRawValues.map((function(e){return ue(e).key})),o=Object(m.a)(i,!0,de),c=o.checkedKeys,u=o.halfCheckedKeys;return[[].concat(Object(l.a)(r),Object(l.a)(c.map((function(e){return ce(e).data.value})))),u]}return[t,e]}),[pe,J,ee,r,a]),be=Object(c.a)(ge,2),ye=be[0],xe=be[1],ke=function(e,t){var n=t.value,r=t.getEntityByValue,a=t.getEntityByKey,i=t.treeConduction,o=t.showCheckedStrategy,l=t.conductKeyEntities,s=t.getLabelProp;return d.useMemo((function(){var t=e;i&&(t=q(e.map((function(e){var t=r(e);return t?t.key:e})),o,l).map((function(e){var t=a(e);return t?t.data.value:e})));return z(t,n,r,s)}),[e,n,i,o,r])}(ye,{treeConduction:Q,value:pe,showCheckedStrategy:o,conductKeyEntities:de,getEntityByValue:ue,getEntityByKey:ce,getLabelProp:re}),we=function(e,t,n){if(me(J?e:e[0]),B){var r=e;if(Q&&"SHOW_ALL"!==o){var i=q(e.map((function(e){var t=ue(e);return t?t.key:e})),o,de);r=i.map((function(e){var t=ce(e);return t?t.data.value:e}))}var s=t||{triggerValue:void 0,selected:void 0},c=s.triggerValue,u=s.selected,f=ee?z(r,pe,ue,re):r;if(a){var h=xe.map((function(e){var t=ce(e);return t?t.data.value:e})).filter((function(e){return!r.includes(e)}));f=[].concat(Object(l.a)(f),Object(l.a)(z(h,pe,ue,re)))}var p={preValue:ke,triggerValue:c},m=!0;(a||"selection"===n&&!u)&&(m=!1),function(e,t,n,r,a){var i=null,o=null;function l(){o||(o=[],function e(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r.map((function(r,s){var c="".concat(a,"-").concat(s),u=n.includes(r.value),f=e(r.children||[],c,u),h=d.createElement(L,Object.assign({},r),f.map((function(e){return e.node})));if(t===r.value&&(i=h),u){var p={pos:c,node:h,children:f};return l||o.push(p),p}return null})).filter((function(e){return e}))}(r),o.sort((function(e,t){var r=e.node.props.value,a=t.node.props.value;return n.indexOf(r)-n.indexOf(a)})))}Object.defineProperty(e,"triggerNode",{get:function(){return Object(b.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),l(),i}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Object(b.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),l(),a?o:o.map((function(e){return e.node}))}})}(p,c,e,ae,m),Z?p.checked=u:p.selected=u,B(J?f:f[0],ee?null:r.map((function(e){var t=ue(e);return t?re(t.data):null})),p)}},Ce=d.useCallback((function(e){if(G){var t={};Object.defineProperty(t,"documentClickClose",{get:function(){return Object(b.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),G(e,t)}}),[G]);var Se={optionLabelProp:null,optionFilterProp:x,dropdownAlign:H,internalProps:{mark:v.a,onClear:function(){we([],null,"clear")},skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:function(e,t,n){var r=e;if(J){var a=function(e,t){var n=new Set(e);return n.add(t),Array.from(n)}(ye,e);if(Q){var i=ve(a),o=i.missingRawValues,s=i.existRawValues.map((function(e){return ue(e).key})),c=Object(m.a)(s,!0,de).checkedKeys;a=[].concat(Object(l.a)(o),Object(l.a)(c.map((function(e){return ce(e).data.value}))))}we(a,{selected:!0,triggerValue:e},n)}else we([e],{selected:!0,triggerValue:e},n);X&&X(r,t)},onRawDeselect:function(e,t,n){var r=e,a=function(e,t){var n=new Set(e);return n.delete(t),Array.from(n)}(ye,e);if(Q){var i=ve(a),o=i.missingRawValues,s=i.existRawValues.map((function(e){return ue(e).key})),c=Object(m.a)(s,{checked:!1,halfCheckedKeys:xe},de).checkedKeys;a=[].concat(Object(l.a)(o),Object(l.a)(c.map((function(e){return ce(e).data.value}))))}we(a,{selected:!1,triggerValue:e},n),Y&&Y(r,t)}}};return"filterTreeNode"in e&&(Se.filterOption=W),d.createElement(w.Provider,{value:{checkable:Z,loadData:f,treeLoadedKeys:h,onTreeLoad:U,checkedKeys:ye,halfCheckedKeys:xe,treeDefaultExpandAll:T,treeExpandedKeys:N,treeDefaultExpandedKeys:j,onTreeExpand:V,treeIcon:D,treeMotion:I,showTreeIcon:M,switcherIcon:F,treeLine:P,treeNodeFilterProp:x}},d.createElement($,Object.assign({ref:te,mode:J?"multiple":null},e,Se,{value:ke,labelInValue:!0,options:ae,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:Ce})))})),X=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=d.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 d.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),n}(d.Component);X.TreeNode=L,X.SHOW_ALL=H,X.SHOW_PARENT=B,X.SHOW_CHILD=V;var Y=X;t.e=Y},"8pgt":
|
|
|
/*!*****************************************************************************!*\
|
|
|
!*** ./src/pages/Paths/New/components/AppplySchoolModal/index.less?modules ***!
|
|
|
\*****************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flexRow:"flexRow___2kcn2",flexColumn:"flexColumn___2bS_0",formWrap:"formWrap___3t-wi",example:"example___2J2YZ",footerWrap:"footerWrap___3u6gg"}},"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,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){u.length=0,d=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(){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 g={heading:function(e){var t=h.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 C(e){return e=e.replace(b,(function(e,t){var n=x();return k[n]={type:"inline",expression:t},n}))}var S=f.listitem;f.listitem=function(e){return S(C(e))};var O=f.paragraph;f.paragraph=function(e){return O(C(e))};var E=f.tablecell;f.tablecell=function(e,t){return E(C(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:g,renderer:f});var N=s.a,j=(n("SJMd"),n("ulZh")),T=n.n(j),L=n("m3rI"),A=n("Oy/b"),D=n("p5ED"),M=/<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,h=void 0===f?{}:f,g=String(n),b=Object(i.useState)(""),y=Object(a.a)(b,2),x=y[0],C=y[1],S=Object(i.useMemo)((function(){try{g=(g=g.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+L.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+L.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+L.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=N(g),t=k;if(g.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",v()),p()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],a=r.type,i=r.expression;return Object(A.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 j()}),500),e}),[g]),O=Object(i.useRef)();function E(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),C(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 j=function(){var e,t=null===(e=O.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(T.a.isSupported()){var t=new T.a;t.loadSource(e.src),t.attachMedia(e)}}))};return Object(i.useEffect)((function(){if(O.current&&S&&S.match(M)&&window.PR.prettyPrint(),O.current)return O.current.addEventListener("click",E),function(){O.current.removeEventListener("click",E),w(),p()}}),[S,O.current,E]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{ref:O,style:Object(r.a)({},d),className:"".concat(l||""," markdown-body "),dangerouslySetInnerHTML:{__html:S}}),o.a.createElement(D.a,{close:!0,data:x,type:null!=x&&x.length?"office":"",style:Object(r.a)({},h),onClose:function(){return C("")}}))}},"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])}},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),h=f.state,p=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(h),m=p&&p.name;if(!m)return e.Pass;var v="html"==f.mode.configuration,g="object"==typeof s&&s.dontCloseTags||v&&t,b="object"==typeof s&&s.indentTags||v&&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&&p.close||d.string.indexOf("/")==u.ch-d.start-1||g&&a(g,y)>-1||i(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h)||[],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 C=l[c];r.replaceRange(C.text,o[c].head,o[c].anchor,"+insert");var S=r.listSelections().slice(0);S[c]={head:C.newPos,anchor:C.newPos},r.setSelections(S),!w&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.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),h=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var p,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)p=o+"script";else if(m&&"css"==f.mode.name)p=o+"style";else{var v=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h);if(!v||v.length&&i(t,v,v[v.length-1],u))return e.Pass;p=o+v[v.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(p+=">"),a[c]=p}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,h=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},v=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){m[" "+e]||(v.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(g,"$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,C=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},S=function(e,t,n){if(e){var r;try{r=decodeURIComponent(d(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!p.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},O={exec:function(){}},E=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},N=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},j=x,T=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},L=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")},A=r.defaults,D=j,M=N,_=k,F=T;function P(e,t,n){var r=t.href,a=t.title?_(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:_(i)}}var I=function(){function e(e){this.options=e||A}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:D(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:M(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]=M(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],h={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,v=p.length,g=0;g<v;g++)c=n=p[g],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"),"")),g!==v-1&&(a=this.rules.block.bullet.exec(p[g+1])[0],(d?1===a.length||!f&&")"===a[a.length-1]:a.length>1||this.options.smartLists&&a!==u)&&(i=p.slice(g+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-i.length),g=v-1)),o=m||/\n\n(?!\s*$)/.test(n),g!==v-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(h.loose=!0),s=void 0,(l=/^\[[ xX]\] /.test(n))&&(s=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),h.items.push({type:"list_item",raw:c,task:l,checked:s,loose:o,text:n});return h}},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]):_(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:M(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]=M(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:_(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]):_(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=F(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=_(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=_(this.options.mangle?t(a[1]):a[1])):n=_(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=_(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=_(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]):_(a[0]):a[0]:_(this.options.smartypants?n(a[0]):a[0]),{type:"text",raw:a[0],text:r}},e}(),R=O,z=C,W=E,K={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?'|\([^()]*\))/};K.def=z(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,K.item=z(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.list=z(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._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",K._comment=/<!--(?!-?>)[\s\S]*?-->/,K.html=z(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=z(K._paragraph).replace("hr",K.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",K._tag).getRegex(),K.blockquote=z(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=W({},K),K.gfm=W({},K.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*|$)"}),K.gfm.nptable=z(K.gfm.nptable).replace("hr",K.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",K._tag).getRegex(),K.gfm.table=z(K.gfm.table).replace("hr",K.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",K._tag).getRegex(),K.pedantic=W({},K.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K._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(K.normal._paragraph).replace("hr",K.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var H={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:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};H.punctuation=z(H.punctuation).replace(/punctuation/g,H._punctuation).getRegex(),H._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",H._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",H.em.start=z(H.em.start).replace(/punctuation/g,H._punctuation).getRegex(),H.em.middle=z(H.em.middle).replace(/punctuation/g,H._punctuation).replace(/overlapSkip/g,H._overlapSkip).getRegex(),H.em.endAst=z(H.em.endAst,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.em.endUnd=z(H.em.endUnd,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.strong.start=z(H.strong.start).replace(/punctuation/g,H._punctuation).getRegex(),H.strong.middle=z(H.strong.middle).replace(/punctuation/g,H._punctuation).replace(/blockSkip/g,H._blockSkip).getRegex(),H.strong.endAst=z(H.strong.endAst,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.strong.endUnd=z(H.strong.endUnd,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.blockSkip=z(H._blockSkip,"g").getRegex(),H.overlapSkip=z(H._overlapSkip,"g").getRegex(),H._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,H._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,H._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])?)+(?![-_])/,H.autolink=z(H.autolink).replace("scheme",H._scheme).replace("email",H._email).getRegex(),H._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,H.tag=z(H.tag).replace("comment",K._comment).replace("attribute",H._attribute).getRegex(),H._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,H._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,H._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,H.link=z(H.link).replace("label",H._label).replace("href",H._href).replace("title",H._title).getRegex(),H.reflink=z(H.reflink).replace("label",H._label).getRegex(),H.reflinkSearch=z(H.reflinkSearch,"g").replace("reflink",H.reflink).replace("nolink",H.nolink).getRegex(),H.normal=W({},H),H.pedantic=W({},H.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",H._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H._label).getRegex()}),H.gfm=W({},H.normal,{escape:z(H.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),H.gfm.url=z(H.gfm.url,"i").replace("email",H.gfm._extended_email).getRegex(),H.breaks=W({},H.gfm,{br:z(H.br).replace("{2,}","*").getRegex(),text:z(H.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var B={block:K,inline:H},V=r.defaults,q=B.block,U=B.inline;function $(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 G(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 X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new I,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:U.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=U.pedantic):this.options.gfm&&(t.block=q.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,G))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,G))){if(i=this.tokenizer.inlineText(e,r,$))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:q,inline:U}}}],(r=null)&&e(n.prototype,r),a&&e(n,a),t}(),Y=r.defaults,Z=S,J=k,Q=function(){function e(e){this.options=e||Y}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+J(r,!0)+'">'+(n?e:J(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:J(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=Z(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+J(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=Z(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 Q,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,h,p,m,v,g,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,h=d.start,p=d.loose,i=d.items.length,u="",r=0;r<i;r++)g=(v=d.items[r]).checked,b=v.task,m="",v.task&&(y=this.renderer.checkbox(g),p?v.tokens.length>0&&"text"===v.tokens[0].type?(v.tokens[0].text=y+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=y+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(v.tokens,p),u+=this.renderer.listitem(m,b,g);x+=this.renderer.list(u,f,h);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=E,oe=L,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=X.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=X.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 Q,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 I,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 h=d.value;de.walkTokens(h,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=Q,de.TextRenderer=ee,de.Lexer=X,de.lexer=X.lex,de.Tokenizer=I,de.Slugger=te,de.parse=de,de}()},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"),h=o.charAt(s+1)==a,p=t.listSelections(),m=s%2==0,v=0;v<p.length;v++){var g,b=p[v],y=b.head,x=t.getRange(y,n(y.line,y.ch+1));if(m&&!b.empty())g="surround";else if(!h&&m||x!=a)if(h&&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;g="addFour"}else if(h){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;g="both"}else{if(!m||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;g="both"}else g=h&&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!=g)return e.Pass}else u=g}var w=s%2?o.charAt(s-1):a,C=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]+C;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+C,null),t.triggerElectric(w+C),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/"))},GfqC:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.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("q1tI"),a=n.n(r),i=n("TSYQ"),o=n.n(i);function l(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function s(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),l(t)):e.onSuccess(l(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function d(){return"rc-upload-"+c+"-"+ ++u}var f=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=e.type||"",i=a.replace(/\/.*$/,"");return n.some((function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?i===o.replace(/\/.*$/,""):a===o}))}return!0};var h=function(e,t,n){var r=function e(r,a){a=a||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var a=Array.prototype.slice.apply(n);r=r.concat(a),!a.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+a+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},v=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){var e,n,r;b(this,t);for(var a=arguments.length,i=Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={uid:d()},r.reqs={},r.onChange=function(e){var t=e.target.files;r.uploadFiles(t),r.reset()},r.onClick=function(e){var t=r.fileInput;if(t){var n=r.props,a=n.children,i=n.onClick;a&&"button"===a.type&&(t.parentNode.focus(),t.parentNode.querySelector("button").blur()),t.click(),i&&i(e)}},r.onKeyDown=function(e){"Enter"===e.key&&r.onClick()},r.onFileDrop=function(e){var t=r.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(r.props.directory)h(Array.prototype.slice.call(e.dataTransfer.items),r.uploadFiles,(function(e){return f(e,r.props.accept)}));else{var n=Array.prototype.slice.call(e.dataTransfer.files).filter((function(e){return f(e,r.props.accept)}));!1===t&&(n=n.slice(0,1)),r.uploadFiles(n)}},r.uploadFiles=function(e){var t=Array.prototype.slice.call(e);t.map((function(e){return e.uid=d(),e})).forEach((function(e){r.upload(e,t)}))},r.saveFileInput=function(e){r.fileInput=e},y(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),v(t,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(e,t){var n=this,r=this.props;if(!r.beforeUpload)return setTimeout((function(){return n.post(e)}),0);var a=r.beforeUpload(e,t);a&&a.then?a.then((function(t){var r=Object.prototype.toString.call(t);return"[object File]"===r||"[object Blob]"===r?n.post(t):n.post(e)})).catch((function(e){console.log(e)})):!1!==a&&setTimeout((function(){return n.post(e)}),0)}},{key:"post",value:function(e){var t=this;if(this._isMounted){var n=this.props,r=n.onStart,a=n.onProgress,i=n.transformFile,o=void 0===i?function(e){return e}:i;new Promise((function(t){var r=n.action;return"function"==typeof r&&(r=r(e)),t(r)})).then((function(i){var l=e.uid,c=n.customRequest||s;Promise.resolve(o(e)).then((function(e){var t=n.data;return"function"==typeof t&&(t=t(e)),Promise.all([e,t])})).catch((function(e){console.error(e)})).then((function(o){var s=m(o,2),u=s[0],d=s[1],f={action:i,filename:n.name,data:d,file:u,headers:n.headers,withCredentials:n.withCredentials,method:n.method||"post",onProgress:a?function(t){a(t,e)}:null,onSuccess:function(r,a){delete t.reqs[l],n.onSuccess(r,e,a)},onError:function(r,a){delete t.reqs[l],n.onError(r,a,e)}};r(e),t.reqs[l]=c(f)}))}))}}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e;e&&e.uid&&(n=e.uid),t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e,t,n=this.props,r=n.component,i=n.prefixCls,l=n.className,s=n.disabled,c=n.id,u=n.style,d=n.multiple,f=n.accept,h=n.children,m=n.directory,v=n.openFileDialogOnClick,b=n.onMouseEnter,y=n.onMouseLeave,x=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),k=o()((g(e={},i,!0),g(e,i+"-disabled",s),g(e,l,l),e)),w=s?{}:{onClick:v?this.onClick:function(){},onKeyDown:v?this.onKeyDown:function(){},onMouseEnter:b,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return a.a.createElement(r,p({},w,{className:k,role:"button",style:u}),a.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:f,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:d,onChange:this.onChange})),h)}}]),t}(r.Component),k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function O(){}var E=function(e){function t(){var e,n,r;C(this,t);for(var a=arguments.length,i=Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=r=S(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.saveUploader=function(e){r.uploader=e},S(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),w(t,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return a.a.createElement(x,k({},this.props,{ref:this.saveUploader}))}}]),t}(r.Component);E.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:O,onError:O,onSuccess:O,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var N=E;t.a=N},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}},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){},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 C}));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"),h=n("YrtM"),p=n("TSYQ"),m=n.n(p),v=n("+nKL"),g=n("8OUc"),b=l.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,a=e.flattenOptions,i=e.childrenAsData,o=e.values,p=e.searchValue,b=e.multiple,y=e.defaultActiveFirstOption,x=e.height,k=e.itemHeight,w=e.notFoundContent,C=e.open,S=e.menuItemSelectedIcon,O=e.virtual,E=e.onSelect,N=e.onToggleOpen,j=e.onActiveValue,T=e.onScroll,L=e.onMouseEnter,A="".concat(n,"-item"),D=Object(h.a)((function(){return a}),[C,a],(function(e,t){return t[0]&&e[1]!==t[1]})),M=l.useRef(null),_=function(e){e.preventDefault()},F=function(e){M.current&&M.current.scrollTo({index:e})},P=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=D.length,r=0;r<n;r+=1){var a=(e+r*t+n)%n,i=D[a],o=i.group,l=i.data;if(!o&&!l.disabled)return a}return-1},I=l.useState((function(){return P(0)})),R=Object(u.a)(I,2),z=R[0],W=R[1],K=function(e){W(e);var t=D[e];t?j(t.data.value,e):j(null,-1)};l.useEffect((function(){K(!1!==y?P(0):-1)}),[D.length,p]),l.useEffect((function(){var e=setTimeout((function(){if(!b&&C&&1===o.size){var e=Array.from(o)[0],t=D.findIndex((function(t){return t.data.value===e}));K(t),F(t)}}));return function(){return clearTimeout(e)}}),[C]);var H=function(e){void 0!==e&&E(e,{selected:!o.has(e)}),b||N(!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);F(r),K(r)}break;case d.a.ENTER:var a=D[z];a&&!a.data.disabled?H(a.data.value):H(void 0),C&&e.preventDefault();break;case d.a.ESC:N(!1)}},onKeyUp:function(){},scrollTo:function(e){F(e)}}})),0===D.length)return l.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(A,"-empty"),onMouseDown:_},w);function B(e){var t=D[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"}},B(z-1),B(z),B(z+1)),l.createElement(v.a,{itemKey:"key",ref:M,data:D,height:x,itemHeight:k,fullHeight:!1,onMouseDown:_,onScroll:T,virtual:O,onMouseEnter:L},(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()(A,"".concat(A,"-group"))},void 0!==d?d:f);var h=u.disabled,p=u.value,v=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(p),C="".concat(A,"-option"),O=m()(A,C,x,(n={},Object(s.a)(n,"".concat(C,"-grouped"),a),Object(s.a)(n,"".concat(C,"-active"),z===t&&!h),Object(s.a)(n,"".concat(C,"-disabled"),h),Object(s.a)(n,"".concat(C,"-selected"),w),n)),E=i?b:d,N=!S||"function"==typeof S||w;return l.createElement("div",Object.assign({},k,{"aria-selected":w,className:O,title:v,onMouseMove:function(){z===t||h||K(t)},onClick:function(){h||H(p)},style:y}),l.createElement("div",{className:"".concat(C,"-content")},E||p),l.isValidElement(S)||w,N&&l.createElement(g.a,{className:"".concat(A,"-option-state"),customizeIcon:S,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 C=w,S=n("VTBJ"),O=n("Zm9Q");function E(e){var t=e.key,n=e.props,r=n.children,a=n.value,i=Object(c.a)(n,["children","value"]);return Object(S.a)({key:t,value:void 0!==a?a:t,children:r},i)}function N(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(O.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?E(e):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},s),{},{options:N(o)})})).filter((function(e){return e}))}var j=n("2Qr1"),T=n("qNPg"),L=n("U8pU"),A=n("Kwbf"),D=n("WKfj");var M=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,h=e.labelInValue,p=e.value,m=e.inputValue,v=e.optionLabelProp,g="multiple"===t||"tags"===t,b=void 0!==c?c:g||"combobox"===t,y=n||N(r);if(Object(A.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(A.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(A.a)("combobox"!==t||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(A.a)("combobox"===t||!a,"`backfill` only works with `combobox` mode."),Object(A.a)("combobox"===t||!s,"`getInputElement` only work with `combobox` mode."),Object(A.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(A.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(A.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!=p){var k=Object(D.d)(p);Object(A.a)(!h||k.every((function(e){return"object"===Object(L.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(A.a)(!g||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var w=null;Object(O.a)(r).some((function(e){if(!l.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(O.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(A.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(w.displayName||w.name||w,"`.")),Object(A.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},_=Object(T.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:N,flattenOptions:j.d,getLabeledValue:j.e,filterOptions:j.b,isValueDisabled:j.g,findValueOption:j.c,warningProps:M,fillOptionsWithMissingValue:j.a}),F=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(_,Object.assign({ref:this.selectRef},this.props))}}]),n}(l.Component);F.Option=k,F.OptGroup=C;var P=F;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)}},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,h=void 0===f?0:f,p=e.mouseLeaveDelay,m=void 0===p?.1:p,v=e.overlayStyle,g=e.prefixCls,b=void 0===g?"rc-tooltip":g,y=e.children,x=e.onVisibleChange,k=e.afterVisibleChange,w=e.transitionName,C=e.animation,S=e.placement,O=void 0===S?"right":S,E=e.align,N=void 0===E?{}:E,j=e.destroyTooltipOnHide,T=void 0!==j&&j,L=e.defaultVisible,A=e.getTooltipContainer,D=e.overlayInnerStyle,M=Object(i.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),_=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return _.current}));var F=Object(a.a)({},M);"visible"in e&&(F.popupVisible=e.visible);var P=!1,I=!1;if("boolean"==typeof T)P=T;else if(T&&"object"===Object(r.a)(T)){var R=T.keepParent;P=!0===R,I=!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:D})]},action:d,builtinPlacements:s.a,popupPlacement:O,ref:_,popupAlign:N,getPopupContainer:A,onPopupVisibleChange:x,afterPopupVisibleChange:k,popupTransitionName:w,popupAnimation:C,defaultPopupVisible:L,destroyPopupOnHide:P,autoDestroy:I,mouseLeaveDelay:m,popupStyle:v,mouseEnterDelay:h},F),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 h})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return v}));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 h(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(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 v(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"),h=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),p=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"),v=(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 g(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(v,[{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(g,Object(m.a)({},e,{onActionCallback:r})):c.a.createElement("span",{className:"v-line"}))})),n?c.a.createElement("li",null,c.a.createElement(g,{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(g,{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(g,{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")),C={labelCol:{span:4},wrapperCol:{span:20}},S=function(e){var t=e.callback,n=e.onCancel;return c.a.createElement(k.a,Object(m.a)({},C,{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},"取消")))},O=n("7ahc"),E=(n("HmJG"),n("BjJ7")),N=k.a.useForm,j={width:280,marginRight:10},T={labelCol:{span:5},wrapperCol:{span:19}},L=function(e){var t=e.callback,n=e.onCancel,r=N(),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},T,{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:j})),c.a.createElement(A,{onFileChange:function(e){D(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 A(e){var t=e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"本地上传",c.a.createElement("input",{type:"file",onChange:t}))}function D(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(E.a,"/api/attachments.json")),r.send(n)}n("giR+");var M,_,F=n("fyUT"),P=(n("7Kak"),n("9yH6")),I=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(F.a,null)),c.a.createElement("span",{style:R},"列数"),c.a.createElement(k.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},c.a.createElement(F.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(I,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},"取消")))},W=n("m3rI"),K="------------",H={default:K,left:":".concat(K),center:":".concat(K,":"),right:"".concat(K,":")},B=n("9VGf");function V(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",U=(M={},Object(l.a)(M,q+"-B","bold"),Object(l.a)(M,q+"-I","italic"),M),$=(_={},Object(l.a)(_,"link","添加链接"),Object(l.a)(_,"code-block","添加代码块"),Object(l.a)(_,"upload-image","添加图片"),Object(l.a)(_,"add-table","添加表格"),_);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,u=e.onChange,m=e.width,v=void 0===m?"100%":m,g=e.height,x=void 0===g?400:g,k=e.miniToolbar,w=void 0!==k&&k,C=e.isFocus,E=void 0!==C&&C,N=e.watch,j=e.insertTemp,T=e.mode,A=void 0===T?"markdown":T,M=e.id,_=void 0===M?"markdown-editor-id":M,F=e.showResizeBar,P=void 0!==F&&F,I=e.noStorage,R=void 0!==I&&I,K=e.showNullButton,q=void 0!==K&&K,G=e.hidetoolBar,X=void 0!==G&&G,Y=e.fullScreen,Z=void 0!==Y&&Y,J=e.onBlur,Q=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],he=Object(s.useState)(n),pe=Object(o.a)(he,2),me=pe[0],ve=pe[1],ge=Object(s.useState)(N),be=Object(o.a)(ge,2),ye=be[0],xe=be[1],ke=Object(s.useState)(Z),we=Object(o.a)(ke,2),Ce=we[0],Se=we[1],Oe=Object(s.useState)(""),Ee=Object(o.a)(Oe,2),Ne=Ee[0],je=Ee[1],Te=Object(s.useState)(0),Le=Object(o.a)(Te,2),Ae=Le[0],De=Le[1],Me=Object(s.useState)(x),_e=Object(o.a)(Me,2),Fe=_e[0],Pe=_e[1],Ie=Object(s.useState)(!1),Re=Object(o.a)(Ie,2),ze=(Re[0],Re[1]),We=Object(s.useRef)(),Ke=Object(s.useRef)(),He=Object(s.useRef)(),Be=Object(s.useRef)();Object(s.useEffect)((function(){ve(se),null==de||de.setValue(se)}),[se]),Object(s.useEffect)((function(){null==ee||ee(Ce)}),[Ce]),Object(s.useEffect)((function(){if(We.current){var e=d.a.fromTextArea(We.current,{mode:A,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"==A)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();D(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(W.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(W.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(W.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(u.name,"</a>")):e.replaceSelection("[".concat(u.name,"](").concat(W.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 E&&e.focus(),e.on("paste",t),fe(e),function(){e.off("paste",t)}}}),[]);var Ve=Object(s.useCallback)((function(){Ke.current}),[Fe,Ke,Ce]);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)&&(Ve(),de.setSize("100%","100%"),de.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(We.current.parentElement),e}();return function(){e.unobserve(We.current.parentElement)}}}),[de,Ve]),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(){qe(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(){Z!==Ce&&Se(Z)}),[Z]),Object(B.a)((function(){if(!R&&Ae>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(_);e>=Ae+1e4&&(!t||t!==me)&&(window.sessionStorage.setItem(_,me),ze(!0))}}),1e4),Object(s.useEffect)((function(){xe(N)}),[de,N]),Object(s.useEffect)((function(){de&&E&&de.focus()}),[de,E]),Object(s.useEffect)((function(){if(ye&&de){var e=de.getScrollerElement();function t(e){var t=e.target;if(Be.current){var n=t.scrollTop/t.scrollHeight;Be.current.scrollTop=Be.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[de,ye]),Object(s.useEffect)((function(){if(de&&Q){function e(e,t){Q(e,t)}return de.on("beforeChange",e),function(){de.off("beforeChange",e)}}}),[de,Q]),Object(s.useEffect)((function(){if(de&&J){function e(){J(de.getValue())}return de.on("blur",e),function(){de.off("blur",e)}}}),[de,J]),Object(s.useEffect)((function(){if(de){function e(e){var t=e.getValue();ve(t),De((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(""),ve("")):n!==de.getValue()&&(de.setValue(n),ve(n),de.setCursor(de.lineCount(),0)))}),[de,n]);var qe=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 Se(!Ce),de.focus();case"link":return void je("link");case"code-block":return void je("code-block");case"upload-image":return void je("upload-image");case"add-table":return void je("add-table");default:throw new Error}}),[de,ye,Ce]),Ue=Object(s.useCallback)((function(e){switch(je(""),Ne){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=[],h=[],p=0;p<s;p++)1===d&&h.push(H[c]),f.push(" ");1===d&&(u+="| ".concat(h.join(" | ")," |\n")),u+="| ".concat(f.join(1===s?"":" | ")," |\n")}return de.replaceSelection(u+"\n"),de.focus();default:throw new Error}}),[de,Ne]),$e=Object(s.useMemo)((function(){switch(Ne){case"link":return c.a.createElement(S,{callback:Ue,onCancel:Ge});case"code-block":return c.a.createElement(O.b,{callback:Ue,onCancel:Ge});case"upload-image":return c.a.createElement(L,{callback:Ue,onCancel:Ge});case"add-table":return c.a.createElement(z,{callback:Ue,onCancel:Ge});default:return null}}),[Ne]);function Ge(){je("")}Object(s.useEffect)((function(){if(He.current){var e=He.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,He]),Object(s.useEffect)((function(){Pe(x)}),[x]);var Xe={width:V(v),height:V(Fe)};Object(s.useMemo)((function(){if(Ae){var e=new Date(Ae),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}),[Ae]);return c.a.createElement(s.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ke},c.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(ye?"on-preview":""," ").concat(w?"mini":""," ").concat(Ce?"full-screen":""),style:Xe},c.a.createElement(b,{insertTemp:j,watch:ye,fullScreen:Ce,showNullButton:q,onActionCallback:qe,hidetoolBar:X}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:We,placeholder:oe})),ye?c.a.createElement("div",{ref:Be,className:"preview-container"},"stex"===A&&c.a.createElement(p,{value:me}),"stex"!==A&&c.a.createElement(h.a,{value:me})):null))),P?c.a.createElement("a",{ref:He,className:"editor-resize"}):null,c.a.createElement(y.a,null,$[Ne]?c.a.createElement(r.a,{centered:!0,title:$[Ne],visible:!0,onCancel:Ge,footer:null},$e):null))}},RxwV:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-cascader/es/index.js + 4 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/array-tree-filter/lib/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),a=n("uciX"),i=n("2W6z"),o=n.n(i),l=n("4IlW"),s=n("uK0f"),c=n.n(s);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(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=v(e);if(t){var a=v(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g,b=((g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(o,e);var t,n,a,i=p(o);function o(){var e;return d(this,o),(e=i.apply(this,arguments)).menuItems={},e.saveMenuItem=function(t){return function(n){e.menuItems[t]=n}},e}return t=o,(n=[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(e){!e.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(e){var t=this.props,n=t.fieldNames,r=t.defaultFieldNames;return n[e]||r[e]}},{key:"getOption",value:function(e,t){var n=this.props,a=n.prefixCls,i=n.expandTrigger,o=n.expandIcon,l=n.loadingIcon,s=this.props.onSelect.bind(this,e,t),c={onClick:s,onDoubleClick:this.props.onItemDoubleClick.bind(this,e,t)},u="".concat(a,"-menu-item"),d=null,f=e[this.getFieldName("children")]&&e[this.getFieldName("children")].length>0;(f||!1===e.isLeaf)&&(u+=" ".concat(a,"-menu-item-expand"),e.loading||(d=r.createElement("span",{className:"".concat(a,"-menu-item-expand-icon")},o))),"hover"!==i||!f&&!1!==e.isLeaf||(c={onMouseEnter:this.delayOnSelect.bind(this,s),onMouseLeave:this.delayOnSelect.bind(this),onClick:s}),this.isActiveOption(e,t)&&(u+=" ".concat(a,"-menu-item-active"),c.ref=this.saveMenuItem(t)),e.disabled&&(u+=" ".concat(a,"-menu-item-disabled"));var h=null;e.loading&&(u+=" ".concat(a,"-menu-item-loading"),h=l||null);var p="";return"title"in e?p=e.title:"string"==typeof e[this.getFieldName("label")]&&(p=e[this.getFieldName("label")]),r.createElement("li",Object.assign({key:e[this.getFieldName("value")],className:u,title:p},c,{role:"menuitem",onMouseDown:function(e){return e.preventDefault()}}),e[this.getFieldName("label")],d,h)}},{key:"getActiveOptions",value:function(e){var t=this,n=this.props.options,r=e||this.props.activeValue;return c()(n,(function(e,n){return e[t.getFieldName("value")]===r[n]}),{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var e=this,t=this.props.options,n=this.getActiveOptions().map((function(t){return t[e.getFieldName("children")]})).filter((function(e){return!!e}));return n.unshift(t),n}},{key:"delayOnSelect",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),"function"==typeof e&&(this.delayTimer=window.setTimeout((function(){e(r),t.delayTimer=null}),150))}},{key:"scrollActiveItemToView",value:function(){for(var e=this.getShowOptions().length,t=0;t<e;t++){var n=this.menuItems[t];n&&n.parentElement&&(n.parentElement.scrollTop=n.offsetTop)}}},{key:"isActiveOption",value:function(e,t){var n=this.props.activeValue;return(void 0===n?[]:n)[t]===e[this.getFieldName("value")]}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.dropdownMenuColumnStyle;return r.createElement("div",null,this.getShowOptions().map((function(t,i){return r.createElement("ul",{className:"".concat(n,"-menu"),key:i,style:a},t.map((function(t){return e.getOption(t,i)})))})))}}])&&f(t.prototype,n),a&&f(t,a),o}(r.Component)).defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},g),y={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}};function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function w(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(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 S(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 O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(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=j(e);if(t){var a=j(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T,L=((T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(u,e);var t,n,i,s=E(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=s.call(this,e)).setPopupVisible=function(e){var n=t.state.value;"popupVisible"in t.props||t.setState({popupVisible:e}),e&&!t.state.popupVisible&&t.setState({activeValue:n}),t.props.onPopupVisibleChange(e)},t.handleChange=function(e,n,r){var a=n.visible;"keydown"===r.type&&r.keyCode!==l.a.ENTER||(t.props.onChange(e.map((function(e){return e[t.getFieldName("value")]})),e),t.setPopupVisible(a))},t.handlePopupVisibleChange=function(e){t.setPopupVisible(e)},t.handleMenuSelect=function(e,n,r){var a=t.trigger.getRootDomNode();a&&a.focus&&a.focus();var i=t.props,o=i.changeOnSelect,s=i.loadData,c=i.expandTrigger;if(e&&!e.disabled){var u=t.state.activeValue;(u=u.slice(0,n+1))[n]=e[t.getFieldName("value")];var d=t.getActiveOptions(u);if(!1===e.isLeaf&&!e[t.getFieldName("children")]&&s)return o&&t.handleChange(d,{visible:!0},r),t.setState({activeValue:u}),void s(d);var f={};e[t.getFieldName("children")]&&e[t.getFieldName("children")].length?!o||"click"!==r.type&&"keydown"!==r.type||("hover"===c?t.handleChange(d,{visible:!1},r):t.handleChange(d,{visible:!0},r),f.value=u):(t.handleChange(d,{visible:!1},r),f.value=u),f.activeValue=u,("value"in t.props||"keydown"===r.type&&r.keyCode!==l.a.ENTER)&&delete f.value,t.setState(f)}},t.handleItemDoubleClick=function(){t.props.changeOnSelect&&t.setPopupVisible(!1)},t.handleKeyDown=function(e){var n=t.props.children;if(n&&n.props.onKeyDown)n.props.onKeyDown(e);else{var r=w(t.state.activeValue),a=r.length-1<0?0:r.length-1,i=t.getCurrentLevelOptions(),o=i.map((function(e){return e[t.getFieldName("value")]})).indexOf(r[a]);if(e.keyCode===l.a.DOWN||e.keyCode===l.a.UP||e.keyCode===l.a.LEFT||e.keyCode===l.a.RIGHT||e.keyCode===l.a.ENTER||e.keyCode===l.a.SPACE||e.keyCode===l.a.BACKSPACE||e.keyCode===l.a.ESC||e.keyCode===l.a.TAB)if(t.state.popupVisible||e.keyCode===l.a.BACKSPACE||e.keyCode===l.a.LEFT||e.keyCode===l.a.RIGHT||e.keyCode===l.a.ESC||e.keyCode===l.a.TAB){if(e.keyCode===l.a.DOWN||e.keyCode===l.a.UP){e.preventDefault();var s=o;s=-1!==s?e.keyCode===l.a.DOWN?(s+=1)>=i.length?0:s:(s-=1)<0?i.length-1:s:0,r[a]=i[s][t.getFieldName("value")]}else if(e.keyCode===l.a.LEFT||e.keyCode===l.a.BACKSPACE)e.preventDefault(),r.splice(r.length-1,1);else if(e.keyCode===l.a.RIGHT)e.preventDefault(),i[o]&&i[o][t.getFieldName("children")]&&r.push(i[o][t.getFieldName("children")][0][t.getFieldName("value")]);else if(e.keyCode===l.a.ESC||e.keyCode===l.a.TAB)return void t.setPopupVisible(!1);r&&0!==r.length||t.setPopupVisible(!1);var c=t.getActiveOptions(r),u=c[c.length-1];t.handleMenuSelect(u,c.length-1,e),t.props.onKeyDown&&t.props.onKeyDown(e)}else t.setPopupVisible(!0)}},t.saveTrigger=function(e){t.trigger=e};var n=[];return"value"in e?n=e.value||[]:"defaultValue"in e&&(n=e.defaultValue||[]),o()(!("filedNames"in e),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),t.state={popupVisible:e.popupVisible,activeValue:n,value:n,prevProps:e},t.defaultFieldNames={label:"label",value:"value",children:"children"},t}return t=u,i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"value"in e&&!function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}((void 0===n?{}:n).value,e.value)&&(r.value=e.value||[],"loadData"in e||(r.activeValue=e.value||[])),"popupVisible"in e&&(r.popupVisible=e.popupVisible),r}}],(n=[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(e){var t=this.defaultFieldNames,n=this.props,r=n.fieldNames,a=n.filedNames;return"filedNames"in this.props?a[e]||t[e]:r[e]||t[e]}},{key:"getFieldNames",value:function(){var e=this.props,t=e.fieldNames,n=e.filedNames;return"filedNames"in this.props?n:t}},{key:"getCurrentLevelOptions",value:function(){var e=this,t=this.props.options,n=void 0===t?[]:t,r=this.state.activeValue,a=void 0===r?[]:r,i=c()(n,(function(t,n){return t[e.getFieldName("value")]===a[n]}),{childrenKeyName:this.getFieldName("children")});return i[i.length-2]?i[i.length-2][this.getFieldName("children")]:w(n).filter((function(e){return!e.disabled}))}},{key:"getActiveOptions",value:function(e){var t=this;return c()(this.props.options||[],(function(n,r){return n[t.getFieldName("value")]===e[r]}),{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.transitionName,i=e.popupClassName,o=e.options,l=void 0===o?[]:o,s=e.disabled,c=e.builtinPlacements,u=e.popupPlacement,d=e.children,f=e.dropdownRender,h=k(e,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),p=r.createElement("div",null),m="";l&&l.length>0?p=r.createElement(b,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):m=" ".concat(t,"-menus-empty");var v=p;return f&&(v=f(p)),r.createElement(a.a,Object.assign({ref:this.saveTrigger},h,{popupPlacement:u,builtinPlacements:c,popupTransitionName:n,action:s?[]:["click"],popupVisible:!s&&this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(t,"-menus"),popupClassName:i+m,popup:v}),r.cloneElement(d,{onKeyDown:this.handleKeyDown,tabIndex:s?void 0:0}))}}])&&S(t.prototype,n),i&&S(t,i),u}(r.Component)).defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:y,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},T);t.a=L},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 h=/\S/;function p(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&&h.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],h=""+f;o.hasOwnProperty(h)||(i.push(f),o[h]=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=[],h=[];for(i=0;i<n.length;++i){(p=n[i])[0]<=h[1]+1?h[1]=Math.max(h[1],p[1]):f.push(h=p)}for(i=0;i<f.length;++i){var p=f[i];a.push(s(p[0])),p[1]>p[0]&&(p[1]+1>p[0]&&a.push("-"),a.push(s(p[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)||[],h={},p=0,m=d.length;p<m;++p){var v,g=d[p],b=h[g],y=void 0;if("string"==typeof b)v=!1;else{var x=r[g.charAt(0)];if(x)y=g.match(x[1]),b=x[0];else{for(var w=0;w<a;++w)if(x=t[w],y=g.match(x[1])){b=x[0];break}y||(b="pln")}!(v=b.length>=5&&"lang-"===b.substring(0,5))||y&&"string"==typeof y[1]||(v=!1,b="src"),v||(h[g]=b)}var C=u;if(u+=g.length,v){var S=y[1],O=g.indexOf(S),E=O+S.length;y[2]&&(O=(E=g.length-y[2].length)-S.length);var N=b.substring(5);f(s,l+C,g.substring(0,O),i,c),f(s,l+C+O,S,k(N,S),c),f(s,l+C+E,g.substring(E),i,c)}else c.push(l+C,b)}e.decorations=c};return i}function v(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 g=v({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,h=(u=0,l.length);u<h;++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,h=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 p=d[r],m=d[r+1],v=r+2;v+2<=f&&d[v+1]===m;)v+=2;d[n++]=p,d[n++]=m,r=v}f=d.length=n;var g=e.sourceNode,b="";g&&(b=g.style.display,g.style.display="none");try{for(;u<c;){s[u];var y,x=s[u+2]||o,k=d[h+2]||o,w=(v=Math.min(x,k),s[u+1]);if(1!==w.nodeType&&(y=i.substring(l,v))){t&&(y=y.replace(a,"\r")),w.nodeValue=y;var C=w.ownerDocument,S=C.createElement("span");S.className=d[h+1];var O=w.parentNode;O.replaceChild(S,w),S.appendChild(w),l<x&&(s[u+1]=w=C.createTextNode(i.substring(v,x)),O.insertBefore(w,S.nextSibling))}(l=v)>=x&&(u+=2),l>=k&&(h+=2)}}finally{g&&(g.style.display=b)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function C(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 S(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,h=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,v=/\bprettyprinted\b/,g=/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 C=i.className;if((o!==k||m.test(C))&&!v.test(C)){for(var S=!1,O=i.parentNode;O;O=O.parentNode){var E=O.tagName;if(x.test(E)&&O.className&&m.test(O.className)){S=!0;break}}if(!S){i.className+=" prettyprinted";var N,j,T=o.lang;if(!T)!(T=C.match(h))&&(N=p(i))&&y.test(N.tagName)&&(T=N.className.match(h)),T&&(T=T[1]);if(g.test(i.tagName))j=1;else{var L=i.currentStyle,A=a.defaultView,D=L?L.whiteSpace:A&&A.getComputedStyle?A.getComputedStyle(i,null).getPropertyValue("white-space"):0;j=D&&"pre"===D.substring(0,3)}var M=o.linenums;(M="true"===M||+M)||(M=!!(M=C.match(/\blinenums\b(?::(\d+))?/))&&(!M[1]||!M[1].length||+M[1])),M&&b(i,M,j),w({langExtension:T,sourceNode:i,numberLines:M,pre:j,sourceCode:null,basePos:null,spans:null,decorations:null})}}}f<l.length?e.setTimeout(n,250):"function"==typeof t&&t()}()}x(g,["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(v({keywords:r,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),x(v({keywords:"null,true,false"}),["json"]),x(v({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),x(v({keywords:a,cStyleComments:!0}),["java"]),x(v({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(v({keywords:s,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(v({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(v({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(v({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(v({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 O=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:v,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:C,prettyPrint:S},E=e.define;"function"==typeof E&&E.amd&&E("google-code-prettify",[],(function(){return O}))}()},"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),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/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)),C=n||o&&l>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var O,E=function(e,t){var n=e.className,r=S(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 N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return N(e).appendChild(t)}function T(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 L(e,t,n,r){var a=T(e,t,n,r);return a.setAttribute("role","presentation"),a}function A(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 D(){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 M(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function _(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}O=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 F=function(e){e.select()};function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(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?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(F=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 W(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 K={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},B={origin:"*mouse"},V={origin:"+move"};function q(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 $(e){for(;U.length<=e;)U.push(G(U)+" ");return U[e]}function G(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(){}function Z(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&I(t,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(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 h=0,p=s;h<u;++h){var m=d[h];"m"==m?d[h]=p:p=m}for(var v=0,g=s;v<u;++v){var b=d[v];"1"==b&&"r"==g?d[v]="n":n.test(b)&&(g=b,"r"==b&&(d[v]="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 C=d[w];if(","==C)d[w]="N";else if("%"==C){var S=void 0;for(S=w+1;S<u&&"%"==d[S];++S);for(var O=w&&"!"==d[w-1]||S<u&&"1"==d[S]?"1":"N",E=w;E<S;++E)d[E]=O;w=S-1}}for(var N=0,j=s;N<u;++N){var T=d[N];"L"==j&&"1"==T?d[N]="L":n.test(T)&&(j=T)}for(var L=0;L<u;++L)if(t.test(d[L])){var A=void 0;for(A=L+1;A<u&&t.test(d[A]);++A);for(var D="L"==(L?d[L-1]:s),M=D==("L"==(A<u?d[A]:s))?D?"L":"R":s,_=L;_<A;++_)d[_]=M;L=A-1}for(var F,P=[],I=0;I<u;)if(r.test(d[I])){var R=I;for(++I;I<u&&r.test(d[I]);++I);P.push(new i(0,R,I))}else{var z=I,W=P.length,K="rtl"==l?1:0;for(++I;I<u&&"L"!=d[I];++I);for(var H=z;H<I;)if(a.test(d[H])){z<H&&(P.splice(W,0,new i(1,z,H)),W+=K);var B=H;for(++H;H<I&&a.test(d[H]);++H);P.splice(W,0,new i(2,B,H)),W+=K,z=H}else++H;z<I&&P.splice(W,0,new i(1,z,I))}return"ltr"==l&&(1==P[0].level&&(F=o.match(/^\s+/))&&(P[0].from=F[0].length,P.unshift(new i(0,0,F[0].length))),1==G(P).level&&(F=o.match(/\s+$/))&&(G(P).to-=F[0].length,P.push(new i(0,u-F[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 he(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=W(a,n);i>-1&&(r[t]=a.slice(0,i).concat(a.slice(i+1)))}}}function pe(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}}),pe(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ve(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==W(n,t[r])&&n.push(t[r])}function ge(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){he(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 Ce(e){return e.target||e.srcElement}function Se(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 Oe,Ee,Ne=function(){if(o&&l<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function je(e){if(null==Oe){var t=T("span","");j(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&l<8))}var n=Oe?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Ee)return Ee;var t=j(e,document.createTextNode("AخA")),n=O(t,0,1).getBoundingClientRect(),r=O(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Ee=r.right-n.right<3)}var Le,Ae=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/)},De=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)},Me="oncopy"in(Le=T("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),_e=null,Fe={},Pe={};function Ie(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[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=Z(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=Fe[t.name];if(!n)return ze(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var a=We[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 We={};function Ke(e,t){I(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function He(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 Be(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 Ve(e,t,n){return!e.startState||e.startState(t,n)}var qe=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 $e(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 Ge(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Xe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(null==e.parent)return null;for(var t=e.parent,n=W(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 Ze(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 Je(e,t){return t>=e.first&&t<e.first+e.size}function Qe(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}qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.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},qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.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)},qe.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},qe.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},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.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=ht(e,Ye(t)),a=t.text.length>e.options.maxHighlightLength&&He(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 ht(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,Ve(r.mode),i);return r.iter(i,t,(function(n){pt(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 pt(e,t,n,r){var a=e.doc.mode,i=new qe(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&mt(a,n.state);!i.eol();)vt(a,i,n.state),i.start=i.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Be(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function vt(e,t,n,r){for(var a=0;a<10;a++){r&&(r[0]=Be(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,He(e.mode,t.state),n,t.lookAhead):new ut(e,He(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var gt=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=ht(e,t.line,n),u=new qe(s.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=vt(l,u,c.state),r&&i.push(new gt(u,a,He(o.mode,c.state)));return r?i:new gt(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 qe(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&&pt(e,t,r,d.pos),d.pos=t.length,s=null):s=yt(vt(n,d,r.state,f),i),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}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 p=Math.min(d.pos,c+5e3);a(p,u),c=p}}var kt=!1,wt=!1;function Ct(e,t,n){this.marker=e,this.from=t,this.to=n}function St(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ot(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Et(e,t){if(t.full)return null;var n=Je(e,t.from.line)&&Ue(e,t.from.line).markedSpans,r=Je(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 Ct(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 Ct(o,l?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,o),c=1==t.text.length,u=G(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 h=St(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=a}}if(s)for(var p=0;p<s.length;++p){var m=s[p];null!=m.to&&(m.to+=u),null==m.from?St(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m)):(m.from+=u,c&&(l||(l=[])).push(m))}l&&(l=Nt(l)),s&&s!=l&&(s=Nt(s));var v=[l];if(!c){var g,b=t.text.length-2;if(b>0&&l)for(var y=0;y<l.length;++y)null==l[y].to&&(g||(g=[])).push(new Ct(l[y].marker,null,null));for(var x=0;x<b;++x)v.push(g);v.push(s)}return v}function Nt(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 jt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Lt(e){return e.inclusiveLeft?-1:0}function At(e){return e.inclusiveRight?1:0}function Dt(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)||Lt(e)-Lt(t);if(i)return-i;var o=tt(r.to,a.to)||At(e)-At(t);return o||t.id-e.id}function Mt(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||Dt(n,a.marker)<0)&&(n=a.marker);return n}function _t(e){return Mt(e,!0)}function Ft(e){return Mt(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||Dt(n,i.marker)<0)&&(n=i.marker)}return n}function It(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)||Lt(s.marker)-Lt(a),d=tt(c.to,r)||At(s.marker)-At(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=_t(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:Ye(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=Ue(e,t);if(!Kt(e,r))return t;for(;n=Ft(r);)r=n.find(1,!0).line;return Ye(r)+1}function Kt(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&&Ht(e,t,r))return!0}}function Ht(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ht(e,r.line,St(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)&&Ht(e,t,a))return!0}function Bt(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 Vt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=_t(r);){var a=t.find(0,!0);r=a.from.line,n+=a.from.ch-a.to.ch}for(r=e;t=Ft(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 qt(e){var t=e.display,n=e.doc;t.maxLine=Ue(n,n.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Vt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Ut=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function $t(e){e.parent=null,jt(e)}Ut.prototype.lineNo=function(){return Ye(this)},be(Ut);var Gt={},Xt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xt:Gt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var n=L("span",null,null,s?"padding-right: .1px":null),r={pre:L("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=Qt,Te(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&&Ye(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=_(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=_(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(je(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 pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Jt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(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 h=0;;){d.lastIndex=h;var p=d.exec(t),m=p?p.index-h:t.length-h;if(m){var v=document.createTextNode(u.slice(h,h+m));o&&l<9?c.appendChild(T("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!p)break;h+=m+1;var g=void 0;if("\t"==p[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(g=c.appendChild(T("span",$(y),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=y}else"\r"==p[0]||"\n"==p[0]?((g=c.appendChild(T("span","\r"==p[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),o&&l<9?c.appendChild(T("span",[g])):c.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),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=T("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,h=a.length,p=0,m=1,v="",g=0;;){if(g==p){s=c=u=l="",f=null,d=null,g=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==p&&w.widgetNode)b.push(w);else if(k.from<=p&&(null==k.to||k.to>p||w.collapsed&&k.to==p&&k.from==p)){if(null!=k.to&&k.to!=p&&g>k.to&&(g=k.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==p&&(u+=" "+w.startStyle),w.endStyle&&k.to==g&&(y||(y=[])).push(w.endStyle,k.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var C in w.attributes)(f||(f={}))[C]=w.attributes[C];w.collapsed&&(!d||Dt(d.marker,w)<0)&&(d=k)}else k.from>p&&g>k.from&&(g=k.from)}if(y)for(var S=0;S<y.length;S+=2)y[S+1]==g&&(c+=" "+y[S]);if(!d||d.from==p)for(var O=0;O<b.length;++O)tn(t,0,b[O]);if(d&&(d.from||0)==p){if(tn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var E=Math.min(h,g);;){if(v){var N=p+v.length;if(!d){var j=N>E?v.slice(0,E-p):v;t.addToken(t,j,o?o+s:s,u,p+j.length==g?c:"",l,f)}if(N>=E){v=v.slice(E-p),p=E;break}p=N,u=""}v=a.slice(i,i=n[m++]),o=Yt(n[m++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,a.slice(i,i=n[T]),Yt(n[T+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Ft(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ye(G(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Kt(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?hn(e,t):"gutter"==i?mn(e,t,n,r):"class"==i?pn(e,t):"widget"==i&&vn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=T("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):Zt(e,t)}function hn(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,pn(e,t)):n&&(t.text.className=n)}function pn(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(T("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=T("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=T("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(T("div",Qe(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(T("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function vn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("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 gn(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),pn(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=T("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(!A(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;"),j(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function wn(e,t){for(var n=Ce(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 Cn(e){return e.lineSpace.offsetTop}function Sn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function On(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,T("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 En(e){return 50-e.display.nativeBarWidth}function Nn(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function jn(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function Tn(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(Ye(e.rest[a])>n)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}function Ln(e,t,n,r){return Mn(e,Dn(e,t),n,r)}function An(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 Dn(e,t){var n=Ye(t),r=An(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=Ye(t=Rt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var a=r.built=Zt(e,r);return r.text=a.pre,j(e.display.lineMeasure,a.pre),r}(e,t));var a=Tn(r,t,n);return{line:t,view:r,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function Mn(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&&Nn(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():In(O(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!=_e)return _e;var t=j(e,T("span","x")),n=t.getBoundingClientRect(),r=O(t,0,1).getBoundingClientRect();return _e=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 h;c>0&&(d=r="right"),a=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(o&&l<9&&!c&&(!a||!a.left&&!a.right)){var p=s.parentNode.getClientRects()[0];a=p?{left:p.left,right:p.left+ar(e.display),top:p.top,bottom:p.bottom}:Fn}for(var m=a.top-t.rect.top,v=a.bottom-t.rect.top,g=(m+v)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(g<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=v),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 _n,Fn={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 In(e,t){var n=Fn;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,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Rn(e.display.view[t])}function Wn(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 Kn(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Hn(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Bn(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 Vn(e,t,n,r,a){if(!a){var i=Bn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var o=Bt(t);if("local"==r?o+=Cn(e.display):o-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+("window"==r?0:Hn());var s=l.left+("window"==r?0:Kn());n.left+=s,n.right+=s}return n.top+=o,n.bottom+=o,n}function qn(e,t,n){if("div"==n)return t;var r=t.left,a=t.top;if("page"==n)r-=Kn(),a-=Hn();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)),Vn(e,r,Ln(e,r,t.ch,a),n)}function $n(e,t,n,r,a,i){function o(t,o){var l=Mn(e,a,t,o?"right":"left",i);return o?l.left=l.right:l.right=l.left,Vn(e,r,l,n)}r=r||Ue(e.doc,t.line),a||(a=Dn(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,h=u(s,d,"before"==c);return null!=f&&(h.other=u(s,f,"before"!=c)),h}function Gn(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=Bt(r)+Cn(e.display);return{left:n,right:n,top:a,bottom:a+r.height}}function Xn(e,t,n,r,a){var i=et(e,t,n);return i.xRel=a,r&&(i.outside=r),i}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var a=Ze(r,n),i=r.first+r.size-1;if(a>i)return Xn(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 Zn(e,t,n,r){r-=Bn(t);var a=t.text.length,i=ie((function(t){return Mn(e,n,t-1).bottom<=r}),a,0);return{begin:i,end:a=ie((function(t){return Mn(e,n,t).top>r}),i,a)}}function Jn(e,t,n,r){return n||(n=Dn(e,t)),Zn(e,t,n,Vn(e,t,Mn(e,n,r),"line").top)}function Qn(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-=Bt(t);var i=Dn(e,t),o=Bn(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,h,p=null,m=null,v=ie((function(t){var n=Mn(e,i,t);return n.top+=o,n.bottom+=o,!!Qn(n,r,a,!1)&&(n.top<=a&&n.left<=r&&(p=t,m=n),!0)}),l,s),g=!1;if(m){var b=r-m.left<m.right-r,y=b==c;v=p+(y?0:1),h=y?"after":"before",f=b?m.left:m.right}else{c||v!=s&&v!=l||v++,h=0==v?"after":v==t.text.length?"before":Mn(e,i,v-(c?1:0)).bottom+o<=a==c?"after":"before";var x=$n(e,et(n,v,h),"line",t,i);f=x.left,g=a<x.top?-1:a>=x.bottom?1:0}return Xn(n,v=ae(t.text,v,1),h,g,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 Qn($n(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=$n(e,et(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Qn(u,i,o,!0)&&u.top>o&&(s=a[l-1])}return s}function nr(e,t,n,r,a,i,o){var l=Zn(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 h=a[f];if(!(h.from>=c||h.to<=s)){var p=Mn(e,r,1!=h.level?Math.min(c,h.to)-1:Math.max(s,h.from)).right,m=p<i?i-p+1e9:p-i;(!u||d>m)&&(u=h,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==_n){_n=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)_n.appendChild(document.createTextNode("x")),_n.appendChild(T("br"));_n.appendChild(document.createTextNode("x"))}j(e.measure,_n);var n=_n.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function ar(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");j(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(Kt(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&&Xe(e,t)}))}function cr(e,t,n,r){var a=e.display;if(!n&&"true"==Ce(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=Yn(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-On(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&&hr(e);else if(n<=a.viewFrom)wt&&Wt(e.doc,n+r)>a.viewFrom?hr(e):(a.viewFrom+=r,a.viewTo+=r);else if(t<=a.viewFrom&&n>=a.viewTo)hr(e);else if(t<=a.viewFrom){var i=pr(e,n,n+r,1);i?(a.view=a.view.slice(i.index),a.viewFrom=i.lineN,a.viewTo+=r):hr(e)}else if(n>=a.viewTo){var o=pr(e,t,t,-1);o?(a.view=a.view.slice(0,o.index),a.viewTo=o.lineN):hr(e)}else{var l=pr(e,t,t,-1),s=pr(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):hr(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==W(o,n)&&o.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(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 vr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function gr(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=$n(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=n.appendChild(T("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(T("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=On(e.display),l=o.left,s=Math.max(r.sizerWidth,Nn(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(T("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 h(n,r){return Un(e,et(t,n),"div",d,r)}function p(t,n,r){var a=Jn(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return h("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 v="ltr"==a,g=h(e,v?"left":"right"),b=h(t-1,v?"right":"left"),y=null==n&&0==e,x=null==r&&t==f,k=0==d,w=!m||d==m.length-1;if(b.top-g.top<=3){var C=(c?x:y)&&w,S=(c?y:x)&&k?l:(v?g:b).left,O=C?s:(v?b:g).right;u(S,g.top,O-S,g.bottom)}else{var E,N,j,T;v?(E=c&&y&&k?l:g.left,N=c?s:p(e,a,"before"),j=c?l:p(t,a,"after"),T=c&&x&&w?s:b.right):(E=c?p(e,a,"before"):l,N=!c&&y&&k?s:g.right,j=!c&&x&&w?l:b.left,T=c?p(t,a,"after"):s),u(E,g.top,N-E,g.bottom),g.bottom<b.top&&u(l,g.bottom,null,b.top),u(j,b.top,T-j,b.bottom)}(!i||yr(g,i)<0)&&(i=g),yr(b,i)<0&&(i=b),(!o||yr(g,o)<0)&&(o=g),yr(b,o)<0&&(o=b)})),{start:i,end:o}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ue(a,f.line),m=Ue(a,h.line),v=Rt(p)==Rt(m),g=d(f.line,f.ch,v?p.text.length+1:null).end,b=d(h.line,v?0:null,h.ch).start;v&&(g.top<b.top-2?(u(g.right,g.top,null,g.bottom),u(l,b.top,b.left,b.bottom)):u(g.right,g.top,b.left-g.right,g.bottom)),g.bottom<b.top&&u(l,g.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()||Or(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(),Sr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Or(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,M(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 Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Er(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)&&(Xe(a.line,s),Nr(a.line),a.rest))for(var h=0;h<a.rest.length;h++)Nr(a.rest[h]);if(c>e.display.sizerWidth){var p=Math.ceil(c/ar(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}}function Nr(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 jr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Cn(e));var a=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=Ze(t,r),o=Ze(t,a);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<i?(i=l,o=Ze(t,Bt(Ue(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=o&&(i=Ze(t,Bt(Ue(t,s))-e.wrapper.clientHeight),o=s)}return{from:i,to:Math.max(o,i+1)}}function Tr(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=jn(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Sn(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,h=Nn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(o.scrollLeft=t.right+(p?0:10)-h),o}function Lr(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ar(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Dr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,_r(e,Gn(e,t.from),Gn(e,t.to),t.margin))}function _r(e,t,n,r){var a=Tr(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});Dr(e,a.scrollLeft,a.scrollTop)}function Fr(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 Ir(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+Sn(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+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var zr=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=T("div",[T("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&&!h?"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 Wr=function(){};function Kr(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Hr(e,t);for(var a=0;a<4&&n!=e.display.barWidth||r!=e.display.barHeight;a++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Hr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Hr(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=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Br={native:zr,null:Wr};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Br[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?Ir(e,t):Fr(e,t)}),e),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)}var qr=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:++qr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function $r(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++)Gr(t[n]);for(var r=0;r<t.length;r++)Xr(t[r]);for(var a=0;a<t.length;a++)Yr(t[a]);for(var i=0;i<t.length;i++)Zr(t[i]);for(var o=0;o<t.length;o++)Jr(t[o])}(e)}))}function Gr(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=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&qt(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 Xr(e){e.updatedDisplay=e.mustUpdate&&oa(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(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+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Nn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Zr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Kr(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 Jr(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&&Ir(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&&!p){var i=T("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+En(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=$n(e,t),s=n&&n!=t?$n(e,n):l,c=Tr(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&&(Fr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Ir(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||pe(a[o],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&pe(i[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();Ur(e);try{return t()}finally{$r(e)}}function ea(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ur(e);try{return t.apply(e,arguments)}finally{$r(e)}}}function ta(e){return function(){if(this.curOp)return e.apply(this,arguments);Ur(this);try{return e.apply(this,arguments)}finally{$r(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{$r(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=ht(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?He(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&&pt(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&&Qr(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=jr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Nn(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 hr(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)&&(hr(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=Wt(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=Bt(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=D();if(!t||!A(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&A(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 h=a&&null!=t&&t<=u&&f.lineNumber;f.changes&&(W(f.changes,"gutter")>-1&&(h=!1),un(e,f,u,n)),h&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),o=f.node.nextSibling}else{var p=gn(e,f,u,n);i.insertBefore(p,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!=D()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(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(n.cursorDiv),N(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!=Nn(e))r&&(t.visible=jr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-jn(e),n.top)}),t.visible=jr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oa(e,t))break;Er(e);var a=Rr(e);vr(e),Kr(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)){Er(e),la(e,n);var r=Rr(e);vr(e),Kr(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+En(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=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var a=r.measure.appendChild(T("div",[T("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 ha(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 pa(e){var t=e.gutters,n=e.gutterSpecs;N(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(T("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){pa(e.display),dr(e),da(e)}function va(e,t,r,a){var i=this;this.input=r,i.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=L("div",null,"CodeMirror-code"),i.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=T("div",null,"CodeMirror-cursors"),i.measure=T("div",null,"CodeMirror-measure"),i.lineMeasure=T("div",null,"CodeMirror-measure"),i.lineSpace=L("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=L("div",[i.lineSpace],"CodeMirror-lines");i.mover=T("div",[c],null,"position: relative"),i.sizer=T("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=T("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=T("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=T("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||n&&g||(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=ha(a.gutters,a.lineNumbers),pa(i),r.init(i)}ia.prototype.signal=function(e,t){ge(e,t)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var ga=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,h=o.view;f!=l;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(a&&!n&&!d&&null!=ba)return i&&u&&Fr(e,Math.max(0,l.scrollTop+i*ba)),Ir(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,v=e.doc.scrollTop,g=v+o.wrapper.clientHeight;m<0?v=Math.max(0,v+m-50):g=Math.min(e.doc.height,g+m+50),sa(e,{top:v,bottom:g})}ga<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*ga+n)/(ga+1),++ga)}}),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 Ca(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 Ca=function(e,t){this.anchor=e,this.head=t};function Sa(e,t,n){var r=e&&e.options.selectionsMayTouch,a=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=W(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 Ca(d?u:c,d?c:u))}}return new wa(t,n)}function Oa(e,t){return new wa([new Ca(e,t||e)],0)}function Ea(e){return e.text?et(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Na(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ea(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+=Ea(t).ch-t.to.ch),et(n,r)}function ja(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var a=e.sel.ranges[r];n.push(new Ca(Na(a.anchor,t),Na(a.head,t)))}return Sa(e.cm,n,e.sel.primIndex)}function Ta(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 La(e){e.doc.mode=ze(e.options,e.doc.modeOption),Aa(e)}function Aa(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 Da(e,t){return 0==t.from.ch&&0==t.to.ch&&""==G(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ma(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),jt(e),Tt(e,n);var a=r?r(e):1;a!=e.height&&Xe(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=G(c),h=a(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Da(e,t)){var m=o(0,c.length-1);i(d,d.text,h),p&&e.remove(l.line,p),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),h);else{var v=o(1,c.length-1);v.push(new Ut(f+u.text.slice(s.ch),h,r)),i(u,u.text.slice(0,l.ch)+c[0],a(0)),e.insert(l.line+1,v)}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,p);else{i(u,u.text.slice(0,l.ch)+c[0],a(0)),i(d,f+d.text.slice(s.ch),h);var g=o(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,g)}sn(e,"change",e,t)}function _a(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 Fa(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,sr(e),La(e),Pa(e),e.options.lineWrapping||qt(e),e.options.mode=t.modeOption,dr(e)}function Pa(e){("rtl"==e.doc.direction?M:E)(e.display.lineDiv,"CodeMirror-rtl")}function Ia(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:Ea(t),text:$e(e,t.from,t.to)};return Ba(e,n,t.from.line,t.to.line+1),_a(e,(function(e){return Ba(e,n,t.from.line,t.to.line+1)}),!0),n}function za(e){for(;e.length&&G(e).ranges;)e.pop()}function Wa(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),G(e.done)):e.done.length&&!G(e.done).ranges?G(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}(a,a.lastOp==r)))o=G(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Ea(t):i.changes.push(Ra(e,t));else{var s=G(a.done);for(s&&s.ranges||Ha(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||pe(e,"historyAdded")}function Ka(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,G(a.done),t))?a.done[a.done.length-1]=t:Ha(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=i,a.lastSelOp=n,r&&!1!==r.clearRedo&&za(a.undone)}function Ha(e,t){var n=G(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ba(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 Va(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 qa(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(Va(n[a]));return r}(e,t),r=Et(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+)$/))&&W(t,Number(u[1]))>-1&&(G(l)[d]=c[d],delete c[d])}}}return r}function $a(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 Ca(a,t)}return new Ca(n||t,t)}function Ga(e,t,n,r,a){null==a&&(a=e.cm&&(e.cm.display.shift||e.extend)),Qa(e,new wa([$a(e.sel.primary(),t,n,a)],0),r)}function Xa(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]=$a(e.sel.ranges[i],t[i],null,a);Qa(e,Sa(e.cm,r,e.sel.primIndex),n)}function Ya(e,t,n,r){var a=e.sel.ranges.slice(0);a[t]=n,Qa(e,Sa(e.cm,a,e.sel.primIndex),r)}function Za(e,t,n,r){Qa(e,Oa(t,n),r)}function Ja(e,t,n){var r=e.history.done,a=G(r);a&&a.ranges?(r[r.length-1]=t,ei(e,t,n)):Qa(e,t,n)}function Qa(e,t,n){ei(e,t,n),Ka(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ei(e,t,n){(ge(e,"beforeSelectionChange")||e.cm&&ge(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 Ca(lt(e,t[n].anchor),lt(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Sa(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||Ar(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,ve(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 Ca(s,c))}return a?Sa(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&&(pe(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 h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=oi(e,h,r,h.line==t.line?i:null)),h?ai(e,h,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()),H)}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)}),pe(e,"beforeChange",e,r),e.cm&&pe(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(!(ge(e,"beforeChange")||e.cm&&ge(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!=W(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=ja(e,t);Wa(e,t,n,e.cm?e.cm.curOp.id:NaN),hi(e,t,n,Et(e,t));var r=[];_a(e,(function(e,n){n||-1!=W(r,e.history)||(gi(e.history,t),r.push(e.history)),hi(e,t,null,Et(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(Ha(a,s),n&&!a.equals(e.sel))return void Qa(e,a,{clearRedo:!1});o=a}var u=[];Ha(o,s),s.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=ge(e,"beforeChange")||e.cm&&ge(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?ja(e,r):G(l);hi(e,r,i,qa(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ea(r)});var o=[];_a(e,(function(e,t){t||-1!=W(o,e.history)||(gi(e.history,r),o.push(e.history)),hi(e,r,null,qa(e,r))}))},h=a.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function fi(e,t){if(0!=t&&(e.first+=t,e.sel=new wa(X(e.sel.ranges,(function(e){return new Ca(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 hi(e,t,n,r){if(e.cm&&!e.cm.curOp)return ea(e.cm,hi)(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:[G(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=$e(e,t.from,t.to),n||(n=ja(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=Ye(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&&ve(e),Ma(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,(function(e){var t=Vt(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||Da(e.doc,t)?dr(e,i.line,o.line+1,c):fr(e,i.line,"text");var u=ge(e,"changes"),d=ge(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):Ma(e,t,r),ei(e,n,H),e.cantEdit&&ii(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function pi(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 vi(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 gi(e,t){var n=t.from.line,r=t.to.line,a=t.text.length-(r-n)-1;vi(e.done,n,r,a),vi(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=Ye(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}Ca.prototype.from=function(){return it(this.anchor,this.head)},Ca.prototype.to=function(){return at(this.anchor,this.head)},Ca.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,$t(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=W(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){Bt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Lr(e,n)}ki.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(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);Xe(n,Math.max(0,n.height-i)),e&&(Qr(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&&(Kt(this.doc,r)||Xe(r,r.height+a),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,wi(n,r,a),sn(n,"lineWidgetChanged",n,e,Ye(r))})))},be(ki);var Ci=0,Si=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ci};function Oi(e,t,n,r,a){if(r&&r.shared)return function(e,t,n,r,a){(r=I(r)).shared=!1;var i=[Oi(e,t,n,r,a)],o=i[0],l=r.widgetNode;return _a(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),i.push(Oi(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=G(i)})),new Ei(i,o)}(e,t,n,r,a);if(e.cm&&!e.cm.curOp)return ea(e.cm,Oi)(e,t,n,r,a);var i=new Si(e,a),o=tt(t,n);if(r&&I(r,i,!1),o>0||0==o&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=L("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(It(e,t.line,t,n,i)||t.line!=n.line&&It(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt=!0}i.addToHistory&&Wa(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&&Xe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(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){Kt(e,t)&&Xe(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=++Ci,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}Si.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ur(e),ge(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=St(o.markedSpans,this);e&&!this.collapsed?fr(e,Ye(o),"text"):e&&(null!=l.to&&(a=Ye(o)),null!=l.from&&(r=Ye(o))),o.markedSpans=Ot(o.markedSpans,l),null==l.from&&this.collapsed&&!Kt(this.doc,o)&&e&&Xe(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=Vt(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&&$r(e),this.parent&&this.parent.clear()}},Si.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=St(i.markedSpans,this);if(null!=o.from&&(n=et(t?i:Ye(i),o.from),-1==e))return n;if(null!=o.to&&(r=et(t?i:Ye(i),o.to),1==e))return r}return n&&{from:n,to:r}},Si.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var a=t.line,i=Ye(t.line),o=An(r,i);if(o&&(Rn(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Kt(n.doc,a)&&null!=n.height){var l=n.height;n.height=null;var s=kn(n)-l;s&&Xe(a,a.height+s)}sn(r,"markerChanged",r,e)}))},Si.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=W(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Si.prototype.detachLine=function(e){if(this.lines.splice(W(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(Si);var Ei=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Ni(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function ji(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];_a(n.primary.doc,(function(e){return r.push(e)}));for(var a=0;a<n.markers.length;a++){var i=n.markers[a];-1==W(r,i.doc)&&(i.parent=null,n.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}Ei.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")}},Ei.prototype.find=function(e,t){return this.primary.find(e,t)},be(Ei);var Ti=0,Li=function(e,t,n,r,a){if(!(this instanceof Li))return new Li(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=Oa(i),this.history=new Ia(null),this.id=++Ti,this.modeOption=t,this.lineSep=r,this.direction="rtl"==a?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ma(this,{from:i,to:i,text:e}),Qa(this,Oa(i),H)};Li.prototype=Z(xi.prototype,{constructor:Li,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=Ge(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&&Dr(this.cm,0,0),Qa(this,Oa(t),H)})),replaceRange:function(e,t,n,r){pi(this,e,t=lt(this,t),n=n?lt(this,n):t,r)},getRange:function(e,t,n){var r=$e(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(Je(this,e))return Ue(this,e)},getLineNumber:function(e){return Ye(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){Za(this,lt(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:na((function(e,t,n){Za(this,lt(this,e),lt(this,t||e),n)})),extendSelection:na((function(e,t,n){Ga(this,lt(this,e),t&<(this,t),n)})),extendSelections:na((function(e,t){Xa(this,st(this,e),t)})),extendSelectionsBy:na((function(e,t){Xa(this,st(this,X(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 Ca(lt(this,e[a].anchor),lt(this,e[a].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Qa(this,Sa(this.cm,r,t),n)}})),addSelection:na((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ca(lt(this,e),lt(this,t||e))),Qa(this,Sa(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=$e(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=$e(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=Ta(l.from,a,i),c=Ta(Ea(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 Ca(d?c:s,d?s:c)}else r[o]=new Ca(s,s)}return new wa(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)ci(this,r[s]);l?Ja(this,l):this.cm&&Ar(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 Ia(this.history.maxGeneration),_a(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 Ia(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(!Je(this,e))return null;if(t=e,!(e=Ue(this,e)))return null}else if(null==(t=Ye(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(S(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(S(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&&!Kt(e,t)){var r=Bt(t)<e.scrollTop;Xe(t,t.height+kn(a)),r&&Lr(i,a.height),i.curOp.forceUpdate=!0}return!0})),i&&sn(i,"lineWidgetAdded",i,a,"number"==typeof t?t:Ye(t)),a}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Oi(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 Oi(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 Li(Ge(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 Li(Ge(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=Oi(e,i,o,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,Ni(this)),r},unlinkDoc:function(e){if(e instanceof No&&(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),ji(Ni(this));break}if(e.history==this.history){var n=[e.id];_a(e,(function(e){return n.push(e.id)}),!0),e.history=new Ia(null),e.history.done=Ua(this.history.done,n),e.history.undone=Ua(this.history.undone,n)}},iterLinkedDocs:function(e){_a(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ae(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&&Qr(t=this.cm,(function(){Pa(t),dr(t)})))}))}),Li.prototype.eachLine=Li.prototype.iter;var Ai=0;function Di(e){var t=this;if(Mi(t),!me(t,e)&&!wn(t.display,e)){ye(e),o&&(Ai=+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),Ja(t.doc,Oa(lt(t.doc,n),lt(t.doc,Ea(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==W(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,Oa(n,n)),f)for(var h=0;h<f.length;++h)pi(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Mi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _i(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 Fi=!1;function Pi(){var e;Fi||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,_i(Ii)}),100))})),de(window,"blur",(function(){return _i(Or)})),Fi=!0)}function Ii(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 Wi=65;Wi<=90;Wi++)Ri[Wi]=String.fromCharCode(Wi);for(var Ki=1;Ki<=12;Ki++)Ri[Ki+111]=Ri[Ki+63235]="F"+Ki;var Hi={};function Bi(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 Vi(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=X(n.split(" "),Bi),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 qi(e,t,n,r){var a=(t=Xi(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 qi(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var o=qi(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 $i(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 Gi(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),$i(n,e,t))}function Xi(e){return"string"==typeof e?Hi[e]:e}function Yi(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,G(r).to)<=0;){var o=r.pop();if(tt(o.from,i.from)<0){i.from=o.from;break}}r.push(i)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)pi(e.doc,"",r[t].from,r[t].to,"+delete");Ar(e)}))}function Zi(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ji(e,t,n){var r=Zi(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Qi(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?G(i):i[0],s=a<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=Dn(t,n);o=a<0?n.text.length-1:0;var u=Mn(t,c,o).top;o=ie((function(e){return Mn(t,c,e).top==u}),a<0==(1==l.level)?l.from:l.to-1,o),"before"==s&&(o=Zi(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")}Hi.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"},Hi.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"},Hi.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"},Hi.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"]},Hi.default=b?Hi.macDefault:Hi.pcDefault;var eo={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Yi(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 Yi(e,(function(t){return{from:et(t.from().line,0),to:lt(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Yi(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Yi(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 Yi(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=Ft(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ye(r)),Qi(!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")}),V)},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")}),V)},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}),V)},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($(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(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 Ca(a,a))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(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);Ar(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=Ye(r)),Qi(!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)!=K}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=qi(t,e.state.keyMaps[r],n,e);if(a)return a}return e.options.extraKeys&&qi(t,e.options.extraKeys,n,e)||qi(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=Gi(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=D(),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||Me||!(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||(E(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n))}M(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 ho,po,mo=function(e,t,n){this.time=e,this.pos=t,this.button=n};function vo(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=Se(e),i=r?function(e,t){var n=+new Date;return po&&po.compare(n,e,t)?(ho=po=null,"triple"):ho&&ho.compare(n,e,t)?(po=new mo(n,e,t),ho=null,"double"):(ho=new mo(n,e,t),po=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,$i(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)!=K}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=D();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&&Ne&&!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,he(a.wrapper.ownerDocument,"mouseup",c),he(a.wrapper.ownerDocument,"mousemove",u),he(a.scroller,"dragstart",d),he(a.scroller,"drop",c),i||(ye(t),r.addNew||Ga(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),Cr(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 Ca(n,n)):(o=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ca(n,n)),n=cr(e,t,!0,!0),l=-1;else{var u=go(e,n,r.unit);o=r.extend?$a(o,u.anchor,u.head,r.extend):u}r.addNew?-1==l?(l=c.length,Qa(i,Sa(e,c.concat([o]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(Qa(i,Sa(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=i.sel):Ya(i,l,o,B):(l=0,Qa(i,new wa([o],0),B),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),h=Math.min(u,f),p=Math.max(u,f),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Ue(i,m).text,b=q(g,h,c);h==p?a.push(new Ca(et(m,b),et(m,b))):g.length>b&&a.push(new Ca(et(m,b),et(m,q(g,p,c))))}a.length||a.push(new Ca(n,n)),Qa(i,Sa(e,s.ranges.slice(0,l).concat(a),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=o,k=go(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 C=s.ranges.slice(0);C[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)],h=s==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Ca(new et(n.line,p,m),r)}(e,new Ca(lt(i,w),y)),Qa(i,Sa(e,C,l),B)}}var h=a.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(ye(t),a.input.focus()),he(a.wrapper.ownerDocument,"mousemove",v),he(a.wrapper.ownerDocument,"mouseup",g),i.history.lastSelOrigin=null}var v=ea(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var o=++p,l=cr(e,n,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,d)){e.curOp.focus=D(),f(l);var s=jr(a,i);(l.line>=s.to||l.line<s.from)&&setTimeout(ea(e,(function(){p==o&&t(n)})),150)}else{var c=n.clientY<h.top?-20:n.clientY>h.bottom?20:0;c&&setTimeout(ea(e,(function(){p==o&&(a.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),g=ea(e,m);e.state.selectingText=g,de(a.wrapper.ownerDocument,"mousemove",v),de(a.wrapper.ownerDocument,"mouseup",g)}(e,r,t,i)}(t,r,i,e):Ce(e)==n.scroller&&ye(e):2==a?(r&&Ga(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==a&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function go(e,t,n){if("char"==n)return new Ca(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ca(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ca(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||!ge(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 pe(e,n,e,Ze(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!!ge(e,"gutterContextMenu")&&bo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||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-"),Wn(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"}},Co={},So={};function Oo(e,t,n){if(!t!=!(n&&n!=wo)){var r=e.display.dragFunctions,a=t?de:he;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 Eo(e){e.options.lineWrapping?(M(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),qt(e)),sr(e),dr(e),Wn(e),setTimeout((function(){return Kr(e)}),100)}function No(e,t){var n=this;if(!(this instanceof No))return new No(e,t);this.options=t=t?I(t):{},I(Co,t,!1);var r=t.value;"string"==typeof r?r=new Li(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var a=new No.inputStyles[t.inputStyle](this),i=this.display=new va(e,r,a,t);for(var c in i.wrapper.CodeMirror=this,ko(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(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&&!g&&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,vo)),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);Ga(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 Ca(l,l):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(l):new Ca(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&&(Fr(e,t.scroller.scrollTop),Ir(e,t.scroller.scrollLeft,!0),pe(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=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,r)}}(e,t),we(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Ai<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=T("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,Di),leave:function(t){me(e,t)||Mi(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 Sr(e,t)})),de(s,"blur",(function(t){return Or(e,t)}))}(this),Pi(),Ur(this),this.curOp.forceUpdate=!0,Fa(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Sr(n)}),20):Or(this),So)So.hasOwnProperty(c)&&So[c](this,t[c],wo);fa(this),t.finishInit&&t.finishInit(this);for(var u=0;u<jo.length;++u)jo[u](this);$r(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}No.defaults=Co,No.optionHandlers=So;var jo=[];function To(e,t,n,r){var a,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?a=ht(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))==K||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 h=Math.floor(c/o);h;--h)f+=o,d+="\t";if(f<c&&(d+=$(c-f)),d!=u)return pi(i,d,et(t,0),et(t,u.length),"+input"),l.stateAfter=null,!0;for(var p=0;p<i.sel.ranges.length;p++){var m=i.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var v=et(t,u.length);Ya(i,p,new Ca(v,v));break}}}No.defineInitHook=function(e){return jo.push(e)};var Lo=null;function Ao(e){Lo=e}function Do(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=Ae(t),c=null;if(l&&r.ranges.length>1)if(Lo&&Lo.text.join("\n")==t){if(r.ranges.length%Lo.text.length==0){c=[];for(var u=0;u<Lo.text.length;u++)c.push(i.splitLines(Lo.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!l?m=et(m.line,Math.min(Ue(i,m.line).text.length,m.ch+G(s).length)):l&&Lo&&Lo.lineWise&&Lo.text.join("\n")==s.join("\n")&&(p=m=et(p.line,0)));var v={from:p,to:m,text:c?c[f%c.length]:s,origin:a||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};ci(e.doc,v),sn(e,"inputRead",e,v)}t&&!l&&_o(e,t),Ar(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Mo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Do(t,n,0,null,"paste")})),!0}function _o(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=To(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=To(e,a.head.line,"smart"));o&&sn(e,"electricInput",e,a.head.line)}}}function Fo(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 Io(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("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 Ji(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 Ji(t,n,r);var l,s=function(e,n){return Zi(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||Dn(e,t),Jn(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 h=d?"before":"after";return new et(n.line,f,h)}}var p=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=p(i+r,r,u);if(m)return m;var v=r>0?u.end:s(u.begin,-1);return null==v||r>0&&v==t.text.length||!(m=p(r>0?0:a.length-1,r,c(v)))?null:m}(e.cm,l,t,n):Ji(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=Qi(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"),h=!0;!(n<0)||c(!h);h=!1){var p=l.text.charAt(t.ch)||"\n",m=ee(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!h))break}var v=ii(e,t,i,o,!0);return nt(i,v)&&(v.hitSide=!0),v}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=Yn(e,l,a)).outside;){if(n<0?a<=0:a>=o.height){i.hitSide=!0;break}a+=5*n}return i}var Wo=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 Ko(e,t){var n=An(e,t.line);if(!n||n.hidden)return null;var r=Ue(e.doc,t.line),a=Tn(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 Ho(e,t){return t&&(e.bad=!0),e}function Bo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ho(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 Vo(i,t,n)}}function Vo(e,t,n){var r=e.text.firstChild,a=!1;if(!t||!A(r,t))return Ho(et(Ye(e.line),0),!0);if(t==r&&(a=!0,t=r.childNodes[n],n=0,!t)){var i=e.rest?G(e.rest):e.line;return Ho(et(Ye(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=Ye(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 Ho(d,a);for(var f=l.nextSibling,h=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return Ho(et(d.line,d.ch-h),a);h+=f.textContent.length}for(var p=l.previousSibling,m=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return Ho(et(d.line,d.ch+m),a);m+=p.textContent.length}}Wo.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())Ao({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Fo(r);Ao({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,H),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=Lo.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Io(),s=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),s.value=Lo.text.join("\n");var c=document.activeElement;F(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)||Mo(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)},Wo.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Wo.prototype.prepareSelection=function(){var e=gr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Wo.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Wo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wo.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=Bo(t,e.anchorNode,e.anchorOffset),l=Bo(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&&Ko(t,a)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Ko(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 h,p=e.rangeCount&&e.getRangeAt(0);try{h=O(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Wo.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)},Wo.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},Wo.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Wo.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Wo.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wo.prototype.blur=function(){this.div.blur()},Wo.prototype.getField=function(){return this.div},Wo.prototype.supportsTouch=function(){return!0},Wo.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qr(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))}))},Wo.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Wo.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&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=Bo(t,e.anchorNode,e.anchorOffset),r=Bo(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){Qa(t.doc,Oa(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Wo.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=Ye(a.view[0].line),n=a.view[0].node):(t=Ye(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=Ye(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 h=e.findMarks(et(r,0),et(a+1,0),(v=+f,function(e){return e.id==v}));return void(h.length&&(i=h[0].find(0))&&u($e(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),p&&(o=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var v}for(;d(t),t!=n;)t=t.nextSibling,s=!1;return i}(r,n,c,t,s)),f=$e(r.doc,et(t,0),et(s,Ue(r.doc,s).text.length));d.length>1&&f.length>1;)if(G(d)==G(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],v=f[0],g=Math.min(m.length,v.length);h<g&&m.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=G(d),y=G(f),x=Math.min(b.length-(1==d.length?h:0),y.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==f.length&&t==o.line)for(;h&&h>o.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)h--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var k=et(t,h),w=et(s,f.length?G(f).length-p:0);return d.length>1||d[0]||tt(k,w)?(pi(r.doc,d,k,w,"+input"),!0):void 0},Wo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wo.prototype.reset=function(){this.forceCompositionEnd()},Wo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wo.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))},Wo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return dr(e.cm)}))},Wo.prototype.setUneditable=function(e){e.contentEditable="false"},Wo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ea(this.cm,Do)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Wo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Wo.prototype.onContextMenu=function(){},Wo.prototype.resetPosition=function(){},Wo.prototype.needsContentAttribute=!0;var qo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};qo.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())Ao({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Fo(r);Ao({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",a.value=t.text.join("\n"),F(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)||Mo(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)}))},qo.prototype.createField=function(e){this.wrapper=Io(),this.textarea=this.wrapper.firstChild},qo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},qo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var a=$n(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},qo.prototype.showSelection=function(e){var t=this.cm.display;j(t.cursorDiv,e.cursors),j(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qo.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&&F(this.textarea),o&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&l>=9&&(this.hasSelection=null))}},qo.prototype.getField=function(){return this.textarea},qo.prototype.supportsTouch=function(){return!1},qo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},qo.prototype.blur=function(){this.textarea.blur()},qo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qo.prototype.receivedFocus=function(){this.slowPoll()},qo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},qo.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))}))},qo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||De(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 Qr(t,(function(){Do(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},qo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qo.prototype.onKeyPress=function(){o&&l>=9&&(this.hasSelection=null),this.fastPoll()},qo.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,Qa)(n.doc,Oa(i),H);var u,f=a.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.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=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&l>=9&&v(),C){we(e);var m=function(){he(window,"mouseup",m),setTimeout(g,20)};de(window,"mouseup",m)}else setTimeout(g,50)}function v(){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 g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,a.style.cssText=f,o&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=a.selectionStart)){(!o||o&&l<9)&&v();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)}}},qo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},qo.prototype.setUneditable=function(){},qo.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,La(e)}),!0),n("indentUnit",2,La,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Aa(e),Wn(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--)pi(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",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"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=Xi(t),a=n!=wo&&Xi(n);a&&a.detach&&a.detach(e,r),r.attach&&r.attach(e,a||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Eo,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=ha(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 Kr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Kr(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=ha(e.options.gutters,t),ma(e)}),!0),n("firstLineNumber",1,ma,!0),n("lineNumberFormatter",(function(e){return e}),ma,!0),n("showCursorWhenSelecting",!1,vr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Or(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,Oo),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vr,!0),n("singleCursorHeightPerLine",!0,vr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Aa,!0),n("addModeClass",!1,Aa,!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,Aa,!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)}(No),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),pe(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"](Xi(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"),Je(this.doc,e)&&To(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&&(To(this,a.head.line,e,!0),n=a.head.line,r==this.doc.sel.primIndex&&Ar(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)To(this,s,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[r].from().ch>0&&Ya(this.doc,r,new Ca(i,c[r].to()),H)}}})),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==W(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ht(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 $n(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 Yn(this,(e=qn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=qn(this,{top:e,left:0},t||"page").top,Ze(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 Vn(this,r,{top:0,left:0},t||"page",n||a).top+(a?this.doc.height-Bt(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=$n(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=Tr(i,o)).scrollTop&&Fr(i,l.scrollTop),null!=l.scrollLeft&&Ir(i,l.scrollLeft))},triggerOnKeyDown:ta(co),triggerOnKeyPress:ta(fo),triggerOnKeyUp:uo,triggerOnMouseDown:ta(vo),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ta((function(e){_o(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()}),V)})),deleteH:ta((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Yi(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=$n(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=$n(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()&&Lr(n,Un(n,s,"div").top-l.top),s}),V),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 Ca(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?M(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ta((function(e,t){Dr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:jn(this),clientWidth:Nn(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){Mr(e),e.curOp.scrollToPos=t}(this,e):_r(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,pe(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return Ur(this)},endOperation:function(){return $r(this)},refresh:ta((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Wn(this),Dr(this,this.doc.scrollLeft,this.doc.scrollTop),ca(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&sr(this),pe(this,"refresh",this)})),swapDoc:ta((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Fa(this,e),Wn(this),this.display.input.reset(),Dr(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})}}(No);var Uo="iter insert remove copy getEditor constructor".split(" ");for(var $o in Li.prototype)Li.prototype.hasOwnProperty($o)&&W(Uo,$o)<0&&(No.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}(Li.prototype[$o]));return be(Li),No.inputStyles={textarea:qo,contenteditable:Wo},No.defineMode=function(e){No.defaults.mode||"null"==e||(No.defaults.mode=e),Ie.apply(this,arguments)},No.defineMIME=function(e,t){Pe[e]=t},No.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),No.defineMIME("text/plain","null"),No.defineExtension=function(e,t){No.prototype[e]=t},No.defineDocExtension=function(e,t){Li.prototype[e]=t},No.fromTextArea=function(e,t){if((t=t?I(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=D();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&&(he(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=a))}},e.style.display="none";var l=No((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=he,e.on=de,e.wheelEventPixels=xa,e.Doc=Li,e.splitLines=Ae,e.countColumn=R,e.findColumn=q,e.isWordChar=Q,e.Pass=K,e.signal=pe,e.Line=Ut,e.changeEnd=Ea,e.scrollbarModel=Br,e.Pos=et,e.cmpPos=tt,e.modes=Fe,e.mimeModes=Pe,e.resolveMode=Re,e.getMode=ze,e.modeExtensions=We,e.extendMode=Ke,e.copyState=He,e.startState=Ve,e.innerMode=Be,e.commands=eo,e.keyMap=Hi,e.keyName=Gi,e.isModifierKey=Ui,e.lookupKey=qi,e.normalizeKeyMap=Vi,e.StringStream=qe,e.SharedTextMarker=Ei,e.TextMarker=Si,e.LineWidget=ki,e.e_preventDefault=ye,e.e_stopPropagation=xe,e.e_stop=we,e.addClass=M,e.contains=A,e.rmClass=E,e.keyNames=Ri}(No),No.version="5.58.2",No}()},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"),h=n.n(f),p=n("sboe"),m=n("OZM5"),v=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:h()(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)},g=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(g.b)(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,Object(g.b)(e.props))},e.onSelect=function(t){if(!e.isDisabled()){var n=e.props.context.onNodeSelect;t.preventDefault(),n(t,Object(g.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(g.b)(e.props),o)}}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,Object(g.b)(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,Object(g.b)(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,Object(g.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(g.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(g.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:h()("".concat(o,"-switcher"),"".concat(o,"-switcher-noop"))},"function"==typeof s?s(Object(i.a)(Object(i.a)({},e.props),{},{isLeaf:!0})):s);var c=h()("".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:h()("".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:h()("".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,p=u.showIcon,m=u.icon,v=u.draggable,g=u.loadData,b=u.titleRender,y=e.isDisabled(),x="".concat(f,"-node-content-wrapper");if(p){var k=l||m;t=k?d.createElement("span",{className:h()("".concat(f,"-iconEle"),"".concat(f,"-icon__customize"))},"function"==typeof k?k(e.props):k):e.renderIcon()}else g&&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:h()("".concat(x),"".concat(x,"-").concat(e.getNodeState()||"normal"),!y&&(o||r)&&"".concat(f,"-node-selected"),!y&&v&&"draggable"),draggable:!y&&v||void 0,"aria-grabbed":!y&&v||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:v?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,p=t.isEnd,b=t.expanded,y=t.selected,x=t.checked,k=t.halfChecked,w=t.loading,C=t.domRef,S=t.active,O=t.onMouseMove,E=Object(a.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),N=this.props.context,j=N.prefixCls,T=N.filterTreeNode,L=N.draggable,A=N.keyEntities,D=this.isDisabled(),M=Object(m.f)(E),_=(A[n]||{}).level,F=p[p.length-1];return d.createElement("div",Object.assign({ref:C,className:h()(i,"".concat(j,"-treenode"),(e={},Object(r.a)(e,"".concat(j,"-treenode-disabled"),D),Object(r.a)(e,"".concat(j,"-treenode-switcher-").concat(b?"open":"close"),!u),Object(r.a)(e,"".concat(j,"-treenode-checkbox-checked"),x),Object(r.a)(e,"".concat(j,"-treenode-checkbox-indeterminate"),k),Object(r.a)(e,"".concat(j,"-treenode-selected"),y),Object(r.a)(e,"".concat(j,"-treenode-loading"),w),Object(r.a)(e,"".concat(j,"-treenode-active"),S),Object(r.a)(e,"".concat(j,"-treenode-leaf-last"),F),Object(r.a)(e,"drag-over",!D&&l),Object(r.a)(e,"drag-over-gap-top",!D&&s),Object(r.a)(e,"drag-over-gap-bottom",!D&&c),Object(r.a)(e,"filter-node",T&&T(Object(g.b)(this.props))),e)),style:o,onDragEnter:L?this.onDragEnter:void 0,onDragOver:L?this.onDragOver:void 0,onDragLeave:L?this.onDragLeave:void 0,onDrop:L?this.onDrop:void 0,onDragEnd:L?this.onDragEnd:void 0,onMouseMove:O},M),d.createElement(v,{prefixCls:j,level:_,isStart:f,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(d.Component),y=function(e){return d.createElement(p.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},X8EC:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/pages/Paths/New/index.tsx + 2 modules ***!
|
|
|
\***************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/RightOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.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/Paths/New/Cascader/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paths/New/components/AppplySchoolModal/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paths/New/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/markdown-editor/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/cityData.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/style/index.js */
|
|
|
/*! 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/cascader/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/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/col/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/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/row/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree-select/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree-select/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.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";n.r(t);n("DZo9");var r=n("8z0m"),a=(n("+L6B"),n("2/Rp")),i=n("oBTY"),o=(n("sRBo"),n("kaz8")),l=(n("7Kak"),n("9yH6")),s=(n("BoS7"),n("Sdc0")),c=(n("14J3"),n("BMrR")),u=(n("jCWc"),n("kPKH")),d=(n("O3gP"),n("lrIw")),f=n("k1fw"),h=(n("miYZ"),n("tsqr")),p=n("9og8"),m=(n("y8nQ"),n("Vl3Y")),v=n("tJVT"),g=n("PpiC"),b=(n("nRaC"),n("5RzL")),y=(n("5NDa"),n("5rEg")),x=n("WmNS"),k=n.n(x),w=n("q1tI"),C=n.n(w),S=n("9kvl"),O=n("Ot1p"),E=n("hxT0"),N=n.n(E),j=n("1vsH"),T=n("m3rI"),L=n("ErOA"),A=n("jrin"),D=(n("R9oj"),n("ECub")),M=n("YNHc"),_=n.n(M),F=n("4i/N"),P=n("UESt"),I=Object(w.createRef)(),R=function(e){var t=e.dataSource,n=e.placeholder,r=e.defaultValue,a=e.onChange,o=Object(w.useState)(!1),l=Object(v.a)(o,2),s=l[0],c=l[1],u=Object(w.useState)({data:[],objData:{},ids:[]}),d=Object(v.a)(u,2),h=d[0],p=d[1],m=Object(w.useState)({}),b=Object(v.a)(m,2),y=b[0],x=b[1];Object(w.useEffect)((function(){window.addEventListener("click",(function(){c(!1),x({})}))}),[]),Object(w.useEffect)((function(){if(r){var e={},t=[];r.forEach((function(n){var r=n.sub_discipline,a=Object(g.a)(n,["sub_discipline"]);r&&(e[r.id]=Object(f.a)(Object(f.a)({},a),{},{sub_disciplines:[r]}),t.push(r.id))})),p({ids:t,data:Object.values(e),objData:e}),a(t)}}),[r]);var k=function(){return C.a.createElement("div",{className:_.a.emptyWrap},C.a.createElement(D.a,{image:D.a.PRESENTED_IMAGE_SIMPLE}))},S=45;return I&&I.current&&I.current.clientHeight>45&&(S=I.current.clientHeight+5),C.a.createElement("div",{className:_.a.cascaderContainer,onClick:function(e){e.stopPropagation()}},C.a.createElement("div",{ref:I,className:_.a.valueWrap,onClick:function(){return c(!s)}},0===h.data.length&&C.a.createElement("span",{className:_.a.placeholder},n||"请选择方向&课程"),h.data.map((function(e){return C.a.createElement("div",{className:_.a.valueItem,key:e.id},C.a.createElement("span",null,e.name),C.a.createElement("span",null,"/"),C.a.createElement("span",null,e.sub_disciplines[0].name),C.a.createElement("span",{onClick:function(t){t.stopPropagation(),t.preventDefault(),function(e){var t=h.objData;delete t[e];var n=h.ids.filter((function(t){return t!==e}));p({data:Object.values(t),objData:t,ids:n}),a(n)}(e.sub_disciplines[0].id)}},C.a.createElement(F.a,null)))}))),s&&C.a.createElement("div",{className:_.a.modalWrap,style:{top:S}},C.a.createElement("div",{className:_.a.left},0===t.length&&k(),t.length>0&&t.map((function(e){return C.a.createElement("div",{key:e.id,onClick:function(){return x(e)}},C.a.createElement("span",null,e.name),C.a.createElement("span",null,C.a.createElement(P.a,null)))}))),y.sub_disciplines&&C.a.createElement("div",{className:_.a.right},0===y.sub_disciplines.length&&k(),y.sub_disciplines.length>0&&y.sub_disciplines.map((function(e){var t=h.ids.includes(e.id);return C.a.createElement("div",{key:e.id,className:t?_.a.disabled:"",onClick:function(){return function(e){if(h.ids.includes(e.id))return!1;y.sub_disciplines;var t=Object(g.a)(y,["sub_disciplines"]),n=Object(f.a)(Object(f.a)({},h.objData),{},Object(A.a)({},e.id,Object(f.a)(Object(f.a)({},t),{},{sub_disciplines:[e]})));p({ids:[].concat(Object(i.a)(h.ids),[e.id]),data:Object.values(n),objData:n}),a([].concat(Object(i.a)(h.ids),[e.id]))}(e)}},e.name)})))))},z=(n("2qtc"),n("kLXV")),W=(n("6UJt"),n("DFOY")),K=n("wd/R"),H=n.n(K),B=n("jO45"),V=n("jN4g"),q=n("gJ3r"),U=n("8pgt"),$=n.n(U),G=function(e,t){return t.some((function(t){return t.label.toLowerCase().indexOf(e.toLowerCase())>-1}))},X=y.a.TextArea,Y=Object(S.a)((function(e){var t=e.newCourse,n=e.loading;return{newCourse:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){var t=e.newCourse,n=(e.globalSetting,e.loading),r=e.dispatch,i=e.schoolName,o=e.onSuccess,l=void 0===o?function(){}:o,s=(Object(g.a)(e,["newCourse","globalSetting","loading","dispatch","schoolName","onSuccess"]),m.a.useForm()),c=Object(v.a)(s,1)[0];Object(w.useEffect)((function(){c.setFieldsValue({name:i})}),[i]);var u=function(){var e=Object(p.a)(k.a.mark((function e(t){var n,a,i,o,s,c,u;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(n=t||{}).name,i=n.city,o=void 0===i?[]:i,s=n.address,c=n.remarks,e.next=3,r({type:"newCourse/appplySchool",payload:{name:a,province:o[0],city:o[1],address:s,remarks:c}});case 3:u=e.sent,r({type:"newCourse/setActionTabs",payload:{}}),u&&(h.b.success("新增发布单位成功!"),l(a));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return C.a.createElement(z.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:"NewCourse-AppplySchool"===t.actionTabs.key,title:"申请发布单位",width:"600px",footer:null},C.a.createElement(m.a,{className:$.a.formWrap,form:c,labelCol:{span:4},wrapperCol:{span:20},onFinish:u},C.a.createElement(m.a.Item,{label:"发布单位:",name:"name",rules:[{required:!0,message:"请输入学校或工作单位"}]},C.a.createElement(y.a,{placeholder:"请输入发布单位"})),C.a.createElement("div",{className:"".concat($.a.flexRow," ").concat($.a.example)},C.a.createElement("div",null,"示例:"),C.a.createElement("div",{className:$.a.flexColumn},C.a.createElement("div",null,C.a.createElement(B.a,{style:{color:"rgb(82, 196, 26)"}}),C.a.createElement("span",{className:"font14 ml5"},"正确示例:数据结构")),C.a.createElement("div",null,C.a.createElement(V.a,{style:{color:"red"}}),C.a.createElement("span",{className:"font14 ml5"},"错误示例:数据结构",H()().format("YYYY"),"春")))),C.a.createElement(m.a.Item,{label:"地区:",name:"city"},C.a.createElement(W.a,{allowClear:!0,size:"large",options:q.a,placeholder:"请选择所在地",showSearch:{matchInputWidth:!0,filter:G}})),C.a.createElement(m.a.Item,{label:"详细地址:",name:"address"},C.a.createElement(y.a,{placeholder:"请填写完整的地址信息"})),C.a.createElement(m.a.Item,{label:"说明:",name:"remarks"},C.a.createElement(X,{placeholder:"再次说明特别情况(选填)"})),C.a.createElement("div",{className:$.a.footerWrap},C.a.createElement(m.a.Item,null,C.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){r({type:"newCourse/setActionTabs",payload:{}})}},"取消"),C.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:n["newCourse/appplySchool"]},"保存")))))})),Z=y.a.TextArea;b.a.TreeNode,t.default=Object(S.a)((function(e){var t=e.user,n=e.newCourse,r=e.loading;return{user:t,newCourse:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){e.user,e.newCourse;var t,n,b=e.globalSetting,x=e.loading,E=e.dispatch,A=Object(g.a)(e,["user","newCourse","globalSetting","loading","dispatch"]),D=m.a.useForm(),M=Object(v.a)(D,1)[0],_=Object(w.useState)({}),F=Object(v.a)(_,2),P=F[0],I=F[1],z=Object(w.useState)(),W=Object(v.a)(z,2),K=W[0],H=W[1],B=Object(w.useRef)(),V=Object(w.useState)(!0),q=Object(v.a)(V,2),U=q[0],$=q[1],G=Object(w.useState)(!1),X=Object(v.a)(G,2),J=X[0],Q=X[1],ee=Object(w.useState)(),te=Object(v.a)(ee,2),ne=te[0],re=te[1],ae=Object(w.useState)(!0),ie=Object(v.a)(ae,2),oe=ie[0],le=ie[1],se=Object(w.useState)(!1),ce=Object(v.a)(se,2),ue=ce[0],de=ce[1],fe=Object(w.useState)(!1),he=Object(v.a)(fe,2),pe=he[0],me=he[1],ve=Object(w.useState)(-1),ge=Object(v.a)(ve,2),be=ge[0],ye=ge[1],xe=Object(w.useState)(!0),ke=Object(v.a)(xe,2),we=ke[0],Ce=ke[1],Se=Object(w.useState)([]),Oe=Object(v.a)(Se,2),Ee=Oe[0],Ne=Oe[1],je=Object(w.useState)([]),Te=Object(v.a)(je,2),Le=Te[0],Ae=Te[1],De=Object(w.useState)([]),Me=Object(v.a)(De,2),_e=Me[0],Fe=Me[1],Pe=Object(w.useState)([]),Ie=Object(v.a)(Pe,2),Re=Ie[0],ze=Ie[1];Object(w.useEffect)((function(){var e,t;We(),Ke(),B.current=null===(e=A.match.params)||void 0===e?void 0:e.pathId,H(!!B.current),Object(j.V)(null==b||null===(t=b.setting)||void 0===t?void 0:t.name),M.setFieldsValue({learning_notes_title:"课程须知"}),B.current&&He()}),[]);var We=function(){var e=Object(p.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(L.a)("/api/disciplines.json",{method:"get",params:{source:"subject"}});case 2:t=e.sent,Fe(t.disciplines);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ke=function(){var e=Object(p.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ce(!0),e.next=3,E({type:"newCourse/getSchoolOption"});case 3:t=e.sent,Ce(!1),Ne(null==t?void 0:t.schools),Ae(null==t?void 0:t.schools);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),He=function(){var e=Object(p.a)(k.a.mark((function e(){var t,n,r,a,i,o,l,s,c,u,d,f,h;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E({type:"newCourse/getEditCourseData",payload:{id:B.current}});case 2:(t=e.sent)&&(l={name:t.name,name_en:t.name_en,intro:t.description,content:null==t||null===(n=t.toast)||void 0===n?void 0:n.content,notice:t.learning_notes,school_id:null==t?void 0:t.school,learning_notes_title:t.learning_notes_title||"课程须知"},t.disciplines&&t.disciplines.length>0&&ze(t.disciplines),M.setFieldsValue(l),me(null==t||null===(r=t.toast)||void 0===r?void 0:r.is_open),ye(null==t||null===(a=t.toast)||void 0===a?void 0:a.open_num),$(null==t?void 0:t.cust_seq),Q(null==t?void 0:t.show_spoc),de(null==t?void 0:t.show_history),le(null==t?void 0:t.show_tag),(null==t||null===(i=t.attachments)||void 0===i?void 0:i.length)>0&&re([{uid:null==t||null===(s=t.attachments)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.id,name:null==t||null===(u=t.attachments)||void 0===u||null===(d=u[0])||void 0===d?void 0:d.title,response:{id:null==t||null===(f=t.attachments)||void 0===f||null===(h=f[0])||void 0===h?void 0:h.id}}]),I({name:t.name,intro:t.description,notice:t.learning_notes,content:null==t||null===(o=t.toast)||void 0===o?void 0:o.content}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=Object(p.a)(k.a.mark((function e(t){var n,r,a,i,o,l,s,c,u,d,p,m,v,g,b;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(a=t||{}).name,o=a.intro,l=a.notice,s=a.name_en,c=a.learning_notes_title,u=a.sub_discipline_ids,d=a.school_id,p=K?"newCourse/editCourse":"newCourse/submitCourse",m=!1,v=null,Ee.map((function(e){d===e.name&&(m=!0,v=e.id)})),m){e.next=7;break}return e.abrupt("return",h.b.error("未找到包含'".concat(d,"'的发布单位")));case 7:return g={id:B.current,name:i,name_en:s,description:o,learning_notes:l,cust_seq:U,show_spoc:J,school_id:v,show_tag:oe,show_history:ue,learning_notes_title:c,attachment_ids:[null==ne||null===(n=ne[0])||void 0===n||null===(r=n.response)||void 0===r?void 0:r.id],sub_discipline_ids:u,subject_toast_attributes:{is_open:pe,open_num:be,content:t.content}},e.next=10,E({type:p,payload:Object(f.a)({},g)});case 10:(null==(b=e.sent)?void 0:b.subject_id)&&S.d.push("/paths/".concat(b.subject_id));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return C.a.createElement("section",{className:N.a.bg},C.a.createElement("div",{className:N.a.titleWrap},C.a.createElement("span",null,K?"编辑":"创建","实践课程")),C.a.createElement(m.a,{form:M,className:N.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){var e=M.getFieldsValue();"school_id"in e&&Ae(Ee.filter((function(t){return t.name.includes(e.school_id)}))),I(Object(f.a)({},e))},onFinish:Be},C.a.createElement("div",{className:N.a.fieldWrap},C.a.createElement(m.a.Item,{extra:C.a.createElement("div",{className:"tr c-grey-333 font12 mt3"},"".concat((null===(t=P.name)||void 0===t?void 0:t.length)||0,"/60")),name:"name",label:"实践课程名称:",rules:[{required:!0,message:"请输入实践课程名称"}]},C.a.createElement(Z,{maxLength:60,placeholder:"例如:从Python程序设计-入门精通"})),C.a.createElement(m.a.Item,{name:"name_en",label:"英文课程名称:",rules:[{message:"请输入英文课程名称"}]},C.a.createElement(y.a,{maxLength:200,placeholder:"例如:从Python程序设计-入门精通",addonAfter:"".concat((null===(n=P.name_en)||void 0===n?void 0:n.length)||0,"/200")})),C.a.createElement(m.a.Item,{name:"sub_discipline_ids",label:"方向&课程:"},C.a.createElement(R,{defaultValue:Re,dataSource:_e,onChange:function(e){return M.setFieldsValue({sub_discipline_ids:e})}})),C.a.createElement(m.a.Item,{label:"发布单位",name:"school_id",wrapperCol:{span:24},extra:!we&&P.school_id&&!(null!=Ee&&Ee.find((function(e){return e.name===P.school_id})))&&C.a.createElement("div",{className:N.a.schoolHintWrap},C.a.createElement("span",{className:N.a.colorCDCDCD},"未找到包含“",P.school_id,"”的发布单位,"),C.a.createElement("span",{className:"".concat(N.a.color0152d9),onClick:function(){E({type:"newCourse/setActionTabs",payload:{key:"NewCourse-AppplySchool"}})}},"申请新增")),rules:[{required:!0,message:"请输入发布单位"}]},C.a.createElement(d.a,{placeholder:"请输入发布单位",showSearch:!0,options:null==Le?void 0:Le.map((function(e){return{value:e.name}}))}))),C.a.createElement("div",{className:N.a.mdWrap},C.a.createElement(m.a.Item,{name:"intro",label:"简介:",rules:[{required:!0,message:"请输入实践课程的简介"},{max:8e3,message:"实践课程的简介最大限制8000个字符"}]},C.a.createElement(O.a,{watch:!0,defaultValue:P.intro}))),C.a.createElement("div",{className:N.a.mdWrap},C.a.createElement(c.a,{align:"middle",className:"mb10 mt10"},C.a.createElement(u.a,null,C.a.createElement("span",{className:"c-red mr10"},"*")),C.a.createElement(u.a,{flex:"1"},C.a.createElement(m.a.Item,{name:"learning_notes_title",label:"",style:{marginBottom:0},rules:[{required:!0,message:"请输课程须知标题"},{max:15,message:"请输课程须知标题最大限制15个字符"}]},C.a.createElement(y.a,{placeholder:"请输入"})))),C.a.createElement(m.a.Item,{name:"notice",label:"",rules:[{required:!0,message:"请输入实践课程的课程须知"},{max:1e4,message:"实践课程的课程须知最大限制10000个字符"}]},C.a.createElement(O.a,{insertTemp:"1",watch:!0,defaultValue:P.notice}))),C.a.createElement("div",{className:N.a.mdWrap},C.a.createElement("div",{style:{display:"flex",alignItems:"center"}},C.a.createElement(s.a,{checked:pe,style:{marginRight:11},onChange:function(e){me(e)}}),"课程提示(进入课程详情页,提示内容以弹窗的形式进行展示)"),pe&&C.a.createElement(m.a.Item,{style:{marginTop:10},name:"content",label:"",rules:[{required:!0,message:"请输入实践课程的课程提示"},{max:1e4,message:"实践课程的课程提示最大限制10000个字符"}]},C.a.createElement(O.a,{insertTemp:"1",watch:!0,defaultValue:P.content})),pe&&C.a.createElement("div",{style:{marginTop:20}},C.a.createElement("label",null,"提示次数:"),C.a.createElement(l.a.Group,{value:be,onChange:function(e){ye(e.target.value)}},C.a.createElement(l.a,{value:-1},"每次"),C.a.createElement(l.a,{value:1},"一次")))),C.a.createElement("div",{className:N.a.mdWrap},C.a.createElement(o.a,{checked:U,onChange:function(e){$(null==e?void 0:e.target.checked)}},"展示默认章节序号(选中则按序展示所章节序号,不选中则隐藏默认排序)"),C.a.createElement("br",null),C.a.createElement(o.a,{style:{marginTop:"10px"},checked:J,onChange:function(e){return Q(null==e?void 0:e.target.checked)}},"自选并展示SPOC课堂(选中则给出SPOC课堂展示区域,课程创建者/合作者可以自主添加需要展示的课堂)"),C.a.createElement("br",null),C.a.createElement(o.a,{style:{marginTop:"10px"},checked:oe,onChange:function(e){return le(null==e?void 0:e.target.checked)}},"展示技术标签模块(选中后,展示课程的技能标签,不选中则不展示该模块)"),C.a.createElement("br",null),C.a.createElement(o.a,{style:{marginTop:"10px"},checked:ue,onChange:function(e){return de(null==e?void 0:e.target.checked)}},"展示历史课堂模块(选中后,展示课程的历史课堂,不选中则不展示该模块)"),C.a.createElement("br",null),C.a.createElement("div",{style:{display:"flex",marginTop:"10px"}},"自定义顶部背景图:",C.a.createElement(r.a,{action:T.a.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:ne,onChange:function(e){var t,n,r=(null==e?void 0:e.file.size)/1024/1024<2;if(null===(t=e.fileList)||void 0===t||!t.length)return!1;r?re(null==e||null===(n=e.fileList)||void 0===n?void 0:n.slice(-1)):re(Object(i.a)(ne))},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type;if(!t)return h.b.error("只能上传jpg 或者png图片"),!1;var n=e.size/1024/1024<2;return n?t&&n:(h.b.error("文件大小不能大于2m"),!1)},onRemove:function(e){re([])}},C.a.createElement(a.a,null,"上传图片"),"( 本项非必需。如不上传,则使用系统默认图片;如上传,请选择jpg、png格式,大小不超过2M,建议尺寸1920*240像素)"))),C.a.createElement("div",{className:N.a.backgroundFa},C.a.createElement("div",{className:"pt40 mb30"},C.a.createElement(m.a.Item,null,C.a.createElement(a.a,{size:"large",type:"primary",className:"".concat(N.a.button," mr20"),htmlType:"submit",loading:x["newCourse/editCourse"]||x["newCourse/submitCourse"]},"提交"),C.a.createElement(a.a,{size:"large",type:"primary",ghost:!0,className:N.a.button,onClick:function(){return S.d.push(K?"/paths/".concat(B.current):"/paths")}},"取消"))))),C.a.createElement(Y,{schoolName:P.school_id,onSuccess:function(e){Ke(),I(Object(f.a)({},M.getFieldsValue()))}}))}))},XIdC:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/rc-switch/es/index.js ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),a=n(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),s=n.n(l),c=n(/*! rc-util/es/hooks/useMergedState */"6cGi"),u=n(/*! rc-util/es/KeyCode */"4IlW"),d=o.forwardRef((function(e,t){var n,l=e.prefixCls,d=void 0===l?"rc-switch":l,f=e.className,h=e.checked,p=e.defaultChecked,m=e.disabled,v=e.loadingIcon,g=e.checkedChildren,b=e.unCheckedChildren,y=e.onClick,x=e.onChange,k=e.onKeyDown,w=Object(i.a)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),C=Object(c.a)(!1,{value:h,defaultValue:p}),S=Object(a.a)(C,2),O=S[0],E=S[1];function N(e,t){var n=O;return m||(E(n=e),null==x||x(n,t)),n}var j=s()(d,f,(n={},Object(r.a)(n,"".concat(d,"-checked"),O),Object(r.a)(n,"".concat(d,"-disabled"),m),n));return o.createElement("button",Object.assign({},w,{type:"button",role:"switch","aria-checked":O,disabled:m,className:j,ref:t,onKeyDown:function(e){e.which===u.a.LEFT?N(!1,e):e.which===u.a.RIGHT&&N(!0,e),null==k||k(e)},onClick:function(e){var t=N(!O,e);null==y||y(t,e)}}),v,o.createElement("span",{className:"".concat(d,"-inner")},O?g:b))}));d.displayName="Switch",t.a=d},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 M}));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")),h=n("m+aA"),p=n("bdgK"),m=new Map;var v=new p.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 g=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]),p=s.useRef(e);p.current=e;var y=s.useCallback((function(e){var t=p.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),h=Math.floor(s);if(o.current.width!==f||o.current.height!==h||o.current.offsetWidth!==u||o.current.offsetHeight!==d){var m={width:f,height:h,offsetWidth:u,offsetHeight:d};o.current=m;var v=u===Math.round(l)?l:u,g=d===Math.round(s)?s:d,b=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:v,offsetHeight:g});null==i||i(b,e,r),n&&Promise.resolve().then((function(){n(b,e)}))}}),[]);return s.useEffect((function(){var e,t,i=Object(h.a)(r.current)||Object(h.a)(a.current);return i&&!n&&(e=i,t=y,m.has(e)||(m.set(e,new Set),v.observe(e)),m.get(e).add(t)),function(){return function(e,t){m.has(e)&&(m.get(e).delete(t),m.get(e).size||(v.unobserve(e),m.delete(e)))}(i,y)}}),[r.current,n]),s.createElement(g,{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,C=n("bT9E"),S=n("TSYQ"),O=n.n(S),E="\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",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"],j={};function T(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&&j[n])return j[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=N.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),s={sizingStyle:l,paddingSize:i,borderSize:o,boxSizing:a};return t&&n&&(j[n]=s),s}var L,A=n("Gytx"),D=n.n(A);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(L||(L={}));var M=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===L.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=T(e,t),i=a.paddingSize,o=a.borderSize,l=a.boxSizing,s=a.sizingStyle;k.setAttribute("style","".concat(s,";").concat(E)),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 h=k.scrollHeight-i;null!==n&&(u=h*n,"border-box"===l&&(u=u+i+o),f=Math.max(u,f)),null!==r&&(d=h*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:L.RESIZING},(function(){cancelAnimationFrame(i.resizeFrameId),i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:L.RESIZED},(function(){i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:L.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,h=f.textareaStyles,p=f.resizeStatus,m=Object(C.a)(i.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),v=O()(n,l,Object(u.a)({},"".concat(n,"-disabled"),d));"value"in m&&(m.value=m.value||"");var g=Object(c.a)(Object(c.a)(Object(c.a)({},i.props.style),h),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(w,{onResize:i.handleResize,disabled:!(a||o)},s.createElement("textarea",Object(r.a)({},m,{className:v,style:g,ref:i.saveTextArea})))},i.state={textareaStyles:{},resizeStatus:L.NONE},i}return Object(i.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&D()(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),_=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(M,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=_},YNHc:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/pages/Paths/New/Cascader/index.less?modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={cascaderContainer:"cascaderContainer___3XtEo",valueWrap:"valueWrap___3ID8a",valueItem:"valueItem___yKIZs",placeholder:"placeholder___MxiA7",modalWrap:"modalWrap___1ge9B",left:"left___10iyZ",right:"right___KVnmg",disabled:"disabled___2c8qt",emptyWrap:"emptyWrap___dYSJ0"}},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 g}));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 h(){}var p={"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=p[e[n]];if(r)return r}return t[0]}return p[t]||t}var v=null;t.b=function(e){var t=e.width,p=void 0===t?"100%":t,g=e.height,b=void 0===g?"100%":g,y=e.value,x=e.language,k=void 0===x?"javascript":x,w=e.style,C=void 0===w?{}:w,S=e.options,O=void 0===S?{}:S,E=e.overrideServices,N=void 0===E?{}:E,j=e.theme,T=void 0===j?"vs-dark":j,L=e.onEditBlur,A=e.onSave,D=e.autoHeight,M=void 0!==D&&D,_=e.forbidCopy,F=void 0!==_&&_,P=e.onChange,I=void 0===P?h:P,R=e.editorDidMount,z=void 0===R?h:R,W=e.onFocus,K=void 0===W?h:W,H=e.filename,B=void 0===H?"educoder.txt":H,V=(Object(l.a)(e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Object(s.useRef)()),q=Object(s.useRef)({}),U=Object(s.useRef)(),$=Object(s.useRef)(!1),G=Object(s.useRef)(),X=Object(s.useState)(!1),Y=Object(o.a)(X,2),Z=Y[0],J=Y[1];function Q(){a.b.warn(decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"))}function ee(){var e=q.current.instance;if(e){var t=e.getSelection(),n=q.current.pastePos||{},r=new v.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(),A())}Object(s.useEffect)((function(){U.current&&clearTimeout(U.current),U.current=setTimeout((function(){!function(){var e=q.current.instance;if(null!=y&&e&&Z){var t=e.getModel();t&&y!==t.getValue()&&(!0,t.setValue(y),e.layout(),!1)}}()}),500)}),[y,Z,q.current]);var ne=function(){if(M&&q.current.instance){var e=q.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(){V.current&&!Z&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){try{v=e,q.current.instance=v.editor.create(V.current,{value:y,language:m(k),theme:T,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},N);var t=q.current.instance;if(z(t,v),setTimeout((function(){ne(),q.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(B||"educoder.txt",t.getValue())}})}),500),q.current.subscription=t.onDidChangeModelContent((function(e){$.current?clearTimeout(G.current):(ne(),I(t.getValue(),e)),G.current=setTimeout((function(){$.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)}}})}(v),F&&(t.addCommand(v.KeyMod.CtrlCmd|v.KeyMod.Shift|v.KeyCode.KEY_V,(function(){return Q(),null})),t.addCommand(v.KeyMod.CtrlCmd|v.KeyCode.KEY_C,(function(){return Q(),null}))),window.Monaco=v,L&&t.onDidBlurEditorWidget((function(){L(t.getValue())})),K&&t.onDidFocusEditorText((function(){K(t.getValue())})),F){t.addCommand(v.KeyMod.CtrlCmd|v.KeyCode.KEY_V,(function(){return Q(),null})),t.onDidPaste((function(e){q.current.pastePos=e}));try{window.addEventListener("paste",ee)}catch(e){}}var n=function(){var e;return V.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)&&q.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(V.current),e}();return J(!0),function(){var e=q.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),q.current.subscription&&q.current.subscription.dispose(),F&&window.removeEventListener("paste",ee),n.unobserve(V.current)}}catch(e){}}))}),[]),Object(s.useEffect)((function(){if(q.current.instance&&Z)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[A,Z]),Object(s.useEffect)((function(){var e=q.current.instance;if(e&&Z){var t=m(k);v.editor.setModelLanguage(e.getModel(),t),console.log("language:",k,e.getModel(),t)}}),[k,Z]),Object(s.useEffect)((function(){q.current.instance&&Z&&v.editor.setTheme(T)}),[T,Z]),Object(s.useEffect)((function(){var e=q.current.instance;e&&Z&&(e.updateOptions(Object(r.a)({},O)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},O))}),200))}),[JSON.stringify(O),Z]),Object(s.useEffect)((function(){var e=q.current.instance;e&&Z&&e.layout()}),[p,b,Z]);var ae=Object(s.useState)(f(p)),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)({},C),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:de})};function g(e){var t=e.width,a=void 0===t?"100%":t,l=e.height,d=void 0===l?"100%":l,h=e.original,p=e.modified,m=e.language,g=e.options,b=void 0===g?{}:g,y=Object(s.useRef)(),x=Object(s.useState)(null),k=Object(o.a)(x,2),w=k[0],C=k[1];Object(s.useEffect)((function(){y.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(v=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}));C(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:v.editor.createModel(h,m),modified:v.editor.createModel(p,m)})}),[h,p,m,w]);var S={width:f(a),height:f(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:y,style:S})}},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,h=[],p=e;r(p)&&d(p);){if((p=p.parentElement)===f){h.push(p);break}null!=p&&p===document.body&&i(p)&&!i(document.documentElement)||null!=p&&i(p,u)&&h.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),x=y.height,k=y.width,w=y.top,C=y.right,S=y.bottom,O=y.left,E="start"===l||"nearest"===l?w:"end"===l?S:w+x/2,N="center"===s?O+k/2:"end"===s?C:O,j=[],T=0;T<h.length;T++){var L=h[T],A=L.getBoundingClientRect(),D=A.height,M=A.width,_=A.top,F=A.right,P=A.bottom,I=A.left;if("if-needed"===a&&w>=0&&O>=0&&S<=v&&C<=m&&w>=_&&S<=P&&O>=I&&C<=F)return j;var R=getComputedStyle(L),z=parseInt(R.borderLeftWidth,10),W=parseInt(R.borderTopWidth,10),K=parseInt(R.borderRightWidth,10),H=parseInt(R.borderBottomWidth,10),B=0,V=0,q="offsetWidth"in L?L.offsetWidth-L.clientWidth-z-K:0,U="offsetHeight"in L?L.offsetHeight-L.clientHeight-W-H:0;if(f===L)B="start"===l?E:"end"===l?E-v:"nearest"===l?o(b,b+v,v,W,H,b+E,b+E+x,x):E-v/2,V="start"===s?N:"center"===s?N-m/2:"end"===s?N-m:o(g,g+m,m,z,K,g+N,g+N+k,k),B=Math.max(0,B+b),V=Math.max(0,V+g);else{B="start"===l?E-_-W:"end"===l?E-P+H+U:"nearest"===l?o(_,P,D,W,H+U,E,E+x,x):E-(_+D/2)+U/2,V="start"===s?N-I-z:"center"===s?N-(I+M/2)+q/2:"end"===s?N-F+K+q:o(I,F,M,z,K+q,N,N+k,k);var $=L.scrollLeft,G=L.scrollTop;E+=G-(B=Math.max(0,Math.min(G+B,L.scrollHeight-D+U))),N+=$-(V=Math.max(0,Math.min($+V,L.scrollWidth-M+q)))}j.push({el:L,top:B,left:V})}return j};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)}}},Zss7:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/tinycolor2/tinycolor.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;!function(a){var i=/^\s+/,o=/\s+$/,l=0,s=a.round,c=a.min,u=a.max,d=a.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,l=null,s=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,n=!1;if(L[e])e=L[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=B.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=B.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=B.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=B.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=B.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=B.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=B.hex8.exec(e))return{r:F(t[1]),g:F(t[2]),b:F(t[3]),a:z(t[4]),format:n?"name":"hex8"};if(t=B.hex6.exec(e))return{r:F(t[1]),g:F(t[2]),b:F(t[3]),format:n?"name":"hex"};if(t=B.hex4.exec(e))return{r:F(t[1]+""+t[1]),g:F(t[2]+""+t[2]),b:F(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=B.hex3.exec(e))return{r:F(t[1]+""+t[1]),g:F(t[2]+""+t[2]),b:F(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(h=e.r,p=e.g,m=e.b,t={r:255*M(h,255),g:255*M(p,255),b:255*M(m,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=I(e.s),l=I(e.v),t=function(e,t,n){e=6*M(e,360),t=M(t,100),n=M(n,100);var r=a.floor(e),i=e-r,o=n*(1-t),l=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,l,o,o,s,n][c],g:255*[s,n,n,l,o,o][c],b:255*[o,o,s,n,n,l][c]}}(e.h,r,l),d=!0,f="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=I(e.s),s=I(e.l),t=function(e,t,n){var r,a,i;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=M(e,360),t=M(t,100),n=M(n,100),0===t)r=a=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*r,g:255*a,b:255*i}}(e.h,r,s),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var h,p,m;return n=D(n),{ok:d,format:e.format||f,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=l++}function h(e,t,n){e=M(e,255),t=M(t,255),n=M(n,255);var r,a,i=u(e,t,n),o=c(e,t,n),l=(i+o)/2;if(i==o)r=a=0;else{var s=i-o;switch(a=l>.5?s/(2-i-o):s/(i+o),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:a,l:l}}function p(e,t,n){e=M(e,255),t=M(t,255),n=M(n,255);var r,a,i=u(e,t,n),o=c(e,t,n),l=i,s=i-o;if(a=0===i?0:s/i,i==o)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:a,v:l}}function m(e,t,n,r){var a=[P(s(e).toString(16)),P(s(t).toString(16)),P(s(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function v(e,t,n,r){return[P(R(r)),P(s(e).toString(16)),P(s(t).toString(16)),P(s(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s-=t/100,n.s=_(n.s),f(n)}function b(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s+=t/100,n.s=_(n.s),f(n)}function y(e){return f(e).desaturate(100)}function x(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l+=t/100,n.l=_(n.l),f(n)}function k(e,t){t=0===t?0:t||10;var n=f(e).toRgb();return n.r=u(0,c(255,n.r-s(-t/100*255))),n.g=u(0,c(255,n.g-s(-t/100*255))),n.b=u(0,c(255,n.b-s(-t/100*255))),f(n)}function w(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l-=t/100,n.l=_(n.l),f(n)}function C(e,t){var n=f(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,f(n)}function S(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function O(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]}function E(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]}function N(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]}function j(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),a=360/n,i=[f(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(f(r));return i}function T(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,a=n.s,i=n.v,o=[],l=1/t;t--;)o.push(f({h:r,s:a,v:i})),i=(i+l)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var i=[P(s(e).toString(16)),P(s(t).toString(16)),P(s(n).toString(16)),P(R(r))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*M(this._r,255))+"%",g:s(100*M(this._g,255))+"%",b:s(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%)":"rgba("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(A[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);n="#"+v(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(O,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:I(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),a=f(t).toRgb(),i=n/100;return f({r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(a.max(n.getLuminance(),r.getLuminance())+.05)/(a.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,a,i=f.readability(e,t);switch(a=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,n){var r,a,i,o,l=null,s=0;a=(n=n||{}).includeFallbackColors,i=n.level,o=n.size;for(var c=0;c<t.length;c++)(r=f.readability(e,t[c]))>s&&(s=r,l=f(t[c]));return f.isReadable(e,l,{level:i,size:o})||!a?l:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var L=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function _(e){return c(1,u(0,e))}function F(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function R(e){return a.round(255*parseFloat(e)).toString(16)}function z(e){return F(e)/255}var W,K,H,B=(K="[\\s|\\(]+("+(W="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+W+")[,|\\s]+("+W+")\\s*\\)?",H="[\\s|\\(]+("+W+")[,|\\s]+("+W+")[,|\\s]+("+W+")[,|\\s]+("+W+")\\s*\\)?",{CSS_UNIT:new RegExp(W),rgb:new RegExp("rgb"+K),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+K),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+K),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},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"),h=n.n(f),p=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 v(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 g(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)},C=function(e){Object(l.a)(n,e);var t=g(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===p.a.UP){var i=r.getRatio(e);r.up(e,i,null),r.stop()}else if(e.keyCode===p.a.DOWN){var o=r.getRatio(e);r.down(e,o,null),r.stop()}else e.keyCode===p.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===p.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=v(v({},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 p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===p.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,p=t.max,m=t.min,v=t.style,g=t.title,x=t.onMouseEnter,k=t.onMouseLeave,w=t.onMouseOver,C=t.onMouseOut,S=t.required,O=t.onClick,E=t.tabIndex,N=t.type,j=t.placeholder,T=t.id,L=t.inputMode,A=t.pattern,D=t.step,M=t.maxLength,_=t.autoFocus,F=t.name,P=t.onPaste,I=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,W=z.value,K=z.focused,H=h()(n,(e={},Object(a.a)(e,f,!!f),Object(a.a)(e,"".concat(n,"-disabled"),i),Object(a.a)(e,"".concat(n,"-focused"),K),e)),B={};Object.keys(R).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(B[e]=R[e])}));var V=!o&&!i,q=this.getInputDisplayValue(null),U=(W||0===W)&&(isNaN(W)||Number(W)>=p)||i||o,$=(W||0===W)&&(isNaN(W)||Number(W)<=m)||i||o,G=h()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(a.a)({},"".concat(n,"-handler-up-disabled"),U)),X=h()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(a.a)({},"".concat(n,"-handler-down-disabled"),$)),Y=l?{onTouchStart:U?b:this.up,onTouchEnd:this.stop}:{onMouseDown:U?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=l?{onTouchStart:$?b:this.down,onTouchEnd:this.stop}:{onMouseDown:$?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:H,style:v,title:g,onMouseEnter:x,onMouseLeave:k,onMouseOver:w,onMouseOut:C,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"},Y,{role:"button","aria-label":"Increase Value","aria-disabled":U,className:G}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:y})),d.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":$,className:X}),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":p,"aria-valuenow":W,required:S,type:N,placeholder:j,onPaste:P,onClick:O,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:E,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:b,onKeyUp:V?this.onKeyUp:b,autoFocus:_,maxLength:M,readOnly:o,disabled:i,max:p,min:m,step:D,name:F,title:g,id:T,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(q),pattern:A,inputMode:L,onInput:I},B))))}}]),n}(d.a.Component);C.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 S=C;t.a=S},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"),h=n("TSYQ"),p=n.n(h),m=n("sboe"),v=n("OZM5"),g=n("815F"),b=n("ODXe"),y=n("Ff2n"),x=n("+nKL"),k=n("8XRh"),w=n("WaYH"),C=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"]),h=u.useState(!0),v=Object(b.a)(h,2),x=v[0],C=v[1],S=u.useContext(m.a).prefixCls,O=u.useRef(!1),E=function(){O.current||s(),O.current=!0};return Object(u.useEffect)((function(){i&&"hide"===o&&x&&C(!1)}),[i]),Object(u.useEffect)((function(){return i&&l(),function(){i&&E()}}),[]),i?u.createElement(k.default,Object.assign({ref:t,visible:x},a,{motionAppear:"show"===o,onAppearEnd:E,onLeaveEnd:E}),(function(e,t){var n=e.className,r=e.style;return u.createElement("div",{ref:t,className:p()("".concat(S,"-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(g.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}))};C.displayName="MotionTreeNode";var S=u.forwardRef(C);function O(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 E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},N=function(){},j="RC_TREE_MOTION_".concat(Math.random()),T={key:j},L={key:j,level:0,index:0,pos:"0",node:T},A={parent:null,children:[],pos:L.pos,data:T,isStart:[],isEnd:[]};function D(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function M(e){var t=e.data.key,n=e.pos;return Object(g.e)(t,n)}var _=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,h=e.dragging,p=e.dragOverNodeKey,m=e.dropPosition,v=e.motion,k=e.height,w=e.itemHeight,C=e.virtual,T=e.focusable,L=e.activeItem,_=e.focused,F=e.tabIndex,P=e.onKeyDown,I=e.onFocus,R=e.onBlur,z=e.onActiveChange,W=e.onListChangeStart,K=e.onListChangeEnd,H=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"]),B=u.useRef(null);u.useImperativeHandle(t,(function(){return{scrollTo:function(e){B.current.scrollTo(e)}}}));var V=u.useState(a),q=Object(b.a)(V,2),U=q[0],$=q[1],G=u.useState(r),X=Object(b.a)(G,2),Y=X[0],Z=X[1],J=u.useState(r),Q=Object(b.a)(J,2),ee=Q[0],te=Q[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(){Z(r),te(r),ie([]),ce(null),K()}u.useEffect((function(){$(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=Y.findIndex((function(t){return t.data.key===e.key})),n=D(O(Y,r,e.key),C,k,w),i=Y.slice();i.splice(t+1,0,A),te(i),ie(n),ce("show")}else{var o=r.findIndex((function(t){return t.data.key===e.key})),l=D(O(r,Y,e.key),C,k,w),s=r.slice();s.splice(o+1,0,A),te(s),ie(l),ce("hide")}else Y!==r&&(Z(r),te(r))}),[a,r]),u.useEffect((function(){h||ue()}),[h]);var de=v?ee:r,fe={expandedKeys:a,selectedKeys:i,loadedKeys:l,loadingKeys:s,checkedKeys:o,halfCheckedKeys:c,dragOverNodeKey:p,dropPosition:m,keyEntities:d};return u.createElement(u.Fragment,null,_&&L&&u.createElement("span",{style:E,"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}(L)),u.createElement("div",{role:"tree"},u.createElement("input",{style:E,disabled:!1===T||f,tabIndex:!1!==T?F:null,onKeyDown:P,onFocus:I,onBlur:R,value:"",onChange:N})),u.createElement(x.a,Object.assign({},H,{data:de,itemKey:M,height:k,fullHeight:!1,virtual:C,itemHeight:w,prefixCls:"".concat(n,"-list"),ref:B}),(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(g.e)(r,t);delete a.children;var s=Object(g.f)(l,fe);return u.createElement(S,Object.assign({},a,s,{active:L&&r===L.data.key,pos:t,data:e.data,isStart:i,isEnd:o,motion:v,motionNodes:r===j?ae:null,motionType:se,onMotionStart:W,onMotionEnd:ue,treeNodeRequiredProps:fe,onMouseMove:function(){z(null)}}))})))}));_.displayName="NodeList";var F=_,P=n("NvD2"),I=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(v.b)(a,l);e.setState({dragging:!0,dragNodesKeys:Object(v.g)(l,i)}),e.setExpandedKeys(s),o&&o({event:t,node:Object(g.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(v.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(v.a)(a,d)),"expandedKeys"in e.props||e.setExpandedKeys(r),s&&s({event:t,node:Object(g.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(v.c)(t,n);if(o===e.state.dropPosition)return;e.setState({dropPosition:o})}a&&a({event:t,node:Object(g.b)(n.props)})}},e.onNodeDragLeave=function(t,n){var r=e.props.onDragLeave;e.setState({dragOverNodeKey:""}),r&&r({event:t,node:Object(g.b)(n.props)})},e.onNodeDragEnd=function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:""}),e.cleanDragState(),r&&r({event:t,node:Object(g.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(v.k)(u),h={event:t,node:Object(g.b)(n.props),dragNode:e.dragNode?Object(g.b)(e.dragNode.props):null,dragNodesKeys:i.slice(),dropPosition:o+Number(d[d.length-1]),dropToGap:!1};0!==o&&(h.dropToGap=!0),l&&l(h),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(v.a)(r,c):[c]:Object(v.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,h=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(d){var m=r?Object(v.a)(s,h):Object(v.b)(s,h);a={checked:m,halfChecked:Object(v.b)(c,h)},p.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 g=Object(P.a)([].concat(Object(i.a)(s),[h]),!0,l),b=g.checkedKeys,y=g.halfCheckedKeys;if(!r){var x=new Set(b);x.delete(h);var k=Object(P.a)(Array.from(x),{checked:!1,halfCheckedKeys:y},l);b=k.checkedKeys,y=k.halfCheckedKeys}a=b,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=y,b.forEach((function(e){var t=l[e];if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:b},!1,{halfCheckedKeys:y})}f&&f(a,p)},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(v.a)(a,d),l=Object(v.b)(i,d);u&&u(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState({loadingKeys:l}),n()})),{loadingKeys:Object(v.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(g.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(v.a)(r,s):Object(v.b)(r,s),e.setExpandedKeys(r),o&&o(r,{node:n,expanded:d,nativeEvent:t.nativeEvent}),d&&l){var h=e.onNodeLoad(n);h&&h.then((function(){var t=Object(g.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 h=e.getTreeNodeRequiredProps(),p=!1===f.data.isLeaf||!!(f.data.children||[]).length,m=Object(g.b)(Object(a.a)(Object(a.a)({},Object(g.f)(r,h)),{},{data:f.data,active:!0}));switch(t.which){case d.a.LEFT:p&&i.includes(r)?e.onNodeExpand({},m):f.parent&&e.onActiveChange(f.parent.data.key),t.preventDefault();break;case d.a.RIGHT:p&&!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,h=s.showLine,g=s.focusable,b=s.tabIndex,y=void 0===b?0:b,x=s.selectable,k=s.showIcon,w=s.icon,C=s.switcherIcon,S=s.draggable,O=s.checkable,E=s.checkStrictly,N=s.disabled,j=s.motion,T=s.loadData,L=s.filterTreeNode,A=s.height,D=s.itemHeight,M=s.virtual,_=s.titleRender,P=s.onContextMenu,I=Object(v.f)(this.props);return u.createElement(m.a.Provider,{value:{prefixCls:c,selectable:x,showIcon:k,icon:w,switcherIcon:C,draggable:S,checkable:O,checkStrictly:E,disabled:N,keyEntities:i,loadData:T,filterTreeNode:L,titleRender:_,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:p()(c,d,(e={},Object(r.a)(e,"".concat(c,"-show-line"),h),Object(r.a)(e,"".concat(c,"-focused"),n),Object(r.a)(e,"".concat(c,"-active-focused"),null!==l),e))},u.createElement(F,Object.assign({ref:this.listRef,prefixCls:c,style:f,data:a,disabled:N,selectable:x,checkable:!!O,motion:j,dragging:o,height:A,itemHeight:D,virtual:M,focusable:g,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(),I))))}}],[{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(g.c)(e.children)),n){o.treeData=n;var s=Object(g.a)(n);o.keyEntities=Object(a.a)(Object(r.a)({},j,L),s.keyEntities)}var c,u=o.keyEntities||t.keyEntities;if(l("expandedKeys")||i&&l("autoExpandParent"))o.expandedKeys=e.autoExpandParent||!i&&e.defaultExpandParent?Object(v.e)(e.expandedKeys,u):e.expandedKeys;else if(!i&&e.defaultExpandAll){var d=Object(a.a)({},u);delete d[j],o.expandedKeys=Object.keys(d).map((function(e){return d[e].key}))}else!i&&e.defaultExpandedKeys&&(o.expandedKeys=e.autoExpandParent||e.defaultExpandParent?Object(v.e)(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,n||o.expandedKeys){var h=Object(g.d)(n||t.treeData,o.expandedKeys||t.expandedKeys);o.flattenNodes=h}if((e.selectable&&(l("selectedKeys")?o.selectedKeys=Object(v.d)(e.selectedKeys,e):!i&&e.defaultSelectedKeys&&(o.selectedKeys=Object(v.d)(e.defaultSelectedKeys,e))),e.checkable)&&(l("checkedKeys")?c=Object(v.j)(e.checkedKeys)||{}:!i&&e.defaultCheckedKeys?c=Object(v.j)(e.defaultCheckedKeys)||{}:n&&(c=Object(v.j)(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var p=c,m=p.checkedKeys,b=void 0===m?[]:m,y=p.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);I.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:[]},I.TreeNode=w.a;var R=I;t.b=R},gJ3r:
|
|
|
/*!*******************************!*\
|
|
|
!*** ./src/utils/cityData.ts ***!
|
|
|
\*******************************/
|
|
|
/*! exports provided: CityData */
|
|
|
/*! exports used: CityData */function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=[{value:"北京",label:"北京",children:[{value:"东城",label:"东城"},{value:"西城",label:"西城"},{value:"朝阳",label:"朝阳"},{value:"丰台",label:"丰台"},{value:"石景山",label:"石景山"},{value:"海淀",label:"海淀"},{value:"门头沟",label:"门头沟"},{value:"房山",label:"房山"},{value:"通州",label:"通州"},{value:"顺义",label:"顺义"},{value:"昌平",label:"昌平"},{value:"大兴",label:"大兴"},{value:"平谷",label:"平谷"},{value:"怀柔",label:"怀柔"},{value:"密云",label:"密云"},{value:"延庆",label:"延庆"}]},{value:"上海",label:"上海",children:[{value:"崇明",label:"崇明"},{value:"黄浦",label:"黄浦"},{value:"卢湾",label:"卢湾"},{value:"徐汇",label:"徐汇"},{value:"长宁",label:"长宁"},{value:"静安",label:"静安"},{value:"普陀",label:"普陀"},{value:"闸北",label:"闸北"},{value:"虹口",label:"虹口"},{value:"杨浦",label:"杨浦"},{value:"闵行",label:"闵行"},{value:"宝山",label:"宝山"},{value:"嘉定",label:"嘉定"},{value:"浦东",label:"浦东"},{value:"金山",label:"金山"},{value:"松江",label:"松江"},{value:"青浦",label:"青浦"},{value:"南汇",label:"南汇"},{value:"奉贤",label:"奉贤"}]},{value:"广东",label:"广东",children:[{value:"广州",label:"广州"},{value:"深圳",label:"深圳"},{value:"珠海",label:"珠海"},{value:"东莞",label:"东莞"},{value:"中山",label:"中山"},{value:"佛山",label:"佛山"},{value:"惠州",label:"惠州"},{value:"河源",label:"河源"},{value:"潮州",label:"潮州"},{value:"江门",label:"江门"},{value:"揭阳",label:"揭阳"},{value:"茂名",label:"茂名"},{value:"梅州",label:"梅州"},{value:"清远",label:"清远"},{value:"汕头",label:"汕头"},{value:"汕尾",label:"汕尾"},{value:"韶关",label:"韶关"},{value:"顺德",label:"顺德"},{value:"阳江",label:"阳江"},{value:"云浮",label:"云浮"},{value:"湛江",label:"湛江"},{value:"肇庆",label:"肇庆"}]},{value:"江苏",label:"江苏",children:[{value:"南京",label:"南京"},{value:"常熟",label:"常熟"},{value:"常州",label:"常州"},{value:"海门",label:"海门"},{value:"淮安",label:"淮安"},{value:"江都",label:"江都"},{value:"江阴",label:"江阴"},{value:"昆山",label:"昆山"},{value:"连云港",label:"连云港"},{value:"南通",label:"南通"},{value:"启东",label:"启东"},{value:"沭阳",label:"沭阳"},{value:"宿迁",label:"宿迁"},{value:"苏州",label:"苏州"},{value:"太仓",label:"太仓"},{value:"泰州",label:"泰州"},{value:"同里",label:"同里"},{value:"无锡",label:"无锡"},{value:"徐州",label:"徐州"},{value:"盐城",label:"盐城"},{value:"扬州",label:"扬州"},{value:"宜兴",label:"宜兴"},{value:"仪征",label:"仪征"},{value:"张家港",label:"张家港"},{value:"镇江",label:"镇江"}]},{value:"重庆",label:"重庆",children:[{value:"万州",label:"万州"},{value:"涪陵",label:"涪陵"},{value:"渝中",label:"渝中"},{value:"大渡口",label:"大渡口"},{value:"江北",label:"江北"},{value:"沙坪坝",label:"沙坪坝"},{value:"九龙坡",label:"九龙坡"},{value:"南岸",label:"南岸"},{value:"北碚",label:"北碚"},{value:"万盛",label:"万盛"},{value:"双挢",label:"双挢"},{value:"渝北",label:"渝北"},{value:"巴南",label:"巴南"},{value:"黔江",label:"黔江"},{value:"长寿",label:"长寿"},{value:"綦江",label:"綦江"},{value:"潼南",label:"潼南"},{value:"铜梁",label:"铜梁"},{value:"大足",label:"大足"},{value:"荣昌",label:"荣昌"},{value:"壁山",label:"壁山"},{value:"梁平",label:"梁平"},{value:"城口",label:"城口"},{value:"丰都",label:"丰都"},{value:"垫江",label:"垫江"},{value:"武隆",label:"武隆"},{value:"忠县",label:"忠县"},{value:"开县",label:"开县"},{value:"云阳",label:"云阳"},{value:"奉节",label:"奉节"},{value:"巫山",label:"巫山"},{value:"巫溪",label:"巫溪"},{value:"石柱",label:"石柱"},{value:"秀山",label:"秀山"},{value:"酉阳",label:"酉阳"},{value:"彭水",label:"彭水"},{value:"江津",label:"江津"},{value:"合川",label:"合川"},{value:"永川",label:"永川"},{value:"南川",label:"南川"}]},{value:"安徽",label:"安徽",children:[{value:"合肥",label:"合肥"},{value:"安庆",label:"安庆"},{value:"蚌埠",label:"蚌埠"},{value:"亳州",label:"亳州"},{value:"巢湖",label:"巢湖"},{value:"滁州",label:"滁州"},{value:"阜阳",label:"阜阳"},{value:"贵池",label:"贵池"},{value:"淮北",label:"淮北"},{value:"淮化",label:"淮化"},{value:"淮南",label:"淮南"},{value:"黄山",label:"黄山"},{value:"九华山",label:"九华山"},{value:"六安",label:"六安"},{value:"马鞍山",label:"马鞍山"},{value:"宿州",label:"宿州"},{value:"铜陵",label:"铜陵"},{value:"屯溪",label:"屯溪"},{value:"芜湖",label:"芜湖"},{value:"宣城",label:"宣城"}]},{value:"福建",label:"福建",children:[{value:"福州",label:"福州"},{value:"厦门",label:"厦门"},{value:"泉州",label:"泉州"},{value:"漳州",label:"漳州"},{value:"龙岩",label:"龙岩"},{value:"南平",label:"南平"},{value:"宁德",label:"宁德"},{value:"莆田",label:"莆田"},{value:"三明",label:"三明"}]},{value:"甘肃",label:"甘肃",children:[{value:"兰州",label:"兰州"},{value:"嘉峪关",label:"嘉峪关"},{value:"白银",label:"白银"},{value:"定西",label:"定西"},{value:"敦煌",label:"敦煌"},{value:"甘南",label:"甘南"},{value:"金昌",label:"金昌"},{value:"酒泉",label:"酒泉"},{value:"临夏",label:"临夏"},{value:"平凉",label:"平凉"},{value:"天水",label:"天水"},{value:"陇南",label:"陇南"},{value:"武威",label:"武威"},{value:"西峰",label:"西峰"},{value:"张掖",label:"张掖"}]},{value:"广西",label:"广西",children:[{value:"南宁",label:"南宁"},{value:"来宾",label:"来宾"},{value:"百色",label:"百色"},{value:"北海",label:"北海"},{value:"桂林",label:"桂林"},{value:"防城港",label:"防城港"},{value:"贵港",label:"贵港"},{value:"河池",label:"河池"},{value:"贺州",label:"贺州"},{value:"柳州",label:"柳州"},{value:"钦州",label:"钦州"},{value:"梧州",label:"梧州"},{value:"玉林",label:"玉林"}]},{value:"贵州",label:"贵州",children:[{value:"贵阳",label:"贵阳"},{value:"安顺",label:"安顺"},{value:"毕节",label:"毕节"},{value:"都匀",label:"都匀"},{value:"凯里",label:"凯里"},{value:"六盘水",label:"六盘水"},{value:"铜仁",label:"铜仁"},{value:"兴义",label:"兴义"},{value:"玉屏",label:"玉屏"},{value:"遵义",label:"遵义"}]},{value:"海南",label:"海南",children:[{value:"海口",label:"海口"},{value:"儋县",label:"儋县"},{value:"陵水",label:"陵水"},{value:"琼海",label:"琼海"},{value:"三亚",label:"三亚"},{value:"通什",label:"通什"},{value:"万宁",label:"万宁"}]},{value:"河北",label:"河北",children:[{value:"石家庄",label:"石家庄"},{value:"保定",label:"保定"},{value:"北戴河",label:"北戴河"},{value:"沧州",label:"沧州"},{value:"承德",label:"承德"},{value:"丰润",label:"丰润"},{value:"邯郸",label:"邯郸"},{value:"衡水",label:"衡水"},{value:"廊坊",label:"廊坊"},{value:"南戴河",label:"南戴河"},{value:"秦皇岛",label:"秦皇岛"},{value:"唐山",label:"唐山"},{value:"新城",label:"新城"},{value:"邢台",label:"邢台"},{value:"张家口",label:"张家口"}]},{value:"黑龙江",label:"黑龙江",children:[{value:"哈尔滨",label:"哈尔滨"},{value:"北安",label:"北安"},{value:"大庆",label:"大庆"},{value:"大兴安岭",label:"大兴安岭"},{value:"鹤岗",label:"鹤岗"},{value:"黑河",label:"黑河"},{value:"佳木斯",label:"佳木斯"},{value:"鸡西",label:"鸡西"},{value:"牡丹江",label:"牡丹江"},{value:"齐齐哈尔",label:"齐齐哈尔"},{value:"七台河",label:"七台河"},{value:"双鸭山",label:"双鸭山"},{value:"绥化",label:"绥化"},{value:"伊春",label:"伊春"}]},{value:"河南",label:"河南",children:[{value:"郑州",label:"郑州"},{value:"安阳",label:"安阳"},{value:"鹤壁",label:"鹤壁"},{value:"潢川",label:"潢川"},{value:"焦作",label:"焦作"},{value:"济源",label:"济源"},{value:"开封",label:"开封"},{value:"漯河",label:"漯河"},{value:"洛阳",label:"洛阳"},{value:"南阳",label:"南阳"},{value:"平顶山",label:"平顶山"},{value:"濮阳",label:"濮阳"},{value:"三门峡",label:"三门峡"},{value:"商丘",label:"商丘"},{value:"新乡",label:"新乡"},{value:"信阳",label:"信阳"},{value:"许昌",label:"许昌"},{value:"周口",label:"周口"},{value:"驻马店",label:"驻马店"}]},{value:"香港",label:"香港",children:[{value:"香港",label:"香港"},{value:"九龙",label:"九龙"},{value:"新界",label:"新界"}]},{value:"湖北",label:"湖北",children:[{value:"武汉",label:"武汉"},{value:"天门",label:"天门"},{value:"恩施",label:"恩施"},{value:"鄂州",label:"鄂州"},{value:"黄冈",label:"黄冈"},{value:"黄石",label:"黄石"},{value:"荆门",label:"荆门"},{value:"荆州",label:"荆州"},{value:"潜江",label:"潜江"},{value:"十堰",label:"十堰"},{value:"随州",label:"随州"},{value:"武穴",label:"武穴"},{value:"仙桃",label:"仙桃"},{value:"咸宁",label:"咸宁"},{value:"襄阳",label:"襄阳"},{value:"襄樊",label:"襄樊"},{value:"孝感",label:"孝感"},{value:"宜昌",label:"宜昌"}]},{value:"湖南",label:"湖南",children:[{value:"长沙",label:"长沙"},{value:"常德",label:"常德"},{value:"郴州",label:"郴州"},{value:"衡阳",label:"衡阳"},{value:"怀化",label:"怀化"},{value:"吉首",label:"吉首"},{value:"娄底",label:"娄底"},{value:"邵阳",label:"邵阳"},{value:"湘潭",label:"湘潭"},{value:"益阳",label:"益阳"},{value:"岳阳",label:"岳阳"},{value:"永州",label:"永州"},{value:"张家界",label:"张家界"},{value:"株洲",label:"株洲"}]},{value:"江西",label:"江西",children:[{value:"南昌",label:"南昌"},{value:"抚州",label:"抚州"},{value:"赣州",label:"赣州"},{value:"吉安",label:"吉安"},{value:"景德镇",label:"景德镇"},{value:"井冈山",label:"井冈山"},{value:"九江",label:"九江"},{value:"庐山",label:"庐山"},{value:"萍乡",label:"萍乡"},{value:"上饶",label:"上饶"},{value:"新余",label:"新余"},{value:"宜春",label:"宜春"},{value:"鹰潭",label:"鹰潭"}]},{value:"吉林",label:"吉林",children:[{value:"长春",label:"长春"},{value:"吉林",label:"吉林"},{value:"白城",label:"白城"},{value:"白山",label:"白山"},{value:"珲春",label:"珲春"},{value:"辽源",label:"辽源"},{value:"梅河",label:"梅河"},{value:"四平",label:"四平"},{value:"松原",label:"松原"},{value:"通化",label:"通化"},{value:"延吉",label:"延吉"}]},{value:"辽宁",label:"辽宁",children:[{value:"沈阳",label:"沈阳"},{value:"鞍山",label:"鞍山"},{value:"本溪",label:"本溪"},{value:"朝阳",label:"朝阳"},{value:"大连",label:"大连"},{value:"丹东",label:"丹东"},{value:"抚顺",label:"抚顺"},{value:"阜新",label:"阜新"},{value:"葫芦岛",label:"葫芦岛"},{value:"锦州",label:"锦州"},{value:"辽阳",label:"辽阳"},{value:"盘锦",label:"盘锦"},{value:"铁岭",label:"铁岭"},{value:"营口",label:"营口"}]},{value:"澳门",label:"澳门",children:[{value:"澳门",label:"澳门"}]},{value:"内蒙古",label:"内蒙古",children:[{value:"呼和浩特",label:"呼和浩特"},{value:"阿拉善盟",label:"阿拉善盟"},{value:"包头",label:"包头"},{value:"赤峰",label:"赤峰"},{value:"东胜",label:"东胜"},{value:"海拉尔",label:"海拉尔"},{value:"集宁",label:"集宁"},{value:"临河",label:"临河"},{value:"通辽",label:"通辽"},{value:"乌海",label:"乌海"},{value:"乌兰浩特",label:"乌兰浩特"},{value:"锡林浩特",label:"锡林浩特"}]},{value:"宁夏",label:"宁夏",children:[{value:"银川",label:"银川"},{value:"固源",label:"固源"},{value:"石嘴山",label:"石嘴山"},{value:"吴忠",label:"吴忠"}]},{value:"青海",label:"青海",children:[{value:"西宁",label:"西宁"},{value:"德令哈",label:"德令哈"},{value:"格尔木",label:"格尔木"},{value:"共和",label:"共和"},{value:"海东",label:"海东"},{value:"海晏",label:"海晏"},{value:"玛沁",label:"玛沁"},{value:"同仁",label:"同仁"},{value:"玉树",label:"玉树"}]},{value:"山东",label:"山东",children:[{value:"济南",label:"济南"},{value:"滨州",label:"滨州"},{value:"兖州",label:"兖州"},{value:"德州",label:"德州"},{value:"东营",label:"东营"},{value:"菏泽",label:"菏泽"},{value:"济宁",label:"济宁"},{value:"莱芜",label:"莱芜"},{value:"聊城",label:"聊城"},{value:"临沂",label:"临沂"},{value:"蓬莱",label:"蓬莱"},{value:"青岛",label:"青岛"},{value:"曲阜",label:"曲阜"},{value:"日照",label:"日照"},{value:"泰安",label:"泰安"},{value:"潍坊",label:"潍坊"},{value:"威海",label:"威海"},{value:"烟台",label:"烟台"},{value:"枣庄",label:"枣庄"},{value:"淄博",label:"淄博"}]},{value:"山西",label:"山西",children:[{value:"太原",label:"太原"},{value:"吕梁",label:"吕梁"},{value:"长治",label:"长治"},{value:"大同",label:"大同"},{value:"候马",label:"候马"},{value:"晋城",label:"晋城"},{value:"离石",label:"离石"},{value:"临汾",label:"临汾"},{value:"宁武",label:"宁武"},{value:"朔州",label:"朔州"},{value:"忻州",label:"忻州"},{value:"阳泉",label:"阳泉"},{value:"榆次",label:"榆次"},{value:"晋中",label:"晋中"},{value:"运城",label:"运城"}]},{value:"陕西",label:"陕西",children:[{value:"西安",label:"西安"},{value:"安康",label:"安康"},{value:"宝鸡",label:"宝鸡"},{value:"汉中",label:"汉中"},{value:"渭南",label:"渭南"},{value:"商州",label:"商州"},{value:"绥德",label:"绥德"},{value:"铜川",label:"铜川"},{value:"咸阳",label:"咸阳"},{value:"延安",label:"延安"},{value:"榆林",label:"榆林"}]},{value:"四川",label:"四川",children:[{value:"成都",label:"成都"},{value:"巴中",label:"巴中"},{value:"达川",label:"达川"},{value:"德阳",label:"德阳"},{value:"都江堰",label:"都江堰"},{value:"峨眉山",label:"峨眉山"},{value:"涪陵",label:"涪陵"},{value:"广安",label:"广安"},{value:"广元",label:"广元"},{value:"九寨沟",label:"九寨沟"},{value:"康定",label:"康定"},{value:"乐山",label:"乐山"},{value:"泸州",label:"泸州"},{value:"马尔康",label:"马尔康"},{value:"绵阳",label:"绵阳"},{value:"眉山",label:"眉山"},{value:"南充",label:"南充"},{value:"内江",label:"内江"},{value:"攀枝花",label:"攀枝花"},{value:"遂宁",label:"遂宁"},{value:"汶川",label:"汶川"},{value:"西昌",label:"西昌"},{value:"雅安",label:"雅安"},{value:"宜宾",label:"宜宾"},{value:"自贡",label:"自贡"},{value:"资阳",label:"资阳"}]},{value:"台湾",label:"台湾",children:[{value:"台北",label:"台北"},{value:"基隆",label:"基隆"},{value:"台南",label:"台南"},{value:"台中",label:"台中"},{value:"高雄",label:"高雄"},{value:"屏东",label:"屏东"},{value:"南投",label:"南投"},{value:"云林",label:"云林"},{value:"新竹",label:"新竹"},{value:"彰化",label:"彰化"},{value:"苗栗",label:"苗栗"},{value:"嘉义",label:"嘉义"},{value:"桃园",label:"桃园"},{value:"宜兰",label:"宜兰"},{value:"台东",label:"台东"},{value:"金门",label:"金门"},{value:"马祖",label:"马祖"},{value:"澎湖",label:"澎湖"}]},{value:"天津",label:"天津",children:[{value:"天津",label:"天津"},{value:"和平",label:"和平"},{value:"东丽",label:"东丽"},{value:"河东",label:"河东"},{value:"西青",label:"西青"},{value:"河西",label:"河西"},{value:"津南",label:"津南"},{value:"南开",label:"南开"},{value:"北辰",label:"北辰"},{value:"河北",label:"河北"},{value:"武清",label:"武清"},{value:"红挢",label:"红挢"},{value:"塘沽",label:"塘沽"},{value:"汉沽",label:"汉沽"},{value:"大港",label:"大港"},{value:"宁河",label:"宁河"},{value:"静海",label:"静海"},{value:"宝坻",label:"宝坻"},{value:"蓟县",label:"蓟县"}]},{value:"新疆",label:"新疆",children:[{value:"乌鲁木齐",label:"乌鲁木齐"},{value:"阿克苏",label:"阿克苏"},{value:"阿勒泰",label:"阿勒泰"},{value:"阿图什",label:"阿图什"},{value:"博乐",label:"博乐"},{value:"昌吉",label:"昌吉"},{value:"东山",label:"东山"},{value:"哈密",label:"哈密"},{value:"和田",label:"和田"},{value:"喀什",label:"喀什"},{value:"克拉玛依",label:"克拉玛依"},{value:"库车",label:"库车"},{value:"库尔勒",label:"库尔勒"},{value:"奎屯",label:"奎屯"},{value:"石河子",label:"石河子"},{value:"塔城",label:"塔城"},{value:"吐鲁番",label:"吐鲁番"},{value:"伊宁",label:"伊宁"}]},{value:"西藏",label:"西藏",children:[{value:"拉萨",label:"拉萨"},{value:"阿里",label:"阿里"},{value:"昌都",label:"昌都"},{value:"林芝",label:"林芝"},{value:"那曲",label:"那曲"},{value:"日喀则",label:"日喀则"},{value:"山南",label:"山南"}]},{value:"云南",label:"云南",children:[{value:"昆明",label:"昆明"},{value:"大理",label:"大理"},{value:"保山",label:"保山"},{value:"楚雄",label:"楚雄"},{value:"大理",label:"大理"},{value:"东川",label:"东川"},{value:"个旧",label:"个旧"},{value:"景洪",label:"景洪"},{value:"开远",label:"开远"},{value:"临沧",label:"临沧"},{value:"丽江",label:"丽江"},{value:"六库",label:"六库"},{value:"潞西",label:"潞西"},{value:"曲靖",label:"曲靖"},{value:"思茅",label:"思茅"},{value:"文山",label:"文山"},{value:"西双版纳",label:"西双版纳"},{value:"玉溪",label:"玉溪"},{value:"中甸",label:"中甸"},{value:"昭通",label:"昭通"}]},{value:"浙江",label:"浙江",children:[{value:"杭州",label:"杭州"},{value:"温州",label:"温州"},{value:"安吉",label:"安吉"},{value:"慈溪",label:"慈溪"},{value:"定海",label:"定海"},{value:"奉化",label:"奉化"},{value:"海盐",label:"海盐"},{value:"黄岩",label:"黄岩"},{value:"湖州",label:"湖州"},{value:"嘉兴",label:"嘉兴"},{value:"金华",label:"金华"},{value:"临安",label:"临安"},{value:"临海",label:"临海"},{value:"丽水",label:"丽水"},{value:"宁波",label:"宁波"},{value:"瓯海",label:"瓯海"},{value:"平湖",label:"平湖"},{value:"千岛湖",label:"千岛湖"},{value:"衢州",label:"衢州"},{value:"江山",label:"江山"},{value:"瑞安",label:"瑞安"},{value:"绍兴",label:"绍兴"},{value:"嵊州",label:"嵊州"},{value:"台州",label:"台州"},{value:"温岭",label:"温岭"},{value:"余姚",label:"余姚"},{value:"舟山",label:"舟山"}]},{value:"海外",label:"海外",children:[{value:"美国",label:"美国"},{value:"日本",label:"日本"},{value:"英国",label:"英国"},{value:"法国",label:"法国"},{value:"德国",label:"德国"},{value:"其他",label:"其他"}]}]},h78n:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-progress/es/index.js + 3 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: Line, Circle, default */
|
|
|
/*! exports used: Circle */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.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";n.d(t,"a",(function(){return C}));var r=n("q1tI"),a=n.n(r),i=n("TSYQ"),o=n.n(i),l={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(a){var i=t[a].current;if(i){r=!0;var o=i.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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 f(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var h=function(e){var t=e.className,n=e.percent,r=e.prefixCls,i=e.strokeColor,l=e.strokeLinecap,d=e.strokeWidth,h=e.style,p=e.trailColor,m=e.trailWidth,v=e.transition,g=f(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete g.gapPosition;var b=Array.isArray(n)?n:[n],y=Array.isArray(i)?i:[i],x=u(s(b),1)[0],k=d/2,w=100-d/2,C="M ".concat("round"===l?k:0,",").concat(k,"\n L ").concat("round"===l?w:100,",").concat(k),S="0 0 100 ".concat(d),O=0;return a.a.createElement("svg",c({className:o()("".concat(r,"-line"),t),viewBox:S,preserveAspectRatio:"none",style:h},g),a.a.createElement("path",{className:"".concat(r,"-line-trail"),d:C,strokeLinecap:l,stroke:p,strokeWidth:m||d,fillOpacity:"0"}),b.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(O,"px"),transition:v||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},i=y[t]||y[y.length-1];return O+=e,a.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:C,strokeLinecap:l,stroke:i,strokeWidth:d,fillOpacity:"0",ref:x[t],style:n})})))};h.defaultProps=l;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(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 g(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=0;function y(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function k(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0,o=50-r/2,l=0,s=-o,c=0,u=-2*o;switch(i){case"left":l=-o,s=0,c=2*o,u=0;break;case"right":l=o,s=0,c=-2*o,u=0;break;case"bottom":s=o,u=2*o}var d="M 50,50 m ".concat(l,",").concat(s,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),f=2*Math.PI*o,h={stroke:n,strokeDasharray:"".concat(t/100*(f-a),"px ").concat(f,"px"),strokeDashoffset:"-".concat(a/2+e/100*(f-a),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:d,pathStyle:h}}var w=function(e){var t,n=e.prefixCls,i=e.strokeWidth,l=e.trailWidth,c=e.gapDegree,u=e.gapPosition,d=e.trailColor,f=e.strokeLinecap,h=e.style,v=e.className,w=e.strokeColor,C=e.percent,S=g(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),O=Object(r.useMemo)((function(){return b+=1}),[]),E=k(0,100,d,i,c,u),N=E.pathString,j=E.pathStyle,T=x(C),L=x(w),A=L.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),D=m(s(T),1)[0];return a.a.createElement("svg",p({className:o()("".concat(n,"-circle"),v),viewBox:"0 0 100 100",style:h},S),A&&a.a.createElement("defs",null,a.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(O),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(A).sort((function(e,t){return y(e)-y(t)})).map((function(e,t){return a.a.createElement("stop",{key:t,offset:e,stopColor:A[e]})})))),a.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:N,stroke:d,strokeLinecap:f,strokeWidth:l||i,fillOpacity:"0",style:j}),(t=0,T.map((function(e,r){var o=L[r]||L[L.length-1],l="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(O,")"):"",s=k(t,e,o,i,c,u);return t+=e,a.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:s.pathString,stroke:l,strokeLinecap:f,strokeWidth:i,opacity:0===e?0:1,fillOpacity:"0",style:s.pathStyle,ref:D[r]})}))).reverse())};w.defaultProps=l;var C=w},hxT0:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/pages/Paths/New/index.less?modules ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={bg:"bg___2samk",flexRow:"flexRow___2Ocys",flexJustifyCenter:"flexJustifyCenter___14s6l",flexAlignEnd:"flexAlignEnd___1lHt8",flexAlignCenter:"flexAlignCenter___2PtCV",flexColumn:"flexColumn___2Ssa4",formWrap:"formWrap___3Fcg8",titleWrap:"titleWrap___3U2TN",fieldWrap:"fieldWrap___3K6pg",mdWrap:"mdWrap___3o_rf",backgroundFa:"backgroundFa___3dwFi",button:"button___1vOOT",cascaderWrap:"cascaderWrap___ETHsj",listItem:"listItem___C62yl",right:"right___1iif8",one:"one___2Qd4F",schoolHintWrap:"schoolHintWrap___34WkA",colorCDCDCD:"colorCDCDCD___HqcpR",color0152d9:"color0152d9___cQ4G4"}},kSUc:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.less ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},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=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\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 v(e,t,n){return t.f=t.inline=n,n(e,t)}function g(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=S,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),g=a.indentedCode,b=a.prevLine.hr,y=!1!==a.list,x=(a.listStack[a.listStack.length-1]||0)+3;a.indentedCode=!1;var C=a.indentation;if(null===a.indentationDiff&&(a.indentationDiff=a.indentation,y)){for(a.list=null;C<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=C-a.listStack[a.listStack.length-1])}var S=!(m||b||a.prevLine.header||y&&g||a.prevLine.fencedCodeEnd),O=(!1===a.list||b||m)&&a.indentation<=x&&r.match(l),E=null;if(a.indentationDiff>=4&&(g||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&&(E=r.match(u))&&E[1].length<=6)return a.quote=0,a.header=E[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(!O&&!a.setext&&f&&a.indentation<=x&&(E=r.match(s))){var N=E[1]?"ol":"ul";return a.indentation=C+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-"+N]),w(a)}return f&&a.indentation<=x&&(E=r.match(h,!0))?(a.quote=0,a.fencedEndRE=new RegExp(E[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}(E[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||!(S&&y||a.quote||!1!==a.list||a.code||O||p.test(r.string))&&(E=r.lookAhead(1))&&(E=E.match(d))?(a.setext?(a.header=a.setext,a.setext=0,r.skipToEnd(),n.highlightFormatting&&(a.formatting="header")):(a.header="="==E[0].charAt(0)?1:2,a.setext=a.header),a.thisLine.header=!0,a.f=a.inline,w(a)):O?(r.skipToEnd(),a.hr=!0,a.thisLine.hr=!0,i.hr):"["===r.peek()?v(r,a,j):v(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=S,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=S,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?g(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 C(e,t){if(e.match(f,!0))return w(t)}function S(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 h=w(a);return a.code=0,h}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 p=w(a),v=i.formatting+"-escape";return p?p+" "+v:v}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 p=w(a);return a.imageAltText=!1,a.image=!1,a.inline=a.f=E,p}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 p=w(a);return a.linkText=!1,a.inline=a.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?E:S,p}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return a.f=a.inline=O,n.highlightFormatting&&(a.formatting="link"),(p=w(a))?p+=" ":p="",p+i.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return a.f=a.inline=O,n.highlightFormatting&&(a.formatting="link"),(p=w(a))?p+=" ":p="",p+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),g(t,a,x)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return a.md_inside=!1,"tag";if("*"===l||"_"===l){for(var k=1,C=1==t.pos?" ":t.string.charAt(t.pos-2);k<3&&t.eat(l);)k++;var N=t.peek()||" ",j=!/\s/.test(N)&&(!m.test(N)||/\s/.test(C)||m.test(C)),T=!/\s/.test(C)&&(!m.test(C)||/\s/.test(N)||m.test(N)),L=null,A=null;if(k%2&&(a.em||!j||"*"!==l&&T&&!m.test(C)?a.em!=l||!T||"*"!==l&&j&&!m.test(N)||(L=!1):L=!0),k>1&&(a.strong||!j||"*"!==l&&T&&!m.test(C)?a.strong!=l||!T||"*"!==l&&j&&!m.test(N)||(A=!1):A=!0),null!=A||null!=L)return n.highlightFormatting&&(a.formatting=null==L?"strong":null==A?"em":"strong em"),!0===L&&(a.em=l),!0===A&&(a.strong=l),h=w(a),!1===L&&(a.em=!1),!1===A&&(a.strong=!1),h}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"),h=w(a),a.strikethrough=!1,h;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 D=w(a);return a.emoji=!1,D}return" "===l&&(t.match(/^ +$/,!1)?a.trailingSpace++:a.trailingSpace&&(a.trailingSpaceNewLine=!0)),w(a)}function O(e,t){if(">"===e.next()){t.f=t.inline=S,n.highlightFormatting&&(t.formatting="link");var r=w(t);return r?r+=" ":r="",r+i.linkInline}return e.match(/^[^>]+/,!0),i.linkInline}function E(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=S,n.highlightFormatting&&(t.formatting="link-string");var a=w(t);return t.linkHref=!1,a}return e.match(N[r]),t.linkHref=!0,w(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,w(t)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function j(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=T,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,w(t)):v(e,t,S)}function T(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=w(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),i.linkText}function L(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=S,i.linkHref+" url")}var A={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:S,text:C,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:A}},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 A}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},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 h(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 p(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=h(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:p(o,d[2]),close:f,at:"close"}:{open:f,close:h(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=p(a,r);if(!o)break;var l=h(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 h(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"),h=n(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,n=e.data,c=(e.theme,e.type),p=e.filename,m=e.monacoEditor,v=e.className,g=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),C=(w[0],w[1],Object(l.useState)("")),S=Object(o.a)(C,2),O=(S[0],S[1]),E=Object(l.useRef)();p&&(m.filename=p),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]&&O(t[1])}))}),[]);var N=function(){n.startsWith("http")||n.startsWith("/")?j():Object(h.x)(p||"educoder",n,p)},j=function(){Object(h.v)(p||t,n)};return console.log("data:",n,"fileanme:",p," name:",t),s.a.createElement("div",{style:Object(i.a)({},g||{}),className:"".concat(x&&u.a.bgBlack," ").concat(c?u.a.wrp:"hide")},b&&s.a.createElement("div",{className:u.a.close,ref:E},s.a.createElement(a.a,{title:"点击下载此文件",getPopupContainer:function(){return E.current}},s.a.createElement("span",{onClick:j},s.a.createElement("i",{className:"icon-quxiaozhiding"}))),s.a.createElement(a.a,{title:"关闭",getPopupContainer:function(){return E.current}},s.a.createElement("span",{className:"",onClick:y},s.a.createElement("i",{className:"icon-guanbi1"})))),s.a.createElement("div",{className:"".concat(u.a[v]," ").concat(v," ").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:N},s.a.createElement(d.a,null),"点击下载")),("download"===c||"office"===c)&&s.a.createElement(r.a,{type:"primary",size:"large",onClick:N},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 h={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function g(e,t){h[" "+e]||(p.test(e)?h[" "+e]=e+"/":h[" "+e]=b(e,"/",!0));const n=-1===(e=h[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$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=g(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:g,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")}}},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)},uK0f:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/array-tree-filter/lib/index.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";return function(e,t,n){(n=n||{}).childrenKeyName=n.childrenKeyName||"children";var r=e||[],a=[],i=0;do{var o=r.filter((function(e){return t(e,i)}))[0];if(!o)break;a.push(o),r=o[n.childrenKeyName]||[],i+=1}while(r.length>0);return a}}()},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"}}}]); |