(self.webpackChunk=self.webpackChunk||[]).push([[51461,64113,4977,90963,39752],{66455:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},t="5.0",n={},o=null,i=!1,a=!1,r=null,l=!1,s=null,c=null,u=0;u4?parseFloat(e):5};function j(){try{return window.self!==window.top}catch(e){return!0}}function A(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){c=e,F(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(s=e,Z(e,t))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){b=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var o,i="auto",a=n.id,r=!1,s=0;s=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var B=function(e){return e&&"false"!==e},N=function(t,n,o){y(m)<=4.2&&(o=!0);var i=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(i=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var a=document.createElement("div");a.classList.add("appletParameters","notranslate");var r=n.width,l=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(y(m)<=4.4)B(n.showToolBar)&&(n.height-=7),B(n.showAlgebraInput)&&(n.height-=37),n.width<605&&B(n.showToolBar)&&(n.width=605,r=605);else{var u=100;(B(n.showToolBar)||B(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),u=B(n.showMenuBar)?245:155),r=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(w),window.GGBT_wsf_view&&$(window).trigger("resize"),f(e)},x||w.appendChild(j)):a.appendChild(j),w.appendChild(a),x||t.appendChild(w),setTimeout((function(){e.resize()}),1)}function A(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),R("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function C(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){A(e.article,e.params)})),html5AppletsToProcess=null)},y(m)<5&&(e.className+=" geogebraweb")):A(e,t)}if(i){scriptLoadStarted=!0;for(var S=0;S0?(i.remove(),l.attr("id","fullscreencontent").show(),jQuery(a).append(l),window.dispatchEvent(new Event("resize"))):N(i,t,!1),window.GGBT_wsf_view.launchFullScreen(a)}else h=o,N(e,t,!1);if(!window.GGBT_wsf_view)for(r=0;re/4*3&&(l=e/4*3),s=l/5.8,r.setAttribute("src",x),r.setAttribute("width",l),r.setAttribute("height",s);var u=(e-l)/2,d=(t-s)/2;r.style.left=u+"px",r.style.top=d+"px",i.appendChild(r)}return i.appendChild(c),i},L=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},O=["web","webSimple","web3d","tablet","tablet3d","phone"],Z=function(e,t){if(m=e,t)F(m,!0);else{var a,r,l=!i;if(l){var s=y(m);!isNaN(s)&&s<4.4&&(l=!1)}a="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=m.indexOf("//");for(var u in r=c>0?m:0===c?a+m:"https://www.geogebra.org/apps/5.2.814.0/",O)if(m.slice(-1*O[u].length)===O[u]||m.slice(-1*(O[u].length+1))===O[u]+"/")return void F(r,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!l||o.is3D||o.AV||o.SV||o.CV||o.EV2||o.CP||o.PC||o.DA||o.FI||o.PV||B(n.showToolBar)||B(n.showMenuBar)||B(n.showAlgebraInput)||B(n.enableRightClick)||n.appName&&"classic"!=n.appName?r+="web3d/":r+="webSimple/",F(r,!1)}},F=function(e,t){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===t&&(t=-1===e.indexOf("http")),f=t,g="web.nocache.js",v=!1;var n=p.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?O.indexOf(n[n.length-2])>=0&&(g=n[n.length-2]+".nocache.js"):(g="webSimple.nocache.js",v=!0)),n=e.split("/"),"test"===(m=n[n.length-3]).substr(0,4)?m=m.substr(4,1)+"."+m.substr(5,1):"war"!==m.substr(0,3)&&"beta"!==m.substr(0,4)||(m="5.0");var o=parseFloat(m);NaN!==o&&o<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+o+" is deprecated. Using version latest instead."),Z("5.0",t))}},R=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function G(){var e=t;null!==s?e=s:parseFloat(e)<5&&(e="5.0"),Z(e,!1),null!==c&&F(c,f),l=!0}return void 0!==n.material_id?C(G):G(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,o,i){if(e.isScreenshoGenerator)return 1;var a,r=void 0!==o&&o,l=null!=e.noScaleMargin&&e.noScaleMargin,s=(a=e.autoHeight)&&"false"!==a,c=function(e,t,n,o,i,a){var r=null;if(null!=a&&""!=a)for(var l=e.parentNode;null!=l;){if((" "+l.className+" ").indexOf(" "+a+" ")>-1){r=l;break}l=l.parentNode}var s=0,c=0,u=0,d=0,p=0,f=0,h=0;if(r)s=r.offsetWidth,c=Math.max(o?r.offsetWidth:0,r.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(s=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=s):(s=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=s&&(void 0===i||!i)&&("rtl"===document.dir?(p=s-m.width-m.left,f=u<=480?10:30):(f=m.left,p=u<=480?10:30),d=f+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,h=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,h=40))}return e&&((void 0===n||!n)&&t>0&&t+d1&&(r=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(r=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?a:(i=n(e,t,r,o,e.scaleContainerClass),!r||e.hasOwnProperty("scale")&&1!==a?Math.min(a,i):i)}function i(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),o=e.getBoundingClientRect(),i=(t-o.width)/2,a=(n-o.height)/2;a<0&&(a=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=i<40?"40px":i+"px",e.style.top=a+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=a<40?"40px":a+"px",e.style.left=i+"px")}return{responsiveResize:function(n,a){var r=n.querySelector(".appletParameters");if(r){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(a.id!==r.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(r.parentElement&&/fullscreen/.test(r.parentElement.className))return;var l=o(a,n);e()&&r.setAttribute("data-param-scale",l);for(var s=null,c=0;c=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var o=e.lastIndexOf(tb,Math.min(n,t));return o>=O?e.substring(O,o+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;nO?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,o=[],i=[];function a(e){var t=i[e](),n=o[e];if(t in n)return t;var a=[];for(var l in n)a[n[l]]=l;throw r&&r(e,a,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in o[e]},webModule.__getPropMap=function(){var e={};for(var t in o)o.hasOwnProperty(t)&&(e[t]=a(t));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var l=(e=Cb).indexOf(Db);-1!=l&&(t=parseInt(e.substring(l+P),$),e=e.substring(O,l))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},o=e[webModule.__softPermutationId],i=O;i0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],o=0;o0&&(a=10+n*i);var r=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);o>40&&(r=40);var l=this.randomNum(-10,10);e.translate(a,r),e.rotate(l*Math.PI/180),e.fillText(t,0,0),e.rotate(-l*Math.PI/180),e.translate(-a,-r)}},{key:"drawLine",value:function(e){for(var t=0;t<1;t++)e.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.stroke()}},{key:"drawDot",value:function(e){for(var t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),e.fill()}},{key:"randomCode",value:function(){for(var e=this,t="",n=0;n0){for(var o=r.elt(l-1);null!==o&&o.isTreeExpanded&&!o.isTreeLeaf;){o=this._sortTreeChildrenByY(o).last()}null!==o&&e.select(o)}else e.select(a)}else if("Down"===n.key){var i;if(t.isTreeExpanded&&!t.isTreeLeaf)null!==(i=this._sortTreeChildrenByY(t).first())&&e.select(i);else for(;null!==t;){var a,r,l;if(null===(a=t.findTreeParentNode()))break;if((l=(r=this._sortTreeChildrenByY(a)).indexOf(t))o.y?1:n.xo.x?1:0})),t},K.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},K.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(K.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(K.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var V=K,q=(n(31270),n(85160)),J=n(43418),Y=n(43604),Q=n(51136),X="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=U;var ee=function(e){var t=e.onCancel,n=e.callback,o=(0,c.useRef)(),i=(0,c.useRef)(),a=(0,c.useRef)(),l=(0,c.useRef)(!1),s=(0,c.useRef)(!1),u=(0,c.useState)(0),d=r()(u,2),p=d[0],f=d[1],m=function(){var e=_()(H()().mark((function e(){var t,i;return H()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.current.makeImage(),e.next=3,(0,Q.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:t.src}});case 3:i=e.sent,n({src:i.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){f(p+1)}),[]),(0,h.jsx)("div",{ref:s,className:l.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,h.jsx)(J.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:s.current,rootClassName:"zIndex-9999",title:(0,h.jsxs)(Z.Z,{children:[(0,h.jsx)(Y.Z,{flex:1,children:"插入流程图"}),(0,h.jsx)(Y.Z,{onClick:function(){l.current=!l.current,f(p+1)},children:(0,h.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:t,children:(0,h.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,h.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,h.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,h.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,h.jsx)("div",{style:{height:"calc(100% - 50px)"},className:X,ref:a})]}),(0,h.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,h.jsx)(q.FI,{initDiagram:function(){var e=U.GraphObject.make,t="#ff3333",n="#3358ff",r="#25ad23",l="#d533ff",s="#7d33ff",c="#ff6233",u="#ffffff",d="#000000",p="#fffcd5",f="#d5ebff",h="#f2dfe0",m="#a5d2fa",g="#cccccc",v="#b3e6b3",w="#fcbbbd";function x(t,n){var o=function(e,n){e.handled=!0,e.diagram.model.commit((function(o){var i=n.part.adornedPart,a=(new U.Point).setRectSpot(i.actualBounds,t);a.subtract(i.location),a.scale(2,2),a.x+=130*Math.sign(a.x),a.y+=130*Math.sign(a.y),a.add(i.location),a.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var r=o.copyNodeData(i.data);o.setGroupKeyForNodeData(r,o.getGroupKeyForNodeData(i.data)),o.addNodeData(r);var l={from:i.key,to:o.getKeyForNodeData(r)};o.addLinkData(l);var s=e.diagram.findNodeForData(r);s.location=a,e.diagram.select(s),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(U.Shape,{figure:n,alignment:t,alignmentFocus:t.opposite(),width:t.equals(U.Spot.Top)||t.equals(U.Spot.Bottom)?25:18,height:t.equals(U.Spot.Top)||t.equals(U.Spot.Bottom)?18:25,fill:"orange",stroke:u,strokeWidth:4,mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},isActionable:!0,click:o,contextClick:o})}function b(t){return e(U.Shape,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},click:function(e,t){e.diagram.commandHandler.showContextMenu(t.part.adornedPart)}},t||{})}function y(e,t){return function(n,o){n.handled=!0,n.diagram.model.commit((function(n){n.set(o.part.adornedPart.data,e,t)}))}}function j(t,n){return n||(n="color"),e(U.Shape,{width:16,height:16,stroke:"lightgray",fill:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.stroke="dodgerblue"},mouseLeave:function(e,t){return t.stroke="lightgray"},click:y(n,t),contextClick:y(n,t)})}function A(){return[e("ContextMenuButton",e(U.Panel,"Horizontal",j(u,"fill"),j(p,"fill"),j(f,"fill"),j(h,"fill"))),e("ContextMenuButton",e(U.Panel,"Horizontal",j(g,"fill"),j(v,"fill"),j(m,"fill"),j(w,"fill")))]}function C(){return[e("ContextMenuButton",e(U.Panel,"Horizontal",j(d),j(r),j(n),j(t))),e("ContextMenuButton",e(U.Panel,"Horizontal",j(u),j(l),j(s),j(c)))]}function S(t,n){return n||(n="thickness"),e(U.Shape,"LineH",{width:16,height:16,strokeWidth:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y(n,t),contextClick:y(n,t)})}function k(t,n){return n||(n="dash"),e(U.Shape,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y(n,t),contextClick:y(n,t)})}function B(){return[e("ContextMenuButton",e(U.Panel,"Horizontal",S(1),S(2),S(3),S(4))),e("ContextMenuButton",e(U.Panel,"Horizontal",k(null),k([2,4]),k([4,4])))]}function N(t,n){return n||(n="figure"),e(U.Shape,{width:32,height:32,scale:.5,fill:"lightgray",figure:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="lightgray"},click:y(n,t),contextClick:y(n,t)})}function P(t){return e(U.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(t+4).toString()+" H3"})}function T(t){var n="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===t?n="M0 0 M16 16 M0 8 L16 8":2===t&&(n="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(U.Shape,{geometryString:n,margin:2,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y("dir",t),contextClick:y("dir",t)})}function E(t){var n=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var o=n.part.adornedPart;e.set(o.data,t?"toSpot":"fromSpot",U.Spot.stringify(U.Spot.AllSides)),(t?o.toNode:o.fromNode).invalidateConnectedLinks()}))};return e(U.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:n,contextClick:n})}function D(t,n){var o=0,i=U.Spot.RightSide;t.equals(U.Spot.Top)?(o=270,i=U.Spot.TopSide):t.equals(U.Spot.Left)?(o=180,i=U.Spot.LeftSide):t.equals(U.Spot.Bottom)&&(o=90,i=U.Spot.BottomSide),n||(o-=180);var a=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var o=t.part.adornedPart;e.set(o.data,n?"toSpot":"fromSpot",U.Spot.stringify(i)),(n?o.toNode:o.fromNode).invalidateConnectedLinks()}))};return e(U.Shape,{alignment:t,alignmentFocus:t.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:o,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:a,contextClick:a})}return o.current=new U.Diagram(i.current,{padding:20,grid:e(U.Panel,"Grid",e(U.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(U.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(V),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var t=e.subject;t.location=t.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject;setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var t=e.subject;e.diagram.toolManager.linkingTool.isForwards?t.toNode.invalidateConnectedLinks():t.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),o.current.nodeTemplate=e(U.Node,"Auto",{locationSpot:U.Spot.Center,locationObjectName:"SHAPE",desiredSize:new U.Size(120,60),minSize:new U.Size(40,40),resizable:!0,resizeCellSize:new U.Size(10,10),rotatable:!0},new U.Binding("location","loc",U.Point.parse).makeTwoWay(U.Point.stringify),new U.Binding("desiredSize","size",U.Size.parse).makeTwoWay(U.Size.stringify),e(U.Shape,{name:"SHAPE",fill:u,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:U.Spot.AllSides,toSpot:U.Spot.AllSides},new U.Binding("figure"),new U.Binding("fill"),new U.Binding("stroke","borderColor"),new U.Binding("strokeWidth","thickness"),new U.Binding("strokeDashArray","dash")),e(U.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(U.TextBlock,{margin:1,textAlign:"center",overflow:U.TextBlock.OverflowEllipsis,editable:!0},new U.Binding("text").makeTwoWay(),new U.Binding("stroke","color"))),o.current.nodeTemplate.toolTip=e("ToolTip",e(U.Panel,"Vertical",{maxSize:new U.Size(200,NaN)},e(U.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new U.Binding("text")),e(U.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new U.Binding("text","details")))),o.current.nodeTemplate.selectionAdornmentTemplate=e(U.Adornment,"Spot",e(U.Placeholder,{padding:10}),x(U.Spot.Top,"TriangleUp"),x(U.Spot.Left,"TriangleLeft"),x(U.Spot.Right,"TriangleRight"),x(U.Spot.Bottom,"TriangleDown"),b({alignment:new U.Spot(.75,0)})),o.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(U.Panel,"Horizontal",N("Rectangle"),N("RoundedRectangle"),N("Ellipse"),N("Diamond"))),e("ContextMenuButton",e(U.Panel,"Horizontal",N("Parallelogram2"),N("ManualOperation"),N("Procedure"),N("Cylinder1"))),e("ContextMenuButton",e(U.Panel,"Horizontal",N("Terminator"),N("CreateRequest"),N("Document"),N("TriangleDown"))),A(),C(),B()),o.current.groupTemplate=e(U.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:U.Spot.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,t){t.addMembers(t.diagram.selection,!0)||t.diagram.currentTool.doCancel()},avoidable:!1},new U.Binding("location","loc",U.Point.parse).makeTwoWay(U.Point.stringify),e(U.Panel,"Auto",{name:"BODY"},e(U.Shape,{parameter1:10,fill:u,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:U.Spot.AllSides,toSpot:U.Spot.AllSides},new U.Binding("fill"),new U.Binding("stroke","color"),new U.Binding("strokeWidth","thickness"),new U.Binding("strokeDashArray","dash")),e(U.Placeholder,{background:"transparent",margin:20})),e(U.TextBlock,{alignment:U.Spot.Top,alignmentFocus:U.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new U.Binding("text"),new U.Binding("stroke","color"))),o.current.groupTemplate.selectionAdornmentTemplate=e(U.Adornment,"Spot",e(U.Panel,"Auto",e(U.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(U.Placeholder,{margin:1.5})),b({alignment:U.Spot.TopRight,alignmentFocus:U.Spot.BottomRight})),o.current.groupTemplate.contextMenu=e("ContextMenu",A(),C(),B()),o.current.linkTemplate=e(U.Link,{layerName:"Foreground",routing:U.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new U.Binding("fromSpot","fromSpot",U.Spot.parse),new U.Binding("toSpot","toSpot",U.Spot.parse),new U.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new U.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new U.Binding("points").makeTwoWay(),e(U.Shape,{strokeWidth:2},new U.Binding("stroke","color"),new U.Binding("strokeWidth","thickness"),new U.Binding("strokeDashArray","dash")),e(U.Shape,{segmentIndex:0,segmentOffset:new U.Point(15,0),segmentOrientation:U.Link.OrientAlong,alignmentFocus:U.Spot.Right,figure:"circle",width:10,strokeWidth:0},new U.Binding("fill","color"),new U.Binding("visible","dir",(function(e){return 1===e}))),e(U.Shape,{segmentIndex:-1,segmentOffset:new U.Point(-10,6),segmentOrientation:U.Link.OrientPlus90,alignmentFocus:U.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new U.Binding("fill","color"),new U.Binding("visible","dir",(function(e){return e>=1})),new U.Binding("width","thickness",(function(e){return 7+3*e})),new U.Binding("height","thickness",(function(e){return 7+3*e})),new U.Binding("segmentOffset","thickness",(function(e){return new U.Point(-15,4+1.5*e)}))),e(U.Shape,{segmentIndex:0,segmentOffset:new U.Point(15,-6),segmentOrientation:U.Link.OrientMinus90,alignmentFocus:U.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new U.Binding("fill","color"),new U.Binding("visible","dir",(function(e){return 2===e})),new U.Binding("width","thickness",(function(e){return 7+3*e})),new U.Binding("height","thickness",(function(e){return 7+3*e})),new U.Binding("segmentOffset","thickness",(function(e){return new U.Point(-15,4+1.5*e)}))),e(U.TextBlock,{alignmentFocus:new U.Spot(0,1,-4,0),editable:!0},new U.Binding("text").makeTwoWay(),new U.Binding("stroke","color"))),o.current.linkTemplate.selectionAdornmentTemplate=e(U.Adornment,e(U.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:P(2)},new U.Binding("pathPattern","thickness",P)),b({alignmentFocus:new U.Spot(0,0,-6,-4)})),o.current.linkTemplate.contextMenu=e("ContextMenu",C(),B(),e("ContextMenuButton",e(U.Panel,"Horizontal",T(0),T(1),T(2))),e("ContextMenuButton",e(U.Panel,"Horizontal",e(U.Panel,"Spot",E(!1),D(U.Spot.Top,!1),D(U.Spot.Left,!1),D(U.Spot.Right,!1),D(U.Spot.Bottom,!1)),e(U.Panel,"Spot",{margin:new U.Margin(0,0,0,2)},E(!0),D(U.Spot.Top,!0),D(U.Spot.Left,!0),D(U.Spot.Right,!0),D(U.Spot.Bottom,!0))))),new U.Palette(a.current,{maxSelectionCount:1,linkTemplate:e(U.Link,{locationSpot:U.Spot.Center,selectionAdornmentTemplate:e(U.Adornment,"Link",{locationSpot:U.Spot.Center},e(U.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(U.Shape,{toArrow:"Standard",stroke:null}))},{routing:U.Link.AvoidsNodes,curve:U.Link.JumpOver,corner:5,toShortLength:4},new U.Binding("points"),e(U.Shape,{isPanelMain:!0,strokeWidth:2}),e(U.Shape,{toArrow:"Standard",stroke:null})),model:new U.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(W()(U.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(U.Node,"Auto",{locationSpot:U.Spot.Center},new U.Binding("location","location",U.Point.parse).makeTwoWay(U.Point.stringify),e(U.Shape,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new U.Binding("stroke").makeTwoWay(),new U.Binding("fill").makeTwoWay(),new U.Binding("figure")),e(U.TextBlock,{margin:new U.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new U.Size(16,16),maxSize:new U.Size(10,NaN),textAlign:"center",editable:!0},new U.Binding("key").makeTwoWay())),setTimeout((function(){o.current.grid=e(U.Panel,"Grid",e(U.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(U.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),o.current.grid.visible=!0,o.current.grid.gridCellStroke="darkgray",o.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=o.current,o.current},divClassName:"diagram-component",style:{height:"80vh"}}),(0,h.jsx)("div",{ref:i})]})]}),(0,h.jsx)("div",{className:"tr",children:(0,h.jsx)(C.ZP,{size:"large",onClick:m,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},te=n(5112),ne=n(54449),oe=te.ZP.Group,ie={margin:"0 8px"},ae=function(e){var t=e.callback,n=e.onCancel;return(0,h.jsxs)(j.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,h.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,h.jsx)("span",{style:ie,children:"单元格数:"}),(0,h.jsx)("span",{style:ie,children:"行数"}),(0,h.jsx)(j.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,h.jsx)(ne.Z,{})}),(0,h.jsx)("span",{style:ie,children:"列数"}),(0,h.jsx)(j.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,h.jsx)(ne.Z,{})})]}),(0,h.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,h.jsx)("span",{style:ie,children:"对齐方式:"}),(0,h.jsx)(j.Z.Item,{name:"align",children:(0,h.jsxs)(oe,{children:[(0,h.jsx)(te.ZP,{value:"default",children:(0,h.jsx)("i",{className:"fa fa-align-justify"})}),(0,h.jsx)(te.ZP,{value:"left",children:(0,h.jsx)("i",{className:"fa fa-align-left"})}),(0,h.jsx)(te.ZP,{value:"center",children:(0,h.jsx)("i",{className:"fa fa-align-center"})}),(0,h.jsx)(te.ZP,{value:"right",children:(0,h.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(C.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(C.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},re=n(78673),le=n(66455),se=n.n(le),ce=(0,c.forwardRef)((function(e,t){var n=e.use3d,o=e.width,i=e.height,a=e.callback,l=(e.showSaveButton,(0,c.useRef)()),s=(0,c.useRef)(),u=(0,c.useState)(!1),d=r()(u,2),p=d[0],f=d[1],m=(0,c.useRef)({id:l,appName:"graphing",width:o||1e3,height:i||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){s.current=new(se())(m.current,!0),window.onload=function(){s.current.inject("applet_container")}}),[]);var g=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return a&&a(e),e};return(0,c.useEffect)((function(){m.current.appName=p?"3D":"graphing",s.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){f(n)}),[n]),(0,c.useImperativeHandle)(t,(function(){return{getImgData:g}})),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:l}),(0,h.jsxs)(Z.Z,{align:"middle",children:[(0,h.jsx)(Y.Z,{flex:1,children:(0,h.jsx)(re.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return f(e)}})}),(0,h.jsx)(Y.Z,{children:(0,h.jsx)(C.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ue=n(33773),de=n(27065),pe="link",fe="upload-image",he="add-flowchart",me="draw-image",ge="code-block",ve="add-table",we="------------",xe={default:we,left:":".concat(we),center:":".concat(we,":"),right:"".concat(we,":")},be=n(56266);var ye="@▁▁@",je=["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"];function Ae(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var Ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Se=s()(s()({},Ce+"-B","bold"),Ce+"-I","italic"),ke=s()(s()(s()(s()(s()(s()(s()(s()({},pe,"添加链接"),ge,"添加代码块"),fe,"添加图片"),me,"添加画图"),he,"插入流程图"),ve,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Be=function(e){var t=e.defaultValue,n=void 0===t?"":t,o=e.onChange,a=e.width,l=void 0===a?"100%":a,u=e.height,g=void 0===u?400:u,v=e.miniToolbar,w=void 0!==v&&v,x=e.isFocus,j=void 0!==x&&x,A=e.watch,C=e.insertTemp,S=e.mode,P=void 0===S?"markdown":S,T=e.id,E=void 0===T?"markdown-editor-id":T,D=e.showResizeBar,L=void 0!==D&&D,Z=e.noStorage,F=void 0!==Z&&Z,G=e.showNullButton,H=void 0!==G&&G,z=e.showNullProgramButton,_=void 0!==z&&z,I=e.hidetoolBar,W=void 0!==I&&I,U=e.fullScreen,K=void 0!==U&&U,V=e.onBlur,q=e.onCMBeforeChange,Y=e.onFullScreen,Q=e.className,X=void 0===Q?"":Q,$=e.disablePaste,te=void 0!==$&&$,ne=e.disabled,oe=void 0!==ne&&ne,ie=e.disabledFill,re=void 0!==ie&&ie,le=e.placeholder,se=void 0===le?"":le,we=e.values,Ce=void 0===we?"":we,Be=e.extraUse,Ne=(0,c.useState)(null),Pe=r()(Ne,2),Te=Pe[0],Ee=Pe[1],De=(0,c.useState)(n),Me=r()(De,2),Le=Me[0],Oe=Me[1],Ze=(0,c.useState)(A),Fe=r()(Ze,2),Re=Fe[0],Ge=Fe[1],He=(0,c.useState)(K),ze=r()(He,2),_e=ze[0],Ie=ze[1],We=(0,c.useState)(""),Ue=r()(We,2),Ke=Ue[0],Ve=Ue[1],qe=(0,c.useState)(0),Je=r()(qe,2),Ye=Je[0],Qe=Je[1],Xe=(0,c.useState)(g),$e=r()(Xe,2),et=$e[0],tt=$e[1],nt=(0,c.useState)(!1),ot=r()(nt,2),it=(ot[0],ot[1]),at=(0,c.useState)(0),rt=r()(at,2),lt=rt[0],st=rt[1],ct=(0,c.useState)(0),ut=r()(ct,2),dt=ut[0],pt=ut[1],ft=(0,c.useRef)(),ht=(0,c.useRef)(),mt=(0,c.useRef)(),gt=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Oe(Ce),null==Te||Te.setValue(Ce),window.scrollTo(0,e)}),[Ce]),(0,c.useEffect)((function(){null==Y||Y(_e)}),[_e]),(0,c.useEffect)((function(){if(ft.current){var e=function(e,n){if(!te){var o=n.clipboardData;if(o){var i=o.types.toString(),a=o.items;if("Files"===i||o.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==P)return;try{var r,l=a[1];"file"===(null===(r=a[0])||void 0===r?void 0:r.kind)&&(l=a[0]);var s=l.getAsFile(),c=s.name.split(".").pop();O(s,(function(e){var n,o,i;e.id?(null==s||null===(n=s.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==s||null===(o=s.type)||void 0===o?void 0:o.indexOf("video"))>-1?t.replaceSelection('')):(null==s||null===(i=s.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?t.replaceSelection('').concat(s.name,"")):je.includes(c)?t.replaceSelection('').concat(s.name,"")):t.replaceSelection("[".concat(s.name,"](").concat(de.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){N.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=d().fromTextArea(ft.current,{mode:P,lineNumbers:!w,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",se):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),o=n.getCursor(),i=n.getLine(o.line),a=i.charAt(o.ch-1),r=i.lastIndexOf("@▁@",o.ch),l=i.lastIndexOf("@▁▁@",o.ch),s=r>l?r:l,c=r>l?3:4;if(-1===ye.indexOf(a))return null;if(console.log("change1:",t,e,i,o,s,r,l,a),s>=0&&o.ch-s<5){var u=s+c;return n.replaceRange("",{line:o.line,ch:s},{line:o.line,ch:u}),{line:o.line,ch:u}}return null}(e);n&&t.preventDefault()}})),j&&t.focus(),t.on("paste",e),oe&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Ee(t),function(){t.off("paste",e)}}}),[]);var vt=(0,c.useCallback)((function(){ht.current}),[et,ht,_e]);(0,c.useEffect)((function(){if(Te){var e=function(){var e=new p.Z((function(e){var t,n=i()(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;(o.target.offsetHeight>0||o.target.offsetWidth>0)&&(vt(),Te.setSize("100%","100%"),Te.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(ft.current.parentElement),e}();return function(){var t,n;null!==(t=ft.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=ft.current)||void 0===n?void 0:n.parentElement)}}}),[Te,vt]),(0,c.useEffect)((function(){if(Te){for(var e=[],t=function(){var t=r()(o[n],2),i=t[0],a=t[1],l=s()({},i,(function(){wt(a)}));e.push(l),Te.addKeyMap(l)},n=0,o=Object.entries(Se);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(E);e>=Ye+1e4&&(!t||t!==Le)&&(window.sessionStorage.setItem(E,Le),it(!0))}}),1e4),(0,c.useEffect)((function(){Ge(A)}),[Te,A]),(0,c.useEffect)((function(){Te&&j&&Te.focus()}),[Te,j]),(0,c.useEffect)((function(){if(Re&&Te){var e=function(e){var t=e.target;if(gt.current){var n=t.scrollTop/t.scrollHeight;gt.current.scrollTop=gt.current.scrollHeight*n}},t=Te.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[Te,Re]),(0,c.useEffect)((function(){if(Te&&q){var e=function(e,t){q(e,t)};return Te.on("beforeChange",e),function(){Te.off("beforeChange",e)}}}),[Te,q]),(0,c.useEffect)((function(){if(Te&&V){var e=function(){V(Te.getValue())};return Te.on("blur",e),function(){Te.off("blur",e)}}}),[Te,V]),(0,c.useEffect)((function(){if(Te){var e=function(e,t){var n=e.getValue();Oe(n),Qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),o&&(_?o(n,At(n)):o(n))};return Te.on("change",e),function(){Te.off("change",e)}}}),[Te,o]),(0,c.useEffect)((function(){if(Te)if(null==n)Te.setValue(""),Oe("");else{var e=window.scrollY||window.pageYOffset;n!==Te.getValue()&&(Te.setValue(n),Oe(n),Te.setCursor(oe?1:Te.lineCount(),0),window.scrollTo(0,e))}}),[Te,n]);var wt=(0,c.useCallback)((function(e){var t=Te.getCursor(),n=Te.getSelection(),o=n.split("\n");switch(e){case"bold":return Te.replaceSelection("**"+n+"**"),""===n&&Te.setCursor(t.line,t.ch+2),Te.focus();case"italic":return Te.replaceSelection("*"+n+"*"),""===n&&Te.setCursor(t.line,t.ch+1),Te.focus();case"code":return Te.replaceSelection("`"+n+"`"),""===n&&Te.setCursor(t.line,t.ch+1),Te.focus();case"inline-latex":return Ve("inline-latex"),Te.focus();case"latex":return Te.replaceSelection("```latex\n"+n+"\n```"),Te.setCursor(t.line+1,n.length+1),Te.focus();case"line-break":return Te.replaceSelection("
\n"),Te.focus();case"list-ul":return""===n?Te.replaceSelection("- "+n):Te.replaceSelection(o.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Te.focus();case"list-ol":return""===n?Te.replaceSelection("1. "+n):Te.replaceSelection(o.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),Te.focus();case"add-null-ch":return""===n&&Te.setCursor(t.line,t.ch),Te.replaceSelection("▁"),Te.focus();case"add-signal":return""===n&&Te.setCursor(t.line,t.ch),Te.replaceSelection("@▁@"),Te.focus();case"add-multiple":return""===n&&Te.setCursor(t.line,t.ch),Te.replaceSelection(ye),Te.focus();case"inster-template-1":return""===n&&Te.setCursor(t.line,t.ch),Te.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Te.focus();case"eraser":return Te.setValue(""),Te.focus();case"trigger-watch":return Ge(!Re),Te.focus();case"trigger-full-screen":return Ie(!_e),Te.focus();case pe:return void Ve(pe);case ge:return void Ve(ge);case fe:return void Ve(fe);case me:return void Ve(me);case"maths-latex":return void Ve("maths-latex");case he:return void Ve(he);case ve:return void Ve(ve);default:throw new Error}}),[Te,Re,_e]),xt=(0,c.useCallback)((function(e,t){var n,o,i,a,r;switch(Ve(""),Ke){case pe:var l=e.title,s=e.link;return Te.replaceSelection("[".concat(l,"](").concat(s,")")),Te.focus();case ge:var c=e.language,u=e.content;return Te.replaceSelection(["```"+c,u,"```"].join("\n")),Te.focus();case"maths-latex":for(var d=atob(e),p=new Uint8Array(d.length),f=0;f-1||null==g||!g.type?m?Te.replaceSelection("![ ".concat(m," ]( ").concat(h,' "').concat(m,'" )')):Te.replaceSelection("![,](".concat(h,")")):(null==g||null===(a=g.type)||void 0===a?void 0:a.indexOf("video"))>-1?Te.replaceSelection('')):(null==g||null===(r=g.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?Te.replaceSelection('').concat(g.name,"")):je.includes(v)?Te.replaceSelection('').concat(g.name,"")):Te.replaceSelection("[".concat(g.name,"](").concat(de.Z.API_SERVER).concat(h,")")),Te.focus();case ve:for(var w=e.row,x=e.col,b=e.align,y="\n",j=0;j300&&(t=300),tt(g+t+"px")}},o=mt.current,i=!1,a=0;return o.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){o.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[Te,mt]),(0,c.useEffect)((function(){tt(g)}),[g]);var jt={width:Ae(l),height:Ae(et)},At=((0,c.useMemo)((function(){if(Ye){var e=new Date(Ye),t=e.getHours(),n=e.getMinutes(),o=e.getSeconds();return n=n<10?"0"+n:n,o=o<10?"0"+o:o,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(o)}return 0}),[Ye]),function(e){var t=[];if(_){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,o){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,c.useEffect)((function(){if(ke[Ke]&&Ke!==me&&Ke!==he){var e=document.getElementsByClassName("ant-modal")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;st(t),pt(n)}}),[Ke]);var Ct=function(e,t,n,o){var i=document.body.clientHeight,a=document.body.clientWidth;return!(e<20&&n>e||e>a-20&&nt||t>i-20&&o0&&(0,l.jsx)("div",{className:r,children:n.map((function(e,t){return(0,l.jsxs)("div",{onClick:e.click,children:[e.name,e.sign?(0,l.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSH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6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",width:39}):null]},t)}))}),p]}),o&&(0,l.jsx)("img",{style:{marginTop:33,marginRight:38},src:o,width:c})]})})},c=n(79800),u=n.n(c),d="row___aXJjm",p="title___HUKL0",f="tagsWrap___XB2W3",h="action___VdHb1",m="bar___t1kKC",g="tag___V7Eft",v="name___Hk1Ip",w="num___xQpcH",x="active___XryTX",b="tagsBorderWrap___OMxjs",y=n(92310),j=n.n(y),A=n(89392),C=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.value,a=e.onChange,r=e.onTitleChange,s=e.className,c=e.title,y=e.titleWidth,C=void 0===y?41:y,S=e.style,k=void 0===S?{}:S,B=e.fontColor,N=void 0===B?"#6A7283":B,P=e.showCount,T=(0,o.useState)(0),E=u()(T,2),D=E[0],M=E[1],L=(0,o.useState)(!1),O=u()(L,2),Z=O[0],F=O[1],R=(0,o.useRef)(null),G=(0,o.useRef)(null);return(0,o.useEffect)((function(){var e;0!==n.length&&((null==R||null===(e=R.current)||void 0===e?void 0:e.clientHeight)>97?M(1):M(0));0===n.length&&M(0),F(!1)}),[n]),(0,l.jsxs)("div",{className:j()(d,s),style:k,children:[(0,l.jsx)("div",{onClick:(0,A.throttle)((function(){return null==r?void 0:r()}),2e3),style:{width:C,marginTop:Z?12:4},className:"".concat(p," ").concat(r?"current":""),children:c}),(0,l.jsxs)("div",{className:Z?"".concat(f," ").concat(b):f,children:[(0,l.jsx)("div",{className:m,ref:G,style:D>0?{height:1===D?97:"auto",overflow:1===D?"hidden":"auto",paddingRight:55}:{paddingRight:0},children:(0,l.jsx)("div",{className:g,ref:R,children:null==n?void 0:n.map((function(e){return(0,l.jsxs)("span",{onClick:function(){return a(e.id)},style:{color:N},className:i===e.id?x:"",children:[(0,l.jsx)("span",{title:e.name,className:v,children:e.name}),!!P&&(0,l.jsx)("span",{className:w,children:e.count})]},e.id)}))})}),!!D&&(0,l.jsx)(o.Fragment,{children:1===D?(0,l.jsxs)("div",{onClick:function(){var e;M(2),(null==R||null===(e=R.current)||void 0===e?void 0:e.clientHeight)>245?F(!0):F(!1)},className:h,children:["展开",(0,l.jsx)("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})]}):(0,l.jsxs)("div",{onClick:function(){G.current.scrollTop=0,M(1),F(!1)},className:h,children:["收起",(0,l.jsx)("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})]})})]})]})},S="tabs___GTqPV",k="active___F26E8",B=function(e){var t=e.dataSource,n=void 0===t?[]:t,o=e.value,i=e.onChange,a=e.className,r=e.style,s=void 0===r?{}:r;return(0,l.jsx)("div",{style:s,className:j()(S,a),children:n.map((function(e){return(0,l.jsx)("span",{onClick:function(){return i(e.id)},className:o===e.id?k:"",children:e.name},e.id)}))})},N="input___PW2zI",P="dropdown___vSy8B",T="menu___NiyBu",E="text___Grueu",D="b1___ZKryM",M="b2___aKyGa",L=n(98135),O=function(e){var t,n=e.dataSource,i=void 0===n?[]:n,a=e.value,r=void 0===a?"":a,s=e.onChange,c=e.onInputChange,d=void 0===c?function(){}:c,p=e.className,f=e.style,h=void 0===f?{}:f,m=e.placeholder,g=(e.allowClear,(0,o.useState)("")),v=u()(g,2),w=v[0],x=v[1],b=(0,o.useState)(""),y=u()(b,2),A=y[0],C=y[1];(0,o.useEffect)((function(){var e,t=r;null!==(e=JSON.stringify(r))&&void 0!==e&&e.includes("{")&&(x(r.id),t=r.value||"");try{C(decodeURIComponent(t||""))}catch(e){C(decodeURIComponent(t||""))}}),[r]);var S=function(){s(encodeURIComponent(A),w||null)};return(0,l.jsxs)("div",{className:j()(N,p),style:h,children:[!!i.length&&(0,l.jsxs)("div",{className:P,children:[(0,l.jsxs)("div",{className:E,children:[null===(t=i.find((function(e){return e.id===w})))||void 0===t?void 0:t.name,(0,l.jsx)("i",{className:"iconfont icon-zhankai4"}),(0,l.jsx)("b",{className:D}),(0,l.jsx)("b",{className:M})]}),(0,l.jsx)("div",{className:T,children:i.map((function(e,t){return(0,l.jsx)("div",{onClick:function(){var t;(t=e.id)!==w&&(x(t),s(encodeURIComponent(A),t))},children:e.name},t)}))})]}),(0,l.jsx)(L.Z,{onPressEnter:S,value:A,onChange:function(e){C(e.target.value),d(encodeURIComponent(e.target.value),w||null)},bordered:!1,placeholder:m}),(0,l.jsx)("i",{onClick:S,className:"iconfont icon-sousuo9 font14 pl10 current"})]})},Z="quickPager___GM30J",F="disabled___Ozc8I",R=function(e){var t=e.value,n=e.onChange,o=e.className,i=e.total,a=e.pageSize,r=e.style,s=void 0===r?{}:r,c=t<2,u=t>=Math.ceil(i/a);return i<=a?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("div",{className:j()(Z,o),style:s,children:[(0,l.jsx)("div",{onClick:function(){c||n(t-1,"prev")},className:c?F:"",children:"上一页"}),(0,l.jsx)("div",{onClick:function(){u||n(t+1,"next")},className:u?F:"",children:"下一页"})]})},G="list___oOsiS",H="wrap___G6T7F",z="lockWrap___Rl79E",_="li___oZZ7l",I="cover___b2bYW",W="img___IQX7w",U="sign___HkT6C",K="name___SsJx8",V="e___TMqq0",q="tags___bcjyo",J="rate___YACg7",Y=n(71418),Q=n(6848),X=n(97022),$=n(27065),ee=n(6457),te=n(96908),ne=n(57177),oe=n(81378),ie=n(7406),ae=function(e){var t=e.className,n=e.dataSource,o=void 0===n?[]:n,i=e.col,a=void 0===i?4:i,r=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,p=e.wrapWidth,f=void 0===p?1200:p,h=e.trackEventItems,m=e.loading,g=Math.floor((f-(a-1)*r)/a);return(0,l.jsx)(Y.Z,{spinning:m,children:(0,l.jsxs)("div",{className:j()(G,t),children:[!!o.length&&o.map((function(e,t){var n=e.name,o=e.id,i=e.identifier,s=e.power,u=(e.cover_image_id,e.pic);return(0,l.jsxs)("div",{className:H,style:{width:g,marginRight:(1+t)%a==0?0:r+d,marginBottom:c},children:[(0,l.jsxs)("a",{target:"_blank",href:"/shixuns/".concat(i,"/challenges"),className:_,onClick:function(e){e.preventDefault(),h&&(0,ee.L9)([h]),s&&(0,ee.xg)("/shixuns/".concat(i,"/challenges"))},children:[(0,l.jsxs)("div",{className:W,children:[(0,l.jsx)("img",{className:I,src:"".concat(u)}),e.is_jupyter&&(0,l.jsx)("img",{className:U,src:te}),e.is_jupyter_lab&&(0,l.jsx)("img",{className:U,src:ne}),e.is_unity_3d&&(0,l.jsx)("img",{className:U,src:oe})]}),(0,l.jsx)("div",{className:K,children:(0,l.jsx)(Q.Z,{title:n||"实践项目名称-未填写",children:(0,l.jsx)("span",{className:V,children:n||"实践项目名称-未填写"})})}),(0,l.jsxs)("div",{className:q,children:[(0,l.jsx)(Q.Z,{placement:"bottom",title:"关卡数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),(0,l.jsx)("span",{children:e.challenges_count})]})}),!!e.myshixuns_count&&(0,l.jsx)(Q.Z,{placement:"bottom",title:"学习人数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan font14 mr2"}),(0,l.jsx)("span",{children:e.myshixuns_count})]})}),(0,l.jsx)(Q.Z,{placement:"bottom",title:"难度等级",children:(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.level})})}),(0,l.jsxs)("div",{className:J,children:[(0,l.jsx)(X.Z,{allowHalf:!0,disabled:!0,defaultValue:e.score_info}),(0,l.jsxs)("span",{children:[" ",e.score_info?"".concat(e.score_info,"分"):"5分"]})]})]})]}),!s&&(0,l.jsxs)("div",{className:z,children:[(0,l.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,l.jsx)("span",{className:"mt15 font16 c-white",children:"定向开放内容,需要授权"})]})]},o)})),!o.length&&(0,l.jsx)(ie.Z,{})]})})},re="list___jb2Ay",le="wrap___VsQDr",se="li___IxCLC",ce="cover___Mu8wr",ue="img___IpFLA",de="bq___Bil0T",pe="sign___DXJ4d",fe="name___l7FoJ",he="e___pXQUG",me="unit___wCIFR",ge="tags___w_Mil",ve=function(e){var t=e.className,n=e.dataSource,o=void 0===n?[]:n,i=e.col,a=void 0===i?4:i,r=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,p=e.wrapWidth,f=void 0===p?1200:p,h=e.trackEventItems,m=e.loading,g=Math.floor((f-(a-1)*r)/a),v=[{name:"推荐自学",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101计划",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"国家一流",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"省级一流",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"精品课程",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"军队一流",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"}];return(0,l.jsx)(Y.Z,{spinning:m,children:(0,l.jsxs)("div",{className:j()(re,t),children:[!(null==o||!o.length)&&(null==o?void 0:o.map((function(e,t){var n,o=e.name,i=e.id,s=e.identifier,u=(e.featured,e.school_name),p=e.image_url;e.excellent,e.is_plan;return(0,l.jsx)("div",{className:le,style:{width:g,marginRight:(1+t)%a==0?0:r+d,marginBottom:c},children:(0,l.jsxs)("a",{target:"_blank",href:"/paths/".concat(s),className:se,onClick:function(e){e.preventDefault(),h&&(0,ee.L9)([h]),(0,ee.xg)("/paths/".concat(s))},children:[(0,l.jsxs)("div",{className:ue,children:[(0,l.jsx)("img",{className:ce,src:"".concat(p)}),null==e||null===(n=e.subject_tags)||void 0===n?void 0:n.map((function(e,t){var n;if(0===t){var o,i=null===(o=v.find((function(t){return t.name==e})))||void 0===o?void 0:o.swimg;return(0,l.jsx)("img",{className:pe,src:i,style:{left:"-4px"}})}var a=null===(n=v.find((function(t){return t.name==e})))||void 0===n?void 0:n.ptimg;return(0,l.jsx)("img",{className:pe,src:a,style:{left:"".concat(48+52*(t-1)+2*t,"px")}})})),(0,l.jsx)("div",{style:{position:"absolute",top:"150px",left:"4px"},children:(null==e?void 0:e.excellent)&&(0,l.jsx)("div",{className:de,children:"开放课程"})})]}),(0,l.jsx)("div",{className:fe,children:(0,l.jsx)(Q.Z,{title:o,children:(0,l.jsx)("span",{className:he,children:o})})}),(0,l.jsx)(Q.Z,{title:"发布单位:".concat(u),children:(0,l.jsxs)("div",{className:me,children:[(0,l.jsx)("i",{className:"iconfont icon-danwei1 font14 mr3"}),u]})}),(0,l.jsx)("div",{className:ge,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(Q.Z,{placement:"bottom",title:"章节数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),(0,l.jsx)("span",{children:e.stages_count})]})}),(0,l.jsx)(Q.Z,{placement:"bottom",title:"学习人数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan font14 mr3"}),(0,l.jsx)("span",{children:e.members_count})]})})]})})]})},i)}))),!o.length&&(0,l.jsx)(ie.Z,{})]})})},we={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},xe=function(e){var t=e.className,n=e.dataSource,o=void 0===n?[]:n,i=e.col,a=void 0===i?4:i,r=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,p=e.wrapWidth,f=void 0===p?1200:p,h=e.trackEventItems,m=e.loading,g=Math.floor((f-(a-1)*r)/a);return(0,l.jsx)(Y.Z,{spinning:m,children:(0,l.jsxs)("div",{className:j()(we.list,t),children:[!!o.length&&o.map((function(e,t){var n=e.subject_identifier,o=e.id,i=(e.identifier,e.power,0!=e.is_public&&e.is_public);return(0,l.jsxs)("div",{className:we.wrap,style:{width:g,marginRight:(1+t)%a==0?0:r+d,marginBottom:c},children:[(0,l.jsxs)("a",{className:we.li,onClick:function(t){t.preventDefault(),h&&(0,ee.L9)([h]),(0,ee.xg)(e.first_category_url)},children:[(0,l.jsxs)("div",{className:we.top,children:[(0,l.jsx)(Q.Z,{title:e.name,children:(0,l.jsx)("div",{className:we.name,children:e.name})}),(0,l.jsx)("img",{className:we.img,src:$.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,l.jsx)("div",{className:we.text,title:e.creator,children:e.creator}),n&&(0,l.jsxs)("div",{className:we.btns,children:[(0,l.jsx)("div",{children:"开放课程"}),(0,l.jsx)("aside",{children:"开放课堂"})]}),i&&(0,l.jsx)("div",{className:we.sign,children:"公开"})]}),(0,l.jsxs)("div",{className:we.bottom,children:[e.visits>0&&(0,l.jsx)(Q.Z,{title:"访问量",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-liulanyan"}),(0,l.jsx)("span",{children:e.visits})]})}),e.course_members_count>0&&(0,l.jsx)(Q.Z,{title:"成员",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan"}),e.course_members_count]})}),e.tasks_count>0&&(0,l.jsx)(Q.Z,{title:"作业",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-zuoye"}),e.tasks_count]})}),e.is_end?(0,l.jsx)("div",{style:{color:"#6B758B"},children:"已结束"}):(0,l.jsx)("div",{style:{color:"#00B187"},children:"进行中"})]})]}),!e.is_accessible&&(0,l.jsxs)("div",{className:we.lockWrap,children:[(0,l.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,l.jsx)("span",{className:"mt15 font16 c-white",children:"非课堂成员不可进入"})]})]},o)})),!o.length&&(0,l.jsx)(ie.Z,{})]})})},be={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ye=n(7880),je=function(e){var t=e.dataSource,n=void 0===t?[]:t,o=e.value,i=e.onChange,a=e.className,r=e.style,s=void 0===r?{}:r,c=e.tabBarExtraContent;return(0,l.jsxs)("div",{className:j()(be.tabs,a),style:s,children:[(0,l.jsx)("div",{className:be.tabsWrap,children:n.map((function(e,t){return(0,l.jsxs)("aside",{className:be.tab,onClick:function(){i(e.id),e.link&&ye.history.push(e.link)},children:[(0,l.jsx)("div",{className:o===e.id?be.active:"",children:e.name}),null==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,l.jsxs)("span",{children:["(",null==e?void 0:e.total,")"]}),void 0!==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,l.jsx)(Q.Z,{title:null!=(null==e?void 0:e.tip)?null==e?void 0:e.tip:"",children:(0,l.jsxs)("span",{style:{color:"#9096A3"},children:["(",(0,l.jsx)("span",{style:{color:"#000"},children:null==e?void 0:e.resetCount}),"/",(0,l.jsx)("span",{children:null==e?void 0:e.total}),")"]})})]},t)}))}),(0,l.jsx)("div",{className:be.tabBar,children:c})]})},Ae=function(e){var t=e.className,n=e.style,o=void 0===n?{}:n,i=e.children;return(0,l.jsx)("div",{className:j()(t),style:o,children:i})},Ce="orderWrap___ZfyGX",Se="orderIconWrap___XTB_O",ke="orderAsc___KWHmA",Be="orderDesc___rHdbB",Ne="active___a7eSP",Pe="cursorPointer___gs9kL",Te="orderTextWrap___teAKn",Ee=n(38854),De=n(20834),Me=[{id:"updated_at",name:"最新动态"},{id:"created_at",name:"最新创建"},{id:"name",name:"名称排序"}],Le=function(e){var t,n=e.sortValue,o=e.dropValue,i=e.className,a=e.onSort,r=e.onDrop,s=e.dataSource,c=void 0===s?Me:s;return(0,l.jsxs)("div",{className:j()(Ce,i),children:[(0,l.jsx)(Ee.Z,{dropdownRender:function(){return(0,l.jsx)(De.Z,{children:c.map((function(e,t){return(0,l.jsx)(De.Z.Item,{onClick:function(){return r(e.id)},children:e.name},t)}))})},children:(0,l.jsx)("span",{className:Te,children:null===(t=c.find((function(e){return o===e.id})))||void 0===t?void 0:t.name})}),(0,l.jsxs)("span",{className:Se,children:[(0,l.jsx)("span",{className:ke,children:(0,l.jsx)("i",{className:"asc"===n?"iconfont icon-sanjiaoxing-up font12 ".concat(Pe," ").concat(Ne):"iconfont icon-sanjiaoxing-up font12 ".concat(Pe),onClick:function(){return a("asc"===n?"desc":"asc")}})}),(0,l.jsx)("span",{className:Be,children:(0,l.jsx)("i",{className:"desc"===n?"iconfont icon-sanjiaoxing-down font12 ".concat(Pe," ").concat(Ne):"iconfont icon-sanjiaoxing-down font12 ".concat(Pe),onClick:function(){return a("asc"===n?"desc":"asc")}})})]})]})},Oe=n(82242),Ze=n.n(Oe),Fe=n(7557),Re=n.n(Fe),Ge=n(41498),He=n.n(Ge),ze=n(39647),_e=n.n(ze),Ie={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},We=n(3113),Ue=["className","style","children","loading","openLoading","onClick","size","shape"],Ke=function(e){var t=e.className,n=e.style,i=e.children,a=e.loading,r=void 0!==a&&a,s=e.openLoading,c=e.onClick,d=void 0===c?function(){}:c,p=e.size,f=void 0===p?"middle":p,h=e.shape,m=void 0===h?"round":h,g=_e()(e,Ue),v=(0,o.useState)(!1),w=u()(v,2),x=w[0],b=w[1];return(0,l.jsx)(We.ZP,Ze()(Ze()({onClick:(0,A.throttle)(function(){var e=He()(Re()().mark((function e(t){return Re()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s&&b(!0),e.prev=1,e.next=4,d(t);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("error",e.t0);case 9:s&&b(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:j()(Ie.btn,Ie["".concat(f,"-").concat(m)],t),style:n,size:f,shape:m,loading:x||r},g),{},{children:i}))},Ve="head___ghH72",qe="node___mjPEy",Je=function(e){var t=e.className,n=e.style,o=e.children,i=void 0===o?null:o,a=e.onClick,r=e.title;return(0,l.jsxs)("div",{className:j()(Ve,t),style:n,children:[(0,l.jsxs)("span",{className:"primary-hover",onClick:a,children:[(0,l.jsx)("i",{className:"iconfont icon-fanhui2 font12"}),"返回"]}),(0,l.jsx)("b",{title:r,children:r}),(0,l.jsx)("div",{className:qe,children:i})]})},Ye="btns___sNgTb",Qe="confirm___Ozirl",Xe="cancel___aiq1I",$e=function(e){var t=e.confirmShow,n=void 0===t||t,o=e.confirmTitle,i=e.confirmClick,a=e.cancelShow,r=void 0===a||a,s=e.cancelTitle,c=e.cancelClick,u=e.className,d=e.style,p=e.confirmLoading,f=void 0!==p&&p;return(0,l.jsxs)("div",{className:j()(Ye,u),style:d,children:[n&&(0,l.jsx)(We.ZP,{loading:f,onClick:i,type:"primary",className:Qe,children:o}),r&&(0,l.jsx)(We.ZP,{onClick:c,className:Xe,children:s})]})},et={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},tt=function(e){var t=e.className,n=e.style,o=void 0===n?{}:n,i=e.LeftContent,a=e.children,r=e.RightContent;return(0,l.jsx)("div",{className:j()(et.fixedBottom,t),style:o,children:(0,l.jsxs)("div",{className:et.wrap,children:[(0,l.jsx)("div",{className:et.left,children:i}),(0,l.jsx)("div",{className:et.center,children:a}),(0,l.jsx)("div",{className:et.right,children:r})]})})},nt="crumbs___V41Oe",ot="hover___bEIVd",it=function(e){var t=e.className,n=e.style,i=void 0===n?{}:n,a=e.dataSource,r=void 0===a?[]:a;return(0,l.jsx)("div",{className:j()(nt,t),style:i,children:r.map((function(e,t){return t"," "]})]},t):(0,l.jsx)("span",{style:{color:"#5F6368"},children:e.name},t)}))})},at=n(31797),rt=["onChange"],lt=at.Z.Countdown,st=function(e){var t=e.onChange,n=_e()(e,rt),i=(0,o.useState)(null),a=u()(i,2),r=a[0],s=a[1];(0,o.useEffect)((function(){"number"==typeof r&&r>=0&&t(r)}),[r]);return(0,l.jsx)(lt,Ze()(Ze()({},n),{},{onChange:function(e){var t=Math.floor(e/1e3);s(t)}}))}},56266:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(59301);function i(e,t){var n=(0,o.useRef)();(0,o.useEffect)((function(){n.current=e})),(0,o.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},91574:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var o=n(37205),i=n.n(o),a=n(82242),r=n.n(a),l=n(7557),s=n.n(l),c=n(41498),u=n.n(c),d=n(79800),p=n.n(d),f=n(59301),h="ActvieE3___B5egy",m="Onerow___t6jyJ",g="body___RTqwS",v="FormDiv___I9YYs",w=n(7880),x=n(78241),b=n(6848),y=n(8591),j=n(43418),A=n(95237),C=n(43604),S=n(14491),k=n(53864),B=n(3113),N=n(24905),P=n(98135),T=n(57809),E=n(46651),D=n(78673),M=n(90963),L=n(56102),O=n(7406),Z=n(27065),F=n(6457),R=n(6309),G=n(36017),H=n(33743),z=n(58499),_=n(37712),I=(0,w.connect)((function(e){return{graduations:e.graduations,loading:e.loading}}))((function(e){var t,n,o=e.graduations,a=o.Tasks,l=o.teachers,c=o.students,d=o.forTask,I=e.loading,W=e.dispatch,U=(0,w.useParams)(),K=(0,f.useState)([]),V=p()(K,2),q=V[0],J=V[1],Y=(0,f.useState)([]),Q=p()(Y,2),X=Q[0],$=Q[1],ee=(0,f.useState)(!1),te=p()(ee,2),ne=te[0],oe=te[1],ie=(0,f.useState)(!1),ae=p()(ie,2),re=ae[0],le=ae[1],se=x.Z.useForm(),ce=p()(se,1)[0],ue=(0,f.useState)({}),de=p()(ue,2),pe=de[0],fe=de[1],he=(0,f.useState)({}),me=p()(he,2),ge=me[0],ve=me[1],we=(0,f.useState)([]),xe=p()(we,2),be=xe[0],ye=xe[1],je=(0,f.useState)(!1),Ae=p()(je,2),Ce=Ae[0],Se=Ae[1],ke=(0,f.useRef)(null),Be=(0,f.useState)({keyword:"",page:1,per_page:20,status:null,is_teacher:!0}),Ne=p()(Be,2),Pe=Ne[0],Te=Ne[1],Ee=[{title:"课题名称",dataIndex:"name",ellipsis:!0,render:function(e){return(0,_.jsx)(b.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{className:"c-grey-333",children:e})})}},{title:"指导老师",width:120,ellipsis:!0,dataIndex:"teacher_names",render:function(e){return(0,_.jsx)(b.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{className:"c-grey-333",children:e})})}},{title:"选题状态",width:120,dataIndex:"status",render:function(e){return(0,_.jsxs)(_.Fragment,{children:[0==e&&(0,_.jsx)("span",{style:{color:"#E30000"},children:"未达成双选"}),1==e&&(0,_.jsx)("span",{children:"达成双选"})]})}},{title:"邀请码",width:132,dataIndex:"invite_code",render:function(e){return(0,_.jsxs)("span",{className:"c-grey-333",children:[e,(0,_.jsx)(L.CopyToClipboard,{text:e,onCopy:function(){return y.ZP.success("复制成功")},children:(0,_.jsx)("i",{className:"iconfont icon-fuzhi8 font14",style:{color:"#165DFF",marginLeft:"8px",cursor:"pointer"}})})]})}},{title:(0,_.jsx)("span",{children:"操作"}),align:"right",width:120,render:function(e,t){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(z.Z,{type:"link",style:{whiteSpace:"nowrap",padding:0},onClick:u()(s()().mark((function e(){var n,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Se(!1),e.next=3,Le();case 3:t.teacher_ids=null===(n=t.teacher)||void 0===n?void 0:n.map((function(e){return e.id})),t.student_id=t.student_id?Number(t.student_id):"",ye(null==t||null===(o=t.attachments)||void 0===o?void 0:o.map((function(e){return{uid:null==e?void 0:e.id,name:(null==e?void 0:e.title)+" "+(null==e?void 0:e.filesize),status:"done",url:(null==e?void 0:e.url)||""}}))),fe(t),ve(t),ce.setFieldsValue(t);case 9:case"end":return e.stop()}}),e)}))),children:"编辑"}),(0,_.jsx)("a",{className:h,type:"link",style:{padding:"0 0 0 10px",whiteSpace:"nowrap"},onClick:function(){if(1==t.status)y.ZP.warning("该课题已被学生选题不能删除");else var e=j.Z.confirm({title:"删除提示",icon:null,maskClosable:!0,content:(0,_.jsx)("span",{children:"确定要删除课题?删除后无法恢复"}),okText:"确定",cancelText:"取消",onOk:(n=u()(s()().mark((function n(){return s()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,W({type:"graduations/getDelGraduationsTasks",payload:{id:U.id,ids:[t.id]}});case 2:0==n.sent.status&&(y.ZP.success("删除成功"),Pe.page=1,Te(r()({},Pe))),e.destroy();case 5:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)}),onCancel:function(){e.destroy()}});var n},children:"删除"})]})}}],De={multiple:!0,withCredentials:!0,defaultFileList:be,onRemove:function(e){ye(be.filter((function(t){return(e.uid||e.response.id)!=t.uid})))},beforeUpload:function(e){var t=e.size/1024/1024;return!(t>150||0==t)||(y.ZP.error("".concat(e.name," 文件无法上传。").concat(0==t?"文件内容不能为空":"超过文件大小限制(150MB)")),Promise.reject())},action:"".concat(Z.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){var t,n,o,a;"done"===e.file.status&&ye([].concat(i()(be),[{uid:null==e||null===(t=e.file)||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id,name:(null==e||null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.filename)+" "+(0,F.RD)(null==e||null===(o=e.file)||void 0===o||null===(o=o.response)||void 0===o?void 0:o.filesize),status:"done",url:(null==e||null===(a=e.file)||void 0===a||null===(a=a.response)||void 0===a?void 0:a.url)||""}]))}},Me={selectedRowKeys:[].concat(i()(q.map((function(e){return e.id}))),i()(X.map((function(e){return e.id})))),onChange:function(e,t){var n=[],o=[];t.map((function(e){0==e.status?o.push(e):n.push(e)})),$(n),J(o)}},Le=function(){var e=u()(s()().mark((function e(){var t,n,o,i,a=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]&&a[0],e.next=3,W({type:"graduations/getGraduationsTeachers",payload:{id:U.id,page:1,per_page:2e3}});case 3:n=e.sent,W({type:"graduations/getGraduationsStudents",payload:{id:U.id,page:1,per_page:2e3}}),W({type:"graduations/getGraduationsDetails",payload:{id:U.id}}),t&&(i=null==n||null===(o=n.data)||void 0===o||null===(o=o.filter((function(e){return null==e?void 0:e.is_creator})))||void 0===o?void 0:o.map((function(e){return e.id})),ce.setFieldsValue({teacher_ids:i}),fe(r()(r()({},pe),{},{teacher_ids:i}))),oe(!0);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=u()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W({type:"graduations/getGraduationsTasks",payload:r()({id:U.id},Pe)});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ze=function(){var e=u()(s()().mark((function e(t){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.attachment_ids=be.map((function(e){return e.uid})),!Ce){e.next=7;break}return e.next=4,(0,H.jW)(r()({graduation_id:U.id},t));case 4:n=e.sent,e.next=10;break;case 7:return e.next=9,(0,H.YS)(r()({graduation_id:U.id,id:pe.id},t));case 9:n=e.sent;case 10:if(0!=n.status){e.next=18;break}return y.ZP.success(Ce?"创建成功":"更新成功"),fe({}),ye([]),oe(!1),ce.resetFields(),e.next=18,Oe();case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){J([]),$([]),Oe()}),[Pe]),(0,f.useEffect)((function(){pe.base_project&&Fe()}),[null==pe?void 0:pe.base_project]);var Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e5,t=document.querySelector(".ant-form-modal-body").querySelector(".ant-modal-body");t.scrollTop=e};return(0,_.jsxs)("section",{className:g,children:[(0,_.jsx)(M.YG,{value:"manage",tabBarExtraContent:(0,_.jsx)(M.op,{openLoading:!0,onClick:u()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Se(!0),e.next=3,Le(!0);case 3:case"end":return e.stop()}}),e)}))),children:"录入课题"}),dataSource:[{id:"manage",name:"课题管理"}],onChange:function(e){console.log(e)}}),(0,_.jsxs)(A.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,_.jsx)(C.Z,{children:(0,_.jsx)(M.qp,{title:"状态",className:"mt20",dataSource:[{id:null,name:"全部"},{id:1,name:"达成双选"},{id:0,name:"未达成双选"}],titleWidth:28,value:Pe.status,onChange:function(e){Pe.status=e,Pe.page=1,Te(r()({},Pe))}})}),(0,_.jsx)(C.Z,{children:(0,_.jsx)(M.t7,{style:{width:329,height:"38px"},placeholder:"请输入课题名称/指导老师进行搜索",value:Pe.keyword,onChange:function(e){Pe.keyword=e,Pe.page=1,Te(r()({},Pe))}})})]}),q.length+X.length>0&&(0,_.jsxs)(A.Z,{wrap:!1,align:"middle",justify:"space-between",style:{padding:"11px 12px",background:"#F4F7FC",marginBottom:"1px"},children:[(0,_.jsxs)(C.Z,{children:["已选择 ",(0,_.jsx)("span",{style:{color:"#165DFF"},children:q.length+X.length||0})," 项"]}),(0,_.jsxs)(C.Z,{style:{color:"#E30000",cursor:"pointer"},onClick:function(){var e,t=j.Z.confirm({title:"删除提示",icon:null,maskClosable:!0,content:(0,_.jsx)("span",{children:"确定要删除课题?删除后无法恢复"}),okText:"确定",cancelText:"取消",onOk:(e=u()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(q.length>0)){e.next=5;break}return e.next=3,W({type:"graduations/getDelGraduationsTasks",payload:{id:U.id,ids:q.map((function(e){return e.id}))}});case 3:0==e.sent.status&&y.ZP.success("批量删除成功");case 5:X.length>0&&(0==q.length&&y.ZP.error("无法删除"),le(!0)),J([]),Oe(),t.destroy();case 9:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){t.destroy()}})},children:[(0,_.jsx)("i",{className:"iconfont icon-piliangshanchu3 mr5"}),"批量删除"]})]}),(0,_.jsx)(S.Z,{rowKey:"id",loading:I.effects["graduations/getGraduationsTasks"],style:{minHeight:500},locale:{emptyText:(0,_.jsx)(O.Z,{customText:null==Pe.status&&""==Pe.keyword&&1==Pe.page?"您当前还没有录入课题,点击完成课题录入":"暂时还没有相关数据哦!",ButtonTwo:null==Pe.status&&""==Pe.keyword&&1==Pe.page?(0,_.jsx)(M.op,{openLoading:!0,onClick:u()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Se(!0),e.next=3,Le(!0);case 3:case"end":return e.stop()}}),e)}))),children:"录入课题"}):(0,_.jsx)(_.Fragment,{})})},rowSelection:Me,columns:Ee,dataSource:a.data,pagination:!1}),0!=a.count&&(0,_.jsxs)(A.Z,{className:"mt20 mb20",wrap:!1,align:"middle",justify:"space-between",children:[(0,_.jsxs)(C.Z,{children:["共 ",(0,_.jsx)("span",{style:{color:"#165DFF"},children:a.count||0})," 条数据"]}),(0,_.jsx)(C.Z,{children:(0,_.jsx)(k.Z,{showSizeChanger:!0,showQuickJumper:!0,current:Pe.page,pageSize:Pe.per_page,onShowSizeChange:function(e,t){Pe.per_page=t,Pe.page=1,Te(r()({},Pe))},onChange:function(e){Pe.page=e,Te(r()({},Pe))},total:a.count})})]}),(0,_.jsxs)(j.Z,{open:re,title:"提示",destroyOnClose:!0,width:1200,footer:(0,_.jsx)(B.ZP,{type:"primary",onClick:function(){le(!1),$([])},children:"知道了"}),onCancel:function(){le(!1),$([])},children:[(0,_.jsxs)("span",{children:["下面",(0,_.jsx)("span",{style:{color:"#FA6400"},children:X.length}),"个课题已被学生选题,不能删除"]}),(0,_.jsx)("div",{className:"mt10",style:{background:"#F6F7F9",padding:"20px 12px"},children:X.map((function(e,t){return(0,_.jsxs)(A.Z,{wrap:!1,align:"middle",style:{color:"#999"},children:[(0,_.jsx)("i",{className:"iconfont icon-guansuo font14"}),(0,_.jsx)("div",{className:m,style:{marginLeft:"8px"},children:(0,_.jsx)(b.Z,{placement:"topLeft",title:e.name,children:e.name})})]},t)}))})]}),(0,_.jsx)(j.Z,{open:ne,title:"".concat(Ce?"录入课题":"编辑课题"),width:1200,destroyOnClose:!0,okText:"确定",cancelText:"取消",centered:!0,className:"ant-form-modal-body",afterOpenChange:function(e){e&&document.querySelector(".ant-form-modal-body").querySelector(".ant-modal-body").scrollTo(0,0)},onCancel:function(){fe({}),ye([]),ce.resetFields(),oe(!1)},onOk:function(){ce.submit()},children:(0,_.jsxs)(x.Z,{onFinishFailed:function(e){var t;null!=pe&&pe.name&&null!=pe&&null!==(t=pe.teacher_ids)&&void 0!==t&&t.length?null!=pe&&pe.description&&(null==pe||!pe.base_project||null!=pe&&pe.graduation_stage_id)||Fe():Fe(0)},form:ce,initialValues:{},layout:"vertical",className:"".concat(v),onValuesChange:function(e,t){fe(r()(r()({},pe),e))},onFinish:function(){var e=u()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ce||1!=ge.status||t.student_id==ge.student_id?Ze(t):j.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"变更指定学生",content:(0,_.jsxs)("div",{children:[(0,_.jsx)("p",{children:"该操作无法撤销。确认变更指定学生?变更后原学生在该课题提交的文档将清空且无法恢复"}),(0,_.jsx)("div",{children:"请输入验证码后确认删除"}),(0,_.jsx)(R.Z,{ref:function(e){return ke.current=e}})]}),onOk:function(){var e=u()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ke.current.onVerify()){e.next=2;break}return e.abrupt("return",Promise.reject());case 2:Ze(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,_.jsx)(x.Z.Item,{htmlFor:null,name:"source_is_repeat",valuePropName:"checked",children:(0,_.jsx)(N.Z,{children:(0,_.jsx)("span",{style:{color:"#000"},children:"近三年是否重复"})})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"课题名称"}),name:"name",rules:[{required:!0,message:"请输入课题名称"},{type:"string",max:100,message:"输入超限,请缩减字符数"},{type:"string",whitespace:!0,message:"内容不能全为空格"}],children:(0,_.jsx)(P.Z,{showCount:!0,maxLength:100,size:"large"})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"指导老师(可多选)"}),name:"teacher_ids",rules:[{required:!0,message:"请选择指导老师"}],children:(0,_.jsx)(T.default,{size:"large",mode:"multiple",optionFilterProp:"children",placeholder:"请选择指导老师",children:null==l||null===(t=l.data)||void 0===t?void 0:t.map((function(e,t){return(0,_.jsx)(T.default.Option,{value:e.id,children:e.name},t)}))})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"课题适合专业"}),name:"major",rules:[{type:"string",max:100,message:"输入超限,请缩减字符数"}],children:(0,_.jsx)(P.Z,{size:"large",showCount:!0,maxLength:100})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"指定学生"}),name:"student_id",children:(0,_.jsx)(T.default,{size:"large",showSearch:!0,allowClear:!0,optionFilterProp:"children",placeholder:"请选择指定学生",children:null==c||null===(n=c.data)||void 0===n?void 0:n.map((function(e,t){return(0,_.jsx)(T.default.Option,{value:e.id,children:e.name},t)}))})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"课题来源"}),name:"source",rules:[{type:"string",max:60,message:"输入超限,请缩减字符数"}],children:(0,_.jsx)(P.Z,{size:"large",showCount:!0,maxLength:60})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"课题学科方向"}),name:"direction",rules:[{type:"string",max:60,message:"输入超限,请缩减字符数"}],children:(0,_.jsx)(P.Z,{size:"large",showCount:!0,maxLength:60})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,label:(0,_.jsx)("span",{style:{color:"#5F6368"},children:"课题介绍"}),name:"description",rules:[{required:!0,message:"请输入课题介绍"},{type:"string",max:5e3,message:"输入超限,请缩减字符数"},{type:"string",whitespace:!0,message:"内容不能全为空格"}],children:(0,_.jsx)(G.h,{placeholder:"请在此输入内容,最多5000个字符",scrollId:"",watch:!0,height:140})}),(0,_.jsx)(x.Z.Item,{htmlFor:null,name:"attachment_ids",style:{display:"flex",alignItems:"center"},valuePropName:"fileList",getValueFromEvent:function(e){return Array.isArray(e)?e:null==e?void 0:e.fileList},normalize:function(e){return e.filter((function(e){if(e.url)return!0;var t=e.size/1024/1024;return-1===e.name.indexOf("  ")&&(e.name="".concat(e.name).concat("  ").concat((0,F.RD)(e.size))),!(t>150||0==t)}))},children:(0,_.jsx)(E.Z,r()(r()({},De),{},{children:(0,_.jsxs)(A.Z,{style:{width:"100%"},wrap:!1,align:"middle",children:[(0,_.jsx)(C.Z,{children:(0,_.jsxs)(M.op,{style:{borderRadius:"2px"},children:[(0,_.jsx)("i",{className:"iconfont icon-shangchuan3 mr5"}),"文件上传"]})}),(0,_.jsx)(C.Z,{style:{marginLeft:"16px",color:"#5F6367"},onClick:function(e){e.preventDefault(),e.stopPropagation()},children:"上传课题相关文档,单个文档大小不超过150M"})]})}))}),(0,_.jsxs)(A.Z,{wrap:!1,align:"middle",className:"mb20",children:[(0,_.jsx)(C.Z,{children:(0,_.jsx)(x.Z.Item,{htmlFor:null,name:"base_project",valuePropName:"checked",style:{marginBottom:0},children:(0,_.jsx)(D.Z,{})})}),(0,_.jsxs)(A.Z,{align:"middle",className:"ml10",style:{color:"#000"},children:[(0,_.jsx)(C.Z,{children:"基于项目实施"}),(0,_.jsx)(b.Z,{placement:"right",style:{width:"500px"},overlayStyle:{maxWidth:600},title:"开启后,学生必须在本平台创建项目,关联后将应用于毕设所有阶段",children:(0,_.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml5",style:{cursor:"pointer",color:"#3061D0"}})})]})]}),(0,_.jsx)("div",{id:"graduationstageid",children:pe.base_project&&(0,_.jsxs)("div",{style:{background:"#F6F7F9",padding:"12px 12px 4px 12px",width:"100%",height:104},children:[(0,_.jsx)("span",{style:{color:"#5F6367"},children:"学生需要完成关联项目的阶段"}),(0,_.jsxs)(A.Z,{wrap:!1,align:"middle",className:"mt15",children:[(0,_.jsx)(C.Z,{style:{width:"632px"},children:(0,_.jsx)(x.Z.Item,{name:"graduation_stage_id",htmlFor:null,style:{marginBottom:0},rules:[{required:!0,message:"请选择关联项目的阶段"}],children:(0,_.jsx)(T.default,{children:null==d?void 0:d.map((function(e,t){return(0,_.jsx)(T.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,_.jsx)(C.Z,{className:"ml20",style:{color:"#999",fontSize:"12px"},children:"选择阶段后,学生必须在对应阶段完成项目关联"})]})]})})]})})]})}))},5547:function(e,t){"use strict";t.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},97022:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var o=n(1565),i=n(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},r=n(68475),l=function(e,t){return i.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:a}))};var s=i.forwardRef(l),c=n(92310),u=n.n(c),d=n(22386),p=n(88703),f=n(52167),h=n(37683),m=n(13108),g=n(87147);function v(e,t){var n=e.disabled,o=e.prefixCls,a=e.character,r=e.characterRender,l=e.index,s=e.count,c=e.value,d=e.allowHalf,p=e.focused,f=e.onHover,h=e.onClick,g=l+1,v=new Set([o]);0===c&&0===l&&p?v.add("".concat(o,"-focused")):d&&c+.5>=g&&cl?"true":"false","aria-posinset":l+1,"aria-setsize":s,tabIndex:n?-1:0},i.createElement("div",{className:"".concat(o,"-first")},w),i.createElement("div",{className:"".concat(o,"-second")},w)));return r&&(x=r(x,e)),x}var w=i.forwardRef(v);var x=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function b(e,t){var n,a,r=e.prefixCls,l=void 0===r?"rc-rate":r,s=e.className,c=e.defaultValue,v=e.value,b=e.count,y=void 0===b?5:b,j=e.allowHalf,A=void 0!==j&&j,C=e.allowClear,S=void 0===C||C,k=e.character,B=void 0===k?"★":k,N=e.characterRender,P=e.disabled,T=e.direction,E=void 0===T?"ltr":T,D=e.tabIndex,M=void 0===D?0:D,L=e.autoFocus,O=e.onHoverChange,Z=e.onChange,F=e.onFocus,R=e.onBlur,G=e.onKeyDown,H=e.onMouseLeave,z=(0,f.Z)(e,x),_=(a=i.useRef({}),[function(e){return a.current[e]},function(e){return function(t){a.current[e]=t}}]),I=(0,p.Z)(_,2),W=I[0],U=I[1],K=i.useRef(null),V=function(){var e;P||(null===(e=K.current)||void 0===e||e.focus())};i.useImperativeHandle(t,(function(){return{focus:V,blur:function(){var e;P||(null===(e=K.current)||void 0===e||e.blur())}}}));var q=(0,h.Z)(c||0,{value:v}),J=(0,p.Z)(q,2),Y=J[0],Q=J[1],X=(0,h.Z)(null),$=(0,p.Z)(X,2),ee=$[0],te=$[1],ne=function(e,t){var n,o,i,a,r="rtl"===E,l=e+1;if(A){var s=W(e),c=(o=function(e){var t,n,o=e.ownerDocument,i=o.body,a=o&&o.documentElement,r=e.getBoundingClientRect();return t=r.left,n=r.top,{left:t-=a.clientLeft||i.clientLeft||0,top:n-=a.clientTop||i.clientTop||0}}(n=s),i=n.ownerDocument,a=i.defaultView||i.parentWindow,o.left+=function(e){var t=e.pageXOffset,n="scrollLeft";if("number"!=typeof t){var o=e.document;"number"!=typeof(t=o.documentElement[n])&&(t=o.body[n])}return t}(a),o.left),u=s.clientWidth;(r&&t-c>u/2||!r&&t-c0&&!n||t===m.Z.RIGHT&&o>0&&n?(oe(o-=A?.5:1),e.preventDefault()):t===m.Z.LEFT&&o{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.starColor}`,transform:e.starHoverScale}},"&-first, &-second":{color:e.starBg,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},N=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),P=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(e)),{display:"inline-block",margin:0,padding:0,color:e.starColor,fontSize:e.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),B(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),N(e))}};var T=(0,S.Z)("Rate",(e=>{const t=(0,k.TS)(e,{});return[P(t)]}),(e=>({starColor:e.yellow6,starSize:.5*e.controlHeightLG,starHoverScale:"scale(1.1)",starBg:e.colorFillContent}))),E=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i{const{prefixCls:n,className:o,rootClassName:a,style:r,tooltips:l,character:c=i.createElement(s,null)}=e,d=E(e,["prefixCls","className","rootClassName","style","tooltips","character"]),{getPrefixCls:p,direction:f,rate:h}=i.useContext(j.E_),m=p("rate",n),[g,v]=T(m),w=Object.assign(Object.assign({},null==h?void 0:h.style),r);return g(i.createElement(y,Object.assign({ref:t,character:c,characterRender:(e,t)=>{let{index:n}=t;return l?i.createElement(A.Z,{title:l[n]},e):e}},d,{className:u()(o,a,v,null==h?void 0:h.className),style:w,prefixCls:m,direction:f})))}));var M=D},31797:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var o=n(59301),i=n(56762),a=n(92343),r=n(92310),l=n.n(r),s=n(36355),c=n(56511);var u=e=>{const{value:t,formatter:n,precision:i,decimalSeparator:a,groupSeparator:r="",prefixCls:l}=e;let s;if("function"==typeof n)s=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",c=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,r),"number"==typeof i&&(c=c.padEnd(i,"0").slice(0,i>0?i:0)),c&&(c=`${a}${c}`),s=[o.createElement("span",{key:"int",className:`${l}-content-value-int`},e,t),c&&o.createElement("span",{key:"decimal",className:`${l}-content-value-decimal`},c)]}else s=e}return o.createElement("span",{className:`${l}-content-value`},s)},d=n(17313),p=n(83116),f=n(37613);const h=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:i,titleFontSize:a,colorTextHeading:r,contentFontSize:l,fontFamily:s}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,d.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:i,fontSize:a},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:r,fontSize:l,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var m=(0,p.Z)("Statistic",(e=>{const t=(0,f.TS)(e,{});return[h(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var g=e=>{const{prefixCls:t,className:n,rootClassName:i,style:a,valueStyle:r,value:d=0,title:p,valueRender:f,prefix:h,suffix:g,loading:v=!1,onMouseEnter:w,onMouseLeave:x,decimalSeparator:b=".",groupSeparator:y=","}=e,{getPrefixCls:j,direction:A,statistic:C}=o.useContext(s.E_),S=j("statistic",t),[k,B]=m(S),N=o.createElement(u,Object.assign({decimalSeparator:b,groupSeparator:y,prefixCls:S},e,{value:d})),P=l()(S,{[`${S}-rtl`]:"rtl"===A},null==C?void 0:C.className,n,i,B);return k(o.createElement("div",{className:P,style:Object.assign(Object.assign({},null==C?void 0:C.style),a),onMouseEnter:w,onMouseLeave:x},p&&o.createElement("div",{className:`${S}-title`},p),o.createElement(c.Z,{paragraph:!1,loading:v,className:`${S}-skeleton`},o.createElement("div",{style:r,className:`${S}-content`},h&&o.createElement("span",{className:`${S}-content-prefix`},h),f?f(N):N,g&&o.createElement("span",{className:`${S}-content-suffix`},g)))))};const v=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function w(e,t){const{format:n=""}=t,o=new Date(e).getTime(),i=Date.now();return function(e,t){let n=e;const o=/\[[^\]]*]/g,i=(t.match(o)||[]).map((e=>e.slice(1,-1))),a=t.replace(o,"[]"),r=v.reduce(((e,t)=>{let[o,i]=t;if(e.includes(o)){const t=Math.floor(n/i);return n-=t*i,e.replace(new RegExp(`${o}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),a);let l=0;return r.replace(o,(()=>{const e=i[l];return l+=1,e}))}(Math.max(o-i,0),n)}const x=e=>{const{value:t,format:n="HH:mm:ss",onChange:r,onFinish:l}=e,s=(0,i.Z)(),c=o.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{s(),null==r||r(e-Date.now()),e(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return o.createElement(g,Object.assign({},e,{valueRender:e=>(0,a.Tm)(e,{title:void 0}),formatter:(e,t)=>w(e,Object.assign(Object.assign({},t),{format:n}))}))};var b=o.memo(x);g.Countdown=b;var y=g},25769:function(e,t,n){"use strict";var o=n(98040),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,r,l,s,c,u=!1;t||(t={}),n=t.debug||!1;try{if(r=o(),l=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))})),document.body.appendChild(c),l.selectNodeContents(c),s.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(l):s.removeAllRanges()),c&&document.body.removeChild(c),r()}return u}},83145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=a(n(59301)),i=a(n(25769));function a(e){return e&&e.__esModule?e:{default:e}}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},a=Object.keys(e);for(o=0;o=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n