From a88c4bf46f2c6a92fa511f6eb5e3133ec2d599d5 Mon Sep 17 00:00:00 2001 From: autosubmit Date: Tue, 18 Feb 2025 10:25:45 +0800 Subject: [PATCH] Auto Submit --- index.html | 2 +- ...ex.41a8ee87.async.js => p__Terminal__index.3625886d.async.js | 2 +- ...index.6282795f.async.js => p__tasks__index.28ef8d0c.async.js | 2 +- umi.d9707860.js => umi.59c55b75.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename p__Terminal__index.41a8ee87.async.js => p__Terminal__index.3625886d.async.js (98%) rename p__tasks__index.6282795f.async.js => p__tasks__index.28ef8d0c.async.js (99%) rename umi.d9707860.js => umi.59c55b75.js (99%) diff --git a/index.html b/index.html index 1305e07b50..54f83c0f9d 100644 --- a/index.html +++ b/index.html @@ -172,7 +172,7 @@ display: block !important; } - + \ No newline at end of file diff --git a/p__Terminal__index.41a8ee87.async.js b/p__Terminal__index.3625886d.async.js similarity index 98% rename from p__Terminal__index.41a8ee87.async.js rename to p__Terminal__index.3625886d.async.js index 1a43f88892..3c17c5cad9 100644 --- a/p__Terminal__index.41a8ee87.async.js +++ b/p__Terminal__index.3625886d.async.js @@ -1,4 +1,4 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[5111],{40001:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},73331:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},15277:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},47472:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},64358:function(){"use strict"},28119:function(){"use strict"},50172:function(Te,D,c){"use strict";c.d(D,{G0:function(){return Ie},JW:function(){return Le},Jd:function(){return I},Kl:function(){return Se},L5:function(){return s},MH:function(){return ce},MI:function(){return Re},Qo:function(){return v},SO:function(){return n},Tf:function(){return b},VT:function(){return Z},XO:function(){return f},Xy:function(){return E},Y0:function(){return U},Ye:function(){return Fe},Yv:function(){return Me},ZH:function(){return ke},am:function(){return K},bD:function(){return Ke},eA:function(){return C},fA:function(){return he},fY:function(){return k},g6:function(){return e},g7:function(){return Xe},gT:function(){return O},gn:function(){return Ae},h$:function(){return Oe},hG:function(){return g},i8:function(){return ie},j3:function(){return ye},lH:function(){return X},li:function(){return l},n4:function(){return p},pU:function(){return N},qK:function(){return y},sA:function(){return pe},sP:function(){return Q},t$:function(){return z},wj:function(){return De},zl:function(){return S}});var _=c(7660),x=c(88230),m=Object.defineProperty,h=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(te,ne,Ee)=>ne in te?m(te,ne,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):te[ne]=Ee,r=(te,ne)=>{for(var Ee in ne||(ne={}))o.call(ne,Ee)&&d(te,Ee,ne[Ee]);if(h)for(var Ee of h(ne))u.call(ne,Ee)&&d(te,Ee,ne[Ee]);return te},i=(te,ne,Ee)=>new Promise((xe,de)=>{var ue=F=>{try{G(Ee.next(F))}catch(H){de(H)}},ae=F=>{try{G(Ee.throw(F))}catch(H){de(H)}},G=F=>F.done?xe(F.value):Promise.resolve(F.value).then(ue,ae);G((Ee=Ee.apply(te,ne)).next())});const a=(0,x.oP)(),t={};a!=null&&a.homework_common_id&&(t.homework_common_id=a==null?void 0:a.homework_common_id),a!=null&&a.exercisesId&&(t.exercise_id=a==null?void 0:a.exercisesId),console.log(a,t,"urlParamsAll");function f(te,ne){return(0,_.U2)(`tasks/${te}.json`,r(r({},ne),t))}function e(te,ne={}){return(0,_.U2)(`myshixuns/${te}/challenges.json`,r({},ne))}function n(te,ne){return(0,_.U2)(`myshixuns/${te}/subject_challenges.json`,ne)}function s(te,ne,Ee){return(0,_.U2)(`tasks/${te}/star.json`,{shixun_id:ne,star:Ee})}function l(te,ne){return ne.path&&(ne.path=encodeURIComponent(ne.path)),(0,_.U2)(`tasks/${te}/rep_content.json`,r(r({},ne),t))}function p(te,ne){return(0,_.v_)(`myshixuns/${te}/update_file.json`,r(r({},ne),t))}function y(te,ne){return(0,_.U2)(`tasks/${te}/reset_original_code.json`,r(r({},ne),t))}function b(te,ne){return(0,_.v_)(`myshixuns/${te}/reset_repository.json`,ne)}function g(te,ne){return(0,_.U2)(`tasks/${te}/reset_passed_code.json`,r(r({},ne),t))}function E(te,ne){return(0,_.v_)(`tasks/${te}/game_build.json`,r(r({},ne),t))}function C(te){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:te})}function v(te,ne){return(0,_.U2)(`tasks/${te}/game_status.json`,r(r({},ne),t))}function S(te,ne){return(0,_.v_)(`tasks/${te}/choose_build.json`,r(r({},ne),t))}function k(te){return(0,_.U2)(`myshixuns/${te}/get_remaining_time.json`)}function O(te){return(0,_.U2)(`tasks/${te}/picture_display.json`,t)}function R(te,ne){return get(`courses/${te}/inform_detail.json`,ne)}function U(te){return(0,_.v_)(`tasks/${te}/plus_or_cancel_praise.json`)}function N(te,ne={}){return(0,_.v_)(`myshixuns/${te}/repository.json`,ne)}function pe(te,ne={}){return(0,_.U2)(`myshixuns/${te}/start.json`,ne)}function Z(te,ne={}){return(0,_.v_)(`myshixuns/${te}/force_delete_pod.json`,ne)}function le(te,ne={}){return get(`myshixuns/${te}/set_tpisession.json`,ne)}function L(te){return get(`myshixuns/${te}/reset_pod.json`)}function K(te,ne){return(0,_.U2)(`myshixuns/${te}/reset_pod.json`,ne)}function I(te,ne){return(0,_.ZP)(`/api/tasks/${te}/reboot_esc.json`,{method:"post",body:ne})}function z(te){return(0,_.U2)(`tasks/${te}/check_test_sets.json`)}function X(te){return(0,_.U2)(`tasks/${te}/get_answer_info.json`)}function Q(te){return(0,_.U2)(`tasks/${te}/get_choose_answer.json`)}function ce(te){return(0,_.U2)(`tasks/${te}/unlock_choose_answer.json`)}function ye(te,ne){return(0,_.U2)(`tasks/${te}/unlock_answer.json`,{answer_id:ne})}function Le(te,ne,Ee,xe){return(0,_.v_)(`tasks/${te}/set_games_status.json`,r({result:ne,data:Ee},xe||{}))}function Se(te,ne){return(0,_.U2)(`myshixuns/${te}/active_pod.json`,ne)}function ie(te,ne){return(0,_.U2)(`tasks/${te}/rank_list.json`,ne)}function he(te,ne){return(0,_.v_)(`tasks/${te}/close_windows_vnc.json`,{tpi_id:ne})}function ke(te,ne){return(0,_.U2)(`tasks/${te}/commit_files.json`,ne)}function Ae(te,ne){return(0,_.U2)(`tasks/${te}/pull_files.json`,ne)}function Oe(te,ne){return(0,_.v_)(`tasks/${te}/log_output`,ne)}function Me(te,ne){return(0,_.U2)(`tasks/${te}/stop_log_output.json`,ne)}function Re(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/add_file.json`,{method:"post",body:te})})}function Ke(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/delete_git_file.json`,{method:"Delete",body:te})})}function Xe(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/mv_file.json`,{method:"post",body:te})})}function Ne(te){return i(this,null,function*(){return te.path&&(te.path=encodeURIComponent(te.path)),Fetch(`/api/tasks/${te.id}/rep_content.json`,{method:"get",params:te})})}function Fe(te,ne){return(0,_.ZP)(`/api/shixuns/${te}/set_start_permanent.json`,{method:"put",body:ne})}function De(te){return i(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:te})})}function Ie(te){return i(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:te})})}},7651:function(Te,D,c){"use strict";c.d(D,{Z:function(){return h}});var _=c(24459),x={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},m=c(59301),h=({message:o,className:u,children:d,style:r={}})=>m.createElement("div",{className:`custom-spinner ${x.idsRingWrapper} ${u}`},m.createElement("div",{className:x.ldsRing},m.createElement("div",null),m.createElement("div",null),m.createElement("div",null),m.createElement("div",null)),o?m.createElement("p",{style:r},o):null,d,m.createElement(_.Outlet,null))},19647:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(59301),x=c(4676);class m extends _.Component{constructor(o){super(o);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:o}=this.props;return(0,x.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},22004:function(Te,D,c){"use strict";c.r(D);var _=c(59301),x=c(24459),m=c(45123),h=c(20263),o=c(28119),u=c(50484),d=c(7660),r=c(59301),i=Object.defineProperty,a=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,e=(p,y,b)=>y in p?i(p,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[y]=b,n=(p,y)=>{for(var b in y||(y={}))t.call(y,b)&&e(p,b,y[b]);if(a)for(var b of a(y))f.call(y,b)&&e(p,b,y[b]);return p},s=(p,y,b)=>new Promise((g,E)=>{var C=k=>{try{S(b.next(k))}catch(O){E(O)}},v=k=>{try{S(b.throw(k))}catch(O){E(O)}},S=k=>k.done?g(k.value):Promise.resolve(k.value).then(C,v);S((b=b.apply(p,y)).next())});const l=({classroomList:p,globalSetting:y,loading:b,dispatch:g})=>{var E;const[C,v]=(0,_.useState)({}),[S,k]=(0,_.useState)({}),O=(0,x.useParams)(),[R]=(0,x.useSearchParams)();let U="68yrbx3ech4a";switch(R.get("type")){case"windows":U="hvp5tzfof4wl";break;case"vnc":U="m3ifqz82epo9";break}let N;(0,_.useEffect)(()=>{pe()},[]),(0,_.useEffect)(()=>{C.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[C]);const pe=()=>s(void 0,null,function*(){var Z,le;const L=yield(0,d.ZP)(`/api/tasks/${R.get("taskId")||U||"68yrbx3ech4a"}.json`,{method:"get"});if(k(n({},L)),R.get("type")==="terminal"){const K=yield(0,d.ZP)(`/api/myshixuns/${(Z=L==null?void 0:L.myshixun)==null?void 0:Z.identifier}/start.json`,{method:"get",game_id:(le=L==null?void 0:L.game)==null?void 0:le.id});v(n({},(K==null?void 0:K.data)||{}))}R.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},R.get("type")==="terminal"&&r.createElement(m.Z,{sshConfigData:C,sid:1}),R.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(h.Z,{taskId:U,myshixunId:(E=S==null?void 0:S.myshixun)==null?void 0:E.identifier,vnc_url:R.get("type")==="vnc",window_vnc_url:R.get("type")==="windows",taskData:S}))};D.default=(0,x.connect)(({classroomList:p,loading:y,globalSetting:b})=>({classroomList:p,globalSetting:b,loading:y.models.classroomList}))(l)},20263:function(Te,D,c){"use strict";c.d(D,{Z:function(){return I}});var _=c(59301),x=c(43418),m=c(8591),h=c(93948),o=c(7651),u=c(76374),d=c(19647),r=c(24459),i=c(88230),a=c(92832),t=c(3113);const f=a.default.TextArea;var e=({onCancel:z,onSave:X,content:Q})=>{const[ce,ye]=(0,_.useState)(Q);function Le(ie){ye(ie.target.value)}function Se(){X(ce)}return(0,_.useEffect)(()=>{ye(Q)},[Q]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(f,{value:ce,onChange:Le,className:"clipboard"}),_.createElement("p",null," ",_.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),_.createElement("p",null," ",_.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),_.createElement("div",{className:"btn-action-container"},_.createElement(t.ZP,{type:"ghost",onClick:z,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(t.ZP,{type:"primary",onClick:Se},"\u4FDD\u5B58")))},n=c(20736),s=c(50172),l=c(62013),p=c(50484),y=c(7660),b=c(59301),g=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,O=(z,X,Q)=>X in z?g(z,X,{enumerable:!0,configurable:!0,writable:!0,value:Q}):z[X]=Q,R=(z,X)=>{for(var Q in X||(X={}))S.call(X,Q)&&O(z,Q,X[Q]);if(v)for(var Q of v(X))k.call(X,Q)&&O(z,Q,X[Q]);return z},U=(z,X)=>E(z,C(X)),N=(z,X,Q)=>new Promise((ce,ye)=>{var Le=he=>{try{ie(Q.next(he))}catch(ke){ye(ke)}},Se=he=>{try{ie(Q.throw(he))}catch(ke){ye(ke)}},ie=he=>he.done?ce(he.value):Promise.resolve(he.value).then(Le,Se);ie((Q=Q.apply(z,X)).next())});function pe(z){return z.replace(/\\u([\dA-Za-z]{4})/g,function(X,Q){return String.fromCharCode(parseInt("0x"+Q))})}function Z(z){z||(z=window.location.search);let X=z.substr(1),Q={};return X.split("&").forEach(function(ce){let ye=ce.split("=");Q[ye[0]]=decodeURIComponent(ye[1])}),Q}const le={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var L=(z=>(z[z.SET_LOADING=0]="SET_LOADING",z[z.SET_IS_LARGE=1]="SET_IS_LARGE",z[z.SET_MES=2]="SET_MES",z[z.SET_STATE=3]="SET_STATE",z[z.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",z[z.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",z[z.UPDATE_ALL=6]="UPDATE_ALL",z))(L||{});function K(z,X){switch(X.type){case 0:return U(R({},z),{loading:X.payload});case 1:return R({},U(R({},z),{isLarge:X.payload}));case 2:return U(R({},z),{mes:X.payload});case 3:return R(R({},z),X.payload);case 5:return U(R({},z),{transferContent:X.payload});case 4:return U(R({},z),{showClipBoardBox:X.payload});case 6:return R({loading:z.loading},X.payload);default:throw new Error}}var I=({vnc_url:z,window_vnc_url:X,linux_vnc:Q,virtual_machine:ce,taskData:ye,shixun_environment_id:Le,tab_type:Se,instance_startup_type:ie,index_tab:he,tpi_type:ke})=>{const Ae=(0,_.useRef)(),Oe=(0,_.useRef)(),Me=(0,_.useRef)(),Re=(0,_.useRef)(),Ke=(0,_.useRef)(),Xe=(0,_.useRef)(),Ne=(0,_.useRef)(),Fe=(0,_.useRef)(),[De,Ie]=(0,_.useReducer)(K,le),[te,ne]=(0,_.useState)(0),{mes:Ee,loading:xe,showClipBoardBox:de,isLarge:ue,transferContent:ae}=De,G=(0,_.useRef)(),F=(0,_.useRef)(),[H]=(0,r.useSearchParams)();let[T,V]=(0,_.useState)(0),_e=(0,_.useRef)();const be=(0,r.useParams)();(0,_.useEffect)(()=>()=>{var q,P;(P=(q=Oe.current)==null?void 0:q.disconnect)==null||P.call(q),clearTimeout(Fe.current),clearInterval(G.current)},[]),(0,_.useEffect)(()=>{F.current=De.loading},[De.loading]);const j=()=>{var q;ie===2?setTimeout(()=>{Ce()},1500):((q=Me==null?void 0:Me.current)==null?void 0:q.resizeSession)!==void 0&&((0,n.vp)()?Me.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,n.gH)(),j),()=>{document.removeEventListener((0,n.gH)(),j)}),[]);function A(){Ie({type:4,payload:!1})}function $(){Ie({type:1,payload:!ue})}function Y(q){return Ae.current&&(Re.current=new u.Z(P=>{var W;for(let J of P)ie===2&&Ce(),(J.target.offsetHeight>0||J.target.offsetWidth>0)&&q&&(q.scaleViewport=!0,(W=q==null?void 0:q._eventHandlers)==null||W.windowResize())}),Re.current.observe(Ae.current)),Re.current}const se=()=>N(void 0,null,function*(){var q,P,W,J,we,me,ge;let He={};H.get("type")==="exercises"?He.exercise_id=H.get("exercisesId"):be.courseId&&be.homeworkId&&(He.homework_common_id=be.homeworkId);const ze=yield(0,s.sA)((q=ye.myshixun)==null?void 0:q.identifier,R(U(R({},be),{taskId:be.taskId,shixun_environment_id:Le,tab_type:Se}),He));if((W=(P=ze==null?void 0:ze.data)==null?void 0:P.data_list)!=null&&W.length)return p.Z.publish("pod-restrict-data",{identifier:(J=ze==null?void 0:ze.data)==null?void 0:J.identifier,data_list:(we=ze==null?void 0:ze.data)==null?void 0:we.data_list}),Promise.reject();if((ze==null?void 0:ze.status)===-3)return new Promise((Ue,Be)=>N(void 0,null,function*(){x.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>N(void 0,null,function*(){clearTimeout(_e.current),V(0),yield(0,s.fA)(be.taskId,ze==null?void 0:ze.message),ne(te+1)})})}));if((ze==null?void 0:ze.status)===-1)throw new String(ze==null?void 0:ze.message);if((ze==null?void 0:ze.status)===0)return ce&&((0,i.d8)("PVEAuthCookie",(ge=(me=ze==null?void 0:ze.data)==null?void 0:me.cookie_options)==null?void 0:ge.cookies_value,1),(0,i.d8)("PVELangCookie","zh_CN",1)),p.Z.publish("update-windows-time",ze==null?void 0:ze.data),p.Z.publish("send-tabs-result-data",U(R({},ze==null?void 0:ze.data),{index_tab:he})),ze});function ve(){V(100),clearTimeout(_e.current),setTimeout(()=>{Ie({type:0,payload:!1})},1300),clearTimeout(G.current)}const oe=()=>{Me.current=new l.Z(Ae.current,Ne.current,{credentials:{password:Xe.current},wsProtocols:["binary"],show_dot:!0}),Me.current.removeEventListener("disconnect",re),Me.current.removeEventListener("connect",ve),Me.current.removeEventListener("clipboard",B),window.rfbs2=Me.current,Re.current=Y(Me.current),Me.current.viewOnly=be.view_only||!1,Me.current.scaleViewport=be.scale||!0,Me.current.showDotCursor=!0,Me.current.resizeSession=!0,Me.current.addEventListener("disconnect",re),Me.current.addEventListener("connect",ve),Me.current.addEventListener("clipboard",B)};function B(q){const P=pe(q.detail.text);Ie({type:5,payload:P})}function re(){if(X)Ie({type:0,payload:!0}),ne(te+1);else{if(clearTimeout(Fe.current),oe(),F.current)return;Fe.current=setTimeout(()=>{ne(te+1)},6e3)}setTimeout(()=>{var q,P;(P=(q=Me.current)==null?void 0:q.connect)==null||P.call(q)},3e3)}(0,_.useEffect)(()=>{if(p.Z.subscribe(`reset-linux-windows-vnc-${he}`,()=>{ne(te+1)}),(X||z||Q||ce)&&Ae.current){clearTimeout(_e.current),ie===2&&Ce(),new Promise(()=>N(void 0,null,function*(){var J,we,me,ge,He;const ze=Z();let Ue=yield se();if(Q||ce){const Be=(we=(J=Ue==null?void 0:Ue.data)==null?void 0:J.link_url)!=null&&we.includes("?")?"&":"?";Ke.current.src=((me=Ue==null?void 0:Ue.data)==null?void 0:me.link_url)+Be+"time="+Date.now(),Ie({type:0,payload:!1});return}else if(X)Xe.current="Edu123",Ne.current=decodeURIComponent((ge=Ue==null?void 0:Ue.data)==null?void 0:ge.link_url);else{const Be=new URL(decodeURIComponent((He=Ue==null?void 0:Ue.data)==null?void 0:He.link_url)),{protocol:je,searchParams:Pe,host:We,search:Ze}=Be,Qe=(0,i.en)(Ze);Xe.current=Pe.get("password"),Ne.current=`${je==="https:"?"wss":"ws"}://${We}/${Qe.path||"websockify"}`}if(ie===2){setTimeout(()=>{var Be,je,Pe,We;Y(),Ke.current.style.cssText=Ke.current.style.cssText+"width:1920px;height:1080px;position:initial",Ke.current.src=`/rdp.html?${(Be=Ue==null?void 0:Ue.data)!=null&&Be.gpPort?"gpPort="+((je=Ue==null?void 0:Ue.data)==null?void 0:je.gpPort)+"&password="+((Pe=Ue==null?void 0:Ue.data)==null?void 0:Pe.password)+"&":""}tpiId=${(We=ye==null?void 0:ye.myshixun)==null?void 0:We.id}&envId=${Le}&tpiType=${ke}`,Ie({type:0,payload:!1})},5e3);return}oe()}));const q=p.Z.subscribe(`vnc-reset-${he}`,J=>{if(J==="\u53D6\u6D88"){Ie({type:0,payload:!1});return}V(0),Ie({type:3,payload:{loading:!0,mes:J||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),P=p.Z.subscribe(`send-ctrl-alt-delete-${he}`,()=>{var J;(J=Me.current)==null||J.sendCtrlAltDel(),m.ZP.success("\u53D1\u9001\u6210\u529F")}),W=p.Z.subscribe(`show-clipboard-box-${he}`,()=>{Ie({type:4,payload:!0})});return V(0),()=>{var J,we,me,ge;(J=Me.current)==null||J.removeEventListener("disconnect",re),(we=Me.current)==null||we.removeEventListener("connect",ve),(me=Me.current)==null||me.removeEventListener("clipboard",B),q(),P(),W(),Ae.current&&((ge=Re.current)==null||ge.unobserve(Ae.current))}}},[z,X,Q,te,Le,Se]);function M(){var q,P;(P=(q=Me.current)==null?void 0:q.sendKey)==null||P.call(q,135)}function fe(q){return N(this,null,function*(){var P;if(z){const W=q,J=yield(0,y.ZP)(`/api/tasks/${be.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:Le}});(J==null?void 0:J.status)===0&&(Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A())}else(P=Me.current)==null||P.clipboardPasteFrom(q),Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A()})}function Ce(){var q,P;q=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ke.current.parentElement.className="wh1080p",Ke.current.parentElement.style.cssText=`transform:scale(${q});transform-origin:center center`,Ae.current.style.cssText="translate(-50%, -50%) scale("+q+")"}(0,_.useEffect)(()=>{T==0&&(clearTimeout(_e.current),w())},[T]);const w=()=>{T>99?T=99:(T=T+1,_e.current=setTimeout(()=>{w()},1500)),T<100&&V(T)},ee=(0,_.useMemo)(()=>xe?"none":Q||ce||X&&ie===2?"block":"none",[Q,xe,ce,X]);return b.createElement(_.Fragment,null,ue&&b.createElement("a",{className:"btn-vnc-resize",onClick:$},b.createElement("i",{className:"iconfont icon-tuichuquanping"})),b.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:ee==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},b.createElement("div",null,b.createElement("iframe",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},frameBorder:"0",ref:Ke,allowFullScreen:!0}))),b.createElement("div",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},className:`${X?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ue?"full-screen":""}`},xe?b.createElement(o.Z,{message:Ee,style:{color:"#0152d9"}},b.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},b.createElement(h.Z,{percent:T,format:q=>b.createElement("span",{className:"c-white"},q,"%")}))):null,b.createElement("div",{ref:Ae,className:`vnc-panel ${xe?"hidden zIndexf1":"animated fadeIn"}`})),b.createElement(d.Z,null,b.createElement(x.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:de,onCancel:A,footer:null},b.createElement(e,{onCancel:A,onSave:fe,content:ae}))))}},45123:function(Te,D,c){"use strict";c.d(D,{Z:function(){return S}});var _=c(59301),x=c(24334),m=c(34376),h=c(64358),o={"xterm-panel":"xterm-panel___XA0p9"},u=c(50484),d=c(76374),r=c(50172),i=c(24459),a=c(88230),t=c(43418),f=c(59301),e=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(k,O,R)=>O in k?e(k,O,{enumerable:!0,configurable:!0,writable:!0,value:R}):k[O]=R,g=(k,O)=>{for(var R in O||(O={}))p.call(O,R)&&b(k,R,O[R]);if(l)for(var R of l(O))y.call(O,R)&&b(k,R,O[R]);return k},E=(k,O)=>n(k,s(O)),C=(k,O,R)=>new Promise((U,N)=>{var pe=L=>{try{le(R.next(L))}catch(K){N(K)}},Z=L=>{try{le(R.throw(L))}catch(K){N(K)}},le=L=>L.done?U(L.value):Promise.resolve(L.value).then(pe,Z);le((R=R.apply(k,O)).next())});const v=3e4;var S=({itemData:k={},game:O,myshixun:R})=>{const U=(0,i.useParams)(),[N,pe]=(0,_.useState)(null),[Z,le]=(0,_.useState)({}),{link_url:L,password:K,port:I}=Z,z=(0,_.useRef)(),X=(0,_.useRef)(),Q=(0,_.useRef)(!1),ce=(0,_.useRef)(!1),ye=(0,_.useRef)(!0),Le=(0,a.oP)(),[Se]=(0,i.useSearchParams)(),{shixun_environment_id:ie,position:he,tab_type:ke,index_tab:Ae,command_string:Oe}=k;(0,_.useEffect)(()=>{Ke()},[]);function Me(Xe,Ne,Fe){let De=Fe._core._renderService.dimensions.actualCellWidth||9.5,Ie=Fe._core._renderService.dimensions.actualCellHeight||18;const te=Math.floor(Ne/Ie);return[Math.floor(Xe/De),te]}function Re(Xe,Ne){const Fe=new d.Z(De=>{for(let Ie of De)if(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0){const[te,ne]=Me(Ie.target.offsetWidth,Ie.target.offsetHeight,Xe);console.log("cols, rows",te,ne),u.Z.publish(`ssh-xterm-resize-${Ae}`,{columns:te,rows:ne,width:Ie.target.offsetWidth,height:Ie.target.offsetHeight}),Xe.resize(te,ne);const Ee=x.Base64.decode("IA=="),xe=x.Base64.decode("CBtbSw==");Xe.write(Ee),Xe.write(xe)}});return Fe.observe(Ne),Fe}function Ke(){return C(this,null,function*(){var Xe,Ne,Fe,De,Ie;let te={};Se.get("type")==="exercises"?te.exercise_id=Se.get("exercisesId"):U.courseId&&U.homeworkId&&(te.homework_common_id=U.homeworkId);const ne=yield(0,r.sA)(R==null?void 0:R.identifier,g(g({shixun_environment_id:ie,tab_type:ke,game_id:O.id},Le),te));if((Ne=(Xe=ne==null?void 0:ne.data)==null?void 0:Xe.data_list)!=null&&Ne.length){u.Z.publish("pod-restrict-data",{identifier:(Fe=ne==null?void 0:ne.data)==null?void 0:Fe.identifier,data_list:(De=ne==null?void 0:ne.data)==null?void 0:De.data_list});return}if((ne==null?void 0:ne.status)===-3)return new Promise((Ee,xe)=>C(this,null,function*(){t.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>C(this,null,function*(){yield closeWindowsVnc(U.taskId,ne==null?void 0:ne.message),init()})})}));if(((Ie=ne==null?void 0:ne.data)==null?void 0:Ie.code)===200036){t.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:f.createElement("div",{className:"mb10"},"\u7531\u4E8E\u4E0A\u6B21\u7684\u5B9E\u9A8C\u73AF\u5883\u672A\u6B63\u5E38\u5173\u95ED\uFF0C\u65E0\u6CD5\u518D\u5F00\u542F\u65B0\u7684\u5B9E\u9A8C\u73AF\u5883,",f.createElement("br",null),f.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(R==null?void 0:R.identifier,{shixun_environment_id:ie,tab_type:ke,game_id:O.id}).then(Ee=>{(Ee==null?void 0:Ee.status)==0&&Ke()})}});return}(ne==null?void 0:ne.status)===0&&(u.Z.publish("update-windows-time",ne==null?void 0:ne.data),u.Z.publish("send-tabs-result-data",E(g({},ne==null?void 0:ne.data),{index_tab:Ae})),le(ne.data),setTimeout(()=>u.Z.publish(`create-socket-${Ae}`),300))})}return(0,_.useEffect)(()=>{if(z.current&&L){const Xe=new m.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Xe.open(z.current),Xe.onData(Fe=>{X.current&&X.current.readyState===1&&X.current.send(JSON.stringify({tp:"client",data:Fe}))}),Xe.write("Connecting..."),pe(Xe);const Ne=Re(Xe,z.current);return()=>{Xe.dispose(),z.current&&(Ne==null||Ne.unobserve(z.current))}}},[L,z.current]),(0,_.useEffect)(()=>{if(N&&L){let Xe=function(){const De=new WebSocket(L);X.current=De,De.onopen=()=>{let te=N.element.parentElement;if(te){let ne=te.offsetWidth,Ee=te.offsetHeight;console.log("init",{tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}),De.send(JSON.stringify({tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}))}N.focus()},De.onerror=te=>{console.log("------in socket error----",te,De,L)},De.onmessage=te=>{ce.current=!1,Q.current||(N.write("\r"),setTimeout(()=>{},1e3)),Q.current=!0,console.log("event:",te);const ne=x.Base64.decode(te.data.toString());let Ee=N._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ne,Ee,N),N.write(ne),Oe!=null&&Oe.length?ye.current&&(ye.current=!1,setTimeout(()=>{X.current.send(JSON.stringify({tp:"client",data:(Oe==null?void 0:Oe.join("\r"))+"\r"})),N.setOption("disableStdin",!1)},1e3)):(ye.current=!1,N.setOption("disableStdin",!1))};const Ie=setInterval(()=>{var te;X.current&&((te=X.current)==null||te.send(JSON.stringify({tp:"h"})))},v);De.onclose=te=>{Ie&&clearInterval(Ie),console.log(Ie,"tid",Ae),ce.current||N.write(`\r +(self.webpackChunk=self.webpackChunk||[]).push([[5111],{40001:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},73331:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},15277:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={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"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},47472:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(92413),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},64358:function(){"use strict"},28119:function(){"use strict"},50172:function(Te,D,c){"use strict";c.d(D,{G0:function(){return Ie},JW:function(){return Le},Jd:function(){return I},Kl:function(){return Se},L5:function(){return s},MH:function(){return ce},MI:function(){return Re},Qo:function(){return v},SO:function(){return n},Tf:function(){return b},VT:function(){return Z},XO:function(){return f},Xy:function(){return E},Y0:function(){return U},Ye:function(){return Fe},Yv:function(){return Me},ZH:function(){return ke},am:function(){return K},bD:function(){return Ke},eA:function(){return C},fA:function(){return he},fY:function(){return k},g6:function(){return e},g7:function(){return Xe},gT:function(){return O},gn:function(){return Ae},h$:function(){return Oe},hG:function(){return g},i8:function(){return ie},j3:function(){return ye},lH:function(){return X},li:function(){return l},n4:function(){return p},pU:function(){return N},qK:function(){return y},sA:function(){return pe},sP:function(){return Q},t$:function(){return z},wj:function(){return De},zl:function(){return S}});var _=c(7660),x=c(88230),m=Object.defineProperty,h=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(te,ne,Ee)=>ne in te?m(te,ne,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):te[ne]=Ee,r=(te,ne)=>{for(var Ee in ne||(ne={}))o.call(ne,Ee)&&d(te,Ee,ne[Ee]);if(h)for(var Ee of h(ne))u.call(ne,Ee)&&d(te,Ee,ne[Ee]);return te},i=(te,ne,Ee)=>new Promise((xe,de)=>{var ue=F=>{try{G(Ee.next(F))}catch(H){de(H)}},ae=F=>{try{G(Ee.throw(F))}catch(H){de(H)}},G=F=>F.done?xe(F.value):Promise.resolve(F.value).then(ue,ae);G((Ee=Ee.apply(te,ne)).next())});const a=(0,x.oP)(),t={};a!=null&&a.homework_common_id&&(t.homework_common_id=a==null?void 0:a.homework_common_id),a!=null&&a.exercisesId&&(t.exercise_id=a==null?void 0:a.exercisesId),console.log(a,t,"urlParamsAll");function f(te,ne){return(0,_.U2)(`tasks/${te}.json`,r(r({},ne),t))}function e(te,ne={}){return(0,_.U2)(`myshixuns/${te}/challenges.json`,r({},ne))}function n(te,ne){return(0,_.U2)(`myshixuns/${te}/subject_challenges.json`,ne)}function s(te,ne,Ee){return(0,_.U2)(`tasks/${te}/star.json`,{shixun_id:ne,star:Ee})}function l(te,ne){return ne.path&&(ne.path=encodeURIComponent(ne.path)),(0,_.U2)(`tasks/${te}/rep_content.json`,r(r({},ne),t))}function p(te,ne){return(0,_.v_)(`myshixuns/${te}/update_file.json`,r(r({},ne),t))}function y(te,ne){return(0,_.U2)(`tasks/${te}/reset_original_code.json`,r(r({},ne),t))}function b(te,ne){return(0,_.v_)(`myshixuns/${te}/reset_repository.json`,ne)}function g(te,ne){return(0,_.U2)(`tasks/${te}/reset_passed_code.json`,r(r({},ne),t))}function E(te,ne){return(0,_.v_)(`tasks/${te}/game_build.json`,r(r({},ne),t))}function C(te){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:te})}function v(te,ne){return(0,_.U2)(`tasks/${te}/game_status.json`,r(r({},ne),t))}function S(te,ne){return(0,_.v_)(`tasks/${te}/choose_build.json`,r(r({},ne),t))}function k(te){return(0,_.U2)(`myshixuns/${te}/get_remaining_time.json`)}function O(te){return(0,_.U2)(`tasks/${te}/picture_display.json`,t)}function R(te,ne){return get(`courses/${te}/inform_detail.json`,ne)}function U(te){return(0,_.v_)(`tasks/${te}/plus_or_cancel_praise.json`)}function N(te,ne={}){return(0,_.v_)(`myshixuns/${te}/repository.json`,ne)}function pe(te,ne={}){return(0,_.U2)(`myshixuns/${te}/start.json`,ne)}function Z(te,ne={}){return(0,_.v_)(`myshixuns/${te}/force_delete_pod.json`,ne)}function le(te,ne={}){return get(`myshixuns/${te}/set_tpisession.json`,ne)}function L(te){return get(`myshixuns/${te}/reset_pod.json`)}function K(te,ne){return(0,_.U2)(`myshixuns/${te}/reset_pod.json`,ne)}function I(te,ne){return(0,_.ZP)(`/api/tasks/${te}/reboot_esc.json`,{method:"post",body:ne})}function z(te){return(0,_.U2)(`tasks/${te}/check_test_sets.json`)}function X(te){return(0,_.U2)(`tasks/${te}/get_answer_info.json`)}function Q(te){return(0,_.U2)(`tasks/${te}/get_choose_answer.json`)}function ce(te){return(0,_.U2)(`tasks/${te}/unlock_choose_answer.json`)}function ye(te,ne){return(0,_.U2)(`tasks/${te}/unlock_answer.json`,{answer_id:ne})}function Le(te,ne,Ee,xe){return(0,_.v_)(`tasks/${te}/set_games_status.json`,r({result:ne,data:Ee},xe||{}))}function Se(te,ne){return(0,_.U2)(`myshixuns/${te}/active_pod.json`,ne)}function ie(te,ne){return(0,_.U2)(`tasks/${te}/rank_list.json`,ne)}function he(te,ne){return(0,_.v_)(`tasks/${te}/close_windows_vnc.json`,{tpi_id:ne})}function ke(te,ne){return(0,_.U2)(`tasks/${te}/commit_files.json`,ne)}function Ae(te,ne){return(0,_.U2)(`tasks/${te}/pull_files.json`,ne)}function Oe(te,ne){return(0,_.v_)(`tasks/${te}/log_output`,ne)}function Me(te,ne){return(0,_.U2)(`tasks/${te}/stop_log_output.json`,ne)}function Re(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/add_file.json`,{method:"post",body:te})})}function Ke(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/delete_git_file.json`,{method:"Delete",body:te})})}function Xe(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/mv_file.json`,{method:"post",body:te})})}function Ne(te){return i(this,null,function*(){return te.path&&(te.path=encodeURIComponent(te.path)),Fetch(`/api/tasks/${te.id}/rep_content.json`,{method:"get",params:te})})}function Fe(te,ne){return(0,_.ZP)(`/api/shixuns/${te}/set_start_permanent.json`,{method:"put",body:ne})}function De(te){return i(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:te})})}function Ie(te){return i(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:te})})}},7651:function(Te,D,c){"use strict";c.d(D,{Z:function(){return h}});var _=c(24459),x={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},m=c(59301),h=({message:o,className:u,children:d,style:r={}})=>m.createElement("div",{className:`custom-spinner ${x.idsRingWrapper} ${u}`},m.createElement("div",{className:x.ldsRing},m.createElement("div",null),m.createElement("div",null),m.createElement("div",null),m.createElement("div",null)),o?m.createElement("p",{style:r},o):null,d,m.createElement(_.Outlet,null))},19647:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(59301),x=c(4676);class m extends _.Component{constructor(o){super(o);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:o}=this.props;return(0,x.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},22004:function(Te,D,c){"use strict";c.r(D);var _=c(59301),x=c(24459),m=c(45123),h=c(20263),o=c(28119),u=c(50484),d=c(7660),r=c(59301),i=Object.defineProperty,a=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,e=(p,y,b)=>y in p?i(p,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[y]=b,n=(p,y)=>{for(var b in y||(y={}))t.call(y,b)&&e(p,b,y[b]);if(a)for(var b of a(y))f.call(y,b)&&e(p,b,y[b]);return p},s=(p,y,b)=>new Promise((g,E)=>{var C=k=>{try{S(b.next(k))}catch(O){E(O)}},v=k=>{try{S(b.throw(k))}catch(O){E(O)}},S=k=>k.done?g(k.value):Promise.resolve(k.value).then(C,v);S((b=b.apply(p,y)).next())});const l=({classroomList:p,globalSetting:y,loading:b,dispatch:g})=>{var E;const[C,v]=(0,_.useState)({}),[S,k]=(0,_.useState)({}),O=(0,x.useParams)(),[R]=(0,x.useSearchParams)();let U="68yrbx3ech4a";switch(R.get("type")){case"windows":U="hvp5tzfof4wl";break;case"vnc":U="m3ifqz82epo9";break}let N;(0,_.useEffect)(()=>{pe()},[]),(0,_.useEffect)(()=>{C.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[C]);const pe=()=>s(void 0,null,function*(){var Z,le;const L=yield(0,d.ZP)(`/api/tasks/${R.get("taskId")||U||"68yrbx3ech4a"}.json`,{method:"get"});if(k(n({},L)),R.get("type")==="terminal"){const K=yield(0,d.ZP)(`/api/myshixuns/${(Z=L==null?void 0:L.myshixun)==null?void 0:Z.identifier}/start.json`,{method:"get",game_id:(le=L==null?void 0:L.game)==null?void 0:le.id});v(n({},(K==null?void 0:K.data)||{}))}R.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},R.get("type")==="terminal"&&r.createElement(m.Z,{sshConfigData:C,sid:1}),R.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(h.Z,{taskId:U,myshixunId:(E=S==null?void 0:S.myshixun)==null?void 0:E.identifier,vnc_url:R.get("type")==="vnc",window_vnc_url:R.get("type")==="windows",taskData:S}))};D.default=(0,x.connect)(({classroomList:p,loading:y,globalSetting:b})=>({classroomList:p,globalSetting:b,loading:y.models.classroomList}))(l)},20263:function(Te,D,c){"use strict";c.d(D,{Z:function(){return I}});var _=c(59301),x=c(43418),m=c(8591),h=c(93948),o=c(7651),u=c(76374),d=c(19647),r=c(24459),i=c(88230),a=c(92832),t=c(3113);const f=a.default.TextArea;var e=({onCancel:z,onSave:X,content:Q})=>{const[ce,ye]=(0,_.useState)(Q);function Le(ie){ye(ie.target.value)}function Se(){X(ce)}return(0,_.useEffect)(()=>{ye(Q)},[Q]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(f,{value:ce,onChange:Le,className:"clipboard"}),_.createElement("p",null," ",_.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),_.createElement("p",null," ",_.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),_.createElement("div",{className:"btn-action-container"},_.createElement(t.ZP,{type:"ghost",onClick:z,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(t.ZP,{type:"primary",onClick:Se},"\u4FDD\u5B58")))},n=c(20736),s=c(50172),l=c(62013),p=c(50484),y=c(7660),b=c(59301),g=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,O=(z,X,Q)=>X in z?g(z,X,{enumerable:!0,configurable:!0,writable:!0,value:Q}):z[X]=Q,R=(z,X)=>{for(var Q in X||(X={}))S.call(X,Q)&&O(z,Q,X[Q]);if(v)for(var Q of v(X))k.call(X,Q)&&O(z,Q,X[Q]);return z},U=(z,X)=>E(z,C(X)),N=(z,X,Q)=>new Promise((ce,ye)=>{var Le=he=>{try{ie(Q.next(he))}catch(ke){ye(ke)}},Se=he=>{try{ie(Q.throw(he))}catch(ke){ye(ke)}},ie=he=>he.done?ce(he.value):Promise.resolve(he.value).then(Le,Se);ie((Q=Q.apply(z,X)).next())});function pe(z){return z.replace(/\\u([\dA-Za-z]{4})/g,function(X,Q){return String.fromCharCode(parseInt("0x"+Q))})}function Z(z){z||(z=window.location.search);let X=z.substr(1),Q={};return X.split("&").forEach(function(ce){let ye=ce.split("=");Q[ye[0]]=decodeURIComponent(ye[1])}),Q}const le={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var L=(z=>(z[z.SET_LOADING=0]="SET_LOADING",z[z.SET_IS_LARGE=1]="SET_IS_LARGE",z[z.SET_MES=2]="SET_MES",z[z.SET_STATE=3]="SET_STATE",z[z.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",z[z.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",z[z.UPDATE_ALL=6]="UPDATE_ALL",z))(L||{});function K(z,X){switch(X.type){case 0:return U(R({},z),{loading:X.payload});case 1:return R({},U(R({},z),{isLarge:X.payload}));case 2:return U(R({},z),{mes:X.payload});case 3:return R(R({},z),X.payload);case 5:return U(R({},z),{transferContent:X.payload});case 4:return U(R({},z),{showClipBoardBox:X.payload});case 6:return R({loading:z.loading},X.payload);default:throw new Error}}var I=({vnc_url:z,window_vnc_url:X,linux_vnc:Q,virtual_machine:ce,taskData:ye,shixun_environment_id:Le,tab_type:Se,instance_startup_type:ie,index_tab:he,tpi_type:ke})=>{const Ae=(0,_.useRef)(),Oe=(0,_.useRef)(),Me=(0,_.useRef)(),Re=(0,_.useRef)(),Ke=(0,_.useRef)(),Xe=(0,_.useRef)(),Ne=(0,_.useRef)(),Fe=(0,_.useRef)(),[De,Ie]=(0,_.useReducer)(K,le),[te,ne]=(0,_.useState)(0),{mes:Ee,loading:xe,showClipBoardBox:de,isLarge:ue,transferContent:ae}=De,G=(0,_.useRef)(),F=(0,_.useRef)(),[H]=(0,r.useSearchParams)();let[T,V]=(0,_.useState)(0),_e=(0,_.useRef)();const be=(0,r.useParams)();(0,_.useEffect)(()=>()=>{var q,P;(P=(q=Oe.current)==null?void 0:q.disconnect)==null||P.call(q),clearTimeout(Fe.current),clearInterval(G.current)},[]),(0,_.useEffect)(()=>{F.current=De.loading},[De.loading]);const j=()=>{var q;ie===2?setTimeout(()=>{Ce()},1500):((q=Me==null?void 0:Me.current)==null?void 0:q.resizeSession)!==void 0&&((0,n.vp)()?Me.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,n.gH)(),j),()=>{document.removeEventListener((0,n.gH)(),j)}),[]);function A(){Ie({type:4,payload:!1})}function $(){Ie({type:1,payload:!ue})}function Y(q){return Ae.current&&(Re.current=new u.Z(P=>{var W;for(let J of P)ie===2&&Ce(),(J.target.offsetHeight>0||J.target.offsetWidth>0)&&q&&(q.scaleViewport=!0,(W=q==null?void 0:q._eventHandlers)==null||W.windowResize())}),Re.current.observe(Ae.current)),Re.current}const se=()=>N(void 0,null,function*(){var q,P,W,J,we,me,ge;let He={};H.get("type")==="exercises"?He.exercise_id=H.get("exercisesId"):be.courseId&&be.homeworkId&&(He.homework_common_id=be.homeworkId);const ze=yield(0,s.sA)((q=ye.myshixun)==null?void 0:q.identifier,R(U(R({},be),{taskId:be.taskId,shixun_environment_id:Le,tab_type:Se}),He));if((W=(P=ze==null?void 0:ze.data)==null?void 0:P.data_list)!=null&&W.length)return p.Z.publish("pod-restrict-data",{identifier:(J=ze==null?void 0:ze.data)==null?void 0:J.identifier,data_list:(we=ze==null?void 0:ze.data)==null?void 0:we.data_list}),Promise.reject();if((ze==null?void 0:ze.status)===-3)return new Promise((Ue,Be)=>N(void 0,null,function*(){x.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>N(void 0,null,function*(){clearTimeout(_e.current),V(0),yield(0,s.fA)(be.taskId,ze==null?void 0:ze.message),ne(te+1)})})}));if((ze==null?void 0:ze.status)===-1)throw new String(ze==null?void 0:ze.message);if((ze==null?void 0:ze.status)===0)return ce&&((0,i.d8)("PVEAuthCookie",(ge=(me=ze==null?void 0:ze.data)==null?void 0:me.cookie_options)==null?void 0:ge.cookies_value,1),(0,i.d8)("PVELangCookie","zh_CN",1)),p.Z.publish("update-windows-time",ze==null?void 0:ze.data),p.Z.publish("send-tabs-result-data",U(R({},ze==null?void 0:ze.data),{index_tab:he})),ze});function ve(){V(100),clearTimeout(_e.current),setTimeout(()=>{Ie({type:0,payload:!1})},1300),clearTimeout(G.current)}const oe=()=>{Me.current=new l.Z(Ae.current,Ne.current,{credentials:{password:Xe.current},wsProtocols:["binary"],show_dot:!0}),Me.current.removeEventListener("disconnect",re),Me.current.removeEventListener("connect",ve),Me.current.removeEventListener("clipboard",B),window.rfbs2=Me.current,Re.current=Y(Me.current),Me.current.viewOnly=be.view_only||!1,Me.current.scaleViewport=be.scale||!0,Me.current.showDotCursor=!0,Me.current.resizeSession=!0,Me.current.addEventListener("disconnect",re),Me.current.addEventListener("connect",ve),Me.current.addEventListener("clipboard",B)};function B(q){const P=pe(q.detail.text);Ie({type:5,payload:P})}function re(){if(X)Ie({type:0,payload:!0}),ne(te+1);else{if(clearTimeout(Fe.current),oe(),F.current)return;Fe.current=setTimeout(()=>{ne(te+1)},6e3)}setTimeout(()=>{var q,P;(P=(q=Me.current)==null?void 0:q.connect)==null||P.call(q)},3e3)}(0,_.useEffect)(()=>{if(p.Z.subscribe(`reset-linux-windows-vnc-${he}`,()=>{ne(te+1)}),(X||z||Q||ce)&&Ae.current){clearTimeout(_e.current),ie===2&&Ce(),new Promise(()=>N(void 0,null,function*(){var J,we,me,ge,He;const ze=Z();let Ue=yield se();if(Q||ce){const Be=(we=(J=Ue==null?void 0:Ue.data)==null?void 0:J.link_url)!=null&&we.includes("?")?"&":"?";Ke.current.src=((me=Ue==null?void 0:Ue.data)==null?void 0:me.link_url)+Be+"time="+Date.now(),Ie({type:0,payload:!1});return}else if(X)Xe.current="Edu123",Ne.current=decodeURIComponent((ge=Ue==null?void 0:Ue.data)==null?void 0:ge.link_url);else{const Be=new URL(decodeURIComponent((He=Ue==null?void 0:Ue.data)==null?void 0:He.link_url)),{protocol:je,searchParams:Pe,host:We,search:Ze}=Be,Qe=(0,i.en)(Ze);Xe.current=Pe.get("password"),Ne.current=`${je==="https:"?"wss":"ws"}://${We}/${Qe.path||"websockify"}`}if(ie===2){setTimeout(()=>{var Be,je,Pe,We;Y(),Ke.current.style.cssText=Ke.current.style.cssText+"width:1920px;height:1080px;position:initial",Ke.current.src=`${window.ENV==="build"?"/react/build/":""}/rdp.html?${(Be=Ue==null?void 0:Ue.data)!=null&&Be.gpPort?"gpPort="+((je=Ue==null?void 0:Ue.data)==null?void 0:je.gpPort)+"&password="+((Pe=Ue==null?void 0:Ue.data)==null?void 0:Pe.password)+"&":""}tpiId=${(We=ye==null?void 0:ye.myshixun)==null?void 0:We.id}&envId=${Le}&tpiType=${ke}`,Ie({type:0,payload:!1})},5e3);return}oe()}));const q=p.Z.subscribe(`vnc-reset-${he}`,J=>{if(J==="\u53D6\u6D88"){Ie({type:0,payload:!1});return}V(0),Ie({type:3,payload:{loading:!0,mes:J||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),P=p.Z.subscribe(`send-ctrl-alt-delete-${he}`,()=>{var J;(J=Me.current)==null||J.sendCtrlAltDel(),m.ZP.success("\u53D1\u9001\u6210\u529F")}),W=p.Z.subscribe(`show-clipboard-box-${he}`,()=>{Ie({type:4,payload:!0})});return V(0),()=>{var J,we,me,ge;(J=Me.current)==null||J.removeEventListener("disconnect",re),(we=Me.current)==null||we.removeEventListener("connect",ve),(me=Me.current)==null||me.removeEventListener("clipboard",B),q(),P(),W(),Ae.current&&((ge=Re.current)==null||ge.unobserve(Ae.current))}}},[z,X,Q,te,Le,Se]);function M(){var q,P;(P=(q=Me.current)==null?void 0:q.sendKey)==null||P.call(q,135)}function fe(q){return N(this,null,function*(){var P;if(z){const W=q,J=yield(0,y.ZP)(`/api/tasks/${be.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:Le}});(J==null?void 0:J.status)===0&&(Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A())}else(P=Me.current)==null||P.clipboardPasteFrom(q),Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A()})}function Ce(){var q,P;q=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ke.current.parentElement.className="wh1080p",Ke.current.parentElement.style.cssText=`transform:scale(${q});transform-origin:center center`,Ae.current.style.cssText="translate(-50%, -50%) scale("+q+")"}(0,_.useEffect)(()=>{T==0&&(clearTimeout(_e.current),w())},[T]);const w=()=>{T>99?T=99:(T=T+1,_e.current=setTimeout(()=>{w()},1500)),T<100&&V(T)},ee=(0,_.useMemo)(()=>xe?"none":Q||ce||X&&ie===2?"block":"none",[Q,xe,ce,X]);return b.createElement(_.Fragment,null,ue&&b.createElement("a",{className:"btn-vnc-resize",onClick:$},b.createElement("i",{className:"iconfont icon-tuichuquanping"})),b.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:ee==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},b.createElement("div",null,b.createElement("iframe",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},frameBorder:"0",ref:Ke,allowFullScreen:!0}))),b.createElement("div",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},className:`${X?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ue?"full-screen":""}`},xe?b.createElement(o.Z,{message:Ee,style:{color:"#0152d9"}},b.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},b.createElement(h.Z,{percent:T,format:q=>b.createElement("span",{className:"c-white"},q,"%")}))):null,b.createElement("div",{ref:Ae,className:`vnc-panel ${xe?"hidden zIndexf1":"animated fadeIn"}`})),b.createElement(d.Z,null,b.createElement(x.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:de,onCancel:A,footer:null},b.createElement(e,{onCancel:A,onSave:fe,content:ae}))))}},45123:function(Te,D,c){"use strict";c.d(D,{Z:function(){return S}});var _=c(59301),x=c(24334),m=c(34376),h=c(64358),o={"xterm-panel":"xterm-panel___XA0p9"},u=c(50484),d=c(76374),r=c(50172),i=c(24459),a=c(88230),t=c(43418),f=c(59301),e=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(k,O,R)=>O in k?e(k,O,{enumerable:!0,configurable:!0,writable:!0,value:R}):k[O]=R,g=(k,O)=>{for(var R in O||(O={}))p.call(O,R)&&b(k,R,O[R]);if(l)for(var R of l(O))y.call(O,R)&&b(k,R,O[R]);return k},E=(k,O)=>n(k,s(O)),C=(k,O,R)=>new Promise((U,N)=>{var pe=L=>{try{le(R.next(L))}catch(K){N(K)}},Z=L=>{try{le(R.throw(L))}catch(K){N(K)}},le=L=>L.done?U(L.value):Promise.resolve(L.value).then(pe,Z);le((R=R.apply(k,O)).next())});const v=3e4;var S=({itemData:k={},game:O,myshixun:R})=>{const U=(0,i.useParams)(),[N,pe]=(0,_.useState)(null),[Z,le]=(0,_.useState)({}),{link_url:L,password:K,port:I}=Z,z=(0,_.useRef)(),X=(0,_.useRef)(),Q=(0,_.useRef)(!1),ce=(0,_.useRef)(!1),ye=(0,_.useRef)(!0),Le=(0,a.oP)(),[Se]=(0,i.useSearchParams)(),{shixun_environment_id:ie,position:he,tab_type:ke,index_tab:Ae,command_string:Oe}=k;(0,_.useEffect)(()=>{Ke()},[]);function Me(Xe,Ne,Fe){let De=Fe._core._renderService.dimensions.actualCellWidth||9.5,Ie=Fe._core._renderService.dimensions.actualCellHeight||18;const te=Math.floor(Ne/Ie);return[Math.floor(Xe/De),te]}function Re(Xe,Ne){const Fe=new d.Z(De=>{for(let Ie of De)if(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0){const[te,ne]=Me(Ie.target.offsetWidth,Ie.target.offsetHeight,Xe);console.log("cols, rows",te,ne),u.Z.publish(`ssh-xterm-resize-${Ae}`,{columns:te,rows:ne,width:Ie.target.offsetWidth,height:Ie.target.offsetHeight}),Xe.resize(te,ne);const Ee=x.Base64.decode("IA=="),xe=x.Base64.decode("CBtbSw==");Xe.write(Ee),Xe.write(xe)}});return Fe.observe(Ne),Fe}function Ke(){return C(this,null,function*(){var Xe,Ne,Fe,De,Ie;let te={};Se.get("type")==="exercises"?te.exercise_id=Se.get("exercisesId"):U.courseId&&U.homeworkId&&(te.homework_common_id=U.homeworkId);const ne=yield(0,r.sA)(R==null?void 0:R.identifier,g(g({shixun_environment_id:ie,tab_type:ke,game_id:O.id},Le),te));if((Ne=(Xe=ne==null?void 0:ne.data)==null?void 0:Xe.data_list)!=null&&Ne.length){u.Z.publish("pod-restrict-data",{identifier:(Fe=ne==null?void 0:ne.data)==null?void 0:Fe.identifier,data_list:(De=ne==null?void 0:ne.data)==null?void 0:De.data_list});return}if((ne==null?void 0:ne.status)===-3)return new Promise((Ee,xe)=>C(this,null,function*(){t.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>C(this,null,function*(){yield closeWindowsVnc(U.taskId,ne==null?void 0:ne.message),init()})})}));if(((Ie=ne==null?void 0:ne.data)==null?void 0:Ie.code)===200036){t.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:f.createElement("div",{className:"mb10"},"\u7531\u4E8E\u4E0A\u6B21\u7684\u5B9E\u9A8C\u73AF\u5883\u672A\u6B63\u5E38\u5173\u95ED\uFF0C\u65E0\u6CD5\u518D\u5F00\u542F\u65B0\u7684\u5B9E\u9A8C\u73AF\u5883,",f.createElement("br",null),f.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(R==null?void 0:R.identifier,{shixun_environment_id:ie,tab_type:ke,game_id:O.id}).then(Ee=>{(Ee==null?void 0:Ee.status)==0&&Ke()})}});return}(ne==null?void 0:ne.status)===0&&(u.Z.publish("update-windows-time",ne==null?void 0:ne.data),u.Z.publish("send-tabs-result-data",E(g({},ne==null?void 0:ne.data),{index_tab:Ae})),le(ne.data),setTimeout(()=>u.Z.publish(`create-socket-${Ae}`),300))})}return(0,_.useEffect)(()=>{if(z.current&&L){const Xe=new m.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Xe.open(z.current),Xe.onData(Fe=>{X.current&&X.current.readyState===1&&X.current.send(JSON.stringify({tp:"client",data:Fe}))}),Xe.write("Connecting..."),pe(Xe);const Ne=Re(Xe,z.current);return()=>{Xe.dispose(),z.current&&(Ne==null||Ne.unobserve(z.current))}}},[L,z.current]),(0,_.useEffect)(()=>{if(N&&L){let Xe=function(){const De=new WebSocket(L);X.current=De,De.onopen=()=>{let te=N.element.parentElement;if(te){let ne=te.offsetWidth,Ee=te.offsetHeight;console.log("init",{tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}),De.send(JSON.stringify({tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}))}N.focus()},De.onerror=te=>{console.log("------in socket error----",te,De,L)},De.onmessage=te=>{ce.current=!1,Q.current||(N.write("\r"),setTimeout(()=>{},1e3)),Q.current=!0,console.log("event:",te);const ne=x.Base64.decode(te.data.toString());let Ee=N._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ne,Ee,N),N.write(ne),Oe!=null&&Oe.length?ye.current&&(ye.current=!1,setTimeout(()=>{X.current.send(JSON.stringify({tp:"client",data:(Oe==null?void 0:Oe.join("\r"))+"\r"})),N.setOption("disableStdin",!1)},1e3)):(ye.current=!1,N.setOption("disableStdin",!1))};const Ie=setInterval(()=>{var te;X.current&&((te=X.current)==null||te.send(JSON.stringify({tp:"h"})))},v);De.onclose=te=>{Ie&&clearInterval(Ie),console.log(Ie,"tid",Ae),ce.current||N.write(`\r connection closed`),ce.current=!0,setTimeout(()=>{Xe()},1e4)}};const Ne=u.Z.subscribe(`create-socket-${Ae}`,()=>{Xe()}),Fe=u.Z.subscribe(`ssh-xterm-resize-${Ae}`,De=>{X.current&&X.current.readyState===1&&X.current.send(JSON.stringify({tp:"resize",data:g({},De)}))});return()=>{Ne(),Fe(),X.current&&(X.current.close(),Q.current=!1)}}},[N,L,I]),f.createElement("div",{ref:z,className:o["xterm-panel"]},L?null:f.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},20736:function(Te,D,c){"use strict";c.d(D,{BU:function(){return x},Dj:function(){return _},gH:function(){return m},vp:function(){return h}});function _(o){try{o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen&&o.webkitRequestFullScreen()}catch(u){console.log(u,":e")}}function x(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const m=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function h(){var o=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,u=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",o),window.isFullScreen?window.isFullScreen:o!=null}},19080:function(Te,D,c){"use strict";c.d(D,{F:function(){return o},Z:function(){return h}});var _=c(92310),x=c.n(_);const m=null;function h(u,d,r){return x()({[`${u}-status-success`]:d==="success",[`${u}-status-warning`]:d==="warning",[`${u}-status-error`]:d==="error",[`${u}-status-validating`]:d==="validating",[`${u}-has-feedback`]:r})}const o=(u,d)=>d||u},9432:function(Te,D,c){"use strict";c.d(D,{Z:function(){return b},n:function(){return p}});var _=c(19248),x=c(92310),m=c.n(x),h=c(93681),o=c(8654),u=c(59301),d=c(19080),r=c(36355),i=c(1684),a=c(19716),t=c(32441),f=c(33234),e=c(59412),n=c(9937);function s(g){return!!(g.prefix||g.suffix||g.allowClear)}var l=function(g,E){var C={};for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&E.indexOf(v)<0&&(C[v]=g[v]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,v=Object.getOwnPropertySymbols(g);S{var C;const{prefixCls:v,bordered:S=!0,status:k,size:O,disabled:R,onBlur:U,onFocus:N,suffix:pe,allowClear:Z,addonAfter:le,addonBefore:L,className:K,style:I,styles:z,rootClassName:X,onChange:Q,classNames:ce}=g,ye=l(g,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Le,direction:Se,input:ie}=u.useContext(r.E_),he=Le("input",v),ke=(0,u.useRef)(null),[Ae,Oe]=(0,n.ZP)(he),{compactSize:Me,compactItemClassnames:Re}=(0,f.ri)(he,Se),Ke=(0,a.Z)(H=>{var T;return(T=O!=null?O:Me)!==null&&T!==void 0?T:H}),Xe=u.useContext(i.Z),Ne=R!=null?R:Xe,{status:Fe,hasFeedback:De,feedbackIcon:Ie}=(0,u.useContext)(t.aM),te=(0,d.F)(Fe,k),ne=s(g)||!!De,Ee=(0,u.useRef)(ne);(0,u.useEffect)(()=>{var H;ne&&Ee.current,Ee.current=ne},[ne]);const xe=(0,e.Z)(ke,!0),de=H=>{xe(),U==null||U(H)},ue=H=>{xe(),N==null||N(H)},ae=H=>{xe(),Q==null||Q(H)},G=(De||pe)&&u.createElement(u.Fragment,null,pe,De&&Ie);let F;return typeof Z=="object"&&(Z!=null&&Z.clearIcon)?F=Z:Z&&(F={clearIcon:u.createElement(_.Z,null)}),Ae(u.createElement(h.default,Object.assign({ref:(0,o.sQ)(E,ke),prefixCls:he,autoComplete:ie==null?void 0:ie.autoComplete},ye,{disabled:Ne,onBlur:de,onFocus:ue,style:Object.assign(Object.assign({},ie==null?void 0:ie.style),I),styles:Object.assign(Object.assign({},ie==null?void 0:ie.styles),z),suffix:G,allowClear:F,className:m()(K,X,Re,ie==null?void 0:ie.className),onChange:ae,addonAfter:le&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},le)),addonBefore:L&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},L)),classNames:Object.assign(Object.assign(Object.assign({},ce),ie==null?void 0:ie.classNames),{input:m()({[`${he}-sm`]:Ke==="small",[`${he}-lg`]:Ke==="large",[`${he}-rtl`]:Se==="rtl",[`${he}-borderless`]:!S},!ne&&(0,d.Z)(he,te),ce==null?void 0:ce.input,(C=ie==null?void 0:ie.classNames)===null||C===void 0?void 0:C.input,Oe)}),classes:{affixWrapper:m()({[`${he}-affix-wrapper-sm`]:Ke==="small",[`${he}-affix-wrapper-lg`]:Ke==="large",[`${he}-affix-wrapper-rtl`]:Se==="rtl",[`${he}-affix-wrapper-borderless`]:!S},(0,d.Z)(`${he}-affix-wrapper`,te,De),Oe),wrapper:m()({[`${he}-group-rtl`]:Se==="rtl"},Oe),group:m()({[`${he}-group-wrapper-sm`]:Ke==="small",[`${he}-group-wrapper-lg`]:Ke==="large",[`${he}-group-wrapper-rtl`]:Se==="rtl",[`${he}-group-wrapper-disabled`]:Ne},(0,d.Z)(`${he}-group-wrapper`,te,De),Oe)}})))})},1643:function(Te,D,c){"use strict";var _=c(19248),x=c(92310),m=c.n(x),h=c(9296),o=c(59301),u=c(19080),d=c(36355),r=c(1684),i=c(19716),a=c(32441),t=c(9432),f=c(9937),e=function(s,l){var p={};for(var y in s)Object.prototype.hasOwnProperty.call(s,y)&&l.indexOf(y)<0&&(p[y]=s[y]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,y=Object.getOwnPropertySymbols(s);b{const{prefixCls:p,bordered:y=!0,size:b,disabled:g,status:E,allowClear:C,showCount:v,classNames:S,rootClassName:k,className:O}=s,R=e(s,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:U,direction:N}=o.useContext(d.E_),pe=(0,i.Z)(b),Z=o.useContext(r.Z),le=g!=null?g:Z,{status:L,hasFeedback:K,feedbackIcon:I}=o.useContext(a.aM),z=(0,u.F)(L,E),X=o.useRef(null);o.useImperativeHandle(l,()=>{var Se;return{resizableTextArea:(Se=X.current)===null||Se===void 0?void 0:Se.resizableTextArea,focus:ie=>{var he,ke;(0,t.n)((ke=(he=X.current)===null||he===void 0?void 0:he.resizableTextArea)===null||ke===void 0?void 0:ke.textArea,ie)},blur:()=>{var ie;return(ie=X.current)===null||ie===void 0?void 0:ie.blur()}}});const Q=U("input",p);let ce;typeof C=="object"&&(C!=null&&C.clearIcon)?ce=C:C&&(ce={clearIcon:o.createElement(_.Z,null)});const[ye,Le]=(0,f.ZP)(Q);return ye(o.createElement(h.default,Object.assign({},R,{disabled:le,allowClear:ce,className:m()(O,k),classes:{affixWrapper:m()(`${Q}-textarea-affix-wrapper`,{[`${Q}-affix-wrapper-rtl`]:N==="rtl",[`${Q}-affix-wrapper-borderless`]:!y,[`${Q}-affix-wrapper-sm`]:pe==="small",[`${Q}-affix-wrapper-lg`]:pe==="large",[`${Q}-textarea-show-count`]:v},(0,u.Z)(`${Q}-affix-wrapper`,z),Le)},classNames:Object.assign(Object.assign({},S),{textarea:m()({[`${Q}-borderless`]:!y,[`${Q}-sm`]:pe==="small",[`${Q}-lg`]:pe==="large"},(0,u.Z)(Q,z),Le,S==null?void 0:S.textarea)}),prefixCls:Q,suffix:K&&o.createElement("span",{className:`${Q}-textarea-suffix`},I),showCount:v,ref:X})))});D.Z=n},59412:function(Te,D,c){"use strict";c.d(D,{Z:function(){return x}});var _=c(59301);function x(m,h){const o=(0,_.useRef)([]),u=()=>{o.current.push(setTimeout(()=>{var d,r,i,a;!((d=m.current)===null||d===void 0)&&d.input&&((r=m.current)===null||r===void 0?void 0:r.input.getAttribute("type"))==="password"&&(!((i=m.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((a=m.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,_.useEffect)(()=>(h&&u(),()=>o.current.forEach(d=>{d&&clearTimeout(d)})),[]),u}},92832:function(Te,D,c){"use strict";c.d(D,{default:function(){return pe}});var _=c(92310),x=c.n(_),m=c(59301),h=c(36355),o=c(32441),u=c(9937),r=Z=>{const{getPrefixCls:le,direction:L}=(0,m.useContext)(h.E_),{prefixCls:K,className:I}=Z,z=le("input-group",K),X=le("input"),[Q,ce]=(0,u.ZP)(X),ye=x()(z,{[`${z}-lg`]:Z.size==="large",[`${z}-sm`]:Z.size==="small",[`${z}-compact`]:Z.compact,[`${z}-rtl`]:L==="rtl"},ce,I),Le=(0,m.useContext)(o.aM),Se=(0,m.useMemo)(()=>Object.assign(Object.assign({},Le),{isFormItemInput:!1}),[Le]);return Q(m.createElement("span",{className:ye,style:Z.style,onMouseEnter:Z.onMouseEnter,onMouseLeave:Z.onMouseLeave,onFocus:Z.onFocus,onBlur:Z.onBlur},m.createElement(o.aM.Provider,{value:Se},Z.children)))},i=c(9432),a=c(73331),t=c(15277),f=c(2738),e=c(8654),n=c(59412),s=function(Z,le){var L={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&le.indexOf(K)<0&&(L[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Z);IZ?m.createElement(t.Z,null):m.createElement(a.Z,null),p={click:"onClick",hover:"onMouseOver"};var b=m.forwardRef((Z,le)=>{const{visibilityToggle:L=!0}=Z,K=typeof L=="object"&&L.visible!==void 0,[I,z]=(0,m.useState)(()=>K?L.visible:!1),X=(0,m.useRef)(null);m.useEffect(()=>{K&&z(L.visible)},[K,L]);const Q=(0,n.Z)(X),ce=()=>{const{disabled:Ne}=Z;Ne||(I&&Q(),z(Fe=>{var De;const Ie=!Fe;return typeof L=="object"&&((De=L.onVisibleChange)===null||De===void 0||De.call(L,Ie)),Ie}))},ye=Ne=>{const{action:Fe="click",iconRender:De=l}=Z,Ie=p[Fe]||"",te=De(I),ne={[Ie]:ce,className:`${Ne}-icon`,key:"passwordIcon",onMouseDown:Ee=>{Ee.preventDefault()},onMouseUp:Ee=>{Ee.preventDefault()}};return m.cloneElement(m.isValidElement(te)?te:m.createElement("span",null,te),ne)},{className:Le,prefixCls:Se,inputPrefixCls:ie,size:he}=Z,ke=s(Z,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ae}=m.useContext(h.E_),Oe=Ae("input",ie),Me=Ae("input-password",Se),Re=L&&ye(Me),Ke=x()(Me,Le,{[`${Me}-${he}`]:!!he}),Xe=Object.assign(Object.assign({},(0,f.Z)(ke,["suffix","iconRender","visibilityToggle"])),{type:I?"text":"password",className:Ke,prefixCls:Oe,suffix:Re});return he&&(Xe.size=he),m.createElement(i.Z,Object.assign({ref:(0,e.sQ)(le,X)},Xe))}),g=c(47472),E=c(92343),C=c(3113),v=c(19716),S=c(33234),k=function(Z,le){var L={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&le.indexOf(K)<0&&(L[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Z);I{const{prefixCls:L,inputPrefixCls:K,className:I,size:z,suffix:X,enterButton:Q=!1,addonAfter:ce,loading:ye,disabled:Le,onSearch:Se,onChange:ie,onCompositionStart:he,onCompositionEnd:ke}=Z,Ae=k(Z,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Oe,direction:Me}=m.useContext(h.E_),Re=m.useRef(!1),Ke=Oe("input-search",L),Xe=Oe("input",K),{compactSize:Ne}=(0,S.ri)(Ke,Me),Fe=(0,v.Z)(V=>{var _e;return(_e=z!=null?z:Ne)!==null&&_e!==void 0?_e:V}),De=m.useRef(null),Ie=V=>{V&&V.target&&V.type==="click"&&Se&&Se(V.target.value,V,{source:"clear"}),ie&&ie(V)},te=V=>{var _e;document.activeElement===((_e=De.current)===null||_e===void 0?void 0:_e.input)&&V.preventDefault()},ne=V=>{var _e,be;Se&&Se((be=(_e=De.current)===null||_e===void 0?void 0:_e.input)===null||be===void 0?void 0:be.value,V,{source:"input"})},Ee=V=>{Re.current||ye||ne(V)},xe=typeof Q=="boolean"?m.createElement(g.Z,null):null,de=`${Ke}-button`;let ue;const ae=Q||{},G=ae.type&&ae.type.__ANT_BUTTON===!0;G||ae.type==="button"?ue=(0,E.Tm)(ae,Object.assign({onMouseDown:te,onClick:V=>{var _e,be;(be=(_e=ae==null?void 0:ae.props)===null||_e===void 0?void 0:_e.onClick)===null||be===void 0||be.call(_e,V),ne(V)},key:"enterButton"},G?{className:de,size:Fe}:{})):ue=m.createElement(C.ZP,{className:de,type:Q?"primary":void 0,size:Fe,disabled:Le,key:"enterButton",onMouseDown:te,onClick:ne,loading:ye,icon:xe},Q),ce&&(ue=[ue,(0,E.Tm)(ce,{key:"addonAfter"})]);const F=x()(Ke,{[`${Ke}-rtl`]:Me==="rtl",[`${Ke}-${Fe}`]:!!Fe,[`${Ke}-with-button`]:!!Q},I),H=V=>{Re.current=!0,he==null||he(V)},T=V=>{Re.current=!1,ke==null||ke(V)};return m.createElement(i.Z,Object.assign({ref:(0,e.sQ)(De,le),onPressEnter:Ee},Ae,{size:Fe,onCompositionStart:H,onCompositionEnd:T,prefixCls:Xe,addonAfter:ue,suffix:X,onChange:Ie,className:F,disabled:Le}))}),U=c(1643);const N=i.Z;N.Group=r,N.Search=R,N.TextArea=U.Z,N.Password=b;var pe=N},9937:function(Te,D,c){"use strict";c.d(D,{M1:function(){return d},TM:function(){return E},Xy:function(){return r},bi:function(){return t},e5:function(){return g},ik:function(){return f},nz:function(){return o},pU:function(){return u},s7:function(){return e},x0:function(){return a}});var _=c(17313),x=c(74207),m=c(37613),h=c(83116);const o=C=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:C,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=C=>({borderColor:C.hoverBorderColor}),d=C=>({borderColor:C.activeBorderColor,boxShadow:C.activeShadow,outline:0}),r=C=>({color:C.colorTextDisabled,backgroundColor:C.colorBgContainerDisabled,borderColor:C.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,m.TS)(C,{hoverBorderColor:C.colorBorder})))}),i=C=>{const{paddingBlockLG:v,fontSizeLG:S,lineHeightLG:k,borderRadiusLG:O,paddingInlineLG:R}=C;return{padding:`${v}px ${R}px`,fontSize:S,lineHeight:k,borderRadius:O}},a=C=>({padding:`${C.paddingBlockSM}px ${C.paddingInlineSM}px`,borderRadius:C.borderRadiusSM}),t=(C,v)=>{const{componentCls:S,colorError:k,colorWarning:O,errorActiveShadow:R,warningActiveShadow:U,colorErrorBorderHover:N,colorWarningBorderHover:pe}=C;return{[`&-status-error:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:k,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},d((0,m.TS)(C,{activeBorderColor:k,activeShadow:R}))),[`${S}-prefix, ${S}-suffix`]:{color:k}},[`&-status-warning:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:O,"&:hover":{borderColor:pe},"&:focus, &-focused":Object.assign({},d((0,m.TS)(C,{activeBorderColor:O,activeShadow:U}))),[`${S}-prefix, ${S}-suffix`]:{color:O}}}},f=C=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${C.paddingBlock}px ${C.paddingInline}px`,color:C.colorText,fontSize:C.fontSize,lineHeight:C.lineHeight,backgroundColor:C.colorBgContainer,backgroundImage:"none",borderWidth:C.lineWidth,borderStyle:C.lineType,borderColor:C.colorBorder,borderRadius:C.borderRadius,transition:`all ${C.motionDurationMid}`},o(C.colorTextPlaceholder)),{"&:hover":Object.assign({},u(C)),"&:focus, &-focused":Object.assign({},d(C)),"&-disabled, &[disabled]":Object.assign({},r(C)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:C.controlHeight,lineHeight:C.lineHeight,verticalAlign:"bottom",transition:`all ${C.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},i(C)),"&-sm":Object.assign({},a(C)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=C=>{const{componentCls:v,antCls:S}=C;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:C.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${v}, &-lg > ${v}-group-addon`]:Object.assign({},i(C)),[`&-sm ${v}, &-sm > ${v}-group-addon`]:Object.assign({},a(C)),[`&-lg ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightLG},[`&-sm ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightSM},[`> ${v}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${v}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${C.paddingInline}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,textAlign:"center",backgroundColor:C.colorFillAlter,border:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`,borderRadius:C.borderRadius,transition:`all ${C.motionDurationSlow}`,lineHeight:1,[`${S}-select`]:{margin:`-${C.paddingBlock+1}px -${C.paddingInline}px`,[`&${S}-select-single:not(${S}-select-customize-input)`]:{[`${S}-select-selector`]:{backgroundColor:"inherit",border:`${C.lineWidth}px ${C.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${S}-select-selector`]:{color:C.colorPrimary}}},[`${S}-cascader-picker`]:{margin:`-9px -${C.paddingInline}px`,backgroundColor:"transparent",[`${S}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${v}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${v}-search-with-button &`]:{zIndex:0}}},[`> ${v}:first-child, ${v}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}-affix-wrapper`]:{[`&:not(:first-child) ${v}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${v}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}:last-child, ${v}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${v}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${v}-search &`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius}},[`&:not(:first-child), ${v}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${v}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,_.dF)()),{[`${v}-group-addon, ${v}-group-wrap, > ${v}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:C.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${v}-affix-wrapper, & > ${v}-number-affix-wrapper, diff --git a/p__tasks__index.6282795f.async.js b/p__tasks__index.28ef8d0c.async.js similarity index 99% rename from p__tasks__index.6282795f.async.js rename to p__tasks__index.28ef8d0c.async.js index 24e373a89b..d4c2b587d1 100644 --- a/p__tasks__index.6282795f.async.js +++ b/p__tasks__index.28ef8d0c.async.js @@ -294,7 +294,7 @@ Arguments: `+Array.prototype.slice.call(Fn).join("")+` -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */">