(window.webpackJsonp=window.webpackJsonp||[]).push([[210,5,7,8,13],{"+NIl":function(ft,Xe,G){(function(de){de(G("VrN/"))})(function(de){"use strict";de.defineMode("stex",function(Z,M){"use strict";function V(h,r){h.cmdState.push(r)}function I(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function B(h){var r=h.cmdState.pop();r&&r.closeBracket()}function K(h){for(var r=h.cmdState,d=r.length-1;d>=0;d--){var l=r[d];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function W(h,r,d){return function(){this.name=h,this.bracketNo=0,this.style=r,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var L={};L.importmodule=W("importmodule","tag",["string","builtin"]),L.documentclass=W("documentclass","tag",["","atom"]),L.usepackage=W("usepackage","tag",["atom"]),L.begin=W("begin","tag",["atom"]),L.end=W("end","tag",["atom"]),L.label=W("label","tag",["atom"]),L.ref=W("ref","tag",["atom"]),L.eqref=W("eqref","tag",["atom"]),L.cite=W("cite","tag",["atom"]),L.bibitem=W("bibitem","tag",["atom"]),L.Bibitem=W("Bibitem","tag",["atom"]),L.RBibitem=W("RBibitem","tag",["atom"]),L.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function P(h,r){h.f=r}function b(h,r){var d;if(h.match(/^\\[a-zA-Z@]+/)){var l=h.current().slice(1);return d=L.hasOwnProperty(l)?L[l]:L.DEFAULT,d=new d,V(r,d),P(r,_),d.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return P(r,function(u,c){return p(u,c,"\\]")}),"keyword";if(h.match("\\("))return P(r,function(u,c){return p(u,c,"\\)")}),"keyword";if(h.match("$$"))return P(r,function(u,c){return p(u,c,"$$")}),"keyword";if(h.match("$"))return P(r,function(u,c){return p(u,c,"$")}),"keyword";var a=h.next();if(a=="%")return h.skipToEnd(),"comment";if(a=="}"||a=="]"){if(d=I(r),d)d.closeBracket(a),P(r,_);else return"error";return"bracket"}else return a=="{"||a=="["?(d=L.DEFAULT,d=new d,V(r,d),"bracket"):/\d/.test(a)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),d=K(r),d.name=="begin"&&(d.argument=h.current()),d.styleIdentifier())}function p(h,r,d){if(h.eatSpace())return null;if(d&&h.match(d))return P(r,b),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=h.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(h.skipToEnd(),"comment"):"error"}function _(h,r){var d=h.peek(),l;return d=="{"||d=="["?(l=I(r),l.openBracket(d),h.eat(d),P(r,b),"bracket"):/[ \t\r]/.test(d)?(h.eat(d),null):(P(r,b),B(r),b(h,r))}return{startState:function(){var h=M.inMathMode?function(r,d){return p(r,d)}:b;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,r){return r.f(h,r)},blankLine:function(h){h.f=b,h.cmdState.length=0},lineComment:"%"}}),de.defineMIME("text/x-stex","stex"),de.defineMIME("text/x-latex","stex")})},"+ua5":function(ft,Xe,G){},"+vTd":function(ft,Xe,G){ft.exports={flex_box_center:"flex_box_center___37CPQ",flex_space_between:"flex_space_between___1yzV5",flex_box_vertical_center:"flex_box_vertical_center___2QH_C",flex_box_center_end:"flex_box_center_end___22kLi",flex_box_column:"flex_box_column___1Y3On",line:"line___-rzSr",b1:"b1___1zz_c",b2:"b2___1dAOW",list:"list___1gpez",title:"title___21uOv",tr:"tr___3kTJL",itemDetail:"itemDetail___8QmqJ",answerWrapper:"answerWrapper___3guKO",decoration:"decoration___1rcYW",row:"row___3uQSh",typeRow:"typeRow___ADZSj",type:"type___2pfNZ",typeName:"typeName___8ZhPv",typeIcon:"typeIcon___1Xniv",unpublished:"unpublished___dTXTI",private:"private___XQiDx",public:"public___iIFou",reviewFlag:"reviewFlag___YP4vk",typeRightAction:"typeRightAction___1PQjp",actionLink:"actionLink___2E5q_",actionIcon:"actionIcon___GCvNK",topicTitle:"topicTitle___3fJds",topicTitleContent:"topicTitleContent___35cf9",judgmentContent:"judgmentContent___SU5rV",programContent:"programContent___3G6-D",otherContent:"otherContent___1JHnX",combinationContent:"combinationContent___6ZXO-",con:"con___1_qCl",otherContentItem:"otherContentItem___18WrV",otehrContentHtml:"otehrContentHtml___LW3nV",difficultyRow:"difficultyRow___3HvT0",updateTimeRow:"updateTimeRow___1dNd0",updateTimeWrap:"updateTimeWrap___2PKks",updateTimeContent:"updateTimeContent___1mNBy",programLanguage:"programLanguage___3CnaJ",updateTimeRowAction:"updateTimeRowAction___1DaMt",bottomAction:"bottomAction___Y-BNC",borderColorBlue:"borderColorBlue___2Xd-0",borderColorRed:"borderColorRed___2zA_q",borderColorFFF:"borderColorFFF___2R5-5",borderColorGray:"borderColorGray___nZnDe",selectIcon:"selectIcon___2byLd",colorGreen:"colorGreen___1iOKR",parseAnswerBorder:"parseAnswerBorder___1LTYn",answer:"answer___2L9lv",answerHtml:"answerHtml___3zrOk",parse:"parse___3d3dm",parseText:"parseText___1C_VL",parseAnswer:"parseAnswer___QMVPC",parseAnswerHtml:"parseAnswerHtml___2TCVz",actionBar:"actionBar___2ItMN",know:"know___y8QKK",menu:"menu___SYdg7",bottom:"bottom___2dFIa",textBtn:"textBtn___1y00f"}},"+z73":function(ft,Xe,G){ft.exports={flex_box_center:"flex_box_center___3WSrc",flex_space_between:"flex_space_between___1fpCp",flex_box_vertical_center:"flex_box_vertical_center___3Wy8W",flex_box_center_end:"flex_box_center_end___3YIs2",flex_box_column:"flex_box_column___3CNwR",pWrap:"pWrap___2jVbQ",few:"few___3Eebn"}},"19Vz":function(ft,Xe,G){(function(de){de(G("VrN/"))})(function(de){de.defineOption("placeholder","",function(W,L,P){var b=P&&P!=de.Init;if(L&&!b)W.on("blur",I),W.on("change",B),W.on("swapDoc",B),de.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){V(W)}),B(W);else if(!L&&b){W.off("blur",I),W.off("change",B),W.off("swapDoc",B),de.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),Z(W);var p=W.getWrapperElement();p.className=p.className.replace(" CodeMirror-empty","")}L&&!W.hasFocus()&&I(W)});function Z(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function M(W){Z(W);var L=W.state.placeholder=document.createElement("pre");L.style.cssText="height: 0; overflow: visible",L.style.direction=W.getOption("direction"),L.className="CodeMirror-placeholder CodeMirror-line-like";var P=W.getOption("placeholder");typeof P=="string"&&(P=document.createTextNode(P)),L.appendChild(P),W.display.lineSpace.insertBefore(L,W.display.lineSpace.firstChild)}function V(W){setTimeout(function(){var L=!1,P=W.getInputField();P.nodeName=="TEXTAREA"?L=!P.value:W.lineCount()==1&&(L=!/[^\u200b]/.test(P.querySelector(".CodeMirror-line").textContent)),L?M(W):Z(W)},20)}function I(W){K(W)&&M(W)}function B(W){var L=W.getWrapperElement(),P=K(W);L.className=L.className.replace(" CodeMirror-empty","")+(P?" CodeMirror-empty":""),P?M(W):Z(W)}function K(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1ZF9":function(ft,Xe,G){ft.exports=G.p+"static/Authorize.cc9c212f.png"},"1eCo":function(ft,Xe,G){(function(de){de(G("VrN/"))})(function(de){"use strict";var Z={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},M={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};de.defineMode("xml",function(V,I){var B=V.indentUnit,K={},W=I.htmlMode?Z:M;for(var L in W)K[L]=W[L];for(var L in I)K[L]=I[L];var P,b;function p(o,E){function g(U){return E.tokenize=U,U(o,E)}var C=o.next();if(C=="<")return o.eat("!")?o.eat("[")?o.match("CDATA[")?g(r("atom","]]>")):null:o.match("--")?g(r("comment","-->")):o.match("DOCTYPE",!0,!0)?(o.eatWhile(/[\w\._\-]/),g(d(1))):null:o.eat("?")?(o.eatWhile(/[\w\._\-]/),E.tokenize=r("meta","?>"),"meta"):(P=o.eat("/")?"closeTag":"openTag",E.tokenize=_,"tag bracket");if(C=="&"){var N;return o.eat("#")?o.eat("x")?N=o.eatWhile(/[a-fA-F\d]/)&&o.eat(";"):N=o.eatWhile(/[\d]/)&&o.eat(";"):N=o.eatWhile(/[\w\.\-:]/)&&o.eat(";"),N?"atom":"error"}else return o.eatWhile(/[^&<]/),null}p.isInText=!0;function _(o,E){var g=o.next();if(g==">"||g=="/"&&o.eat(">"))return E.tokenize=p,P=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return P="equals",null;if(g=="<"){E.tokenize=p,E.state=c,E.tagName=E.tagStart=null;var C=E.tokenize(o,E);return C?C+" tag error":"tag error"}else return/[\'\"]/.test(g)?(E.tokenize=h(g),E.stringStartCol=o.column(),E.tokenize(o,E)):(o.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(o){var E=function(g,C){for(;!g.eol();)if(g.next()==o){C.tokenize=_;break}return"string"};return E.isInAttribute=!0,E}function r(o,E){return function(g,C){for(;!g.eol();){if(g.match(E)){C.tokenize=p;break}g.next()}return o}}function d(o){return function(E,g){for(var C;(C=E.next())!=null;){if(C=="<")return g.tokenize=d(o+1),g.tokenize(E,g);if(C==">")if(o==1){g.tokenize=p;break}else return g.tokenize=d(o-1),g.tokenize(E,g)}return"meta"}}function l(o,E,g){this.prev=o.context,this.tagName=E,this.indent=o.indented,this.startOfLine=g,(K.doNotIndent.hasOwnProperty(E)||o.context&&o.context.noIndent)&&(this.noIndent=!0)}function a(o){o.context&&(o.context=o.context.prev)}function u(o,E){for(var g;;){if(!o.context)return;if(g=o.context.tagName,!K.contextGrabbers.hasOwnProperty(g)||!K.contextGrabbers[g].hasOwnProperty(E))return;a(o)}}function c(o,E,g){return o=="openTag"?(g.tagStart=E.column(),R):o=="closeTag"?O:c}function R(o,E,g){return o=="word"?(g.tagName=E.current(),b="tag",w):K.allowMissingTagName&&o=="endTag"?(b="tag bracket",w(o,E,g)):(b="error",R)}function O(o,E,g){if(o=="word"){var C=E.current();return g.context&&g.context.tagName!=C&&K.implicitlyClosed.hasOwnProperty(g.context.tagName)&&a(g),g.context&&g.context.tagName==C||K.matchClosing===!1?(b="tag",T):(b="tag error",A)}else return K.allowMissingTagName&&o=="endTag"?(b="tag bracket",T(o,E,g)):(b="error",A)}function T(o,E,g){return o!="endTag"?(b="error",T):(a(g),c)}function A(o,E,g){return b="error",T(o,E,g)}function w(o,E,g){if(o=="word")return b="attribute",m;if(o=="endTag"||o=="selfcloseTag"){var C=g.tagName,N=g.tagStart;return g.tagName=g.tagStart=null,o=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(C)?u(g,C):(u(g,C),g.context=new l(g,C,N==g.indented)),c}return b="error",w}function m(o,E,g){return o=="equals"?v:(K.allowMissing||(b="error"),w(o,E,g))}function v(o,E,g){return o=="string"?s:o=="word"&&K.allowUnquoted?(b="string",w):(b="error",w(o,E,g))}function s(o,E,g){return o=="string"?s:w(o,E,g)}return{startState:function(o){var E={tokenize:p,state:c,indented:o||0,tagName:null,tagStart:null,context:null};return o!=null&&(E.baseIndent=o),E},token:function(o,E){if(!E.tagName&&o.sol()&&(E.indented=o.indentation()),o.eatSpace())return null;P=null;var g=E.tokenize(o,E);return(g||P)&&g!="comment"&&(b=null,E.state=E.state(P||g,o,E),b&&(g=b=="error"?g+" error":b)),g},indent:function(o,E,g){var C=o.context;if(o.tokenize.isInAttribute)return o.tagStart==o.indented?o.stringStartCol+1:o.indented+B;if(C&&C.noIndent)return de.Pass;if(o.tokenize!=_&&o.tokenize!=p)return g?g.match(/^(\s*)/)[0].length:0;if(o.tagName)return K.multilineTagIndentPastTag!==!1?o.tagStart+o.tagName.length+2:o.tagStart+B*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/$/,blockCommentStart:"",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(o){o.state==v&&(o.state=w)},xmlCurrentTag:function(o){return o.tagName?{name:o.tagName,close:o.type=="closeTag"}:null},xmlCurrentContext:function(o){for(var E=[],g=o.context;g;g=g.prev)g.tagName&&E.push(g.tagName);return E.reverse()}}}),de.defineMIME("text/xml","xml"),de.defineMIME("application/xml","xml"),de.mimeModes.hasOwnProperty("text/html")||de.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1vnw":function(ft,Xe,G){ft.exports={list:"list___1dAFk",btns:"btns___1YCLO",name:"name___2XX_F",folderWrapper:"folderWrapper___3sKHr",folderIcon:"folderIcon___Rov4k"}},"55Ip":function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return u});var de=G("Ty5D"),Z=G("dI71"),M=G("q1tI"),V=G.n(M),I=G("YS25"),B=G("17x9"),K=G.n(B),W=G("wx14"),L=G("zLVn"),P=G("9R94"),b=function(v){Object(Z.a)(s,v);function s(){for(var E,g=arguments.length,C=new Array(g),N=0;N=0||g.relatedTarget.className.indexOf("".concat(j,"-next"))>=0))return;v.setState({goInputText:""}),U(v.getValidValue())},v.go=function(g){var C=v.state.goInputText;if(C==="")return;(g.keyCode===h.ENTER||g.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(I.a)(m,[{key:"getValidValue",value:function(){var s=this.state,o=s.goInputText,E=s.current;return!o||isNaN(o)?E:Number(o)}},{key:"getPageSizeOptions",value:function(){var s=this.props,o=s.pageSize,E=s.pageSizeOptions;return E.some(function(g){return g.toString()===o.toString()})?E:E.concat([o.toString()]).sort(function(g,C){var N=isNaN(Number(g))?0:Number(g),U=isNaN(Number(C))?0:Number(C);return N-U})}},{key:"render",value:function(){var s=this,o=this.props,E=o.pageSize,g=o.locale,C=o.rootPrefixCls,N=o.changeSize,U=o.quickGo,j=o.goButton,H=o.selectComponentClass,y=o.buildOptionText,x=o.selectPrefixCls,F=o.disabled,Q=this.state.goInputText,q="".concat(C,"-options"),ie=H,ge=null,fe=null,ue=null;if(!N&&!U)return null;var he=this.getPageSizeOptions();if(N&&ie){var _e=he.map(function(le,ne){return L.a.createElement(ie.Option,{key:ne,value:le.toString()},(y||s.buildOptionText)(le))});ge=L.a.createElement(ie,{disabled:F,prefixCls:x,showSearch:!1,className:"".concat(q,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(E||he[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ne){return ne.parentNode}},_e)}return U&&(j&&(ue=typeof j=="boolean"?L.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:F,className:"".concat(q,"-quick-jumper-button")},g.jump_to_confirm):L.a.createElement("span",{onClick:this.go,onKeyUp:this.go},j)),fe=L.a.createElement("div",{className:"".concat(q,"-quick-jumper")},g.jump_to,L.a.createElement("input",{disabled:F,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,ue)),L.a.createElement("li",{className:"".concat(q)},ge,fe)}}]),m}(L.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=r,l=G("N2Kk");function a(){}function u(A){return typeof A=="number"&&isFinite(A)&&Math.floor(A)===A}function c(A,w,m){return m}function R(A,w,m){var v=typeof A=="undefined"?w.pageSize:A;return Math.floor((m.total-1)/v)+1}var O=function(A){Object(B.a)(m,A);var w=Object(K.a)(m);function m(v){var s;Object(V.a)(this,m),s=w.call(this,v),s.getJumpPrevPage=function(){return Math.max(1,s.state.current-(s.props.showLessItems?3:5))},s.getJumpNextPage=function(){return Math.min(R(void 0,s.state,s.props),s.state.current+(s.props.showLessItems?3:5))},s.getItemIcon=function(N,U){var j=s.props.prefixCls,H=N||L.a.createElement("button",{type:"button","aria-label":U,className:"".concat(j,"-item-link")});return typeof N=="function"&&(H=L.a.createElement(N,Object(M.a)({},s.props))),H},s.savePaginationNode=function(N){s.paginationNode=N},s.isValid=function(N){return u(N)&&N!==s.state.current},s.shouldDisplayQuickJumper=function(){var N=s.props,U=N.showQuickJumper,j=N.pageSize,H=N.total;return H<=j?!1:U},s.handleKeyDown=function(N){(N.keyCode===h.ARROW_UP||N.keyCode===h.ARROW_DOWN)&&N.preventDefault()},s.handleKeyUp=function(N){var U=s.getValidValue(N),j=s.state.currentInputValue;U!==j&&s.setState({currentInputValue:U}),N.keyCode===h.ENTER?s.handleChange(U):N.keyCode===h.ARROW_UP?s.handleChange(U-1):N.keyCode===h.ARROW_DOWN&&s.handleChange(U+1)},s.changePageSize=function(N){var U=s.state.current,j=R(N,s.state,s.props);U=U>j?j:U,j===0&&(U=s.state.current),typeof N=="number"&&("pageSize"in s.props||s.setState({pageSize:N}),"current"in s.props||s.setState({current:U,currentInputValue:U})),s.props.onShowSizeChange(U,N),"onChange"in s.props&&s.props.onChange&&s.props.onChange(U,N)},s.handleChange=function(N){var U=s.props.disabled,j=N;if(s.isValid(j)&&!U){var H=R(void 0,s.state,s.props);j>H?j=H:j<1&&(j=1),"current"in s.props||s.setState({current:j,currentInputValue:j});var y=s.state.pageSize;return s.props.onChange(j,y),j}return s.state.current},s.prev=function(){s.hasPrev()&&s.handleChange(s.state.current-1)},s.next=function(){s.hasNext()&&s.handleChange(s.state.current+1)},s.jumpPrev=function(){s.handleChange(s.getJumpPrevPage())},s.jumpNext=function(){s.handleChange(s.getJumpNextPage())},s.hasPrev=function(){return s.state.current>1},s.hasNext=function(){return s.state.current2?j-2:0),y=2;y=E?C=E:C=Number(o),C}},{key:"getShowSizeChanger",value:function(){var s=this.props,o=s.showSizeChanger,E=s.total,g=s.totalBoundaryShowSizeChanger;return typeof o!="undefined"?o:E>g}},{key:"renderPrev",value:function(s){var o=this.props,E=o.prevIcon,g=o.itemRender,C=g(s,"prev",this.getItemIcon(E,"prev page")),N=!this.hasPrev();return Object(W.isValidElement)(C)?Object(W.cloneElement)(C,{disabled:N}):C}},{key:"renderNext",value:function(s){var o=this.props,E=o.nextIcon,g=o.itemRender,C=g(s,"next",this.getItemIcon(E,"next page")),N=!this.hasNext();return Object(W.isValidElement)(C)?Object(W.cloneElement)(C,{disabled:N}):C}},{key:"render",value:function(){var s=this,o=this.props,E=o.prefixCls,g=o.className,C=o.style,N=o.disabled,U=o.hideOnSinglePage,j=o.total,H=o.locale,y=o.showQuickJumper,x=o.showLessItems,F=o.showTitle,Q=o.showTotal,q=o.simple,ie=o.itemRender,ge=o.showPrevNextJumpers,fe=o.jumpPrevIcon,ue=o.jumpNextIcon,he=o.selectComponentClass,_e=o.selectPrefixCls,le=o.pageSizeOptions,ne=this.state,Te=ne.current,Fe=ne.pageSize,Ke=ne.currentInputValue;if(U===!0&&j<=Fe)return null;var Ue=R(void 0,this.state,this.props),He=[],Ne=null,Be=null,Je=null,tt=null,it=null,rt=y&&y.goButton,qe=x?1:2,gt=Te-1>0?Te-1:0,pt=Te+1=qe*2&&Te!==1+2&&(He[0]=Object(W.cloneElement)(He[0],{className:"".concat(E,"-item-after-jump-prev")}),He.unshift(Ne)),Ue-Te>=qe*2&&Te!==Ue-2&&(He[He.length-1]=Object(W.cloneElement)(He[He.length-1],{className:"".concat(E,"-item-before-jump-next")}),He.push(Be)),Mt!==1&&He.unshift(Je),St!==Ue&&He.push(tt)}var be=null;Q&&(be=L.a.createElement("li",{className:"".concat(E,"-total-text")},Q(j,[j===0?0:(Te-1)*Fe+1,Te*Fe>j?j:Te*Fe])));var xe=!this.hasPrev()||!Ue,pe=!this.hasNext()||!Ue;return L.a.createElement("ul",Object(de.a)({className:b()(E,g,Object(Z.a)({},"".concat(E,"-disabled"),N)),style:C,unselectable:"unselectable",ref:this.savePaginationNode},vt),be,L.a.createElement("li",{title:F?H.prev_page:null,onClick:this.prev,tabIndex:xe?null:0,onKeyPress:this.runIfEnterPrev,className:b()("".concat(E,"-prev"),Object(Z.a)({},"".concat(E,"-disabled"),xe)),"aria-disabled":xe},this.renderPrev(gt)),He,L.a.createElement("li",{title:F?H.next_page:null,onClick:this.next,tabIndex:pe?null:0,onKeyPress:this.runIfEnterNext,className:b()("".concat(E,"-next"),Object(Z.a)({},"".concat(E,"-disabled"),pe)),"aria-disabled":pe},this.renderNext(pt)),L.a.createElement(d,{disabled:N,locale:H,rootPrefixCls:E,selectComponentClass:he,selectPrefixCls:_e,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Te,pageSize:Fe,pageSizeOptions:le,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:rt}))}}],[{key:"getDerivedStateFromProps",value:function(s,o){var E={};if("current"in s&&(E.current=s.current,s.current!==o.current&&(E.currentInputValue=E.current)),"pageSize"in s&&s.pageSize!==o.pageSize){var g=o.current,C=R(s.pageSize,o,s);g=g>C?C:g,"current"in s||(E.current=g,E.currentInputValue=g),E.pageSize=s.pageSize}return E}}]),m}(L.a.Component);O.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:l.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var T=O},"6UM0":function(ft,Xe,G){var de,Z;(function(){var M;(function(){"use strict";var I=[function(L,P,b){var p=b(1).Beautifier,_=b(5).Options;function h(r,d){var l=new p(r,d);return l.beautify()}L.exports=h,L.exports.defaultOptions=function(){return new _}},function(L,P,b){var p=b(2).Output,_=b(3).Token,h=b(4),r=b(5).Options,d=b(7).Tokenizer,l=b(7).line_starters,a=b(7).positionable_operators,u=b(7).TOKEN;function c(x,F){return F.indexOf(x)!==-1}function R(x){return x.replace(/^\s+/g,"")}function O(x){for(var F={},Q=0;QQ&&(Q=x.line_indent_level));var q={mode:F,parent:x,last_token:x?x.last_token:new _(u.START_BLOCK,""),last_word:x?x.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Q,alignment:0,line_indent_level:x?x.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},H.prototype._reset=function(x){var F=x.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new p(this._options,F),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(o.BlockStatement);var Q=new d(x,this._options);return this._tokens=Q.tokenize(),x},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x,F=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,F&&h.lineBreak.test(F||"")&&(Q=F.match(h.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return x=this._output.get_code(Q),x},H.prototype.handle_token=function(x,F){x.type===u.START_EXPR?this.handle_start_expr(x):x.type===u.END_EXPR?this.handle_end_expr(x):x.type===u.START_BLOCK?this.handle_start_block(x):x.type===u.END_BLOCK?this.handle_end_block(x):x.type===u.WORD?this.handle_word(x):x.type===u.RESERVED?this.handle_word(x):x.type===u.SEMICOLON?this.handle_semicolon(x):x.type===u.STRING?this.handle_string(x):x.type===u.EQUALS?this.handle_equals(x):x.type===u.OPERATOR?this.handle_operator(x):x.type===u.COMMA?this.handle_comma(x):x.type===u.BLOCK_COMMENT?this.handle_block_comment(x,F):x.type===u.COMMENT?this.handle_comment(x,F):x.type===u.DOT?this.handle_dot(x):x.type===u.EOF?this.handle_eof(x):x.type===u.UNKNOWN?this.handle_unknown(x,F):this.handle_unknown(x,F)},H.prototype.handle_whitespace_and_comments=function(x,F){var Q=x.newlines,q=this._options.keep_array_indentation&&C(this._flags.mode);if(x.comments_before)for(var ie=x.comments_before.next();ie;)this.handle_whitespace_and_comments(ie,F),this.handle_token(ie,F),ie=x.comments_before.next();if(q)for(var ge=0;ge0,F);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,F);for(var fe=1;fe0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.set_mode=function(x){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,x),this._flags=this.create_flags(this._previous_flags,x),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===o.Statement&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.start_of_object_property=function(){return this._flags.parent.mode===o.ObjectLiteral&&this._flags.mode===o.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(x){var F=!1;return F=F||A(this._flags.last_token,["var","let","const"])&&x.type===u.WORD,F=F||T(this._flags.last_token,"do"),F=F||!(this._flags.parent.mode===o.ObjectLiteral&&this._flags.mode===o.Statement)&&A(this._flags.last_token,y)&&!x.newlines,F=F||T(this._flags.last_token,"else")&&!(T(x,"if")&&!x.comments_before),F=F||this._flags.last_token.type===u.END_EXPR&&(this._previous_flags.mode===o.ForInitializer||this._previous_flags.mode===o.Conditional),F=F||this._flags.last_token.type===u.WORD&&this._flags.mode===o.BlockStatement&&!this._flags.in_case&&!(x.text==="--"||x.text==="++")&&this._last_last_text!=="function"&&x.type!==u.WORD&&x.type!==u.RESERVED,F=F||this._flags.mode===o.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"])),F?(this.set_mode(o.Statement),this.indent(),this.handle_whitespace_and_comments(x,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x,A(x,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(x){this.start_of_statement(x)||this.handle_whitespace_and_comments(x);var F=o.Expression;if(x.text==="["){if(this._flags.last_token.type===u.WORD||this._flags.last_token.text===")"){A(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(x),this.set_mode(F),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}F=o.ArrayLiteral,C(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),c(this._flags.last_token.type,[u.START_EXPR,u.END_EXPR,u.WORD,u.OPERATOR,u.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===u.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,F=o.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,F=o.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&x.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x);else if(this._flags.last_token.type===u.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var q=this._tokens.peek(-4);A(Q,["async","function"])||Q.text==="*"&&A(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===o.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(x);(this._flags.last_token.type===u.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===o.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===u.START_BLOCK?this.print_newline():(this._flags.last_token.type===u.END_EXPR||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===u.COMMA)&&this.allow_wrap_or_preserved_newline(x,x.newlines),this.print_token(x),this.set_mode(F),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(x){for(;this._flags.mode===o.Statement;)this.restore_mode();this.handle_whitespace_and_comments(x),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(x,x.text==="]"&&C(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===u.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(x),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===o.Conditional&&(this._previous_flags.mode=o.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(x){this.handle_whitespace_and_comments(x);var F=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===u.END_EXPR?(this.set_mode(o.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(o.BlockStatement):Q&&(c(Q.text,[":",","])&&c(F.type,[u.STRING,u.WORD,u.RESERVED])||c(F.text,["get","set","..."])&&c(Q.type,[u.WORD,u.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(Q.text,[":",","])?this.set_mode(o.BlockStatement):this.set_mode(o.ObjectLiteral):this._flags.last_token.type===u.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(o.BlockStatement):c(this._flags.last_token.type,[u.EQUALS,u.START_EXPR,u.COMMA,u.OPERATOR])||A(this._flags.last_token,["return","throw","import","default"])?this.set_mode(o.ObjectLiteral):this.set_mode(o.BlockStatement),this._flags.last_token&&(A(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!F.comments_before&&F.text==="}",ie=q&&this._flags.last_word==="function"&&this._flags.last_token.type===u.END_EXPR;if(this._options.brace_preserve_inline){var ge=0,fe=null;this._flags.inline_frame=!0;do if(ge+=1,fe=this._tokens.peek(ge-1),fe.newlines){this._flags.inline_frame=!1;break}while(fe.type!==u.EOF&&!(fe.type===u.END_BLOCK&&fe.opened===x))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&x.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==u.OPERATOR&&(ie||this._flags.last_token.type===u.EQUALS||A(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(C(this._previous_flags.mode)&&(this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.COMMA)&&((this._flags.last_token.type===u.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(x),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==u.OPERATOR&&this._flags.last_token.type!==u.START_EXPR&&(this._flags.last_token.type===u.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(x),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(x){for(this.handle_whitespace_and_comments(x);this._flags.mode===o.Statement;)this.restore_mode();var F=this._flags.last_token.type===u.START_BLOCK;this._flags.inline_frame&&!F?this._output.space_before_token=!0:this._options.brace_style==="expand"?F||this.print_newline():F||(C(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(x)},H.prototype.handle_word=function(x){if(x.type===u.RESERVED){if(c(x.text,["set","get"])&&this._flags.mode!==o.ObjectLiteral)x.type=u.WORD;else if(x.text==="import"&&c(this._tokens.peek().text,["(","."]))x.type=u.WORD;else if(c(x.text,["as","from"])&&!this._flags.import_block)x.type=u.WORD;else if(this._flags.mode===o.ObjectLiteral){var F=this._tokens.peek();F.text===":"&&(x.type=u.WORD)}}if(this.start_of_statement(x)?A(this._flags.last_token,["var","let","const"])&&x.type===u.WORD&&(this._flags.declaration_statement=!0):x.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==u.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==u.EQUALS&&(this._options.preserve_newlines||!A(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(x),this.print_newline()):this.handle_whitespace_and_comments(x),this._flags.do_block&&!this._flags.do_while)if(T(x,"while")){this._output.space_before_token=!0,this.print_token(x),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&T(x,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===o.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&A(x,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(x),this._flags.in_case=!0;return}if((this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x)),T(x,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===u.OPERATOR))&&(!this._output.just_added_blankline()&&!x.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD?A(this._flags.last_token,["get","set","new","export"])||A(this._flags.last_token,y)?this._output.space_before_token=!0:T(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===u.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||C(this._flags.mode))||this.print_newline(),this.print_token(x),this._flags.last_word=x.text;return}var Q="NONE";if(this._flags.last_token.type===u.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":A(x,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&x.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===u.SEMICOLON&&this._flags.mode===o.BlockStatement?Q="NEWLINE":this._flags.last_token.type===u.SEMICOLON&&N(this._flags.mode)?Q="SPACE":this._flags.last_token.type===u.STRING?Q="NEWLINE":this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===o.ObjectLiteral&&c(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===u.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===u.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),A(x,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),A(x,["else","catch","finally"]))if((!(this._flags.last_token.type===u.END_BLOCK&&this._previous_flags.mode===o.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&x.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?A(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&A(x,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==u.END_EXPR?(this._flags.last_token.type!==u.START_EXPR||!A(x,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(x,"if")&&T(x.previous,"else")?this._output.space_before_token=!0:this.print_newline()):A(x,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&C(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Q==="SPACE"&&(this._output.space_before_token=!0);x.previous&&(x.previous.type===u.WORD||x.previous.type===u.RESERVED)&&(this._output.space_before_token=!0),this.print_token(x),this._flags.last_word=x.text,x.type===u.RESERVED&&(x.text==="do"?this._flags.do_block=!0:x.text==="if"?this._flags.if_block=!0:x.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(x,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(x){this.start_of_statement(x)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(x);for(var F=this._tokens.peek();this._flags.mode===o.Statement&&!(this._flags.if_block&&T(F,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(x)},H.prototype.handle_string=function(x){x.text.startsWith("`")&&x.newlines===0&&x.whitespace_before===""&&(x.previous.text===")"||this._flags.last_token.type===u.WORD)||(this.start_of_statement(x)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(x),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x):x.text.startsWith("`")&&this._flags.last_token.type===u.END_EXPR&&(x.previous.text==="]"||x.previous.text===")")&&x.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(x)},H.prototype.handle_equals=function(x){this.start_of_statement(x)||this.handle_whitespace_and_comments(x),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(x),this._output.space_before_token=!0},H.prototype.handle_comma=function(x){this.handle_whitespace_and_comments(x,!0),this.print_token(x),this._output.space_before_token=!0,this._flags.declaration_statement?(N(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(x)):this._flags.mode===o.ObjectLiteral||this._flags.mode===o.Statement&&this._flags.parent.mode===o.ObjectLiteral?(this._flags.mode===o.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(x)},H.prototype.handle_operator=function(x){var F=x.text==="*"&&(A(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[u.START_BLOCK,u.COMMA,u.END_BLOCK,u.SEMICOLON])),Q=c(x.text,["-","+"])&&(c(this._flags.last_token.type,[u.START_BLOCK,u.START_EXPR,u.EQUALS,u.OPERATOR])||c(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(x)){var q=!F;this.handle_whitespace_and_comments(x,q)}if(x.text==="*"&&this._flags.last_token.type===u.DOT){this.print_token(x);return}if(x.text==="::"){this.print_token(x);return}if(this._flags.last_token.type===u.OPERATOR&&c(this._options.operator_position,s)&&this.allow_wrap_or_preserved_newline(x),x.text===":"&&this._flags.in_case){this.print_token(x),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==u.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ie=!0,ge=!0,fe=!1;if(x.text===":"?this._flags.ternary_depth===0?ie=!1:(this._flags.ternary_depth-=1,fe=!0):x.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!F&&this._options.preserve_newlines&&c(x.text,a)){var ue=x.text===":",he=ue&&fe,_e=ue&&!fe;switch(this._options.operator_position){case v.before_newline:this._output.space_before_token=!_e,this.print_token(x),(!ue||he)&&this.allow_wrap_or_preserved_newline(x),this._output.space_before_token=!0;return;case v.after_newline:this._output.space_before_token=!0,!ue||he?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(x):this._output.space_before_token=!1,this.print_token(x),this._output.space_before_token=!0;return;case v.preserve_newline:_e||this.allow_wrap_or_preserved_newline(x),ie=!(this._output.just_added_newline()||_e),this._output.space_before_token=ie,this.print_token(x),this._output.space_before_token=!0;return}}if(F){this.allow_wrap_or_preserved_newline(x),ie=!1;var le=this._tokens.peek();ge=le&&c(le.type,[u.WORD,u.RESERVED])}else if(x.text==="...")this.allow_wrap_or_preserved_newline(x),ie=this._flags.last_token.type===u.START_BLOCK,ge=!1;else if(c(x.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR)&&this.allow_wrap_or_preserved_newline(x),ie=!1,ge=!1,x.newlines&&(x.text==="--"||x.text==="++"||x.text==="~")){var ne=A(this._flags.last_token,w)&&x.newlines;ne&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ne,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(ie=!0),this._flags.last_token.type===u.RESERVED?ie=!0:this._flags.last_token.type===u.END_EXPR?ie=!(this._flags.last_token.text==="]"&&(x.text==="--"||x.text==="++")):this._flags.last_token.type===u.OPERATOR&&(ie=c(x.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(x.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(ge=!0)),(this._flags.mode===o.BlockStatement&&!this._flags.inline_frame||this._flags.mode===o.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ie,this.print_token(x),this._output.space_before_token=ge},H.prototype.handle_block_comment=function(x,F){if(this._output.raw){this._output.add_raw_token(x),x.directives&&x.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(x.directives){this.print_newline(!1,F),this.print_token(x),x.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!h.newline.test(x.text)&&!x.newlines){this._output.space_before_token=!0,this.print_token(x),this._output.space_before_token=!0;return}else this.print_block_commment(x,F)},H.prototype.print_block_commment=function(x,F){var Q=g(x.text),q,ie=!1,ge=!1,fe=x.whitespace_before,ue=fe.length;if(this.print_newline(!1,F),this.print_token_line_indentation(x),this._output.add_token(Q[0]),this.print_newline(!1,F),Q.length>1){for(Q=Q.slice(1),ie=U(Q,"*"),ge=j(Q,fe),ie&&(this._flags.alignment=1),q=0;q=0;h--)if(this.__items[h].match(_))return!0;return!1},P.prototype.set_indent=function(_,h){this.is_empty()&&(this.__indent_count=_||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},P.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},P.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},P.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var _=this.__parent.current_line;return _.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),_.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),_.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,_.__items[0]===" "&&(_.__items.splice(0,1),_.__character_count-=1),!0}return!1},P.prototype.is_empty=function(){return this.__items.length===0},P.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},P.prototype.push=function(_){this.__items.push(_);var h=_.lastIndexOf(`
`);h!==-1?this.__character_count=_.length-h:this.__character_count+=_.length},P.prototype.pop=function(){var _=null;return this.is_empty()||(_=this.__items.pop(),this.__character_count-=_.length),_},P.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},P.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},P.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},P.prototype.toString=function(){var _="";return this.is_empty()?this.__parent.indent_empty_lines&&(_=this.__parent.get_indent_string(this.__indent_count)):(_=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),_+=this.__items.join("")),_};function b(_,h){this.__cache=[""],this.__indent_size=_.indent_size,this.__indent_string=_.indent_char,_.indent_with_tabs||(this.__indent_string=new Array(_.indent_size+1).join(_.indent_char)),h=h||"",_.indent_level>0&&(h=new Array(_.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}b.prototype.get_indent_size=function(_,h){var r=this.__base_string_length;return h=h||0,_<0&&(r=0),r+=_*this.__indent_size,r+=h,r},b.prototype.get_indent_string=function(_,h){var r=this.__base_string;return h=h||0,_<0&&(_=0,r=""),h+=_*this.__indent_size,this.__ensure_cache(h),r+=this.__cache[h],r},b.prototype.__ensure_cache=function(_){for(;_>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var _=this.__cache.length,h=0,r="";this.__indent_size&&_>=this.__indent_size&&(h=Math.floor(_/this.__indent_size),_-=h*this.__indent_size,r=new Array(h+1).join(this.__indent_string)),_&&(r+=new Array(_+1).join(" ")),this.__cache.push(r)};function p(_,h){this.__indent_cache=new b(_,h),this.raw=!1,this._end_with_newline=_.end_with_newline,this.indent_size=_.indent_size,this.wrap_line_length=_.wrap_line_length,this.indent_empty_lines=_.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new P(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(_,h){return this.__indent_cache.get_indent_string(_,h)},p.prototype.get_indent_size=function(_,h){return this.__indent_cache.get_indent_size(_,h)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(_){return this.is_empty()||!_&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.prototype.get_code=function(_){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return _!==`
`&&(r=r.replace(/[\n]/g,_)),r},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.prototype.set_indent=function(_,h){return _=_||0,h=h||0,this.next_line.set_indent(_,h),this.__lines.length>1?(this.current_line.set_indent(_,h),!0):(this.current_line.set_indent(),!1)},p.prototype.add_raw_token=function(_){for(var h=0;h<_.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(_.whitespace_before),this.current_line.push(_.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},p.prototype.add_token=function(_){this.__add_space_before_token(),this.current_line.push(_),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},p.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},p.prototype.remove_indent=function(_){for(var h=this.__lines.length;_1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.prototype.ensure_empty_line_above=function(_,h){for(var r=this.__lines.length-2;r>=0;){var d=this.__lines[r];if(d.is_empty())break;if(d.item(0).indexOf(_)!==0&&d.item(-1)!==h){this.__lines.splice(r+1,0,new P(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},L.exports.Output=p},function(L){function P(b,p,_,h){this.type=b,this.text=p,this.comments_before=null,this.newlines=_||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}L.exports.Token=P},function(L,P){var b="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",_="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",h="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="(?:\\\\u[0-9a-fA-F]{4}|["+b+_+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+p+_+h+"])*";P.identifier=new RegExp(r+d,"g"),P.identifierStart=new RegExp(r),P.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+p+_+h+"])+");var l=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;P.newline=/[\n\r\u2028\u2029]/,P.lineBreak=new RegExp(`\r
|`+P.newline.source),P.allLineBreaks=new RegExp(P.lineBreak.source,"g")},function(L,P,b){var p=b(6).Options,_=["before-newline","after-newline","preserve-newline"];function h(r){p.call(this,r,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),m=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";m=m.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),m="\\?\\.(?!\\d) "+m,m=m.replace(/ /g,"|");var v=new RegExp(m),s="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),o=s.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),E=new RegExp("^(?:"+o.join("|")+")$"),g,C=function(U,j){_.call(this,U,j),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new l(this._input),y=new a(this._input).read_options(this._options);this.__patterns={template:y,identifier:y.starting_with(d.identifier).matching(d.identifierMatch),number:H.matching(O),punct:H.matching(v),comment:H.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:H.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:H.matching(//),include:H.starting_with(/#include/).until_after(d.lineBreak),shebang:H.starting_with(/#!/).until_after(d.lineBreak),xml:H.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:y.until(/['\\\n\r\u2028\u2029]/),double_quote:y.until(/["\\\n\r\u2028\u2029]/),template_text:y.until(/[`\\$]/),template_expression:y.until(/[`}\\]/)}};C.prototype=new _,C.prototype._is_comment=function(U){return U.type===c.COMMENT||U.type===c.BLOCK_COMMENT||U.type===c.UNKNOWN},C.prototype._is_opening=function(U){return U.type===c.START_BLOCK||U.type===c.START_EXPR},C.prototype._is_closing=function(U,j){return(U.type===c.END_BLOCK||U.type===c.END_EXPR)&&j&&(U.text==="]"&&j.text==="["||U.text===")"&&j.text==="("||U.text==="}"&&j.text==="{")},C.prototype._reset=function(){g=!1},C.prototype._get_next_token=function(U,j){var H=null;this._readWhitespace();var y=this._input.peek();return y===null?this._create_token(c.EOF,""):(H=H||this._read_non_javascript(y),H=H||this._read_string(y),H=H||this._read_word(U),H=H||this._read_singles(y),H=H||this._read_comment(y),H=H||this._read_regexp(y,U),H=H||this._read_xml(y,U),H=H||this._read_punctuation(),H=H||this._create_token(c.UNKNOWN,this._input.next()),H)},C.prototype._read_word=function(U){var j;if(j=this.__patterns.identifier.read(),j!=="")return j=j.replace(d.allLineBreaks,`
`),!(U.type===c.DOT||U.type===c.RESERVED&&(U.text==="set"||U.text==="get"))&&E.test(j)?(j==="in"||j==="of")&&(U.type===c.WORD||U.type===c.STRING)?this._create_token(c.OPERATOR,j):this._create_token(c.RESERVED,j):this._create_token(c.WORD,j);if(j=this.__patterns.number.read(),j!=="")return this._create_token(c.WORD,j)},C.prototype._read_singles=function(U){var j=null;return U==="("||U==="["?j=this._create_token(c.START_EXPR,U):U===")"||U==="]"?j=this._create_token(c.END_EXPR,U):U==="{"?j=this._create_token(c.START_BLOCK,U):U==="}"?j=this._create_token(c.END_BLOCK,U):U===";"?j=this._create_token(c.SEMICOLON,U):U==="."&&A.test(this._input.peek(1))?j=this._create_token(c.DOT,U):U===","&&(j=this._create_token(c.COMMA,U)),j&&this._input.next(),j},C.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(c.EQUALS,U):U==="?."?this._create_token(c.DOT,U):this._create_token(c.OPERATOR,U)},C.prototype._read_non_javascript=function(U){var j="";if(U==="#"){if(this._is_first_token()&&(j=this.__patterns.shebang.read(),j))return this._create_token(c.UNKNOWN,j.trim()+`
`);if(j=this.__patterns.include.read(),j)return this._create_token(c.UNKNOWN,j.trim()+`
`);U=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(T)){do U=this._input.next(),H+=U;while(this._input.hasNext()&&U!=="#"&&U!=="=");return U==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(H+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(H+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,H)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(j=this.__patterns.html_comment_start.read(),j){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)j+=this._input.next();return g=!0,this._create_token(c.COMMENT,j)}}else if(g&&U==="-"&&(j=this.__patterns.html_comment_end.read(),j))return g=!1,this._create_token(c.COMMENT,j);return null},C.prototype._read_comment=function(U){var j=null;if(U==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var y=R.get_directives(H);y&&y.ignore==="start"&&(H+=R.readIgnored(this._input)),H=H.replace(d.allLineBreaks,`
`),j=this._create_token(c.BLOCK_COMMENT,H),j.directives=y}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),j=this._create_token(c.COMMENT,H))}return j},C.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var j=this._input.next();return this.has_char_escapes=!1,U==="`"?j+=this._read_string_recursive("`",!0,"${"):j+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(j=N(j)),this._input.peek()===U&&(j+=this._input.next()),j=j.replace(d.allLineBreaks,`
`),this._create_token(c.STRING,j)}return null},C.prototype._allow_regexp_or_xml=function(U){return U.type===c.RESERVED&&u(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===c.END_EXPR&&U.text===")"&&U.opened.previous.type===c.RESERVED&&u(U.opened.previous.text,["if","while","for"])||u(U.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},C.prototype._read_regexp=function(U,j){if(U==="/"&&this._allow_regexp_or_xml(j)){for(var H=this._input.next(),y=!1,x=!1;this._input.hasNext()&&(y||x||this._input.peek()!==U)&&!this._input.testChar(d.newline);)H+=this._input.peek(),y?y=!1:(y=this._input.peek()==="\\",this._input.peek()==="["?x=!0:this._input.peek()==="]"&&(x=!1)),this._input.next();return this._input.peek()===U&&(H+=this._input.next(),H+=this._input.read(d.identifier)),this._create_token(c.STRING,H)}return null},C.prototype._read_xml=function(U,j){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(j)){var H="",y=this.__patterns.xml.read_match();if(y){for(var x=y[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),F=x.indexOf("{")===0,Q=0;y;){var q=!!y[1],ie=y[2],ge=!!y[y.length-1]||ie.slice(0,8)==="![CDATA[";if(!ge&&(ie===x||F&&ie.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--Q:++Q),H+=y[0],Q<=0)break;y=this.__patterns.xml.read_match()}return y||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(d.allLineBreaks,`
`),this._create_token(c.STRING,H)}}return null};function N(U){for(var j="",H=0,y=new p(U),x=null;y.hasNext();)if(x=y.match(/([\s]|[^\\]|\\\\)+/g),x&&(j+=x[0]),y.peek()==="\\"){if(y.next(),y.peek()==="x")x=y.match(/x([0-9A-Fa-f]{2})/g);else if(y.peek()==="u")x=y.match(/u([0-9A-Fa-f]{4})/g);else{j+="\\",y.hasNext()&&(j+=y.next());continue}if(!x)return U;if(H=parseInt(x[1],16),H>126&&H<=255&&x[0].indexOf("x")===0)return U;if(H>=0&&H<32){j+="\\"+x[0];continue}else H===34||H===39||H===92?j+="\\"+String.fromCharCode(H):j+=String.fromCharCode(H)}return j}C.prototype._read_string_recursive=function(U,j,H){var y,x;U==="'"?x=this.__patterns.single_quote:U==='"'?x=this.__patterns.double_quote:U==="`"?x=this.__patterns.template_text:U==="}"&&(x=this.__patterns.template_expression);for(var F=x.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===U||!j&&d.newline.test(Q)){this._input.back();break}else Q==="\\"&&this._input.hasNext()?(y=this._input.peek(),y==="x"||y==="u"?this.has_char_escapes=!0:y==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Q+=this._input.next()):H&&(H==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),H===Q&&(U==="`"?Q+=this._read_string_recursive("}",j,"`"):Q+=this._read_string_recursive("`",j,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=x.read(),F+=Q}return F},L.exports.Tokenizer=C,L.exports.TOKEN=c,L.exports.positionable_operators=w.slice(),L.exports.line_starters=s.slice()},function(L){var P=RegExp.prototype.hasOwnProperty("sticky");function b(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position=0&&p=0&&_=p.length&&this.__input.substring(_-p.length,_).toLowerCase()===p},L.exports.InputScanner=b},function(L,P,b){var p=b(8).InputScanner,_=b(3).Token,h=b(10).TokenStream,r=b(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(a,u){this._input=new p(a),this._options=u||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var a,u=new _(d.START,""),c=null,R=[],O=new h;u.type!==d.EOF;){for(a=this._get_next_token(u,c);this._is_comment(a);)O.add(a),a=this._get_next_token(u,c);O.isEmpty()||(a.comments_before=O,O=new h),a.parent=c,this._is_opening(a)?(R.push(c),c=a):c&&this._is_closing(a,c)&&(a.opened=c,c.closed=a,c=R.pop(),a.parent=c),a.previous=u,u.next=a,this.__tokens.add(a),u=a}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(a,u){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(d.RAW,c):this._create_token(d.EOF,"")},l.prototype._is_comment=function(a){return!1},l.prototype._is_opening=function(a){return!1},l.prototype._is_closing=function(a,u){return!1},l.prototype._create_token=function(a,u){var c=new _(a,u,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},L.exports.Tokenizer=l,L.exports.TOKEN=d},function(L){function P(b){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=b}P.prototype.restart=function(){this.__position=0},P.prototype.isEmpty=function(){return this.__tokens_length===0},P.prototype.hasNext=function(){return this.__position=0&&b/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new p,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(r){var d=this._create();return d._disabled[r]=!0,d._update(),d},h.prototype.read_options=function(r){var d=this._create();for(var l in _)d._disabled[l]=r.templating.indexOf(l)===-1;return d._update(),d},h.prototype.exclude=function(r){var d=this._create();return d._excluded[r]=!0,d._update(),d},h.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),r+=d,d=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},h.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},h.prototype._read_template=function(){var r="",d=this._input.peek();if(d==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(r=r||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},L.exports.TemplatablePattern=h}],B={};function K(L){var P=B[L];if(P!==void 0)return P.exports;var b=B[L]={exports:{}};return I[L](b,b.exports,K),b.exports}var W=K(0);M=W})();var V=M;!(de=[],Z=function(){return{js_beautify:V}}.apply(Xe,de),Z!==void 0&&(ft.exports=Z))})()},"7Cbv":function(ft,Xe,G){"use strict";var de=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Z=new Uint8Array(16);function M(){if(!de)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return de(Z)}var V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function I(_){return typeof _=="string"&&V.test(_)}for(var B=I,K=[],W=0;W<256;++W)K.push((W+256).toString(16).substr(1));function L(_){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(K[_[h+0]]+K[_[h+1]]+K[_[h+2]]+K[_[h+3]]+"-"+K[_[h+4]]+K[_[h+5]]+"-"+K[_[h+6]]+K[_[h+7]]+"-"+K[_[h+8]]+K[_[h+9]]+"-"+K[_[h+10]]+K[_[h+11]]+K[_[h+12]]+K[_[h+13]]+K[_[h+14]]+K[_[h+15]]).toLowerCase();if(!B(r))throw TypeError("Stringified UUID is invalid");return r}var P=L;function b(_,h,r){_=_||{};var d=_.random||(_.rng||M)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,h){r=r||0;for(var l=0;l<16;++l)h[r+l]=d[l];return h}return P(d)}var p=Xe.a=b},"7ahc":function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return R});var de=G("k1fw"),Z=G("0Owb"),M=G("+L6B"),V=G("2/Rp"),I=G("y8nQ"),B=G("Vl3Y"),K=G("tJVT"),W=G("OaEy"),L=G("2fM7"),P=G("q1tI"),b=G.n(P),p=G("VrN/"),_=G.n(p),h=G("p77/"),r=G.n(h),d=G("c5Ni"),l=G.n(d),a=L.a.Option,u={labelCol:{span:4},wrapperCol:{span:20}},c={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Xe.b=function(O){var T=O.callback,A=O.onCancel,w=Object(P.useState)("python"),m=Object(K.a)(w,2),v=m[0],s=m[1];function o(g){s(c[g][1])}function E(g){T(g)}return b.a.createElement(B.a,Object(Z.a)({},u,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),b.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(L.a,{onChange:o},Object.keys(c).map(function(g){return b.a.createElement(a,{key:g,value:g},c[g][0])}))),b.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(R,{mode:v})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(V.a,{type:"ghost",onClick:A},"\u53D6\u6D88")))};function R(O){var T=O.value,A=O.onChange,w=O.mode,m=O.options,v=m===void 0?{}:m,s=Object(P.useRef)(),o=Object(P.useState)(),E=Object(K.a)(o,2),g=E[0],C=E[1];return Object(P.useEffect)(function(){if(g){function N(U){var j=U.getValue();A&&A(j)}return g.on("change",N),function(){g.off("change",N)}}},[g,A]),Object(P.useEffect)(function(){g&&g.setOption("mode",w)},[g,w]),Object(P.useEffect)(function(){g&&((T!==g.getValue()||T==="")&&setTimeout(function(){g.setValue(T||" ")},300))},[g,T]),Object(P.useEffect)(function(){if(s.current&&!g){var N=_.a.fromTextArea(s.current,Object(de.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));C(N)}},[s.current,g]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:s}))}},"815F":function(ft,Xe,G){"use strict";G.d(Xe,"e",function(){return K}),G.d(Xe,"c",function(){return L}),G.d(Xe,"d",function(){return P}),G.d(Xe,"a",function(){return p}),G.d(Xe,"f",function(){return _}),G.d(Xe,"b",function(){return h});var de=G("KQm4"),Z=G("VTBJ"),M=G("Ff2n"),V=G("Zm9Q"),I=G("Kwbf"),B=G("OZM5");function K(r,d){return r!=null?r:d}function W(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function l(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(c){var R=c.key,O=c.children;Object(I.a)(R!=null,"Tree node must have a certain key: [".concat(u).concat(R,"]"));var T=String(R);Object(I.a)(!d.has(T)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(T)),d.set(T,!0),l(O,"".concat(u).concat(T," > "))})}l(r)}function L(r){function d(l){var a=Object(V.a)(l);return a.map(function(u){if(!Object(B.i)(u))return Object(I.a)(!u,"Tree/TreeNode can only accept TreeNode as children."),null;var c=u.key,R=u.props,O=R.children,T=Object(M.a)(R,["children"]),A=Object(Z.a)({key:c},T),w=d(O);return w.length&&(A.children=w),A}).filter(function(u){return u})}return d(r)}function P(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(d===!0?[]:d),a=[];function u(c){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(O,T){var A=Object(B.h)(R?R.pos:"0",T),w=K(O.key,A),m=Object(Z.a)(Object(Z.a)({},O),{},{parent:R,pos:A,children:null,data:O,isStart:[].concat(Object(de.a)(R?R.isStart:[]),[T===0]),isEnd:[].concat(Object(de.a)(R?R.isEnd:[]),[T===c.length-1])});return a.push(m),d===!0||l.has(w)?m.children=u(O.children||[],m):m.children=[],m})}return u(r),a}function b(r,d,l){var a;l?typeof l=="string"?a=function(R){return R[l]}:typeof l=="function"&&(a=function(R){return l(R)}):a=function(R,O){return K(R.key,O)};function u(c,R,O){var T=c?c.children:r,A=c?Object(B.h)(O.pos,R):"0";if(c){var w=a(c,A),m={node:c,index:R,pos:A,key:w,parentPos:O.node?O.pos:null,level:O.level+1};d(m)}T&&T.forEach(function(v,s){u(v,s,{node:c,pos:A,level:O?O.level+1:-1})})}u(null)}function p(r){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=d.initWrapper,a=d.processEntity,u=d.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,R={},O={},T={posEntities:R,keyEntities:O};return l&&(T=l(T)||T),b(r,function(A){var w=A.node,m=A.index,v=A.pos,s=A.key,o=A.parentPos,E=A.level,g={node:w,index:m,key:s,pos:v,level:E},C=K(s,v);R[v]=g,O[C]=g,g.parent=R[o],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),a&&a(g,T)},c),u&&u(T),T}function _(r,d){var l=d.expandedKeys,a=d.selectedKeys,u=d.loadedKeys,c=d.loadingKeys,R=d.checkedKeys,O=d.halfCheckedKeys,T=d.dragOverNodeKey,A=d.dropPosition,w=d.keyEntities,m=w[r],v={eventKey:r,expanded:l.indexOf(r)!==-1,selected:a.indexOf(r)!==-1,loaded:u.indexOf(r)!==-1,loading:c.indexOf(r)!==-1,checked:R.indexOf(r)!==-1,halfChecked:O.indexOf(r)!==-1,pos:String(m?m.pos:""),dragOver:T===r&&A===0,dragOverGapTop:T===r&&A===-1,dragOverGapBottom:T===r&&A===1};return v}function h(r){var d=r.data,l=r.expanded,a=r.selected,u=r.checked,c=r.loaded,R=r.loading,O=r.halfChecked,T=r.dragOver,A=r.dragOverGapTop,w=r.dragOverGapBottom,m=r.pos,v=r.active,s=Object(Z.a)(Object(Z.a)({},d),{},{expanded:l,selected:a,checked:u,loaded:c,loading:R,halfChecked:O,dragOver:T,dragOverGapTop:A,dragOverGapBottom:w,pos:m,active:v});return"props"in s||Object.defineProperty(s,"props",{get:function(){return Object(I.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),s}},"8EBN":function(ft,Xe,G){(function(de){de(G("VrN/"))})(function(de){"use strict";de.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z-1&&V.substring(K+1,V.length);if(W)return de.findModeByExtension(W)},de.findModeByName=function(V){V=V.toLowerCase();for(var I=0;I=z.length?te.slice(z.length):te}).join(`
`)}var l=[],a=[""],u=new h.a.Renderer,c=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){l.length=0,a=[""]}var O={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T($,S,D,z){if(S>=$.length||$[S].level<=D)return S;var te=$[S];z.push("- "+te.text+""),S++;var Y=[];return S=T($,S,te.level,Y),Y.length>0&&(z.push("
"),Y.forEach(function(Le){z.push(Le)}),z.push("
")),z.push(" "),S=T($,S,D,z),S}function A(){return T(l,0,0,a),a.push("
"),a.join("")}var w={heading:function(S){var D=c.exec(S);if(D)return{type:"heading",raw:D[0],depth:D[1].length,text:D[2]}},fences:function(S){var D=this.rules.block.fences.exec(S);if(D){var z=D[0],te=d(z,D[3]||""),Y=D[2]?D[2].trim():D[2];if(["latex","katex","math"].indexOf(Y)>=0){var Le=s(),ct=te;te=Le,o[Le]={type:"block",expression:ct}}return{type:"code",raw:z,lang:Y,text:te}}}},m=/(?:\${2})([^\n`]+?)(?:\${2})/gi,v=0,s=function(){return"__special_katext_id_".concat(v++,"__")},o={};function E(){return o}function g(){v=0,o={}}function C($){return $=$.replace(m,function(S,D){var z=s();return o[z]={type:"inline",expression:D},z}),$}var N=u.listitem;u.listitem=function($){return N(C($))};var U=u.paragraph;u.paragraph=function($){return U(C($))};var j=u.tablecell;u.tablecell=function($,S){return j(C($),S)},u.code=function($,S,D){var z=(S||"").match(/\S*/)[0];return z?["latex","katex","math"].indexOf(z)>=0?"".concat($,"
"):'
').concat(D?$:Object(r.escape)($,!0),`
`):''+(D?$:Object(r.escape)($,!0))+"
"},u.heading=function($,S,D){var z=this.options.headerPrefix+D.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:z,level:S,text:$}),"'+$+""},h.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),h.a.use({tokenizer:w,renderer:u});var H=h.a,y=G("SJMd"),x=G("ulZh"),F=G.n(x),Q=G("m3rI"),q=G("Oy/b"),ie=G("p5ED"),ge=G("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var fe=function($,S){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,z){D.__proto__=z}||function(D,z){for(var te in z)Object.prototype.hasOwnProperty.call(z,te)&&(D[te]=z[te])})($,S)};function ue($,S){function D(){this.constructor=$}fe($,S),$.prototype=S===null?Object.create(S):(D.prototype=S.prototype,new D)}function he($,S,D,z){return new(D||(D=Promise))(function(te,Y){function Le(rn){try{Pt(z.next(rn))}catch(ht){Y(ht)}}function ct(rn){try{Pt(z.throw(rn))}catch(ht){Y(ht)}}function Pt(rn){var ht;rn.done?te(rn.value):(ht=rn.value,ht instanceof D?ht:new D(function(Vt){Vt(ht)})).then(Le,ct)}Pt((z=z.apply($,S||[])).next())})}function _e($,S){var D,z,te,Y,Le={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return Y={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ct(Pt){return function(rn){return function(ht){if(D)throw new TypeError("Generator is already executing.");for(;Le;)try{if(D=1,z&&(te=2&ht[0]?z.return:ht[0]?z.throw||((te=z.return)&&te.call(z),0):z.next)&&!(te=te.call(z,ht[1])).done)return te;switch(z=0,te&&(ht=[2&ht[0],te.value]),ht[0]){case 0:case 1:te=ht;break;case 4:return Le.label++,{value:ht[1],done:!1};case 5:Le.label++,z=ht[1],ht=[0];continue;case 7:ht=Le.ops.pop(),Le.trys.pop();continue;default:if(!(te=Le.trys,(te=te.length>0&&te[te.length-1])||ht[0]!==6&&ht[0]!==2)){Le=0;continue}if(ht[0]===3&&(!te||ht[1]>te[0]&&ht[1]',"select"),this.addActionButton(z,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(z,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(z,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(z,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(z,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(z,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(z,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Y){var Le=document.createElement("div");Le.className=""+D.toolbarButtonStyleClass.name,Le.setAttribute("data-type-name",Y.typeName),Le.innerHTML=Y.icon,Le.addEventListener("click",function(){D.markerToolbarButtonClicked(Le,Y)}),D.buttons.push(Le),D.markerButtons.push(Le)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",te.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(te),this.addActionButton(te,'',"render"),this.addActionButton(te,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},$.prototype.addButtonClickListener=function(S){this.buttonClickListeners.push(S)},$.prototype.removeButtonClickListener=function(S){this.buttonClickListeners.indexOf(S)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(S),1)},$.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},$.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var S=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var D=0;D0&&this.buttonClickListeners.forEach(function(z){return z("marker",D)}),this.markerButtonOverflowBlock.style.display="none"},$.prototype.actionToolbarButtonClicked=function(S,D){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(z){return z("action",D)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},$.prototype.setActiveButton=function(S){this.resetButtonStyles(),S.className=S.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),S.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},$.prototype.setActiveMarkerButton=function(S){var D=this.markerButtons.find(function(z){return z.getAttribute("data-type-name")===S});D&&this.setActiveButton(D)},$.prototype.setCurrentMarker=function(S){var D=this;this.currentMarker=S,this.buttons.filter(function(z){return/delete|notes/.test(z.getAttribute("data-action"))}).forEach(function(z){D.currentMarker===void 0?(z.style.fillOpacity="0.4",z.style.pointerEvents="none"):(z.style.fillOpacity="1",z.style.pointerEvents="all")})},$}(),Je=function(){function $(S,D,z,te){this.panels=[],this.panelButtons=[],this.markerjsContainer=S,this.displayMode=D,this.uiStyleSettings=z,this.styles=te,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return $.prototype.addStyles=function(){var S;this.toolboxStyleClass=this.styles.addClass(new Ne("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Ne("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var D=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ne("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ne("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ne("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Ne("toolbox-panel-row_colors",`
background-color: `+((S=this.uiStyleSettings.toolboxBackgroundColor)!==null&&S!==void 0?S:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ne("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
padding: `+D+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ne("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ne("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},$.prototype.show=function(S){var D;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=S,this.uiContainer.className=this.toolboxStyleClass.name+" "+((D=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&D!==void 0?D:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},$.prototype.setPanelButtons=function(S){var D,z,te=this;this.panels=S,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((D=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&D!==void 0?D:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Y){var Le;Y.uiStyleSettings=te.uiStyleSettings;var ct=document.createElement("div");ct.className=te.toolboxButtonStyleClass.name+" "+((Le=te.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Le!==void 0?Le:te.toolboxButtonStyleColorsClass.name),ct.innerHTML=Y.icon,ct.title=Y.title,ct.addEventListener("click",function(){te.panelButtonClick(Y)}),te.panelButtons.push(ct),te.buttonRow.appendChild(ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},$.prototype.panelButtonClick=function(S){var D=this,z=-1;if(S!==this.activePanel){z=this.panels.indexOf(S),this.panelRow.innerHTML="";var te=S.getUi();te.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(te),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=S}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){D.displayMode==="inline"?D.panelRow.style.display="none":D.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Y,Le){var ct,Pt;Y.className=D.toolboxButtonStyleClass.name+" "+(Le===z?""+((ct=D.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ct!==void 0?ct:D.toolboxActiveButtonStyleColorsClass.name):""+((Pt=D.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:D.toolboxButtonStyleColorsClass.name))})},$}(),tt=function($,S){this.title=$,this.icon=S},it=function($){function S(D,z,te,Y){var Le=$.call(this,D,Y||'')||this;return Le.colors=[],Le.addTransparent=!1,Le.colorBoxes=[],Le.colors=z,Le.currentColor=te,Le.setCurrentColor=Le.setCurrentColor.bind(Le),Le.getColorBox=Le.getColorBox.bind(Le),Le}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");return z.style.overflow="hidden",z.style.whiteSpace="nowrap",this.colors.forEach(function(te){var Y=D.getColorBox(te);z.appendChild(Y),D.colorBoxes.push(Y)}),z},S.prototype.getColorBox=function(D){var z=this,te=this.uiStyleSettings.toolbarHeight/4,Y=this.uiStyleSettings.toolbarHeight-te,Le=document.createElement("div");Le.style.display="inline-block",Le.style.boxSizing="content-box",Le.style.width=Y-2+"px",Le.style.height=Y-2+"px",Le.style.padding="1px",Le.style.marginRight="2px",Le.style.marginBottom="2px",Le.style.borderWidth="2px",Le.style.borderStyle="solid",Le.style.borderRadius=(Y+2)/2+"px",Le.style.borderColor=D===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Le.addEventListener("click",function(){z.setCurrentColor(D,Le)});var ct=document.createElement("div");return ct.style.display="inline-block",ct.style.width=Y-2+"px",ct.style.height=Y-2+"px",ct.style.backgroundColor=D,ct.style.borderRadius=Y/2+"px",D==="transparent"&&(ct.style.fill=this.uiStyleSettings.toolboxAccentColor,ct.innerHTML=``),Le.appendChild(ct),Le},S.prototype.setCurrentColor=function(D,z){var te=this;this.currentColor=D,this.colorBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(D)},S}(tt),rt=function(){function $(S,D,z){this._state="new",this._isSelected=!1,this._container=S,this._overlayContainer=D,this.globalSettings=z,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty($.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),$.prototype.ownsTarget=function(S){return!1},Object.defineProperty($.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),$.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},$.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},$.prototype.pointerDown=function(S,D){},$.prototype.dblClick=function(S,D){},$.prototype.manipulate=function(S){},$.prototype.pointerUp=function(S){this.stateChanged()},$.prototype.dispose=function(){},$.prototype.addMarkerVisualToContainer=function(S){this.container.childNodes.length>0?this.container.insertBefore(S,this.container.childNodes[0]):this.container.appendChild(S)},$.prototype.getState=function(){return{typeName:$.typeName,state:this.state,notes:this.notes}},$.prototype.restoreState=function(S){this._state=S.state,this.notes=S.notes},$.prototype.scale=function(S,D){},$.prototype.colorChanged=function(S){this.onColorChanged&&this.onColorChanged(S),this.stateChanged()},$.prototype.fillColorChanged=function(S){this.onFillColorChanged&&this.onFillColorChanged(S),this.stateChanged()},$.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var S=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),S.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(S)&&this.onStateChanged(this)}},$.typeName="MarkerBase",$}(),qe=function(){function $(){this.findGripByVisual=this.findGripByVisual.bind(this)}return $.prototype.findGripByVisual=function(S){return this.topLeft.ownsTarget(S)?this.topLeft:this.topCenter.ownsTarget(S)?this.topCenter:this.topRight.ownsTarget(S)?this.topRight:this.centerLeft.ownsTarget(S)?this.centerLeft:this.centerRight.ownsTarget(S)?this.centerRight:this.bottomLeft.ownsTarget(S)?this.bottomLeft:this.bottomCenter.ownsTarget(S)?this.bottomCenter:this.bottomRight.ownsTarget(S)?this.bottomRight:void 0},$}(),gt=function(){function $(){this.GRIP_SIZE=10,this.visual=ne.createGroup(),this.visual.appendChild(ne.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ne.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(S){return S===this.visual||S===this.visual.childNodes[0]||S===this.visual.childNodes[1]},$}(),pt=function(){function $(){}return $.toITransformMatrix=function(S){return{a:S.a,b:S.b,c:S.c,d:S.d,e:S.e,f:S.f}},$.toSVGMatrix=function(S,D){return S.a=D.a,S.b=D.b,S.c=D.c,S.d=D.d,S.e=D.e,S.f=D.f,S},$}(),vt=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.left=0,Y.top=0,Y.width=0,Y.height=0,Y.defaultSize={x:50,y:20},Y.offsetX=0,Y.offsetY=0,Y.rotationAngle=0,Y.CB_DISTANCE=10,Y._suppressMarkerCreateEvent=!1,Y.container.transform.baseVal.appendItem(ne.createTransform()),Y.setupControlBox(),Y}return ue(S,$),Object.defineProperty(S.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"visual",{get:function(){return this._visual},set:function(D){this._visual=D;var z=ne.createTransform();this._visual.transform.baseVal.appendItem(z)},enumerable:!1,configurable:!0}),S.prototype.ownsTarget=function(D){return!!$.prototype.ownsTarget.call(this,D)||!!(this.controlGrips.findGripByVisual(D)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(D))},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="new"&&(this.left=D.x,this.top=D.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var te=this.unrotatePoint(D);if(this.manipulationStartX=te.x,this.manipulationStartY=te.y,this.offsetX=te.x-this.left,this.offsetY=te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(z),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z)){this.activeGrip=this.rotatorGrip;var Y=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Y.x-this.width/2,this.top=Y.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Le=this.container.transform.baseVal.getItem(0);Le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},S.prototype.pointerUp=function(D){var z=this.state;$.prototype.pointerUp.call(this,D),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(D),this._state="select",z==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},S.prototype.moveVisual=function(D){this.visual.style.transform="translate("+D.x+"px, "+D.y+"px)"},S.prototype.manipulate=function(D){var z=this.unrotatePoint(D);this.state==="creating"?this.resize(D):this.state==="move"?(this.left=this.manipulationStartLeft+(z.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(z.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(z):this.state==="rotate"&&this.rotate(D)},S.prototype.resize=function(D){var z=this.manipulationStartLeft,te=this.manipulationStartWidth,Y=this.manipulationStartTop,Le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:z=this.manipulationStartLeft+D.x-this.manipulationStartX,te=this.manipulationStartWidth+this.manipulationStartLeft-z;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:te=this.manipulationStartWidth+D.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Y=this.manipulationStartTop+D.y-this.manipulationStartY,Le=this.manipulationStartHeight+this.manipulationStartTop-Y;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Le=this.manipulationStartHeight+D.y-this.manipulationStartY}te>=0?(this.left=z,this.width=te):(this.left=z+te,this.width=-te),Le>=0?(this.top=Y,this.height=Le):(this.top=Y+Le,this.height=-Le),this.setSize()},S.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},S.prototype.rotate=function(D){if(Math.abs(D.x-this.centerX)>.1){var z=Math.sign(D.x-this.centerX);this.rotationAngle=180*Math.atan((D.y-this.centerY)/(D.x-this.centerX))/Math.PI+90*z,this.applyRotation()}},S.prototype.applyRotation=function(){var D=this.container.transform.baseVal.getItem(0);D.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(D,0)},S.prototype.rotatePoint=function(D){if(this.rotationAngle===0)return D;var z=this.container.getCTM(),te=ne.createPoint(D.x,D.y);return{x:(te=te.matrixTransform(z)).x,y:te.y}},S.prototype.unrotatePoint=function(D){if(this.rotationAngle===0)return D;var z=this.container.getCTM();z=z.inverse();var te=ne.createPoint(D.x,D.y);return{x:(te=te.matrixTransform(z)).x,y:te.y}},S.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},S.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},S.prototype.setupControlBox=function(){this.controlBox=ne.createGroup();var D=ne.createTransform();D.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(D),this.container.appendChild(this.controlBox),this.controlRect=ne.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ne.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new qe,this.addControlGrips(),this.controlBox.style.display="none"},S.prototype.adjustControlBox=function(){var D=this.controlBox.transform.baseVal.getItem(0);D.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(D,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},S.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},S.prototype.createGrip=function(){var D=new gt;return D.visual.transform.baseVal.appendItem(ne.createTransform()),this.controlBox.appendChild(D.visual),D},S.prototype.positionGrips=function(){var D=this.controlGrips.topLeft.GRIP_SIZE,z=-D/2,te=z,Y=(this.width+this.CB_DISTANCE)/2-D/2,Le=(this.height+this.CB_DISTANCE)/2-D/2,ct=this.height+this.CB_DISTANCE-D/2,Pt=this.width+this.CB_DISTANCE-D/2;this.positionGrip(this.controlGrips.topLeft.visual,z,te),this.positionGrip(this.controlGrips.topCenter.visual,Y,te),this.positionGrip(this.controlGrips.topRight.visual,Pt,te),this.positionGrip(this.controlGrips.centerLeft.visual,z,Le),this.positionGrip(this.controlGrips.centerRight.visual,Pt,Le),this.positionGrip(this.controlGrips.bottomLeft.visual,z,ct),this.positionGrip(this.controlGrips.bottomCenter.visual,Y,ct),this.positionGrip(this.controlGrips.bottomRight.visual,Pt,ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Y,te-3*this.CB_DISTANCE)},S.prototype.positionGrip=function(D,z,te){var Y=D.transform.baseVal.getItem(0);Y.setTranslate(z,te),D.transform.baseVal.replaceItem(Y,0)},S.prototype.hideControlBox=function(){this.controlBox.style.display="none"},S.prototype.showControlBox=function(){this.controlBox.style.display=""},S.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},$.prototype.getState.call(this))},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D);var z=D;this.left=z.left,this.top=z.top,this.width=z.width,this.height=z.height,this.rotationAngle=z.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,z.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,z.containerTransformMatrix))},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z);var te=this.rotatePoint({x:this.left,y:this.top}),Y=this.unrotatePoint({x:te.x*D,y:te.y*z});this.left=Y.x,this.top=Y.y,this.width=this.width*D,this.height=this.height*z,this.adjustControlBox()},S}(rt),at=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.fillColor="transparent",Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.opacity=1,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setFillColor=Y.setFillColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.createVisual=Y.createVisual.bind(Y),Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.visual)},S.prototype.createVisual=function(){this.visual=ne.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},S.prototype.manipulate=function(D){$.prototype.manipulate.call(this,D)},S.prototype.resize=function(D){$.prototype.resize.call(this,D),this.setSize()},S.prototype.setSize=function(){$.prototype.setSize.call(this),ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},S.prototype.pointerUp=function(D){$.prototype.pointerUp.call(this,D),this.setSize()},S.prototype.setStrokeColor=function(D){this.strokeColor=D,this.visual&&ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(D),this.stateChanged()},S.prototype.setFillColor=function(D){this.fillColor=D,this.visual&&ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},S.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.visual&&ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},S.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.visual&&ne.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},S.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this))},S.prototype.restoreState=function(D){var z=D;this.fillColor=z.fillColor,this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.opacity=z.opacity,this.createVisual(),$.prototype.restoreState.call(this,D),this.setSize()},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z),this.setSize()},S.title="Rectangle marker",S}(vt),Rt=function($){function S(D,z,te,Y){var Le=$.call(this,D,Y||'')||this;return Le.widths=[],Le.widthBoxes=[],Le.widths=z,Le.currentWidth=te,Le.setCurrentWidth=Le.setCurrentWidth.bind(Le),Le}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",this.widths.forEach(function(te){var Y=document.createElement("div");Y.style.display="flex",Y.style.flexGrow="2",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=te===D.currentWidth?D.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){D.setCurrentWidth(te,Y)}),z.appendChild(Y);var Le=document.createElement("div");Le.innerText=te.toString(),Le.style.marginRight="5px",Y.appendChild(Le);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.display="flex",ct.style.alignItems="center";var Pt=document.createElement("hr");Pt.style.minWidth="20px",Pt.style.border="0px",Pt.style.borderTop=te+"px solid "+D.uiStyleSettings.toolboxColor,Pt.style.flexGrow="2",ct.appendChild(Pt),Y.appendChild(ct),D.widthBoxes.push(Y)}),z},S.prototype.setCurrentWidth=function(D,z){var te=this;this.currentWidth=D,this.widthBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},S}(tt),xt=function($){function S(D,z,te,Y){var Le=$.call(this,D,Y||'')||this;return Le.styles=[],Le.styleBoxes=[],Le.styles=z,Le.currentStyle=te,Le.setCurrentStyle=Le.setCurrentStyle.bind(Le),Le}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",this.styles.forEach(function(te){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/D.styles.length-5+"%",Y.style.borderColor=te===D.currentStyle?D.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){D.setCurrentStyle(te,Y)}),z.appendChild(Y);var Le=document.createElement("div");Le.style.minHeight="20px",Le.style.flexGrow="2",Le.style.overflow="hidden";var ct=``;Le.innerHTML=ct,Y.appendChild(Le),D.styleBoxes.push(Y)}),z},S.prototype.setCurrentStyle=function(D,z){var te=this;this.currentStyle=D,this.styleBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},S}(tt),Tt=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.strokeColor=te.defaultColor,Y.strokeWidth=te.defaultStrokeWidth,Y.strokeDasharray=te.defaultStrokeDasharray,Y.strokePanel=new it("Line color",te.defaultColorSet,te.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Rt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ue(S,$),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=$.prototype.getState.call(this);return D.typeName=S.typeName,D},S.typeName="FrameMarker",S.title="Frame marker",S.icon='',S}(at),Ye=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Mt=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.x1=0,Y.y1=0,Y.x2=0,Y.y2=0,Y.defaultLength=50,Y.manipulationStartX=0,Y.manipulationStartY=0,Y.manipulationStartX1=0,Y.manipulationStartY1=0,Y.manipulationStartX2=0,Y.manipulationStartY2=0,Y.setupControlBox(),Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!!$.prototype.ownsTarget.call(this,D)||!(!this.grip1.ownsTarget(D)&&!this.grip2.ownsTarget(D))},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.manipulationStartX=D.x,this.manipulationStartY=D.y,this.state==="new"&&(this.x1=D.x,this.y1=D.y,this.x2=D.x,this.y2=D.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(z)?this.activeGrip=this.grip1:this.grip2.ownsTarget(z)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},S.prototype.pointerUp=function(D){var z=this.state;$.prototype.pointerUp.call(this,D),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(D),this._state="select",z==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},S.prototype.adjustVisual=function(){},S.prototype.manipulate=function(D){this.state==="creating"?this.resize(D):this.state==="move"?(this.x1=this.manipulationStartX1+D.x-this.manipulationStartX,this.y1=this.manipulationStartY1+D.y-this.manipulationStartY,this.x2=this.manipulationStartX2+D.x-this.manipulationStartX,this.y2=this.manipulationStartY2+D.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(D)},S.prototype.resize=function(D){switch(this.activeGrip){case this.grip1:this.x1=D.x,this.y1=D.y;break;case this.grip2:case void 0:this.x2=D.x,this.y2=D.y}this.adjustVisual(),this.adjustControlBox()},S.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},S.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},S.prototype.setupControlBox=function(){this.controlBox=ne.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},S.prototype.adjustControlBox=function(){this.positionGrips()},S.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},S.prototype.createGrip=function(){var D=new gt;return D.visual.transform.baseVal.appendItem(ne.createTransform()),this.controlBox.appendChild(D.visual),D},S.prototype.positionGrips=function(){var D=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-D/2,this.y1-D/2),this.positionGrip(this.grip2.visual,this.x2-D/2,this.y2-D/2)},S.prototype.positionGrip=function(D,z,te){var Y=D.transform.baseVal.getItem(0);Y.setTranslate(z,te),D.transform.baseVal.replaceItem(Y,0)},S.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},$.prototype.getState.call(this))},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D);var z=D;this.x1=z.x1,this.y1=z.y1,this.x2=z.x2,this.y2=z.y2},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z),this.x1=this.x1*D,this.y1=this.y1*z,this.x2=this.x2*D,this.y2=this.y2*z,this.adjustVisual(),this.adjustControlBox()},S}(rt),St=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.strokeColor=te.defaultColor,Y.strokeWidth=te.defaultStrokeWidth,Y.strokeDasharray=te.defaultStrokeDasharray,Y.strokePanel=new it("Line color",te.defaultColorSet,te.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Rt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.selectorLine&&D!==this.visibleLine)},S.prototype.createVisual=function(){this.visual=ne.createGroup(),this.selectorLine=ne.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ne.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},S.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ne.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ne.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ne.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},S.prototype.setStrokeColor=function(D){this.strokeColor=D,this.adjustVisual(),this.colorChanged(D)},S.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.adjustVisual()},S.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.adjustVisual(),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D);var z=D;this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.createVisual(),this.adjustVisual()},S.typeName="LineMarker",S.title="Line marker",S.icon='',S}(Mt),ze=function($){function S(D,z,te,Y){var Le=$.call(this,D,Y||'')||this;return Le.fonts=[],Le.fontBoxes=[],Le.fonts=z,Le.currentFont=te,Le.setCurrentFont=Le.setCurrentFont.bind(Le),Le}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");return z.style.overflow="hidden",z.style.flexGrow="2",this.fonts.forEach(function(te){var Y=document.createElement("div");Y.style.display="inline-block",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.overflow="hidden",Y.style.maxWidth=100/D.fonts.length-5+"%",Y.style.borderColor=te===D.currentFont?D.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){D.setCurrentFont(te,Y)}),z.appendChild(Y);var Le=document.createElement("div");Le.style.display="flex",Le.style.minHeight="20px",Le.style.flexGrow="2",Le.style.fontFamily=te,Le.style.overflow="hidden";var ct=document.createElement("div");ct.style.whiteSpace="nowrap",ct.style.overflow="hidden",ct.style.textOverflow="ellipsis",ct.innerHTML="The quick brown fox jumps over the lazy dog",Le.appendChild(ct),Y.appendChild(Le),D.fontBoxes.push(Y)}),z},S.prototype.setCurrentFont=function(D,z){var te=this;this.currentFont=D,this.fontBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},S}(tt),ut=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.color="transparent",Y.padding=5,Y.DEFAULT_TEXT="your text here",Y.text=Y.DEFAULT_TEXT,Y.isMoved=!1,Y.color=te.defaultColor,Y.fontFamily=te.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setColor=Y.setColor.bind(Y),Y.setFont=Y.setFont.bind(Y),Y.renderText=Y.renderText.bind(Y),Y.sizeText=Y.sizeText.bind(Y),Y.textEditDivClicked=Y.textEditDivClicked.bind(Y),Y.showTextEditor=Y.showTextEditor.bind(Y),Y.setSize=Y.setSize.bind(Y),Y.positionTextEditor=Y.positionTextEditor.bind(Y),Y.colorPanel=new it("Color",te.defaultColorSet,te.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.fontFamilyPanel=new ze("Font",te.defaultFontFamilies,te.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y}return ue(S,$),S.prototype.ownsTarget=function(D){if($.prototype.ownsTarget.call(this,D)||D===this.visual||D===this.textElement||D===this.bgRectangle)return!0;var z=!1;return this.textElement.childNodes.forEach(function(te){te===D&&(z=!0)}),z},S.prototype.createVisual=function(){this.visual=ne.createGroup(),this.bgRectangle=ne.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ne.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ne.createTransform()),this.textElement.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.isMoved=!1,this.pointerDownPoint=D,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},S.prototype.renderText=function(){var D=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(z){D.textElement.appendChild(ne.createTSpan(z.trim()===""?" ":z.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},S.prototype.getTextScale=function(){var D=this.textElement.getBBox(),z=1;if(D.width>0&&D.height>0){var te=(1*this.width-this.width*this.padding*2/100)/D.width,Y=(1*this.height-this.height*this.padding*2/100)/D.height;z=Math.min(te,Y)}return z},S.prototype.getTextPosition=function(D){var z=this.textElement.getBBox(),te=0,Y=0;return z.width>0&&z.height>0&&(te=(this.width-z.width*D)/2,Y=this.height/2-z.height*D/2),{x:te,y:Y}},S.prototype.sizeText=function(){var D=this.textElement.getBBox(),z=this.getTextScale(),te=this.getTextPosition(z);te.y-=D.y*z,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+te.x+"px, "+te.y+"px) scale("+z+", "+z+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(te.x,te.y),this.textElement.transform.baseVal.getItem(1).setScale(z,z))},S.prototype.manipulate=function(D){$.prototype.manipulate.call(this,D),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(D.x-this.pointerDownPoint.x)>5||Math.abs(D.y-this.pointerDownPoint.y)>5)},S.prototype.resize=function(D){$.prototype.resize.call(this,D),this.isMoved=!0,this.setSize(),this.sizeText()},S.prototype.setSize=function(){$.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},S.prototype.pointerUp=function(D){var z=this.state;z==="creating"&&(this._suppressMarkerCreateEvent=!0),$.prototype.pointerUp.call(this,D),this.setSize(),(z==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},S.prototype.showTextEditor=function(){var D=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(z){z.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var z=Number.parseFloat(D.textEditor.style.fontSize);D.textEditor.clientWidth>=Number.parseInt(D.textEditor.style.maxWidth)&&z>.9;)z-=.1,D.textEditor.style.fontSize=Math.max(z,.9)+"em"}),this.textEditor.addEventListener("keyup",function(z){z.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(z){if(z.clipboardData){var te=z.clipboardData.getData("text"),Y=window.getSelection();if(!Y.rangeCount)return!1;Y.deleteFromDocument(),Y.getRangeAt(0).insertNode(document.createTextNode(te)),z.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){D.textEditDivClicked(D.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},S.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var D=this.getTextScale(),z=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),te=this.textElement.getBBox(),Y={x:te.width*D,y:te.height*D};z.x-=Y.x/2,z.y-=Y.y/2,this.textEditor.style.top=z.y+"px",this.textEditor.style.left=z.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-z.x+"px",this.textEditor.style.fontSize=Math.max(16*D,12)+"px",this.textElement.style.display="none"}},S.prototype.textEditDivClicked=function(D){this.text=D.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},S.prototype.select=function(){$.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},S.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),$.prototype.deselect.call(this)},S.prototype.dblClick=function(D,z){$.prototype.dblClick.call(this,D,z),this.showTextEditor()},S.prototype.setColor=function(D){this.textElement&&ne.setAttributes(this.textElement,[["fill",D]]),this.color=D,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(D)},S.prototype.setFont=function(D){this.textElement&&ne.setAttributes(this.textElement,[["font-family",D]]),this.fontFamily=D,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},S.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},S.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){var z=D;this.color=z.color,this.fontFamily=z.fontFamily,this.padding=z.padding,this.text=z.text,this.createVisual(),$.prototype.restoreState.call(this,D),this.setSize()},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z),this.setSize(),this.sizeText(),this.positionTextEditor()},S.typeName="TextMarker",S.title="Text marker",S.icon='',S}(vt),be=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.color="transparent",Y.lineWidth=3,Y.drawing=!1,Y.pixelRatio=1,Y.color=te.defaultColor,Y.lineWidth=te.defaultStrokeWidth,Y.pixelRatio=te.freehandPixelRatio,Y.setColor=Y.setColor.bind(Y),Y.addCanvas=Y.addCanvas.bind(Y),Y.finishCreation=Y.finishCreation.bind(Y),Y.setLineWidth=Y.setLineWidth.bind(Y),Y.colorPanel=new it("Color",te.defaultColorSet,te.defaultColor),Y.colorPanel.onColorChanged=Y.setColor,Y.lineWidthPanel=new Rt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Y.lineWidthPanel.onWidthChanged=Y.setLineWidth,Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.drawingImage)},S.prototype.createVisual=function(){this.visual=ne.createGroup(),this.drawingImage=ne.createImage(),this.visual.appendChild(this.drawingImage);var D=ne.createTransform();this.visual.transform.baseVal.appendItem(D),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(D,z){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(D.x,D.y),this.drawing=!0):$.prototype.pointerDown.call(this,D,z)},S.prototype.manipulate=function(D){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(D.x,D.y),this.canvasContext.stroke()):$.prototype.manipulate.call(this,D)},S.prototype.resize=function(D){$.prototype.resize.call(this,D),ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},S.prototype.pointerUp=function(D){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):$.prototype.pointerUp.call(this,D)},S.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},S.prototype.select=function(){this.state==="creating"&&this.finishCreation(),$.prototype.select.call(this)},S.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),$.prototype.deselect.call(this)},S.prototype.finishCreation=function(){for(var D=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),z=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],te=z[0],Y=z[1],Le=z[2],ct=z[3],Pt=!1,rn=0;rn0&&(Pt=!0,rnct&&(ct=rn),ht>Le&&(Le=ht));if(Pt){this.left=te/this.pixelRatio,this.top=Y/this.pixelRatio,this.width=(Le-te)/this.pixelRatio,this.height=(ct-Y)/this.pixelRatio;var Vt=document.createElement("canvas");Vt.width=Le-te,Vt.height=ct-Y,Vt.getContext("2d").putImageData(this.canvasContext.getImageData(te,Y,Le-te,ct-Y),0,0),this.drawingImgUrl=Vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},S.prototype.setDrawingImage=function(){ne.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},S.prototype.setColor=function(D){this.color=D,this.colorChanged(D)},S.prototype.setLineWidth=function(D){this.lineWidth=D},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({drawingImgUrl:this.drawingImgUrl},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){this.createVisual(),$.prototype.restoreState.call(this,D),this.drawingImgUrl=D.drawingImgUrl,this.setDrawingImage()},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z),this.setDrawingImage()},S.typeName="FreehandMarker",S.title="Freehand marker",S.icon='',S}(vt),xe=function($){function S(D,z,te){var Y=$.call(this,D,te||'')||this;return Y.typeBoxes=[],Y.currentType=z,Y.setCurrentType=Y.setCurrentType.bind(Y),Y}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2";for(var te=function(ct){var Pt="both";switch(ct){case 0:Pt="both";break;case 1:Pt="start";break;case 2:Pt="end";break;case 3:Pt="none"}var rn=document.createElement("div");if(rn.style.display="flex",rn.style.flexGrow="2",rn.style.alignItems="center",rn.style.justifyContent="space-between",rn.style.padding="5px",rn.style.borderWidth="2px",rn.style.borderStyle="solid",rn.style.borderColor=Pt===Y.currentType?Y.uiStyleSettings.toolboxAccentColor:"transparent",rn.addEventListener("click",function(){D.setCurrentType(Pt,rn)}),z.appendChild(rn),Pt==="both"||Pt==="start"){var ht=document.createElement("div");ht.style.display="flex",ht.style.alignItems="center",ht.style.minHeight="20px",ht.innerHTML=``,ht.style.marginLeft="5px",rn.appendChild(ht)}var Vt=document.createElement("div");Vt.style.display="flex",Vt.style.alignItems="center",Vt.style.minHeight="20px",Vt.style.flexGrow="2";var hi=document.createElement("hr");if(hi.style.minWidth="20px",hi.style.border="0px",hi.style.borderTop="3px solid "+(Y.uiStyleSettings!==void 0?Y.uiStyleSettings.toolboxColor:"#eeeeee"),hi.style.flexGrow="2",Vt.appendChild(hi),rn.appendChild(Vt),Pt==="both"||Pt==="end"){var Li=document.createElement("div");Li.style.display="flex",Li.style.alignItems="center",Li.style.minHeight="20px",Li.innerHTML=``,Li.style.marginRight="5px",rn.appendChild(Li)}Y.typeBoxes.push(rn)},Y=this,Le=0;Le<4;Le++)te(Le);return z},S.prototype.setCurrentType=function(D,z){var te=this;this.currentType=D,this.typeBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},S}(tt),pe=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.arrowType="end",Y.arrowBaseHeight=10,Y.arrowBaseWidth=10,Y.getArrowPoints=Y.getArrowPoints.bind(Y),Y.setArrowType=Y.setArrowType.bind(Y),Y.arrowTypePanel=new xe("Arrow type","end"),Y.arrowTypePanel.onArrowTypeChanged=Y.setArrowType,Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.arrow1&&D!==this.arrow2)},S.prototype.getArrowPoints=function(D,z){var te=this.arrowBaseWidth+2*this.strokeWidth,Y=this.arrowBaseHeight+2*this.strokeWidth;return D-te/2+","+(z+Y/2)+" "+D+","+(z-Y/2)+" "+(D+te/2)+","+(z+Y/2)},S.prototype.createTips=function(){this.arrow1=ne.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ne.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.arrow2)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="creating"&&this.createTips()},S.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ne.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ne.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var D=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),z=this.arrow1.transform.baseVal.getItem(0);z.setRotate(D,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(z,0);var te=this.arrow2.transform.baseVal.getItem(0);te.setRotate(D+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(te,0)}},S.prototype.setArrowType=function(D){this.arrowType=D,this.adjustVisual(),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({arrowType:this.arrowType},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D);var z=D;this.arrowType=z.arrowType,this.createTips(),this.adjustVisual()},S.typeName="ArrowMarker",S.title="Arrow marker",S.icon='',S}(St),se=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.fillColor=te.defaultFillColor,Y.strokeWidth=0,Y.fillPanel=new it("Color",te.defaultColorSet,te.defaultFillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y}return ue(S,$),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=$.prototype.getState.call(this);return D.typeName=S.typeName,D},S.typeName="CoverMarker",S.title="Cover marker",S.icon='',S}(at),ce=function($){function S(D,z,te,Y){var Le=$.call(this,D,Y||'')||this;return Le.opacities=[],Le.opacityBoxes=[],Le.opacities=z,Le.currentOpacity=te,Le.setCurrentOpacity=Le.setCurrentOpacity.bind(Le),Le}return ue(S,$),S.prototype.getUi=function(){var D=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",z.style.justifyContent="space-between",this.opacities.forEach(function(te){var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.justifyContent="center",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=te===D.currentOpacity?D.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){D.setCurrentOpacity(te,Y)}),z.appendChild(Y);var Le=document.createElement("div");Le.innerText=100*te+"%",Y.appendChild(Le),D.opacityBoxes.push(Y)}),z},S.prototype.setCurrentOpacity=function(D,z){var te=this;this.currentOpacity=D,this.opacityBoxes.forEach(function(Y){Y.style.borderColor=Y===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},S}(tt),Ee=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.setOpacity=Y.setOpacity.bind(Y),Y.fillColor=te.defaultHighlightColor,Y.strokeWidth=0,Y.opacity=te.defaultHighlightOpacity,Y.fillPanel=new it("Color",te.defaultColorSet,Y.fillColor),Y.fillPanel.onColorChanged=Y.setFillColor,Y.opacityPanel=new ce("Opacity",te.defaultOpacitySteps,Y.opacity),Y.opacityPanel.onOpacityChanged=Y.setOpacity,Y}return ue(S,$),S.prototype.setOpacity=function(D){this.opacity=D,this.visual&&ne.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=$.prototype.getState.call(this);return D.typeName=S.typeName,D},S.typeName="HighlightMarker",S.title="Highlight marker",S.icon='',S}(se),Ae='',De=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.bgColor="transparent",Y.tipPosition={x:0,y:0},Y.tipBase1Position={x:0,y:0},Y.tipBase2Position={x:0,y:0},Y.tipMoving=!1,Y.color=te.defaultStrokeColor,Y.bgColor=te.defaultFillColor,Y.fontFamily=te.defaultFontFamily,Y.defaultSize={x:100,y:30},Y.setBgColor=Y.setBgColor.bind(Y),Y.getTipPoints=Y.getTipPoints.bind(Y),Y.positionTip=Y.positionTip.bind(Y),Y.setTipPoints=Y.setTipPoints.bind(Y),Y.colorPanel=new it("Text color",te.defaultColorSet,Y.color,''),Y.colorPanel.onColorChanged=Y.setColor,Y.bgColorPanel=new it("Fill color",te.defaultColorSet,Y.bgColor,Ae),Y.bgColorPanel.onColorChanged=Y.setBgColor,Y.fontFamilyPanel=new ze("Font",te.defaultFontFamilies,te.defaultFontFamily),Y.fontFamilyPanel.onFontChanged=Y.setFont,Y.tipGrip=new gt,Y.tipGrip.visual.transform.baseVal.appendItem(ne.createTransform()),Y.controlBox.appendChild(Y.tipGrip.visual),Y}return ue(S,$),S.prototype.ownsTarget=function(D){return $.prototype.ownsTarget.call(this,D)||this.tipGrip.ownsTarget(D)||this.tip===D},S.prototype.createTip=function(){ne.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ne.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},S.prototype.pointerDown=function(D,z){this.state==="new"&&$.prototype.pointerDown.call(this,D,z),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(z)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):$.prototype.pointerDown.call(this,D,z)},S.prototype.pointerUp=function(D){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,$.prototype.pointerUp.call(this,D);else{var z=this.state==="creating";$.prototype.pointerUp.call(this,D),this.setTipPoints(z),this.positionTip()}},S.prototype.manipulate=function(D){if(this.tipMoving){var z=this.unrotatePoint(D);this.tipPosition={x:z.x-this.manipulationStartLeft,y:z.y-this.manipulationStartTop},this.positionTip()}else $.prototype.manipulate.call(this,D)},S.prototype.setBgColor=function(D){this.bgRectangle&&this.tip&&(ne.setAttributes(this.bgRectangle,[["fill",D]]),ne.setAttributes(this.tip,[["fill",D]])),this.bgColor=D,this.fillColorChanged(D)},S.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},S.prototype.setTipPoints=function(D){D===void 0&&(D=!1);var z=Math.min(this.height/2,15),te=this.height/5;D&&(this.tipPosition={x:z+te/2,y:this.height+20});var Y=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Y',S}(ut),$e=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.fillColor="transparent",Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.opacity=1,Y.strokeColor=te.defaultColor,Y.strokeWidth=te.defaultStrokeWidth,Y.strokeDasharray=te.defaultStrokeDasharray,Y.fillColor=te.defaultFillColor,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setFillColor=Y.setFillColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.setOpacity=Y.setOpacity.bind(Y),Y.createVisual=Y.createVisual.bind(Y),Y.strokePanel=new it("Line color",le(te.defaultColorSet,["transparent"]),te.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.fillPanel=new it("Fill color",le(te.defaultColorSet,["transparent"]),Y.fillColor,Ae),Y.fillPanel.onColorChanged=Y.setFillColor,Y.strokeWidthPanel=new Rt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y.opacityPanel=new ce("Opacity",te.defaultOpacitySteps,Y.opacity),Y.opacityPanel.onOpacityChanged=Y.setOpacity,Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.visual)},S.prototype.createVisual=function(){this.visual=ne.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},S.prototype.manipulate=function(D){$.prototype.manipulate.call(this,D)},S.prototype.resize=function(D){$.prototype.resize.call(this,D),this.setSize()},S.prototype.setSize=function(){$.prototype.setSize.call(this),ne.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},S.prototype.pointerUp=function(D){$.prototype.pointerUp.call(this,D),this.setSize()},S.prototype.setStrokeColor=function(D){this.strokeColor=D,this.visual&&ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(D),this.stateChanged()},S.prototype.setFillColor=function(D){this.fillColor=D,this.visual&&ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(D),this.stateChanged()},S.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.visual&&ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},S.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.visual&&ne.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},S.prototype.setOpacity=function(D){this.opacity=D,this.visual&&ne.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){var z=D;this.fillColor=z.fillColor,this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.opacity=z.opacity,this.createVisual(),$.prototype.restoreState.call(this,D),this.setSize()},S.prototype.scale=function(D,z){$.prototype.scale.call(this,D,z),this.setSize()},S.typeName="EllipseMarker",S.title="Ellipse marker",S.icon='',S}(vt),lt=function($){function S(D,z,te){return $.call(this,D,z,te)||this}return ue(S,$),Object.defineProperty(S.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.tip1&&D!==this.tip2)},S.prototype.createTips=function(){this.tip1=ne.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ne.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.tip2)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.state==="creating"&&this.createTips()},S.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ne.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ne.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var D=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),z=this.tip1.transform.baseVal.getItem(0);z.setRotate(D,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(z,0);var te=this.tip2.transform.baseVal.getItem(0);te.setRotate(D+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(te,0)}},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=$.prototype.getState.call(this);return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D),this.createTips(),this.adjustVisual()},S.typeName="MeasurementMarker",S.title="Measurement marker",S.icon='',S}(St),Bt=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.strokePanel.colors=te.defaultColorSet,Y.fillColor="transparent",Y}return ue(S,$),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=$.prototype.getState.call(this);return D.typeName=S.typeName,D},S.typeName="EllipseFrameMarker",S.title="Ellipse frame marker",S.icon='',S}($e),tn=function(){function $(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),$.prototype.addUndoStep=function(S){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(S)||(this.undoStack.push(S),JSON.stringify(this.lastRedoStep)!==JSON.stringify(S)&&this.redoStack.splice(0,this.redoStack.length))},$.prototype.replaceLastUndoStep=function(S){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=S)},$.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},$.prototype.undo=function(){if(this.undoStack.length>1){var S=this.undoStack.pop();return S!==void 0&&this.redoStack.push(S),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},$.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},$}(),nn=function($){function S(D,z,te){var Y=$.call(this,D,z,te)||this;return Y.strokeColor="transparent",Y.strokeWidth=0,Y.strokeDasharray="",Y.curveX=0,Y.curveY=0,Y.manipulationStartCurveX=0,Y.manipulationStartCurveY=0,Y.setStrokeColor=Y.setStrokeColor.bind(Y),Y.setStrokeWidth=Y.setStrokeWidth.bind(Y),Y.setStrokeDasharray=Y.setStrokeDasharray.bind(Y),Y.positionGrips=Y.positionGrips.bind(Y),Y.addControlGrips=Y.addControlGrips.bind(Y),Y.adjustVisual=Y.adjustVisual.bind(Y),Y.setupControlBox=Y.setupControlBox.bind(Y),Y.resize=Y.resize.bind(Y),Y.strokeColor=te.defaultColor,Y.strokeWidth=te.defaultStrokeWidth,Y.strokeDasharray=te.defaultStrokeDasharray,Y.strokePanel=new it("Line color",te.defaultColorSet,te.defaultColor),Y.strokePanel.onColorChanged=Y.setStrokeColor,Y.strokeWidthPanel=new Rt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Y.strokeWidthPanel.onWidthChanged=Y.setStrokeWidth,Y.strokeStylePanel=new xt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Y.strokeStylePanel.onStyleChanged=Y.setStrokeDasharray,Y}return ue(S,$),S.prototype.ownsTarget=function(D){return!(!$.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.selectorCurve&&D!==this.visibleCurve&&!this.curveGrip.ownsTarget(D))},S.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},S.prototype.createVisual=function(){this.visual=ne.createGroup(),this.selectorCurve=ne.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ne.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(D,z){$.prototype.pointerDown.call(this,D,z),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=D.x,this.curveY=D.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(z)&&(this.activeGrip=this.curveGrip,this._state="resize")},S.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ne.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ne.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ne.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},S.prototype.setupControlBox=function(){$.prototype.setupControlBox.call(this),this.curveControlLine1=ne.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ne.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},S.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,$.prototype.addControlGrips.call(this)},S.prototype.positionGrips=function(){$.prototype.positionGrips.call(this);var D=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-D/2,this.curveY-D/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},S.prototype.manipulate=function(D){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+D.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+D.y-this.manipulationStartY),$.prototype.manipulate.call(this,D)},S.prototype.resize=function(D){this.activeGrip===this.curveGrip&&(this.curveX=D.x,this.curveY=D.y),$.prototype.resize.call(this,D),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},S.prototype.setStrokeColor=function(D){this.strokeColor=D,this.adjustVisual(),this.colorChanged(D)},S.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.adjustVisual()},S.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.adjustVisual()},S.prototype.scale=function(D,z){this.curveX=this.curveX*D,this.curveY=this.curveY*z,$.prototype.scale.call(this,D,z)},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var D=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},$.prototype.getState.call(this));return D.typeName=S.typeName,D},S.prototype.restoreState=function(D){$.prototype.restoreState.call(this,D);var z=D;this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.curveX=z.curveX,this.curveY=z.curveY,this.createVisual(),this.adjustVisual()},S.typeName="CurveMarker",S.title="Curve marker",S.icon='',S}(Mt),_n=function(){function $(S,D){D===void 0&&(D=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=S,this.cancelable=D}return Object.defineProperty($.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),$.prototype.preventDefault=function(){this._defaultPrevented=!0},$}(),yn=function($){function S(D,z,te){var Y=$.call(this,D,!1)||this;return Y.dataUrl=z,Y.state=te,Y}return ue(S,$),S}(_n),Gt=function($){function S(D,z,te){te===void 0&&(te=!1);var Y=$.call(this,D,te)||this;return Y.marker=z,Y}return ue(S,$),S}(_n),ii=function(){function $(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return $.prototype.addEventListener=function(S,D){this[S].push(D)},$.prototype.removeEventListener=function(S,D){var z=this[S].indexOf(D);z>-1&&this[S].splice(z,1)},$}(),Dn=function(){function $(S){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ye,this._isOpen=!1,this.undoRedoManager=new tn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new ii,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=$.instanceCounter++,this.styles=new Ue(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=S,this.targetRoot=document.body,this.width=S.clientWidth,this.height=S.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty($.prototype,"ALL_MARKER_TYPES",{get:function(){return[Tt,be,pe,ut,Bt,$e,Ee,De,lt,se,St,nn]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Tt,be,pe,ut,$e,Ee,De]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Tt,be,pe,ut,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(S){var D=this;this._availableMarkerTypes.splice(0),S.forEach(function(z){if(typeof z=="string"){var te=D.ALL_MARKER_TYPES.find(function(Y){return Y.typeName===z});te!==void 0&&D._availableMarkerTypes.push(te)}else D._availableMarkerTypes.push(z)})},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(S){this._zoomLevel=S,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),$.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Te.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},$.prototype.show=function(){var S=this;this.styles.styleSheetRoot===void 0&&Ke.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ke.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(D){return D(new _n(S))})},$.prototype.render=function(){return he(this,void 0,void 0,function(){var S;return _e(this,function(D){switch(D.label){case 0:return this.setCurrentMarker(),(S=new Fe).naturalSize=this.renderAtNaturalSize,S.imageType=this.renderImageType,S.imageQuality=this.renderImageQuality,S.markersOnly=this.renderMarkersOnly,S.width=this.renderWidth,S.height=this.renderHeight,[4,S.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return D.sent(),[4,S.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,D.sent()]}})})},$.prototype.close=function(S){var D=this;if(S===void 0&&(S=!1),this.isOpen){var z=!1;S||this.eventListeners.beforeclose.forEach(function(te){var Y=new _n(D,!0);te(Y),Y.defaultPrevented&&(z=!0)}),z||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(te){return te(new _n(D))}),this.detachEvents(),this._isOpen=!1)}},$.prototype.addMarkersToToolbar=function(){for(var S,D=[],z=0;zthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*S:this.editorCanvas.clientWidth,z=D',S.title="Powered by marker.js",S.style.display="grid",S.style.alignItems="center",S.style.justifyItems="center",S.style.padding="3px",S.style.width="20px",S.style.height="20px",this.logoUI.appendChild(S),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},$.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},$.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},$.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var S=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Be(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(S),1),S.dispose()},$.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},$.prototype.toolbarButtonClicked=function(S,D){if(S==="marker"&&D!==void 0)this.createNewMarker(D);else if(S==="action")switch(D){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},$.prototype.deleteSelectedMarker=function(){var S=this;if(this._currentMarker!==void 0){var D=!1;if(this.eventListeners.markerbeforedelete.forEach(function(te){var Y=new Gt(S,S._currentMarker,!0);te(Y),Y.defaultPrevented&&(D=!0)}),!D){var z=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(te){return te(new Gt(S,z))})}}},$.prototype.clear=function(){var S=this,D=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Le){var ct=new Gt(S,void 0,!0);Le(ct),ct.defaultPrevented&&(D=!0)}),!D)){this.setCurrentMarker();for(var z=function(Le){var ct=te.markers[Le];te.setCurrentMarker(te.markers[Le]),te._currentMarker.dispose(),te.markerImage.removeChild(te._currentMarker.container),te.markers.splice(te.markers.indexOf(te._currentMarker),1),te.eventListeners.markerdelete.forEach(function(Pt){return Pt(new Gt(S,ct))})},te=this,Y=this.markers.length-1;Y>=0;Y--)z(Y);this.addUndoStep()}},Object.defineProperty($.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),$.prototype.showNotesEditor=function(){var S;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(S=this._currentMarker.notes)!==null&&S!==void 0?S:"",this.overlayContainer.appendChild(this.notesArea))},$.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},$.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},$.prototype.addUndoStep=function(){var S=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var D=this.getState(),z=this.undoRedoManager.getLastUndoStep();if(!z||z.width===D.width&&z.height===D.height){var te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(D),te1&&this.panTo({x:S.clientX,y:S.clientY}))},$.prototype.onPointerUp=function(S){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(S.clientX,S.clientY)),this.isDragging=!1,this.addUndoStep()},$.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},$.prototype.onKeyUp=function(S){this._currentMarker===void 0||this.notesArea!==void 0||S.key!=="Delete"&&S.key!=="Backspace"||this.deleteSelectedMarker()},$.prototype.clientToLocalCoordinates=function(S,D){var z=this.markerImage.getBoundingClientRect();return{x:(S-z.left)/this.zoomLevel,y:(D-z.top)/this.zoomLevel}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var S=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},$.prototype.addLicenseKey=function(S){Te.addKey(S)},$.prototype.addEventListener=function(S,D){this.eventListeners.addEventListener(S,D)},$.prototype.removeEventListener=function(S,D){this.eventListeners.removeEventListener(S,D)},$.prototype.renderState=function(S){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(S),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty($.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),$.prototype.focus=function(){var S=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(D){return D(new _n(S))}))},$.prototype.blur=function(){var S=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(D){return D(new _n(S))}))},$.instanceCounter=0,$}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ci=function($,S){return(Ci=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,z){D.__proto__=z}||function(D,z){for(var te in z)Object.prototype.hasOwnProperty.call(z,te)&&(D[te]=z[te])})($,S)};function fi($,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function D(){this.constructor=$}Ci($,S),$.prototype=S===null?Object.create(S):(D.prototype=S.prototype,new D)}function In($,S,D,z){return new(D||(D=Promise))(function(te,Y){function Le(rn){try{Pt(z.next(rn))}catch(ht){Y(ht)}}function ct(rn){try{Pt(z.throw(rn))}catch(ht){Y(ht)}}function Pt(rn){var ht;rn.done?te(rn.value):(ht=rn.value,ht instanceof D?ht:new D(function(Vt){Vt(ht)})).then(Le,ct)}Pt((z=z.apply($,S||[])).next())})}function Ri($,S){var D,z,te,Y,Le={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return Y={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ct(Pt){return function(rn){return function(ht){if(D)throw new TypeError("Generator is already executing.");for(;Le;)try{if(D=1,z&&(te=2&ht[0]?z.return:ht[0]?z.throw||((te=z.return)&&te.call(z),0):z.next)&&!(te=te.call(z,ht[1])).done)return te;switch(z=0,te&&(ht=[2&ht[0],te.value]),ht[0]){case 0:case 1:te=ht;break;case 4:return Le.label++,{value:ht[1],done:!1};case 5:Le.label++,z=ht[1],ht=[0];continue;case 7:ht=Le.ops.pop(),Le.trys.pop();continue;default:if(!(te=Le.trys,(te=te.length>0&&te[te.length-1])||ht[0]!==6&&ht[0]!==2)){Le=0;continue}if(ht[0]===3&&(!te||ht[1]>te[0]&&ht[1]0&&D>0){var z=new qi(S,D),te=z.ratio>=1?20:z.getHorizontalLength(20),Y=z.ratio<1?20:z.getVerticalLength(20),Le=document.createElementNS("http://www.w3.org/2000/svg","svg");Le.setAttribute("xmlns","http://www.w3.org/2000/svg"),Le.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Le);var ct=Ot.createDefs();Le.appendChild(ct);var Pt=Ot.createElement("clipPath",[["id","text-bg-clip"]]);ct.appendChild(Pt);var rn=Ot.createPath(Ot.getHollowRectanglePath((24-te)/2,(24-Y)/2,te,Y,(24-te)/2+2,(24-Y)/2+2,te-4,Y-4));Le.appendChild(rn);var ht=Ot.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ht.appendChild(Ot.createTSpan(S+":"+D)),Le.appendChild(ht);var Vt=ht.getBBox();Ot.setAttributes(ht,[["x",((24-Vt.width)/2).toString()],["y",((24-Vt.height)/2-Vt.y).toString()]]);var hi=Ot.createPath(Ot.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Vt.width))/2,(24-Math.ceil(Vt.height))/2,Math.ceil(Vt.width),Math.ceil(Vt.height)));return Pt.appendChild(hi),Ot.setAttributes(rn,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Le),Le.outerHTML}return''},$}(),sr=function($){function S(D,z,te){var Y=$.call(this,D,z)||this;return Y.isDropdownOpen=!1,Y.onClick=Y.dropdownButtonClicked,Y.dropdownButtons=te,Y}return fi(S,$),S.prototype.setupDropdown=function(){var D=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(z){z.className=D.className,z.colorsClassName=D.colorsClassName,D.dropdownBlock.appendChild(z.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},S.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},S.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},S.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},S.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},S.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},S}(mn),Fn=function(){function $(S,D){this.GRIP_SIZE=10,this.color=S,this.fillColor=D,this.visual=Ot.createGroup(),this.visual.appendChild(Ot.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ot.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(S){return S===this.visual||S===this.visual.childNodes[0]||S===this.visual.childNodes[1]},$.prototype.setCenter=function(S,D){this.visual.childNodes.forEach(function(z){return Ot.setAttributes(z,[["cx",S.toString()],["cy",D.toString()]])})},$}(),er=function(){function $(S,D,z,te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=S,this.canvasHeight=D,this.margin=z,this.container=te,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty($.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(S){this._aspectRatio=S,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(S){this._isGridVisible=S,this.gridContainer&&Ot.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(S){this._zoomFactor=S,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),$.prototype.open=function(){var S=this;this.cropShadeElement=Ot.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ot.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var D=0;Dthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-D.height/2),Ot.setAttributes(this.cropRectElement,[["x",D.x.toString()],["y",D.y.toString()],["width",D.width.toString()],["height",D.height.toString()]]);var z=D.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Y,Le){var ct=D.y+z*(Le+1);Ot.setAttributes(Y,[["x1",""+D.x],["y1",""+ct],["x2",""+(D.x+D.width)],["y2",""+ct]])});var te=D.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Y,Le){var ct=D.x+te*(Le+1);Ot.setAttributes(Y,[["x1",""+ct],["y1",""+D.y],["x2",""+ct],["y2",""+(D.y+D.height)]])}),Ot.setAttributes(this.cropShadeElement,[["d",Ot.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,D.x,D.y,D.width,D.height)]]),this.topLeftGrip.setCenter(D.x,D.y),this.topRightGrip.setCenter(D.x+D.width,D.y),this.bottomLeftGrip.setCenter(D.x,D.y+D.height),this.bottomRightGrip.setCenter(D.x+D.width,D.y+D.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},$.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},$.prototype.clientToLocalCoordinates=function(S,D){var z=this.container.getBoundingClientRect();return{x:S-z.left+this.margin,y:D-z.top+this.margin}},$.prototype.onPointerDown=function(S){this.container.setPointerCapture(S.pointerId),this.previousPoint=this.clientToLocalCoordinates(S.clientX,S.clientY),this.cropRectElement===S.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(S.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(S.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(S.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(S.target)&&(this.activeGrip=this.bottomRightGrip)},$.prototype.onPointerMove=function(S){if(this.isMoving)this.move(this.clientToLocalCoordinates(S.clientX,S.clientY));else if(this.activeGrip){var D=this.clientToLocalCoordinates(S.clientX,S.clientY);this.resize(D)}S.preventDefault()},$.prototype.onPointerUp=function(S){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(S.pointerId)},$.prototype.move=function(S){var D=S.x-this.previousPoint.x,z=S.y-this.previousPoint.y;this.zoomFactor!==1&&(D=-D/this.zoomFactor,z=-z/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+D),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+z),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=S},$.prototype.resize=function(S){var D=Object.assign({},this.cropRect),z=S.x-this.previousPoint.x,te=S.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:D.x+zthis.canvasWidth*this.zoomFactor&&(z=this.canvasWidth*this.zoomFactor-D.width),D.width+=z}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(D.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(z),D.height=this.aspectRatio.getVerticalLength(D.width)):(D.y+=te,D.height=this.cropRect.y+this.cropRect.height-D.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?D.height=this.aspectRatio.getVerticalLength(D.width):D.height+=te}D.width<10&&(D.x=this.cropRect.x,D.width=10),D.height<10&&(D.y=this.cropRect.y,D.height=10),this.previousPoint=S,D.x>=this.margin&&D.y>=this.margin&&D.x-this.margin+D.width<=this.canvasWidth&&D.y-this.margin+D.height<=this.canvasHeight&&(this.cropRect=D,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},$.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var S=this.cropRect.x+this.cropRect.width/2,D=this.cropRect.y+this.cropRect.height/2,z=this.aspectRatio.getHorizontalLength(this.cropRect.height),te=this.aspectRatio.getVerticalLength(this.cropRect.width);z/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=S-this.cropRect.width/2,this.cropRect.y=D-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},$.prototype.getRescaledRect=function(S,D,z,te,Y,Le){var ct=z/S,Pt=te/D;return{x:(Y.x-Le)*ct+Le,y:(Y.y-Le)*Pt+Le,width:Y.width*ct,height:Y.height*Pt}},$.prototype.scaleCanvas=function(S,D){var z=this.getRescaledRect(this.canvasWidth,this.canvasHeight,S,D,this.cropRect,this.margin);this.canvasWidth=S,this.canvasHeight=D,this.onCropChange&&this.onCropChange(z),this.setCropRectangle(z)},$}(),kr=function(){function $(S){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=S,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty($.prototype,"angle",{get:function(){return this._angle},set:function(S){this._angle=S,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),$.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},$.prototype.onPointerDown=function(S){this.controlContainer.setPointerCapture(S.pointerId),this.isDragging=!0,this.previousPoint={x:S.clientX,y:S.clientY}},$.prototype.onPointerMove=function(S){this.isDragging&&(this.onAngleChange&&this.onAngleChange((S.clientX-this.previousPoint.x)/5),this.previousPoint.x=S.clientX)},$.prototype.onPointerUp=function(S){this.isDragging&&this.onAngleChange&&this.onAngleChange((S.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(S.pointerId)},$.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var S=this.angleLabelText.getBBox();Ot.setAttributes(this.angleLabelElement,[["x",((this.width-S.width)/2).toString()],["y",(this.height/2).toString()]])}},$.prototype.positionScaleShape=function(){if(this.scaleShape){var S=this.scaleShape.transform.baseVal.getItem(0);S.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(S,0)}},$.prototype.getVisual=function(){var S=document.createElementNS("http://www.w3.org/2000/svg","svg");S.setAttribute("xmlns","http://www.w3.org/2000/svg"),S.setAttribute("width",this.width+"px"),S.setAttribute("height",this.height+"px"),S.setAttribute("viewBox","0 0 "+this.width+" "+this.height),S.style.flexShrink="0",document.body.appendChild(S);for(var D="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,z=1;z<=this.width/5+10;z++){var te=z%5==0?this.height/3:this.height/6;D+="h4v"+-te+"h1v"+te}D+="v1H0Z",this.scaleShape=Ot.createPath(D);var Y=Ot.createTransform();this.scaleShape.transform.baseVal.appendItem(Y),S.appendChild(this.scaleShape),this.angleLabelElement=Ot.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ot.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Le=Ot.createTSpan("");return Le.innerHTML="°",this.angleLabelElement.appendChild(Le),S.appendChild(this.angleLabelElement),document.body.removeChild(S),S},$}(),Qr=function(){function $(){this.naturalSize=!1,this.imageType="image/png"}return $.prototype.rasterize=function(S,D,z,te,Y,Le,ct){var Pt=this;return new Promise(function(rn){var ht=document.createElement("canvas");ht.width=S.width.baseVal.value-2*te,ht.height=S.height.baseVal.value-2*te;var Vt=1,hi=1;Pt.naturalSize===!0?(Vt=D.naturalWidth/(S.width.baseVal.value-2*te)/Le,hi=D.naturalHeight/(S.height.baseVal.value-2*te)/ct,ht.width=D.naturalWidth/Le,ht.height=D.naturalHeight/ct):Pt.width!==void 0&&Pt.height!==void 0&&(Vt=Pt.width/z.width,hi=Pt.height/z.height,ht.width*=Vt,ht.height*=hi);var Li=ht.getContext("2d");Li.translate(ht.width/2,ht.height/2),Li.rotate(Y*Math.PI/180),Li.scale(Le,ct),Li.translate(-ht.width/2,-ht.height/2),Li.drawImage(D,0,0,ht.width,ht.height);var Zt=document.createElement("canvas");Zt.width=z.width*Vt,Zt.height=z.height*hi,Zt.getContext("2d").putImageData(Li.getImageData((z.x-te)*Vt,(z.y-te)*hi,z.width*Vt,z.height*hi),0,0),rn(Zt.toDataURL(Pt.imageType,Pt.imageQuality))})},$}(),yt=function(){function $(S){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=$.instanceCounter++,this.styles=new bn(this.instanceNo),this.target=S,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(S){this._zoomToCropEnabled=S,S?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(S){this._isGridVisible=S,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"gridLines",{get:function(){return this._gridLines},set:function(S){this._gridLines=S,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(S){this._rotationAngle=S,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"aspectRatio",{get:function(){var S;return(S=this._aspectRatio)!==null&&S!==void 0?S:this.aspectRatios[0]},set:function(S){this._aspectRatio=S},enumerable:!1,configurable:!0}),$.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},$.prototype.show=function(){this.showUI(),this.open()},$.prototype.close=function(S){S===void 0&&(S=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),S||this.closeEventListeners.forEach(function(D){return D()}),this._isOpen=!1)},$.prototype.addRenderEventListener=function(S){this.renderEventListeners.push(S)},$.prototype.removeRenderEventListener=function(S){this.renderEventListeners.indexOf(S)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(S),1)},$.prototype.addCloseEventListener=function(S){this.closeEventListeners.push(S)},$.prototype.removeCloseEventListener=function(S){this.closeEventListeners.indexOf(S)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(S),1)},$.prototype.setupResizeObserver=function(){var S=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){S.resize(S.target.clientWidth,S.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},$.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var S=1*this.target.clientWidth/this.target.clientHeight,D=this.contentDiv.clientWidth/S>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*S:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,z=D+2*this.CANVAS_MARGINS+this.CANVAS_MARGIN?this.target.offsetTop-(S+this.CANVAS_MARGIN):0;this.coverDiv.style.top=D+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},$.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},$.prototype.addTopToolbar=function(){var S=this;this.topToolbar=new Ai,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var D=new dr;D.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(D);var z=[];this.aspectRatios.forEach(function(hi){var Li=new mn(hr.getIcon(hi.horizontal,hi.vertical),hi.horizontal===0&&hi.vertical===0?"FREE":hi.horizontal+":"+hi.vertical);Li.onClick=function(){return S.ratioButtonClicked(hi)},z.push(Li)}),this.aspectRatioButton=new sr(hr.getIcon(0,0),"Aspect ratio",z),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,D.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var te=new mn('',"Toggle grid");te.isActive=this.isGridVisible,te.onClick=function(){S.isGridVisible=!S.isGridVisible,te.isActive=S.isGridVisible},D.addButton(te);var Y=new mn('',"Zoom to selection");if(Y.isActive=this.zoomToCropEnabled,Y.onClick=function(){S.zoomToCropEnabled=!S.zoomToCropEnabled,Y.isActive=S.zoomToCropEnabled},D.addButton(Y),!Si.isLicensed){var Le=new Jt;this.topToolbar.addElementBlock(Le);var ct=document.createElement("div");ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Pt=document.createElement("a");Pt.style.color="currentColor",Pt.href="https://markerjs.com/products/cropro",Pt.target="_blank",Pt.innerHTML='',ct.appendChild(Pt),Le.addElement(ct)}var rn=new dr;rn.minWidth=3*this.toolbarHeight+"px",rn.contentAlign="end",this.topToolbar.addButtonBlock(rn);var ht=new mn('',"OK");ht.onClick=this.startRenderAndClose,rn.addButton(ht),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ht.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Vt=new mn('',"Close");Vt.onClick=this.close,rn.addButton(Vt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Vt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},$.prototype.addBottomToolbar=function(){var S=this;this.bottomToolbar=new Ai,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var D=new dr;D.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(D);var z=new mn('',"Rotate left");z.onClick=this.rotateLeftButtonClicked,D.addButton(z);var te=new mn('',"Rotate right");te.onClick=this.rotateRightButtonClicked,D.addButton(te);var Y=new Jt;Y.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Y),this.straightener=new kr("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(rn){S.rotateBy(rn),S.straightener.angle=S.rotationAngle},Y.addElement(this.straightener.getUI());var Le=new dr;Le.minWidth=2*this.toolbarHeight+"px",Le.contentAlign="end",this.bottomToolbar.addButtonBlock(Le);var ct=new mn('',"Flip horizontal");ct.onClick=this.flipHorizontallyButtonClicked,Le.addButton(ct);var Pt=new mn('',"Flip vertical");Pt.onClick=this.flipVerticallyButtonClicked,Le.addButton(Pt)},$.prototype.ratioButtonClicked=function(S){this.aspectRatio=S,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},$.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},$.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new qi(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},$.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},$.prototype.restoreState=function(S){if(S){var D=this.cropLayer.getRescaledRect(S.width,S.height,this.imageWidth,this.imageHeight,S.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(D),this.cropRectChanged(D),this.flippedHorizontally=S.flippedHorizontally,this.flippedVertically=S.flippedVertically,this.applyFlip(),this.rotationAngle=S.rotationAngle,this.applyRotation()}},$.prototype.clientToLocalCoordinates=function(S,D){var z=this.cropImage.getBoundingClientRect();return{x:S-z.left,y:D-z.top}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var S=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},$.prototype.rotateLeftButtonClicked=function(){var S=this.rotationAngle-90;this.rotationAngle%90!=0&&(S+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(S)},$.prototype.rotateRightButtonClicked=function(){var S=this.rotationAngle+90;this.rotationAngle%90!=0&&(S-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(S)},$.prototype.rotateTo=function(S){S=(S=S>180?S-360:S)<=-180?S+360:S,this.rotationAngle=S,this.applyRotation()},$.prototype.rotateBy=function(S){this.rotateTo((this.rotationAngle+S)%360)},$.prototype.applyRotation=function(){var S=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var D=this.editingTargetRotationContainer.transform.baseVal.getItem(0);D.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(D,0);var z=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/z.width,this.imageHeight/z.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=S},$.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},$.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},$.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},$.prototype.startRenderAndClose=function(){return In(this,void 0,void 0,function(){var S,D;return Ri(this,function(z){switch(z.label){case 0:return[4,this.render()];case 1:return S=z.sent(),D=this.getState(),this.renderEventListeners.forEach(function(te){return te(S,D)}),this.close(!0),[2]}})})},$.prototype.render=function(){return In(this,void 0,void 0,function(){var S;return Ri(this,function(D){switch(D.label){case 0:return(S=new Qr).naturalSize=this.renderAtNaturalSize,S.imageType=this.renderImageType,S.imageQuality=this.renderImageQuality,S.width=this.renderWidth,S.height=this.renderHeight,this.unzoomFromCrop(),Ot.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,S.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return D.sent(),[4,S.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,D.sent()]}})})},$.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new kn("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new kn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new kn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var S=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new kn("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*S)+`px;
height: `+(this.toolbarHeight-2*S)+`px;
padding: `+S+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new kn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new kn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new kn("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new kn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new kn("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new kn("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*S)+`px;
padding: `+S+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new kn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},$.instanceCounter=0,$}(),cn=G("8hTe"),Kr=G.n(cn),zr=/]*>/g;function na($){var S=document.createElement("div");return S.innerHTML=$,S.childNodes.length===0?"":S.childNodes[0].nodeValue}var Gr=Xe.a=function($){var S=$.value,D=S===void 0?"":S,z=$.edit,te=z===void 0?!1:z,Y=$.className,Le=$.showTextOnly,ct=$.showLines,Pt=$.replaces,rn=$.zoomImg,ht=$.hasMask,Vt=$.style,hi=Vt===void 0?{}:Vt,Li=$.stylesPrev,Zt=Li===void 0?{}:Li,dt=String(D),kt=Object(P.useRef)(),Lt=Object(P.useRef)(),Kt=Object(P.useState)(""),sn=Object(K.a)(Kt,2),En=sn[0],wn=sn[1],hn=Object(P.useState)("office"),Ln=Object(K.a)(hn,2),zn=Ln[0],un=Ln[1],Sn=function(){var jt=new yt(Lt.current);jt.displayMode="popup",jt.addRenderEventListener(function(){var pn=Object(B.a)(L.a.mark(function Ct(Nt){var Dt;return L.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return kt.current.style.display="none",Yt.next=3,Object(ge.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Nt}});case 3:Dt=Yt.sent,Dt!=null&&Dt.id&&Pt(Lt.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 5:case"end":return Yt.stop()}},Ct)}));return function(Ct){return pn.apply(this,arguments)}}()),jt.show()},di=function(){var jt=new Dn(Lt.current);jt.settings.displayMode="popup",jt.addEventListener("render",function(){var pn=Object(B.a)(L.a.mark(function Ct(Nt){var Dt;return L.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(kt.current.style.display="none",!Lt.current){Yt.next=6;break}return Yt.next=4,Object(ge.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Nt.dataUrl}});case 4:Dt=Yt.sent,Dt!=null&&Dt.id&&Pt(Lt.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 6:case"end":return Yt.stop()}},Ct)}));return function(Ct){return pn.apply(this,arguments)}}()),jt.show(),window.markerArea=jt},Nn=Object(P.useMemo)(function(){kt.current&&(kt.current.style.zIndex=-1);try{var Xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,jt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;dt=dt.replace(Xt,"("+Q.a.API_SERVER+"/api/attachments/").replace(jt,'"'+Q.a.API_SERVER+"/api/attachments/").replace(pn,'"'+Q.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,`
`)}catch(Pe){}var Ct=H(dt),Nt=E();if(dt.match(/\[TOC\]/)&&(Ct=Ct.replace("[TOC]
",A()),R()),Ct=Ct.replace(/(__special_katext_id_\d+__)/g,function(Pe,Yt){var xn=Nt[Yt],pi=xn.type,On=xn.expression;return Object(q.renderToString)(na(On)||"",{displayMode:pi==="block",throwOnError:!1,output:"html"})}),Ct=Ct.replace(/▁/g,"\u2581\u2581\u2581"),g(),Le){var Dt=document.createElement("div");return Dt.innerHTML=Ct,Dt.innerText}return setTimeout(function(){return si()},500),Ct},[dt]),zt=Object(P.useRef)();O.WebkitLineClamp=ct,ct&&(hi=Object(I.a)(Object(I.a)({},hi),O));function An(Xt){var jt=Xt.target;if(jt.tagName.toUpperCase()==="IMG"){if(rn){var pn=jt.getAttribute("src");wn(pn),un("image")}}else if(jt.tagName.toUpperCase()==="A"){var Ct=jt.getAttribute("href");if(Ct.indexOf("office")>-1)Xt.preventDefault(),wn(Ct),un("office");else if(Ct.indexOf("application/pdf")>-1)Xt.preventDefault(),wn(Ct),un("pdf");else if(Ct.indexOf("text/html")>-1)Xt.preventDefault(),wn(Ct),un("html");else if(Ct.startsWith("#")){Xt.preventDefault();var Nt=document.getElementById(Ct.replace("#",""));Nt&&Nt.scrollIntoView(!0)}}}var si=function(){var jt,pn=(jt=zt.current)===null||jt===void 0?void 0:jt.querySelectorAll("video");pn==null||pn.forEach(function(Ct){if(Ct.oncontextmenu=function(){return!1},Ct.src.indexOf(".m3u8")>-1&&!Ct.canPlayType("application/vnd.apple.mpegurl")){if(F.a.isSupported()){var Nt=new F.a;Nt.loadSource(Ct.src),Nt.attachMedia(Ct)}}})};Object(P.useEffect)(function(){if(zt.current&&Nn&&(Nn.match(zr)&&window.PR.prettyPrint()),zt.current)return zt.current.addEventListener("click",An),function(){zt.current.removeEventListener("click",An),g(),R()}},[Nn,zt.current,An]);var Un=function(jt){if(!te)return;jt.target.nodeName==="IMG"?(kt.current.style.zIndex=1,kt.current.style.display="flex",kt.current.style.width=jt.target.clientWidth+"px",kt.current.style.height=jt.target.clientHeight+"px",kt.current.style.top=jt.target.offsetTop+"px",kt.current.style.left=jt.target.offsetLeft+"px",Lt.current.src=jt.target.getAttribute("src")):kt.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:zt,style:Object(I.a)({},hi),className:"".concat(Y||""," markdown-body ").concat(Kr.a.mdBody),onMouseOver:Un,dangerouslySetInnerHTML:{__html:Nn}}),b.a.createElement("div",{ref:kt,className:Kr.a.button},b.a.createElement(Z.a,null,b.a.createElement(V.a,{onClick:function(){return Sn()}},"\u88C1\u526A"),b.a.createElement(V.a,{onClick:function(){return di()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:Lt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),b.a.createElement(ie.a,{close:!0,data:En,type:En!=null&&En.length?zn:"",style:Object(I.a)({},Zt),onClose:function(){return wn("")}}))}},"9VGf":function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return M});var de=G("q1tI"),Z=G.n(de);function M(V,I){var B=Object(de.useRef)();Object(de.useEffect)(function(){B.current=V}),Object(de.useEffect)(function(){function K(){B.current()}if(I!==null){var W=setInterval(K,I);return function(){return clearInterval(W)}}},[I])}},"A60/":function(ft,Xe,G){ft.exports={wrap:"wrap___37dvp",right20:"right20___2yZBe",right180:"right180___14fSn",basket:"basket___32ZdA",count:"count___2ydNT",iconWrap:"iconWrap___2cEp5",icon:"icon___3fYs3",name:"name___7IPYm"}},BU3w:function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return B});var de=G("MNnm"),Z="rc-util-key";function M(K){if(K.attachTo)return K.attachTo;var W=document.querySelector("head");return W||document.body}function V(K){var W,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(de.a)())return null;var P=document.createElement("style");if((W=L.csp)===null||W===void 0?void 0:W.nonce){var b;P.nonce=(b=L.csp)===null||b===void 0?void 0:b.nonce}P.innerHTML=K;var p=M(L),_=p.firstChild;return L.prepend&&p.prepend?p.prepend(P):L.prepend&&_?p.insertBefore(P,_):p.appendChild(P),P}var I=new Map;function B(K,W){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=M(L);if(!I.has(P)){var b=V("",L),p=b.parentNode;I.set(P,p),p.removeChild(b)}var _=Array.from(I.get(P).children).find(function(a){return a.tagName==="STYLE"&&a[Z]===W});if(_){var h,r;if(((h=L.csp)===null||h===void 0?void 0:h.nonce)&&_.nonce!==((r=L.csp)===null||r===void 0?void 0:r.nonce)){var d;_.nonce=(d=L.csp)===null||d===void 0?void 0:d.nonce}return _.innerHTML!==K&&(_.innerHTML=K),_}var l=V(K,L);return l[Z]=W,l}},Bd2K:function(ft,Xe,G){(function(de){de(G("VrN/"),G("osHv"))})(function(de){de.defineOption("autoCloseTags",!1,function(L,P,b){if(b!=de.Init&&b&&L.removeKeyMap("autoCloseTags"),!P)return;var p={name:"autoCloseTags"};(typeof P!="object"||P.whenClosing!==!1)&&(p["'/'"]=function(_){return B(_)}),(typeof P!="object"||P.whenOpening!==!1)&&(p["'>'"]=function(_){return V(_)}),L.addKeyMap(p)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=["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 V(L){if(L.getOption("disableInput"))return de.Pass;for(var P=L.listSelections(),b=[],p=L.getOption("autoCloseTags"),_=0;_h.ch&&(u=u.slice(0,u.length-r.end+h.ch));var T=u.toLowerCase();if(!u||r.type=="string"&&(r.end!=h.ch||!/[\"\']/.test(r.string.charAt(r.string.length-1))||r.string.length==1)||r.type=="tag"&&a.close||r.string.indexOf("/")==h.ch-r.start-1||R&&K(R,T)>-1||W(L,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(l)||[],u,h,!0))return de.Pass;var A=typeof p=="object"&&p.emptyTags;if(A&&K(A,u)>-1){b[_]={text:"/>",newPos:de.Pos(h.line,h.ch+2)};continue}var w=O&&K(O,T)>-1;b[_]={indent:w,text:">"+(w?`
`:"")+""+u+">",newPos:w?de.Pos(h.line+1,0):de.Pos(h.line,h.ch+1)}}for(var m=typeof p=="object"&&p.dontIndentOnAutoClose,_=P.length-1;_>=0;_--){var v=b[_];L.replaceRange(v.text,P[_].head,P[_].anchor,"+insert");var s=L.listSelections().slice(0);s[_]={head:v.newPos,anchor:v.newPos},L.setSelections(s),!m&&v.indent&&(L.indentLine(v.newPos.line,null,!0),L.indentLine(v.newPos.line+1,null,!0))}}function I(L,P){for(var b=L.listSelections(),p=[],_=P?"/":"",h=L.getOption("autoCloseTags"),r=typeof h=="object"&&h.dontIndentOnSlash,d=0;d"&&(R+=">"),p[d]=R}if(L.replaceSelections(p),b=L.listSelections(),!r)for(var d=0;d=0&&P[l]==b;l--)++d;p=r.to;for(var l=1;l0){for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"",P=[],b=0;bbe.length)&&(xe=be.length);for(var pe=0,se=new Array(xe);pe=be.length?{done:!0}:{done:!1,value:be[se++]}}}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 pe=be[Symbol.iterator](),pe.next.bind(pe)}function B(be,xe){return xe={exports:{}},be(xe,xe.exports),xe.exports}var K=B(function(be){function xe(){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 pe(se){be.exports.defaults=se}be.exports={defaults:xe(),getDefaults:xe,changeDefaults:pe}}),W=K.defaults,L=K.getDefaults,P=K.changeDefaults,b=/[&<>"']/,p=/[&<>"']/g,_=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(xe){return r[xe]};function l(be,xe){if(xe){if(b.test(be))return be.replace(p,d)}else if(_.test(be))return be.replace(h,d);return be}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(be){return be.replace(a,function(xe,pe){return pe=pe.toLowerCase(),pe==="colon"?":":pe.charAt(0)==="#"?pe.charAt(1)==="x"?String.fromCharCode(parseInt(pe.substring(2),16)):String.fromCharCode(+pe.substring(1)):""})}var c=/(^|[^\[])\^/g;function R(be,xe){be=be.source||be,xe=xe||"";var pe={replace:function(ce,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(c,"$1"),be=be.replace(ce,Ee),pe},getRegex:function(){return new RegExp(be,xe)}};return pe}var O=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(be,xe,pe){if(be){var se;try{se=decodeURIComponent(u(pe)).replace(O,"").toLowerCase()}catch(ce){return null}if(se.indexOf("javascript:")===0||se.indexOf("vbscript:")===0||se.indexOf("data:")===0)return null}xe&&!T.test(pe)&&(pe=o(xe,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(ce){return null}return pe}var w={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(be,xe){w[" "+be]||(m.test(be)?w[" "+be]=be+"/":w[" "+be]=N(be,"/",!0)),be=w[" "+be];var pe=be.indexOf(":")===-1;return xe.substring(0,2)==="//"?pe?xe:be.replace(v,"$1")+xe:xe.charAt(0)==="/"?pe?xe:be.replace(s,"$1")+xe:be+xe}var E={exec:function(){}};function g(be){for(var xe=1,pe,se;xe=0&&De[lt]==="\\";)$e=!$e;return $e?"|":" |"}),se=pe.split(/ \|/),ce=0;if(se.length>xe)se.splice(xe);else for(;se.length=se.length?ce.slice(se.length):ce}).join(`
`)}var fe=function(){function be(pe){this.options=pe||y}var xe=be.prototype;return xe.space=function(se){var ce=this.rules.block.newline.exec(se);if(ce)return ce[0].length>1?{type:"space",raw:ce[0]}:{raw:`
`}},xe.code=function(se,ce){var Ee=this.rules.block.code.exec(se);if(Ee){var Ae=ce[ce.length-1];if(Ae&&Ae.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var De=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?De:x(De,`
`)}}},xe.fences=function(se){var ce=this.rules.block.fences.exec(se);if(ce){var Ee=ce[0],Ae=ge(Ee,ce[3]||"");return{type:"code",raw:Ee,lang:ce[2]?ce[2].trim():ce[2],text:Ae}}},xe.heading=function(se){var ce=this.rules.block.heading.exec(se);if(ce)return{type:"heading",raw:ce[0],depth:ce[1].length,text:ce[2]}},xe.nptable=function(se){var ce=this.rules.block.nptable.exec(se);if(ce){var Ee={type:"table",header:F(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
`):[],raw:ce[0]};if(Ee.header.length===Ee.align.length){var Ae=Ee.align.length,De;for(De=0;De ?/gm,"");return{type:"blockquote",raw:ce[0],text:Ee}}},xe.list=function(se){var ce=this.rules.block.list.exec(se);if(ce){for(var Ee=ce[0],Ae=ce[2],De=Ae.length>1,$e=Ae[Ae.length-1]===")",lt={type:"list",raw:Ee,ordered:De,start:De?+Ae.slice(0,-1):"",loose:!1,items:[]},Bt=ce[0].match(this.rules.block.item),tn=!1,nn,_n,yn,Gt,ii,Dn,Ci,fi=Bt.length,In=0;In1||this.options.smartLists&&yn!==Ae)&&(Gt=Bt.slice(In+1).join(`
`),lt.raw=lt.raw.substring(0,lt.raw.length-Gt.length),In=fi-1)),ii=tn||/\n\n(?!\s*$)/.test(nn),In!==fi-1&&(tn=nn.charAt(nn.length-1)===`
`,ii||(ii=tn)),ii&&(lt.loose=!0),Dn=/^\[[ xX]\] /.test(nn),Ci=void 0,Dn&&(Ci=nn[1]!==" ",nn=nn.replace(/^\[[ xX]\] +/,"")),lt.items.push({type:"list_item",raw:Ee,task:Dn,checked:Ci,loose:ii,text:nn});return lt}},xe.html=function(se){var ce=this.rules.block.html.exec(se);if(ce)return{type:this.options.sanitize?"paragraph":"html",raw:ce[0],pre:!this.options.sanitizer&&(ce[1]==="pre"||ce[1]==="script"||ce[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):Q(ce[0]):ce[0]}},xe.def=function(se){var ce=this.rules.block.def.exec(se);if(ce){ce[3]&&(ce[3]=ce[3].substring(1,ce[3].length-1));var Ee=ce[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ce[0],href:ce[2],title:ce[3]}}},xe.table=function(se){var ce=this.rules.block.table.exec(se);if(ce){var Ee={type:"table",header:F(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ce[0];var Ae=Ee.align.length,De;for(De=0;De/i.test(Ae[0])&&(ce=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ae[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ae[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Ae[0],inLink:ce,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):Q(Ae[0]):Ae[0]}},xe.link=function(se){var ce=this.rules.inline.link.exec(se);if(ce){var Ee=q(ce[2],"()");if(Ee>-1){var Ae=ce[0].indexOf("!")===0?5:4,De=Ae+ce[1].length+Ee;ce[2]=ce[2].substring(0,Ee),ce[0]=ce[0].substring(0,De).trim(),ce[3]=""}var $e=ce[2],lt="";if(this.options.pedantic){var Bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);Bt?($e=Bt[1],lt=Bt[3]):lt=""}else lt=ce[3]?ce[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var tn=ie(ce,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:lt&<.replace(this.rules.inline._escapes,"$1")},ce[0]);return tn}},xe.reflink=function(se,ce){var Ee;if((Ee=this.rules.inline.reflink.exec(se))||(Ee=this.rules.inline.nolink.exec(se))){var Ae=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Ae=ce[Ae.toLowerCase()],!Ae||!Ae.href){var De=Ee[0].charAt(0);return{type:"text",raw:De,text:De}}var $e=ie(Ee,Ae,Ee[0]);return $e}},xe.strong=function(se,ce,Ee){Ee===void 0&&(Ee="");var Ae=this.rules.inline.strong.start.exec(se);if(Ae&&(!Ae[1]||Ae[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ce=ce.slice(-1*se.length);var De=Ae[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;De.lastIndex=0;for(var $e;(Ae=De.exec(ce))!=null;)if($e=this.rules.inline.strong.middle.exec(ce.slice(0,Ae.index+3)),$e)return{type:"strong",raw:se.slice(0,$e[0].length),text:se.slice(2,$e[0].length-2)}}},xe.em=function(se,ce,Ee){Ee===void 0&&(Ee="");var Ae=this.rules.inline.em.start.exec(se);if(Ae&&(!Ae[1]||Ae[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ce=ce.slice(-1*se.length);var De=Ae[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;De.lastIndex=0;for(var $e;(Ae=De.exec(ce))!=null;)if($e=this.rules.inline.em.middle.exec(ce.slice(0,Ae.index+2)),$e)return{type:"em",raw:se.slice(0,$e[0].length),text:se.slice(1,$e[0].length-1)}}},xe.codespan=function(se){var ce=this.rules.inline.code.exec(se);if(ce){var Ee=ce[2].replace(/\n/g," "),Ae=/[^ ]/.test(Ee),De=Ee.startsWith(" ")&&Ee.endsWith(" ");return Ae&&De&&(Ee=Ee.substring(1,Ee.length-1)),Ee=Q(Ee,!0),{type:"codespan",raw:ce[0],text:Ee}}},xe.br=function(se){var ce=this.rules.inline.br.exec(se);if(ce)return{type:"br",raw:ce[0]}},xe.del=function(se){var ce=this.rules.inline.del.exec(se);if(ce)return{type:"del",raw:ce[0],text:ce[1]}},xe.autolink=function(se,ce){var Ee=this.rules.inline.autolink.exec(se);if(Ee){var Ae,De;return Ee[2]==="@"?(Ae=Q(this.options.mangle?ce(Ee[1]):Ee[1]),De="mailto:"+Ae):(Ae=Q(Ee[1]),De=Ae),{type:"link",raw:Ee[0],text:Ae,href:De,tokens:[{type:"text",raw:Ae,text:Ae}]}}},xe.url=function(se,ce){var Ee;if(Ee=this.rules.inline.url.exec(se)){var Ae,De;if(Ee[2]==="@")Ae=Q(this.options.mangle?ce(Ee[0]):Ee[0]),De="mailto:"+Ae;else{var $e;do $e=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while($e!==Ee[0]);Ae=Q(Ee[0]),Ee[1]==="www."?De="http://"+Ae:De=Ae}return{type:"link",raw:Ee[0],text:Ae,href:De,tokens:[{type:"text",raw:Ae,text:Ae}]}}},xe.inlineText=function(se,ce,Ee){var Ae=this.rules.inline.text.exec(se);if(Ae){var De;return ce?De=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):Q(Ae[0]):Ae[0]:De=Q(this.options.smartypants?Ee(Ae[0]):Ae[0]),{type:"text",raw:Ae[0],text:De}}},be}(),ue=H.noopTest,he=H.edit,_e=H.merge,le={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:ue,table:ue,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};le._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,le._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,le.def=he(le.def).replace("label",le._label).replace("title",le._title).getRegex(),le.bullet=/(?:[*+-]|\d{1,9}[.)])/,le.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,le.item=he(le.item,"gm").replace(/bull/g,le.bullet).getRegex(),le.list=he(le.list).replace(/bull/g,le.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+le.def.source+")").getRegex(),le._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",le._comment=//,le.html=he(le.html,"i").replace("comment",le._comment).replace("tag",le._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),le.paragraph=he(le._paragraph).replace("hr",le.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",le._tag).getRegex(),le.blockquote=he(le.blockquote).replace("paragraph",le.paragraph).getRegex(),le.normal=_e({},le),le.gfm=_e({},le.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*|$)"}),le.gfm.nptable=he(le.gfm.nptable).replace("hr",le.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",le._tag).getRegex(),le.gfm.table=he(le.gfm.table).replace("hr",le.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",le._tag).getRegex(),le.pedantic=_e({},le.normal,{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",le._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:ue,paragraph:he(le.normal._paragraph).replace("hr",le.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",le.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ne={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ue,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:ue,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ne.punctuation=he(ne.punctuation).replace(/punctuation/g,ne._punctuation).getRegex(),ne._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ne._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ne.em.start=he(ne.em.start).replace(/punctuation/g,ne._punctuation).getRegex(),ne.em.middle=he(ne.em.middle).replace(/punctuation/g,ne._punctuation).replace(/overlapSkip/g,ne._overlapSkip).getRegex(),ne.em.endAst=he(ne.em.endAst,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.em.endUnd=he(ne.em.endUnd,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.start=he(ne.strong.start).replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.middle=he(ne.strong.middle).replace(/punctuation/g,ne._punctuation).replace(/blockSkip/g,ne._blockSkip).getRegex(),ne.strong.endAst=he(ne.strong.endAst,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.endUnd=he(ne.strong.endUnd,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.blockSkip=he(ne._blockSkip,"g").getRegex(),ne.overlapSkip=he(ne._overlapSkip,"g").getRegex(),ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ne._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])?)+(?![-_])/,ne.autolink=he(ne.autolink).replace("scheme",ne._scheme).replace("email",ne._email).getRegex(),ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ne.tag=he(ne.tag).replace("comment",le._comment).replace("attribute",ne._attribute).getRegex(),ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ne._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ne.link=he(ne.link).replace("label",ne._label).replace("href",ne._href).replace("title",ne._title).getRegex(),ne.reflink=he(ne.reflink).replace("label",ne._label).getRegex(),ne.reflinkSearch=he(ne.reflinkSearch,"g").replace("reflink",ne.reflink).replace("nolink",ne.nolink).getRegex(),ne.normal=_e({},ne),ne.pedantic=_e({},ne.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:he(/^!?\[(label)\]\((.*?)\)/).replace("label",ne._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne._label).getRegex()}),ne.gfm=_e({},ne.normal,{escape:he(ne.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&&(se="x"+se.toString(16)),xe+=""+se+";";return xe}var Be=function(){function be(pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=pe||Fe,this.options.tokenizer=this.options.tokenizer||new fe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var se={block:Ke.normal,inline:Ue.normal};this.options.pedantic?(se.block=Ke.pedantic,se.inline=Ue.pedantic):this.options.gfm&&(se.block=Ke.gfm,this.options.breaks?se.inline=Ue.breaks:se.inline=Ue.gfm),this.tokenizer.rules=se}be.lex=function(se,ce){var Ee=new be(ce);return Ee.lex(se)};var xe=be.prototype;return xe.lex=function(se){return se=se.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(se,this.tokens,!0),this.inline(this.tokens),this.tokens},xe.blockTokens=function(se,ce,Ee){ce===void 0&&(ce=[]),Ee===void 0&&(Ee=!0),se=se.replace(/^ +$/gm,"");for(var Ae,De,$e,lt;se;){if(Ae=this.tokenizer.space(se)){se=se.substring(Ae.raw.length),Ae.type&&ce.push(Ae);continue}if(Ae=this.tokenizer.code(se,ce)){se=se.substring(Ae.raw.length),Ae.type?ce.push(Ae):(lt=ce[ce.length-1],lt.raw+=`
`+Ae.raw,lt.text+=`
`+Ae.text);continue}if(Ae=this.tokenizer.fences(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.heading(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.nptable(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.hr(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.blockquote(se)){se=se.substring(Ae.raw.length),Ae.tokens=this.blockTokens(Ae.text,[],Ee),ce.push(Ae);continue}if(Ae=this.tokenizer.list(se)){for(se=se.substring(Ae.raw.length),$e=Ae.items.length,De=0;De<$e;De++)Ae.items[De].tokens=this.blockTokens(Ae.items[De].text,[],!1);ce.push(Ae);continue}if(Ae=this.tokenizer.html(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ee&&(Ae=this.tokenizer.def(se))){se=se.substring(Ae.raw.length),this.tokens.links[Ae.tag]||(this.tokens.links[Ae.tag]={href:Ae.href,title:Ae.title});continue}if(Ae=this.tokenizer.table(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.lheading(se)){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ee&&(Ae=this.tokenizer.paragraph(se))){se=se.substring(Ae.raw.length),ce.push(Ae);continue}if(Ae=this.tokenizer.text(se,ce)){se=se.substring(Ae.raw.length),Ae.type?ce.push(Ae):(lt=ce[ce.length-1],lt.raw+=`
`+Ae.raw,lt.text+=`
`+Ae.text);continue}if(se){var Bt="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return ce},xe.inline=function(se){var ce,Ee,Ae,De,$e,lt,Bt=se.length;for(ce=0;ce0)for(;(Bt=this.tokenizer.rules.inline.reflinkSearch.exec(lt))!=null;)tn.includes(Bt[0].slice(Bt[0].lastIndexOf("[")+1,-1))&&(lt=lt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+lt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Bt=this.tokenizer.rules.inline.blockSkip.exec(lt))!=null;)lt=lt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+lt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;se;){if($e=this.tokenizer.escape(se)){se=se.substring($e.raw.length),ce.push($e);continue}if($e=this.tokenizer.tag(se,Ee,Ae)){se=se.substring($e.raw.length),Ee=$e.inLink,Ae=$e.inRawBlock,ce.push($e);continue}if($e=this.tokenizer.link(se)){se=se.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ae)),ce.push($e);continue}if($e=this.tokenizer.reflink(se,this.tokens.links)){se=se.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ae)),ce.push($e);continue}if($e=this.tokenizer.strong(se,lt,De)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Ae),ce.push($e);continue}if($e=this.tokenizer.em(se,lt,De)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Ae),ce.push($e);continue}if($e=this.tokenizer.codespan(se)){se=se.substring($e.raw.length),ce.push($e);continue}if($e=this.tokenizer.br(se)){se=se.substring($e.raw.length),ce.push($e);continue}if($e=this.tokenizer.del(se)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Ae),ce.push($e);continue}if($e=this.tokenizer.autolink(se,Ne)){se=se.substring($e.raw.length),ce.push($e);continue}if(!Ee&&($e=this.tokenizer.url(se,Ne))){se=se.substring($e.raw.length),ce.push($e);continue}if($e=this.tokenizer.inlineText(se,Ae,He)){se=se.substring($e.raw.length),De=$e.raw.slice(-1),ce.push($e);continue}if(se){var nn="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(nn);break}else throw new Error(nn)}}return ce},Z(be,null,[{key:"rules",get:function(){return{block:Ke,inline:Ue}}}]),be}(),Je=K.defaults,tt=H.cleanUrl,it=H.escape,rt=function(){function be(pe){this.options=pe||Je}var xe=be.prototype;return xe.code=function(se,ce,Ee){var Ae=(ce||"").match(/\S*/)[0];if(this.options.highlight){var De=this.options.highlight(se,Ae);De!=null&&De!==se&&(Ee=!0,se=De)}return Ae?''+(Ee?se:it(se,!0))+`
`:""+(Ee?se:it(se,!0))+`
`},xe.blockquote=function(se){return`
`+se+`
`},xe.html=function(se){return se},xe.heading=function(se,ce,Ee,Ae){return this.options.headerIds?"
`:""+se+"
`},xe.hr=function(){return this.options.xhtml?`
`:`
`},xe.list=function(se,ce,Ee){var Ae=ce?"ol":"ul",De=ce&&Ee!==1?' start="'+Ee+'"':"";return"<"+Ae+De+`>
`+se+""+Ae+`>
`},xe.listitem=function(se){return""+se+`
`},xe.checkbox=function(se){return" "},xe.paragraph=function(se){return""+se+`
`},xe.table=function(se,ce){return ce&&(ce=""+ce+""),`
`},xe.tablerow=function(se){return`
`+se+`
`},xe.tablecell=function(se,ce){var Ee=ce.header?"th":"td",Ae=ce.align?"<"+Ee+' align="'+ce.align+'">':"<"+Ee+">";return Ae+se+""+Ee+`>
`},xe.strong=function(se){return""+se+""},xe.em=function(se){return""+se+""},xe.codespan=function(se){return""+se+""},xe.br=function(){return this.options.xhtml?"
":"
"},xe.del=function(se){return""+se+""},xe.link=function(se,ce,Ee){if(se=tt(this.options.sanitize,this.options.baseUrl,se),se===null)return Ee;var Ae='"+Ee+"",Ae},xe.image=function(se,ce,Ee){if(se=tt(this.options.sanitize,this.options.baseUrl,se),se===null)return Ee;var Ae='
":">",Ae},xe.text=function(se){return se},be}(),qe=function(){function be(){}var xe=be.prototype;return xe.strong=function(se){return se},xe.em=function(se){return se},xe.codespan=function(se){return se},xe.del=function(se){return se},xe.html=function(se){return se},xe.text=function(se){return se},xe.link=function(se,ce,Ee){return""+Ee},xe.image=function(se,ce,Ee){return""+Ee},xe.br=function(){return""},be}(),gt=function(){function be(){this.seen={}}var xe=be.prototype;return xe.slug=function(se){var ce=se.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ce)){var Ee=ce;do this.seen[Ee]++,ce=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ce))}return this.seen[ce]=0,ce},be}(),pt=K.defaults,vt=H.unescape,at=function(){function be(pe){this.options=pe||pt,this.options.renderer=this.options.renderer||new rt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new qe,this.slugger=new gt}be.parse=function(se,ce){var Ee=new be(ce);return Ee.parse(se)};var xe=be.prototype;return xe.parse=function(se,ce){ce===void 0&&(ce=!0);var Ee="",Ae,De,$e,lt,Bt,tn,nn,_n,yn,Gt,ii,Dn,Ci,fi,In,Ri,Si,Ot,bn=se.length;for(Ae=0;Ae0&&In.tokens[0].type==="text"?(In.tokens[0].text=Ot+" "+In.tokens[0].text,In.tokens[0].tokens&&In.tokens[0].tokens.length>0&&In.tokens[0].tokens[0].type==="text"&&(In.tokens[0].tokens[0].text=Ot+" "+In.tokens[0].tokens[0].text)):In.tokens.unshift({type:"text",text:Ot}):fi+=Ot),fi+=this.parse(In.tokens,Ci),yn+=this.renderer.listitem(fi,Si,Ri);Ee+=this.renderer.list(yn,ii,Dn);continue}case"html":{Ee+=this.renderer.html(Gt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(Gt.tokens));continue}case"text":{for(yn=Gt.tokens?this.parseInline(Gt.tokens):Gt.text;Ae+1An error occurred:
"+Tt($e.message+"",!0)+"
";throw $e}}ze.options=ze.setOptions=function(be){return Rt(ze.defaults,be),Mt(ze.defaults),ze},ze.getDefaults=Ye,ze.defaults=St,ze.use=function(be){var xe=Rt({},be);if(be.renderer&&function(){var se=ze.defaults.renderer||new rt,ce=function(De){var $e=se[De];se[De]=function(){for(var lt=arguments.length,Bt=new Array(lt),tn=0;tn-1?c[ue]:"",_e="";m.choices.map(function(Fe,Ke){Fe.is_answer&&(_e+=c[Ke])});var le=fe[m.item_type],ne={SINGLE:p.a.createElement(_.a,{className:r.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(he||"\u65E0")}),MULTIPLE:p.a.createElement(_.a,{className:r.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(_e||"\u65E0")}),COMPLETION:y()},Te=p.a.createElement(_.a,{className:r.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(le||"\u65E0")});return ne[m.item_type]||Te},F=function(q){var ie=Object(K.a)(v);q.target.checked?ie.push(m.id):ie=ie.filter(function(ge){return ge!==m.id}),o(ie)};return p.a.createElement("div",{className:r.a.itemWrap},p.a.createElement("div",{className:r.a.list},g&&p.a.createElement(B.a,{className:"mr10",onChange:F,checked:v.includes(m.id)}),p.a.createElement("div",{className:r.a.title},p.a.createElement(_.a,{key:1,showLines:1,showTextOnly:!0,className:r.a.topicTitleContent,value:m.name})),p.a.createElement("div",{className:r.a.line},p.a.createElement("b",{className:r.a.b1}),p.a.createElement("b",{className:r.a.b2})),p.a.createElement("div",{onClick:function(){return j(!U)},className:r.a.tr},U?"\u6536\u8D77":"\u5C55\u5F00",p.a.createElement("i",{style:{transform:U?"scale(0.5) rotate(-180deg)":"scale(0.5) rotate(0deg)"},className:"iconfont icon-zhankai4"}))),p.a.createElement("aside",{style:U?{display:"block"}:{display:"none"},className:r.a.itemDetail},p.a.createElement("div",{style:{marginBottom:44}},p.a.createElement(_.a,{key:2,className:r.a.topicTitleContent,value:m.name}),p.a.createElement("div",{className:"".concat(r.a.row," mt15")},H()),p.a.createElement("div",{className:r.a.row},p.a.createElement("div",{className:r.a.updateTimeRow},p.a.createElement("div",{className:r.a.updateTimeWrap},m.item_type==="PROGRAM"&&p.a.createElement("p",{className:r.a.programLanguage},"\u7F16\u7A0B\u8BED\u8A00\uFF1A",(w=m.program_attr)===null||w===void 0?void 0:w.language))))),m.item_type!=="PROGRAM"&&m.item_type!=="COMBINATION"&&p.a.createElement("div",{className:r.a.answerWrapper},p.a.createElement("img",{src:a.a,alt:"",className:r.a.decoration}),p.a.createElement("div",{className:r.a.answer},x()),p.a.createElement("div",{className:r.a.parse},p.a.createElement("div",{className:r.a.parseText},"\u89E3\u6790\uFF1A"),p.a.createElement("div",{className:r.a.parseAnswer},m.analysis?p.a.createElement(_.a,{className:r.a.parseAnswerHtml,value:m.analysis}):"\u6682\u65E0\u89E3\u6790")))))},O=function(A){var w,m,v,s,o,E,g,C,N,U,j,H,y,x,F,Q,q=A.isProblemset,ie=A.data,ge=A.user,fe=A.activeTabsKey,ue=A.onPublicReview,he=ue===void 0?function(){}:ue,_e=A.onStartExperience,le=_e===void 0?function(){}:_e,ne=A.onSetPrivate,Te=ne===void 0?function(){}:ne,Fe=A.onCorrection,Ke=Fe===void 0?function(){}:Fe,Ue=A.onCollect,He=Ue===void 0?function(){}:Ue,Ne=A.onSetPublic,Be=Ne===void 0?function(){}:Ne,Je=A.onDelete,tt=Je===void 0?function(){}:Je,it=A.onCancel,rt=it===void 0?function(){}:it,qe=A.onSelect,gt=qe===void 0?function(){}:qe,pt=A.onMoveTo,vt=pt===void 0?function(){}:pt,at=A.onSetShare,Rt=at===void 0?function(){}:at,xt=A.onCancelShare,Tt=xt===void 0?function(){}:xt,Ye=A.onPublish,Mt=Ye===void 0?function(){}:Ye,St=A.onCancelPublish,ze=St===void 0?function(){}:St,ut=ie.item_type==="PROGRAM"?"/problems/".concat((w=ie.program_attr)===null||w===void 0?void 0:w.identifier,"/edit"):"/problemset/edit/".concat(ie.id),be=fe==="0"&&!ie.public&&!ie.apply&&(ie.item_type==="PROGRAM"&&((m=ie.program_attr)===null||m===void 0?void 0:m.status)!==0||ie.item_type!=="PROGRAM"),xe=p.a.createElement(V.a,{forceSubMenuRender:!0,className:r.a.menu},fe==="0"&&!ie.public&&p.a.createElement(V.a.Item,{key:"-1"},p.a.createElement("a",{className:r.a.actionLink,target:"_blank",href:ut},"\u7F16\u8F91")),(fe==="0"||fe==="3")&&ie.item_type==="PROGRAM"&&((v=ie.program_attr)===null||v===void 0?void 0:v.status)!==0&&!ie.public&&((s=ie.author)===null||s===void 0?void 0:s.login)===((o=ge.userInfo)===null||o===void 0?void 0:o.login)&&p.a.createElement(V.a.Item,{key:"0"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){var Ee;return ze(ie==null||((Ee=ie.program_attr)===null||Ee===void 0)?void 0:Ee.identifier)}},"\u64A4\u9500\u53D1\u5E03")),fe==="0"&&p.a.createElement(V.a.Item,{key:"1"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return vt(ie.id)}},"\u79FB\u52A8\u5230")),fe==="0"&&!(ie!=null&&ie.is_share)&&p.a.createElement(V.a.Item,{key:"3"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Rt(ie.id)}},"\u5171\u4EAB")),(fe==="0"&&(ie==null?void 0:ie.is_share)||fe==="3"&&((E=ie.author)===null||E===void 0?void 0:E.login)===((g=ge.userInfo)===null||g===void 0?void 0:g.login))&&p.a.createElement(V.a.Item,{key:"3"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Tt(ie.id)}},"\u64A4\u9500\u5171\u4EAB")),be&&p.a.createElement(V.a.Item,{key:"4"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Be(ie.id)}},"\u516C\u5F00")),fe==="0"&&!ie.public&&ie.apply&&(ie.item_type==="PROGRAM"&&ie.program_attr.status!==0||ie.item_type!=="PROGRAM")&&p.a.createElement(V.a.Item,{key:"5"},p.a.createElement("a",{className:r.a.reviewFlag,onClick:he},"\u5BA1\u6838\u4E2D")),(fe==="0"||fe==="1")&&ie.public&&((C=ie.author)===null||C===void 0?void 0:C.login)===((N=ge.userInfo)===null||N===void 0?void 0:N.login)&&p.a.createElement(V.a.Item,{key:"6"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Te(ie.id)}},"\u64A4\u9500\u516C\u5F00")),fe==="2"&&p.a.createElement(V.a.Item,{key:"7"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return He(ie.id,ie.is_collected)}},"\u53D6\u6D88\u6536\u85CF")),(fe==="0"||fe==="3")&&ie.item_type==="PROGRAM"&&((U=ie.program_attr)===null||U===void 0?void 0:U.status)===0&&!ie.public&&((j=ie.author)===null||j===void 0?void 0:j.login)===((H=ge.userInfo)===null||H===void 0?void 0:H.login)&&p.a.createElement(V.a.Item,{key:"8"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){var Ee;return Mt(ie==null||((Ee=ie.program_attr)===null||Ee===void 0)?void 0:Ee.identifier)}},"\u53D1\u5E03")),(fe==="1"||fe==="3")&&!Object(d.o)()&&!Object(d.m)()&&((y=ie.author)===null||y===void 0?void 0:y.login)!==((x=ge.userInfo)===null||x===void 0?void 0:x.login)&&p.a.createElement(V.a.Item,{key:"9"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return He(ie.id,ie.is_collected)}},ie.is_collected?"\u53D6\u6D88\u6536\u85CF":"\u6536\u85CF")),fe!=="0"&&!Object(d.o)()&&!Object(d.m)()&&p.a.createElement(V.a.Item,{key:"10"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Ke(ie.id)}},"\u7EA0\u9519")),(fe==="0"&&!ie.public||fe==="1"&&Object(d.o)()&&((F=ie.author)===null||F===void 0?void 0:F.login)!==((Q=ge.userInfo)===null||Q===void 0?void 0:Q.login))&&p.a.createElement(V.a.Item,{key:"11"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return tt(ie.id)}},"\u5220\u9664"))),pe=p.a.createElement(V.a,{forceSubMenuRender:!0,className:r.a.menu},p.a.createElement(V.a.Item,{key:"10"},p.a.createElement("a",{className:r.a.actionLink,onClick:function(){return Ke(ie.id)}},"\u7EA0\u9519"))),se=fe!=="0"&&!Object(d.o)()&&!Object(d.m)();return p.a.createElement(p.a.Fragment,null,q?p.a.createElement(p.a.Fragment,null,ie.item_type!=="SUBJECTIVE"&&ie.item_type!=="COMBINATION"&&p.a.createElement("span",{className:r.a.textBtn,style:{cursor:"pointer"},onClick:function(){return le(ie)}},"\u4F53\u9A8C"),p.a.createElement(Z.a,{overlay:xe},p.a.createElement("span",{style:{cursor:"default"},onClick:function(Ee){return Ee.preventDefault()}},p.a.createElement("span",{className:r.a.textBtn},"\u66F4\u591A")))):se?p.a.createElement(Z.a,{className:"ml40",overlay:pe},p.a.createElement("span",{style:{cursor:"default"},onClick:function(Ee){return Ee.preventDefault()}},p.a.createElement("span",null,"\u66F4\u591A"))):p.a.createElement("span",null))};Xe.b=R},ELLl:function(ft,Xe,G){(function(de){de(G("VrN/"))})(function(de){var Z={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},M=de.Pos;de.defineOption("autoCloseBrackets",!1,function(r,d,l){l&&l!=de.Init&&(r.removeKeyMap(I),r.state.closeBrackets=null),d&&(B(V(d,"pairs")),r.state.closeBrackets=d,r.addKeyMap(I))});function V(r,d){return d=="pairs"&&typeof r=="string"?r:typeof r=="object"&&r[d]!=null?r[d]:Z[d]}var I={Backspace:L,Enter:P};function B(r){for(var d=0;d=0;u--){var R=a[u].head;r.replaceRange("",M(R.line,R.ch-1),M(R.line,R.ch+1),"+delete")}}function P(r){var d=W(r),l=d&&V(d,"explode");if(!l||r.getOption("disableInput"))return de.Pass;for(var a=r.listSelections(),u=0;u0;return{anchor:new M(r.anchor.line,r.anchor.ch+(d?-1:1)),head:new M(r.head.line,r.head.ch+(d?1:-1))}}function p(r,d){var l=W(r);if(!l||r.getOption("disableInput"))return de.Pass;var a=V(l,"pairs"),u=a.indexOf(d);if(u==-1)return de.Pass;for(var c=V(l,"closeBefore"),R=V(l,"triples"),O=a.charAt(u+1)==d,T=r.listSelections(),A=u%2==0,w,m=0;m=0&&r.getRange(s,M(s.line,s.ch+3))==d+d+d?o="skipThree":o="skip";else if(O&&s.ch>1&&R.indexOf(d)>=0&&r.getRange(M(s.line,s.ch-2),s)==d+d){if(s.ch>2&&/\bstring/.test(r.getTokenTypeAt(M(s.line,s.ch-2))))return de.Pass;o="addFour"}else if(O){var g=s.ch==0?" ":r.getRange(M(s.line,s.ch-1),s);if(!de.isWordChar(E)&&g!=d&&!de.isWordChar(g))o="both";else return de.Pass}else if(A&&(E.length===0||/\s/.test(E)||c.indexOf(E)>-1))o="both";else return de.Pass;if(!w)w=o;else if(w!=o)return de.Pass}var C=u%2?a.charAt(u-1):d,N=u%2?d:a.charAt(u+1);r.operation(function(){if(w=="skip")r.execCommand("goCharRight");else if(w=="skipThree")for(var U=0;U<3;U++)r.execCommand("goCharRight");else if(w=="surround"){for(var j=r.getSelections(),U=0;U0?Lt[0].callbacks.push(kt):De.push({element:dt,callbacks:[kt]}),{clear:function(){De=De.filter(function(sn){return sn.element!==dt})}}}},Bt=lt,tn=[{stateName:"single_questions_count",type:"SINGLE",typeName:"\u5355\u9009\u9898"},{stateName:"multiple_questions_count",type:"MULTIPLE",typeName:"\u591A\u9009\u9898"},{stateName:"judgement_questions_count",type:"JUDGMENT",typeName:"\u5224\u65AD\u9898"},{stateName:"completion_questions_count",type:"COMPLETION",typeName:"\u586B\u7A7A\u9898"},{stateName:"subjective_questions_count",type:"SUBJECTIVE",typeName:"\u7B80\u7B54\u9898"},{stateName:"program_questions_count",type:"PROGRAM",typeName:"\u7F16\u7A0B\u9898"},{stateName:"practical_questions_count",type:"PRACTICAL",typeName:"\u5B9E\u8BAD\u9898"},{stateName:"combination_questions_count",type:"COMBINATION",typeName:"\u7EC4\u5408\u9898"}],nn=function(dt){var kt=dt.visible,Lt=dt.basketData,Kt=dt.basketTotal,sn=dt.onClose,En=sn===void 0?function(){}:sn,wn=dt.onDelete,hn=wn===void 0?function(){}:wn,Ln=Object(H.useRef)(),zn=Object(H.useRef)();return Object(H.useEffect)(function(){return zn.current?(Kt>=0&&!Ln.current&&(Ln.current=Bt.init(zn.current,function(){En()})),function(){Ln.current&&Ln.current.clear()}):void 0},[zn.current]),y.a.createElement(ce.a,{className:Ae.a.drawerWrap,placement:"right",closable:!1,mask:!1,visible:kt,forceRender:!0,onClose:En},Kt>0?y.a.createElement("div",{style:{height:"100%"},ref:zn},y.a.createElement("div",{className:Ae.a.title},"\u8BD5\u9898\u7BEE"),tn.map(function(un){return Lt[un.stateName]>0&&y.a.createElement("div",{className:Ae.a.problemset,key:un.type},y.a.createElement("div",{className:Ae.a.content},un.typeName,"(",Lt[un.stateName],")"),y.a.createElement("div",{className:Ae.a.delete,onClick:function(){return hn(un.type)}},y.a.createElement("i",{className:"iconfont icon-shanchu1 ".concat(Ae.a.deleteIcon)})))}),y.a.createElement("div",{className:Ae.a.previewWrap},y.a.createElement("div",{className:Ae.a.preview,onClick:function(){return x.d.push("/problemset/preview")}},"\u8BD5\u5377\u9884\u89C8"))):y.a.createElement("div",{ref:zn},y.a.createElement(ie.a,{customText:"\u8BF7\u9009\u62E9\u8BD5\u9898\u8FDB\u884C\u7EC4\u5377"})))},_n={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",COMBINATION:"\u7EC4\u5408\u9898"},yn=function(dt){var kt,Lt,Kt=dt.problemset,sn=dt.globalSetting,En=dt.loading,wn=dt.dispatch,hn=dt.onReloadData,Ln=hn===void 0?function(){}:hn,zn=dt.onReloadBasketData,un=zn===void 0?function(){}:zn,Sn=Object(o.a)(dt,["problemset","globalSetting","loading","dispatch","onReloadData","onReloadBasketData"]),di=function(){var Nn=Object(v.a)(j.a.mark(function zt(){var An;return j.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:return Un.next=2,wn({type:"problemset/basketDelete",payload:Kt.actionTabs.params});case 2:An=Un.sent,wn({type:"problemset/setActionTabs",payload:{}}),An.status===0&&(Ln(),un());case 5:case"end":return Un.stop()}},zt)}));return function(){return Nn.apply(this,arguments)}}();return y.a.createElement(A.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Kt.actionTabs.key==="Problemset-BasketDelete",title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:En["problemset/handleDelete"],width:"442px",onOk:di,onCancel:function(){wn({type:"problemset/setActionTabs",payload:{}})}},y.a.createElement("div",{className:fe.a.modalContent},"\u662F\u5426\u5220\u9664\u8BD5\u9898\u7BEE\u4E2D",_n[(kt=Kt.actionTabs)===null||kt===void 0||((Lt=kt.params)===null||Lt===void 0)?void 0:Lt.type]))},Gt=Object(x.a)(function(Zt){var dt=Zt.problemset,kt=Zt.loading,Lt=Zt.globalSetting;return{problemset:dt,globalSetting:Lt,loading:kt.effects}})(yn),ii=G("A60/"),Dn=G.n(ii),Ci=function(dt){var kt=dt.count,Lt=dt.visibleBasket,Kt=dt.onToggleVisible,sn=Kt===void 0?function(){}:Kt;return y.a.createElement("div",{className:"".concat(Lt?Dn.a.right180:Dn.a.right20," ").concat(Dn.a.wrap)},y.a.createElement(h.a,{title:"\u8BD5\u9898\u7BEE",placement:"left"},y.a.createElement("div",{className:Dn.a.basket,onClick:sn},kt>0&&y.a.createElement("div",{className:Dn.a.count},kt),y.a.createElement("span",{className:Dn.a.iconWrap},y.a.createElement("i",{className:"".concat(Dn.a.icon," iconfont icon-shitilan")})),y.a.createElement("p",{className:Dn.a.name},"\u8BD5\u9898\u7BEE"))))},fi=G("EJTS"),In=G("LE3n"),Ri=G("1vsH"),Si=G("xKgJ"),Ot=G("/zsF"),bn=G("PArb"),Cn=G("jCWc"),kn=G("kPKH"),Ai=G("y8nQ"),Ui=G("Vl3Y"),dr=G("nSDg"),mn=G.n(dr),Jt=G("HBuW"),qi=G("NLgs"),hr=G("vkP9"),sr=g.a.Search,Fn={id:"type",name:"\u6765\u6E90",children:[{name:"\u5168\u90E8",id:"all",type:"type"},{name:"\u6211\u7684",id:"mine",type:"type"}]},er={id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]},kr=function(dt){var kt,Lt,Kt,sn,En=dt.classroomList,wn=dt.loading,hn=dt.dispatch,Ln=dt.cb,zn=dt.shixunIds,un=zn===void 0?[]:zn,Sn=Object(Je.i)(),di=Object(Je.h)(),Nn=En.actionTabs,zt=Ui.a.useForm(),An=Object(s.a)(zt,1),si=An[0],Un=En.shixunLists,Xt=Object(H.useState)([]),jt=Object(s.a)(Xt,2),pn=jt[0],Ct=jt[1],Nt=Object(H.useState)([]),Dt=Object(s.a)(Nt,2),Pe=Dt[0],Yt=Dt[1],xn=Object(H.useState)({page:1,type:"all",diff:0,status:"published",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null}),pi=Object(s.a)(xn,2),On=pi[0],tr=pi[1];Object(H.useEffect)(function(){En.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"&&hn({type:"classroomList/getShixunLists",payload:Object(m.a)({},On)})},[En.actionTabs.key]),Object(H.useEffect)(function(){return document.body.setAttribute("data-custom","height"),function(){document.body.removeAttribute("data-custom")}},[]),Object(H.useEffect)(function(){nr()},[Sn]);var nr=function(){var Ft=Object(v.a)(j.a.mark(function yi(){var li;return j.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(Jt.pb)({});case 2:li=ir.sent,Yt((li==null?void 0:li.disciplines)||[]);case 4:case"end":return ir.stop()}},yi)}));return function(){return Ft.apply(this,arguments)}}(),Fi=function(yi,li,$n){On.tag_level=yi,On.sub_discipline_id=li,On.discipline_id=$n,tr(Object(m.a)({},On)),hn({type:"classroomList/getShixunLists",payload:Object(m.a)({},On)})},Bn=function(){hn({type:"classroomList/setActionTabs",payload:{}}),tr({page:1,type:"all",diff:0,status:"published",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null})};return En.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:y.a.createElement(ce.a,{placement:"bottom",height:"100%",closable:!0,onClose:Bn,visible:En.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",className:mn.a.drawer,footer:y.a.createElement("div",{className:"tc"},y.a.createElement(P.a,{size:"large",onClick:function(){Bn(),Ct([])},style:{marginRight:8}},"\u53D6\u6D88"),y.a.createElement(P.a,{size:"large",onClick:Object(v.a)(j.a.mark(function Ft(){var yi,li,$n;return j.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:yi=function($t){var dn=pn[$t];if(un.includes(dn)){var Gn,Mn;return c.b.info("\u8BF7\u52FF\u91CD\u590D\u9009\u62E9\uFF1A".concat(Un==null||((Gn=Un.shixun_list)===null||Gn===void 0||((Mn=Gn.find(function(qn){return qn.id===dn}))===null||Mn===void 0))?void 0:Mn.title)),{v:void 0}}},li=0;case 2:if(!(li<(pn==null?void 0:pn.length))){Qt.next=9;break}if($n=yi(li),!(typeof $n=="object")){Qt.next=6;break}return Qt.abrupt("return",$n.v);case 6:li++,Qt.next=2;break;case 9:Bn(),Ln(pn),Ct([]);case 12:case"end":return Qt.stop()}},Ft)})),type:"primary"},"\u786E\u5B9A"))},y.a.createElement("section",{className:"tc"},y.a.createElement(hr.a,{onChange:function(yi){tr(Object(m.a)(Object(m.a)(Object(m.a)({},On),yi),{},{page:1})),hn({type:"classroomList/getShixunLists",payload:Object(m.a)(Object(m.a)(Object(m.a)({},On),yi),{},{page:1})})}})),y.a.createElement("section",{className:"edu-container"},y.a.createElement("ul",{className:mn.a.menu},y.a.createElement("li",null,Fn.name),Fn==null||((kt=Fn.children)===null||kt===void 0)?void 0:kt.map(function(Ft,yi){return y.a.createElement("li",{className:On[Fn.id]==Ft.id?mn.a.actived:"",key:Ft.id,onClick:function(){On[Fn.id]=Ft.id,tr(Object(m.a)({},On)),hn({type:"classroomList/getShixunLists",payload:Object(m.a)({},On)})}},y.a.createElement("strong",null,Ft.name))})),y.a.createElement("ul",{className:mn.a.menuDirection},y.a.createElement("li",{className:mn.a.directionName},"\u65B9\u5411"),y.a.createElement("li",{className:On.discipline_id?"":mn.a.actived,onClick:function(){Fi(null,null,null)}},y.a.createElement("strong",null,"\u5168\u90E8")),Pe==null?void 0:Pe.map(function(Ft,yi){return y.a.createElement("li",{key:yi,className:On.discipline_id==Ft.id?mn.a.actived:""},y.a.createElement("strong",{onClick:function(){Fi(1,null,Ft.id)}},Ft.name),y.a.createElement("div",null,Ft.sub_disciplines.map(function(li,$n){return y.a.createElement("div",{key:$n,className:"mt5"},y.a.createElement("div",{className:On.sub_discipline_id==li.id?"".concat(mn.a.actived2," ").concat(mn.a.subTag):mn.a.subTag,onClick:function(){Fi(2,li.id,Ft.id)}},li.name),y.a.createElement("ul",{className:"mt5"},li.tags&&li.tags.map(function(ir,Qt){return y.a.createElement("li",{key:Qt,className:On.sub_discipline_id==ir.id&&On.tag_level===3?mn.a.actived2:"",onClick:function(){Fi(3,ir.id,Ft.id)}},ir.name)})))})))})),y.a.createElement("ul",{className:mn.a.menu},y.a.createElement("li",null,er.name),er==null||((Lt=er.children)===null||Lt===void 0)?void 0:Lt.map(function(Ft,yi){return y.a.createElement("li",{className:On[er.id]==Ft.id?mn.a.actived:"",key:Ft.name,onClick:function(){On[er.id]=Ft.id,tr(Object(m.a)({},On)),hn({type:"classroomList/getShixunLists",payload:Object(m.a)({},On)})}},y.a.createElement("strong",null,Ft.name))})),y.a.createElement(Z.a,null,y.a.createElement(kn.a,{flex:"1"},y.a.createElement("div",{className:mn.a.menuCourse,style:{margin:"0px 15px"}},y.a.createElement("ul",null,y.a.createElement("li",null,"\u5DF2\u9009",y.a.createElement("span",{className:"c-blue"},pn.length),"\u4E2A\u5B9E\u8BAD"),y.a.createElement("li",null,"\u5171",y.a.createElement("span",{className:"c-blue"},Un.shixuns_count),"\u4E2A\u8BFE\u7A0B"),y.a.createElement("li",{className:"current",onClick:function(){var yi=Object(m.a)(Object(m.a)({},On),{},{order:On.order==="asc"?"desc":"asc"});tr(yi),hn({type:"classroomList/getShixunLists",payload:yi})}},"\u5B66\u4E60\u4EBA\u6570",y.a.createElement("p",{className:"edu-sorter current ".concat(On.order)},On.order==="asc"?y.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}):y.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))))),y.a.createElement(kn.a,{className:"c-grey-999"},"\u4EC5\u5DF2\u53D1\u5E03\u7684\u5B9E\u8BAD\u8FDB\u5165\u672C\u5217\u8868\u5907\u9009")),Un==null||((Kt=Un.shixun_list)===null||Kt===void 0)?void 0:Kt.map(function(Ft,yi){return y.a.createElement("div",{className:mn.a.listItem,key:yi},y.a.createElement(a.a,{checked:pn.includes(Ft.id),value:Ft.id,disabled:Ft==null?void 0:Ft.need_authorize,onChange:function($n){var ir=pn.indexOf(Ft.id);pn.indexOf(Ft.id)>-1?Ct(pn.filter(function(Qt){return Qt!==Ft.id})):Ct(pn.concat(Ft.id))}}),y.a.createElement("div",{className:mn.a.info},y.a.createElement("div",{className:mn.a.title},y.a.createElement("div",{className:mn.a.titleLeft},y.a.createElement("a",{className:"c-black",href:"/shixuns/".concat(Ft==null?void 0:Ft.identifier,"/challenges"),target:"_blank"},y.a.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:Ft.title}})),(Ft==null?void 0:Ft.need_authorize)&&y.a.createElement("span",{onClick:function(){Object(qi.a)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10"},"\u9700\u6388\u6743"),Object(Si.v)()&&(Ft==null?void 0:Ft.mark_status)===1&&y.a.createElement(h.a,{title:Ft==null?void 0:Ft.mark_content},y.a.createElement("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10"},"\u6B63\u5E38")),Object(Si.v)()&&(Ft==null?void 0:Ft.mark_status)===2&&y.a.createElement(h.a,{title:Ft==null?void 0:Ft.mark_content},y.a.createElement("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10"},"\u9700\u5B8C\u5584")),Object(Si.v)()&&(Ft==null?void 0:Ft.mark_status)===3&&y.a.createElement(h.a,{title:Ft==null?void 0:Ft.mark_content},y.a.createElement("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10"},"\u65E0\u6CD5\u4F7F\u7528")))),y.a.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},y.a.createElement("span",{className:mn.a.description,dangerouslySetInnerHTML:{__html:Ft.description}})),y.a.createElement("div",{className:" mt15"},Ft.challenge_names.map(function(li,$n){return y.a.createElement("span",{key:$n,className:"mr30 font12"},"\u7B2C",$n+1,"\u5173 ",li," ")})),y.a.createElement(bn.a,{dashed:!0}),y.a.createElement("div",{className:"c-light-black mt20 font12"},y.a.createElement("span",null,Ft.author_name),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,Ft.author_school_name),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570 ",Ft.level),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570 "),y.a.createElement("span",null,Ft.study_count))))}),(Un==null||((sn=Un.shixun_list)===null||sn===void 0)?void 0:sn.length)===0&&y.a.createElement(ie.a,null),y.a.createElement("p",null)),y.a.createElement("div",{className:"tc mt20"},y.a.createElement(V.a,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:10,showSizeChanger:!1,current:On.page||1,showQuickJumper:!0,total:Un==null?void 0:Un.shixuns_count,onChange:function(yi){var li=Object(m.a)(Object(m.a)({},On),{},{page:yi});tr(li),hn({type:"classroomList/getShixunLists",payload:li})}})))},Qr=Object(x.a)(function(Zt){var dt=Zt.classroomList,kt=Zt.loading;return{classroomList:dt,loading:kt}})(kr),yt=G("mgmH"),cn=G("ErOA"),Kr=G("ORt/"),zr=G.n(Kr),na=G("Ot1p"),Gr=function(dt,kt){var Lt,Kt=dt.data,sn=Ui.a.useForm(),En=Object(s.a)(sn,1),wn=En[0],hn=Object(H.useState)({}),Ln=Object(s.a)(hn,2),zn=Ln[0],un=Ln[1];return Object(H.useEffect)(function(){Kt&&(un(Kt),wn.setFieldsValue(Object(m.a)({},Kt)))},[Kt]),Object(H.useImperativeHandle)(kt,function(){return{form:wn}}),y.a.createElement("div",{className:zr.a.operating},y.a.createElement(Ui.a,{form:wn,scrollToFirstError:!0,onValuesChange:function(){un(Object(m.a)({},wn.getFieldsValue()))}},y.a.createElement(Ui.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"},{max:30,message:"\u8BF7\u8F93\u5165\u6807\u9898\uFF0C\u6700\u5927\u9650\u523630\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},y.a.createElement(g.a,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898\uFF0C\u6700\u5927\u9650\u523630\u4E2A\u5B57\u7B26",suffix:"".concat(((Lt=zn.name)===null||Lt===void 0?void 0:Lt.length)||0,"/30")})),y.a.createElement(Ui.a.Item,{name:"languages",label:"\u7F16\u7A0B\u8BED\u8A00",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},y.a.createElement(a.a.Group,null,y.a.createElement(a.a,{value:"c"},"C"),y.a.createElement(a.a,{value:"c++"},"C++"),y.a.createElement(a.a,{value:"java"},"Java"),y.a.createElement(a.a,{value:"python"},"Python"))),y.a.createElement("div",{className:zr.a.tip},"\u9009\u62E9\u652F\u6301\u4EE5\u4E0B\u7F16\u7A0B\u8BD5\u9898\u8FDB\u884C\u7F16\u8BD1\u7684\u8BED\u8A00"),y.a.createElement("div",{style:{margin:"20px 0 12px 0px"}},"\u8BF4\u660E"),y.a.createElement(Ui.a.Item,{name:"description"},y.a.createElement(na.a,{defaultValue:zn.description||"",watch:!0}))))},$=Object(H.forwardRef)(Gr),S=G("SVaM"),D=G("sesT"),z=G.n(D),te=G("wNkr"),Y=G.n(te),Le=G("xTzM"),ct=G.n(Le),Pt=N.a.TabPane,rn=g.a.Search,ht=g.a.TextArea,Vt;(function(Zt){Zt.Mine="0",Zt.Public="1",Zt.Collection="2",Zt.TeachGroupShare="3"})(Vt||(Vt={}));var hi=function(dt){var kt,Lt,Kt,sn,En,wn,hn,Ln,zn,un,Sn,di,Nn=dt.classroomList,zt=dt.problemset,An=dt.user,si=dt.globalSetting,Un=dt.loading,Xt=dt.dispatch,jt=dt.match,pn=dt.shixunHomeworks,Ct=Object(o.a)(dt,["classroomList","problemset","user","globalSetting","loading","dispatch","match","shixunHomeworks"]),Nt=Object(H.useState)({discipline_id:null,sub_discipline_id:null,tag_discipline_id:null,group_id:null,type:"0",item_type:null,difficulty:null,keyword:null,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",id:((kt=Ct.location)===null||kt===void 0||((Lt=kt.query)===null||Lt===void 0)?void 0:Lt.id)||null,exam_id:(jt==null||((Kt=jt.params)===null||Kt===void 0)?void 0:Kt.id)||null,exercise_id:(jt==null||((sn=jt.params)===null||sn===void 0)?void 0:sn.categoryId)||null}),Dt=Object(s.a)(Nt,2),Pe=Dt[0],Yt=Dt[1],xn=Object(H.useState)(0),pi=Object(s.a)(xn,2),On=pi[0],tr=pi[1],nr=Object(H.useState)([]),Fi=Object(s.a)(nr,2),Bn=Fi[0],Ft=Fi[1],yi=Object(H.useState)(Vt.Mine),li=Object(s.a)(yi,2),$n=li[0],ir=li[1],Qt=Object(H.useState)(0),qt=Object(s.a)(Qt,2),$t=qt[0],dn=qt[1],Gn=Object(H.useState)(-1),Mn=Object(s.a)(Gn,2),qn=Mn[0],mi=Mn[1],Tr=Object(H.useState)([]),Zn=Object(s.a)(Tr,2),$r=Zn[0],gi=Zn[1],fr=Object(H.useState)(!1),rr=Object(s.a)(fr,2),Mr=rr[0],ka=rr[1],Do=Object(H.useState)([]),ua=Object(s.a)(Do,2),Wi=ua[0],lo=ua[1],uo=Object(H.useState)(0),va=Object(s.a)(uo,2),_a=va[0],Qa=va[1],co=Object(H.useState)(!1),Ma=Object(s.a)(co,2),wa=Ma[0],ho=Ma[1],fo=Object(H.useState)(!1),Na=Object(s.a)(fo,2),po=Na[0],$a=Na[1],ya=Object(H.useRef)(!1),ia=Object(H.useRef)(""),ba=Object(H.useRef)(),ye=Object(H.useRef)(),Oe=Object(H.useRef)(),Me=Object(H.useState)(),Ce=Object(s.a)(Me,2),re=Ce[0],me=Ce[1],oe=Object(H.useState)([]),we=Object(s.a)(oe,2),ve=we[0],ke=we[1],Ie=Object(H.useRef)(!1),je=(jt==null?void 0:jt.url)==="/problemset",Ze=jt==null||((En=jt.url)===null||En===void 0)?void 0:En.includes("program_homework"),mt=Ze&&jt!==null&&jt!==void 0&&(wn=jt.params)!==null&&wn!==void 0&&wn.categoryId&&jt!==null&&jt!==void 0&&(hn=jt.url)!==null&&hn!==void 0&&hn.includes("edit")?jt==null||((Ln=jt.params)===null||Ln===void 0)?void 0:Ln.categoryId:"",bt=mt?"\u7F16\u8F91\u7F16\u7A0B\u4F5C\u4E1A":"\u65B0\u5EFA\u7F16\u7A0B\u4F5C\u4E1A",Ut=Object(H.useState)({}),Rn=Object(s.a)(Ut,2),Qn=Rn[0],jn=Rn[1],Vn=Object(H.useState)(!1),Yn=Object(s.a)(Vn,2),Xn=Yn[0],Wn=Yn[1],Jn=An.userInfo||{},ei=Jn.admin,ki=Jn.business,ti=Jn.is_shixun_marker,gn=Jn.is_teacher,fn=Jn.user_identity,Hn=ei||ki||ti||gn||fn!=="\u5B66\u751F",ui=Object(H.useState)("\u6309\u66F4\u65B0\u65F6\u95F4\u964D\u5E8F"),an=Object(s.a)(ui,2),ci=an[0],Mi=an[1],ri=pn.commonHomeWorkAddDefaultData,wi=Object(H.useState)([]),bi=Object(s.a)(wi,2),Hi=bi[0],Gi=bi[1],Bi=Object(H.useRef)(null),vr=Object(H.useState)(!1),Lr=Object(s.a)(vr,2),Cr=Lr[0],Vi=Lr[1],Di=Object(H.useState)([]),Ei=Object(s.a)(Di,2),Tn=Ei[0],xi=Ei[1],Nr=Object(H.useState)(""),Zr=Object(s.a)(Nr,2),ra=Zr[0],Ti=Zr[1],Vr=Object(H.useState)(!1),Jr=Object(s.a)(Vr,2),Oi=Jr[0],vi=Jr[1],ji=Object(H.useRef)(null),Ua=[{name:"\u6309\u66F4\u65B0\u65F6\u95F4\u5347\u5E8F",type:"updated_at",direction:"asc"},{name:"\u6309\u66F4\u65B0\u65F6\u95F4\u964D\u5E8F",type:"updated_at",direction:"desc"},{name:"\u6309\u4F7F\u7528\u6B21\u6570\u5347\u5E8F",type:"quotes",direction:"asc"},{name:"\u6309\u4F7F\u7528\u6B21\u6570\u964D\u5E8F",type:"quotes",direction:"desc"}];Object(H.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Za=function(){var et=Object(v.a)(j.a.mark(function Qe(){var Ge,nt,ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(Be.q)({id:mt});case 2:Ge=wt.sent,Ge!=null&&Ge.name&&(ot={description:Ge.description,languages:Ge.languages,name:Ge.name},ji.current.form.setFieldsValue(ot),jn(Object(m.a)({},ot)),xi(Object(w.a)(Ge.data)),ke((nt=Ge.data)===null||nt===void 0?void 0:nt.map(function(Et){return Et.id})));case 4:case"end":return wt.stop()}},Qe)}));return function(){return et.apply(this,arguments)}}();Object(H.useEffect)(function(){mt&&Za()},[mt]),Object(H.useEffect)(function(){var et;Xt({type:"problemset/getDisciplines",payload:{source:"question"}});var Qe=((et=Ct.location.query)===null||et===void 0?void 0:et.group_id)||0;Pe.group_id=Number(Qe),Yt(Pe),$i(Pe).then(function(Ge){Ge!=null&&Ge.status||Gi(Ge==null?void 0:Ge.item_banks_group),Vi(!1)}),Xr(),Ea()},[]),Object(H.useEffect)(function(){return Xt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Xt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){Xt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Xt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[]),Object(H.useEffect)(function(){return Xt({type:"globalSetting/headerFixedToggle",payload:!0}),function(){Xt({type:"globalSetting/headerFixedToggle",payload:!1})}},[]),Object(H.useEffect)(function(){return Xt({type:"globalSetting/headerFooterToggle",payload:je}),function(){Xt({type:"globalSetting/headerFooterToggle",payload:!0})}},[]),Object(H.useEffect)(function(){Object(Ri.X)(Ze?bt:"\u8BD5\u9898\u5E93")},[Ze,bt]);var ca=function(Qe,Ge){var nt=[];if(!Qe){var ot,At;zt==null||((ot=zt.disciplinesData)===null||ot===void 0||((At=ot.disciplines)===null||At===void 0))||At.forEach(function(Ki){var Ur;Ki==null||((Ur=Ki.sub_disciplines)===null||Ur===void 0)||Ur.forEach(function(ta){var Da;ta==null||((Da=ta.tag_disciplines)===null||Da===void 0)||Da.forEach(function(Br){Br.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&nt.push(Br)})})})}if(Qe&&!Ge){var wt,Et,ln,ni=zt==null||((wt=zt.disciplinesData)===null||wt===void 0||((Et=wt.disciplines)===null||Et===void 0))?void 0:Et.find(function(Ki){return Ki.id===Qe});ni==null||((ln=ni.sub_disciplines)===null||ln===void 0)||ln.forEach(function(Ki){var Ur;Ki==null||((Ur=Ki.tag_disciplines)===null||Ur===void 0)||Ur.forEach(function(ta){ta.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&nt.push(ta)})})}if(Qe&&Ge){var Sr,Kn,yr,br,mr=zt==null||((Sr=zt.disciplinesData)===null||Sr===void 0||((Kn=Sr.disciplines)===null||Kn===void 0))?void 0:Kn.find(function(Ki){return Ki.id===Qe}),Ar=mr==null||((yr=mr.sub_disciplines)===null||yr===void 0)?void 0:yr.find(function(Ki){return Ki.id===Ge});Ar==null||((br=Ar.tag_disciplines)===null||br===void 0)||br.forEach(function(Ki){Ki.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&nt.push(Ki)})}return nt},Ea=function(){var et=Object(v.a)(j.a.mark(function Qe(){return j.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:Xt({type:"problemset/getTeachGroupData"});case 1:case"end":return nt.stop()}},Qe)}));return function(){return et.apply(this,arguments)}}();Object(H.useEffect)(function(){var et=zt.basketData||{},Qe=et.completion_questions_count,Ge=Qe===void 0?0:Qe,nt=et.judgement_questions_count,ot=nt===void 0?0:nt,At=et.multiple_questions_count,wt=At===void 0?0:At,Et=et.practical_questions_count,ln=Et===void 0?0:Et,ni=et.program_questions_count,Sr=ni===void 0?0:ni,Kn=et.single_questions_count,yr=Kn===void 0?0:Kn,br=et.subjective_questions_count,mr=br===void 0?0:br,Ar=et.combination_questions_count,Ki=Ar===void 0?0:Ar,Ur=Ge+ot+wt+ln+Sr+yr+mr+Ki;Qa(Ur)},[zt.basketData]);var $i=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return nt=Object(m.a)({},Ge),nt.item_type=Ze?"PROGRAM":Ge.item_type,Vi(!0),nt.keyword=encodeURIComponent(Ge.keyword||""),wt.next=6,Xt({type:"problemset/getItemBanks",payload:nt});case 6:if(ot=wt.sent,!(ot&&ot.status!==403&&ot.status!==401&&ot.status!==500)){wt.next=18;break}return tr(ot.items_count||0),Ft(ot.items||[]),gi(ot.tag_disciplines||[]),me(ot.used_shixun_ids||[]),Ba(ot.items||[]),Ze||ke([]),lo((ot==null?void 0:ot.navigation)||[]),dn((ot==null?void 0:ot.added_num)||0),Vi(!1),wt.abrupt("return",ot);case 18:case"end":return wt.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Xr=function(){Xt({type:"problemset/getBasketList",payload:{}})},Ba=function(Qe){var Ge=Qe.every(function(nt){var ot;return((ot=nt.program_attr)===null||ot===void 0?void 0:ot.status)===0});ya.current=Ge},Po=function(Qe,Ge){if(Pe.discipline_id=Qe||"",Pe.sub_discipline_id=Ge||"",Pe.tag_discipline_id="",Pe.page=1,Pe.per_page=20,delete Pe.id,mi(Qe===null?-1:null),Yt(Pe),$i(Pe),Qe===null)return},Io=function(Qe){Pe.item_type=Qe||"",Pe.page=1,Pe.per_page=20,Yt(Pe),$i(Pe)},mo=function(Qe){Pe.difficulty=Qe||"",Pe.page=1,Pe.per_page=20,delete Pe.id,Yt(Pe),$i(Pe)},Ja=function(Qe){Pe.tag_discipline_id=Qe,Pe.page=1,Pe.per_page=20,delete Pe.id,Qe===-1&&(Pe.discipline_id="",Pe.sub_discipline_id="",Pe.tag_discipline_id=""),mi(Qe),Yt(Pe),$i(Pe)},qa=Object(H.useState)(!1),da=Object(s.a)(qa,2),xa=da[0],go=da[1],ja=function(Qe){Xt({type:"problemset/getDisciplines",payload:{source:"question",group_id:0,group_type:Qe}}),Pe.discipline_id="",Pe.sub_discipline_id="",Pe.tag_discipline_id="",Pe.item_type=null,Pe.difficulty=null,Pe.type=Qe,Qe==="0"?Pe.group_id=0:Pe.group_id=null,Qe==="3"&&Ze?Pe.only_published=!0:Pe.only_published=null,Qe==="3"?go(!0):go(!1),Pe.page=1,Pe.per_page=20,delete Pe.id,mi(-1),ir(Qe),Yt(Pe),$i(Pe)},Ta=function(Qe,Ge){Pe.page=Qe,Pe.per_page=Ge,Yt(Pe),$i(Pe)},ha=function(Qe){Pe.discipline_id="",Pe.sub_discipline_id="",Pe.tag_discipline_id="",Pe.item_type=null,Pe.difficulty=null,Pe.page=1,Pe.keyword=Qe,delete Pe.id,Qe?($a(!0),Object(S.a)({name:Qe,copywriting:Qe,position:Ze?"Practice":"ItemBank"})):$a(!1),mi(-1),Yt(Pe),$i(Pe)},Pi=function(){Pe.per_page=20,Yt(Pe),$i(Pe)},Dr=function(Qe){var Ge=Qe.length===Bn.length&&Pe.page>1?Pe.page-1:Pe.page;Pe.page=Ge,Pe.per_page=20,Xr(),Yt(Pe),$i(Pe)},fa=function(){Xt({type:"problemset/setActionTabs",payload:{key:"Problemset-PublicReview"}})},aa=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge,nt){var ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!nt){wt.next=6;break}return wt.next=3,Object(Be.n)({id:Ge});case 3:wt.t0=wt.sent,wt.next=9;break;case 6:return wt.next=8,Object(Be.G)({id:Ge});case 8:wt.t0=wt.sent;case 9:ot=wt.t0,(ot==null?void 0:ot.status)===0&&Pi();case 11:case"end":return wt.stop()}},Qe)}));return function(Ge,nt){return et.apply(this,arguments)}}(),Sa=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){return j.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:Ka(Ge);case 1:case"end":return ot.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),pa=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){return j.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:Ha([Ge]);case 1:case"end":return ot.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Fa=function(Qe){ye.current="",ba.current="",A.a.confirm({centered:!0,width:530,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BD5\u9898\u7EA0\u9519",content:y.a.createElement("div",{className:"font14"},y.a.createElement("div",null,"\u9519\u8BEF\u7C7B\u578B\uFF1A"),y.a.createElement(O.a.Group,{className:"mt10",onChange:function(nt){return ba.current=nt.target.value}},y.a.createElement(O.a,{value:"\u9898\u5E72"},"\u9898\u5E72"),y.a.createElement(O.a,{value:"\u7B54\u6848"},"\u7B54\u6848"),y.a.createElement(O.a,{value:"\u89E3\u6790"},"\u89E3\u6790"),y.a.createElement(O.a,{value:"\u5C5E\u6027"},"\u5C5E\u6027"),y.a.createElement(O.a,{value:"\u5176\u5B83"},"\u5176\u5B83")),y.a.createElement("div",{className:"mt10"},"\u9519\u8BEF\u63CF\u8FF0\uFF1A"),y.a.createElement(ht,{className:"mt10",rows:4,defaultValue:ye.current,onChange:function(nt){return ye.current=nt.target.value}})),onOk:function(){return new Promise(function(){var nt=Object(v.a)(j.a.mark(function ot(At,wt){var Et;return j.a.wrap(function(ni){for(;;)switch(ni.prev=ni.next){case 0:if(ba.current&&ye.current){ni.next=3;break}return c.b.info("\u8BF7\u586B\u5199\u9519\u8BEF\u7C7B\u578B\u548C\u9519\u8BEF\u63CF\u8FF0\uFF01"),ni.abrupt("return",wt());case 3:return ni.next=5,Object(Be.o)({id:Qe,clazz:ba.current,description:ye.current});case 5:Et=ni.sent,Et.status===0&&c.b.info("\u6DFB\u52A0\u6210\u529F\uFF01"),At();case 8:case"end":return ni.stop()}},ot)}));return function(ot,At){return nt.apply(this,arguments)}}())}})},eo=function(Qe){Xt({type:"problemset/setActionTabs",payload:{key:"Problemset-SetPrivate",params:{id:Qe}}})},Wa=function(Qe){Xt({type:"problemset/setActionTabs",payload:{key:"Problemset-Delete",params:{id:Qe}}})},to=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot,At,wt;return j.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:if(nt=Ge.item_type,!(nt==="PROGRAM")){ln.next=12;break}return ot=Ge.program_attr.identifier,ln.next=5,Xt({type:"problemset/startExperience",payload:{id:ot}});case 5:if(At=ln.sent,!(At.status===0)){ln.next=10;break}return wt=At.identifier,Object(Ri.S)("/myproblems/".concat(wt)),ln.abrupt("return");case 10:return c.b.warn(At.message),ln.abrupt("return");case 12:Xt({type:"problemset/setActionTabs",payload:{key:nt,params:Ge}});case 13:case"end":return ln.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),qr=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot,At;return j.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!Pe.exam_id){Et.next=6;break}return Et.next=3,Object(Be.M)({item_id:Ge,id:Pe.exam_id});case 3:return nt=Et.sent,nt.status===0&&Pi(),Et.abrupt("return");case 6:if(!(Pe!=null&&Pe.exercise_id)){Et.next=12;break}return Et.next=9,Object(cn.a)("/api/exercise_questions/delete_by_item_bank.json ",{method:"post",body:{exercise_id:Pe==null?void 0:Pe.exercise_id,item_bank_ids:[Ge]}});case 9:return ot=Et.sent,ot.status===0&&Pi(),Et.abrupt("return");case 12:return Et.next=14,Xt({type:"problemset/cancel",payload:{id:Ge,item_bank:1}});case 14:At=Et.sent,At.status===0&&(Pi(),Xr());case 16:case"end":return Et.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),oa=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){return j.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:Xt({type:"problemset/getDisciplines",payload:{source:"question",group_id:Math.abs(Ge),group_type:Vt.Mine}}),Pe.discipline_id="",Pe.sub_discipline_id="",Pe.tag_discipline_id="",Pe.page=1,Pe.per_page=20,Pe.group_id=Math.abs(Ge),mi(-1),Yt(Pe),$i(Pe).then(function(At){return Gi(At==null?void 0:At.item_banks_group)});case 10:case"end":return ot.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),no=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot,At;return j.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!Pe.exam_id){Et.next=6;break}return Et.next=3,Object(Be.t)({exam_id:Pe.exam_id,item_bank_ids:[Ge]});case 3:return nt=Et.sent,nt.status===0&&Pi(),Et.abrupt("return");case 6:if(!(Pe!=null&&Pe.exercise_id)){Et.next=12;break}return Et.next=9,Object(cn.a)("/api/exercises/".concat(Pe==null?void 0:Pe.exercise_id,"/select_questions.json"),{method:"post",body:{item_bank_ids:[Ge]}});case 9:return ot=Et.sent,ot.status===0&&Pi(),Et.abrupt("return");case 12:if(!(_a===200)){Et.next=15;break}return c.b.info("\u5DF2\u9009200\u4E2A\u8BD5\u9898\uFF08\u4E0D\u80FD\u5728\u9009\u7528\u66F4\u591A\u8BD5\u9898\uFF09"),Et.abrupt("return");case 15:return Et.next=17,Xt({type:"problemset/select",payload:{item_bank_ids:[Ge]}});case 17:At=Et.sent,At.status===0&&(Pi(),Xr());case 19:case"end":return Et.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),io=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){return j.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:if(Ge){ot.next=3;break}if(ve!=null&&ve.length){ot.next=3;break}return ot.abrupt("return",c.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898"));case 3:Oe.current=[0],A.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u79FB\u52A8\u5230",maskClosable:!0,className:"custom-modal-divider",icon:null,content:y.a.createElement("div",{className:"font14 ".concat(pe.a.overflow),style:{maxHeight:500,overflow:"auto"}},y.a.createElement("p",{className:"c-grey-333"},"\u8BF7\u9009\u62E9\u9700\u8981\u79FB\u52A8\u5230\u7684\u6587\u4EF6\u5939"),y.a.createElement(ne.a,{defaultValue:!0,value:Oe.current,onChange:function(wt){return Oe.current=wt}})),onOk:function(){var At=Object(v.a)(j.a.mark(function Et(){var ln,ni;return j.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.next=2,Object(Be.f)({ids:Ge?[Ge]:ve,groups_ids:(ln=Oe.current)===null||ln===void 0?void 0:ln[0]});case 2:ni=Kn.sent,Oe.current=[],(ni==null?void 0:ni.status)===0&&Pi();case 5:case"end":return Kn.stop()}},Et)}));function wt(){return At.apply(this,arguments)}return wt}()});case 5:case"end":return ot.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),ko=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(Be.D)({clazz:"ItemBank",id:Ge});case 2:nt=wt.sent,ot=(nt==null?void 0:nt.groups)||[],Oe.current=[],A.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A\u64A4\u9500",cancelText:"\u53D6\u6D88",title:"\u672C\u9898\u5DF2\u5171\u4EAB\u7684\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:y.a.createElement("div",{className:"font14 ".concat(pe.a.overflow)},y.a.createElement("p",{className:"c-grey-999"},"\u9009\u4E2D\u5E76\u786E\u5B9A\uFF0C\u5373\u64A4\u9500\u672C\u9898\u5BF9\u9009\u4E2D\u6559\u7814\u56E2\u961F\u7684\u5206\u4EAB"),y.a.createElement(a.a.Group,{className:pe.a.checkbox,defaultValue:Oe.current,onChange:function(ln){return Oe.current=ln}},ot==null?void 0:ot.map(function(Et){return y.a.createElement(a.a,{key:Et.group_id,value:Et.group_id},Et.name)}))),onOk:function(){var Et=Object(v.a)(j.a.mark(function ni(){return j.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.abrupt("return",new Promise(function(){var yr=Object(v.a)(j.a.mark(function br(mr,Ar){var Ki,Ur,ta;return j.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(Oe.current.length){Br.next=3;break}return c.b.warn("\u8BF7\u9009\u62E9\u9700\u8981\u64A4\u9500\u5171\u4EAB\u7684\u6559\u7814\u56E2\u961F"),Br.abrupt("return",Ar());case 3:return Ur=ot==null||((Ki=ot.map(function(yo){return yo.group_id}))===null||Ki===void 0)?void 0:Ki.filter(function(yo){return!Oe.current.includes(yo)}),Br.next=6,Object(Be.l)({ids:[Ge],clazz:"ItemBank",group_ids:Ur});case 6:return ta=Br.sent,Oe.current=[],(ta==null?void 0:ta.status)===0&&(c.b.info("\u64A4\u9500\u5171\u4EAB\u6210\u529F"),Pi()),Br.abrupt("return",mr());case 10:case"end":return Br.stop()}},br)}));return function(br,mr){return yr.apply(this,arguments)}}()));case 1:case"end":return Kn.stop()}},ni)}));function ln(){return Et.apply(this,arguments)}return ln}()});case 6:case"end":return wt.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Mo=function(Qe){Xt({type:"problemset/setActionTabs",payload:{key:"Problemset-BasketDelete",params:{type:Qe}}})},ro=function(){Xt({type:"problemset/setActionTabs",payload:{key:"\u65B0\u5EFA\u6587\u4EF6\u5939",params:Pe}});return},No=function(){var Qe={discipline_id:"&discipline_id=".concat(Pe.discipline_id),sub_discipline_id:"&sub_discipline_id=".concat(Pe.sub_discipline_id),tag_discipline_id:"&sub_discipline_id=".concat(Pe.tag_discipline_id),difficulty:"&difficulty=".concat(Pe.difficulty),item_type:"&item_type=".concat(Pe.item_type),group_id:"&group_id=".concat(Pe.group_id||0)},Ge="/problemset/newitem?pages=".concat(Pe.page);Object.keys(Qe).forEach(function(nt){Pe[nt]&&(Ge=Ge+Qe[nt])}),x.d===null||x.d===void 0||x.d.push(Ge)},Zi=function(Qe){var Ge=ve;if(!(Ge!=null&&Ge.length))return c.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898");if(_a+Ge.length>200&&Qe&&je){c.b.info("\u8BD5\u9898\u7BEE\u4E2D\u6700\u591A\u53EF\u518D\u52A0\u5165".concat(200-_a,"\u9898\uFF0C\u5F53\u524D\u9009\u4E2D").concat(Ge.length,"\u9898\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9"));return}Qe?Xi(Ge):pr(Ge)},Xi=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt;return j.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:nt=Object(w.a)(Ge),Bn.forEach(function(wt){if(nt.includes(wt.id)){var Et;wt.item_type==="PROGRAM"&&((Et=wt.program_attr)===null||Et===void 0?void 0:Et.status)===0&&Object(vt.remove)(nt,function(ln){return ln===wt.id})}}),A.a.confirm({width:530,title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:y.a.createElement("div",null,"\u5F53\u524D\u5DF2\u9009\u62E9",Ge.length,"\u9053\u8BD5\u9898\uFF0C\u5DF2\u52A0\u5165\u8FC7\u7684\u8BD5\u9898\u6216\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\u5C06\u4E0D\u4F1A\u91CD\u590D\u52A0\u5165 "),onOk:function(){var wt=Object(v.a)(j.a.mark(function ln(){var ni;return j.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(!Pe.exam_id){Kn.next=6;break}return Kn.next=3,Object(Be.t)({exam_id:Pe.exam_id,item_bank_ids:nt});case 3:ni=Kn.sent,Kn.next=15;break;case 6:if(!(Pe!=null&&Pe.exercise_id)){Kn.next=12;break}return Kn.next=9,Object(cn.a)("/api/exercises/".concat(Pe==null?void 0:Pe.exercise_id,"/select_questions.json"),{method:"post",body:{item_bank_ids:nt}});case 9:ni=Kn.sent,Kn.next=15;break;case 12:return Kn.next=14,Xt({type:"problemset/select",payload:{item_bank_ids:nt}});case 14:ni=Kn.sent;case 15:ni.status===0&&(Pi(),Xr());case 16:case"end":return Kn.stop()}},ln)}));function Et(){return wt.apply(this,arguments)}return Et}()});case 3:case"end":return At.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),pr=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt;return j.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!Pe.exam_id){At.next=6;break}return At.next=3,Object(cn.a)("/api/examination_banks/".concat(Pe.exam_id,"/batch_revoke_item.json"),{method:"post",body:{item_ids:Ge}});case 3:nt=At.sent,At.next=15;break;case 6:if(!(Pe!=null&&Pe.exercise_id)){At.next=12;break}return At.next=9,Object(cn.a)("/api/exercise_questions/delete_by_item_bank.json ",{method:"post",body:{exercise_id:Pe==null?void 0:Pe.exercise_id,item_bank_ids:Ge}});case 9:nt=At.sent,At.next=15;break;case 12:return At.next=14,Xt({type:"problemset/unselectAll",payload:{item_ids:Ge}});case 14:nt=At.sent;case 15:nt.status===0&&(Pi(),Xr());case 16:case"end":return At.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Yi=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt;return j.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!(je&&_a===200)){At.next=3;break}return c.b.info("\u5DF2\u9009200\u4E2A\u8BD5\u9898\uFF08\u4E0D\u80FD\u5728\u9009\u7528\u66F4\u591A\u8BD5\u9898\uFF09"),At.abrupt("return");case 3:if(!Pe.exam_id){At.next=10;break}return At.next=6,Object(Be.t)({exam_id:Pe.exam_id,shixun_ids:Ge});case 6:nt=At.sent,nt.status===0&&Pi(),At.next=14;break;case 10:return At.next=12,Xt({type:"problemset/select",payload:{shixun_ids:Ge}});case 12:nt=At.sent,nt.status===0&&(Xr(),Pi());case 14:case"end":return At.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Aa=function(){Xt({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}})},Ha=function(Qe){var Ge,nt,ot,At;if(!((Ge=zt.teachGroupData)!==null&&Ge!==void 0&&(nt=Ge.groups)!==null&&nt!==void 0&&nt.length))return c.b.info("\u60A8\u6682\u672A\u521B\u5EFA\u6216\u52A0\u5165\u4EFB\u4F55\u6559\u7814\u56E2\u961F\uFF0C\u8BF7\u524D\u5F80\u201C\u6211\u7684\u4E2A\u4EBA\u4E2D\u5FC3-\u6559\u7814\u56E2\u961F\u201D\u67E5\u770B");A.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5171\u4EAB\u81F3\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:y.a.createElement("div",{className:"font14 ".concat(pe.a.overflow)},y.a.createElement(a.a.Group,{className:pe.a.checkbox,defaultValue:Oe.current,onChange:function(Et){return Oe.current=Et}},(ot=zt.teachGroupData)===null||ot===void 0||((At=ot.groups)===null||At===void 0)?void 0:At.map(function(wt){return y.a.createElement(a.a,{key:wt.group_id,value:wt.group_id},wt.name)}))),onOk:function(){return new Promise(function(){var Et=Object(v.a)(j.a.mark(function ln(ni,Sr){var Kn,yr;return j.a.wrap(function(mr){for(;;)switch(mr.prev=mr.next){case 0:if((Kn=Oe.current)!==null&&Kn!==void 0&&Kn.length){mr.next=3;break}return c.b.info("\u8BF7\u5148\u9009\u62E9\u6559\u7814\u56E2\u961F"),mr.abrupt("return",Sr());case 3:return mr.next=5,Object(Be.l)({ids:Qe||ve,clazz:"ItemBank",group_ids:Oe.current});case 5:yr=mr.sent,(yr==null?void 0:yr.status)===0&&(c.b.info("\u6240\u9009\u8BD5\u9898\u6210\u529F\u5206\u4EAB\u81F3\u6559\u7814\u56E2\u961F"),Oe.current=[],ke([]),Pi(),ni());case 7:case"end":return mr.stop()}},ln)}));return function(ln,ni){return Et.apply(this,arguments)}}())}})},Pr=function(){var Qe=function(){var Ge=Object(v.a)(j.a.mark(function nt(){var ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return ka(!0),wt.next=3,Object(Be.j)({ids:ve});case 3:ot=wt.sent,ka(!1),(ot==null?void 0:ot.status)===0&&A.a.info({centered:!0,width:530,className:"custom-modal-divider ",okText:"\u786E\u5B9A",title:"\u5220\u9664\u7ED3\u679C",maskClosable:!1,keyboard:!1,icon:null,content:"\u672C\u6B21\u6210\u529F\u5220\u9664".concat(ot.success,"\u6761\u8BD5\u9898\uFF0C\u6709").concat(ot.fail,"\u6761\u8BD5\u9898\u56E0\u4E3A\u516C\u5F00\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u64A4\u9500\u540E\u518D\u8FDB\u884C\u5220\u9664\u3002"),onOk:function(){Dr(new Array(ot.success))}});case 6:case"end":return wt.stop()}},nt)}));return function(){return Ge.apply(this,arguments)}}();if(ve!=null&&ve.length){A.a.confirm({centered:!0,width:530,className:"custom-modal-divider ",okText:"\u786E\u5B9A",title:"\u63D0\u793A",cancelText:"\u53D6\u6D88",icon:null,content:"\u672C\u6B21\u9009\u4E2D\u4E86".concat(ve==null?void 0:ve.length,"\u6761\u8BD5\u9898\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF0C\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\uFF1F"),onOk:Qe});return}c.b.warn("\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u8BD5\u9898")},ao=function(){var Qe,Ge;if(!(ve!=null&&ve.length))return c.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898");if(Bn!=null&&(Qe=Bn.filter(function(nt){return ve.includes(nt.id)}))!==null&&Qe!==void 0&&Qe.every(function(nt){return nt.public}))return c.b.info("\u6240\u9009\u8BD5\u9898\u5DF2\u516C\u5F00\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9");if(Bn!=null&&(Ge=Bn.filter(function(nt){return ve.includes(nt.id)}))!==null&&Ge!==void 0&&Ge.find(function(nt){var ot;return nt.item_type==="PROGRAM"&&((ot=nt.program_attr)===null||ot===void 0?void 0:ot.status)===0}))return c.b.info("\u5DF2\u9009\u9898\u4E2D\u5B58\u5728\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898");window.localStorage.getItem("problemset-set-public-hint-flag")==="1"||An.userInfo.professional_certification?Ka():A.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u516C\u5F00\u89C4\u5219\u544A\u77E5",maskClosable:!0,icon:null,content:y.a.createElement("div",{className:"font16 c-grey-333"},"\u516C\u5F00\u5E76\u7ECF\u5E73\u53F0\u5BA1\u6838\u540E\uFF0C\u8BE5\u9898\u5C06\u5728\u516C\u5171\u8BD5\u9898\u5E93\u53EF\u89C1\uFF0CEducoder\u6240\u6709\u7528\u6237\u5747\u53EF\u4F7F\u7528\u8BE5\u9898\u3002",y.a.createElement("br",null),"\u516C\u5F00\u540E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u4F46\u53EF\u4EE5\u64A4\u9500\uFF1B\u64A4\u9500\u516C\u5F00\u540E\u53EF\u4EE5\u4FEE\u6539\u3002",y.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u7533\u8BF7\u516C\u5F00\uFF1F",y.a.createElement("br",null),y.a.createElement(a.a,{className:"mt10",defaultChecked:!1,onChange:function(ot){return Ie.current=ot.target.checked}},"\u4E0D\u518D\u63D0\u793A")),onOk:function(){Ka()}})},Ka=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){var nt,ot;return j.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return nt=$n===Vt.TeachGroupShare?1:2,wt.next=3,Object(Be.g)({ids:Ge?[Ge]:ve,source:nt});case 3:ot=wt.sent,ot.status===0&&(Ie.current&&window.localStorage.setItem("problemset-set-public-hint-flag","1"),Ie.current=!1,ke([]),Pi());case 5:case"end":return wt.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),vo=function(Qe){A.a.confirm({centered:!0,icon:null,title:"\u63D0\u793A",className:"custom-modal-divider",content:y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:pe.a.modalContent},"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802"),y.a.createElement("div",{className:pe.a.modalContent}," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var Ge=Object(v.a)(j.a.mark(function ot(){var At;return j.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Object(Be.L)({identifier:Qe});case 2:At=Et.sent,(At==null?void 0:At.status)===0&&(c.b.success("\u53D1\u5E03\u6210\u529F"),Pi());case 4:case"end":return Et.stop()}},ot)}));function nt(){return Ge.apply(this,arguments)}return nt}()})},ma=function(Qe){A.a.confirm({centered:!0,icon:null,title:"\u63D0\u793A",className:"custom-modal-divider",content:y.a.createElement("p",{className:pe.a.modalContent},"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var Ge=Object(v.a)(j.a.mark(function ot(){var At;return j.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Object(Be.K)({identifier:Qe});case 2:At=Et.sent,(At==null?void 0:At.status)===0&&(c.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Pi());case 4:case"end":return Et.stop()}},ot)}));function nt(){return Ge.apply(this,arguments)}return nt}()})},za=function(){var et=Object(v.a)(j.a.mark(function Qe(Ge){return j.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:Xt({type:"problemset/getDisciplines",payload:{source:"question",group_id:Ge,group_type:Vt.TeachGroupShare}}),Pe.page=1,Pe.group_id=Ge||null,delete Pe.id,Yt(Object(m.a)({},Pe)),$i(Pe);case 6:case"end":return ot.stop()}},Qe)}));return function(Ge){return et.apply(this,arguments)}}(),Oa=function(Qe){Pe.sort_by=Qe.type,Pe.sort_direction=Qe.direction,Pe.page=1,Pe.per_page=20,Mi(Qe.name),Yt(Pe),$i(Pe)},_o=function(){Pe.page=1,Yt(Pe),$i(Pe)},Ga=function(Qe){Pe.discipline_id="",Pe.sub_discipline_id="",Pe.tag_discipline_id="",Pe.item_type=null,Pe.difficulty=null,Pe.page=1,Pe.per_page=20,Pe.group_id=Qe,mi(-1),Yt(Pe),$i(Pe).then(function(Ge){return Gi(Ge==null?void 0:Ge.item_banks_group)})},_i=function(){if(!(ve!=null&&ve.length)){Xt({type:"problemset/setActionTabs",payload:{key:"\u5BFC\u51FA\u8BD5\u9898",params:Pe}});return}A.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5BFC\u51FA\u63D0\u793A",maskClosable:!0,icon:null,content:y.a.createElement("div",{className:"font14 ".concat(pe.a.overflow)},"\u5DF2\u9009\u4E2D",ve==null?void 0:ve.length,"\u9053\u9898\uFF0C\u5176\u4E2D\u7F16\u7A0B\u9898\u4E0E\u5B9E\u8BAD\u9898\u6682\u4E0D\u652F\u6301\u5BFC\u51FA\u3002"),onOk:function(){Object(yt.k)({ids:ve})}})},oi=function(){var et=Object(v.a)(j.a.mark(function Qe(){var Ge,nt,ot,At;return j.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Object(Be.i)({ids:ve});case 2:Ge=Et.sent,nt=Ge.data||{},ot=nt.unpublish_program_question_count,At=nt.total_item_banks,ot===0?A.a.error({title:"\u9519\u8BEF",content:y.a.createElement("span",null,"\u53D1\u5E03\u9519\u8BEF\uFF01\u8BF7\u9009\u62E9\u5C1A\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\u8FDB\u884C\u53D1\u5E03"),centered:!0,okText:"\u786E\u8BA4"}):A.a.confirm({title:"\u63D0\u793A",content:y.a.createElement("span",null,"\u5F53\u524D\u9009\u4E2D",At,"\u9898\uFF0C\u5176\u4E2D\u5305\u542B",ot,"\u9053\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\uFF0C \u8BF7\u786E\u8BA4\u662F\u5426\u53D1\u5E03\uFF1F"),centered:!0,onOk:function(){var ln=Object(v.a)(j.a.mark(function Sr(){var Kn;return j.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(Be.h)({ids:ve});case 2:Kn=br.sent,Kn.status===0&&(c.b.success("\u53D1\u5E03\u6210\u529F"),Pi());case 4:case"end":return br.stop()}},Sr)}));function ni(){return ln.apply(this,arguments)}return ni}()});case 5:case"end":return Et.stop()}},Qe)}));return function(){return et.apply(this,arguments)}}(),lr=y.a.createElement(d.a,null,Hn&&y.a.createElement(d.a.Item,{onClick:function(){return Zi(!0)}},"\u6279\u91CF\u52A0\u5165"),Hn&&y.a.createElement(d.a.Item,{onClick:function(){return Zi(!1)}},"\u6279\u91CF\u79FB\u51FA"),$n===Vt.Mine&&je&&y.a.createElement(d.a.Item,{onClick:function(){return io()}},"\u79FB\u52A8\u5230"),$n===Vt.Mine&&je&&y.a.createElement(d.a.Item,{onClick:ao},"\u6279\u91CF\u516C\u5F00"),$n===Vt.Mine&&je&&y.a.createElement(d.a.Item,{onClick:function(){return Ha()}},"\u6279\u91CF\u5171\u4EAB"),$n===Vt.Mine&&je&&y.a.createElement(d.a.Item,{onClick:Pr},"\u6279\u91CF\u5220\u9664")),_r=function(Qe){if(Ze)if((Tn==null?void 0:Tn.length)<=0){var Ge=Bn.filter(function(ln){return Qe.includes(ln.id)});xi(Object(w.a)(Ge)),ke(Ge==null?void 0:Ge.map(function(ln){return ln.id}))}else if(Qe.length>Tn.length){var nt,ot=Bn.filter(function(ln){return Qe.includes(ln.id)}),At=Tn.map(function(ln){return ln.id}),wt=ot.filter(function(ln){return!At.includes(ln.id)});xi([].concat(Object(w.a)(Tn),Object(w.a)(wt))),ke((nt=[].concat(Object(w.a)(Tn),Object(w.a)(wt)))===null||nt===void 0?void 0:nt.map(function(ln){return ln.id}))}else{var Et=Tn.filter(function(ln){return Qe.includes(ln.id)});xi(Object(w.a)(Et)),ke(Et==null?void 0:Et.map(function(ln){return ln.id}))}else ke(Qe)},sa=function(Qe){if(Ze)if(Qe){var Ge,nt=Tn==null?void 0:Tn.map(function(Et){return Et.id}),ot=Bn.filter(function(Et){return!nt.includes(Et.id)});xi([].concat(Object(w.a)(Tn),Object(w.a)(ot))),ke((Ge=[].concat(Object(w.a)(Tn),Object(w.a)(ot)))===null||Ge===void 0?void 0:Ge.map(function(Et){return Et.id}))}else{var At=Bn==null?void 0:Bn.map(function(Et){return Et.id}),wt=Tn.filter(function(Et){return!At.includes(Et.id)});xi(Object(w.a)(wt)),ke(wt==null?void 0:wt.map(function(Et){return Et.id}))}else ke(Qe?Bn==null?void 0:Bn.map(function(Et){return Et.id}):[])},ea=function(){var Qe="/problemset/preview";if(Pe.exam_id&&(Qe="/paperlibrary/edit/".concat(Pe.exam_id)),Pe!=null&&Pe.exercise_id){var Ge;Qe="/classrooms/".concat(jt==null||((Ge=jt.params)===null||Ge===void 0)?void 0:Ge.coursesId,"/exercise/").concat(Pe==null?void 0:Pe.exercise_id,"/edit")}x.d.push(Qe)},Ra=[{type:"SINGLE",name:"\u5355\u9009\u9898"},{type:"MULTIPLE",name:"\u591A\u9009\u9898"},{type:"JUDGMENT",name:"\u5224\u65AD\u9898"},{type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},{type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},{type:"COMPLETION",name:"\u586B\u7A7A\u9898"},{type:"COMBINATION",name:"\u7EC4\u5408\u9898"}],la={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},ar=function(Qe,Ge){var nt,ot=Ge.id<0?"--":Hn?Ge[Pe.exercise_id?"added":"choosed"]?y.a.createElement("span",{key:1,className:pe.a.btnAdd,onClick:function(Et){Et.target.style.pointerEvents="none",qr(Ge.id)}},je?"\u79FB\u51FA\u8BD5\u9898\u7BEE":y.a.createElement("span",null,y.a.createElement("b",{className:"iconfont icon-yichu ".concat(pe.a.cancelC)}),"\u79FB\u51FA")):Ge.item_type==="PROGRAM"&&((nt=Ge.program_attr)===null||nt===void 0?void 0:nt.status)===0?y.a.createElement(h.a,{placement:"top",title:"\u7F16\u7A0B\u9898\u672A\u53D1\u5E03\uFF0C\u4E0D\u80FD\u52A0\u5165\uFF01"},y.a.createElement("span",{className:pe.a.btnAdd,style:{cursor:"not-allowed",background:"#E3E6EC",color:"#B1BACD"}}," ",je?"\u52A0\u5165\u8BD5\u9898\u7BEE":y.a.createElement("span",{style:{padding:"0 3px"}},y.a.createElement("b",{className:"iconfont icon-jiaru ".concat(pe.a.addC)}),"\u52A0\u5165")," ")):y.a.createElement("span",{className:pe.a.btnAdd,onClick:function(){return no(Ge.id)}},je?"\u52A0\u5165\u8BD5\u9898\u7BEE":y.a.createElement("span",{style:{padding:"0 3px"}},y.a.createElement("b",{className:"iconfont icon-jiaru ".concat(pe.a.addC)}),"\u52A0\u5165")):y.a.createElement(y.a.Fragment,null),At=y.a.createElement("span",{className:pe.a.actonBtn},Ge.id>0&&y.a.createElement(fi.a,{isProblemset:je,user:An,key:Ge.id,data:Ge,activeTabsKey:$n,selectIds:ve,onCollect:aa,onSetPublic:Sa,onStartExperience:to,onCorrection:Fa,onPublicReview:fa,onSetPrivate:eo,onDelete:Wa,onCancel:qr,onSelect:no,onMoveTo:io,onSetShare:pa,onCancelShare:ko,onPublish:vo,onCancelPublish:ma}),ot);return At};Object(H.useEffect)(function(){if(Ze){var et=jt.params,Qe=et.coursesId,Ge=et.categoryId;Xt({type:"shixunHomeworks/addCommonHomeWorkDefaultData",payload:{category:Ge,coursesId:Qe,type:5}})}},[Ze]);var La=function(){var et=Object(v.a)(j.a.mark(function Qe(){var Ge,nt,ot,At,wt;return j.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ji.current.form.validateFields().catch(function(ni){document.body.scrollIntoView()}),ln.next=3,ji.current.form.validateFields();case 3:if(Ge=ji.current.form.getFieldsValue(),console.log(Ge,"value"),!((Tn==null?void 0:Tn.length)<=0)){ln.next=8;break}return c.b.info("\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898"),ln.abrupt("return");case 8:return Wn(!0),nt=jt.params,ot=nt.coursesId,At=nt.categoryId,ln.next=12,Object(cn.a)(mt?"/api/homework_commons/".concat(At,"/update_hack.json"):"/api/courses/".concat(ot,"/homework_commons.json"),{method:mt?"put":"post",body:Object(m.a)(Object(m.a)({},Ge),{},{coursesId:ot,category:At,type:5,hack_ids:Tn==null?void 0:Tn.map(function(ni){return ni.id})})});case 12:wt=ln.sent,(wt==null?void 0:wt.status)===0&&x.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework/").concat(mt?At:wt.homework_id,"/detail?tabs=1")),Wn(!1);case 15:case"end":return ln.stop()}},Qe)}));return function(){return et.apply(this,arguments)}}();return y.a.createElement("div",{className:pe.a.page},y.a.createElement("section",null,y.a.createElement("div",{className:pe.a.wrap},ri.course_name&&Ze&&y.a.createElement("section",{className:"animated fadeIn"},y.a.createElement("aside",{className:"mt10"},ri.category&&y.a.createElement(p.a,{separator:">"},y.a.createElement(p.a.Item,null,y.a.createElement(F.a,{to:"/classrooms/".concat(ri.course_id,"/program_homework")},ri.course_name)),y.a.createElement(p.a.Item,null,y.a.createElement(F.a,{to:"/classrooms/".concat(ri.course_id,"/program_homework")},ri.category.category_name)),y.a.createElement(p.a.Item,null,bt)))),y.a.createElement("div",{className:pe.a.title},Ze?bt:"\u8BD5\u9898\u5E93"),Ze&&y.a.createElement($,{data:Qn,ref:ji}),y.a.createElement("div",{className:pe.a.headerWrapper},y.a.createElement("div",{className:pe.a.tabsWrap},y.a.createElement(N.a,{activeKey:$n,onChange:ja,tabBarExtraContent:y.a.createElement("div",{className:pe.a.searchWrap},$n===Vt.Mine&&je&&y.a.createElement(P.a,{className:pe.a.addQuestionBtn,onClick:No},y.a.createElement("img",{src:z.a,className:pe.a.pngIcon,alt:""}),"\u65B0\u589E\u8BD5\u9898"),y.a.createElement(rn,{allowClear:!0,suffix:y.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(pe.a.searchIcon),onClick:function(){return ha(Pe.keyword)}}),className:pe.a.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",size:"large",onChange:function(Qe){Pe.keyword=Qe.target.value,Yt(Object(m.a)({},Pe))},onSearch:ha}))},y.a.createElement(Pt,{tab:"\u516C\u5171",key:"1"}),((zn=zt.teachGroupData)===null||zn===void 0||((un=zn.groups)===null||un===void 0)?void 0:un.length)&&y.a.createElement(Pt,{tab:"\u6211\u7684\u7FA4\u7EC4",key:"3"}),!Object(Si.o)()&&!Object(Si.m)()&&!Ze&&y.a.createElement(Pt,{tab:"\u6536\u85CF\u5939",key:"2"}),y.a.createElement(Pt,{tab:"\u6211\u521B\u5EFA\u7684",key:"0"}))),y.a.createElement(Q.a,{showSelectAll:!1,className:pe.a.select,disciplinesData:(Sn=zt.disciplinesData)===null||Sn===void 0?void 0:Sn.disciplines,knowledgeData:$r,directionValue:Pe.discipline_id,subDisciplineValue:Pe.sub_discipline_id,typeValue:Pe.item_type,isprogram_homework:Ze,showKnowledge:!0,name:ra,setname:Ti,difficultyValue:Pe.difficulty,showShixun:!Object(Si.m)()&&!Pe.exercise_id&&$n!==Vt.TeachGroupShare&&$n!==Vt.Public,onShixunChange:Aa,onDirectionChange:Po,onTypeChange:Io,onDifficultyChange:mo,knowledgeValue:qn,onKnowledgeChange:Ja,teachGroupData:(di=zt.teachGroupData)===null||di===void 0?void 0:di.groups,onTeachGroupChange:za,teachGroupValue:Pe.group_id,showTeachGroup:xa})),y.a.createElement("div",{className:pe.a.treeWrapper,style:{display:$n===Vt.Mine?"block":"none"}},y.a.createElement("div",{className:pe.a.treeHeader},y.a.createElement(be.a,{data:Wi,onClick:oa}),y.a.createElement(P.a,{type:"link",onClick:ro,className:pe.a.exportBtn},y.a.createElement("img",{src:ct.a,alt:"",className:pe.a.pngIcon}),"\u65B0\u5EFA\u6587\u4EF6\u5939")),y.a.createElement(W.a,{spinning:Cr},y.a.createElement("div",{ref:Bi,className:pe.a.treeContent},y.a.createElement(In.a,{isProblemset:je,reloadData:Pi,data:Hi,onShare:Ha,onOpen:oa})))),y.a.createElement("div",{className:pe.a.contentWrap},y.a.createElement("div",{className:pe.a.batchWrap},y.a.createElement("div",{style:{flex:1,display:"flex",alignItems:"center"}},!Ze&&y.a.createElement("div",{className:"font14"},y.a.createElement(B.a,{overlay:y.a.createElement(d.a,{selectedKeys:[ci]},Ua==null?void 0:Ua.map(function(et,Qe){return y.a.createElement(d.a.Item,{key:et.name,onClick:function(){return Oa(et)}},et.name)}))},y.a.createElement("span",{style:{color:"#464F66"}},y.a.createElement("i",{className:"iconfont icon-paixu font14 mr5 c-light-primary"}),ci))),Ze&&y.a.createElement("div",null,y.a.createElement(a.a,{checked:(Bn==null?void 0:Bn.filter(function(et){return Tn==null?void 0:Tn.map(function(Qe){return Qe.id}).includes(et.id)}).length)===Bn.length,onChange:function(Qe){return sa(Qe.target.checked)}},"\u672C\u9875\u5168\u9009",y.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",ve==null?void 0:ve.length,")"))),Ze&&y.a.createElement(A.a,{visible:Oi,centered:!0,width:700,okText:"\u786E\u8BA4".concat(mt?"\u7F16\u8F91":"\u65B0\u5EFA"),onCancel:function(){return vi(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:La,confirmLoading:Xn,title:"\u67E5\u770B\u5DF2\u9009"},y.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",Tn==null?void 0:Tn.length,"\u4E2A"),y.a.createElement("div",{style:{height:400,overflow:"auto"}},Tn==null?void 0:Tn.map(function(et,Qe){var Ge,nt,ot,At,wt,Et;return y.a.createElement("div",{key:Qe,className:pe.a.sendModal},y.a.createElement("div",{className:pe.a.li},y.a.createElement("p",null,et==null?void 0:et.name),y.a.createElement("div",{className:pe.a.bottom},y.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),y.a.createElement("i",{className:pe.a.line}),y.a.createElement("span",{className:"c-grey-333"},et.difficulty===1&&"\u7B80\u5355",et.difficulty===2&&"\u9002\u4E2D",et.difficulty===3&&"\u56F0\u96BE"),y.a.createElement("i",{className:pe.a.line}),y.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",y.a.createElement(h.a,{title:et==null||((Ge=et.author)===null||Ge===void 0)?void 0:Ge.name},y.a.createElement("span",{className:"c-grey-333"},(et==null||((nt=et.author)===null||nt===void 0||((ot=nt.name)===null||ot===void 0))?void 0:ot.length)>6?(et==null||((At=et.author)===null||At===void 0||((wt=At.name)===null||wt===void 0))?void 0:wt.substr(0,3))+"...":et==null||((Et=et.author)===null||Et===void 0)?void 0:Et.name))),y.a.createElement("i",{className:pe.a.line}),y.a.createElement("span",{className:pe.a.des},"\u66F4\u65B0\xA0",y.a.createElement("span",{className:"c-grey-333"},et==null?void 0:et.updated_at)))),y.a.createElement("div",{className:pe.a.del,onClick:function(){_r(Tn.filter(function(ni){return ni.id!==et.id}).map(function(ni){return ni.id}))}},"\u5220\u9664"))})))),y.a.createElement("div",null,$n===Vt.Mine&&je&&y.a.createElement(P.a,{onClick:_i,type:"link",className:pe.a.exportBtn},y.a.createElement("img",{src:Y.a,className:pe.a.pngIcon}),y.a.createElement("span",null,"\u5BFC\u51FA\u8BD5\u9898")))),po?y.a.createElement("div",null,y.a.createElement(P.a,{style:{paddingLeft:0},onClick:function(){Pe.page=1,Pe.keyword=null,delete Pe.id,Yt(Pe),$a(!1),$i(Pe)},type:"link"}," ",y.a.createElement("i",{className:"iconfont icon-fanhui2 font14"}),"\u8FD4\u56DE"),y.a.createElement("span",{className:"font14 mr20 c-grey-333"},"\u641C\u7D22\u201C",decodeURIComponent(Pe.keyword),"\u201D")):null,y.a.createElement("div",{className:pe.a.contentListWrap},On!==0?y.a.createElement(W.a,{size:"large",spinning:Un["problemset/getItemBanks"]},Bn.map(function(et,Qe){var Ge,nt;return y.a.createElement("div",{className:pe.a.li},y.a.createElement("div",{className:pe.a.top},y.a.createElement(fi.b,{key:et.id,data:et,selectIds:ve,onSelectCheckBox:_r})),y.a.createElement("div",{className:pe.a.bottom},y.a.createElement("p",{className:"".concat(pe.a.actionLeftItem," ").concat(pe.a.questionTypeName)},(Ge=Ra.find(function(ot){return ot.type===et.item_type}))===null||Ge===void 0?void 0:Ge.name),y.a.createElement("p",{className:pe.a.actionLeftItem},la[et.difficulty]),y.a.createElement("p",{className:pe.a.actionLeftItem},"\u521B\u5EFA\u8005",y.a.createElement("span",{className:"c-grey-333"},et==null||((nt=et.author)===null||nt===void 0)?void 0:nt.name)),y.a.createElement("p",{className:pe.a.actionLeftItem},"\u66F4\u65B0",y.a.createElement("span",{className:"c-grey-333"},et==null?void 0:et.updated_at)),y.a.createElement("p",{className:pe.a.actionLeftItem},"\u4F7F\u7528\u6B21\u6570",y.a.createElement("span",{className:"c-grey-333"},et==null?void 0:et.quotes)),!Ze&&y.a.createElement("div",{className:pe.a.more},ar({},et))))})):y.a.createElement(W.a,{size:"large",spinning:Un["problemset/getItemBanks"]},y.a.createElement(ie.a,null))),On!==0&&!Ze&&y.a.createElement(V.a,{showQuickJumper:!0,onChange:Ta,defaultCurrent:1,pageSize:Pe==null?void 0:Pe.per_page,current:Pe.page||1,total:On,showTotal:function(Qe){return y.a.createElement("span",{className:"mr10"},"\u5171",y.a.createElement("span",{className:"c-light-primary"},Qe),"\u6761\u6570\u636E")}}),Ze&&y.a.createElement("div",{style:{height:20}})),je&&y.a.createElement(nn,{basketData:zt.basketData,visible:wa,basketTotal:_a,onClose:function(){return ho(!1)},onDelete:Mo}),!Object(Si.m)()&&je&&y.a.createElement(Ci,{visibleBasket:wa,onToggleVisible:function(){return ho(!wa)},count:_a})),y.a.createElement(he,null),y.a.createElement(qe,{onReloadData:Pi}),y.a.createElement(pt,{onReloadData:function(){return Dr([null])}}),y.a.createElement(Gt,{onReloadData:Pi,onReloadBasketData:Xr}),Nn.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?y.a.createElement(Qr,{shixunIds:re,cb:Yi}):null,y.a.createElement(xt,null),y.a.createElement(Ye,null),y.a.createElement(St,null),y.a.createElement(ut,null),y.a.createElement(Ue,null),y.a.createElement(it,{onOk:_o}),y.a.createElement(q.a,{onOk:Ga})),je?y.a.createElement(H.Fragment,null,!!(ve!=null&&ve.length)&&y.a.createElement("div",{className:pe.a.batch},y.a.createElement("aside",null,y.a.createElement("div",{style:{flexShrink:0,marginRight:20}},y.a.createElement(a.a,{className:"font14",checked:Bn!=null&&Bn.length?ve.length===(Bn==null?void 0:Bn.length):!1,onChange:function(Qe){return sa(Qe.target.checked)}},"\u672C\u9875\u5168\u9009",y.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",ve==null?void 0:ve.length,")"))),y.a.createElement("div",{className:pe.a.btns},Hn&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return Zi(!0)}},y.a.createElement("i",{className:"iconfont icon-piliangjiaru"}),"\u6279\u91CF\u52A0\u5165"),Hn&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return Zi(!1)}},y.a.createElement("i",{className:"iconfont icon-piliangyichu"}),"\u6279\u91CF\u79FB\u51FA"),$n===Vt.Mine&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return io()}},y.a.createElement("i",{className:"iconfont icon-yidongmulu font16"}),"\u6279\u91CF\u79FB\u52A8"),$n===Vt.Mine&&y.a.createElement("div",{className:pe.a.btn,onClick:ao}," ",y.a.createElement("i",{className:"iconfont icon-pilianggongkai"}),"\u6279\u91CF\u516C\u5F00"),$n===Vt.Mine&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return Ha()}}," ",y.a.createElement("i",{className:"iconfont icon-pilianggongxiang"}),"\u6279\u91CF\u5171\u4EAB"),$n===Vt.Mine&&y.a.createElement("div",{className:pe.a.btn,onClick:Pr}," ",y.a.createElement("i",{className:"iconfont icon-piliangshanchu3 c-red"}),"\u6279\u91CF\u5220\u9664"),$n===Vt.Mine&&y.a.createElement("div",{className:pe.a.btn,onClick:oi}," ",y.a.createElement("i",{className:"iconfont icon-fabu5"}),"\u6279\u91CF\u53D1\u5E03"),y.a.createElement("div",{onClick:function(){return ke([])},style:{marginLeft:"auto"},className:pe.a.btn}," ",y.a.createElement("i",{className:"iconfont icon-piliangcaozuoicon2"}),"\u53D6\u6D88\u64CD\u4F5C"))))):Ze?"":y.a.createElement("div",{className:pe.a.batch},y.a.createElement("aside",null,y.a.createElement("div",{style:{flexShrink:0,marginRight:20}},y.a.createElement(a.a,{className:"font14",checked:Bn!=null&&Bn.length?ve.length===(Bn==null?void 0:Bn.length):!1,onChange:function(Qe){return sa(Qe.target.checked)}},"\u672C\u9875\u5168\u9009",y.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",ve==null?void 0:ve.length,")"))),y.a.createElement("div",{className:pe.a.btns},Hn&&!!(ve!=null&&ve.length)&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return Zi(!0)}},y.a.createElement("i",{className:"iconfont icon-piliangjiaru"}),"\u6279\u91CF\u52A0\u5165"),Hn&&!!(ve!=null&&ve.length)&&y.a.createElement("div",{className:pe.a.btn,onClick:function(){return Zi(!1)}},y.a.createElement("i",{className:"iconfont icon-piliangyichu"}),"\u6279\u91CF\u79FB\u51FA"),y.a.createElement("div",{className:"c-grey-333 font12 mr40",style:{marginLeft:"auto"}},"\u5DF2\u52A0\u5165:\xA0\xA0",$t,"\u9898"),y.a.createElement("div",{onClick:ea,className:pe.a.btn},"\u8FD4\u56DE\u8BD5\u5377")))),Ze&&y.a.createElement("div",{className:pe.a.batch},y.a.createElement("aside",null,y.a.createElement("div",{style:{flexShrink:0,marginRight:20}},y.a.createElement(V.a,{showQuickJumper:!0,onChange:Ta,defaultCurrent:1,pageSize:Pe==null?void 0:Pe.per_page,current:Pe.page||1,hideOnSinglePage:!0,total:On,showTotal:function(Qe){return y.a.createElement("span",{className:"mr10"},"\u5171",y.a.createElement("span",{className:"c-light-primary"},Qe),"\u6761\u6570\u636E")}})),y.a.createElement("div",{className:pe.a.btns},y.a.createElement(Z.a,{align:"middle",style:{marginLeft:"auto"}},y.a.createElement(Z.a,{onClick:function(){if((Tn==null?void 0:Tn.length)<=0){c.b.info("\u5F53\u524D\u6682\u65E0\u6570\u636E");return}vi(!0)},align:"middle",className:"current"},y.a.createElement("i",{className:"iconfont icon-yixuan mr10 c-light-primary font20"}),y.a.createElement("span",null,"\u5DF2\u9009",y.a.createElement("span",{className:"c-light-primary"},ve.length),"\u4E2A")),y.a.createElement(P.a,{className:"mr20 ml40",onClick:function(){if(mt){var Qe;x.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework/").concat(jt==null||((Qe=jt.params)===null||Qe===void 0)?void 0:Qe.categoryId,"/detail?tabs=1"));return}x.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework"))}},"\u53D6\u6D88"),y.a.createElement(P.a,{loading:Xn,onClick:La,type:"primary"},"\u786E\u8BA4",mt?"\u7F16\u8F91":"\u65B0\u5EFA"))))))},Li=Xe.default=Object(x.a)(function(Zt){var dt=Zt.classroomList,kt=Zt.problemset,Lt=Zt.user,Kt=Zt.loading,sn=Zt.globalSetting,En=Zt.shixunHomeworks;return{classroomList:dt,problemset:kt,user:Lt,globalSetting:sn,loading:Kt.effects,shixunHomeworks:En}})(hi)},LE3n:function(ft,Xe,G){"use strict";var de=G("ozfa"),Z=G("MJZm"),M=G("k1fw"),V=G("+L6B"),I=G("2/Rp"),B=G("5NDa"),K=G("5rEg"),W=G("2qtc"),L=G("kLXV"),P=G("miYZ"),b=G("tsqr"),p=G("9og8"),_=G("tJVT"),h=G("WmNS"),r=G.n(h),d=G("q1tI"),l=G.n(d),a=G("1vnw"),u=G.n(a),c=G("ErOA"),R=G("Ix/O"),O=G.n(R),T=G("xTzM"),A=G.n(T),w=G("WCUW"),m=G("LvDl"),v=G.n(m),s=function(g){var C=g.isProblemset,N=g.name,U=g.id,j=g.itemBanksCount,H=g.onOpen,y=H===void 0?function(){}:H,x=g.onShare,F=x===void 0?function(){}:x,Q=g.onMove,q=Q===void 0?function(){}:Q,ie=g.onDeleteOk,ge=ie===void 0?function(){}:ie,fe=Object(d.useState)(!1),ue=Object(_.a)(fe,2),he=ue[0],_e=ue[1],le=Object(d.useState)(N),ne=Object(_.a)(le,2),Te=ne[0],Fe=ne[1],Ke=Object(d.useState)(N),Ue=Object(_.a)(Ke,2),He=Ue[0],Ne=Ue[1],Be=function(){var tt=Object(p.a)(r.a.mark(function it(rt){var qe,gt,pt;return r.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(qe=["\uFF1F","\u3001","/","\u2572","*","<",">","|"],He.trim()){at.next=4;break}return b.b.warn("\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"),at.abrupt("return");case 4:if(!(He.charAt(0)===" ")){at.next=7;break}return b.b.warn("\u9996\u5B57\u7B26\u4E0D\u80FD\u4E3A\u7A7A\u683C"),at.abrupt("return");case 7:gt=0;case 8:if(!(gt0?ie(function(rt){return _e(rt,Ue,{children:Be.map(function(qe){return{title:l.a.createElement(s,{isProblemset:C,name:qe.name,id:qe.id,itemBanksCount:qe.item_banks_count,onMove:fe,onOpen:j,onShare:y,onDeleteOk:he}),key:qe.id,icon:l.a.createElement("img",{src:O.a,className:u.a.folderIcon}),isLeaf:!1}})})}):ie(function(rt){return _e(rt,Ue,{isLeaf:!0})});case 6:case"end":return it.stop()}},Fe)}));return function(Ke){return Te.apply(this,arguments)}}(),ne=function(Fe,Ke){var Ue=Ke.node,He=Ke.expanded;ie(function(Ne){return _e(Ne,Ue.key,{icon:He?l.a.createElement("img",{src:A.a,className:u.a.folderIcon}):l.a.createElement("img",{src:O.a,className:u.a.folderIcon})})})};return(q==null?void 0:q.length)>0&&l.a.createElement(Z.a,{showLine:{showLeafIcon:!1},showIcon:!0,treeData:q,loadData:le,onExpand:ne,className:u.a.folderWrapper,selectable:!1})};Xe.a=o},LdHM:function(ft,Xe,G){"use strict";G.d(Xe,"b",function(){return c}),G.d(Xe,"a",function(){return O});var de=G("1OyB"),Z=G("vuIU"),M=G("Ji7U"),V=G("LK+K"),I=G("q1tI"),B=G("rePB"),K=G("Ff2n"),W=G("ODXe"),L=G("4IlW"),P=G("bX4T"),b=G("YrtM"),p=G("TSYQ"),_=G.n(p),h=G("+nKL"),r=G("8OUc"),d=function(F,Q){var q=F.prefixCls,ie=F.id,ge=F.flattenOptions,fe=F.childrenAsData,ue=F.values,he=F.searchValue,_e=F.multiple,le=F.defaultActiveFirstOption,ne=F.height,Te=F.itemHeight,Fe=F.notFoundContent,Ke=F.open,Ue=F.menuItemSelectedIcon,He=F.virtual,Ne=F.onSelect,Be=F.onToggleOpen,Je=F.onActiveValue,tt=F.onScroll,it=F.onMouseEnter,rt="".concat(q,"-item"),qe=Object(b.a)(function(){return ge},[Ke,ge],function(ut,be){return be[0]&&ut[1]!==be[1]}),gt=I.useRef(null),pt=function(be){be.preventDefault()},vt=function(be){gt.current&>.current.scrollTo({index:be})},at=function(be){for(var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pe=qe.length,se=0;se1&&arguments[1]!==void 0?arguments[1]:!1;return Object(A.a)(x).map(function(Q,q){if(!I.isValidElement(Q)||!Q.type)return null;var ie=Q.type.isSelectOptGroup,ge=Q.key,fe=Q.props,ue=fe.children,he=Object(K.a)(fe,["children"]);return F||!ie?w(Q):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(ge===null?q:ge,"__"),label:ge},he),{},{options:m(ue)})}).filter(function(Q){return Q})}var v=G("2Qr1"),s=G("qNPg"),o=G("U8pU"),E=G("Kwbf"),g=G("WKfj");function C(x){var F=x.mode,Q=x.options,q=x.children,ie=x.backfill,ge=x.allowClear,fe=x.placeholder,ue=x.getInputElement,he=x.showSearch,_e=x.onSearch,le=x.defaultOpen,ne=x.autoFocus,Te=x.labelInValue,Fe=x.value,Ke=x.inputValue,Ue=x.optionLabelProp,He=F==="multiple"||F==="tags",Ne=he!==void 0?he:He||F==="combobox",Be=Q||m(q);if(Object(E.a)(F!=="tags"||Be.every(function(rt){return!rt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),F==="tags"||F==="combobox"){var Je=Be.some(function(rt){return rt.options?rt.options.some(function(qe){return typeof("value"in qe?qe.value:qe.key)=="number"}):typeof("value"in rt?rt.value:rt.key)=="number"});Object(E.a)(!Je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(F!=="combobox"||!Ue,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(F==="combobox"||!ie,"`backfill` only works with `combobox` mode."),Object(E.a)(F==="combobox"||!ue,"`getInputElement` only work with `combobox` mode."),Object(E.b)(F!=="combobox"||!ue||!ge||!fe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_e&&!Ne&&F!=="combobox"&&F!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!le||ne,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Fe!=null){var tt=Object(g.d)(Fe);Object(E.a)(!Te||tt.every(function(rt){return Object(o.a)(rt)==="object"&&("key"in rt||"value"in rt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!He||Array.isArray(Fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var it=null;Object(A.a)(q).some(function(rt){if(!I.isValidElement(rt)||!rt.type)return!1;var qe=rt.type;if(qe.isSelectOption)return!1;if(qe.isSelectOptGroup){var gt=Object(A.a)(rt.props.children).every(function(pt){return!I.isValidElement(pt)||!rt.type||pt.type.isSelectOption?!0:(it=pt.type,!1)});return!gt}return it=qe,!0}),it&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(it.displayName||it.name||it,"`.")),Object(E.a)(Ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=C,U=Object(s.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:m,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:N,fillOptionsWithMissingValue:v.a}),j=function(x){Object(M.a)(Q,x);var F=Object(V.a)(Q);function Q(){var q;return Object(de.a)(this,Q),q=F.apply(this,arguments),q.selectRef=I.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(Z.a)(Q,[{key:"render",value:function(){return I.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),Q}(I.Component);j.Option=c,j.OptGroup=O;var H=j,y=Xe.c=H},M8RZ:function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return L});var de=G("fWQN"),Z=G("mtLc"),M=G("yKVA"),V=G("879j"),I=G("q1tI"),B=G.n(I),K=G("i8i4"),W=G.n(K),L=function(P){Object(M.a)(p,P);var b=Object(V.a)(p);function p(_){var h;Object(de.a)(this,p),h=b.call(this,_);var r=window.document;return h.node=r.createElement("div"),r.body.appendChild(h.node),h}return Object(Z.a)(p,[{key:"render",value:function(){var h=this.props.children;return Object(K.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),p}(B.a.Component)},NLgs:function(ft,Xe,G){"use strict";G.d(Xe,"e",function(){return c}),G.d(Xe,"f",function(){return R}),G.d(Xe,"d",function(){return T}),G.d(Xe,"c",function(){return A}),G.d(Xe,"a",function(){return w}),G.d(Xe,"b",function(){return m});var de=G("miYZ"),Z=G("tsqr"),M=G("9og8"),V=G("2qtc"),I=G("kLXV"),B=G("WmNS"),K=G.n(B),W=G("q1tI"),L=G.n(W),P=G("9kvl"),b=G("xKgJ"),p=G("1vsH"),_=G("RCxd"),h=G("yTi+"),r=G.n(h),d=G("1ZF9"),l=G.n(d),a=G("NoGO"),u=G.n(a),c=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(R(s)&&O(o))},R=function(s){return Object(b.p)()?!0:(s({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},O=function(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=Object(P.c)()._store.getState(),g=E.user;return(s=g.userInfo)!==null&&s!==void 0&&s.profile_completed?!0:(I.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:o?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){P.d.push("/account/profile/edit")}}),!1)},T=function(){var s,o=Object(P.c)()._store.getState(),E=o.user;return(s=E.userInfo)!==null&&s!==void 0&&s.professional_certification?!0:(I.a.confirm({title:"\u63D0\u793A",centered:!0,content:L.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(p.S)("/account/certification")}}),!1)},A=function(){return Object(b.a)()?!0:(I.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:L.a.createElement("div",{className:"tc",style:{marginLeft:-38}},L.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),L.a.createElement("img",{src:u.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},w=function(s,o){return s?!0:(I.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:L.a.createElement("div",null,L.a.createElement("p",null,o||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),L.a.createElement("div",{style:{marginLeft:"110px"}},L.a.createElement("img",{src:l.a,width:200}),L.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(p.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},m=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=Object(P.c)()._store.getState(),g=E.shixunsDetail.detail;return(g==null?void 0:g.public)===2||(g==null?void 0:g.public)===1||(g==null?void 0:g.shixun_status)===3?(I.a.info({centered:!0,icon:L.a.createElement(_.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:L.a.createElement("div",{className:"tc",style:{marginLeft:-38}},L.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},L.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(g==null?void 0:g.public)===2?"\u5DF2\u516C\u5F00":(g==null?void 0:g.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",o,"\u3002"),L.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),L.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:r.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(g==null?void 0:g.shixun_status)===2?(I.a.confirm({centered:!0,icon:L.a.createElement(_.a,null),title:"\u63D0\u793A",content:L.a.createElement("div",null,L.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",o,"\u3002"),L.a.createElement("br",null),L.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){I.a.confirm({width:440,centered:!0,icon:L.a.createElement(_.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var N=Object(M.a)(K.a.mark(function j(){var H;return K.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,s({type:"shixunsDetail/cancelRelease",payload:{id:g==null?void 0:g.identifier}});case 2:H=x.sent,H.status!==401&&(Z.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),s({type:"shixunsDetail/getShixunsDetail",payload:{id:g==null?void 0:g.identifier}}),s({type:"practiceSetting/getCommonData",payload:{id:g==null?void 0:g.identifier}}));case 4:case"end":return x.stop()}},j)}));function U(){return N.apply(this,arguments)}return U}()})}}),!0):!1}},NoGO:function(ft,Xe,G){ft.exports=G.p+"static/newqrcode.d852fdfc.png"},NvD2:function(ft,Xe,G){"use strict";G.d(Xe,"a",function(){return B});var de=G("Kwbf");function Z(K,W){var L=new Set;return K.forEach(function(P){W.has(P)||L.add(P)}),L}function M(K){var W=K||{},L=W.disabled,P=W.disableCheckbox,b=W.checkable;return!!(L||P)||b===!1}function V(K,W,L,P){for(var b=new Set(K),p=new Set,_=0;_<=L;_+=1){var h=W.get(_)||new Set;h.forEach(function(a){var u=a.key,c=a.node,R=a.children,O=R===void 0?[]:R;b.has(u)&&!P(c)&&O.filter(function(T){return!P(T.node)}).forEach(function(T){b.add(T.key)})})}for(var r=new Set,d=L;d>=0;d-=1){var l=W.get(d)||new Set;l.forEach(function(a){var u=a.parent,c=a.node;if(P(c)||!a.parent||r.has(a.parent.key))return;if(P(a.parent.node)){r.add(u.key);return}var R=!0,O=!1;(u.children||[]).filter(function(T){return!P(T.node)}).forEach(function(T){var A=T.key,w=b.has(A);R&&!w&&(R=!1),!O&&(w||p.has(A))&&(O=!0)}),R&&b.add(u.key),O&&p.add(u.key),r.add(u.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(Z(p,b))}}function I(K,W,L,P,b){for(var p=new Set(K),_=new Set(W),h=0;h<=P;h+=1){var r=L.get(h)||new Set;r.forEach(function(u){var c=u.key,R=u.node,O=u.children,T=O===void 0?[]:O;!p.has(c)&&!_.has(c)&&!b(R)&&T.filter(function(A){return!b(A.node)}).forEach(function(A){p.delete(A.key)})})}_=new Set;for(var d=new Set,l=P;l>=0;l-=1){var a=L.get(l)||new Set;a.forEach(function(u){var c=u.parent,R=u.node;if(b(R)||!u.parent||d.has(u.parent.key))return;if(b(u.parent.node)){d.add(c.key);return}var O=!0,T=!1;(c.children||[]).filter(function(A){return!b(A.node)}).forEach(function(A){var w=A.key,m=p.has(w);O&&!m&&(O=!1),!T&&(m||_.has(w))&&(T=!0)}),O||p.delete(c.key),T&&_.add(c.key),d.add(c.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(Z(_,p))}}function B(K,W,L,P){var b=[],p;P?p=P:p=M;var _=new Set(K.filter(function(l){var a=!!L[l];return a||b.push(l),a})),h=new Map,r=0;Object.keys(L).forEach(function(l){var a=L[l],u=a.level,c=h.get(u);c||(c=new Set,h.set(u,c)),c.add(a),r=Math.max(r,u)}),Object(de.a)(!b.length,"Tree missing follow keys: ".concat(b.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var d;return W===!0?d=V(_,h,r,p):d=I(_,W.halfCheckedKeys,h,r,p),d}},"ORt/":function(ft,Xe,G){ft.exports={operating:"operating___1LS8K",tip:"tip___3LKV6"}},OZM5:function(ft,Xe,G){"use strict";G.d(Xe,"b",function(){return P}),G.d(Xe,"a",function(){return b}),G.d(Xe,"k",function(){return p}),G.d(Xe,"h",function(){return _}),G.d(Xe,"i",function(){return h}),G.d(Xe,"g",function(){return r}),G.d(Xe,"c",function(){return d}),G.d(Xe,"d",function(){return l}),G.d(Xe,"j",function(){return c}),G.d(Xe,"e",function(){return R}),G.d(Xe,"f",function(){return O});var de=G("KQm4"),Z=G("U8pU"),M=G("Ff2n"),V=G("q1tI"),I=G.n(V),B=G("Kwbf"),K=G("WaYH"),W=.25,L=2;function P(T,A){var w=T.slice(),m=w.indexOf(A);return m>=0&&w.splice(m,1),w}function b(T,A){var w=T.slice();return w.indexOf(A)===-1&&w.push(A),w}function p(T){return T.split("-")}function _(T,A){return"".concat(T,"-").concat(A)}function h(T){return T&&T.type&&T.type.isTreeNode}function r(T,A){var w=[T],m=A[T];function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];s.forEach(function(o){var E=o.key,g=o.children;w.push(E),v(g)})}return v(m.children),w}function d(T,A){var w=T.clientY,m=A.selectHandle.getBoundingClientRect(),v=m.top,s=m.bottom,o=m.height,E=Math.max(o*W,L);return w<=v+E?-1:w>=s-E?1:0}function l(T,A){if(!T)return;var w=A.multiple;return w?T.slice():T.length?[T[0]]:T}var a=function(A){return A};function u(T,A){if(!T)return[];var w=A||{},m=w.processProps,v=m===void 0?a:m,s=Array.isArray(T)?T:[T];return s.map(function(o){var E=o.children,g=Object(M.a)(o,["children"]),C=u(E,A);return I.a.createElement(K.a,Object.assign({},v(g)),C)})}function c(T){if(!T)return null;var A;if(Array.isArray(T))A={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(Z.a)(T)==="object")A={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(B.a)(!1,"`checkedKeys` is not an array or an object"),null;return A}function R(T,A){var w=new Set;function m(v){if(w.has(v))return;var s=A[v];if(!s)return;w.add(v);var o=s.parent,E=s.node;if(E.disabled)return;o&&m(o.key)}return(T||[]).forEach(function(v){m(v)}),Object(de.a)(w)}function O(T){var A={};return Object.keys(T).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(A[w]=T[w])}),A}},Ot1p:function(ft,Xe,G){"use strict";var de=G("2qtc"),Z=G("kLXV"),M=G("rAM+"),V=G("miYZ"),I=G("tsqr"),B=G("9og8"),K=G("tJVT"),W=G("jrin"),L=G("WmNS"),P=G.n(L),b=G("q1tI"),p=G.n(b),_=G("VrN/"),h=G.n(_),r=G("bdgK"),d=G("p77/"),l=G("Bd2K"),a=G("ELLl"),u=G("19Vz"),c=G("lZu9"),R=G("+NIl"),O=G("kSUc"),T=G("9Bee"),A=function(De){var $e=De.value,lt=$e===void 0?"":$e,Bt=De.className,tn=De.showTextOnly,nn=De.showLines,_n=De.style,yn=_n===void 0?{}:_n,Gt=Object(b.useMemo)(function(){return""},[lt]);return p.a.createElement(p.a.Fragment,null,p.a.createElement("div",{dangerouslySetInnerHTML:{__html:Gt}}))},w=G("0Owb"),m=G("dejd"),v=G("C+DQ"),s=G("1vsH"),o=G("m3rI"),E=[{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 g(De){var $e=De.onActionCallback,lt=De.title,Bt=De.icon,tn=De.actionName,nn=De.className,_n=nn===void 0?"":nn,yn=De.children;function Gt(){$e(tn)}return p.a.createElement("a",{title:lt,className:_n,onClick:Gt},p.a.createElement("i",{className:"md-iconfont ".concat(Bt)}),yn)}var C=function(De){var $e=De.watch,lt=De.showNullButton,Bt=De.onActionCallback,tn=De.fullScreen,nn=De.insertTemp,_n=De.hidetoolBar,yn=De.uuid,Gt=De.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(s.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(s.F)("_educoder_session"),"&key=").concat(yn,"&api=").concat(encodeURIComponent(o.a.PROXY_SERVER)));var ii=[].concat(E,[{title:"".concat($e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat($e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return p.a.createElement("ul",{className:"markdown-toolbar-container"},!_n&&ii.map(function(Dn,Ci){return p.a.createElement("li",{key:Ci},Dn.actionName?p.a.createElement(g,Object(w.a)({},Dn,{onActionCallback:Bt})):p.a.createElement("span",{className:"v-line"}))}),lt?p.a.createElement("li",null,p.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Bt},p.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,nn&&p.a.createElement("li",null,p.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(nn),onActionCallback:Bt},p.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),p.a.createElement("li",{className:"btn-full-screen"},p.a.createElement(g,{icon:"".concat(tn?"icon-shrink":"icon-enlarge"),title:tn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Bt})))},N=G("M8RZ"),U=G("+L6B"),j=G("2/Rp"),H=G("y8nQ"),y=G("Vl3Y"),x=G("5NDa"),F=G("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},q=function(De){var $e=De.callback,lt=De.onCancel;function Bt(tn){$e(tn)}return p.a.createElement(y.a,Object(w.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Bt}),p.a.createElement(y.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},p.a.createElement(F.a,null)),p.a.createElement(y.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},p.a.createElement(F.a,null)),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(j.a,{type:"ghost",onClick:lt},"\u53D6\u6D88")))},ie=G("7ahc"),ge=G("HmJG"),fe=G("BjJ7"),ue=y.a.useForm,he={width:280,marginRight:10},_e={labelCol:{span:5},wrapperCol:{span:19}},le=function(De){var $e=De.callback,lt=De.onCancel,Bt=ue(),tn=Object(K.a)(Bt,1),nn=tn[0];function _n(ii){$e(ii)}function yn(ii,Dn){if(ii.status===-1){I.b.error(ii.message);return}nn.setFieldsValue({src:"/api/attachments/".concat(ii.id),type:Dn.type})}function Gt(ii){var Dn=ii.target.files[0];Te(Dn,yn)}return p.a.createElement(y.a,Object(w.a)({form:nn},_e,{className:"upload-image-panel",onFinish:_n}),p.a.createElement(y.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},p.a.createElement("div",{className:"flex-container"},p.a.createElement(y.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},p.a.createElement(F.a,{style:he})),p.a.createElement(ne,{onFileChange:Gt}))),p.a.createElement(y.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},p.a.createElement(F.a,{style:{width:264}})),p.a.createElement(y.a.Item,{style:{textAlign:"right"}},p.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(j.a,{type:"ghost",onClick:lt},"\u53D6\u6D88")))};function ne(De){var $e=De.onFileChange;return p.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",p.a.createElement("input",{type:"file",onChange:$e}))}function Te(De,$e){if(!De)throw new String("\u6CA1\u6709\u6587\u4EF6");var lt=new FormData;lt.append("editormd-image-file",De),lt.append("file_param_name","editormd-image-file"),lt.append("byxhr","true");var Bt=new window.XMLHttpRequest;Bt.withCredentials=!0,Bt.addEventListener("load",function(tn){$e(JSON.parse(tn.target.responseText),De)},!1),Bt.addEventListener("error",function(tn){console.error(tn)},!1),Bt.open("POST","".concat(fe.a,"/api/attachments.json")),Bt.send(lt)}var Fe=G("giR+"),Ke=G("fyUT"),Ue=G("7Kak"),He=G("9yH6"),Ne=He.a.Group,Be={margin:"0 8px"},Je=function(De){var $e=De.callback,lt=De.onCancel;function Bt(tn){$e(tn)}return p.a.createElement(y.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Bt},p.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},p.a.createElement("span",{style:Be},"\u5355\u5143\u683C\u6570\uFF1A"),p.a.createElement("span",{style:Be},"\u884C\u6570"),p.a.createElement(y.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},p.a.createElement(Ke.a,null)),p.a.createElement("span",{style:Be},"\u5217\u6570"),p.a.createElement(y.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},p.a.createElement(Ke.a,null))),p.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},p.a.createElement("span",{style:Be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),p.a.createElement(y.a.Item,{name:"align"},p.a.createElement(Ne,null,p.a.createElement(He.a,{value:"default"},p.a.createElement("i",{className:"fa fa-align-justify"})),p.a.createElement(He.a,{value:"left"},p.a.createElement("i",{className:"fa fa-align-left"})),p.a.createElement(He.a,{value:"center"},p.a.createElement("i",{className:"fa fa-align-center"})),p.a.createElement(He.a,{value:"right"},p.a.createElement("i",{className:"fa fa-align-right"}))))),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(j.a,{type:"ghost",onClick:lt},"\u53D6\u6D88")))},tt=G("ErOA"),it=G("7Cbv"),rt="link",qe="upload-image",gt="code-block",pt="add-table",vt="------------",at={default:vt,left:":".concat(vt),center:":".concat(vt,":"),right:"".concat(vt,":")},Rt=G("9VGf"),xt,Tt;function Ye(){}var Mt=0,St=1e4,ze="\u2581",ut=`
**\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 be(De){return/^\d+$/.test(De)?"".concat(De,"px"):De}var xe=navigator.platform.toUpperCase().indexOf("MAC")>=0,pe=xe?"Cmd":"Ctrl",se=["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"],ce=(xt={},Object(W.a)(xt,pe+"-B","bold"),Object(W.a)(xt,pe+"-I","italic"),xt),Ee=(Tt={},Object(W.a)(Tt,rt,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Tt,gt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Tt,qe,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Tt,pt,"\u6DFB\u52A0\u8868\u683C"),Tt),Ae=Xe.a=function(De){var $e=De.defaultValue,lt=$e===void 0?"":$e,Bt=De.onChange,tn=De.width,nn=tn===void 0?"100%":tn,_n=De.height,yn=_n===void 0?400:_n,Gt=De.miniToolbar,ii=Gt===void 0?!1:Gt,Dn=De.isFocus,Ci=Dn===void 0?!1:Dn,fi=De.watch,In=De.insertTemp,Ri=De.mode,Si=Ri===void 0?"markdown":Ri,Ot=De.id,bn=Ot===void 0?"markdown-editor-id":Ot,Cn=De.showResizeBar,kn=Cn===void 0?!1:Cn,Ai=De.noStorage,Ui=Ai===void 0?!1:Ai,dr=De.showNullButton,mn=dr===void 0?!1:dr,Jt=De.hidetoolBar,qi=Jt===void 0?!1:Jt,hr=De.fullScreen,sr=hr===void 0?!1:hr,Fn=De.onBlur,er=De.onCMBeforeChange,kr=De.onFullScreen,Qr=De.className,yt=Qr===void 0?"":Qr,cn=De.disablePaste,Kr=cn===void 0?!1:cn,zr=De.placeholder,na=zr===void 0?"":zr,Gr=De.values,$=Gr===void 0?"":Gr,S=Object(b.useState)(null),D=Object(K.a)(S,2),z=D[0],te=D[1],Y=Object(b.useState)(lt),Le=Object(K.a)(Y,2),ct=Le[0],Pt=Le[1],rn=Object(b.useState)(fi),ht=Object(K.a)(rn,2),Vt=ht[0],hi=ht[1],Li=Object(b.useState)(sr),Zt=Object(K.a)(Li,2),dt=Zt[0],kt=Zt[1],Lt=Object(b.useState)(""),Kt=Object(K.a)(Lt,2),sn=Kt[0],En=Kt[1],wn=Object(b.useState)(0),hn=Object(K.a)(wn,2),Ln=hn[0],zn=hn[1],un=Object(b.useState)(yn),Sn=Object(K.a)(un,2),di=Sn[0],Nn=Sn[1],zt=Object(b.useState)(!1),An=Object(K.a)(zt,2),si=An[0],Un=An[1],Xt=Object(b.useRef)(Object(it.a)()),jt=Object(b.useRef)(!1),pn=Object(b.useRef)(),Ct=Object(b.useRef)(),Nt=Object(b.useRef)(),Dt=Object(b.useRef)(),Pe=Object(b.useRef)(),Yt=function(){var Qt=Object(B.a)(P.a.mark(function qt(){var $t,dn;return P.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(tt.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Xt.current}});case 2:dn=Mn.sent,dn!=null&&($t=dn.attachments)!==null&&$t!==void 0&&$t.length&&(console.log("cm:",z,Ct),dn.attachments.map(function(qn){qn.content_type.indexOf("image")>-1?z.replaceSelection(".concat(qn.content_type,")")):qn.content_type.indexOf("video")>-1?z.replaceSelection('')):qn.content_type.indexOf("pdf")>-1?z.replaceSelection('').concat(qn.name,"")):z.replaceSelection("[".concat(qn.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(qn.id,"?type=").concat(qn.content_type,")"))}));case 4:case"end":return Mn.stop()}},qt)}));return function(){return Qt.apply(this,arguments)}}();Object(b.useEffect)(function(){Pt($),z==null||z.setValue($)},[$]),Object(b.useEffect)(function(){kr==null||kr(dt)},[dt]),Object(b.useEffect)(function(){if(Ct.current){var Qt=h.a.fromTextArea(Ct.current,{mode:Si,lineNumbers:!ii,lineWrapping:!0,value:lt,autoCloseTags:!0,autoCloseBrackets:!0});Ci&&Qt.focus();function qt($t,dn){if(Kr){dn.preventDefault();return}var Gn=dn.clipboardData;if(Gn){var Mn=Gn.types.toString(),qn=Gn.items;if(Mn==="Files"||Gn.types.indexOf("Files")>-1){if(dn.preventDefault(),Si=="stex")return;try{var mi,Tr=qn[1];((mi=qn[0])===null||mi===void 0?void 0:mi.kind)==="file"&&(Tr=qn[0]);var Zn=Tr.getAsFile(),$r=Zn.name.split(".").pop();Te(Zn,function(gi){if(gi.id){var fr,rr,Mr;(Zn==null||((fr=Zn.type)===null||fr===void 0)?void 0:fr.indexOf("image"))>-1?Qt.replaceSelection(".concat(gi.content_type,")")):(Zn==null||((rr=Zn.type)===null||rr===void 0)?void 0:rr.indexOf("video"))>-1?Qt.replaceSelection('')):(Zn==null||((Mr=Zn.type)===null||Mr===void 0)?void 0:Mr.indexOf("pdf"))>-1?Qt.replaceSelection('').concat(Zn.name,"")):se.includes($r)?Qt.replaceSelection('').concat(Zn.name,"")):Qt.replaceSelection("[".concat(Zn.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(gi.id,"?type=").concat(gi.content_type,")"))}else(gi==null?void 0:gi.status)===401&&(document.location.href="/user/login")})}catch(gi){I.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qt.on("paste",qt),Qt.on("dragleave",function($t,dn){Nt.current.classList.remove("mouse-hover-md")}),Qt.on("dragover",function($t,dn){Nt.current.classList.add("mouse-hover-md")}),Qt.on("drop",function($t,dn){Nt.current.classList.add("mouse-hover-md");var Gn;if(Gn=dn.dataTransfer.files,Gn.length>0){dn.preventDefault(),dn.stopPropagation();for(var Mn=function(Tr){var Zn=Gn[Tr],$r=Zn.name.split(".").pop();Te(Zn,function(gi){if(gi.id){var fr,rr,Mr;(Zn==null||((fr=Zn.type)===null||fr===void 0)?void 0:fr.indexOf("image"))>-1?Qt.replaceSelection(".concat(gi.content_type,")")):(Zn==null||((rr=Zn.type)===null||rr===void 0)?void 0:rr.indexOf("video"))>-1?Qt.replaceSelection('')):(Zn==null||((Mr=Zn.type)===null||Mr===void 0)?void 0:Mr.indexOf("pdf"))>-1?Qt.replaceSelection('').concat(Zn.name,"")):se.includes($r)?Qt.replaceSelection('').concat(Zn.name,"")):Qt.replaceSelection("[".concat(Zn.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(gi.id,"?type=").concat(gi.content_type,")"))}else(gi==null?void 0:gi.status)===401&&(document.location.href="/user/login")})},qn=0;qn0||qn.target.offsetWidth>0)&&(xn(),z.setSize("100%","100%"),z.refresh())}}catch(mi){Gn.e(mi)}finally{Gn.f()}});return $t.observe(Ct.current.parentElement),$t}if(z){var qt=Qt();return function(){qt.unobserve(Ct.current.parentElement)}}},[z,xn]),Object(b.useEffect)(function(){if(z){for(var Qt=[],qt=function(){var qn=dn[$t];Gn=Object(K.a)(qn,2);var mi=Gn[0],Tr=Gn[1],Zn=Object(W.a)({},mi,function(){pi(Tr)});Qt.push(Zn),z.addKeyMap(Zn)},$t=0,dn=Object.entries(ce);$t0){var Qt=new Date().getTime(),qt=window.sessionStorage.getItem(bn);Qt>=Ln+St&&(!qt||qt!==ct)&&(window.sessionStorage.setItem(bn,ct),Un(!0))}},St),Object(b.useEffect)(function(){hi(fi)},[z,fi]),Object(b.useEffect)(function(){z&&(Ci&&z.focus())},[z,Ci]),Object(b.useEffect)(function(){if(Vt&&z){var Qt=z.getScrollerElement();function qt($t){var dn=$t.target;if(Pe.current){var Gn=dn.scrollTop/dn.scrollHeight;Pe.current.scrollTop=Pe.current.scrollHeight*Gn}}return Qt.addEventListener("scroll",qt),function(){Qt.removeEventListener("scroll",qt)}}},[z,Vt]),Object(b.useEffect)(function(){if(z&&er){function Qt(qt,$t){er(qt,$t)}return z.on("beforeChange",Qt),function(){z.off("beforeChange",Qt)}}},[z,er]),Object(b.useEffect)(function(){if(z&&Fn){function Qt(){Fn(z.getValue())}return z.on("blur",Qt),function(){z.off("blur",Qt)}}},[z,Fn]),Object(b.useEffect)(function(){if(z){function Qt(qt){var $t=qt.getValue();Pt($t),zn(new Date().getTime()),qt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Bt&&Bt($t)}return z.on("change",Qt),function(){z.off("change",Qt)}}},[z,Bt]),Object(b.useEffect)(function(){z&&(lt==null?(z.setValue(""),Pt("")):lt!==z.getValue()&&(z.setValue(lt),Pt(lt),z.setCursor(z.lineCount(),0)))},[z,lt]);var pi=Object(b.useCallback)(function(Qt){var qt=z.getCursor(),$t=z.getSelection(),dn=$t.split(`
`);switch(Qt){case"bold":return z.replaceSelection("**"+$t+"**"),$t===""&&z.setCursor(qt.line,qt.ch+2),z.focus();case"italic":return z.replaceSelection("*"+$t+"*"),$t===""&&z.setCursor(qt.line,qt.ch+1),z.focus();case"code":return z.replaceSelection("`"+$t+"`"),$t===""&&z.setCursor(qt.line,qt.ch+1),z.focus();case"inline-latex":return z.replaceSelection("`$$"+$t+"$$`"),$t===""&&z.setCursor(qt.line,qt.ch+3),z.focus();case"latex":return z.replaceSelection("```latex\n"+$t+"\n```"),z.setCursor(qt.line+1,$t.length+1),z.focus();case"line-break":return z.replaceSelection(`
`),z.focus();case"list-ul":return $t===""?z.replaceSelection("- "+$t):z.replaceSelection(dn.map(function(Gn){return Gn===""?"":"- ".concat(Gn)}).join(`
`)),z.focus();case"list-ol":return $t===""?z.replaceSelection("1. "+$t):z.replaceSelection(dn.map(function(Gn,Mn){return Gn===""?"":"".concat(Mn+1,". ").concat(Gn)}).join(`
`)),z.focus();case"add-null-ch":return $t===""&&z.setCursor(qt.line,qt.ch+1),z.replaceSelection(ze),z.focus();case"inster-template-1":return $t===""&&z.setCursor(qt.line,qt.ch),z.replaceSelection(ut),z.focus();case"eraser":return z.setValue(""),z.focus();case"trigger-watch":return hi(!Vt),z.focus();case"trigger-full-screen":return kt(!dt),z.focus();case rt:En(rt);return;case gt:En(gt);return;case qe:En(qe);return;case pt:En(pt);return;default:throw new Error}},[z,Vt,dt]),On=Object(b.useCallback)(function(Qt){En("");switch(sn){case rt:var qt=Qt.title,$t=Qt.link;return z.replaceSelection("[".concat(qt,"](").concat($t,")")),z.focus();case gt:var dn=Qt.language,Gn=Qt.content;return z.replaceSelection(["```"+dn,Gn,"```"].join(`
`)),z.focus();case qe:var Mn=Qt.src,qn=Qt.alt;return qn?z.replaceSelection(".concat(Mn,' "').concat(qn,'" )')):z.replaceSelection("")),z.focus();case pt:for(var mi=Qt.row,Tr=Qt.col,Zn=Qt.align,$r=`
`,gi=0;gi300&&(mi=300);var Tr=yn+mi+"px";Nn(Tr)}}return Qt.addEventListener("mousedown",dn),document.addEventListener("mousemove",Mn),document.addEventListener("mouseup",Gn),function(){Qt.removeEventListener("mousedown",dn),document.removeEventListener("mousemove",Mn),document.removeEventListener("mouseup",Gn)}}},[z,Dt]),Object(b.useEffect)(function(){Nn(yn)},[yn]);var Fi=be(nn),Bn=be(di),Ft={width:Fi,height:Bn},yi=Object(b.useMemo)(function(){if(Ln){var Qt=new Date(Ln),qt=Qt.getHours(),$t=Qt.getMinutes(),dn=Qt.getSeconds();return qt=qt<10?"0"+qt:qt,$t=$t<10?"0"+$t:$t,dn=dn<10?"0"+dn:dn,"".concat(qt,":").concat($t,":").concat(dn)}return 0},[Ln]);function li(){window.sessionStorage.removeItem(bn),Un(!1),zn(0)}function $n(){Un(!1),zn(0),z.setValue(window.sessionStorage.getItem(bn))}function ir(Qt,qt){var $t=z.getValue();$t=$t.replace(Qt,qt),Pt($t),z==null||z.setValue($t)}return p.a.createElement(b.Fragment,null,p.a.createElement("div",{className:"markdown-editor-wrapper",ref:Nt},p.a.createElement("div",{className:"markdown-editor-container ".concat(yt," ").concat(Vt?"on-preview":""," ").concat(ii?"mini":""," ").concat(dt?"full-screen":""),style:Ft},p.a.createElement(C,{insertTemp:In,watch:Vt,fullScreen:dt,showNullButton:mn,onActionCallback:pi,hidetoolBar:qi,uuid:Xt.current,setOpenPhones:function(){jt.current=!0}}),p.a.createElement("div",{className:"markdown-editor-body"},p.a.createElement("div",{className:"codemirror-container"},p.a.createElement("textarea",{ref:Ct,placeholder:na})),Vt?p.a.createElement("div",{ref:Pe,className:"preview-container"},Si==="stex"&&p.a.createElement(A,{value:ct}),Si!=="stex"&&p.a.createElement(T.a,{edit:!0,value:ct,replaces:ir})):null))),kn?p.a.createElement("a",{ref:Dt,className:"editor-resize"}):null,p.a.createElement(N.a,null,Ee[sn]?p.a.createElement(Z.a,{centered:!0,title:Ee[sn],visible:!0,onCancel:nr,footer:null,className:"markdown-popup-form"},tr):null))}},"P/tu":function(ft,Xe,G){"use strict";var de=G("ozfa"),Z=G("MJZm"),M=G("0Owb"),V=G("9og8"),I=G("tJVT"),B=G("PpiC"),K=G("WmNS"),W=G.n(K),L=G("q1tI"),P=G.n(L),b=G("WCUW"),p=G("spXi"),_=G.n(p),h=function(d){var l=d.value,a=d.onChange,u=d.defaultValue,c=d.disabled,R=Object(B.a)(d,["value","onChange","defaultValue","disabled"]),O=Object(L.useState)([]),T=Object(I.a)(O,2),A=T[0],w=T[1],m=Object(L.useState)("1"),v=Object(I.a)(m,2),s=v[0],o=v[1];Object(L.useEffect)(function(){E()},[]);var E=function(){var N=Object(V.a)(W.a.mark(function U(){var j,H;return W.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,Object(b.A)({});case 2:j=x.sent,j!=null&&j.data&&(H=[{title:P.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:_.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:P.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:g(j.data||[])}],w(H),o("2"));case 4:case"end":return x.stop()}},U)}));return function(){return N.apply(this,arguments)}}(),g=function(U){function j(H){var y=H.children,x=Array.isArray(y)&&y.length>0,F=H==null?void 0:H.group_id;return{title:P.a.createElement("div",{title:H==null?void 0:H.name,className:_.a.name},H==null?void 0:H.name),value:F,key:F,icon:P.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:x?y==null?void 0:y.map(function(Q){return j(Q)}):[]}}return U==null?void 0:U.map(function(H){return j(H)})},C=u?{defaultExpandedKeys:[0]}:{selectedKeys:l,defaultExpandedKeys:l};return P.a.createElement("div",{className:_.a.customTree},P.a.createElement(Z.a,Object(M.a)({key:s},C,{showIcon:!0,treeData:A,onSelect:a,disabled:c},R)))};Xe.a=h},Q0Vu:function(ft,Xe,G){ft.exports={flex_box_center:"flex_box_center___3fHaw",flex_space_between:"flex_space_between___1tu3K",flex_box_vertical_center:"flex_box_vertical_center___3kmTT",flex_box_center_end:"flex_box_center_end___19OcD",flex_box_column:"flex_box_column___1aMoy",main:"main___JkLSb",wrap:"wrap___1k_Ib",content:"content___1by-P",programName:"programName___1mMSD",name:"name___2mlTd",directionContentWrap:"directionContentWrap___3qsxQ",directionItem:"directionItem___2aAvu",active:"active___ACZqb",subActive:"subActive___2RkoB",subItem:"subItem___3tJgX",subMenu:"subMenu___Y_7S_",action:"action___xqgFs"}},SAoR:function(ft,Xe,G){"use strict";var de=G("Q9mQ"),Z=G("diRs"),M=G("q1tI"),V=G.n(M),I=G("+z73"),B=G.n(I),K=function(L){var P=L.data,b=P===void 0?[]:P,p=L.onClick,_=function(){return b.map(function(d,l){return V.a.createElement("div",{key:l,className:B.a.few},V.a.createElement("b",{title:d.name,style:{color:l===0?"#333333":"#999999"},onClick:function(){return p(d.id)}},d.name),l1&&c5?h():_())};Xe.a=K},SJMd:function(ft,Xe){/**
* @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 G,de,Z,M=!1,V,I;window.PR_SHOULD_USE_CONTINUATION=!0;var B,K;(function(){var W=window,L=["break,continue,do,else,for,if,return,while"],P=[L,"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"],b=[P,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[b,"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"],_=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[b,"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"],r="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",d=[b,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[L,"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"],u=[L,"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"],c=[L,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[p,h,_,d,l,a,u,c],O=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",A="kwd",w="com",m="typ",v="lit",s="pun",o="pln",E="tag",g="dec",C="src",N="atn",U="atv",j="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function y(Ne){for(var Be=0,Je=!1,tt=!1,it=0,rt=Ne.length;it