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.
1 line
51 KiB
1 line
51 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[65148],{75742:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(4751),l=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},i=n(68475),a=function(e,t){return l.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:r}))};var s=l.forwardRef(a)},89136:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(4751),l=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},i=n(68475),a=function(e,t){return l.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:r}))};var s=l.forwardRef(a)},28396:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(4751),l=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},i=n(68475),a=function(e,t){return l.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:r}))};var s=l.forwardRef(a)},38391:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(4751),l=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},i=n(68475),a=function(e,t){return l.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:r}))};var s=l.forwardRef(a)},90921:function(e,t,n){var o=n(82242),l=n.n(o),r=(n(59301),n(93314)),i=n(3113),a=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,o=void 0===n?{}:n,s=e.styles,c=void 0===s?{}:s,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,v=e.ButtonTwo,h=e.imgStyles,m=e.loading,g=void 0!==m&&m;return(0,a.jsxs)("section",{className:"tc animated fadeIn",style:l()(l()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),c),children:[(0,a.jsx)("img",{src:t||r,style:l()(l()({},h),{},{pointerEvents:"none",userSelect:"none"})}),(0,a.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,a.jsx)(i.ZP,l()(l()({className:f,onClick:p},o),{},{children:d})),v&&v]})}},59472:function(e,t,n){n.d(t,{Z:function(){return j}});var o=n(82242),l=n.n(o),r=n(7557),i=n.n(r),a=n(41498),s=n.n(a),c=n(79800),u=n.n(c),d=n(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=n(3113),v=n(74516),h=n(17968),m=n(6848),g=n(26795),_=n(44239),x=n(90921),b=n(17985),w=n(13405),y=n(37712),j=function(e){var t,n,o,r,a,c,j=e.editOffice,C=void 0===j?"view":j,S=e.data,k=(e.theme,e.type),E=e.filename,Z=e.monacoEditor,O=e.className,N=e.style,q=e.close,I=e.onClose,P=e.hasMask,T=e.disabledDownload,$=e.onImgDimensions,M=e.showNodata,R=e.recordInfo,z=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),A=u()(z,2),L=(A[0],A[1],(0,d.useState)("")),D=u()(L,2),B=(D[0],D[1]),H=(0,d.useState)(),W=u()(H,2),V=W[0],F=W[1],G="build"===window.ENV?"/react/build":"",U=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,J=(0,d.useRef)();null!==(t=S)&&void 0!==t&&t.startsWith("/api")&&"txt"!==k&&(S=b.Z.API_SERVER+S);E&&(Z.filename=E),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&B(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===k&&(S.indexOf("bigfilescdn.")>-1||S.indexOf("bigfiles1")>-1?F({url:S,fileType:(e=S,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:S.indexOf("model=edit")?"edit":"view"}):X())}),[k,S]);var X=function(){var e=s()(i()().mark((function e(){var t,n,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",S),t=S,S.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,_.gJ)({attachment_id:n});case 6:(o=e.sent).url=U+o.url,F(o);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){S.startsWith("http")||S.startsWith("blob:")?Q():(0,g.Sv)(E||"educoder",S,E)},Q=function(){R&&(0,w.fc)({id:null==R?void 0:R.id,watch_type:1,course_id:null==R?void 0:R.course_id}),(0,g.Nd)(E||"educoder",decodeURIComponent(S))};return(0,y.jsxs)("div",{style:l()({},N||{}),className:"".concat(P&&p.bgBlack," ").concat(k?p.wrp:"hide"),children:[q&&(0,y.jsxs)("div",{className:p.close,ref:J,children:[!!$&&(0,y.jsx)(m.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{onClick:function(){I(),$()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!T&&(0,y.jsx)(m.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{onClick:Q,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(m.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{className:"",onClick:I,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[O]," ").concat(O," ").concat(p.monaco," ").concat("txt"===k?"show":"hide"),children:"txt"===k&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.ZP,l()({},Z))})}),"audio"===k&&(0,y.jsx)("audio",{src:"".concat((null===(n=S)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(o=S)||void 0===o?void 0:o.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(S),autoPlay:!0}),"video"===k&&(0,y.jsx)(y.Fragment,{children:(null===(r=S)||void 0===r?void 0:r.indexOf("http"))>-1?(0,y.jsx)("video",{controls:!0,src:"".concat(S),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})}),"office"===k&&V&&(0,y.jsx)("iframe",{src:"".concat(G,"/office.html?key=").concat(V.key,"&url=").concat(btoa(V.url),"&callbackUrl=").concat(U+V.callbackUrl,"&fileType=").concat(V.fileType,"&title=").concat(V.title,"&model=").concat(C,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!T)}),"html"===k&&(0,y.jsx)("iframe",{src:S+"&disposition=inline"}),"pdf"===k&&(0,y.jsx)("iframe",{src:"".concat(G,"/js/pdfview/index.html?url=").concat(encodeURIComponent(S),"&disabledDownload=").concat(!!T)}),"image"===k&&(0,y.jsx)("img",{src:"".concat((null===(a=S)||void 0===a?void 0:a.indexOf("http://"))>-1||(null===(c=S)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(S)}),("other"===k||"download"===k)&&(0,y.jsx)(y.Fragment,{children:M?(0,y.jsx)(x.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(f.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Y,children:"下载"})}):(0,y.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:Y,children:[(0,y.jsx)(v.Z,{}),"点击下载"]})})]})}},90277:function(e,t,n){n.d(t,{z:function(){return y}});var o=n(82242),l=n.n(o),r=n(37205),i=n.n(r),a=n(91232),s=n.n(a),c=n(79800),u=n.n(c),d=n(59301),p=(n(92436),n(44728)),f=(n(64018),n(77373)),v=n(17985),h=n(26795),m=n(15342),g=n(1012),_=n(59472),x=n(37712),b="@▁@",w=/<pre[^>]*>/g;var y=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,o,l,r,i){var a=t||o||r,s=n||l||i||"?";return v.Z.API_SERVER+"/api/attachments/"+a+s+"&t="+(0,h.Jn)(a,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(n,(function(e,t,n,o,l,r,i){var a=t||o||r,s=n||l||i||"?";return v.Z.API_SERVER+"/api/attachments/"+a+s+"&t="+(0,h.Jn)(a,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,o,l){var r=t||o,i=n||l||"";return'"'+v.Z.API_SERVER+"/api/attachments/"+r+i+r+i+"&t="+(0,h.Jn)(r,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,o,l){var r=t||o,i=n||l||"";return"("+v.Z.API_SERVER+"/files/uploads/"+r+i+r+i+"&t="+(0,h.Jn)(r,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")};t.Z=function(e){var t=e.value,n=void 0===t?"":t,o=e.className,r=e.showTextOnly,a=e.showLines,c=e.style,h=void 0===c?{}:c,y=e.stylesPrev,j=void 0===y?{}:y,C=e.highlightKeywords,S=e.showProgramFill,k=(e.isProgramFill,e.disabledFill),E=void 0!==k&&k,Z=e.programFillValue,O=e.onFillChange,N=void 0===O?function(e){}:O,q=e.onFillBlur,I=void 0===q?function(){}:q,P=String(n),T=(0,d.useState)(""),$=u()(T,2),M=$[0],R=$[1],z=(0,d.useState)("office"),A=u()(z,2),L=A[0],D=A[1],B=(0,d.useState)([]),H=u()(B,2),W=H[0],V=H[1],F=(0,d.useRef)("a"+(0,g.Z)()),G={};var U=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),o=[];return n.map((function(e){""!=e&&o.push(".".concat(F.current," ").concat(e))})),"<style>".concat(o.join("}"),"</style>")}))},J=(0,d.useMemo)((function(){try{P=P.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+v.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+v.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+v.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(S){var e=-1;return P=P.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,(function(t,n,o){var l;return function(e,t,n){var o=document.createElement(e===b?"input":"textarea");o.style.width="100%",o.style.height=e===b?"40px":"151px",o.rows=5,o.spellcheck=!1,o.name="edu-program-fill",o.placeholder="请输入",o.dataset.id=t;var l=Object.keys(G).length;return G[l]=o,'<span class="edu-program-fill-wrap '.concat(e===b?"":"show",'" style="width:').concat(e===b?"400px":"100%",'" title=').concat(n||"","><span>").concat(o.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==Z||null===(l=Z[e])||void 0===l?void 0:l.value)})),'<pre style="background:#fff;padding:4px">'.concat(U(P||""),"</pre>")}var t=U(P);t=(0,p.ZP)(t);var n=(0,p.ez)();P.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,p.Qv)()),(0,p.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var o=n[t],l=o.type,r=o.expression;return(0,m.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(r)||"",{displayMode:"block"===l,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var o=document.createElement("div");return o.innerHTML=t,r?o.innerText:C?(Q(o,C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o.innerHTML):(setTimeout((function(){return te()}),500),o.innerHTML)}),[P,C]);(0,d.useEffect)((function(){K.current&&K.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=X,e.onblur=Y}))}),[W]),(0,d.useEffect)((function(){if(null!=Z&&Z.length)try{var e,t=K.current.querySelectorAll(".edu-program-fill-score"),n=K.current.querySelectorAll('[name="edu-program-fill"]'),o=s()(n.entries());try{for(o.s();!(e=o.n()).done;){var l,r,i,a=u()(e.value,2),c=a[0],d=a[1];d.value=(null==Z||null===(l=Z[c])||void 0===l?void 0:l.value)||"","warning"===(null==Z||null===(r=Z[c])||void 0===r?void 0:r.type)?d.className="program-fill-warning":"success"===(null==Z||null===(i=Z[c])||void 0===i?void 0:i.type)?d.className="program-fill-success":d.className=""}}catch(e){o.e(e)}finally{o.f()}var p,f=s()(t.entries());try{for(f.s();!(p=f.n()).done;){var v,h,m=u()(p.value,2),g=m[0];m[1].innerHTML=null!=Z&&null!==(v=Z[g])&&void 0!==v&&v.score?"".concat(null==Z||null===(h=Z[g])||void 0===h?void 0:h.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}V(Z)}catch(e){console.log(e,"error")}}),[Z]);var X=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,V(i()(W)),N(W,e.target.dataset.id)},Y=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,V(i()(W)),I(W,e.target.dataset.id)};function Q(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)Q(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var o=document.createElement("span");o.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(o)}}))}var K=(0,d.useRef)();function ee(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),R(n),D("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),R(n),D("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),R(n),D("html");else if(n.startsWith("#")){e.preventDefault();var o=document.getElementById(n.replace("#",""));o&&o.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=a,a&&(h=l()(l()({},h),p.jb));var te=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var t=new f.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(K.current&&J&&J.match(w)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",ee),function(){var e;null===(e=K.current)||void 0===e||e.removeEventListener("click",ee),(0,p.AL)(),(0,p.Iy)()}}),[J,K.current,ee]),(0,x.jsxs)(x.Fragment,{children:[r&&(0,x.jsx)("div",{ref:K,children:J}),!r&&(0,x.jsx)("div",{ref:K,style:l()({},h),className:"".concat(o||""," ").concat(E?"disabled-fill":""," markdown-body ").concat(F.current),dangerouslySetInnerHTML:{__html:J}}),(0,x.jsx)(_.Z,{close:!0,data:M,type:null!=M&&M.length?L:"",style:l()({},j),onClose:function(){return R("")}})]})}},63846:function(e,t,n){n.r(t),n.d(t,{checkedOtherName:function(){return D},default:function(){return H}});var o=n(37205),l=n.n(o),r=n(7557),i=n.n(r),a=n(82242),s=n.n(a),c=n(41498),u=n.n(c),d=n(79800),p=n.n(d),f=n(39647),v=n.n(f),h=n(59301),m=n(65233),g=n(20834),_=n(44e3),x=n(43418),b=n(8591),w=n(95237),y=n(43604),j=n(93948),C=n(79817),S=n(6848),k={flex_box_center:"flex_box_center___iNvBA",flex_space_between:"flex_space_between___btrNY",flex_box_vertical_center:"flex_box_vertical_center___jNwqd",flex_box_center_end:"flex_box_center_end___yhhzS",flex_box_column:"flex_box_column___XCG9Z",bg:"bg___pkT5R",title:"title___txwwg",questionIcons:"questionIcons___bUmrp",green:"green___pU_n6",orange:"orange___WqPTj",greenTip:"greenTip___xA46L",redTip:"redTip___cLZrd",orangeTip:"orangeTip___IYw_9",pollDesc:"pollDesc___k8j8U",answered:"answered___Wv6LV",unanswer:"unanswer___HFr5V",anchor:"anchor___wiaGO",answerFlag:"answerFlag___Son3q",answerActive:"answerActive___vadIk",redactivie:"redactivie___lv5Yx",questionItem:"questionItem___eheF5",answerWrap:"answerWrap___q0vMa",answerSubjective:"answerSubjective___g0GxR",otherInput:"otherInput___lNi1t",submitButton:"submitButton___Kwl_S",flexRow:"flexRow___CzS9_",header_style:"header_style___IO875",header_content:"header_content___rvYNy",header_title:"header_title___vaUUE",header_button:"header_button___pO_DR",answerInfo:"answerInfo___pUCTt",answerProgress:"answerProgress___u6eCf",dottedLineWrapper:"dottedLineWrapper___OntUi",leftHalfCircle:"leftHalfCircle___W0Nay",dottedLine:"dottedLine___KvX72",rightHalfCircle:"rightHalfCircle___NshfJ",answerSheetWrap:"answerSheetWrap___slZzY",answerSheetQuestionTitle:"answerSheetQuestionTitle___VK50d",user_info:"user_info___nyGwf",user_label:"user_label___bAPw8",user_value:"user_value___pZ4rK"},E=n(26795),Z=n(71202),O=n(33287),N=n(5112),q=n(98135),I=n(37712),P=function(e){var t,n,o,l,r=e.itemData,i=e.answerData,a=e.onSave,s=void 0===a?function(){}:a,c=(0,h.useState)([]),u=p()(c,2),d=u[0],f=u[1],v=(0,h.useState)(),m=p()(v,2),g=m[0],_=m[1],x=(0,h.useState)(),b=p()(x,2),w=b[0],y=b[1];(0,h.useEffect)((function(){var e;f((null==r||null===(e=r.question)||void 0===e?void 0:e.answers)||[])}),[null==r||null===(t=r.question)||void 0===t?void 0:t.answers]),(0,h.useEffect)((function(){var e;_(null==r||null===(e=r.question)||void 0===e||null===(e=e.poll_answer_ids)||void 0===e?void 0:e[0])}),[null==r||null===(n=r.question)||void 0===n?void 0:n.poll_answer_ids]),(0,h.useEffect)((function(){var e;y(null==r||null===(e=r.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==r||null===(o=r.question)||void 0===o?void 0:o.poll_vote_texts]);return(0,I.jsx)(N.ZP.Group,{disabled:(0,O.GJ)()||(0,O.dE)()&&1===(null==i||null===(l=i.poll)||void 0===l?void 0:l.user_poll_status),value:g,onChange:function(e){var t;!function(e,t){var n;_(e);var o=null===(n=d.find((function(e){return D(e.answer_text)})))||void 0===n?void 0:n.answer_id;s(t,e,e===o?w:"")}(e.target.value,null==r||null===(t=r.question)||void 0===t?void 0:t.id)},children:d.map((function(e,t){return(0,I.jsxs)("div",{className:"".concat(k.answerWrap," ").concat(k.flexRow),children:[(0,I.jsx)(N.ZP,{value:null==e?void 0:e.answer_id,children:null==e?void 0:e.answer_text}),D(null==e?void 0:e.answer_text)&&(0,I.jsx)("div",{style:{marginTop:"10px"},children:(0,I.jsx)(q.Z.TextArea,{className:k.otherInput,value:w,onChange:function(e){return y(e.target.value)},onBlur:function(e){var t;return function(e){var t;if(g){var n=null===(t=d.find((function(e){return D(e.answer_text)})))||void 0===t?void 0:t.answer_id;s(e,g,g===n?w:"")}}(null==r||null===(t=r.question)||void 0===t?void 0:t.id)}})})]},t)}))})},T=n(24905),$=function(e){var t,n,o,l,r=e.itemData,i=e.answerData,a=e.onSave,s=void 0===a?function(){}:a,c=(0,h.useState)([]),u=p()(c,2),d=u[0],f=u[1],v=(0,h.useState)(),m=p()(v,2),g=m[0],_=m[1],x=(0,h.useState)(),b=p()(x,2),w=b[0],y=b[1];(0,h.useEffect)((function(){var e;f((null==r||null===(e=r.question)||void 0===e?void 0:e.answers)||[])}),[null==r||null===(t=r.question)||void 0===t?void 0:t.answers]),(0,h.useEffect)((function(){var e;_(null==r||null===(e=r.question)||void 0===e?void 0:e.poll_answer_ids)}),[null==r||null===(n=r.question)||void 0===n?void 0:n.poll_answer_ids]),(0,h.useEffect)((function(){var e;y(null==r||null===(e=r.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==r||null===(o=r.question)||void 0===o?void 0:o.poll_vote_texts]);return(0,I.jsx)(T.Z.Group,{style:{display:"block"},disabled:(0,O.GJ)()||(0,O.dE)()&&1===(null==i||null===(l=i.poll)||void 0===l?void 0:l.user_poll_status),value:g,onChange:function(e){var t;!function(e,t){var n;_(e);var o=null===(n=d.find((function(e){return D(e.answer_text)})))||void 0===n?void 0:n.answer_id;e.includes(o)?s(t,e,w):s(t,e,"")}(e,null==r||null===(t=r.question)||void 0===t?void 0:t.id)},children:null==d?void 0:d.map((function(e,t){return(0,I.jsxs)("div",{className:"".concat(k.answerWrap," ").concat(k.flexRow),children:[(0,I.jsx)(T.Z,{value:null==e?void 0:e.answer_id,children:null==e?void 0:e.answer_text}),D(null==e?void 0:e.answer_text)&&(0,I.jsx)("div",{style:{marginTop:"10px"},children:(0,I.jsx)(q.Z.TextArea,{className:k.otherInput,value:w,onChange:function(e){return y(e.target.value)},onBlur:function(e){var t;return function(e){var t;if(null!=g&&g.length){var n=null===(t=d.find((function(e){return D(e.answer_text)})))||void 0===t?void 0:t.answer_id;g.includes(n)?s(e,g,w):s(e,g,"")}}(null==r||null===(t=r.question)||void 0===t?void 0:t.id)}})})]})}))})},M=function(e){var t,n,o=e.itemData,l=e.answerData,r=e.onSave,i=void 0===r?function(){}:r,a=(0,h.useState)(),s=p()(a,2),c=s[0],u=s[1];return(0,h.useEffect)((function(){var e;u(null==o||null===(e=o.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==o||null===(t=o.question)||void 0===t?void 0:t.poll_vote_texts]),(0,I.jsx)("div",{children:(0,I.jsx)("textarea",{className:k.answerSubjective,placeholder:"在此填入答案",disabled:(0,O.GJ)()||(0,O.dE)()&&1===(null==l||null===(n=l.poll)||void 0===n?void 0:n.user_poll_status),value:c,onChange:function(e){return u(e.target.value)},onBlur:function(e){var t;return i(null==o||null===(t=o.question)||void 0===t?void 0:t.id,null,c)}})})},R=n(90277),z=n(28396),A=n(38391),L=["globalSetting","loading","user","dispatch"],D=(g.Z.SubMenu,_.Z.Content,_.Z.Sider,function(e){return"其他"===e||"其它"===e}),B={1:"单选",2:"多选",3:"问答"},H=(0,m.connect)((function(e){var t=e.loading,n=e.user;return{globalSetting:e.globalSetting,user:n,loading:t.effects}}))((function(e){e.globalSetting,e.loading,e.user;var t,n,o,r,a,c,d,f,g,_,N,q,T,D=e.dispatch,H=(v()(e,L),(0,m.useParams)()),W=(0,h.useState)({}),V=p()(W,2),F=V[0],G=V[1],U=(0,h.useState)(!1),J=p()(U,2),X=J[0],Y=J[1],Q=(0,h.useState)([{id:1,name:"单选题",open:!0},{id:2,name:"多选题",open:!0},{id:3,name:"问答题",open:!0}]),K=p()(Q,2),ee=K[0],te=K[1];(0,h.useEffect)((function(){ne()}),[H.categoryId]),(0,h.useEffect)((function(){return D({type:"globalSetting/headerToggle",payload:!1}),D({type:"globalSetting/footerToggle",payload:!1}),function(){D({type:"globalSetting/headerToggle",payload:!0}),D({type:"globalSetting/footerToggle",payload:!0})}}),[]);var ne=function(){var e=u()(i()().mark((function e(){var t,n,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.i7)(s()({},H));case 2:(t=e.sent)&&(G(t),te([{id:1,name:"单选题",open:!0,countSize:null==t||null===(n=t.question_types)||void 0===n?void 0:n.q_singles},{id:2,name:"多选题",open:!0,countSize:null==t||null===(o=t.question_types)||void 0===o?void 0:o.q_doubles},{id:3,name:"问答题",open:!0,countSize:null==t||null===(l=t.question_types)||void 0===l?void 0:l.q_mains}]));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=u()(i()().mark((function e(t,n,o){var l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return console.error("handleSave no questionId params"),e.abrupt("return");case 3:return e.next=5,(0,Z.ID)({questionId:t,poll_answer_id:n,vote_text:o});case 5:null!=(l=e.sent)&&l.poll_vote&&(F.question_answered.find((function(e){return e.ques_id===t})).ques_status=l.poll_vote.question_status,G(s()({},F)));case 7:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),le=function(){var e=u()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.Ns)({categoryId:H.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(b.ZP.success(null==t?void 0:t.message),m.history.push("/classrooms/".concat(H.coursesId,"/poll/").concat(H.categoryId,"/detail?tabs=0")));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,I.jsxs)("div",{children:[(0,I.jsxs)("section",{className:"edu-container",children:[(0,I.jsx)("div",{style:{height:"64px"}}),(0,I.jsx)("section",{className:"animated fadeIn",children:(null==F||null===(t=F.poll)||void 0===t?void 0:t.polls_description)&&(0,I.jsx)(R.Z,{className:k.pollDesc,value:null==F||null===(n=F.poll)||void 0===n?void 0:n.polls_description})}),(0,I.jsxs)("div",{style:{display:"flex",alignItems:"flex-start"},children:[(0,I.jsxs)("div",{style:{margin:"20px 20px 20px 0",width:280,maxHeight:"60%"},children:[(0,I.jsxs)("div",{className:k.user_info,children:[(0,I.jsxs)("div",{className:k.user_label,style:{lineHeight:"60px"},children:["姓名",(0,I.jsx)("span",{className:k.user_value,children:null==F||null===(o=F.poll)||void 0===o?void 0:o.real_name})]}),(0,I.jsxs)("div",{className:k.user_label,style:{lineHeight:"40px"},children:["学号",(0,I.jsx)("span",{className:k.user_value,children:null==F||null===(r=F.poll)||void 0===r?void 0:r.student_id})]})]}),(0,I.jsxs)("div",{style:{background:"#fff"},children:[(0,I.jsxs)("aside",{className:k.answerInfo,children:[(0,I.jsxs)(w.Z,{justify:"space-between",children:[(0,I.jsx)(y.Z,{children:"答题进度"}),(0,I.jsxs)(y.Z,{className:k.answerProgress,children:[(0,I.jsx)("span",{style:{color:"#165DFF"},children:null==F||null===(a=F.question_answered)||void 0===a||null===(a=a.filter((function(e){return 1===(null==e?void 0:e.ques_status)})))||void 0===a?void 0:a.length}),(0,I.jsxs)("span",{style:{color:"#999999"},children:["/",null==F||null===(c=F.question_types)||void 0===c?void 0:c.q_counts]})]})]}),(0,I.jsx)(w.Z,{children:(0,I.jsx)(j.Z,{strokeColor:"#165dffa6",trailColor:"#0000000d",percent:(null==F||null===(d=F.question_answered)||void 0===d||null===(d=d.filter((function(e){return 1==(null==e?void 0:e.ques_status)})))||void 0===d?void 0:d.length)/(null==F||null===(f=F.question_types)||void 0===f?void 0:f.q_counts)*100,showInfo:!1})})]}),(0,I.jsxs)(w.Z,{className:k.dottedLineWrapper,align:"middle",children:[(0,I.jsx)(y.Z,{className:k.leftHalfCircle}),(0,I.jsx)(y.Z,{flex:1,className:k.dottedLine}),(0,I.jsx)(y.Z,{className:k.rightHalfCircle})]}),(0,I.jsx)("div",{className:k.answerSheetWrap,children:null==ee?void 0:ee.map((function(e,t){var n,o=0;return(0,I.jsxs)("div",{children:[(null==e?void 0:e.countSize)>0&&(0,I.jsxs)("div",{className:k.answerSheetQuestionTitle,onClick:function(){ee[t].open=!(null!=e&&e.open),te(l()(ee))},children:[null!=e&&e.open?(0,I.jsx)(z.Z,{}):(0,I.jsx)(A.Z,{}),(0,I.jsx)("span",{className:"ml5 c-grey-666",children:null==e?void 0:e.name})]}),(null==e?void 0:e.open)&&(0,I.jsx)("div",{children:null==F||null===(n=F.questions)||void 0===n?void 0:n.map((function(t,n){var l,r;if((null==t||null===(l=t.question)||void 0===l?void 0:l.question_type)==(null==e?void 0:e.id))return(0,I.jsx)(C.Z.Link,{className:"".concat(k.answerFlag," ").concat(1==(null==F||null===(r=F.question_answered)||void 0===r||null===(r=r[n])||void 0===r?void 0:r.ques_status)?k.answerActive:X&&1===t.question.is_necessary?k.redactivie:""),href:"#Anchor_".concat(n),title:++o})}))}),(0,I.jsx)("div",{style:{clear:"both"}})]},t)}))})]})]}),(0,I.jsx)("section",{style:{width:900},className:[k.bg,"pt10","pl30","pr30","pb30","mt20","mb50"].join(" "),children:(0,I.jsx)("div",{children:null==F||null===(g=F.questions)||void 0===g?void 0:g.map((function(e,t){var n,o,l,r,i;return(0,I.jsxs)("div",{className:k.questionItem,id:"Anchor_".concat(t),children:[(0,I.jsx)("div",{className:"mt20",children:(0,I.jsxs)("span",{className:"font16",style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[0!==(null==e||null===(n=e.question)||void 0===n?void 0:n.is_necessary)&&(0,I.jsx)("span",{style:{color:"red",fontSize:"14px"},children:"*"}),(0,I.jsxs)("span",{className:"c-blue font16",children:["【",B[e.question.question_type],"】"]}),(0,I.jsx)(S.Z,{title:e.question.question_title,children:(0,I.jsxs)("div",{className:k.title,children:[null==e||null===(o=e.question)||void 0===o?void 0:o.question_number,"、",e.question.question_title]})}),2===e.question.question_type&&(null==e||null===(l=e.question)||void 0===l?void 0:l.min_choices)&&(0,I.jsxs)("div",{className:"ml10",style:{fontWeight:400,color:"#666666"},children:["(可选",null==e||null===(r=e.question)||void 0===r?void 0:r.min_choices,"-",null==e||null===(i=e.question)||void 0===i?void 0:i.max_choices,"项)"]})]})}),1==e.question.question_type&&(0,I.jsx)(P,{answerData:F,itemData:e,onSave:oe}),2==e.question.question_type&&(0,I.jsx)($,{answerData:F,itemData:e,onSave:oe}),3==e.question.question_type&&(0,I.jsx)(M,{answerData:F,itemData:e,onSave:oe})]})}))})})]})]}),(0,I.jsx)("div",{className:k.header_style,children:(0,I.jsxs)("div",{className:k.header_content,children:[(0,I.jsx)(E.VV,{status:[E.L4[null==F||null===(_=F.poll)||void 0===_?void 0:_.poll_status]]}),(0,I.jsx)(S.Z,{title:null==F||null===(N=F.poll)||void 0===N?void 0:N.polls_name,children:(0,I.jsx)("div",{className:k.header_title,children:null==F||null===(q=F.poll)||void 0===q?void 0:q.polls_name})}),(0,O.dE)()&&0===(null==F||null===(T=F.poll)||void 0===T?void 0:T.user_poll_status)&&(0,I.jsx)("div",{className:k.header_button,onClick:function(){var e,t=0,n=0,o=[],l=[];null==F||null===(e=F.question_answered)||void 0===e||e.map((function(e,r){var i;0===(null==e?void 0:e.ques_status)&&(1===(null==F||null===(i=F.questions)||void 0===i||null===(i=i.find((function(t){var n;return(null==t||null===(n=t.question)||void 0===n?void 0:n.id)===e.ques_id})))||void 0===i||null===(i=i.question)||void 0===i?void 0:i.is_necessary)?(o.push(r),t++):(l.push(r),n++))})),t>0?x.Z.info({width:530,title:"提示",centered:!0,okText:"知道啦",onOk:function(){Y(!0);var e="Anchor_".concat(o[0]),t=document.getElementById(e).getBoundingClientRect().top+window.pageYOffset+-100;window.scrollTo({top:t,behavior:"smooth"})},content:(0,I.jsxs)("div",{className:"tc font16 c-black-333",children:["有 ",t," 题必答题未答,无法提交 ",(0,I.jsx)("br",{}),"请完成全部必答题后再提交"]})}):x.Z.confirm({width:530,title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:(0,I.jsxs)("div",{className:"tc font16 c-black-333",children:[n>0&&(0,I.jsxs)(I.Fragment,{children:["有 ",n," 题未答 ",(0,I.jsx)("br",{})]}),"提交后无法再修改答题,是否确认提交?"]}),onOk:function(){le();var e="Anchor_".concat(l[0]),t=document.getElementById(e).getBoundingClientRect().top+window.pageYOffset+-100;window.scrollTo({top:t,behavior:"smooth"})}})},children:"提交问卷"})]})})]})}))},44728:function(e,t,n){n.d(t,{AL:function(){return y},Iy:function(){return p},Qv:function(){return h},ez:function(){return w},jb:function(){return f}});var o=n(79800),l=n.n(o),r=n(32834),i=n.n(r),a=n(11690);var s=[],c=["<ul>"],u=new(i().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){s.length=0,c=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(e,t,n,o){if(t>=e.length||e[t].level<=n)return t;var l=e[t];o.push("<li><a href='#"+l.anchor+"'>"+l.text+"</a>");var r=[];return t=v(e,++t,l.level,r),r.length>0&&(o.push("<ul>"),r.forEach((function(e){o.push(e)})),o.push("</ul>")),o.push("</li>"),t=v(e,t,n,o)}function h(){return v(s,0,0,c),c.push("</ul>"),c.join("")}var m={heading:function(e){var t=d.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],o=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var o=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:l()(t,1)[0].length>=o.length?e.slice(o.length):e})).join("\n")}(n,t[3]||""),r=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(r)>=0){var i=x(),a=o;o=i,b[i]={type:"block",expression:a}}return{type:"code",raw:n,lang:r,text:o}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,x=function(){return"__special_katext_id_".concat(_++,"__")},b={};function w(){return b}function y(){_=0,b={}}function j(e){return e=e.replace(g,(function(e,t){var n=x();return b[n]={type:"inline",expression:t},n}))}var C=u.listitem;u.listitem=function(e){return C(j(e))};var S=u.paragraph;u.paragraph=function(e){return S(j(e))};var k=u.tablecell;u.tablecell=function(e,t){return k(j(e),t)},u.code=function(e,t,n){var o=(t||"").match(/\S*/)[0];return o?["latex","katex","math"].indexOf(o)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,a.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,a.escape)(e,!0))+"</code></pre>"},u.heading=function(e,t,n){var o=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:o,level:t,text:e}),"<h"+t+' id="'+o+'">'+e+"</h"+t+">"},i().setOptions({silent:!0,gfm:!0,pedantic:!1}),i().use({tokenizer:m,renderer:u}),t.ZP=i()},13845:function(e,t,n){function o(e){return null!=e&&e===e.window}function l(e,t){var n,l;if("undefined"==typeof window)return 0;const r=t?"scrollTop":"scrollLeft";let i=0;return o(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[r]:(e instanceof HTMLElement||e)&&(i=e[r]),e&&!o(e)&&"number"!=typeof i&&(i=null===(l=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===l?void 0:l[r]),i}n.d(t,{F:function(){return o},Z:function(){return l}})},68031:function(e,t,n){n.d(t,{Z:function(){return i}});var o=n(84462);function l(e,t,n,o){const l=n-t;return(e/=o/2)<1?l/2*e*e*e+t:l/2*((e-=2)*e*e+2)+t}var r=n(13845);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getContainer:n=(()=>window),callback:i,duration:a=450}=t,s=n(),c=(0,r.Z)(s,!0),u=Date.now(),d=()=>{const t=Date.now()-u,n=l(t>a?a:t,c,e,a);(0,r.F)(s)?s.scrollTo(window.pageXOffset,n):s instanceof Document||"HTMLDocument"===s.constructor.name?s.documentElement.scrollTop=n:s.scrollTop=n,t<a?(0,o.Z)(d):"function"==typeof i&&i()};(0,o.Z)(d)}},24905:function(e,t,n){n.d(t,{Z:function(){return C}});var o=n(92310),l=n.n(o),r=n(5630),i=n(59301),a=n(36355),s=n(1684),c=n(32441);var u=i.createContext(null),d=n(98447),p=n(14088),f=n(4572),v=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]])}return n};const h=(e,t)=>{var n;const{prefixCls:o,className:h,rootClassName:m,children:g,indeterminate:_=!1,style:x,onMouseEnter:b,onMouseLeave:w,skipGroup:y=!1,disabled:j}=e,C=v(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:S,direction:k,checkbox:E}=i.useContext(a.E_),Z=i.useContext(u),{isFormItemInput:O}=i.useContext(c.aM),N=i.useContext(s.Z),q=null!==(n=(null==Z?void 0:Z.disabled)||j)&&void 0!==n?n:N,I=i.useRef(C.value);i.useEffect((()=>{null==Z||Z.registerValue(C.value)}),[]),i.useEffect((()=>{if(!y)return C.value!==I.current&&(null==Z||Z.cancelValue(I.current),null==Z||Z.registerValue(C.value),I.current=C.value),()=>null==Z?void 0:Z.cancelValue(C.value)}),[C.value]);const P=S("checkbox",o),[T,$]=(0,d.ZP)(P),M=Object.assign({},C);Z&&!y&&(M.onChange=function(){C.onChange&&C.onChange.apply(C,arguments),Z.toggleOption&&Z.toggleOption({label:g,value:C.value})},M.name=Z.name,M.checked=Z.value.includes(C.value));const R=l()(`${P}-wrapper`,{[`${P}-rtl`]:"rtl"===k,[`${P}-wrapper-checked`]:M.checked,[`${P}-wrapper-disabled`]:q,[`${P}-wrapper-in-form-item`]:O},null==E?void 0:E.className,h,m,$),z=l()({[`${P}-indeterminate`]:_},f.A,$),A=_?"mixed":void 0;return T(i.createElement(p.Z,{component:"Checkbox",disabled:q},i.createElement("label",{className:R,style:Object.assign(Object.assign({},null==E?void 0:E.style),x),onMouseEnter:b,onMouseLeave:w},i.createElement(r.Z,Object.assign({"aria-checked":A},M,{prefixCls:P,className:z,disabled:q,ref:t})),void 0!==g&&i.createElement("span",null,g))))};var m=i.forwardRef(h),g=n(43527),_=n(83930),x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]])}return n};const b=(e,t)=>{const{defaultValue:n,children:o,options:r=[],prefixCls:s,className:c,rootClassName:p,style:f,onChange:v}=e,h=x(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:w}=i.useContext(a.E_),[y,j]=i.useState(h.value||n||[]),[C,S]=i.useState([]);i.useEffect((()=>{"value"in h&&j(h.value||[])}),[h.value]);const k=i.useMemo((()=>r.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[r]),E=b("checkbox",s),Z=`${E}-group`,[O,N]=(0,d.ZP)(E),q=(0,_.Z)(h,["value","disabled"]),I=r.length?k.map((e=>i.createElement(m,{prefixCls:E,key:e.value.toString(),disabled:"disabled"in e?e.disabled:h.disabled,value:e.value,checked:y.includes(e.value),onChange:e.onChange,className:`${Z}-item`,style:e.style,title:e.title},e.label))):o,P={toggleOption:e=>{const t=y.indexOf(e.value),n=(0,g.Z)(y);-1===t?n.push(e.value):n.splice(t,1),"value"in h||j(n),null==v||v(n.filter((e=>C.includes(e))).sort(((e,t)=>k.findIndex((t=>t.value===e))-k.findIndex((e=>e.value===t)))))},value:y,disabled:h.disabled,name:h.name,registerValue:e=>{S((t=>[].concat((0,g.Z)(t),[e])))},cancelValue:e=>{S((t=>t.filter((t=>t!==e))))}},T=l()(Z,{[`${Z}-rtl`]:"rtl"===w},c,p,N);return O(i.createElement("div",Object.assign({className:T,style:f},q,{ref:t}),i.createElement(u.Provider,{value:P},I)))},w=i.forwardRef(b);var y=i.memo(w);const j=m;j.Group=y,j.__ANT_CHECKBOX=!0;var C=j},98447:function(e,t,n){n.d(t,{C2:function(){return a}});var o=n(17313),l=n(37613),r=n(83116);const i=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,o.Wf)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,o.Wf)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},(0,o.oN)(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${n}:not(${n}-disabled),\n ${t}:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${n}-checked:not(${n}-disabled),\n ${t}-checked:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function a(e,t){const n=(0,l.TS)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[i(n)]}t.ZP=(0,r.Z)("Checkbox",((e,t)=>{let{prefixCls:n}=t;return[a(n,e)]}))},98135:function(e,t,n){n.d(t,{Z:function(){return P}});var o=n(92310),l=n.n(o),r=n(59301),i=n(36355),a=n(32441),s=n(9937);var c=e=>{const{getPrefixCls:t,direction:n}=(0,r.useContext)(i.E_),{prefixCls:o,className:c}=e,u=t("input-group",o),d=t("input"),[p,f]=(0,s.ZP)(d),v=l()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===n},f,c),h=(0,r.useContext)(a.aM),m=(0,r.useMemo)((()=>Object.assign(Object.assign({},h),{isFormItemInput:!1})),[h]);return p(r.createElement("span",{className:v,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},r.createElement(a.aM.Provider,{value:m},e.children)))},u=n(9432),d=n(4751),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=n(68475),v=function(e,t){return r.createElement(f.Z,(0,d.Z)({},e,{ref:t,icon:p}))};var h=r.forwardRef(v),m=n(89136),g=n(83930),_=n(85510),x=n(59412),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]])}return n};const w=e=>e?r.createElement(m.Z,null):r.createElement(h,null),y={click:"onClick",hover:"onMouseOver"};var j=r.forwardRef(((e,t)=>{const{visibilityToggle:n=!0}=e,o="object"==typeof n&&void 0!==n.visible,[a,s]=(0,r.useState)((()=>!!o&&n.visible)),c=(0,r.useRef)(null);r.useEffect((()=>{o&&s(n.visible)}),[o,n]);const d=(0,x.Z)(c),p=()=>{const{disabled:t}=e;t||(a&&d(),s((e=>{var t;const o=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,o)),o})))},{className:f,prefixCls:v,inputPrefixCls:h,size:m}=e,j=b(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=r.useContext(i.E_),S=C("input",h),k=C("input-password",v),E=n&&(t=>{const{action:n="click",iconRender:o=w}=e,l=y[n]||"",i=o(a),s={[l]:p,className:`${t}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return r.cloneElement(r.isValidElement(i)?i:r.createElement("span",null,i),s)})(k),Z=l()(k,f,{[`${k}-${m}`]:!!m}),O=Object.assign(Object.assign({},(0,g.Z)(j,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:Z,prefixCls:S,suffix:E});return m&&(O.size=m),r.createElement(u.Z,Object.assign({ref:(0,_.sQ)(t,c)},O))})),C=n(11013),S=n(92343),k=n(3113),E=n(19716),Z=n(33234),O=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]])}return n};var N=r.forwardRef(((e,t)=>{const{prefixCls:n,inputPrefixCls:o,className:a,size:s,suffix:c,enterButton:d=!1,addonAfter:p,loading:f,disabled:v,onSearch:h,onChange:m,onCompositionStart:g,onCompositionEnd:x}=e,b=O(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:w,direction:y}=r.useContext(i.E_),j=r.useRef(!1),N=w("input-search",n),q=w("input",o),{compactSize:I}=(0,Z.ri)(N,y),P=(0,E.Z)((e=>{var t;return null!==(t=null!=s?s:I)&&void 0!==t?t:e})),T=r.useRef(null),$=e=>{var t;document.activeElement===(null===(t=T.current)||void 0===t?void 0:t.input)&&e.preventDefault()},M=e=>{var t,n;h&&h(null===(n=null===(t=T.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},R="boolean"==typeof d?r.createElement(C.Z,null):null,z=`${N}-button`;let A;const L=d||{},D=L.type&&!0===L.type.__ANT_BUTTON;A=D||"button"===L.type?(0,S.Tm)(L,Object.assign({onMouseDown:$,onClick:e=>{var t,n;null===(n=null===(t=null==L?void 0:L.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),M(e)},key:"enterButton"},D?{className:z,size:P}:{})):r.createElement(k.ZP,{className:z,type:d?"primary":void 0,size:P,disabled:v,key:"enterButton",onMouseDown:$,onClick:M,loading:f,icon:R},d),p&&(A=[A,(0,S.Tm)(p,{key:"addonAfter"})]);const B=l()(N,{[`${N}-rtl`]:"rtl"===y,[`${N}-${P}`]:!!P,[`${N}-with-button`]:!!d},a);return r.createElement(u.Z,Object.assign({ref:(0,_.sQ)(T,t),onPressEnter:e=>{j.current||f||M(e)}},b,{size:P,onCompositionStart:e=>{j.current=!0,null==g||g(e)},onCompositionEnd:e=>{j.current=!1,null==x||x(e)},prefixCls:q,addonAfter:A,suffix:c,onChange:e=>{e&&e.target&&"click"===e.type&&h&&h(e.target.value,e,{source:"clear"}),m&&m(e)},className:B,disabled:v}))})),q=n(1643);const I=u.Z;I.Group=c,I.Search=N,I.TextArea=q.Z,I.Password=j;var P=I},44e3:function(e,t,n){var o=n(84966),l=n(10711);const r=o.ZP;r.Header=o.h4,r.Footer=o.$_,r.Content=o.VY,r.Sider=l.Z,t.Z=r},6774:function(e,t,n){n.d(t,{Z:function(){return c}});const o=e=>"object"==typeof e&&null!=e&&1===e.nodeType,l=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,r=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return l(n.overflowY,t)||l(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},i=(e,t,n,o,l,r,i,a)=>r<e&&i>t||r>e&&i<t?0:r<=e&&a<=n||i>=t&&a>=n?r-e-o:i>t&&a<n||r<e&&a>n?i-t+l:0,a=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},s=(e,t)=>{var n,l,s,c;if("undefined"==typeof document)return[];const{scrollMode:u,block:d,inline:p,boundary:f,skipOverflowHiddenElements:v}=t,h="function"==typeof f?f:e=>e!==f;if(!o(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,g=[];let _=e;for(;o(_)&&h(_);){if(_=a(_),_===m){g.push(_);break}null!=_&&_===document.body&&r(_)&&!r(document.documentElement)||null!=_&&r(_,v)&&g.push(_)}const x=null!=(l=null==(n=window.visualViewport)?void 0:n.width)?l:innerWidth,b=null!=(c=null==(s=window.visualViewport)?void 0:s.height)?c:innerHeight,{scrollX:w,scrollY:y}=window,{height:j,width:C,top:S,right:k,bottom:E,left:Z}=e.getBoundingClientRect(),{top:O,right:N,bottom:q,left:I}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let P="start"===d||"nearest"===d?S-O:"end"===d?E+q:S+j/2-O+q,T="center"===p?Z+C/2-I+N:"end"===p?k+N:Z-I;const $=[];for(let e=0;e<g.length;e++){const t=g[e],{height:n,width:o,top:l,right:r,bottom:a,left:s}=t.getBoundingClientRect();if("if-needed"===u&&S>=0&&Z>=0&&E<=b&&k<=x&&S>=l&&E<=a&&Z>=s&&k<=r)return $;const c=getComputedStyle(t),f=parseInt(c.borderLeftWidth,10),v=parseInt(c.borderTopWidth,10),h=parseInt(c.borderRightWidth,10),_=parseInt(c.borderBottomWidth,10);let O=0,N=0;const q="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-h:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-v-_:0,M="offsetWidth"in t?0===t.offsetWidth?0:o/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(m===t)O="start"===d?P:"end"===d?P-b:"nearest"===d?i(y,y+b,b,v,_,y+P,y+P+j,j):P-b/2,N="start"===p?T:"center"===p?T-x/2:"end"===p?T-x:i(w,w+x,x,f,h,w+T,w+T+C,C),O=Math.max(0,O+y),N=Math.max(0,N+w);else{O="start"===d?P-l-v:"end"===d?P-a+_+I:"nearest"===d?i(l,a,n,v,_+I,P,P+j,j):P-(l+n/2)+I/2,N="start"===p?T-s-f:"center"===p?T-(s+o/2)+q/2:"end"===p?T-r+h+q:i(s,r,o,f,h+q,T,T+C,C);const{scrollLeft:e,scrollTop:c}=t;O=0===R?0:Math.max(0,Math.min(c+O/R,t.scrollHeight-n/R+I)),N=0===M?0:Math.max(0,Math.min(e+N/M,t.scrollWidth-o/M+q)),P+=c-O,T+=e-N}$.push({el:t,top:O,left:N})}return $};function c(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(s(e,t));const o="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:l,top:r,left:i}of s(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=r-n.top+n.bottom,t=i-n.left+n.right;l.scroll({top:e,left:t,behavior:o})}}}}]); |