You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Commo...

1 line
137 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[52338,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={},n="5.0",t={},i=null,o=!1,a=!1,r=null,s=!1,l=null,c=null,d=0;d<arguments.length;d++){var u=arguments[d];if(null!==u)switch(_typeof(u)){case"number":n=u.toFixed(1);break;case"string":u.match(new RegExp("^[0-9]\\.[0-9]+$"))?n=u:r=u;break;case"object":void 0!==u.is3D?i=u:t=u;break;case"boolean":o=u,a=!0}}null===i&&(i={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===t.material_id||a||(o=!0)),null!==r&&void 0===t.id&&(t.id=r);var p="",m=!1,h=null,f=null,g=null,v=!1,x=null,w=null,y=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var _=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function j(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,G(e,n)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,n){var t=parseFloat(e);NaN!==t&&t<5?console.log("The GeoGebra HTML5 codebase version "+t+" is deprecated. Using version latest instead."):(l=e,A(e,n))},e.getHTML5CodebaseVersion=function(){return f},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){y=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function n(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,o="auto",a=t.id,r=!1,l=0;l<arguments.length;l++){var c=arguments[l];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?o=c:a=arguments[l]:"boolean"==typeof c?r=c:c instanceof HTMLElement&&(i=c)}function d(){if(s){o=I(o);var l=i||document.getElementById(a);if(l)if(e.removeExistingApplet(l,!1),void 0===t.width&&l.clientWidth&&(t.width=l.clientWidth),void 0===t.height&&l.clientHeight&&(t.height=l.clientHeight),t.width&&t.height||"html5"!==o||(delete t.width,delete t.height),h=o,"screenshot"===o)T(l,t);else{var c=!1;t.hasOwnProperty("playButton")&&t.playButton||t.hasOwnProperty("clickToLoad")&&t.clickToLoad?c=!0:t.hasOwnProperty("playButtonAutoDecide")&&t.playButtonAutoDecide&&(c=(!b()||n())&&j()),c?(h="screenshot",Z(l,t,r,o)):M(l,t,r)}else console.log("possibly bug on ajax loading? ")}else setTimeout(d,200)}d()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var k=function(n){var o=function(){t.onError&&t.onError(),D("Error: Fetching material (id "+t.material_id+") failed.",t)},a=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",r="/materials/"+t.material_id+"?scope=basic";N("https://"+a+"/api/proxy.php?path="+encodeURIComponent(r),(function(a){var r=JSON.parse(a),s=r.elements?r.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:r;if(s&&s.url){t.fileName=s.url,S(s.settings||{}),i.is3D=!0;var l="https://www.geogebra.org/images/";e.setPreviewImage(x||s.previewUrl,l+"GeoGebra_loading.png",l+"applet_play.png"),n()}else o()}),o)};function S(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(n){e[n]=!!e[n]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(n){void 0===t[n]&&void 0!==e[n]&&(t[n]=e[n])})),void 0===t.showToolBarHelp&&(t.showToolBarHelp=t.showToolBar)}function N(e,n,t){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){n(i.responseText)},i.onerror=t,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return h},e.setPreviewImage=function(e,n,t){x=e,w=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),h=null;var o=null;for(i=0;i<e.childNodes.length;i++){var a=e.childNodes[i],r=a.className;"applet_screenshot"===r?n?(a.style.display="block",h="screenshot"):a.style.display="none":"applet_scaler prerender"!==r&&(e.removeChild(a),o=r&&-1!=r.indexOf("appletParameters")?a.id:null,i--)}var s=void 0!==t.id?t.id:o,l=window[s];l&&"function"==typeof l.getBase64&&(l.remove(),window[s]=null)},e.refreshHitPoints=function(){if(_(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var n=e.getAppletObject();return!(!n||"function"!=typeof n.recalculateEnvironments)&&(n.recalculateEnvironments(),!0)},e.startAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.startAnimation)&&(n.startAnimation(),!0)},e.stopAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.stopAnimation)&&(n.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==t.id?t.id:"ggbApplet";return window[e]},e.resize=function(){};var C=function(e){return e&&"false"!==e},M=function(n,t,i){_(f)<=4.2&&(i=!0);var o=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==f||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(o=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var a=document.createElement("div");a.classList.add("appletParameters","notranslate");var r=t.width,s=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(_(f)<=4.4)C(t.showToolBar)&&(t.height-=7),C(t.showAlgebraInput)&&(t.height-=37),t.width<605&&C(t.showToolBar)&&(t.width=605,r=605);else{var d=100;(C(t.showToolBar)||C(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),d=C(t.showMenuBar)?245:155),r<d&&(t.width=d,r=d)}for(var u in a.style.border="none",a.style.display="inline-block",t)t.hasOwnProperty(u)&&"appletOnLoad"!==u&&a.setAttribute("data-param-"+u,t[u]);y&&a.setAttribute("data-param-fontscssurl",y),e.resize=function(){GGBAppletUtils.responsiveResize(n,t)},window.addEventListener("resize",(function(n){e.resize()}));var m="function"==typeof t.appletOnLoad?t.appletOnLoad:function(){};if(i||void 0===t.width){var h=document.createElement("div");h.className="applet_scaler",h.style.position="relative",h.style.display="block",h.appendChild(a),n.appendChild(h),t.appletOnLoad=function(n){e.resize(),m(n)}}else{t.hasOwnProperty("showSplash")||a.setAttribute("data-param-showSplash","false");var x=n.querySelector(".applet_scaler.prerender"),w=null!==x;if(w)b=x.querySelector(".ggb_preview");else{var b=P(r,s,t.borderColor,!1);(x=document.createElement("div")).className="applet_scaler",x.style.position="relative",x.style.display="block",x.style.width=r+"px",x.style.height=s+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(x,"66%"),_(f)>=5?(t.appletOnLoad=function(e){var t=n.querySelector(".ggb_preview");t&&t.parentNode.removeChild(t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(x),window.GGBT_wsf_view&&$(window).trigger("resize"),m(e)},w||x.appendChild(b)):a.appendChild(b),x.appendChild(a),w||n.appendChild(x),setTimeout((function(){e.resize()}),1)}function j(e,n){n&&"function"==typeof n.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,n.appletOnLoad):renderGGBElement(e),D("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",n)}function k(e,n){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:n}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){j(e.article,e.params)})),html5AppletsToProcess=null)},_(f)<5&&(e.className+=" geogebraweb")):j(e,n)}if(o){scriptLoadStarted=!0;for(var S=0;S<a.childNodes.length;S++){"TABLE"===a.childNodes[S].tagName&&(a.removeChild(a.childNodes[S]),S--)}if(null!==ggbHTML5LoadedScript){var N=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=N&&N.parentNode.removeChild(N)}var M=document.createElement("script"),T=function(){k(a,t)};M.src=p+g,ggbHTML5LoadedCodebaseIsWebSimple=v,ggbHTML5LoadedCodebaseVersion=f,ggbHTML5LoadedScript=M.src,D("GeoGebra HTML5 codebase loaded: '"+p+"'.",t),c||l&&"5.0"!=l?p.requirejs?__webpack_require__.e(5783).then(function(){var e=[__webpack_require__(5783)];T.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(M.onload=T,n.appendChild(M)):(v?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),T())}else k(a,t);t.height=s,t.width=r},T=function(n,t,i){var o=P(t.width,t.height,t.borderColor,i),a=document.createElement("div");a.style.position="relative",a.style.display="block",a.style.width=t.width+"px",a.style.height=t.height+"px",a.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),a.appendChild(o);var r=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(B()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(a,"66%"),n.appendChild(a),1===r||isNaN(r)||(GGBAppletUtils.scaleElement(a,r),a.style.width=t.width+"px",a.style.height=t.height+"px",a.parentNode.style.width=t.width*r+"px",a.parentNode.style.height=t.height*r+"px"),e.resize=function(){L(n,o,a,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function L(e,n,i,o){if(e.contains(n)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var a=GGBAppletUtils.getScale(t,e,o);null!==i.parentNode&&(isNaN(a)||1===a?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,a),i.parentNode.style.width=t.width*a+"px",i.parentNode.style.height=t.height*a+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,n){n.appendChild(e)};var Z=function(e,n,t,i){T(e,n,!0);for(var o=function(){var t=[];for(r=0;r<e.childNodes.length;r++)t.push(e.childNodes[r]);if(window.GGBT_wsf_view){var o=window.GGBT_wsf_view.renderFullScreen(e,n.id),a=document.getElementById("fullscreencontainer"),s=jQuery(e).find(".fullscreencontent");s.length>0?(o.remove(),s.attr("id","fullscreencontent").show(),jQuery(a).append(s),window.dispatchEvent(new Event("resize"))):M(o,n,!1),window.GGBT_wsf_view.launchFullScreen(a)}else h=i,M(e,n,!1);if(!window.GGBT_wsf_view)for(r=0;r<t.length;r++)e.removeChild(t[r])},a=e.getElementsByClassName("ggb_preview_play"),r=0;r<a.length;r++)a[r].addEventListener("click",o,!1),a[r].addEventListener("ontouchstart",o,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),j()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},B=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var n='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',t=document.createElement("style");t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n)),document.getElementsByTagName("head")[0].appendChild(t)}return e},P=function(e,n,t,i){var o=document.createElement("div");o.className="ggb_preview",o.style.position="absolute",o.style.zIndex="90",o.style.width=e-2+"px",o.style.height=n-2+"px",o.style.top="0px",o.style.left="0px",o.style.overflow="hidden",o.style.backgroundColor="white";var a="lightgrey";void 0!==t&&(a="none"===t?"transparent":t),o.style.border="1px solid "+a;var r,s,l,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==x&&c.setAttribute("src",x),c.style.opacity=.7,null!==w)&&!i){(r=document.createElement("img")).style.position="absolute",r.style.zIndex="1001",r.style.opacity=1,c.style.opacity=.3,(s=360)>e/4*3&&(s=e/4*3),l=s/5.8,r.setAttribute("src",w),r.setAttribute("width",s),r.setAttribute("height",l);var d=(e-s)/2,u=(n-l)/2;r.style.left=d+"px",r.style.top=u+"px",o.appendChild(r)}return o.appendChild(c),o},I=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},E=["web","webSimple","web3d","tablet","tablet3d","phone"],A=function(e,n){if(f=e,n)G(f,!0);else{var a,r,s=!o;if(s){var l=_(f);!isNaN(l)&&l<4.4&&(s=!1)}a="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=f.indexOf("//");for(var d in r=c>0?f:0===c?a+f:"https://www.geogebra.org/apps/5.2.814.0/",E)if(f.slice(-1*E[d].length)===E[d]||f.slice(-1*(E[d].length+1))===E[d]+"/")return void G(r,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!s||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||C(t.showToolBar)||C(t.showMenuBar)||C(t.showAlgebraInput)||C(t.enableRightClick)||t.appName&&"classic"!=t.appName?r+="web3d/":r+="webSimple/",G(r,!1)}},G=function(e,n){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===n&&(n=-1===e.indexOf("http")),m=n,g="web.nocache.js",v=!1;var t=p.split("/");t.length>1&&(n||"webSimple"!==t[t.length-2]?E.indexOf(t[t.length-2])>=0&&(g=t[t.length-2]+".nocache.js"):(g="webSimple.nocache.js",v=!0)),t=e.split("/"),"test"===(f=t[t.length-3]).substr(0,4)?f=f.substr(4,1)+"."+f.substr(5,1):"war"!==f.substr(0,3)&&"beta"!==f.substr(0,4)||(f="5.0");var i=parseFloat(f);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),A("5.0",n))}},D=function(e,n){window.console&&window.console.log&&(!n||void 0===n.showLogging||n.showLogging&&"false"!==n.showLogging)&&console.log(e)};function O(){var e=n;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),A(e,!1),null!==c&&G(c,m),s=!0}return void 0!==t.material_id?k(O):O(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function n(e,n){1!=n?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+n+","+n+")",e.style.webkitTransform="scale("+n+","+n+")",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 t(e,n,t,i,o){if(e.isScreenshoGenerator)return 1;var a,r=void 0!==i&&i,s=null!=e.noScaleMargin&&e.noScaleMargin,l=(a=e.autoHeight)&&"false"!==a,c=function(e,n,t,i,o,a){var r=null;if(null!=a&&""!=a)for(var s=e.parentNode;null!=s;){if((" "+s.className+" ").indexOf(" "+a+" ")>-1){r=s;break}s=s.parentNode}var l=0,c=0,d=0,u=0,p=0,m=0,h=0;if(r)l=r.offsetWidth,c=Math.max(i?r.offsetWidth:0,r.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),d=l):(l=window.innerWidth,c=window.innerHeight,d=window.innerWidth),e){var f=e.getBoundingClientRect();f.left>0&&f.left<=l&&(void 0===o||!o)&&("rtl"===document.dir?(p=l-f.width-f.left,m=d<=480?10:30):(m=f.left,p=d<=480?10:30),u=m+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(u=40,h=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(u=0,h=40))}return e&&((void 0===t||!t)&&n>0&&n+u<l?l=n:l-=u,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=h)),{width:l,height:c}}(n,e.width,t,l,r&&window.GGBT_wsf_view||s,o),d=parseInt(c.width),u=e.width,p=e.height;if(void 0===u){var m=n.querySelector(".appletParameters");m&&(u=m.offsetWidth,p=m.offsetHeight)}var h=d/u,f=r?1:c.height/p;return void 0===t||t||(h=Math.min(1,h),f=Math.min(1,f)),Math.min(h,f)}function i(e,n,i){var o,a=1,r=!1;return e.hasOwnProperty("allowUpscale")&&(r=e.allowUpscale),e.hasOwnProperty("scale")&&(a=parseFloat(e.scale),(isNaN(a)||null===a||0===a)&&(a=1),a>1&&(r=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(r=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?a:(o=t(e,n,r,i,e.scaleContainerClass),!r||e.hasOwnProperty("scale")&&1!==a?Math.min(a,o):o)}function o(e){var n=Math.min(window.innerWidth,document.documentElement.clientWidth),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),o=(n-i.width)/2,a=(t-i.height)/2;a<0&&(a=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=o<40?"40px":o+"px",e.style.top=a+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=a<40?"40px":a+"px",e.style.left=o+"px")}return{responsiveResize:function(t,a){var r=t.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(t)}if(r.parentElement&&/fullscreen/.test(r.parentElement.className))return;var s=i(a,t);e()&&r.setAttribute("data-param-scale",s);for(var l=null,c=0;c<t.childNodes.length;c++)if(void 0!==t.childNodes[c].className&&t.childNodes[c].className.match(/^applet_scaler/)){l=t.childNodes[c];break}if(null!==l&&null!==l.querySelector(".noscale"))return;var d=void 0!==a.id?a.id:"ggbApplet",u=window[d];null!=u&&u.recalculateEnvironments||null===l||l.className.match(/fullscreen/)||(l.parentNode.style.transform="",isNaN(s)||1===s?(n(l,1),l.parentNode.style.width=a.width+"px",l.parentNode.style.height=a.height+"px"):(l.parentNode.style.width=a.width*s+"px",l.parentNode.style.height=a.height*s+"px",n(l,s))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&o(t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(r).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:o,getScale:i,scaleElement:n}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,n){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function n(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var t=n();if(t)e();else{o.addEventListener&&o.addEventListener(Z,a,!1);var i=setInterval((function(){a()}),$)}function a(){if(!t){if(!n())return;t=!0,e(),o.removeEventListener&&o.removeEventListener(Z,a,!1),i&&clearInterval(i)}}}((function(){var n,t,i,o;n=e,t=u(),i=t.body,(o=t.createElement(_)).language=ab,o.crossOrigin=W,o.src=n,webModule.__errFn&&(o.onerror=function(){webModule.__errFn(L,new Error(bb+n))}),i.appendChild(o),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=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 n=c[e];return null==n?null:n},r=d,webModule.__errFn=e}function B(){function e(e){var n=e.lastIndexOf(rb);-1==n&&(n=e.length);var t=e.indexOf(sb);-1==t&&(t=e.length);var i=e.lastIndexOf(tb,Math.min(t,n));return i>=O?e.substring(O,i+P):W}var n,t=null!=(n=__gwt_getMetaProperty(wb))?n:W;return t==W&&(t=function(){for(var n=o.getElementsByTagName(_),t=O;t<n.length;++t)if(-1!=n[t].src.indexOf(xb))return e(n[t].src);return W}()),t==W&&(t=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),t==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(t=e(o.location.href)),t=function(n){if(n.match(/^\w+:\/\//));else{var t=o.createElement(ub);t.src=n+vb,n=e(t.src)}return n}(t),t}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function a(e){var n=o[e](),t=i[e];if(n in t)return n;var a=[];for(var s in t)a[t[s]]=s;throw r&&r(e,a,n),null}if(__gwt_isKnownPropertyValue=function(e,n){return n in i[e]},webModule.__getPropMap=function(){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[n]=a(n));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var s=(e=Cb).indexOf(Db);-1!=s&&(t=parseInt(e.substring(s+P),$),e=e.substring(O,s))}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 n=s[L].bindings;s[L].bindings=function(){for(var t=n?n():{},i=e[webModule.__softPermutationId],o=O;o<i.length;o++){var a=i[o];t[a[O]]=a[P]}return t}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var n=u(),t=n.body,i=n.createElement(_);i.language=ab,i.text=e,t.appendChild(i),t.removeChild(i)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},55087:function(e,n,t){"use strict";function i(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function o(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var o=e[i],a=n?"".concat(n,"/").concat(o.name):"".concat(o.name);t.push({title:o.name,type:o.type,isLeaf:"tree"!==o.type,key:a})}return t}function a(e,n,t){for(var i=0;i<e.length;i++){var o=e[i];if(o.key===n){o.children=t;break}o.children&&a(o.children,n,t)}return e}function r(e,n,t){var i;return function(){var o=this,a=arguments,r=function(){i=null,t||e.apply(o,a)},s=t&&!i;clearTimeout(i),i=setTimeout(r,n),s&&e.apply(o,a)}}t.d(n,{Ax:function(){return a},Ds:function(){return r},KI:function(){return s},SI:function(){return o},f1:function(){return i}});var s=t(27065).Z.API_SERVER},37363:function(e,n,t){"use strict";t.d(n,{Z:function(){return N}});var i=t(7557),o=t.n(i),a=t(41498),r=t.n(a),s=t(79800),l=t.n(s),c=t(59301),d="list___KhJas",u="row___GGtIx",p="title___o_xqf",m="size___OVRoL",h="download___ZLcIH",f="preview___gi0kI",g="annotation___KVSwj",v=t(92310),x=t.n(v),w=t(84143),y=t(74908),_=t(6457),b=t(27065),j=t(51136),k=t(89918),S=t(37712),N=function(e){var n=e.className,t=e.style,i=e.dataSource,a=void 0===i?[]:i,s=e.authority,v=void 0!==s&&s,N=e.callback,C=e.showDimensions,M=void 0===C||C,T=(0,c.useState)({content:"",type:""}),L=l()(T,2),Z=L[0],B=L[1],P=(0,c.useState)({}),I=l()(P,2),E=I[0],A=I[1],G=(0,c.useState)(!1),D=l()(G,2),O=D[0],R=D[1],z=(0,c.useState)({title:"",visible:!1,src:"",snapshotData:{}}),F=l()(z,2),H=F[0],W=F[1],Y=(0,c.useRef)(),V=function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A(n),"txt"!==n.file_type){e.next=6;break}return e.next=4,(0,j.ZP)(n.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:t=e.sent,Y.current=t;case 6:B({type:n.file_type,content:b.Z.API_SERVER+n.url});case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),U=function(e){var n;W({visible:!0,src:b.Z.API_SERVER+e.url,id:e.id,title:e.title,snapshotData:null==e||null===(n=e.subitem)||void 0===n?void 0:n.settings})},J=function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B({type:n.file_type,content:b.Z.API_SERVER+(null==n||null===(t=n.subitem)||void 0===t?void 0:t.url)});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return null!=a&&a.length?(0,S.jsxs)(c.Fragment,{children:[(0,S.jsx)("div",{className:x()(d,n),style:t,children:a.map((function(e,n){var t,i,o;return(0,S.jsxs)("div",{className:u,children:[(0,S.jsxs)("div",{className:p,onClick:function(){return V(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-fujian1"}),(0,S.jsx)("span",{title:e.title,children:e.title})]}),(0,S.jsx)("div",{className:m,children:e.filesize}),(0,S.jsxs)("div",{className:h,onClick:function(){var n;(0,_.Nd)("","".concat(b.Z.API_SERVER).concat(null===(n=e.url)||void 0===n?void 0:n.replace("disposition=inline","")))},children:[(0,S.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载"]}),!["other","download"].includes(null==e?void 0:e.file_type)&&(0,S.jsxs)("div",{className:f,onClick:function(){return V(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-yulan"}),"预览"]}),["image"].includes(null==e?void 0:e.file_type)&&M&&(v?(0,S.jsxs)("div",{className:g,onClick:function(){return U(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-pizhu"}),null!==(t=e.subitem)&&void 0!==t&&t.id?"修改批注":"批注"]}):(null===(i=e.subitem)||void 0===i?void 0:i.id)&&(0,S.jsxs)("div",{className:g,onClick:function(){return J(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"查看老师批注"]})),["image"].includes(null==e?void 0:e.file_type)&&(null===(o=e.subitem)||void 0===o?void 0:o.id)&&(0,S.jsxs)("div",{className:h,style:{marginLeft:20},onClick:function(){var n;(0,_.Nd)("","".concat(b.Z.API_SERVER).concat(null==e||null===(n=e.subitem)||void 0===n||null===(n=n.url)||void 0===n?void 0:n.replace("disposition=inline","")))},children:[(0,S.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载批注文件"]}),["office"].includes(null==e?void 0:e.file_type)&&(0,k.eB)()&&["xlsx","docx","pptx"].includes(null==e?void 0:e.file_sub)&&M&&(0,S.jsxs)("div",{className:g,onClick:function(){R(!0),V(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-pizhu"}),e.is_edit?"修改批注":"批注"]}),e.is_edit&&(0,k.dE)()&&M&&(0,S.jsxs)("div",{className:g,onClick:function(){V(e)},children:[(0,S.jsx)("i",{className:"iconfont icon-sousuo7"}),"查看老师批注"]})]},n)}))}),(0,S.jsx)(w.Z,{close:!0,data:null==Z?void 0:Z.content,type:null==Z?void 0:Z.type,hasMask:!0,editOffice:O?"edit":"view",monacoEditor:{value:Y.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:v&&M&&"image"===Z.type?function(){return U(E)}:null,onClose:function(){N(),R(!1),B({content:"",type:""})}}),(0,S.jsx)(y.Z,{onOk:function(){N(),W({visible:!1})},onClose:function(){return W({visible:!1})},data:H})]}):null}},74908:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(7557),o=t.n(i),a=t(41498),r=t.n(a),s=t(79800),l=t.n(s),c=t(59301),d="imageDimensions___a7crR",u="img___Kroat",p="fullWidth___c492T",m=t(92310),h=t.n(m),f=t(71418),g=t(2859),v=t(51136),x=t(6457),w=t(37712),y=function(e){var n=e.data,t=e.className,i=e.fullWidth,a=e.style,s=void 0===a?{}:a,m=e.onClose,y=e.onOk,_=e.showFullTools,b=e.noAssociationId,j=(0,c.useRef)(null),k=(0,c.useRef)(null),S=(0,c.useState)(!1),N=l()(S,2),C=N[0],M=N[1],T=(0,c.useState)("正在加载中"),L=l()(T,2),Z=L[0],B=L[1];(0,c.useEffect)((function(){null!=n&&n.visible?document.body.setAttribute("data-custom","y-hidden"):document.body.removeAttribute("data-custom"),null!=n&&n.src&&P()}),[null==n?void 0:n.visible]);var P=function(){var e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),B("正在加载中"),e.next=4,(0,x.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,j.current.src="",j.current.src=t,j.current.onload=function(){E()},M(!1),B("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=r()(o()().mark((function e(t){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),B("正在保存中"),e.next=4,(0,v.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:n.title,file:t.dataUrl}});case 4:if(null==(i=e.sent)||!i.id||b){e.next=12;break}return e.next=8,(0,v.ZP)("/api/attachments/".concat(n.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(t.state)}});case 8:0===e.sent.status&&y(),e.next=13;break;case 12:null!=i&&i.id&&y(i);case 13:M(!1),B("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){k.current=new g.hP(j.current),k.current.addEventListener("render",I),k.current.addEventListener("beforeclose",m),_&&(k.current.availableMarkerTypes=k.current.ALL_MARKER_TYPES,k.current.uiStyleSettings.redoButtonVisible=!0,k.current.uiStyleSettings.notesButtonVisible=!0,k.current.uiStyleSettings.zoomButtonVisible=!0,k.current.uiStyleSettings.zoomOutButtonVisible=!0,k.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=k.current.uiStyleSettings,k.current.show(),null!=n&&n.snapshotData&&k.current.restoreState(n.snapshotData),setTimeout((function(){var e;(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var n=document.querySelector(e.name);n&&n.setAttribute("title",e.title)}))}),300)};return(0,w.jsx)(c.Fragment,{children:(null==n?void 0:n.visible)&&(0,w.jsxs)("div",{className:h()(d,t,i?p:""),style:s,children:[(0,w.jsx)(f.Z,{spinning:C,tip:Z,style:{position:"absolute"}}),(0,w.jsx)("img",{className:u,ref:j})]})})}},42658:function(e,n,t){"use strict";t.d(n,{z:function(){return N},Z:function(){return C}});var i=t(7557),o=t.n(i),a=t(41498),r=t.n(a),s=t(82242),l=t.n(s),c=t(37205),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(21068),f=t(8591),g=t(43418),v=t(3113),x=t(27065),w=t(28838),y=t(37712),_="  ";function b(e){if(0==e)return"0 Byte";var n=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][n]}var j=t(626),k=t(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var S=h.Z.Dragger;function N(e){var n=[];return e&&e.length>0&&(n=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+_+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),n}var C=function(e){var n=e.value,t=e.onChange,i=e.action,a=e.data,s=e.className,c=e.maxSize,u=void 0===c?150:c,N=e.title,C=void 0===N?"上传附件":N,M=e.showRemoveModal,T=void 0!==M&&M,L=e.accept,Z=void 0===L?"":L,B=e.additionalText,P=e.isDragger,I=e.number,E=void 0===I?1e3:I,A=e.aloneClear,G=void 0!==A&&A,D=(0,m.useState)(!1),O=p()(D,2),R=O[0],z=O[1],F=(0,m.useState)(n||[]),H=p()(F,2),W=H[0],Y=H[1],V=(0,m.useState)(1),U=p()(V,2),J=U[0],q=U[1];(0,m.useEffect)((function(){n&&(1===J&&Y(d()(n)),q(2),E===(null==n?void 0:n.length)&&z(!0))}),[n]);var K,Q=function(){setTimeout((function(){W.pop(),Y(d()(W))}),500)},X={multiple:!0,disabled:R,accept:Z,withCredentials:!0,fileList:W,beforeUpload:function(e,n){var t=e.size/1024/1024;return W.concat(n).length>E?(W.pop(),Y(d()(W)),f.ZP.error("最多只能上传".concat(E,"个文件")),G?Promise.reject():(Q(),!1)):t<u||(f.ZP.error("该文件无法上传。超过文件大小限制(".concat(u,"MB).")),G?Promise.reject():(Q(),!1))},data:a,action:i||"".concat(x.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){var n,i;(W="removed"===e.file.status?e.fileList:(0,k.uniqBy)([].concat(d()(e.fileList),d()(W)),"uid"),"done"!==e.file.status||-1!==(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.status))?(W.length>=E?z(!0):z(!1),Y(d()(W)),W=W.map((function(e){var n,t;null!=e&&null!==(n=e.response)&&void 0!==n&&n.id&&(e.url="/api/attachments/".concat(null==e||null===(t=e.response)||void 0===t?void 0:t.id));return-1===e.name.indexOf(_)&&(e.name="".concat(e.name).concat(_).concat(b(e.size))),l()({},e)})),console.log("info:",e,W),t(W)):f.ZP.error(null===(i=e.file)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.message)},onRemove:(K=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.response?n.response.id:n.id)){e.next=8;break}return e.next=4,(0,w.JZ)(n.response?n.response.id:n.uid);case 4:return t=e.sent,e.abrupt("return",Promise.resolve(t));case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!T){e.next=5;break}return e.abrupt("return",new Promise((function(e,n){var i;g.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,y.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(i=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:n.sent,f.ZP.success("删除成功"),e(!0);case 5:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 5:return e.next=7,t();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)}))),function(e){return K.apply(this,arguments)})};return(0,y.jsxs)("div",{className:"multi-upload ".concat(s||""),children:[P&&(0,y.jsxs)(S,l()(l()({},X),{},{children:[(0,y.jsx)("p",{className:"ant-upload-drag-icon",children:(0,y.jsx)(j.Z,{})}),(0,y.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,y.jsx)("br",{}),"(单个文件最大限制为",u,"MB)"," "]}),B]})),!P&&(0,y.jsxs)(h.Z,l()(l()({},X),{},{children:[(0,y.jsxs)(v.ZP,{disabled:R,className:"upload_button",children:[(0,y.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),C]}),(0,y.jsxs)("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:"upload_text",children:["(单个文件最大",u,"MB)"," "]})]}))]})}},45286:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var i=t(79800),o=t.n(i),a=t(59301),r=t(30929),s=t(68078),l=t(37712),c=function(){var e=(0,a.useState)(""),n=o()(e,2),t=n[0],i=n[1],c=(0,a.useState)(0),d=o()(c,2),u=(d[0],d[1]),p=(0,a.useState)(),m=o()(p,2),h=(m[0],m[1]),f=(0,a.useState)(),g=o()(f,2),v=(g[0],g[1]),x=(0,a.useState)(!1),w=o()(x,2),y=(w[0],w[1],(0,a.useRef)(""));function _(e){27==e.keyCode&&y.current&&b()}function b(){document.body.style.overflow="auto",h(void 0),v(void 0),u(0),i("")}(0,a.useEffect)((function(){return r.Z.subscribe("preview-image",(function(e){i(e),console.log(k.current),document.body.style.overflow="hidden"}))}),[]),(0,a.useEffect)((function(){return document.addEventListener("keydown",_),function(){document.removeEventListener("keydown",_)}}),[]),(0,a.useEffect)((function(){y.current=t}),[t]);(0,a.useRef)();var j=(0,a.useRef)(),k=(0,a.useRef)();return(0,l.jsx)(a.Fragment,{children:t?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"preview-wrp-group",ref:j,children:(0,l.jsx)(s.Z,{className:"image-preview",src:t,style:{display:"none"},preview:{visible:!0,src:t,movable:!1,onVisibleChange:function(e){i("")}},alt:"预览大图"})})}):null})}},37507:function(e,n,t){"use strict";t.d(n,{h:function(){return v}});var i=t(82242),o=t.n(i),a=t(79800),r=t.n(a),s=t(59301),l=t(57809),c=t(78241),d=t(3113),u=t(89780),p=t.n(u),m=(t(81974),t(3693),t(37712)),h=l.default.Option,f={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function v(e){var n=e.value,t=e.onChange,i=e.mode,a=e.options,l=void 0===a?{}:a,c=(0,s.useRef)(),d=(0,s.useState)(),u=r()(d,2),h=u[0],f=u[1];return(0,s.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,s.useEffect)((function(){h&&h.setOption("mode",i)}),[h,i]),(0,s.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,s.useEffect)((function(){if(c.current&&!h){var e=p().fromTextArea(c.current,o()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));f(e)}}),[c.current,h]),(0,m.jsx)("div",{className:"my-codemirror-container",children:(0,m.jsx)("textarea",{ref:c})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,s.useState)("python"),a=r()(i,2),u=a[0],p=a[1];return(0,m.jsxs)(c.Z,o()(o()({},f),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},style:{width:500},children:[(0,m.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,m.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(g[e][1])},children:Object.keys(g).map((function(e){return(0,m.jsx)(h,{value:e,children:g[e][0]},e)}))})}),(0,m.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,m.jsx)(v,{mode:u})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(d.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(d.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},11094:function(e,n,t){"use strict";t.d(n,{Z:function(){return Ce}});var i=t(91232),o=t.n(i),a=t(79800),r=t.n(a),s=t(85573),l=t.n(s),c=t(59301),d=t(89780),u=t.n(d),p=t(76374),m=(t(81974),t(6313),t(25717),t(99498),t(25419),t(67549),t(42783)),h=t(37712),f=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[t]));return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},g=t(82242),v=t.n(g),x=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function w(e){var n=e.onActionCallback,t=e.title,i=e.icon,o=e.actionName,a=e.className,r=void 0===a?"":a,s=e.children;return(0,h.jsxs)("a",{title:t,className:r,onClick:function(){n(o)},children:[(0,h.jsx)("i",{className:"".concat(i)}),s]})}var y=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,o=e.onActionCallback,a=e.fullScreen,r=e.insertTemp,s=e.hidetoolBar,l=e.extraUse,c=[].concat(x,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,h.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&c.map((function(e,n){return(0,h.jsx)("li",{children:e.actionName?(0,h.jsx)(w,v()(v()({},e),{},{onActionCallback:o})):(0,h.jsx)("span",{className:"v-line"})},n)})),t?(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:o,children:(0,h.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:o,children:(0,h.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:o,children:(0,h.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,r&&(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(r),onActionCallback:o,children:(0,h.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,h.jsx)("li",{children:l}),(0,h.jsx)("li",{className:"btn-full-screen",children:(0,h.jsx)(w,{icon:"".concat(a?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:a?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:o})})]})},_=t(27308),b=t(78241),j=t(8772),k=t(3113),S={labelCol:{span:4},wrapperCol:{span:20}},N=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,v()(v()({},S),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,h.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},C=t(37507),M=t(8591),T=t(55087),L=b.Z.useForm,Z={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},P=function(e){var n=e.callback,t=e.onCancel,i=L(),o=r()(i,1)[0],a=(0,c.useRef)();function s(e,n){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):M.ZP.error(e.message)}return(0,h.jsxs)(b.Z,v()(v()({form:o},B),{},{className:"upload-image-panel",onFinish:function(e){n(e,a.current)},style:{width:470,overflow:"hidden"},children:[(0,h.jsx)(b.Z.Item,{label:"图片地址",required:!0,children:(0,h.jsxs)("div",{className:"flex-container",children:[(0,h.jsx)(b.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,h.jsx)(j.Z,{style:Z})}),(0,h.jsx)(I,{onFileChange:function(e){var n=e.target.files[0];a.current=n,E(n,s)}})]})}),(0,h.jsx)(b.Z.Item,{label:"图片描述",name:"alt",children:(0,h.jsx)(j.Z,{style:{width:264}})}),(0,h.jsxs)(b.Z.Item,{style:{textAlign:"right"},children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function I(e){var n=e.onFileChange;return(0,h.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,h.jsx)("input",{type:"file",onChange:n})]})}function E(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(T.KI,"/api/attachments.json")),i.send(t)}var A=t(95237),G=t(74908),D=function(e){var n=e.callback,t=e.onCancel,i=document.createElement("canvas"),o=i.getContext("2d");i.width=1e3,i.height=800,o.fillStyle="#ffffff",o.fillRect(0,0,i.width,i.height);var a=i.toDataURL("image/png");return(0,h.jsx)(A.Z,{style:{height:"100vh"},children:(0,h.jsx)(G.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:a,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},O=t(7557),R=t.n(O),z=t(41498),F=t.n(z),H=t(37205),W=t.n(H),Y=t(12378);function V(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(V,go.CommandHandler),V.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},V.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.x,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n,e.position.y))})),e.commitTransaction("aligning left")},V.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.x+e.actualBounds.width;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},V.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.y,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,n))})),e.commitTransaction("alignTop")},V.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.y+e.actualBounds.height;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},V.prototype.alignCenterX=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center X");var t=n.actualBounds.x+n.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},V.prototype.alignCenterY=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center Y");var t=n.actualBounds.y+n.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},V.prototype.alignColumn=function(e){var n=this.diagram;n.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var o=t[i],a=o.actualBounds.y+o.actualBounds.height+e;t[i+1].move(new go.Point(o.actualBounds.x,a))}n.commitTransaction("align Column")},V.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var n=this.diagram;n.startTransaction("align Row");var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var o=t[i],a=o.actualBounds.x+o.actualBounds.width+e;t[i+1].move(new go.Point(a,o.actualBounds.y))}n.commitTransaction("align Row")},V.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},V.prototype.rotate=function(e){var n;void 0===e&&(e=90),(n=this.diagram).startTransaction("rotate "+e.toString()),(n=this.diagram).selection.each((function(n){n instanceof go.Link||n instanceof go.Group||(n.angle+=e)})),n.commitTransaction("rotate "+e.toString())},V.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.max(t,n)}})),n.set(e,t)})),e.selection.each((function(e){V._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},V.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.min(t,n)}})),n.set(e,t)})),e.selection.each((function(e){V._assignZOrder(e,n.get(e.layer)-1-V._findGroupDepth(e))})),e.commitTransaction("pushToBack")},V._assignZOrder=function(e,n,t){void 0===t&&(t=e),e.layer===t.layer&&(e.zOrder=n),e instanceof go.Group&&e.memberParts.each((function(e){V._assignZOrder(e,n+1,t)}))},V._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,V._findGroupDepth(e))})),n+1}return 0},V.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var n=e.lastInput;if("Up"===n.key||"Down"===n.key||"Left"===n.key||"Right"===n.key){var t=this.arrowKeyBehavior;if("none"===t)return;if("select"===t)return void this._arrowKeySelect();if("move"===t)return void this._arrowKeyMove();if("tree"===t)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},V.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(n){e.push(n)})),this.diagram.parts.each((function(n){e.push(n)})),e},V.prototype._arrowKeyMove=function(){var e=this.diagram,n=e.lastInput,t=0,i=0;if(n.control||n.meta)t=1,i=1;else if(null!==e.grid){var o=e.grid.gridCellSize;i=o.width,t=o.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-t)):"Down"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+t)):"Left"===n.key?e.move(new go.Point(e.actualBounds.x-i,e.actualBounds.y)):"Right"===n.key&&e.move(new go.Point(e.actualBounds.x+i,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},V.prototype._arrowKeySelect=function(){var e=this.diagram,n=e.lastInput,t=null;"Up"===n.key?t=this._findNearestPartTowards(270):"Down"===n.key?t=this._findNearestPartTowards(90):"Left"===n.key?t=this._findNearestPartTowards(180):"Right"===n.key&&(t=this._findNearestPartTowards(0)),null!==t&&(n.shift?t.isSelected=!0:n.control||n.meta?t.isSelected=!t.isSelected:e.select(t))},V.prototype._findNearestPartTowards=function(e){var n=this.diagram.selection.first();if(null===n)return null;for(var t=n.actualBounds.center,i=this._getAllParts(),o=1/0,a=n,r=0;r<i.length;r++){var s=i[r];if(s!==n&&s.canSelect()){var l=s.actualBounds.center,c=t.directionPoint(l),d=this._angleCloseness(c,e);if(d<=45){var u=t.distanceSquaredPoint(l);(u*=1+Math.sin(d*Math.PI/180))<o&&(o=u,a=s)}}}return a},V.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},V.prototype._arrowKeyTree=function(){var e=this.diagram,n=e.selection.first();if(n instanceof go.Node){var t=e.lastInput;if("Right"===t.key)if(n.isTreeLeaf);else if(n.isTreeExpanded){null!==(o=this._sortTreeChildrenByY(n).first())&&e.select(o)}else e.commandHandler.canExpandTree(n)&&e.commandHandler.expandTree(n);else if("Left"===t.key){if(!n.isTreeLeaf&&n.isTreeExpanded)e.commandHandler.canCollapseTree(n)&&e.commandHandler.collapseTree(n);else null!==(a=n.findTreeParentNode())&&e.select(a)}else if("Up"===t.key){if(null!==(a=n.findTreeParentNode()))if((s=(r=this._sortTreeChildrenByY(a)).indexOf(n))>0){for(var i=r.elt(s-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(a)}else if("Down"===t.key){var o;if(n.isTreeExpanded&&!n.isTreeLeaf)null!==(o=this._sortTreeChildrenByY(n).first())&&e.select(o);else for(;null!==n;){var a,r,s;if(null===(a=n.findTreeParentNode()))break;if((s=(r=this._sortTreeChildrenByY(a)).indexOf(n))<r.length-1){e.select(r.elt(s+1));break}n=a}}var l=e.selection.first();null!==l&&e.scrollToRect(l.actualBounds)}},V.prototype._sortTreeChildrenByY=function(e){var n=(new go.List).addAll(e.findTreeChildrenNodes());return n.sort((function(e,n){var t=e.location,i=n.location;return t.y<i.y?-1:t.y>i.y?1:t.x<i.x?-1:t.x>i.x?1:0})),n},V.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},V.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(V.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(V.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 U=V,J=(t(31270),t(85160)),q=t(43418),K=t(43604),Q=t(51136),X="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=Y;var ee=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),o=(0,c.useRef)(),a=(0,c.useRef)(),s=(0,c.useRef)(!1),l=(0,c.useRef)(!1),d=(0,c.useState)(0),u=r()(d,2),p=u[0],m=u[1],f=function(){var e=F()(R()().mark((function e(){var n,o;return R()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,Q.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:n.src}});case 3:o=e.sent,t({src:o.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){m(p+1)}),[]),(0,h.jsx)("div",{ref:l,className:s.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,h.jsx)(q.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:l.current,rootClassName:"zIndex-9999",title:(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(K.Z,{flex:1,children:"插入流程图"}),(0,h.jsx)(K.Z,{onClick:function(){s.current=!s.current,m(p+1)},children:(0,h.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,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)(J.FI,{initDiagram:function(){var e=Y.GraphObject.make,n="#ff3333",t="#3358ff",r="#25ad23",s="#d533ff",l="#7d33ff",c="#ff6233",d="#ffffff",u="#000000",p="#fffcd5",m="#d5ebff",h="#f2dfe0",f="#a5d2fa",g="#cccccc",v="#b3e6b3",x="#fcbbbd";function w(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var o=t.part.adornedPart,a=(new Y.Point).setRectSpot(o.actualBounds,n);a.subtract(o.location),a.scale(2,2),a.x+=130*Math.sign(a.x),a.y+=130*Math.sign(a.y),a.add(o.location),a.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var r=i.copyNodeData(o.data);i.setGroupKeyForNodeData(r,i.getGroupKeyForNodeData(o.data)),i.addNodeData(r);var s={from:o.key,to:i.getKeyForNodeData(r)};i.addLinkData(s);var l=e.diagram.findNodeForData(r);l.location=a,e.diagram.select(l),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(Y.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(Y.Spot.Top)||n.equals(Y.Spot.Bottom)?25:18,height:n.equals(Y.Spot.Top)||n.equals(Y.Spot.Bottom)?18:25,fill:"orange",stroke:d,strokeWidth:4,mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},isActionable:!0,click:i,contextClick:i})}function y(n){return e(Y.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,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},click:function(e,n){e.diagram.commandHandler.showContextMenu(n.part.adornedPart)}},n||{})}function _(e,n){return function(t,i){t.handled=!0,t.diagram.model.commit((function(t){t.set(i.part.adornedPart.data,e,n)}))}}function b(n,t){return t||(t="color"),e(Y.Shape,{width:16,height:16,stroke:"lightgray",fill:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.stroke="dodgerblue"},mouseLeave:function(e,n){return n.stroke="lightgray"},click:_(t,n),contextClick:_(t,n)})}function j(){return[e("ContextMenuButton",e(Y.Panel,"Horizontal",b(d,"fill"),b(p,"fill"),b(m,"fill"),b(h,"fill"))),e("ContextMenuButton",e(Y.Panel,"Horizontal",b(g,"fill"),b(v,"fill"),b(f,"fill"),b(x,"fill")))]}function k(){return[e("ContextMenuButton",e(Y.Panel,"Horizontal",b(u),b(r),b(t),b(n))),e("ContextMenuButton",e(Y.Panel,"Horizontal",b(d),b(s),b(l),b(c)))]}function S(n,t){return t||(t="thickness"),e(Y.Shape,"LineH",{width:16,height:16,strokeWidth:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:_(t,n),contextClick:_(t,n)})}function N(n,t){return t||(t="dash"),e(Y.Shape,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:_(t,n),contextClick:_(t,n)})}function C(){return[e("ContextMenuButton",e(Y.Panel,"Horizontal",S(1),S(2),S(3),S(4))),e("ContextMenuButton",e(Y.Panel,"Horizontal",N(null),N([2,4]),N([4,4])))]}function M(n,t){return t||(t="figure"),e(Y.Shape,{width:32,height:32,scale:.5,fill:"lightgray",figure:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="lightgray"},click:_(t,n),contextClick:_(t,n)})}function T(n){return e(Y.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function L(n){var t="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===n?t="M0 0 M16 16 M0 8 L16 8":2===n&&(t="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(Y.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:_("dir",n),contextClick:_("dir",n)})}function Z(n){var t=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var i=t.part.adornedPart;e.set(i.data,n?"toSpot":"fromSpot",Y.Spot.stringify(Y.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(Y.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:t,contextClick:t})}function B(n,t){var i=0,o=Y.Spot.RightSide;n.equals(Y.Spot.Top)?(i=270,o=Y.Spot.TopSide):n.equals(Y.Spot.Left)?(i=180,o=Y.Spot.LeftSide):n.equals(Y.Spot.Bottom)&&(i=90,o=Y.Spot.BottomSide),t||(i-=180);var a=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",Y.Spot.stringify(o)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(Y.Shape,{alignment:n,alignmentFocus:n.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:i,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:a,contextClick:a})}return i.current=new Y.Diagram(o.current,{padding:20,grid:e(Y.Panel,"Grid",e(Y.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(Y.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(U),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var n=e.subject;n.location=n.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 n=e.subject;e.diagram.toolManager.linkingTool.isForwards?n.toNode.invalidateConnectedLinks():n.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),i.current.nodeTemplate=e(Y.Node,"Auto",{locationSpot:Y.Spot.Center,locationObjectName:"SHAPE",desiredSize:new Y.Size(120,60),minSize:new Y.Size(40,40),resizable:!0,resizeCellSize:new Y.Size(10,10),rotatable:!0},new Y.Binding("location","loc",Y.Point.parse).makeTwoWay(Y.Point.stringify),new Y.Binding("desiredSize","size",Y.Size.parse).makeTwoWay(Y.Size.stringify),e(Y.Shape,{name:"SHAPE",fill:d,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Y.Spot.AllSides,toSpot:Y.Spot.AllSides},new Y.Binding("figure"),new Y.Binding("fill"),new Y.Binding("stroke","borderColor"),new Y.Binding("strokeWidth","thickness"),new Y.Binding("strokeDashArray","dash")),e(Y.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(Y.TextBlock,{margin:1,textAlign:"center",overflow:Y.TextBlock.OverflowEllipsis,editable:!0},new Y.Binding("text").makeTwoWay(),new Y.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(Y.Panel,"Vertical",{maxSize:new Y.Size(200,NaN)},e(Y.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new Y.Binding("text")),e(Y.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new Y.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(Y.Adornment,"Spot",e(Y.Placeholder,{padding:10}),w(Y.Spot.Top,"TriangleUp"),w(Y.Spot.Left,"TriangleLeft"),w(Y.Spot.Right,"TriangleRight"),w(Y.Spot.Bottom,"TriangleDown"),y({alignment:new Y.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(Y.Panel,"Horizontal",M("Rectangle"),M("RoundedRectangle"),M("Ellipse"),M("Diamond"))),e("ContextMenuButton",e(Y.Panel,"Horizontal",M("Parallelogram2"),M("ManualOperation"),M("Procedure"),M("Cylinder1"))),e("ContextMenuButton",e(Y.Panel,"Horizontal",M("Terminator"),M("CreateRequest"),M("Document"),M("TriangleDown"))),j(),k(),C()),i.current.groupTemplate=e(Y.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Y.Spot.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,n){n.addMembers(n.diagram.selection,!0)||n.diagram.currentTool.doCancel()},avoidable:!1},new Y.Binding("location","loc",Y.Point.parse).makeTwoWay(Y.Point.stringify),e(Y.Panel,"Auto",{name:"BODY"},e(Y.Shape,{parameter1:10,fill:d,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Y.Spot.AllSides,toSpot:Y.Spot.AllSides},new Y.Binding("fill"),new Y.Binding("stroke","color"),new Y.Binding("strokeWidth","thickness"),new Y.Binding("strokeDashArray","dash")),e(Y.Placeholder,{background:"transparent",margin:20})),e(Y.TextBlock,{alignment:Y.Spot.Top,alignmentFocus:Y.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new Y.Binding("text"),new Y.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(Y.Adornment,"Spot",e(Y.Panel,"Auto",e(Y.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(Y.Placeholder,{margin:1.5})),y({alignment:Y.Spot.TopRight,alignmentFocus:Y.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",j(),k(),C()),i.current.linkTemplate=e(Y.Link,{layerName:"Foreground",routing:Y.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Y.Binding("fromSpot","fromSpot",Y.Spot.parse),new Y.Binding("toSpot","toSpot",Y.Spot.parse),new Y.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new Y.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new Y.Binding("points").makeTwoWay(),e(Y.Shape,{strokeWidth:2},new Y.Binding("stroke","color"),new Y.Binding("strokeWidth","thickness"),new Y.Binding("strokeDashArray","dash")),e(Y.Shape,{segmentIndex:0,segmentOffset:new Y.Point(15,0),segmentOrientation:Y.Link.OrientAlong,alignmentFocus:Y.Spot.Right,figure:"circle",width:10,strokeWidth:0},new Y.Binding("fill","color"),new Y.Binding("visible","dir",(function(e){return 1===e}))),e(Y.Shape,{segmentIndex:-1,segmentOffset:new Y.Point(-10,6),segmentOrientation:Y.Link.OrientPlus90,alignmentFocus:Y.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Y.Binding("fill","color"),new Y.Binding("visible","dir",(function(e){return e>=1})),new Y.Binding("width","thickness",(function(e){return 7+3*e})),new Y.Binding("height","thickness",(function(e){return 7+3*e})),new Y.Binding("segmentOffset","thickness",(function(e){return new Y.Point(-15,4+1.5*e)}))),e(Y.Shape,{segmentIndex:0,segmentOffset:new Y.Point(15,-6),segmentOrientation:Y.Link.OrientMinus90,alignmentFocus:Y.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Y.Binding("fill","color"),new Y.Binding("visible","dir",(function(e){return 2===e})),new Y.Binding("width","thickness",(function(e){return 7+3*e})),new Y.Binding("height","thickness",(function(e){return 7+3*e})),new Y.Binding("segmentOffset","thickness",(function(e){return new Y.Point(-15,4+1.5*e)}))),e(Y.TextBlock,{alignmentFocus:new Y.Spot(0,1,-4,0),editable:!0},new Y.Binding("text").makeTwoWay(),new Y.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(Y.Adornment,e(Y.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:T(2)},new Y.Binding("pathPattern","thickness",T)),y({alignmentFocus:new Y.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",k(),C(),e("ContextMenuButton",e(Y.Panel,"Horizontal",L(0),L(1),L(2))),e("ContextMenuButton",e(Y.Panel,"Horizontal",e(Y.Panel,"Spot",Z(!1),B(Y.Spot.Top,!1),B(Y.Spot.Left,!1),B(Y.Spot.Right,!1),B(Y.Spot.Bottom,!1)),e(Y.Panel,"Spot",{margin:new Y.Margin(0,0,0,2)},Z(!0),B(Y.Spot.Top,!0),B(Y.Spot.Left,!0),B(Y.Spot.Right,!0),B(Y.Spot.Bottom,!0))))),new Y.Palette(a.current,{maxSelectionCount:1,linkTemplate:e(Y.Link,{locationSpot:Y.Spot.Center,selectionAdornmentTemplate:e(Y.Adornment,"Link",{locationSpot:Y.Spot.Center},e(Y.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(Y.Shape,{toArrow:"Standard",stroke:null}))},{routing:Y.Link.AvoidsNodes,curve:Y.Link.JumpOver,corner:5,toShortLength:4},new Y.Binding("points"),e(Y.Shape,{isPanelMain:!0,strokeWidth:2}),e(Y.Shape,{toArrow:"Standard",stroke:null})),model:new Y.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(W()(Y.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(Y.Node,"Auto",{locationSpot:Y.Spot.Center},new Y.Binding("location","location",Y.Point.parse).makeTwoWay(Y.Point.stringify),e(Y.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 Y.Binding("stroke").makeTwoWay(),new Y.Binding("fill").makeTwoWay(),new Y.Binding("figure")),e(Y.TextBlock,{margin:new Y.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new Y.Size(16,16),maxSize:new Y.Size(10,NaN),textAlign:"center",editable:!0},new Y.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(Y.Panel,"Grid",e(Y.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(Y.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),i.current.grid.visible=!0,i.current.grid.gridCellStroke="darkgray",i.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=i.current,i.current},divClassName:"diagram-component",style:{height:"80vh"}}),(0,h.jsx)("div",{ref:o})]})]}),(0,h.jsx)("div",{className:"tr",children:(0,h.jsx)(k.ZP,{size:"large",onClick:f,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},ne=t(5112),te=t(97913),ie=ne.ZP.Group,oe={margin:"0 8px"},ae=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,h.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,h.jsx)("span",{style:oe,children:"单元格数:"}),(0,h.jsx)("span",{style:oe,children:"行数"}),(0,h.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,h.jsx)(te.Z,{})}),(0,h.jsx)("span",{style:oe,children:"列数"}),(0,h.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,h.jsx)(te.Z,{})})]}),(0,h.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,h.jsx)("span",{style:oe,children:"对齐方式:"}),(0,h.jsx)(b.Z.Item,{name:"align",children:(0,h.jsxs)(ie,{children:[(0,h.jsx)(ne.ZP,{value:"default",children:(0,h.jsx)("i",{className:"fa fa-align-justify"})}),(0,h.jsx)(ne.ZP,{value:"left",children:(0,h.jsx)("i",{className:"fa fa-align-left"})}),(0,h.jsx)(ne.ZP,{value:"center",children:(0,h.jsx)("i",{className:"fa fa-align-center"})}),(0,h.jsx)(ne.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)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},re=t(78673),se=t(66455),le=t.n(se),ce=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,o=e.height,a=e.callback,s=(e.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),d=(0,c.useState)(!1),u=r()(d,2),p=u[0],m=u[1],f=(0,c.useRef)({id:s,appName:"graphing",width:i||1e3,height:o||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(){l.current=new(le())(f.current,!0),window.onload=function(){l.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(){f.current.appName=p?"3D":"graphing",l.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){m(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:g}})),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:s}),(0,h.jsxs)(A.Z,{align:"middle",children:[(0,h.jsx)(K.Z,{flex:1,children:(0,h.jsx)(re.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return m(e)}})}),(0,h.jsx)(K.Z,{children:(0,h.jsx)(k.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),de=t(33773),ue=t(27065),pe="link",me="upload-image",he="add-flowchart",fe="draw-image",ge="code-block",ve="add-table",xe="------------",we={default:xe,left:":".concat(xe),center:":".concat(xe,":"),right:"".concat(xe,":")},ye=t(56266);var _e="@▁▁@",be=["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 je(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ke=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Se=l()(l()({},ke+"-B","bold"),ke+"-I","italic"),Ne=l()(l()(l()(l()(l()(l()(l()(l()({},pe,"添加链接"),ge,"添加代码块"),me,"添加图片"),fe,"添加画图"),he,"插入流程图"),ve,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Ce=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,a=e.width,s=void 0===a?"100%":a,d=e.height,g=void 0===d?400:d,v=e.miniToolbar,x=void 0!==v&&v,w=e.isFocus,b=void 0!==w&&w,j=e.watch,k=e.insertTemp,S=e.mode,T=void 0===S?"markdown":S,L=e.id,Z=void 0===L?"markdown-editor-id":L,B=e.showResizeBar,I=void 0!==B&&B,A=e.noStorage,G=void 0!==A&&A,O=e.showNullButton,R=void 0!==O&&O,z=e.showNullProgramButton,F=void 0!==z&&z,H=e.hidetoolBar,W=void 0!==H&&H,Y=e.fullScreen,V=void 0!==Y&&Y,U=e.onBlur,J=e.onCMBeforeChange,K=e.onFullScreen,Q=e.className,X=void 0===Q?"":Q,$=e.disablePaste,ne=void 0!==$&&$,te=e.disabled,ie=void 0!==te&&te,oe=e.disabledFill,re=void 0!==oe&&oe,se=e.placeholder,le=void 0===se?"":se,xe=e.values,ke=void 0===xe?"":xe,Ce=e.extraUse,Me=(0,c.useState)(null),Te=r()(Me,2),Le=Te[0],Ze=Te[1],Be=(0,c.useState)(t),Pe=r()(Be,2),Ie=Pe[0],Ee=Pe[1],Ae=(0,c.useState)(j),Ge=r()(Ae,2),De=Ge[0],Oe=Ge[1],Re=(0,c.useState)(V),ze=r()(Re,2),Fe=ze[0],He=ze[1],We=(0,c.useState)(""),Ye=r()(We,2),Ve=Ye[0],Ue=Ye[1],Je=(0,c.useState)(0),qe=r()(Je,2),Ke=qe[0],Qe=qe[1],Xe=(0,c.useState)(g),$e=r()(Xe,2),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),on=r()(tn,2),an=(on[0],on[1]),rn=(0,c.useState)(0),sn=r()(rn,2),ln=sn[0],cn=sn[1],dn=(0,c.useState)(0),un=r()(dn,2),pn=un[0],mn=un[1],hn=(0,c.useRef)(),fn=(0,c.useRef)(),gn=(0,c.useRef)(),vn=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Ee(ke),null==Le||Le.setValue(ke),window.scrollTo(0,e)}),[ke]),(0,c.useEffect)((function(){null==K||K(Fe)}),[Fe]),(0,c.useEffect)((function(){if(hn.current){var e=function(e,t){if(!ne){var i=t.clipboardData;if(i){var o=i.types.toString(),a=i.items;if("Files"===o||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==T)return;try{var r,s=a[1];"file"===(null===(r=a[0])||void 0===r?void 0:r.kind)&&(s=a[0]);var l=s.getAsFile(),c=l.name.split(".").pop();E(l,(function(e){var t,i,o;e.id?(null==l||null===(t=l.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==l||null===(o=l.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):be.includes(c)?n.replaceSelection('<a href="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):n.replaceSelection("[".concat(l.name,"](").concat(ue.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(t){M.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=u().fromTextArea(hn.current,{mode:T,lineNumbers:!x,lineWrapping:!0,value:t,autoCloseTags:!0,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",le):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),o=t.getLine(i.line),a=o.charAt(i.ch-1),r=o.lastIndexOf("@▁@",i.ch),s=o.lastIndexOf("@▁▁@",i.ch),l=r>s?r:s,c=r>s?3:4;if(-1===_e.indexOf(a))return null;if(console.log("change1:",n,e,o,i,l,r,s,a),l>=0&&i.ch-l<5){var d=l+c;return t.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:d}),{line:i.line,ch:d}}return null}(e);t&&n.preventDefault()}})),b&&n.focus(),n.on("paste",e),ie&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ze(n),function(){n.off("paste",e)}}}),[]);var xn=(0,c.useCallback)((function(){fn.current}),[en,fn,Fe]);(0,c.useEffect)((function(){if(Le){var e=function(){var e=new p.Z((function(e){var n,t=o()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(xn(),Le.setSize("100%","100%"),Le.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(hn.current.parentElement),e}();return function(){var n,t;null!==(n=hn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=hn.current)||void 0===t?void 0:t.parentElement)}}}),[Le,xn]),(0,c.useEffect)((function(){if(Le){for(var e=[],n=function(){var n=r()(i[t],2),o=n[0],a=n[1],s=l()({},o,(function(){wn(a)}));e.push(s),Le.addKeyMap(s)},t=0,i=Object.entries(Se);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Le.removeKeyMap(i)}}}}),[Le]),(0,c.useEffect)((function(){V!==Fe&&He(V)}),[V]),(0,ye.Z)((function(){if(!G&&Ke>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(Z);e>=Ke+1e4&&(!n||n!==Ie)&&(window.sessionStorage.setItem(Z,Ie),an(!0))}}),1e4),(0,c.useEffect)((function(){Oe(j)}),[Le,j]),(0,c.useEffect)((function(){Le&&b&&Le.focus()}),[Le,b]),(0,c.useEffect)((function(){if(De&&Le){var e=function(e){var n=e.target;if(vn.current){var t=n.scrollTop/n.scrollHeight;vn.current.scrollTop=vn.current.scrollHeight*t}},n=Le.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Le,De]),(0,c.useEffect)((function(){if(Le&&J){var e=function(e,n){J(e,n)};return Le.on("beforeChange",e),function(){Le.off("beforeChange",e)}}}),[Le,J]),(0,c.useEffect)((function(){if(Le&&U){var e=function(){U(Le.getValue())};return Le.on("blur",e),function(){Le.off("blur",e)}}}),[Le,U]),(0,c.useEffect)((function(){if(Le){var e=function(e,n){var t=e.getValue();Ee(t),Qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(F?i(t,kn(t)):i(t))};return Le.on("change",e),function(){Le.off("change",e)}}}),[Le,i]),(0,c.useEffect)((function(){if(Le)if(null==t)Le.setValue(""),Ee("");else{var e=window.scrollY||window.pageYOffset;t!==Le.getValue()&&(Le.setValue(t),Ee(t),Le.setCursor(ie?1:Le.lineCount(),0),window.scrollTo(0,e))}}),[Le,t]);var wn=(0,c.useCallback)((function(e){var n=Le.getCursor(),t=Le.getSelection(),i=t.split("\n");switch(e){case"bold":return Le.replaceSelection("**"+t+"**"),""===t&&Le.setCursor(n.line,n.ch+2),Le.focus();case"italic":return Le.replaceSelection("*"+t+"*"),""===t&&Le.setCursor(n.line,n.ch+1),Le.focus();case"code":return Le.replaceSelection("`"+t+"`"),""===t&&Le.setCursor(n.line,n.ch+1),Le.focus();case"inline-latex":return Ue("inline-latex"),Le.focus();case"latex":return Le.replaceSelection("```latex\n"+t+"\n```"),Le.setCursor(n.line+1,t.length+1),Le.focus();case"line-break":return Le.replaceSelection("<br/>\n"),Le.focus();case"list-ul":return""===t?Le.replaceSelection("- "+t):Le.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Le.focus();case"list-ol":return""===t?Le.replaceSelection("1. "+t):Le.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Le.focus();case"add-null-ch":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("▁"),Le.focus();case"add-signal":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("@▁@"),Le.focus();case"add-multiple":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection(_e),Le.focus();case"inster-template-1":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Le.focus();case"eraser":return Le.setValue(""),Le.focus();case"trigger-watch":return Oe(!De),Le.focus();case"trigger-full-screen":return He(!Fe),Le.focus();case pe:return void Ue(pe);case ge:return void Ue(ge);case me:return void Ue(me);case fe:return void Ue(fe);case"maths-latex":return void Ue("maths-latex");case he:return void Ue(he);case ve:return void Ue(ve);default:throw new Error}}),[Le,De,Fe]),yn=(0,c.useCallback)((function(e,n){var t,i,o,a,r;switch(Ue(""),Ve){case pe:var s=e.title,l=e.link;return Le.replaceSelection("[".concat(s,"](").concat(l,")")),Le.focus();case ge:var c=e.language,d=e.content;return Le.replaceSelection(["```"+c,d,"```"].join("\n")),Le.focus();case"maths-latex":for(var u=atob(e),p=new Uint8Array(u.length),m=0;m<u.length;m++)p[m]=u.charCodeAt(m);E(new Blob([p],{type:"image/png"}),(function(e){e.id?Le.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":Le.replaceSelection("`$$"+e+"$$`");break;case me:case fe:case"add-flowchart":var h=e.src,f=e.alt,g=n,v=null==g||null===(t=g.name)||void 0===t||null===(t=t.split("."))||void 0===t||null===(i=t.pop)||void 0===i?void 0:i.call(t);return(null==g||null===(o=g.type)||void 0===o?void 0:o.indexOf("image"))>-1||null==g||!g.type?f?Le.replaceSelection("![ ".concat(f," ]( ").concat(h,' "').concat(f,'" )')):Le.replaceSelection("![,](".concat(h,")")):(null==g||null===(a=g.type)||void 0===a?void 0:a.indexOf("video"))>-1?Le.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER).concat(h,'"></video>')):(null==g||null===(r=g.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?Le.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,"?type=").concat(g.type,'&disposition=inline" target="_blank">').concat(g.name,"</a>")):be.includes(v)?Le.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,'?type=office&disposition=inline" target="_blank">').concat(g.name,"</a>")):Le.replaceSelection("[".concat(g.name,"](").concat(ue.Z.API_SERVER).concat(h,")")),Le.focus();case ve:for(var x=e.row,w=e.col,y=e.align,_="\n",b=0;b<x;b++){for(var j=[],k=[],S=0;S<w;S++)1===b&&k.push(we[y]),j.push(" ");1===b&&(_+="| ".concat(k.join(" | ")," |\n")),_+="| ".concat(j.join(1===w?"":" | ")," |\n")}return Le.replaceSelection(_+"\n"),Le.focus();default:throw new Error}}),[Le,Ve]),_n=(0,c.useMemo)((function(){switch(Ve){case pe:return(0,h.jsx)(N,{callback:yn,onCancel:bn});case ge:return(0,h.jsx)(C.Z,{callback:yn,onCancel:bn});case me:return(0,h.jsx)(P,{callback:yn,onCancel:bn});case he:return(0,h.jsx)(ee,{callback:yn,onCancel:bn});case ve:return(0,h.jsx)(ae,{callback:yn,onCancel:bn});case"maths-latex":return(0,h.jsx)(ce,{showSaveButton:!0,callback:yn});case"inline-latex":return(0,h.jsx)(de.Z,{showSaveButton:!0,callback:yn});default:return null}}),[Ve]);function bn(){Ue("")}(0,c.useEffect)((function(){if(gn.current){var e=function(e){o=!0,a=e.pageY},n=function(){o=!1},t=function(e){if(o){var n=e.pageY-a;n<0&&(n=0),n>300&&(n=300),nn(g+n+"px")}},i=gn.current,o=!1,a=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Le,gn]),(0,c.useEffect)((function(){nn(g)}),[g]);var jn={width:je(s),height:je(en)},kn=((0,c.useMemo)((function(){if(Ke){var e=new Date(Ke),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Ke]),function(e){var n=[];if(F){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){if(Ne[Ve]&&Ve!==fe&&Ve!==he){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;cn(n),mn(t)}}),[Ve]);var Sn=function(e,n,t,i){var o=document.body.clientHeight,a=document.body.clientWidth;return!(e<20&&t>e||e>a-20&&t<e||n<20&&i>n||n>o-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,h.jsxs)(c.Fragment,{children:[(0,h.jsx)("div",{className:"markdown-editor-wrapper",ref:fn,children:(0,h.jsxs)("div",{className:"markdown-editor-container ".concat(X," ").concat(De?"on-preview":""," ").concat(x?"mini":""," ").concat(Fe?"full-screen":""),style:jn,children:[(0,h.jsx)(y,{insertTemp:k,watch:De,fullScreen:Fe,showNullButton:R,showNullProgramButton:F,onActionCallback:wn,hidetoolBar:W,extraUse:Ce}),(0,h.jsxs)("div",{className:"markdown-editor-body",children:[(0,h.jsx)("div",{className:"codemirror-container",children:(0,h.jsx)("textarea",{ref:hn,placeholder:le})}),De?(0,h.jsxs)("div",{ref:vn,className:"preview-container",children:["stex"===T&&(0,h.jsx)(f,{value:Ie}),"stex"!==T&&(0,h.jsx)(m.Z,{disabledFill:re,showProgramFill:F,value:Ie})]}):null]})]})}),I?(0,h.jsx)("a",{ref:gn,className:"editor-resize"}):null,Ve===fe&&(0,h.jsx)(D,{callback:yn,onCancel:bn}),Ve===he&&(0,h.jsx)(ee,{callback:yn,onCancel:bn}),(0,h.jsx)(_.Z,{children:Ne[Ve]&&Ve!==fe&&Ve!==he?(0,h.jsx)(q.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ln,top:pn},title:(0,h.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-ln,t=e.clientY-pn;document.body.onmousemove=function(e){var i=e.clientX-n,o=e.clientY-t,a=document.getElementsByClassName("ant-modal")[0],r=window.innerWidth-a.offsetWidth,s=window.innerHeight-a.offsetHeight;i=Math.max(0,Math.min(i,r)),o=Math.max(0,Math.min(o,s)),Sn(e.clientX,e.clientY,n,t)&&(cn(i),mn(o))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:Ne[Ve]}),open:!0,onCancel:bn,footer:null,destroyOnClose:!0,width:Ve===he?"1200px":null,height:Ve===he?"80vh":null,className:"markdown-popup-form",children:_n}):null})]})}},27308:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i=t(82100),o=t.n(i),a=t(29186),r=t.n(a),s=t(80619),l=t.n(s),c=t(47074),d=t.n(c),u=t(59301),p=t(4676),m=function(e){l()(t,e);var n=d()(t);function t(e){var i;o()(this,t),i=n.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return r()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(u.Component)},56266:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i=t(59301);function o(e,n){var t=(0,i.useRef)();(0,i.useEffect)((function(){t.current=e})),(0,i.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},44594:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return X}});var i=t(7557),o=t.n(i),a=t(41498),r=t.n(a),s=t(37205),l=t.n(s),c=t(82242),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(7880),f=t(43418),g=t(78241),v=t(8591),x=t(66104),w=t(95237),y=t(43604),_=t(3113),b=t(71418),j=t(28103),k=t(97913),S=t(6848),N=t(5105),C=t(93690),M=t(7892),T=t(45286),L=t(51136),Z=t(11094),B=t(30929),P=t(84143),I=t(99232),E=t.n(I),A=t(27065),G=t(37363),D=t(3479),O=t(8772),R=t(37712),z=(0,h.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,i=(0,h.useParams)(),a=(0,m.useState)(!0),s=p()(a,2),l=(s[0],s[1],g.Z.useForm()),c=p()(l,1)[0];return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(f.Z,{centered:!0,title:"调分",open:"调分"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:r()(o()().mark((function e(){var a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.validateFields();case 2:return a=c.getFieldsValue(),e.next=5,(0,L.ZP)("/api/student_works/".concat(n.actionTabs.id,"/adjust_score.json"),{method:"post",body:d()({},a)});case 5:0===e.sent.status&&(v.ZP.success("评阅成功"),c.resetFields(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getStudentWorkCommon",payload:d()({},i)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,R.jsx)("p",{className:"tc",children:"该学生的最终成绩将不会按照评分规则进行计算"}),(0,R.jsxs)(g.Z,{form:c,layout:"horizontal",children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"baseline"},children:[(0,R.jsx)(g.Z.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}],children:(0,R.jsx)(k.Z,{min:0,placeholder:"请填写分数"})}),(0,R.jsx)("span",{className:"ml10",children:"分"})]}),(0,R.jsx)("div",{children:(0,R.jsx)(g.Z.Item,{name:"comment",children:(0,R.jsx)(O.Z.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8})})})]})]})})})),F={flex_box_center:"flex_box_center___tMwax",flex_space_between:"flex_space_between___8GJsg",flex_box_vertical_center:"flex_box_vertical_center___IFELt",flex_box_center_end:"flex_box_center_end___IrFRG",flex_box_column:"flex_box_column___s0LgG",bg:"bg___sFhaA",title:"title___bk4oD",replyList:"replyList___bjk6g",name:"name___pRNS3","nav-tab":"nav-tab___uLRSr",buttonFixed:"buttonFixed___twN45",exitComment:"exitComment___rlGpw",nextComment:"nextComment___NmNBo",modal:"modal___tWPO8",MdEditor:"MdEditor___AAxeb",ratewarp:"ratewarp___NGrsd",item:"item___Le8W0",total:"total___MNh4V",a1:"a1___g1iJT",a2:"a2___h8k2X",a3:"a3___yk1km",pinfen:"pinfen___sYyQv",left:"left___g2MO6",right:"right___TLkV4",export_type_modal_title:"export_type_modal_title___nMqX0",export_type_modal:"export_type_modal___dbFVU",export_type_modal_con:"export_type_modal_con___ujWeL",type_item:"type_item___oF9R5",type_item_active:"type_item_active___dfBaM",export_type_modal_waring:"export_type_modal_waring___k8RaP"},H=t(42783),W=t(89392),Y=t(42658),V=(0,h.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n=e.classroomList,t=(e.loading,e.dispatch),i=((0,h.useParams)(),g.Z.useForm()),a=p()(i,1)[0];return(0,R.jsx)(f.Z,{centered:!0,title:"补交附件",open:"补交附件"===n.actionTabs.key,bodyStyle:{minHeight:200},onOk:r()(o()().mark((function e(){var i,r,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.validateFields();case 2:return r=d()({},a.getFieldValue()),s=n.actionTabs.selectArrs,r.attachment_ids=null===(i=r.attachment_ids)||void 0===i?void 0:i.map((function(e){return e.response.id})),e.next=7,(0,D.mz)(d()(d()({},r),{},{homeworkId:s.work_id}));case 7:0===e.sent.status&&(a.resetFields(),t({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:d()({},n.actionTabs.params)}),t({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){a.resetFields(),t({type:"classroomList/setActionTabs",payload:{}})},children:(0,R.jsxs)(g.Z,{form:a,initialValues:{},children:[(0,R.jsx)(g.Z.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}],children:(0,R.jsx)(Y.Z,{})}),(0,R.jsx)(g.Z.Item,{name:"description",children:(0,R.jsx)(O.Z.TextArea,{placeholder:"请在此输入补交附件的原因最大限制100个字符",rows:7})})]})})})),U=t(6457),J=t(89918),q=t(14386),K=t(32833),Q=t(83615),X=(0,h.connect)((function(e){var n=e.shixunHomeworks,t=e.loading,i=e.user;return{shixunHomeworks:n,globalSetting:e.globalSetting,user:i,loading:t.effects}}))((function(e){var n,t,i,a,s,c,u,I,O,X,$,ee,ne,te,ie,oe,ae,re,se,le,ce,de,ue,pe=e.shixunHomeworks,me=(e.globalSetting,e.loading),he=e.user,fe=e.dispatch,ge=(0,h.useSearchParams)(),ve=p()(ge,1)[0],xe=(0,h.useParams)(),we=(0,m.useRef)(),ye=he.userInfo,_e=pe.studentWorkDetail,be=pe.studentWorkCommon,je=pe.studentWorkSupplyDetail,ke=(pe.workList,pe.workDetail),Se=(0,m.useState)(""),Ne=p()(Se,2),Ce=Ne[0],Me=Ne[1],Te=(0,m.useState)({show:!1,type:0,active:null}),Le=p()(Te,2),Ze=Le[0],Be=Le[1],Pe=(0,m.useState)({show:!1,type:0,active:null}),Ie=p()(Pe,2),Ee=Ie[0],Ae=Ie[1],Ge=f.Z.useModal(),De=p()(Ge,2),Oe=De[0],Re=De[1],ze=(0,m.useState)({last:!1}),Fe=p()(ze,2),He=Fe[0],We=Fe[1],Ye=(0,m.useState)({last:!1}),Ve=p()(Ye,2),Ue=Ve[0],Je=Ve[1],qe=g.Z.useForm(),Ke=p()(qe,1)[0],Qe=(0,m.useState)(!1),Xe=p()(Qe,2),$e=Xe[0],en=Xe[1],nn=(0,m.useState)(!1),tn=p()(nn,2),on=tn[0],an=tn[1],rn=(0,m.useState)(""),sn=p()(rn,2),ln=sn[0],cn=sn[1],dn=(0,m.useState)({content:"",type:""}),un=p()(dn,2),pn=un[0],mn=un[1],hn=(0,m.useState)([]),fn=p()(hn,2),gn=fn[0],vn=fn[1],xn=(0,m.useState)([]),wn=p()(xn,2),yn=wn[0],_n=wn[1],bn=(0,m.useState)(!1),jn=p()(bn,2),kn=jn[0],Sn=jn[1],Nn=(0,m.useRef)(),Cn=((0,h.useLocation)(),(0,m.useState)(!1)),Mn=p()(Cn,2),Tn=Mn[0],Ln=Mn[1],Zn=(0,m.useState)(""),Bn=p()(Zn,2),Pn=Bn[0],In=Bn[1],En=(0,m.useState)(!1),An=p()(En,2),Gn=An[0],Dn=An[1],On=(0,m.useState)(!1),Rn=p()(On,2),zn=Rn[0],Fn=Rn[1],Hn=function(){fe({type:"shixunHomeworks/getStudentWorkCommon",payload:d()({},xe)})};function Wn(){return Wn=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:JSON.parse(sessionStorage.all_student_works_params||"{}"),n={},ve.get("ids")&&(n.course_group=ve.get("ids").split(","));case 3:case"end":return e.stop()}}),e)}))),Wn.apply(this,arguments)}function Yn(e){for(var n="",t=0;t<e.length;t++){var i=e[t];n+="<span>".concat(i.name,'<span style="color:#FA6400;"}}>').concat(i.score,"分</span></span>"),t<e.length-1&&(n+=" + ")}return(0,R.jsx)("span",{dangerouslySetInnerHTML:{__html:n}})}function Vn(e){for(var n=0,t=0;t<e.length;t++)""!=e[t].score&&(n+=e[t].score);return n.toFixed(2)}(0,m.useEffect)((function(){var e=JSON.parse(localStorage.getItem("all_student_works_param")||"{}");fe({type:"shixunHomeworks/getStudentWorkDetail",payload:d()(d()({},xe),e)}),fe({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:d()({},xe)}),Hn(),function(){Wn.apply(this,arguments)}(),we.current.onclick=function(e){"IMG"===e.target.nodeName&&""!==e.target.alt&&B.Z.publish("preview-image",e.target.src)}}),[xe.categoryId,xe.userId]),(0,m.useEffect)((function(){null!=_e&&_e.score_details&&(gn=JSON.parse(JSON.stringify(null==_e?void 0:_e.score_details.map((function(e){return d()(d()({},e),{},{score:""})})))),vn(l()(gn)))}),[_e]),(0,m.useEffect)((function(){gn.every((function(e){return""===e.score}))?an(!0):an(!1)}),[gn]),(0,m.useEffect)((function(){var e,n;(console.log(be),null!=be&&null!==(e=be.comment_scores)&&void 0!==e&&e.score_details)&&(console.log(1111),yn=JSON.parse(JSON.stringify(null==be||null===(n=be.comment_scores)||void 0===n||null===(n=n.score_details)||void 0===n?void 0:n.map((function(e){return d()({},e)})))),_n(l()(yn)))}),[be]),(0,m.useEffect)((function(){null!=_e&&_e.homework_id&&(null!=_e&&_e.prev_work_id?Je({student_work_id:null==_e?void 0:_e.prev_work_id}):Je({last:!0}),null!=_e&&_e.next_work_id?We({student_work_id:null==_e?void 0:_e.next_work_id}):We({last:!0}))}),[_e]),(0,m.useEffect)((function(){return fe({type:"shixunHomeworks/getWorkDetail",payload:{categoryId:xe.categoryId}}),fe({type:"globalSetting/footerToggle",payload:!1}),function(){fe({type:"globalSetting/footerToggle",payload:!0})}}),[]);var Un=function(e){var n;Oe.confirm({title:"是否确认删除?",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fe({type:"shixunHomeworks/deleteReply",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:0===n.sent.status&&(v.ZP.success("删除成功"),Hn());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},Jn=function(e){var n;Oe.confirm({title:"是否确认删除?",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,D.QC)({score_id:e.comment_id,userId:xe.userId});case 2:0===n.sent.status&&(v.ZP.success("删除成功"),Hn());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},qn=function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=_e&&_e.single_score){e.next=8;break}if(console.log(gn),!gn.find((function(e){return""===e.score}))||gn.every((function(e){return""===e.score}))){e.next=5;break}return v.ZP.warning("请把分数填写完整"),e.abrupt("return");case 5:n.score_details=l()(gn),n.score=Vn(gn),gn.every((function(e){return""===e.score}))&&(n.score=null,n.score_details=[]);case 8:return n.attachment_ids=null===(t=n.attachment_ids)||void 0===t?void 0:t.map((function(e){var n;return null==e||null===(n=e.response)||void 0===n?void 0:n.id})),console.log(n),Sn(!0),e.next=13,(0,D.yy)(d()(d()({},n),{},{userId:xe.userId}));case 13:0===e.sent.status&&(Ke.resetFields(),null!=_e&&_e.next_work_id?(v.ZP.success("评阅成功!已为您自动切换至下一个待评阅的学生",2),Kn("read")):(v.ZP.success("评阅成功!",2),Hn())),an(!0),Sn(!1);case 17:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Kn=function(){var e=r()(o()().mark((function e(n){var t,i,a,r,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ke.getFieldsValue(),i=t.comment,a=t.score,r=t.attachment_ids,s=!(0,W.isNil)(a),!(i||s||r)){e.next=5;break}return f.Z.confirm({centered:!0,okText:"离开",cancelText:"取消",title:"离开此页提示",content:(0,R.jsx)("div",{className:"tc",children:"系统可能不会保存您所做的更改"}),onOk:function(){Ke.resetFields(),"last"===n?h.history.push(ve.get("ids")?"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==Ue?void 0:Ue.student_work_id,"?ids=").concat(ve.get("ids")):"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==Ue?void 0:Ue.student_work_id)):"read"===n?h.history.push(ve.get("ids")?"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==He?void 0:He.student_work_id,"?ids=").concat(ve.get("ids")):"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==He?void 0:He.student_work_id)):h.history.push("/classrooms/".concat(xe.coursesId,"/common_homework/").concat(xe.categoryId,"/detail"))}}),e.abrupt("return");case 5:"last"===n?h.history.push(ve.get("ids")?"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==Ue?void 0:Ue.student_work_id,"?ids=").concat(ve.get("ids")):"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==Ue?void 0:Ue.student_work_id)):"read"===n?h.history.push(ve.get("ids")?"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==He?void 0:He.student_work_id,"?ids=").concat(ve.get("ids")):"/classrooms/".concat(null==xe?void 0:xe.coursesId,"/common_homework/").concat(null==xe?void 0:xe.categoryId,"/review/").concat(null==He?void 0:He.student_work_id)):h.history.push("/classrooms/".concat(xe.coursesId,"/common_homework/").concat(xe.categoryId,"/detail"));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Qn=function(){var e=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Dn(!0),e.next=3,(0,L.ZP)("/api/homework_commons/".concat(xe.categoryId,"/student_works/export_normal_word_all.json"),{method:"post",body:{with_edit:n}});case 3:0===e.sent.status&&(Ln(!1),h.history.push("/classrooms/".concat(null==xe?void 0:xe.coursesId,"/exportlist/normal_work_list"))),Dn(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Xn=function(e){Dn(!0),(0,U.Nd)("","".concat(A.Z.API_SERVER,"/api/student_works/").concat(xe.userId,"/export_normal_word_single.json?with_edit=").concat(e)),Dn(!1),Ln(!1)},$n=function(e){Fn(e),In("附件"),Ln(!0)};return(0,R.jsxs)("section",{className:"edu-container",ref:we,children:[(0,R.jsxs)("section",{className:"animated fadeIn",children:[(0,R.jsx)("aside",{className:"mt10",children:ye&&(0,R.jsxs)(x.Z,{separator:">",children:[(0,R.jsx)(x.Z.Item,{children:(0,R.jsx)(h.Link,{to:"/classrooms/".concat(xe.coursesId,"/common_homework/").concat(null!=_e&&null!==(n=_e.category)&&void 0!==n&&n.main?"":null==_e||null===(t=_e.category)||void 0===t?void 0:t.category_id),children:null==ye||null===(i=ye.course)||void 0===i?void 0:i.course_name})}),(0,R.jsx)(x.Z.Item,{children:(0,R.jsx)(h.Link,{to:"/classrooms/".concat(xe.coursesId,"/common_homework/").concat(null!=_e&&null!==(a=_e.category)&&void 0!==a&&a.main?"":null==_e||null===(s=_e.category)||void 0===s?void 0:s.category_id),children:null==_e||null===(c=_e.category)||void 0===c?void 0:c.category_name})}),(0,R.jsx)(x.Z.Item,{children:(0,R.jsx)(h.Link,{to:"/classrooms/".concat(xe.coursesId,"/common_homework/").concat(xe.categoryId,"/detail"),children:"作业详情"})}),(0,R.jsx)(x.Z.Item,{children:null==_e?void 0:_e.author_name})]})}),(0,R.jsxs)("aside",{className:[F.title,"mt20"].join(" "),children:[(0,R.jsxs)(w.Z,{style:{width:"100%"},children:[(0,R.jsxs)(y.Z,{flex:"1",children:[(0,R.jsx)(h.Link,{to:"/classrooms/".concat(xe.coursesId,"/common_homework"),children:(0,R.jsx)(N.Z,{className:"font16 c-black"})}),(0,R.jsx)("strong",{className:"font20 ml5",children:null==_e?void 0:_e.homework_name}),(0,R.jsx)(U.VV,{status:null==_e?void 0:_e.homework_status})]}),(0,R.jsx)(y.Z,{children:(0,J.dE)()&&(null==_e||null===(u=_e.homework_status)||void 0===u?void 0:u.includes("补交中"))&&(0,R.jsx)("span",{onClick:function(){fe({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:xe,selectArrs:{homework_id:xe.commonHomeworkId,work_id:xe.userId}}})},className:"c-blue current font14",children:"补交附件"})})]}),(0,J.G5)()&&(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)(_.ZP,{className:"mr10",icon:(0,R.jsx)(C.Z,{}),onClick:function(){return $n(!1)},children:"导出答题记录与附件"}),(0,R.jsx)(_.ZP,{icon:(0,R.jsx)(C.Z,{}),onClick:function(){return $n(!0)},children:"导出全部学生答题记录与附件"})]})]})]}),(0,R.jsxs)("ul",{className:F["nav-tab"],children:[(0,R.jsx)("li",{className:"active",children:"作业详情"}),(0,J.j5)()&&(0,R.jsx)("li",{children:(0,R.jsxs)(h.Link,{to:"/classrooms/".concat(xe.coursesId,"/common_homework/").concat(xe.categoryId,"/lab-report-view/").concat(xe.userId),children:[" ","实验报告"," "]})})]}),(0,R.jsxs)("div",{style:{background:"#fff",padding:"20px 30px"},children:[(0,R.jsx)("div",{style:{fontSize:"18px",marginBottom:"10px",fontWeight:600},children:"作业描述"}),(0,R.jsx)(H.Z,{value:(null==ke?void 0:ke.description)||"暂无~"}),(0,R.jsx)(G.Z,{authority:(0,J.GJ)(),showDimensions:!1,dataSource:null==ke?void 0:ke.attachments,callback:function(){fe({type:"shixunHomeworks/getWorkDetail",payload:{categoryId:xe.categoryId}})}})]}),(0,R.jsx)("section",{className:[F.bg,"pt30","pl30","pr30","pb30"].join(" "),children:(0,R.jsxs)(b.Z,{spinning:me["shixunHomeworks/getStudentWorkDetail"]||me["shixunHomeworks/getStudentWorkSupplyDetail"],children:[(null==_e?void 0:_e.description)&&(0,R.jsxs)("aside",{children:[(0,R.jsxs)("div",{className:"font16",children:["内容",(0,R.jsx)("span",{style:{color:"#FA6400",fontSize:14},children:"(当前支持批注的文档类型:.docx、.xlsx、.pptx"})]}),(0,R.jsx)("div",{className:"mt20",children:(0,R.jsx)(H.Z,{value:(null==_e?void 0:_e.description)||"暂无~"})}),(0,R.jsx)(G.Z,{authority:(0,J.GJ)(),callback:function(){fe({type:"shixunHomeworks/getStudentWorkDetail",payload:d()({},xe)})},dataSource:null==_e?void 0:_e.attachments}),(0,R.jsxs)("aside",{className:"tr",children:[(0,R.jsx)("span",{className:" c-light-black",children:E()(_e.commit_time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)("span",{className:"ml10",children:_e.commit_user_name}),(0,R.jsx)("span",{className:"ml10 c-light-black",children:"提交"}),(0,R.jsx)("span",{className:"ml30 c-light-black",children:E()(_e.update_time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)("span",{className:"ml10",children:_e.update_user_name}),(0,R.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]}),(null==_e?void 0:_e.redo_description)&&(0,R.jsxs)("aside",{children:[(0,R.jsx)(j.Z,{}),(0,R.jsx)("div",{className:"font16",children:"重做记录"}),(0,R.jsx)("div",{className:"pl30 mt20",children:(0,R.jsx)(H.Z,{value:(null==_e?void 0:_e.redo_description)||"暂无~"})}),(0,R.jsx)(G.Z,{authority:(0,J.GJ)(),callback:function(){fe({type:"shixunHomeworks/getStudentWorkDetail",payload:d()({},xe)})},dataSource:null==_e?void 0:_e.redo_attachments}),(0,R.jsxs)("aside",{className:"tr",children:[(0,R.jsx)("span",{className:" c-light-black",children:E()(_e.redo_commit_time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)("span",{className:"ml10",children:_e.commit_user_name}),(0,R.jsx)("span",{className:"ml10 c-light-black",children:"提交"}),(0,R.jsx)("span",{className:"ml30 c-light-black",children:E()(_e.redo_update_time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)("span",{className:"ml10",children:_e.update_user_name}),(0,R.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]}),(null==je?void 0:je.revise_reason)&&(0,R.jsxs)("aside",{children:[(0,R.jsx)(j.Z,{}),(0,R.jsx)("div",{className:"font16",children:"补交内容"}),(0,R.jsx)("div",{className:"pl30 mt20",children:(0,R.jsx)(H.Z,{value:(null==je?void 0:je.revise_reason)||"暂无~"})}),(0,R.jsx)(G.Z,{authority:(0,J.GJ)(),callback:function(){fe({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:d()({},xe)})},dataSource:null==je?void 0:je.revise_attachments}),(0,R.jsxs)("aside",{className:"tr",children:[(0,R.jsx)("span",{className:"ml30 c-light-black",children:E()(je.atta_update_time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)("span",{className:"ml10",children:je.atta_update_user}),(0,R.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]})]})}),(null==_e?void 0:_e.anonymous_comment)&&(0,J.G5)()&&(0,R.jsxs)("section",{className:[F.bg,"mt30","pt30","pl30","pr30","pb30"].join(" "),children:[(0,R.jsx)("p",{children:"匿评学生"}),!(null==_e||null===(I=_e.no_commented_user_names)||void 0===I||!I.length)&&(0,R.jsxs)("p",{children:["未完成匿评:",_e.no_commented_user_names.join("、")]}),(0,R.jsxs)("div",{children:["已完成匿评:",null===(O=_e.commented_user_names)||void 0===O?void 0:O.join("、")]})]}),((0,J.RV)()||(null==_e||null===(X=_e.homework_status)||void 0===X?void 0:X.includes("匿评中")))&&(0,R.jsxs)("section",{children:[(0,R.jsxs)("aside",{className:[F.replyList,"bg-white"].join(" "),children:[(0,R.jsxs)(w.Z,{gutter:[10,20],children:[(0,R.jsx)(y.Z,{flex:1}),(0,R.jsx)(y.Z,{style:{lineHeight:"40px"},children:(0,J.GJ)()&&(null==be?void 0:be.ultimate)&&(0,R.jsx)("span",{className:"font-16 c-blue current",onClick:function(){fe({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:_e,id:xe.userId,params:xe}})},children:"调分"})}),(0,R.jsx)(y.Z,{children:(0,J.G5)()&&((null==_e||null===($=_e.homework_status)||void 0===$?void 0:$.includes("提交中"))||(null==_e||null===(ee=_e.homework_status)||void 0===ee?void 0:ee.includes("补交中"))||(null==_e||null===(ne=_e.homework_status)||void 0===ne?void 0:ne.includes("进行中")))&&(0,R.jsx)(_.ZP,{style:{width:"124px",height:"40px"},type:"primary",onClick:function(){return en(!0)},children:"打回重做"})})]}),!be.is_author&&!(null!=be&&be.ultimate)&&((0,J.GJ)()||(null==_e||null===(te=_e.homework_status)||void 0===te?void 0:te.includes("匿评中")))&&(0,R.jsx)("aside",{children:(0,R.jsxs)(g.Z,{layout:"vertical",form:Ke,onFinish:function(e){return qn(e)},onKeyPress:function(e){"Enter"===e.key&&e.preventDefault()},children:[(0,R.jsx)("div",{children:(0,R.jsxs)(w.Z,{children:[(0,R.jsx)(y.Z,{flex:"1",children:(0,R.jsx)(w.Z,{align:"middle",justify:"start",children:null!=_e&&_e.single_score?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(y.Z,{children:(0,R.jsx)(g.Z.Item,{name:"score",label:"评分",rules:[{required:!(0,J.GJ)(),message:"请填写分数"}],children:(0,R.jsx)(k.Z,{step:.1,min:0,style:{width:100},size:"middle",placeholder:"请填写分数"})})}),(0,R.jsx)(y.Z,{children:(0,R.jsx)("span",{className:"ml5 mr20",children:"分"})})]}):(0,R.jsx)(g.Z.Item,{name:"score",label:"评分",rules:[{required:!(0,J.GJ)(),message:"请填写分数"}],children:(0,R.jsxs)(y.Z,{span:24,children:[(0,R.jsxs)("div",{className:F.ratewarp,children:[null==_e||null===(ie=_e.score_details)||void 0===ie?void 0:ie.map((function(e,n){return(0,R.jsxs)("div",{className:F.item,children:[(0,R.jsx)("span",{children:e.name}),(0,R.jsxs)("span",{children:["(满分",e.score,"分)"]}),(0,R.jsx)(k.Z,{min:0,max:e.score,controls:!1,style:{width:135},size:"large",addonAfter:"分",onChange:function(e){console.log(e),e||0==e?(gn[n].score=Number(e.toFixed(2)),vn(l()(gn))):(gn[n].score="",vn(l()(gn)))}})]})})),[],(null==_e||null===(oe=_e.score_details)||void 0===oe?void 0:oe.length)>3&&(null==_e||null===(ae=_e.score_details)||void 0===ae?void 0:ae.length)<5]}),(0,R.jsxs)("div",{className:F.total,children:[(0,R.jsx)("span",{className:F.a1,children:"综合得分"}),(0,R.jsxs)("span",{className:F.a2,children:[on?"--":Vn(gn),"分"]}),(0,R.jsx)("span",{className:F.a3,children:"满分100分"})]})]})})})}),(0,R.jsx)(y.Z,{})]})}),(0,R.jsx)(g.Z.Item,{label:"评语",name:"comment",children:(0,R.jsx)(Z.Z,{placeholder:"请输入评语",defaultValue:"",height:250})}),(0,R.jsx)("div",{children:(0,R.jsx)(g.Z.Item,{name:"attachment_ids",children:(0,R.jsx)(Y.Z,{})})}),(0,J.GJ)()&&(0,R.jsx)(g.Z.Item,{label:"仅课堂老师可见",name:"hidden_comment",style:{marginTop:10},children:(0,R.jsx)(Z.Z,{placeholder:"请输入评语",defaultValue:"",height:250})}),(0,R.jsx)("aside",{className:"".concat(F.buttonFixed),children:(0,R.jsx)("aside",{className:"edu-container",children:(0,R.jsxs)(w.Z,{align:"middle",children:[(0,R.jsx)(y.Z,{flex:"1",children:(0,R.jsx)(_.ZP,{type:"default",onClick:function(){return Kn("list")},children:"返回列表"})}),(0,R.jsxs)(y.Z,{flex:"1",className:"tr",children:[(0,R.jsx)(_.ZP,{type:"default",onClick:function(){return Kn("last")},disabled:null==Ue?void 0:Ue.last,children:"上一个"}),(0,R.jsx)(_.ZP,{type:"default",disabled:null==He?void 0:He.last,style:{marginLeft:"20px",marginRight:"20px"},onClick:function(){return Kn("read")},children:"下一个"}),(0,R.jsx)(_.ZP,{loading:kn,htmlType:"submit",type:"primary",children:"提交评阅"})]})]})})})]})})]}),((0,J.RV)()||(null==_e||null===(re=_e.homework_status)||void 0===re?void 0:re.includes("匿评中"))||(null==_e||null===(se=_e.homework_status)||void 0===se?void 0:se.includes("申诉中")))&&(0,R.jsxs)("aside",{className:[F.replyList,"bg-white"].join(" "),children:[(0,R.jsxs)("p",{style:{color:"#000000",fontWeight:500},children:["点评内容(",null==be||null===(le=be.comment_scores)||void 0===le?void 0:le.length,""]}),(0,R.jsx)(j.Z,{}),null==be||null===(ce=be.comment_scores)||void 0===ce?void 0:ce.map((function(e,n){var t,i,a,s,l,c;return(0,R.jsxs)("aside",{children:[(0,R.jsxs)(w.Z,{gutter:[12,12],children:[(0,R.jsxs)(y.Z,{flex:"40px",children:["--"===(null==e?void 0:e.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==e?void 0:e.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[(0,R.jsxs)(w.Z,{align:"middle",children:[(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:1,style:{display:"flex"},children:[(0,R.jsx)("span",{className:"c-light-black ".concat(F.name),title:null==e?void 0:e.user_name,children:null==e?void 0:e.user_name}),(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==e?void 0:e.comment_time).format("YYYY-MM-DD HH:mm")}),null!==e.score&&(null==_e?void 0:_e.single_score)&&(0,R.jsxs)("span",{className:"ml30 c-orange",children:[e.score,"分"]}),!(null!=_e&&_e.single_score)&&null!==e.score&&(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)("div",{className:F.pinfen,children:[(0,R.jsx)(S.Z,{title:Yn(null==e?void 0:e.score_details),overlayInnerStyle:{width:"min-content",whiteSpace:"nowrap",overflow:"visible"},placement:"topLeft",children:(0,R.jsx)("div",{className:F.left,children:Yn(null==e?void 0:e.score_details)})}),(0,R.jsxs)("span",{className:F.right,children:[" = 综合得分",(0,R.jsxs)("span",{style:{color:"#FA6400"},children:[e.score,"分"]})]})]})})]}),(0,R.jsx)(y.Z,{children:(0,R.jsxs)("aside",{children:[e.delete&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Jn(e)},children:"删除"}),e.can_appeal&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Be({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,R.jsx)("span",{className:"c-blue current ml10",onClick:function(){return Be({show:!0,type:0,active:n})},children:"回复"}),!e.can_reply&&(0,R.jsx)("span",{className:"c-light-black ml10",children:"失效"})]})})]})}),(0,R.jsxs)(y.Z,{span:24,children:[e.content&&(0,R.jsx)(H.Z,{value:e.content}),!e.content&&(0,R.jsx)("span",{className:"c-light-black",children:"暂未写评语"}),null==e||null===(t=e.attachments)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsx)("div",{children:(0,R.jsxs)("a",{href:"".concat(A.Z.API_SERVER).concat(e.url),children:[(0,R.jsx)("span",{className:"iconfont icon-fujian c-green font14"}),(0,R.jsx)("span",{className:"ml10 c-black",children:e.title}),(0,R.jsx)("span",{className:"c-light-black ml20 font12",children:e.filesize})]})},n)}))]}),(0,R.jsxs)("div",{className:"w100",children:[(0,R.jsx)(j.Z,{}),(0,R.jsxs)("aside",{className:[F.comment,"w100"].join(" "),children:[e.appeal_info&&""!=e.appeal_info&&(0,R.jsx)("aside",{children:(0,R.jsx)(w.Z,{children:(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"50px",children:["--"===(null==e||null===(i=e.appeal_info)||void 0===i?void 0:i.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==e||null===(a=e.appeal_info)||void 0===a?void 0:a.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==e||null===(s=e.appeal_info)||void 0===s?void 0:s.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"1",children:[null==e||null===(l=e.appeal_info)||void 0===l?void 0:l.user_name,(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==e||null===(c=e.appeal_info)||void 0===c?void 0:c.time).format("YYYY-MM-DD HH:mm")}),1===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉中"}),2===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉已撤销"}),3===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉成功"}),4===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉被拒绝"}),5===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉失败"})]}),(0,R.jsxs)(y.Z,{children:[1===(null==e?void 0:e.appeal_status)&&e.can_appeal&&(0,R.jsx)("span",{onClick:function(){var e;f.Z.confirm({title:(0,R.jsxs)("div",{children:["撤销申诉后,无法再对本评阅记录进行申诉",(0,R.jsx)("br",{}),"是否确认撤销申诉"]}),onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Hn();case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-blue current",children:"撤销申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,J.GJ)()&&(0,R.jsx)("span",{onClick:function(){var n;f.Z.confirm({title:(0,R.jsxs)("div",{children:["此匿评成绩将被废弃,评阅人的作品将被违规扣分",(0,R.jsx)("br",{}),"是否确认接受申诉"]}),onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,L.ZP)("/api/student_works/".concat(xe.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:3}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&Hn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-red current",children:"接受申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,J.GJ)()&&(0,R.jsx)("span",{onClick:function(){var n;f.Z.confirm({title:(0,R.jsxs)("div",{children:["此匿评成绩将被认为合理",(0,R.jsx)("br",{}),"是否确认拒绝申诉"]}),onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,L.ZP)("/api/student_works/".concat(xe.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:4}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&Hn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-light-black current ml10",children:"拒绝申诉"})]})]}),(0,R.jsx)(H.Z,{value:null==e?void 0:e.appeal_info.content})]}),(0,R.jsx)(y.Z,{})]})})})}),e.journals.map((function(n,t){var i,o,a,r;return(0,R.jsxs)("aside",{children:[(0,R.jsx)(w.Z,{children:(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"50px",children:["--"===(null==n||null===(i=n.user_info)||void 0===i?void 0:i.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==n||null===(o=n.user_info)||void 0===o?void 0:o.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==n||null===(a=n.user_info)||void 0===a?void 0:a.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[null==n||null===(r=n.user_info)||void 0===r?void 0:r.user_name,(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==n?void 0:n.time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)(H.Z,{value:n.content})]}),(0,R.jsx)(y.Z,{children:(null==n?void 0:n.can_delete)&&(0,R.jsx)(S.Z,{title:"删除",children:(0,R.jsx)(M.Z,{className:"current c-light-black",onClick:function(){Un(n)}})})})]})})},t),t!==e.journals.length-1&&(0,R.jsx)(j.Z,{})]},t)}))]})]})]}),Ze.show&&n===Ze.active&&(0,R.jsxs)("aside",{className:["bg-white"].join(" "),children:[(0,R.jsx)(Z.Z,{onChange:function(e){Me(e)},height:150,isFocus:!0,watch:!0}),(0,R.jsx)(w.Z,{children:(0,R.jsxs)(y.Z,{span:24,className:"tr",children:[(0,R.jsx)(_.ZP,{type:"default",size:"middle",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Be({show:!1,type:0,active:n});case 1:case"end":return e.stop()}}),e)}))),children:"取消"}),(0,R.jsx)(_.ZP,{type:"primary",size:"middle",className:"ml20",onClick:r()(o()().mark((function t(){var i;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==Ce){t.next=4;break}v.ZP.error("请输入内容"),t.next=14;break;case 4:if(0!==Ze.type){t.next=10;break}return t.next=7,(0,D.qP)({comment:Ce,userId:xe.userId,score_id:e.score_id});case 7:i=t.sent,t.next=13;break;case 10:return t.next=12,(0,D.R$)({comment:Ce,score_id:e.score_id,userId:xe.userId});case 12:i=t.sent;case 13:0===i.status&&(v.ZP.success("操作成功"),Be({show:!1,type:0,active:n}),Hn());case 14:case"end":return t.stop()}}),t)}))),children:0===Ze.type?"回复":"申诉"})]})})]})]})]},n),(0,R.jsx)(j.Z,{})]},n)}))]}),(0,J.GJ)()&&(0,R.jsxs)("aside",{className:[F.replyList,"bg-white"].join(" "),children:[(0,R.jsxs)("p",{style:{color:"#000000",fontWeight:500},children:["点评内容-仅课堂老师可见(",null==be||null===(de=be.hidden_comment_scores)||void 0===de?void 0:de.length,""]}),(0,R.jsx)(j.Z,{}),null==be||null===(ue=be.hidden_comment_scores)||void 0===ue?void 0:ue.map((function(e,n){var t,i,a,s,l,c;return(0,R.jsxs)("aside",{children:[(0,R.jsxs)(w.Z,{gutter:[12,12],children:[(0,R.jsxs)(y.Z,{flex:"40px",children:["--"===(null==e?void 0:e.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==e?void 0:e.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[(0,R.jsxs)(w.Z,{align:"middle",children:[(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:1,children:[(0,R.jsx)("span",{className:"c-light-black",children:null==e?void 0:e.user_name}),(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==e?void 0:e.comment_time).format("YYYY-MM-DD HH:mm")})]}),(0,R.jsx)(y.Z,{children:0===n?(0,R.jsxs)("aside",{children:[e.delete&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Jn(e)},children:"删除"}),e.can_appeal&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Ae({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,R.jsx)("span",{className:"c-blue current ml10",onClick:function(){return Ae({show:!0,type:0,active:n})},children:"回复"})]}):(0,R.jsxs)("aside",{children:[e.delete&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Jn(e)},children:"删除"}),e.can_appeal&&(0,R.jsx)("span",{className:"c-blue current",onClick:function(){Ae({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,R.jsx)("span",{className:"c-blue current ml10",onClick:function(){return Ae({show:!0,type:0,active:n})},children:"回复"}),!e.can_reply&&(0,R.jsx)("span",{className:"c-light-black ml10",children:"失效"})]})})]})}),(0,R.jsxs)(y.Z,{span:24,children:[e.hidden_comment&&(0,R.jsx)(H.Z,{value:e.hidden_comment}),!e.hidden_comment&&(0,R.jsx)("span",{className:"c-light-black",children:"暂未写评语"}),null==e||null===(t=e.attachments)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsx)("div",{children:(0,R.jsxs)("a",{href:"".concat(A.Z.API_SERVER).concat(e.url),children:[(0,R.jsx)("span",{className:"iconfont icon-fujian c-green font14"}),(0,R.jsx)("span",{className:"ml10 c-black",children:e.title}),(0,R.jsx)("span",{className:"c-light-black ml20 font12",children:e.filesize})]})},n)}))]}),(0,R.jsxs)("div",{className:"w100",children:[(0,R.jsx)(j.Z,{}),(0,R.jsxs)("aside",{className:[F.comment,"w100"].join(" "),children:[e.appeal_info&&""!=e.appeal_info&&(0,R.jsx)("aside",{children:(0,R.jsx)(w.Z,{children:(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"50px",children:["--"===(null==e||null===(i=e.appeal_info)||void 0===i?void 0:i.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==e||null===(a=e.appeal_info)||void 0===a?void 0:a.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==e||null===(s=e.appeal_info)||void 0===s?void 0:s.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"1",children:[null==e||null===(l=e.appeal_info)||void 0===l?void 0:l.user_name,(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==e||null===(c=e.appeal_info)||void 0===c?void 0:c.time).format("YYYY-MM-DD HH:mm")}),1===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉中"}),2===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉已撤销"}),3===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉成功"}),4===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉被拒绝"}),5===(null==e?void 0:e.appeal_status)&&(0,R.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉失败"})]}),(0,R.jsxs)(y.Z,{children:[1===(null==e?void 0:e.appeal_status)&&e.can_appeal&&(0,R.jsx)("span",{onClick:function(){var e;f.Z.confirm({title:(0,R.jsxs)("div",{children:["撤销申诉后,无法再对本评阅记录进行申诉",(0,R.jsx)("br",{}),"是否确认撤销申诉"]}),onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Hn();case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-blue current",children:"撤销申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,J.GJ)()&&(0,R.jsx)("span",{onClick:function(){var n;f.Z.confirm({title:(0,R.jsxs)("div",{children:["此匿评成绩将被废弃,评阅人的作品将被违规扣分",(0,R.jsx)("br",{}),"是否确认接受申诉"]}),onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,L.ZP)("/api/student_works/".concat(xe.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:3}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&Hn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-red current",children:"接受申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,J.GJ)()&&(0,R.jsx)("span",{onClick:function(){var n;f.Z.confirm({title:(0,R.jsxs)("div",{children:["此匿评成绩将被认为合理",(0,R.jsx)("br",{}),"是否确认拒绝申诉"]}),onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,L.ZP)("/api/student_works/".concat(xe.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:4}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&Hn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-light-black current ml10",children:"拒绝申诉"})]})]}),(0,R.jsx)(H.Z,{value:null==e?void 0:e.appeal_info.content})]}),(0,R.jsx)(y.Z,{})]})})})}),e.journals.map((function(n,t){var i,o,a,r;return(0,R.jsxs)("aside",{children:[(0,R.jsx)(w.Z,{children:(0,R.jsx)(y.Z,{span:24,children:(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)(y.Z,{flex:"50px",children:["--"===(null==n||null===(i=n.user_info)||void 0===i?void 0:i.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:q.xp}),"--"!==(null==n||null===(o=n.user_info)||void 0===o?void 0:o.user_image_url)&&(0,R.jsx)("img",{className:F.headpic,width:"40",src:"".concat(A.Z.IMG_SERVER,"/images/").concat(null==n||null===(a=n.user_info)||void 0===a?void 0:a.user_image_url)})]}),(0,R.jsxs)(y.Z,{flex:"1",children:[null==n||null===(r=n.user_info)||void 0===r?void 0:r.user_name,(0,R.jsx)("span",{className:"c-light-black ml10",children:E()(null==n?void 0:n.time).format("YYYY-MM-DD HH:mm")}),(0,R.jsx)(H.Z,{value:n.hidden_comment})]}),(0,R.jsx)(y.Z,{children:(null==n?void 0:n.can_delete)&&(0,R.jsx)(S.Z,{title:"删除",children:(0,R.jsx)(M.Z,{className:"current c-light-black",onClick:function(){Un(n)}})})})]})})},t),t!==e.journals.length-1&&(0,R.jsx)(j.Z,{})]},t)}))]})]})]}),Ee.show&&n===Ee.active&&(0,R.jsxs)("aside",{className:["bg-white"].join(" "),children:[(0,R.jsx)(Z.Z,{onChange:function(e){Me(e)},height:150,isFocus:!0,watch:!0}),(0,R.jsx)(w.Z,{children:(0,R.jsxs)(y.Z,{span:24,className:"tr",children:[(0,R.jsx)(_.ZP,{type:"default",size:"middle",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ae({show:!1,type:0,active:n});case 1:case"end":return e.stop()}}),e)}))),children:"取消"}),(0,R.jsx)(_.ZP,{type:"primary",size:"middle",className:"ml20",onClick:r()(o()().mark((function t(){var i;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==Ce){t.next=4;break}v.ZP.error("请输入内容"),t.next=14;break;case 4:if(0!==Ee.type){t.next=10;break}return t.next=7,(0,D.qP)({hidden_comment:Ce,userId:xe.userId,score_id:e.score_id});case 7:i=t.sent,t.next=13;break;case 10:return t.next=12,(0,D.R$)({comment:Ce,score_id:e.score_id,userId:xe.userId});case 12:i=t.sent;case 13:0===i.status&&(v.ZP.success("操作成功"),Ae({show:!1,type:0,active:n}),Hn());case 14:case"end":return t.stop()}}),t)}))),children:0===Ee.type?"回复":"申诉"})]})})]})]})]},n),(0,R.jsx)(j.Z,{})]},n)}))]})]}),(0,R.jsx)(z,{}),(0,R.jsx)(V,{}),(0,R.jsx)(T.Z,{}),(0,R.jsx)(f.Z,{title:"确认打回重做",open:$e,destroyOnClose:!0,forceRender:!0,onCancel:function(){en(!1)},onOk:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ln){e.next=3;break}return v.ZP.info("评语不能为空"),e.abrupt("return");case 3:return e.next=5,(0,L.ZP)("/api/student_works/".concat(xe.userId,"/redo_modal.json"),{method:"post",body:{comment:ln,id:xe.userId}});case 5:0===(null==(n=e.sent)?void 0:n.status)&&(v.ZP.info("打回重做成功"),en(!1),Hn());case 7:case"end":return e.stop()}}),e)}))),width:700,children:(0,R.jsxs)("div",{style:{padding:"32px"},children:[(0,R.jsxs)("span",{children:["确认将",null==_e?void 0:_e.author_name,"的作业打回重做吗"]}),(0,R.jsxs)("div",{style:{marginTop:"20px"},children:[(0,R.jsxs)("label",{children:[(0,R.jsx)("span",{style:{marginRight:"5px",color:"red"},children:"*"}),"评语:"]}),(0,R.jsx)(Z.Z,{className:F.MdEditor,onChange:function(e){return cn(e)},defaultValue:"",height:250})]})]})}),Re,(0,R.jsx)(P.Z,{close:!0,data:null==pn?void 0:pn.content,type:null==pn?void 0:pn.type,hasMask:!0,monacoEditor:{value:Nn.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return mn({content:"",type:""})}}),(0,R.jsxs)(f.Z,{width:675,title:"请选择需要导出的格式",open:Tn,confirmLoading:Gn,centered:!0,onCancel:function(){return Ln(!1)},onOk:function(){console.log("allStudents",zn),"附件"==Pn?zn?Qn(!1):Xn(!1):"批注"==Pn&&(zn?Qn(!0):Xn(!0))},children:[(0,R.jsx)("div",{className:F.export_type_modal_title,children:"本次导出包含学生提交的答题记录以及提交的附件,请选择导出附件类型"}),(0,R.jsxs)("div",{className:F.export_type_modal,children:[(0,R.jsxs)("div",{className:F.export_type_modal_con,children:[(0,R.jsxs)("div",{className:"".concat(F.type_item," ").concat("附件"==Pn?F.type_item_active:""),onClick:function(){return In("附件")},children:[(0,R.jsx)("div",{className:"".concat(F.img_warp),children:(0,R.jsx)("img",{src:K.Z,width:72,height:80})}),(0,R.jsx)("span",{children:"学生提交的附件"})]}),(0,R.jsxs)("div",{className:"".concat(F.type_item," ").concat("批注"==Pn?F.type_item_active:""),onClick:function(){return In("批注")},children:[(0,R.jsx)("div",{className:"".concat(F.img_warp),children:(0,R.jsx)("img",{src:Q.Z,width:99,height:80})}),(0,R.jsx)("span",{children:"包含批注内容的附件"})]})]}),(0,R.jsx)("div",{className:F.export_type_modal_waring,children:"如学生未上传附件,仅会导出该学生提交的答题记录"})]})]})]})}))},28838:function(e,n,t){"use strict";t.d(n,{$J:function(){return l},JZ:function(){return d},bN:function(){return m},jP:function(){return p},rO:function(){return c}});var i=t(7557),o=t.n(i),a=t(41498),r=t.n(a),s=t(51136);function l(e){return(0,s.U2)("libraries/".concat(e,".json"))}function c(){return(0,s.U2)("library_tags.json")}function d(e){return u.apply(this,arguments)}function u(){return(u=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.IV)("attachments/".concat(n,".json"));case 2:return t=e.sent,e.abrupt("return",0===t.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return(0,s.v_)("libraries.json",e)}function m(e,n){return(0,s.gz)("libraries/".concat(e,".json"),n)}},83615:function(e,n,t){"use strict";t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNjIuNyA3OS42SDBWOC41aDM5LjNsMjMuNCAxOC40eiIgZmlsbD0iI0YwQTIyMSIvPjxwYXRoIGQ9Ik03MS40IDcxLjFIOC43VjBoNDQuNGwxOC4zIDE4eiIgZmlsbD0iI0YxQzg0QyIvPjxwYXRoIGQ9Ik01My4zIDcuM3YxMS41aDExLjV6IiBmaWxsPSIjRkZGIi8+PHBhdGggZD0iTTM0LjkgMTMuOWgtMTd2NC42aDE3ek00NS45IDI3aC0yOHY0LjZoMjh6TTQ1LjkgNDAuNmgtMjh2NC42aDI4ek00NS45IDUzLjdoLTI4djQuN2gyOHoiIGZpbGw9IiNGMEEyMjEiLz48cGF0aCBkPSJNNjUgMzJINTB2NC42aDE1ek02NSA0NS42SDUwdjQuNmgxNXpNNjUgNTguN0g1MHY0LjdoMTV6IiBmaWxsPSIjRkZGIi8+PGc+PHBhdGggZD0iTTYwIDU2LjVjLjcgNC4zLTEgOC4zLTEgOC4zczQtMS43IDguMy0xYzAgMCAxLjQtNC41IDUuMi0xMEw3MCA1MS4yYy01LjUgMy45LTEwIDUuMy0xMCA1LjNaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0ibTY0IDU5LjIgNy4xLTcuMS41LjUtNy4xIDcuMXoiIGZpbGw9IiNGOUE1NEMiLz48cGF0aCBkPSJNNjIuOCA1OS44YzAgLjcuNSAxLjIgMS4yIDEuMnMxLjItLjUgMS4yLTEuMi0uNS0xLjItMS4yLTEuMi0xLjIuNi0xLjIgMS4yWiIgZmlsbD0iI0ZGRiIvPjxwYXRoIGQ9Ik03MS42IDU1LjhjNC0yLjYgNi43LTQuNSAxMi42LTEwLjUgMTAuMi0xMC4yIDE2LTE4LjMgMTQuMy0yMC0xLjctMS43LTkuNSAzLjgtMjAgMTQuMy02IDYtNy42IDguNi0xMC41IDEyLjZsMy42IDMuNloiIGZpbGw9IiMzMjRBNUUiLz48cGF0aCBkPSJtNzggMzkuOCA1LjcgNS43LjUtLjUgMS40LTEuNC01LjYtNS43LTEuNCAxLjQtLjYuNVptMTAuNS01LjdjLS41LjItMS4yLjctMS43IDEuNC0xLjIgMS4yLTEuOSAyLjQtMS43IDIuOS41LjUgMS43LS41IDIuOS0xLjcuNy0uNyAxLjItMS4yIDEuNC0xLjdsNi4yLTYuMiAxLjQgMS40YzEuNy0yLjYgMi4xLTQuNSAxLjQtNS0uNS0uNS0yLjYtLjItNSAxLjRsMS42IDEuNi02LjUgNS45WiIgZmlsbD0iI0ZGQzY1QiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiAzNi40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiA1MC40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiA2NC40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48L2c+PC9zdmc+"},32833:function(e,n,t){"use strict";t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjRjBBMjIxIiBkPSJNNjIuNjk4IDc5LjYzMUguMDRWOC41MzRoMzkuMjJsMjMuNDM4IDE4LjMzMnoiLz48cGF0aCBkPSJNNzEuMzg3IDcxLjFIOC43M1YuMDA1aDQ0LjMyNmwxOC4zMzcgMTguMDN2NTMuMDY3aC0uMDA1Wk01My4zMzEgNy4zMzZ2MTEuNDhoMTEuNDhMNTMuMzMgNy4zMzVabS04LjM2NyA2LjUzNkgxNy45Mzh2NC42MjNoMjcuMDI2VjEzLjg3Wk02Mi4yNiAyNy4wMjRIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1ptMCAxMy41NTFIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1ptMCAxMy4xNThIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1oiIGZpbGw9IiNGMUM4NEMiLz48L2c+PC9zdmc+"}}]);