(window.webpackJsonp=window.webpackJsonp||[]).push([[163,5,6,7],{"+NIl":function(gt,nt,Z){(function(te){te(Z("VrN/"))})(function(te){"use strict";te.defineMode("stex",function(K,D){"use strict";function H(A,w){A.cmdState.push(w)}function M(A){return A.cmdState.length>0?A.cmdState[A.cmdState.length-1]:null}function P(A){var w=A.cmdState.pop();w&&w.closeBracket()}function B(A){for(var w=A.cmdState,b=w.length-1;b>=0;b--){var d=w[b];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function k(A,w,b){return function(){this.name=A,this.bracketNo=0,this.style=w,this.styles=b,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var O={};O.importmodule=k("importmodule","tag",["string","builtin"]),O.documentclass=k("documentclass","tag",["","atom"]),O.usepackage=k("usepackage","tag",["atom"]),O.begin=k("begin","tag",["atom"]),O.end=k("end","tag",["atom"]),O.label=k("label","tag",["atom"]),O.ref=k("ref","tag",["atom"]),O.eqref=k("eqref","tag",["atom"]),O.cite=k("cite","tag",["atom"]),O.bibitem=k("bibitem","tag",["atom"]),O.Bibitem=k("Bibitem","tag",["atom"]),O.RBibitem=k("RBibitem","tag",["atom"]),O.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function L(A,w){A.f=w}function E(A,w){var b;if(A.match(/^\\[a-zA-Z@]+/)){var d=A.current().slice(1);return b=O.hasOwnProperty(d)?O[d]:O.DEFAULT,b=new b,H(w,b),L(w,R),b.style}if(A.match(/^\\[$&%#{}_]/))return"tag";if(A.match(/^\\[,;!\/\\]/))return"tag";if(A.match("\\["))return L(w,function(s,u){return C(s,u,"\\]")}),"keyword";if(A.match("\\("))return L(w,function(s,u){return C(s,u,"\\)")}),"keyword";if(A.match("$$"))return L(w,function(s,u){return C(s,u,"$$")}),"keyword";if(A.match("$"))return L(w,function(s,u){return C(s,u,"$")}),"keyword";var o=A.next();if(o=="%")return A.skipToEnd(),"comment";if(o=="}"||o=="]"){if(b=M(w),b)b.closeBracket(o),L(w,R);else return"error";return"bracket"}else return o=="{"||o=="["?(b=O.DEFAULT,b=new b,H(w,b),"bracket"):/\d/.test(o)?(A.eatWhile(/[\w.%]/),"atom"):(A.eatWhile(/[\w\-_]/),b=B(w),b.name=="begin"&&(b.argument=A.current()),b.styleIdentifier())}function C(A,w,b){if(A.eatSpace())return null;if(b&&A.match(b))return L(w,E),"keyword";if(A.match(/^\\[a-zA-Z@]+/))return"tag";if(A.match(/^[a-zA-Z]+/))return"variable-2";if(A.match(/^\\[$&%#{}_]/))return"tag";if(A.match(/^\\[,;!\/]/))return"tag";if(A.match(/^[\^_&]/))return"tag";if(A.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(A.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=A.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(A.skipToEnd(),"comment"):"error"}function R(A,w){var b=A.peek(),d;return b=="{"||b=="["?(d=M(w),d.openBracket(b),A.eat(b),L(w,E),"bracket"):/[ \t\r]/.test(b)?(A.eat(b),null):(L(w,E),P(w),E(A,w))}return{startState:function(){var A=D.inMathMode?function(w,b){return C(w,b)}:E;return{cmdState:[],f:A}},copyState:function(A){return{cmdState:A.cmdState.slice(),f:A.f}},token:function(A,w){return w.f(A,w)},blankLine:function(A){A.f=E,A.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},"19Vz":function(gt,nt,Z){(function(te){te(Z("VrN/"))})(function(te){te.defineOption("placeholder","",function(k,O,L){var E=L&&L!=te.Init;if(O&&!E)k.on("blur",M),k.on("change",P),k.on("swapDoc",P),te.on(k.getInputField(),"compositionupdate",k.state.placeholderCompose=function(){H(k)}),P(k);else if(!O&&E){k.off("blur",M),k.off("change",P),k.off("swapDoc",P),te.off(k.getInputField(),"compositionupdate",k.state.placeholderCompose),K(k);var C=k.getWrapperElement();C.className=C.className.replace(" CodeMirror-empty","")}O&&!k.hasFocus()&&M(k)});function K(k){k.state.placeholder&&(k.state.placeholder.parentNode.removeChild(k.state.placeholder),k.state.placeholder=null)}function D(k){K(k);var O=k.state.placeholder=document.createElement("pre");O.style.cssText="height: 0; overflow: visible",O.style.direction=k.getOption("direction"),O.className="CodeMirror-placeholder CodeMirror-line-like";var L=k.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),O.appendChild(L),k.display.lineSpace.insertBefore(O,k.display.lineSpace.firstChild)}function H(k){setTimeout(function(){var O=!1,L=k.getInputField();L.nodeName=="TEXTAREA"?O=!L.value:k.lineCount()==1&&(O=!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)),O?D(k):K(k)},20)}function M(k){B(k)&&D(k)}function P(k){var O=k.getWrapperElement(),L=B(k);O.className=O.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?D(k):K(k)}function B(k){return k.lineCount()===1&&k.getLine(0)===""}})},"1eCo":function(gt,nt,Z){(function(te){te(Z("VrN/"))})(function(te){"use strict";var K={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},D={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(H,M){var P=H.indentUnit,B={},k=M.htmlMode?K:D;for(var O in k)B[O]=k[O];for(var O in M)B[O]=M[O];var L,E;function C(a,v){function p(U){return v.tokenize=U,U(a,v)}var g=a.next();if(g=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?p(w("atom","]]>")):null:a.match("--")?p(w("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),p(b(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),v.tokenize=w("meta","?>"),"meta"):(L=a.eat("/")?"closeTag":"openTag",v.tokenize=R,"tag bracket");if(g=="&"){var S;return a.eat("#")?a.eat("x")?S=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):S=a.eatWhile(/[\d]/)&&a.eat(";"):S=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),S?"atom":"error"}else return a.eatWhile(/[^&<]/),null}C.isInText=!0;function R(a,v){var p=a.next();if(p==">"||p=="/"&&a.eat(">"))return v.tokenize=C,L=p==">"?"endTag":"selfcloseTag","tag bracket";if(p=="=")return L="equals",null;if(p=="<"){v.tokenize=C,v.state=u,v.tagName=v.tagStart=null;var g=v.tokenize(a,v);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(p)?(v.tokenize=A(p),v.stringStartCol=a.column(),v.tokenize(a,v)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function A(a){var v=function(p,g){for(;!p.eol();)if(p.next()==a){g.tokenize=R;break}return"string"};return v.isInAttribute=!0,v}function w(a,v){return function(p,g){for(;!p.eol();){if(p.match(v)){g.tokenize=C;break}p.next()}return a}}function b(a){return function(v,p){for(var g;(g=v.next())!=null;){if(g=="<")return p.tokenize=b(a+1),p.tokenize(v,p);if(g==">")if(a==1){p.tokenize=C;break}else return p.tokenize=b(a-1),p.tokenize(v,p)}return"meta"}}function d(a,v,p){this.prev=a.context,this.tagName=v,this.indent=a.indented,this.startOfLine=p,(B.doNotIndent.hasOwnProperty(v)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function s(a,v){for(var p;;){if(!a.context)return;if(p=a.context.tagName,!B.contextGrabbers.hasOwnProperty(p)||!B.contextGrabbers[p].hasOwnProperty(v))return;o(a)}}function u(a,v,p){return a=="openTag"?(p.tagStart=v.column(),x):a=="closeTag"?f:u}function x(a,v,p){return a=="word"?(p.tagName=v.current(),E="tag",y):B.allowMissingTagName&&a=="endTag"?(E="tag bracket",y(a,v,p)):(E="error",x)}function f(a,v,p){if(a=="word"){var g=v.current();return p.context&&p.context.tagName!=g&&B.implicitlyClosed.hasOwnProperty(p.context.tagName)&&o(p),p.context&&p.context.tagName==g||B.matchClosing===!1?(E="tag",m):(E="tag error",_)}else return B.allowMissingTagName&&a=="endTag"?(E="tag bracket",m(a,v,p)):(E="error",_)}function m(a,v,p){return a!="endTag"?(E="error",m):(o(p),u)}function _(a,v,p){return E="error",m(a,v,p)}function y(a,v,p){if(a=="word")return E="attribute",h;if(a=="endTag"||a=="selfcloseTag"){var g=p.tagName,S=p.tagStart;return p.tagName=p.tagStart=null,a=="selfcloseTag"||B.autoSelfClosers.hasOwnProperty(g)?s(p,g):(s(p,g),p.context=new d(p,g,S==p.indented)),u}return E="error",y}function h(a,v,p){return a=="equals"?c:(B.allowMissing||(E="error"),y(a,v,p))}function c(a,v,p){return a=="string"?l:a=="word"&&B.allowUnquoted?(E="string",y):(E="error",y(a,v,p))}function l(a,v,p){return a=="string"?l:y(a,v,p)}return{startState:function(a){var v={tokenize:C,state:u,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(v.baseIndent=a),v},token:function(a,v){if(!v.tagName&&a.sol()&&(v.indented=a.indentation()),a.eatSpace())return null;L=null;var p=v.tokenize(a,v);return(p||L)&&p!="comment"&&(E=null,v.state=v.state(L||p,a,v),E&&(p=E=="error"?p+" error":E)),p},indent:function(a,v,p){var g=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+P;if(g&&g.noIndent)return te.Pass;if(a.tokenize!=R&&a.tokenize!=C)return p?p.match(/^(\s*)/)[0].length:0;if(a.tagName)return B.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+P*(B.multilineTagIndentFactor||1);if(B.alignCDATA&&/$/,blockCommentStart:"",configuration:B.htmlMode?"html":"xml",helperType:B.htmlMode?"html":"xml",skipAttribute:function(a){a.state==c&&(a.state=y)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var v=[],p=a.context;p;p=p.prev)p.tagName&&v.push(p.tagName);return v.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(gt,nt,Z){"use strict";Z.d(nt,"a",function(){return s}),Z.d(nt,"b",function(){return y});var te=Z("Ty5D"),K=Z("dI71"),D=Z("q1tI"),H=Z.n(D),M=Z("YS25"),P=Z("17x9"),B=Z.n(P),k=Z("wx14"),O=Z("zLVn"),L=Z("9R94"),E=function(c){Object(K.a)(l,c);function l(){for(var v,p=arguments.length,g=new Array(p),S=0;S
-1&&H.substring(B+1,H.length);if(k)return te.findModeByExtension(k)},te.findModeByName=function(H){H=H.toLowerCase();for(var M=0;M=se.length?xe.slice(se.length):xe}).join(`
`)}var L=[],E=[""],C=new B.a.Renderer,R=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function A(){L.length=0,E=[""]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function b(V,Q,ne,se){if(Q>=V.length||V[Q].level<=ne)return Q;var xe=V[Q];se.push("- "+xe.text+""),Q++;var me=[];return Q=b(V,Q,xe.level,me),me.length>0&&(se.push("
"),me.forEach(function(Le){se.push(Le)}),se.push("
")),se.push(" "),Q=b(V,Q,ne,se),Q}function d(){return b(L,0,0,E),E.push("
"),E.join("")}var o={heading:function(Q){var ne=R.exec(Q);if(ne)return{type:"heading",raw:ne[0],depth:ne[1].length,text:ne[2]}},fences:function(Q){var ne=this.rules.block.fences.exec(Q);if(ne){var se=ne[0],xe=O(se,ne[3]||""),me=ne[2]?ne[2].trim():ne[2];if(["latex","katex","math"].indexOf(me)>=0){var Le=x(),Ee=xe;xe=Le,f[Le]={type:"block",expression:Ee}}return{type:"code",raw:se,lang:me,text:xe}}}},s=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,x=function(){return"__special_katext_id_".concat(u++,"__")},f={};function m(){return f}function _(){u=0,f={}}function y(V){return V=V.replace(s,function(Q,ne){var se=x();return f[se]={type:"inline",expression:ne},se}),V}var h=C.listitem;C.listitem=function(V){return h(y(V))};var c=C.paragraph;C.paragraph=function(V){return c(y(V))};var l=C.tablecell;C.tablecell=function(V,Q){return l(y(V),Q)},C.code=function(V,Q,ne){var se=(Q||"").match(/\S*/)[0];return se?["latex","katex","math"].indexOf(se)>=0?"".concat(V,"
"):'
').concat(ne?V:Object(k.escape)(V,!0),`
`):''+(ne?V:Object(k.escape)(V,!0))+"
"},C.heading=function(V,Q,ne){var se=this.options.headerPrefix+ne.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return L.push({anchor:se,level:Q,text:V}),"'+V+""},B.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),B.a.use({tokenizer:o,renderer:C});var a=B.a,v=Z("SJMd"),p=Z("ulZh"),g=Z.n(p),S=Z("m3rI"),U=Z("Oy/b"),j=Z("p5ED"),G=/]*>/g;function N(V){var Q=document.createElement("div");return Q.innerHTML=V,Q.childNodes.length===0?"":Q.childNodes[0].nodeValue}var I=nt.a=function(V){var Q=V.value,ne=Q===void 0?"":Q,se=V.className,xe=V.showTextOnly,me=V.showLines,Le=V.style,Ee=Le===void 0?{}:Le,Te=V.stylesPrev,ce=Te===void 0?{}:Te,fe=String(ne),J=Object(D.useState)(""),le=Object(K.a)(J,2),ee=le[0],pe=le[1],ye=Object(D.useMemo)(function(){try{var Re=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ke=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ce=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;fe=fe.replace(Re,"("+S.a.API_SERVER+"/api/attachments/").replace(ke,'"'+S.a.API_SERVER+"/api/attachments/").replace(Ce,'"'+S.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,`
`),fe=fe.replace(new RegExp("(?[TOC]
",d()),A()),Ae=Ae.replace(/(__special_katext_id_\d+__)/g,function(je,Ve){var it=ze[Ve],rt=it.type,Je=it.expression;return Object(U.renderToString)(N(Je)||"",{displayMode:rt==="block",throwOnError:!1,output:"html"})}),Ae=Ae.replace(/▁/g,"\u2581\u2581\u2581"),_(),xe){var $e=document.createElement("div");return $e.innerHTML=Ae,$e.innerText}return setTimeout(function(){return De()},500),Ae},[fe]),he=Object(D.useRef)();w.WebkitLineClamp=me,me&&(Ee=Object(te.a)(Object(te.a)({},Ee),w));function we(Re){var ke=Re.target;if(ke.tagName.toUpperCase()==="A"){var Ce=ke.getAttribute("href");if(Ce.indexOf("office")>-1)Re.preventDefault(),pe(Ce);else if(Ce.startsWith("#")){Re.preventDefault();var Ae=document.getElementById(Ce.replace("#",""));Ae&&Ae.scrollIntoView(!0)}}}var De=function(){var ke,Ce=(ke=he.current)===null||ke===void 0?void 0:ke.querySelectorAll("video");Ce==null||Ce.forEach(function(Ae){if(Ae.oncontextmenu=function(){return!1},Ae.src.indexOf(".m3u8")>-1&&!Ae.canPlayType("application/vnd.apple.mpegurl")){if(g.a.isSupported()){var ze=new g.a;ze.loadSource(Ae.src),ze.attachMedia(Ae)}}})};return Object(D.useEffect)(function(){if(he.current&&ye&&(ye.match(G)&&window.PR.prettyPrint()),he.current)return he.current.addEventListener("click",we),function(){he.current.removeEventListener("click",we),_(),A()}},[ye,he.current,we]),H.a.createElement(H.a.Fragment,null,H.a.createElement("div",{ref:he,style:Object(te.a)({},Ee),className:"".concat(se||""," markdown-body "),dangerouslySetInnerHTML:{__html:ye}}),H.a.createElement(j.a,{close:!0,data:ee,type:ee!=null&&ee.length?"office":"",style:Object(te.a)({},ce),onClose:function(){return pe("")}}))}},"9VGf":function(gt,nt,Z){"use strict";Z.d(nt,"a",function(){return D});var te=Z("q1tI"),K=Z.n(te);function D(H,M){var P=Object(te.useRef)();Object(te.useEffect)(function(){P.current=H}),Object(te.useEffect)(function(){function B(){P.current()}if(M!==null){var k=setInterval(B,M);return function(){return clearInterval(k)}}},[M])}},BU3w:function(gt,nt,Z){"use strict";Z.d(nt,"a",function(){return P});var te=Z("MNnm"),K="rc-util-key";function D(B){if(B.attachTo)return B.attachTo;var k=document.querySelector("head");return k||document.body}function H(B){var k,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var L=document.createElement("style");if((k=O.csp)===null||k===void 0?void 0:k.nonce){var E;L.nonce=(E=O.csp)===null||E===void 0?void 0:E.nonce}L.innerHTML=B;var C=D(O),R=C.firstChild;return O.prepend&&C.prepend?C.prepend(L):O.prepend&&R?C.insertBefore(L,R):C.appendChild(L),L}var M=new Map;function P(B,k){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=D(O);if(!M.has(L)){var E=H("",O),C=E.parentNode;M.set(L,C),C.removeChild(E)}var R=Array.from(M.get(L).children).find(function(o){return o.tagName==="STYLE"&&o[K]===k});if(R){var A,w;if(((A=O.csp)===null||A===void 0?void 0:A.nonce)&&R.nonce!==((w=O.csp)===null||w===void 0?void 0:w.nonce)){var b;R.nonce=(b=O.csp)===null||b===void 0?void 0:b.nonce}return R.innerHTML!==B&&(R.innerHTML=B),R}var d=H(B,O);return d[K]=k,d}},Bd2K:function(gt,nt,Z){(function(te){te(Z("VrN/"),Z("osHv"))})(function(te){te.defineOption("autoCloseTags",!1,function(O,L,E){if(E!=te.Init&&E&&O.removeKeyMap("autoCloseTags"),!L)return;var C={name:"autoCloseTags"};(typeof L!="object"||L.whenClosing!==!1)&&(C["'/'"]=function(R){return P(R)}),(typeof L!="object"||L.whenOpening!==!1)&&(C["'>'"]=function(R){return H(R)}),O.addKeyMap(C)});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],D=["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 H(O){if(O.getOption("disableInput"))return te.Pass;for(var L=O.listSelections(),E=[],C=O.getOption("autoCloseTags"),R=0;RA.ch&&(s=s.slice(0,s.length-w.end+A.ch));var m=s.toLowerCase();if(!s||w.type=="string"&&(w.end!=A.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&o.close||w.string.indexOf("/")==A.ch-w.start-1||x&&B(x,m)>-1||k(O,b.mode.xmlCurrentContext&&b.mode.xmlCurrentContext(d)||[],s,A,!0))return te.Pass;var _=typeof C=="object"&&C.emptyTags;if(_&&B(_,s)>-1){E[R]={text:"/>",newPos:te.Pos(A.line,A.ch+2)};continue}var y=f&&B(f,m)>-1;E[R]={indent:y,text:">"+(y?`
`:"")+""+s+">",newPos:y?te.Pos(A.line+1,0):te.Pos(A.line,A.ch+1)}}for(var h=typeof C=="object"&&C.dontIndentOnAutoClose,R=L.length-1;R>=0;R--){var c=E[R];O.replaceRange(c.text,L[R].head,L[R].anchor,"+insert");var l=O.listSelections().slice(0);l[R]={head:c.newPos,anchor:c.newPos},O.setSelections(l),!h&&c.indent&&(O.indentLine(c.newPos.line,null,!0),O.indentLine(c.newPos.line+1,null,!0))}}function M(O,L){for(var E=O.listSelections(),C=[],R=L?"/":"",A=O.getOption("autoCloseTags"),w=typeof A=="object"&&A.dontIndentOnSlash,b=0;b"&&(x+=">"),C[b]=x}if(O.replaceSelections(C),E=O.listSelections(),!w)for(var b=0;b=0&&L[d]==E;d--)++b;C=w.to;for(var d=1;d0){for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:"",L=[],E=0;E0&&(ce(),Ee(1))},[o]),Object(B.useEffect)(function(){if(Le===0)return;if(Le===2)clearInterval(ne);else{var pe=0,ye=setInterval(function(){a.includes(pe)&&J(),pe++},1e3);se(ye)}return function(){return clearInterval(ne)}},[Le]),Object(B.useImperativeHandle)(d,function(){return{handlePhoto:J}});var Te=function(){Ee(2)},ce=function(){var ye=o/s,he=[];function we(De,Re){return parseInt(Math.floor(Math.random()*(Re-De+1))+De)}new Array(s).fill(0).map(function(De,Re){x?he.push(we(ye*Re,ye*(Re+1))):Re==0?he.push(0):he.push(we(ye*Re,ye*(Re+1)))}),a=he,v([].concat(he)),console.log(he)},fe=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(ye){var he=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return he?new Promise(function(we,De){he.call(navigator,ye,we,De)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then(function(ye){u&&u(2),U(2),"srcObject"in _.current?_.current.srcObject=ye:_.current.src=window.URL.createObjectURL(ye),_.current.onloadedmetadata=function(he){_.current.play()},_.current.addEventListener("ended",function(){console.log("\u64AD\u653E\u7ED3\u675F"),Te(),D.b.error({content:"\u60A8\u5DF2\u7ECF\u5173\u95ED\u4E86\u6444\u50CF\u5934\uFF0C\u8BF7\u572810\u79D2\u949F\u5185\u6062\u590D\u6444\u50CF\u5934\uFF0C\u5426\u5219\u5C06\u63A8\u51FA\u8003\u8BD5",duration:10,key:9998})},!1)}).catch(function(ye){U(1),u&&u(1),ye.message==="Permission denied"||ye.name==="NotAllowedError"?D.b.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):D.b.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"),console.log("errname: "+ye.name),console.log("err: "+ye.message)})},J=function(){try{y.current.width=_.current.videoWidth,y.current.height=_.current.videoHeight;var ye=y.current.getContext("2d");ye.drawImage(_.current,0,0,y.current.width,y.current.height),I(y.current.toDataURL("image/png")),ee(y.current.toDataURL("image/png"))}catch(he){}},le=function(){try{var ye=_.current.srcObject,he=ye.getTracks();he.forEach(function(we){we.stop()}),_.current.srcObject=null}catch(we){}},ee=function(){var pe=Object(te.a)(P.a.mark(function ye(he){var we,De;return P.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:we=new FormData,we.append("file",A(he,"1")),we.append("1","123"),De=new window.XMLHttpRequest,De.withCredentials=!0,De.addEventListener("load",function(Ce){var Ae=JSON.parse(Ce.target.responseText);Object(L.a)("/api/exercises/".concat(m,"/upload_photo.json"),{method:"post",body:{attachment_id:Ae.id}})},!1),De.addEventListener("error",function(Ce){console.error(Ce)},!1),De.open("POST","".concat(E.a.API_SERVER,"/api/attachments.json")),De.send(we);case 9:case"end":return ke.stop()}},ye)}));return function(he){return pe.apply(this,arguments)}}();return k.a.createElement(k.a.Fragment,null,S!==3&&k.a.createElement("aside",{className:R.a.video,id:"screenshot"},S===0&&k.a.createElement("span",null,"\u6B63\u5728\u5F00\u542F\u6444\u50CF\u5934..."),S===1&&k.a.createElement("span",null,"\u6444\u50CF\u5934\u5F00\u542F\u5931\u8D25"),S===2&&k.a.createElement("div",null,k.a.createElement("video",{width:"288",ref:_,autoPlay:!0}),k.a.createElement("canvas",{style:{display:"none"},ref:y}))))});nt.a=w},"C+DQ":function(gt,nt,Z){},DR4n:function(gt,nt,Z){gt.exports={flex_box_center:"flex_box_center___2zmmW",flex_space_between:"flex_space_between___3nCIw",flex_box_vertical_center:"flex_box_vertical_center___1PFij",flex_box_center_end:"flex_box_center_end___2FA05",flex_box_column:"flex_box_column___2k0kx",video:"video___1mYnG"}},DlQD:function(gt,nt,Z){(function(te,K){gt.exports=K()})(this,function(){"use strict";function te(ie,oe){for(var ue=0;ueie.length)&&(oe=ie.length);for(var ue=0,$=new Array(oe);ue=ie.length?{done:!0}:{done:!1,value:ie[$++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ue=ie[Symbol.iterator](),ue.next.bind(ue)}function P(ie,oe){return oe={exports:{}},ie(oe,oe.exports),oe.exports}var B=P(function(ie){function oe(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ue($){ie.exports.defaults=$}ie.exports={defaults:oe(),getDefaults:oe,changeDefaults:ue}}),k=B.defaults,O=B.getDefaults,L=B.changeDefaults,E=/[&<>"']/,C=/[&<>"']/g,R=/[<>"']|&(?!#?\w+;)/,A=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},b=function(oe){return w[oe]};function d(ie,oe){if(oe){if(E.test(ie))return ie.replace(C,b)}else if(R.test(ie))return ie.replace(A,b);return ie}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(ie){return ie.replace(o,function(oe,ue){return ue=ue.toLowerCase(),ue==="colon"?":":ue.charAt(0)==="#"?ue.charAt(1)==="x"?String.fromCharCode(parseInt(ue.substring(2),16)):String.fromCharCode(+ue.substring(1)):""})}var u=/(^|[^\[])\^/g;function x(ie,oe){ie=ie.source||ie,oe=oe||"";var ue={replace:function(Y,q){return q=q.source||q,q=q.replace(u,"$1"),ie=ie.replace(Y,q),ue},getRegex:function(){return new RegExp(ie,oe)}};return ue}var f=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(ie,oe,ue){if(ie){var $;try{$=decodeURIComponent(s(ue)).replace(f,"").toLowerCase()}catch(Y){return null}if($.indexOf("javascript:")===0||$.indexOf("vbscript:")===0||$.indexOf("data:")===0)return null}oe&&!m.test(ue)&&(ue=a(oe,ue));try{ue=encodeURI(ue).replace(/%25/g,"%")}catch(Y){return null}return ue}var y={},h=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(ie,oe){y[" "+ie]||(h.test(ie)?y[" "+ie]=ie+"/":y[" "+ie]=S(ie,"/",!0)),ie=y[" "+ie];var ue=ie.indexOf(":")===-1;return oe.substring(0,2)==="//"?ue?oe:ie.replace(c,"$1")+oe:oe.charAt(0)==="/"?ue?oe:ie.replace(l,"$1")+oe:ie+oe}var v={exec:function(){}};function p(ie){for(var oe=1,ue,$;oe=0&&ge[Me]==="\\";)Se=!Se;return Se?"|":" |"}),$=ue.split(/ \|/),Y=0;if($.length>oe)$.splice(oe);else for(;$.length=$.length?Y.slice($.length):Y}).join(`
`)}var me=function(){function ie(ue){this.options=ue||N}var oe=ie.prototype;return oe.space=function($){var Y=this.rules.block.newline.exec($);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
`}},oe.code=function($,Y){var q=this.rules.block.code.exec($);if(q){var re=Y[Y.length-1];if(re&&re.type==="paragraph")return{raw:q[0],text:q[0].trimRight()};var ge=q[0].replace(/^ {4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?ge:I(ge,`
`)}}},oe.fences=function($){var Y=this.rules.block.fences.exec($);if(Y){var q=Y[0],re=xe(q,Y[3]||"");return{type:"code",raw:q,lang:Y[2]?Y[2].trim():Y[2],text:re}}},oe.heading=function($){var Y=this.rules.block.heading.exec($);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},oe.nptable=function($){var Y=this.rules.block.nptable.exec($);if(Y){var q={type:"table",header:V(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[],raw:Y[0]};if(q.header.length===q.align.length){var re=q.align.length,ge;for(ge=0;ge ?/gm,"");return{type:"blockquote",raw:Y[0],text:q}}},oe.list=function($){var Y=this.rules.block.list.exec($);if(Y){for(var q=Y[0],re=Y[2],ge=re.length>1,Se=re[re.length-1]===")",Me={type:"list",raw:q,ordered:ge,start:ge?+re.slice(0,-1):"",loose:!1,items:[]},at=Y[0].match(this.rules.block.item),vt=!1,dt,Rt,wt,mt,$t,Pt,Ft,qt=at.length,Ct=0;Ct1||this.options.smartLists&&wt!==re)&&(mt=at.slice(Ct+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-mt.length),Ct=qt-1)),$t=vt||/\n\n(?!\s*$)/.test(dt),Ct!==qt-1&&(vt=dt.charAt(dt.length-1)===`
`,$t||($t=vt)),$t&&(Me.loose=!0),Pt=/^\[[ xX]\] /.test(dt),Ft=void 0,Pt&&(Ft=dt[1]!==" ",dt=dt.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:q,task:Pt,checked:Ft,loose:$t,text:dt});return Me}},oe.html=function($){var Y=this.rules.block.html.exec($);if(Y)return{type:this.options.sanitize?"paragraph":"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):Q(Y[0]):Y[0]}},oe.def=function($){var Y=this.rules.block.def.exec($);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var q=Y[1].toLowerCase().replace(/\s+/g," ");return{tag:q,raw:Y[0],href:Y[2],title:Y[3]}}},oe.table=function($){var Y=this.rules.block.table.exec($);if(Y){var q={type:"table",header:V(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[]};if(q.header.length===q.align.length){q.raw=Y[0];var re=q.align.length,ge;for(ge=0;ge/i.test(re[0])&&(Y=!1),!q&&/^<(pre|code|kbd|script)(\s|>)/i.test(re[0])?q=!0:q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(re[0])&&(q=!1),{type:this.options.sanitize?"text":"html",raw:re[0],inLink:Y,inRawBlock:q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):Q(re[0]):re[0]}},oe.link=function($){var Y=this.rules.inline.link.exec($);if(Y){var q=ne(Y[2],"()");if(q>-1){var re=Y[0].indexOf("!")===0?5:4,ge=re+Y[1].length+q;Y[2]=Y[2].substring(0,q),Y[0]=Y[0].substring(0,ge).trim(),Y[3]=""}var Se=Y[2],Me="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Se);at?(Se=at[1],Me=at[3]):Me=""}else Me=Y[3]?Y[3].slice(1,-1):"";Se=Se.trim().replace(/^<([\s\S]*)>$/,"$1");var vt=se(Y,{href:Se&&Se.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},Y[0]);return vt}},oe.reflink=function($,Y){var q;if((q=this.rules.inline.reflink.exec($))||(q=this.rules.inline.nolink.exec($))){var re=(q[2]||q[1]).replace(/\s+/g," ");if(re=Y[re.toLowerCase()],!re||!re.href){var ge=q[0].charAt(0);return{type:"text",raw:ge,text:ge}}var Se=se(q,re,q[0]);return Se}},oe.strong=function($,Y,q){q===void 0&&(q="");var re=this.rules.inline.strong.start.exec($);if(re&&(!re[1]||re[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*$.length);var ge=re[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ge.lastIndex=0;for(var Se;(re=ge.exec(Y))!=null;)if(Se=this.rules.inline.strong.middle.exec(Y.slice(0,re.index+3)),Se)return{type:"strong",raw:$.slice(0,Se[0].length),text:$.slice(2,Se[0].length-2)}}},oe.em=function($,Y,q){q===void 0&&(q="");var re=this.rules.inline.em.start.exec($);if(re&&(!re[1]||re[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*$.length);var ge=re[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ge.lastIndex=0;for(var Se;(re=ge.exec(Y))!=null;)if(Se=this.rules.inline.em.middle.exec(Y.slice(0,re.index+2)),Se)return{type:"em",raw:$.slice(0,Se[0].length),text:$.slice(1,Se[0].length-1)}}},oe.codespan=function($){var Y=this.rules.inline.code.exec($);if(Y){var q=Y[2].replace(/\n/g," "),re=/[^ ]/.test(q),ge=q.startsWith(" ")&&q.endsWith(" ");return re&&ge&&(q=q.substring(1,q.length-1)),q=Q(q,!0),{type:"codespan",raw:Y[0],text:q}}},oe.br=function($){var Y=this.rules.inline.br.exec($);if(Y)return{type:"br",raw:Y[0]}},oe.del=function($){var Y=this.rules.inline.del.exec($);if(Y)return{type:"del",raw:Y[0],text:Y[1]}},oe.autolink=function($,Y){var q=this.rules.inline.autolink.exec($);if(q){var re,ge;return q[2]==="@"?(re=Q(this.options.mangle?Y(q[1]):q[1]),ge="mailto:"+re):(re=Q(q[1]),ge=re),{type:"link",raw:q[0],text:re,href:ge,tokens:[{type:"text",raw:re,text:re}]}}},oe.url=function($,Y){var q;if(q=this.rules.inline.url.exec($)){var re,ge;if(q[2]==="@")re=Q(this.options.mangle?Y(q[0]):q[0]),ge="mailto:"+re;else{var Se;do Se=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])[0];while(Se!==q[0]);re=Q(q[0]),q[1]==="www."?ge="http://"+re:ge=re}return{type:"link",raw:q[0],text:re,href:ge,tokens:[{type:"text",raw:re,text:re}]}}},oe.inlineText=function($,Y,q){var re=this.rules.inline.text.exec($);if(re){var ge;return Y?ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):Q(re[0]):re[0]:ge=Q(this.options.smartypants?q(re[0]):re[0]),{type:"text",raw:re[0],text:ge}}},ie}(),Le=G.noopTest,Ee=G.edit,Te=G.merge,ce={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Le,table:Le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ce.def=Ee(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex(),ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ce.item=Ee(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Ee(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._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",ce._comment=//,ce.html=Ee(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Ee(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex(),ce.blockquote=Ee(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=Te({},ce),ce.gfm=Te({},ce.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*|$)"}),ce.gfm.nptable=Ee(ce.gfm.nptable).replace("hr",ce.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",ce._tag).getRegex(),ce.gfm.table=Ee(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex(),ce.pedantic=Te({},ce.normal,{html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:Le,paragraph:Ee(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Le,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",fe.punctuation=Ee(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex(),fe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",fe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",fe.em.start=Ee(fe.em.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.middle=Ee(fe.em.middle).replace(/punctuation/g,fe._punctuation).replace(/overlapSkip/g,fe._overlapSkip).getRegex(),fe.em.endAst=Ee(fe.em.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.endUnd=Ee(fe.em.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.start=Ee(fe.strong.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.middle=Ee(fe.strong.middle).replace(/punctuation/g,fe._punctuation).replace(/blockSkip/g,fe._blockSkip).getRegex(),fe.strong.endAst=Ee(fe.strong.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.endUnd=Ee(fe.strong.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.blockSkip=Ee(fe._blockSkip,"g").getRegex(),fe.overlapSkip=Ee(fe._overlapSkip,"g").getRegex(),fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,fe._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])?)+(?![-_])/,fe.autolink=Ee(fe.autolink).replace("scheme",fe._scheme).replace("email",fe._email).getRegex(),fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,fe.tag=Ee(fe.tag).replace("comment",ce._comment).replace("attribute",fe._attribute).getRegex(),fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,fe.link=Ee(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex(),fe.reflink=Ee(fe.reflink).replace("label",fe._label).getRegex(),fe.reflinkSearch=Ee(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex(),fe.normal=Te({},fe),fe.pedantic=Te({},fe.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:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",fe._label).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()}),fe.gfm=Te({},fe.normal,{escape:Ee(fe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&($="x"+$.toString(16)),oe+=""+$+";";return oe}var we=function(){function ie(ue){this.tokens=[],this.tokens.links=Object.create(null),this.options=ue||le,this.options.tokenizer=this.options.tokenizer||new me,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var $={block:ee.normal,inline:pe.normal};this.options.pedantic?($.block=ee.pedantic,$.inline=pe.pedantic):this.options.gfm&&($.block=ee.gfm,this.options.breaks?$.inline=pe.breaks:$.inline=pe.gfm),this.tokenizer.rules=$}ie.lex=function($,Y){var q=new ie(Y);return q.lex($)};var oe=ie.prototype;return oe.lex=function($){return $=$.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens($,this.tokens,!0),this.inline(this.tokens),this.tokens},oe.blockTokens=function($,Y,q){Y===void 0&&(Y=[]),q===void 0&&(q=!0),$=$.replace(/^ +$/gm,"");for(var re,ge,Se,Me;$;){if(re=this.tokenizer.space($)){$=$.substring(re.raw.length),re.type&&Y.push(re);continue}if(re=this.tokenizer.code($,Y)){$=$.substring(re.raw.length),re.type?Y.push(re):(Me=Y[Y.length-1],Me.raw+=`
`+re.raw,Me.text+=`
`+re.text);continue}if(re=this.tokenizer.fences($)){$=$.substring(re.raw.length),Y.push(re);continue}if(re=this.tokenizer.heading($)){$=$.substring(re.raw.length),Y.push(re);continue}if(re=this.tokenizer.nptable($)){$=$.substring(re.raw.length),Y.push(re);continue}if(re=this.tokenizer.hr($)){$=$.substring(re.raw.length),Y.push(re);continue}if(re=this.tokenizer.blockquote($)){$=$.substring(re.raw.length),re.tokens=this.blockTokens(re.text,[],q),Y.push(re);continue}if(re=this.tokenizer.list($)){for($=$.substring(re.raw.length),Se=re.items.length,ge=0;ge0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)vt.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;$;){if(Se=this.tokenizer.escape($)){$=$.substring(Se.raw.length),Y.push(Se);continue}if(Se=this.tokenizer.tag($,q,re)){$=$.substring(Se.raw.length),q=Se.inLink,re=Se.inRawBlock,Y.push(Se);continue}if(Se=this.tokenizer.link($)){$=$.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,re)),Y.push(Se);continue}if(Se=this.tokenizer.reflink($,this.tokens.links)){$=$.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,re)),Y.push(Se);continue}if(Se=this.tokenizer.strong($,Me,ge)){$=$.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],q,re),Y.push(Se);continue}if(Se=this.tokenizer.em($,Me,ge)){$=$.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],q,re),Y.push(Se);continue}if(Se=this.tokenizer.codespan($)){$=$.substring(Se.raw.length),Y.push(Se);continue}if(Se=this.tokenizer.br($)){$=$.substring(Se.raw.length),Y.push(Se);continue}if(Se=this.tokenizer.del($)){$=$.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],q,re),Y.push(Se);continue}if(Se=this.tokenizer.autolink($,he)){$=$.substring(Se.raw.length),Y.push(Se);continue}if(!q&&(Se=this.tokenizer.url($,he))){$=$.substring(Se.raw.length),Y.push(Se);continue}if(Se=this.tokenizer.inlineText($,re,ye)){$=$.substring(Se.raw.length),ge=Se.raw.slice(-1),Y.push(Se);continue}if($){var dt="Infinite loop on byte: "+$.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return Y},K(ie,null,[{key:"rules",get:function(){return{block:ee,inline:pe}}}]),ie}(),De=B.defaults,Re=G.cleanUrl,ke=G.escape,Ce=function(){function ie(ue){this.options=ue||De}var oe=ie.prototype;return oe.code=function($,Y,q){var re=(Y||"").match(/\S*/)[0];if(this.options.highlight){var ge=this.options.highlight($,re);ge!=null&&ge!==$&&(q=!0,$=ge)}return re?''+(q?$:ke($,!0))+`
`:""+(q?$:ke($,!0))+`
`},oe.blockquote=function($){return`
`+$+`
`},oe.html=function($){return $},oe.heading=function($,Y,q,re){return this.options.headerIds?"
`:""+$+"
`},oe.hr=function(){return this.options.xhtml?`
`:`
`},oe.list=function($,Y,q){var re=Y?"ol":"ul",ge=Y&&q!==1?' start="'+q+'"':"";return"<"+re+ge+`>
`+$+""+re+`>
`},oe.listitem=function($){return""+$+`
`},oe.checkbox=function($){return" "},oe.paragraph=function($){return""+$+`
`},oe.table=function($,Y){return Y&&(Y=""+Y+""),`
`},oe.tablerow=function($){return`
`+$+`
`},oe.tablecell=function($,Y){var q=Y.header?"th":"td",re=Y.align?"<"+q+' align="'+Y.align+'">':"<"+q+">";return re+$+""+q+`>
`},oe.strong=function($){return""+$+""},oe.em=function($){return""+$+""},oe.codespan=function($){return""+$+""},oe.br=function(){return this.options.xhtml?"
":"
"},oe.del=function($){return""+$+""},oe.link=function($,Y,q){if($=Re(this.options.sanitize,this.options.baseUrl,$),$===null)return q;var re='"+q+"",re},oe.image=function($,Y,q){if($=Re(this.options.sanitize,this.options.baseUrl,$),$===null)return q;var re='
":">",re},oe.text=function($){return $},ie}(),Ae=function(){function ie(){}var oe=ie.prototype;return oe.strong=function($){return $},oe.em=function($){return $},oe.codespan=function($){return $},oe.del=function($){return $},oe.html=function($){return $},oe.text=function($){return $},oe.link=function($,Y,q){return""+q},oe.image=function($,Y,q){return""+q},oe.br=function(){return""},ie}(),ze=function(){function ie(){this.seen={}}var oe=ie.prototype;return oe.slug=function($){var Y=$.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Y)){var q=Y;do this.seen[q]++,Y=q+"-"+this.seen[q];while(this.seen.hasOwnProperty(Y))}return this.seen[Y]=0,Y},ie}(),$e=B.defaults,je=G.unescape,Ve=function(){function ie(ue){this.options=ue||$e,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new ze}ie.parse=function($,Y){var q=new ie(Y);return q.parse($)};var oe=ie.prototype;return oe.parse=function($,Y){Y===void 0&&(Y=!0);var q="",re,ge,Se,Me,at,vt,dt,Rt,wt,mt,$t,Pt,Ft,qt,Ct,He,ir,Rr,Gr=$.length;for(re=0;re0&&Ct.tokens[0].type==="text"?(Ct.tokens[0].text=Rr+" "+Ct.tokens[0].text,Ct.tokens[0].tokens&&Ct.tokens[0].tokens.length>0&&Ct.tokens[0].tokens[0].type==="text"&&(Ct.tokens[0].tokens[0].text=Rr+" "+Ct.tokens[0].tokens[0].text)):Ct.tokens.unshift({type:"text",text:Rr}):qt+=Rr),qt+=this.parse(Ct.tokens,Ft),wt+=this.renderer.listitem(qt,ir,He);q+=this.renderer.list(wt,$t,Pt);continue}case"html":{q+=this.renderer.html(mt.text);continue}case"paragraph":{q+=this.renderer.paragraph(this.parseInline(mt.tokens));continue}case"text":{for(wt=mt.tokens?this.parseInline(mt.tokens):mt.text;re+1An error occurred:"+Je(Se.message+"",!0)+"
";throw Se}}Pe.options=Pe.setOptions=function(ie){return it(Pe.defaults,ie),Ze(Pe.defaults),Pe},Pe.getDefaults=Oe,Pe.defaults=Ye,Pe.use=function(ie){var oe=it({},ie);if(ie.renderer&&function(){var $=Pe.defaults.renderer||new Ce,Y=function(ge){var Se=$[ge];$[ge]=function(){for(var Me=arguments.length,at=new Array(Me),vt=0;vt`,triples:"",explode:"[]{}"},D=te.Pos;te.defineOption("autoCloseBrackets",!1,function(w,b,d){d&&d!=te.Init&&(w.removeKeyMap(M),w.state.closeBrackets=null),b&&(P(H(b,"pairs")),w.state.closeBrackets=b,w.addKeyMap(M))});function H(w,b){return b=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[b]!=null?w[b]:K[b]}var M={Backspace:O,Enter:L};function P(w){for(var b=0;b=0;s--){var x=o[s].head;w.replaceRange("",D(x.line,x.ch-1),D(x.line,x.ch+1),"+delete")}}function L(w){var b=k(w),d=b&&H(b,"explode");if(!d||w.getOption("disableInput"))return te.Pass;for(var o=w.listSelections(),s=0;s0;return{anchor:new D(w.anchor.line,w.anchor.ch+(b?-1:1)),head:new D(w.head.line,w.head.ch+(b?1:-1))}}function C(w,b){var d=k(w);if(!d||w.getOption("disableInput"))return te.Pass;var o=H(d,"pairs"),s=o.indexOf(b);if(s==-1)return te.Pass;for(var u=H(d,"closeBefore"),x=H(d,"triples"),f=o.charAt(s+1)==b,m=w.listSelections(),_=s%2==0,y,h=0;h=0&&w.getRange(l,D(l.line,l.ch+3))==b+b+b?a="skipThree":a="skip";else if(f&&l.ch>1&&x.indexOf(b)>=0&&w.getRange(D(l.line,l.ch-2),l)==b+b){if(l.ch>2&&/\bstring/.test(w.getTokenTypeAt(D(l.line,l.ch-2))))return te.Pass;a="addFour"}else if(f){var p=l.ch==0?" ":w.getRange(D(l.line,l.ch-1),l);if(!te.isWordChar(v)&&p!=b&&!te.isWordChar(p))a="both";else return te.Pass}else if(_&&(v.length===0||/\s/.test(v)||u.indexOf(v)>-1))a="both";else return te.Pass;if(!y)y=a;else if(y!=a)return te.Pass}var g=s%2?o.charAt(s-1):b,S=s%2?b:o.charAt(s+1);w.operation(function(){if(y=="skip")w.execCommand("goCharRight");else if(y=="skipThree")for(var U=0;U<3;U++)w.execCommand("goCharRight");else if(y=="surround"){for(var j=w.getSelections(),U=0;U1&&arguments[1]!==void 0?arguments[1]:1,ue=Ae.length,$=0;$1&&arguments[1]!==void 0?arguments[1]:!1;return Object(_.a)(I).map(function(Q,ne){if(!M.isValidElement(Q)||!Q.type)return null;var se=Q.type.isSelectOptGroup,xe=Q.key,me=Q.props,Le=me.children,Ee=Object(B.a)(me,["children"]);return V||!se?y(Q):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(xe===null?ne:xe,"__"),label:xe},Ee),{},{options:h(Le)})}).filter(function(Q){return Q})}var c=Z("2Qr1"),l=Z("qNPg"),a=Z("U8pU"),v=Z("Kwbf"),p=Z("WKfj");function g(I){var V=I.mode,Q=I.options,ne=I.children,se=I.backfill,xe=I.allowClear,me=I.placeholder,Le=I.getInputElement,Ee=I.showSearch,Te=I.onSearch,ce=I.defaultOpen,fe=I.autoFocus,J=I.labelInValue,le=I.value,ee=I.inputValue,pe=I.optionLabelProp,ye=V==="multiple"||V==="tags",he=Ee!==void 0?Ee:ye||V==="combobox",we=Q||h(ne);if(Object(v.a)(V!=="tags"||we.every(function(Ce){return!Ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var De=we.some(function(Ce){return Ce.options?Ce.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in Ce?Ce.value:Ce.key)=="number"});Object(v.a)(!De,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(v.a)(V!=="combobox"||!pe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(v.a)(V==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(v.a)(V==="combobox"||!Le,"`getInputElement` only work with `combobox` mode."),Object(v.b)(V!=="combobox"||!Le||!xe||!me,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Te&&!he&&V!=="combobox"&&V!=="tags"&&Object(v.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(v.b)(!ce||fe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),le!=null){var Re=Object(p.d)(le);Object(v.a)(!J||Re.every(function(Ce){return Object(a.a)(Ce)==="object"&&("key"in Ce||"value"in Ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(v.a)(!ye||Array.isArray(le),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var ke=null;Object(_.a)(ne).some(function(Ce){if(!M.isValidElement(Ce)||!Ce.type)return!1;var Ae=Ce.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var ze=Object(_.a)(Ce.props.children).every(function($e){return!M.isValidElement($e)||!Ce.type||$e.type.isSelectOption?!0:(ke=$e.type,!1)});return!ze}return ke=Ae,!0}),ke&&Object(v.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ke.displayName||ke.name||ke,"`.")),Object(v.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var S=g,U=Object(l.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:h,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:S,fillOptionsWithMissingValue:c.a}),j=function(I){Object(D.a)(Q,I);var V=Object(H.a)(Q);function Q(){var ne;return Object(te.a)(this,Q),ne=V.apply(this,arguments),ne.selectRef=M.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(K.a)(Q,[{key:"render",value:function(){return M.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),Q}(M.Component);j.Option=u,j.OptGroup=f;var G=j,N=nt.c=G},M8RZ:function(gt,nt,Z){"use strict";Z.d(nt,"a",function(){return O});var te=Z("fWQN"),K=Z("mtLc"),D=Z("yKVA"),H=Z("879j"),M=Z("q1tI"),P=Z.n(M),B=Z("i8i4"),k=Z.n(B),O=function(L){Object(D.a)(C,L);var E=Object(H.a)(C);function C(R){var A;Object(te.a)(this,C),A=E.call(this,R);var w=window.document;return A.node=w.createElement("div"),w.body.appendChild(A.node),A}return Object(K.a)(C,[{key:"render",value:function(){var A=this.props.children;return Object(B.createPortal)(A,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),C}(P.a.Component)},OLES:function(gt,nt,Z){"use strict";var te=Z("U8pU"),K=Z("VTBJ"),D=Z("Ff2n"),H=Z("q1tI"),M=Z("uciX"),P=Z("7ixt"),B=function(R){var A=R.overlay,w=R.prefixCls,b=R.id,d=R.overlayInnerStyle;return H.createElement("div",{className:"".concat(w,"-inner"),id:b,role:"tooltip",style:d},typeof A=="function"?A():A)},k=B,O=function(R,A){var w=R.overlayClassName,b=R.trigger,d=b===void 0?["hover"]:b,o=R.mouseEnterDelay,s=o===void 0?0:o,u=R.mouseLeaveDelay,x=u===void 0?.1:u,f=R.overlayStyle,m=R.prefixCls,_=m===void 0?"rc-tooltip":m,y=R.children,h=R.onVisibleChange,c=R.afterVisibleChange,l=R.transitionName,a=R.animation,v=R.placement,p=v===void 0?"right":v,g=R.align,S=g===void 0?{}:g,U=R.destroyTooltipOnHide,j=U===void 0?!1:U,G=R.defaultVisible,N=R.getTooltipContainer,I=R.overlayInnerStyle,V=Object(D.a)(R,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Q=Object(H.useRef)(null);Object(H.useImperativeHandle)(A,function(){return Q.current});var ne=Object(K.a)({},V);"visible"in R&&(ne.popupVisible=R.visible);var se=function(){var Te=R.arrowContent,ce=Te===void 0?null:Te,fe=R.overlay,J=R.id;return[H.createElement("div",{className:"".concat(_,"-arrow"),key:"arrow"},ce),H.createElement(k,{key:"content",prefixCls:_,id:J,overlay:fe,overlayInnerStyle:I})]},xe=!1,me=!1;if(typeof j=="boolean")xe=j;else if(j&&Object(te.a)(j)==="object"){var Le=j.keepParent;xe=Le===!0,me=Le===!1}return H.createElement(M.a,Object.assign({popupClassName:w,prefixCls:_,popup:se,action:d,builtinPlacements:P.a,popupPlacement:p,ref:Q,popupAlign:S,getPopupContainer:N,onPopupVisibleChange:h,afterPopupVisibleChange:c,popupTransitionName:l,popupAnimation:a,defaultPopupVisible:G,destroyPopupOnHide:xe,autoDestroy:me,mouseLeaveDelay:x,popupStyle:f,mouseEnterDelay:s},ne),y)},L=Object(H.forwardRef)(O),E=nt.a=L},Ot1p:function(gt,nt,Z){"use strict";var te=Z("2qtc"),K=Z("kLXV"),D=Z("rAM+"),H=Z("miYZ"),M=Z("tsqr"),P=Z("tJVT"),B=Z("jrin"),k=Z("q1tI"),O=Z.n(k),L=Z("VrN/"),E=Z.n(L),C=Z("bdgK"),R=Z("p77/"),A=Z("Bd2K"),w=Z("ELLl"),b=Z("19Vz"),d=Z("lZu9"),o=Z("+NIl"),s=Z("kSUc"),u=Z("9Bee"),x=function(ie){var oe=ie.value,ue=oe===void 0?"":oe,$=ie.className,Y=ie.showTextOnly,q=ie.showLines,re=ie.style,ge=re===void 0?{}:re,Se=Object(k.useMemo)(function(){return""},[ue]);return O.a.createElement(O.a.Fragment,null,O.a.createElement("div",{dangerouslySetInnerHTML:{__html:Se}}))},f=Z("0Owb"),m=Z("dejd"),_=Z("C+DQ"),y=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function h(ie){var oe=ie.onActionCallback,ue=ie.title,$=ie.icon,Y=ie.actionName,q=ie.className,re=q===void 0?"":q,ge=ie.children;function Se(){oe(Y)}return O.a.createElement("a",{title:ue,className:re,onClick:Se},O.a.createElement("i",{className:"md-iconfont ".concat($)}),ge)}var c=function(ie){var oe=ie.watch,ue=ie.showNullButton,$=ie.onActionCallback,Y=ie.fullScreen,q=ie.insertTemp,re=ie.hidetoolBar,ge=[].concat(y,[{title:"".concat(oe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(oe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return O.a.createElement("ul",{className:"markdown-toolbar-container"},!re&&ge.map(function(Se,Me){return O.a.createElement("li",{key:Me},Se.actionName?O.a.createElement(h,Object(f.a)({},Se,{onActionCallback:$})):O.a.createElement("span",{className:"v-line"}))}),ue?O.a.createElement("li",null,O.a.createElement(h,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:$},O.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,q&&O.a.createElement("li",null,O.a.createElement(h,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(q),onActionCallback:$},O.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),O.a.createElement("li",{className:"btn-full-screen"},O.a.createElement(h,{icon:"".concat(Y?"icon-shrink":"icon-enlarge"),title:Y?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:$})))},l=Z("M8RZ"),a=Z("+L6B"),v=Z("2/Rp"),p=Z("y8nQ"),g=Z("Vl3Y"),S=Z("5NDa"),U=Z("5rEg"),j={labelCol:{span:4},wrapperCol:{span:20}},G=function(ie){var oe=ie.callback,ue=ie.onCancel;function $(Y){oe(Y)}return O.a.createElement(g.a,Object(f.a)({},j,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:$}),O.a.createElement(g.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},O.a.createElement(U.a,null)),O.a.createElement(g.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},O.a.createElement(U.a,null)),O.a.createElement("div",{className:"flex-container flex-end"},O.a.createElement(v.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),O.a.createElement(v.a,{type:"ghost",onClick:ue},"\u53D6\u6D88")))},N=Z("7ahc"),I=Z("HmJG"),V=Z("BjJ7"),Q=g.a.useForm,ne={width:280,marginRight:10},se={labelCol:{span:5},wrapperCol:{span:19}},xe=function(ie){var oe=ie.callback,ue=ie.onCancel,$=Q(),Y=Object(P.a)($,1),q=Y[0];function re(Me){oe(Me)}function ge(Me,at){q.setFieldsValue({src:"/api/attachments/".concat(Me.id),type:at.type})}function Se(Me){var at=Me.target.files[0];Le(at,ge)}return O.a.createElement(g.a,Object(f.a)({form:q},se,{className:"upload-image-panel",onFinish:re}),O.a.createElement(g.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},O.a.createElement("div",{className:"flex-container"},O.a.createElement(g.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},O.a.createElement(U.a,{style:ne})),O.a.createElement(me,{onFileChange:Se}))),O.a.createElement(g.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},O.a.createElement(U.a,{style:{width:264}})),O.a.createElement(g.a.Item,{style:{textAlign:"right"}},O.a.createElement(v.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),O.a.createElement(v.a,{type:"ghost",onClick:ue},"\u53D6\u6D88")))};function me(ie){var oe=ie.onFileChange;return O.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",O.a.createElement("input",{type:"file",onChange:oe}))}function Le(ie,oe){if(!ie)throw new String("\u6CA1\u6709\u6587\u4EF6");var ue=new FormData;ue.append("editormd-image-file",ie),ue.append("file_param_name","editormd-image-file"),ue.append("byxhr","true");var $=new window.XMLHttpRequest;$.withCredentials=!0,$.addEventListener("load",function(Y){oe(JSON.parse(Y.target.responseText),ie)},!1),$.addEventListener("error",function(Y){console.error(Y)},!1),$.open("POST","".concat(V.a,"/api/attachments.json")),$.send(ue)}var Ee=Z("giR+"),Te=Z("fyUT"),ce=Z("7Kak"),fe=Z("9yH6"),J=fe.a.Group,le={margin:"0 8px"},ee=function(ie){var oe=ie.callback,ue=ie.onCancel;function $(Y){oe(Y)}return O.a.createElement(g.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:$},O.a.createElement("div",{className:"flex-container"},O.a.createElement("span",{style:le},"\u5355\u5143\u683C\u6570\uFF1A"),O.a.createElement("span",{style:le},"\u884C\u6570"),O.a.createElement(g.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},O.a.createElement(Te.a,null)),O.a.createElement("span",{style:le},"\u5217\u6570"),O.a.createElement(g.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},O.a.createElement(Te.a,null))),O.a.createElement("div",{className:"flex-container",style:{marginTop:12}},O.a.createElement("span",{style:le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),O.a.createElement(g.a.Item,{name:"align"},O.a.createElement(J,null,O.a.createElement(fe.a,{value:"default"},O.a.createElement("i",{className:"fa fa-align-justify"})),O.a.createElement(fe.a,{value:"left"},O.a.createElement("i",{className:"fa fa-align-left"})),O.a.createElement(fe.a,{value:"center"},O.a.createElement("i",{className:"fa fa-align-center"})),O.a.createElement(fe.a,{value:"right"},O.a.createElement("i",{className:"fa fa-align-right"}))))),O.a.createElement("div",{className:"flex-container flex-end"},O.a.createElement(v.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),O.a.createElement(v.a,{type:"ghost",onClick:ue},"\u53D6\u6D88")))},pe=Z("m3rI"),ye="link",he="upload-image",we="code-block",De="add-table",Re="------------",ke={default:Re,left:":".concat(Re),center:":".concat(Re,":"),right:"".concat(Re,":")},Ce=Z("9VGf"),Ae,ze;function $e(){}var je=0,Ve=1e4,it="\u2581",rt=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Je(ie){return/^\d+$/.test(ie)?"".concat(ie,"px"):ie}var Oe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ze=Oe?"Cmd":"Ctrl",Ye=(Ae={},Object(B.a)(Ae,Ze+"-B","bold"),Object(B.a)(Ae,Ze+"-I","italic"),Ae),Pe=(ze={},Object(B.a)(ze,ye,"\u6DFB\u52A0\u94FE\u63A5"),Object(B.a)(ze,we,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(B.a)(ze,he,"\u6DFB\u52A0\u56FE\u7247"),Object(B.a)(ze,De,"\u6DFB\u52A0\u8868\u683C"),ze),Fe=nt.a=function(ie){var oe=ie.defaultValue,ue=oe===void 0?"":oe,$=ie.onChange,Y=ie.width,q=Y===void 0?"100%":Y,re=ie.height,ge=re===void 0?400:re,Se=ie.miniToolbar,Me=Se===void 0?!1:Se,at=ie.isFocus,vt=at===void 0?!1:at,dt=ie.watch,Rt=ie.insertTemp,wt=ie.mode,mt=wt===void 0?"markdown":wt,$t=ie.id,Pt=$t===void 0?"markdown-editor-id":$t,Ft=ie.showResizeBar,qt=Ft===void 0?!1:Ft,Ct=ie.noStorage,He=Ct===void 0?!1:Ct,ir=ie.showNullButton,Rr=ir===void 0?!1:ir,Gr=ie.hidetoolBar,Er=Gr===void 0?!1:Gr,Li=ie.fullScreen,Pr=Li===void 0?!1:Li,nn=ie.onBlur,Fr=ie.onCMBeforeChange,Vt=ie.onFullScreen,ut=ie.className,zr=ut===void 0?"":ut,Tn=ie.disablePaste,pr=Tn===void 0?!1:Tn,kt=ie.placeholder,Vr=kt===void 0?"":kt,kr=ie.values,hn=kr===void 0?"":kr,Ke=Object(k.useState)(null),Et=Object(P.a)(Ke,2),Qe=Et[0],Fn=Et[1],_n=Object(k.useState)(ue),an=Object(P.a)(_n,2),mn=an[0],bt=an[1],Di=Object(k.useState)(dt),Sn=Object(P.a)(Di,2),Nr=Sn[0],xr=Sn[1],ni=Object(k.useState)(Pr),wn=Object(P.a)(ni,2),Tr=wn[0],Nn=wn[1],ii=Object(k.useState)(""),pn=Object(P.a)(ii,2),$r=pn[0],Br=pn[1],ai=Object(k.useState)(0),Cn=Object(P.a)(ai,2),gn=Cn[0],vn=Cn[1],oi=Object(k.useState)(ge),_r=Object(P.a)(oi,2),Oi=_r[0],Ri=_r[1],An=Object(k.useState)(!1),Yr=Object(P.a)(An,2),na=Yr[0],si=Yr[1],on=Object(k.useRef)(),Bn=Object(k.useRef)(),Jr=Object(k.useRef)(),Nt=Object(k.useRef)();Object(k.useEffect)(function(){bt(hn),Qe==null||Qe.setValue(hn)},[hn]),Object(k.useEffect)(function(){Vt==null||Vt(Tr)},[Tr]),Object(k.useEffect)(function(){if(on.current){var ct=E.a.fromTextArea(on.current,{mode:mt,lineNumbers:!Me,lineWrapping:!0,value:ue,autoCloseTags:!0,autoCloseBrackets:!0});vt&&ct.focus();function St(_t,It){if(pr){It.preventDefault();return}var Bt=It.clipboardData;if(Bt){var jt=Bt.types.toString(),Yt=Bt.items,Kt=["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(jt==="Files"||Bt.types.indexOf("Files")>-1){if(It.preventDefault(),mt=="stex")return;try{var cr,jr=Yt[1];((cr=Yt[0])===null||cr===void 0?void 0:cr.kind)==="file"&&(jr=Yt[0]);var Gt=jr.getAsFile(),Qr=Gt.name.split(".").pop();Le(Gt,function(ar){if(ar.id){var Zr,ln,un;(Gt==null||((Zr=Gt.type)===null||Zr===void 0)?void 0:Zr.indexOf("image"))>-1?ct.replaceSelection(".concat(ar.content_type,")")):(Gt==null||((ln=Gt.type)===null||ln===void 0)?void 0:ln.indexOf("video"))>-1?ct.replaceSelection('')):(Gt==null||((un=Gt.type)===null||un===void 0)?void 0:un.indexOf("pdf"))>-1?ct.replaceSelection('').concat(Gt.name,"")):Kt.includes(Qr)?ct.replaceSelection('').concat(Gt.name,"")):ct.replaceSelection("[".concat(Gt.name,"](").concat(pe.a.API_SERVER,"/api/attachments/").concat(ar.id,"?type=").concat(ar.content_type,")"))}else(ar==null?void 0:ar.status)===401&&(document.location.href="/user/login")})}catch(ar){M.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ct.on("paste",St),Fn(ct),function(){ct.off("paste",St)}}},[]);var yn=Object(k.useCallback)(function(){if(Bn.current)try{}catch(ct){console.log(ct,"---- to set md editor body height")}},[Oi,Bn,Tr]);Object(k.useEffect)(function(){function ct(){var _t=new C.default(function(It){var Bt=Object(D.a)(It),jt;try{for(Bt.s();!(jt=Bt.n()).done;){var Yt=jt.value;(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&(yn(),Qe.setSize("100%","100%"),Qe.refresh())}}catch(Kt){Bt.e(Kt)}finally{Bt.f()}});return _t.observe(on.current.parentElement),_t}if(Qe){var St=ct();return function(){St.unobserve(on.current.parentElement)}}},[Qe,yn]),Object(k.useEffect)(function(){if(Qe){for(var ct=[],St=function(){var Yt=It[_t];Bt=Object(P.a)(Yt,2);var Kt=Bt[0],cr=Bt[1],jr=Object(B.a)({},Kt,function(){jn(cr)});ct.push(jr),Qe.addKeyMap(jr)},_t=0,It=Object.entries(Ye);_t0){var ct=new Date().getTime(),St=window.sessionStorage.getItem(Pt);ct>=gn+Ve&&(!St||St!==mn)&&(window.sessionStorage.setItem(Pt,mn),si(!0))}},Ve),Object(k.useEffect)(function(){xr(dt)},[Qe,dt]),Object(k.useEffect)(function(){Qe&&(vt&&Qe.focus())},[Qe,vt]),Object(k.useEffect)(function(){if(Nr&&Qe){var ct=Qe.getScrollerElement();function St(_t){var It=_t.target;if(Nt.current){var Bt=It.scrollTop/It.scrollHeight;Nt.current.scrollTop=Nt.current.scrollHeight*Bt}}return ct.addEventListener("scroll",St),function(){ct.removeEventListener("scroll",St)}}},[Qe,Nr]),Object(k.useEffect)(function(){if(Qe&&Fr){function ct(St,_t){Fr(St,_t)}return Qe.on("beforeChange",ct),function(){Qe.off("beforeChange",ct)}}},[Qe,Fr]),Object(k.useEffect)(function(){if(Qe&&nn){function ct(){nn(Qe.getValue())}return Qe.on("blur",ct),function(){Qe.off("blur",ct)}}},[Qe,nn]),Object(k.useEffect)(function(){if(Qe){function ct(St){var _t=St.getValue();bt(_t),vn(new Date().getTime()),St.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),$&&$(_t)}return Qe.on("change",ct),function(){Qe.off("change",ct)}}},[Qe,$]),Object(k.useEffect)(function(){Qe&&(ue==null?(Qe.setValue(""),bt("")):ue!==Qe.getValue()&&(Qe.setValue(ue),bt(ue),Qe.setCursor(Qe.lineCount(),0)))},[Qe,ue]);var jn=Object(k.useCallback)(function(ct){var St=Qe.getCursor(),_t=Qe.getSelection(),It=_t.split(`
`);switch(ct){case"bold":return Qe.replaceSelection("**"+_t+"**"),_t===""&&Qe.setCursor(St.line,St.ch+2),Qe.focus();case"italic":return Qe.replaceSelection("*"+_t+"*"),_t===""&&Qe.setCursor(St.line,St.ch+1),Qe.focus();case"code":return Qe.replaceSelection("`"+_t+"`"),_t===""&&Qe.setCursor(St.line,St.ch+1),Qe.focus();case"inline-latex":return Qe.replaceSelection("`$$"+_t+"$$`"),_t===""&&Qe.setCursor(St.line,St.ch+3),Qe.focus();case"latex":return Qe.replaceSelection("```latex\n"+_t+"\n```"),Qe.setCursor(St.line+1,_t.length+1),Qe.focus();case"line-break":return Qe.replaceSelection(`
`),Qe.focus();case"list-ul":return _t===""?Qe.replaceSelection("- "+_t):Qe.replaceSelection(It.map(function(Bt){return Bt===""?"":"- ".concat(Bt)}).join(`
`)),Qe.focus();case"list-ol":return _t===""?Qe.replaceSelection("1. "+_t):Qe.replaceSelection(It.map(function(Bt,jt){return Bt===""?"":"".concat(jt+1,". ").concat(Bt)}).join(`
`)),Qe.focus();case"add-null-ch":return _t===""&&Qe.setCursor(St.line,St.ch+1),Qe.replaceSelection(it),Qe.focus();case"inster-template-1":return _t===""&&Qe.setCursor(St.line,St.ch),Qe.replaceSelection(rt),Qe.focus();case"eraser":return Qe.setValue(""),Qe.focus();case"trigger-watch":return xr(!Nr),Qe.focus();case"trigger-full-screen":return Nn(!Tr),Qe.focus();case ye:Br(ye);return;case we:Br(we);return;case he:Br(he);return;case De:Br(De);return;default:throw new Error}},[Qe,Nr,Tr]),sn=Object(k.useCallback)(function(ct){Br("");switch($r){case ye:var St=ct.title,_t=ct.link;return Qe.replaceSelection("[".concat(St,"](").concat(_t,")")),Qe.focus();case we:var It=ct.language,Bt=ct.content;return Qe.replaceSelection(["```"+It,Bt,"```"].join(`
`)),Qe.focus();case he:var jt=ct.src,Yt=ct.alt;return Qe.replaceSelection(".concat(jt,' "').concat(Yt,'" )')),Qe.focus();case De:for(var Kt=ct.row,cr=ct.col,jr=ct.align,Gt=`
`,Qr=0;Qr300&&(Kt=300);var cr=ge+Kt+"px";Ri(cr)}}return ct.addEventListener("mousedown",It),document.addEventListener("mousemove",jt),document.addEventListener("mouseup",Bt),function(){ct.removeEventListener("mousedown",It),document.removeEventListener("mousemove",jt),document.removeEventListener("mouseup",Bt)}}},[Qe,Jr]),Object(k.useEffect)(function(){Ri(ge)},[ge]);var Wn=Je(q),Hn=Je(Oi),Pi={width:Wn,height:Hn},bn=Object(k.useMemo)(function(){if(gn){var ct=new Date(gn),St=ct.getHours(),_t=ct.getMinutes(),It=ct.getSeconds();return St=St<10?"0"+St:St,_t=_t<10?"0"+_t:_t,It=It<10?"0"+It:It,"".concat(St,":").concat(_t,":").concat(It)}return 0},[gn]);function ia(){window.sessionStorage.removeItem(Pt),si(!1),vn(0)}function li(){si(!1),vn(0),Qe.setValue(window.sessionStorage.getItem(Pt))}return O.a.createElement(k.Fragment,null,O.a.createElement("div",{className:"markdown-editor-wrapper",ref:Bn},O.a.createElement("div",{className:"markdown-editor-container ".concat(zr," ").concat(Nr?"on-preview":""," ").concat(Me?"mini":""," ").concat(Tr?"full-screen":""),style:Pi},O.a.createElement(c,{insertTemp:Rt,watch:Nr,fullScreen:Tr,showNullButton:Rr,onActionCallback:jn,hidetoolBar:Er}),O.a.createElement("div",{className:"markdown-editor-body"},O.a.createElement("div",{className:"codemirror-container"},O.a.createElement("textarea",{ref:on,placeholder:Vr})),Nr?O.a.createElement("div",{ref:Nt,className:"preview-container"},mt==="stex"&&O.a.createElement(x,{value:mn}),mt!=="stex"&&O.a.createElement(u.a,{value:mn})):null))),qt?O.a.createElement("a",{ref:Jr,className:"editor-resize"}):null,O.a.createElement(l.a,null,Pe[$r]?O.a.createElement(K.a,{centered:!0,title:Pe[$r],visible:!0,onCancel:Sr,footer:null},Ht):null))}},R8k3:function(gt,nt,Z){"use strict";Z.r(nt);var te=Z("T2oS"),K=Z("W9HT"),D=Z("jCWc"),H=Z("kPKH"),M=Z("5Dmo"),P=Z("3S7+"),B=Z("sRBo"),k=Z("kaz8"),O=Z("14J3"),L=Z("BMrR"),E=Z("+L6B"),C=Z("2/Rp"),R=Z("7Kak"),A=Z("9yH6"),w=Z("MXD1"),b=Z("CFYs"),d=Z("miYZ"),o=Z("tsqr"),s=Z("2qtc"),u=Z("kLXV"),x=Z("k1fw"),f=Z("rAM+"),m=Z("9og8"),_=Z("tJVT"),y=Z("PpiC"),h=Z("5NDa"),c=Z("5rEg"),l=Z("aHsQ"),a=Z("sGsY"),v=Z("WmNS"),p=Z.n(v),g=Z("q1tI"),S=Z.n(g),U=Z("Ty5D"),j=Z("55Ip"),G=Z("9kvl"),N=Z("gUdW"),I=Z("xGfz"),V=Z("jhfD"),Q=Z("BlwA"),ne=Z("bPs0"),se=Z("qmgf"),xe=Z.n(se),me=Z("1vsH"),Le=Z("xKgJ"),Ee=Z("bntm"),Te=Z("V0Rq"),ce=Z("HBuW"),fe=Z("9Bee"),J=Z("Ot1p"),le=function(Ze){var Ye,Pe,Fe,ie,oe,ue,$,Y=Ze.item,q=Ze.answerData,re=Ze.onBlur,ge=re===void 0?function(){}:re,Se=Object(g.useState)(),Me=Object(_.a)(Se,2),at=Me[0],vt=Me[1],dt=Object(g.useState)(),Rt=Object(_.a)(dt,2),wt=Rt[0],mt=Rt[1],$t=Object(g.useState)(),Pt=Object(_.a)($t,2),Ft=Pt[0],qt=Pt[1];return Object(g.useEffect)(function(){mt(Y==null?void 0:Y.a_flag)},[Y==null?void 0:Y.a_flag]),S.a.createElement("div",null,(q==null||((Ye=q.exercise)===null||Ye===void 0)?void 0:Ye.commit_status)===1?S.a.createElement("div",null,S.a.createElement("p",{className:"mt10 mb0"},"\u6211\u7684\u7B54\u6848\uFF1A"),S.a.createElement("div",{className:xe.a.simpleText},S.a.createElement(fe.a,{value:Y==null||((Pe=Y.user_answer)===null||Pe===void 0)?void 0:Pe[0]}))):S.a.createElement("div",{className:Y.user_score&&(Y.user_score===Y.question_score?"c-green":"c-red")},Ft?S.a.createElement(J.a,{height:150,isFocus:!0,defaultValue:Y==null||((Fe=Y.user_answer)===null||Fe===void 0)?void 0:Fe[0],id:Y==null?void 0:Y.question_id,onChange:function(He){return vt(He)}}):S.a.createElement("div",{onClick:function(){var He;if(!Y.repeat_answer&&(Y==null||((He=Y.user_answer)===null||He===void 0)?void 0:He.length)>0)return;qt(!0)}},S.a.createElement(c.a,{size:"large",className:"current",placeholder:(Y==null||((ie=Y.user_answer)===null||ie===void 0)?void 0:ie.length)>0?Y==null||((oe=Y.user_answer)===null||oe===void 0)?void 0:oe[0]:"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54",readOnly:!0}))),S.a.createElement(L.a,{justify:"end",style:{marginBottom:10,marginTop:10}},S.a.createElement(C.a,{type:"primary",className:"font16 ml20",onClick:function(){ge(at)}},"\u63D0\u4EA4\u7B54\u6848")),(Y==null?void 0:Y.standard_answer)&&(Y==null||((ue=Y.user_answer)===null||ue===void 0)?void 0:ue.length)>0&&S.a.createElement("div",null,S.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),S.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},S.a.createElement(fe.a,{value:Y==null||(($=Y.standard_answer)===null||$===void 0)?void 0:$[0]}))))},ee=le,pe=Z("oBTY"),ye=c.a.TextArea,he=function(Ze){var Ye,Pe,Fe=Ze.item,ie=Ze.answerData,oe=Ze.onBlur,ue=oe===void 0?function(){}:oe,$=Object(g.useState)([]),Y=Object(_.a)($,2),q=Y[0],re=Y[1];Object(g.useEffect)(function(){for(var Se=[],Me=function(dt){var Rt,wt=(Fe==null||((Rt=Fe.user_answer)===null||Rt===void 0)?void 0:Rt.find(function(mt){return mt.choice_id===dt+1}))||{choice_id:dt+1,answer_text:""};Se.push(Object(x.a)({},wt))},at=0;at<(Fe==null?void 0:Fe.multi_count);at++)Me(at);re(Se)},[Fe==null?void 0:Fe.user_answer]);var ge=Object(g.useMemo)(function(){return q.every(function(Se){var Me,at;return((Me=Se.answer_text)===null||Me===void 0||((at=Me.trim())===null||at===void 0)?void 0:at.length)>0})},[q]);return S.a.createElement("div",null,q==null?void 0:q.map(function(Se,Me){return S.a.createElement("div",{className:"mt10",key:Me},S.a.createElement("span",null,"\u6211\u7684\u7B54\u6848\uFF08\u586B\u7A7A",Me+1,"\uFF09:"),S.a.createElement("div",null,S.a.createElement(ye,{autoSize:!0,rows:4,value:Se==null?void 0:Se.answer_text,onChange:function(vt){q[Me].answer_text=vt.target.value,re(Object(pe.a)(q))},onBlur:function(vt){return ue(Se==null?void 0:Se.answer_text,Me+1,q)},className:"overflow_hidden ".concat(Fe.user_score&&(Fe.user_score===Fe.question_score?"c-green":"c-red"))})))}),!!(Fe!=null&&(Ye=Fe.standard_answer)!==null&&Ye!==void 0&&Ye.length)&&ge&&S.a.createElement("div",null,Fe==null||((Pe=Fe.standard_answer)===null||Pe===void 0)?void 0:Pe.map(function(Se,Me){return S.a.createElement("div",{key:Me},S.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Me+1,"\uFF09:"),S.a.createElement("div",null,S.a.createElement(ye,{autoSize:!0,disabled:!0,value:Se==null?void 0:Se.answer_text[0]})))})))},we=he,De=Z("m3rI"),Re=Z("LvDl"),ke=a.a.Countdown,Ce=c.a.TextArea,Ae=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ze={1:"\u672A\u53D1\u5E03",2:"\u5DF2\u53D1\u5E03",3:"\u5DF2\u622A\u6B62"},$e={1:xe.a.flagActive,2:xe.a.flagHalf},je={0:"c-red-ee4",1:"c-green"},Ve=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],it=function(Ze,Ye,Pe){if(Ze.length!==Ye.length)return!1;for(var Fe=Ze.map(function(oe){var ue;return(ue=Pe.find(function($){return $.choice_id===oe}))===null||ue===void 0?void 0:ue.choice_position}),ie=0;ie-1&&Object(Ee.b)()}},[Ft.categoryId]);var ki=function(ve){ve.data==="backExercise"&&(vn("none"),Br(""),Kn())},Ma=function(ve){var Ne="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(ve||window.event).returnValue=Ne,Ne},Kn=function(){var ft=Object(m.a)(p.a.mark(function ve(){var Ne,Ue,lt,We,Ge;return p.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return pr(!0),qe.next=3,Object(Te.Y)(Object(x.a)(Object(x.a)({},Ft),{},{login:Ft.login,exercise_id:Ft.categoryId})).catch(function(){return pr(!1)});case 3:if(Ue=qe.sent,((Ne=Ue)===null||Ne===void 0?void 0:Ne.exercise)&&(Ue.exercise.user_exercise_status=1),pr(!1),!Ue){qe.next=10;break}return Ue.exercise_types=((lt=Ue)===null||lt===void 0?void 0:lt.exercise_types)||((We=Ue)===null||We===void 0||((Ge=We.exercise_scores)===null||Ge===void 0)?void 0:Ge.exercise_types),ir(Ue),qe.abrupt("return",Ue);case 10:case"end":return qe.stop()}},ve)}));return function(){return ft.apply(this,arguments)}}();Object(g.useEffect)(function(){var ft,ve,Ne;((ft=He.exercise)===null||ft===void 0?void 0:ft.time)===0&&zn(),((ve=He.exercise)===null||ve===void 0?void 0:ve.time)&&xr(Date.now()+(He==null||((Ne=He.exercise)===null||Ne===void 0)?void 0:Ne.time)*1e3*60)},[(Ye=He.exercise)===null||Ye===void 0?void 0:Ye.time]);var xo=function(){var ve;(He==null||((ve=He.exercise)===null||ve===void 0)?void 0:ve.exercise_status)===3?u.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u622A\u6B62\u65F6\u95F4\u5DF2\u5230\uFF0C\u65E0\u6CD5\u6253\u56DE\u8BD5\u5377",S.a.createElement("br",null),"\u8BF7\u5728\u4FEE\u6539\u622A\u6B62\u65F6\u95F4\u540E\u518D\u64CD\u4F5C")}):u.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u5B66\u751F\u5C06\u5F97\u5230\u4E00\u6B21\u91CD\u65B0\u7B54\u9898\u7684\u673A\u4F1A\uFF0C\u73B0\u6709\u7684\u7B54\u9898\u60C5\u51B5\u5C06\u88AB\u6E05\u7A7A",S.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u56DE\u9000TA\u7684\u8BD5\u5377\u7B54\u9898"),onOk:function(){var Ne=Object(m.a)(p.a.mark(function lt(){var We,Ge;return p.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Object(Te.R)({categoryId:Ft.categoryId,user_ids:[He==null||((We=He.exercise_answer_user)===null||We===void 0)?void 0:We.user_id]});case 2:Ge=qe.sent,Ge&&(o.b.info(Ge==null?void 0:Ge.message),aa());case 4:case"end":return qe.stop()}},lt)}));function Ue(){return Ne.apply(this,arguments)}return Ue}()})},aa=function(){Kn()},ui=function(){var ft=Object(m.a)(p.a.mark(function ve(Ne){var Ue;return p.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return We.next=2,Object(ce.A)({id:Ne.shixun_identifier});case 2:Ue=We.sent,Ue!=null&&Ue.game_identifier&&(Br("/tasks/".concat(Ue.game_identifier,"?type=exercises&exercisesId=").concat(Ft.categoryId,"&coursesId=").concat(Ft.coursesId,"&login=").concat(Ft.login,"&questionId=").concat(Ne.question_id)),vn("block")),(Ue==null?void 0:Ue.status)===-3?Object(me.o)():(Ue==null?void 0:Ue.status)===2?Ia(Ue==null?void 0:Ue.message,Ne.question_id):(Ue==null?void 0:Ue.status)===3&&Mi(Ue==null?void 0:Ue.message);case 5:case"end":return We.stop()}},ve)}));return function(Ne){return ft.apply(this,arguments)}}(),Ia=function ft(ve,Ne){var Ue;ve=(Ue=ve)!==null&&Ue!==void 0&&Ue.includes(".json")?ve:"".concat(ve,".json"),u.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var lt=Object(m.a)(p.a.mark(function Ge(){var pt,qe;return p.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,Object(Te.S)({url:ve});case 2:if(pt=Tt.sent,pt){Tt.next=5;break}return Tt.abrupt("return");case 5:return o.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Tt.next=8,Object(ce.A)({id:pt.shixun_identifier});case 8:if(qe=Tt.sent,!(qe!=null&&qe.game_identifier)){Tt.next=12;break}return ui({shixun_identifier:qe==null?void 0:qe.game_identifier,question_id:Ne}),Tt.abrupt("return");case 12:(qe==null?void 0:qe.status)===2?ft(qe==null?void 0:qe.message,Ne):(qe==null?void 0:qe.status)===3&&Mi(qe==null?void 0:qe.message);case 13:case"end":return Tt.stop()}},Ge)}));function We(){return lt.apply(this,arguments)}return We}()})},Mi=function(ve){u.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",ve,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},di=function(ve){ve.redo?u.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:S.a.createElement("div",{className:"tc font16"},"\u60A8\u4E4B\u524D\u5DF2\u7ECF\u6311\u6218\u8FC7\u8BE5\u5B9E\u8BAD\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u9700\u8981\u91CD\u65B0\u6311\u6218"),onOk:function(){var Ne=Object(m.a)(p.a.mark(function lt(){var We,Ge,pt,qe;return p.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,Object(Te.S)({id:ve.myshixun_identifier,url:ve.url});case 2:We=Tt.sent,We&&(Ge=Object(Re.cloneDeep)(He==null?void 0:He.exercise_question_types),pt=Ge==null?void 0:Ge.findIndex(function(Lt){return Lt.question_type===5}),Ge[pt].items.find(function(Lt){return Lt.question_id===ve.question_id}).redo=!1,Ge[pt].items.find(function(Lt){return Lt.question_id===ve.question_id}).shixun_identifier=We.shixun_identifier,He.exercise_question_types=Ge,ir(He),qe=Object(x.a)(Object(x.a)({},ve),{},{shixun_identifier:We.shixun_identifier}),ui(qe));case 4:case"end":return Tt.stop()}},lt)}));function Ue(){return Ne.apply(this,arguments)}return Ue}()}):ui(ve)},Ln=function(){var ft=Object(m.a)(p.a.mark(function ve(Ne){var Ue;return p.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(!Ne.hack_identifier){We.next=5;break}return We.next=3,Object(Te.X)({id:Ne.hack_identifier});case 3:Ue=We.sent,(Ue==null?void 0:Ue.status)===0&&(Br("/myproblems/".concat(Ue.identifier,"?type=exercises&exercisesId=").concat(Ft.categoryId,"&coursesId=").concat(Ft.coursesId,"&login=").concat(Ft.login,"&questionId=").concat(Ne.question_id)),vn("block"));case 5:case"end":return We.stop()}},ve)}));return function(Ne){return ft.apply(this,arguments)}}(),Gn=function(){var ft=Object(m.a)(p.a.mark(function ve(Ne,Ue,lt,We){var Ge;return p.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:if(Ne){qe.next=3;break}return console.error("handleSave no questionId params"),qe.abrupt("return");case 3:return qe.next=5,Object(Te.cb)({questionId:Ne,exercise_choice_id:Ue,answer_text:lt});case 5:Ge=qe.sent,(Ge==null?void 0:Ge.status)===0&&(We&&We());case 7:case"end":return qe.stop()}},ve)}));return function(Ne,Ue,lt,We){return ft.apply(this,arguments)}}(),oa=function(ve){return S.a.createElement("div",null,S.a.createElement(b.a,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:ve}),S.a.createElement("div",{className:"c-grey-c tc mt10 mb20"},"\u6B63\u5728\u5224\u5206\u4E2D\u2026"))},Ua=function(){var ve=0,Ne=u.a.info({title:"\u4EA4\u5377\u4E2D",icon:null,className:"modal-footer-none",content:oa(ve)}),Ue=setInterval(function(){ve<=100?(ve+=2,Ne.update({content:oa(ve)})):(Ne.destroy(),clearInterval(Ue))},50)},zn=function(){var ft=Object(m.a)(p.a.mark(function ve(){var Ne;return p.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Ua(),lt.next=3,Object(Te.ab)({categoryId:Ft.categoryId,commit_method:1});case 3:Ne=lt.sent,Object(Ee.b)(),$t({type:"exercise/setActionTabs",payload:Object(x.a)({},{removeEventListenerExitScreen:!0})}),(Ne==null?void 0:Ne.status)===0&&(o.b.success(Ne==null?void 0:Ne.message),Fn(!1),setTimeout(function(){u.a.info({title:"\u4EA4\u5377\u6210\u529F\uFF01",okText:"\u786E\u5B9A",onOk:function(){aa()}})},3e3));case 7:case"end":return lt.stop()}},ve)}));return function(){return ft.apply(this,arguments)}}(),or=function(){var ft=Object(m.a)(p.a.mark(function ve(Ne,Ue,lt,We){return p.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:case"end":return pt.stop()}},ve)}));return function(Ne,Ue,lt,We){return ft.apply(this,arguments)}}(),Fa=function(){var ft=Object(m.a)(p.a.mark(function ve(Ne,Ue,lt,We,Ge){var pt,qe,xt,Tt;return p.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:We.user_answer=[],We.user_answer.push(Ne),Tt=Ge==null||((pt=Ge.sub_exercise_questions)===null||pt===void 0)?void 0:pt.filter(function(Mt){var Dt;return((Dt=Mt.user_answer)===null||Dt===void 0?void 0:Dt.length)===0}),He.question_status.find(function(Mt){return Mt.ques_id===Ue}).ques_status=(Tt==null?void 0:Tt.length)===(Ge==null||((qe=Ge.sub_exercise_questions)===null||qe===void 0)?void 0:qe.length)?0:(Tt==null?void 0:Tt.length)>0&&(Tt==null?void 0:Tt.length)<(Ge==null||((xt=Ge.sub_exercise_questions)===null||xt===void 0)?void 0:xt.length)?2:1,ir(Object(x.a)({},He));case 5:case"end":return Jt.stop()}},ve)}));return function(Ne,Ue,lt,We,Ge){return ft.apply(this,arguments)}}(),sa=function(ve,Ne,Ue,lt,We){Gn(Ue,Ne,ve,function(){var Ge={choice_id:Ne,answer_text:ve};We.user_answer.sort(function(pt,qe){return pt.choice_id-qe.choice_id}),We.user_answer[Ne-1]=Ge,We.repeat_answer||(We.israp=!0),ir(Object(x.a)({},He))})},Vn=function(ve,Ne,Ue){Gn(Ne,null,ve,function(){He.question_status.find(function(lt){return lt.ques_id===Ne}).ques_status=ve?1:0,Ue.user_answer=[],Ue.user_answer.push(ve),Ue.repeat_answer||(Ue.israp=!0),ir(Object(x.a)({},He))})},la=function(ve){var Ne,Ue,lt,We=ve.item,Ge=Object(g.useState)(We==null||((Ne=We.user_answer)===null||Ne===void 0)?void 0:Ne[0]),pt=Object(_.a)(Ge,2),qe=pt[0],xt=pt[1],Tt=Object(g.useState)(!1),Lt=Object(_.a)(Tt,2),Jt=Lt[0],Mt=Lt[1];return S.a.createElement("div",null,S.a.createElement(A.a.Group,{defaultValue:We==null||((Ue=We.user_answer)===null||Ue===void 0)?void 0:Ue[0],onChange:function(gr){xt(gr.target.value)},className:We.user_score&&"edu-radio-".concat(We.user_score===We.question_score?"green":"red")},We==null||((lt=We.question_choices)===null||lt===void 0)?void 0:lt.map(function(Dt,gr){var qr=We.question_type==2,cn=qr?"":"".concat(Ae[gr],".");return S.a.createElement("div",{className:xe.a.answerWrap,key:gr},S.a.createElement(A.a,{value:Dt==null?void 0:Dt.choice_id},S.a.createElement("span",{className:"mr3"},cn),S.a.createElement(fe.a,{className:xe.a.renderHtml,value:Dt==null?void 0:Dt.choice_text})))})),S.a.createElement(L.a,{justify:"end",style:{marginBottom:10}},S.a.createElement(C.a,{type:"primary",className:"font16 ml20",loading:Jt,onClick:function(){if(!qe){o.b.info("\u8BF7\u52FF\u63D0\u4EA4\u7A7A\u7684\u7B54\u6848");return}Mt(!0),Gn(We==null?void 0:We.question_id,qe,null,function(){We.user_answer=[],We.user_answer.push(qe),We.repeat_answer||(We.israp=!0),ir(Object(x.a)({},He)),Mt(!1)})}},"\u63D0\u4EA4\u7B54\u6848")))},ua=function(ve){var Ne,Ue=ve.items,lt=ve.keys,We=ve.i;return S.a.createElement("div",null,Ue==null||((Ne=Ue.sub_exercise_questions)===null||Ne===void 0)?void 0:Ne.map(function(Ge,pt){var qe,xt,Tt,Lt=Object(g.useState)(Ge==null||((qe=Ge.user_answer)===null||qe===void 0)?void 0:qe[0]),Jt=Object(_.a)(Lt,2),Mt=Jt[0],Dt=Jt[1],gr=Object(g.useState)(!1),qr=Object(_.a)(gr,2),cn=qr[0],Ot=qr[1];return S.a.createElement("div",null,S.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},S.a.createElement("span",{style:{flexShrink:0},className:"font18"},We+1+"."+(pt+1),"\uFF08\u5355\u9009\u9898\uFF09"),S.a.createElement(fe.a,{value:Ge==null?void 0:Ge.question_title}),S.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",Ge==null?void 0:Ge.question_score,"\u5206\uFF09")),S.a.createElement(A.a.Group,{defaultValue:Ge==null||((xt=Ge.user_answer)===null||xt===void 0)?void 0:xt[0],onChange:function(vr){Dt(vr.target.value),Fa(vr.target.value,Ue==null?void 0:Ue.question_id,pt,Ge,Ue)},className:Ge.user_score&&"edu-radio-".concat(Ge.user_score===Ge.question_score?"green":"red")},Ge==null||((Tt=Ge.question_choices)===null||Tt===void 0)?void 0:Tt.map(function(Mr,vr){var Xr=Ge.question_type==2,Wr=Xr?"":"".concat(Ae[vr],".");return S.a.createElement("div",{className:xe.a.answerWrap,key:vr},S.a.createElement(A.a,{value:Mr==null?void 0:Mr.choice_id},S.a.createElement("span",{className:"mr3"},Wr),S.a.createElement(fe.a,{className:xe.a.renderHtml,value:Mr==null?void 0:Mr.choice_text})))})),S.a.createElement(L.a,{justify:"end",style:{marginBottom:10}},S.a.createElement(C.a,{type:"primary",className:"font16 ml20",loading:cn,onClick:function(){if(!Mt){o.b.info("\u8BF7\u52FF\u63D0\u4EA4\u7A7A\u7684\u7B54\u6848");return}Ot(!0),Gn(Ge.question_id,Mt,null,function(){var vr,Xr,Wr;Ge.user_answer=[],Ge.user_answer.push(Mt);var wr=Ue==null||((vr=Ue.sub_exercise_questions)===null||vr===void 0)?void 0:vr.filter(function(ci){var Xn;return((Xn=ci.user_answer)===null||Xn===void 0?void 0:Xn.length)===0});He.question_status.find(function(ci){return ci.ques_id===Ue.question_id}).ques_status=(wr==null?void 0:wr.length)===(Ue==null||((Xr=Ue.sub_exercise_questions)===null||Xr===void 0)?void 0:Xr.length)?0:(wr==null?void 0:wr.length)>0&&(wr==null?void 0:wr.length)<(Ue==null||((Wr=Ue.sub_exercise_questions)===null||Wr===void 0)?void 0:Wr.length)?2:1,ir(Object(x.a)({},He)),Ot(!1)})}},"\u63D0\u4EA4\u7B54\u6848")))}))},Na=function(ve){var Ne,Ue=ve.item,lt=Object(g.useState)(Ue==null?void 0:Ue.user_answer),We=Object(_.a)(lt,2),Ge=We[0],pt=We[1],qe=Object(g.useState)(!1),xt=Object(_.a)(qe,2),Tt=xt[0],Lt=xt[1],Jt=Ue==null?void 0:Ue.question_id;return S.a.createElement("div",null,S.a.createElement(k.a.Group,{defaultValue:Ue==null?void 0:Ue.user_answer,onChange:function(Dt){pt(Dt)},className:Ue.user_score&&"edu-checkbox-".concat(Ue.user_score===Ue.question_score?"green":"red")},Ue==null||((Ne=Ue.question_choices)===null||Ne===void 0)?void 0:Ne.map(function(Mt,Dt){var gr="".concat(Ae[Dt],".");return S.a.createElement("div",{className:xe.a.answerWrap,key:Mt.choice_id},S.a.createElement(k.a,{value:Mt==null?void 0:Mt.choice_id},S.a.createElement("span",{className:"mr3"},gr),S.a.createElement(fe.a,{className:xe.a.renderHtml,value:Mt==null?void 0:Mt.choice_text})))})),S.a.createElement(L.a,{justify:"end",style:{marginBottom:10}},S.a.createElement(C.a,{type:"primary",className:"font16 ml20",loading:Tt,onClick:function(){if(!(Ge!=null&&Ge.length)){o.b.info("\u8BF7\u52FF\u63D0\u4EA4\u7A7A\u7684\u7B54\u6848");return}Lt(!0),Gn(Jt,Ge,null,function(){Ue.user_answer=Ge,Ue.repeat_answer||(Ue.israp=!0),He.question_status.find(function(Dt){return Dt.ques_id===Jt}).ques_status=Ge!=null&&Ge.length?1:0,ir(Object(x.a)({},He)),Lt(!1)})}},"\u63D0\u4EA4\u7B54\u6848")))},Ii=function(ve){var Ne=ve.item;return S.a.createElement(we,{item:Ne,answerData:He,onBlur:function(lt,We,Ge){return sa(lt,We,Ne==null?void 0:Ne.question_id,Ge,Ne)}})},da=function(ve){var Ne=ve.item;return S.a.createElement(ee,{item:Ne,answerData:He,onBlur:function(lt){return Vn(lt,Ne==null?void 0:Ne.question_id,Ne)}})},dn=function(ve,Ne,Ue){var lt,We,Ge=He==null||((lt=He.exercise_question_types)===null||lt===void 0)?void 0:lt.find(function(pt){return pt.question_type===Ne});return S.a.createElement(S.a.Fragment,null,S.a.createElement("h1",{className:"font14 current",onClick:function(){Fr[Ne]=!Fr[Ne],Vt(Object(x.a)({},Fr))}},!Fr[Ne]&&S.a.createElement(N.a,null),Fr[Ne]&&S.a.createElement(I.a,null),S.a.createElement("span",{className:"ml5 c-grey-666"},ve)),S.a.createElement("ul",{className:xe.a.answerSheet,key:Ne},!Fr[Ne]&&(Ge==null||((We=Ge.items)===null||We===void 0)?void 0:We.map(function(pt,qe){var xt=pt.question_type,Tt=pt.item_bank_id,Lt=pt.user_answer,Jt=pt.standard_answer,Mt=pt.question_choices,Dt=Mt===void 0?[]:Mt,gr=xt===3||xt===4||it(Lt,Jt,Dt)?xe.a.correct:xe.a.wrong;if(pt.question_type===Ne)return S.a.createElement("li",{onClick:function(){var cn;if(He.exercise_question_types[Nt].items[Ht].israp=!1,ir(Object(x.a)({},He)),!ct&&(He==null||((cn=He.exercise)===null||cn===void 0)?void 0:cn.user_exercise_status)===0&&Object(Le.r)()){var Ot,Mr,vr,Xr;if(!((Ot=He.exercise_question_types)!==null&&Ot!==void 0&&(Mr=Ot[Nt])!==null&&Mr!==void 0&&(vr=Mr.items)!==null&&vr!==void 0&&(Xr=vr[Ht])!==null&&Xr!==void 0&&Xr.repeat_answer)){bn(!0),jt(3),jr({oneindex:Ue,twoindex:qe});return}}un(Tt),yn(Ue),Sr(qe);var Wr="Anchor_".concat(Ne,"_").concat(qe),wr=document.getElementById(Wr);wr&&setTimeout(function(){return wr.scrollIntoView({block:"start",behavior:"smooth"})})},key:qe,className:"".concat(gr,`
`).concat(Lt.length===0?xe.a.abandon:"",`
`).concat("".concat(ln)==="".concat(Tt)?xe.a.active:"",`
`)},qe+1)}))))},Ba=function(ve,Ne){var Ue,lt,We,Ge,pt,qe;return S.a.createElement("div",{className:xe.a.questionItem,id:"Anchor_".concat(ve==null?void 0:ve.question_type,"_").concat(Ne)},S.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},S.a.createElement("span",{style:{flexShrink:0},className:"font18"},Ne+1,"."),S.a.createElement(fe.a,{value:ve==null?void 0:ve.question_title}),S.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",(ve==null?void 0:ve.question_type)===7?"\u5171".concat(ve==null||((Ue=ve.sub_exercise_questions)===null||Ue===void 0)?void 0:Ue.length,"\u5C0F\u9898\uFF0C"):"",ve==null?void 0:ve.question_score,"\u5206\uFF09"),!(ve!=null&&ve.repeat_answer)&&S.a.createElement("span",{style:{color:"#FA6400 ",marginLeft:10,fontSize:16}},"\u6CE8\u610F\uFF1A\u8BE5\u9898\u4E0D\u5141\u8BB8\u91CD\u590D\u7B54\u9898"),!!(ve!=null&&(lt=ve.schools)!==null&<!==void 0&<.length)&&S.a.createElement(P.a,{title:"\u8BE5\u5B9E\u8BAD\u9898\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},S.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"}))),(ve==null?void 0:ve.question_type)==0&&S.a.createElement(la,{item:ve}),(ve==null?void 0:ve.question_type)==2&&S.a.createElement(la,{item:ve}),(ve==null?void 0:ve.question_type)==1&&S.a.createElement(Na,{item:ve}),(ve==null?void 0:ve.question_type)==3&&S.a.createElement(Ii,{item:ve}),(ve==null?void 0:ve.question_type)==4&&S.a.createElement(da,{item:ve}),(ve==null?void 0:ve.question_type)==7&&S.a.createElement(ua,{items:ve,keys:ve==null?void 0:ve.question_type,i:Ne}),!!(ve!=null&&(We=ve.answer_comments)!==null&&We!==void 0&&We.length)&&S.a.createElement("div",{className:"mt30"},ve==null||((Ge=ve.answer_comments)===null||Ge===void 0)?void 0:Ge.map(function(xt,Tt){var Lt,Jt;return S.a.createElement("div",null,S.a.createElement(L.a,{align:"middle",gutter:[0,10]},S.a.createElement(H.a,{flex:"50px"},S.a.createElement("img",{src:De.a.API_SERVER+"/images/"+((Lt=xt.user)===null||Lt===void 0?void 0:Lt.image_url),width:"40",style:{borderRadius:40}})),S.a.createElement(H.a,{flex:"1"},xt.updated_at,S.a.createElement("br",null),(Jt=xt.user)===null||Jt===void 0?void 0:Jt.name),S.a.createElement(H.a,{className:"c-grey-c"},xt.shixun_chanllge_position&&S.a.createElement("span",null,"\u7B2C",xt.shixun_chanllge_position,"\u5173"),ve.question_type!==4&&S.a.createElement("span",null,"\u539F\u59CB\u5F97\u5206",xt.origin_score,"\u5206 \uFF0C")," ","\u4FEE\u6B63\u4E3A",xt.score,"\u5206")),xt.comment&&S.a.createElement(L.a,{align:"middle",gutter:[0,10]},S.a.createElement(H.a,{flex:"50px"}),S.a.createElement(H.a,{flex:"1"},S.a.createElement(Ce,{autoSize:!0,value:xt.comment,disabled:!0}))))})),S.a.createElement("div",{className:xe.a.itemType},S.a.createElement(L.a,null,(ve==null?void 0:ve.question_type)==5&&!((pt=He.exercise)!==null&&pt!==void 0&&pt.commit_status)&&S.a.createElement(C.a,{type:"primary",className:"font16 ml20",onClick:function(){return di(ve)}},"\u8FDB\u5165\u7B54\u9898"),(ve==null?void 0:ve.question_type)==6&&!((qe=He.exercise)!==null&&qe!==void 0&&qe.commit_status)&&S.a.createElement(C.a,{type:"primary",className:"font16 ml20",onClick:function(){return Ln(ve)}},"\u8FDB\u5165\u7B54\u9898")),(ve==null?void 0:ve.question_type)<3&&(ve==null?void 0:ve.standard_answer_show)&&(ve==null?void 0:ve.user_answer.length)>0&&S.a.createElement(L.a,null,S.a.createElement(H.a,null,S.a.createElement("span",{className:"font16 ml20"},"\u6B63\u786E\u7B54\u6848\uFF1A",ve==null?void 0:ve.standard_answer_show),S.a.createElement(L.a,{style:{marginTop:20}},S.a.createElement(fe.a,{className:xe.a.analysis,value:"\u89E3\u6790:".concat(ve==null?void 0:ve.analysis)}))))))},ca=function(ve,Ne){return S.a.createElement(g.Fragment,null,ve.question_type===0&&dn("\u5355\u9009\u9898",0,Ne),ve.question_type===1&&dn("\u591A\u9009\u9898",1,Ne),ve.question_type===2&&dn("\u5224\u65AD\u9898",2,Ne),ve.question_type===3&&dn("\u586B\u7A7A\u9898",3,Ne),ve.question_type===4&&dn("\u7B80\u7B54\u9898",4,Ne),ve.question_type===5&&dn("\u5B9E\u8BAD\u9898",5,Ne),ve.question_type===6&&dn("\u7F16\u7A0B\u9898",6,Ne),ve.question_type===7&&dn("\u7EC4\u5408\u9898",7,Ne))},fa=function(ve){var Ne=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Ue=["","\u5341","\u767E","\u5343","\u4E07"];ve=parseInt(ve);var lt=function(qe){for(var xt=qe.toString().split("").reverse(),Tt="",Lt=0;Lt0&&xt[Lt]==0&&xt[Lt-1]==0?"":Ne[xt[Lt]]+(xt[Lt]==0?Ue[0]:Ue[Lt]))+Tt;return Tt},We=Math.floor(ve/1e4),Ge=ve%1e4;return Ge.toString().length<4&&(Ge="0"+Ge),We?lt(We)+"\u4E07"+lt(Ge):lt(ve)},ja=function(){var ve,Ne,Ue,lt,We;return S.a.createElement(g.Fragment,{key:Nt},S.a.createElement("div",{className:"pt20"},S.a.createElement("span",{className:"font16 c-light-primary"},fa(Nt+1),"\u3001",He==null||((ve=He.exercise_question_types)===null||ve===void 0||((Ne=ve[Nt])===null||Ne===void 0))?void 0:Ne.name)),S.a.createElement(g.Fragment,{key:Ht},Ba(He==null||((Ue=He.exercise_question_types)===null||Ue===void 0||((lt=Ue[Nt])===null||lt===void 0||((We=lt.items)===null||We===void 0)))?void 0:We[Ht],Ht)))};return S.a.createElement(K.a,{size:"large",spinning:Tn},mn&&S.a.createElement(ne.a,{iframe:on}),S.a.createElement("iframe",{style:{display:gn},id:"iframeShixuns",className:xe.a.iframe,src:$r,ref:on,frameBorder:"0"}),S.a.createElement("section",{className:"edu-container"},S.a.createElement("section",{className:"animated fadeIn"},S.a.createElement("aside",{className:[xe.a.title,"mt10"].join(" ")},S.a.createElement(L.a,{style:{width:"100%"},align:"middle"},S.a.createElement(H.a,{flex:"1"},S.a.createElement("div",{className:xe.a.title},(Rt==null?void 0:Rt.showHeaderFooter)&&S.a.createElement(j.a,{to:"/onlineexercise"},S.a.createElement(V.a,{className:"font16 c-black"})),S.a.createElement("strong",{className:"font24 ml5"},He==null||((Pe=He.exercise)===null||Pe===void 0)?void 0:Pe.exercise_name)))))),na.status===0&&S.a.createElement(L.a,{className:"mt10"},S.a.createElement(H.a,{flex:kr?"316px":"16px"},S.a.createElement("section",{style:{position:"sticky",top:0,zIndex:1}},Qe&&S.a.createElement(Q.a,{number:(He==null||((Fe=He.exercise)===null||Fe===void 0)?void 0:Fe.photo_count)-(He==null||((ie=He.exercise)===null||ie===void 0)?void 0:ie.take_photo),time:(oe=He.exercise)===null||oe===void 0?void 0:oe.left_time,update:Kn,supportCamera:function(ve){ve===2?(Kn(),bt(Er==null?void 0:Er.screen_open)):ve===1&&setTimeout(function(){return Pt.history.push("/")},3e3)}}),S.a.createElement("div",{className:"relative",style:{minHeight:236}},kr&&S.a.createElement("aside",{className:"bg-white p16"},S.a.createElement(L.a,{align:"middle"},S.a.createElement(H.a,{span:6},S.a.createElement("span",{className:"font16 blod"},"\u7B54\u9898\u5361")),S.a.createElement(H.a,{span:18},S.a.createElement("div",{className:"tr",style:{display:"flex",alignItems:"center",justifyContent:"end"}},S.a.createElement("span",{className:"".concat(xe.a.answerYes)}),"\u5F53\u524D",S.a.createElement("span",{className:"".concat(xe.a.answerYes," ").concat(xe.a.correct," ml10")}),"\u7B54\u5BF9",S.a.createElement("span",{style:{width:13,height:13,display:"flex",flexDirection:"column-reverse",background:"#d9011b"},className:"".concat(xe.a.answerNo," ml10")}),"\u7B54\u9519",S.a.createElement("span",{className:"".concat(xe.a.answerNo," ml10")}),"\u672A\u7B54"))),S.a.createElement("aside",{className:xe.a.answerInfo},S.a.createElement(L.a,null,S.a.createElement(S.a.Fragment,null,S.a.createElement(H.a,{span:12},"\u5237\u9898\u8FDB\u5EA6"),S.a.createElement(H.a,{span:12,className:"tr c-blue"},He==null||((ue=He.question_status)===null||ue===void 0||(($=ue.filter(function(ft){return(ft==null?void 0:ft.ques_status)===1}))===null||$===void 0))?void 0:$.length,"/ ",He==null||((Y=He.exercise_types)===null||Y===void 0)?void 0:Y.q_counts),S.a.createElement(H.a,{span:24},S.a.createElement(b.a,{trailColor:"#c3ced2",percent:(He==null||((q=He.question_status)===null||q===void 0||((re=q.filter(function(ft){return(ft==null?void 0:ft.ques_status)===1}))===null||re===void 0))?void 0:re.length)/(He==null||((ge=He.exercise_types)===null||ge===void 0)?void 0:ge.q_counts)*100,showInfo:!1}))))),S.a.createElement(L.a,null,S.a.createElement(H.a,{flex:"1"},S.a.createElement("aside",{className:xe.a.cardList},He==null||((Se=He.exercise_question_types)===null||Se===void 0)?void 0:Se.map(function(ft,ve){return S.a.createElement(g.Fragment,{key:ft.question_type},ca(ft,ve))}))))),S.a.createElement("div",{className:xe.a.fold,onClick:function(){return hn(!kr)}},kr&&S.a.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"}),!kr&&S.a.createElement("span",{className:"icon-youjiantou iconfont c-grey-c"}))))),S.a.createElement(H.a,{flex:"1"},S.a.createElement("section",{className:[xe.a.bg,"pl30","pr30","pb30","mb50","ml20"].join(" ")},S.a.createElement("div",{style:{maxHeight:600,overflow:"hidden auto"}},ja()),S.a.createElement("div",{style:{marginTop:60,textAlign:"center"}},(Nt!=0||Ht!=0)&&S.a.createElement(C.a,{className:"".concat(xe.a.submitButton," mr10"),type:"default",onClick:function(){var ve,Ne,Ue,lt,We;if(He.exercise_question_types[Nt].items[Ht].israp=!1,ir(Object(x.a)({},He)),!ct&&(He==null||((ve=He.exercise)===null||ve===void 0)?void 0:ve.user_exercise_status)===0&&Object(Le.r)()){var Ge,pt,qe,xt;if(!((Ge=He.exercise_question_types)!==null&&Ge!==void 0&&(pt=Ge[Nt])!==null&&pt!==void 0&&(qe=pt.items)!==null&&qe!==void 0&&(xt=qe[Ht])!==null&&xt!==void 0&&xt.repeat_answer)){bn(!0),jt(1);return}}Ht===0?(Nt-=1,Ht=He.exercise_question_types[Nt].items.length-1):Ht-=1,yn(Nt),Sr(Ht),un((Ne=He.exercise_question_types)===null||Ne===void 0||((Ue=Ne[Nt])===null||Ue===void 0||((lt=Ue.items)===null||lt===void 0||((We=lt[Ht])===null||We===void 0)))?void 0:We.item_bank_id)}},"\u4E0A\u4E00\u9898"),!(Nt===(He==null||((Me=He.exercise_question_types)===null||Me===void 0)?void 0:Me.length)-1&&Ht===(He==null||((at=He.exercise_question_types)===null||at===void 0||((vt=at[Nt])===null||vt===void 0||((dt=vt.items)===null||dt===void 0)))?void 0:dt.length)-1)&&S.a.createElement(C.a,{className:xe.a.submitButton,type:"primary",onClick:function(){var ve,Ne,Ue,lt,We;if(He.exercise_question_types[Nt].items[Ht].israp=!1,ir(Object(x.a)({},He)),!ct&&(He==null||((ve=He.exercise)===null||ve===void 0)?void 0:ve.user_exercise_status)===0&&Object(Le.r)()){var Ge,pt,qe,xt;if(!((Ge=He.exercise_question_types)!==null&&Ge!==void 0&&(pt=Ge[Nt])!==null&&pt!==void 0&&(qe=pt.items)!==null&&qe!==void 0&&(xt=qe[Ht])!==null&&xt!==void 0&&xt.repeat_answer)){bn(!0),jt(2);return}}He.exercise_question_types[Nt].items.length-1===Ht?(Nt=Nt+1,Ht=0):Ht=Ht+1,yn(Nt),Sr(Ht),un((Ne=He.exercise_question_types)===null||Ne===void 0||((Ue=Ne[Nt])===null||Ue===void 0||((lt=Ue.items)===null||lt===void 0||((We=lt[Ht])===null||We===void 0)))?void 0:We.item_bank_id)}},"\u4E0B\u4E00\u9898")))))))},Je=nt.default=Object(G.b)(function(Oe){var Ze=Oe.loading,Ye=Oe.user,Pe=Oe.globalSetting;return{globalSetting:Pe,user:Ye,loading:Ze.effects}})(rt)},SJMd:function(gt,nt){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var Z,te,K,D=!1,H,M;window.PR_SHOULD_USE_CONTINUATION=!0;var P,B;(function(){var k=window,O=["break,continue,do,else,for,if,return,while"],L=[O,"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"],E=[L,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],C=[E,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],R=[E,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],A=[E,"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"],w="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",b=[E,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="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",o=[O,"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"],s=[O,"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=[O,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],x=[C,A,R,b,d,o,s,u],f=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",_="kwd",y="com",h="typ",c="lit",l="pun",a="pln",v="tag",p="dec",g="src",S="atn",U="atv",j="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function N(he){for(var we=0,De=!1,Re=!1,ke=0,Ce=he.length;ke122||($<65||ue>90||Ze.push([Math.max(65,ue)|32,Math.min($,90)|32]),$<97||ue>122||Ze.push([Math.max(97,ue)&~32,Math.min($,122)&~32]))}}Ze.sort(function(ge,Se){return ge[0]-Se[0]||Se[1]-ge[1]});for(var Y=[],q=[],Fe=0;Fere[0]&&(re[1]+1>re[0]&&Pe.push("-"),Pe.push(je(re[1])))}return Pe.push("]"),Pe.join("")}function it(Je){for(var Oe=Je.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")),Ze=Oe.length,Ye=[],Pe=0,Fe=0;Pe=2&&ue==="["?Oe[Pe]=Ve(ie):ue!=="\\"&&(Oe[Pe]=ie.replace(/[a-zA-Z]/g,function(q){var re=q.charCodeAt(0);return"["+String.fromCharCode(re&~32,re|32)+"]"}))}return Oe.join("")}for(var rt=[],ke=0,Ce=he.length;ke=0;)De[rt.charAt(Je)]=it;var Oe=it[1],Ze=""+Oe;$e.hasOwnProperty(Ze)||(ze.push(Oe),$e[Ze]=null)}ze.push(/[\0-\uffff]/),Re=N(ze)})();var ke=we.length,Ce=function(Ae){for(var ze=Ae.sourceCode,$e=Ae.basePos,je=Ae.sourceNode,Ve=[$e,a],it=0,rt=ze.match(Re)||[],Je={},Oe=0,Ze=rt.length;Oe=5&&Pe.substring(0,5)==="lang-",ie&&!(Fe&&typeof Fe[1]=="string")&&(ie=!1,Pe=g),ie||(Je[Ye]=Pe)}var $=it;if(it+=Ye.length,!ie)Ve.push($e+$,Pe);else{var Y=Fe[1],q=Ye.indexOf(Y),re=q+Y.length;Fe[2]&&(re=Ye.length-Fe[2].length,q=re-Y.length);var ge=Pe.substring(5);V(je,$e+$,Ye.substring(0,q),Ce,Ve),V(je,$e+$+q,Y,fe(ge,Y),Ve),V(je,$e+$+re,Ye.substring(re),Ce,Ve)}}Ae.decorations=Ve};return Ce}function xe(he){var we=[],De=[];he.tripleQuotedStrings?we.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):he.multiLineStrings?we.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):we.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),he.verbatimStrings&&De.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Re=he.hashComments;Re&&(he.cStyleComments?(Re>1?we.push([y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):we.push([y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),De.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):we.push([y,/^#[^\r\n]*/,null,"#"])),he.cStyleComments&&(De.push([y,/^\/\/[^\r\n]*/,null]),De.push([y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ke=he.regexLiterals;if(ke){var Ce=ke>1?"":`
\r`,Ae=Ce?".":"[\\S\\s]",ze="/(?=[^/*"+Ce+"])(?:[^/\\x5B\\x5C"+Ce+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+Ce+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";De.push(["lang-regex",RegExp("^"+G+"("+ze+")")])}var $e=he.types;$e&&De.push([h,$e]);var je=(""+he.keywords).replace(/^ | $/g,"");je.length&&De.push([_,new RegExp("^(?:"+je.replace(/[\s,]+/g,"|")+")\\b"),null]),we.push([a,/^\s+/,null,` \r
\xA0`]);var Ve="^.[^\\s\\w.$@'\"`/\\\\]*";return he.regexLiterals&&(Ve+="(?!s*/)"),De.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[l,new RegExp(Ve),null]),se(we,De)}var me=xe({keywords:x,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Le(he,we,De){for(var Re=/(?:^|\s)nocode(?:\s|$)/,ke=/\r\n?|\n/,Ce=he.ownerDocument,Ae=Ce.createElement("li");he.firstChild;)Ae.appendChild(he.firstChild);var ze=[Ae];function $e(Oe){var Ze=Oe.nodeType;if(Ze==1&&!Re.test(Oe.className))if(Oe.nodeName==="br")je(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var Ye=Oe.firstChild;Ye;Ye=Ye.nextSibling)$e(Ye);else if((Ze==3||Ze==4)&&De){var Pe=Oe.nodeValue,Fe=Pe.match(ke);if(Fe){var ie=Pe.substring(0,Fe.index);Oe.nodeValue=ie;var oe=Pe.substring(Fe.index+Fe[0].length);if(oe){var ue=Oe.parentNode;ue.insertBefore(Ce.createTextNode(oe),Oe.nextSibling)}je(Oe),ie||Oe.parentNode.removeChild(Oe)}}}function je(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function Ze(Fe,ie){var oe=ie?Fe.cloneNode(!1):Fe,ue=Fe.parentNode;if(ue){var $=Ze(ue,1),Y=Fe.nextSibling;$.appendChild(oe);for(var q=Y;q;q=Y)Y=q.nextSibling,$.appendChild(q)}return oe}for(var Ye=Ze(Oe.nextSibling,0),Pe;(Pe=Ye.parentNode)&&Pe.nodeType===1;)Ye=Pe;ze.push(Ye)}for(var Ve=0;Ve=ue&&($e+=2),Ce>=$&&(it+=2)}}finally{Pe&&(Pe.style.display=Fe)}}var Te={};function ce(he,we){for(var De=we.length;--De>=0;){var Re=we[De];Te.hasOwnProperty(Re)?k.console&&console.warn("cannot override language handler %s",Re):Te[Re]=he}}function fe(he,we){return he&&Te.hasOwnProperty(he)||(he=/^\s*]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^