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/21105.async.js

1 line
10 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[21105],{15360:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var o=n(87462),r=n(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},i=n(43387),l=function(e,t){return r.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:s}))};var a=r.forwardRef(l)},55054:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var o=n(67294),r=n(57838),s=n(96159),i=n(94184),l=n.n(i),a=n(53124),c=n(4310);var u=e=>{const{value:t,formatter:n,precision:r,decimalSeparator:s,groupSeparator:i="",prefixCls:l}=e;let a;if("function"==typeof n)a=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",c=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,i),"number"==typeof r&&(c=c.padEnd(r,"0").slice(0,r>0?r:0)),c&&(c=`${s}${c}`),a=[o.createElement("span",{key:"int",className:`${l}-content-value-int`},e,t),c&&o.createElement("span",{key:"decimal",className:`${l}-content-value-decimal`},c)]}else a=e}return o.createElement("span",{className:`${l}-content-value`},a)},p=n(14747),f=n(67968),d=n(45503);const h=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,titleFontSize:s,colorTextHeading:i,contentFontSize:l,fontFamily:a}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,p.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:s},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:i,fontSize:l,fontFamily:a,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var v=(0,f.Z)("Statistic",(e=>{const t=(0,d.TS)(e,{});return[h(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var m=e=>{const{prefixCls:t,className:n,rootClassName:r,style:s,valueStyle:i,value:p=0,title:f,valueRender:d,prefix:h,suffix:m,loading:g=!1,onMouseEnter:y,onMouseLeave:b,decimalSeparator:L=".",groupSeparator:w=","}=e,{getPrefixCls:S,direction:E,statistic:C}=o.useContext(a.E_),M=S("statistic",t),[P,O]=v(M),k=o.createElement(u,Object.assign({decimalSeparator:L,groupSeparator:w,prefixCls:M},e,{value:p})),x=l()(M,{[`${M}-rtl`]:"rtl"===E},null==C?void 0:C.className,n,r,O);return P(o.createElement("div",{className:x,style:Object.assign(Object.assign({},null==C?void 0:C.style),s),onMouseEnter:y,onMouseLeave:b},f&&o.createElement("div",{className:`${M}-title`},f),o.createElement(c.Z,{paragraph:!1,loading:g,className:`${M}-skeleton`},o.createElement("div",{style:i,className:`${M}-content`},h&&o.createElement("span",{className:`${M}-content-prefix`},h),d?d(k):k,m&&o.createElement("span",{className:`${M}-content-suffix`},m)))))};const g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function y(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now();return function(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map((e=>e.slice(1,-1))),s=t.replace(o,"[]"),i=g.reduce(((e,t)=>{let[o,r]=t;if(e.includes(o)){const t=Math.floor(n/r);return n-=t*r,e.replace(new RegExp(`${o}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),s);let l=0;return i.replace(o,(()=>{const e=r[l];return l+=1,e}))}(Math.max(o-r,0),n)}const b=e=>{const{value:t,format:n="HH:mm:ss",onChange:i,onFinish:l}=e,a=(0,r.Z)(),c=o.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{a(),null==i||i(e-Date.now()),e<Date.now()&&(null==l||l(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};o.useEffect((()=>(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return o.createElement(m,Object.assign({},e,{valueRender:e=>(0,s.Tm)(e,{title:void 0}),formatter:(e,t)=>y(e,Object.assign(Object.assign({},t),{format:n}))}))};var L=o.memo(b);m.Countdown=L;var w=m},57761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(67294),s=l(r),i=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),o=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,s=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;o=this.props.isReverse?s:this.calculateOffset(e,s)}else o=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;o<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,o=t.element,r=t.hasMore,i=(t.initialLoad,t.isReverse),l=t.loader,a=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,a&&a(t)};var u=[n];return r&&(l?i?u.unshift(l):u.push(l):this.defaultLoader&&(i?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),s.default.createElement(o,c,u)}}]),t}(r.Component);a.propTypes={children:i.default.node.isRequired,element:i.default.node,hasMore:i.default.bool,initialLoad:i.default.bool,isReverse:i.default.bool,loader:i.default.node,loadMore:i.default.func.isRequired,pageStart:i.default.number,ref:i.default.func,getScrollParent:i.default.func,threshold:i.default.number,useCapture:i.default.bool,useWindow:i.default.bool},a.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=a,e.exports=t.default},246:function(e,t,n){e.exports=n(57761)}}]);