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/4510.async.js

1 line
257 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([[4510,90963,39752],{66455:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},n="5.0",t={},i=null,a=!1,r=!1,l=null,o=!1,s=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:l=u;break;case"object":void 0!==u.is3D?i=u:t=u;break;case"boolean":a=u,r=!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||r||(a=!0)),null!==l&&void 0===t.id&&(t.id=l);var h="",m=!1,p=null,f=null,g=null,v=!1,x=null,j=null,w=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var y=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function _(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,D(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."):(s=e,L(e,n))},e.getHTML5CodebaseVersion=function(){return f},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){w=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,a="auto",r=t.id,l=!1,s=0;s<arguments.length;s++){var c=arguments[s];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?a=c:r=arguments[s]:"boolean"==typeof c?l=c:c instanceof HTMLElement&&(i=c)}function d(){if(o){a=M(a);var s=i||document.getElementById(r);if(s)if(e.removeExistingApplet(s,!1),void 0===t.width&&s.clientWidth&&(t.width=s.clientWidth),void 0===t.height&&s.clientHeight&&(t.height=s.clientHeight),t.width&&t.height||"html5"!==a||(delete t.width,delete t.height),p=a,"screenshot"===a)S(s,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())&&_()),c?(p="screenshot",I(s,t,l,a)):A(s,t,l)}else console.log("possibly bug on ajax loading? ")}else setTimeout(d,200)}d()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var N=function(n){var a=function(){t.onError&&t.onError(),O("Error: Fetching material (id "+t.material_id+") failed.",t)},r=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",l="/materials/"+t.material_id+"?scope=basic";C("https://"+r+"/api/proxy.php?path="+encodeURIComponent(l),(function(r){var l=JSON.parse(r),o=l.elements?l.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:l;if(o&&o.url){t.fileName=o.url,k(o.settings||{}),i.is3D=!0;var s="https://www.geogebra.org/images/";e.setPreviewImage(x||o.previewUrl,s+"GeoGebra_loading.png",s+"applet_play.png"),n()}else a()}),a)};function k(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 C(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 p},e.setPreviewImage=function(e,n,t){x=e,j=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),p=null;var a=null;for(i=0;i<e.childNodes.length;i++){var r=e.childNodes[i],l=r.className;"applet_screenshot"===l?n?(r.style.display="block",p="screenshot"):r.style.display="none":"applet_scaler prerender"!==l&&(e.removeChild(r),a=l&&-1!=l.indexOf("appletParameters")?r.id:null,i--)}var o=void 0!==t.id?t.id:a,s=window[o];s&&"function"==typeof s.getBase64&&(s.remove(),window[o]=null)},e.refreshHitPoints=function(){if(y(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 Z=function(e){return e&&"false"!==e},A=function(n,t,i){y(f)<=4.2&&(i=!0);var a=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==f||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(a=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var r=document.createElement("div");r.classList.add("appletParameters","notranslate");var l=t.width,o=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(y(f)<=4.4)Z(t.showToolBar)&&(t.height-=7),Z(t.showAlgebraInput)&&(t.height-=37),t.width<605&&Z(t.showToolBar)&&(t.width=605,l=605);else{var d=100;(Z(t.showToolBar)||Z(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),d=Z(t.showMenuBar)?245:155),l<d&&(t.width=d,l=d)}for(var u in r.style.border="none",r.style.display="inline-block",t)t.hasOwnProperty(u)&&"appletOnLoad"!==u&&r.setAttribute("data-param-"+u,t[u]);w&&r.setAttribute("data-param-fontscssurl",w),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 p=document.createElement("div");p.className="applet_scaler",p.style.position="relative",p.style.display="block",p.appendChild(r),n.appendChild(p),t.appletOnLoad=function(n){e.resize(),m(n)}}else{t.hasOwnProperty("showSplash")||r.setAttribute("data-param-showSplash","false");var x=n.querySelector(".applet_scaler.prerender"),j=null!==x;if(j)b=x.querySelector(".ggb_preview");else{var b=P(l,o,t.borderColor,!1);(x=document.createElement("div")).className="applet_scaler",x.style.position="relative",x.style.display="block",x.style.width=l+"px",x.style.height=o+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(x,"66%"),y(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)},j||x.appendChild(b)):r.appendChild(b),x.appendChild(r),j||n.appendChild(x),setTimeout((function(){e.resize()}),1)}function _(e,n){n&&"function"==typeof n.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,n.appletOnLoad):renderGGBElement(e),O("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",n)}function N(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){_(e.article,e.params)})),html5AppletsToProcess=null)},y(f)<5&&(e.className+=" geogebraweb")):_(e,n)}if(a){scriptLoadStarted=!0;for(var k=0;k<r.childNodes.length;k++){"TABLE"===r.childNodes[k].tagName&&(r.removeChild(r.childNodes[k]),k--)}if(null!==ggbHTML5LoadedScript){var C=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=C&&C.parentNode.removeChild(C)}var A=document.createElement("script"),S=function(){N(r,t)};A.src=h+g,ggbHTML5LoadedCodebaseIsWebSimple=v,ggbHTML5LoadedCodebaseVersion=f,ggbHTML5LoadedScript=A.src,O("GeoGebra HTML5 codebase loaded: '"+h+"'.",t),c||s&&"5.0"!=s?h.requirejs?__webpack_require__.e(5783).then(function(){var e=[__webpack_require__(5783)];S.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(A.onload=S,n.appendChild(A)):(v?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),S())}else N(r,t);t.height=o,t.width=l},S=function(n,t,i){var a=P(t.width,t.height,t.borderColor,i),r=document.createElement("div");r.style.position="relative",r.style.display="block",r.style.width=t.width+"px",r.style.height=t.height+"px",r.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),r.appendChild(a);var l=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(T()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(r,"66%"),n.appendChild(r),1===l||isNaN(l)||(GGBAppletUtils.scaleElement(r,l),r.style.width=t.width+"px",r.style.height=t.height+"px",r.parentNode.style.width=t.width*l+"px",r.parentNode.style.height=t.height*l+"px"),e.resize=function(){B(n,a,r,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function B(e,n,i,a){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 r=GGBAppletUtils.getScale(t,e,a);null!==i.parentNode&&(isNaN(r)||1===r?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,r),i.parentNode.style.width=t.width*r+"px",i.parentNode.style.height=t.height*r+"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 I=function(e,n,t,i){S(e,n,!0);for(var a=function(){var t=[];for(l=0;l<e.childNodes.length;l++)t.push(e.childNodes[l]);if(window.GGBT_wsf_view){var a=window.GGBT_wsf_view.renderFullScreen(e,n.id),r=document.getElementById("fullscreencontainer"),o=jQuery(e).find(".fullscreencontent");o.length>0?(a.remove(),o.attr("id","fullscreencontent").show(),jQuery(r).append(o),window.dispatchEvent(new Event("resize"))):A(a,n,!1),window.GGBT_wsf_view.launchFullScreen(r)}else p=i,A(e,n,!1);if(!window.GGBT_wsf_view)for(l=0;l<t.length;l++)e.removeChild(t[l])},r=e.getElementsByClassName("ggb_preview_play"),l=0;l<r.length;l++)r[l].addEventListener("click",a,!1),r[l].addEventListener("ontouchstart",a,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),_()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},T=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 a=document.createElement("div");a.className="ggb_preview",a.style.position="absolute",a.style.zIndex="90",a.style.width=e-2+"px",a.style.height=n-2+"px",a.style.top="0px",a.style.left="0px",a.style.overflow="hidden",a.style.backgroundColor="white";var r="lightgrey";void 0!==t&&(r="none"===t?"transparent":t),a.style.border="1px solid "+r;var l,o,s,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!==j)&&!i){(l=document.createElement("img")).style.position="absolute",l.style.zIndex="1001",l.style.opacity=1,c.style.opacity=.3,(o=360)>e/4*3&&(o=e/4*3),s=o/5.8,l.setAttribute("src",j),l.setAttribute("width",o),l.setAttribute("height",s);var d=(e-o)/2,u=(n-s)/2;l.style.left=d+"px",l.style.top=u+"px",a.appendChild(l)}return a.appendChild(c),a},M=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},E=["web","webSimple","web3d","tablet","tablet3d","phone"],L=function(e,n){if(f=e,n)D(f,!0);else{var r,l,o=!a;if(o){var s=y(f);!isNaN(s)&&s<4.4&&(o=!1)}r="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=f.indexOf("//");for(var d in l=c>0?f:0===c?r+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 D(l,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!o||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||Z(t.showToolBar)||Z(t.showMenuBar)||Z(t.showAlgebraInput)||Z(t.enableRightClick)||t.appName&&"classic"!=t.appName?l+="web3d/":l+="webSimple/",D(l,!1)}},D=function(e,n){if(e.requirejs)h=e;else{"/"!==e.slice(-1)&&(e+="/"),h=e,null===n&&(n=-1===e.indexOf("http")),m=n,g="web.nocache.js",v=!1;var t=h.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."),L("5.0",n))}},O=function(e,n){window.console&&window.console.log&&(!n||void 0===n.showLogging||n.showLogging&&"false"!==n.showLogging)&&console.log(e)};function R(){var e=n;null!==s?e=s:parseFloat(e)<5&&(e="5.0"),L(e,!1),null!==c&&D(c,m),o=!0}return void 0!==t.material_id?N(R):R(),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,a){if(e.isScreenshoGenerator)return 1;var r,l=void 0!==i&&i,o=null!=e.noScaleMargin&&e.noScaleMargin,s=(r=e.autoHeight)&&"false"!==r,c=function(e,n,t,i,a,r){var l=null;if(null!=r&&""!=r)for(var o=e.parentNode;null!=o;){if((" "+o.className+" ").indexOf(" "+r+" ")>-1){l=o;break}o=o.parentNode}var s=0,c=0,d=0,u=0,h=0,m=0,p=0;if(l)s=l.offsetWidth,c=Math.max(i?l.offsetWidth:0,l.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(s=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),d=s):(s=window.innerWidth,c=window.innerHeight,d=window.innerWidth),e){var f=e.getBoundingClientRect();f.left>0&&f.left<=s&&(void 0===a||!a)&&("rtl"===document.dir?(h=s-f.width-f.left,m=d<=480?10:30):(m=f.left,h=d<=480?10:30),u=m+h)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(u=40,p=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(u=0,p=40))}return e&&((void 0===t||!t)&&n>0&&n+u<s?s=n:s-=u,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=p)),{width:s,height:c}}(n,e.width,t,s,l&&window.GGBT_wsf_view||o,a),d=parseInt(c.width),u=e.width,h=e.height;if(void 0===u){var m=n.querySelector(".appletParameters");m&&(u=m.offsetWidth,h=m.offsetHeight)}var p=d/u,f=l?1:c.height/h;return void 0===t||t||(p=Math.min(1,p),f=Math.min(1,f)),Math.min(p,f)}function i(e,n,i){var a,r=1,l=!1;return e.hasOwnProperty("allowUpscale")&&(l=e.allowUpscale),e.hasOwnProperty("scale")&&(r=parseFloat(e.scale),(isNaN(r)||null===r||0===r)&&(r=1),r>1&&(l=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(l=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?r:(a=t(e,n,l,i,e.scaleContainerClass),!l||e.hasOwnProperty("scale")&&1!==r?Math.min(r,a):a)}function a(e){var n=Math.min(window.innerWidth,document.documentElement.clientWidth),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),a=(n-i.width)/2,r=(t-i.height)/2;r<0&&(r=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=a<40?"40px":a+"px",e.style.top=r+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=r<40?"40px":r+"px",e.style.left=a+"px")}return{responsiveResize:function(t,r){var l=t.querySelector(".appletParameters");if(l){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(r.id!==l.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(t)}if(l.parentElement&&/fullscreen/.test(l.parentElement.className))return;var o=i(r,t);e()&&l.setAttribute("data-param-scale",o);for(var s=null,c=0;c<t.childNodes.length;c++)if(void 0!==t.childNodes[c].className&&t.childNodes[c].className.match(/^applet_scaler/)){s=t.childNodes[c];break}if(null!==s&&null!==s.querySelector(".noscale"))return;var d=void 0!==r.id?r.id:"ggbApplet",u=window[d];null!=u&&u.recalculateEnvironments||null===s||s.className.match(/fullscreen/)||(s.parentNode.style.transform="",isNaN(o)||1===o?(n(s,1),s.parentNode.style.width=r.width+"px",s.parentNode.style.height=r.height+"px"):(s.parentNode.style.width=r.width*o+"px",s.parentNode.style.height=r.height*o+"px",n(s,o))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&a(t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(l).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:a,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,a;n=e,t=u(),i=t.body,(a=t.createElement(_)).language=ab,a.crossOrigin=W,a.src=n,webModule.__errFn&&(a.onerror=function(){webModule.__errFn(L,new Error(bb+n))}),i.appendChild(a),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=[],a=[];function l(e){var n=a[e](),t=i[e];if(n in t)return n;var l=[];for(var o in t)l[t[o]]=o;throw r&&r(e,l,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]=l(n));return e},webModule.__computePropValue=l,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var o=(e=Cb).indexOf(Db);-1!=o&&(t=parseInt(e.substring(o+P),$),e=e.substring(O,o))}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],a=O;a<i.length;a++){var r=i[a];t[r[O]]=r[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 a(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var a=e[i],r=n?"".concat(n,"/").concat(a.name):"".concat(a.name);t.push({title:a.name,type:a.type,isLeaf:"tree"!==a.type,key:r})}return t}function r(e,n,t){for(var i=0;i<e.length;i++){var a=e[i];if(a.key===n){a.children=t;break}a.children&&r(a.children,n,t)}return e}function l(e,n,t){var i;return function(){var a=this,r=arguments,l=function(){i=null,t||e.apply(a,r)},o=t&&!i;clearTimeout(i),i=setTimeout(l,n),o&&e.apply(a,r)}}t.d(n,{Ax:function(){return r},Ds:function(){return l},KI:function(){return o},SI:function(){return a},f1:function(){return i}});var o=t(27065).Z.API_SERVER},58499:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var i=t(82242),a=t.n(i),r=t(7557),l=t.n(r),o=t(41498),s=t.n(o),c=t(79800),d=t.n(c),u=t(39647),h=t.n(u),m=t(3113),p=t(59301),f=t(37712),g=["children"],v=function(e){var n=e.children,t=h()(e,g),i=(0,p.useState)(!1),r=d()(i,2),o=r[0],c=r[1];return(0,f.jsx)(m.ZP,a()(a()({},t),{},{loading:o,onClick:function(){var e=s()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c(!0),e.next=4,t.onClick(n);case 4:c(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),c(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},68324:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var i=t(82100),a=t.n(i),r=t(29186),l=t.n(r),o=t(80619),s=t.n(o),c=t(47074),d=t.n(c),u=t(59301),h=t(8772),m=t(12563),p=t(8591),f="flex___eLcnP",g="color666___TiUhG",v=t(18647),x=t(37712),j=(h.Z.TextArea,function(e){s()(t,e);var n=d()(t);function t(e){var i;return a()(this,t),(i=n.call(this,e)).state={inputVisible:!1,EditInputIndex:-1},i}return l()(t,[{key:"render",value:function(){var e=this,n=this.props,t=n.index,i=n.onAnswerChange,a=n.addChildAnswer,r=(n.exerciseIsPublish,n.answers);n.activeOptionErrorIndex,n.flex;console.log("----",r);var l=this.state,o=l.inputVisible,s=l.EditInputIndex;return(0,x.jsxs)("div",{className:f,children:[(0,x.jsxs)("div",{className:"".concat(g," mb5 mt6"),style:{flex:"0 0 90px"},children:["答案(填空",t+1,"):"]}),(0,x.jsxs)("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10},children:[null==r?void 0:r.map((function(n,a){return(0,x.jsx)(x.Fragment,{children:s!==a&&(null==n?void 0:n.length)>0?(0,x.jsx)(m.Z,{className:"edit-tag",closable:!0,onClose:function(n){n.preventDefault(),1===(null==r?void 0:r.length)&&0===a?e.props.deleteChildAnswermain(t,a):e.props.deleteChildAnswer(t,a)},children:(0,x.jsx)("span",{onDoubleClick:function(n){e.setState({EditInputIndex:a}),n.preventDefault()},children:n})},n):(0,x.jsx)(h.Z,{defaultValue:n,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:function(n){n.target.value.replaceAll(" ","").length<=0?p.ZP.info("内容不能为纯空格"):(i(t,a,n.target.value),e.setState({EditInputIndex:-1,inputVisible:!1}))}})})})),!o&&(0,x.jsxs)(m.Z,{className:"site-tag-plus",onClick:function(){a(t),e.setState({inputVisible:!0})},children:[(0,x.jsx)(v.Z,{})," 新增答案"]})]})]})}}]),t}(u.Component))},50746:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(82242),a=t.n(i),r=t(82100),l=t.n(r),o=t(29186),s=t.n(o),c=t(13720),d=t.n(c),u=t(80619),h=t.n(u),m=t(47074),p=t.n(m),f=t(85573),g=t.n(f),v=t(59301),x=t(11094),j=t(37712),w="▁",y=function(e){h()(t,e);var n=p()(t);function t(){var e;l()(this,t);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return e=n.call.apply(n,[this].concat(a)),g()(d()(e),"getChCountBeforeCursor",(function(e,n){for(var t=n.line,i=0,a=0;a<t;a++)i+=e.getLine(a).split(w).length-1;return i+=e.getLine(t).substring(0,n.ch).split(w).length-1})),g()(d()(e),"onCMBeforeChange",(function(n,t){var i=n.getRange(t.from,t.to),a=0;if(t.text.forEach((function(e){a+=e.split(w).length-1})),i&&-1!=i.indexOf(w)){var r=i.split(w).length-1,l=e.getChCountBeforeCursor(n,t.from);console.log("删除".concat(r,"个, 之前有").concat(l,"个,新增").concat(a,"个")),e.props.deleteEmptyDisabled?t.cancel():e.props.onPlaceholderChange&&e.props.onPlaceholderChange(l,r,a)}else if(a){var o=e.getChCountBeforeCursor(n,t.from);console.log("新增".concat(a,"个,之前有").concat(o,"个")),e.props.onPlaceholderChange&&e.props.onPlaceholderChange(o,0,a)}})),e}return s()(t,[{key:"render",value:function(){return(0,j.jsx)(x.Z,a()(a()({},this.props),{},{onCMBeforeChange:this.onCMBeforeChange}))}}]),t}(v.Component)},74908:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(7557),a=t.n(i),r=t(41498),l=t.n(r),o=t(79800),s=t.n(o),c=t(59301),d="imageDimensions___a7crR",u="img___Kroat",h="fullWidth___c492T",m=t(92310),p=t.n(m),f=t(71418),g=t(2859),v=t(51136),x=t(6457),j=t(37712),w=function(e){var n=e.data,t=e.className,i=e.fullWidth,r=e.style,o=void 0===r?{}:r,m=e.onClose,w=e.onOk,y=e.showFullTools,b=e.noAssociationId,_=(0,c.useRef)(null),N=(0,c.useRef)(null),k=(0,c.useState)(!1),C=s()(k,2),Z=C[0],A=C[1],S=(0,c.useState)("正在加载中"),B=s()(S,2),I=B[0],T=B[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=l()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),T("正在加载中"),e.next=4,(0,x.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,_.current.src="",_.current.src=t,_.current.onload=function(){E()},A(!1),T("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=l()(a()().mark((function e(t){var i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),T("正在保存中"),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&&w(),e.next=13;break;case 12:null!=i&&i.id&&w(i);case 13:A(!1),T("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){N.current=new g.hP(_.current),N.current.addEventListener("render",M),N.current.addEventListener("beforeclose",m),y&&(N.current.availableMarkerTypes=N.current.ALL_MARKER_TYPES,N.current.uiStyleSettings.redoButtonVisible=!0,N.current.uiStyleSettings.notesButtonVisible=!0,N.current.uiStyleSettings.zoomButtonVisible=!0,N.current.uiStyleSettings.zoomOutButtonVisible=!0,N.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=N.current.uiStyleSettings,N.current.show(),null!=n&&n.snapshotData&&N.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,j.jsx)(c.Fragment,{children:(null==n?void 0:n.visible)&&(0,j.jsxs)("div",{className:p()(d,t,i?h:""),style:o,children:[(0,j.jsx)(f.Z,{spinning:Z,tip:I,style:{position:"absolute"}}),(0,j.jsx)("img",{className:u,ref:_})]})})}},30347:function(e,n,t){"use strict";var i=t(79800),a=t.n(i),r=t(59301),l=t(44499),o=(t(48136),t(33773)),s=t(43418),c=t(37712),d=(0,r.forwardRef)((function(e,n){var t=e.callback,i=e.width,d=e.onChange,u=e.disabled,h=e.readOnly,m=e.type,p=void 0===m?"":m,f=e.value,g=void 0===f?"":f,v=e.style,x=void 0===v?{}:v,j=(0,r.useRef)(),w=(0,r.useRef)(),y=(0,r.useState)(0),b=a()(y,2),_=b[0],N=b[1],k=(0,r.useState)(0),C=a()(k,2),Z=C[0],A=C[1],S=(0,r.useState)(!1),B=a()(S,2),I=B[0],T=B[1],P=function(){var e=document.createElement("div");e.innerHTML=j.current.getValue();var n=e.innerText;return t&&t(n),n};(0,r.useImperativeHandle)(n,(function(){return{getData:P}}));var M=function(e,n,t,i){var a=document.body.clientHeight,r=document.body.clientWidth;return!(e<20&&t>e||e>r-20&&t<e||n<20&&i>n||n>a-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,r.useEffect)((function(){I&&setTimeout((function(){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;N(n),A(t)}),0)}),[I]);return(0,c.jsxs)("div",{style:x,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(l.Z.mathFillWrap," ").concat(u||h?"cursorDefault":""),onClick:function(){u||h||T(!0)},children:(0,c.jsx)("math-field",{disabled:u,locale:"zh_cn",class:"".concat(l.Z.mathField," ").concat(p),readOnly:h,placeholder:"请输入公式",ref:j,style:{width:"100%",fontSize:g?18:14},value:g||""})}),(0,c.jsx)(s.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:_,top:Z},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-_,t=e.clientY-Z;document.body.onmousemove=function(e){var i=e.clientX-n,a=e.clientY-t,r=document.getElementsByClassName("ant-modal")[0],l=window.innerWidth-r.offsetWidth,o=window.innerHeight-r.offsetHeight;i=Math.max(0,Math.min(i,l)),a=Math.max(0,Math.min(a,o)),M(e.clientX,e.clientY,n,t)&&(N(i),A(a))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:I,onOk:function(){var e=w.current.getData();j.current.setValue(e),d(e),T(!1)},onCancel:function(){T(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(o.Z,{value:g,ref:w,onChange:d,showSaveButton:!1})})]})}));n.Z=d},48637:function(e,n,t){"use strict";t.d(n,{t:function(){return Y}});var i=t(39647),a=t.n(i),r=t(91232),l=t.n(r),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(79800),h=t.n(u),m=t(59301),p=t(8772),f=t(78241),g=t(43418),v=t(95237),x=t(43604),j=t(97913),w=t(57809),y=t(5112),b=t(36017),_=t(7880),N=t(5547),k=t(7557),C=t.n(k),Z=t(41498),A=t.n(Z),S=t(8591),B=t(3113),I=t(71418),T=t(24334),P="result___UYRo8",M="left___TRaH5",E="right___twp9s",L="box___vwndt",D="li___hRe2d",O=t(51136),R=t(76039),F=t(11094),W=t(56102),G=t(42541),z=t(37712),H=function(e){var n=e.buttonProps,t=e.buttonText,i=e.form,a=e.hackIdentifier,r=void 0===a?"":a,l=e.answerKey,o=e.data,s=(0,m.useState)(!1),c=h()(s,2),u=c[0],f=c[1],v=(0,m.useState)(!1),x=h()(v,2),j=x[0],w=x[1],y=(0,m.useState)(!1),b=h()(y,2),_=b[0],N=b[1],k=(0,m.useState)({}),Z=h()(k,2),H=Z[0],q=Z[1],U=(0,m.useState)(""),V=h()(U,2),K=V[0],J=V[1],Q=(0,m.useState)(""),Y=h()(Q,2),X=Y[0],$=Y[1],ee=(0,m.useRef)(r),ne=(0,m.useRef)(""),te=(0,m.useRef)(!1);(0,m.useEffect)((function(){_&&le()}),[_]),(0,m.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]);var ie=function(){return(new Date).getTime()},ae=null==o?void 0:o.code,re=function(){var e,n,t=ae?null==o?void 0:o.code:null===(e=i.getFieldValue("hack_codes"))||void 0===e?void 0:e.code,a=ae?null==o?void 0:o.answer_content:i.getFieldValue(l),r=ae?null==o?void 0:o.input:null===(n=i.getFieldValue("hack_sets"))||void 0===n?void 0:n.input;null==a||a.forEach((function(e){var n=e.value||e.answer_text||"";t=t.replace(/(@▁@|@▁▁@)/,n)})),$(r),J(t),q({}),N(!0)},le=function(){var e=A()(C()().mark((function e(){var n,t,a,r,l,s,c,u;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=function(){return u=A()(C()().mark((function e(){var n,t,i,a,o;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,R.rX)(ne.current,"submit");case 2:if(n=e.sent,t=n.status,i=n.data,a=ie(),o=a-r>1e3*(l+3)*s,te.current){e.next=9;break}return e.abrupt("return");case 9:if(!o){e.next=13;break}return S.ZP.error("调试代码超时"),f(!1),e.abrupt("return");case 13:if(0!==t){e.next=17;break}return f(!1),q(d()(d()({},i),{},{showText:!0})),e.abrupt("return");case 17:setTimeout(c,1e3);case 18:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)},c=function(){return u.apply(this,arguments)},r=ie(),l=ae?null==o?void 0:o.time_limit:null===(n=i.getFieldsValue())||void 0===n?void 0:n.hack.time_limit,s=ae?null==o||null===(t=o.answer_content)||void 0===t?void 0:t.length:null===(a=i.getFieldsValue())||void 0===a||null===(a=a.standard_answers)||void 0===a?void 0:a.length,f(!0),e.next=8,(0,R.bM)(ne.current,{test_hack_code:K,test_input:X});case 8:c();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=A()(C()().mark((function e(){var n,t,a,r,l,s,c,u;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=25;break}return e.prev=1,e.next=4,i.validateFields();case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),null!==e.t0&&void 0!==e.t0&&null!==(n=e.t0.errorFields)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&null!==(n=n.name)&&void 0!==n&&n.includes("standard_answers")?S.ZP.error("填空项答案不能为空"):S.ZP.error(e.t0.errorFields[0].errors[0]),i.scrollToField(e.t0.errorFields[0].name,{behavior:"smooth",block:"center"}),e.abrupt("return");case 11:if(w(!0),t="",a=i.getFieldsValue(),ee.current){e.next=22;break}return e.next=17,(0,O.ZP)("/api/problems.json",{method:"post",body:d()(d()({},a),{},{hack:d()(d()({},null==a?void 0:a.hack),{},{sub_discipline_id:null==a||null===(r=a.hack)||void 0===r||null===(r=r.sub_discipline_id)||void 0===r?void 0:r[1],difficult:a.difficulty,item_banks_group_id:a.item_banks_group_id}),hack_codes:d()(d()({},a.hack_codes),{},{code:T.Base64.encode(a.hack_codes.code)}),hack_sets:[d()({},a.hack_sets)],is_blank:!0})});case 17:t=e.sent,ee.current=null===(l=t)||void 0===l?void 0:l.identifier,sessionStorage.projectFill=null===(s=t)||void 0===s?void 0:s.identifier,e.next=25;break;case 22:return e.next=24,(0,O.ZP)("/api/problems/".concat(ee.current,".json"),{method:"put",body:d()(d()({},a),{},{hack:d()(d()({},null==a?void 0:a.hack),{},{sub_discipline_id:null==a||null===(c=a.hack)||void 0===c||null===(c=c.sub_discipline_id)||void 0===c?void 0:c[1],difficult:a.difficulty,item_banks_group_id:a.item_banks_group_id}),hack_codes:d()(d()({},a.hack_codes),{},{code:T.Base64.encode(a.hack_codes.code)}),update_hack_sets:[d()({},a.hack_sets)],is_blank:!0})});case 24:t=e.sent;case 25:return e.next=27,(0,O.ZP)("/api/problems/".concat(ee.current,"/start.json"),{method:"get"});case 27:if(0!==(null==(u=e.sent)?void 0:u.status)){e.next=34;break}return ne.current=null==u?void 0:u.identifier,te.current=!0,w(!1),re(),e.abrupt("return");case 34:w(!1);case 35:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();return(0,z.jsxs)("div",{children:[(0,z.jsx)(B.ZP,d()(d()({loading:j},n),{},{onClick:oe,children:t})),(0,z.jsx)(g.Z,{open:_,title:"调试代码",destroyOnClose:!0,width:1200,okText:"运行测试",confirmLoading:u,cancelButtonProps:{style:{display:"none"}},onOk:function(){return le()},onCancel:function(){te.current=!1,N(!1)},children:(0,z.jsxs)("div",{className:P,children:[(0,z.jsxs)("div",{className:M,children:[(0,z.jsxs)("div",{className:"mb20",children:[(0,z.jsx)("span",{className:"c-black",children:"执行代码"}),!o&&(0,z.jsx)(W.CopyToClipboard,{text:K,onCopy:function(){return S.ZP.success("复制成功")},children:(0,z.jsxs)("span",{style:{float:"right"},className:"current c-light-primary",children:[(0,z.jsx)("i",{className:"iconfont icon-fuzhi8 mr5"}),"复制"]})})]}),(0,z.jsx)(F.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:K,onChange:function(e){return J(e)}})]}),(0,z.jsxs)("div",{className:E,children:[(0,z.jsx)("div",{className:"c-black mb20",children:"自定义测试用例"}),(0,z.jsx)("div",{className:L,children:(0,z.jsx)("div",{className:D,children:(0,z.jsx)(p.Z.TextArea,{placeholder:"请输入",value:X,onChange:function(e){return $(e.target.value)},bordered:!1,style:{height:180}})})}),(0,z.jsx)("div",{className:"c-black mb20 mt30",children:"代码执行结果"}),(0,z.jsx)("div",{className:L,children:(0,z.jsx)(I.Z,{spinning:u,tip:"代码执行中",children:(0,z.jsx)("div",{className:D,style:{height:196,overflow:"auto",padding:10},children:function(e){var n=e.status,t=e.error_msg,i=e.execute_time,a=e.output,r=e.input,l=e.expected_output,o=null;switch(n){case G.h.OK:o=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,z.jsx)("p",{children:"执行结果:调试通过"})]});break;case G.h.NOMATCH:o=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{children:"输入:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:r}),(0,z.jsx)("div",{children:"输出:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:a&&T.Base64.decode(a)}),(0,z.jsx)("div",{children:"预期输出:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:l&&T.Base64.decode(l)})]});break;case G.h.EXECUTEFAILURE:case G.h.COMPILEFAILURE:o=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("p",{children:["最后执行的输入:",(0,z.jsx)("pre",{children:r})]}),(0,z.jsx)("p",{children:"执行出错信息:"}),(0,z.jsx)("pre",{className:"error",children:T.Base64.decode(t)})]});break;case G.h.PODFAILURE:o=(0,z.jsx)("p",{children:"创建pod失败请稍后重试"});break;case G.h.TIMEOUT:o=(0,z.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,z.jsxs)(z.Fragment,{children:[" ",o," "]})}(H)})})})]})]})})]})},q=t(23717),U=["key","name"],V=p.Z.TextArea,K=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}],J="@▁@",Q="@▁▁@",Y=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,r=void 0!==i&&i,o=e.hackidentifier,c=e.answerKey,u=(0,m.useState)(!1),k=h()(u,2),C=k[0],Z=k[1],A=(0,m.useState)(!1),S=h()(A,2),B=(S[0],S[1],(0,_.useParams)().type,function(e,n){for(var t=n.line,i=0,a=0;a<t;a++)i+=e.getLine(a).split(J).length-1;for(var r=0;r<t;r++)i+=e.getLine(r).split(Q).length-1;var l=e.getLine(t).substring(0,n.ch);return i+=l.split(J).length-1,i+=l.split(Q).length-1}),I=function(){var e=t.getFieldValue(c);t.setFieldsValue(s()({},c,null==e?void 0:e.map((function(e,n){return d()(d()({},e),{},{position:n+1})}))))},T=(0,m.useRef)(),P=function(e,n){for(var t=0;t<e;t++)T.current({position:null,answer_text:""},n+t);I()},M=(0,m.useRef)(),E=function(e){M.current(e),I()},L=f.Z.useWatch(c,t);return(0,z.jsxs)("div",{className:N.Z.wrap,children:[(0,z.jsx)(f.Z.Item,{label:"试题描述",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}],children:(0,z.jsx)(b.h,{scrollId:"name",watch:!0,height:140})}),(0,z.jsx)("div",{className:N.Z.questionTitleEditorWrap,children:(0,z.jsx)(f.Z.Item,{label:"程序代码",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}],children:(0,z.jsx)(b.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:function(e,n){var i=t.getFieldValue(c);console.log("--preAnswerData",i,n),t.setFieldsValue(s()({},c,null==i?void 0:i.map((function(e,t){var i;return d()(d()({},e),{},{position:t+1,multi_line:null==n||null===(i=n[t])||void 0===i?void 0:i.multiLine})}))))},placeholder:n,onCMBeforeChange:function(e,n){!function(e,n,t,i){var a=e.getRange(n.from,n.to),r=0;if(n.text.forEach((function(e){r+=e.split(J).length-1})),n.text.forEach((function(e){r+=e.split(Q).length-1})),"setValue"!==n.origin)if(!a||-1===a.indexOf(J)&&-1===a.indexOf(Q)){if(r>0){var l=B(e,n.from);console.log("新增".concat(r,"个,之前有").concat(l,"个")),t(r,l)}}else{var o=a.split(J).length-1+a.split(Q).length-1,s=B(e,n.from);console.log("删除".concat(o,"个, 前面有").concat(s,"个,新增").concat(r,"个")),i(o>1?Array.from({length:o},(function(e,n){return s+n})):s)}}(e,n,P,E)}})})}),(0,z.jsx)(f.Z.List,{name:c,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("答案不能为空"));var t,i=l()(n);try{for(i.s();!(t=i.n()).done;){var a=(t.value||{}).answer_text;if(0===(null==a?void 0:a.length))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,l=n.remove;t.errors;return T.current=i,M.current=l,(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,z.jsx)(f.Z.Item,{label:"填空项答案",required:!0,labelCol:{span:24}}),(0,z.jsxs)("div",{onClick:function(){g.Z.warning({title:"给分说明",icon:null,width:700,centered:!0,content:(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{children:["1.学生填写答案之后,必须提交代码",(0,z.jsx)("span",{style:{color:"#e30000"},children:"进行评测"}),"才能得分。"]}),(0,z.jsx)("div",{style:{marginTop:10},children:"2.试题算分时系统会将程序里面的所有空替换成学生的答案进行评测。输出的结果与测试集比对完全正确则得满分若不完全正确则依次将每个空换成学生提交的答案同时将其他空替换成标准答案运行程序。如果这个空的学生答案与标准答案结合能得到正确输出则这个空得到该空的满分否则该空得0分。"})]})})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"},children:[(0,z.jsx)(q.Z,{style:{marginRight:3,color:"#3061D0"}}),(0,z.jsx)("span",{children:" 给分说明"})]})]}),e.map((function(e,n){var t,i,l=e.key,o=e.name,s=a()(e,U);return(0,z.jsxs)(v.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,z.jsxs)(x.Z,{flex:"0 0 auto",className:"".concat(N.Z.blankIndex),children:["填空项",n+1]}),(0,z.jsx)(x.Z,{flex:1,children:(0,z.jsxs)(v.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,z.jsx)(x.Z,{children:(0,z.jsx)(f.Z.Item,d()(d()({},s),{},{name:[o,"answer_text"],noStyle:!0,children:null!=L&&null!==(t=L[o])&&void 0!==t&&t.multi_line||null!=L&&null!==(i=L[o])&&void 0!==i&&i.multiLine?(0,z.jsx)(V,{spellCheck:!1,style:{marginLeft:10,width:550}}):(0,z.jsx)(p.Z,{style:{marginLeft:10,width:550},className:N.Z.blankInput,size:"large",maxLength:1e3,onBlur:function(e){}})}))}),r&&(0,z.jsx)(x.Z,{flex:"224px",children:(0,z.jsx)(f.Z.Item,d()(d()({},s),{},{name:[o,"score"],label:"分值",rules:[{required:!0}],children:(0,z.jsx)(j.Z,{size:"large",className:N.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]})})]},l)}))]})}}),(0,z.jsx)("div",{onClick:function(){return Z(!0)},children:(0,z.jsx)(f.Z.Item,{name:["hack","analysis"],label:"题目解析",labelCol:{span:24},children:(0,z.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:C})})}),(0,z.jsx)(f.Z.Item,{label:"编程语言",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"请选择编程语言"}],children:(0,z.jsx)(w.default,{size:"large",children:K.map((function(e){return(0,z.jsxs)(w.default.Option,{value:e.key,children:[" ",e.title]},e.title)}))})}),(0,z.jsxs)(f.Z.Item,{label:"最大评测时长(秒)",style:{marginTop:30},labelCol:{span:24},required:!0,children:[(0,z.jsx)(f.Z.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"请输入单个测试集评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],noStyle:!0,children:(0,z.jsx)(j.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})}),(0,z.jsx)("span",{className:"ml10 font14",children:"秒"})]}),(0,z.jsx)(f.Z.Item,{label:"学生答案的空格处理方式",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"请选择学生答案的空格处理方式"}],children:(0,z.jsxs)(y.ZP.Group,{style:{marginTop:-10},children:[(0,z.jsx)(y.ZP,{value:0,children:"不忽略空格"}),(0,z.jsx)(y.ZP,{value:1,children:"忽略首尾空格"}),(0,z.jsx)(y.ZP,{value:2,children:"忽略所有空格"})]})}),(0,z.jsx)(f.Z.Item,{label:"测试用例",required:!0,style:{marginTop:30}}),(0,z.jsxs)("div",{style:{background:"#F6F7F9",padding:15},children:[(0,z.jsx)(f.Z.Item,{label:"输入",labelCol:{span:24},name:["hack_sets","input"],children:(0,z.jsx)(V,{rows:4})}),(0,z.jsx)(f.Z.Item,{label:"输出",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"请输入输出内容"}],children:(0,z.jsx)(V,{rows:4})})]}),(0,z.jsx)(H,{form:t,answerKey:c,hackIdentifier:o,buttonText:"运行调试",buttonProps:{ghost:!0,icon:(0,z.jsx)("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}})]})}},5309:function(e,n,t){"use strict";t.d(n,{u:function(){return N}});var i=t(39647),a=t.n(i),r=t(79800),l=t.n(r),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(59301),h=t(95237),m=t(43604),p=t(6848),f=t(78241),g=t(5547),v=t(88996),x=t(12101),j=t(36017),w=t(37712),y=["key","name"],b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,a=e.answerKey,r=e.index,l=e.isEdit,o=e.setInputActive,c=e.form,u=e.choiceOptionsPath,f=e.allowChangeMode,y=e.showAddIcon,_=e.addItem,N=e.deleteItem;console.log(n,"value");var k=1===(null==n?void 0:n[a]),C=function(){var e;k?t(d()(d()({},n),{},s()({},a,0))):(f||(e=c.getFieldValue(u),c.setFieldValue(u,e.map((function(e){return d()(d()({},e),{},s()({},a,0))})))),t(d()(d()({},n),{},s()({},a,1))))};return(0,w.jsxs)(h.Z,{className:g.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,w.jsx)(m.Z,{onClick:C,className:"".concat(g.Z.choiceIndex," ").concat(k?g.Z.activeAnswer:""),children:b[r]}),(0,w.jsx)(m.Z,{flex:1,className:"".concat(g.Z.editorWrap," ml15"),onClick:o,children:(0,w.jsx)(j.x,{height:155,placeholder:"请您输入选项",isEdit:l,value:null==n?void 0:n[i],onChange:function(e){t(d()(d()({},n),{},s()({},i,e)))}})}),(0,w.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,w.jsx)("div",{onClick:C,className:"".concat(g.Z.setAnswerBtn," ").concat(k?g.Z.activeAnswer:""),children:k?"正确答案":"设为答案"})}),(0,w.jsxs)(m.Z,{className:g.Z.actionWrapper,children:[(0,w.jsx)(p.Z,{title:"新增参考答案",children:(0,w.jsx)(v.Z,{className:g.Z.addIcon,onClick:_,style:{visibility:y?"visible":"hidden"}})}),(0,w.jsx)(p.Z,{title:"删除",children:(0,w.jsx)(x.Z,{className:g.Z.deleteIcon,onClick:N,style:{visibility:r>1?"visible":"hidden"}})})]})]})},N=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,r=e.analysisKey,o=e.choiceTextKey,c=e.answerKey,h=e.choiceOptionsPath,m=e.allowChangeMode,p=void 0===m||m,v=e.form,x=e.showAnalysis,N=void 0===x||x,k=(0,u.useState)(),C=l()(k,2),Z=C[0],A=C[1],S=(0,u.useState)(!1),B=l()(S,2),I=B[0],T=B[1];return(0,w.jsxs)("div",{className:g.Z.wrap,children:[(0,w.jsx)("div",{className:g.Z.questionTitleEditorWrap,children:(0,w.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,w.jsx)(j.h,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,w.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,w.jsx)(f.Z.List,{name:i,rules:[{validator:function(e,n){var t=n.some((function(e){return 1===e[c]})),i=n.findIndex((function(e){var n;return(null===(n=e[o])||void 0===n?void 0:n.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(b[i],"选项的内容"))):t?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,n){var t=n.add,i=n.remove;return(0,w.jsxs)("div",{id:Array.isArray(h)?h.join("_"):"".concat(h),children:[e.map((function(n,r){var l=n.key,m=n.name,x=a()(n,y),j=Z===l,N=r<7&&r===e.length-1;return(0,u.createElement)(f.Z.Item,d()(d()({},x),{},{key:l,name:m,className:g.Z.choiceListWrap,rules:[{validator:function(e,n){return null!=n&&n.choice_text?Promise.resolve():Promise.reject(new Error("请先输入".concat(b[r],"选项的内容")))}}]}),(0,w.jsx)(_,{choiceTextKey:o,answerKey:c,index:r,isEdit:j,setInputActive:function(){A(l)},form:v,choiceOptionsPath:h,allowChangeMode:p,showAddIcon:N,addItem:function(){return t(s()(s()({},o,""),c,0))},deleteItem:function(){return i(m)}}))})),e.length<8&&(0,w.jsx)("div",{className:"".concat(g.Z.addBtn," mb30"),onClick:function(){return t(s()(s()({},o,""),c,0))},children:"添加选项"})]})}}),N&&(0,w.jsx)("div",{onClick:function(){return T(!0)},children:(0,w.jsx)(f.Z.Item,{name:r,label:"题目解析",labelCol:{span:24},children:(0,w.jsx)(j.x,{placeholder:"请编辑题目解析(非必填)",isEdit:I})})})]})}},56763:function(e,n,t){"use strict";t.d(n,{u:function(){return L}});var i=t(39647),a=t.n(i),r=t(91232),l=t.n(r),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(79800),h=t.n(u),m=t(37205),p=t.n(m),f=t(59301),g=t(43418),v=t(95237),x=t(43604),j=t(8772),w=t(6848),y=t(78673),b=t(78241),_=t(5112),N=t(97913),k=t(36017),C=t(12101),Z=t(64259),A=t(5547),S=t(30347),B=t(37712),I=["key","name"],T=function(e){var n=e.value,t=e.onChange;return(0,B.jsxs)(v.Z,{className:"ml20",children:[(0,B.jsx)(x.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,B.jsxs)(v.Z,{className:"mb20",children:[(0,B.jsx)(j.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var a=p()(n),r=e.target.value.trim();a[i]=r,t(a)}}),(0,B.jsx)(w.Z,{title:"删除",children:(0,B.jsx)(C.Z,{className:A.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){g.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:A.Z.modal,onOk:function(){var i=p()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,B.jsx)(x.Z,{children:(0,B.jsx)("div",{className:"".concat(A.Z.addBtn),onClick:function(){var e;(e=p()(n)).push(""),t(e)},children:"新增答案"})})]})},P=function(e){var n=e.value,t=e.onChange;return(0,B.jsxs)(v.Z,{className:"ml20",children:[(0,B.jsx)(x.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,B.jsxs)(v.Z,{align:"middle",className:"mb20",children:[(0,B.jsx)(S.Z,{value:e,style:{flex:1},onChange:function(e){var a=p()(n);a[i]=e,t(a)}}),(0,B.jsx)(w.Z,{title:"删除",children:(0,B.jsx)(C.Z,{className:A.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){g.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:A.Z.modal,onOk:function(){var i=p()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,B.jsx)(x.Z,{children:(0,B.jsx)("div",{className:"".concat(A.Z.addBtn),onClick:function(){var e;(e=p()(n)).push(""),t(e)},children:"新增答案"})})]})},M=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,B.jsx)(y.Z,{checked:!t,onChange:function(e){i(!e)}})},E="▁",L=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,r=void 0!==i&&i,o=e.answerKey,c=(0,f.useState)(!1),u=h()(c,2),m=u[0],p=u[1],g=function(e,n){for(var t=n.line,i=0,a=0;a<t;a++)i+=e.getLine(a).split(E).length-1;return i+=e.getLine(t).substring(0,n.ch).split(E).length-1},C=function(){var e=t.getFieldValue(o);t.setFieldsValue(s()({},o,e.map((function(e,n){return d()(d()({},e),{},{position:n+1})}))))},S=(0,f.useRef)(),L=function(e,n){for(var t=0;t<e;t++)S.current({position:null,answer_text:[""],model:1},n+t);C()},D=(0,f.useRef)(),O=function(e){D.current(e),C()},R=b.Z.useWatch(o,t);return(0,B.jsxs)("div",{className:A.Z.wrap,children:[(0,B.jsx)("div",{className:A.Z.questionTitleEditorWrap,children:(0,B.jsx)(b.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,B.jsx)(k.h,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var a=e.getRange(n.from,n.to),r=0;if(n.text.forEach((function(e){r+=e.split(E).length-1})),"setValue"!==n.origin)if(a&&-1!==a.indexOf(E)){var l=a.split(E).length-1,o=g(e,n.from);console.log("删除".concat(l,"个, 前面有").concat(o,"个,新增").concat(r,"个")),i(l>1?Array.from({length:l},(function(e,n){return o+n})):o)}else if(r>0){var s=g(e,n.from);console.log("新增".concat(r,"个,之前有").concat(s,"个")),t(r,s)}}(e,n,L,O)}})})}),(0,B.jsx)(b.Z.List,{name:o,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=l()(n);try{for(i.s();!(t=i.n()).done;){var a=(t.value||{}).answer_text;if(null!=a&&a.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,i){var l=n.add,c=n.remove;i.errors;return S.current=l,D.current=c,(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(b.Z.Item,{label:(0,B.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,B.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var i,l=e.key,c=e.name,u=a()(e,I);return(0,B.jsxs)("div",{style:{marginBottom:10},children:[(0,B.jsxs)(v.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,B.jsxs)(x.Z,{style:{marginRight:10},flex:"0 0 auto",className:"".concat(A.Z.blankIndex),children:["填空项",n+1]}),(0,B.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"model"],noStyle:!0,children:(0,B.jsxs)(_.ZP.Group,{onChange:function(){var e=t.getFieldValue(o);t.setFieldsValue(s()({},o,e.map((function(e,n){return d()(d()({},e),{},{answer_text:c===n?[""]:e.answer_text})}))))},children:[(0,B.jsxs)(_.ZP,{value:1,children:["文本模式 ",(0,B.jsx)(w.Z,{title:"学生答题时,需要在文本框中填写文本答案",children:(0,B.jsx)(Z.Z,{})})]}),(0,B.jsxs)(_.ZP,{value:2,children:["数学公式模式 ",(0,B.jsx)(w.Z,{title:"学生答题时,需要编写数学公式作为答案",children:(0,B.jsx)(Z.Z,{})})]})]})}))]}),(0,B.jsx)(v.Z,{style:{marginLeft:20},align:"middle",wrap:!1,children:(0,B.jsxs)(x.Z,{flex:1,children:[(0,B.jsxs)(v.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,B.jsx)(x.Z,{flex:1,children:(0,B.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"answer_text"],noStyle:!0,children:1===(null===(i=t.getFieldValue(o))||void 0===i||null===(i=i[c])||void 0===i?void 0:i.model)?(0,B.jsx)(T,{}):(0,B.jsx)(P,{})}))}),r&&(0,B.jsx)(x.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"},children:(0,B.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"score"],label:"分值",rules:[{required:!0}],className:A.Z.blankInputNumberWrapper,children:(0,B.jsx)(N.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,B.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"position"],noStyle:!0,children:(0,B.jsx)(j.Z,{type:"hidden"})}))]})})]},l)}))]})}}),(0,B.jsxs)(v.Z,{align:"middle",children:[(0,B.jsx)(b.Z.Item,{name:"downcase",valuePropName:"checked",children:(0,B.jsx)(y.Z,{})}),(0,B.jsx)(x.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,B.jsxs)(v.Z,{align:"middle",children:[(0,B.jsx)(b.Z.Item,{name:"no_space",valuePropName:"checked",children:(0,B.jsx)(y.Z,{})}),(0,B.jsx)(x.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==R?void 0:R.length)>1&&(0,B.jsxs)(v.Z,{align:"middle",className:(null==R?void 0:R.length)>1?"mb30":"".concat(A.Z.hide),children:[(0,B.jsx)(b.Z.Item,{name:"is_ordered",children:(0,B.jsx)(M,{})}),(0,B.jsx)(x.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,B.jsx)("div",{onClick:function(){return p(!0)},children:(0,B.jsx)(b.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,B.jsx)(k.x,{placeholder:"请编辑题目解析(非必填)",isEdit:m})})})]})}},99041:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(39647),a=t.n(i),r=t(79800),l=t.n(r),o=t(82242),s=t.n(o),c=t(85573),d=t.n(c),u=t(59301),h=t(95237),m=t(43604),p=t(78241),f=t(5547),g=t(36017),v=t(37712),x=["key","name"],j=d()(d()({},"正确","T"),"错误","F"),w=function(e){var n=e.value,t=e.onChange,i=e.form,a=1===(null==n?void 0:n.is_answer),r=null==n?void 0:n.choice_text,l=function(){var e=i.getFieldsValue().choices.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));i.setFieldsValue({choices:e}),t(s()(s()({},n),{},{is_answer:1}))};return(0,v.jsxs)(h.Z,{className:f.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"},children:[(0,v.jsx)(m.Z,{onClick:l,className:"".concat(f.Z.choiceIndex," ").concat(f.Z.judgementIndex," ").concat(a?f.Z.activeAnswer:""),children:j[r]}),(0,v.jsx)(m.Z,{flex:1,className:"".concat(f.Z.editorWrap," ml15"),children:(0,v.jsx)("div",{className:"".concat(f.Z.inputBorder," ").concat(f.Z.placeholder," ").concat(a?f.Z.activeJudgementAnswer:""),children:r})}),(0,v.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,v.jsx)("div",{onClick:l,className:"".concat(f.Z.setAnswerBtn," ").concat(a?f.Z.activeAnswer:""),children:a?"正确答案":"设为答案"})})]})},y=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=(0,u.useState)(!1),r=l()(i,2),o=r[0],c=r[1];return(0,v.jsxs)("div",{className:f.Z.wrap,children:[(0,v.jsx)("div",{className:f.Z.questionTitleEditorWrap,children:(0,v.jsx)(p.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,v.jsx)(g.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,v.jsx)(p.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,v.jsx)(p.Z.List,{name:"choices",rules:[{validator:function(e,n){return n.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,v.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,i=e.name,r=a()(e,x);return(0,u.createElement)(p.Z.Item,s()(s()({},r),{},{key:n,name:i,noStyle:!0}),(0,v.jsx)(w,{form:t}))}))})}})}),(0,v.jsx)("div",{onClick:function(){return c(!0)},children:(0,v.jsx)(p.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,v.jsx)(g.x,{placeholder:"请编辑题目解析(非必填)",isEdit:o})})})]})}},36017:function(e,n,t){"use strict";t.d(n,{h:function(){return h},x:function(){return m}});var i=t(82242),a=t.n(i),r=t(39647),l=t.n(r),o=t(11094),s=t(5547),c=t(42783),d=t(37712),u=["value","onChange","scrollId"],h=function(e){var n=e.value,t=e.onChange,i=e.scrollId,r=l()(e,u);return(0,d.jsx)("div",{id:i||"",children:(0,d.jsx)(o.Z,a()(a()({},r),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},m=function(e){var n=e.value,t=e.onChange,i=e.placeholder,a=e.height,r=void 0===a?140:a;return e.isEdit?(0,d.jsx)(o.Z,{watch:!0,isFocus:!0,height:r,placeholder:i,defaultValue:n,onChange:t}):(0,d.jsx)("div",{style:{cursor:"pointer"},children:n?(0,d.jsx)(c.Z,{className:s.Z.inputBorder,value:n}):(0,d.jsx)("div",{className:"".concat(s.Z.inputBorder," ").concat(s.Z.placeholder," inputBorderError"),children:i})})}},42230:function(e,n,t){"use strict";t.d(n,{W:function(){return B}});var i=t(91232),a=t.n(i),r=t(79800),l=t.n(r),o=t(82242),s=t.n(o),c=t(39647),d=t.n(c),u=t(59301),h=t(8591),m=t(12563),p=t(78241),f=t(78673),g=t(95237),v=t(43604),x=t(6848),j=t(8772),w=t(97913),y=t(5547),b=t(36017),_=t(11094),N=t(64259),k=t(37712),C=["value","onChange"],Z=["key","name"],A=function(e){var n=e.value,t=e.onChange,i=d()(e,C);return(0,k.jsx)(_.Z,s()(s()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},S=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,k.jsx)(m.Z,{closable:!0,onClose:i,className:y.Z.keywordTag,children:(0,k.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},B=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,r=e.isMustKeyWords,o=void 0===r?i:r,c=(0,u.useState)(!1),m=l()(c,2),_=m[0],C=m[1],B=(0,u.useState)(""),I=l()(B,2),T=I[0],P=I[1],M=p.Z.useWatch("use_keywords",t),E=p.Z.useWatch("question_score",t);return(0,k.jsxs)("div",{className:y.Z.wrap,children:[(0,k.jsx)("div",{className:y.Z.questionTitleEditorWrap,children:(0,k.jsx)(p.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,k.jsx)(b.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,k.jsx)(p.Z.Item,{label:"参考答案",name:"answer_texts",labelCol:{span:24},children:(0,k.jsx)(A,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!o&&(0,k.jsx)(p.Z.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked",children:(0,k.jsx)(f.Z,{defaultChecked:!0})}),i&&o&&(0,k.jsxs)(g.Z,{align:"middle",className:"mb30",children:[(0,k.jsx)(p.Z.Item,{name:"use_keywords",valuePropName:"checked",children:(0,k.jsx)(f.Z,{})}),(0,k.jsx)(v.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,k.jsx)(v.Z,{children:(0,k.jsx)(x.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,k.jsx)(N.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(M||!o)&&(0,k.jsx)(p.Z.List,{name:"keywords",rules:[{validator:function(e,n){return o?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(E)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var i=n.add,r=n.remove;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{className:"".concat(y.Z.title," mb10"),children:o?"关键词":(0,k.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,k.jsxs)(g.Z,{align:"middle",className:"font14 mb30",children:[(0,k.jsx)(v.Z,{flex:1,children:(0,k.jsx)(j.Z,{value:T,onChange:function(e){P(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,r,l,o,s="".concat(null===(n=e.target)||void 0===n?void 0:n.value),c=null==s||null===(r=s.split("|"))||void 0===r||null===(r=r.filter((function(e){return!!e})))||void 0===r?void 0:r.map((function(e){return null==e?void 0:e.trim()})),d=t.getFieldValue("keywords"),u=(null==d||null===(l=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===l?void 0:l.flat())||[],m=a()(c);try{for(m.s();!(o=m.n()).done;){var p=o.value;if(u.includes(p))return void h.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){m.e(e)}finally{m.f()}(function(e){if(!e)return!1;if(!/^s*$/.test(e)&&""!==e.trim())return new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==e||(h.ZP.warning("关键词不能只输入一个“|”字符!"),!1);h.ZP.warning("关键词不能全为空格")})(s)&&(i({keyword:c,score:1}),P(""))},className:y.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,k.jsx)(v.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,i=d()(e,Z);return(0,k.jsx)(g.Z,{className:"mb20",style:{marginRight:148},children:(0,k.jsx)(v.Z,{flex:1,children:(0,k.jsxs)(g.Z,{align:"middle",justify:"space-between",children:[(0,k.jsx)(p.Z.Item,s()(s()({},i),{},{name:[t,"keyword"],children:(0,k.jsx)(S,{onClose:function(){return r(t)}})})),o&&(0,k.jsx)(p.Z.Item,s()(s()({},i),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:y.Z.blankInputNumberWrapper,children:(0,k.jsx)(w.Z,{className:y.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,k.jsx)("div",{onClick:function(){return C(!0)},children:(0,k.jsx)(p.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,k.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:_})})})]})}},94057:function(e,n,t){"use strict";t.d(n,{tc:function(){return ne.t},uh:function(){return i.u},rL:function(){return ee},u8:function(){return r.u},ZZ:function(){return a.Z},Wk:function(){return l.W}});var i=t(5309),a=t(99041),r=t(56763),l=t(42230),o=t(37205),s=t.n(o),c=t(82242),d=t.n(c),u=t(39647),h=t.n(u),m=t(79800),p=t.n(m),f=t(59301),g=t(36381),v=t(78241),x=t(95237),j=t(97913),w=t(6848),y=t(38854),b=t(5547),_=t(12101),N=t(36017),k=t(91232),C=t.n(k),Z=t(43418),A=t(43604),S=t(8772),B=t(78673),I=t(37712),T=["key","name"],P=function(e){var n=e.value,t=e.onChange;return(0,I.jsxs)(x.Z,{className:"ml20",children:[(0,I.jsx)(A.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,I.jsxs)(x.Z,{align:"middle",className:"mb20",children:[(0,I.jsx)(S.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var a=s()(n),r=e.target.value.trim();a[i]=r,t(a)}}),(0,I.jsx)(w.Z,{title:"删除",children:(0,I.jsx)(_.Z,{className:b.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){Z.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:b.Z.modal,onOk:function(){var i=s()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,I.jsx)(A.Z,{children:(0,I.jsx)("div",{className:"".concat(b.Z.addBtn),onClick:function(){var e;(e=s()(n)).push(""),t(e)},children:"新增答案"})})]})},M=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,I.jsx)(B.Z,{checked:!t,onChange:function(e){i(!e)}})},E="▁",L=function(e){var n,t=e.questionTitlePlaceholder,i=e.form,a=e.name,r=e.scoreByBlank,l=void 0!==r&&r,o=e.answerKey,c=e.titleKey,u=void 0===c?"name":c,m=e.analysisKey,g=void 0===m?"analysis":m,w=e.isOrdered,y=void 0===w?"is_ordered":w,_=(0,f.useState)(!1),k=p()(_,2),Z=k[0],L=k[1],D=function(e,n){for(var t=n.line,i=0,a=0;a<t;a++)i+=e.getLine(a).split(E).length-1;return i+=e.getLine(t).substring(0,n.ch).split(E).length-1},O=function(){var e=i.getFieldValue(["sub_item_banks"].concat(s()(o)));i.setFieldValue(["sub_item_banks"].concat(s()(o)),null==e?void 0:e.map((function(e,n){return d()(d()({},e),{},{position:n+1})})))},R=(0,f.useRef)(),F=function(e,n){for(var t=0;t<e;t++)R.current({position:null,answer_text:[""]},n+t);O()},W=(0,f.useRef)(),G=function(e){W.current(e),O()},z=null===(n=i.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==o?void 0:o[0]])||void 0===n?void 0:n[null==o?void 0:o[1]];return(0,f.useEffect)((function(){console.log("========",i.getFieldsValue())}),[i]),(0,I.jsxs)("div",{className:b.Z.wrap,children:[(0,I.jsx)("div",{className:b.Z.questionTitleEditorWrap,children:(0,I.jsx)(v.Z.Item,{label:"题干",name:u,labelCol:{span:24},rules:[{required:!0}],children:(0,I.jsx)(N.h,{scrollId:"name",watch:!0,height:140,placeholder:t,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var a=e.getRange(n.from,n.to),r=0;if(n.text.forEach((function(e){r+=e.split(E).length-1})),"setValue"!==n.origin)if(a&&-1!==a.indexOf(E)){var l=a.split(E).length-1,o=D(e,n.from);console.log("删除".concat(l,"个, 前面有").concat(o,"个,新增").concat(r,"个")),i(l>1?Array.from({length:l},(function(e,n){return o+n})):o)}else if(r>0){var s=D(e,n.from);console.log("新增".concat(r,"个,之前有").concat(s,"个")),t(r,s)}}(e,n,F,G)}})})}),(0,I.jsx)(v.Z.List,{name:o,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=C()(n);try{for(i.s();!(t=i.n()).done;){var a=(t.value||{}).answer_text;if(null!=a&&a.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,a=n.remove;t.errors;return R.current=i,W.current=a,(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(v.Z.Item,{label:(0,I.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,I.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var t=e.key,i=e.name,a=h()(e,T);return(0,I.jsxs)(x.Z,{align:"top",children:[(0,I.jsxs)(A.Z,{className:"".concat(b.Z.blankIndex," pt5"),children:["填空项",n+1]}),(0,I.jsxs)(A.Z,{flex:1,children:[(0,I.jsxs)(x.Z,{align:"top",justify:"space-between",children:[(0,I.jsx)(A.Z,{flex:1,children:(0,I.jsx)(v.Z.Item,d()(d()({},a),{},{name:[i,"answer_text"],noStyle:!0,children:(0,I.jsx)(P,{})}))}),l&&(0,I.jsx)(A.Z,{flex:"224px",children:(0,I.jsx)(v.Z.Item,d()(d()({},a),{},{name:[i,"score"],label:"分值",rules:[{required:!0}],className:b.Z.blankInputNumberWrapper,children:(0,I.jsx)(j.Z,{className:b.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"按空给分请输入分值"})}))})]}),(0,I.jsx)(v.Z.Item,d()(d()({},a),{},{name:[i,"position"],noStyle:!0,children:(0,I.jsx)(S.Z,{type:"hidden"})}))]})]},t)}))]})}}),(0,I.jsxs)(x.Z,{align:"middle",children:[(0,I.jsx)(v.Z.Item,{name:[a,"downcase"],valuePropName:"checked",children:(0,I.jsx)(B.Z,{})}),(0,I.jsx)(A.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,I.jsxs)(x.Z,{align:"middle",children:[(0,I.jsx)(v.Z.Item,{name:[a,"no_space"],valuePropName:"checked",children:(0,I.jsx)(B.Z,{})}),(0,I.jsx)(A.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==z?void 0:z.length)>1&&(0,I.jsxs)(x.Z,{align:"middle",className:(null==z?void 0:z.length)>1?"mb30":"".concat(b.Z.hide),children:[(0,I.jsx)(v.Z.Item,{name:y,children:(0,I.jsx)(M,{})}),(0,I.jsx)(A.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,I.jsx)("div",{onClick:function(){return L(!0)},children:(0,I.jsx)(v.Z.Item,{name:g,label:"题目解析",labelCol:{span:24},children:(0,I.jsx)(N.x,{placeholder:"请编辑题目解析(非必填)",isEdit:Z})})})]})},D=t(85573),O=t.n(D),R=["key","name"],F=O()(O()({},"正确","T"),"错误","F"),W=function(e){var n=e.value,t=e.onChange,i=e.form,a=e.choiceKey,r=1===(null==n?void 0:n.is_answer),l=null==n?void 0:n.choice_text,o=function(){var e,r=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(s()(a))))||void 0===e?void 0:e.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));null==i||i.setFieldValue(["sub_item_banks"].concat(s()(a)),r),t(d()(d()({},n),{},{is_answer:1}))};return(0,I.jsxs)(x.Z,{className:b.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,I.jsx)(A.Z,{onClick:o,className:"".concat(b.Z.choiceIndex," ").concat(b.Z.judgementIndex," ").concat(r?b.Z.activeAnswer:""),children:F[l]}),(0,I.jsx)(A.Z,{flex:1,className:"".concat(b.Z.editorWrap," ml15"),children:(0,I.jsx)("div",{className:"".concat(b.Z.inputBorder," ").concat(b.Z.placeholder," ").concat(r?b.Z.activeJudgementAnswer:""),children:l})}),(0,I.jsx)(A.Z,{flex:"0 0 auto",className:"ml15",children:(0,I.jsx)("div",{onClick:o,className:"".concat(b.Z.setAnswerBtn," ").concat(r?b.Z.activeAnswer:""),children:r?"正确答案":"设为答案"})})]})},G=function(e){var n=e.questionTitlePlaceholder,t=e.choiceKey,i=void 0===t?"choices":t,a=e.form,r=e.titleKey,l=void 0===r?"name":r,o=e.analysisKey,s=void 0===o?"analysis":o,c=(0,f.useState)(!1),u=p()(c,2),m=u[0],g=u[1];return(0,I.jsxs)("div",{className:b.Z.wrap,children:[(0,I.jsx)("div",{className:b.Z.questionTitleEditorWrap,children:(0,I.jsx)(v.Z.Item,{label:"题干",name:l,labelCol:{span:24},rules:[{required:!0}],children:(0,I.jsx)(N.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,I.jsx)(v.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,I.jsx)(v.Z.List,{name:i,rules:[{validator:function(e,n){return n.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,I.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,t=e.name,r=h()(e,R);return(0,f.createElement)(v.Z.Item,d()(d()({},r),{},{key:n,name:t,noStyle:!0}),(0,I.jsx)(W,{form:a,choiceKey:i}))}))})}})}),(0,I.jsx)("div",{onClick:function(){return g(!0)},children:(0,I.jsx)(v.Z.Item,{name:s,label:"题目解析",labelCol:{span:24},children:(0,I.jsx)(N.x,{placeholder:"请编辑题目解析(非必填)",isEdit:m})})})]})},z=t(8591),H=t(12563),q=t(11094),U=t(64259),V=["value","onChange"],K=["key","name"],J=function(e){var n=e.value,t=e.onChange,i=h()(e,V);return(0,I.jsx)(q.Z,d()(d()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},Q=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,I.jsx)(H.Z,{closable:!0,onClose:i,className:b.Z.keywordTag,children:(0,I.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},Y=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,a=e.isMustKeyWords,r=void 0===a?i:a,l=e.titleKey,o=void 0===l?"name":l,c=e.analysisKey,u=void 0===c?"analysis":c,m=e.answerTexts,g=void 0===m?"answer_texts":m,y=e.keywords,_=void 0===y?"keywords":y,k=e.useKeywords,Z=void 0===k?"use_keywords":k,T=e.indexs,P=(0,f.useState)(!1),M=p()(P,2),E=M[0],L=M[1],D=(0,f.useState)(""),O=p()(D,2),R=O[0],F=O[1],W=(0,f.useState)(!1),G=p()(W,2),H=G[0],q=G[1],V=v.Z.useWatch("question_score",t);return(0,I.jsxs)("div",{className:b.Z.wrap,children:[(0,I.jsx)("div",{className:b.Z.questionTitleEditorWrap,children:(0,I.jsx)(v.Z.Item,{label:"题干",name:o,labelCol:{span:24},rules:[{required:!0}],children:(0,I.jsx)(N.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,I.jsx)(v.Z.Item,{label:"参考答案",name:g,labelCol:{span:24},children:(0,I.jsx)(J,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!r&&(0,I.jsx)(v.Z.Item,{hidden:!0,name:Z,valuePropName:"checked",children:(0,I.jsx)(B.Z,{defaultChecked:!0})}),i&&r&&(0,I.jsxs)(x.Z,{align:"middle",className:"mb30",children:[(0,I.jsx)(v.Z.Item,{name:Z,valuePropName:"checked",children:(0,I.jsx)(B.Z,{onChange:function(){var e,n;console.log(t.getFieldsValue()),q(null===(e=t.getFieldsValue())||void 0===e||null===(e=e.sub_item_banks)||void 0===e||null===(e=e[T])||void 0===e?void 0:e.use_keywords),console.log(null===(n=t.getFieldsValue())||void 0===n||null===(n=n.sub_item_banks)||void 0===n||null===(n=n[T])||void 0===n?void 0:n.use_keywords),console.log(H)}})}),(0,I.jsx)(A.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,I.jsx)(A.Z,{children:(0,I.jsx)(w.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,I.jsx)(U.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(H||!r)&&(0,I.jsx)(v.Z.List,{name:_,rules:[{validator:function(e,n){return r?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(V)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var i=n.add,a=n.remove;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{className:"".concat(b.Z.title," mb10"),children:r?"关键词":(0,I.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,I.jsxs)(x.Z,{align:"middle",className:"font14 mb30",children:[(0,I.jsx)(A.Z,{flex:1,children:(0,I.jsx)(S.Z,{value:R,onChange:function(e){F(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,a,r,l,o,c="".concat(null===(n=e.target)||void 0===n?void 0:n.value),d=null==c||null===(a=c.split("|"))||void 0===a||null===(a=a.filter((function(e){return!!e})))||void 0===a?void 0:a.map((function(e){return null==e?void 0:e.trim()})),u=t.getFieldValue(["sub_item_banks"].concat(s()(_))),h=(null==u||null===(r=u.map((function(e){return null==e?void 0:e.keyword})))||void 0===r?void 0:r.flat())||[],m=C()(d);try{for(m.s();!(l=m.n()).done;){var p=l.value;if(h.includes(p))return void z.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){m.e(e)}finally{m.f()}(o=c)&&(new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==o||(z.ZP.warning("关键词不能只输入一个“|”字符!"),0))&&(i({keyword:d,score:1}),F(""))},className:b.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,I.jsx)(A.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,i=h()(e,K);return(0,I.jsx)(x.Z,{className:"mb20",style:{marginRight:148},children:(0,I.jsx)(A.Z,{flex:1,children:(0,I.jsxs)(x.Z,{align:"middle",justify:"space-between",children:[(0,I.jsx)(v.Z.Item,d()(d()({},i),{},{name:[t,"keyword"],children:(0,I.jsx)(Q,{onClose:function(){return a(t)}})})),r&&(0,I.jsx)(v.Z.Item,d()(d()({},i),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:b.Z.blankInputNumberWrapper,children:(0,I.jsx)(j.Z,{className:b.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,I.jsx)("div",{onClick:function(){return L(!0)},children:(0,I.jsx)(v.Z.Item,{name:u,label:"题目解析",labelCol:{span:24},children:(0,I.jsx)(N.x,{placeholder:"请编辑题目解析(非必填)",isEdit:E})})})]})},X=["key","name"],$=g.Z.Panel,ee=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),a=e.withScore,r=(0,f.useState)([]),l=p()(r,2),o=l[0],c=l[1],u=function(e){c(e)};return(0,I.jsxs)("div",{className:b.Z.wrap,children:[(0,I.jsx)("div",{className:b.Z.questionTitleEditorWrap,children:(0,I.jsx)(v.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,I.jsx)(N.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,I.jsx)(v.Z.Item,{label:"小题",required:!0,labelCol:{span:24}}),(0,I.jsx)(v.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,n){return n?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,n){var r=n.add,l=n.remove,m=t.getFieldValue("sub_item_banks");return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(g.Z,{className:e.length>0?b.Z.collapseWrapper:"",bordered:!1,activeKey:o,onChange:u,expandIcon:function(e){var n=e.isActive;return(0,I.jsx)("i",{className:"iconfont icon-weizhankai ".concat(n?b.Z.open:b.Z.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(e,n){e.key;var r,o,s,c,u,p,f,g,y,N,k=e.name,C=h()(e,X);return(0,I.jsx)($,{className:b.Z.panel,forceRender:!0,header:(0,I.jsxs)("div",{className:b.Z.panelHeader,children:["第",n+1,"小题",(0,I.jsxs)("span",{children:["","SINGLE"==(null==m||null===(r=m[k])||void 0===r?void 0:r.item_type)?"单选题":"MULTIPLE"==(null==m||null===(o=m[k])||void 0===o?void 0:o.item_type)?"多选题":"COMPLETION"==(null==m||null===(s=m[k])||void 0===s?void 0:s.item_type)?"填空题":"JUDGMENT"==(null==m||null===(c=m[k])||void 0===c?void 0:c.item_type)?"判断题":"简答题",""]})]}),extra:(0,I.jsxs)(x.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},children:[a&&(0,I.jsx)(v.Z.Item,d()(d()({},C),{},{rules:[{required:!0,message:"请输入小题分值"}],label:"分值",name:[k,"question_score"],className:b.Z.blankInputNumberWrapper,children:(0,I.jsx)(j.Z,{className:b.Z.blankInput,placeholder:"请输入当前小题分数",min:.1,precision:1,max:100,style:{width:150}})})),(0,I.jsx)(w.Z,{title:"删除",children:(0,I.jsx)(_.Z,{className:"".concat(b.Z.deleteIcon," ml40"),onClick:function(){return l(k)}})})]}),children:(0,I.jsxs)(v.Z.Item,d()(d()({},C),{},{name:k,children:[("SINGLE"==(null==m||null===(u=m[k])||void 0===u?void 0:u.item_type)||"MULTIPLE"==(null==m||null===(p=m[k])||void 0===p?void 0:p.item_type))&&(0,I.jsx)(i.u,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:"MULTIPLE"==(null==m||null===(f=m[k])||void 0===f?void 0:f.item_type),form:t,choiceKey:[k,"choices"],titleKey:[k,"name"],analysisKey:[k,"analysis"],choiceOptionsPath:["sub_item_banks",k,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),"COMPLETION"==(null==m||null===(g=m[k])||void 0===g?void 0:g.item_type)&&(0,I.jsx)(L,{form:t,questionTitlePlaceholder:"请编辑题干并设置填空项",scoreByBlank:!1,name:k,titleKey:[k,"name"],analysisKey:[k,"analysis"],isOrdered:[k,"is_ordered"],answerKey:[k,"standard_answers"]}),"JUDGMENT"==(null==m||null===(y=m[k])||void 0===y?void 0:y.item_type)&&(0,I.jsx)(G,{form:t,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[k,"name"],analysisKey:[k,"analysis"],choiceKey:[k,"choices"]}),"SUBJECTIVE"==(null==m||null===(N=m[k])||void 0===N?void 0:N.item_type)&&(0,I.jsx)(Y,{showKeywords:!0,isMustKeyWords:!1,form:t,titleKey:[k,"name"],analysisKey:[k,"analysis"],answerTexts:[k,"answer_texts"],useKeywords:[k,"use_keywords"],keywords:[k,"keywords"],indexs:k,questionTitlePlaceholder:"请编辑简答题题干内容"})]}))},k)}))}),e.length<20&&(0,I.jsx)(y.Z,{menu:{items:[{label:(0,I.jsx)("div",{onClick:function(){r({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",item_type:"SINGLE"}),c([null==e?void 0:e.length].concat(s()(o)))},children:"单选题"}),key:"1",show:!0},{label:(0,I.jsx)("div",{onClick:function(){r({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",item_type:"MULTIPLE"}),c([null==e?void 0:e.length].concat(s()(o)))},children:"多选题"}),key:"2",show:!0},{label:(0,I.jsx)("div",{onClick:function(){r({name:"",choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),c([null==e?void 0:e.length].concat(s()(o)))},children:"判断题"}),key:"3",show:!0},{label:(0,I.jsx)("div",{onClick:function(){r({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),c([null==e?void 0:e.length].concat(s()(o)))},children:"填空题"}),key:"4",show:!0},{label:(0,I.jsx)("div",{onClick:function(){r({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),c([null==e?void 0:e.length].concat(s()(o)))},children:"简答题"}),key:"5",show:!0}].filter((function(e){return e.show})).map((function(e){return{label:e.label,key:e.key}}))},children:(0,I.jsx)("div",{className:"".concat(b.Z.addBtn),children:"添加小题"})})]})}})]})},ne=t(48637)},37507:function(e,n,t){"use strict";t.d(n,{h:function(){return v}});var i=t(82242),a=t.n(i),r=t(79800),l=t.n(r),o=t(59301),s=t(57809),c=t(78241),d=t(3113),u=t(89780),h=t.n(u),m=(t(81974),t(3693),t(37712)),p=s.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,r=e.options,s=void 0===r?{}:r,c=(0,o.useRef)(),d=(0,o.useState)(),u=l()(d,2),p=u[0],f=u[1];return(0,o.useEffect)((function(){if(p){var e=function(e){var n=e.getValue();t&&t(n)};return p.on("change",e),function(){p.off("change",e)}}}),[p,t]),(0,o.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),(0,o.useEffect)((function(){p&&(n===p.getValue()&&""!==n||setTimeout((function(){p.setValue(n||"")}),300))}),[p,n]),(0,o.useEffect)((function(){if(c.current&&!p){var e=h().fromTextArea(c.current,a()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},s));f(e)}}),[c.current,p]),(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,o.useState)("python"),r=l()(i,2),u=r[0],h=r[1];return(0,m.jsxs)(c.Z,a()(a()({},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)(s.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){h(g[e][1])},children:Object.keys(g).map((function(e){return(0,m.jsx)(p,{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 Ze}});var i=t(91232),a=t.n(i),r=t(79800),l=t.n(r),o=t(85573),s=t.n(o),c=t(59301),d=t(89780),u=t.n(d),h=t(76374),m=(t(81974),t(6313),t(25717),t(99498),t(25419),t(67549),t(42783)),p=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,p.jsx)(p.Fragment,{children:(0,p.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 j(e){var n=e.onActionCallback,t=e.title,i=e.icon,a=e.actionName,r=e.className,l=void 0===r?"":r,o=e.children;return(0,p.jsxs)("a",{title:t,className:l,onClick:function(){n(a)},children:[(0,p.jsx)("i",{className:"".concat(i)}),o]})}var w=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,a=e.onActionCallback,r=e.fullScreen,l=e.insertTemp,o=e.hidetoolBar,s=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,p.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&c.map((function(e,n){return(0,p.jsx)("li",{children:e.actionName?(0,p.jsx)(j,v()(v()({},e),{},{onActionCallback:a})):(0,p.jsx)("span",{className:"v-line"})},n)})),t?(0,p.jsx)("li",{children:(0,p.jsx)(j,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:a,children:(0,p.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("li",{children:(0,p.jsx)(j,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:a,children:(0,p.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,p.jsx)("li",{children:(0,p.jsx)(j,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:a,children:(0,p.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,l&&(0,p.jsx)("li",{children:(0,p.jsx)(j,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(l),onActionCallback:a,children:(0,p.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),s&&(0,p.jsx)("li",{children:s}),(0,p.jsx)("li",{className:"btn-full-screen",children:(0,p.jsx)(j,{icon:"".concat(r?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:r?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:a})})]})},y=t(27308),b=t(78241),_=t(8772),N=t(3113),k={labelCol:{span:4},wrapperCol:{span:20}},C=function(e){var n=e.callback,t=e.onCancel;return(0,p.jsxs)(b.Z,v()(v()({},k),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,p.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,p.jsx)(_.Z,{})}),(0,p.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,p.jsx)(_.Z,{})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(N.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(N.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},Z=t(37507),A=t(8591),S=t(55087),B=b.Z.useForm,I={width:280,marginRight:10},T={labelCol:{span:5},wrapperCol:{span:19}},P=function(e){var n=e.callback,t=e.onCancel,i=B(),a=l()(i,1)[0],r=(0,c.useRef)();function o(e,n){-1!==e.status?a.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):A.ZP.error(e.message)}return(0,p.jsxs)(b.Z,v()(v()({form:a},T),{},{className:"upload-image-panel",onFinish:function(e){n(e,r.current)},style:{width:470,overflow:"hidden"},children:[(0,p.jsx)(b.Z.Item,{label:"图片地址",required:!0,children:(0,p.jsxs)("div",{className:"flex-container",children:[(0,p.jsx)(b.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,p.jsx)(_.Z,{style:I})}),(0,p.jsx)(M,{onFileChange:function(e){var n=e.target.files[0];r.current=n,E(n,o)}})]})}),(0,p.jsx)(b.Z.Item,{label:"图片描述",name:"alt",children:(0,p.jsx)(_.Z,{style:{width:264}})}),(0,p.jsxs)(b.Z.Item,{style:{textAlign:"right"},children:[(0,p.jsx)(N.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(N.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function M(e){var n=e.onFileChange;return(0,p.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,p.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(S.KI,"/api/attachments.json")),i.send(t)}var L=t(95237),D=t(74908),O=function(e){var n=e.callback,t=e.onCancel,i=document.createElement("canvas"),a=i.getContext("2d");i.width=1e3,i.height=800,a.fillStyle="#ffffff",a.fillRect(0,0,i.width,i.height);var r=i.toDataURL("image/png");return(0,p.jsx)(L.Z,{style:{height:"100vh"},children:(0,p.jsx)(D.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:r,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},R=t(7557),F=t.n(R),W=t(41498),G=t.n(W),z=t(37205),H=t.n(z),q=t(12378);function U(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(U,go.CommandHandler),U.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},U.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")},U.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")},U.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")},U.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")},U.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")}},U.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")}},U.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 a=t[i],r=a.actualBounds.y+a.actualBounds.height+e;t[i+1].move(new go.Point(a.actualBounds.x,r))}n.commitTransaction("align Column")},U.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 a=t[i],r=a.actualBounds.x+a.actualBounds.width+e;t[i+1].move(new go.Point(r,a.actualBounds.y))}n.commitTransaction("align Row")},U.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},U.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())},U.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){U._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},U.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){U._assignZOrder(e,n.get(e.layer)-1-U._findGroupDepth(e))})),e.commitTransaction("pushToBack")},U._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){U._assignZOrder(e,n+1,t)}))},U._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,U._findGroupDepth(e))})),n+1}return 0},U.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)}},U.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},U.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 a=e.grid.gridCellSize;i=a.width,t=a.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")},U.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))},U.prototype._findNearestPartTowards=function(e){var n=this.diagram.selection.first();if(null===n)return null;for(var t=n.actualBounds.center,i=this._getAllParts(),a=1/0,r=n,l=0;l<i.length;l++){var o=i[l];if(o!==n&&o.canSelect()){var s=o.actualBounds.center,c=t.directionPoint(s),d=this._angleCloseness(c,e);if(d<=45){var u=t.distanceSquaredPoint(s);(u*=1+Math.sin(d*Math.PI/180))<a&&(a=u,r=o)}}}return r},U.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},U.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!==(a=this._sortTreeChildrenByY(n).first())&&e.select(a)}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!==(r=n.findTreeParentNode())&&e.select(r)}else if("Up"===t.key){if(null!==(r=n.findTreeParentNode()))if((o=(l=this._sortTreeChildrenByY(r)).indexOf(n))>0){for(var i=l.elt(o-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(r)}else if("Down"===t.key){var a;if(n.isTreeExpanded&&!n.isTreeLeaf)null!==(a=this._sortTreeChildrenByY(n).first())&&e.select(a);else for(;null!==n;){var r,l,o;if(null===(r=n.findTreeParentNode()))break;if((o=(l=this._sortTreeChildrenByY(r)).indexOf(n))<l.length-1){e.select(l.elt(o+1));break}n=r}}var s=e.selection.first();null!==s&&e.scrollToRect(s.actualBounds)}},U.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},U.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},U.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(U.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(U.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var V=U,K=(t(31270),t(85160)),J=t(43418),Q=t(43604),Y=t(51136),X="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=q;var ee=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),a=(0,c.useRef)(),r=(0,c.useRef)(),o=(0,c.useRef)(!1),s=(0,c.useRef)(!1),d=(0,c.useState)(0),u=l()(d,2),h=u[0],m=u[1],f=function(){var e=G()(F()().mark((function e(){var n,a;return F()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,Y.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:n.src}});case 3:a=e.sent,t({src:a.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){m(h+1)}),[]),(0,p.jsx)("div",{ref:s,className:o.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,p.jsx)(J.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!h,destroyOnClose:!0,maskClosable:!1,getContainer:s.current,rootClassName:"zIndex-9999",title:(0,p.jsxs)(L.Z,{children:[(0,p.jsx)(Q.Z,{flex:1,children:"插入流程图"}),(0,p.jsx)(Q.Z,{onClick:function(){o.current=!o.current,m(h+1)},children:(0,p.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,children:(0,p.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,p.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,p.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,p.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,p.jsx)("div",{style:{height:"calc(100% - 50px)"},className:X,ref:r})]}),(0,p.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,p.jsx)(K.FI,{initDiagram:function(){var e=q.GraphObject.make,n="#ff3333",t="#3358ff",l="#25ad23",o="#d533ff",s="#7d33ff",c="#ff6233",d="#ffffff",u="#000000",h="#fffcd5",m="#d5ebff",p="#f2dfe0",f="#a5d2fa",g="#cccccc",v="#b3e6b3",x="#fcbbbd";function j(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var a=t.part.adornedPart,r=(new q.Point).setRectSpot(a.actualBounds,n);r.subtract(a.location),r.scale(2,2),r.x+=130*Math.sign(r.x),r.y+=130*Math.sign(r.y),r.add(a.location),r.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var l=i.copyNodeData(a.data);i.setGroupKeyForNodeData(l,i.getGroupKeyForNodeData(a.data)),i.addNodeData(l);var o={from:a.key,to:i.getKeyForNodeData(l)};i.addLinkData(o);var s=e.diagram.findNodeForData(l);s.location=r,e.diagram.select(s),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(q.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(q.Spot.Top)||n.equals(q.Spot.Bottom)?25:18,height:n.equals(q.Spot.Top)||n.equals(q.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 w(n){return e(q.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 y(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(q.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:y(t,n),contextClick:y(t,n)})}function _(){return[e("ContextMenuButton",e(q.Panel,"Horizontal",b(d,"fill"),b(h,"fill"),b(m,"fill"),b(p,"fill"))),e("ContextMenuButton",e(q.Panel,"Horizontal",b(g,"fill"),b(v,"fill"),b(f,"fill"),b(x,"fill")))]}function N(){return[e("ContextMenuButton",e(q.Panel,"Horizontal",b(u),b(l),b(t),b(n))),e("ContextMenuButton",e(q.Panel,"Horizontal",b(d),b(o),b(s),b(c)))]}function k(n,t){return t||(t="thickness"),e(q.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:y(t,n),contextClick:y(t,n)})}function C(n,t){return t||(t="dash"),e(q.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:y(t,n),contextClick:y(t,n)})}function Z(){return[e("ContextMenuButton",e(q.Panel,"Horizontal",k(1),k(2),k(3),k(4))),e("ContextMenuButton",e(q.Panel,"Horizontal",C(null),C([2,4]),C([4,4])))]}function A(n,t){return t||(t="figure"),e(q.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:y(t,n),contextClick:y(t,n)})}function S(n){return e(q.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function B(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(q.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:y("dir",n),contextClick:y("dir",n)})}function I(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",q.Spot.stringify(q.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(q.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 T(n,t){var i=0,a=q.Spot.RightSide;n.equals(q.Spot.Top)?(i=270,a=q.Spot.TopSide):n.equals(q.Spot.Left)?(i=180,a=q.Spot.LeftSide):n.equals(q.Spot.Bottom)&&(i=90,a=q.Spot.BottomSide),t||(i-=180);var r=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",q.Spot.stringify(a)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(q.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:r,contextClick:r})}return i.current=new q.Diagram(a.current,{padding:20,grid:e(q.Panel,"Grid",e(q.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(q.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(V),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var 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(q.Node,"Auto",{locationSpot:q.Spot.Center,locationObjectName:"SHAPE",desiredSize:new q.Size(120,60),minSize:new q.Size(40,40),resizable:!0,resizeCellSize:new q.Size(10,10),rotatable:!0},new q.Binding("location","loc",q.Point.parse).makeTwoWay(q.Point.stringify),new q.Binding("desiredSize","size",q.Size.parse).makeTwoWay(q.Size.stringify),e(q.Shape,{name:"SHAPE",fill:d,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:q.Spot.AllSides,toSpot:q.Spot.AllSides},new q.Binding("figure"),new q.Binding("fill"),new q.Binding("stroke","borderColor"),new q.Binding("strokeWidth","thickness"),new q.Binding("strokeDashArray","dash")),e(q.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(q.TextBlock,{margin:1,textAlign:"center",overflow:q.TextBlock.OverflowEllipsis,editable:!0},new q.Binding("text").makeTwoWay(),new q.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(q.Panel,"Vertical",{maxSize:new q.Size(200,NaN)},e(q.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new q.Binding("text")),e(q.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new q.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(q.Adornment,"Spot",e(q.Placeholder,{padding:10}),j(q.Spot.Top,"TriangleUp"),j(q.Spot.Left,"TriangleLeft"),j(q.Spot.Right,"TriangleRight"),j(q.Spot.Bottom,"TriangleDown"),w({alignment:new q.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(q.Panel,"Horizontal",A("Rectangle"),A("RoundedRectangle"),A("Ellipse"),A("Diamond"))),e("ContextMenuButton",e(q.Panel,"Horizontal",A("Parallelogram2"),A("ManualOperation"),A("Procedure"),A("Cylinder1"))),e("ContextMenuButton",e(q.Panel,"Horizontal",A("Terminator"),A("CreateRequest"),A("Document"),A("TriangleDown"))),_(),N(),Z()),i.current.groupTemplate=e(q.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:q.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 q.Binding("location","loc",q.Point.parse).makeTwoWay(q.Point.stringify),e(q.Panel,"Auto",{name:"BODY"},e(q.Shape,{parameter1:10,fill:d,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:q.Spot.AllSides,toSpot:q.Spot.AllSides},new q.Binding("fill"),new q.Binding("stroke","color"),new q.Binding("strokeWidth","thickness"),new q.Binding("strokeDashArray","dash")),e(q.Placeholder,{background:"transparent",margin:20})),e(q.TextBlock,{alignment:q.Spot.Top,alignmentFocus:q.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new q.Binding("text"),new q.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(q.Adornment,"Spot",e(q.Panel,"Auto",e(q.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(q.Placeholder,{margin:1.5})),w({alignment:q.Spot.TopRight,alignmentFocus:q.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",_(),N(),Z()),i.current.linkTemplate=e(q.Link,{layerName:"Foreground",routing:q.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new q.Binding("fromSpot","fromSpot",q.Spot.parse),new q.Binding("toSpot","toSpot",q.Spot.parse),new q.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new q.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new q.Binding("points").makeTwoWay(),e(q.Shape,{strokeWidth:2},new q.Binding("stroke","color"),new q.Binding("strokeWidth","thickness"),new q.Binding("strokeDashArray","dash")),e(q.Shape,{segmentIndex:0,segmentOffset:new q.Point(15,0),segmentOrientation:q.Link.OrientAlong,alignmentFocus:q.Spot.Right,figure:"circle",width:10,strokeWidth:0},new q.Binding("fill","color"),new q.Binding("visible","dir",(function(e){return 1===e}))),e(q.Shape,{segmentIndex:-1,segmentOffset:new q.Point(-10,6),segmentOrientation:q.Link.OrientPlus90,alignmentFocus:q.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new q.Binding("fill","color"),new q.Binding("visible","dir",(function(e){return e>=1})),new q.Binding("width","thickness",(function(e){return 7+3*e})),new q.Binding("height","thickness",(function(e){return 7+3*e})),new q.Binding("segmentOffset","thickness",(function(e){return new q.Point(-15,4+1.5*e)}))),e(q.Shape,{segmentIndex:0,segmentOffset:new q.Point(15,-6),segmentOrientation:q.Link.OrientMinus90,alignmentFocus:q.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new q.Binding("fill","color"),new q.Binding("visible","dir",(function(e){return 2===e})),new q.Binding("width","thickness",(function(e){return 7+3*e})),new q.Binding("height","thickness",(function(e){return 7+3*e})),new q.Binding("segmentOffset","thickness",(function(e){return new q.Point(-15,4+1.5*e)}))),e(q.TextBlock,{alignmentFocus:new q.Spot(0,1,-4,0),editable:!0},new q.Binding("text").makeTwoWay(),new q.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(q.Adornment,e(q.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:S(2)},new q.Binding("pathPattern","thickness",S)),w({alignmentFocus:new q.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",N(),Z(),e("ContextMenuButton",e(q.Panel,"Horizontal",B(0),B(1),B(2))),e("ContextMenuButton",e(q.Panel,"Horizontal",e(q.Panel,"Spot",I(!1),T(q.Spot.Top,!1),T(q.Spot.Left,!1),T(q.Spot.Right,!1),T(q.Spot.Bottom,!1)),e(q.Panel,"Spot",{margin:new q.Margin(0,0,0,2)},I(!0),T(q.Spot.Top,!0),T(q.Spot.Left,!0),T(q.Spot.Right,!0),T(q.Spot.Bottom,!0))))),new q.Palette(r.current,{maxSelectionCount:1,linkTemplate:e(q.Link,{locationSpot:q.Spot.Center,selectionAdornmentTemplate:e(q.Adornment,"Link",{locationSpot:q.Spot.Center},e(q.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(q.Shape,{toArrow:"Standard",stroke:null}))},{routing:q.Link.AvoidsNodes,curve:q.Link.JumpOver,corner:5,toShortLength:4},new q.Binding("points"),e(q.Shape,{isPanelMain:!0,strokeWidth:2}),e(q.Shape,{toArrow:"Standard",stroke:null})),model:new q.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(H()(q.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(q.Node,"Auto",{locationSpot:q.Spot.Center},new q.Binding("location","location",q.Point.parse).makeTwoWay(q.Point.stringify),e(q.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 q.Binding("stroke").makeTwoWay(),new q.Binding("fill").makeTwoWay(),new q.Binding("figure")),e(q.TextBlock,{margin:new q.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new q.Size(16,16),maxSize:new q.Size(10,NaN),textAlign:"center",editable:!0},new q.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(q.Panel,"Grid",e(q.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(q.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,p.jsx)("div",{ref:a})]})]}),(0,p.jsx)("div",{className:"tr",children:(0,p.jsx)(N.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,ae={margin:"0 8px"},re=function(e){var n=e.callback,t=e.onCancel;return(0,p.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,p.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,p.jsx)("span",{style:ae,children:"单元格数:"}),(0,p.jsx)("span",{style:ae,children:"行数"}),(0,p.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,p.jsx)(te.Z,{})}),(0,p.jsx)("span",{style:ae,children:"列数"}),(0,p.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,p.jsx)(te.Z,{})})]}),(0,p.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,p.jsx)("span",{style:ae,children:"对齐方式:"}),(0,p.jsx)(b.Z.Item,{name:"align",children:(0,p.jsxs)(ie,{children:[(0,p.jsx)(ne.ZP,{value:"default",children:(0,p.jsx)("i",{className:"fa fa-align-justify"})}),(0,p.jsx)(ne.ZP,{value:"left",children:(0,p.jsx)("i",{className:"fa fa-align-left"})}),(0,p.jsx)(ne.ZP,{value:"center",children:(0,p.jsx)("i",{className:"fa fa-align-center"})}),(0,p.jsx)(ne.ZP,{value:"right",children:(0,p.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(N.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(N.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},le=t(78673),oe=t(66455),se=t.n(oe),ce=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,a=e.height,r=e.callback,o=(e.showSaveButton,(0,c.useRef)()),s=(0,c.useRef)(),d=(0,c.useState)(!1),u=l()(d,2),h=u[0],m=u[1],f=(0,c.useRef)({id:o,appName:"graphing",width:i||1e3,height:a||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){s.current=new(se())(f.current,!0),window.onload=function(){s.current.inject("applet_container")}}),[]);var g=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return r&&r(e),e};return(0,c.useEffect)((function(){f.current.appName=h?"3D":"graphing",s.current.inject("applet_container")}),[h]),(0,c.useEffect)((function(){m(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:g}})),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:o}),(0,p.jsxs)(L.Z,{align:"middle",children:[(0,p.jsx)(Q.Z,{flex:1,children:(0,p.jsx)(le.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:h,onChange:function(e){return m(e)}})}),(0,p.jsx)(Q.Z,{children:(0,p.jsx)(N.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),de=t(33773),ue=t(27065),he="link",me="upload-image",pe="add-flowchart",fe="draw-image",ge="code-block",ve="add-table",xe="------------",je={default:xe,left:":".concat(xe),center:":".concat(xe,":"),right:"".concat(xe,":")},we=t(56266);var ye="@▁▁@",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 _e(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ke=s()(s()({},Ne+"-B","bold"),Ne+"-I","italic"),Ce=s()(s()(s()(s()(s()(s()(s()(s()({},he,"添加链接"),ge,"添加代码块"),me,"添加图片"),fe,"添加画图"),pe,"插入流程图"),ve,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Ze=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,r=e.width,o=void 0===r?"100%":r,d=e.height,g=void 0===d?400:d,v=e.miniToolbar,x=void 0!==v&&v,j=e.isFocus,b=void 0!==j&&j,_=e.watch,N=e.insertTemp,k=e.mode,S=void 0===k?"markdown":k,B=e.id,I=void 0===B?"markdown-editor-id":B,T=e.showResizeBar,M=void 0!==T&&T,L=e.noStorage,D=void 0!==L&&L,R=e.showNullButton,F=void 0!==R&&R,W=e.showNullProgramButton,G=void 0!==W&&W,z=e.hidetoolBar,H=void 0!==z&&z,q=e.fullScreen,U=void 0!==q&&q,V=e.onBlur,K=e.onCMBeforeChange,Q=e.onFullScreen,Y=e.className,X=void 0===Y?"":Y,$=e.disablePaste,ne=void 0!==$&&$,te=e.disabled,ie=void 0!==te&&te,ae=e.disabledFill,le=void 0!==ae&&ae,oe=e.placeholder,se=void 0===oe?"":oe,xe=e.values,Ne=void 0===xe?"":xe,Ze=e.extraUse,Ae=(0,c.useState)(null),Se=l()(Ae,2),Be=Se[0],Ie=Se[1],Te=(0,c.useState)(t),Pe=l()(Te,2),Me=Pe[0],Ee=Pe[1],Le=(0,c.useState)(_),De=l()(Le,2),Oe=De[0],Re=De[1],Fe=(0,c.useState)(U),We=l()(Fe,2),Ge=We[0],ze=We[1],He=(0,c.useState)(""),qe=l()(He,2),Ue=qe[0],Ve=qe[1],Ke=(0,c.useState)(0),Je=l()(Ke,2),Qe=Je[0],Ye=Je[1],Xe=(0,c.useState)(g),$e=l()(Xe,2),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),an=l()(tn,2),rn=(an[0],an[1]),ln=(0,c.useState)(0),on=l()(ln,2),sn=on[0],cn=on[1],dn=(0,c.useState)(0),un=l()(dn,2),hn=un[0],mn=un[1],pn=(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(Ne),null==Be||Be.setValue(Ne),window.scrollTo(0,e)}),[Ne]),(0,c.useEffect)((function(){null==Q||Q(Ge)}),[Ge]),(0,c.useEffect)((function(){if(pn.current){var e=function(e,t){if(!ne){var i=t.clipboardData;if(i){var a=i.types.toString(),r=i.items;if("Files"===a||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==S)return;try{var l,o=r[1];"file"===(null===(l=r[0])||void 0===l?void 0:l.kind)&&(o=r[0]);var s=o.getAsFile(),c=s.name.split(".").pop();E(s,(function(e){var t,i,a;e.id?(null==s||null===(t=s.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==s||null===(i=s.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==s||null===(a=s.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(s.type,'&disposition=inline" target="_blank">').concat(s.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(s.name,"</a>")):n.replaceSelection("[".concat(s.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){A.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=u().fromTextArea(pn.current,{mode:S,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",se):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(),a=t.getLine(i.line),r=a.charAt(i.ch-1),l=a.lastIndexOf("@▁@",i.ch),o=a.lastIndexOf("@▁▁@",i.ch),s=l>o?l:o,c=l>o?3:4;if(-1===ye.indexOf(r))return null;if(console.log("change1:",n,e,a,i,s,l,o,r),s>=0&&i.ch-s<5){var d=s+c;return t.replaceRange("",{line:i.line,ch:s},{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()})),Ie(n),function(){n.off("paste",e)}}}),[]);var xn=(0,c.useCallback)((function(){fn.current}),[en,fn,Ge]);(0,c.useEffect)((function(){if(Be){var e=function(){var e=new h.Z((function(e){var n,t=a()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(xn(),Be.setSize("100%","100%"),Be.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(pn.current.parentElement),e}();return function(){var n,t;null!==(n=pn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=pn.current)||void 0===t?void 0:t.parentElement)}}}),[Be,xn]),(0,c.useEffect)((function(){if(Be){for(var e=[],n=function(){var n=l()(i[t],2),a=n[0],r=n[1],o=s()({},a,(function(){jn(r)}));e.push(o),Be.addKeyMap(o)},t=0,i=Object.entries(ke);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Be.removeKeyMap(i)}}}}),[Be]),(0,c.useEffect)((function(){U!==Ge&&ze(U)}),[U]),(0,we.Z)((function(){if(!D&&Qe>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(I);e>=Qe+1e4&&(!n||n!==Me)&&(window.sessionStorage.setItem(I,Me),rn(!0))}}),1e4),(0,c.useEffect)((function(){Re(_)}),[Be,_]),(0,c.useEffect)((function(){Be&&b&&Be.focus()}),[Be,b]),(0,c.useEffect)((function(){if(Oe&&Be){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=Be.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Be,Oe]),(0,c.useEffect)((function(){if(Be&&K){var e=function(e,n){K(e,n)};return Be.on("beforeChange",e),function(){Be.off("beforeChange",e)}}}),[Be,K]),(0,c.useEffect)((function(){if(Be&&V){var e=function(){V(Be.getValue())};return Be.on("blur",e),function(){Be.off("blur",e)}}}),[Be,V]),(0,c.useEffect)((function(){if(Be){var e=function(e,n){var t=e.getValue();Ee(t),Ye((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(G?i(t,Nn(t)):i(t))};return Be.on("change",e),function(){Be.off("change",e)}}}),[Be,i]),(0,c.useEffect)((function(){if(Be)if(null==t)Be.setValue(""),Ee("");else{var e=window.scrollY||window.pageYOffset;t!==Be.getValue()&&(Be.setValue(t),Ee(t),Be.setCursor(ie?1:Be.lineCount(),0),window.scrollTo(0,e))}}),[Be,t]);var jn=(0,c.useCallback)((function(e){var n=Be.getCursor(),t=Be.getSelection(),i=t.split("\n");switch(e){case"bold":return Be.replaceSelection("**"+t+"**"),""===t&&Be.setCursor(n.line,n.ch+2),Be.focus();case"italic":return Be.replaceSelection("*"+t+"*"),""===t&&Be.setCursor(n.line,n.ch+1),Be.focus();case"code":return Be.replaceSelection("`"+t+"`"),""===t&&Be.setCursor(n.line,n.ch+1),Be.focus();case"inline-latex":return Ve("inline-latex"),Be.focus();case"latex":return Be.replaceSelection("```latex\n"+t+"\n```"),Be.setCursor(n.line+1,t.length+1),Be.focus();case"line-break":return Be.replaceSelection("<br/>\n"),Be.focus();case"list-ul":return""===t?Be.replaceSelection("- "+t):Be.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Be.focus();case"list-ol":return""===t?Be.replaceSelection("1. "+t):Be.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Be.focus();case"add-null-ch":return""===t&&Be.setCursor(n.line,n.ch),Be.replaceSelection("▁"),Be.focus();case"add-signal":return""===t&&Be.setCursor(n.line,n.ch),Be.replaceSelection("@▁@"),Be.focus();case"add-multiple":return""===t&&Be.setCursor(n.line,n.ch),Be.replaceSelection(ye),Be.focus();case"inster-template-1":return""===t&&Be.setCursor(n.line,n.ch),Be.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Be.focus();case"eraser":return Be.setValue(""),Be.focus();case"trigger-watch":return Re(!Oe),Be.focus();case"trigger-full-screen":return ze(!Ge),Be.focus();case he:return void Ve(he);case ge:return void Ve(ge);case me:return void Ve(me);case fe:return void Ve(fe);case"maths-latex":return void Ve("maths-latex");case pe:return void Ve(pe);case ve:return void Ve(ve);default:throw new Error}}),[Be,Oe,Ge]),wn=(0,c.useCallback)((function(e,n){var t,i,a,r,l;switch(Ve(""),Ue){case he:var o=e.title,s=e.link;return Be.replaceSelection("[".concat(o,"](").concat(s,")")),Be.focus();case ge:var c=e.language,d=e.content;return Be.replaceSelection(["```"+c,d,"```"].join("\n")),Be.focus();case"maths-latex":for(var u=atob(e),h=new Uint8Array(u.length),m=0;m<u.length;m++)h[m]=u.charCodeAt(m);E(new Blob([h],{type:"image/png"}),(function(e){e.id?Be.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":Be.replaceSelection("`$$"+e+"$$`");break;case me:case fe:case"add-flowchart":var p=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===(a=g.type)||void 0===a?void 0:a.indexOf("image"))>-1||null==g||!g.type?f?Be.replaceSelection("![ ".concat(f," ]( ").concat(p,' "').concat(f,'" )')):Be.replaceSelection("![,](".concat(p,")")):(null==g||null===(r=g.type)||void 0===r?void 0:r.indexOf("video"))>-1?Be.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER).concat(p,'"></video>')):(null==g||null===(l=g.type)||void 0===l?void 0:l.indexOf("pdf"))>-1?Be.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(p,"?type=").concat(g.type,'&disposition=inline" target="_blank">').concat(g.name,"</a>")):be.includes(v)?Be.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(p,'?type=office&disposition=inline" target="_blank">').concat(g.name,"</a>")):Be.replaceSelection("[".concat(g.name,"](").concat(ue.Z.API_SERVER).concat(p,")")),Be.focus();case ve:for(var x=e.row,j=e.col,w=e.align,y="\n",b=0;b<x;b++){for(var _=[],N=[],k=0;k<j;k++)1===b&&N.push(je[w]),_.push(" ");1===b&&(y+="| ".concat(N.join(" | ")," |\n")),y+="| ".concat(_.join(1===j?"":" | ")," |\n")}return Be.replaceSelection(y+"\n"),Be.focus();default:throw new Error}}),[Be,Ue]),yn=(0,c.useMemo)((function(){switch(Ue){case he:return(0,p.jsx)(C,{callback:wn,onCancel:bn});case ge:return(0,p.jsx)(Z.Z,{callback:wn,onCancel:bn});case me:return(0,p.jsx)(P,{callback:wn,onCancel:bn});case pe:return(0,p.jsx)(ee,{callback:wn,onCancel:bn});case ve:return(0,p.jsx)(re,{callback:wn,onCancel:bn});case"maths-latex":return(0,p.jsx)(ce,{showSaveButton:!0,callback:wn});case"inline-latex":return(0,p.jsx)(de.Z,{showSaveButton:!0,callback:wn});default:return null}}),[Ue]);function bn(){Ve("")}(0,c.useEffect)((function(){if(gn.current){var e=function(e){a=!0,r=e.pageY},n=function(){a=!1},t=function(e){if(a){var n=e.pageY-r;n<0&&(n=0),n>300&&(n=300),nn(g+n+"px")}},i=gn.current,a=!1,r=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)}}}),[Be,gn]),(0,c.useEffect)((function(){nn(g)}),[g]);var _n={width:_e(o),height:_e(en)},Nn=((0,c.useMemo)((function(){if(Qe){var e=new Date(Qe),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}),[Qe]),function(e){var n=[];if(G){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){if(Ce[Ue]&&Ue!==fe&&Ue!==pe){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)}}),[Ue]);var kn=function(e,n,t,i){var a=document.body.clientHeight,r=document.body.clientWidth;return!(e<20&&t>e||e>r-20&&t<e||n<20&&i>n||n>a-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,p.jsxs)(c.Fragment,{children:[(0,p.jsx)("div",{className:"markdown-editor-wrapper",ref:fn,children:(0,p.jsxs)("div",{className:"markdown-editor-container ".concat(X," ").concat(Oe?"on-preview":""," ").concat(x?"mini":""," ").concat(Ge?"full-screen":""),style:_n,children:[(0,p.jsx)(w,{insertTemp:N,watch:Oe,fullScreen:Ge,showNullButton:F,showNullProgramButton:G,onActionCallback:jn,hidetoolBar:H,extraUse:Ze}),(0,p.jsxs)("div",{className:"markdown-editor-body",children:[(0,p.jsx)("div",{className:"codemirror-container",children:(0,p.jsx)("textarea",{ref:pn,placeholder:se})}),Oe?(0,p.jsxs)("div",{ref:vn,className:"preview-container",children:["stex"===S&&(0,p.jsx)(f,{value:Me}),"stex"!==S&&(0,p.jsx)(m.Z,{disabledFill:le,showProgramFill:G,value:Me})]}):null]})]})}),M?(0,p.jsx)("a",{ref:gn,className:"editor-resize"}):null,Ue===fe&&(0,p.jsx)(O,{callback:wn,onCancel:bn}),Ue===pe&&(0,p.jsx)(ee,{callback:wn,onCancel:bn}),(0,p.jsx)(y.Z,{children:Ce[Ue]&&Ue!==fe&&Ue!==pe?(0,p.jsx)(J.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sn,top:hn},title:(0,p.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-sn,t=e.clientY-hn;document.body.onmousemove=function(e){var i=e.clientX-n,a=e.clientY-t,r=document.getElementsByClassName("ant-modal")[0],l=window.innerWidth-r.offsetWidth,o=window.innerHeight-r.offsetHeight;i=Math.max(0,Math.min(i,l)),a=Math.max(0,Math.min(a,o)),kn(e.clientX,e.clientY,n,t)&&(cn(i),mn(a))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:Ce[Ue]}),open:!0,onCancel:bn,footer:null,destroyOnClose:!0,width:Ue===pe?"1200px":null,height:Ue===pe?"80vh":null,className:"markdown-popup-form",children:yn}):null})]})}},27308:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i=t(82100),a=t.n(i),r=t(29186),l=t.n(r),o=t(80619),s=t.n(o),c=t(47074),d=t.n(c),u=t(59301),h=t(4676),m=function(e){s()(t,e);var n=d()(t);function t(e){var i;a()(this,t),i=n.call(this,e);var r=window.document;return i.node=r.createElement("div"),r.body.appendChild(i.node),i}return l()(t,[{key:"render",value:function(){var e=this.props.children;return(0,h.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(u.Component)},90963:function(e,n,t){"use strict";t.d(n,{jL:function(){return s},w9:function(){return je},QD:function(){return $e},cQ:function(){return ve},op:function(){return Ue},O5:function(){return cn},_b:function(){return rn},t7:function(){return E},Gi:function(){return _e},YG:function(){return be},qp:function(){return N},vr:function(){return nn},qE:function(){return Je},Je:function(){return O},wb:function(){return re},cq:function(){return Me},tp:function(){return Z}});var i=t(59301),a="banner___PoUBO",r="content___XoDjy",l="btns___Pb35j",o=t(37712),s=function(e){var n=e.dataSource,t=void 0===n?[]:n,i=e.img,s=e.imgWidth,c=void 0===s?346:s,d=e.title,u=e.sunTitle,h=e.bannerExtraContent;return(0,o.jsx)("div",{className:a,children:(0,o.jsxs)("div",{className:r,children:[(0,o.jsxs)("aside",{children:[(0,o.jsxs)("p",{children:[(0,o.jsx)("b",{children:d}),(0,o.jsx)("span",{children:u})]}),t.length>0&&(0,o.jsx)("div",{className:l,children:t.map((function(e,n){return(0,o.jsxs)("div",{onClick:e.click,children:[e.name,e.sign?(0,o.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIB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EB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",width:39}):null]},n)}))}),h]}),i&&(0,o.jsx)("img",{style:{marginTop:33,marginRight:38},src:i,width:c})]})})},c=t(79800),d=t.n(c),u="row___aXJjm",h="title___HUKL0",m="tagsWrap___XB2W3",p="action___VdHb1",f="bar___t1kKC",g="tag___V7Eft",v="name___Hk1Ip",x="num___xQpcH",j="active___XryTX",w="tagsBorderWrap___OMxjs",y=t(92310),b=t.n(y),_=t(89392),N=function(e){var n=e.dataSource,t=void 0===n?[]:n,a=e.value,r=e.onChange,l=e.onTitleChange,s=e.className,c=e.title,y=e.titleWidth,N=void 0===y?41:y,k=e.style,C=void 0===k?{}:k,Z=e.fontColor,A=void 0===Z?"#6A7283":Z,S=e.showCount,B=(0,i.useState)(0),I=d()(B,2),T=I[0],P=I[1],M=(0,i.useState)(!1),E=d()(M,2),L=E[0],D=E[1],O=(0,i.useRef)(null),R=(0,i.useRef)(null);return(0,i.useEffect)((function(){var e;0!==t.length&&((null==O||null===(e=O.current)||void 0===e?void 0:e.clientHeight)>97?P(1):P(0));0===t.length&&P(0),D(!1)}),[t]),(0,o.jsxs)("div",{className:b()(u,s),style:C,children:[(0,o.jsx)("div",{onClick:(0,_.throttle)((function(){return null==l?void 0:l()}),2e3),style:{width:N,marginTop:L?12:4},className:"".concat(h," ").concat(l?"current":""),children:c}),(0,o.jsxs)("div",{className:L?"".concat(m," ").concat(w):m,children:[(0,o.jsx)("div",{className:f,ref:R,style:T>0?{height:1===T?97:"auto",overflow:1===T?"hidden":"auto",paddingRight:55}:{paddingRight:0},children:(0,o.jsx)("div",{className:g,ref:O,children:null==t?void 0:t.map((function(e){return(0,o.jsxs)("span",{onClick:function(){return r(e.id)},style:{color:A},className:a===e.id?j:"",children:[(0,o.jsx)("span",{title:e.name,className:v,children:e.name}),!!S&&(0,o.jsx)("span",{className:x,children:e.count})]},e.id)}))})}),!!T&&(0,o.jsx)(i.Fragment,{children:1===T?(0,o.jsxs)("div",{onClick:function(){var e;P(2),(null==O||null===(e=O.current)||void 0===e?void 0:e.clientHeight)>245?D(!0):D(!1)},className:p,children:["展开",(0,o.jsx)("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})]}):(0,o.jsxs)("div",{onClick:function(){R.current.scrollTop=0,P(1),D(!1)},className:p,children:["收起",(0,o.jsx)("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})]})})]})]})},k="tabs___GTqPV",C="active___F26E8",Z=function(e){var n=e.dataSource,t=void 0===n?[]:n,i=e.value,a=e.onChange,r=e.className,l=e.style,s=void 0===l?{}:l;return(0,o.jsx)("div",{style:s,className:b()(k,r),children:t.map((function(e){return(0,o.jsx)("span",{onClick:function(){return a(e.id)},className:i===e.id?C:"",children:e.name},e.id)}))})},A="input___PW2zI",S="dropdown___vSy8B",B="menu___NiyBu",I="text___Grueu",T="b1___ZKryM",P="b2___aKyGa",M=t(8772),E=function(e){var n,t=e.dataSource,a=void 0===t?[]:t,r=e.value,l=void 0===r?"":r,s=e.onChange,c=e.onInputChange,u=void 0===c?function(){}:c,h=e.className,m=e.style,p=void 0===m?{}:m,f=e.placeholder,g=(e.allowClear,(0,i.useState)("")),v=d()(g,2),x=v[0],j=v[1],w=(0,i.useState)(""),y=d()(w,2),_=y[0],N=y[1];(0,i.useEffect)((function(){var e,n=l;null!==(e=JSON.stringify(l))&&void 0!==e&&e.includes("{")&&(j(l.id),n=l.value||"");try{N(decodeURIComponent(n||""))}catch(e){N(decodeURIComponent(n||""))}}),[l]);var k=function(){s(encodeURIComponent(_),x||null)};return(0,o.jsxs)("div",{className:b()(A,h),style:p,children:[!!a.length&&(0,o.jsxs)("div",{className:S,children:[(0,o.jsxs)("div",{className:I,children:[null===(n=a.find((function(e){return e.id===x})))||void 0===n?void 0:n.name,(0,o.jsx)("i",{className:"iconfont icon-zhankai4"}),(0,o.jsx)("b",{className:T}),(0,o.jsx)("b",{className:P})]}),(0,o.jsx)("div",{className:B,children:a.map((function(e,n){return(0,o.jsx)("div",{onClick:function(){var n;(n=e.id)!==x&&(j(n),s(encodeURIComponent(_),n))},children:e.name},n)}))})]}),(0,o.jsx)(M.Z,{onPressEnter:k,value:_,onChange:function(e){N(e.target.value),u(encodeURIComponent(e.target.value),x||null)},bordered:!1,placeholder:f}),(0,o.jsx)("i",{onClick:k,className:"iconfont icon-sousuo9 font14 pl10 current"})]})},L="quickPager___GM30J",D="disabled___Ozc8I",O=function(e){var n=e.value,t=e.onChange,i=e.className,a=e.total,r=e.pageSize,l=e.style,s=void 0===l?{}:l,c=n<2,d=n>=Math.ceil(a/r);return a<=r?(0,o.jsx)(o.Fragment,{}):(0,o.jsxs)("div",{className:b()(L,i),style:s,children:[(0,o.jsx)("div",{onClick:function(){c||t(n-1,"prev")},className:c?D:"",children:"上一页"}),(0,o.jsx)("div",{onClick:function(){d||t(n+1,"next")},className:d?D:"",children:"下一页"})]})},R="list___oOsiS",F="wrap___G6T7F",W="lockWrap___Rl79E",G="li___oZZ7l",z="cover___b2bYW",H="img___IQX7w",q="sign___HkT6C",U="name___SsJx8",V="e___TMqq0",K="tags___bcjyo",J="rate___YACg7",Q=t(71418),Y=t(6848),X=t(41750),$=t(27065),ee=t(6457),ne=t(96908),te=t(57177),ie=t(81378),ae=t(7406),re=function(e){var n=e.className,t=e.dataSource,i=void 0===t?[]:t,a=e.col,r=void 0===a?4:a,l=e.right,s=e.bottom,c=void 0===s?23:s,d=e.precision,u=void 0===d?0:d,h=e.wrapWidth,m=void 0===h?1200:h,p=e.trackEventItems,f=e.loading,g=Math.floor((m-(r-1)*l)/r);return(0,o.jsx)(Q.Z,{spinning:f,children:(0,o.jsxs)("div",{className:b()(R,n),children:[!!i.length&&i.map((function(e,n){var t=e.name,i=e.id,a=e.identifier,s=e.power,d=(e.cover_image_id,e.pic);return(0,o.jsxs)("div",{className:F,style:{width:g,marginRight:(1+n)%r==0?0:l+u,marginBottom:c},children:[(0,o.jsxs)("a",{target:"_blank",href:"/shixuns/".concat(a,"/challenges"),className:G,onClick:function(e){e.preventDefault(),p&&(0,ee.L9)([p]),s&&(0,ee.xg)("/shixuns/".concat(a,"/challenges"))},children:[(0,o.jsxs)("div",{className:H,children:[(0,o.jsx)("img",{className:z,src:"".concat(d)}),e.is_jupyter&&(0,o.jsx)("img",{className:q,src:ne}),e.is_jupyter_lab&&(0,o.jsx)("img",{className:q,src:te}),e.is_unity_3d&&(0,o.jsx)("img",{className:q,src:ie})]}),(0,o.jsx)("div",{className:U,children:(0,o.jsx)(Y.Z,{title:t||"实践项目名称-未填写",children:(0,o.jsx)("span",{className:V,children:t||"实践项目名称-未填写"})})}),(0,o.jsxs)("div",{className:K,children:[(0,o.jsx)(Y.Z,{placement:"bottom",title:"关卡数",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),(0,o.jsx)("span",{children:e.challenges_count})]})}),!!e.myshixuns_count&&(0,o.jsx)(Y.Z,{placement:"bottom",title:"学习人数",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-chengyuan font14 mr2"}),(0,o.jsx)("span",{children:e.myshixuns_count})]})}),(0,o.jsx)(Y.Z,{placement:"bottom",title:"难度等级",children:(0,o.jsx)("span",{children:(0,o.jsx)("span",{children:e.level})})}),(0,o.jsxs)("div",{className:J,children:[(0,o.jsx)(X.Z,{allowHalf:!0,disabled:!0,defaultValue:e.score_info}),(0,o.jsxs)("span",{children:[" ",e.score_info?"".concat(e.score_info,"分"):"5分"]})]})]})]}),!s&&(0,o.jsxs)("div",{className:W,children:[(0,o.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,o.jsx)("span",{className:"mt15 font16 c-white",children:"定向开放内容,需要授权"})]})]},i)})),!i.length&&(0,o.jsx)(ae.Z,{})]})})},le="list___jb2Ay",oe="wrap___VsQDr",se="li___IxCLC",ce="cover___Mu8wr",de="img___IpFLA",ue="bq___Bil0T",he="sign___DXJ4d",me="name___l7FoJ",pe="e___pXQUG",fe="unit___wCIFR",ge="tags___w_Mil",ve=function(e){var n=e.className,t=e.dataSource,i=void 0===t?[]:t,a=e.col,r=void 0===a?4:a,l=e.right,s=e.bottom,c=void 0===s?23:s,d=e.precision,u=void 0===d?0:d,h=e.wrapWidth,m=void 0===h?1200:h,p=e.trackEventItems,f=e.loading,g=Math.floor((m-(r-1)*l)/r),v=[{name:"推荐自学",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101计划",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"国家一流",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"省级一流",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"精品课程",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"军队一流",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"}];return(0,o.jsx)(Q.Z,{spinning:f,children:(0,o.jsxs)("div",{className:b()(le,n),children:[!(null==i||!i.length)&&(null==i?void 0:i.map((function(e,n){var t,i=e.name,a=e.id,s=e.identifier,d=(e.featured,e.school_name),h=e.image_url;e.excellent,e.is_plan;return(0,o.jsx)("div",{className:oe,style:{width:g,marginRight:(1+n)%r==0?0:l+u,marginBottom:c},children:(0,o.jsxs)("a",{target:"_blank",href:"/paths/".concat(s),className:se,onClick:function(e){e.preventDefault(),p&&(0,ee.L9)([p]),(0,ee.xg)("/paths/".concat(s))},children:[(0,o.jsxs)("div",{className:de,children:[(0,o.jsx)("img",{className:ce,src:"".concat(h)}),null==e||null===(t=e.subject_tags)||void 0===t?void 0:t.map((function(e,n){var t;if(0===n){var i,a=null===(i=v.find((function(n){return n.name==e})))||void 0===i?void 0:i.swimg;return(0,o.jsx)("img",{className:he,src:a,style:{left:"-4px"}})}var r=null===(t=v.find((function(n){return n.name==e})))||void 0===t?void 0:t.ptimg;return(0,o.jsx)("img",{className:he,src:r,style:{left:"".concat(48+52*(n-1)+2*n,"px")}})})),(0,o.jsx)("div",{style:{position:"absolute",top:"150px",left:"4px"},children:(null==e?void 0:e.excellent)&&(0,o.jsx)("div",{className:ue,children:"开放课程"})})]}),(0,o.jsx)("div",{className:me,children:(0,o.jsx)(Y.Z,{title:i,children:(0,o.jsx)("span",{className:pe,children:i})})}),(0,o.jsx)(Y.Z,{title:"发布单位:".concat(d),children:(0,o.jsxs)("div",{className:fe,children:[(0,o.jsx)("i",{className:"iconfont icon-danwei1 font14 mr3"}),d]})}),(0,o.jsx)("div",{className:ge,children:(0,o.jsxs)("div",{children:[(0,o.jsx)(Y.Z,{placement:"bottom",title:"章节数",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),(0,o.jsx)("span",{children:e.stages_count})]})}),(0,o.jsx)(Y.Z,{placement:"bottom",title:"学习人数",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-chengyuan font14 mr3"}),(0,o.jsx)("span",{children:e.members_count})]})})]})})]})},a)}))),!i.length&&(0,o.jsx)(ae.Z,{})]})})},xe={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},je=function(e){var n=e.className,t=e.dataSource,i=void 0===t?[]:t,a=e.col,r=void 0===a?4:a,l=e.right,s=e.bottom,c=void 0===s?23:s,d=e.precision,u=void 0===d?0:d,h=e.wrapWidth,m=void 0===h?1200:h,p=e.trackEventItems,f=e.loading,g=Math.floor((m-(r-1)*l)/r);return(0,o.jsx)(Q.Z,{spinning:f,children:(0,o.jsxs)("div",{className:b()(xe.list,n),children:[!!i.length&&i.map((function(e,n){var t=e.subject_identifier,i=e.id,a=(e.identifier,e.power,0!=e.is_public&&e.is_public);return(0,o.jsxs)("div",{className:xe.wrap,style:{width:g,marginRight:(1+n)%r==0?0:l+u,marginBottom:c},children:[(0,o.jsxs)("a",{className:xe.li,onClick:function(n){n.preventDefault(),p&&(0,ee.L9)([p]),(0,ee.xg)(e.first_category_url)},children:[(0,o.jsxs)("div",{className:xe.top,children:[(0,o.jsx)(Y.Z,{title:e.name,children:(0,o.jsx)("div",{className:xe.name,children:e.name})}),(0,o.jsx)("img",{className:xe.img,src:$.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,o.jsx)("div",{className:xe.text,title:e.creator,children:e.creator}),t&&(0,o.jsxs)("div",{className:xe.btns,children:[(0,o.jsx)("div",{children:"开放课程"}),(0,o.jsx)("aside",{children:"开放课堂"})]}),a&&(0,o.jsx)("div",{className:xe.sign,children:"公开"})]}),(0,o.jsxs)("div",{className:xe.bottom,children:[e.visits>0&&(0,o.jsx)(Y.Z,{title:"访问量",placement:"bottom",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-liulanyan"}),(0,o.jsx)("span",{children:e.visits})]})}),e.course_members_count>0&&(0,o.jsx)(Y.Z,{title:"成员",placement:"bottom",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-chengyuan"}),e.course_members_count]})}),e.tasks_count>0&&(0,o.jsx)(Y.Z,{title:"作业",placement:"bottom",children:(0,o.jsxs)("span",{children:[(0,o.jsx)("i",{className:"iconfont icon-zuoye"}),e.tasks_count]})}),e.is_end?(0,o.jsx)("div",{style:{color:"#6B758B"},children:"已结束"}):(0,o.jsx)("div",{style:{color:"#00B187"},children:"进行中"})]})]}),!e.is_accessible&&(0,o.jsxs)("div",{className:xe.lockWrap,children:[(0,o.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,o.jsx)("span",{className:"mt15 font16 c-white",children:"非课堂成员不可进入"})]})]},i)})),!i.length&&(0,o.jsx)(ae.Z,{})]})})},we={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ye=t(7880),be=function(e){var n=e.dataSource,t=void 0===n?[]:n,i=e.value,a=e.onChange,r=e.className,l=e.style,s=void 0===l?{}:l,c=e.tabBarExtraContent;return(0,o.jsxs)("div",{className:b()(we.tabs,r),style:s,children:[(0,o.jsx)("div",{className:we.tabsWrap,children:t.map((function(e,n){return(0,o.jsxs)("aside",{className:we.tab,onClick:function(){a(e.id),e.link&&ye.history.push(e.link)},children:[(0,o.jsx)("div",{className:i===e.id?we.active:"",children:e.name}),null==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,o.jsxs)("span",{children:["",null==e?void 0:e.total,""]}),void 0!==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,o.jsx)(Y.Z,{title:null!=(null==e?void 0:e.tip)?null==e?void 0:e.tip:"",children:(0,o.jsxs)("span",{style:{color:"#9096A3"},children:["",(0,o.jsx)("span",{style:{color:"#000"},children:null==e?void 0:e.resetCount}),"/",(0,o.jsx)("span",{children:null==e?void 0:e.total}),""]})})]},n)}))}),(0,o.jsx)("div",{className:we.tabBar,children:c})]})},_e=function(e){var n=e.className,t=e.style,i=void 0===t?{}:t,a=e.children;return(0,o.jsx)("div",{className:b()(n),style:i,children:a})},Ne="orderWrap___ZfyGX",ke="orderIconWrap___XTB_O",Ce="orderAsc___KWHmA",Ze="orderDesc___rHdbB",Ae="active___a7eSP",Se="cursorPointer___gs9kL",Be="orderTextWrap___teAKn",Ie=t(38854),Te=t(20834),Pe=[{id:"updated_at",name:"最新动态"},{id:"created_at",name:"最新创建"},{id:"name",name:"名称排序"}],Me=function(e){var n,t=e.sortValue,i=e.dropValue,a=e.className,r=e.onSort,l=e.onDrop,s=e.dataSource,c=void 0===s?Pe:s;return(0,o.jsxs)("div",{className:b()(Ne,a),children:[(0,o.jsx)(Ie.Z,{dropdownRender:function(){return(0,o.jsx)(Te.Z,{children:c.map((function(e,n){return(0,o.jsx)(Te.Z.Item,{onClick:function(){return l(e.id)},children:e.name},n)}))})},children:(0,o.jsx)("span",{className:Be,children:null===(n=c.find((function(e){return i===e.id})))||void 0===n?void 0:n.name})}),(0,o.jsxs)("span",{className:ke,children:[(0,o.jsx)("span",{className:Ce,children:(0,o.jsx)("i",{className:"asc"===t?"iconfont icon-sanjiaoxing-up font12 ".concat(Se," ").concat(Ae):"iconfont icon-sanjiaoxing-up font12 ".concat(Se),onClick:function(){return r("asc"===t?"desc":"asc")}})}),(0,o.jsx)("span",{className:Ze,children:(0,o.jsx)("i",{className:"desc"===t?"iconfont icon-sanjiaoxing-down font12 ".concat(Se," ").concat(Ae):"iconfont icon-sanjiaoxing-down font12 ".concat(Se),onClick:function(){return r("asc"===t?"desc":"asc")}})})]})]})},Ee=t(82242),Le=t.n(Ee),De=t(7557),Oe=t.n(De),Re=t(41498),Fe=t.n(Re),We=t(39647),Ge=t.n(We),ze={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},He=t(3113),qe=["className","style","children","loading","openLoading","onClick","size","shape"],Ue=function(e){var n=e.className,t=e.style,a=e.children,r=e.loading,l=void 0!==r&&r,s=e.openLoading,c=e.onClick,u=void 0===c?function(){}:c,h=e.size,m=void 0===h?"middle":h,p=e.shape,f=void 0===p?"round":p,g=Ge()(e,qe),v=(0,i.useState)(!1),x=d()(v,2),j=x[0],w=x[1];return(0,o.jsx)(He.ZP,Le()(Le()({onClick:(0,_.throttle)(function(){var e=Fe()(Oe()().mark((function e(n){return Oe()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s&&w(!0),e.prev=1,e.next=4,u(n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("error",e.t0);case 9:s&&w(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(n){return e.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:b()(ze.btn,ze["".concat(m,"-").concat(f)],n),style:t,size:m,shape:f,loading:j||l},g),{},{children:a}))},Ve="head___ghH72",Ke="node___mjPEy",Je=function(e){var n=e.className,t=e.style,i=e.children,a=void 0===i?null:i,r=e.onClick,l=e.title;return(0,o.jsxs)("div",{className:b()(Ve,n),style:t,children:[(0,o.jsxs)("span",{className:"primary-hover",onClick:r,children:[(0,o.jsx)("i",{className:"iconfont icon-fanhui2 font12"}),"返回"]}),(0,o.jsx)("b",{title:l,children:l}),(0,o.jsx)("div",{className:Ke,children:a})]})},Qe="btns___sNgTb",Ye="confirm___Ozirl",Xe="cancel___aiq1I",$e=function(e){var n=e.confirmShow,t=void 0===n||n,i=e.confirmTitle,a=e.confirmClick,r=e.cancelShow,l=void 0===r||r,s=e.cancelTitle,c=e.cancelClick,d=e.className,u=e.style,h=e.confirmLoading,m=void 0!==h&&h;return(0,o.jsxs)("div",{className:b()(Qe,d),style:u,children:[t&&(0,o.jsx)(He.ZP,{loading:m,onClick:a,type:"primary",className:Ye,children:i}),l&&(0,o.jsx)(He.ZP,{onClick:c,className:Xe,children:s})]})},en={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},nn=function(e){var n=e.className,t=e.style,i=void 0===t?{}:t,a=e.LeftContent,r=e.children,l=e.RightContent;return(0,o.jsx)("div",{className:b()(en.fixedBottom,n),style:i,children:(0,o.jsxs)("div",{className:en.wrap,children:[(0,o.jsx)("div",{className:en.left,children:a}),(0,o.jsx)("div",{className:en.center,children:r}),(0,o.jsx)("div",{className:en.right,children:l})]})})},tn="crumbs___V41Oe",an="hover___bEIVd",rn=function(e){var n=e.className,t=e.style,a=void 0===t?{}:t,r=e.dataSource,l=void 0===r?[]:r;return(0,o.jsx)("div",{className:b()(tn,n),style:a,children:l.map((function(e,n){return n<l.length-1?(0,o.jsxs)(i.Fragment,{children:[e.path?(0,o.jsx)("span",{className:an,onClick:function(){return ye.history.push(e.path)},children:e.name}):(0,o.jsx)("span",{children:e.name}),(0,o.jsxs)("span",{children:[" ",">"," "]})]},n):(0,o.jsx)("span",{style:{color:"#5F6368"},children:e.name},n)}))})},ln=t(31797),on=["onChange"],sn=ln.Z.Countdown,cn=function(e){var n=e.onChange,t=Ge()(e,on),a=(0,i.useState)(null),r=d()(a,2),l=r[0],s=r[1];(0,i.useEffect)((function(){"number"==typeof l&&l>=0&&n(l)}),[l]);return(0,o.jsx)(sn,Le()(Le()({},t),{},{onChange:function(e){var n=Math.floor(e/1e3);s(n)}}))}},56266:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var i=t(59301);function a(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])}},42541:function(e,n,t){"use strict";t.d(n,{h:function(){return i}});var i=function(e){return e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE",e}({})},76039:function(e,n,t){"use strict";t.d(n,{H7:function(){return m},MK:function(){return h},MU:function(){return s},X6:function(){return d},bM:function(){return o},fi:function(){return p},fu:function(){return l},n4:function(){return f},rX:function(){return u},vl:function(){return g},zO:function(){return c}});var i=t(82242),a=t.n(i),r=t(51136);function l(e,n){return(0,r.U2)("myproblems/".concat(e,".json"),a()({hidePopLogin:!0},n||{}))}function o(e,n){return(0,r.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function s(e,n){return(0,r.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function c(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,r.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function d(e){return(0,r.U2)("myproblems/record_detail.json",{id:e})}function u(e,n){return(0,r.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function h(e,n){return(0,r.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function m(e,n){return(0,r.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function p(e){return(0,r.v_)("myproblems/".concat(e,"/sync_code.json"))}function f(e,n){return(0,r.v_)("myproblems/".concat(e,"/update_code.json"),n)}function g(e,n){return(0,r.v_)("discusses/".concat(e,"/plus.json"),n)}},47723:function(e,n,t){"use strict";t.d(n,{Z:function(){return qe}});var i=t(82242),a=t.n(i),r=t(7557),l=t.n(r),o=t(41498),s=t.n(o),c=t(79800),d=t.n(c),u=t(59301),h={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},m=t(78241),p=t(6848),f=t(43418),g=t(97913),v=t(8591),x=t(8772),j=t(28103),w=t(3113),y=t(88590),b=t(95237),_=t(60324);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var N=t(42783),k=t(7880),C=t(6457),Z=t(51136);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var A=t(54801),S=t(37205),B=t.n(S),I=t(39647),T=t.n(I),P=t(24905),M=t(11094),E=t(50746),L=t(68324),D={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H"},O=t(37712),R=["globalSetting","loading","dispatch","isEdit","editData"],F=function(e,n){e.globalSetting,e.loading,e.dispatch;var t=e.isEdit,i=e.editData,r=(T()(e,R),(0,u.useState)("")),l=d()(r,2),o=l[0],s=l[1],c=(0,u.useState)(""),h=d()(c,2),m=h[0],p=h[1],g=(0,u.useState)([]),x=d()(g,2),j=x[0],w=x[1],y=(0,u.useState)(""),b=d()(y,2),_=b[0],N=b[1],k=(0,u.useState)(),Z=d()(k,2),A=Z[0],S=Z[1],I=(0,u.useState)(!1),F=d()(I,2),W=F[0],G=F[1],z=(0,u.useState)({}),H=d()(z,2),q=H[0],U=H[1];(0,u.useEffect)((function(){i&&t&&(s(null==i?void 0:i.name),p(null==i?void 0:i.analysis),S(null==i?void 0:i.is_ordered),U(i),G(!0))}),[i]),(0,u.useEffect)((function(){if(W){var e=null==i?void 0:i.standard_answer.map((function(e){return e.answer_text}));w(e),G(!1)}}),[W]),(0,u.useImperativeHandle)(n,(function(){return{onSave:V,Clear:K}}));var V=function(){var e=[],n=!1;return o?(j.forEach((function(t,i){e.push({position:i+1,answer_text:[]}),t.forEach((function(t,a){e[i].answer_text.push(t),t&&(0,C.eR)(t,1e4)||(N("".concat(i,"-").concat(a)),v.ZP.info(t?"答案不能超过10000字符":"答案:不能为空"),n=!0)}))})),!n&&((null==e?void 0:e.length)>20?(v.ZP.warning("填空题标准答案不能为空/不能超过20个"),!1):{name:o,analysis:m,standard_answers:e,is_ordered:A,downcase:null==q?void 0:q.downcase,no_space:null==q?void 0:q.no_space})):(v.ZP.info("请您输入题干"),!1)},K=function(){s(""),p(""),w([]),S(!1)},J=function(e,n,t){N("");var i=j.slice();i[e][n]=t,w(i)},Q=function(e){var n=j.slice();n[e]=[].concat(B()(n[e]),[""]),w(n)},Y=function(e,n){var t=j.slice();if(!t[e][n])return t[e]=t[e].filter((function(e,t){return t!==n})),void w(t);f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:D.modal,onOk:function(){t[e]=t[e].filter((function(e,t){return t!==n})),w(t)}})},X=function(e){f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:D.modal,onOk:function(){var n=j.slice();n=j.filter((function(n,t){return e!==t})),w(n)}})};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)("div",{children:(0,O.jsx)(E.Z,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:o,onChange:function(e){return s(e)},showNullButton:!0,onPlaceholderChange:function(e,n,t){var i=j.slice();if(n&&i.splice(e,n),t)for(var a=0;a<t;a++)i.splice(e+a,0,[""]);w(i)}})}),(0,O.jsx)("div",{className:"mt20",children:j.map((function(e,n){return(0,O.jsx)(L.Z,{answers:e,index:n,flex:1,is_md:!0,activeOptionErrorIndex:_,onAnswerChange:J,addChildAnswer:Q,deleteChildAnswer:Y,deleteChildAnswermain:X},n)}))}),(0,O.jsx)("div",{children:(0,O.jsx)(P.Z,{className:"".concat(D.color333," font14 mt20"),checked:q.downcase,onChange:function(e){return U(a()(a()({},q),{},{downcase:e.target.checked}))},children:"判分时忽略答案中的字母大小写"})}),(0,O.jsx)("div",{children:(0,O.jsx)(P.Z,{className:"".concat(D.color333," font14 mt20"),checked:q.no_space,onChange:function(e){return U(a()(a()({},q),{},{no_space:e.target.checked}))},children:"判分时忽略答案中的空格"})}),(0,O.jsx)("div",{className:"mt20",children:(null==j?void 0:j.length)>1&&(0,O.jsxs)("span",{children:[(0,O.jsx)(P.Z,{checked:A,onChange:function(e){return S(e.target.checked)},className:"".concat(D.color333," font14"),children:"多个填空的答案有顺序要求"}),(0,O.jsx)("span",{className:"".concat(D.color999," font12"),children:"(选中,每个填空的答案顺序必须与参考答案一致)"})]})}),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"题目解析:"})}),(0,O.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:m,onChange:function(e){return p(e)}})]})},W=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(F)),G=t(5112),z=["globalSetting","loading","editData","dispatch","onRef","isEdit"],H=function(e,n){e.globalSetting,e.loading;var t=e.editData,i=(e.dispatch,e.onRef,e.isEdit),a=(T()(e,z),(0,u.useState)()),r=d()(a,2),l=r[0],o=r[1],s=(0,u.useState)(""),c=d()(s,2),h=c[0],m=c[1],p=(0,u.useState)(""),f=d()(p,2),g=f[0],x=f[1];(0,u.useEffect)((function(){if(t&&i){m(null==t?void 0:t.name),x(null==t?void 0:t.analysis);var e=null==t?void 0:t.choices.find((function(e){return e.is_answer}));o("正确"===e.choice_text?"0":"1")}}),[t]),(0,u.useImperativeHandle)(n,(function(){return{onSave:j,Clear:w}}));var j=function(){return h?l?{name:h,choices:[{choice_text:"正确",is_answer:"0"===l?1:0},{choice_text:"错误",is_answer:"1"===l?1:0}],analysis:g}:(v.ZP.info("请先点击选择本选择题的正确选项"),!1):(v.ZP.info("请您输入题干"),!1)},w=function(){m(""),x(""),o("")};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:h,onChange:function(e){return m(e)}}),(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsxs)("span",{className:D.title,children:["答案选项:",(0,O.jsx)("span",{className:D.colorGray,children:"点击选项可设置正确答案"})]})]}),(0,O.jsxs)(G.ZP.Group,{buttonStyle:"solid",value:l,onChange:function(e){return o(e.target.value)},children:[(0,O.jsx)(G.ZP.Button,{value:"0",className:"".concat(D.radio," mr40"),children:"正确"}),(0,O.jsx)(G.ZP.Button,{value:"1",className:D.radio,children:"错误"})]}),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"题目解析:"})}),(0,O.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:g,onChange:function(e){return x(e)}})]})},q=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(H)),U=["globalSetting","loading","editData","dispatch","onRef","isEdit"],V=function(e,n){e.globalSetting,e.loading;var t=e.editData,i=(e.dispatch,e.onRef,e.isEdit),a=(T()(e,U),(0,u.useState)([])),r=d()(a,2),l=r[0],o=r[1];(0,u.useEffect)((function(){var e;if(t&&i){var n=null==t||null===(e=t.shixun)||void 0===e?void 0:e.challenges.map((function(e){return{id:null==e?void 0:e.id,score:e.score}}));o(n)}}),[t]),(0,u.useImperativeHandle)(n,(function(){return{onSave:s,Clear:c}}));var s=function(){return{challenges:B()(l)}},c=function(){o([])};console.log("editData--",t);var h,m;return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsx)(N.Z,{style:{paddingRight:10},className:D.titleHtml,value:"".concat(null==t?void 0:t.position)+"、"+"".concat(null==t?void 0:t.name)}),(0,O.jsxs)("p",{style:{marginBottom:"10px",marginTop:"25px"},children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"关卡"})]}),(h=t,(0,O.jsxs)("div",{children:[null==h||null===(m=h.shixun)||void 0===m||null===(m=m.challenges)||void 0===m?void 0:m.map((function(e,n){var t;return(0,O.jsxs)("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"},children:[(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{className:"mr5",children:["第",n+1,"关"]}),(0,O.jsx)(p.Z,{title:null==e?void 0:e.challenge_name,children:(0,O.jsx)("span",{children:(0,C.Pq)(null==e?void 0:e.challenge_name,44)})},n)]}),(0,O.jsxs)("p",{style:{marginBottom:0},children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"分值:"}),(0,O.jsx)(g.Z,{precision:1,min:1,max:100,className:D.baseFormItem,style:{width:176},value:null===(t=l.find((function(n){return n.id===e.id})))||void 0===t?void 0:t.score,onChange:function(n){l.find((function(n){return n.id===e.id})).score=n,o(B()(l))}})]})]})})),(0,O.jsx)("div",{style:{clear:"both"}})]}))]})},K=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(V)),J=["editData","globalSetting","loading","dispatch","onRef","isEdit"],Q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Y=function(e,n){var t=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(T()(e,J),(0,u.useState)([])),r=d()(a,2),l=r[0],o=r[1],s=(0,u.useState)(),c=d()(s,2),h=c[0],m=c[1],f=(0,u.useState)([]),g=d()(f,2),x=g[0],j=g[1],w=(0,u.useState)(""),y=d()(w,2),b=y[0],_=y[1],k=(0,u.useState)(""),C=d()(k,2),Z=C[0],A=C[1];(0,u.useEffect)((function(){o(["","","",""])}),[]),(0,u.useEffect)((function(){if(t&&i){_(null==t?void 0:t.name),A(null==t?void 0:t.analysis),o(null==t?void 0:t.choices.map((function(e){return e.choice_text})));var e=[];null==t||t.choices.map((function(n,t){n.is_answer&&e.push(t)})),j(e)}}),[t]),(0,u.useImperativeHandle)(n,(function(){return{onSave:S,Clear:I}}));var S=function(){if(!b)return v.ZP.info("请您输入题干"),!1;var e=l.findIndex((function(e){return!e}));if(e>-1)return v.ZP.info("请先输入 ".concat(Q[e]," 选项的内容")),!1;if(!x.length)return v.ZP.info("请设置本题的正确答案点击选项A/B...即可完成设置"),!1;if(x.length<2)return v.ZP.info("多选题最小正确选项为2个"),!1;var n=l.map((function(e,n){return{choice_text:e,is_answer:x.includes(n)?1:0}}));return{name:b,choices:n,analysis:Z}},I=function(){o(["","","",""]),_(""),A(""),j("")};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:b,onChange:function(e){return _(e)}}),(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsxs)("span",{className:D.title,children:["答案选项:",(0,O.jsx)("span",{className:D.colorGray,children:"点击选项可设置正确答案"})]})]}),l.map((function(e,n){return(0,O.jsxs)("div",{className:D.choiceWrap,children:[(0,O.jsx)(p.Z,{title:"点击设置为标准答案",placement:"left",children:(0,O.jsx)("div",{className:"".concat(D.answer," ").concat(x.includes(n)?D.activeAnswer:""),onClick:function(){x.includes(n)?j(x.filter((function(e){return e!==n}))):j([].concat(B()(x),[n]))},children:Q[n]})}),(0,O.jsx)("div",{className:D.editorWrap,children:h===n?(0,O.jsx)(M.Z,{id:"single-question-option-".concat(n),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){l[n]=e,o(l)}}):(0,O.jsx)("div",{className:D.htmlWrap,onClick:function(){return m(n)},children:(0,O.jsx)(N.Z,{value:e})})}),n>1&&(0,O.jsx)(p.Z,{title:"删除",children:(0,O.jsx)("i",{className:"".concat(D.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){o(l.filter((function(e,t){return t!==n}))),x.includes(n)?j(x.filter((function(e){return e!==n}))):j([].concat(B()(x),[n]))}})}),n<7&&n===l.length-1&&(0,O.jsx)(p.Z,{title:"新增参考答案",children:(0,O.jsx)("i",{className:"".concat(D.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return o([].concat(B()(l),[""]))}})})]},n)})),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"题目解析:"})}),(0,O.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:Z,onChange:function(e){return A(e)}})]})},X=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(Y)),$=["editData","globalSetting","loading","dispatch","onRef","isEdit"],ee=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ne=function(e,n){var t=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(T()(e,$),(0,u.useState)([])),r=d()(a,2),l=r[0],o=r[1],s=(0,u.useState)(),c=d()(s,2),h=c[0],m=c[1],f=(0,u.useState)(),g=d()(f,2),x=g[0],j=g[1],w=(0,u.useState)(""),y=d()(w,2),b=y[0],_=y[1],k=(0,u.useState)(""),C=d()(k,2),Z=C[0],A=C[1];(0,u.useEffect)((function(){o(["","","",""])}),[]),(0,u.useEffect)((function(){t&&i&&(_(null==t?void 0:t.name),A(null==t?void 0:t.analysis),o(null==t?void 0:t.choices.map((function(e){return e.choice_text}))),j(null==t?void 0:t.choices.findIndex((function(e){return e.is_answer}))))}),[t]),(0,u.useImperativeHandle)(n,(function(){return{onSave:S,Clear:I}}));var S=function(){if(!b)return v.ZP.info("请您输入题干"),!1;var e=l.findIndex((function(e){return!e}));if(e>-1)return v.ZP.info("请先输入 ".concat(ee[e]," 选项的内容")),!1;if(console.log("activeAnswer: ",x),"number"!=typeof x)return v.ZP.info("请设置本题的正确答案点击选项A/B...即可完成设置"),!1;var n=l.map((function(e,n){return{choice_text:e,is_answer:x===n?1:0}}));return{name:b,choices:n,analysis:Z}},I=function(){o(["","","",""]),_(""),A(""),j("")};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:b,onChange:function(e){return _(e)}}),(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsxs)("span",{className:D.title,children:["答案选项:",(0,O.jsx)("span",{className:D.colorGray,children:"点击选项可设置正确答案"})]})]}),l.map((function(e,n){return(0,O.jsxs)("div",{className:D.choiceWrap,children:[(0,O.jsx)(p.Z,{title:"点击设置为标准答案",placement:"left",children:(0,O.jsx)("div",{className:"".concat(D.answer," ").concat(x===n?D.activeAnswer:""),onClick:function(){return j(n)},children:ee[n]})}),(0,O.jsx)("div",{className:D.editorWrap,children:h===n?(0,O.jsx)(M.Z,{id:"single-question-option-".concat(n),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){l[n]=e,o(l)}}):(0,O.jsx)("div",{className:D.htmlWrap,onClick:function(){return m(n)},children:(0,O.jsx)(N.Z,{value:e})})}),n>1&&(0,O.jsx)(p.Z,{title:"删除",children:(0,O.jsx)("i",{className:"".concat(D.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){o(l.filter((function(e,t){return t!==n}))),n===x&&j(null)}})}),n<7&&n===l.length-1&&(0,O.jsx)(p.Z,{title:"新增参考答案",children:(0,O.jsx)("i",{className:"".concat(D.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return o([].concat(B()(l),[""]))}})})]},n)})),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"题目解析:"})}),(0,O.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:Z,onChange:function(e){return A(e)}})]})},te=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(ne)),ie=["editData","globalSetting","loading","dispatch","onRef","isEdit"],ae=function(e,n){var t=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(T()(e,ie),(0,u.useState)("")),r=d()(a,2),l=r[0],o=r[1],s=(0,u.useState)(""),c=d()(s,2),h=c[0],m=c[1],p=(0,u.useState)(""),f=d()(p,2),g=f[0],x=f[1];(0,u.useEffect)((function(){var e;t&&i&&(o(null==t?void 0:t.name),m(null==t?void 0:t.analysis),x(null==t||null===(e=t.answer_texts)||void 0===e?void 0:e[0]))}),[t]),(0,u.useImperativeHandle)(n,(function(){return{onSave:j,Clear:w}}));var j=function(){return l?g?{name:l,answer_texts:[g],analysis:h}:(v.ZP.info("请您输入参考答案"),!1):(v.ZP.info("请您输入题干"),!1)},w=function(){o(""),m(""),x("")};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:l,onChange:function(e){return o(e)}}),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"参考答案:"})}),(0,O.jsx)(M.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:g,onChange:function(e){return x(e)}}),(0,O.jsx)("p",{className:D.titleWrap,children:(0,O.jsx)("span",{className:D.title,children:"题目解析:"})}),(0,O.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:h,onChange:function(e){return m(e)}})]})},re=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(ae)),le=t(36381),oe=t(85573),se=t.n(oe),ce=t(43604),de={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},ue=t(88996),he=t(12101),me=["value","onChange","scrollId"],pe=function(e){var n=e.value,t=e.onChange,i=e.scrollId,r=T()(e,me);return(0,O.jsx)("div",{id:i||"",children:(0,O.jsx)(M.Z,a()(a()({},r),{},{defaultValue:n,onChange:function(e,n){null!=n&&n.length?t(e,n):t(e)}}))})},fe=function(e){var n=e.value,t=e.onChange,i=e.placeholder,a=e.height,r=void 0===a?140:a;return e.isEdit?(0,O.jsx)(M.Z,{watch:!0,isFocus:!0,height:r,placeholder:i,defaultValue:n,onChange:t}):(0,O.jsx)("div",{style:{cursor:"pointer"},children:n?(0,O.jsx)(N.Z,{className:de.inputBorder,value:n}):(0,O.jsx)("div",{className:"".concat(de.inputBorder," ").concat(de.placeholder),children:i})})},ge=["key","name"],ve=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],xe=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,r=e.answerKey,l=e.index,o=e.isEdit,s=e.setInputActive,c=e.form,d=e.choiceOptionsPath,u=e.allowChangeMode,h=e.showAddIcon,m=e.addItem,f=e.deleteItem,g=!0===(null==n?void 0:n[r]),v=function(){var e;g?t(a()(a()({},n),{},se()({},r,!1))):(u||(e=c.getFieldValue(d),c.setFieldValue(d,e.map((function(e){return a()(a()({},e),{},se()({},r,!1))})))),t(a()(a()({},n),{},se()({},r,!0))))};return(0,O.jsxs)(b.Z,{className:de.choiceWrap,align:"middle",wrap:!1,children:[(0,O.jsx)(ce.Z,{onClick:v,className:"".concat(de.choiceIndex," ").concat(g?de.activeAnswer:""),children:ve[l]}),(0,O.jsx)(ce.Z,{flex:1,className:"".concat(de.editorWrap," ml15"),onClick:s,children:(0,O.jsx)(fe,{height:155,placeholder:"请您输入选项",isEdit:o,value:null==n?void 0:n[i],onChange:function(e){t(a()(a()({},n),{},se()({},i,e)))}})}),(0,O.jsx)(ce.Z,{flex:"0 0 auto",className:"ml15",children:(0,O.jsx)("div",{onClick:v,className:"".concat(de.setAnswerBtn," ").concat(g?de.activeAnswer:""),children:g?"正确答案":"设为答案"})}),(0,O.jsxs)(ce.Z,{className:de.actionWrapper,children:[(0,O.jsx)(p.Z,{title:"新增参考答案",children:(0,O.jsx)(ue.Z,{className:de.addIcon,onClick:m,style:{visibility:h?"visible":"hidden"}})}),(0,O.jsx)(p.Z,{title:"删除",children:(0,O.jsx)(he.Z,{className:de.deleteIcon,onClick:f,style:{visibility:l>1?"visible":"hidden"}})})]})]})},je=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,r=e.analysisKey,l=e.choiceTextKey,o=e.answerKey,s=e.choiceOptionsPath,c=e.allowChangeMode,h=void 0===c||c,p=e.form,f=e.showAnalysis,g=void 0===f||f,v=(0,u.useState)(),x=d()(v,2),j=x[0],w=x[1],y=(0,u.useState)(!1),b=d()(y,2),_=b[0],N=b[1];return(0,O.jsxs)("div",{className:de.wrap,children:[(0,O.jsx)("div",{className:de.questionTitleEditorWrap,children:(0,O.jsx)(m.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,O.jsx)(pe,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,O.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,O.jsx)(m.Z.List,{name:i,rules:[{validator:function(e,n){var t=n.some((function(e){return 1===e[o]})),i=n.findIndex((function(e){var n;return(null===(n=e[l])||void 0===n?void 0:n.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(ve[i],"选项的内容"))):t?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,n){var t=n.add,i=n.remove;return(0,O.jsxs)("div",{id:Array.isArray(s)?s.join("_"):"".concat(s),children:[e.map((function(n,r){var c=n.key,d=n.name,f=T()(n,ge),g=j===c,v=r<7&&r===e.length-1;return(0,u.createElement)(m.Z.Item,a()(a()({},f),{},{key:c,name:d,noStyle:!0}),(0,O.jsx)(xe,{choiceTextKey:l,answerKey:o,index:r,isEdit:g,setInputActive:function(){w(c)},form:p,choiceOptionsPath:s,allowChangeMode:h,showAddIcon:v,addItem:function(){return t(se()(se()({},l,""),o,0))},deleteItem:function(){return i(d)}}))})),e.length<8&&(0,O.jsx)("div",{className:"".concat(de.addBtn," mb30"),onClick:function(){return t(se()(se()({},l,""),o,0))},children:"添加选项"})]})}}),g&&(0,O.jsx)("div",{onClick:function(){return N(!0)},children:(0,O.jsx)(m.Z.Item,{name:r,label:"题目解析",labelCol:{span:24},children:(0,O.jsx)(fe,{placeholder:"请编辑题目解析(非必填)",isEdit:_})})})]})},we=t(91232),ye=t.n(we),be=t(78673),_e=["key","name"],Ne=function(e){var n=e.value,t=e.onChange;return(0,O.jsxs)(b.Z,{align:"middle",className:"ml20",gutter:[40,20],children:[null==n?void 0:n.map((function(e,i){return(0,O.jsxs)(ce.Z,{className:de.blankWrapper,children:[(0,O.jsx)(x.Z,{className:de.blankInput,defaultValue:e,maxLength:1e3,onBlur:function(e){var a=B()(n),r=e.target.value.trim();a[i]=r,t(a)}}),(0,O.jsx)(p.Z,{title:"删除",children:(0,O.jsx)(he.Z,{className:de.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:de.modal,onOk:function(){var i=B()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))})),(0,O.jsx)(ce.Z,{children:(0,O.jsx)("div",{className:"".concat(de.addBtn),onClick:function(){var e;(e=B()(n)).push(""),t(e)},children:"新增答案"})})]})},ke=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,O.jsx)(be.Z,{checked:!t,onChange:function(e){i(!e)}})},Ce="▁",Ze=function(e){var n,t=e.questionTitlePlaceholder,i=e.form,r=e.name,l=(e.scoreByBlank,e.answerKey),o=e.titleKey,s=void 0===o?"name":o,c=e.analysisKey,h=void 0===c?"analysis":c,p=e.isOrdered,f=void 0===p?"is_ordered":p,g=(0,u.useState)(!1),v=d()(g,2),j=v[0],w=v[1],y=function(e,n){for(var t=n.line,i=0,a=0;a<t;a++)i+=e.getLine(a).split(Ce).length-1;return i+=e.getLine(t).substring(0,n.ch).split(Ce).length-1},_=function(){var e=i.getFieldValue(["sub_item_banks"].concat(B()(l)));i.setFieldValue(["sub_item_banks"].concat(B()(l)),null==e?void 0:e.map((function(e,n){return a()(a()({},e),{},{position:n+1})})))},N=(0,u.useRef)(),k=function(e,n){for(var t=0;t<e;t++)N.current({position:null,answer_text:[""]},n+t);_()},C=(0,u.useRef)(),Z=function(e){C.current(e),_()},A=null===(n=i.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==l?void 0:l[0]])||void 0===n?void 0:n[null==l?void 0:l[1]];return(0,O.jsxs)("div",{className:de.wrap,children:[(0,O.jsx)("div",{className:de.questionTitleEditorWrap,children:(0,O.jsx)(m.Z.Item,{label:"题干",name:s,labelCol:{span:24},rules:[{required:!0}],children:(0,O.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:t,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var a=e.getRange(n.from,n.to),r=0;if(n.text.forEach((function(e){r+=e.split(Ce).length-1})),"setValue"!==n.origin)if(a&&-1!==a.indexOf(Ce)){var l=a.split(Ce).length-1,o=y(e,n.from);console.log("删除".concat(l,"个, 前面有").concat(o,"个,新增").concat(r,"个")),i(l>1?Array.from({length:l},(function(e,n){return o+n})):o)}else if(r>0){var s=y(e,n.from);console.log("新增".concat(r,"个,之前有").concat(s,"个")),t(r,s)}}(e,n,k,Z)}})})}),(0,O.jsx)(m.Z.List,{name:l,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("答案不能为空"));var t,i=ye()(n);try{for(i.s();!(t=i.n()).done;){var a=(t.value||{}).answer_text;if(null!=a&&a.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,r=n.remove;t.errors;return N.current=i,C.current=r,(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),e.map((function(e,n){var t=e.key,i=e.name,r=T()(e,_e);return(0,O.jsxs)(b.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,O.jsxs)(ce.Z,{flex:"0 0 auto",className:"".concat(de.blankIndex),children:["填空项",n+1]}),(0,O.jsxs)(ce.Z,{flex:1,children:[(0,O.jsx)(b.Z,{align:"top",justify:"space-between",wrap:!1,children:(0,O.jsx)(ce.Z,{children:(0,O.jsx)(m.Z.Item,a()(a()({},r),{},{name:[i,"answer_text"],noStyle:!0,children:(0,O.jsx)(Ne,{})}))})}),(0,O.jsx)(m.Z.Item,a()(a()({},r),{},{name:[i,"position"],noStyle:!0,children:(0,O.jsx)(x.Z,{type:"hidden"})}))]})]},t)}))]})}}),(0,O.jsxs)(b.Z,{align:"middle",children:[(0,O.jsx)(m.Z.Item,{name:[r,"downcase"],valuePropName:"checked",children:(0,O.jsx)(be.Z,{})}),(0,O.jsx)(ce.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,O.jsxs)(b.Z,{align:"middle",children:[(0,O.jsx)(m.Z.Item,{name:[r,"no_space"],valuePropName:"checked",children:(0,O.jsx)(be.Z,{})}),(0,O.jsx)(ce.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==A?void 0:A.length)>1&&(0,O.jsxs)(b.Z,{align:"middle",className:(null==A?void 0:A.length)>1?"mb30":"".concat(de.hide),children:[(0,O.jsx)(m.Z.Item,{name:f,children:(0,O.jsx)(ke,{})}),(0,O.jsx)(ce.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,O.jsx)("div",{onClick:function(){return w(!0)},children:(0,O.jsx)(m.Z.Item,{name:h,label:"题目解析",labelCol:{span:24},children:(0,O.jsx)(fe,{placeholder:"请编辑题目解析(非必填)",isEdit:j})})})]})},Ae=["key","name"],Se=se()(se()({},"正确","T"),"错误","F"),Be=function(e){var n=e.value,t=e.onChange,i=e.form,r=e.choiceKey,l=!0===(null==n?void 0:n.is_answer),o=null==n?void 0:n.choice_text,s=function(){var e,l=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(B()(r))))||void 0===e?void 0:e.map((function(e){return{choice_text:null==e?void 0:e.choice_text,is_answer:!1}}));null==i||i.setFieldValue(["sub_item_banks"].concat(B()(r)),l),t(a()(a()({},n),{},{is_answer:!0}))};return(0,O.jsxs)(b.Z,{className:de.choiceWrap,align:"middle",wrap:!1,children:[(0,O.jsx)(ce.Z,{onClick:s,className:"".concat(de.choiceIndex," ").concat(de.judgementIndex," ").concat(l?de.activeAnswer:""),children:Se[o]}),(0,O.jsx)(ce.Z,{flex:1,className:"".concat(de.editorWrap," ml15"),children:(0,O.jsx)("div",{className:"".concat(de.inputBorder," ").concat(de.placeholder," ").concat(l?de.activeJudgementAnswer:""),children:o})}),(0,O.jsx)(ce.Z,{flex:"0 0 auto",className:"ml15",children:(0,O.jsx)("div",{onClick:s,className:"".concat(de.setAnswerBtn," ").concat(l?de.activeAnswer:""),children:l?"正确答案":"设为答案"})})]})},Ie=function(e){var n=e.questionTitlePlaceholder,t=e.choiceKey,i=void 0===t?"choices":t,r=e.form,l=e.titleKey,o=void 0===l?"name":l,s=e.analysisKey,c=void 0===s?"analysis":s,h=(0,u.useState)(!1),p=d()(h,2),f=p[0],g=p[1];return(0,O.jsxs)("div",{className:de.wrap,children:[(0,O.jsx)("div",{className:de.questionTitleEditorWrap,children:(0,O.jsx)(m.Z.Item,{label:"题干",name:o,labelCol:{span:24},rules:[{required:!0}],children:(0,O.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,O.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,O.jsx)(m.Z.List,{name:i,rules:[{validator:function(e,n){return n.some((function(e){return!0===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,O.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,t=e.name,l=T()(e,Ae);return(0,u.createElement)(m.Z.Item,a()(a()({},l),{},{key:n,name:t,noStyle:!0}),(0,O.jsx)(Be,{form:r,choiceKey:i}))}))})}})}),(0,O.jsx)("div",{onClick:function(){return g(!0)},children:(0,O.jsx)(m.Z.Item,{name:c,label:"题目解析",labelCol:{span:24},children:(0,O.jsx)(fe,{placeholder:"请编辑题目解析(非必填)",isEdit:f})})})]})},Te=["value","onChange"],Pe=function(e){var n=e.value,t=e.onChange,i=T()(e,Te);return(0,O.jsx)(M.Z,a()(a()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},Me=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,a=e.isMustKeyWords,r=void 0===a?i:a,l=e.titleKey,o=void 0===l?"name":l,s=e.analysisKey,c=void 0===s?"analysis":s,h=e.answerTexts,p=void 0===h?"answer_texts":h,f=(e.keywords,e.useKeywords),g=void 0===f?"use_keywords":f,v=(e.indexs,(0,u.useState)(!1)),x=d()(v,2),j=x[0],w=x[1],y=(0,u.useState)(""),b=d()(y,2),_=(b[0],b[1],(0,u.useState)(!1)),N=d()(_,2);N[0],N[1],m.Z.useWatch("question_score",t);return(0,O.jsxs)("div",{className:de.wrap,children:[(0,O.jsx)("div",{className:de.questionTitleEditorWrap,children:(0,O.jsx)(m.Z.Item,{label:"题干",name:o,labelCol:{span:24},rules:[{required:!0}],children:(0,O.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,O.jsx)(m.Z.Item,{label:"参考答案",name:p,labelCol:{span:24},children:(0,O.jsx)(Pe,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!r&&(0,O.jsx)(m.Z.Item,{hidden:!0,name:g,valuePropName:"checked",children:(0,O.jsx)(be.Z,{defaultChecked:!0})}),(0,O.jsx)("div",{onClick:function(){return w(!0)},children:(0,O.jsx)(m.Z.Item,{name:c,label:"题目解析",labelCol:{span:24},children:(0,O.jsx)(fe,{placeholder:"请编辑题目解析(非必填)",isEdit:j})})})]})},Ee=["globalSetting","loading","dispatch","editData","onRef","isEdit"],Le=["key","name"],De=le.Z.Panel,Oe=function(e,n){e.globalSetting,e.loading,e.dispatch;var t=e.editData,i=(e.onRef,e.isEdit),r=(T()(e,Ee),(0,u.useState)("")),l=d()(r,2),o=l[0],s=l[1],c=(0,u.useState)([]),h=d()(c,2),p=h[0],f=h[1],g=m.Z.useForm(),x=d()(g,1)[0];(0,u.useEffect)((function(){t&&i&&(s(null==t?void 0:t.name),f(null==t?void 0:t.sub_item_banks),x.setFieldsValue(a()({},t)))}),[t]),(0,u.useEffect)((function(){f(x.getFieldValue("sub_item_banks"))}),[m.Z.useWatch("sub_item_banks",x)]),(0,u.useImperativeHandle)(n,(function(){return{onSave:j,Clear:w}}));var j=function(){if(!o)return v.ZP.info("请您输入题干"),!1;var e=p.map((function(e){return a()({id:e.id>1?e.id:null},e)}));return{name:o,sub_item_banks:e}},w=function(){s(""),f([])},y={single:"单选题",multiple:"多选题",judgement:"判断题",completion:"填空题",subjective:"简答题",practical:"实训题",program:"编程题",bprogram:"程序填空题",combination:"组合题"};return(0,O.jsxs)("section",{className:D.wrap,children:[(0,O.jsxs)("p",{className:D.titleWrap,children:[(0,O.jsx)("span",{className:D.required,children:"*"}),(0,O.jsx)("span",{className:D.title,children:"题干:"})]}),(0,O.jsx)(M.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:o,onChange:function(e){return s(e)}}),(0,O.jsx)(m.Z,{form:x,autoComplete:"off",children:(0,O.jsx)(m.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,n){return n?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,n){n.add,n.remove;var t=x.getFieldValue("sub_item_banks");return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(le.Z,{className:e.length>0?D.collapseWrapper:"",bordered:!1,expandIcon:function(e){var n=e.isActive;return(0,O.jsx)("i",{className:"iconfont icon-weizhankai ".concat(n?D.open:D.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(e,n){var i,r,l,o,s,c,d,u=e.key,h=e.name,p=T()(e,Le);return(0,O.jsx)(De,{className:D.panel,forceRender:!0,header:(0,O.jsxs)("div",{className:D.panelHeader,children:["第",n+1,"小题",(0,O.jsxs)("span",{children:["",y[null==t||null===(i=t[h])||void 0===i?void 0:i.item_type],""]})]}),children:(0,O.jsxs)(m.Z.Item,a()(a()({},p),{},{name:h,children:[("single"==(null==t||null===(r=t[h])||void 0===r?void 0:r.item_type)||"multiple"==(null==t||null===(l=t[h])||void 0===l?void 0:l.item_type))&&(0,O.jsx)(je,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:"single"!=(null==t||null===(o=t[h])||void 0===o?void 0:o.item_type),form:x,choiceKey:[h,"choices"],titleKey:[h,"name"],analysisKey:[h,"analysis"],choiceOptionsPath:["sub_item_banks",h,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),"completion"==(null==t||null===(s=t[h])||void 0===s?void 0:s.item_type)&&(0,O.jsx)(Ze,{form:x,name:h,questionTitlePlaceholder:"请编辑题干并设置填空项",scoreByBlank:!0,titleKey:[h,"name"],analysisKey:[h,"analysis"],isOrdered:[h,"is_ordered"],answerKey:[h,"standard_answer"]}),"judgement"==(null==t||null===(c=t[h])||void 0===c?void 0:c.item_type)&&(0,O.jsx)(Ie,{form:x,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[h,"name"],analysisKey:[h,"analysis"],choiceKey:[h,"choices"]}),"subjective"==(null==t||null===(d=t[h])||void 0===d?void 0:d.item_type)&&(0,O.jsx)(Me,{showKeywords:!0,form:x,titleKey:[h,"name"],analysisKey:[h,"analysis"],answerTexts:[h,"answer_texts"],useKeywords:[h,"use_keywords"],keywords:[h,"keywords"],indexs:h,questionTitlePlaceholder:"请编辑简答题题干内容"})]}))},u)}))})})}})})]})},Re=(0,k.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,u.forwardRef)(Oe)),Fe=t(58499),We=function(e){var n=e.visible,t=e.onCancel,i=e.onRandomExchange,a=e.selectFromProblemSet,r=e.questionParams;return(0,O.jsx)(f.Z,{title:"请选择替换方式",open:n,onCancel:t,centered:!0,maskClosable:!0,footer:null,children:(0,O.jsxs)(b.Z,{justify:"center",className:"pb20",children:[(0,O.jsx)(Fe.Z,{onClick:i,children:"随机更换"}),"PRACTICAL"!==(null==r?void 0:r.type)&&(0,O.jsx)(w.ZP,{style:{marginLeft:24},onClick:a,children:"从题库中选择"})]})})},Ge=t(90963),ze=t(94057),He=t(24334),qe=function(e){var n,t,i,r,o,c,S,B,I,T,P,M=e.data,E=e.submit,L=e.goBack,D=(e.loading,e.onTypeScore),R=e.editPreview,F=void 0!==R&&R,G=e.onSkipExamination,z=e.selectValue,H=e.onExchange,U=(0,u.useRef)(),V=(0,u.useState)(null),J=d()(V,2),Q=J[0],Y=J[1],$=(0,u.useState)(!1),ee=d()($,2),ne=ee[0],ie=ee[1],ae=(0,u.useState)(!1),le=d()(ae,2),oe=le[0],se=le[1],ce=(0,u.useRef)(),de=m.Z.useForm(),ue=d()(de,1)[0],he=(0,k.useParams)(),me=(0,u.useState)(!1),pe=d()(me,2),fe=pe[0],ge=pe[1];(0,u.useEffect)((function(){ie(!0)}),[]),(0,u.useEffect)((function(){F||(0,C.Dk)("试卷预览")}),[F]);var ve=["容易","简单","适中","困难"],xe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],je={SINGLE:"单选题",MULTIPLE:"多选题",JUDGMENT:"判断题",COMPLETION:"填空题",SUBJECTIVE:"简答题",PRACTICAL:"实训题",PROGRAM:"编程题",BPROGRAM:"程序填空题",COMBINATION:"组合题"},we={single:"单选题",multiple:"多选题",judgement:"判断题",completion:"填空题",subjective:"简答题",practical:"实训题",program:"编程题",bprogram:"程序填空题",combination:"组合题"},ye=function(e,n){var t,i=null==e||null===(t=e.standard_answer)||void 0===t?void 0:t.map((function(e,n){var t;return(0,O.jsx)("div",{children:"答案(填空".concat(null==e?void 0:e.position,"").concat(null==e||null===(t=e.answer_text)||void 0===t?void 0:t.join("、"))},n)}));return(0,O.jsx)(u.Fragment,{children:(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("div",{style:{display:"flex"},children:[(0,O.jsx)("div",{children:"正确答案:"}),(0,O.jsx)("div",{children:i})]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),n?"".concat((null==n?void 0:n.discipline_name)||"--","/").concat(null==n?void 0:n.sub_discipline_name):"".concat((null==e?void 0:e.discipline_name)||"--","/").concat(null==e?void 0:e.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:n?null==n?void 0:n.tag_discipline_name:null==e?void 0:e.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),n?null==n?void 0:n.tag_discipline_name:null==e?void 0:e.tag_discipline_name]})})]})]})})},be=function(e){var n,t=null==e||null===(n=e.standard_answer)||void 0===n?void 0:n.map((function(e,n){return(0,O.jsx)("div",{children:"答案(填空".concat((null==e?void 0:e.position)||(null==e?void 0:e.exercise_choice_id),"").concat(null==e?void 0:e.answer_text)},n)}));return(0,O.jsx)(u.Fragment,{children:(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("div",{style:{display:"flex"},children:[(0,O.jsx)("div",{children:"正确答案:"}),(0,O.jsx)("div",{children:t})]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),"".concat((null==e?void 0:e.discipline_name)||"--","/").concat(null==e?void 0:e.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:null==e?void 0:e.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==e?void 0:e.tag_discipline_name]})})]})]})})},_e=function(e,n){var t;return(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("div",{children:["正确答案:",null==e||null===(t=e.answer_texts)||void 0===t?void 0:t[0]]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),n?"".concat((null==n?void 0:n.discipline_name)||"--","/").concat(null==n?void 0:n.sub_discipline_name):"".concat((null==e?void 0:e.discipline_name)||"--","/").concat(null==e?void 0:e.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:n?null==n?void 0:n.tag_discipline_name:null==e?void 0:e.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),n?null==n?void 0:n.tag_discipline_name:null==e?void 0:e.tag_discipline_name]})})]})]})},Ne=function(e){var n,t;return(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"预期输出:"}),(0,O.jsx)(N.Z,{value:null==e||null===(n=e.program_attr)||void 0===n?void 0:n.description})]}),(0,O.jsxs)("div",{style:{marginTop:20},children:["正确答案:",(null==e||null===(t=e.program_attr)||void 0===t?void 0:t.answer_text)||"--"]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),"".concat((null==e?void 0:e.discipline_name)||"--","/").concat(null==e?void 0:e.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:null==e?void 0:e.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==e?void 0:e.tag_discipline_name]})})]})]})},ke=function(e){var n,t;return(0,O.jsxs)("div",{style:{marginTop:"12px"},children:[null==e||null===(n=e.shixun)||void 0===n||null===(n=n.challenges)||void 0===n?void 0:n.map((function(e,n){return(0,O.jsxs)("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{className:"mr5",children:["第",n+1,"关"]}),(0,O.jsx)(p.Z,{title:null==e?void 0:e.challenge_name,children:(0,O.jsx)("span",{children:(0,C.Pq)(null==e?void 0:e.challenge_name,44)})},n)]}),F&&(0,O.jsxs)("div",{children:["分值:",e.score,"分"]})]})})),(0,O.jsx)(k.Link,{style:{float:"right"},target:"_blank",to:"/shixuns/".concat(null==e||null===(t=e.shixun)||void 0===t?void 0:t.identifier,"/challenges"),children:"实训详情"}),(0,O.jsx)("div",{style:{clear:"both"}})]})},Ce=function(e){console.log(e,"key"),G(e-1)},Ze=function(e,n){if("SINGLE"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(te,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});if("MULTIPLE"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(X,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});if("JUDGMENT"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(q,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});if("COMPLETION"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(W,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});if("SUBJECTIVE"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(re,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});if("COMBINATION"===n)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Re,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]});var t,i;if("BPROGRAM"===n)return(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)(m.Z,{form:ue,style:{marginTop:20},onFinishFailed:function(e){var n;e.errorFields[0].name.includes("standard_answers")?v.ZP.error("填空项答案不能为空"):v.ZP.error(e.errorFields[0].errors[0]),ue.scrollToField(null==e||null===(n=e.errorFields)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.name,{behavior:"smooth",block:"center"})},onFinish:function(){var n=s()(l()().mark((function n(t){var i,r,o;return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=a()(a()({question_score:e.score},t),{},{question_type:8,hack:a()(a()({},t.hack),{},{difficult:e.program_attr.difficult}),hack_codes:a()(a()({},t.hack_codes),{},{code:He.Base64.encode(null===(i=t.hack_codes)||void 0===i?void 0:i.code)})}),fe&&(r.is_cover=1),n.next=4,(0,Z.ZP)("/api/exercise_questions/".concat(e.id,".json"),{method:"put",body:r});case 4:0===(null==(o=n.sent)?void 0:o.status)&&(v.ZP.success("编辑成功"),Ce(z+1)),Y(null);case 7:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),children:[(0,O.jsx)(ze.tc,{form:ue,questionTitlePlaceholder:"请编辑题干并设置填空项",scoreByBlank:!1,hackidentifier:null==e||null===(t=e.program_attr)||void 0===t?void 0:t.identifier,answerKey:"standard_answers"}),(0,O.jsx)(j.Z,{})]})});"PROGRAM"===n&&k.history.push("/problems/".concat(null==e||null===(i=e.program_attr)||void 0===i?void 0:i.identifier,"/edit?type=exercises&express_id=").concat(he.categoryId,"&question_id=").concat(null==e?void 0:e.id,"&score=").concat(null==e?void 0:e.score,"&callback_url=").concat(location.pathname,"&select=").concat(z,"&exercise=true"));return"PRACTICAL"===n?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(K,{ref:U,editData:e,isEdit:!0}),(0,O.jsx)(j.Z,{})]}):void 0},Ae=function(){var e=s()(l()().mark((function e(n,t,i){var r,o,s,c,d,u,h,m,p,f;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=U.current)||void 0===r?void 0:r.onSave();case 2:if(o=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(s={question_score:t.score,analysis:o.analysis},i&&(s.is_cover=1),"SINGLE"!==n&&"MULTIPLE"!==n&&"JUDGMENT"!==n||(d=[],u=[],s.question_type="JUDGMENT"===n?2:1,s.question_title=null==o?void 0:o.name,null==o||null===(c=o.choices)||void 0===c||c.forEach((function(e,n){d.push(e.choice_text),null!=e&&e.is_answer&&u.push(n+1)})),s.question_choices=d,s.standard_answers=u),"COMPLETION"===n&&(s.is_ordered=o.is_ordered,s.question_title=null==o?void 0:o.name,s.question_type=3,m=[],null==o||null===(h=o.standard_answers)||void 0===h||h.forEach((function(e,n){m.push({choice_id:e.position,answer_text:e.answer_text})})),s.standard_answers=m,s.downcase=null==o?void 0:o.downcase,s.no_space=null==o?void 0:o.no_space),"SUBJECTIVE"===n&&(console.log("editorData"),console.log(o),s.question_title=null==o?void 0:o.name,s.question_type=4,s.answer_texts=null==o?void 0:o.answer_texts),"COMBINATION"===n&&(s.question_title=null==o?void 0:o.name,s.question_type=7,s.sub_questions=null==o||null===(p=o.sub_item_banks)||void 0===p?void 0:p.map((function(e,n){if("single"==(null==e?void 0:e.item_type)||"judgement"==(null==e?void 0:e.item_type)||"multiple"==(null==e?void 0:e.item_type)){var t,i=[],a=[];return null==e||null===(t=e.choices)||void 0===t||t.forEach((function(e,n){i.push(e.choice_text),null!=e&&e.is_answer&&a.push(n+1)})),{id:e.id,question_id:e.id,question_title:e.name,difficulty:e.difficulty,question_type:"single"==(null==e?void 0:e.item_type)?0:"multiple"==(null==e?void 0:e.item_type)?1:2,question_choices:i,standard_answers:a,analysis:e.analysis}}if("completion"==(null==e?void 0:e.item_type)){var r,l=[];return null==e||null===(r=e.standard_answer)||void 0===r||r.forEach((function(e,n){l.push({choice_id:e.position,answer_text:e.answer_text,score:e.score})})),{id:e.id,question_id:e.id,is_ordered:e.is_ordered,question_title:e.name,difficulty:e.difficulty,question_type:3,standard_answers:l,analysis:e.analysis,downcase:null==e?void 0:e.downcase,no_space:null==e?void 0:e.no_space}}var o;if("subjective"==(null==e?void 0:e.item_type))return{id:e.id,question_id:e.id,question_title:e.name,question_type:4,difficulty:e.difficulty,answer_texts:null==e||null===(o=e.answer_texts)||void 0===o?void 0:o[0],analysis:e.analysis}})),delete s.analysis),"PRACTICAL"===n){e.next=17;break}return e.next=14,(0,Z.ZP)("/api/exercise_questions/".concat(t.id,".json"),{method:"put",body:s});case 14:e.t0=e.sent,e.next=20;break;case 17:return e.next=19,(0,Z.ZP)("/api/exercise_questions/".concat(t.id,"/update_shixun_score.json"),{method:"post",body:a()({},o)});case 19:e.t0=e.sent;case 20:0===(null==(f=e.t0)?void 0:f.status)&&(v.ZP.success("编辑成功"),Ce(z+1),Y(null));case 22:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),Se=function(){var e=s()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,k.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在更新试卷,请稍后..."}}),e.next=3,(0,Z.ZP)("/api/exercises/".concat(he.categoryId,"/sync_random_question.json"),{method:"post"});case 3:if(0!==e.sent.status){e.next=8;break}return e.next=7,G(z);case 7:v.ZP.success("更新成功");case 8:(0,k.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=null==M||null===(n=M.questionList)||void 0===n?void 0:n.reduce((function(e,n){return e+Number(n.questions_score)}),0),Ie=F&&1!==(null==M||null===(t=M.exam)||void 0===t?void 0:t.exercise_status);return(0,O.jsxs)("section",{className:h.wrap,children:[(0,O.jsxs)("div",{id:"id_left_preview",className:h.left,onMouseEnter:function(e){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left_preview").style.overflowY="hidden"},children:[(0,O.jsx)("div",{className:h.title,children:(0,O.jsxs)("div",{className:"body-overflow-initial",children:[(0,O.jsx)("b",{}),(0,O.jsx)("span",{children:"答题卡"})]})}),(0,O.jsxs)("div",{className:h.total,children:[(0,O.jsxs)("div",{children:[(0,O.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4="}),(0,O.jsx)("span",{children:"题数(道)"}),(0,O.jsx)("aside",{children:null==M?void 0:M.all_questions_count})]}),(0,O.jsxs)("div",{className:"mr30 ml30",children:[(0,O.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTgu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TU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg=="}),(0,O.jsx)("span",{children:"时长(分)"}),(0,O.jsx)("aside",{children:-1===(null==M||null===(i=M.exam)||void 0===i?void 0:i.time)||null===(null==M||null===(r=M.exam)||void 0===r?void 0:r.time)?"不限":null==M||null===(o=M.exam)||void 0===o?void 0:o.time})]})]}),null==M||null===(c=M.questionList)||void 0===c?void 0:c.map((function(e,n){var t;return(0,O.jsxs)("div",{className:h.list,children:[(0,O.jsxs)("div",{className:h.name,children:[(0,O.jsx)("b",{}),(0,O.jsx)("span",{children:e.name})]}),(0,O.jsxs)("aside",{children:[(0,O.jsxs)("div",{children:["共",(0,O.jsx)("span",{className:h.b,children:e.questions_count}),"题 ",(0,O.jsx)("span",{className:h.l,children:"|"}),"共",(0,O.jsx)("span",{className:h.r,children:e.questions_score}),"分"]}),(0,O.jsx)("div",{className:h.answerSheet,children:null==e||null===(t=e.questions)||void 0===t?void 0:t.map((function(e,n){return(0,O.jsx)("div",{onClick:function(){var n="Anchor_".concat(null==e?void 0:e.id),t=document.getElementById(n);t&&setTimeout((function(){return t.scrollIntoView({block:"center",behavior:"smooth"})}))},className:h.tag,children:n+1},null==e?void 0:e.id)}))})]})]},n)}))]}),(0,O.jsxs)("div",{className:h.right,children:[(0,O.jsxs)("div",{className:h.examName,id:"examName",children:[(0,O.jsx)("div",{className:h.name,children:(0,O.jsx)(p.Z,{title:null==M||null===(S=M.exam)||void 0===S?void 0:S.name,getPopupContainer:function(e){return e.parentNode},children:(0,O.jsx)("span",{className:h.t,children:null==M||null===(B=M.exam)||void 0===B?void 0:B.name})})}),F&&1===(null==M||null===(I=M.exam)||void 0===I?void 0:I.exercise_status)&&(0,O.jsx)(Ge.op,{openLoading:!0,shape:"default",onClick:function(){f.Z.confirm({title:"提示",content:"确认根据最新的随机组卷抽题规则重新生成试卷吗?",onOk:function(){Se()}})},type:"primary",children:"更新试卷"}),!F&&(0,O.jsx)(w.ZP,{onClick:function(){var e,n=f.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(e=s()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.update({cancelButtonProps:{disabled:!0}}),e.next=3,H();case 3:n.update({cancelButtonProps:{disabled:!1}}),v.ZP.success("已重新随机生成整张试题");case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},type:"primary",children:"随机更换"})]}),(0,O.jsx)("div",{className:h.topWarp,children:null==M||null===(T=M.questionList)||void 0===T?void 0:T.map((function(e,n){var t,i;return(0,O.jsxs)(u.Fragment,{children:[(0,O.jsxs)("div",{className:h.head,style:0===n?{border:0,marginTop:-16}:{},children:[(0,O.jsxs)("div",{className:h.name,children:[(0,O.jsx)("b",{}),(0,O.jsx)("span",{children:e.name})]}),(0,O.jsxs)("div",{className:h.so,children:["共",(0,O.jsxs)("span",{className:h.b,children:[e.questions_count," "]}),"题 ","COMBINATION"===e.type&&"(包含".concat(null==e||null===(t=e.questions)||void 0===t?void 0:t.map((function(e){var n;return null==e||null===(n=e.sub_item_banks)||void 0===n?void 0:n.length})).reduce((function(e,n){return e+n})),"小题)"),(0,O.jsx)("span",{className:h.l,children:"|"}),"共",(0,O.jsx)("span",{className:h.r,children:e.questions_score}),"分"]}),!F&&(0,O.jsxs)("div",{className:h.btn,children:[(0,O.jsx)(w.ZP,{onClick:function(){var n,t,i;i=(n=e).questions_score/n.questions_count,f.Z.confirm({icon:null,centered:!0,title:"分数设置",content:(0,O.jsx)("div",{className:h.modalColumn,children:(0,O.jsxs)("div",{className:h.modalRow,style:{justifyContent:"flex-start"},children:[(0,O.jsx)("sup",{className:h.sup,children:"*"}),(0,O.jsxs)("span",{children:[null==n?void 0:n.name,""]}),(0,O.jsx)(g.Z,{min:0,precision:1,defaultValue:i,onChange:function(e){i=e}}),(0,O.jsx)("span",{className:"ml5",children:"分/题"})]})}),okText:"确认",cancelText:"取消",onOk:(t=s()(l()().mark((function e(){var t,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=3;break}return v.ZP.warning("分数不能为空或为0"),e.abrupt("return",Promise.reject());case 3:a={type:null==n?void 0:n.type,score:i,scoreTotal:Number(null===(t=i*n.questions_count)||void 0===t?void 0:t.toFixed(1))},D(a);case 5:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},type:"primary",ghost:!0,className:"mr20",children:"设置得分"}),(0,O.jsx)(w.ZP,{onClick:function(){return a=null===(t=(n=e).questions)||void 0===t?void 0:t.map((function(e){return null==e?void 0:e.id})),r=n.name,void(o=f.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认更换".concat(r,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(i=s()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.update({cancelButtonProps:{disabled:!0}}),e.next=3,H({seleted_item_bank_ids:a},{type:n.type});case 3:o.update({cancelButtonProps:{disabled:!1}}),v.ZP.success("已重新随机生成".concat(r,"试题"));case 5:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}));var n,t,i,a,r,o},type:"primary",ghost:!0,children:"随机更换"})]})]}),null==e||null===(i=e.questions)||void 0===i?void 0:i.map((function(n,t){var i,r,o,c,d,m,g,x;return Q===(null==n?void 0:n.id)?(0,O.jsxs)("div",{id:"Anchor_".concat(null==n?void 0:n.id),className:h.content,style:{padding:0,marginTop:24},children:[(0,O.jsxs)("div",{style:{float:"right",marginTop:"".concat("PRACTICAL"===(null==e?void 0:e.type)?"-2px":"-6px")},children:[(0,O.jsx)(w.ZP,{onClick:function(){return Y(null)},className:"mr20",type:"primary",ghost:!0,children:"取消"}),(0,O.jsx)(w.ZP,{onClick:function(){var t,i;1===(null==n?void 0:n.is_my)?f.Z.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",keyboard:!1,onOk:(i=s()(l()().mark((function t(){return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"BPROGRAM"===e.type?(ge(!0),ue.submit()):Ae(null==e?void 0:e.type,n,!0);case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),onCancel:(t=s()(l()().mark((function t(){return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"BPROGRAM"===e.type?(ge(!1),ue.submit()):Ae(null==e?void 0:e.type,n,!1);case 1:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}):"BPROGRAM"===e.type?(ge(!1),ue.submit()):Ae(null==e?void 0:e.type,n,!1)},type:"primary",children:"保存"})]}),Ze(n,e.type)]},null==n?void 0:n.id):(0,O.jsxs)("div",{id:"Anchor_".concat(null==n?void 0:n.id),className:h.content,children:[(0,O.jsxs)("div",{className:h.titleWrap,children:["bprogram"===(null==n?void 0:n.item_type)?(0,O.jsx)(N.Z,{style:{paddingRight:10},value:t+1+"、"+(null==n||null===(i=n.program_attr)||void 0===i?void 0:i.description)}):(0,O.jsx)(N.Z,{style:{paddingRight:10},className:h.titleHtml,value:t+1+"、"+"".concat("combination"===(null==n?void 0:n.item_type)?"(题干)":"")+(null==n?void 0:n.name)}),F&&(0,O.jsx)(w.ZP,{disabled:Ie,onClick:function(){var e,t,i;Q?v.ZP.warning("先保存或取消当前正在编辑的试题"):(ue.setFieldsValue({standard_answers:null==n?void 0:n.standard_answer,hack:a()(a()({},n),null==n?void 0:n.program_attr),hack_codes:a()(a()({},null==n?void 0:n.program_attr),{},{code:He.Base64.decode((null==n||null===(e=n.program_attr)||void 0===e?void 0:e.code)||"")}),hack_sets:a()({},null==n||null===(t=n.hack_sets)||void 0===t?void 0:t[0])}),"program"==(null==n?void 0:n.item_type)?k.history.push("/problems/newedit/".concat(null==n||null===(i=n.program_attr)||void 0===i?void 0:i.identifier,"?type=exercises&express_id=").concat(he.categoryId,"&question_id=").concat(null==n?void 0:n.id,"&score=").concat(null==n?void 0:n.score,"&exercise=true&callback_url=/classrooms/").concat(he.coursesId,"/exercise/").concat(he.categoryId,"/detail?random=true")):Y(null==n?void 0:n.id))},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0,children:"编辑"}),(0,O.jsx)(w.ZP,{disabled:Ie,onClick:function(){return function(e,n,t,i){var a,r,o="".concat(location.pathname).concat(location.search),c=null===(a=i.questions)||void 0===a?void 0:a.map((function(e){return null==e?void 0:e.id}));if(o.includes("exercise"))ce.current={id:e,ids:c,type:n,index:t},se(!0);else var d=f.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认要更换该试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(r=s()(l()().mark((function i(){return l()().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return d.update({cancelButtonProps:{disabled:!0}}),i.next=3,H({single_question_id:e,seleted_item_bank_ids:c},{type:n,index:t});case 3:d.update({cancelButtonProps:{disabled:!1}}),v.ZP.success("已重新随机生成试题");case 5:case"end":return i.stop()}}),i)}))),function(){return r.apply(this,arguments)})})}(null==n?void 0:n.id,e.type,t,e)},type:"primary",ghost:!0,children:"换一题"})]}),"bprogram"===(null==n?void 0:n.item_type)&&(0,O.jsx)(N.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:h.titleHtml,value:He.Base64.decode((null==n||null===(r=n.program_attr)||void 0===r?void 0:r.code)||"")}),("SINGLE"===e.type||"JUDGMENT"===e.type||"MULTIPLE"===e.type)&&(m=n,x=[],(0,O.jsxs)(u.Fragment,{children:[(0,O.jsx)("aside",{className:h.single,children:null==m||null===(g=m.choices)||void 0===g?void 0:g.map((function(e,n){return e.is_answer&&x.push(xe[n]),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[xe[n],"、"]}),(0,O.jsx)("li",{children:(0,O.jsx)(N.Z,{value:e.choice_text})})]},n)}))}),(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("div",{children:["正确答案:",x.join(""),(0,O.jsxs)("span",{className:"ml30",children:["难度:",ve[m.difficulty]]})]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:m.analysis?m.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),"".concat((null==m?void 0:m.discipline_name)||"--","/").concat(null==m?void 0:m.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:null==m?void 0:m.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==m?void 0:m.tag_discipline_name]})})]})]})]})),"COMPLETION"===e.type&&ye(n),"SUBJECTIVE"===e.type&&_e(n),"PROGRAM"===e.type&&Ne(n),"BPROGRAM"===e.type&&be(n),"COMBINATION"===e.type&&(o=n,c=t,(0,O.jsx)("div",{children:null==o||null===(d=o.sub_item_banks)||void 0===d?void 0:d.map((function(e,n){var t,i=[];return(0,O.jsxs)(u.Fragment,{children:[(0,O.jsxs)("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"},children:[c+1+"."+(n+1),"",je[e.item_type]||we[e.item_type],"",e.name]}),("SINGLE"==e.item_type||"MULTIPLE"==e.item_type||"JUDGMENT"==e.item_type||"single"==e.item_type||"multiple"==e.item_type||"judgement"==e.item_type)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("aside",{className:h.single,children:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e,n){return e.is_answer&&i.push(xe[n]),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[xe[n],"、"]}),(0,O.jsx)("li",{children:(0,O.jsx)(N.Z,{value:e.choice_text})})]},n)}))}),(0,O.jsxs)("div",{className:h.analysis,children:[(0,O.jsxs)("div",{children:["正确答案:",i.join(""),(0,O.jsxs)("span",{className:"ml30",children:["难度:",ve[e.difficulty]]})]}),(0,O.jsxs)("aside",{children:[(0,O.jsx)("span",{className:h.text,children:"解析:"}),(0,O.jsx)(N.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"方向&课程:"}),"".concat((null==o?void 0:o.discipline_name)||"--","/").concat(null==o?void 0:o.sub_discipline_name)]}),(0,O.jsx)(p.Z,{title:null==o?void 0:o.tag_discipline_name,children:(0,O.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,O.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==o?void 0:o.tag_discipline_name]})})]})]})]}),("COMPLETION"==e.item_type||"completion"==e.item_type)&&ye(e,o),("SUBJECTIVE"==e.item_type||"subjective"==e.item_type)&&_e(e,o)]})}))})),"PRACTICAL"===e.type&&ke(n),(0,O.jsx)("div",{})]},null==n?void 0:n.id)}))]},n)}))})]}),F?(0,O.jsx)(Ge.vr,{children:(0,O.jsx)(y.Z,{showTotal:C.rU,total:null==M||null===(P=M.exam)||void 0===P?void 0:P.total_num,pageSize:1,current:z+1,showSizeChanger:!1,onChange:Ce,showQuickJumper:!1,hideOnSinglePage:!1})}):(0,O.jsx)(Ge.vr,{LeftContent:(0,O.jsx)(Ge.op,{onClick:L,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"},children:"返回"}),RightContent:(0,O.jsxs)(b.Z,{align:"middle",children:[(0,O.jsx)(_.Z,{color:"#55575D",overlayClassName:h.popover,open:ne,getPopupContainer:function(e){return null==e?void 0:e.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷",children:(0,O.jsx)(Ge.op,{onMouseEnter:function(){return ie(!0)},onMouseLeave:function(){return ie(!1)},onClick:function(){return n="",void f.Z.confirm({icon:null,centered:!0,title:"保存试卷",content:(0,O.jsxs)("div",{className:h.modalColumn,children:[(0,O.jsxs)("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20",children:[(0,O.jsx)("img",{style:{marginRight:5},src:A.Z}),"保存后单独生成一份人工组卷类型的固定试卷。"]}),(0,O.jsxs)("div",{className:h.modalRow,style:{marginTop:20},children:[(0,O.jsx)("sup",{className:h.sup,children:"*"}),(0,O.jsx)("span",{style:{flexShrink:0},children:"试卷名称:"}),(0,O.jsx)(x.Z,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:n,onChange:function(e){n=e.target.value}})]})]}),okText:"确认",cancelText:"取消",onOk:(e=s()(l()().mark((function e(){var t,i,a,r,o,s;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=3;break}return v.ZP.warning("试卷名称不能为空"),e.abrupt("return",Promise.reject());case 3:return i=[],a=[],r=[],o=[],null==M||null===(t=M.questionList)||void 0===t||t.forEach((function(e){var n;null===(n=e.questions)||void 0===n||n.forEach((function(n){var t=e.questions_score/e.questions_count;t=t&&t.toFixed(1),"COMBINATION"===e.type&&r.push({id:n.id,sub_item_bank_ids:n.sub_item_banks.map((function(e){return e.id}))}),"PRACTICAL"===e.type?o.push(n.id):(i.push(n.id),a.push(t))}))})),console.log("-----",r),s={item_bank_ids:i,item_bank_scores:a,name:n,combination_item_banks:r,shixun_ids:o},e.next=12,E(s);case 12:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})});var e,n},shape:"default",style:{height:38,background:"#fff",boxShadow:"none"},children:"保存"})}),(0,O.jsx)(Ge.op,{shape:"default",type:"primary",onClick:function(){return E()},style:{height:38,marginLeft:20},children:"提交"})]})}),(0,O.jsx)(We,{visible:oe,questionParams:ce.current,onRandomExchange:s()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ce.current,e.next=3,H({single_question_id:n.id,seleted_item_bank_ids:n.ids},{type:n.type,index:n.index});case 3:se(!1);case 4:case"end":return e.stop()}}),e)}))),selectFromProblemSet:function(){var e=ce.current,n="".concat(location.pathname).concat(location.search);n.includes("exercise")&&k.history.push("/paperlibrary/exchangequestion?type=exercise&qid=".concat(e.id,"&qtype=").concat(e.type,"&exerciseid=").concat(he.categoryId,"&from=").concat(n))},onCancel:function(){se(!1)}})]})}},54801: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,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},5547:function(e,n){"use strict";n.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},96908:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6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