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

1 line
19 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[79921],{33853:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(54476),a=t(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},o=t(7657),s=function(e,n){return a.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:i}))};var l=a.forwardRef(s)},38819:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(54476),a=t(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},o=t(7657),s=function(e,n){return a.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:i}))};var l=a.forwardRef(s)},47472:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(54476),a=t(59301),i={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"},o=t(7657),s=function(e,n){return a.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:i}))};var l=a.forwardRef(s)},45202:function(e,n,t){t.r(n),t.d(n,{default:function(){return L}});var r=t(82242),a=t.n(r),i=t(79800),o=t.n(i),s=t(39647),l=t.n(s),c=t(59301),d=t(49389),u=t(57809),p=t(95237),m=t(43604),f=t(61621),h=t(58421),b=t(13767),g="acitons___teF7U",v=(t(7557),t(41498),t(43418)),x=t(6848),y=t(24905),C=t(83287),_=(t(94171),"listItem___ye5vB"),j="info___Z1Jmz",k="title___Pq4sD",$="titleLeft___nUs7_",S="titleRight___nhuLW",O="name___hjh5r";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var w=t(7338),N=t(56656),E=t.n(N),Z=t(37712),P=function(e){var n,t,r,a,i,s,l=e.v,u=e.k,p=(e.match,e.selectArrs),m=e.setSelectArrs,f=(e.dispatch,e.params),h=(0,c.useState)([]),b=o()(h,2),g=(b[0],b[1],(0,c.useState)(!1)),N=o()(g,2),P=(N[0],N[1],"YYYY-MM-DD"),I=E()("2020-11-15",P);var B=function(e){var n;(0,C.nr)({inner_ip:e.inner_ip,public_ip:e.public_ip,open_camera:e.open_camera,ip_limit:e.ip_limit,ip_bind:e.ip_bind,exercise_tips:e.exercise_tips,exerciseId:e.id,screen_open:e.screen_open,screen_num:e.screen_num,coursesId:e.course_id,login:null===(n=(0,w.eY)())||void 0===n?void 0:n.login,history:d.history})};"publish_time"===f.order_by&&f.sort_direction,"end_time"===f.order_by&&f.sort_direction;return(0,Z.jsxs)("div",{className:_,onClick:function(){B(l)},children:[(0,w.GJ)()&&(0,Z.jsx)(y.Z,{checked:p.includes(l.id),value:l.id,onClick:function(e){e.stopPropagation()},onChange:function(e){p.indexOf(l.id);p.indexOf(l.id)>-1?m(p.filter((function(e){return e!==l.id}))):m(p.concat(l.id))}}),(0,Z.jsxs)("div",{className:j,children:[(0,Z.jsxs)("div",{className:k,children:[(0,Z.jsxs)("div",{className:$,style:{marginRight:"15px"},children:[function(e){return null!=e&&e.includes("未开始")?(0,Z.jsx)("span",{style:{backgroundColor:"#B8B8B8"},className:"tag-style mr10",children:"未开始"}):null!=e&&e.includes("考试中")?(0,Z.jsx)("span",{style:{backgroundColor:"#007AFF"},className:"tag-style mr10",children:"考试中"}):null!=e&&e.includes("已结束")?(0,Z.jsx)("span",{style:{backgroundColor:"#FC2D6B"},className:"tag-style mr10",children:"已结束"}):void 0}(null==l?void 0:l.exercise_tips),(0,Z.jsx)(x.Z,{title:l.exercise_name,children:(0,Z.jsx)("span",{className:"".concat(O),style:{maxWidth:null!=l&&null!==(n=l.exercise_tips)&&void 0!==n&&n.includes("已开启防作弊")?400:498},children:l.exercise_name})}),!l.is_public&&(0,w.GJ)()&&(0,Z.jsx)(x.Z,{title:"私有属性,非课堂成员不能访问",children:(0,Z.jsx)("span",{className:"iconfont icon-suo1 ml10 mr10 c-light-black font12"})}),(null==l||null===(t=l.exercise_tips)||void 0===t?void 0:t.includes("已开启防作弊"))&&(0,Z.jsx)("span",{style:{flexShrink:0},className:"tag-style-fzb iconfont icon-fangzuobi ml10",children:"已开启防作弊"}),(null==l||null===(r=l.exercise_tips)||void 0===r?void 0:r.includes("已结束"))&&(null==l||null===(a=l.exercise_tips)||void 0===a?void 0:a.includes("未提交"))&&(0,Z.jsx)("span",{style:{flexShrink:0,backgroundColor:"#B8B8B8"},className:"tag-style ml10",children:"未提交"})]}),(0,Z.jsxs)("div",{className:S,onClick:function(e){e.stopPropagation(),e.preventDefault()},children:[(0,w.GJ)()&&l.assistant_auth&&(0,Z.jsx)("span",{onClick:function(e){e.stopPropagation();var n=E()(l.created_at,P);E()(I).diff(E()(n),"days")>0&&null!=l&&l.is_random?v.Z.info({title:"题库改版告知",content:(0,Z.jsx)(Z.Fragment,{children:"EduCoder已升级题库功能所有试题均需匹配知识点。 当前试卷所涉及试题均未匹配知识点,无法随机抽取,已不能有效使用。请在试卷库重新组卷后使用。 由此带来的不便,敬请谅解!"})}):null!=l&&l.is_random?d.history.push("/classrooms/".concat(l.course_id,"/exercise/").concat(l.id,"/random/preview?random=").concat(l.is_random)):d.history.push("/classrooms/".concat(l.course_id,"/exercise/").concat(l.id,"/detail?random=").concat(l.is_random,"&tabs=2"))},children:"预览"}),(0,w.RV)()&&(0,Z.jsx)("span",{onClick:function(){d.history.push("/classrooms/".concat(l.course_id,"/exercise/").concat(l.id,"/detail?random=").concat(l.is_random))},children:"详情"}),(0,Z.jsxs)(Z.Fragment,{children:[0===l.current_status&&l.exercise_status>1&&!(null!==(i=l.exercise_tips)&&void 0!==i&&i.includes("已结束"))&&(0,Z.jsx)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),B(l)},href:"",children:"继续考试"}),1===l.current_status&&l.exercise_status>1&&(0,Z.jsx)("span",{className:"mr20",style:{color:"#0152d9",marginRight:"5px"},onClick:function(e){var n;window.location.href="/classrooms/".concat(l.course_id,"/exercise/").concat(l.id,"/users/").concat(null===(n=(0,w.eY)())||void 0===n?void 0:n.login,"?check=true")},children:"查看试卷"}),2===l.current_status&&l.exercise_status>1&&!(null!==(s=l.exercise_tips)&&void 0!==s&&s.includes("已结束"))&&(0,Z.jsx)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),B(l)},href:"",children:"开始考试"})]})]})]}),(0,Z.jsxs)("p",{style:{display:"flex"},children:[(0,Z.jsxs)("span",{className:"c-grey-999 mr20",children:["创建者:",(0,Z.jsx)("span",{className:"c-blue",children:l.username})]}),(0,Z.jsxs)("span",{className:"c-grey-999 mr20",children:["所属课堂:",(0,Z.jsx)("span",{className:"c-blue",children:l.course_name})]}),(0,Z.jsxs)("span",{className:"ml30 c-grey-999 mr20",children:["考试时长:",(0,Z.jsx)("span",{className:"c-blue",children:null===l.time||-1===l.time?"不限":"".concat(l.time,"分钟")})]}),(0,Z.jsxs)("span",{className:"ml15 c-grey-999",children:["考试时间:",(0,Z.jsx)("span",{className:"c-blue",children:E()(null==l?void 0:l.published_time).format("YYYY-MM-DD HH:mm")})," 至 ",(0,Z.jsx)("span",{className:"c-blue",children:E()(null==l?void 0:l.end_time).format("YYYY-MM-DD HH:mm")})]})]})]})]},u)},I=["classroomList","globalSetting","exercise","loading","dispatch","match"],B=u.default.Option,L=(0,d.connect)((function(e){var n=e.classroomList,t=e.loading,r=e.globalSetting,a=e.exercise;return{classroomList:n,globalSetting:r,loading:t.effects,exercise:a}}))((function(e){var n,t,r,i,s=e.classroomList,v=(e.globalSetting,e.exercise),x=e.loading,y=e.dispatch,C=e.match,_=(l()(e,I),(0,c.useState)(a()({},(0,d.useParams)()))),j=o()(_,2),k=j[0],$=(j[1],(0,d.useLocation)(),s.detailExerciseList),S=(s.detailTopBanner,s.detailLeftMenus,(0,c.useState)([])),O=o()(S,2),w=O[0],N=O[1],E=(0,c.useState)(!1),L=o()(E,2),z=(L[0],L[1],(0,c.useState)({page:1,course_id:""})),D=o()(z,2),M=D[0],R=D[1];k.id=k.coursesId,(0,c.useEffect)((function(){Y(),y({type:"globalSetting/footerToggle",payload:!1}),y({type:"globalSetting/onlyShowBackTopToggle",payload:!0})}),[M]),(0,c.useEffect)((function(){N([])}),[$]);var Y=function(){document.body.scrollIntoView(),y({type:"exercise/getUserExercise",payload:M})};return(0,Z.jsxs)("section",{className:"minH500 minW1200",children:[(0,Z.jsx)("aside",{className:"".concat(g," w100"),children:(0,Z.jsxs)(p.Z,{className:"w100",children:[(0,Z.jsx)(m.Z,{flex:"1",children:(0,Z.jsx)("div",{className:"font20 blod",children:"考试列表"})}),(0,Z.jsx)(m.Z,{children:(0,Z.jsxs)("div",{children:["按课堂名称搜索试卷考试:",(0,Z.jsxs)(u.default,{className:"ml20",size:"large",style:{width:300},placeholder:"全部",onChange:function(e){M.course_id=e,M.page=1,R(a()({},M))},children:[(0,Z.jsx)(B,{value:"",children:"全部"}),null==v||null===(n=v.userExerciseList)||void 0===n||null===(n=n.courses)||void 0===n?void 0:n.map((function(e,n){return(0,Z.jsx)(B,{value:e.id,children:e.name})}))]})]})})]})}),0===(null==v||null===(t=v.userExerciseList)||void 0===t?void 0:t.exercises_count)&&(0,Z.jsx)(b.Z,{}),(0,Z.jsxs)(f.Z,{loading:x["exercise/getUserExercise"],active:!0,avatar:{size:40},paragraph:{rows:5},className:"mt30",children:[(null==v||null===(r=v.userExerciseList)||void 0===r?void 0:r.exercises)&&(null==v||null===(i=v.userExerciseList)||void 0===i?void 0:i.exercises.map((function(e,n){return(0,Z.jsx)(P,{v:e,k:n,match:C,selectArrs:w,setSelectArrs:N,dispatch:y,params:k})}))),(0,Z.jsx)("aside",{className:"tc mb50 mt30",children:(0,Z.jsx)(h.Z,{showTotal:function(e){var n;return"共 ".concat(null==v||null===(n=v.userExerciseList)||void 0===n?void 0:n.exercises_count," 条")},hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e){M.page=e,R(a()({},M))},defaultPageSize:20,defaultCurrent:M.page,current:M.page||1,total:null==v?void 0:v.userExerciseList.exercises_count})})]})]})}))},24905:function(e,n,t){t.d(n,{Z:function(){return k}});var r=t(92310),a=t.n(r),i=t(5630),o=t(59301),s=t(36355),l=t(1684),c=t(32441);var d=o.createContext(null),u=t(98447),p=t(14088),m=t(4572),f=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};const h=(e,n)=>{var t;const{prefixCls:r,className:h,rootClassName:b,children:g,indeterminate:v=!1,style:x,onMouseEnter:y,onMouseLeave:C,skipGroup:_=!1,disabled:j}=e,k=f(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:$,direction:S,checkbox:O}=o.useContext(s.E_),w=o.useContext(d),{isFormItemInput:N}=o.useContext(c.aM),E=o.useContext(l.Z),Z=null!==(t=(null==w?void 0:w.disabled)||j)&&void 0!==t?t:E,P=o.useRef(k.value);o.useEffect((()=>{null==w||w.registerValue(k.value)}),[]),o.useEffect((()=>{if(!_)return k.value!==P.current&&(null==w||w.cancelValue(P.current),null==w||w.registerValue(k.value),P.current=k.value),()=>null==w?void 0:w.cancelValue(k.value)}),[k.value]);const I=$("checkbox",r),[B,L]=(0,u.ZP)(I),z=Object.assign({},k);w&&!_&&(z.onChange=function(){k.onChange&&k.onChange.apply(k,arguments),w.toggleOption&&w.toggleOption({label:g,value:k.value})},z.name=w.name,z.checked=w.value.includes(k.value));const D=a()(`${I}-wrapper`,{[`${I}-rtl`]:"rtl"===S,[`${I}-wrapper-checked`]:z.checked,[`${I}-wrapper-disabled`]:Z,[`${I}-wrapper-in-form-item`]:N},null==O?void 0:O.className,h,b,L),M=a()({[`${I}-indeterminate`]:v},m.A,L),R=v?"mixed":void 0;return B(o.createElement(p.Z,{component:"Checkbox",disabled:Z},o.createElement("label",{className:D,style:Object.assign(Object.assign({},null==O?void 0:O.style),x),onMouseEnter:y,onMouseLeave:C},o.createElement(i.Z,Object.assign({"aria-checked":R},z,{prefixCls:I,className:M,disabled:Z,ref:n})),void 0!==g&&o.createElement("span",null,g))))};var b=o.forwardRef(h),g=t(94480),v=t(2738),x=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};const y=(e,n)=>{const{defaultValue:t,children:r,options:i=[],prefixCls:l,className:c,rootClassName:p,style:m,onChange:f}=e,h=x(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:y,direction:C}=o.useContext(s.E_),[_,j]=o.useState(h.value||t||[]),[k,$]=o.useState([]);o.useEffect((()=>{"value"in h&&j(h.value||[])}),[h.value]);const S=o.useMemo((()=>i.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[i]),O=y("checkbox",l),w=`${O}-group`,[N,E]=(0,u.ZP)(O),Z=(0,v.Z)(h,["value","disabled"]),P=i.length?S.map((e=>o.createElement(b,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:h.disabled,value:e.value,checked:_.includes(e.value),onChange:e.onChange,className:`${w}-item`,style:e.style,title:e.title},e.label))):r,I={toggleOption:e=>{const n=_.indexOf(e.value),t=(0,g.Z)(_);-1===n?t.push(e.value):t.splice(n,1),"value"in h||j(t),null==f||f(t.filter((e=>k.includes(e))).sort(((e,n)=>S.findIndex((n=>n.value===e))-S.findIndex((e=>e.value===n)))))},value:_,disabled:h.disabled,name:h.name,registerValue:e=>{$((n=>[].concat((0,g.Z)(n),[e])))},cancelValue:e=>{$((n=>n.filter((n=>n!==e))))}},B=a()(w,{[`${w}-rtl`]:"rtl"===C},c,p,E);return N(o.createElement("div",Object.assign({className:B,style:m},Z,{ref:n}),o.createElement(d.Provider,{value:I},P)))},C=o.forwardRef(y);var _=o.memo(C);const j=b;j.Group=_,j.__ANT_CHECKBOX=!0;var k=j},98447:function(e,n,t){t.d(n,{C2:function(){return s}});var r=t(17313),a=t(37613),i=t(83116);const o=e=>{const{checkboxCls:n}=e,t=`${n}-wrapper`;return[{[`${n}-group`]:Object.assign(Object.assign({},(0,r.Wf)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[t]:Object.assign(Object.assign({},(0,r.Wf)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${t}`]:{marginInlineStart:0},[`&${t}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[n]:Object.assign(Object.assign({},(0,r.Wf)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${n}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${n}-inner`]:Object.assign({},(0,r.oN)(e))},[`${n}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${t}:not(${t}-disabled),\n ${n}:not(${n}-disabled)\n `]:{[`&:hover ${n}-inner`]:{borderColor:e.colorPrimary}},[`${t}:not(${t}-disabled)`]:{[`&:hover ${n}-checked:not(${n}-disabled) ${n}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${n}-checked:not(${n}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-checked`]:{[`${n}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${t}-checked:not(${t}-disabled),\n ${n}-checked:not(${n}-disabled)\n `]:{[`&:hover ${n}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[n]:{"&-indeterminate":{[`${n}-inner`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${t}-disabled`]:{cursor:"not-allowed"},[`${n}-disabled`]:{[`&, ${n}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${n}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${n}-indeterminate ${n}-inner::after`]:{background:e.colorTextDisabled}}}]};function s(e,n){const t=(0,a.TS)(n,{checkboxCls:`.${e}`,checkboxSize:n.controlInteractiveSize});return[o(t)]}n.ZP=(0,i.Z)("Checkbox",((e,n)=>{let{prefixCls:t}=n;return[s(t,e)]}))},5630:function(e,n,t){var r=t(54476),a=t(33885),i=t(20068),o=t(42978),s=t(75931),l=t(92310),c=t.n(l),d=t(18929),u=t(59301),p=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],m=(0,u.forwardRef)((function(e,n){var t,l=e.prefixCls,m=void 0===l?"rc-checkbox":l,f=e.className,h=e.style,b=e.checked,g=e.disabled,v=e.defaultChecked,x=void 0!==v&&v,y=e.type,C=void 0===y?"checkbox":y,_=e.title,j=e.onChange,k=(0,s.Z)(e,p),$=(0,u.useRef)(null),S=(0,d.Z)(x,{value:b}),O=(0,o.Z)(S,2),w=O[0],N=O[1];(0,u.useImperativeHandle)(n,(function(){return{focus:function(){var e;null===(e=$.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=$.current)||void 0===e||e.blur()},input:$.current}}));var E=c()(m,f,(t={},(0,i.Z)(t,"".concat(m,"-checked"),w),(0,i.Z)(t,"".concat(m,"-disabled"),g),t));return u.createElement("span",{className:E,title:_,style:h},u.createElement("input",(0,r.Z)({},k,{className:"".concat(m,"-input"),ref:$,onChange:function(n){g||("checked"in e||N(n.target.checked),null==j||j({target:(0,a.Z)((0,a.Z)({},e),{},{type:C,checked:n.target.checked}),stopPropagation:function(){n.stopPropagation()},preventDefault:function(){n.preventDefault()},nativeEvent:n.nativeEvent}))},disabled:g,checked:!!w,type:C})),u.createElement("span",{className:"".concat(m,"-inner")}))}));n.Z=m}}]);