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

1 line
288 KiB

This file contains ambiguous Unicode 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([[93260,4977,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,r=!1,l=!1,a=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:a=u;break;case"object":void 0!==u.is3D?i=u:t=u;break;case"boolean":r=u,l=!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||l||(r=!0)),null!==a&&void 0===t.id&&(t.id=a);var p="",m=!1,h=null,f=null,v=null,x=!1,g=null,y=null,_=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var w=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function j(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,L(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,M(e,n))},e.getHTML5CodebaseVersion=function(){return f},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){_=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,r="auto",l=t.id,a=!1,s=0;s<arguments.length;s++){var c=arguments[s];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:l=arguments[s]:"boolean"==typeof c?a=c:c instanceof HTMLElement&&(i=c)}function d(){if(o){r=E(r);var s=i||document.getElementById(l);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"!==r||(delete t.width,delete t.height),h=r,"screenshot"===r)T(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())&&j()),c?(h="screenshot",I(s,t,a,r)):S(s,t,a)}else console.log("possibly bug on ajax loading? ")}else setTimeout(d,200)}d()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var k=function(n){var r=function(){t.onError&&t.onError(),O("Error: Fetching material (id "+t.material_id+") failed.",t)},l=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",a="/materials/"+t.material_id+"?scope=basic";N("https://"+l+"/api/proxy.php?path="+encodeURIComponent(a),(function(l){var a=JSON.parse(l),o=a.elements?a.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:a;if(o&&o.url){t.fileName=o.url,C(o.settings||{}),i.is3D=!0;var s="https://www.geogebra.org/images/";e.setPreviewImage(g||o.previewUrl,s+"GeoGebra_loading.png",s+"applet_play.png"),n()}else r()}),r)};function C(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(n){e[n]=!!e[n]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(n){void 0===t[n]&&void 0!==e[n]&&(t[n]=e[n])})),void 0===t.showToolBarHelp&&(t.showToolBarHelp=t.showToolBar)}function N(e,n,t){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){n(i.responseText)},i.onerror=t,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return h},e.setPreviewImage=function(e,n,t){g=e,y=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),h=null;var r=null;for(i=0;i<e.childNodes.length;i++){var l=e.childNodes[i],a=l.className;"applet_screenshot"===a?n?(l.style.display="block",h="screenshot"):l.style.display="none":"applet_scaler prerender"!==a&&(e.removeChild(l),r=a&&-1!=a.indexOf("appletParameters")?l.id:null,i--)}var o=void 0!==t.id?t.id:r,s=window[o];s&&"function"==typeof s.getBase64&&(s.remove(),window[o]=null)},e.refreshHitPoints=function(){if(w(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},S=function(n,t,i){w(f)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==f||ggbHTML5LoadedCodebaseIsWebSimple&&!x)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var l=document.createElement("div");l.classList.add("appletParameters","notranslate");var a=t.width,o=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(w(f)<=4.4)Z(t.showToolBar)&&(t.height-=7),Z(t.showAlgebraInput)&&(t.height-=37),t.width<605&&Z(t.showToolBar)&&(t.width=605,a=605);else{var d=100;(Z(t.showToolBar)||Z(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),d=Z(t.showMenuBar)?245:155),a<d&&(t.width=d,a=d)}for(var u in l.style.border="none",l.style.display="inline-block",t)t.hasOwnProperty(u)&&"appletOnLoad"!==u&&l.setAttribute("data-param-"+u,t[u]);_&&l.setAttribute("data-param-fontscssurl",_),e.resize=function(){GGBAppletUtils.responsiveResize(n,t)},window.addEventListener("resize",(function(n){e.resize()}));var m="function"==typeof t.appletOnLoad?t.appletOnLoad:function(){};if(i||void 0===t.width){var h=document.createElement("div");h.className="applet_scaler",h.style.position="relative",h.style.display="block",h.appendChild(l),n.appendChild(h),t.appletOnLoad=function(n){e.resize(),m(n)}}else{t.hasOwnProperty("showSplash")||l.setAttribute("data-param-showSplash","false");var g=n.querySelector(".applet_scaler.prerender"),y=null!==g;if(y)b=g.querySelector(".ggb_preview");else{var b=A(a,o,t.borderColor,!1);(g=document.createElement("div")).className="applet_scaler",g.style.position="relative",g.style.display="block",g.style.width=a+"px",g.style.height=o+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(g,"66%"),w(f)>=5?(t.appletOnLoad=function(e){var t=n.querySelector(".ggb_preview");t&&t.parentNode.removeChild(t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(g),window.GGBT_wsf_view&&$(window).trigger("resize"),m(e)},y||g.appendChild(b)):l.appendChild(b),g.appendChild(l),y||n.appendChild(g),setTimeout((function(){e.resize()}),1)}function j(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 k(e,n){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:n}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){j(e.article,e.params)})),html5AppletsToProcess=null)},w(f)<5&&(e.className+=" geogebraweb")):j(e,n)}if(r){scriptLoadStarted=!0;for(var C=0;C<l.childNodes.length;C++){"TABLE"===l.childNodes[C].tagName&&(l.removeChild(l.childNodes[C]),C--)}if(null!==ggbHTML5LoadedScript){var N=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=N&&N.parentNode.removeChild(N)}var S=document.createElement("script"),T=function(){k(l,t)};S.src=p+v,ggbHTML5LoadedCodebaseIsWebSimple=x,ggbHTML5LoadedCodebaseVersion=f,ggbHTML5LoadedScript=S.src,O("GeoGebra HTML5 codebase loaded: '"+p+"'.",t),c||s&&"5.0"!=s?p.requirejs?__webpack_require__.e(5783).then(function(){var e=[__webpack_require__(5783)];T.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(S.onload=T,n.appendChild(S)):(x?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),T())}else k(l,t);t.height=o,t.width=a},T=function(n,t,i){var r=A(t.width,t.height,t.borderColor,i),l=document.createElement("div");l.style.position="relative",l.style.display="block",l.style.width=t.width+"px",l.style.height=t.height+"px",l.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),l.appendChild(r);var a=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(B()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(l,"66%"),n.appendChild(l),1===a||isNaN(a)||(GGBAppletUtils.scaleElement(l,a),l.style.width=t.width+"px",l.style.height=t.height+"px",l.parentNode.style.width=t.width*a+"px",l.parentNode.style.height=t.height*a+"px"),e.resize=function(){P(n,r,l,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function P(e,n,i,r){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 l=GGBAppletUtils.getScale(t,e,r);null!==i.parentNode&&(isNaN(l)||1===l?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,l),i.parentNode.style.width=t.width*l+"px",i.parentNode.style.height=t.height*l+"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){T(e,n,!0);for(var r=function(){var t=[];for(a=0;a<e.childNodes.length;a++)t.push(e.childNodes[a]);if(window.GGBT_wsf_view){var r=window.GGBT_wsf_view.renderFullScreen(e,n.id),l=document.getElementById("fullscreencontainer"),o=jQuery(e).find(".fullscreencontent");o.length>0?(r.remove(),o.attr("id","fullscreencontent").show(),jQuery(l).append(o),window.dispatchEvent(new Event("resize"))):S(r,n,!1),window.GGBT_wsf_view.launchFullScreen(l)}else h=i,S(e,n,!1);if(!window.GGBT_wsf_view)for(a=0;a<t.length;a++)e.removeChild(t[a])},l=e.getElementsByClassName("ggb_preview_play"),a=0;a<l.length;a++)l[a].addEventListener("click",r,!1),l[a].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),j()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},B=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var n='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',t=document.createElement("style");t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n)),document.getElementsByTagName("head")[0].appendChild(t)}return e},A=function(e,n,t,i){var r=document.createElement("div");r.className="ggb_preview",r.style.position="absolute",r.style.zIndex="90",r.style.width=e-2+"px",r.style.height=n-2+"px",r.style.top="0px",r.style.left="0px",r.style.overflow="hidden",r.style.backgroundColor="white";var l="lightgrey";void 0!==t&&(l="none"===t?"transparent":t),r.style.border="1px solid "+l;var a,o,s,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==g&&c.setAttribute("src",g),c.style.opacity=.7,null!==y)&&!i){(a=document.createElement("img")).style.position="absolute",a.style.zIndex="1001",a.style.opacity=1,c.style.opacity=.3,(o=360)>e/4*3&&(o=e/4*3),s=o/5.8,a.setAttribute("src",y),a.setAttribute("width",o),a.setAttribute("height",s);var d=(e-o)/2,u=(n-s)/2;a.style.left=d+"px",a.style.top=u+"px",r.appendChild(a)}return r.appendChild(c),r},E=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},q=["web","webSimple","web3d","tablet","tablet3d","phone"],M=function(e,n){if(f=e,n)L(f,!0);else{var l,a,o=!r;if(o){var s=w(f);!isNaN(s)&&s<4.4&&(o=!1)}l="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=f.indexOf("//");for(var d in a=c>0?f:0===c?l+f:"https://www.geogebra.org/apps/5.2.814.0/",q)if(f.slice(-1*q[d].length)===q[d]||f.slice(-1*(q[d].length+1))===q[d]+"/")return void L(a,!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?a+="web3d/":a+="webSimple/",L(a,!1)}},L=function(e,n){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===n&&(n=-1===e.indexOf("http")),m=n,v="web.nocache.js",x=!1;var t=p.split("/");t.length>1&&(n||"webSimple"!==t[t.length-2]?q.indexOf(t[t.length-2])>=0&&(v=t[t.length-2]+".nocache.js"):(v="webSimple.nocache.js",x=!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."),M("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 D(){var e=n;null!==s?e=s:parseFloat(e)<5&&(e="5.0"),M(e,!1),null!==c&&L(c,m),o=!0}return void 0!==t.material_id?k(D):D(),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,r){if(e.isScreenshoGenerator)return 1;var l,a=void 0!==i&&i,o=null!=e.noScaleMargin&&e.noScaleMargin,s=(l=e.autoHeight)&&"false"!==l,c=function(e,n,t,i,r,l){var a=null;if(null!=l&&""!=l)for(var o=e.parentNode;null!=o;){if((" "+o.className+" ").indexOf(" "+l+" ")>-1){a=o;break}o=o.parentNode}var s=0,c=0,d=0,u=0,p=0,m=0,h=0;if(a)s=a.offsetWidth,c=Math.max(i?a.offsetWidth:0,a.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===r||!r)&&("rtl"===document.dir?(p=s-f.width-f.left,m=d<=480?10:30):(m=f.left,p=d<=480?10:30),u=m+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(u=40,h=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(u=0,h=40))}return e&&((void 0===t||!t)&&n>0&&n+u<s?s=n:s-=u,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=h)),{width:s,height:c}}(n,e.width,t,s,a&&window.GGBT_wsf_view||o,r),d=parseInt(c.width),u=e.width,p=e.height;if(void 0===u){var m=n.querySelector(".appletParameters");m&&(u=m.offsetWidth,p=m.offsetHeight)}var h=d/u,f=a?1:c.height/p;return void 0===t||t||(h=Math.min(1,h),f=Math.min(1,f)),Math.min(h,f)}function i(e,n,i){var r,l=1,a=!1;return e.hasOwnProperty("allowUpscale")&&(a=e.allowUpscale),e.hasOwnProperty("scale")&&(l=parseFloat(e.scale),(isNaN(l)||null===l||0===l)&&(l=1),l>1&&(a=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?l:(r=t(e,n,a,i,e.scaleContainerClass),!a||e.hasOwnProperty("scale")&&1!==l?Math.min(l,r):r)}function r(e){var n=Math.min(window.innerWidth,document.documentElement.clientWidth),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(n-i.width)/2,l=(t-i.height)/2;l<0&&(l=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=l+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=l<40?"40px":l+"px",e.style.left=r+"px")}return{responsiveResize:function(t,l){var a=t.querySelector(".appletParameters");if(a){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(l.id!==a.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(t)}if(a.parentElement&&/fullscreen/.test(a.parentElement.className))return;var o=i(l,t);e()&&a.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!==l.id?l.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=l.width+"px",s.parentNode.style.height=l.height+"px"):(s.parentNode.style.width=l.width*o+"px",s.parentNode.style.height=l.height*o+"px",n(s,o))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&r(t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(a).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:r,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,r,!1);var i=setInterval((function(){r()}),$)}function r(){if(!t){if(!n())return;t=!0,e(),o.removeEventListener&&o.removeEventListener(Z,r,!1),i&&clearInterval(i)}}}((function(){var n,t,i,r;n=e,t=u(),i=t.body,(r=t.createElement(_)).language=ab,r.crossOrigin=W,r.src=n,webModule.__errFn&&(r.onerror=function(){webModule.__errFn(L,new Error(bb+n))}),i.appendChild(r),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=[],l=[];function a(e){var n=l[e](),t=i[e];if(n in t)return n;var a=[];for(var o in t)a[t[o]]=o;throw r&&r(e,a,n),null}if(__gwt_isKnownPropertyValue=function(e,n){return n in i[e]},webModule.__getPropMap=function(){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[n]=a(n));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var 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],r=O;r<i.length;r++){var l=i[r];t[l[O]]=l[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 r(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var r=e[i],l=n?"".concat(n,"/").concat(r.name):"".concat(r.name);t.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:l})}return t}function l(e,n,t){for(var i=0;i<e.length;i++){var r=e[i];if(r.key===n){r.children=t;break}r.children&&l(r.children,n,t)}return e}function a(e,n,t){var i;return function(){var r=this,l=arguments,a=function(){i=null,t||e.apply(r,l)},o=t&&!i;clearTimeout(i),i=setTimeout(a,n),o&&e.apply(r,l)}}t.d(n,{Ax:function(){return l},Ds:function(){return a},KI:function(){return o},SI:function(){return r},f1:function(){return i}});var o=t(27065).Z.API_SERVER},58499:function(e,n,t){"use strict";t.d(n,{Z:function(){return x}});var i=t(82242),r=t.n(i),l=t(7557),a=t.n(l),o=t(41498),s=t.n(o),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(3113),h=t(59301),f=t(37712),v=["children"],x=function(e){var n=e.children,t=p()(e,v),i=(0,h.useState)(!1),l=d()(i,2),o=l[0],c=l[1];return(0,f.jsx)(m.ZP,r()(r()({},t),{},{loading:o,onClick:function(){var e=s()(a()().mark((function e(n){return a()().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}))}},40029:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});t(59301);var i="digitalLabel___tImKs",r="active___Ck70Q",l=t(37712),a=function(e){var n=e.number,t=e.active,a=e.className;return(0,l.jsx)("div",{className:"".concat(i," ").concat(t?r:""," ").concat(a),children:n})}},74908:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var i=t(7557),r=t.n(i),l=t(41498),a=t.n(l),o=t(79800),s=t.n(o),c=t(59301),d="imageDimensions___a7crR",u="img___Kroat",p="fullWidth___c492T",m=t(92310),h=t.n(m),f=t(71418),v=t(2859),x=t(51136),g=t(6457),y=t(37712),_=function(e){var n=e.data,t=e.className,i=e.fullWidth,l=e.style,o=void 0===l?{}:l,m=e.onClose,_=e.onOk,w=e.showFullTools,b=e.noAssociationId,j=(0,c.useRef)(null),k=(0,c.useRef)(null),C=(0,c.useState)(!1),N=s()(C,2),Z=N[0],S=N[1],T=(0,c.useState)("正在加载中"),P=s()(T,2),I=P[0],B=P[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&&A()}),[null==n?void 0:n.visible]);var A=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),B("正在加载中"),e.next=4,(0,g.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,j.current.src="",j.current.src=t,j.current.onload=function(){q()},S(!1),B("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=a()(r()().mark((function e(t){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),B("正在保存中"),e.next=4,(0,x.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,x.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&&_(),e.next=13;break;case 12:null!=i&&i.id&&_(i);case 13:S(!1),B("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){k.current=new v.hP(j.current),k.current.addEventListener("render",E),k.current.addEventListener("beforeclose",m),w&&(k.current.availableMarkerTypes=k.current.ALL_MARKER_TYPES,k.current.uiStyleSettings.redoButtonVisible=!0,k.current.uiStyleSettings.notesButtonVisible=!0,k.current.uiStyleSettings.zoomButtonVisible=!0,k.current.uiStyleSettings.zoomOutButtonVisible=!0,k.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=k.current.uiStyleSettings,k.current.show(),null!=n&&n.snapshotData&&k.current.restoreState(n.snapshotData),setTimeout((function(){var e;(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var n=document.querySelector(e.name);n&&n.setAttribute("title",e.title)}))}),300)};return(0,y.jsx)(c.Fragment,{children:(null==n?void 0:n.visible)&&(0,y.jsxs)("div",{className:h()(d,t,i?p:""),style:o,children:[(0,y.jsx)(f.Z,{spinning:Z,tip:I,style:{position:"absolute"}}),(0,y.jsx)("img",{className:u,ref:j})]})})}},30347:function(e,n,t){"use strict";var i=t(79800),r=t.n(i),l=t(59301),a=t(44499),o=(t(48136),t(33773)),s=t(43418),c=t(37712),d=(0,l.forwardRef)((function(e,n){var t=e.callback,i=e.width,d=e.onChange,u=e.disabled,p=e.readOnly,m=e.type,h=void 0===m?"":m,f=e.value,v=void 0===f?"":f,x=e.style,g=void 0===x?{}:x,y=(0,l.useRef)(),_=(0,l.useRef)(),w=(0,l.useState)(0),b=r()(w,2),j=b[0],k=b[1],C=(0,l.useState)(0),N=r()(C,2),Z=N[0],S=N[1],T=(0,l.useState)(!1),P=r()(T,2),I=P[0],B=P[1],A=function(){var e=document.createElement("div");e.innerHTML=y.current.getValue();var n=e.innerText;return t&&t(n),n};(0,l.useImperativeHandle)(n,(function(){return{getData:A}}));var E=function(e,n,t,i){var r=document.body.clientHeight,l=document.body.clientWidth;return!(e<20&&t>e||e>l-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,l.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;k(n),S(t)}),0)}),[I]);return(0,c.jsxs)("div",{style:g,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(a.Z.mathFillWrap," ").concat(u||p?"cursorDefault":""),onClick:function(){u||p||B(!0)},children:(0,c.jsx)("math-field",{disabled:u,locale:"zh_cn",class:"".concat(a.Z.mathField," ").concat(h),readOnly:p,placeholder:"请输入公式",ref:y,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(s.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:j,top:Z},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-j,t=e.clientY-Z;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,l=document.getElementsByClassName("ant-modal")[0],a=window.innerWidth-l.offsetWidth,o=window.innerHeight-l.offsetHeight;i=Math.max(0,Math.min(i,a)),r=Math.max(0,Math.min(r,o)),E(e.clientX,e.clientY,n,t)&&(k(i),S(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:I,onOk:function(){var e=_.current.getData();y.current.setValue(e),d(e),B(!1)},onCancel:function(){B(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(o.Z,{value:v,ref:_,onChange:d,showSaveButton:!1})})]})}));n.Z=d},48637:function(e,n,t){"use strict";t.d(n,{t:function(){return X}});var i=t(39647),r=t.n(i),l=t(91232),a=t.n(l),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(8772),f=t(78241),v=t(43418),x=t(95237),g=t(43604),y=t(97913),_=t(57809),w=t(5112),b=t(36017),j=t(7880),k=t(5547),C=t(7557),N=t.n(C),Z=t(41498),S=t.n(Z),T=t(8591),P=t(3113),I=t(71418),B=t(24334),A="result___UYRo8",E="left___TRaH5",q="right___twp9s",M="box___vwndt",L="li___hRe2d",O=t(51136),D=t(76039),F=t(11094),R=t(56102),z=t(42541),G=t(37712),W=function(e){var n=e.buttonProps,t=e.buttonText,i=e.form,r=e.hackIdentifier,l=void 0===r?"":r,a=e.answerKey,o=e.data,s=(0,m.useState)(!1),c=p()(s,2),u=c[0],f=c[1],x=(0,m.useState)(!1),g=p()(x,2),y=g[0],_=g[1],w=(0,m.useState)(!1),b=p()(w,2),j=b[0],k=b[1],C=(0,m.useState)({}),Z=p()(C,2),W=Z[0],H=Z[1],V=(0,m.useState)(""),K=p()(V,2),U=K[0],Y=K[1],J=(0,m.useState)(""),X=p()(J,2),Q=X[0],$=X[1],ee=(0,m.useRef)(l),ne=(0,m.useRef)(""),te=(0,m.useRef)(!1);(0,m.useEffect)((function(){j&&ae()}),[j]),(0,m.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]);var ie=function(){return(new Date).getTime()},re=null==o?void 0:o.code,le=function(){var e,n,t=re?null==o?void 0:o.code:null===(e=i.getFieldValue("hack_codes"))||void 0===e?void 0:e.code,r=re?null==o?void 0:o.answer_content:i.getFieldValue(a),l=re?null==o?void 0:o.input:null===(n=i.getFieldValue("hack_sets"))||void 0===n?void 0:n.input;null==r||r.forEach((function(e){var n=e.value||e.answer_text||"";t=t.replace(/(@▁@|@▁▁@)/,n)})),$(l),Y(t),H({}),k(!0)},ae=function(){var e=S()(N()().mark((function e(){var n,t,r,l,a,s,c,u;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=function(){return u=S()(N()().mark((function e(){var n,t,i,r,o;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,D.rX)(ne.current,"submit");case 2:if(n=e.sent,t=n.status,i=n.data,r=ie(),o=r-l>1e3*(a+3)*s,te.current){e.next=9;break}return e.abrupt("return");case 9:if(!o){e.next=13;break}return T.ZP.error("调试代码超时"),f(!1),e.abrupt("return");case 13:if(0!==t){e.next=17;break}return f(!1),H(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)},l=ie(),a=re?null==o?void 0:o.time_limit:null===(n=i.getFieldsValue())||void 0===n?void 0:n.hack.time_limit,s=re?null==o||null===(t=o.answer_content)||void 0===t?void 0:t.length:null===(r=i.getFieldsValue())||void 0===r||null===(r=r.standard_answers)||void 0===r?void 0:r.length,f(!0),e.next=8,(0,D.bM)(ne.current,{test_hack_code:U,test_input:Q});case 8:c();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=S()(N()().mark((function e(){var n,t,r,l,a,s,c,u;return N()().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")?T.ZP.error("填空项答案不能为空"):T.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(_(!0),t="",r=i.getFieldsValue(),ee.current){e.next=22;break}return e.next=17,(0,O.ZP)("/api/problems.json",{method:"post",body:d()(d()({},r),{},{hack:d()(d()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(l=r.hack)||void 0===l||null===(l=l.sub_discipline_id)||void 0===l?void 0:l[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:d()(d()({},r.hack_codes),{},{code:B.Base64.encode(r.hack_codes.code)}),hack_sets:[d()({},r.hack_sets)],is_blank:!0})});case 17:t=e.sent,ee.current=null===(a=t)||void 0===a?void 0:a.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()({},r),{},{hack:d()(d()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(c=r.hack)||void 0===c||null===(c=c.sub_discipline_id)||void 0===c?void 0:c[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:d()(d()({},r.hack_codes),{},{code:B.Base64.encode(r.hack_codes.code)}),update_hack_sets:[d()({},r.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,_(!1),le(),e.abrupt("return");case 34:_(!1);case 35:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)("div",{children:[(0,G.jsx)(P.ZP,d()(d()({loading:y},n),{},{onClick:oe,children:t})),(0,G.jsx)(v.Z,{open:j,title:"调试代码",destroyOnClose:!0,width:1200,okText:"运行测试",confirmLoading:u,cancelButtonProps:{style:{display:"none"}},onOk:function(){return ae()},onCancel:function(){te.current=!1,k(!1)},children:(0,G.jsxs)("div",{className:A,children:[(0,G.jsxs)("div",{className:E,children:[(0,G.jsxs)("div",{className:"mb20",children:[(0,G.jsx)("span",{className:"c-black",children:"执行代码"}),!o&&(0,G.jsx)(R.CopyToClipboard,{text:U,onCopy:function(){return T.ZP.success("复制成功")},children:(0,G.jsxs)("span",{style:{float:"right"},className:"current c-light-primary",children:[(0,G.jsx)("i",{className:"iconfont icon-fuzhi8 mr5"}),"复制"]})})]}),(0,G.jsx)(F.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:U,onChange:function(e){return Y(e)}})]}),(0,G.jsxs)("div",{className:q,children:[(0,G.jsx)("div",{className:"c-black mb20",children:"自定义测试用例"}),(0,G.jsx)("div",{className:M,children:(0,G.jsx)("div",{className:L,children:(0,G.jsx)(h.Z.TextArea,{placeholder:"请输入",value:Q,onChange:function(e){return $(e.target.value)},bordered:!1,style:{height:180}})})}),(0,G.jsx)("div",{className:"c-black mb20 mt30",children:"代码执行结果"}),(0,G.jsx)("div",{className:M,children:(0,G.jsx)(I.Z,{spinning:u,tip:"代码执行中",children:(0,G.jsx)("div",{className:L,style:{height:196,overflow:"auto",padding:10},children:function(e){var n=e.status,t=e.error_msg,i=e.execute_time,r=e.output,l=e.input,a=e.expected_output,o=null;switch(n){case z.h.OK:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,G.jsx)("p",{children:"执行结果:调试通过"})]});break;case z.h.NOMATCH:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("div",{children:"输入:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:l}),(0,G.jsx)("div",{children:"输出:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:r&&B.Base64.decode(r)}),(0,G.jsx)("div",{children:"预期输出:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:a&&B.Base64.decode(a)})]});break;case z.h.EXECUTEFAILURE:case z.h.COMPILEFAILURE:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("p",{children:["最后执行的输入:",(0,G.jsx)("pre",{children:l})]}),(0,G.jsx)("p",{children:"执行出错信息:"}),(0,G.jsx)("pre",{className:"error",children:B.Base64.decode(t)})]});break;case z.h.PODFAILURE:o=(0,G.jsx)("p",{children:"创建pod失败请稍后重试"});break;case z.h.TIMEOUT:o=(0,G.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,G.jsxs)(G.Fragment,{children:[" ",o," "]})}(W)})})})]})]})})]})},H=t(23717),V=["key","name"],K=h.Z.TextArea,U=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}],Y="@▁@",J="@▁▁@",X=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,o=e.hackidentifier,c=e.answerKey,u=(0,m.useState)(!1),C=p()(u,2),N=C[0],Z=C[1],S=(0,m.useState)(!1),T=p()(S,2),P=(T[0],T[1],(0,j.useParams)().type,function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(Y).length-1;for(var l=0;l<t;l++)i+=e.getLine(l).split(J).length-1;var a=e.getLine(t).substring(0,n.ch);return i+=a.split(Y).length-1,i+=a.split(J).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})}))))},B=(0,m.useRef)(),A=function(e,n){for(var t=0;t<e;t++)B.current({position:null,answer_text:""},n+t);I()},E=(0,m.useRef)(),q=function(e){E.current(e),I()},M=f.Z.useWatch(c,t);return(0,G.jsxs)("div",{className:k.Z.wrap,children:[(0,G.jsx)(f.Z.Item,{label:"试题描述",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}],children:(0,G.jsx)(b.h,{scrollId:"name",watch:!0,height:140})}),(0,G.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,G.jsx)(f.Z.Item,{label:"程序代码",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}],children:(0,G.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 r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(Y).length-1})),n.text.forEach((function(e){l+=e.split(J).length-1})),"setValue"!==n.origin)if(!r||-1===r.indexOf(Y)&&-1===r.indexOf(J)){if(l>0){var a=P(e,n.from);console.log("新增".concat(l,"个,之前有").concat(a,"个")),t(l,a)}}else{var o=r.split(Y).length-1+r.split(J).length-1,s=P(e,n.from);console.log("删除".concat(o,"个, 前面有").concat(s,"个,新增").concat(l,"个")),i(o>1?Array.from({length:o},(function(e,n){return s+n})):s)}}(e,n,A,q)}})})}),(0,G.jsx)(f.Z.List,{name:c,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("答案不能为空"));var t,i=a()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(0===(null==r?void 0:r.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 B.current=i,E.current=a,(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,G.jsx)(f.Z.Item,{label:"填空项答案",required:!0,labelCol:{span:24}}),(0,G.jsxs)("div",{onClick:function(){v.Z.warning({title:"给分说明",icon:null,width:700,centered:!0,content:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{children:["1.学生填写答案之后,必须提交代码",(0,G.jsx)("span",{style:{color:"#e30000"},children:"进行评测"}),"才能得分。"]}),(0,G.jsx)("div",{style:{marginTop:10},children:"2.试题算分时系统会将程序里面的所有空替换成学生的答案进行评测。输出的结果与测试集比对完全正确则得满分若不完全正确则依次将每个空换成学生提交的答案同时将其他空替换成标准答案运行程序。如果这个空的学生答案与标准答案结合能得到正确输出则这个空得到该空的满分否则该空得0分。"})]})})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"},children:[(0,G.jsx)(H.Z,{style:{marginRight:3,color:"#3061D0"}}),(0,G.jsx)("span",{children:" 给分说明"})]})]}),e.map((function(e,n){var t,i,a=e.key,o=e.name,s=r()(e,V);return(0,G.jsxs)(x.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,G.jsxs)(g.Z,{flex:"0 0 auto",className:"".concat(k.Z.blankIndex),children:["填空项",n+1]}),(0,G.jsx)(g.Z,{flex:1,children:(0,G.jsxs)(x.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,G.jsx)(g.Z,{children:(0,G.jsx)(f.Z.Item,d()(d()({},s),{},{name:[o,"answer_text"],noStyle:!0,children:null!=M&&null!==(t=M[o])&&void 0!==t&&t.multi_line||null!=M&&null!==(i=M[o])&&void 0!==i&&i.multiLine?(0,G.jsx)(K,{spellCheck:!1,style:{marginLeft:10,width:550}}):(0,G.jsx)(h.Z,{style:{marginLeft:10,width:550},className:k.Z.blankInput,size:"large",maxLength:1e3,onBlur:function(e){}})}))}),l&&(0,G.jsx)(g.Z,{flex:"224px",children:(0,G.jsx)(f.Z.Item,d()(d()({},s),{},{name:[o,"score"],label:"分值",rules:[{required:!0}],children:(0,G.jsx)(y.Z,{size:"large",className:k.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]})})]},a)}))]})}}),(0,G.jsx)("div",{onClick:function(){return Z(!0)},children:(0,G.jsx)(f.Z.Item,{name:["hack","analysis"],label:"题目解析",labelCol:{span:24},children:(0,G.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:N})})}),(0,G.jsx)(f.Z.Item,{label:"编程语言",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"请选择编程语言"}],children:(0,G.jsx)(_.default,{size:"large",children:U.map((function(e){return(0,G.jsxs)(_.default.Option,{value:e.key,children:[" ",e.title]},e.title)}))})}),(0,G.jsxs)(f.Z.Item,{label:"最大评测时长(秒)",style:{marginTop:30},labelCol:{span:24},required:!0,children:[(0,G.jsx)(f.Z.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"请输入单个测试集评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],noStyle:!0,children:(0,G.jsx)(y.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})}),(0,G.jsx)("span",{className:"ml10 font14",children:"秒"})]}),(0,G.jsx)(f.Z.Item,{label:"学生答案的空格处理方式",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"请选择学生答案的空格处理方式"}],children:(0,G.jsxs)(w.ZP.Group,{style:{marginTop:-10},children:[(0,G.jsx)(w.ZP,{value:0,children:"不忽略空格"}),(0,G.jsx)(w.ZP,{value:1,children:"忽略首尾空格"}),(0,G.jsx)(w.ZP,{value:2,children:"忽略所有空格"})]})}),(0,G.jsx)(f.Z.Item,{label:"测试用例",required:!0,style:{marginTop:30}}),(0,G.jsxs)("div",{style:{background:"#F6F7F9",padding:15},children:[(0,G.jsx)(f.Z.Item,{label:"输入",labelCol:{span:24},name:["hack_sets","input"],children:(0,G.jsx)(K,{rows:4})}),(0,G.jsx)(f.Z.Item,{label:"输出",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"请输入输出内容"}],children:(0,G.jsx)(K,{rows:4})})]}),(0,G.jsx)(W,{form:t,answerKey:c,hackIdentifier:o,buttonText:"运行调试",buttonProps:{ghost:!0,icon:(0,G.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 k}});var i=t(39647),r=t.n(i),l=t(79800),a=t.n(l),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(59301),p=t(95237),m=t(43604),h=t(6848),f=t(78241),v=t(5547),x=t(88996),g=t(12101),y=t(36017),_=t(37712),w=["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"],j=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,r=e.answerKey,l=e.index,a=e.isEdit,o=e.setInputActive,c=e.form,u=e.choiceOptionsPath,f=e.allowChangeMode,w=e.showAddIcon,j=e.addItem,k=e.deleteItem;console.log(n,"value");var C=1===(null==n?void 0:n[r]),N=function(){var e;C?t(d()(d()({},n),{},s()({},r,0))):(f||(e=c.getFieldValue(u),c.setFieldValue(u,e.map((function(e){return d()(d()({},e),{},s()({},r,0))})))),t(d()(d()({},n),{},s()({},r,1))))};return(0,_.jsxs)(p.Z,{className:v.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,_.jsx)(m.Z,{onClick:N,className:"".concat(v.Z.choiceIndex," ").concat(C?v.Z.activeAnswer:""),children:b[l]}),(0,_.jsx)(m.Z,{flex:1,className:"".concat(v.Z.editorWrap," ml15"),onClick:o,children:(0,_.jsx)(y.x,{height:155,placeholder:"请您输入选项",isEdit:a,value:null==n?void 0:n[i],onChange:function(e){t(d()(d()({},n),{},s()({},i,e)))}})}),(0,_.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,_.jsx)("div",{onClick:N,className:"".concat(v.Z.setAnswerBtn," ").concat(C?v.Z.activeAnswer:""),children:C?"正确答案":"设为答案"})}),(0,_.jsxs)(m.Z,{className:v.Z.actionWrapper,children:[(0,_.jsx)(h.Z,{title:"新增参考答案",children:(0,_.jsx)(x.Z,{className:v.Z.addIcon,onClick:j,style:{visibility:w?"visible":"hidden"}})}),(0,_.jsx)(h.Z,{title:"删除",children:(0,_.jsx)(g.Z,{className:v.Z.deleteIcon,onClick:k,style:{visibility:l>1?"visible":"hidden"}})})]})]})},k=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,l=e.analysisKey,o=e.choiceTextKey,c=e.answerKey,p=e.choiceOptionsPath,m=e.allowChangeMode,h=void 0===m||m,x=e.form,g=e.showAnalysis,k=void 0===g||g,C=(0,u.useState)(),N=a()(C,2),Z=N[0],S=N[1],T=(0,u.useState)(!1),P=a()(T,2),I=P[0],B=P[1];return(0,_.jsxs)("div",{className:v.Z.wrap,children:[(0,_.jsx)("div",{className:v.Z.questionTitleEditorWrap,children:(0,_.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,_.jsx)(y.h,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,_.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,_.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,_.jsxs)("div",{id:Array.isArray(p)?p.join("_"):"".concat(p),children:[e.map((function(n,l){var a=n.key,m=n.name,g=r()(n,w),y=Z===a,k=l<7&&l===e.length-1;return(0,u.createElement)(f.Z.Item,d()(d()({},g),{},{key:a,name:m,className:v.Z.choiceListWrap,rules:[{validator:function(e,n){return null!=n&&n.choice_text?Promise.resolve():Promise.reject(new Error("请先输入".concat(b[l],"选项的内容")))}}]}),(0,_.jsx)(j,{choiceTextKey:o,answerKey:c,index:l,isEdit:y,setInputActive:function(){S(a)},form:x,choiceOptionsPath:p,allowChangeMode:h,showAddIcon:k,addItem:function(){return t(s()(s()({},o,""),c,0))},deleteItem:function(){return i(m)}}))})),e.length<8&&(0,_.jsx)("div",{className:"".concat(v.Z.addBtn," mb30"),onClick:function(){return t(s()(s()({},o,""),c,0))},children:"添加选项"})]})}}),k&&(0,_.jsx)("div",{onClick:function(){return B(!0)},children:(0,_.jsx)(f.Z.Item,{name:l,label:"题目解析",labelCol:{span:24},children:(0,_.jsx)(y.x,{placeholder:"请编辑题目解析(非必填)",isEdit:I})})})]})}},56763:function(e,n,t){"use strict";t.d(n,{u:function(){return M}});var i=t(39647),r=t.n(i),l=t(91232),a=t.n(l),o=t(85573),s=t.n(o),c=t(82242),d=t.n(c),u=t(79800),p=t.n(u),m=t(37205),h=t.n(m),f=t(59301),v=t(43418),x=t(95237),g=t(43604),y=t(8772),_=t(6848),w=t(78673),b=t(78241),j=t(5112),k=t(97913),C=t(36017),N=t(12101),Z=t(64259),S=t(5547),T=t(30347),P=t(37712),I=["key","name"],B=function(e){var n=e.value,t=e.onChange;return(0,P.jsxs)(x.Z,{className:"ml20",children:[(0,P.jsx)(g.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,P.jsxs)(x.Z,{className:"mb20",children:[(0,P.jsx)(y.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var r=h()(n),l=e.target.value.trim();r[i]=l,t(r)}}),(0,P.jsx)(_.Z,{title:"删除",children:(0,P.jsx)(N.Z,{className:S.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:S.Z.modal,onOk:function(){var i=h()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,P.jsx)(g.Z,{children:(0,P.jsx)("div",{className:"".concat(S.Z.addBtn),onClick:function(){var e;(e=h()(n)).push(""),t(e)},children:"新增答案"})})]})},A=function(e){var n=e.value,t=e.onChange;return(0,P.jsxs)(x.Z,{className:"ml20",children:[(0,P.jsx)(g.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,P.jsxs)(x.Z,{align:"middle",className:"mb20",children:[(0,P.jsx)(T.Z,{value:e,style:{flex:1},onChange:function(e){var r=h()(n);r[i]=e,t(r)}}),(0,P.jsx)(_.Z,{title:"删除",children:(0,P.jsx)(N.Z,{className:S.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:S.Z.modal,onOk:function(){var i=h()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,P.jsx)(g.Z,{children:(0,P.jsx)("div",{className:"".concat(S.Z.addBtn),onClick:function(){var e;(e=h()(n)).push(""),t(e)},children:"新增答案"})})]})},E=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,P.jsx)(w.Z,{checked:!t,onChange:function(e){i(!e)}})},q="▁",M=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,o=e.answerKey,c=(0,f.useState)(!1),u=p()(c,2),m=u[0],h=u[1],v=function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(q).length-1;return i+=e.getLine(t).substring(0,n.ch).split(q).length-1},N=function(){var e=t.getFieldValue(o);t.setFieldsValue(s()({},o,e.map((function(e,n){return d()(d()({},e),{},{position:n+1})}))))},T=(0,f.useRef)(),M=function(e,n){for(var t=0;t<e;t++)T.current({position:null,answer_text:[""],model:1},n+t);N()},L=(0,f.useRef)(),O=function(e){L.current(e),N()},D=b.Z.useWatch(o,t);return(0,P.jsxs)("div",{className:S.Z.wrap,children:[(0,P.jsx)("div",{className:S.Z.questionTitleEditorWrap,children:(0,P.jsx)(b.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,P.jsx)(C.h,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(q).length-1})),"setValue"!==n.origin)if(r&&-1!==r.indexOf(q)){var a=r.split(q).length-1,o=v(e,n.from);console.log("删除".concat(a,"个, 前面有").concat(o,"个,新增").concat(l,"个")),i(a>1?Array.from({length:a},(function(e,n){return o+n})):o)}else if(l>0){var s=v(e,n.from);console.log("新增".concat(l,"个,之前有").concat(s,"个")),t(l,s)}}(e,n,M,O)}})})}),(0,P.jsx)(b.Z.List,{name:o,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=a()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(null!=r&&r.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 a=n.add,c=n.remove;i.errors;return T.current=a,L.current=c,(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(b.Z.Item,{label:(0,P.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,P.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var i,a=e.key,c=e.name,u=r()(e,I);return(0,P.jsxs)("div",{style:{marginBottom:10},children:[(0,P.jsxs)(x.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,P.jsxs)(g.Z,{style:{marginRight:10},flex:"0 0 auto",className:"".concat(S.Z.blankIndex),children:["填空项",n+1]}),(0,P.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"model"],noStyle:!0,children:(0,P.jsxs)(j.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,P.jsxs)(j.ZP,{value:1,children:["文本模式 ",(0,P.jsx)(_.Z,{title:"学生答题时,需要在文本框中填写文本答案",children:(0,P.jsx)(Z.Z,{})})]}),(0,P.jsxs)(j.ZP,{value:2,children:["数学公式模式 ",(0,P.jsx)(_.Z,{title:"学生答题时,需要编写数学公式作为答案",children:(0,P.jsx)(Z.Z,{})})]})]})}))]}),(0,P.jsx)(x.Z,{style:{marginLeft:20},align:"middle",wrap:!1,children:(0,P.jsxs)(g.Z,{flex:1,children:[(0,P.jsxs)(x.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,P.jsx)(g.Z,{flex:1,children:(0,P.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,P.jsx)(B,{}):(0,P.jsx)(A,{})}))}),l&&(0,P.jsx)(g.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"},children:(0,P.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"score"],label:"分值",rules:[{required:!0}],className:S.Z.blankInputNumberWrapper,children:(0,P.jsx)(k.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,P.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"position"],noStyle:!0,children:(0,P.jsx)(y.Z,{type:"hidden"})}))]})})]},a)}))]})}}),(0,P.jsxs)(x.Z,{align:"middle",children:[(0,P.jsx)(b.Z.Item,{name:"downcase",valuePropName:"checked",children:(0,P.jsx)(w.Z,{})}),(0,P.jsx)(g.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,P.jsxs)(x.Z,{align:"middle",children:[(0,P.jsx)(b.Z.Item,{name:"no_space",valuePropName:"checked",children:(0,P.jsx)(w.Z,{})}),(0,P.jsx)(g.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==D?void 0:D.length)>1&&(0,P.jsxs)(x.Z,{align:"middle",className:(null==D?void 0:D.length)>1?"mb30":"".concat(S.Z.hide),children:[(0,P.jsx)(b.Z.Item,{name:"is_ordered",children:(0,P.jsx)(E,{})}),(0,P.jsx)(g.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,P.jsx)("div",{onClick:function(){return h(!0)},children:(0,P.jsx)(b.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,P.jsx)(C.x,{placeholder:"请编辑题目解析(非必填)",isEdit:m})})})]})}},99041:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(39647),r=t.n(i),l=t(79800),a=t.n(l),o=t(82242),s=t.n(o),c=t(85573),d=t.n(c),u=t(59301),p=t(95237),m=t(43604),h=t(78241),f=t(5547),v=t(36017),x=t(37712),g=["key","name"],y=d()(d()({},"正确","T"),"错误","F"),_=function(e){var n=e.value,t=e.onChange,i=e.form,r=1===(null==n?void 0:n.is_answer),l=null==n?void 0:n.choice_text,a=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,x.jsxs)(p.Z,{className:f.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"},children:[(0,x.jsx)(m.Z,{onClick:a,className:"".concat(f.Z.choiceIndex," ").concat(f.Z.judgementIndex," ").concat(r?f.Z.activeAnswer:""),children:y[l]}),(0,x.jsx)(m.Z,{flex:1,className:"".concat(f.Z.editorWrap," ml15"),children:(0,x.jsx)("div",{className:"".concat(f.Z.inputBorder," ").concat(f.Z.placeholder," ").concat(r?f.Z.activeJudgementAnswer:""),children:l})}),(0,x.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,x.jsx)("div",{onClick:a,className:"".concat(f.Z.setAnswerBtn," ").concat(r?f.Z.activeAnswer:""),children:r?"正确答案":"设为答案"})})]})},w=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=(0,u.useState)(!1),l=a()(i,2),o=l[0],c=l[1];return(0,x.jsxs)("div",{className:f.Z.wrap,children:[(0,x.jsx)("div",{className:f.Z.questionTitleEditorWrap,children:(0,x.jsx)(h.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,x.jsx)(v.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,x.jsx)(h.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,x.jsx)(h.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,x.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,i=e.name,l=r()(e,g);return(0,u.createElement)(h.Z.Item,s()(s()({},l),{},{key:n,name:i,noStyle:!0}),(0,x.jsx)(_,{form:t}))}))})}})}),(0,x.jsx)("div",{onClick:function(){return c(!0)},children:(0,x.jsx)(h.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,x.jsx)(v.x,{placeholder:"请编辑题目解析(非必填)",isEdit:o})})})]})}},36017:function(e,n,t){"use strict";t.d(n,{h:function(){return p},x:function(){return m}});var i=t(82242),r=t.n(i),l=t(39647),a=t.n(l),o=t(11094),s=t(5547),c=t(42783),d=t(37712),u=["value","onChange","scrollId"],p=function(e){var n=e.value,t=e.onChange,i=e.scrollId,l=a()(e,u);return(0,d.jsx)("div",{id:i||"",children:(0,d.jsx)(o.Z,r()(r()({},l),{},{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,r=e.height,l=void 0===r?140:r;return e.isEdit?(0,d.jsx)(o.Z,{watch:!0,isFocus:!0,height:l,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 P}});var i=t(91232),r=t.n(i),l=t(79800),a=t.n(l),o=t(82242),s=t.n(o),c=t(39647),d=t.n(c),u=t(59301),p=t(8591),m=t(12563),h=t(78241),f=t(78673),v=t(95237),x=t(43604),g=t(6848),y=t(8772),_=t(97913),w=t(5547),b=t(36017),j=t(11094),k=t(64259),C=t(37712),N=["value","onChange"],Z=["key","name"],S=function(e){var n=e.value,t=e.onChange,i=d()(e,N);return(0,C.jsx)(j.Z,s()(s()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},T=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,C.jsx)(m.Z,{closable:!0,onClose:i,className:w.Z.keywordTag,children:(0,C.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},P=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,l=e.isMustKeyWords,o=void 0===l?i:l,c=(0,u.useState)(!1),m=a()(c,2),j=m[0],N=m[1],P=(0,u.useState)(""),I=a()(P,2),B=I[0],A=I[1],E=h.Z.useWatch("use_keywords",t),q=h.Z.useWatch("question_score",t);return(0,C.jsxs)("div",{className:w.Z.wrap,children:[(0,C.jsx)("div",{className:w.Z.questionTitleEditorWrap,children:(0,C.jsx)(h.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,C.jsx)(b.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,C.jsx)(h.Z.Item,{label:"参考答案",name:"answer_texts",labelCol:{span:24},children:(0,C.jsx)(S,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!o&&(0,C.jsx)(h.Z.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked",children:(0,C.jsx)(f.Z,{defaultChecked:!0})}),i&&o&&(0,C.jsxs)(v.Z,{align:"middle",className:"mb30",children:[(0,C.jsx)(h.Z.Item,{name:"use_keywords",valuePropName:"checked",children:(0,C.jsx)(f.Z,{})}),(0,C.jsx)(x.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,C.jsx)(x.Z,{children:(0,C.jsx)(g.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,C.jsx)(k.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(E||!o)&&(0,C.jsx)(h.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(q)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var i=n.add,l=n.remove;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"".concat(w.Z.title," mb10"),children:o?"关键词":(0,C.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,C.jsxs)(v.Z,{align:"middle",className:"font14 mb30",children:[(0,C.jsx)(x.Z,{flex:1,children:(0,C.jsx)(y.Z,{value:B,onChange:function(e){A(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,l,a,o,s="".concat(null===(n=e.target)||void 0===n?void 0:n.value),c=null==s||null===(l=s.split("|"))||void 0===l||null===(l=l.filter((function(e){return!!e})))||void 0===l?void 0:l.map((function(e){return null==e?void 0:e.trim()})),d=t.getFieldValue("keywords"),u=(null==d||null===(a=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===a?void 0:a.flat())||[],m=r()(c);try{for(m.s();!(o=m.n()).done;){var h=o.value;if(u.includes(h))return void p.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||(p.ZP.warning("关键词不能只输入一个“|”字符!"),!1);p.ZP.warning("关键词不能全为空格")})(s)&&(i({keyword:c,score:1}),A(""))},className:w.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,C.jsx)(x.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,C.jsx)(v.Z,{className:"mb20",style:{marginRight:148},children:(0,C.jsx)(x.Z,{flex:1,children:(0,C.jsxs)(v.Z,{align:"middle",justify:"space-between",children:[(0,C.jsx)(h.Z.Item,s()(s()({},i),{},{name:[t,"keyword"],children:(0,C.jsx)(T,{onClose:function(){return l(t)}})})),o&&(0,C.jsx)(h.Z.Item,s()(s()({},i),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:w.Z.blankInputNumberWrapper,children:(0,C.jsx)(_.Z,{className:w.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,C.jsx)("div",{onClick:function(){return N(!0)},children:(0,C.jsx)(h.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,C.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:j})})})]})}},95166:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i="text___bQulM",r="sup___rX_Y3",l=t(78241),a=t(37712),o=function(e){var n=e.text,t=e.name,o=void 0===t?"question_score":t,s=function(e){var t=e.value;return(0,a.jsxs)("div",{className:i,children:[(0,a.jsx)("span",{className:r,children:"*"}),(0,a.jsx)("span",{className:"mr10",children:"分值"}),(0,a.jsx)("span",{children:t||"--"}),(0,a.jsx)("span",{className:"c-grey-999",children:n})]})};return(0,a.jsx)(l.Z.Item,{noStyle:!0,name:o,children:(0,a.jsx)(s,{})})}},37507:function(e,n,t){"use strict";t.d(n,{h:function(){return x}});var i=t(82242),r=t.n(i),l=t(79800),a=t.n(l),o=t(59301),s=t(57809),c=t(78241),d=t(3113),u=t(89780),p=t.n(u),m=(t(81974),t(3693),t(37712)),h=s.default.Option,f={labelCol:{span:4},wrapperCol:{span:20}},v={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 x(e){var n=e.value,t=e.onChange,i=e.mode,l=e.options,s=void 0===l?{}:l,c=(0,o.useRef)(),d=(0,o.useState)(),u=a()(d,2),h=u[0],f=u[1];return(0,o.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,o.useEffect)((function(){h&&h.setOption("mode",i)}),[h,i]),(0,o.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,o.useEffect)((function(){if(c.current&&!h){var e=p().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},s));f(e)}}),[c.current,h]),(0,m.jsx)("div",{className:"my-codemirror-container",children:(0,m.jsx)("textarea",{ref:c})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,o.useState)("python"),l=a()(i,2),u=l[0],p=l[1];return(0,m.jsxs)(c.Z,r()(r()({},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){p(v[e][1])},children:Object.keys(v).map((function(e){return(0,m.jsx)(h,{value:e,children:v[e][0]},e)}))})}),(0,m.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,m.jsx)(x,{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),r=t.n(i),l=t(79800),a=t.n(l),o=t(85573),s=t.n(o),c=t(59301),d=t(89780),u=t.n(d),p=t(76374),m=(t(81974),t(6313),t(25717),t(99498),t(25419),t(67549),t(42783)),h=t(37712),f=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[t]));return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=t(82242),x=t.n(v),g=[{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 y(e){var n=e.onActionCallback,t=e.title,i=e.icon,r=e.actionName,l=e.className,a=void 0===l?"":l,o=e.children;return(0,h.jsxs)("a",{title:t,className:a,onClick:function(){n(r)},children:[(0,h.jsx)("i",{className:"".concat(i)}),o]})}var _=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,l=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.extraUse,c=[].concat(g,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,h.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&c.map((function(e,n){return(0,h.jsx)("li",{children:e.actionName?(0,h.jsx)(y,x()(x()({},e),{},{onActionCallback:r})):(0,h.jsx)("span",{className:"v-line"})},n)})),t?(0,h.jsx)("li",{children:(0,h.jsx)(y,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("li",{children:(0,h.jsx)(y,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,h.jsx)("li",{children:(0,h.jsx)(y,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,a&&(0,h.jsx)("li",{children:(0,h.jsx)(y,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),s&&(0,h.jsx)("li",{children:s}),(0,h.jsx)("li",{className:"btn-full-screen",children:(0,h.jsx)(y,{icon:"".concat(l?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:l?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},w=t(27308),b=t(78241),j=t(8772),k=t(3113),C={labelCol:{span:4},wrapperCol:{span:20}},N=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,x()(x()({},C),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,h.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},Z=t(37507),S=t(8591),T=t(55087),P=b.Z.useForm,I={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},A=function(e){var n=e.callback,t=e.onCancel,i=P(),r=a()(i,1)[0],l=(0,c.useRef)();function o(e,n){-1!==e.status?r.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):S.ZP.error(e.message)}return(0,h.jsxs)(b.Z,x()(x()({form:r},B),{},{className:"upload-image-panel",onFinish:function(e){n(e,l.current)},style:{width:470,overflow:"hidden"},children:[(0,h.jsx)(b.Z.Item,{label:"图片地址",required:!0,children:(0,h.jsxs)("div",{className:"flex-container",children:[(0,h.jsx)(b.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,h.jsx)(j.Z,{style:I})}),(0,h.jsx)(E,{onFileChange:function(e){var n=e.target.files[0];l.current=n,q(n,o)}})]})}),(0,h.jsx)(b.Z.Item,{label:"图片描述",name:"alt",children:(0,h.jsx)(j.Z,{style:{width:264}})}),(0,h.jsxs)(b.Z.Item,{style:{textAlign:"right"},children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function E(e){var n=e.onFileChange;return(0,h.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,h.jsx)("input",{type:"file",onChange:n})]})}function q(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(T.KI,"/api/attachments.json")),i.send(t)}var M=t(95237),L=t(74908),O=function(e){var n=e.callback,t=e.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var l=i.toDataURL("image/png");return(0,h.jsx)(M.Z,{style:{height:"100vh"},children:(0,h.jsx)(L.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:l,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},D=t(7557),F=t.n(D),R=t(41498),z=t.n(R),G=t(37205),W=t.n(G),H=t(12378);function V(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(V,go.CommandHandler),V.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},V.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.x,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n,e.position.y))})),e.commitTransaction("aligning left")},V.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.x+e.actualBounds.width;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},V.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.y,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,n))})),e.commitTransaction("alignTop")},V.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.y+e.actualBounds.height;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},V.prototype.alignCenterX=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center X");var t=n.actualBounds.x+n.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},V.prototype.alignCenterY=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center Y");var t=n.actualBounds.y+n.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},V.prototype.alignColumn=function(e){var n=this.diagram;n.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],l=r.actualBounds.y+r.actualBounds.height+e;t[i+1].move(new go.Point(r.actualBounds.x,l))}n.commitTransaction("align Column")},V.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var n=this.diagram;n.startTransaction("align Row");var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],l=r.actualBounds.x+r.actualBounds.width+e;t[i+1].move(new go.Point(l,r.actualBounds.y))}n.commitTransaction("align Row")},V.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},V.prototype.rotate=function(e){var n;void 0===e&&(e=90),(n=this.diagram).startTransaction("rotate "+e.toString()),(n=this.diagram).selection.each((function(n){n instanceof go.Link||n instanceof go.Group||(n.angle+=e)})),n.commitTransaction("rotate "+e.toString())},V.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.max(t,n)}})),n.set(e,t)})),e.selection.each((function(e){V._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},V.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.min(t,n)}})),n.set(e,t)})),e.selection.each((function(e){V._assignZOrder(e,n.get(e.layer)-1-V._findGroupDepth(e))})),e.commitTransaction("pushToBack")},V._assignZOrder=function(e,n,t){void 0===t&&(t=e),e.layer===t.layer&&(e.zOrder=n),e instanceof go.Group&&e.memberParts.each((function(e){V._assignZOrder(e,n+1,t)}))},V._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,V._findGroupDepth(e))})),n+1}return 0},V.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var n=e.lastInput;if("Up"===n.key||"Down"===n.key||"Left"===n.key||"Right"===n.key){var t=this.arrowKeyBehavior;if("none"===t)return;if("select"===t)return void this._arrowKeySelect();if("move"===t)return void this._arrowKeyMove();if("tree"===t)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},V.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(n){e.push(n)})),this.diagram.parts.each((function(n){e.push(n)})),e},V.prototype._arrowKeyMove=function(){var e=this.diagram,n=e.lastInput,t=0,i=0;if(n.control||n.meta)t=1,i=1;else if(null!==e.grid){var r=e.grid.gridCellSize;i=r.width,t=r.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-t)):"Down"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+t)):"Left"===n.key?e.move(new go.Point(e.actualBounds.x-i,e.actualBounds.y)):"Right"===n.key&&e.move(new go.Point(e.actualBounds.x+i,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},V.prototype._arrowKeySelect=function(){var e=this.diagram,n=e.lastInput,t=null;"Up"===n.key?t=this._findNearestPartTowards(270):"Down"===n.key?t=this._findNearestPartTowards(90):"Left"===n.key?t=this._findNearestPartTowards(180):"Right"===n.key&&(t=this._findNearestPartTowards(0)),null!==t&&(n.shift?t.isSelected=!0:n.control||n.meta?t.isSelected=!t.isSelected:e.select(t))},V.prototype._findNearestPartTowards=function(e){var n=this.diagram.selection.first();if(null===n)return null;for(var t=n.actualBounds.center,i=this._getAllParts(),r=1/0,l=n,a=0;a<i.length;a++){var o=i[a];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))<r&&(r=u,l=o)}}}return l},V.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},V.prototype._arrowKeyTree=function(){var e=this.diagram,n=e.selection.first();if(n instanceof go.Node){var t=e.lastInput;if("Right"===t.key)if(n.isTreeLeaf);else if(n.isTreeExpanded){null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r)}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!==(l=n.findTreeParentNode())&&e.select(l)}else if("Up"===t.key){if(null!==(l=n.findTreeParentNode()))if((o=(a=this._sortTreeChildrenByY(l)).indexOf(n))>0){for(var i=a.elt(o-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(l)}else if("Down"===t.key){var r;if(n.isTreeExpanded&&!n.isTreeLeaf)null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r);else for(;null!==n;){var l,a,o;if(null===(l=n.findTreeParentNode()))break;if((o=(a=this._sortTreeChildrenByY(l)).indexOf(n))<a.length-1){e.select(a.elt(o+1));break}n=l}}var s=e.selection.first();null!==s&&e.scrollToRect(s.actualBounds)}},V.prototype._sortTreeChildrenByY=function(e){var n=(new go.List).addAll(e.findTreeChildrenNodes());return n.sort((function(e,n){var t=e.location,i=n.location;return t.y<i.y?-1:t.y>i.y?1:t.x<i.x?-1:t.x>i.x?1:0})),n},V.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},V.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(V.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(V.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var K=V,U=(t(31270),t(85160)),Y=t(43418),J=t(43604),X=t(51136),Q="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=H;var ee=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),r=(0,c.useRef)(),l=(0,c.useRef)(),o=(0,c.useRef)(!1),s=(0,c.useRef)(!1),d=(0,c.useState)(0),u=a()(d,2),p=u[0],m=u[1],f=function(){var e=z()(F()().mark((function e(){var n,r;return F()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,X.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:n.src}});case 3:r=e.sent,t({src:r.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){m(p+1)}),[]),(0,h.jsx)("div",{ref:s,className:o.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,h.jsx)(Y.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:s.current,rootClassName:"zIndex-9999",title:(0,h.jsxs)(M.Z,{children:[(0,h.jsx)(J.Z,{flex:1,children:"插入流程图"}),(0,h.jsx)(J.Z,{onClick:function(){o.current=!o.current,m(p+1)},children:(0,h.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,children:(0,h.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,h.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,h.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,h.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,h.jsx)("div",{style:{height:"calc(100% - 50px)"},className:Q,ref:l})]}),(0,h.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,h.jsx)(U.FI,{initDiagram:function(){var e=H.GraphObject.make,n="#ff3333",t="#3358ff",a="#25ad23",o="#d533ff",s="#7d33ff",c="#ff6233",d="#ffffff",u="#000000",p="#fffcd5",m="#d5ebff",h="#f2dfe0",f="#a5d2fa",v="#cccccc",x="#b3e6b3",g="#fcbbbd";function y(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var r=t.part.adornedPart,l=(new H.Point).setRectSpot(r.actualBounds,n);l.subtract(r.location),l.scale(2,2),l.x+=130*Math.sign(l.x),l.y+=130*Math.sign(l.y),l.add(r.location),l.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var a=i.copyNodeData(r.data);i.setGroupKeyForNodeData(a,i.getGroupKeyForNodeData(r.data)),i.addNodeData(a);var o={from:r.key,to:i.getKeyForNodeData(a)};i.addLinkData(o);var s=e.diagram.findNodeForData(a);s.location=l,e.diagram.select(s),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(H.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(H.Spot.Top)||n.equals(H.Spot.Bottom)?25:18,height:n.equals(H.Spot.Top)||n.equals(H.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 _(n){return e(H.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 w(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(H.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:w(t,n),contextClick:w(t,n)})}function j(){return[e("ContextMenuButton",e(H.Panel,"Horizontal",b(d,"fill"),b(p,"fill"),b(m,"fill"),b(h,"fill"))),e("ContextMenuButton",e(H.Panel,"Horizontal",b(v,"fill"),b(x,"fill"),b(f,"fill"),b(g,"fill")))]}function k(){return[e("ContextMenuButton",e(H.Panel,"Horizontal",b(u),b(a),b(t),b(n))),e("ContextMenuButton",e(H.Panel,"Horizontal",b(d),b(o),b(s),b(c)))]}function C(n,t){return t||(t="thickness"),e(H.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:w(t,n),contextClick:w(t,n)})}function N(n,t){return t||(t="dash"),e(H.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:w(t,n),contextClick:w(t,n)})}function Z(){return[e("ContextMenuButton",e(H.Panel,"Horizontal",C(1),C(2),C(3),C(4))),e("ContextMenuButton",e(H.Panel,"Horizontal",N(null),N([2,4]),N([4,4])))]}function S(n,t){return t||(t="figure"),e(H.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:w(t,n),contextClick:w(t,n)})}function T(n){return e(H.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function P(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(H.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:w("dir",n),contextClick:w("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",H.Spot.stringify(H.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(H.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:t,contextClick:t})}function B(n,t){var i=0,r=H.Spot.RightSide;n.equals(H.Spot.Top)?(i=270,r=H.Spot.TopSide):n.equals(H.Spot.Left)?(i=180,r=H.Spot.LeftSide):n.equals(H.Spot.Bottom)&&(i=90,r=H.Spot.BottomSide),t||(i-=180);var l=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",H.Spot.stringify(r)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(H.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:l,contextClick:l})}return i.current=new H.Diagram(r.current,{padding:20,grid:e(H.Panel,"Grid",e(H.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(H.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(K),"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(H.Node,"Auto",{locationSpot:H.Spot.Center,locationObjectName:"SHAPE",desiredSize:new H.Size(120,60),minSize:new H.Size(40,40),resizable:!0,resizeCellSize:new H.Size(10,10),rotatable:!0},new H.Binding("location","loc",H.Point.parse).makeTwoWay(H.Point.stringify),new H.Binding("desiredSize","size",H.Size.parse).makeTwoWay(H.Size.stringify),e(H.Shape,{name:"SHAPE",fill:d,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:H.Spot.AllSides,toSpot:H.Spot.AllSides},new H.Binding("figure"),new H.Binding("fill"),new H.Binding("stroke","borderColor"),new H.Binding("strokeWidth","thickness"),new H.Binding("strokeDashArray","dash")),e(H.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(H.TextBlock,{margin:1,textAlign:"center",overflow:H.TextBlock.OverflowEllipsis,editable:!0},new H.Binding("text").makeTwoWay(),new H.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(H.Panel,"Vertical",{maxSize:new H.Size(200,NaN)},e(H.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new H.Binding("text")),e(H.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new H.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(H.Adornment,"Spot",e(H.Placeholder,{padding:10}),y(H.Spot.Top,"TriangleUp"),y(H.Spot.Left,"TriangleLeft"),y(H.Spot.Right,"TriangleRight"),y(H.Spot.Bottom,"TriangleDown"),_({alignment:new H.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(H.Panel,"Horizontal",S("Rectangle"),S("RoundedRectangle"),S("Ellipse"),S("Diamond"))),e("ContextMenuButton",e(H.Panel,"Horizontal",S("Parallelogram2"),S("ManualOperation"),S("Procedure"),S("Cylinder1"))),e("ContextMenuButton",e(H.Panel,"Horizontal",S("Terminator"),S("CreateRequest"),S("Document"),S("TriangleDown"))),j(),k(),Z()),i.current.groupTemplate=e(H.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:H.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 H.Binding("location","loc",H.Point.parse).makeTwoWay(H.Point.stringify),e(H.Panel,"Auto",{name:"BODY"},e(H.Shape,{parameter1:10,fill:d,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:H.Spot.AllSides,toSpot:H.Spot.AllSides},new H.Binding("fill"),new H.Binding("stroke","color"),new H.Binding("strokeWidth","thickness"),new H.Binding("strokeDashArray","dash")),e(H.Placeholder,{background:"transparent",margin:20})),e(H.TextBlock,{alignment:H.Spot.Top,alignmentFocus:H.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new H.Binding("text"),new H.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(H.Adornment,"Spot",e(H.Panel,"Auto",e(H.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(H.Placeholder,{margin:1.5})),_({alignment:H.Spot.TopRight,alignmentFocus:H.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",j(),k(),Z()),i.current.linkTemplate=e(H.Link,{layerName:"Foreground",routing:H.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new H.Binding("fromSpot","fromSpot",H.Spot.parse),new H.Binding("toSpot","toSpot",H.Spot.parse),new H.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new H.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new H.Binding("points").makeTwoWay(),e(H.Shape,{strokeWidth:2},new H.Binding("stroke","color"),new H.Binding("strokeWidth","thickness"),new H.Binding("strokeDashArray","dash")),e(H.Shape,{segmentIndex:0,segmentOffset:new H.Point(15,0),segmentOrientation:H.Link.OrientAlong,alignmentFocus:H.Spot.Right,figure:"circle",width:10,strokeWidth:0},new H.Binding("fill","color"),new H.Binding("visible","dir",(function(e){return 1===e}))),e(H.Shape,{segmentIndex:-1,segmentOffset:new H.Point(-10,6),segmentOrientation:H.Link.OrientPlus90,alignmentFocus:H.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new H.Binding("fill","color"),new H.Binding("visible","dir",(function(e){return e>=1})),new H.Binding("width","thickness",(function(e){return 7+3*e})),new H.Binding("height","thickness",(function(e){return 7+3*e})),new H.Binding("segmentOffset","thickness",(function(e){return new H.Point(-15,4+1.5*e)}))),e(H.Shape,{segmentIndex:0,segmentOffset:new H.Point(15,-6),segmentOrientation:H.Link.OrientMinus90,alignmentFocus:H.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new H.Binding("fill","color"),new H.Binding("visible","dir",(function(e){return 2===e})),new H.Binding("width","thickness",(function(e){return 7+3*e})),new H.Binding("height","thickness",(function(e){return 7+3*e})),new H.Binding("segmentOffset","thickness",(function(e){return new H.Point(-15,4+1.5*e)}))),e(H.TextBlock,{alignmentFocus:new H.Spot(0,1,-4,0),editable:!0},new H.Binding("text").makeTwoWay(),new H.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(H.Adornment,e(H.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:T(2)},new H.Binding("pathPattern","thickness",T)),_({alignmentFocus:new H.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",k(),Z(),e("ContextMenuButton",e(H.Panel,"Horizontal",P(0),P(1),P(2))),e("ContextMenuButton",e(H.Panel,"Horizontal",e(H.Panel,"Spot",I(!1),B(H.Spot.Top,!1),B(H.Spot.Left,!1),B(H.Spot.Right,!1),B(H.Spot.Bottom,!1)),e(H.Panel,"Spot",{margin:new H.Margin(0,0,0,2)},I(!0),B(H.Spot.Top,!0),B(H.Spot.Left,!0),B(H.Spot.Right,!0),B(H.Spot.Bottom,!0))))),new H.Palette(l.current,{maxSelectionCount:1,linkTemplate:e(H.Link,{locationSpot:H.Spot.Center,selectionAdornmentTemplate:e(H.Adornment,"Link",{locationSpot:H.Spot.Center},e(H.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(H.Shape,{toArrow:"Standard",stroke:null}))},{routing:H.Link.AvoidsNodes,curve:H.Link.JumpOver,corner:5,toShortLength:4},new H.Binding("points"),e(H.Shape,{isPanelMain:!0,strokeWidth:2}),e(H.Shape,{toArrow:"Standard",stroke:null})),model:new H.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(W()(H.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(H.Node,"Auto",{locationSpot:H.Spot.Center},new H.Binding("location","location",H.Point.parse).makeTwoWay(H.Point.stringify),e(H.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 H.Binding("stroke").makeTwoWay(),new H.Binding("fill").makeTwoWay(),new H.Binding("figure")),e(H.TextBlock,{margin:new H.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new H.Size(16,16),maxSize:new H.Size(10,NaN),textAlign:"center",editable:!0},new H.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(H.Panel,"Grid",e(H.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(H.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),i.current.grid.visible=!0,i.current.grid.gridCellStroke="darkgray",i.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=i.current,i.current},divClassName:"diagram-component",style:{height:"80vh"}}),(0,h.jsx)("div",{ref:r})]})]}),(0,h.jsx)("div",{className:"tr",children:(0,h.jsx)(k.ZP,{size:"large",onClick:f,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},ne=t(5112),te=t(97913),ie=ne.ZP.Group,re={margin:"0 8px"},le=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,h.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"单元格数:"}),(0,h.jsx)("span",{style:re,children:"行数"}),(0,h.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,h.jsx)(te.Z,{})}),(0,h.jsx)("span",{style:re,children:"列数"}),(0,h.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,h.jsx)(te.Z,{})})]}),(0,h.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"对齐方式:"}),(0,h.jsx)(b.Z.Item,{name:"align",children:(0,h.jsxs)(ie,{children:[(0,h.jsx)(ne.ZP,{value:"default",children:(0,h.jsx)("i",{className:"fa fa-align-justify"})}),(0,h.jsx)(ne.ZP,{value:"left",children:(0,h.jsx)("i",{className:"fa fa-align-left"})}),(0,h.jsx)(ne.ZP,{value:"center",children:(0,h.jsx)("i",{className:"fa fa-align-center"})}),(0,h.jsx)(ne.ZP,{value:"right",children:(0,h.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},ae=t(78673),oe=t(66455),se=t.n(oe),ce=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,r=e.height,l=e.callback,o=(e.showSaveButton,(0,c.useRef)()),s=(0,c.useRef)(),d=(0,c.useState)(!1),u=a()(d,2),p=u[0],m=u[1],f=(0,c.useRef)({id:o,appName:"graphing",width:i||1e3,height:r||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 v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return l&&l(e),e};return(0,c.useEffect)((function(){f.current.appName=p?"3D":"graphing",s.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){m(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:v}})),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:o}),(0,h.jsxs)(M.Z,{align:"middle",children:[(0,h.jsx)(J.Z,{flex:1,children:(0,h.jsx)(ae.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return m(e)}})}),(0,h.jsx)(J.Z,{children:(0,h.jsx)(k.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),de=t(33773),ue=t(27065),pe="link",me="upload-image",he="add-flowchart",fe="draw-image",ve="code-block",xe="add-table",ge="------------",ye={default:ge,left:":".concat(ge),center:":".concat(ge,":"),right:"".concat(ge,":")},_e=t(56266);var we="@▁▁@",be=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function je(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ke=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ce=s()(s()({},ke+"-B","bold"),ke+"-I","italic"),Ne=s()(s()(s()(s()(s()(s()(s()(s()({},pe,"添加链接"),ve,"添加代码块"),me,"添加图片"),fe,"添加画图"),he,"插入流程图"),xe,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Ze=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,l=e.width,o=void 0===l?"100%":l,d=e.height,v=void 0===d?400:d,x=e.miniToolbar,g=void 0!==x&&x,y=e.isFocus,b=void 0!==y&&y,j=e.watch,k=e.insertTemp,C=e.mode,T=void 0===C?"markdown":C,P=e.id,I=void 0===P?"markdown-editor-id":P,B=e.showResizeBar,E=void 0!==B&&B,M=e.noStorage,L=void 0!==M&&M,D=e.showNullButton,F=void 0!==D&&D,R=e.showNullProgramButton,z=void 0!==R&&R,G=e.hidetoolBar,W=void 0!==G&&G,H=e.fullScreen,V=void 0!==H&&H,K=e.onBlur,U=e.onCMBeforeChange,J=e.onFullScreen,X=e.className,Q=void 0===X?"":X,$=e.disablePaste,ne=void 0!==$&&$,te=e.disabled,ie=void 0!==te&&te,re=e.disabledFill,ae=void 0!==re&&re,oe=e.placeholder,se=void 0===oe?"":oe,ge=e.values,ke=void 0===ge?"":ge,Ze=e.extraUse,Se=(0,c.useState)(null),Te=a()(Se,2),Pe=Te[0],Ie=Te[1],Be=(0,c.useState)(t),Ae=a()(Be,2),Ee=Ae[0],qe=Ae[1],Me=(0,c.useState)(j),Le=a()(Me,2),Oe=Le[0],De=Le[1],Fe=(0,c.useState)(V),Re=a()(Fe,2),ze=Re[0],Ge=Re[1],We=(0,c.useState)(""),He=a()(We,2),Ve=He[0],Ke=He[1],Ue=(0,c.useState)(0),Ye=a()(Ue,2),Je=Ye[0],Xe=Ye[1],Qe=(0,c.useState)(v),$e=a()(Qe,2),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),rn=a()(tn,2),ln=(rn[0],rn[1]),an=(0,c.useState)(0),on=a()(an,2),sn=on[0],cn=on[1],dn=(0,c.useState)(0),un=a()(dn,2),pn=un[0],mn=un[1],hn=(0,c.useRef)(),fn=(0,c.useRef)(),vn=(0,c.useRef)(),xn=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;qe(ke),null==Pe||Pe.setValue(ke),window.scrollTo(0,e)}),[ke]),(0,c.useEffect)((function(){null==J||J(ze)}),[ze]),(0,c.useEffect)((function(){if(hn.current){var e=function(e,t){if(!ne){var i=t.clipboardData;if(i){var r=i.types.toString(),l=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==T)return;try{var a,o=l[1];"file"===(null===(a=l[0])||void 0===a?void 0:a.kind)&&(o=l[0]);var s=o.getAsFile(),c=s.name.split(".").pop();q(s,(function(e){var t,i,r;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===(r=s.type)||void 0===r?void 0:r.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){S.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=u().fromTextArea(hn.current,{mode:T,lineNumbers:!g,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(),r=t.getLine(i.line),l=r.charAt(i.ch-1),a=r.lastIndexOf("@▁@",i.ch),o=r.lastIndexOf("@▁▁@",i.ch),s=a>o?a:o,c=a>o?3:4;if(-1===we.indexOf(l))return null;if(console.log("change1:",n,e,r,i,s,a,o,l),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 gn=(0,c.useCallback)((function(){fn.current}),[en,fn,ze]);(0,c.useEffect)((function(){if(Pe){var e=function(){var e=new p.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(gn(),Pe.setSize("100%","100%"),Pe.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(hn.current.parentElement),e}();return function(){var n,t;null!==(n=hn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=hn.current)||void 0===t?void 0:t.parentElement)}}}),[Pe,gn]),(0,c.useEffect)((function(){if(Pe){for(var e=[],n=function(){var n=a()(i[t],2),r=n[0],l=n[1],o=s()({},r,(function(){yn(l)}));e.push(o),Pe.addKeyMap(o)},t=0,i=Object.entries(Ce);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Pe.removeKeyMap(i)}}}}),[Pe]),(0,c.useEffect)((function(){V!==ze&&Ge(V)}),[V]),(0,_e.Z)((function(){if(!L&&Je>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(I);e>=Je+1e4&&(!n||n!==Ee)&&(window.sessionStorage.setItem(I,Ee),ln(!0))}}),1e4),(0,c.useEffect)((function(){De(j)}),[Pe,j]),(0,c.useEffect)((function(){Pe&&b&&Pe.focus()}),[Pe,b]),(0,c.useEffect)((function(){if(Oe&&Pe){var e=function(e){var n=e.target;if(xn.current){var t=n.scrollTop/n.scrollHeight;xn.current.scrollTop=xn.current.scrollHeight*t}},n=Pe.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Pe,Oe]),(0,c.useEffect)((function(){if(Pe&&U){var e=function(e,n){U(e,n)};return Pe.on("beforeChange",e),function(){Pe.off("beforeChange",e)}}}),[Pe,U]),(0,c.useEffect)((function(){if(Pe&&K){var e=function(){K(Pe.getValue())};return Pe.on("blur",e),function(){Pe.off("blur",e)}}}),[Pe,K]),(0,c.useEffect)((function(){if(Pe){var e=function(e,n){var t=e.getValue();qe(t),Xe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(z?i(t,kn(t)):i(t))};return Pe.on("change",e),function(){Pe.off("change",e)}}}),[Pe,i]),(0,c.useEffect)((function(){if(Pe)if(null==t)Pe.setValue(""),qe("");else{var e=window.scrollY||window.pageYOffset;t!==Pe.getValue()&&(Pe.setValue(t),qe(t),Pe.setCursor(ie?1:Pe.lineCount(),0),window.scrollTo(0,e))}}),[Pe,t]);var yn=(0,c.useCallback)((function(e){var n=Pe.getCursor(),t=Pe.getSelection(),i=t.split("\n");switch(e){case"bold":return Pe.replaceSelection("**"+t+"**"),""===t&&Pe.setCursor(n.line,n.ch+2),Pe.focus();case"italic":return Pe.replaceSelection("*"+t+"*"),""===t&&Pe.setCursor(n.line,n.ch+1),Pe.focus();case"code":return Pe.replaceSelection("`"+t+"`"),""===t&&Pe.setCursor(n.line,n.ch+1),Pe.focus();case"inline-latex":return Ke("inline-latex"),Pe.focus();case"latex":return Pe.replaceSelection("```latex\n"+t+"\n```"),Pe.setCursor(n.line+1,t.length+1),Pe.focus();case"line-break":return Pe.replaceSelection("<br/>\n"),Pe.focus();case"list-ul":return""===t?Pe.replaceSelection("- "+t):Pe.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Pe.focus();case"list-ol":return""===t?Pe.replaceSelection("1. "+t):Pe.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Pe.focus();case"add-null-ch":return""===t&&Pe.setCursor(n.line,n.ch),Pe.replaceSelection("▁"),Pe.focus();case"add-signal":return""===t&&Pe.setCursor(n.line,n.ch),Pe.replaceSelection("@▁@"),Pe.focus();case"add-multiple":return""===t&&Pe.setCursor(n.line,n.ch),Pe.replaceSelection(we),Pe.focus();case"inster-template-1":return""===t&&Pe.setCursor(n.line,n.ch),Pe.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Pe.focus();case"eraser":return Pe.setValue(""),Pe.focus();case"trigger-watch":return De(!Oe),Pe.focus();case"trigger-full-screen":return Ge(!ze),Pe.focus();case pe:return void Ke(pe);case ve:return void Ke(ve);case me:return void Ke(me);case fe:return void Ke(fe);case"maths-latex":return void Ke("maths-latex");case he:return void Ke(he);case xe:return void Ke(xe);default:throw new Error}}),[Pe,Oe,ze]),_n=(0,c.useCallback)((function(e,n){var t,i,r,l,a;switch(Ke(""),Ve){case pe:var o=e.title,s=e.link;return Pe.replaceSelection("[".concat(o,"](").concat(s,")")),Pe.focus();case ve:var c=e.language,d=e.content;return Pe.replaceSelection(["```"+c,d,"```"].join("\n")),Pe.focus();case"maths-latex":for(var u=atob(e),p=new Uint8Array(u.length),m=0;m<u.length;m++)p[m]=u.charCodeAt(m);q(new Blob([p],{type:"image/png"}),(function(e){e.id?Pe.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":Pe.replaceSelection("`$$"+e+"$$`");break;case me:case fe:case"add-flowchart":var h=e.src,f=e.alt,v=n,x=null==v||null===(t=v.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==v||null===(r=v.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==v||!v.type?f?Pe.replaceSelection("![ ".concat(f," ]( ").concat(h,' "').concat(f,'" )')):Pe.replaceSelection("![,](".concat(h,")")):(null==v||null===(l=v.type)||void 0===l?void 0:l.indexOf("video"))>-1?Pe.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER).concat(h,'"></video>')):(null==v||null===(a=v.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?Pe.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,"?type=").concat(v.type,'&disposition=inline" target="_blank">').concat(v.name,"</a>")):be.includes(x)?Pe.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,'?type=office&disposition=inline" target="_blank">').concat(v.name,"</a>")):Pe.replaceSelection("[".concat(v.name,"](").concat(ue.Z.API_SERVER).concat(h,")")),Pe.focus();case xe:for(var g=e.row,y=e.col,_=e.align,w="\n",b=0;b<g;b++){for(var j=[],k=[],C=0;C<y;C++)1===b&&k.push(ye[_]),j.push(" ");1===b&&(w+="| ".concat(k.join(" | ")," |\n")),w+="| ".concat(j.join(1===y?"":" | ")," |\n")}return Pe.replaceSelection(w+"\n"),Pe.focus();default:throw new Error}}),[Pe,Ve]),wn=(0,c.useMemo)((function(){switch(Ve){case pe:return(0,h.jsx)(N,{callback:_n,onCancel:bn});case ve:return(0,h.jsx)(Z.Z,{callback:_n,onCancel:bn});case me:return(0,h.jsx)(A,{callback:_n,onCancel:bn});case he:return(0,h.jsx)(ee,{callback:_n,onCancel:bn});case xe:return(0,h.jsx)(le,{callback:_n,onCancel:bn});case"maths-latex":return(0,h.jsx)(ce,{showSaveButton:!0,callback:_n});case"inline-latex":return(0,h.jsx)(de.Z,{showSaveButton:!0,callback:_n});default:return null}}),[Ve]);function bn(){Ke("")}(0,c.useEffect)((function(){if(vn.current){var e=function(e){r=!0,l=e.pageY},n=function(){r=!1},t=function(e){if(r){var n=e.pageY-l;n<0&&(n=0),n>300&&(n=300),nn(v+n+"px")}},i=vn.current,r=!1,l=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)}}}),[Pe,vn]),(0,c.useEffect)((function(){nn(v)}),[v]);var jn={width:je(o),height:je(en)},kn=((0,c.useMemo)((function(){if(Je){var e=new Date(Je),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}),[Je]),function(e){var n=[];if(z){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){if(Ne[Ve]&&Ve!==fe&&Ve!==he){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;cn(n),mn(t)}}),[Ve]);var Cn=function(e,n,t,i){var r=document.body.clientHeight,l=document.body.clientWidth;return!(e<20&&t>e||e>l-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,h.jsxs)(c.Fragment,{children:[(0,h.jsx)("div",{className:"markdown-editor-wrapper",ref:fn,children:(0,h.jsxs)("div",{className:"markdown-editor-container ".concat(Q," ").concat(Oe?"on-preview":""," ").concat(g?"mini":""," ").concat(ze?"full-screen":""),style:jn,children:[(0,h.jsx)(_,{insertTemp:k,watch:Oe,fullScreen:ze,showNullButton:F,showNullProgramButton:z,onActionCallback:yn,hidetoolBar:W,extraUse:Ze}),(0,h.jsxs)("div",{className:"markdown-editor-body",children:[(0,h.jsx)("div",{className:"codemirror-container",children:(0,h.jsx)("textarea",{ref:hn,placeholder:se})}),Oe?(0,h.jsxs)("div",{ref:xn,className:"preview-container",children:["stex"===T&&(0,h.jsx)(f,{value:Ee}),"stex"!==T&&(0,h.jsx)(m.Z,{disabledFill:ae,showProgramFill:z,value:Ee})]}):null]})]})}),E?(0,h.jsx)("a",{ref:vn,className:"editor-resize"}):null,Ve===fe&&(0,h.jsx)(O,{callback:_n,onCancel:bn}),Ve===he&&(0,h.jsx)(ee,{callback:_n,onCancel:bn}),(0,h.jsx)(w.Z,{children:Ne[Ve]&&Ve!==fe&&Ve!==he?(0,h.jsx)(Y.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sn,top:pn},title:(0,h.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-sn,t=e.clientY-pn;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,l=document.getElementsByClassName("ant-modal")[0],a=window.innerWidth-l.offsetWidth,o=window.innerHeight-l.offsetHeight;i=Math.max(0,Math.min(i,a)),r=Math.max(0,Math.min(r,o)),Cn(e.clientX,e.clientY,n,t)&&(cn(i),mn(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:Ne[Ve]}),open:!0,onCancel:bn,footer:null,destroyOnClose:!0,width:Ve===he?"1200px":null,height:Ve===he?"80vh":null,className:"markdown-popup-form",children:wn}):null})]})}},27308:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i=t(82100),r=t.n(i),l=t(29186),a=t.n(l),o=t(80619),s=t.n(o),c=t(47074),d=t.n(c),u=t(59301),p=t(4676),m=function(e){s()(t,e);var n=d()(t);function t(e){var i;r()(this,t),i=n.call(this,e);var l=window.document;return i.node=l.createElement("div"),l.body.appendChild(i.node),i}return a()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(u.Component)},56266:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var i=t(59301);function r(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])}},91099:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var i=t(79800),r=t.n(i),l=t(59301),a=t(43418),o=t(21068),s=t(3113),c=t(27065),d=t(6457),u=t(7880),p="customModal___bVzUV",m="content___oKhZq",h="upload___nPxEL",f="infoText___gZEJF",v="okBtn___CVo2A",x="fileList___tauGN",g="fileName___T_8JX",y=t(37712),_=function(e){var n=e.visible,t=e.onOk,i=e.onCancel,_=(0,l.useState)([]),w=r()(_,2),b=w[0],j=w[1],k=(0,l.useState)(!1),C=r()(k,2),N=C[0],Z=C[1],S=(0,u.useParams)();(0,l.useEffect)((function(){n||(j([]),Z(!1))}),[n]);var T=function(){var e="".concat(c.Z.API_SERVER,"/api/courses/").concat(S.coursesId,"/exercises/down_template");(0,d.Nd)(null,e)},P=function(){j([])};return(0,y.jsx)(a.Z,{title:"导入试题",open:n,onOk:function(){Z(!0),t(b,(function(){Z(!1)}))},centered:!0,wrapClassName:p,onCancel:function(){i()},width:663,okText:"确认",okButtonProps:{className:v},cancelText:"取消",confirmLoading:N,children:(0,y.jsxs)("div",{className:m,children:[(0,y.jsxs)("aside",{children:[(0,y.jsx)("div",{style:{fontWeight:600},children:"步骤1"}),(0,y.jsxs)("ul",{children:[(0,y.jsxs)("li",{children:[(0,y.jsx)("span",{style:{color:"#5F6367"},children:"根据模板要求编辑需要上传的试题"}),(0,y.jsx)("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:T,children:"下载考试试题模板"}),(0,y.jsx)("i",{className:"iconfont icon-xiazai4 ml10",onClick:T,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})]}),(0,y.jsx)("li",{style:{color:"#FA6400"},className:"mt10",children:"提示"}),(0,y.jsx)("li",{className:f,children:"1、目前仅支持Excel格式模板 "}),(0,y.jsx)("li",{className:f,children:"2、不支持组合题和实训题导入"}),(0,y.jsx)("li",{className:f,children:"3、每次最多导入300题"}),(0,y.jsx)("li",{className:f,children:"4、填空题导入最多支持8个填空项。"})]})]}),(0,y.jsxs)("aside",{style:{marginTop:22},children:[(0,y.jsx)("div",{style:{fontWeight:600},children:"步骤2"}),(0,y.jsxs)("ul",{style:{flex:1},children:[(0,y.jsx)("li",{style:{color:"#5F6367"},children:"上传编辑好的试题文档,确定导入"}),n&&(0,y.jsx)(o.Z,{action:"".concat(c.Z.API_SERVER,"/api/attachments.json"),beforeUpload:function(e){var n={name:e.name,uid:e.uid,file:e};return j([n]),!1},onRemove:P,withCredentials:!0,fileList:b,accept:".xls,.xlsx",showUploadList:!1,children:(0,y.jsx)(s.ZP,{className:h,type:"primary",icon:(0,y.jsx)("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}}),children:"上传文件"})}),b.map((function(e,n){return(0,y.jsxs)("div",{className:x,children:[(0,y.jsx)("span",{className:g,children:null==e?void 0:e.name}),(0,y.jsx)("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:P})]},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 p},MU:function(){return s},X6:function(){return d},bM:function(){return o},fi:function(){return h},fu:function(){return a},n4:function(){return f},rX:function(){return u},vl:function(){return v},zO:function(){return c}});var i=t(82242),r=t.n(i),l=t(51136);function a(e,n){return(0,l.U2)("myproblems/".concat(e,".json"),r()({hidePopLogin:!0},n||{}))}function o(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function s(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function c(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,l.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function d(e){return(0,l.U2)("myproblems/record_detail.json",{id:e})}function u(e,n){return(0,l.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,l.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function m(e,n){return(0,l.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function h(e){return(0,l.v_)("myproblems/".concat(e,"/sync_code.json"))}function f(e,n){return(0,l.v_)("myproblems/".concat(e,"/update_code.json"),n)}function v(e,n){return(0,l.v_)("discusses/".concat(e,"/plus.json"),n)}},57840:function(e,n,t){"use strict";var i=t(7557),r=t.n(i),l=t(41498),a=t.n(l),o=t(79800),s=t.n(o),c=t(59301),d=t(6848),u=t(8772),p=t(8591),m=t(89293),h=t(37712);n.Z=function(e){var n=e.defaultValue,t=e.onFinish,i=(0,c.useState)(!1),l=s()(i,2),o=l[0],f=l[1],v=(0,c.useState)(n),x=s()(v,2),g=x[0],y=x[1];return(0,c.useEffect)((function(){y(n)}),[n]),(0,h.jsx)("div",{children:o?(0,h.jsx)(u.Z,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:g,onChange:function(e){y(e.target.value)},onBlur:a()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)}))),onPressEnter:a()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)})))}):(0,h.jsxs)("div",{className:m.Z.title,children:[g,(0,h.jsx)(d.Z,{title:"编辑试卷名称",children:(0,h.jsx)("i",{className:"".concat(m.Z.editIcon," iconfont icon-bianji_Hover"),onClick:function(){return f(!0)}})})]})})}},92329:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return et},useCourseOptions:function(){return $n}});var i=t(82242),r=t.n(i),l=t(91232),a=t.n(l),o=t(7557),s=t.n(o),c=t(41498),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(7880),f=t(78241),v=t(66104),x=t(8591),g=t(71418),y=t(8772),_=t(19842),w=t(5112),b=t(97913),j=t(3113),k=t(89293),C=t(7201),N=t(68111),Z=t(58499),S=t(43418),T=t(20834),P=t(87876),I=t(38854),B=t(6848),A={flex_box_center:"flex_box_center___gi93l",flex_space_between:"flex_space_between___mWMLA",flex_box_vertical_center:"flex_box_vertical_center___rk4nc",flex_box_center_end:"flex_box_center_end___B8XxF",flex_box_column:"flex_box_column___AX3Vm",moreSpan:"moreSpan___hbStq",bg:"bg___Ya739",title:"title___BC46y",bottomdiv:"bottomdiv___uaPr6",spanBtn:"spanBtn___jjgnA",addQuestionBtn:"addQuestionBtn___qOlYW",saveBtn:"saveBtn___ulgem",left:"left___i8aTX",leftAction:"leftAction___sQkuq",Button:"Button___auxWm",iconWrapper:"iconWrapper___h3H1m",up:"up___tLyCX",down:"down___T5_aj",disabled:"disabled___GRBbF",titleleft:"titleleft___xZGbq",more_style:"more_style___nhWCX",qcount:"qcount___ID7OA",score:"score___T7dbm",qtitle:"qtitle___qJBFd",qcountclick:"qcountclick___m_VKG",right:"right___CBabI",edit:"edit___WHuql",delete:"delete___Pa6db",shixun:"shixun___oObBe",scoreByBlankRadio:"scoreByBlankRadio___r4AWn",modalconfirm:"modalconfirm___Ru9B_",scoremodal:"scoremodal___BdW7P",close:"close___blHYk",content:"content___jlm9o",items:"items___i3TrH",bottom:"bottom___zMQZ6",yes:"yes___lOPY6",no:"no___gtzKI",formcenter:"formcenter___fCxkm",radiogroup:"radiogroup___oXWHc",easy:"easy___ANNVD",medium:"medium___ov7N3",hard:"hard___n4afW",formcenterselect:"formcenterselect___lYa4f",selectitems:"selectitems___c9Pt5",morebottom:"morebottom____I_ev",scoreinput:"scoreinput___O8EhL",titleTooltip:"titleTooltip___CAyYg",exercise_styles:"exercise_styles___u40hG"},E=t(6457),q=t(51136),M=t(7406),L=t(37205),O=t.n(L),D=t(47766),F=t(42783),R=t(37712),z=function(e){var n=e.Itemid,t=e.setqitem,i=e.qitem,l=e.data,a=e.getdata,o=e.bigitem,c=e.setBigqitem,u=e.isedit,h=(0,m.useState)([]),f=p()(h,2),v=f[0],y=f[1],_=(0,m.useState)(!1),w=p()(_,2),b=w[0],j=w[1];(0,m.useEffect)((function(){l.length>0&&y(O()(l)||[])}),[l]);var k=function(){var e=d()(s()().mark((function e(t,i){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u){e.next=3;break}return x.ZP.info("请先保存或取消当前正在编辑的试题。"),e.abrupt("return");case 3:if(t.destination){e.next=5;break}return e.abrupt("return");case 5:return j(!0),e.next=8,(0,q.ZP)("/api/examination_banks/".concat(n,"/examination_banks_item_banks/").concat(null==i?void 0:i[t.source.index].question_id,"/adjust_position.json"),{method:"post",body:{id:n,itemid:null==i?void 0:i[t.source.index].question_id,position:t.destination.index}});case 8:r=e.sent,j(!1),0===r.status&&a({id:null==i?void 0:i[t.source.index].question_id});case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,R.jsx)("div",{children:(0,R.jsx)(D.Z5,{onDragEnd:function(e){return k(e,v)},children:(0,R.jsx)(D.bK,{droppableId:"droppable",children:function(e,n){return(0,R.jsxs)("div",r()(r()({ref:e.innerRef},e.droppableProps),{},{children:[(0,R.jsx)(g.Z,{spinning:b,children:v.map((function(e,n){return(0,R.jsx)(D._l,{draggableId:n.toString(),index:n,children:function(l,a){var s,d;return(0,R.jsx)("aside",r()(r()(r()({ref:l.innerRef},l.draggableProps),l.dragHandleProps),{},{children:(0,R.jsx)(B.Z,{title:(0,R.jsx)(F.Z,{value:8===(null==e?void 0:e.question_type)?null==e||null===(s=e.program_attr)||void 0===s?void 0:s.description:e.question_title}),color:"#fff",placement:"left",overlayClassName:A.titleTooltip,children:(0,R.jsxs)("div",{onClick:function(){u?x.ZP.info("请先保存或取消当前正在编辑的试题。"):(t(r()(r()({},e),{},{index:n+1})),c(o),(0,E.Vf)("#question-scroll-id"))},className:"".concat(A.qcount," ").concat(e.question_id===(null==i?void 0:i.question_id)?A.qcountclick:""),children:[(0,R.jsxs)("span",{className:A.score,children:[null==e?void 0:e.question_score,"分"]}),(0,R.jsxs)("span",{className:A.qtitle,children:[n+1,"、",(0,R.jsx)(F.Z,{value:8===(null==e?void 0:e.question_type)?null==e||null===(d=e.program_attr)||void 0===d?void 0:d.description:e.question_title,showTextOnly:!0})]})]})})}))}},n)}))}),e.placeholder]}))}})})})},G=t(95237),W=t(5309),H=t(57809),V=t(78673),K=t(64259),U=t(23717),Y=function(e){var n,t=e.form,i=e.TagDiscipline,r=e.exerciseitem,l=e.qitem,a=e.getTagData,o=(0,m.useState)(!0),c=p()(o,2),u=c[0],h=(c[1],(0,m.useState)(!1)),v=p()(h,2),g=v[0],_=v[1],b=(0,m.useState)(""),k=p()(b,2),C=k[0],N=k[1];return(0,m.useEffect)((function(){t.setFieldsValue({difficulty:l.difficulty||2,repeat_answer:!l.repeat_answer})}),[]),(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{style:{marginTop:30,overflow:"hidden",height:u?"100%":0},children:[(0,R.jsx)(f.Z.Item,{className:A.formcenter,rules:[{required:!0,message:"请先选择难度"}],label:"难度",name:"difficulty",children:(0,R.jsxs)(w.ZP.Group,{className:A.radiogroup,children:[(0,R.jsx)(w.ZP.Button,{className:A.easy,value:1,children:"简单"}),(0,R.jsx)(w.ZP.Button,{className:A.medium,value:2,children:"适中"}),(0,R.jsx)(w.ZP.Button,{className:A.hard,value:3,children:"困难"})]})}),(0,R.jsx)(f.Z.Item,{className:A.formcenterselect,label:"知识点",children:(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsx)(f.Z.Item,{name:"tag_discipline_ids",style:{marginBottom:12},children:(0,R.jsx)(H.default,{className:A.selectitems,showSearch:!0,mode:"multiple",placeholder:"请选择知识点,支持选择多个",listHeight:200,dropdownStyle:{zIndex:9},allowClear:!0,optionFilterProp:"children",filterOption:function(e,n){return n.key.indexOf(e.toLowerCase())>=0},children:null==i||null===(n=i.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,R.jsx)(H.default.Option,{value:e.id,children:(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsx)("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.name}),"personal"===(null==e?void 0:e.type)&&(0,R.jsx)("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"},children:"自用"})]})},e.name+e.id)}))})}),(0,R.jsxs)("div",{style:{marginLeft:20,marginTop:"-16px",lineHeight:"48px",height:48,fontSize:14},children:[(0,R.jsx)("span",{children:"没有合适的知识点?"}),(0,R.jsx)("a",{onClick:function(){_(!0)},style:{marginLeft:3,color:"#3061D0"},children:"新建知识点"})]})]})}),(0,R.jsx)(f.Z.Item,{className:A.formcenterselect,children:(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsx)(f.Z.Item,{name:"repeat_answer",valuePropName:"checked",children:(0,R.jsx)(V.Z,{})}),(0,R.jsxs)("div",{style:{marginLeft:10,marginTop:"-16px",lineHeight:"40px",height:48,color:"#000000"},children:["不允许学生重复答题",(0,R.jsx)(B.Z,{placement:"right",title:"选中后,学生必须作答完成才能进入下一题,且进入下一题之后不允许再修改该题答案",children:(0,R.jsx)(K.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})]})]})})]}),(0,R.jsxs)(S.Z,{title:!1,footer:!1,open:g,width:640,centered:!0,closable:!1,className:A.scoremodal,children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsx)("div",{className:A.title,children:"新建知识点"}),(0,R.jsx)("span",{onClick:function(){return _(!1)},className:A.close,children:"X"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(U.Z,{style:{color:"#FF8C29",marginRight:10}}),"新建的知识点仅本人可见,平台审核列入公开知识点后,对所有用户可见。 平台有权删除不合适的知识点,请认真填写知识点名称。"]}),(0,R.jsx)(y.Z,{showCount:!0,maxLength:20,style:{marginBottom:30,marginTop:30,height:46},onChange:function(e){N(e.target.value)},placeholder:"请输入知识点名称"}),(0,R.jsxs)("div",{className:A.bottom,children:[(0,R.jsx)(j.ZP,{className:A.no,onClick:function(){_(!1)},children:"取消"}),(0,R.jsx)(j.ZP,{className:A.yes,onClick:d()(s()().mark((function e(){var n,i,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C){e.next=3;break}return x.ZP.info("知识点名称不能为空"),e.abrupt("return");case 3:return e.next=5,(0,q.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:C,sub_discipline_id:null==r||null===(n=r.exercise)||void 0===n?void 0:n.sub_discipline_id}});case 5:0===(null==(i=e.sent)?void 0:i.status)&&(t.setFieldsValue({knowledge:C,tag_discipline_ids:[].concat(O()(t.getFieldValue("tag_discipline_ids")),[null==i?void 0:i.tag_discipline_id])}),a(null===(l=r.exercise)||void 0===l?void 0:l.sub_discipline_id)),_(!1);case 8:case"end":return e.stop()}}),e)}))),children:"确认"})]})]})]})},J=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0];return(0,m.useEffect)((function(){var e;v.setFieldsValue(r()(r()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onFinish:function(e){var t,i=r()(r()({},e),{},{item_type:null==n?void 0:n.question_type,choices:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return r()(r()({},e),{},{is_answer:e.standard_boolean})}))});a(r()(r()({},n),i))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:1===(null==n?void 0:n.question_type)?"多选题":"单选题"})]}),!n.isadd&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){var e;n.isadd?(t(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.submit();case 1:case"end":return e.stop()}}),e)}))),children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsx)(G.Z,{align:"middle",children:(0,R.jsx)(f.Z.Item,{className:A.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,R.jsx)(b.Z,{onBlur:function(e){"0"===e.target.value&&x.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})})}),(0,R.jsx)(W.u,{form:v,questionTitlePlaceholder:"请编辑选择题题干内容",titleKey:"name",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"standard_boolean"}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:l,TagDiscipline:i,form:v})]})]})})},X=t(56763),Q=t(95166),$=function(e){var n=e.qitem,t=e.TagDiscipline,i=e.exerciseitem,l=e.setisedit,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0],g=f.Z.useWatch("use_blank_score",v);return(0,m.useEffect)((function(){v.setFieldsValue(r()(r()({},n),{},{standard_answers:n.standard_answers||[],name:n.question_title,repeat_answer:!n.repeat_answer}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers||null!=e&&e.use_blank_score){var t,i,r,l=(null===(t=v.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=v.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)v.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(r=l.reduce((function(e,n){return e+n})))||void 0===r?void 0:r.toFixed(1))})}},onFinish:function(e){var t;a(r()(r()(r()({},n),e),{},{item_type:null==n?void 0:n.question_type,standard_answers:null===(t=e.standard_answers)||void 0===t?void 0:t.map((function(e,n){return r()(r()({},e),{},{position:e.choice_id||n+1})}))}))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"请先在题干中插入填空项"===n.errorFields[0].errors[0]&&(0,E.pE)(),x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"填空题"})]}),!n.isadd&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}})," 删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){n.isadd?(l(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{standard_answers:n.standard_answers,name:n.question_title,repeat_answer:!n.repeat_answer})),l(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:function(){v.submit()},children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsxs)(G.Z,{align:"middle",children:[g?(0,R.jsx)(Q.Z,{text:"(小题分值等于各填空项分值之和)"}):(0,R.jsx)(f.Z.Item,{className:A.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,R.jsx)(b.Z,{onBlur:function(e){"0"===e.target.value&&x.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",size:"middle",max:100,min:.1})},2),(0,R.jsx)(f.Z.Item,{name:"use_blank_score",noStyle:!0,children:(0,R.jsx)(w.ZP.Group,{className:A.scoreByBlankRadio,optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}]})}),(0,R.jsx)(B.Z,{overlayInnerStyle:{width:460},title:(0,R.jsxs)("div",{children:["按空给分:需要分别设置每个填空项的分值,填空项答对之后则获得对应的分值。",(0,R.jsx)("br",{}),"按题给分:需要设置整个小题的分值,答对全部填空项之后才能获得该小题的分值。"]}),children:(0,R.jsx)("i",{className:"icon-tishixiaowenhao font18 ml20 c-3061d0"})})]}),(0,R.jsx)(X.u,{form:v,questionTitlePlaceholder:"请编辑填空题题干内容",scoreByBlank:g,answerKey:"standard_answers"}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:i,TagDiscipline:t,form:v})]})]})})},ee=t(99041),ne=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0];return(0,m.useEffect)((function(){var e;v.setFieldsValue(r()(r()({},n),{},{name:n.question_title,repeat_answer:!n.repeat_answer,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onFinish:function(e){a(r()(r()({},n),e))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"判断题"})]}),!(null!=n&&n.isadd)&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){var e;n.isadd?(t(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:function(){v.submit()},children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsx)(f.Z.Item,{className:A.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,R.jsx)(b.Z,{onBlur:function(e){"0"===e.target.value&&x.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})}),(0,R.jsx)(ee.Z,{form:v,questionTitlePlaceholder:"请编辑判断题题干内容",choiceKey:""}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:l,TagDiscipline:i,form:v})]})]})})},te=t(39647),ie=t.n(te),re=t(36381),le={wrap:"wrap___YewKC",deleteIcon:"deleteIcon___AKmkj",keywordTag:"keywordTag___hMKmU",questionTitleEditorWrap:"questionTitleEditorWrap___SpNyf",choiceWrap:"choiceWrap___lDCnP",choiceIndex:"choiceIndex___dabwf",judgementIndex:"judgementIndex___sausK",setAnswerBtn:"setAnswerBtn___moVcF",activeAnswer:"activeAnswer___Cd32c",activeJudgementAnswer:"activeJudgementAnswer___rbuoo",actionWrapper:"actionWrapper___dZuBC",addIcon:"addIcon___A9GtN",inputBorder:"inputBorder___DeyjY",placeholder:"placeholder___dhOmk",blankWrapper:"blankWrapper___vU8Cg",blankInput:"blankInput___Vzre8",blankInputNumberWrapper:"blankInputNumberWrapper___yLeaN",addBtn:"addBtn___LhI0I",blankIndex:"blankIndex___caKgB",baseInputWrapper:"baseInputWrapper___DhjJY",collapseWrapper:"collapseWrapper___btrfP",panelHeader:"panelHeader___xIZ7O",open:"open___IMQhg",close:"close___FTAU3",hide:"hide___GBtJP",scoreByBlankRadio:"scoreByBlankRadio___HAunQ"},ae=t(12101),oe=t(11094),se=["value","onChange","scrollId"],ce=function(e){var n=e.value,t=e.onChange,i=e.scrollId,l=ie()(e,se);return(0,R.jsx)("div",{id:i||"",children:(0,R.jsx)(oe.Z,r()(r()({},l),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},de=function(e){var n=e.value,t=e.onChange,i=e.placeholder,r=e.height,l=void 0===r?140:r;return e.isEdit?(0,R.jsx)(oe.Z,{watch:!0,isFocus:!0,height:l,placeholder:i,defaultValue:n,onChange:t}):(0,R.jsx)("div",{style:{cursor:"pointer"},children:n?(0,R.jsx)(F.Z,{className:le.inputBorder,value:n}):(0,R.jsx)("div",{className:"".concat(le.inputBorder," ").concat(le.placeholder),children:i})})},ue=t(85573),pe=t.n(ue),me=t(43604),he=t(88996),fe=["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,l=e.answerKey,a=e.index,o=e.isEdit,s=e.setInputActive,c=e.form,d=e.choiceOptionsPath,u=e.allowChangeMode,p=e.showAddIcon,m=e.addItem,h=e.deleteItem,f=1===(null==n?void 0:n[l]),v=function(){var e;f?t(r()(r()({},n),{},pe()({},l,0))):(u||(e=c.getFieldValue(d),c.setFieldValue(d,e.map((function(e){return r()(r()({},e),{},pe()({},l,0))})))),t(r()(r()({},n),{},pe()({},l,1))))};return(0,R.jsxs)(G.Z,{className:le.choiceWrap,align:"middle",wrap:!1,children:[(0,R.jsx)(me.Z,{onClick:v,className:"".concat(le.choiceIndex," ").concat(f?le.activeAnswer:""),children:ve[a]}),(0,R.jsx)(me.Z,{flex:1,className:"".concat(le.editorWrap," ml15"),onClick:s,children:(0,R.jsx)(de,{height:155,placeholder:"请您输入选项",isEdit:o,value:null==n?void 0:n[i],onChange:function(e){t(r()(r()({},n),{},pe()({},i,e)))}})}),(0,R.jsx)(me.Z,{flex:"0 0 auto",className:"ml15",children:(0,R.jsx)("div",{onClick:v,className:"".concat(le.setAnswerBtn," ").concat(f?le.activeAnswer:""),children:f?"正确答案":"设为答案"})}),(0,R.jsxs)(me.Z,{className:le.actionWrapper,children:[(0,R.jsx)(B.Z,{title:"新增参考答案",children:(0,R.jsx)(he.Z,{className:le.addIcon,onClick:m,style:{visibility:p?"visible":"hidden"}})}),(0,R.jsx)(B.Z,{title:"删除",children:(0,R.jsx)(ae.Z,{className:le.deleteIcon,onClick:h,style:{visibility:a>1?"visible":"hidden"}})})]})]})},ge=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,l=e.analysisKey,a=e.choiceTextKey,o=e.answerKey,s=e.choiceOptionsPath,c=e.allowChangeMode,d=void 0===c||c,u=e.form,h=e.showAnalysis,v=void 0===h||h,x=(0,m.useState)(),g=p()(x,2),y=g[0],_=g[1],w=(0,m.useState)(!1),b=p()(w,2),j=b[0],k=b[1];return(0,R.jsxs)("div",{className:le.wrap,children:[(0,R.jsx)("div",{className:le.questionTitleEditorWrap,children:(0,R.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(ce,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,R.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,R.jsx)(f.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[a])||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,R.jsxs)("div",{id:Array.isArray(s)?s.join("_"):"".concat(s),children:[e.map((function(n,l){var c=n.key,p=n.name,h=ie()(n,fe),v=y===c,x=l<7&&l===e.length-1;return(0,m.createElement)(f.Z.Item,r()(r()({},h),{},{key:c,name:p,noStyle:!0}),(0,R.jsx)(xe,{choiceTextKey:a,answerKey:o,index:l,isEdit:v,setInputActive:function(){_(c)},form:u,choiceOptionsPath:s,allowChangeMode:d,showAddIcon:x,addItem:function(){return t(pe()(pe()({},a,""),o,0))},deleteItem:function(){return i(p)}}))})),e.length<8&&(0,R.jsx)("div",{className:"".concat(le.addBtn," mb30"),onClick:function(){return t(pe()(pe()({},a,""),o,0))},children:"添加选项"})]})}}),v&&(0,R.jsx)("div",{onClick:function(){return k(!0)},children:(0,R.jsx)(f.Z.Item,{name:l,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(de,{placeholder:"请编辑题目解析(非必填)",isEdit:j})})})]})},ye=["key","name"],_e=function(e){var n=e.value,t=e.onChange;return(0,R.jsxs)(G.Z,{className:"ml20",children:[(0,R.jsx)(me.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,R.jsxs)(G.Z,{align:"middle",className:"mb20",children:[(0,R.jsx)(y.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var r=O()(n),l=e.target.value.trim();r[i]=l,t(r)}}),(0,R.jsx)(B.Z,{title:"删除",children:(0,R.jsx)(ae.Z,{className:le.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){S.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:le.modal,onOk:function(){var i=O()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,R.jsx)(me.Z,{children:(0,R.jsx)("div",{className:"".concat(le.addBtn),onClick:function(){var e;(e=O()(n)).push(""),t(e)},children:"新增答案"})})]})},we=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,R.jsx)(V.Z,{checked:!t,onChange:function(e){i(!e)}})},be="▁",je=function(e){var n,t=e.questionTitlePlaceholder,i=e.form,l=e.name,o=e.scoreByBlank,s=e.answerKey,c=e.titleKey,d=void 0===c?"name":c,u=e.analysisKey,h=void 0===u?"analysis":u,v=e.isOrdered,x=void 0===v?"is_ordered":v,g=(0,m.useState)(!1),_=p()(g,2),w=_[0],j=_[1],k=function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(be).length-1;return i+=e.getLine(t).substring(0,n.ch).split(be).length-1},C=function(){var e=i.getFieldValue(["sub_item_banks"].concat(O()(s)));i.setFieldValue(["sub_item_banks"].concat(O()(s)),null==e?void 0:e.map((function(e,n){return r()(r()({},e),{},{position:n+1})})))},N=(0,m.useRef)(),Z=function(e,n){for(var t=0;t<e;t++)N.current({position:null,answer_text:[""]},n+t);C()},S=(0,m.useRef)(),T=function(e){S.current(e),C()},P=null===(n=i.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==s?void 0:s[0]])||void 0===n?void 0:n[null==s?void 0:s[1]];return console.log(null==i?void 0:i.getFieldValue(["sub_item_banks"].concat(O()(o)))),(0,R.jsxs)("div",{className:le.wrap,children:[(0,R.jsx)("div",{className:le.questionTitleEditorWrap,children:(0,R.jsx)(f.Z.Item,{label:"题干",name:d,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(ce,{scrollId:"name",watch:!0,height:140,placeholder:t,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(be).length-1})),"setValue"!==n.origin)if(r&&-1!==r.indexOf(be)){var a=r.split(be).length-1,o=k(e,n.from);console.log("删除".concat(a,"个, 前面有").concat(o,"个,新增").concat(l,"个")),i(a>1?Array.from({length:a},(function(e,n){return o+n})):o)}else if(l>0){var s=k(e,n.from);console.log("新增".concat(l,"个,之前有").concat(s,"个")),t(l,s)}}(e,n,Z,T)}})})}),(0,R.jsx)(f.Z.List,{name:s,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=a()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(null!=r&&r.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 l=n.add,a=n.remove;t.errors;return N.current=l,S.current=a,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(f.Z.Item,{label:(0,R.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,R.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var t=e.key,l=e.name,a=ie()(e,ye);return(0,R.jsxs)(G.Z,{className:"mb20",align:"top",children:[(0,R.jsxs)(me.Z,{flex:"0 0 auto",className:"".concat(le.blankIndex," pt5"),children:["填空项",n+1]}),(0,R.jsxs)(me.Z,{flex:1,children:[(0,R.jsxs)(G.Z,{align:"top",justify:"space-between",children:[(0,R.jsx)(me.Z,{flex:1,children:(0,R.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"answer_text"],noStyle:!0,children:(0,R.jsx)(_e,{})}))}),(null==i?void 0:i.getFieldValue(["sub_item_banks"].concat(O()(o))))&&(0,R.jsx)(me.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"},children:(0,R.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"score"],label:"分值",rules:[{required:!0}],className:le.blankInputNumberWrapper,children:(0,R.jsx)(b.Z,{onChange:function(){var e=null==i?void 0:i.getFieldValue(["sub_item_banks",null==s?void 0:s[0],"standard_answers"]),n=0;for(var t in e){var r,l;if(null!==(r=e[t])&&void 0!==r&&r.score)n+=Number(null===(l=e[t])||void 0===l?void 0:l.score)}null==i||i.setFieldValue(["sub_item_banks",null==s?void 0:s[0],"question_score"],n)},className:le.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,R.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"position"],noStyle:!0,children:(0,R.jsx)(y.Z,{type:"hidden"})}))]})]},t)}))]})}}),(0,R.jsxs)(G.Z,{align:"middle",children:[(0,R.jsx)(f.Z.Item,{name:[l,"downcase"],valuePropName:"checked",children:(0,R.jsx)(V.Z,{})}),(0,R.jsx)(me.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,R.jsxs)(G.Z,{align:"middle",children:[(0,R.jsx)(f.Z.Item,{name:[l,"no_space"],valuePropName:"checked",children:(0,R.jsx)(V.Z,{})}),(0,R.jsx)(me.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==P?void 0:P.length)>1&&(0,R.jsxs)(G.Z,{align:"middle",className:(null==P?void 0:P.length)>1?"mb30":"".concat(le.hide),children:[(0,R.jsx)(f.Z.Item,{name:x,children:(0,R.jsx)(we,{})}),(0,R.jsx)(me.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,R.jsx)("div",{onClick:function(){return j(!0)},children:(0,R.jsx)(f.Z.Item,{name:h,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(de,{placeholder:"请编辑题目解析(非必填)",isEdit:w})})})]})},ke=["key","name"],Ce=pe()(pe()({},"正确","T"),"错误","F"),Ne=function(e){var n=e.value,t=e.onChange,i=e.form,l=e.choiceKey,a=1===(null==n?void 0:n.is_answer),o=null==n?void 0:n.choice_text,s=function(){var e,a=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(O()(l))))||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(O()(l)),a),t(r()(r()({},n),{},{is_answer:1}))};return(0,R.jsxs)(G.Z,{className:le.choiceWrap,align:"middle",wrap:!1,children:[(0,R.jsx)(me.Z,{onClick:s,className:"".concat(le.choiceIndex," ").concat(le.judgementIndex," ").concat(a?le.activeAnswer:""),children:Ce[o]}),(0,R.jsx)(me.Z,{flex:1,className:"".concat(le.editorWrap," ml15"),children:(0,R.jsx)("div",{className:"".concat(le.inputBorder," ").concat(le.placeholder," ").concat(a?le.activeJudgementAnswer:""),children:o})}),(0,R.jsx)(me.Z,{flex:"0 0 auto",className:"ml15",children:(0,R.jsx)("div",{onClick:s,className:"".concat(le.setAnswerBtn," ").concat(a?le.activeAnswer:""),children:a?"正确答案":"设为答案"})})]})},Ze=function(e){var n=e.questionTitlePlaceholder,t=e.choiceKey,i=void 0===t?"choices":t,l=e.form,a=e.titleKey,o=void 0===a?"name":a,s=e.analysisKey,c=void 0===s?"analysis":s,d=(0,m.useState)(!1),u=p()(d,2),h=u[0],v=u[1];return(0,R.jsxs)("div",{className:le.wrap,children:[(0,R.jsx)("div",{className:le.questionTitleEditorWrap,children:(0,R.jsx)(f.Z.Item,{label:"题干",name:o,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(ce,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,R.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,R.jsx)(f.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,R.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,t=e.name,a=ie()(e,ke);return(0,m.createElement)(f.Z.Item,r()(r()({},a),{},{key:n,name:t,noStyle:!0}),(0,R.jsx)(Ne,{form:l,choiceKey:i}))}))})}})}),(0,R.jsx)("div",{onClick:function(){return v(!0)},children:(0,R.jsx)(f.Z.Item,{name:c,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(de,{placeholder:"请编辑题目解析(非必填)",isEdit:h})})})]})},Se=t(12563),Te=["value","onChange"],Pe=["key","name"],Ie=function(e){var n=e.value,t=e.onChange,i=ie()(e,Te);return(0,R.jsx)(oe.Z,r()(r()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},Be=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,R.jsx)(Se.Z,{closable:!0,onClose:i,className:le.keywordTag,children:(0,R.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},Ae=function(e){var n,t,i=e.questionTitlePlaceholder,l=e.form,o=e.showKeywords,s=e.isMustKeyWords,c=void 0===s?o:s,d=e.titleKey,u=void 0===d?"name":d,h=e.analysisKey,v=void 0===h?"analysis":h,g=e.answerTexts,_=void 0===g?"answer_texts":g,w=e.keywords,j=void 0===w?"keywords":w,k=e.useKeywords,C=void 0===k?"use_keywords":k,N=(e.indexs,(0,m.useState)(!1)),Z=p()(N,2),S=Z[0],T=Z[1],P=(0,m.useState)(""),I=p()(P,2),A=I[0],E=I[1],q=null===(n=l.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==C?void 0:C[0]])||void 0===n?void 0:n[null==C?void 0:C[1]],M=null===(t=l.getFieldValue("sub_item_banks"))||void 0===t||null===(t=t[null==C?void 0:C[0]])||void 0===t?void 0:t.question_score;return(0,R.jsxs)("div",{className:le.wrap,children:[(0,R.jsx)("div",{className:le.questionTitleEditorWrap,children:(0,R.jsx)(f.Z.Item,{label:"题干",name:u,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(ce,{scrollId:"name",watch:!0,height:140,placeholder:i})})}),(0,R.jsx)(f.Z.Item,{label:"参考答案",name:_,labelCol:{span:24},children:(0,R.jsx)(Ie,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),o&&!c&&(0,R.jsx)(f.Z.Item,{hidden:!0,name:C,valuePropName:"checked",children:(0,R.jsx)(V.Z,{defaultChecked:!0})}),o&&c&&(0,R.jsxs)(G.Z,{align:"middle",className:"mb30",children:[(0,R.jsx)(f.Z.Item,{name:C,valuePropName:"checked",children:(0,R.jsx)(V.Z,{})}),(0,R.jsx)(me.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,R.jsx)(me.Z,{children:(0,R.jsx)(B.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,R.jsx)(K.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(q||!c)&&(0,R.jsx)(f.Z.List,{name:j,rules:[{validator:function(e,n){return c?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(M)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var t=n.add,i=n.remove;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"".concat(le.title," mb10"),children:c?"关键词":(0,R.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,R.jsxs)(G.Z,{align:"middle",className:"font14 mb30",children:[(0,R.jsx)(me.Z,{flex:1,children:(0,R.jsx)(y.Z,{value:A,onChange:function(e){E(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,i,r,o,s="".concat(null===(n=e.target)||void 0===n?void 0:n.value),c=null==s||null===(i=s.split("|"))||void 0===i||null===(i=i.filter((function(e){return!!e})))||void 0===i?void 0:i.map((function(e){return e.trim()})),d=l.getFieldValue(["sub_item_banks"].concat(O()(j))),u=(null==d||null===(r=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===r?void 0:r.flat())||[],p=a()(c);try{for(p.s();!(o=p.n()).done;){var m=o.value;if(u.includes(m))return void x.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){p.e(e)}finally{p.f()}(function(e){if(!e)return!1;if(!/^s*$/.test(e)&&""!==e.trim())return new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==e||(x.ZP.warning("关键词不能只输入一个“|”字符!"),!1);x.ZP.warning("关键词不能全为空格")})(s)&&(t({keyword:c,score:1}),E(""))},className:le.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,R.jsx)(me.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,l=ie()(e,Pe);return(0,R.jsx)(G.Z,{className:"mb20",style:{marginRight:148},children:(0,R.jsx)(me.Z,{flex:1,children:(0,R.jsxs)(G.Z,{align:"middle",justify:"space-between",children:[(0,R.jsx)(f.Z.Item,r()(r()({},l),{},{name:[t,"keyword"],children:(0,R.jsx)(Be,{onClose:function(){return i(t)}})})),c&&(0,R.jsx)(f.Z.Item,r()(r()({},l),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:le.blankInputNumberWrapper,children:(0,R.jsx)(b.Z,{className:le.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,R.jsx)("div",{onClick:function(){return T(!0)},children:(0,R.jsx)(f.Z.Item,{name:v,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(de,{placeholder:"请编辑题目解析(非必填)",isEdit:S})})})]})},Ee=["key","name"],qe=re.Z.Panel,Me=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=e.withScore,l=(0,m.useState)(),a=p()(l,2),o=a[0],s=a[1],c=(0,m.useState)([]),d=p()(c,2),u=d[0],h=d[1],v=function(e){h(e)},x=function(e){var n=e.value;return(0,R.jsx)("div",{style:{width:150,paddingLeft:11},children:n})};return(0,R.jsxs)("div",{className:le.wrap,children:[(0,R.jsx)("div",{className:le.questionTitleEditorWrap,children:(0,R.jsx)(f.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(ce,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,R.jsx)(f.Z.Item,{label:"小题",required:!0,labelCol:{span:24}}),(0,R.jsx)(f.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,n){return n?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,n){var l=n.add,a=n.remove,c=n.move,d=t.getFieldValue("sub_item_banks");return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(re.Z,{className:e.length>0?le.collapseWrapper:"",bordered:!1,activeKey:u,onChange:v,expandIcon:function(e){var n=e.isActive;return(0,R.jsx)("i",{className:"iconfont icon-weizhankai ".concat(n?le.open:le.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(n,l){n.key;var u,p,m,h,v,g,y,_,j,k,C,N,Z,S,T=n.name,P=ie()(n,Ee);return(0,R.jsx)(qe,{className:le.panel,forceRender:!0,header:(0,R.jsxs)("div",{className:le.panelHeader,children:["第",l+1,"小题",(0,R.jsxs)("span",{children:["",0==(null==d||null===(u=d[T])||void 0===u?void 0:u.question_type)?"单选题":1==(null==d||null===(p=d[T])||void 0===p?void 0:p.question_type)?"多选题":3==(null==d||null===(m=d[T])||void 0===m?void 0:m.question_type)?"填空题":2==(null==d||null===(h=d[T])||void 0===h?void 0:h.question_type)?"判断题":"简答题",""]})]}),extra:(0,R.jsxs)(G.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},children:[3==(null==d||null===(v=d[T])||void 0===v?void 0:v.question_type)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(w.ZP.Group,{defaultValue:null==d||null===(g=d[T])||void 0===g?void 0:g.use_blank_score,className:A.scoreByBlankRadio,style:{marginRight:20},optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}],onChange:function(e){var n,i;if(null==t||t.setFieldValue(["sub_item_banks",T,"use_blank_score"],null==e||null===(n=e.target)||void 0===n?void 0:n.value),null!=e&&null!==(i=e.target)&&void 0!==i&&i.value){var r=0;for(var l in null==t||null===(a=t.getFieldValue(["sub_item_banks",T]))||void 0===a?void 0:a.standard_answers){var a,o;r+=Number(null==t||null===(o=t.getFieldValue(["sub_item_banks",T]))||void 0===o||null===(o=o.standard_answers[l])||void 0===o?void 0:o.score)}null==t||t.setFieldValue(["sub_item_banks",T,"question_score"],r||"")}s(new Date)}}),(0,R.jsx)(B.Z,{overlayInnerStyle:{width:460},title:(0,R.jsxs)("div",{children:["按空给分:需要分别设置每个填空项的分值,填空项答对之后则获得对应的分值。",(0,R.jsx)("br",{}),"按题给分:需要设置整个小题的分值,答对全部填空项之后才能获得该小题的分值。"]}),children:(0,R.jsx)("i",{className:"icon-tishixiaowenhao font18 mr25 c-3061d0"})})]}),i&&(0,R.jsx)(f.Z.Item,r()(r()({},P),{},{rules:[{required:!0,message:"请输入小题分值"}],label:"分值",name:[T,"question_score"],className:le.blankInputNumberWrapper,children:3==(null==d||null===(y=d[T])||void 0===y?void 0:y.question_type)&&null!=d&&null!==(_=d[T])&&void 0!==_&&_.use_blank_score?(0,R.jsx)(x,{}):(0,R.jsx)(b.Z,{className:le.blankInput,placeholder:"请输入分数",min:.1,precision:1,max:100,style:{width:150}})})),(0,R.jsxs)(G.Z,{align:"middle",className:"pl40",style:{width:82},children:[0!==l&&(0,R.jsx)("div",{onClick:function(){var n;c(l,l-1);var i=null===(n=t.getFieldValue("sub_item_banks"))||void 0===n?void 0:n.map((function(n,t){return e.map((function(e,i){t===i&&(n.q_position=Number(e.name)+1)})),n}));t.setFieldValue("sub_item_banks",i)},children:(0,R.jsx)(B.Z,{title:"上移",children:(0,R.jsx)("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"})})}),l<e.length-1&&(0,R.jsx)("div",{onClick:function(){var n;c(l,l+1);var i=null===(n=t.getFieldValue("sub_item_banks"))||void 0===n?void 0:n.map((function(n,t){return e.map((function(e,i){t===i&&(n.q_position=Number(e.name)+1)})),n}));t.setFieldValue("sub_item_banks",i)},className:0===l?"":"ml10",children:(0,R.jsx)(B.Z,{title:"下移",children:(0,R.jsx)("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"})})})]}),(0,R.jsx)(B.Z,{title:"删除",children:(0,R.jsx)(ae.Z,{className:"".concat(le.deleteIcon," ml40"),onClick:function(){return a(T)}})})]}),children:(0,R.jsxs)(f.Z.Item,r()(r()({},P),{},{name:T,children:[(0==(null==d||null===(j=d[T])||void 0===j?void 0:j.question_type)||1==(null==d||null===(k=d[T])||void 0===k?void 0:k.question_type))&&(0,R.jsx)(ge,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:1==(null==d||null===(C=d[T])||void 0===C?void 0:C.question_type),form:t,choiceKey:[T,"choices"],titleKey:[T,"name"],analysisKey:[T,"analysis"],choiceOptionsPath:["sub_item_banks",T,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),3==(null==d||null===(N=d[T])||void 0===N?void 0:N.question_type)&&(0,R.jsx)(je,{form:t,questionTitlePlaceholder:"请编辑题干并设置填空项",name:T,scoreByBlank:[T,"use_blank_score"],titleKey:[T,"name"],analysisKey:[T,"analysis"],isOrdered:[T,"is_ordered"],answerKey:[T,"standard_answers"]},o),2==(null==d||null===(Z=d[T])||void 0===Z?void 0:Z.question_type)&&(0,R.jsx)(Ze,{form:t,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[T,"name"],analysisKey:[T,"analysis"],choiceKey:[T,"choices"]}),4==(null==d||null===(S=d[T])||void 0===S?void 0:S.question_type)&&(0,R.jsx)(Ae,{showKeywords:!0,isMustKeyWords:!0,form:t,titleKey:[T,"name"],analysisKey:[T,"analysis"],answerTexts:[T,"answer_texts"],useKeywords:[T,"use_keywords"],keywords:[T,"keywords"],indexs:T,questionTitlePlaceholder:"请编辑简答题题干内容"},o)]}))},T)}))}),e.length<20&&(0,R.jsx)(I.Z,{menu:{items:[{label:(0,R.jsx)("div",{onClick:function(){l({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",question_type:0,item_type:"SINGLE"}),h([null==e?void 0:e.length].concat(O()(u)))},children:"单选题"}),key:"1",show:!0},{label:(0,R.jsx)("div",{onClick:function(){l({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",question_type:1,item_type:"MULTIPLE"}),h([null==e?void 0:e.length].concat(O()(u)))},children:"多选题"}),key:"2",show:!0},{label:(0,R.jsx)("div",{onClick:function(){l({name:"",choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],analysis:"",question_type:2,item_type:"JUDGMENT"}),h([null==e?void 0:e.length].concat(O()(u)))},children:"判断题"}),key:"3",show:!0},{label:(0,R.jsx)("div",{onClick:function(){l({name:"",analysis:"",is_ordered:!0,standard_answers:[],question_type:3,item_type:"COMPLETION",use_blank_score:!0,downcase:!0,no_space:!0}),h([null==e?void 0:e.length].concat(O()(u)))},children:"填空题"}),key:"4",show:!0},{label:(0,R.jsx)("div",{onClick:function(){l({name:"",answer_texts:[],keywords:[],use_keywords:!1,analysis:"",question_type:4,item_type:"SUBJECTIVE"}),h([null==e?void 0:e.length].concat(O()(u)))},children:"简答题"}),key:"5",show:!0}].filter((function(e){return e.show})).map((function(e){return{label:e.label,key:e.key}}))},children:(0,R.jsx)("div",{className:"".concat(le.addBtn),children:"添加小题"})})]})}})]})},Le=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0];return(0,m.useEffect)((function(){var e;v.setFieldsValue(r()(r()({},n),{},{name:n.question_title,sub_item_banks:null===(e=n.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){var n;return r()(r()({},e),{},{name:e.question_title,choices:null==e||null===(n=e.question_choices)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))})})),repeat_answer:!n.repeat_answer}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.sub_item_banks){var t,i,r=(null===(t=v.getFieldValue("sub_item_banks"))||void 0===t?void 0:t.length)>0&&(null===(i=v.getFieldValue("sub_item_banks"))||void 0===i||null===(i=i.map((function(e){if(3==e.question_type&&null!=e&&e.use_blank_score){var n=0;for(var t in null==e?void 0:e.standard_answers){var i;n+=Number(null==e||null===(i=e.standard_answers[t])||void 0===i?void 0:i.score)}return n}return e.question_score})))||void 0===i?void 0:i.filter((function(e){return e})));(null==r?void 0:r.length)>0&&v.setFieldsValue({question_score:parseFloat(null==r?void 0:r.reduce((function(e,n){return parseFloat(e)+parseFloat(n)}))).toFixed(1)})}},onFinish:function(e){var t;a(r()(r()(r()({},n),e),{},{sub_item_banks:null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.map((function(e){return console.log(e),r()(r()({},e),{},{item_type:null==e?void 0:e.question_type,id:(null==e?void 0:e.question_id)||""})}))}))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"组合题"})]}),!n.isadd&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){var e;n.isadd?(t(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:function(){v.submit()},children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsx)(Q.Z,{text:"(组合题分值等于各小题分值之和)"}),(0,R.jsx)(Me,{form:v,withScore:!0,choiceKey:"",questionTitlePlaceholder:"请编辑组合题题干内容"}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:l,TagDiscipline:i,form:v})]})]})})},Oe=t(48637),De=t(24334),Fe=function(e){var n=e.qitem,t=e.TagDiscipline,i=e.exerciseitem,l=e.setisedit,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0];return(0,m.useEffect)((function(){var e,t,i;v.setFieldsValue(r()(r()({},n),{},{standard_answers:n.standard_answer,difficulty:n.difficulty,item_banks_group_id:n.item_banks_group_id,hack:r()(r()({},n),{},{time_limit:(null==n?void 0:n.time_limit)||3}),hack_codes:{language:null==n||null===(e=n.program_attr)||void 0===e?void 0:e.language,code:De.Base64.decode((null==n||null===(t=n.program_attr)||void 0===t?void 0:t.code)||"")},hack_sets:r()({},null==n||null===(i=n.hack_sets)||void 0===i?void 0:i[0]),repeat_answer:!n.repeat_answer}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers){var t,i,r,l=(null===(t=v.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=v.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)v.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(r=l.reduce((function(e,n){return e+n})))||void 0===r?void 0:r.toFixed(1))})}},onFinish:function(e){var t;a(r()(r()(r()({},n),e),{},{item_type:null==n?void 0:n.question_type,standard_answers:null===(t=e.standard_answers)||void 0===t?void 0:t.map((function(e,n){return r()(r()({},e),{},{position:n+1})})),standard_answer:void 0}))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"程序填空题"})]}),!n.isadd&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}})," 删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){var e,t,i;n.isadd?(l(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{standard_answers:n.standard_answer,difficulty:n.difficult,item_banks_group_id:n.item_banks_group_id,hack:r()({},n),hack_codes:{language:null==n||null===(e=n.program_attr)||void 0===e?void 0:e.language,code:De.Base64.decode(null==n||null===(t=n.program_attr)||void 0===t?void 0:t.code)},hack_sets:r()({},null==n||null===(i=n.hack_sets)||void 0===i?void 0:i[0]),repeat_answer:!n.repeat_answer})),l(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:function(){v.submit()},children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsx)(Q.Z,{text:"(小题分值等于各填空项分值之和)"}),(0,R.jsx)(Oe.t,{form:v,questionTitlePlaceholder:"请编辑程序填空题题干内容",scoreByBlank:!0,hackidentifier:null==n?void 0:n.hack_identifier,answerKey:"standard_answers"}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:i,TagDiscipline:t,form:v})]})]})})},Re=function(e){var n,t=e.qitem,i=e.setqitem,l=e.setisedit,a=(e.TagDiscipline,e.exerciseitem,e.seveeditor),o=e.deleteitem,c=f.Z.useForm(),u=p()(c,1)[0];return(0,m.useEffect)((function(){var e,n;u.setFieldsValue(r()(r()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),t.shixun=null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{defaultscore:e.challenge_score})}))}),[]),(0,R.jsxs)("div",{children:[(0,R.jsxs)(f.Z,{form:u,colon:!1,onFinish:function(e){var n,i,l=r()(r()({},e),{},{question_scores:null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return e.challenge_score})),item_type:null==t?void 0:t.question_type,choices:null==e||null===(i=e.choices)||void 0===i?void 0:i.map((function(e){return r()(r()({},e),{},{is_answer:e.standard_boolean})}))});a(r()(r()({},t),l))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),u.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"实训题"})]}),(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){var e,n;u.setFieldsValue(r()(r()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),t.shixun=null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{challenge_score:e.defaultscore})})),i(r()({},t)),l(!1)},children:"取消"}),(0,R.jsx)(j.ZP,{className:"ml20",type:"primary",onClick:d()(s()().mark((function e(){var n,i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==t||null===(n=t.shixun)||void 0===n||null===(i=n.map)||void 0===i?void 0:i.call(n,(function(e){return e.challenge_score})).filter((function(e){return e})).length)<(null==t||null===(r=t.shixun)||void 0===r?void 0:r.length))){e.next=3;break}return x.ZP.info("分数不能为空"),e.abrupt("return");case 3:u.submit();case 4:case"end":return e.stop()}}),e)}))),children:"保存"})]}),(0,R.jsx)(Q.Z,{text:"(实训题分值等于各关卡分值之和)"}),(0,R.jsx)(f.Z.Item,{label:"题干",name:"question_title",labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(oe.Z,{watch:!0,height:140,placeholder:"",defaultValue:t.question_title})})]}),(0,R.jsxs)(G.Z,{style:{marginBottom:15},align:"middle",justify:"space-between",children:[(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{style:{color:"red"},children:"*"}),"关卡名称"]}),(0,R.jsxs)("a",{href:"/shixuns/".concat(null==t?void 0:t.shixun_identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,R.jsx)("i",{onClick:function(){},className:"iconfont icon-shixunkecheng font14 mr5"}),"实训详情"]})]}),null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e,n){return(0,R.jsxs)("div",{style:{display:"flex",marginBottom:20},children:[(0,R.jsxs)("div",{style:{flex:1},children:[n+1,"、",e.challenge_name]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{style:{color:"red"},children:"*"}),"分值",(0,R.jsx)(b.Z,{precision:1,value:null==e?void 0:e.challenge_score,onChange:function(e){var l=JSON.parse(JSON.stringify((null==t?void 0:t.shixun)||[]));l[n].challenge_score=e;var a=l.every((function(e){return!e.challenge_score})),o=parseFloat(null==l?void 0:l.map((function(e){return e.challenge_score})).reduce((function(e,n){return parseFloat(e||0)+parseFloat(n||0)})));u.setFieldsValue({question_score:a?"":o.toFixed(1)}),i(r()(r()({},t),{},{shixun:l}))},max:100,min:1,style:{marginLeft:10,width:150},placeholder:"请输入分值",size:"middle"})]})]},e.challenge_id)}))]})},ze="warp___w1JUC",Ge="indexTag___LPncW",We="normalWrap___pEIzs",He="redio___I6tXM",Ve="redioitem___cS4Gp",Ke="redioitemyes___JBDmk",Ue="title___XAohQ",Ye="titleyes____bNQk",Je="yestag___zQnb1",Xe="checkbox___MHadU",Qe="checkboxitem___KX7mB",$e="checkboxitemyes___MpOWf",en="bottom___FkHfO",nn="bottomitem___AS0Qp",tn="left___U23z1",rn="right___yJVEk",ln="completion___Bu5G6",an="content___LySPW",on="items___ETMq9",sn="simple___XX5t0",cn="shixunWrapper___w6oIG",dn="shixun___ePWKn",un="score___nGh9k",pn="qtitle___DAMW1",mn="program___Mm1qL",hn="combination___Sw7S6",fn="qtype___Xdl60",vn=t(30347),xn=["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"],gn=[{type:0,name:"单选题"},{type:1,name:"多选题"},{type:2,name:"判断题"},{type:3,name:"填空题"},{type:4,name:"简答题"},{type:5,name:"实训题"},{type:6,name:"编程题"},{type:7,name:"组合题"},{type:8,name:"程序填空题"}],yn=function(e){var n,t,i,r,l,a,o,s,c,d,u,p,m,h,f=e.qitem;return(0,R.jsxs)("div",{className:ze,children:[(0===(null==f?void 0:f.question_type)||2===(null==f?void 0:f.question_type))&&(0,R.jsx)("div",{className:We,children:null==f||null===(n=f.question_choices)||void 0===n?void 0:n.map((function(e,n){return(0,R.jsxs)("div",{className:He,children:[!(null!=e&&e.standard_boolean)&&(0,R.jsx)("span",{className:Ve}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("i",{className:"".concat(Ke," icon-duigou1")}),(0,R.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Ye:Ue," ").concat(Ge),children:0===(null==f?void 0:f.question_type)?xn[n]:""}),(0,R.jsx)(F.Z,{className:null!=e&&e.standard_boolean?Ye:Ue,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("div",{className:Je,children:"正确答案"})]},n)}))}),1===(null==f?void 0:f.question_type)&&(0,R.jsx)("div",{className:We,children:null==f||null===(t=f.question_choices)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsxs)("div",{className:Xe,children:[!(null!=e&&e.standard_boolean)&&(0,R.jsx)("span",{className:Qe}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("i",{className:"".concat($e," icon-duigou1")}),(0,R.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Ye:Ue," ").concat(Ge),children:xn[n]}),(0,R.jsx)(F.Z,{className:null!=e&&e.standard_boolean?Ye:Ue,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("div",{className:Je,children:"正确答案"})]},n)}))}),3===(null==f?void 0:f.question_type)&&(0,R.jsx)("div",{className:ln,children:null==f||null===(i=f.standard_answers)||void 0===i?void 0:i.map((function(e,n){var t;return(0,R.jsxs)(G.Z,{align:"top",children:[(0,R.jsxs)("span",{className:Ue,children:["填空项",n+1]}),(0,R.jsx)("div",{className:an,children:null===(t=e.answer_text)||void 0===t?void 0:t.map((function(n,t){return(0,R.jsx)("div",{className:on,style:2===(null==e?void 0:e.model)?{border:0,padding:0}:{},children:1===(null==e?void 0:e.model)?(0,R.jsx)("pre",{className:"mb0",children:n}):(0,R.jsx)(vn.Z,{value:n,disabled:!0})},t)}))})]})}))}),4===(null==f?void 0:f.question_type)&&(0,R.jsxs)("div",{className:sn,children:[(0,R.jsx)("div",{className:Ue,children:"参考答案"}),(0,R.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=f&&null!==(r=f.answer_texts)&&void 0!==r&&r[0]?(0,R.jsx)(F.Z,{className:an,value:null==f||null===(l=f.answer_texts)||void 0===l?void 0:l[0]}):(0,R.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})}),(0,R.jsxs)("div",{className:"mt20 ",children:[(0,R.jsx)("span",{className:Ue,style:{color:"#3061D0"},children:"判分方式"}),(0,R.jsx)("span",{style:{color:"#000",marginLeft:10,fontSize:"16px"},children:null!=f&&f.use_keywords?"关键词自动判分":"手动判分"})]})]}),5===(null==f?void 0:f.question_type)&&(0,R.jsx)("div",{className:cn,children:null==f||null===(a=f.shixun)||void 0===a?void 0:a.map((function(e,n){return(0,R.jsxs)("div",{className:"".concat(dn," mb30"),children:[(0,R.jsxs)("span",{className:un,children:["",null==e?void 0:e.challenge_score,"分)"]}),(0,R.jsxs)("span",{className:pn,children:[(null==f?void 0:f.index)+"."+(n+1),"、",null==e?void 0:e.challenge_name]})]},n)}))}),6===(null==f?void 0:f.question_type)&&(0,R.jsx)("div",{className:mn,children:(0,R.jsx)(F.Z,{className:an,value:(null==f?void 0:f.description)||"- -"})}),7===(null==f?void 0:f.question_type)&&(null==f||null===(o=f.sub_exercise_questions)||void 0===o?void 0:o.map((function(e,n){var t,i,r,l,a,o;return(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:hn,children:[(0,R.jsxs)("span",{className:un,children:[null==e?void 0:e.question_score,"分"]}),(0,R.jsx)("span",{className:fn,children:null===(t=gn.find((function(n){return n.type==e.question_type})))||void 0===t?void 0:t.name}),(0,R.jsxs)("span",{className:pn,children:[n+1,"、",null==e?void 0:e.question_title]})]}),(0===e.question_type||2===e.question_type)&&(0,R.jsx)("div",{className:ze,style:{padding:"20px 58px 0 58px"},children:(0,R.jsx)("div",{children:null==e||null===(i=e.question_choices)||void 0===i?void 0:i.map((function(e,n){return(0,R.jsxs)("div",{className:He,children:[!(null!=e&&e.standard_boolean)&&(0,R.jsx)("span",{className:Ve}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("i",{className:"".concat(Ke," icon-duigou1")}),(0,R.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Ye:Ue," ").concat(Ge),children:xn[n]}),(0,R.jsx)(F.Z,{className:null!=e&&e.standard_boolean?Ye:Ue,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("div",{className:Je,children:"正确答案"})]},n)}))})}),1===e.question_type&&(0,R.jsx)("div",{className:We,children:null==e||null===(r=e.question_choices)||void 0===r?void 0:r.map((function(e,n){return(0,R.jsxs)("div",{className:Xe,children:[!(null!=e&&e.standard_boolean)&&(0,R.jsx)("span",{className:Qe}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("i",{className:"".concat($e," icon-duigou1")}),(0,R.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Ye:Ue," ").concat(Ge),children:xn[n]}),(0,R.jsx)(F.Z,{className:null!=e&&e.standard_boolean?Ye:Ue,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,R.jsx)("div",{className:Je,children:"正确答案"})]},n)}))}),3===e.question_type&&(0,R.jsx)("div",{className:ln,children:null==e||null===(l=e.standard_answers)||void 0===l?void 0:l.map((function(e,n){var t;return(0,R.jsxs)(G.Z,{align:"top",children:[(0,R.jsxs)("span",{className:Ue,children:["填空项",n+1]}),(0,R.jsx)("div",{className:an,children:null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsx)("div",{className:on,children:(0,R.jsx)("pre",{className:"mb0",children:e})},n)}))})]})}))}),4===e.question_type&&(0,R.jsxs)("div",{className:sn,children:[(0,R.jsx)("div",{className:Ue,children:"参考答案"}),(0,R.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=e&&null!==(a=e.answer_texts)&&void 0!==a&&a[0]?(0,R.jsx)(F.Z,{className:an,value:null==e||null===(o=e.answer_texts)||void 0===o?void 0:o[0]}):(0,R.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})}),(0,R.jsxs)("div",{className:"mt20 ",children:[(0,R.jsx)("span",{className:Ue,style:{color:"#3061D0"},children:"判分方式"}),(0,R.jsx)("span",{style:{color:"#000",marginLeft:10,fontSize:"16px"},children:null!=f&&f.use_keywords?"关键词自动判分":"手动判分"})]})]})]},n)}))),8===(null==f?void 0:f.question_type)&&(0,R.jsx)("div",{children:(0,R.jsx)(F.Z,{disabledFill:!0,className:an,showProgramFill:!0,value:De.Base64.decode((null==f||null===(s=f.program_attr)||void 0===s?void 0:s.code)||"")})}),((null==f?void 0:f.question_type)<=4||[6,8].includes(null==f?void 0:f.question_type))&&(0,R.jsxs)("div",{className:en,children:[(0,R.jsxs)("div",{className:"".concat(nn," mb30"),children:[(0,R.jsx)("span",{className:tn,children:"解析"}),(0,R.jsx)("span",{className:rn,children:null!=f&&f.analysis?(0,R.jsx)(F.Z,{value:null==f?void 0:f.analysis}):(0,R.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),(0,R.jsxs)("div",{className:"".concat(nn," mb30"),children:[(0,R.jsx)("span",{className:tn,children:"难度"}),(0,R.jsx)("span",{className:rn,children:1===(null==f?void 0:f.difficulty)?"简单":2===(null==f?void 0:f.difficulty)?"适中":"困难"})]}),(0,R.jsxs)("div",{className:nn,children:[(0,R.jsx)("span",{className:tn,children:"知识点"}),(0,R.jsx)(B.Z,{title:(null==f||null===(c=f.tag_discipline_names)||void 0===c?void 0:c.length)<=0||1==(null==f||null===(d=f.tag_discipline_names)||void 0===d?void 0:d.length)&&["-"].includes(null==f?void 0:f.tag_discipline_names[0])?"暂未设置~":null==f||null===(u=f.tag_discipline_names)||void 0===u||null===(u=u.join(""))||void 0===u?void 0:u.toString(),children:(0,R.jsx)("span",{className:rn,children:(null==f||null===(p=f.tag_discipline_names)||void 0===p?void 0:p.length)<=0||1==(null==f||null===(m=f.tag_discipline_names)||void 0===m?void 0:m.length)&&["-"].includes(null==f?void 0:f.tag_discipline_names[0])?(0,R.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"}):null==f||null===(h=f.tag_discipline_names)||void 0===h||null===(h=h.join(""))||void 0===h?void 0:h.toString()})})]})]})]})},_n=t(91099),wn=t(42230),bn=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,o=e.deleteitem,c=e.getTagData,u=e.init,h=f.Z.useForm(),v=p()(h,1)[0];return(0,m.useEffect)((function(){v.setFieldsValue(r()(r()({},n),{},{name:n.question_title,answer_texts:n.answer_texts,repeat_answer:!n.repeat_answer}))}),[n]),(0,R.jsx)("div",{children:(0,R.jsxs)(f.Z,{form:v,colon:!1,onFinish:function(e){a(r()(r()({},n),e))},onFinishFailed:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.ZP.error(n.errorFields[0].errors[0]),v.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,R.jsx)("span",{children:"简答题"})]}),!(null!=n&&n.isadd)&&(0,R.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){o()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,R.jsx)(j.ZP,{onClick:function(){n.isadd?(t(!1),u()):(v.setFieldsValue(r()(r()({},n),{},{name:null==n?void 0:n.question_title,answer_texts:n.answer_texts||[],repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,R.jsx)(j.ZP,{type:"primary",className:"ml20",onClick:function(){v.submit()},children:"保存"})]}),(0,R.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,R.jsx)(f.Z.Item,{className:A.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,R.jsx)(b.Z,{onBlur:function(e){"0"===e.target.value&&x.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})}),(0,R.jsx)(wn.W,{form:v,showKeywords:!0,questionTitlePlaceholder:"请编辑简答题题干内容"}),(0,R.jsx)(Y,{getTagData:c,qitem:n,exerciseitem:l,TagDiscipline:i,form:v})]})]})})},jn=function(e){var n,t,i=e.setScoreShow,r=e.ScoreShow,l=e.exerciseitem,a=e.getdata,o=(0,m.useState)(!1),c=p()(o,2),u=c[0],h=c[1];function f(){return v.apply(this,arguments)}function v(){return(v=d()(s()().mark((function e(){var n,t,i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==l||null===(n=l.exercise_question_types)||void 0===n||null===(n=n.filter((function(e){return e.Singlequestion})))||void 0===n?void 0:n.map((function(e){return{question_type:e.question_type,score:e.Singlequestion}})),e.next=3,(0,q.ZP)("/api/examination_banks/".concat(null==l||null===(t=l.exercise)||void 0===t?void 0:t.id,"/batch_set_score.json"),{method:"POST",body:{question_arr:i}});case 3:0===(null==(r=e.sent)?void 0:r.status)&&a();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,R.jsxs)("div",{children:[r&&(0,R.jsxs)(S.Z,{title:!1,footer:!1,open:r,width:640,centered:!0,zIndex:10,closable:!1,className:A.scoremodal,onCancel:function(){i(!1)},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{className:A.title,children:["批量设置分值",(0,R.jsxs)("div",{className:A.score,children:["总分 ",(null==l?void 0:l.exercise_question_types.length)>0&&(null==l||null===(n=l.exercise_types)||void 0===n?void 0:n.q_scores)]})]}),(0,R.jsx)("span",{onClick:function(){return i(!1)},className:A.close,children:"X"})]}),(0,R.jsxs)("div",{className:A.content,children:[(0,R.jsx)("span",{children:"题型名称"}),(0,R.jsx)("span",{children:"小题总数"}),(0,R.jsx)("span",{children:"题型总分"}),(0,R.jsx)("span",{children:"操作"})]}),null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t.filter((function(e){return"实训题"!==e.name&&"组合题"!==e.name})))||void 0===t?void 0:t.map((function(e,n){var t;return(0,R.jsxs)("div",{className:A.items,children:[(0,R.jsx)("span",{children:null==e?void 0:e.name}),(0,R.jsx)("span",{children:null==e||null===(t=e.items)||void 0===t?void 0:t.length}),(0,R.jsx)("span",{children:null==e?void 0:e.score}),(0,R.jsxs)("span",{children:["每题",(0,R.jsx)(b.Z,{min:.1,max:100,onChange:function(n){e.Singlequestion=n},defaultValue:e.Singlequestion,style:{width:90,height:38,margin:"0px 10px",display:"flex",alignItems:"center"}}),"分"]})]},n)})),(0,R.jsxs)("div",{className:A.bottom,children:[(0,R.jsx)(j.ZP,{className:A.no,onClick:function(){i(!1)},children:"取消"}),(0,R.jsx)(j.ZP,{className:A.yes,onClick:function(){var e;null!=l&&l.use_blank_score&&null!=l&&null!==(e=l.exercise_question_types)&&void 0!==e&&null!==(e=e.filter((function(e){return"填空题"===e.name})))&&void 0!==e&&null!==(e=e[0])&&void 0!==e&&e.Singlequestion?h(!0):(f(),i(!1))},children:"确认"})]})]}),(0,R.jsxs)(S.Z,{title:!1,footer:!1,centered:!0,open:u,zIndex:20,width:640,closable:!1,className:A.scoremodal,children:[(0,R.jsxs)("div",{style:{marginTop:40},children:["填空题中存在",(0,R.jsx)("span",{style:{color:"#FA6400"},children:"按空给分"}),"的小题,若批量设置分值会统一将填空题改为按题给分"]}),(0,R.jsxs)("div",{className:A.bottom,children:[(0,R.jsx)(j.ZP,{className:A.no,onClick:function(){h(!1)},children:"取消"}),(0,R.jsx)(j.ZP,{className:A.yes,onClick:function(){f(),h(!1),i(!1)},children:"确认"})]})]})]})},kn=t(99313),Cn=t(52306),Nn=t(88590),Zn="scoremodal___upTFR",Sn="selectWrapper___HH3RX",Tn="allqingchu___BFF1D",Pn="title___hFasb",In="bottom___A1n1C",Bn="yes___P1zzb",An="no___xZqXd",En="titlecount___fqA9P",qn="add___MqV0R",Mn="search___NREgv",Ln="searchIcon___qny3A",On="tabWrap___dR18c",Dn="previewModal___uSiGS",Fn={flex_box_center:"flex_box_center___nnwwA",flex_space_between:"flex_space_between___cRir9",flex_box_vertical_center:"flex_box_vertical_center___FqTZ8",flex_box_center_end:"flex_box_center_end___WU5_v",flex_box_column:"flex_box_column___QZFa1",warp:"warp___aLZwN",shixunbutton:"shixunbutton___Eoa1i",redio:"redio___LJ4js",redioitem:"redioitem___YicCC",redioitemyes:"redioitemyes___lX4Nr",title:"title___pi1jH",titleyes:"titleyes___jiEh7",yestag:"yestag___DLWoP",qcount:"qcount___U9kkL",score:"score___vLK4B",qtitle:"qtitle___kyg0t",checkbox:"checkbox___vjiBw",checkboxitem:"checkboxitem___HW3CP",checkboxitemyes:"checkboxitemyes___kpjek",bottom:"bottom___uG8Zq",bottomitem:"bottomitem___TnJQQ",left:"left___M8WXX",right:"right____dkCI",completion:"completion___H6RmA",content:"content___a2hGC",items:"items___D8mLd",simple:"simple___fQ0OS",shixun:"shixun___nB6Jk",combination:"combination___YrOdz",program:"program___lG0JA"},Rn=["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"],zn=function(e){var n,t,i,r,l,a,o,s,c,d,u=e.qitem;return(0,R.jsxs)("div",{className:Fn.warp,children:[(0,R.jsxs)("div",{className:Fn.mainPart,children:[(0,R.jsxs)("div",{className:Fn.qcount,children:[8===(null==u?void 0:u.question_type)&&(0,R.jsx)(F.Z,{className:Fn.content,showProgramFill:!0,value:null==u||null===(n=u.program_attr)||void 0===n?void 0:n.description}),8!=(null==u?void 0:u.question_type)&&(0,R.jsx)(F.Z,{className:Fn.qtitle,value:(null==u?void 0:u.name)||(null==u?void 0:u.title)})]}),(0===(null==u?void 0:u.question_type)||2===(null==u?void 0:u.question_type))&&(0,R.jsx)("div",{children:null==u||null===(t=u.choices)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsxs)("div",{className:Fn.redio,children:[!(null!=e&&e.is_answer)&&(0,R.jsx)("span",{className:Fn.redioitem}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("i",{className:"".concat(Fn.redioitemyes," icon-duigou1")}),(0,R.jsx)(F.Z,{className:null!=e&&e.is_answer?Fn.titleyes:Fn.title,value:Rn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("div",{className:Fn.yestag,children:"正确答案"})]})}))}),1===(null==u?void 0:u.question_type)&&(0,R.jsx)("div",{children:null==u||null===(i=u.choices)||void 0===i?void 0:i.map((function(e,n){return(0,R.jsxs)("div",{className:Fn.checkbox,children:[!(null!=e&&e.is_answer)&&(0,R.jsx)("span",{className:Fn.checkboxitem}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("i",{className:"".concat(Fn.checkboxitemyes," icon-duigou1")}),(0,R.jsx)(F.Z,{className:null!=e&&e.is_answer?Fn.titleyes:Fn.title,value:Rn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("div",{className:Fn.yestag,children:"正确答案"})]})}))}),3===(null==u?void 0:u.question_type)&&(0,R.jsx)("div",{className:Fn.completion,children:null==u||null===(r=u.standard_answer)||void 0===r?void 0:r.map((function(e,n){var t;return(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsxs)("span",{className:Fn.title,children:["填空项",n+1]}),(0,R.jsx)("div",{className:Fn.content,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsx)("div",{className:Fn.items,children:e})}))})]})}))}),4===(null==u?void 0:u.question_type)&&(0,R.jsxs)("div",{className:Fn.simple,children:[(0,R.jsx)("div",{className:Fn.title,children:"参考答案"}),(0,R.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=u&&null!==(l=u.answer_texts)&&void 0!==l&&l[0]?(0,R.jsx)(F.Z,{className:Fn.content,value:null==u||null===(a=u.answer_texts)||void 0===a?void 0:a[0]}):(0,R.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),5===(null==u?void 0:u.question_type)&&(null==u||null===(o=u.challenge_names)||void 0===o?void 0:o.map((function(e,n){return(0,R.jsx)("div",{className:Fn.shixun,children:(0,R.jsxs)("span",{className:Fn.qtitle,children:[(0,R.jsxs)("span",{style:{marginRight:10},children:["第",(0,E.EM)(n+1),"题"]}),e]})})}))),6===(null==u?void 0:u.question_type)&&(0,R.jsx)("div",{className:Fn.program,children:(0,R.jsx)(F.Z,{className:Fn.content,value:(null==u||null===(s=u.program_attr)||void 0===s?void 0:s.description)||"- -"})}),7===(null==u?void 0:u.question_type)&&(null==u||null===(c=u.sub_item_banks)||void 0===c?void 0:c.map((function(e,n){var t,i,r,l,a;return(0,R.jsxs)("div",{children:[(0,R.jsx)("div",{className:Fn.combination,children:(0,R.jsx)("span",{className:Fn.qtitle,children:null==e?void 0:e.name})}),(0,R.jsx)("div",{className:Fn.warp,style:{padding:"0px",paddingTop:20},children:(0,R.jsxs)("div",{children:[("SINGLE"==(null==e?void 0:e.item_type)||"JUDGMENT"==(null==e?void 0:e.item_type))&&(null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsxs)("div",{className:Fn.redio,children:[!(null!=e&&e.is_answer)&&(0,R.jsx)("span",{className:Fn.redioitem}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("i",{className:"".concat(Fn.redioitemyes," icon-duigou1")}),(0,R.jsx)(F.Z,{className:null!=e&&e.is_answer?Fn.titleyes:Fn.title,value:Rn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("div",{className:Fn.yestag,children:"正确答案"})]})}))),"MULTIPLE"==(null==e?void 0:e.item_type)&&(null==e||null===(i=e.choices)||void 0===i?void 0:i.map((function(e,n){return(0,R.jsxs)("div",{className:Fn.checkbox,children:[!(null!=e&&e.is_answer)&&(0,R.jsx)("span",{className:Fn.checkboxitem}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("i",{className:"".concat(Fn.checkboxitemyes," icon-duigou1")}),(0,R.jsx)(F.Z,{className:null!=e&&e.is_answer?Fn.titleyes:Fn.title,value:Rn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,R.jsx)("div",{className:Fn.yestag,children:"正确答案"})]})}))),"COMPLETION"==(null==e?void 0:e.item_type)&&(0,R.jsx)("div",{className:Fn.completion,children:null==e||null===(r=e.standard_answer)||void 0===r?void 0:r.map((function(e,n){var t;return(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsxs)("span",{className:Fn.title,children:["填空项",n+1]}),(0,R.jsx)("div",{className:Fn.content,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,R.jsx)("div",{className:Fn.items,children:e})}))})]})}))}),"SUBJECTIVE"==(null==e?void 0:e.item_type)&&(0,R.jsxs)("div",{className:Fn.simple,children:[(0,R.jsx)("div",{className:Fn.title,children:"参考答案"}),(0,R.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=e&&null!==(l=e.answer_texts)&&void 0!==l&&l[0]?(0,R.jsx)(F.Z,{className:Fn.content,value:null==e||null===(a=e.answer_texts)||void 0===a?void 0:a[0]}):(0,R.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]})]})})]})}))),8===(null==u?void 0:u.question_type)&&(0,R.jsx)("div",{children:(0,R.jsx)(F.Z,{disabledFill:!0,className:Fn.content,showProgramFill:!0,value:De.Base64.decode((null==u||null===(d=u.program_attr)||void 0===d?void 0:d.code)||"")})}),5===(null==u?void 0:u.question_type)&&(0,R.jsxs)("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"},children:[(0,R.jsxs)("div",{style:{flex:1,alignItems:"center",display:"flex"},children:[(0,R.jsxs)("div",{style:{marginRight:30},children:[(0,R.jsx)("span",{style:{marginRight:10},children:"创建者"}),(0,R.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_name)||"- -"})]}),(0,R.jsxs)("div",{style:{marginRight:30},children:[(0,R.jsx)("span",{style:{marginRight:10},children:"所属单位"}),(0,R.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_school_name)||"- -"})]}),(0,R.jsxs)("div",{style:{marginRight:30},children:[(0,R.jsx)("span",{style:{marginRight:10},children:"学习人数"}),(0,R.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.study_count)||"0"})]})]}),(0,R.jsxs)("a",{className:Fn.shixunbutton,href:"/shixuns/".concat(null==u?void 0:u.identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,R.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]})]})]}),((null==u?void 0:u.question_type)<=4||[6,8].includes(null==u?void 0:u.question_type))&&(0,R.jsxs)("div",{className:Fn.bottom,children:[(0,R.jsxs)("div",{className:Fn.bottomitem,children:[(0,R.jsx)("span",{className:Fn.left,children:"解析"}),(0,R.jsx)("span",{className:Fn.right,children:null!=u&&u.analysis?(0,R.jsx)(F.Z,{value:null==u?void 0:u.analysis}):(0,R.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),(0,R.jsxs)("div",{className:Fn.bottomitem,children:[(0,R.jsx)("span",{className:Fn.left,children:"难度"}),(0,R.jsx)("span",{className:Fn.right,children:1===(null==u?void 0:u.difficulty)?"简单":2===(null==u?void 0:u.difficulty)?"适中":"困难"})]}),(0,R.jsxs)("div",{className:Fn.bottomitem,children:[(0,R.jsx)("span",{className:Fn.left,children:"知识点"}),(0,R.jsx)("span",{className:Fn.right,children:null!=u&&u.tag_discipline?null==u?void 0:u.tag_discipline:(0,R.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]})]})]})},Gn=t(4505),Wn=t(28288),Hn=(0,h.connect)((function(e){return{shixunsDetail:e.shixunsDetail}}))((function(e){var n,t,i,l=e.setScoreShow,o=e.ScoreShow,c=e.onOk,u=e.isshixuns,h=e.isloadings,v=e.dispatch,g=(e.shixunsDetail,(0,m.useState)({type:"0",page:1,per_page:10,updated_at:"",quotes:""})),w=p()(g,2),b=w[0],k=w[1],C=(0,m.useState)([]),Z=p()(C,2),T=Z[0],P=Z[1],I=(0,m.useState)([]),A=p()(I,2),E=A[0],M=A[1],L=(0,m.useState)([]),D=p()(L,2),z=D[0],G=D[1],W=(0,m.useState)([]),V=p()(W,2),U=V[0],Y=V[1],J=(0,m.useState)(!1),X=p()(J,2),Q=X[0],$=X[1],ee=f.Z.useForm(),ne=p()(ee,1)[0],te=(0,m.useState)(),ie=p()(te,2),re=ie[0],le=ie[1],ae=(0,m.useState)(!1),oe=p()(ae,2),se=oe[0],ce=oe[1],de=(0,m.useState)(u),ue=p()(de,2),pe=ue[0],me=ue[1],he=(0,m.useState)([]),fe=p()(he,2),ve=fe[0],xe=fe[1],ge=(0,m.useState)(0),ye=p()(ge,2),_e=ye[0],we=ye[1],be=(0,m.useState)(!0),je=p()(be,2),ke=je[0],Ce=je[1],Ne=(0,m.useState)([]),Ze=p()(Ne,2),Se=Ze[0],Te=Ze[1],Pe=[{name:"全部",value:"",question_type:0},{name:"单选题",value:"SINGLE",question_type:0},{name:"多选题",value:"MULTIPLE",question_type:1},{name:"判断题",value:"JUDGMENT",question_type:2},{name:"填空题",value:"COMPLETION",question_type:3},{name:"简答题",value:"SUBJECTIVE",question_type:4},{name:"实训题",value:"SHIXUN",question_type:5},{name:"编程题",value:"PROGRAM",question_type:6},{name:"组合题",value:"COMBINATION",question_type:7},{name:"程序填空题",value:"BPROGRAM",question_type:8}],Ie=(0,m.useState)([]),Be=p()(Ie,2),Ae=Be[0],Ee=Be[1],qe=(0,m.useRef)(new Set),Me=(0,m.useRef)(new Set),Le=[{name:"简单",value:1},{name:"适中",value:2},{name:"困难",value:3}],Oe=(0,m.useState)(!1),De=p()(Oe,2),Fe=De[0],Re=De[1];function ze(e){return Ge.apply(this,arguments)}function Ge(){return(Ge=d()(s()().mark((function e(n){var t,i,l,a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if($(!0),k(r()({},n)),!((null==z?void 0:z.length)<=0&&"5"===n.type)){e.next=6;break}return Y([]),$(!1),e.abrupt("return");case 6:return l="5"===n.type?null==z?void 0:z.filter((function(e){return!ve.includes(e)})):null,a="5"===n.type?null==z?void 0:z.filter((function(e){return ve.includes(e)})):null,e.next=10,(0,q.ZP)("/api/item_banks.json",{method:"get",params:r()(r()({},n),{},{discipline_id:(null==n||null===(t=n.courseid)||void 0===t?void 0:t[0])||null,sub_discipline_id:(null==n||null===(i=n.courseid)||void 0===i?void 0:i[1])||null,ids:l,shixun_ids:a,include_shixuns:!0,keyword:n.keyword?encodeURIComponent(n.keyword):n.keyword,type:"5"===n.type?null:n.type,clazz:"3"===n.type?"ItemBanksGroup":null})});case 10:o=e.sent,Y(o),$(!1);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(){return(We=d()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,q.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:"5"===b.type?null:b.type,clazz:"ItemBanksGroup"}});case 2:n=e.sent,P((0,N.L)(null==n?void 0:n.disciplines));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(){return(He=d()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,q.ZP)("/api/item_banks_groups/all_groups.json",{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&Te(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ve(e){return Ke.apply(this,arguments)}function Ke(){return(Ke=d()(s()().mark((function e(n){var t,i,l,a,o,c,d;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if($(!0),o=null===(t=n.list)||void 0===t?void 0:t.filter((function(e){return!ve.includes(e)})),c=null===(i=n.list)||void 0===i?void 0:i.filter((function(e){return ve.includes(e)})),0!==o.length||0!==c.length){e.next=7;break}return $(!1),Y([]),e.abrupt("return");case 7:return e.next=9,(0,q.ZP)("/api/item_banks.json",{method:"get",params:r()(r()({},n),{},{discipline_id:(null==n||null===(l=n.courseid)||void 0===l?void 0:l[0])||null,sub_discipline_id:(null==n||null===(a=n.courseid)||void 0===a?void 0:a[1])||null,ids:o,shixun_ids:c,type:"5"===n.type?null:n.type,clazz:"3"===n.type?"ItemBanksGroup":null})});case 9:d=e.sent,$(!1),Y(d);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){o&&(ne.setFieldsValue({item_type:"",courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),ke&&pe&&(ne.setFieldsValue({item_type:"SHIXUN"}),b.item_type="SHIXUN",k(r()({},b)),Ce(!1)),ze(b),function(){We.apply(this,arguments)}(),function(){He.apply(this,arguments)}())}),[o]),(0,m.useEffect)((function(){_e>0&&setTimeout((function(){we(0)}),2e3)}),[_e]);var Ue=function(){var e=d()(s()().mark((function e(n){var t,i,r,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v({type:"shixunsDetail/release",payload:{id:n}});case 2:if(t=e.sent,i=null==t?void 0:t.tag_position,r=(null==t?void 0:t.evaluation_set_position)||[],0!==(l=t.status)){e.next=12;break}return x.ZP.success("发布成功"),ze(b),e.abrupt("return",!0);case 12:2===l?x.ZP.error("第".concat(r.join(","),"关尚未完成,无法申请发布")):3===l?x.ZP.error("每一个关卡至少需要一个技能标签, 第".concat(i.join(","),"关尚未设置技能标签,请补充")):x.ZP.error("尚未创建任务的实训,不能申请发布");case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Ye=function(e){return 1===(null==e?void 0:e.shixun_tag_num)?"未发布的实践项目不能被选用,请先进行发布":""};return(0,R.jsxs)("div",{children:[(0,R.jsxs)(S.Z,{title:!1,footer:!1,open:o,width:1200,centered:!0,className:Zn,onCancel:function(){l(!1)},children:[(0,R.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,R.jsx)("div",{className:Pn,children:"题库选题"})}),(0,R.jsx)(kn.Z,{className:On,activeKey:b.type,onChange:function(e){b.type=e,b.page=1,b.updated_at="",b.quotes="",b.courseid="",b.tag_discipline_id=null,b.difficulty=null,b.keyword=null,b.group_id=null,ne.setFieldsValue({courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}),"SHIXUN"===(null==b?void 0:b.item_type)&&"5"!==b.type&&(pe=!0,me(!0)),Re(!1),"5"===b.type&&(pe=!1,me(!1)),k(r()({},b)),ze(r()({},b))},items:[{label:"公共",key:"1"},{label:"团队共享",key:"3"},{label:"收藏夹",key:"2"},{label:"我创建的",key:"0"},{label:(0,R.jsxs)("div",{children:["已选",z.length>0&&(0,R.jsx)("span",{className:En,children:z.length}),_e>0&&(0,R.jsxs)("span",{className:qn,children:["+",_e]})]}),key:"5"}]}),(0,R.jsxs)(f.Z,{layout:"inline",form:ne,onValuesChange:function(e,n){var t=Object.values(n).some((function(e){return null!==e&&""!==e&&void 0!==e})),i=""===n.keyword;if(Re(t||!i),b.page=1,"SHIXUN"===(null==n?void 0:n.item_type)){if("5"===b.type?me(!1):me(!0),e.keyword||""===e.keyword)return;ne.submit()}else{if(null!=e&&e.courseid&&ne.setFieldsValue({tag_discipline_id:""}),me(!1),e.keyword||""===e.keyword)return;ne.submit()}},onFinish:function(e){k(r()(r()({},b),e)),ze(r()(r()({},b),e))},children:[(0,R.jsx)(f.Z.Item,{name:"item_type",children:(0,R.jsx)(H.default,{className:Sn,placeholder:"题型",style:{width:110},size:"middle",children:Pe.map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.value)}))})}),(0,R.jsx)(f.Z.Item,{name:"courseid",children:(0,R.jsx)(_.Z,{className:Sn,style:{width:160},size:"middle",placeholder:"方向&课程",options:T})}),!pe&&(0,R.jsx)(f.Z.Item,{name:"tag_discipline_id",children:(0,R.jsx)(H.default,{className:Sn,placeholder:"知识点",style:{width:160},size:"middle",allowClear:!0,children:null==U||null===(n=U.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.id)}))})}),(0,R.jsx)(f.Z.Item,{name:pe?"diff":"difficulty",children:(0,R.jsxs)(H.default,{className:Sn,placeholder:"难度",style:{width:118},size:"middle",allowClear:!0,children:[!pe&&Le.map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.value)})),pe&&[{name:"初级",value:1},{name:"中级",value:2},{name:"中高级",value:3},{name:"高级",value:4}].map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.value)}))]})}),pe&&(0,R.jsx)(f.Z.Item,{name:"shixun_publish_status",children:(0,R.jsx)(H.default,{className:Sn,placeholder:"全部状态",style:{width:118},size:"middle",allowClear:!0,children:[{name:"未发布",value:"unpublish"},{name:"静默发布",value:"silent_publish"},{name:"公开发布",value:"public_publish"}].map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.value)}))})}),("3"===b.type||"0"===b.type)&&!pe&&(0,R.jsx)(f.Z.Item,{name:"group_id",children:(0,R.jsxs)(H.default,{className:Sn,placeholder:"文件夹",style:{width:118},size:"middle",showSearch:!0,allowClear:!0,filterOption:function(e,n){return console.log("---",e,n),-1!==n.children.toUpperCase().indexOf(e.toUpperCase())},children:[(0,R.jsx)(H.default.Option,{children:"根目录"},0),"3"===b.type&&(null==Se||null===(t=Se.share_banks_groups)||void 0===t?void 0:t.map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.id)}))),"0"===b.type&&(null==Se||null===(i=Se.my_banks_groups)||void 0===i?void 0:i.map((function(e){return(0,R.jsx)(H.default.Option,{children:e.name},e.id)})))]})}),Fe&&(0,R.jsxs)("span",{className:Tn,onClick:function(){ne.resetFields(),pe=!1,me(!1),Re(!1),ne.submit()},children:[(0,R.jsx)("i",{className:"iconfont icon-guanbi4"}),(0,R.jsx)("span",{children:"清除筛选条件"})]}),(0,R.jsx)(f.Z.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword",children:(0,R.jsx)(y.Z.Search,{className:Mn,placeholder:"请输入关键词搜索",allowClear:!0,suffix:(0,R.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Ln),onClick:function(){return ne.submit()}}),onSearch:function(e){ne.submit()}})})]}),(0,R.jsxs)("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20},children:[(0,R.jsxs)("div",{onClick:function(){"asc"===b.updated_at?b.updated_at="desc":b.updated_at="asc",k(r()(r()({},b),{},{page:1})),ze(r()(r()({},b),{},{page:1}))},children:[" ",b.updated_at?(0,R.jsx)("img",{src:"asc"===b.updated_at?Gn.Z:Wn.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,R.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按更新时间排序"]}),(0,R.jsxs)("div",{onClick:function(){"asc"===b.quotes?b.quotes="desc":b.quotes="asc",k(r()(r()({},b),{},{page:1})),ze(r()(r()({},b),{},{page:1}))},style:{marginLeft:20},children:[" ",b.quotes?(0,R.jsx)("img",{src:"asc"===b.quotes?Gn.Z:Wn.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,R.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按使用次数排序"]})]}),(0,R.jsx)(Cn.Z,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(null==U?void 0:U.items)||(null==U?void 0:U.shixun_list),pagination:!1,loading:Q,rowKey:function(e){return e.id},rowSelection:{type:"checkbox",selectedRowKeys:E,getCheckboxProps:function(e){return{disabled:1===e.shixun_tag_num}},onSelect:function(e,n,t){if(n)pe&&xe([].concat(O()(ve),[e.id])),M([].concat(O()(E),[e.id])),Ee([].concat(O()(Ae),[e])),e.identifier?qe.current.add(e.id):Me.current.add(e.id),we(1),G([].concat(O()(z),[e.id]));else{var i=Ae.filter((function(n){return n.id!==e.id}));Ee(i);var l=i.map((function(e){return e.id}));M(O()(l)),e.identifier?qe.current.delete(e.id):Me.current.delete(e.id);var a=z.filter((function(n){return n!==e.id}));if(G(a),pe){var o=ve.filter((function(n){return n!==e.id}));xe(O()(o))}if("5"===b.type)return void Ve(r()(r()({},b),{},{list:O()(a)}))}},onSelectAll:function(e,n,t){if(e){var i=t.map((function(e){return e.id}));pe&&xe([].concat(O()(ve),O()(i))),Ee([].concat(O()(Ae),O()(t))),M([].concat(O()(E),O()(i))),G([].concat(O()(z),O()(i)));var l,o=a()(t);try{for(o.s();!(l=o.n()).done;){var s=l.value;s.identifier?qe.current.add(s.id):Me.current.add(s.id)}}catch(e){o.e(e)}finally{o.f()}}else{var c=t.map((function(e){return e.id})),d=E.filter((function(e){return!c.some((function(n){return n===e}))})),u=Ae.filter((function(e){return!c.some((function(n){return n===e.id}))}));if(Ee(u),M(O()(d)),G(O()(d)),pe){var p=ve.filter((function(e){return!c.some((function(n){return n===e.id}))}));xe(O()(p))}"5"===b.type&&Ve(r()(r()({},b),{},{list:O()(d)}));var m,h=a()(c);try{for(h.s();!(m=h.n()).done;){var f=m.value;f.identifier?qe.current.delete(f):Me.current.delete(f)}}catch(e){h.e(e)}finally{h.f()}}}},columns:[{title:"题型",dataIndex:"item_type",key:"item_type",render:function(e,n,t){var i;return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("div",{children:pe||null!=n&&n.challenge_names?"实训题":null==Pe||null===(i=Pe.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name})})}},{title:"试题名称",dataIndex:"name",width:pe?"30%":"60%",key:"name",render:function(e,n,t){var i;return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("span",{children:(0,R.jsx)(F.Z,{showLines:1,showTextOnly:!0,value:pe||null!=n&&n.challenge_names?null!=n&&n.title||null===e?"--":e:"BPROGRAM"==(null==n?void 0:n.item_type)?null==n||null===(i=n.program_attr)||void 0===i?void 0:i.description:e},1)})})}},{title:"创建者",dataIndex:"author_name",key:"author_name",hidden:!pe,render:function(e,n,t){var i;return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("span",{children:e?null==e||null===(i=e.split("、"))||void 0===i?void 0:i[0]:"- -"})})}},{title:"所属单位",dataIndex:"author_school_name",key:"author_school_name",hidden:!pe,render:function(e,n,t){return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("span",{children:e||"- -"})})}},{title:"难度",dataIndex:"difficulty",key:"difficulty",render:function(e,n,t){var i,r;return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("div",{children:pe||null!=n&&n.challenge_names?(null==n?void 0:n.level)||(null==Le||null===(i=Le.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name):null==Le||null===(r=Le.filter((function(n){return n.value===e})))||void 0===r||null===(r=r[0])||void 0===r?void 0:r.name})})}},{title:"关卡数量",dataIndex:"challenges_count",key:"challenges_count",hidden:!pe,render:function(e,n,t){return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("div",{children:e||"- -"})})}},{title:"使用次数",dataIndex:"quotes",key:"quotes",render:function(e,n,t){return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("div",{children:pe||null!=n&&n.challenge_names?(null==n?void 0:n.study_count)||(null==n?void 0:n.stu_num):e})})}},{title:(0,R.jsxs)("span",{children:["发布状态 ",(0,R.jsx)(B.Z,{title:"未发布的实践项目不能被选用",children:(0,R.jsx)(K.Z,{})})]}),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!pe,render:function(e,n,t){return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsx)("div",{children:e||"- -"})})}},{title:"操作",dataIndex:"id",key:"item_type",render:function(e,n,t){return(0,R.jsx)(B.Z,{title:Ye(n),children:(0,R.jsxs)("div",{style:{flex:1,textAlign:"start"},children:[(0,R.jsx)("a",{onClick:function(){var e;le(r()(r()({},n),{},{question_type:pe||null!=n&&n.challenge_names?5:null==Pe||null===(e=Pe.filter((function(e){return e.value===(null==n?void 0:n.item_type)})))||void 0===e||null===(e=e[0])||void 0===e?void 0:e.question_type})),ce(!0)},children:"查看"}),1===(null==n?void 0:n.shixun_tag_num)&&(0,R.jsx)("a",{style:{marginLeft:10},onClick:function(){var e;S.Z.confirm({title:"提示",icon:null,centered:!0,width:400,content:(0,R.jsxs)("div",{children:["是否确定发布",(0,R.jsx)("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:function(){window.open("/shixuns/".concat(null==n?void 0:n.identifier,"/challenges"))},children:(null==n?void 0:n.shixun_name)||"--"}),""]}),onOk:(e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ue(null==n?void 0:n.identifier)){e.next=2;break}return e.abrupt("return",new Promise((function(e,n){n()})));case 2:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"发布"})]})})}}].filter((function(e){return!e.hidden}))}),(0,R.jsx)(Nn.Z,{current:b.page,total:(null==U?void 0:U.items_count)||(null==U?void 0:U.shixuns_count),style:{marginBottom:20},defaultPageSize:b.per_page,showTotal:function(e){return(0,R.jsxs)("span",{children:["共 ",(0,R.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},pageSize:b.per_page,onChange:function(e,n){b.page=e,b.per_page=n,k(r()({},b)),ze(r()({},b))}}),(0,R.jsxs)("div",{className:In,children:[(0,R.jsx)(j.ZP,{className:An,onClick:function(){l(!1)},children:"取消"}),(0,R.jsx)(j.ZP,{loading:h,style:{width:h&&75},className:Bn,onClick:d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==z?void 0:z.length)<=0)){e.next=3;break}return x.ZP.info("当前暂未选择数据"),e.abrupt("return");case 3:c(O()(Me.current),O()(qe.current),!0,null==z?void 0:z.length);case 4:case"end":return e.stop()}}),e)}))),children:"确认"})]})]}),(0,R.jsx)(S.Z,{open:se,title:"题目详情",footer:!1,className:Dn,width:1e3,centered:!0,onCancel:function(){ce(!1)},onOk:function(){ce(!1)},children:(0,R.jsx)(zn,{qitem:re})})]})})),Vn=t(18122),Kn=t(89392),Un=t(70738),Yn=[{name:"单选题",id:0,count:"q_singles",score:"q_singles_scores",nameType:"SINGLE"},{name:"多选题",id:1,count:"q_doubles",score:"q_doubles_scores",nameType:"MULTIPLE"},{name:"判断题",id:2,count:"q_judges",score:"q_judges_scores",nameType:"JUDGMENT"},{name:"填空题",id:3,count:"q_nulls",score:"q_nulls_scores",nameType:"COMPLETION"},{name:"简答题",id:4,count:"q_mains",score:"q_mains_scores",nameType:"SUBJECTIVE"},{name:"实训题",id:5,count:"q_shixuns",score:"q_shixuns_scores",nameType:"PRACTICAL"},{name:"编程题",id:6,count:"q_pros",score:"q_pros_scores",nameType:"PROGRAM"},{name:"组合题",id:7,count:"q_combinations",score:"q_combinations_scores",nameType:"COMBINATION"},{name:"程序填空题",id:8,count:"q_combinations",score:"q_combinations_scores",nameType:"BPROGRAM"}],Jn=(0,h.connect)((function(e){return{user:e.user,dispatch:e.dispatch}}))((function(e){var n,t,i,l,a=e.user,o=e.dispatch,c=e.itemid,u=e.setisedits,v=(0,m.useState)(),_=p()(v,2),w=_[0],k=_[1],N=(0,m.useState)(!1),Z=p()(N,2),L=Z[0],O=Z[1],D=(0,m.useState)(),G=p()(D,2),W=G[0],H=G[1],V=(0,m.useState)(),K=p()(V,2),U=K[0],Y=K[1],X=(0,m.useRef)(),Q=(0,m.useRef)(),ee=(0,m.useState)(),te=p()(ee,2),ie=te[0],re=te[1],le=(0,m.useState)(!1),ae=p()(le,2),oe=ae[0],se=ae[1],ce=(0,m.useState)(!1),de=p()(ce,2),ue=de[0],pe=de[1],me=(0,m.useState)(),he=p()(me,2),fe=he[0],ve=he[1],xe=(0,m.useState)(!1),ge=p()(xe,2),ye=ge[0],_e=ge[1],we=(0,m.useState)(!1),be=p()(we,2),je=be[0],ke=be[1],Ce=(0,m.useState)(!1),Ne=p()(Ce,2),Ze=Ne[0],Se=Ne[1],Te=(0,m.useState)(!1),Pe=p()(Te,2),Ie=Pe[0],Be=Pe[1],Ae=(0,m.useState)(!1),Ee=p()(Ae,2),qe=Ee[0],Me=Ee[1],Oe=(0,m.useState)(!1),ze=p()(Oe,2),Ge=(ze[0],ze[1],f.Z.useForm()),We=p()(Ge,1)[0],He=(0,m.useState)(!1),Ve=p()(He,2),Ke=Ve[0],Ue=Ve[1],Ye=(0,m.useRef)(null),Je=(0,h.useSearchParams)(),Xe=p()(Je,1)[0];(0,m.useEffect)((function(){$e(),o({type:"globalSetting/footerToggle",payload:!1})}),[]),(0,m.useEffect)((function(){u(ue)}),[ue]),(0,m.useEffect)((function(){null!=W&&W.question_id&&(Y(null==W?void 0:W.question_score),Q.current=null==W?void 0:W.question_id)}),[null==W?void 0:W.question_id]);var Qe=function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o({type:"newExercisePaper/getTagDiscipline",payload:{sub_discipline_id:n}});case 2:t=e.sent,ve(t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function $e(){return en.apply(this,arguments)}function en(){return(en=d()(s()().mark((function e(){var n,t,i,l,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return se(!0),O(!0),e.next=4,o({type:"newExercisePaper/editExercise",payload:{id:c}});case 4:l=e.sent,se(!1),O(!1),k(l),null!=l&&null!==(n=l.exercise)&&void 0!==n&&n.sub_discipline_id&&Qe(null==l||null===(a=l.exercise)||void 0===a?void 0:a.sub_discipline_id),H(r()(r()({},null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.items)||void 0===t?void 0:t[0]),{},{index:1})),re(r()(r()({},null==l||null===(i=l.exercise_question_types)||void 0===i?void 0:i[0]),{},{indexs:1}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nn(e){return tn.apply(this,arguments)}function tn(){return tn=d()(s()().mark((function e(n){var t,i,l,a,d,u,p,m,h,f=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(f.length>1&&void 0!==f[1])||f[1])&&(se(!0),O(!0)),e.next=4,o({type:"newExercisePaper/editExercise",payload:{id:c}});case 4:d=e.sent,k(d),u=[],null==d||null===(t=d.exercise_question_types)||void 0===t||t.map((function(e){var n;null==e||null===(n=e.items)||void 0===n||n.map((function(e,n){u.push(r()(r()({},e),{},{index:n+1}))}))})),p=null===(i=u.filter((function(e){return e.question_id===(null==n?void 0:n.id)})))||void 0===i?void 0:i[0],m=null==d||null===(l=d.exercise_question_types)||void 0===l?void 0:l.map((function(e,n){if((null==p?void 0:p.question_type)===(null==e?void 0:e.question_type))return r()(r()({},e),{},{indexs:n+1})})),h=null===(a=m.filter((function(e){return e})))||void 0===a?void 0:a[0],re(r()({},h)),H(r()({},p)),Y(null==p?void 0:p.question_score),se(!1),O(!1);case 16:case"end":return e.stop()}}),e)}))),tn.apply(this,arguments)}function rn(e){return ln.apply(this,arguments)}function ln(){return(ln=d()(s()().mark((function e(n){var t,i,l,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r()(r()({},n),{},{difficulty:(null==n?void 0:n.difficulty)||2,item_type:n.question_type,sub_discipline_id:null==w||null===(t=w.exercise)||void 0===t?void 0:t.sub_discipline_id,tag_discipline_ids:[],repeat_answer:!n.repeat_answer}),l={},8===n.question_type&&(l=r()(r()({},n),{},{hack:r()(r()({},null==n?void 0:n.hack),{},{difficult:n.difficulty}),hack_codes:r()(r()({},n.hack_codes),{},{code:De.Base64.encode(n.hack_codes.code)}),hack_sets:[r()({},n.hack_sets)],is_blank:!0})),n.tag_discipline_ids&&(i.tag_discipline_ids=Array.isArray(n.tag_discipline_ids)?n.tag_discipline_ids:[n.tag_discipline_ids],l.tag_discipline_ids=Array.isArray(n.tag_discipline_ids)?n.tag_discipline_ids:[n.tag_discipline_ids]),sessionStorage.projectFill&&(l.hack_identifier=sessionStorage.projectFill),e.next=7,(0,q.ZP)("/api/examination_banks/".concat(c,"/examination_banks_item_banks/create_item_bank.json"),{method:"post",body:8===n.question_type?l:i});case 7:0===(null==(a=e.sent)?void 0:a.status)&&(pe(!1),nn(a)),(0,E.Vf)("#question-scroll-id");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var an=function(){var e=d()(s()().mark((function e(n,t){var i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n.length){e.next=4;break}return x.ZP.warning("请上传文件"),t(),e.abrupt("return");case 4:return e.next=6,(0,C.Hb)(c,null===(i=n[0])||void 0===i?void 0:i.file);case 6:0===(r=e.sent).status&&(x.ZP.success("成功导入".concat(null==r?void 0:r.success,"条")),_e(!1),$e()),t();case 9:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),on=function(){var e=d()(s()().mark((function e(n,t){var i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.kF)({score:(0,Kn.round)(n,1),question_id:null==t?void 0:t.question_id});case 2:if(0!==(null==(i=e.sent)?void 0:i.status)){e.next=7;break}return x.ZP.success("修改成功"),nn({id:Q.current},!1),e.abrupt("return");case 7:-1===(null==i?void 0:i.status)&&Y(null==t?void 0:t.question_score);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();function sn(){return cn.apply(this,arguments)}function cn(){return cn=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:S.Z.confirm({title:"提示",content:"确定要删除这个试题吗?",okText:"确定",centered:!0,className:A.modalconfirm,onOk:function(){var e=d()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!W.question_id){e.next=7;break}return e.next=3,(0,q.ZP)("/api/examination_banks/".concat(c,"/examination_banks_item_banks/").concat(W.question_id,".json"),{method:"delete"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&($e(),pe(!1)),e.next=10;break;case 7:H({}),pe(!1),$e();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),cancelText:"取消"});case 1:case"end":return e.stop()}}),e)}))),cn.apply(this,arguments)}var dn=function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,q.ZP)("/api/examination_banks/".concat(c,"/examination_banks_item_banks.json"),{method:"post",body:r()({},n)});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),un=(0,Vn.I)(),pn=un.overflow,mn=un.handleMouseEnter,hn=un.handleMouseLeave,fn=function(){var e=d()(s()().mark((function e(n){var t,i,r,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),e.next=3,(0,q.ZP)("/api/examination_banks/".concat(c,"/sort_question_type.json"),{method:"post",body:{question_type:n}});case 3:if(t=e.sent,O(!1),0!==(null==t?void 0:t.status)){e.next=11;break}return e.next=8,o({type:"newExercisePaper/editExercise",payload:{id:c}});case 8:r=e.sent,k(r),null!=r&&null!==(i=r.exercise)&&void 0!==i&&i.sub_discipline_id&&Qe(null==r||null===(l=r.exercise)||void 0===l?void 0:l.sub_discipline_id);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),vn=function(){return!!ue&&(x.ZP.info("请先保存或取消当前正在编辑的试题。"),!0)},xn=function(e){if(!vn()){if(5===e)return Se(!0),void Be(!0);var n,t,i,r,l,a,o,s,c,d,u,p;if(6!==e)pe(!0),H(2===e?{question_type:e,isadd:!0,repeat_answer:!0,choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],question_choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],difficulty:2,standard_answers:[],question_score:"",tag_discipline_ids:[],question_title:"",analysis:""}:{question_type:e,question_choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),standard_answers:[],repeat_answer:!0,difficulty:2,isadd:!0,tag_discipline_ids:[],question_score:"",analysis:"",sub_item_banks:[],question_title:"",is_ordered:!0,use_keywords:!1,use_blank_score:!0,keywords:[],allow_student_debug:!1,submit_rule:1,downcase:!0,no_space:!0});else"course"==Xe.get("pageType")?"course"==Xe.get("updateType")?h.history.push("/problems/newcreate?difficult=".concat(null==w||null===(n=w.exercise)||void 0===n?void 0:n.difficulty,"&sub_discipline_id=").concat(null==w||null===(t=w.exercise)||void 0===t?void 0:t.sub_discipline_id,"&express_id=").concat(null==w||null===(i=w.exercise)||void 0===i?void 0:i.id,"&callback_url=/paperlibrary/add/").concat(null==w||null===(r=w.exercise)||void 0===r?void 0:r.id,"?type=2&pageType=course&updateType=course&courseId=").concat(Xe.get("courseId"),"&stageId=").concat(Xe.get("stageId"))):h.history.push("/problems/newcreate?difficult=".concat(null==w||null===(l=w.exercise)||void 0===l?void 0:l.difficulty,"&sub_discipline_id=").concat(null==w||null===(a=w.exercise)||void 0===a?void 0:a.sub_discipline_id,"&express_id=").concat(null==w||null===(o=w.exercise)||void 0===o?void 0:o.id,"&callback_url=/paperlibrary/add/").concat(null==w||null===(s=w.exercise)||void 0===s?void 0:s.id,"?type=2&pageType=course&courseId=").concat(Xe.get("courseId"),"&stageId=").concat(Xe.get("stageId"))):h.history.push("/problems/newcreate?difficult=".concat(null==w||null===(c=w.exercise)||void 0===c?void 0:c.difficulty,"&sub_discipline_id=").concat(null==w||null===(d=w.exercise)||void 0===d?void 0:d.sub_discipline_id,"&express_id=").concat(null==w||null===(u=w.exercise)||void 0===u?void 0:u.id,"&callback_url=/paperlibrary/add/").concat(null==w||null===(p=w.exercise)||void 0===p?void 0:p.id,"?type=2"))}};return(0,R.jsxs)("div",{children:[(0,R.jsx)(g.Z,{spinning:oe,children:(0,R.jsx)("div",{className:A.bg,children:(0,R.jsxs)("div",{style:{textAlign:"center"},children:[0===(null==w||null===(n=w.exercise_types)||void 0===n?void 0:n.q_counts)&&!ue&&(0,R.jsx)(M.Z,{customText:"还没有试题,从底部操作栏来添加吧~"}),((null==w||null===(t=w.exercise_types)||void 0===t?void 0:t.q_counts)>0||ue)&&(0,R.jsxs)("div",{style:{marginTop:20,borderTop:"1px solid #DCDCDC",display:"block",alignItems:"stretch"},children:[(0,R.jsx)("div",{style:{backgroundColor:"#F6F7F9",display:"inline-block",position:"sticky",top:0},children:(0,R.jsx)(P.Z,{className:A.left,active:!0,loading:L,children:(0,R.jsxs)("div",{className:A.left,children:[(0,R.jsx)("div",{className:A.leftAction,children:(0,R.jsx)(j.ZP,{onClick:function(){vn()||ke(!0)},className:A.Button,children:"批量设置分值"})}),(0,R.jsx)("div",{className:A.scrollWrapper,style:{overflow:pn},onMouseEnter:mn,onMouseLeave:hn,children:null==w||null===(i=w.exercise_question_types)||void 0===i?void 0:i.map((function(e,n){return(0,R.jsxs)("div",{className:"mb30",children:[(0,R.jsxs)("div",{className:A.title,children:[(0,R.jsxs)("div",{className:A.titleleft,children:[(0,R.jsxs)("span",{style:{color:"#000000",fontWeight:400,fontSize:12},children:[" ",(0,E.EM)(n+1),"、【",e.name,"】"]}),(0,R.jsxs)("span",{style:{color:"#464F66",fontSize:12},children:["",e.count,"小题,共",e.score,"分)"]})]}),(0,R.jsx)(I.Z,{dropdownRender:function(){return function(e,n){return(0,R.jsxs)(T.Z,{children:[(0,R.jsx)(T.Z.Item,{onClick:function(){return xn(null==e?void 0:e.question_type)},children:(0,R.jsx)("span",{className:A.moreSpan,children:"新增"})},"0"),(0,R.jsx)(T.Z.Item,{disabled:0===n,onClick:d()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n){e.next=2;break}return e.abrupt("return");case 2:if(!vn()){e.next=4;break}return e.abrupt("return");case 4:return t=(0,E.rz)(null==w?void 0:w.exercise_question_types,n,n-1),e.next=7,fn(t.map((function(e){return e.name})));case 7:case"end":return e.stop()}}),e)}))),children:(0,R.jsx)("span",{className:A.moreSpan,children:"上移"})},"1"),(0,R.jsx)(T.Z.Item,{disabled:n===(null==w?void 0:w.exercise_question_types.length)-1,onClick:d()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n!==(null==w?void 0:w.exercise_question_types.length)-1){e.next=2;break}return e.abrupt("return");case 2:if(!vn()){e.next=4;break}return e.abrupt("return");case 4:return t=(0,E.rz)(null==w?void 0:w.exercise_question_types,n,n+1),e.next=7,fn(t.map((function(e){return e.name})));case 7:case"end":return e.stop()}}),e)}))),children:(0,R.jsx)("span",{className:A.moreSpan,children:"下移"})},"2"),(0,R.jsx)(T.Z.Item,{onClick:function(){var n;We.setFieldsValue({name:e.name,item_type_en:null===(n=Yn.find((function(n){return n.id==e.question_type})))||void 0===n?void 0:n.nameType}),Ue(!0)},children:(0,R.jsx)("span",{className:A.moreSpan,children:"重命名"})},"3")]})}(e,n)},placement:"bottomLeft",children:(0,R.jsx)("div",{className:A.more_style,children:(0,R.jsx)("i",{className:"iconfont icon-sandian font12"})})})]}),(0,R.jsx)(z,{isedit:ue,setBigqitem:re,bigitem:r()(r()({},e),{},{indexs:n+1}),setqitem:function(){var e=d()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=X.current)||void 0===t||t.blur(),H(n);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),qitem:W,Itemid:c,getdata:nn,data:e.items})]},n)}))})]})})}),(0,R.jsx)(P.Z,{className:A.right,active:!0,loading:oe,children:(0,R.jsxs)("div",{id:"question-scroll-id",className:A.right,ref:Ye,children:[!(null!=W&&W.isadd)&&(0,R.jsxs)("div",{className:A.title,children:[!ue&&(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsxs)("span",{style:{color:"#000000",fontWeight:600,fontSize:16},children:[" ",(null==ie?void 0:ie.indexs)&&(0,E.EM)(null==ie?void 0:ie.indexs),"、【",null==ie?void 0:ie.name,"】"]}),(0,R.jsx)(B.Z,{title:"编辑题型名称",children:(0,R.jsx)("i",{className:"".concat(A.edit," iconfont icon-bianji_Hover mr5 ml5 font18"),onClick:function(){var e;We.setFieldsValue({name:ie.name,item_type_en:null===(e=Yn.find((function(e){return e.id==ie.question_type})))||void 0===e?void 0:e.nameType}),Ue(!0)}})}),(0,R.jsxs)("span",{style:{color:"#464F66",fontSize:16,fontWeight:400},children:["",null==ie?void 0:ie.count,"小题,共",null==ie?void 0:ie.score,"分)"]})]}),(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[5===(null==W?void 0:W.question_type)&&!ue&&(0,R.jsxs)("a",{className:A.shixun,href:"/shixuns/".concat(null==W?void 0:W.shixun_identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,R.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]}),!ue&&[0,1,2,4,6].includes(null==W?void 0:W.question_type)&&(0,R.jsx)(f.Z.Item,{label:"分值",style:{margin:"0 20px"},required:!0,children:(0,R.jsx)(b.Z,{precision:1,ref:X,onChange:function(e){return Y(e)},value:U,onBlur:function(e){on(e.target.value,W)}})}),!ue&&(0,R.jsx)(B.Z,{title:"删除",children:(0,R.jsx)("i",{onClick:function(){sn()},style:{marginRight:20},className:"".concat(A.delete," iconfont icon-shanchu13 mr5 ")})}),!ue&&(0,R.jsx)(B.Z,{title:"编辑试题",children:(0,R.jsx)("i",{onClick:function(){var e,n,t;6===(null==W?void 0:W.question_type)?"course"==Xe.get("pageType")?"course"==Xe.get("updateType")?h.history.push("/problems/newedit/".concat(null==W?void 0:W.hack_identifier,"?type=exercises&express_id=").concat(null==w||null===(e=w.exercise)||void 0===e?void 0:e.id,"&question_id=").concat(null==W?void 0:W.question_id,"&score=").concat(null==W?void 0:W.question_score,"&exercise=true&callback_url=").concat(location.pathname,"?type=2&pageType=course&updateType=course&courseId=").concat(Xe.get("courseId"),"&stageId=").concat(Xe.get("stageId"))):h.history.push("/problems/newedit/".concat(null==W?void 0:W.hack_identifier,"?type=exercises&express_id=").concat(null==w||null===(n=w.exercise)||void 0===n?void 0:n.id,"&question_id=").concat(null==W?void 0:W.question_id,"&score=").concat(null==W?void 0:W.question_score,"&exercise=true&callback_url=").concat(location.pathname,"?type=2&pageType=course&courseId=").concat(Xe.get("courseId"),"&stageId=").concat(Xe.get("stageId"))):h.history.push("/problems/newedit/".concat(null==W?void 0:W.hack_identifier,"?type=exercises&express_id=").concat(null==w||null===(t=w.exercise)||void 0===t?void 0:t.id,"&question_id=").concat(null==W?void 0:W.question_id,"&score=").concat(null==W?void 0:W.question_score,"&exercise=true&callback_url=").concat(location.pathname,"$?type=2")):pe(!0)},className:"".concat(A.edit," iconfont icon-bianji_Hover mr5 ")})})]})]}),!ue&&(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:A.qcount,children:[(0,R.jsxs)("span",{className:A.score,children:[null==W?void 0:W.question_score,"分"]}),(0,R.jsx)(F.Z,{className:A.qtitle,value:(null==W?void 0:W.index)+"、"+"".concat(8==(null==W?void 0:W.question_type)?null==W||null===(l=W.program_attr)||void 0===l?void 0:l.description:null==W?void 0:W.question_title)})]}),(0,R.jsx)(yn,{TagDiscipline:fe,qitem:W})]}),ue&&(0,R.jsxs)("div",{children:[(null==W?void 0:W.question_type)<=1&&(0,R.jsx)(J,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e}),5===(null==W?void 0:W.question_type)&&(0,R.jsx)(Re,{setqitem:H,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W}),3===(null==W?void 0:W.question_type)&&(0,R.jsx)($,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e}),2===(null==W?void 0:W.question_type)&&(0,R.jsx)(ne,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e}),4===(null==W?void 0:W.question_type)&&(0,R.jsx)(bn,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e}),7===(null==W?void 0:W.question_type)&&(0,R.jsx)(Le,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e}),8===(null==W?void 0:W.question_type)&&(0,R.jsx)(Fe,{getTagData:Qe,deleteitem:sn,seveeditor:rn,exerciseitem:w,TagDiscipline:fe,setisedit:pe,qitem:W,init:$e})]})]})})]})]})})}),(0,R.jsx)("div",{className:A.bottomdiv,children:(0,R.jsxs)("div",{style:{width:1200,margin:"0px auto",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,R.jsx)("span",{className:A.spanBtn,onClick:function(){vn()||(Se(!0),Be(!1))},children:"题库选题"}),(0,R.jsx)("span",{className:A.spanBtn,onClick:function(){vn()||_e(!0)},children:"导入试题"}),(0,R.jsx)("span",{className:A.spanBtn,onClick:d()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!vn()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,C.JP)(c);case 4:0===(n=e.sent).status&&window.open("/classrooms/coursesId/exercise/".concat(n.exercise_id,"/").concat(null===(t=a.userInfo)||void 0===t?void 0:t.login,"/initate_answer"));case 6:case"end":return e.stop()}}),e)}))),children:"模拟考试"}),(0,R.jsx)("span",{className:A.spanBtn,onClick:function(){vn()||window.open("/paperlibrary/see/".concat(c))},children:"试卷预览"}),null==Yn?void 0:Yn.map((function(e,n){return(0,R.jsx)(j.ZP,{className:A.addQuestionBtn,type:"primary",onClick:function(){xn(e.id)},children:e.name},n)})),(0,R.jsxs)("span",{className:A.saveBtn,onClick:function(){if("course"==Xe.get("pageType"))if("course"==Xe.get("updateType"))x.ZP.info("编辑成功"),h.history.replace("/paths/".concat(Xe.get("courseId")));else{if(vn())return;(0,Un._C)({id:Xe.get("stageId"),subject_id:Xe.get("courseId"),homework_type:"exercise",examination_bank_ids:[c]}).then((function(e){0==(null==e?void 0:e.status)&&(x.ZP.info("创建成功"),h.history.replace("/paths/".concat(Xe.get("courseId"))))}))}else{if(vn())return;x.ZP.info("创建成功"),h.history.push("/paperlibrary?defaultActiveKey=0")}},children:[(0,R.jsx)("i",{className:"iconfont icon-baocun1",style:{fontSize:15,marginRight:5}}),"保存试卷"]})]})}),(0,R.jsx)(jn,{setScoreShow:ke,ScoreShow:je,exerciseitem:w,getdata:$e}),Ze&&(0,R.jsx)(Hn,{setScoreShow:Se,isshixuns:Ie,ScoreShow:Ze,isloadings:qe,onOk:function(){var e=d()(s()().mark((function e(n,t,i,l){var a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Me(!0),a={exam_id:c,item_bank_ids:n,shixun_ids:t},e.next=4,dn(r()(r()({},a),{},{check_only:i}));case 4:if(o=e.sent,Me(!1),0!==(null==o?void 0:o.status)){e.next=14;break}return e.next=9,dn(a);case 9:Se(!1),$e(),x.ZP.info("添加成功"),e.next=15;break;case 14:-4===o.status&&S.Z.confirm({title:"提示",content:"当前已选择".concat(l,"道试题,已加入过的试题将不会重复加入"),onOk:function(){var e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dn(a);case 2:Se(!1),$e(),x.ZP.info("添加成功");case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 15:case"end":return e.stop()}}),e)})));return function(n,t,i,r){return e.apply(this,arguments)}}()}),(0,R.jsx)(_n.Z,{visible:ye,onCancel:function(){return _e(!1)},onOk:an}),(0,R.jsx)(S.Z,{centered:!0,title:"编辑题型名称",open:Ke,width:500,onOk:function(){return We.submit()},onCancel:function(){return Ue(!1)},children:(0,R.jsxs)(f.Z,{form:We,initialValues:{},onFinish:function(){var e=d()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.RK)(r()({id:c},n));case 2:0==e.sent.status&&(x.ZP.success("修改成功"),$e(),Ue(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,R.jsx)(f.Z.Item,{style:{marginBottom:0},name:"name",rules:[{required:!0,message:"请输入题型名称"},{whitespace:!0,message:"请勿输入空格"},{validator:function(e,n){var t,i,r=null==Yn||null===(t=Yn.find((function(e){return e.nameType==We.getFieldValue("item_type_en")})))||void 0===t?void 0:t.id;return null!=w&&null!==(i=w.exercise_question_types)&&void 0!==i&&null!==(i=i.filter((function(e){return e.question_type!=r})))&&void 0!==i&&null!==(i=i.map((function(e){return null==e?void 0:e.name})))&&void 0!==i&&i.includes(n)?Promise.reject(new Error("题型名称已存在,请勿设置相同的题型名称")):Promise.resolve()}}],children:(0,R.jsx)(y.Z,{size:"large",maxLength:10,showCount:!0})}),(0,R.jsx)(f.Z.Item,{hidden:!0,name:"item_type_en",children:(0,R.jsx)(y.Z,{size:"large"})})]})})]})})),Xn=t(40029),Qn=t(57840),$n=function(){var e=(0,m.useState)([]),n=p()(e,2),t=n[0],i=n[1];return(0,m.useEffect)((function(){var e=function(){var e=d()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.d1)({source:"question"});case 2:null!=(n=e.sent)&&n.disciplines&&i((0,N.L)(null==n?void 0:n.disciplines));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),t},et=(0,h.connect)((function(e){return{user:e.user,newExercisePaper:e.newExercisePaper,dispatch:e.dispatch}}))((function(e){e.user;var n,t,i,l,o,c,u=e.newExercisePaper,N=e.dispatch,S=(0,h.useParams)(),T=$n(),P=f.Z.useForm(),I=p()(P,1)[0],B=(0,m.useState)(),A=p()(B,2),E=A[0],q=A[1],M=(0,m.useState)(!1),L=p()(M,2),O=L[0],D=L[1],F=(0,m.useState)(1),z=p()(F,2),G=z[0],W=z[1],H=(0,m.useState)(""),V=p()(H,2),K=V[0],U=V[1],Y=(0,h.useSearchParams)(),J=p()(Y,1)[0],X=(0,m.useState)(!1),Q=p()(X,2),$=Q[0],ee=Q[1];return(0,m.useEffect)((function(){"2"===J.get("type")&&(U(S.id),W(2))}),[J.get("type")]),(0,m.useEffect)((function(){if(S.id){if(!T.length)return;var e=function(){var e=d()(s()().mark((function e(){var n,t,i,l,o,c,d,u,p,m,h,f,v;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(!0),e.next=3,(0,C.Di)({id:S.id});case 3:i=e.sent,D(!1),l=null==i||null===(n=i.exercise)||void 0===n?void 0:n.sub_discipline_id,o=[],c=a()(T);try{for(c.s();!(d=c.n()).done;){u=d.value,p=a()(u.children);try{for(p.s();!(m=p.n()).done;)(h=m.value).value===l&&(o=[u.value,h.value])}catch(e){p.e(e)}finally{p.f()}}}catch(e){c.e(e)}finally{c.f()}f=null==i||null===(t=i.exercise)||void 0===t?void 0:t.time,v=r()(r()({},i.exercise),{},{sub_discipline_id:o,time:-1===f?null:f}),q(v);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}else q({time:60,difficulty:2});N({type:"globalSetting/footerToggle",payload:!1})}),[T]),(0,R.jsx)("div",{style:{background:"#ffffff",marginTop:-8,padding:8,minHeight:"100vh",paddingBottom:64},children:(0,R.jsxs)("section",{className:"edu-container",children:[(0,R.jsx)("section",{className:"animated fadeIn",children:(0,R.jsx)("aside",{style:{marginTop:15},children:(0,R.jsxs)(v.Z,{separator:">",children:[(0,R.jsx)(v.Z.Item,{children:(0,R.jsx)(h.Link,{to:"/paperlibrary",children:"试卷库"})}),(0,R.jsx)(v.Z.Item,{children:"人工组卷"})]})})}),(0,R.jsxs)("div",{className:"bg-white",children:[(0,R.jsxs)("div",{style:{display:"flex",justifyContent:"center",paddingTop:20,alignItems:"center"},children:[(0,R.jsxs)("div",{onClick:function(){$?x.ZP.info("请先保存或取消当前正在编辑的试题。"):W(1)},className:1===G?k.Z.selectdiv:k.Z.divitem,children:[(0,R.jsx)(Xn.Z,{number:1,active:1===G,className:"mr10"}),(0,R.jsx)("span",{children:"试卷基础信息"})]}),(0,R.jsx)("div",{style:{width:188,border:"1px dotted #9096A3",margin:"0px 30px",height:1}}),(0,R.jsxs)("div",{onClick:function(){S.id||K?(W(2),K||U(S.id)):x.ZP.info("请先保存基础信息再新建试题")},className:1!==G?k.Z.selectdiv:k.Z.divitem,children:[(0,R.jsx)(Xn.Z,{number:2,active:1!==G,className:"mr10"}),(0,R.jsx)("span",{children:"编辑试题"})]})]}),2===G&&(0,R.jsxs)("div",{className:"tc",children:[(0,R.jsx)(Qn.Z,{defaultValue:null==u||null===(n=u.editData)||void 0===n||null===(n=n.exercise)||void 0===n?void 0:n.exercise_name,onFinish:function(){var e=d()(s()().mark((function e(n){var t,i,r,l,a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.trim()!==(null==u||null===(t=u.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.exercise_name)){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,(0,C.w0)({id:"".concat(null==u||null===(i=u.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.id),sub_discipline_id:null==u||null===(r=u.editData)||void 0===r||null===(r=r.exercise)||void 0===r?void 0:r.sub_discipline_id,time:"".concat(null==u||null===(l=u.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.time),exercise_name:n,exercise_description:null==u||null===(a=u.editData)||void 0===a||null===(a=a.exercise)||void 0===a?void 0:a.exercise_description,difficulty:null==u||null===(o=u.editData)||void 0===o||null===(o=o.exercise)||void 0===o?void 0:o.difficulty});case 4:if(0!==e.sent.status){e.next=9;break}return I.setFieldValue("exercise_name",n),N({type:"newExercisePaper/modifyTitle",payload:n}),e.abrupt("return",!0);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),(0,R.jsxs)("div",{style:{fontSize:14},children:[(0,R.jsxs)("span",{style:{color:"#5F6368"},children:["答题时长",(0,R.jsx)("span",{style:{color:"#000000",marginLeft:8},children:null==u||null===(t=u.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.time})]}),(0,R.jsxs)("span",{style:{margin:"0px 30px",color:"#5F6368"},children:["难度",(0,R.jsx)("span",{style:{color:"#000000",marginLeft:8},children:1===(null==u||null===(i=u.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.difficulty)?"简单":2===(null==u||null===(l=u.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.difficulty)?"适中":"困难"})]}),(0,R.jsxs)("span",{style:{marginRight:30,color:"#5F6368"},children:["试题总数",(0,R.jsx)("span",{style:{color:"#000000",marginLeft:8},children:(null==u||null===(o=u.editData)||void 0===o||null===(o=o.exercise_types)||void 0===o?void 0:o.q_counts)||0})]}),(0,R.jsxs)("span",{style:{color:"#5F6368"},children:["总分",(0,R.jsx)("span",{style:{color:"#000000",marginLeft:8},children:null==u||null===(c=u.editData)||void 0===c||null===(c=c.exercise_types)||void 0===c?void 0:c.q_scores})]})]})]})]}),1===G&&(0,R.jsxs)(g.Z,{spinning:O,size:"middle",style:{position:"fixed",maxHeight:"100vh"},className:"mt30",children:[(0,R.jsx)("section",{className:[k.Z.bg,"mt20"].join(" "),style:{padding:"30px 120px 300px 120px"},children:E&&(0,R.jsxs)(f.Z,{layout:"horizontal",form:I,colon:!1,labelCol:{span:4},wrapperCol:{span:20},className:k.Z.formWrap,initialValues:E,children:[(0,R.jsx)(f.Z.Item,{name:"exercise_name",label:"试卷名称",className:k.Z.baseLineHeight,rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入试卷名称")}}],children:(0,R.jsx)(y.Z,{maxLength:60,className:k.Z.baseFormItem,placeholder:"请输入试卷名称",showCount:!0})}),(0,R.jsx)(f.Z.Item,{label:"方向&课程",name:"sub_discipline_id",className:k.Z.baseLineHeight,rules:[{required:!0,message:"请选择方向&课程"}],children:(0,R.jsx)(_.Z,{className:k.Z.baseFormItem,allowClear:!1,placeholder:"请选择方向&课程",options:T,popupClassName:k.Z.cascaderPopup,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})}),(0,R.jsx)(f.Z.Item,{label:"难度",name:"difficulty",className:k.Z.radioBtnWrapper,rules:[{required:!0,message:"请选择难度"}],children:(0,R.jsxs)(w.ZP.Group,{className:k.Z.radiogroup,children:[(0,R.jsx)(w.ZP.Button,{className:k.Z.easy,value:1,children:"简单"}),(0,R.jsx)(w.ZP.Button,{className:k.Z.medium,value:2,children:"适中"}),(0,R.jsx)(w.ZP.Button,{className:k.Z.hard,value:3,children:"困难"})]})}),(0,R.jsx)(f.Z.Item,{label:"答题时长",className:k.Z.baseLineHeight,children:(0,R.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,R.jsx)(f.Z.Item,{name:"time",noStyle:!0,children:(0,R.jsx)(b.Z,{min:1,className:k.Z.baseFormItem,max:9999,style:{width:220},maxLength:60,placeholder:"请填写答题时长"})}),(0,R.jsx)("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14},children:"分钟"})]})}),(0,R.jsx)(f.Z.Item,{label:"试卷须知",name:"exercise_description",children:(0,R.jsx)(y.Z.TextArea,{rows:6,maxLength:65535,placeholder:"请在此输入本次试卷答题的相关说明最大限制65535个字符"})})]})}),(0,R.jsxs)("div",{className:k.Z.bottmodiv,children:[(0,R.jsx)(j.ZP,{className:"".concat(k.Z.cancelBtn," mr5"),type:"primary",onClick:function(){"course"==J.get("pageType")?h.history.push("/paths/".concat(J.get("courseId"))):h.history.push("/paperlibrary")},children:"取消"}),(0,R.jsx)(Z.Z,{className:"".concat(k.Z.confirmBtn," ml15"),type:"primary",onClick:d()(s()().mark((function e(){var n,t,i,l,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I.validateFields();case 2:if((n=I.getFieldsValue()).sub_discipline_id=n.sub_discipline_id[1],!S.id){e.next=10;break}return e.next=7,(0,C.w0)(r()({id:S.id},n));case 7:return 0===e.sent.status&&(U(S.id),W(2),h.history.replace("/paperlibrary/add/".concat(S.id,"?type=2"))),e.abrupt("return");case 10:return e.next=12,(0,C.un)(n);case 12:0===(t=e.sent).status&&(U(null==t||null===(i=t.data)||void 0===i?void 0:i.exam_id),W(2),"course"==J.get("pageType")?h.history.replace("/paperlibrary/add/".concat(null==t||null===(l=t.data)||void 0===l?void 0:l.exam_id,"?type=2&pageType=course&courseId=").concat(J.get("courseId"),"&stageId=").concat(J.get("stageId"))):h.history.replace("/paperlibrary/add/".concat(null==t||null===(a=t.data)||void 0===a?void 0:a.exam_id,"?type=2")));case 14:case"end":return e.stop()}}),e)}))),children:"下一步"})]})]}),2===G&&(0,R.jsx)("div",{children:(0,R.jsx)(Jn,{setisedits:ee,itemid:K})})]})})}))},18122:function(e,n,t){"use strict";t.d(n,{I:function(){return a}});var i=t(79800),r=t.n(i),l=t(59301),a=function(){var e=(0,l.useState)("hidden"),n=r()(e,2),t=n[0],i=n[1];return{overflow:t,handleMouseEnter:function(){return i("auto")},handleMouseLeave:function(){return i("hidden")}}}},28288: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,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},4505: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,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},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"}},89293:function(e,n){"use strict";n.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD"}},66104:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var i=t(92310),r=t.n(i),l=t(47783),a=t(90339),o=t(59301),s=t(92343),c=t(36355),d=t(8876),u=t(91857);const p=e=>{let{children:n}=e;const{getPrefixCls:t}=o.useContext(c.E_),i=t("breadcrumb");return o.createElement("li",{className:`${i}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};p.__ANT_BREADCRUMB_SEPARATOR=!0;var m=p,h=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};function f(e,n,t,i){if(null==t)return null;const{className:l,onClick:s}=n,c=h(n,["className","onClick"]),d=Object.assign(Object.assign({},(0,a.Z)(c,{data:!0,aria:!0})),{onClick:s});return void 0!==i?o.createElement("a",Object.assign({},d,{className:r()(`${e}-link`,l),href:i}),t):o.createElement("span",Object.assign({},d,{className:r()(`${e}-link`,l)}),t)}function v(e,n){return(t,i,r,l,a)=>{if(n)return n(t,i,r,l);const o=function(e,n){if(void 0===e.title||null===e.title)return null;const t=Object.keys(n).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${t})`,"g"),((e,t)=>n[t]||e))}(t,i);return f(e,t,o,a)}}var x=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};const g=e=>{const{prefixCls:n,separator:t="/",children:i,menu:r,overlay:l,dropdownProps:a,href:s}=e;const c=(e=>{if(r||l){const t=Object.assign({},a);if(r){const e=r||{},{items:n}=e,i=x(e,["items"]);t.menu=Object.assign(Object.assign({},i),{items:null==n?void 0:n.map(((e,n)=>{var{key:t,title:i,label:r,path:l}=e,a=x(e,["key","title","label","path"]);let c=null!=r?r:i;return l&&(c=o.createElement("a",{href:`${s}${l}`},c)),Object.assign(Object.assign({},a),{key:null!=t?t:n,label:c})}))})}else l&&(t.overlay=l);return o.createElement(u.Z,Object.assign({placement:"bottom"},t),o.createElement("span",{className:`${n}-overlay-link`},e,o.createElement(d.Z,null)))}return e})(i);return null!=c?o.createElement(o.Fragment,null,o.createElement("li",null,c),t&&o.createElement(m,null,t)):null},y=e=>{const{prefixCls:n,children:t,href:i}=e,r=x(e,["prefixCls","children","href"]),{getPrefixCls:l}=o.useContext(c.E_),a=l("breadcrumb",n);return o.createElement(g,Object.assign({},r,{prefixCls:a}),f(a,r,t,i))};y.__ANT_BREADCRUMB_ITEM=!0;var _=y,w=t(17313),b=t(83116),j=t(37613);const k=e=>{const{componentCls:n,iconCls:t}=e;return{[n]:Object.assign(Object.assign({},(0,w.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[t]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,w.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${n}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${n}-link`]:{[`\n > ${t} + span,\n > ${t} + a\n `]:{marginInlineStart:e.marginXXS}},[`${n}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${t}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var C=(0,b.Z)("Breadcrumb",(e=>{const n=(0,j.TS)(e,{});return[k(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),N=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};function Z(e){const{breadcrumbName:n,children:t}=e,i=N(e,["breadcrumbName","children"]),r=Object.assign({title:n},i);return t&&(r.menu={items:t.map((e=>{var{breadcrumbName:n}=e,t=N(e,["breadcrumbName"]);return Object.assign(Object.assign({},t),{title:n})}))}),r}var S=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};const T=e=>{const{prefixCls:n,separator:t="/",style:i,className:d,rootClassName:u,routes:p,items:h,children:f,itemRender:x,params:y={}}=e,_=S(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:w,direction:b,breadcrumb:j}=o.useContext(c.E_);let k;const N=w("breadcrumb",n),[T,P]=C(N),I=function(e,n){return(0,o.useMemo)((()=>e||(n?n.map(Z):null)),[e,n])}(h,p);const B=v(N,x);if(I&&I.length>0){const e=[],n=h||p;k=I.map(((i,r)=>{const{path:l,key:s,type:c,menu:d,overlay:u,onClick:p,className:h,separator:f,dropdownProps:v}=i,x=((e,n)=>{if(void 0===n)return n;let t=(n||"").replace(/^\//,"");return Object.keys(e).forEach((n=>{t=t.replace(`:${n}`,e[n])})),t})(y,l);void 0!==x&&e.push(x);const _=null!=s?s:r;if("separator"===c)return o.createElement(m,{key:_},f);const w={},b=r===I.length-1;d?w.menu=d:u&&(w.overlay=u);let{href:j}=i;return e.length&&void 0!==x&&(j=`#/${e.join("/")}`),o.createElement(g,Object.assign({key:_},w,(0,a.Z)(i,{data:!0,aria:!0}),{className:h,dropdownProps:v,href:j,separator:b?"":t,onClick:p,prefixCls:N}),B(i,y,n,e,j))}))}else if(f){const e=(0,l.Z)(f).length;k=(0,l.Z)(f).map(((n,i)=>{if(!n)return n;const r=i===e-1;return(0,s.Tm)(n,{separator:r?"":t,key:i})}))}const A=r()(N,null==j?void 0:j.className,{[`${N}-rtl`]:"rtl"===b},d,u,P),E=Object.assign(Object.assign({},null==j?void 0:j.style),i);return T(o.createElement("nav",Object.assign({className:A,style:E},_),o.createElement("ol",null,k)))};T.Item=_,T.Separator=m;var P=T},25769:function(e,n,t){"use strict";var i=t(98040),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,l,a,o,s,c,d=!1;n||(n={}),t=n.debug||!1;try{if(a=i(),o=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(i){if(i.stopPropagation(),n.format)if(i.preventDefault(),void 0===i.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=r[n.format]||r.default;window.clipboardData.setData(l,e)}else i.clipboardData.clearData(),i.clipboardData.setData(n.format,e);n.onCopy&&(i.preventDefault(),n.onCopy(i.clipboardData))})),document.body.appendChild(c),o.selectNodeContents(c),s.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(i){t&&console.error("unable to copy using execCommand: ",i),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),d=!0}catch(i){t&&console.error("unable to copy using clipboardData: ",i),t&&console.error("falling back to prompt"),l=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(l,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(o):s.removeAllRanges()),c&&document.body.removeChild(c),a()}return d}},83145:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=l(t(59301)),r=l(t(25769));function l(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function s(e,n){if(null==e)return{};var t,i,r=function(e,n){if(null==e)return{};var t,i,r={},l=Object.keys(e);for(i=0;i<l.length;i++)t=l[i],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)t=l[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function c(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function d(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function u(e,n){return!n||"object"!==a(n)&&"function"!=typeof n?m(e):n}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,n){return h=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},h(e,n)}function f(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var v=function(e){function n(){var e,t;c(this,n);for(var l=arguments.length,a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];return f(m(t=u(this,(e=p(n)).call.apply(e,[this].concat(a)))),"onClick",(function(e){var n=t.props,l=n.text,a=n.onCopy,o=n.children,s=n.options,c=i.default.Children.only(o),d=(0,r.default)(l,s);a&&a(l,d),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(e)})),t}var t,l,a;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&h(e,n)}(n,e),t=n,l=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=s(e,["text","onCopy","options","children"]),r=i.default.Children.only(n);return i.default.cloneElement(r,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(t,!0).forEach((function(n){f(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(t).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},t,{onClick:this.onClick}))}}],l&&d(t.prototype,l),a&&d(t,a),n}(i.default.PureComponent);n.CopyToClipboard=v,f(v,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(e,n,t){"use strict";var i=t(83145).CopyToClipboard;i.CopyToClipboard=i,e.exports=i},98040:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],i=0;i<e.rangeCount;i++)t.push(e.getRangeAt(i));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},93314:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0B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