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__Question__OjProblem__Rec...

1 line
41 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([[49716],{78386:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(33614),a=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},i=n(22589),o=function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=a.forwardRef(o)},22893:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(33614),a=n(59301),c={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"},i=n(22589),o=function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=a.forwardRef(o)},50382:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(33614),a=n(59301),c={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(22589),o=function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=a.forwardRef(o)},20538:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(33614),a=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},i=n(22589),o=function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=a.forwardRef(o)},13261:function(e,t,n){"use strict";var r=n(82242),a=n.n(r),c=(n(59301),n(93314)),i=n(3113),o=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,s=e.styles,l=void 0===s?{}:s,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,v=e.imgStyles,m=e.loading,g=void 0!==m&&m;return(0,o.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),l),children:[(0,o.jsx)("img",{src:t||c,style:a()(a()({},v),{},{pointerEvents:"none",userSelect:"none"})}),(0,o.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,o.jsx)(i.ZP,a()(a()({className:f,onClick:p},r),{},{children:d})),h&&h]})}},13282:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(82242),a=n.n(r),c=n(7557),i=n.n(c),o=n(41498),s=n.n(o),l=n(79800),u=n.n(l),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),h=n(38827),v=n(99095),m=n(6848),g=n(27627),x=n(91810),_=n(13261),y=n(15309),j=n(87814),b=n(37712),E=function(e){var t,n,r,c,o,l,E=e.editOffice,w=void 0===E?"view":E,A=e.data,C=(e.theme,e.type),Z=e.filename,N=e.monacoEditor,I=e.className,O=e.style,S=e.close,k=e.onClose,T=e.hasMask,L=e.disabledDownload,R=e.onImgDimensions,B=e.showNodata,P=e.recordInfo,F=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),M=u()(F,2),z=(M[0],M[1],(0,d.useState)("")),U=u()(z,2),D=(U[0],U[1]),V=(0,d.useState)(),H=u()(V,2),q=H[0],X=H[1],$="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER,J=(0,d.useRef)();null!==(t=A)&&void 0!==t&&t.startsWith("/api")&&"txt"!==C&&(A=y.Z.API_SERVER+A);Z&&N&&(N.filename=Z),(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]&&D(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===C&&(A.indexOf("bigfilescdn.")>-1||A.indexOf("bigfiles1")>-1?X({url:A,fileType:(e=A,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:A.indexOf("model=edit")?"edit":"view"}):Y())}),[C,A]);var Y=function(){var e=s()(i()().mark((function e(){var t,n,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",A),t=A,A.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,x.gJ)({attachment_id:n});case 6:(r=e.sent).url=W+r.url,X(r);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){A.startsWith("http")||A.startsWith("blob:")?Q():(0,g.Sv)(Z||"educoder",A,Z)},Q=function(){P&&(0,j.fc)({id:null==P?void 0:P.id,watch_type:1,course_id:null==P?void 0:P.course_id}),(0,g.Nd)(Z||"educoder",decodeURIComponent(A))};return(0,b.jsxs)("div",{style:a()({},O||{}),className:"".concat(T&&p.bgBlack," ").concat(C?p.wrp:"hide"),children:[S&&(0,b.jsxs)("div",{className:p.close,ref:J,children:[!!R&&(0,b.jsx)(m.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,b.jsx)("span",{onClick:function(){k(),R()},children:(0,b.jsx)("i",{className:"icon-yulanpizhu"})})}),!L&&(0,b.jsx)(m.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,b.jsx)("span",{onClick:Q,children:(0,b.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,b.jsx)(m.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,b.jsx)("span",{className:"",onClick:k,children:(0,b.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,b.jsx)("div",{className:"".concat(p[I]," ").concat(I," ").concat(p.monaco," ").concat("txt"===C?"show":"hide"),children:"txt"===C&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(v.ZP,a()({},N))})}),"audio"===C&&(0,b.jsx)("audio",{src:"".concat((null===(n=A)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(r=A)||void 0===r?void 0:r.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(A),autoPlay:!0}),"video"===C&&(0,b.jsx)(b.Fragment,{children:(null===(c=A)||void 0===c?void 0:c.indexOf("http"))>-1?(0,b.jsx)("video",{controls:!0,src:"".concat(A),autoPlay:!0}):(0,b.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})}),"office"===C&&q&&(0,b.jsx)("iframe",{src:"".concat($,"/office.html?key=").concat(q.key,"&url=").concat(btoa(q.url),"&callbackUrl=").concat(W+q.callbackUrl,"&fileType=").concat(q.fileType,"&title=").concat(q.title,"&model=").concat(w,"&officeServer=").concat(y.Z.ONLYOFFICE,"&disabledDownload=").concat(!!L)}),"html"===C&&(0,b.jsx)("iframe",{src:A+"&disposition=inline"}),"pdf"===C&&(0,b.jsx)("iframe",{src:"".concat($,"/js/pdfview/index.html?filename=").concat(Z||"educoder.pdf","&url=").concat(encodeURIComponent(A),"&disabledDownload=").concat(!!L)}),"image"===C&&(0,b.jsx)("img",{src:"".concat((null===(o=A)||void 0===o?void 0:o.indexOf("http://"))>-1||(null===(l=A)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)}),("other"===C||"download"===C)&&(0,b.jsx)(b.Fragment,{children:B?(0,b.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,b.jsx)(f.ZP,{icon:(0,b.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:K,disabled:L,children:"下载"})}):(0,b.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:K,disabled:L,children:[(0,b.jsx)(h.Z,{}),"点击下载"]})})]})}},82011:function(e,t,n){"use strict";n.d(t,{z:function(){return b}});var r=n(82242),a=n.n(r),c=n(37205),i=n.n(c),o=n(91232),s=n.n(o),l=n(79800),u=n.n(l),d=n(59301),p=(n(86622),n(60137)),f=(n(64018),n(6419)),h=n(15309),v=n(27627),m=n(15342),g=n(1012),x=n(13282),_=n(37712),y="@▁@",j=/<pre[^>]*>/g;var b=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,r,a,c,i){var o=t||r||c,s=n||a||i||"?";return h.Z.API_SERVER+"/api/attachments/"+o+s+"&t="+(0,v.Jn)(o,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,r,a,c,i){var o=t||r||c,s=n||a||i||"?";return h.Z.API_SERVER+"/attachments/download/"+o+s+"&t="+(0,v.Jn)(o,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(n,(function(e,t,n,r,a,c,i){var o=t||r||c,s=n||a||i||"?";return h.Z.API_SERVER+"/api/attachments/"+o+s+"&t="+(0,v.Jn)(o,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,r,a){var c=t||r,i=n||a||"";return'"'+h.Z.API_SERVER+"/api/attachments/"+c+i+c+i+"&t="+(0,v.Jn)(c,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,r,a){var c=t||r,i=n||a||"";return"("+h.Z.API_SERVER+"/files/uploads/"+c+i+c+i+"&t="+(0,v.Jn)(c,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,r=e.className,c=e.showTextOnly,o=e.showLines,l=e.style,v=void 0===l?{}:l,b=e.stylesPrev,E=void 0===b?{}:b,w=e.highlightKeywords,A=e.showProgramFill,C=(e.isProgramFill,e.disabledFill),Z=void 0!==C&&C,N=e.programFillValue,I=e.onFillChange,O=void 0===I?function(e){}:I,S=e.onFillBlur,k=void 0===S?function(){}:S,T=e.onFillFocus,L=void 0===T?function(){}:T,R=String(n),B=(0,d.useState)(""),P=u()(B,2),F=P[0],M=P[1],z=(0,d.useState)("office"),U=u()(z,2),D=U[0],V=U[1],H=(0,d.useState)([]),q=u()(H,2),X=q[0],$=q[1],W=(0,d.useRef)("a"+(0,g.Z)()),J={};var Y=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),r=[];return n.map((function(e){""!=e&&r.push(".".concat(W.current," ").concat(e))})),"<style>".concat(r.join("}"),"</style>")}))},K=(0,d.useMemo)((function(){try{R=R.replace(/\(\/attachments\/download\//g,"("+h.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+h.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+h.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+h.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(A){var e=-1;return R=R.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,r){var a;return function(e,t,n){var r=document.createElement(e===y?"input":"textarea");r.style.width="100%",r.style.height=e===y?"40px":"151px",r.rows=5,r.spellcheck=!1,r.name="edu-program-fill",r.placeholder="请输入",r.dataset.id=t;var a=Object.keys(J).length;return J[a]=r,'<span class="edu-program-fill-wrap '.concat(e===y?"":"show",'" style="width:').concat(e===y?"400px":"100%",'" title=').concat(n||"","><span>").concat(r.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==N||null===(a=N[e])||void 0===a?void 0:a.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat(Y(R||""),"</pre>")}var t=Y(R);t=(0,p.ZP)(t);var n=(0,p.ez)();R.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 r=n[t],a=r.type,c=r.expression;return(0,m.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(c)||"",{displayMode:"block"===a,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var r=document.createElement("div");return r.innerHTML=t,c?r.innerText:w?(te(r,w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r.innerHTML):(setTimeout((function(){return ae()}),500),r.innerHTML)}),[R,w]);(0,d.useEffect)((function(){ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=Q,e.onblur=G,e.onfocus=ee}))}),[X]),(0,d.useEffect)((function(){if(null!=N&&N.length)try{var e,t=ne.current.querySelectorAll(".edu-program-fill-score"),n=ne.current.querySelectorAll('[name="edu-program-fill"]'),r=s()(n.entries());try{for(r.s();!(e=r.n()).done;){var a,c,i,o=u()(e.value,2),l=o[0],d=o[1];d.value=(null==N||null===(a=N[l])||void 0===a?void 0:a.value)||"","warning"===(null==N||null===(c=N[l])||void 0===c?void 0:c.type)?d.className="program-fill-warning":"success"===(null==N||null===(i=N[l])||void 0===i?void 0:i.type)?d.className="program-fill-success":d.className=""}}catch(e){r.e(e)}finally{r.f()}var p,f=s()(t.entries());try{for(f.s();!(p=f.n()).done;){var h,v,m=u()(p.value,2),g=m[0];m[1].innerHTML=null!=N&&null!==(h=N[g])&&void 0!==h&&h.score?"".concat(null==N||null===(v=N[g])||void 0===v?void 0:v.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}$(N)}catch(e){console.log(e,"error")}}),[N]);var Q=function(e){X[e.target.dataset.id]=X[e.target.dataset.id]||{},X[e.target.dataset.id].value=e.target.value,$(i()(X)),O(X,e.target.dataset.id)},G=function(e){X[e.target.dataset.id]=X[e.target.dataset.id]||{},X[e.target.dataset.id].value=e.target.value,$(i()(X)),k(X,e.target.dataset.id)},ee=function(e){X[e.target.dataset.id]=X[e.target.dataset.id]||{},X[e.target.dataset.id].value=e.target.value,$(i()(X)),L(X,e.target.dataset.id)};function te(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)te(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 r=document.createElement("span");r.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(r)}}))}var ne=(0,d.useRef)();function re(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),M(n),V("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),M(n),V("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),M(n),V("html");else if(n.startsWith("#")){e.preventDefault();var r=document.getElementById(n.replace("#",""));r&&r.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=o,o&&(v=a()(a()({},v),p.jb));var ae=function(){var e,t=null===(e=ne.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(ne.current&&K&&K.match(j)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",re),function(){var e;null===(e=ne.current)||void 0===e||e.removeEventListener("click",re),(0,p.AL)(),(0,p.Iy)()}}),[K,ne.current,re]),(0,d.useEffect)((function(){var e,t=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=ne.current)||void 0===e||e.addEventListener("copy",t),function(){var e;null===(e=ne.current)||void 0===e||e.removeEventListener("copy",t)}}),[ne.current]),(0,_.jsxs)(_.Fragment,{children:[c&&(0,_.jsx)("div",{ref:ne,children:K}),!c&&(0,_.jsx)("div",{ref:ne,style:a()({},v),className:"".concat(r||""," ").concat(Z?"disabled-fill":""," markdown-body ").concat(W.current),dangerouslySetInnerHTML:{__html:K}}),(0,_.jsx)(x.Z,{close:!0,data:F,type:null!=F&&F.length?D:"",style:a()({},E),onClose:function(){return M("")}})]})}},58152:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51876),a="ldsRing___mpBZC",c="idsRingWrapper___Of9_n",i=n(37712),o=function(e){var t=e.message,n=e.className,o=e.children,s=e.style,l=void 0===s?{}:s;return(0,i.jsxs)("div",{className:"custom-spinner ".concat(c," ").concat(n),children:[(0,i.jsxs)("div",{className:a,children:[(0,i.jsx)("div",{}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{})]}),t?(0,i.jsx)("p",{style:l,children:t}):null,o,(0,i.jsx)(r.Outlet,{})]})}},82601:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});n(59301);var r="result___gu5zt",a="title___xrnx2",c="left___IAxp9",i="leftNode___HL8fG",o="right___ZXYmw",s="rightNode___jYL5_",l=n(92310),u=n.n(l),d=n(37712),p=function(e){var t=e.className,n=e.style,l=void 0===n?{}:n,p=e.leftNode,f=e.leftTitle,h=void 0===f?"自测输入":f,v=e.rightNode,m=e.rightTitle,g=void 0===m?"运行结果":m;return(0,d.jsxs)("div",{className:u()(r,t),style:l,children:[(0,d.jsxs)("div",{className:c,children:[(0,d.jsxs)("div",{className:a,children:[(0,d.jsx)("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),(0,d.jsx)("span",{children:h})]}),(0,d.jsx)("div",{className:i,children:p})]}),(0,d.jsxs)("div",{className:o,children:[(0,d.jsxs)("div",{className:a,children:[(0,d.jsx)("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),(0,d.jsx)("span",{children:g})]}),(0,d.jsx)("div",{className:s,children:v})]})]})}},42836:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return j}});var r=n(7557),a=n.n(r),c=n(41498),i=n.n(c),o=n(79800),s=n.n(o),l=n(59301),u=n(36082),d=n(15309),p=n(51876),f=n(71418),h=n(17744),v=n(51428),m=n(99095),g=n(24334),x=n(61186),_=n.n(x),y=n(37712),j=function(){var e=(0,p.useParams)(),t=e.submitId,n=e.id,r=(0,l.useState)(void 0),c=s()(r,2),o=c[0],x=c[1];console.log((0,p.useLocation)(),33);var j=(0,p.useLocation)();(0,l.useEffect)((function(){return(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}}),[]),(0,l.useEffect)((function(){document.title="在线刷题"})),(0,l.useEffect)((function(){if(t){var e=function(){var e=i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.X6)(t);case 2:n=e.sent,x(n.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[t]);var b=o||{},E=b.status,w=b.created_at,A=b.code,C=b.name,Z=b.language,N=b.pass_sets_count,I=b.set_count,O=b.error_msg,S=b.output,k=b.input,T=b.expected_output,L=(b.execute_memory,b.user),R=b.execute_time,B=b.input_file_url,P=b.output_file_url,F=b.is_file,M=b.expected_output_file_url;return(0,y.jsx)(f.Z,{spinning:!o,delay:500,children:(0,y.jsx)("div",{className:"record-detail-info",children:o?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("header",{className:u.Z.header,children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("img",{src:"".concat(d.Z.IMG_SERVER,"/images/").concat(L.image_url),alt:"user",width:30}),(0,y.jsx)("span",{children:L.name})]}),(0,y.jsxs)("h2",{children:[" ",C," "]}),(0,y.jsx)("button",{className:"ant-btn",onClick:function(){var e;p.history.push("/problems/".concat(n,"/oj/").concat(null==j||null===(e=j.query)||void 0===e?void 0:e.backId,"?tab=1"))},style:{border:"1px solid #bacffe",color:"#3061d0"},children:"返回该题"})]}),(0,y.jsxs)("div",{className:"record-detail-body",children:[(0,y.jsx)("h2",{children:" 提交记录 "}),(0,y.jsxs)("ul",{className:"record-info",children:[(0,y.jsxs)("li",{children:[" 状态:",(0,y.jsx)("span",{className:0===E?"c-green":"c-red",children:v.Im[E]})," "]}),(0,y.jsxs)("li",{children:[" 提交时间:",(0,y.jsx)("span",{children:_()(w).format("YYYY-MM-DD HH:mm:ss")})," "]}),(0,y.jsxs)("li",{children:[" 语言:",(0,y.jsx)("span",{children:Z})," "]}),(0,y.jsxs)("li",{children:[" 执行用时:",(0,y.jsxs)("span",{children:[1e3*R,"ms"]})," "]}),(0,y.jsxs)("li",{children:[" ","".concat(N," / ").concat(I," 个通过的测试用例")," "]})]}),(0,v.gZ)({status:E,error_msg:O,execute_time:R,output:S,input:k,expected_output:T,input_file_url:B,output_file_url:P,is_file:F,expected_output_file_url:M}),(0,y.jsx)("h2",{children:" 提交的内容 "}),(0,y.jsx)(m.ZP,{height:"200px",width:"100%",language:null==Z?void 0:Z.toLocaleLowerCase(),value:g.Base64.decode(A),options:{readOnly:!0}})]})]}):null})})}},51428:function(e,t,n){"use strict";n.d(t,{Im:function(){return E},ZP:function(){return N},gZ:function(){return C}});var r=n(79800),a=n.n(r),c=n(82242),i=n.n(c),o=n(85573),s=n.n(o),l=n(59301),u=n(92832),d=n(3113),p=n(78386),f=n(20538),h=n(38521),v=n(24334),m=n(58152),g=n(82011),x=n(27627),_=n(82601),y=n(37712),j=u.Z.TextArea,b={visible:!1,tabIndex:"0"},E=s()(s()(s()(s()(s()(s()({},h.h.NOMATCH,"测试用例结果不匹配"),h.h.OK,"调试通过"),2,"调试超时"),3,"调试pod失败"),4,"编译失败"),5,"执行失败"),w=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(w||{});function A(e,t){switch(t.type){case w.SET_VISIBLE:return i()(i()({},e),{},{visible:t.payload});case w.SET_TABINDEX:return i()(i()({},e),{},{tabIndex:t.payload});default:throw new Error}}function C(e){var t=e.status,n=e.error_msg,r=e.output,a=e.input,c=e.expected_output,i=e.is_file,o=e.input_file_url,s=e.output_file_url,l=e.expected_output_file_url,u=null,d={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(t){case h.h.NOMATCH:u=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("p",{className:"c-red",children:"实际输入:"}),!i&&(0,y.jsx)(g.Z,{value:a,style:d}),i&&(0,y.jsx)("div",{style:d,children:(0,y.jsx)("a",{onClick:function(){return(0,x.LR)(o,a)},children:a})}),(0,y.jsx)("p",{className:"c-red",children:"实际输出:"}),!i&&(0,y.jsx)(g.Z,{value:r&&v.Base64.decode(r)||"",style:d}),i&&(0,y.jsx)("div",{style:d,children:(0,y.jsx)("a",{onClick:function(){return(0,x.LR)(s,r)},children:r})}),(0,y.jsx)("p",{className:"c-red",children:"预期输出:"}),!i&&(0,y.jsx)(g.Z,{value:c&&v.Base64.decode(c)||"",style:d}),i&&(0,y.jsx)("div",{style:d,children:(0,y.jsx)("a",{onClick:function(){return(0,x.LR)(l,c)},children:c})})]});break;case h.h.EXECUTEFAILURE:case h.h.COMPILEFAILURE:u=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("p",{children:"最后执行的输入:"}),!i&&(0,y.jsx)(g.Z,{value:a,style:d}),i&&(0,y.jsx)("div",{style:d,children:(0,y.jsx)("a",{onClick:function(){return(0,x.LR)(o,a)},children:a})}),(0,y.jsx)("p",{children:"执行出错信息:"}),(0,y.jsx)("pre",{className:"error",children:v.Base64.decode(n)})]});break;case h.h.PODFAILURE:u=(0,y.jsx)("p",{children:"创建pod失败请稍后重试"});break;case h.h.TIMEOUT:u=(0,y.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,y.jsxs)(y.Fragment,{children:[" ",u," "]})}function Z(e){var t=e.status,n=e.error_msg,r=e.execute_time,a=e.output,c=e.input,i=e.expected_output,o=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(t){case h.h.OK:o=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("p",{children:["执行用时:",r,"秒"]}),(0,y.jsx)("p",{children:"执行结果:"}),(0,y.jsx)("pre",{children:v.Base64.decode(a)})]});break;case h.h.NOMATCH:o=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("p",{children:["输入:",(0,y.jsx)("pre",{children:c})]}),(0,y.jsxs)("p",{children:["输出:",a&&v.Base64.decode(a)]}),(0,y.jsxs)("p",{children:["预期输出:",i&&v.Base64.decode(i)]})]});break;case h.h.EXECUTEFAILURE:case h.h.COMPILEFAILURE:o=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("p",{children:["最后执行的输入:",(0,y.jsx)("pre",{children:c})]}),(0,y.jsx)("p",{children:"执行出错信息:"}),(0,y.jsx)("pre",{className:"error",children:v.Base64.decode(n)})]});break;case h.h.PODFAILURE:o=(0,y.jsx)("p",{children:"创建pod失败请稍后重试"});break;case h.h.TIMEOUT:o=(0,y.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,y.jsxs)(y.Fragment,{children:[" ",o," "]})}var N=function(e){var t=e.id,n=e.is_file,r=e.input,c=e.debuging,i=e.submitting,o=(e.executingMessage,e.debugResult),s=e.onChangeInput,u=e.onDebugCode,h=e.onSubmitCode,v=(0,l.useReducer)(A,b),g=a()(v,2),x=g[0],E=g[1],C=x.visible;x.tabIndex;(0,l.useEffect)((function(){E({type:w.SET_VISIBLE,payload:!1})}),[t]);var N=(0,l.useMemo)((function(){if(o){o.status;return(0,y.jsx)(y.Fragment,{children:Z(o)})}return null}),[o]);return(0,y.jsxs)("div",{className:"test-case-panel",children:[(0,y.jsxs)("div",{className:"test-case-panel-body ".concat(C?"active":""),children:[(0,y.jsx)("ul",{className:"s-navs",children:(0,y.jsx)("li",{children:(0,y.jsx)("a",{className:"active",children:"调试代码结果"})})}),(0,y.jsx)(_.Z,{leftTitle:"自定义测试用例",rightTitle:"代码执行结果",style:{height:240},leftNode:(0,y.jsx)(j,{placeholder:"请输入自测用例(如果未填写,自测运行时,系统会自动填充第一个非隐藏的文本类型的测试用例)",value:n?"":r,onChange:s}),rightNode:c?(0,y.jsx)(m.Z,{message:"代码执行中..."}):o?N:(0,y.jsx)("p",{style:{color:"#536879"},children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,y.jsx)("a",{className:"btn-collapse ".concat(C?"up":""),onClick:function(){E({type:w.SET_VISIBLE,payload:!C})},children:C?(0,y.jsx)(p.Z,{}):(0,y.jsx)(f.Z,{})}),(0,y.jsxs)("footer",{className:"footer",children:[(0,y.jsx)("span",{style:{visibility:"hidden"},children:"控制台"}),(0,y.jsxs)("div",{className:"flex-container",children:[(0,y.jsx)(d.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost",children:"上一题"}),(0,y.jsx)(d.ZP,{id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,y.jsx)(d.ZP,{className:"btn-green",type:"ghost",loading:c,onClick:function(){E({type:w.SET_VISIBLE,payload:!0}),E({type:w.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),(0,y.jsx)(d.ZP,{type:"primary",className:"custom-ant-disabled",loading:i,disabled:i,onClick:function(){E({type:w.SET_VISIBLE,payload:!1}),h()},children:"评测并提交"})]})]})]})}},38521:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var r=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}({})},17744:function(e,t,n){"use strict";n.d(t,{H7:function(){return d},KC:function(){return m},M3:function(){return y},MK:function(){return u},MU:function(){return i},Rg:function(){return E},WH:function(){return g},X6:function(){return s},bM:function(){return c},bx:function(){return x},dd:function(){return h},de:function(){return A},fi:function(){return p},fu:function(){return a},gu:function(){return _},n4:function(){return f},qe:function(){return b},rL:function(){return w},rX:function(){return l},uc:function(){return C},vl:function(){return v},wO:function(){return j},zO:function(){return o}});var r=n(79311);function a(e){return(0,r.U2)("mypractices/".concat(e,".json"),{hidePopLogin:!0})}function c(e,t){return(0,r.v_)("mypractices/".concat(e,"/code_submit.json"),t)}function i(e,t){return(0,r.v_)("mypractices/".concat(e,"/code_debug.json"),t)}function o(e,t){return t.language&&(t.language=encodeURIComponent(t.language)),(0,r.U2)("mypractices/".concat(e,"/submit_records.json"),t)}function s(e){return(0,r.U2)("mypractices/record_detail.json",{id:e})}function l(e,t){return(0,r.U2)("mypractices/".concat(e,"/result.json"),{mode:t})}function u(e,t){return(0,r.v_)("mypractices/".concat(e,"/add_notes.json"),t)}function d(e,t){return(0,r.v_)("mypractices/".concat(e,"/restore_initial_code.json"),t)}function p(e,t){return(0,r.v_)("mypractices/".concat(e,"/sync_code.json"),t)}function f(e,t){return(0,r.v_)("mypractices/".concat(e,"/update_code.json"),t)}function h(e){return(0,r.v_)("mypractices/".concat(e,"/initial_codes.json"))}function v(e,t){return(0,r.v_)("discusses/".concat(e,"/plus.json"),t)}function m(e){return(0,r.U2)("practices/practices_list.json",e)}function g(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles"),t)}function x(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles"),t)}function _(e,t){return(0,r.gz)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function y(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/edit"),t)}function j(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function b(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/set_authority_or_excellent"),t)}function E(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/praise_or_treads"),t)}function w(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/hide"))}function A(e,t){return(0,r.IV)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function C(e,t){return(0,r.v_)("mypractices/".concat(e,"/update_practice_time_sum"),t)}},60137:function(e,t,n){"use strict";n.d(t,{AL:function(){return b},Iy:function(){return p},Qv:function(){return v},ez:function(){return j},jb:function(){return f}});var r=n(79800),a=n.n(r),c=n(32834),i=n.n(c),o=n(11690);var s=[],l=["<ul>"],u=new(i().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){s.length=0,l=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(e,t,n,r){if(t>=e.length||e[t].level<=n)return t;var a=e[t];r.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var c=[];return t=h(e,++t,a.level,c),c.length>0&&(r.push("<ul>"),c.forEach((function(e){r.push(e)})),r.push("</ul>")),r.push("</li>"),t=h(e,t,n,r)}function v(){return h(s,0,0,l),l.push("</ul>"),l.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],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:a()(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),c=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(c)>=0){var i=_(),o=r;r=i,y[i]={type:"block",expression:o}}return{type:"code",raw:n,lang:c,text:r}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,_=function(){return"__special_katext_id_".concat(x++,"__")},y={};function j(){return y}function b(){x=0,y={}}function E(e){return e=e.replace(g,(function(e,t){var n=_();return y[n]={type:"inline",expression:t},n}))}var w=u.listitem;u.listitem=function(e){return w(E(e))};var A=u.paragraph;u.paragraph=function(e){return A(E(e))};var C=u.tablecell;u.tablecell=function(e,t){return C(E(e),t)},u.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,o.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,o.escape)(e,!0))+"</code></pre>"},u.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+r+'">'+e+"</h"+t+">"},i().setOptions({silent:!0,gfm:!0,pedantic:!1}),i().use({tokenizer:m,renderer:u}),t.ZP=i()},36082:function(e,t){"use strict";t.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},92832:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(92310),a=n.n(r),c=n(59301),i=n(36355),o=n(32441),s=n(9937);var l=e=>{const{getPrefixCls:t,direction:n}=(0,c.useContext)(i.E_),{prefixCls:r,className:l}=e,u=t("input-group",r),d=t("input"),[p,f]=(0,s.ZP)(d),h=a()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===n},f,l),v=(0,c.useContext)(o.aM),m=(0,c.useMemo)((()=>Object.assign(Object.assign({},v),{isFormItemInput:!1})),[v]);return p(c.createElement("span",{className:h,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},c.createElement(o.aM.Provider,{value:m},e.children)))},u=n(9432),d=n(22893),p=n(50382),f=n(55405),h=n(25629),v=n(59412),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const g=e=>e?c.createElement(p.Z,null):c.createElement(d.Z,null),x={click:"onClick",hover:"onMouseOver"};var _=c.forwardRef(((e,t)=>{const{visibilityToggle:n=!0}=e,r="object"==typeof n&&void 0!==n.visible,[o,s]=(0,c.useState)((()=>!!r&&n.visible)),l=(0,c.useRef)(null);c.useEffect((()=>{r&&s(n.visible)}),[r,n]);const d=(0,v.Z)(l),p=()=>{const{disabled:t}=e;t||(o&&d(),s((e=>{var t;const r=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,r)),r})))},{className:_,prefixCls:y,inputPrefixCls:j,size:b}=e,E=m(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:w}=c.useContext(i.E_),A=w("input",j),C=w("input-password",y),Z=n&&(t=>{const{action:n="click",iconRender:r=g}=e,a=x[n]||"",i=r(o),s={[a]:p,className:`${t}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return c.cloneElement(c.isValidElement(i)?i:c.createElement("span",null,i),s)})(C),N=a()(C,_,{[`${C}-${b}`]:!!b}),I=Object.assign(Object.assign({},(0,f.Z)(E,["suffix","iconRender","visibilityToggle"])),{type:o?"text":"password",className:N,prefixCls:A,suffix:Z});return b&&(I.size=b),c.createElement(u.Z,Object.assign({ref:(0,h.sQ)(t,l)},I))})),y=n(42653),j=n(92343),b=n(3113),E=n(19716),w=n(33234),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};var C=c.forwardRef(((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:s,suffix:l,enterButton:d=!1,addonAfter:p,loading:f,disabled:v,onSearch:m,onChange:g,onCompositionStart:x,onCompositionEnd:_}=e,C=A(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Z,direction:N}=c.useContext(i.E_),I=c.useRef(!1),O=Z("input-search",n),S=Z("input",r),{compactSize:k}=(0,w.ri)(O,N),T=(0,E.Z)((e=>{var t;return null!==(t=null!=s?s:k)&&void 0!==t?t:e})),L=c.useRef(null),R=e=>{var t;document.activeElement===(null===(t=L.current)||void 0===t?void 0:t.input)&&e.preventDefault()},B=e=>{var t,n;m&&m(null===(n=null===(t=L.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},P="boolean"==typeof d?c.createElement(y.Z,null):null,F=`${O}-button`;let M;const z=d||{},U=z.type&&!0===z.type.__ANT_BUTTON;M=U||"button"===z.type?(0,j.Tm)(z,Object.assign({onMouseDown:R,onClick:e=>{var t,n;null===(n=null===(t=null==z?void 0:z.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),B(e)},key:"enterButton"},U?{className:F,size:T}:{})):c.createElement(b.ZP,{className:F,type:d?"primary":void 0,size:T,disabled:v,key:"enterButton",onMouseDown:R,onClick:B,loading:f,icon:P},d),p&&(M=[M,(0,j.Tm)(p,{key:"addonAfter"})]);const D=a()(O,{[`${O}-rtl`]:"rtl"===N,[`${O}-${T}`]:!!T,[`${O}-with-button`]:!!d},o);return c.createElement(u.Z,Object.assign({ref:(0,h.sQ)(L,t),onPressEnter:e=>{I.current||f||B(e)}},C,{size:T,onCompositionStart:e=>{I.current=!0,null==x||x(e)},onCompositionEnd:e=>{I.current=!1,null==_||_(e)},prefixCls:S,addonAfter:M,suffix:l,onChange:e=>{e&&e.target&&"click"===e.type&&m&&m(e.target.value,e,{source:"clear"}),g&&g(e)},className:D,disabled:v}))})),Z=n(1643);const N=u.Z;N.Group=l,N.Search=C,N.TextArea=Z.Z,N.Password=_;var I=N},24334:function(e,t,n){var r,a;a="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var a,c=(n=n||{}).Base64,i="2.6.4",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(o),l=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(d,u)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},h=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},v=function(e){return h(p(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?m(v(e)):v(e)},x=function(e){return g(e,!0)};n.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var c=e[r],i=e[r+1],s=e[r+2],l=c<<16|i<<8|s;n+=o.charAt(l>>>18)+o.charAt(l>>>12&63)+(void 0!==i?o.charAt(l>>>6&63):"=")+(void 0!==s?o.charAt(63&l):"=")}return t?m(n):n});var _,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,j=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},b=function(e){return e.replace(y,j)},E=function(e){var t=e.length,n=t%4,r=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),a=[l(r>>>16),l(r>>>8&255),l(255&r)];return a.length-=[0,0,2,1][n],a.join("")},w=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,E)},A=function(e){return w(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(e){return b(w(e))},Z=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},N=function(e){return C(Z(e))};n.Uint8Array&&(_=function(e){return Uint8Array.from(A(Z(e)),(function(e){return e.charCodeAt(0)}))});var I=function(){var e=n.Base64;return n.Base64=c,e};if(n.Base64={VERSION:i,atob:A,btoa:h,fromBase64:N,toBase64:g,utob:p,encode:g,encodeURI:x,btou:b,decode:N,noConflict:I,fromUint8Array:a,toUint8Array:_},"function"==typeof Object.defineProperty){var O=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O((function(){return N(this)}))),Object.defineProperty(String.prototype,"toBase64",O((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",O((function(){return g(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r),{Base64:n.Base64}}(a)}}]);