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.
13 lines
60 KiB
13 lines
60 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[310],{11724:function(sa,nt,f){f.d(nt,{Z:function(){return me}});var y=f(96663),Q=f(59301),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},ae=Ee,I=f(7657),dt=function(ue,Pe){return Q.createElement(I.Z,(0,y.Z)({},ue,{ref:Pe,icon:ae}))},r=Q.forwardRef(dt),me=r},26098:function(sa,nt,f){f.r(nt),f.d(nt,{default:function(){return ua}});var y=f(59301),Q=f(89070),Ee=f(31797),ae=f(78241),I=f(8591),dt=f(60324),r=f(20834),me=f(3113),Ae=f(95237),ue=f(43604),Pe=f(6848),be=f(71418),xe=f(1710),Kt=f(10311),Ie=f(5871),je=f(92832),mt=f(58421),re=f(43418),Bt=f(24905),ca=f(38674),H=f(99064),m={flex_box_center:"flex_box_center___GEEfx",flex_space_between:"flex_space_between___m3yb7",flex_box_vertical_center:"flex_box_vertical_center___tvnMj",flex_box_center_end:"flex_box_center_end___hpoI2",flex_box_column:"flex_box_column___EGm6z",wrap:"wrap___sHEOx",crumbs:"crumbs___osr4h",Divle:"Divle___ndjFA",tableWrap:"tableWrap___aFyUX",countflex:"countflex___xh4Ql",leftCol:"leftCol____kaHU",flexright:"flexright___nydBD",flexleft:"flexleft___eBf6r",headWrap:"headWrap___PWc7j",formWrap:"formWrap___u7Sg1",inputWrap:"inputWrap___DR5gf",submitButtondiv:"submitButtondiv___IGaVO",glow:"glow___Znflh",formModal:"formModal___haXug",ActvieE3:"ActvieE3___phBHf",listClass:"listClass___CFAhy",spantitle:"spantitle___VJb52",note:"note___kXCrS",cpuWrap:"cpuWrap___nKCHB",activebtn:"activebtn___KJZJU",btn:"btn___vOOFj",activeTab:"activeTab___9xbl2",tab:"tab___rBcnO",countDown:"countDown___FvYIH",red:"red___AK2hZ",footBtnWrap:"footBtnWrap___yDNkk",modalBtns:"modalBtns___d0m88",confirm:"confirm___gz4SJ",cancel:"cancel___J1Uji",errorTip:"errorTip___apMsj",resource_config_warp:"resource_config_warp___mlfQx",flex:"flex___six9G",config_Warp:"config_Warp___WeDog",config_btn:"config_btn___xrdYb"},Jt=f(85149),Dt=f(955),_t=f(61186),Ke=f.n(_t),ze=f(85057),ft=f(8797),Zt=f(23954),Je=f(6021),Qt=f(14658),At=f(14996),qt=f(11724),da=f(62772),t=f(59301),ea=Object.defineProperty,ta=Object.defineProperties,aa=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Mt=(j,L,z)=>L in j?ea(j,L,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[L]=z,ie=(j,L)=>{for(var z in L||(L={}))vt.call(L,z)&&Mt(j,z,L[z]);if(lt)for(var z of lt(L))Pt.call(L,z)&&Mt(j,z,L[z]);return j},We=(j,L)=>ta(j,aa(L)),na=(j,L)=>{var z={};for(var fe in j)vt.call(j,fe)&&L.indexOf(fe)<0&&(z[fe]=j[fe]);if(j!=null&<)for(var fe of lt(j))L.indexOf(fe)<0&&Pt.call(j,fe)&&(z[fe]=j[fe]);return z},A=(j,L,z)=>new Promise((fe,gt)=>{var $t=_e=>{try{pt(z.next(_e))}catch(e){gt(e)}},Nt=_e=>{try{pt(z.throw(_e))}catch(e){gt(e)}},pt=_e=>_e.done?fe(_e.value):Promise.resolve(_e.value).then($t,Nt);pt((z=z.apply(j,L)).next())});const la=j=>{var L=j,{classroomList:z,globalSetting:fe,loading:gt,user:$t,dispatch:Nt}=L,pt=na(L,["classroomList","globalSetting","loading","user","dispatch"]),_e,e,u,i;const{Countdown:c}=Ee.default,[d]=(0,Q.useSearchParams)(),[v,F]=(0,y.useState)(parseInt(d.get("status"))||0),b=(0,Q.useLocation)(),S=(0,y.useRef)(),[a,_]=(0,y.useState)(),o=(0,Q.useParams)(),[x,g]=(0,y.useState)(!1),[E,C]=(0,y.useState)(0),[p,Z]=(0,y.useState)([]),[s]=ae.default.useForm(),[P,oe]=(0,y.useState)({}),[W,O]=(0,y.useState)(!1),[V,X]=(0,y.useState)(!1),[$,M]=(0,y.useState)([]),[q,ee]=(0,y.useState)([]),[Ce,K]=(0,y.useState)(!1),[w,U]=(0,y.useState)(!1),[R,k]=(0,y.useState)(!1),[G,pe]=(0,y.useState)(!1),[Me,$e]=(0,y.useState)(),[ne,ve]=(0,y.useState)(!1),[Se,ce]=(0,y.useState)(!1),[le,Ze]=(0,y.useState)({}),[de,Te]=(0,y.useState)(0),[we,He]=(0,y.useState)(0),[Ye,Fe]=(0,y.useState)(!1),[ge,ut]=(0,y.useState)(0),[ye,Ne]=(0,y.useState)(!1),[Ve,rt]=(0,y.useState)(!1),[it,Rt]=(0,y.useState)(),[Ot,ot]=(0,y.useState)([]),[kt,st]=(0,y.useState)(!1),[Tt,Le]=(0,y.useState)(),[wt,Be]=(0,y.useState)(!0),[he,T]=(0,y.useState)(!1),[ht,Et]=(0,y.useState)(!1),[Ct,Ht]=(0,y.useState)(!1),[Lt,ct]=(0,y.useState)(!1),[Qe,It]=(0,y.useState)([{name:"CPU",value:0,min:0,max:0,typeName:"\u6838"},{name:"\u5185\u5B58",value:0,min:0,max:0,typeName:"GB"}]),[jt,zt]=(0,y.useState)();let Ft=(0,y.useRef)();const[D,qe]=(0,y.useState)({tab:1,page:1,per_page:10}),ra=[{id:1,name:"\u76F8\u5173\u5B9E\u8DF5\u9879\u76EE"},{id:2,name:"\u5171\u4EAB\u4FE1\u606F"},{id:3,name:"\u8BC4\u6D4B\u811A\u672C"},{id:4,name:"\u8D44\u6E90\u914D\u7F6E"}],yt=[{title:"\u5E8F\u53F7",dataIndex:"order",key:"order",render:(n,l,h)=>`${(D.page-1)*D.per_page+h+1}`,width:50},{title:"\u540D\u79F0",dataIndex:"name",key:"name",ellipsis:!0,width:80,render:(n,l)=>t.createElement("span",null,n||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199")},{title:"\u5B66\u6821/\u5355\u4F4D",dataIndex:"school_name",key:"school_name",ellipsis:!0,width:100,render:(n,l)=>t.createElement("span",null,n)},{title:"\u72B6\u6001",dataIndex:"status_cn",key:"status_cn",ellipsis:!0,width:80,render:(n,l)=>t.createElement("span",null,n)},{title:"\u521B\u5EFA\u8005",dataIndex:"creator_name",key:"creator_name",ellipsis:!0,width:80,render:(n,l)=>t.createElement("span",null,n)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",key:"created_at",ellipsis:!0,width:100,render:(n,l)=>t.createElement("span",{style:{color:"#666"}},Ke()(n).format("YYYY-MM-DD HH:mm:ss"))},{title:"\u64CD\u4F5C",dataIndex:"action",align:"right",key:"action",ellipsis:!0,width:80,render:(n,l)=>t.createElement("a",{style:{color:"#165DFF"},onClick:()=>{(0,Dt.xg)(`/shixuns/${l.identifier}/challenges`)}},"\u67E5\u770B\u8BE6\u60C5")}],ia=[{title:"\u5E8F\u53F7",dataIndex:"order",key:"order",render:(n,l,h)=>`${(D.page-1)*D.per_page+h+1}`,width:100},{title:"\u540D\u79F0",dataIndex:"name",key:"name",ellipsis:!0,render:(n,l)=>t.createElement("span",null,n)},{title:"\u64CD\u4F5C",dataIndex:"action",align:"right",key:"action",width:120,ellipsis:!0,render:(n,l)=>t.createElement("a",{className:m.ActvieE3,type:"link",style:{padding:"0 0 0 10px",whiteSpace:"nowrap"},onClick:()=>{K(!0),$e(l==null?void 0:l.id)}},"\u53D6\u6D88\u5171\u4EAB")}],Wt=[{title:"\u5E8F\u53F7",dataIndex:"order",key:"order",render:(n,l,h)=>`${(D.page-1)*D.per_page+h+1}`,width:100},{title:"\u540D\u79F0",dataIndex:"name",key:"name",width:140,ellipsis:!0,render:(n,l)=>t.createElement("span",null,n)},{title:"\u8BF4\u660E",dataIndex:"description",key:"description",ellipsis:!0,render:(n,l)=>t.createElement("span",null,n)},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updated_at",key:"updated_at",width:160,ellipsis:!0,render:(n,l)=>t.createElement("span",{style:{color:" #666"}},Ke()(n).format("YYYY-MM-DD HH:mm:ss"))},{title:t.createElement("span",null,"\u64CD\u4F5C"),align:"right",width:120,render:(n,l)=>t.createElement(t.Fragment,null,t.createElement(Je.Z,{type:"link",style:{whiteSpace:"nowrap",padding:0},onClick:()=>A(void 0,null,function*(){yield B(l==null?void 0:l.id)})},"\u7F16\u8F91"),t.createElement("a",{className:m.ActvieE3,type:"link",style:{padding:"0 0 0 10px",whiteSpace:"nowrap"},onClick:()=>{U(!0),$e(l==null?void 0:l.id)}},"\u5220\u9664"))}];(0,y.useEffect)(()=>{var n;S.current=(n=b.pathname.split("/"))==null?void 0:n[2]},[b.pathname]),(0,y.useEffect)(()=>{Re()},[]),(0,y.useEffect)(()=>{Yt()},[]);const Yt=()=>A(void 0,null,function*(){const n=yield(0,H.ZP)("/api/user_mirrors/other_info.json",{method:"get"});n.status===0&&Ze(n==null?void 0:n.data)}),Xe=n=>A(void 0,null,function*(){var l;const h=yield(0,H.ZP)(`/api/user_mirrors/${n}/error_tips.json`,{method:"get"});(h==null?void 0:h.status)===0&&(ot((l=h==null?void 0:h.data)==null?void 0:l.user_mirror_logs),Rt(!0))});function Re(){return A(this,null,function*(){const n=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}.json`,{method:"get"});(n==null?void 0:n.status)===0&&_(n.data)})}const Vt=n=>{D.tab=n,qe(ie({},D))},bt=n=>A(void 0,null,function*(){var l;const h=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/check.json`,{method:"get"});(h==null?void 0:h.status)===0&&(((l=h==null?void 0:h.data)==null?void 0:l.exist)===0?ce(!0):(ce(!1),n?Q.history.push(`/shixuns/new/${o==null?void 0:o.experid}/imagepreview?operation=update_image`):Q.history.push(`/shixuns/new/${o==null?void 0:o.experid}/imagepreview`)))}),et=()=>A(void 0,null,function*(){var n;Ht(!0);const l=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/check_is_can_delete.json`,{method:"get"});(l==null?void 0:l.status)===0&&(ut((n=l==null?void 0:l.data)==null?void 0:n.shixun_size),Fe(!0)),Ht(!1)}),Xt=()=>A(void 0,null,function*(){var n;const l=yield(0,H.ZP)("/api/teach_group_shares.json",{method:"get"});(l==null?void 0:l.status)===0&&(ee(a==null?void 0:a.share_group_ids),M(l==null?void 0:l.groups),((n=l==null?void 0:l.groups)==null?void 0:n.length)>0?X(!0):I.ZP.info("\u6682\u65E0\u5171\u4EAB\u6570\u636E"))});(0,y.useEffect)(()=>((a==null?void 0:a.status)===1&&(Ft.current=setInterval(()=>A(void 0,null,function*(){var n,l,h,ke;const se=yield(0,H.ZP)("/api/user_mirrors/polling_update_status.json",{method:"post",body:{user_mirror_ids:[o==null?void 0:o.experid]}});if(se.status===0)if(((l=(n=se==null?void 0:se.data)==null?void 0:n.user_mirror_ids)==null?void 0:l.length)>0){if(((ke=(h=se==null?void 0:se.data)==null?void 0:h.update_datas)==null?void 0:ke.length)>0){const xt=p==null?void 0:p.map(St=>{var Gt,ma;return(ma=(Gt=se==null?void 0:se.data)==null?void 0:Gt.update_datas)==null||ma.map(fa=>{St.id===fa.id&&(St.status=fa.status)}),St});_(xt[0])}}else Re(),clearInterval(Ft.current)}),5e3)),()=>{clearInterval(Ft.current)}),[a==null?void 0:a.status,a]);const J=()=>t.createElement(dt.Z,{placement:"bottomLeft",content:t.createElement(r.default,null,((a==null?void 0:a.publish_status)===-1||(a==null?void 0:a.publish_status)===0)&&t.createElement(r.default.Item,null,t.createElement("a",{onClick:()=>{ve(!0)}},"\u7533\u8BF7\u516C\u5F00")),(a==null?void 0:a.publish_status)===3&&t.createElement(r.default.Item,null,t.createElement("a",{onClick:()=>{rt(!0)}},"\u91CD\u65B0\u7533\u8BF7")),((a==null?void 0:a.publish_status)===2||(a==null?void 0:a.publish_status)===3)&&t.createElement(r.default.Item,null,t.createElement("a",{onClick:()=>{Ne(!0)}},"\u64A4\u9500\u7533\u8BF7")),t.createElement(r.default.Item,null,t.createElement("a",{onClick:()=>{O(!0)}},"\u4FEE\u6539\u955C\u50CF\u4FE1\u606F")),((a==null?void 0:a.publish_status)===-1||(a==null?void 0:a.publish_status)===0||(a==null?void 0:a.publish_status)===3)&&t.createElement(r.default.Item,null,t.createElement(Je.Z,{type:"link",style:{whiteSpace:"nowrap",padding:0,color:"rgba(0, 0, 0, 0.88)"},onClick:()=>A(void 0,null,function*(){Be(!0),yield bt(!0)})},"\u66F4\u65B0\u955C\u50CF")),t.createElement(r.default.Item,null,t.createElement(Je.Z,{type:"link",style:{whiteSpace:"nowrap",padding:0,color:"rgba(0, 0, 0, 0.88)"},onClick:()=>A(void 0,null,function*(){yield Xt()})},"\u5171\u4EAB\u955C\u50CF")),((a==null?void 0:a.publish_status)===-1||(a==null?void 0:a.publish_status)===0||(a==null?void 0:a.publish_status)===3)&&t.createElement(r.default.Item,null,t.createElement(Je.Z,{type:"link",style:{whiteSpace:"nowrap",padding:0,color:"rgba(0, 0, 0, 0.88)"},onClick:()=>A(void 0,null,function*(){yield et()})},"\u5220\u9664")))},t.createElement(ze.op,{shape:"default",size:"middle",style:{borderRadius:"2px",marginTop:"3px"}},"\u66F4\u591A",t.createElement("i",{className:"iconfont icon-sanjiaoxing-down pl8"}))),N=[{title:"\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(n,l,h)=>t.createElement("span",{style:{color:"#666"}},Ke()(n).format("YYYY-MM-DD HH:mm:ss"))},{title:"\u64CD\u4F5C",dataIndex:"operation",key:"operation",render:(n,l,h)=>t.createElement("span",{style:{color:"#000"}},"\u66F4\u65B0\u955C\u50CF")},{title:"\u72B6\u6001",dataIndex:"status",align:"right",key:"status",render:(n,l,h)=>t.createElement("span",{style:{color:"#E30000"}},"\u5931\u8D25")}],B=n=>A(void 0,null,function*(){const l=yield(0,H.ZP)("/api/user_mirrors/mirror_script_detail.json",{method:"get",params:{script_id:n}});l.status===0&&(s.setFieldsValue(ie({},l==null?void 0:l.data)),oe(ie({},l==null?void 0:l.data)),k(!0),$e(n))}),te=n=>{oe(ie({},s.getFieldsValue()))},Y=()=>A(void 0,null,function*(){var n,l;ct(!0);const h=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/update_service_config.json`,{method:"put",body:{cpu_limit:(n=Qe[0])==null?void 0:n.value,memory_limit:(l=Qe[1])==null?void 0:l.value,resource_limit:jt}});(h==null?void 0:h.status)===0&&(I.ZP.success("\u4FDD\u5B58\u6210\u529F!"),Ge()),ct(!1)});(0,y.useEffect)(()=>{(a==null?void 0:a.status)===2&&(D.tab===1&&Ue(),D.tab===2&&Oe(),D.tab===3&&De(),D.tab===4&&Ge())},[D.tab,a]);function Ue(){return A(this,null,function*(){var n,l;g(!0);const h=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/relation_shixuns.json`,{method:"get",params:ie({},D)});(h==null?void 0:h.status)===0&&(Z((n=h==null?void 0:h.data)==null?void 0:n.relation_shixuns),C((l=h==null?void 0:h.data)==null?void 0:l.count)),g(!1)})}function Oe(){return A(this,null,function*(){var n,l,h,ke;g(!0);const se=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/show_groups.json`,{method:"get",params:ie({},D)});(se==null?void 0:se.status)===0&&(Z((n=se==null?void 0:se.data)==null?void 0:n.groups),C((l=se==null?void 0:se.data)==null?void 0:l.count),ee((ke=(h=se==null?void 0:se.data)==null?void 0:h.groups)==null?void 0:ke.map(xt=>xt.group_id))),g(!1)})}function De(){return A(this,null,function*(){var n,l;g(!0);const h=yield(0,H.ZP)("/api/user_mirrors/mirror_scripts.json",{method:"get",params:We(ie({},D),{id:o==null?void 0:o.experid})});(h==null?void 0:h.status)===0&&(Z((n=h==null?void 0:h.data)==null?void 0:n.mirror_scripts),C((l=h==null?void 0:h.data)==null?void 0:l.count)),g(!1)})}function Ge(){return A(this,null,function*(){g(!0);const n=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/get_service_config.json`,{method:"get"});if((n==null?void 0:n.status)===0){let{cpu_limit:l,memory_limit:h,max_cpu:ke,max_memory:se,min_cpu:xt,min_memory:St,resource_limit:Gt}=n==null?void 0:n.data;It([{name:"CPU",value:l,min:xt,max:ke,typeName:"\u6838"},{name:"\u5185\u5B58",value:h,min:St,max:se,typeName:"GB"}]),zt(Gt)}g(!1)})}const Ut=()=>A(void 0,null,function*(){Et(!0);const n=yield(0,H.ZP)(`/api/user_mirrors/${a==null?void 0:a.id}/check_is_making_end.json`,{method:"get"});(n==null?void 0:n.status)===0?Q.history.push(`/shixuns/new/${a==null?void 0:a.id}/imagepreview?operation=create_image`):Re(),Et(!1)}),tt=(n,l)=>{It(Qe.map(h=>h.name===n?l(h):h))},at=(n,l)=>{isNaN(n)||tt(l,h=>We(ie({},h),{value:n}))},oa=n=>{var l;if(n.value<=((l=n.min)!=null?l:-1/0))return;let h=n.value-.5<n.min?n.min:n.value-.5;tt(n.name,ke=>We(ie({},ke),{value:h}))},va=n=>{var l;if(n.value>=((l=n.max)!=null?l:1/0))return;let h=n.value+.5>n.max?n.max:n.value+.5;tt(n.name,ke=>We(ie({},ke),{value:h}))},ga=(n,l)=>{isNaN(n)||tt(l,h=>We(ie({},h),{value:n}))},pa=n=>{if(n==null||Number.isInteger(n))return n;const l=n%1;return l===.5?n:Math.floor(n)+(l<.5?.5:1)};return t.createElement("div",{className:m.wrap},t.createElement("div",{className:m.crumbs},t.createElement("div",null,t.createElement("a",{onClick:()=>Q.history.back()},t.createElement("i",{className:"iconfont icon-fanhuijingxiang"})),t.createElement("span",{style:{paddingLeft:6}},a==null?void 0:a.type_name)),t.createElement("div",null,(a==null?void 0:a.status)===2&&t.createElement(me.ZP,{type:"primary",className:"mr20",style:{borderRadius:2},onClick:()=>{Be(!1),bt(!1)}},"\u8FD0\u884C\u955C\u50CF"),(a==null?void 0:a.status)===2&&t.createElement(ze.op,{shape:"default",size:"middle",style:{borderRadius:"2px",marginTop:"3px",marginRight:20},onClick:()=>{(0,Dt.xg)(`/shixuns/new?tab=${Number(v)+1}&mirror=${a==null?void 0:a.mirror_repository_id}`)}},"\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE"),v===0&&(a==null?void 0:a.status)===2&&((a==null?void 0:a.publish_status)===-1||(a==null?void 0:a.publish_status)===0||(a==null?void 0:a.publish_status)===1||(a==null?void 0:a.publish_status)===2||(a==null?void 0:a.publish_status)===3)&&J(),v===0&&(a==null?void 0:a.status)===0&&(a==null?void 0:a.is_making_end)===!1&&t.createElement(t.Fragment,null,t.createElement(ze.op,{onClick:()=>A(void 0,null,function*(){return yield Ut()}),shape:"default",size:"middle",loading:ht,style:{borderRadius:"2px",marginTop:"3px",marginRight:20}},"\u5236\u4F5C\u955C\u50CF"),t.createElement(ze.op,{onClick:()=>A(void 0,null,function*(){yield et()}),shape:"default",size:"middle",style:{borderRadius:"2px",marginTop:"3px"},loading:Ct},"\u5220\u9664")),v===0&&(a==null?void 0:a.status)===0&&(a==null?void 0:a.is_making_end)===!0&&t.createElement(ze.op,{onClick:()=>A(void 0,null,function*(){yield et()}),shape:"default",size:"middle",loading:Ct,style:{borderRadius:"2px",marginTop:"3px"}},"\u5220\u9664"),v===0&&(a==null?void 0:a.status)===3&&t.createElement(ze.op,{onClick:()=>A(void 0,null,function*(){yield et()}),shape:"default",size:"middle",loading:Ct,style:{borderRadius:"2px",marginTop:"3px"}},"\u5220\u9664"))),t.createElement("div",{className:m.Divle}),t.createElement("div",{className:m.tableWrap},t.createElement(Ae.Z,{className:m.countflex},t.createElement(ue.Z,{className:m.leftCol},t.createElement("div",{className:m.flexleft},"\u955C\u50CF\u540D\u79F0"),t.createElement("div",{className:m.flexright,title:a==null?void 0:a.type_name},a==null?void 0:a.type_name)),t.createElement(ue.Z,{flex:1},t.createElement("span",{className:m.flexleft},"\u4FDD\u5B58\u72B6\u6001"),t.createElement("span",{className:m.flexright},(a==null?void 0:a.status)===0&&t.createElement("span",{className:m.flexright},t.createElement("span",{style:{color:"#5F6368",marginRight:5}},"\u5236\u4F5C\u4E2D"),(a==null?void 0:a.is_making_end)===!1?t.createElement("i",{className:"iconfont icon-shijian1",style:{color:"#165DFF"}}):t.createElement(Pe.Z,{title:"\u5269\u4F59\u5236\u4F5C\u65F6\u957F\u4E3A\u96F6\uFF0C\u4E0D\u80FD\u518D\u8FDB\u5165\u955C\u50CF\u5236\u4F5C\u9875\u9762\u3002"},t.createElement("i",{className:"iconfont icon-shijian1",style:{color:"#E30000"}}))),(a==null?void 0:a.status)===1&&t.createElement("span",{className:m.flexright},t.createElement("span",{style:{color:"#165DFF",marginRight:5}},"\u4FDD\u5B58\u4E2D"),t.createElement(be.Z,{size:"small"})),(a==null?void 0:a.status)===2&&t.createElement("span",{className:m.flexright},t.createElement("span",{style:{color:"#00B187"}},"\u5B8C\u6210"),(a==null?void 0:a.has_error_tips)&&v===0&&t.createElement("i",{className:"iconfont icon-tishi4 current ml5 c-light-primary",style:{color:"#FF8C29"},onClick:()=>{Xe(a==null?void 0:a.id)}})),(a==null?void 0:a.status)===3&&t.createElement("span",{className:m.flexright,style:{color:"#E30000"}},"\u5931\u8D25")))),t.createElement(Ae.Z,{className:m.countflex},t.createElement(ue.Z,{className:m.leftCol},t.createElement("span",{className:m.flexleft},"\u521B\u5EFA\u65B9\u5F0F"),t.createElement("span",{className:m.flexright},(a==null?void 0:a.create_method)===1&&"\u5728\u7EBF\u521B\u5EFA",(a==null?void 0:a.create_method)===2&&"\u5BFC\u5165")),t.createElement(ue.Z,{flex:1},t.createElement("span",{className:m.flexleft},"\u516C\u5F00\u72B6\u6001"),t.createElement("span",{className:m.flexright},(a==null?void 0:a.publish_status)===-1&&t.createElement("span",null,"\u672A\u516C\u5F00"),(a==null?void 0:a.publish_status)===0&&t.createElement("span",null,"\u672A\u516C\u5F00"),(a==null?void 0:a.publish_status)===1&&t.createElement("span",null,"\u5DF2\u516C\u5F00"),(a==null?void 0:a.publish_status)===2&&t.createElement("span",null,"\u5BA1\u6838\u4E2D"),(a==null?void 0:a.publish_status)===3&&t.createElement("span",null,"\u9A73\u56DE",v===0&&t.createElement("i",{onClick:()=>{st(!0),Le(a==null?void 0:a.remark)},className:"iconfont icon-tishi4 ml5 ",style:{color:"#FF8C29"}}))))),t.createElement(Ae.Z,{className:m.countflex},((a==null?void 0:a.create_method)===1||(a==null?void 0:a.status)===1)&&t.createElement(ue.Z,{className:m.leftCol},t.createElement("div",{className:m.flexleft},"\u57FA\u7840\u955C\u50CF"),t.createElement("div",{className:m.flexright},a==null?void 0:a.base_mirror)),(a==null?void 0:a.create_method)===2&&t.createElement(ue.Z,{className:m.leftCol},t.createElement("div",{className:m.flexleft},"\u955C\u50CF\u6587\u4EF6"),t.createElement("div",{className:m.flexright},a==null?void 0:a.base_mirror)),t.createElement(ue.Z,{flex:1},t.createElement("span",{className:m.flexleft},"\u521B\u5EFA\u65F6\u95F4"),t.createElement("span",{className:m.flexright},Ke()(a==null?void 0:a.created_at).format("YYYY-MM-DD HH:mm:ss")))),t.createElement(Ae.Z,{className:m.countflex},t.createElement(ue.Z,{className:m.leftCol},t.createElement("span",{className:m.flexleft},"\u955C\u50CF\u7C7B\u578B"),t.createElement("span",{className:m.flexright},((_e=a==null?void 0:a.mirror_type_cn)==null?void 0:_e.length)>1?(e=a==null?void 0:a.mirror_type_cn)==null?void 0:e.join("\u3001"):a==null?void 0:a.mirror_type_cn[0])),t.createElement(ue.Z,{flex:1},t.createElement("span",{className:m.flexleft},"\u66F4\u65B0\u65F6\u95F4"),(a==null?void 0:a.status)===2?t.createElement("span",{className:m.flexright},Ke()(a==null?void 0:a.updated_at).format("YYYY-MM-DD HH:mm:ss")):t.createElement("span",null,"--"))),t.createElement(Ae.Z,{style:{maxHeight:"260px",overflowY:"auto"}},t.createElement(ue.Z,{style:{padding:"13px 10px 10px 30px",color:"#5F6368"}},"\u955C\u50CF\u63CF\u8FF0"),t.createElement(ue.Z,null,t.createElement(Jt.Z,{value:a==null?void 0:a.description,style:{maxWidth:"760px",padding:10,fontSize:14}})))),(a==null?void 0:a.can_save)&&t.createElement("div",{style:{paddingBottom:20}},t.createElement(ze.tp,{style:{marginBottom:15},dataSource:ra,value:D.tab,onChange:Vt}),t.createElement(be.Z,{spinning:x},D.tab===1&&t.createElement(t.Fragment,null,E===0?t.createElement(ft.Z,{customText:"\u6682\u65E0\u6570\u636E"}):t.createElement(xe.default,{columns:yt,dataSource:p,pagination:!1})),D.tab===2&&t.createElement(t.Fragment,null,(a==null?void 0:a.status)===2?t.createElement(Je.Z,{type:"primary",style:{whiteSpace:"nowrap",height:32,marginBottom:15,borderRadius:2},onClick:()=>A(void 0,null,function*(){yield Xt()})},"\u5171\u4EAB\u955C\u50CF"):t.createElement(Pe.Z,{title:"\u955C\u50CF\u4FDD\u5B58\u3010\u5B8C\u6210\u3011\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u64CD\u4F5C\u3002"},t.createElement(me.ZP,{disabled:!0,style:{borderRadius:2}},"\u5171\u4EAB\u955C\u50CF")),E===0?t.createElement(ft.Z,{customText:"\u6682\u65E0\u6570\u636E"}):t.createElement(xe.default,{columns:ia,dataSource:p,pagination:!1})),D.tab===3&&t.createElement(t.Fragment,null,t.createElement("div",{className:m.headWrap},(a==null?void 0:a.status)===2?t.createElement(me.ZP,{type:"primary",style:{borderRadius:2},onClick:()=>pe(!0)},"\u6DFB\u52A0\u811A\u672C"):t.createElement(Pe.Z,{title:"\u955C\u50CF\u4FDD\u5B58\u3010\u5B8C\u6210\u3011\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u64CD\u4F5C\u3002"},t.createElement(me.ZP,{disabled:!0,style:{borderRadius:2}},"\u6DFB\u52A0\u811A\u672C")),t.createElement("p",{style:{color:"#9096A3"}},"\u5982\u679C\u955C\u50CF\u8981\u7528\u4E8E\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE\uFF0C\u5219\u9700\u8981\u6DFB\u52A0\u5B66\u5458\u8BC4\u6D4B\u65F6\u8FD0\u884C\u7684\u811A\u672C\u3002\u9ED8\u8BA4\u751F\u6210\u4E86\u4E00\u4E9B\u8BC4\u6D4B\u811A\u672C\uFF0C\u4F60\u53EF\u4EE5\u6839\u636E\u9700\u8981\u4FEE\u6539\u6216\u6DFB\u52A0\u811A\u672C\u3002")),E===0?t.createElement(ft.Z,{customText:"\u6682\u65E0\u6570\u636E"}):t.createElement(xe.default,{columns:Wt,dataSource:p,pagination:!1})),D.tab===4&&t.createElement(t.Fragment,null,t.createElement("div",{style:{color:"#999",marginBottom:10}},"\u6E29\u99A8\u63D0\u793A\uFF1A\u8BF7\u6839\u636E\u5B9E\u9645\u9700\u8981\uFF0C\u586B\u5199\u955C\u50CF\u4F7F\u7528\u7684\u8D44\u6E90\u914D\u989D\uFF0C\u5305\u62EC CPU\u548C\u5185\u5B58\u3002"),Qe.map(n=>t.createElement(Pe.Z,{title:(a==null?void 0:a.status)===2?"":"\u955C\u50CF\u4FDD\u5B58\u3010\u5B8C\u6210\u3011\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u64CD\u4F5C\u3002"},t.createElement("div",{className:m.resource_config_warp,key:n==null?void 0:n.name},t.createElement("div",null,n==null?void 0:n.name),t.createElement("div",null,t.createElement(Kt.Z,{disabled:(a==null?void 0:a.status)!==2,min:n==null?void 0:n.min,max:n==null?void 0:n.max,onChange:l=>{const h=pa(l);at(h,n==null?void 0:n.name)},value:n==null?void 0:n.value,step:.5,style:{width:674,height:6,margin:"0 20px 0 12px"}})),t.createElement("div",{className:`${m.config_Warp} ${m.flex}`},t.createElement("div",{className:`${m.config_btn} ${m.flex}`,onClick:()=>{oa(n)}},t.createElement(qt.Z,null)),t.createElement(Ie.Z,{min:n==null?void 0:n.min,max:n==null?void 0:n.max,size:"large",step:"0",controls:!1,style:{width:50},value:n==null?void 0:n.value,disabled:(a==null?void 0:a.status)!==2,onChange:l=>{ga(l,n==null?void 0:n.name)}}),t.createElement("div",{className:`${m.config_btn} ${m.flex}`,onClick:()=>{va(n)}},t.createElement(da.Z,null))),t.createElement("div",null,n==null?void 0:n.typeName)))),t.createElement(Ae.Z,null,t.createElement(ue.Z,{style:{marginRight:20}},t.createElement(Pe.Z,{title:(a==null?void 0:a.status)===2?"":"\u955C\u50CF\u4FDD\u5B58\u3010\u5B8C\u6210\u3011\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u64CD\u4F5C\u3002"},t.createElement("div",{style:{display:"flex"}},t.createElement("span",{style:{lineHeight:"40px",width:135}},"\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),t.createElement(je.default,{value:jt,maxLength:5,onChange:n=>{const{value:l}=n.target,h=/^\d*(\.\d*)?$/;l.match(h)&&zt(n.target.value)},disabled:(a==null?void 0:a.status)!==2,size:"large",className:m.inputWrap,suffix:t.createElement("span",{style:{color:"#999"}},"M")})))),t.createElement(ue.Z,{style:{width:360,color:"#999",lineHeight:"40px"}},t.createElement("p",null,"File size limit\u53C2\u6570\uFF0C\u8868\u793A\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u7684\u5927\u5C0F\u9650\u5236 "))),t.createElement(Ae.Z,{style:{display:"flex",justifyContent:"flex-end"}},(a==null?void 0:a.status)===2?t.createElement(me.ZP,{type:"primary",loading:Lt,className:m.confirm,onClick:()=>Y()},"\u4FDD\u5B58"):t.createElement(Pe.Z,{title:"\u955C\u50CF\u4FDD\u5B58\u3010\u5B8C\u6210\u3011\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u64CD\u4F5C\u3002"},t.createElement(me.ZP,{disabled:!0,style:{borderRadius:2}},"\u4FDD\u5B58"))))),t.createElement(t.Fragment,null,D.tab!=4&&E!=0&&t.createElement(Ae.Z,{className:"mt20 mb20",wrap:!1,align:"middle",justify:"end"},t.createElement(ue.Z,null,t.createElement(mt.Z,{showSizeChanger:!0,showQuickJumper:!0,current:D.page,pageSize:D.per_page,onShowSizeChange:(n,l)=>{D.per_page=l,D.page=1,qe(ie({},D))},onChange:n=>{D.page=n,qe(ie({},D))},total:E}))))),t.createElement("div",null,t.createElement(re.default,{centered:!0,title:"\u9A73\u56DE\u539F\u56E0",open:kt,footer:null,maskClosable:!1,destroyOnClose:!0,onCancel:()=>{st(!1)}},t.createElement("div",{style:{maxHeight:300,overflowY:"auto"}},Tt),t.createElement("div",{className:m.footBtnWrap},t.createElement(me.ZP,{size:"middle",style:{marginRight:20,borderRadius:2},onClick:()=>{st(!1),Ne(!0)},type:"primary"},"\u64A4\u9500\u7533\u8BF7"),t.createElement(me.ZP,{size:"middle",style:{borderRadius:2},onClick:()=>{st(!1),rt(!0)},type:"primary"},"\u91CD\u65B0\u7533\u8BF7"))),t.createElement(re.default,{centered:!0,title:"\u5F02\u5E38\u63D0\u793A",open:it,footer:null,destroyOnClose:!0,onCancel:()=>{Rt(!1)}},t.createElement(xe.default,{style:{maxHeight:300,overflowY:"auto",marginBottom:20},dataSource:Ot,columns:N,pagination:!1})),t.createElement(re.default,{centered:!0,title:"\u91CD\u65B0\u7533\u8BF7\u516C\u5F00",open:Ve,maskClosable:!1,confirmLoading:he,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{rt(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/apply_public.json`,{method:"post"})).status===0&&(I.ZP.success("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"),Re()),T(!1),rt(!1)})},t.createElement("div",null,"\u91CD\u65B0\u7533\u8BF7\u516C\u5F00\u524D\uFF0C\u8BF7\u6839\u636E\u9A73\u56DE\u539F\u56E0\u4FEE\u6539\u955C\u50CF\uFF0C\u7136\u540E\u518D\u7533\u8BF7\u3002\u4F60\u786E\u5B9A\u8981\u91CD\u65B0\u7533\u8BF7\u516C\u5F00\u5417\uFF1F")),t.createElement(re.default,{centered:!0,title:"\u64A4\u9500\u7533\u8BF7\u516C\u5F00",open:ye,maskClosable:!1,confirmLoading:he,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{Ne(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/revoke_apply.json`,{method:"post"})).status===0&&(I.ZP.success("\u64A4\u9500\u6210\u529F"),Re()),T(!1),Ne(!1)})},t.createElement("div",null,"\u64A4\u9500\u7533\u8BF7\u516C\u5F00\u540E\uFF0C\u955C\u50CF\u56DE\u5230\u3010\u672A\u516C\u5F00\u3011\u72B6\u6001\u3002\u540E\u7EED\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u518D\u6B21\u7533\u8BF7\u516C\u5F00\u3002\u4F60\u786E\u5B9A\u8981\u64A4\u9500\u7533\u8BF7\u516C\u5F00\u5417\uFF1F")),t.createElement(re.default,{centered:!0,title:"\u5220\u9664\u955C\u50CF",open:Ye,maskClosable:!1,confirmLoading:he,okText:ge>0?"\u6211\u77E5\u9053\u4E86":"\u786E\u5B9A",cancelText:ge>0?"":"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{Fe(!1)},onOk:()=>A(void 0,null,function*(){if(T(!0),ge>0){Fe(!1);return}(yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}.json`,{method:"delete"})).status===0&&(I.ZP.success("\u5220\u9664\u6210\u529F"),Q.history.back()),T(!1),Fe(!1)})},ge>0?t.createElement("div",null,t.createElement("div",null,"\u8BE5\u955C\u50CF\u5DF2\u88AB ",ge," \u4E2A\u5B9E\u8DF5\u9879\u76EE\u4F7F\u7528\uFF0C\u4E0D\u5141\u8BB8\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\u3002"),t.createElement("div",{style:{color:"#165DFF",marginTop:20,cursor:"pointer"},onClick:()=>{D.tab=1,D.page=1,D.per_page=10,qe(ie({},D)),Fe(!1)}},t.createElement("span",{style:{paddingRight:"4"}},"\u67E5\u770B\u76F8\u5173\u5B9E\u8DF5\u9879\u76EE"),t.createElement("i",{className:"iconfont icon-you"}))):t.createElement("div",null,"\u955C\u50CF\u5220\u9664\u4E4B\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u955C\u50CF\u5417\uFF1F")),t.createElement(re.default,{centered:!0,keyboard:!1,destroyOnClose:!0,open:Se,title:"\u9009\u62E9\u8FD0\u884C\u73AF\u5883",maskClosable:!1,confirmLoading:he,width:"558px",okText:"\u786E\u5B9A",wrapClassName:m.auditModal,onCancel:()=>{Te(0),He(0),ce(!1)},onOk:()=>A(void 0,null,function*(){var n;T(!0);const l=yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/running_image.json`,{method:"post",body:{cpu_memory_limit:le==null?void 0:le.cpu_memory_limit_config[Number(de)],time_limit:(n=le==null?void 0:le.time_limit_config[Number(we)])==null?void 0:n.value}});(l==null?void 0:l.status)===0&&(wt?Q.history.push(`/shixuns/new/${o==null?void 0:o.experid}/imagepreview?operation=update_image`):Q.history.push(`/shixuns/new/${o==null?void 0:o.experid}/imagepreview`)),T(!1),ce(!1)})},t.createElement("div",{style:{paddingTop:20}},wt&&t.createElement("div",{style:{marginBottom:"30px",backgroundColor:"rgba(255,157,24,0.1)",height:"42px",lineHeight:"42px"}},t.createElement("i",{className:"iconfont icon-tishi4",style:{color:"#FF9D18",paddingLeft:20}}),t.createElement("span",{style:{paddingLeft:"6px",color:"#FF9D18"}},"\u66F4\u65B0\u955C\u50CF\u540E\uFF0C\u539F\u6765\u7684\u955C\u50CF\u5C06\u88AB\u8986\u76D6\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u76F8\u5173\u7684\u5B9E\u8DF5\u9879\u76EE\u3002")),t.createElement(At.Z,{required:!0,name:"\u914D\u7F6E",align:"center",nameWidth:60},t.createElement("div",{className:m.cpuWrap},(u=le==null?void 0:le.cpu_memory_limit_config)==null?void 0:u.map((n,l)=>t.createElement("div",{className:de===l?m.activebtn:m.btn,onClick:()=>Te(l)},t.createElement("div",null,n),de===l?t.createElement("div",null,t.createElement("i",{className:"iconfont icon-xuanzhong9",style:{paddingRight:12}})):"")))),t.createElement(At.Z,{required:!0,name:"\u65F6\u957F",align:"center",nameWidth:60},(i=le==null?void 0:le.time_limit_config)==null?void 0:i.map((n,l)=>t.createElement("span",{className:we===l?m.activeTab:m.tab,onClick:()=>He(l)},n.name))))),t.createElement(re.default,{centered:!0,title:"\u7533\u8BF7\u516C\u5F00",open:ne,okText:"\u786E\u5B9A",maskClosable:!1,confirmLoading:he,cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{ve(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/apply_public.json`,{method:"post"})).status===0&&(I.ZP.success("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"),Re()),T(!1),ve(!1)})},t.createElement("div",{className:m.note},t.createElement("p",null,"1.\u7533\u8BF7\u516C\u5F00\u524D\uFF0C\u8BF7\u4FDD\u8BC1\u955C\u50CF\u662F\u53EF\u8FD0\u884C\u7684\uFF0C\u5E76\u68C0\u67E5\u8BE5\u5B9E\u9A8C\u955C\u50CF\u662F\u5426\u7B26\u5408\u5E73\u53F0\u7684\u89C4\u8303\u6807\u51C6\u3002"),t.createElement("p",null,"2.\u516C\u5F00\u7684\u955C\u50CF\u5C06\u8D21\u732E\u7ED9\u5E73\u53F0\u6240\u6709\u4EBA\u8FDB\u884C\u4F7F\u7528\uFF0C\u82E5\u4EC5\u672C\u4EBA\u6559\u5B66\u4F7F\u7528\u5219\u65E0\u9700\u7533\u8BF7\u516C\u5F00\u3002"),t.createElement("p",null,"3.\u516C\u5F00\u955C\u50CF\u9700\u7ECF\u8FC7\u5E73\u53F0\u6807\u51C6\u5316\u5BA1\u6838\uFF0C\u5BA1\u6838\u5468\u671F\u4E3A1-2\u5929\u3002"),t.createElement("p",null,"\u4F60\u786E\u5B9A\u8981\u7533\u8BF7\u516C\u5F00\u5417\uFF1F"))),t.createElement(Qt.Z,{visible:W,setVisible:O,mirrorId:o==null?void 0:o.experid,getData:Re}),t.createElement(re.default,{centered:!0,width:518,title:"\u5171\u4EAB\u955C\u50CF",open:V,okText:"\u786E\u5B9A",maskClosable:!1,confirmLoading:he,cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{X(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)("/api/teach_group_shares.json",{method:"post",body:{ids:[o==null?void 0:o.experid],clazz:"UserMirror",group_ids:q}})).status===0&&(q.length>0?I.ZP.success("\u5171\u4EAB\u6210\u529F"):I.ZP.success("\u64A4\u9500\u6210\u529F"),Oe(),Re()),T(!1),X(!1)})},t.createElement("div",{style:{marginBottom:"30px",backgroundColor:"rgba(255,157,24,0.1)",width:"468px",height:"42px",lineHeight:"42px"}},t.createElement("i",{className:"iconfont icon-tishi4",style:{color:"#FF9D18",paddingLeft:20}}),t.createElement("span",{style:{paddingLeft:"6px",color:"#FF9D18"}},"\u8BE5\u955C\u50CF\u4EC5\u5171\u4EAB\u7ED9\u9009\u4E2D\u7684\u6559\u7814\u56E2\u961F\uFF0C\u53D6\u6D88\u9009\u4E2D\u5E76\u786E\u5B9A\u5373\u53EF\u64A4\u9500\u5171\u4EAB\u3002")),t.createElement("div",{style:{maxHeight:"260px",overflowY:"auto"}},t.createElement(Bt.default.Group,{defaultValue:q,value:q,style:{flexDirection:"column"},onChange:n=>{ee(n)}},$==null?void 0:$.map(n=>t.createElement(Bt.default,{checked:!!q.some(l=>l===n.group_id),style:{marginBottom:14},value:n.group_id},n.name))))),t.createElement(re.default,{centered:!0,title:"\u53D6\u6D88\u5171\u4EAB",open:Ce,maskClosable:!1,confirmLoading:he,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{K(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)(`/api/teach_group_shares/${Me}.json`,{method:"delete"})).status===0&&(I.ZP.success("\u53D6\u6D88\u6210\u529F"),Oe(),Re()),T(!1),K(!1)})},t.createElement("div",null,"\u53D6\u6D88\u5171\u4EAB\u540E\uFF0C\u955C\u50CF\u5C06\u4E0D\u518D\u5171\u4EAB\u7ED9\u8BE5\u6559\u7814\u56E2\u961F\u3002\u786E\u5B9A\u8981\u53D6\u6D88\u5171\u4EAB\u5417\uFF1F")),t.createElement(re.default,{centered:!0,title:"\u5220\u9664\u811A\u672C",open:w,okText:"\u786E\u5B9A",maskClosable:!1,confirmLoading:he,cancelText:"\u53D6\u6D88",destroyOnClose:!0,onCancel:()=>{U(!1)},onOk:()=>A(void 0,null,function*(){T(!0),(yield(0,H.ZP)("/api/user_mirrors/delete_mirror_script.json",{method:"delete",body:{script_id:Me}})).status===0&&(I.ZP.success("\u5220\u9664\u6210\u529F"),De()),T(!1),U(!1)})},t.createElement("div",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u811A\u672C\u5417\uFF1F")),t.createElement(re.default,{centered:!0,width:1200,title:"\u6DFB\u52A0\u811A\u672C",style:{paddingTop:15},open:G,footer:null,maskClosable:!1,destroyOnClose:!0,onCancel:()=>{s.setFieldsValue({name:"",description:"",script:""}),pe(!1)}},t.createElement(ae.default,{form:s,className:m.formModal,onValuesChange:te,scrollToFirstError:!0,layout:"horizontal"},t.createElement(ae.default.Item,{label:"\u811A\u672C\u540D\u79F0",name:"name",className:m.errorTip,colon:!1,rules:[{required:!0,message:"\u811A\u672C\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(je.default,{size:"large"})),t.createElement(ae.default.Item,{label:"\u811A\u672C\u8BF4\u660E",name:"description",colon:!1},t.createElement(je.default,{size:"large"})),t.createElement(ae.default.Item,{label:"\u8BC4\u6D4B\u811A\u672C",name:"script",colon:!1},t.createElement(Zt.ZP,{height:272,style:{border:"1px solid #ccc"},language:"shell",theme:"vs-light"}))),t.createElement("div",{className:m.modalBtns},t.createElement(me.ZP,{onClick:()=>{s.setFieldsValue({name:"",description:"",script:""}),pe(!1)},className:m.cancel},"\u53D6\u6D88 "),t.createElement(me.ZP,{onClick:()=>A(void 0,null,function*(){const n=ie({},yield s.validateFields());T(!0),(yield(0,H.ZP)(`/api/user_mirrors/${o==null?void 0:o.experid}/add_mirror_scripts.json`,{method:"post",body:We(ie({},n),{id:o==null?void 0:o.experid})})).status===0&&(I.ZP.success("\u6DFB\u52A0\u6210\u529F"),De(),s.setFieldsValue({name:"",description:"",script:""})),T(!1),pe(!1)}),className:m.confirm,type:"primary",loading:he},"\u786E\u5B9A "))),t.createElement(re.default,{centered:!0,width:1200,title:"\u7F16\u8F91\u811A\u672C",style:{paddingTop:15},className:m.errorTip,open:R,footer:null,maskClosable:!1,destroyOnClose:!0,onCancel:()=>{s.setFieldsValue({name:"",description:"",script:""}),k(!1)}},t.createElement(ae.default,{form:s,className:m.formModal,onValuesChange:te,scrollToFirstError:!0,layout:"horizontal"},t.createElement(ae.default.Item,{label:"\u811A\u672C\u540D\u79F0",name:"name",colon:!1,rules:[{required:!0,message:"\u811A\u672C\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(je.default,{size:"large"})),t.createElement(ae.default.Item,{label:"\u811A\u672C\u8BF4\u660E",name:"description",colon:!1},t.createElement(je.default,{size:"large"})),t.createElement(ae.default.Item,{label:"\u8BC4\u6D4B\u811A\u672C",name:"script",colon:!1},t.createElement(Zt.ZP,{height:272,style:{border:"1px solid #ccc"},language:"shell",theme:"vs-light"}))),t.createElement("div",{className:m.modalBtns},t.createElement(me.ZP,{onClick:()=>{s.setFieldsValue({name:"",description:"",script:""}),k(!1)},className:m.cancel},"\u53D6\u6D88 "),t.createElement(me.ZP,{onClick:()=>A(void 0,null,function*(){T(!0);const n=ie({},yield s.validateFields());(yield(0,H.ZP)("/api/user_mirrors/update_mirror_scripts.json",{method:"put",body:We(ie({},n),{script_id:Me})})).status===0&&(s.setFieldsValue({name:"",description:"",script:""}),I.ZP.success("\u7F16\u8F91\u6210\u529F"),De()),T(!1),k(!1)}),className:m.confirm,type:"primary",loading:he},"\u786E\u5B9A ")))))};var ua=(0,Q.connect)(({classroomList:j,loading:L,globalSetting:z,user:fe})=>({classroomList:j,globalSetting:z,loading:L.models.classroomList,user:fe}))(la)},10311:function(sa,nt,f){f.d(nt,{Z:function(){return _e}});var y=f(92310),Q=f.n(y),Ee=f(90493),ae=f(19127),I=f(72071),dt=f(20135),r=f(59301),me=f(13697),Ae=f(18929),ue=f(96663),Pe=f(6620),be=f(44127),xe=f(10228),Kt=r.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0}),Ie=Kt;function je(e,u,i){return(e-u)/(i-u)}function mt(e,u,i,c){var d=je(u,i,c),v={};switch(e){case"rtl":v.right="".concat(d*100,"%"),v.transform="translateX(50%)";break;case"btt":v.bottom="".concat(d*100,"%"),v.transform="translateY(50%)";break;case"ttb":v.top="".concat(d*100,"%"),v.transform="translateY(-50%)";break;default:v.left="".concat(d*100,"%"),v.transform="translateX(-50%)";break}return v}function re(e,u){return Array.isArray(e)?e[u]:e}var Bt=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],ca=r.forwardRef(function(e,u){var i,c,d=e.prefixCls,v=e.value,F=e.valueIndex,b=e.onStartMove,S=e.style,a=e.render,_=e.dragging,o=e.onOffsetChange,x=(0,Pe.Z)(e,Bt),g=r.useContext(Ie),E=g.min,C=g.max,p=g.direction,Z=g.disabled,s=g.keyboard,P=g.range,oe=g.tabIndex,W=g.ariaLabelForHandle,O=g.ariaLabelledByForHandle,V=g.ariaValueTextFormatterForHandle,X="".concat(d,"-handle"),$=function(K){Z||b(K,F)},M=function(K){if(!Z&&s){var w=null;switch(K.which||K.keyCode){case xe.Z.LEFT:w=p==="ltr"||p==="btt"?-1:1;break;case xe.Z.RIGHT:w=p==="ltr"||p==="btt"?1:-1;break;case xe.Z.UP:w=p!=="ttb"?1:-1;break;case xe.Z.DOWN:w=p!=="ttb"?-1:1;break;case xe.Z.HOME:w="min";break;case xe.Z.END:w="max";break;case xe.Z.PAGE_UP:w=2;break;case xe.Z.PAGE_DOWN:w=-2;break}w!==null&&(K.preventDefault(),o(w,F))}},q=mt(p,v,E,C),ee=r.createElement("div",(0,ue.Z)({ref:u,className:Q()(X,(i={},(0,Ee.Z)(i,"".concat(X,"-").concat(F+1),P),(0,Ee.Z)(i,"".concat(X,"-dragging"),_),i)),style:(0,be.Z)((0,be.Z)({},q),S),onMouseDown:$,onTouchStart:$,onKeyDown:M,tabIndex:Z?null:re(oe,F),role:"slider","aria-valuemin":E,"aria-valuemax":C,"aria-valuenow":v,"aria-disabled":Z,"aria-label":re(W,F),"aria-labelledby":re(O,F),"aria-valuetext":(c=re(V,F))===null||c===void 0?void 0:c(v),"aria-orientation":p==="ltr"||p==="rtl"?"horizontal":"vertical"},x));return a&&(ee=a(ee,{index:F,prefixCls:d,value:v,dragging:_})),ee}),H=ca,m=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],Jt=r.forwardRef(function(e,u){var i=e.prefixCls,c=e.style,d=e.onStartMove,v=e.onOffsetChange,F=e.values,b=e.handleRender,S=e.draggingIndex,a=(0,Pe.Z)(e,m),_=r.useRef({});return r.useImperativeHandle(u,function(){return{focus:function(x){var g;(g=_.current[x])===null||g===void 0||g.focus()}}}),r.createElement(r.Fragment,null,F.map(function(o,x){return r.createElement(H,(0,ue.Z)({ref:function(E){E?_.current[x]=E:delete _.current[x]},dragging:S===x,prefixCls:i,style:re(c,x),key:x,value:o,valueIndex:x,onStartMove:d,onOffsetChange:v,render:b},a))}))}),Dt=Jt;function _t(e){var u="touches"in e?e.touches[0]:e;return{pageX:u.pageX,pageY:u.pageY}}function Ke(e,u,i,c,d,v,F,b,S){var a=r.useState(null),_=(0,I.Z)(a,2),o=_[0],x=_[1],g=r.useState(-1),E=(0,I.Z)(g,2),C=E[0],p=E[1],Z=r.useState(i),s=(0,I.Z)(Z,2),P=s[0],oe=s[1],W=r.useState(i),O=(0,I.Z)(W,2),V=O[0],X=O[1],$=r.useRef(null),M=r.useRef(null);r.useEffect(function(){C===-1&&oe(i)},[i,C]),r.useEffect(function(){return function(){document.removeEventListener("mousemove",$.current),document.removeEventListener("mouseup",M.current),document.removeEventListener("touchmove",$.current),document.removeEventListener("touchend",M.current)}},[]);var q=function(R,k){P.some(function(G,pe){return G!==R[pe]})&&(k!==void 0&&x(k),oe(R),F(R))},ee=function(R,k){if(R===-1){var G=V[0],pe=V[V.length-1],Me=c-G,$e=d-pe,ne=k*(d-c);ne=Math.max(ne,Me),ne=Math.min(ne,$e);var ve=v(G+ne);ne=ve-G;var Se=V.map(function(de){return de+ne});q(Se)}else{var ce=(d-c)*k,le=(0,ae.Z)(P);le[R]=V[R];var Ze=S(le,ce,R,"dist");q(Ze.values,Ze.value)}},Ce=r.useRef(ee);Ce.current=ee;var K=function(R,k){R.stopPropagation();var G=i[k];p(k),x(G),X(i);var pe=_t(R),Me=pe.pageX,$e=pe.pageY,ne=function(ce){ce.preventDefault();var le=_t(ce),Ze=le.pageX,de=le.pageY,Te=Ze-Me,we=de-$e,He=e.current.getBoundingClientRect(),Ye=He.width,Fe=He.height,ge;switch(u){case"btt":ge=-we/Fe;break;case"ttb":ge=we/Fe;break;case"rtl":ge=-Te/Ye;break;default:ge=Te/Ye}Ce.current(k,ge)},ve=function Se(ce){ce.preventDefault(),document.removeEventListener("mouseup",Se),document.removeEventListener("mousemove",ne),document.removeEventListener("touchend",Se),document.removeEventListener("touchmove",ne),$.current=null,M.current=null,p(-1),b()};document.addEventListener("mouseup",ve),document.addEventListener("mousemove",ne),document.addEventListener("touchend",ve),document.addEventListener("touchmove",ne),$.current=ne,M.current=ve},w=r.useMemo(function(){var U=(0,ae.Z)(i).sort(function(k,G){return k-G}),R=(0,ae.Z)(P).sort(function(k,G){return k-G});return U.every(function(k,G){return k===R[G]})?P:i},[i,P]);return[C,o,w,K]}function ze(e){var u,i=e.prefixCls,c=e.style,d=e.start,v=e.end,F=e.index,b=e.onStartMove,S=r.useContext(Ie),a=S.direction,_=S.min,o=S.max,x=S.disabled,g=S.range,E="".concat(i,"-track"),C=je(d,_,o),p=je(v,_,o),Z=function(oe){!x&&b&&b(oe,-1)},s={};switch(a){case"rtl":s.right="".concat(C*100,"%"),s.width="".concat(p*100-C*100,"%");break;case"btt":s.bottom="".concat(C*100,"%"),s.height="".concat(p*100-C*100,"%");break;case"ttb":s.top="".concat(C*100,"%"),s.height="".concat(p*100-C*100,"%");break;default:s.left="".concat(C*100,"%"),s.width="".concat(p*100-C*100,"%")}return r.createElement("div",{className:Q()(E,(u={},(0,Ee.Z)(u,"".concat(E,"-").concat(F+1),g),(0,Ee.Z)(u,"".concat(i,"-track-draggable"),b),u)),style:(0,be.Z)((0,be.Z)({},s),c),onMouseDown:Z,onTouchStart:Z})}function ft(e){var u=e.prefixCls,i=e.style,c=e.values,d=e.startPoint,v=e.onStartMove,F=r.useContext(Ie),b=F.included,S=F.range,a=F.min,_=r.useMemo(function(){if(!S){if(c.length===0)return[];var o=d!=null?d:a,x=c[0];return[{start:Math.min(o,x),end:Math.max(o,x)}]}for(var g=[],E=0;E<c.length-1;E+=1)g.push({start:c[E],end:c[E+1]});return g},[c,S,d,a]);return b?_.map(function(o,x){var g=o.start,E=o.end;return r.createElement(ze,{index:x,prefixCls:u,style:re(i,x),start:g,end:E,key:x,onStartMove:v})}):null}function Zt(e){var u=e.prefixCls,i=e.style,c=e.children,d=e.value,v=e.onClick,F=r.useContext(Ie),b=F.min,S=F.max,a=F.direction,_=F.includedStart,o=F.includedEnd,x=F.included,g="".concat(u,"-text"),E=mt(a,d,b,S);return r.createElement("span",{className:Q()(g,(0,Ee.Z)({},"".concat(g,"-active"),x&&_<=d&&d<=o)),style:(0,be.Z)((0,be.Z)({},E),i),onMouseDown:function(p){p.stopPropagation()},onClick:function(){v(d)}},c)}function Je(e){var u=e.prefixCls,i=e.marks,c=e.onClick,d="".concat(u,"-mark");return i.length?r.createElement("div",{className:d},i.map(function(v){var F=v.value,b=v.style,S=v.label;return r.createElement(Zt,{key:F,prefixCls:d,style:b,value:F,onClick:c},S)})):null}function Qt(e){var u=e.prefixCls,i=e.value,c=e.style,d=e.activeStyle,v=r.useContext(Ie),F=v.min,b=v.max,S=v.direction,a=v.included,_=v.includedStart,o=v.includedEnd,x="".concat(u,"-dot"),g=a&&_<=i&&i<=o,E=(0,be.Z)((0,be.Z)({},mt(S,i,F,b)),typeof c=="function"?c(i):c);return g&&(E=(0,be.Z)((0,be.Z)({},E),typeof d=="function"?d(i):d)),r.createElement("span",{className:Q()(x,(0,Ee.Z)({},"".concat(x,"-active"),g)),style:E})}function At(e){var u=e.prefixCls,i=e.marks,c=e.dots,d=e.style,v=e.activeStyle,F=r.useContext(Ie),b=F.min,S=F.max,a=F.step,_=r.useMemo(function(){var o=new Set;if(i.forEach(function(g){o.add(g.value)}),c&&a!==null)for(var x=b;x<=S;)o.add(x),x+=a;return Array.from(o)},[b,S,a,c,i]);return r.createElement("div",{className:"".concat(u,"-step")},_.map(function(o){return r.createElement(Qt,{prefixCls:u,key:o,value:o,style:d,activeStyle:v})}))}function qt(e,u,i,c,d,v){var F=r.useCallback(function(g){var E=isFinite(g)?g:e;return E=Math.min(u,g),E=Math.max(e,E),E},[e,u]),b=r.useCallback(function(g){if(i!==null){var E=e+Math.round((F(g)-e)/i)*i,C=function(P){return(String(P).split(".")[1]||"").length},p=Math.max(C(i),C(u),C(e)),Z=Number(E.toFixed(p));return e<=Z&&Z<=u?Z:null}return null},[i,e,u,F]),S=r.useCallback(function(g){var E=F(g),C=c.map(function(s){return s.value});i!==null&&C.push(b(g)),C.push(e,u);var p=C[0],Z=u-e;return C.forEach(function(s){var P=Math.abs(E-s);P<=Z&&(p=s,Z=P)}),p},[e,u,c,i,F,b]),a=function g(E,C,p){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof C=="number"){var s,P=E[p],oe=P+C,W=[];c.forEach(function(M){W.push(M.value)}),W.push(e,u),W.push(b(P));var O=C>0?1:-1;Z==="unit"?W.push(b(P+O*i)):W.push(b(oe)),W=W.filter(function(M){return M!==null}).filter(function(M){return C<0?M<=P:M>=P}),Z==="unit"&&(W=W.filter(function(M){return M!==P}));var V=Z==="unit"?P:oe;s=W[0];var X=Math.abs(s-V);if(W.forEach(function(M){var q=Math.abs(M-V);q<X&&(s=M,X=q)}),s===void 0)return C<0?e:u;if(Z==="dist")return s;if(Math.abs(C)>1){var $=(0,ae.Z)(E);return $[p]=s,g($,C-O,p,Z)}return s}else{if(C==="min")return e;if(C==="max")return u}},_=function(E,C,p){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",s=E[p],P=a(E,C,p,Z);return{value:P,changed:P!==s}},o=function(E){return v===null&&E===0||typeof v=="number"&&E<v},x=function(E,C,p){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",s=E.map(S),P=s[p],oe=a(s,C,p,Z);if(s[p]=oe,d===!1){var W=v||0;p>0&&s[p-1]!==P&&(s[p]=Math.max(s[p],s[p-1]+W)),p<s.length-1&&s[p+1]!==P&&(s[p]=Math.min(s[p],s[p+1]-W))}else if(typeof v=="number"||v===null){for(var O=p+1;O<s.length;O+=1)for(var V=!0;o(s[O]-s[O-1])&&V;){var X=_(s,1,O);s[O]=X.value,V=X.changed}for(var $=p;$>0;$-=1)for(var M=!0;o(s[$]-s[$-1])&&M;){var q=_(s,-1,$-1);s[$-1]=q.value,M=q.changed}for(var ee=s.length-1;ee>0;ee-=1)for(var Ce=!0;o(s[ee]-s[ee-1])&&Ce;){var K=_(s,-1,ee-1);s[ee-1]=K.value,Ce=K.changed}for(var w=0;w<s.length-1;w+=1)for(var U=!0;o(s[w+1]-s[w])&&U;){var R=_(s,1,w+1);s[w+1]=R.value,U=R.changed}}return{value:s[p],values:s}};return[S,x]}var da=f(48736),t=r.forwardRef(function(e,u){var i,c=e.prefixCls,d=c===void 0?"rc-slider":c,v=e.className,F=e.style,b=e.disabled,S=b===void 0?!1:b,a=e.keyboard,_=a===void 0?!0:a,o=e.autoFocus,x=e.onFocus,g=e.onBlur,E=e.min,C=E===void 0?0:E,p=e.max,Z=p===void 0?100:p,s=e.step,P=s===void 0?1:s,oe=e.value,W=e.defaultValue,O=e.range,V=e.count,X=e.onChange,$=e.onBeforeChange,M=e.onAfterChange,q=e.allowCross,ee=q===void 0?!0:q,Ce=e.pushable,K=Ce===void 0?!1:Ce,w=e.draggableTrack,U=e.reverse,R=e.vertical,k=e.included,G=k===void 0?!0:k,pe=e.startPoint,Me=e.trackStyle,$e=e.handleStyle,ne=e.railStyle,ve=e.dotStyle,Se=e.activeDotStyle,ce=e.marks,le=e.dots,Ze=e.handleRender,de=e.tabIndex,Te=de===void 0?0:de,we=e.ariaLabelForHandle,He=e.ariaLabelledByForHandle,Ye=e.ariaValueTextFormatterForHandle,Fe=r.useRef(),ge=r.useRef(),ut=r.useMemo(function(){return R?U?"ttb":"btt":U?"rtl":"ltr"},[U,R]),ye=r.useMemo(function(){return isFinite(C)?C:0},[C]),Ne=r.useMemo(function(){return isFinite(Z)?Z:100},[Z]),Ve=r.useMemo(function(){return P!==null&&P<=0?1:P},[P]),rt=r.useMemo(function(){return typeof K=="boolean"?K?Ve:!1:K>=0?K:!1},[K,Ve]),it=r.useMemo(function(){var J=Object.keys(ce||{});return J.map(function(N){var B=ce[N],te={value:Number(N)};return B&&(0,dt.Z)(B)==="object"&&!r.isValidElement(B)&&("label"in B||"style"in B)?(te.style=B.style,te.label=B.label):te.label=B,te}).filter(function(N){var B=N.label;return B||typeof B=="number"}).sort(function(N,B){return N.value-B.value})},[ce]),Rt=qt(ye,Ne,Ve,it,ee,rt),Ot=(0,I.Z)(Rt,2),ot=Ot[0],kt=Ot[1],st=(0,Ae.Z)(W,{value:oe}),Tt=(0,I.Z)(st,2),Le=Tt[0],wt=Tt[1],Be=r.useMemo(function(){var J=Le==null?[]:Array.isArray(Le)?Le:[Le],N=(0,I.Z)(J,1),B=N[0],te=B===void 0?ye:B,Y=Le===null?[]:[te];if(O){if(Y=(0,ae.Z)(J),V||Le===void 0){var Ue=V>=0?V+1:2;for(Y=Y.slice(0,Ue);Y.length<Ue;){var Oe;Y.push((Oe=Y[Y.length-1])!==null&&Oe!==void 0?Oe:ye)}}Y.sort(function(De,Ge){return De-Ge})}return Y.forEach(function(De,Ge){Y[Ge]=ot(De)}),Y},[Le,O,ye,V,ot]),he=r.useRef(Be);he.current=Be;var T=function(N){return O?N:N[0]},ht=function(N){var B=(0,ae.Z)(N).sort(function(te,Y){return te-Y});X&&!(0,me.Z)(B,he.current,!0)&&X(T(B)),wt(B)},Et=function(N){if(!S){var B=0,te=Ne-ye;Be.forEach(function(Ue,Oe){var De=Math.abs(N-Ue);De<=te&&(te=De,B=Oe)});var Y=(0,ae.Z)(Be);Y[B]=N,O&&!Be.length&&V===void 0&&Y.push(N),$==null||$(T(Y)),ht(Y),M==null||M(T(Y))}},Ct=function(N){N.preventDefault();var B=ge.current.getBoundingClientRect(),te=B.width,Y=B.height,Ue=B.left,Oe=B.top,De=B.bottom,Ge=B.right,Ut=N.clientX,tt=N.clientY,at;switch(ut){case"btt":at=(De-tt)/Y;break;case"ttb":at=(tt-Oe)/Y;break;case"rtl":at=(Ge-Ut)/te;break;default:at=(Ut-Ue)/te}var oa=ye+at*(Ne-ye);Et(ot(oa))},Ht=r.useState(null),Lt=(0,I.Z)(Ht,2),ct=Lt[0],Qe=Lt[1],It=function(N,B){if(!S){var te=kt(Be,N,B);$==null||$(T(Be)),ht(te.values),M==null||M(T(te.values)),Qe(te.value)}};r.useEffect(function(){if(ct!==null){var J=Be.indexOf(ct);J>=0&&Fe.current.focus(J)}Qe(null)},[ct]);var jt=r.useMemo(function(){return w&&Ve===null?!1:w},[w,Ve]),zt=function(){M==null||M(T(he.current))},Ft=Ke(ge,ut,Be,ye,Ne,ot,ht,zt,kt),D=(0,I.Z)(Ft,4),qe=D[0],ra=D[1],yt=D[2],ia=D[3],Wt=function(N,B){ia(N,B),$==null||$(T(he.current))},Yt=qe!==-1;r.useEffect(function(){if(!Yt){var J=Be.lastIndexOf(ra);Fe.current.focus(J)}},[Yt]);var Xe=r.useMemo(function(){return(0,ae.Z)(yt).sort(function(J,N){return J-N})},[yt]),Re=r.useMemo(function(){return O?[Xe[0],Xe[Xe.length-1]]:[ye,Xe[0]]},[Xe,O,ye]),Vt=(0,I.Z)(Re,2),bt=Vt[0],et=Vt[1];r.useImperativeHandle(u,function(){return{focus:function(){Fe.current.focus(0)},blur:function(){var N=document,B=N.activeElement;ge.current.contains(B)&&(B==null||B.blur())}}}),r.useEffect(function(){o&&Fe.current.focus(0)},[]);var Xt=r.useMemo(function(){return{min:ye,max:Ne,direction:ut,disabled:S,keyboard:_,step:Ve,included:G,includedStart:bt,includedEnd:et,range:O,tabIndex:Te,ariaLabelForHandle:we,ariaLabelledByForHandle:He,ariaValueTextFormatterForHandle:Ye}},[ye,Ne,ut,S,_,Ve,G,bt,et,O,Te,we,He,Ye]);return r.createElement(Ie.Provider,{value:Xt},r.createElement("div",{ref:ge,className:Q()(d,v,(i={},(0,Ee.Z)(i,"".concat(d,"-disabled"),S),(0,Ee.Z)(i,"".concat(d,"-vertical"),R),(0,Ee.Z)(i,"".concat(d,"-horizontal"),!R),(0,Ee.Z)(i,"".concat(d,"-with-marks"),it.length),i)),style:F,onMouseDown:Ct},r.createElement("div",{className:"".concat(d,"-rail"),style:ne}),r.createElement(ft,{prefixCls:d,style:Me,values:Xe,startPoint:pe,onStartMove:jt?Wt:null}),r.createElement(At,{prefixCls:d,marks:it,dots:le,style:ve,activeStyle:Se}),r.createElement(Dt,{ref:Fe,prefixCls:d,style:$e,values:yt,draggingIndex:qe,onStartMove:Wt,onOffsetChange:It,onFocus:x,onBlur:g,handleRender:Ze}),r.createElement(Je,{prefixCls:d,marks:it,onClick:Et})))}),ea=t,ta=ea,aa=f(36355),lt=f(1684),vt=f(16089),Pt=f(8654),Mt=f(6848),We=r.forwardRef((e,u)=>{const{open:i}=e,c=(0,r.useRef)(null),d=(0,r.useRef)(null);function v(){vt.Z.cancel(d.current),d.current=null}function F(){d.current=(0,vt.Z)(()=>{var b;(b=c.current)===null||b===void 0||b.forceAlign(),d.current=null})}return r.useEffect(()=>(i?F():v(),v),[i,e.title]),r.createElement(Mt.Z,Object.assign({ref:(0,Pt.sQ)(c,u)},e))}),na=f(64993),A=f(17313),la=f(83116),ua=f(37613);const j=e=>{const{componentCls:u,antCls:i,controlSize:c,dotSize:d,marginFull:v,marginPart:F,colorFillContentHover:b}=e;return{[u]:Object.assign(Object.assign({},(0,A.Wf)(e)),{position:"relative",height:c,margin:`${F}px ${v}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${v}px ${F}px`},[`${u}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${u}-track`]:{position:"absolute",backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${u}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${u}-rail`]:{backgroundColor:e.railHoverBg},[`${u}-track`]:{backgroundColor:e.trackHoverBg},[`${u}-dot`]:{borderColor:b},[`${u}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${u}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${u}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${u}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.handleColor}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
inset-inline-start ${e.motionDurationMid},
|
|
inset-block-start ${e.motionDurationMid},
|
|
width ${e.motionDurationMid},
|
|
height ${e.motionDurationMid},
|
|
box-shadow ${e.motionDurationMid}
|
|
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.handleActiveColor}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${u}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${u}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${u}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${u}-dot`]:{position:"absolute",width:d,height:d,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${u}-disabled`]:{cursor:"not-allowed",[`${u}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${u}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
|
|
${u}-dot
|
|
`]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${u}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new na.C(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString()}`,insetInlineStart:0,insetBlockStart:0},[`
|
|
${u}-mark-text,
|
|
${u}-dot
|
|
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${i}-tooltip-inner`]:{minWidth:"unset"}})}},L=(e,u)=>{const{componentCls:i,railSize:c,handleSize:d,dotSize:v}=e,F=u?"paddingBlock":"paddingInline",b=u?"width":"height",S=u?"height":"width",a=u?"insetBlockStart":"insetInlineStart",_=u?"top":"insetInlineStart",o=(c*3-d)/2,x=(d-c)/2,g=u?{borderWidth:`${x}px 0`,transform:`translateY(-${x}px)`}:{borderWidth:`0 ${x}px`,transform:`translateX(-${x}px)`};return{[F]:c,[S]:c*3,[`${i}-rail`]:{[b]:"100%",[S]:c},[`${i}-track`]:{[S]:c},[`${i}-track-draggable`]:Object.assign({},g),[`${i}-handle`]:{[a]:o},[`${i}-mark`]:{insetInlineStart:0,top:0,[_]:c*3+(u?0:e.marginFull),[b]:"100%"},[`${i}-step`]:{insetInlineStart:0,top:0,[_]:c,[b]:"100%",[S]:c},[`${i}-dot`]:{position:"absolute",[a]:(c-v)/2}}},z=e=>{const{componentCls:u,marginPartWithMark:i}=e;return{[`${u}-horizontal`]:Object.assign(Object.assign({},L(e,!0)),{[`&${u}-with-marks`]:{marginBottom:i}})}},fe=e=>{const{componentCls:u}=e;return{[`${u}-vertical`]:Object.assign(Object.assign({},L(e,!1)),{height:"100%"})}};var gt=(0,la.Z)("Slider",e=>{const u=(0,ua.TS)(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[j(u),z(u),fe(u)]},e=>{const i=e.controlHeightLG/4,c=e.controlHeightSM/2,d=e.lineWidth+1,v=e.lineWidth+1*3;return{controlSize:i,railSize:4,handleSize:i,handleSizeHover:c,dotSize:8,handleLineWidth:d,handleLineWidthHover:v,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:e.colorPrimary,dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}}),$t=function(e,u){var i={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&u.indexOf(c)<0&&(i[c]=e[c]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)u.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(i[c[d]]=e[c[d]]);return i};const Nt=e=>typeof e=="number"?e.toString():"";var _e=r.forwardRef((e,u)=>{const{prefixCls:i,range:c,className:d,rootClassName:v,style:F,disabled:b,tooltipPrefixCls:S,tipFormatter:a,tooltipVisible:_,getTooltipPopupContainer:o,tooltipPlacement:x}=e,g=$t(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{direction:E,slider:C,getPrefixCls:p,getPopupContainer:Z}=r.useContext(aa.E_),s=r.useContext(lt.Z),P=b!=null?b:s,[oe,W]=r.useState({}),O=(U,R)=>{W(k=>Object.assign(Object.assign({},k),{[U]:R}))},V=(U,R)=>U||(R?E==="rtl"?"left":"right":"top"),X=p("slider",i),[$,M]=gt(X),q=Q()(d,C==null?void 0:C.className,v,{[`${X}-rtl`]:E==="rtl"},M);E==="rtl"&&!g.vertical&&(g.reverse=!g.reverse);const[ee,Ce]=r.useMemo(()=>c?typeof c=="object"?[!0,c.draggableTrack]:[!0,!1]:[!1],[c]),K=(U,R)=>{var k;const{index:G,dragging:pe}=R,{tooltip:Me={},vertical:$e}=e,ne=Object.assign({},Me),{open:ve,placement:Se,getPopupContainer:ce,prefixCls:le,formatter:Ze}=ne;let de;Ze||Ze===null?de=Ze:a||a===null?de=a:de=Nt;const Te=de?oe[G]||pe:!1,we=(k=ve!=null?ve:_)!==null&&k!==void 0?k:ve===void 0&&Te,He=Object.assign(Object.assign({},U.props),{onMouseEnter:()=>O(G,!0),onMouseLeave:()=>O(G,!1)}),Ye=p("tooltip",le!=null?le:S);return r.createElement(We,Object.assign({},ne,{prefixCls:Ye,title:de?de(R.value):"",open:we,placement:V(Se!=null?Se:x,$e),key:G,overlayClassName:`${X}-tooltip`,getPopupContainer:ce||o||Z}),r.cloneElement(U,He))},w=Object.assign(Object.assign({},C==null?void 0:C.style),F);return $(r.createElement(ta,Object.assign({},g,{step:g.step,range:ee,draggableTrack:Ce,className:q,style:w,disabled:P,ref:u,prefixCls:X,handleRender:K})))})}}]);
|