@netless/app-countdown
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,7 +0,7 @@ | ||
var NetlessAppCountdown=function(D){"use strict";var U,a,oe,A,re,_e,W={},le=[],ze=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C(e,t){for(var n in t)e[n]=t[n];return e}function ie(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var o,l,r,i={};for(r in t)r=="key"?o=t[r]:r=="ref"?l=t[r]:i[r]=t[r];if(arguments.length>2&&(i.children=arguments.length>3?U.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)i[r]===void 0&&(i[r]=e.defaultProps[r]);return I(e,i,o,l,null)}function I(e,t,n,o,l){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:l==null?++oe:l};return l==null&&a.vnode!=null&&a.vnode(r),r}function O(e){return e.children}function $(e,t){this.props=e,this.context=t}function N(e,t){if(t==null)return e.__?N(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?N(e):null}function ce(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ce(e)}}function se(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!T.__r++||_e!==a.debounceRendering)&&((_e=a.debounceRendering)||re)(T)}function T(){for(var e;T.__r=A.length;)e=A.sort(function(t,n){return t.__v.__b-n.__v.__b}),A=[],e.some(function(t){var n,o,l,r,i,u;t.__d&&(i=(r=(n=t).__v).__e,(u=n.__P)&&(o=[],(l=C({},r)).__v=r.__v+1,Q(u,r,l,n.__n,u.ownerSVGElement!==void 0,r.__h!=null?[i]:null,o,i==null?N(r):i,r.__h),ve(o,r),r.__e!=i&&ce(r)))})}function ae(e,t,n,o,l,r,i,u,f,d){var _,h,s,c,p,k,b,m=o&&o.__k||le,y=m.length;for(n.__k=[],_=0;_<t.length;_++)if((c=n.__k[_]=(c=t[_])==null||typeof c=="boolean"?null:typeof c=="string"||typeof c=="number"||typeof c=="bigint"?I(null,c,null,null,c):Array.isArray(c)?I(O,{children:c},null,null,null):c.__b>0?I(c.type,c.props,c.key,null,c.__v):c)!=null){if(c.__=n,c.__b=n.__b+1,(s=m[_])===null||s&&c.key==s.key&&c.type===s.type)m[_]=void 0;else for(h=0;h<y;h++){if((s=m[h])&&c.key==s.key&&c.type===s.type){m[h]=void 0;break}s=null}Q(e,c,s=s||W,l,r,i,u,f,d),p=c.__e,(h=c.ref)&&s.ref!=h&&(b||(b=[]),s.ref&&b.push(s.ref,null,c),b.push(h,c.__c||p,c)),p!=null?(k==null&&(k=p),typeof c.type=="function"&&c.__k===s.__k?c.__d=f=ue(c,f,e):f=fe(e,c,s,m,p,f),typeof n.type=="function"&&(n.__d=f)):f&&s.__e==f&&f.parentNode!=e&&(f=N(s))}for(n.__e=k,_=y;_--;)m[_]!=null&&(typeof n.type=="function"&&m[_].__e!=null&&m[_].__e==n.__d&&(n.__d=N(o,_+1)),me(m[_],m[_]));if(b)for(_=0;_<b.length;_++)be(b[_],b[++_],b[++_])}function ue(e,t,n){for(var o,l=e.__k,r=0;l&&r<l.length;r++)(o=l[r])&&(o.__=e,t=typeof o.type=="function"?ue(o,t,n):fe(n,o,o,l,o.__e,t));return t}function F(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){F(n,t)}):t.push(e)),t}function fe(e,t,n,o,l,r){var i,u,f;if(t.__d!==void 0)i=t.__d,t.__d=void 0;else if(n==null||l!=r||l.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(l),i=null;else{for(u=r,f=0;(u=u.nextSibling)&&f<o.length;f+=2)if(u==l)break e;e.insertBefore(l,r),i=r}return i!==void 0?i:l.nextSibling}function Ve(e,t,n,o,l){var r;for(r in n)r==="children"||r==="key"||r in t||L(e,r,null,n[r],o);for(r in t)l&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===t[r]||L(e,r,t[r],n[r],o)}function de(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||ze.test(t)?n:n+"px"}function L(e,t,n,o,l){var r;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||de(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||de(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o||e.addEventListener(t,r?he:pe,r):e.removeEventListener(t,r?he:pe,r);else if(t!=="dangerouslySetInnerHTML"){if(l)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function pe(e){this.l[e.type+!1](a.event?a.event(e):e)}function he(e){this.l[e.type+!0](a.event?a.event(e):e)}function Q(e,t,n,o,l,r,i,u,f){var d,_,h,s,c,p,k,b,m,y,w,g=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(f=n.__h,u=t.__e=n.__e,t.__h=null,r=[u]),(d=a.__b)&&d(t);try{e:if(typeof g=="function"){if(b=t.props,m=(d=g.contextType)&&o[d.__c],y=d?m?m.props.value:d.__:o,n.__c?k=(_=t.__c=n.__c).__=_.__E:("prototype"in g&&g.prototype.render?t.__c=_=new g(b,y):(t.__c=_=new $(b,y),_.constructor=g,_.render=qe),m&&m.sub(_),_.props=b,_.state||(_.state={}),_.context=y,_.__n=o,h=_.__d=!0,_.__h=[]),_.__s==null&&(_.__s=_.state),g.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=C({},_.__s)),C(_.__s,g.getDerivedStateFromProps(b,_.__s))),s=_.props,c=_.state,h)g.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==s&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(b,y),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(b,_.__s,y)===!1||t.__v===n.__v){_.props=b,_.state=_.__s,t.__v!==n.__v&&(_.__d=!1),_.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(S){S&&(S.__=t)}),_.__h.length&&i.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(b,_.__s,y),_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(s,c,p)})}_.context=y,_.props=b,_.state=_.__s,(d=a.__r)&&d(t),_.__d=!1,_.__v=t,_.__P=e,d=_.render(_.props,_.state,_.context),_.state=_.__s,_.getChildContext!=null&&(o=C(C({},o),_.getChildContext())),h||_.getSnapshotBeforeUpdate==null||(p=_.getSnapshotBeforeUpdate(s,c)),w=d!=null&&d.type===O&&d.key==null?d.props.children:d,ae(e,Array.isArray(w)?w:[w],t,n,o,l,r,i,u,f),_.base=t.__e,t.__h=null,_.__h.length&&i.push(_),k&&(_.__E=_.__=null),_.__e=!1}else r==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Be(n.__e,t,n,o,l,r,i,f);(d=a.diffed)&&d(t)}catch(S){t.__v=null,(f||r!=null)&&(t.__e=u,t.__h=!!f,r[r.indexOf(u)]=null),a.__e(S,t,n)}}function ve(e,t){a.__c&&a.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){a.__e(o,n.__v)}})}function Be(e,t,n,o,l,r,i,u){var f,d,_,h=n.props,s=t.props,c=t.type,p=0;if(c==="svg"&&(l=!0),r!=null){for(;p<r.length;p++)if((f=r[p])&&"setAttribute"in f==!!c&&(c?f.localName===c:f.nodeType===3)){e=f,r[p]=null;break}}if(e==null){if(c===null)return document.createTextNode(s);e=l?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c,s.is&&s),r=null,u=!1}if(c===null)h===s||u&&e.data===s||(e.data=s);else{if(r=r&&U.call(e.childNodes),d=(h=n.props||W).dangerouslySetInnerHTML,_=s.dangerouslySetInnerHTML,!u){if(r!=null)for(h={},p=0;p<e.attributes.length;p++)h[e.attributes[p].name]=e.attributes[p].value;(_||d)&&(_&&(d&&_.__html==d.__html||_.__html===e.innerHTML)||(e.innerHTML=_&&_.__html||""))}if(Ve(e,s,h,l,u),_)t.__k=[];else if(p=t.props.children,ae(e,Array.isArray(p)?p:[p],t,n,o,l&&c!=="foreignObject",r,i,r?r[0]:n.__k&&N(n,0),u),r!=null)for(p=r.length;p--;)r[p]!=null&&ie(r[p]);u||("value"in s&&(p=s.value)!==void 0&&(p!==h.value||p!==e.value||c==="progress"&&!p)&&L(e,"value",p,h.value,!1),"checked"in s&&(p=s.checked)!==void 0&&p!==e.checked&&L(e,"checked",p,h.checked,!1))}return e}function be(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){a.__e(o,n)}}function me(e,t,n){var o,l;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||be(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){a.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(l=0;l<o.length;l++)o[l]&&me(o[l],t,typeof e.type!="function");n||e.__e==null||ie(e.__e),e.__e=e.__d=void 0}function qe(e,t,n){return this.constructor(e,n)}function ye(e,t,n){var o,l,r;a.__&&a.__(e,t),l=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],Q(t,e=(!o&&n||t).__k=v(O,null,[e]),l||W,W,t.ownerSVGElement!==void 0,!o&&n?[n]:l?null:t.firstChild?U.call(t.childNodes):null,r,!o&&n?n:l?l.__e:t.firstChild,o),ve(r,e)}U=le.slice,a={__e:function(e,t){for(var n,o,l;t=t.__;)if((n=t.__c)&&!n.__)try{if((o=n.constructor)&&o.getDerivedStateFromError!=null&&(n.setState(o.getDerivedStateFromError(e)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),l=n.__d),l)return n.__E=n}catch(r){e=r}throw e}},oe=0,$.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof e=="function"&&(e=e(C({},n),this.props)),e&&C(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),se(this))},$.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),se(this))},$.prototype.render=O,A=[],re=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0;var Ge=`.time-cell{display:flex;flex-flow:column nowrap;align-items:center;font-family:sans-serif;font-weight:700}.time-cell.disabled .time-cell-up:before,.time-cell.disabled .time-cell-down:after{border-top-color:#0000000d;border-bottom-color:#0000000d}.time-cell-up:before,.time-cell-down:after{content:"";display:block;width:0;height:0;margin:0 0 4px;border-top:0;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid #151515;transition:border-color .4s;cursor:pointer}.time-cell-down:after{margin:4px 0 0;border-top:12px solid #151515;border-bottom:0}.rotor{position:relative;width:36px;height:64px;border-radius:4px;font-size:48px;text-align:center;perspective:200px}.rotor-top,.rotor-bottom{overflow:hidden;position:absolute;width:36px;height:32px}.rotor-leaf{z-index:1;position:absolute;width:36px;height:64px;transform-style:preserve-3d;transition:transform 0s}.rotor-leaf.flipped{transform:rotateX(-180deg);transition:all .5s ease-in-out}.rotor-leaf-front,.rotor-leaf-rear{overflow:hidden;position:absolute;width:36px;height:32px;margin:0;transform:rotateX(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}.rotor-leaf-front{line-height:64px;border-radius:4px 4px 0 0}.rotor-leaf-rear{line-height:0px;border-radius:0 0 4px 4px;transform:rotateX(-180deg)}.rotor-top{line-height:64px;border-radius:4px 4px 0 0}.rotor-bottom{bottom:0;line-height:0px;border-radius:0 0 4px 4px}.rotor:after{content:"";z-index:2;position:absolute;bottom:0px;left:0px;width:36px;height:32px;border-radius:0 0 4px 4px}.rotor,.rotor-top,.rotor-leaf-front{color:#fff;background-color:#151515}.rotor-bottom,.rotor-leaf-rear{color:#efefef;background-color:#202020}.rotor:after{border-top:solid 1px #151515}.telebox-color-scheme-dark .time-cell.disabled .time-cell-up:before,.telebox-color-scheme-dark .time-cell.disabled .time-cell-down:after{border-top-color:#ffffff14;border-bottom-color:#ffffff14}.telebox-color-scheme-dark .time-cell-up:before,.telebox-color-scheme-dark .time-cell-down:after{border-top-color:#d9d9df;border-bottom-color:#d9d9df}.telebox-color-scheme-dark .rotor,.telebox-color-scheme-dark .rotor-top,.telebox-color-scheme-dark .rotor-leaf-front{color:#383838;background-color:#efeff5}.telebox-color-scheme-dark .rotor-bottom,.telebox-color-scheme-dark .rotor-leaf-rear{color:#333;background-color:#eeecec}.telebox-color-scheme-dark .rotor:after{border-top:solid 1px #efeff5}.countdown-clock{display:flex;padding:5px}.countdown-clock>*{padding:0 5px}.countdown-clock-divider{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 1px}.countdown-clock-divider:before,.countdown-clock-divider:after{content:"";display:block;width:8px;height:8px;margin:6px 0;background-color:#000;border-radius:50%}.netless-app-countdown{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;transition:background-color .4s}.netless-app-countdown-shrink{display:inline-block;transition:background-color .4s}.netless-app-countdown-btns{width:100%;margin-top:10px;display:flex;flex-wrap:nowrap}.netless-app-countdown-btns>button{flex:1;display:block;margin:0 10px 0 0;padding:5px 10px;text-align:center;border:0;border-radius:4px;color:#fff;background-color:#3380ff;transition:background-color .4s,color .4s;cursor:pointer}.netless-app-countdown-btns>button:last-of-type{margin:0}.netless-app-countdown-btns>button:disabled{color:#00000040;background:#f5f5f5;cursor:not-allowed}.telebox-color-scheme-dark .netless-app-countdown-btns>button:disabled{color:#ffffff4d;background:rgba(255,255,255,.08)} | ||
`,z,x,ge,V=0,Y=[],ke=a.__b,we=a.__r,xe=a.diffed,Se=a.__c,Me=a.unmount;function j(e,t){a.__h&&a.__h(x,e,V||t),V=0;var n=x.__H||(x.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function H(e){return V=1,Xe(Oe,e)}function Xe(e,t,n){var o=j(z++,2);return o.t=e,o.__c||(o.__=[n?n(t):Oe(void 0,t),function(l){var r=o.t(o.__[0],l);o.__[0]!==r&&(o.__=[r,o.__[1]],o.__c.setState({}))}],o.__c=x),o.__}function E(e,t){var n=j(z++,3);!a.__s&&Pe(n.__H,t)&&(n.__=e,n.__H=t,x.__H.__h.push(n))}function $e(e,t){var n=j(z++,7);return Pe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function R(e,t){return V=8,$e(function(){return e},t)}function Ze(){var e;for(Y.sort(function(t,n){return t.__v.__b-n.__v.__b});e=Y.pop();)if(e.__P)try{e.__H.__h.forEach(B),e.__H.__h.forEach(ee),e.__H.__h=[]}catch(t){e.__H.__h=[],a.__e(t,e.__v)}}a.__b=function(e){x=null,ke&&ke(e)},a.__r=function(e){we&&we(e),z=0;var t=(x=e.__c).__H;t&&(t.__h.forEach(B),t.__h.forEach(ee),t.__h=[])},a.diffed=function(e){xe&&xe(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Y.push(t)!==1&&ge===a.requestAnimationFrame||((ge=a.requestAnimationFrame)||function(n){var o,l=function(){clearTimeout(r),Ce&&cancelAnimationFrame(o),setTimeout(n)},r=setTimeout(l,100);Ce&&(o=requestAnimationFrame(l))})(Ze)),x=null},a.__c=function(e,t){t.some(function(n){try{n.__h.forEach(B),n.__h=n.__h.filter(function(o){return!o.__||ee(o)})}catch(o){t.some(function(l){l.__h&&(l.__h=[])}),t=[],a.__e(o,n.__v)}}),Se&&Se(e,t)},a.unmount=function(e){Me&&Me(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{B(o)}catch(l){t=l}}),t&&a.__e(t,n.__v))};var Ce=typeof requestAnimationFrame=="function";function B(e){var t=x,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),x=t}function ee(e){var t=x;e.__c=e.__(),x=t}function Pe(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Oe(e,t){return typeof t=="function"?t(e):t}function Je(e,t){for(var n in t)e[n]=t[n];return e}function te(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function He(e){this.props=e}function q(e,t){function n(l){var r=this.props.ref,i=r==l.ref;return!i&&r&&(r.call?r(null):r.current=null),t?!t(this.props,l)||!i:te(this.props,l)}function o(l){return this.shouldComponentUpdate=n,v(e,l)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(He.prototype=new $).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,t){return te(this.props,e)||te(this.state,t)};var Ne=a.__b;a.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Ke=a.__e;a.__e=function(e,t,n){if(e.then){for(var o,l=t;l=l.__;)if((o=l.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Ke(e,t,n)};var Ee=a.unmount;function ne(){this.__u=0,this.t=null,this.__b=null}function Re(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function G(){this.u=null,this.o=null}a.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ee&&Ee(e)},(ne.prototype=new $).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var l=Re(o.__v),r=!1,i=function(){r||(r=!0,n.__R=null,l?l(u):u())};n.__R=i;var u=function(){if(!--o.__u){if(o.state.__e){var d=o.state.__e;o.__v.__k[0]=function h(s,c,p){return s&&(s.__v=null,s.__k=s.__k&&s.__k.map(function(k){return h(k,c,p)}),s.__c&&s.__c.__P===c&&(s.__e&&p.insertBefore(s.__e,s.__d),s.__c.__e=!0,s.__c.__P=p)),s}(d,d.__c.__P,d.__c.__O)}var _;for(o.setState({__e:o.__b=null});_=o.t.pop();)_.forceUpdate()}},f=t.__h===!0;o.__u++||f||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(i,i)},ne.prototype.componentWillUnmount=function(){this.t=[]},ne.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function r(i,u,f){return i&&(i.__c&&i.__c.__H&&(i.__c.__H.__.forEach(function(d){typeof d.__c=="function"&&d.__c()}),i.__c.__H=null),(i=Je({},i)).__c!=null&&(i.__c.__P===f&&(i.__c.__P=u),i.__c=null),i.__k=i.__k&&i.__k.map(function(d){return r(d,u,f)})),i}(this.__b,n,o.__O=o.__P)}this.__b=null}var l=t.__e&&v(O,null,e.fallback);return l&&(l.__h=null),[v(O,null,t.__e?null:e.children),l]};var Ae=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(G.prototype=new $).__e=function(e){var t=this,n=Re(t.__v),o=t.o.get(e);return o[0]++,function(l){var r=function(){t.props.revealOrder?(o.push(l),Ae(t,e,o)):l()};n?n(r):r()}},G.prototype.render=function(e){this.u=null,this.o=new Map;var t=F(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},G.prototype.componentDidUpdate=G.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ae(e,n,t)})};var Qe=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Ye=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,je=typeof document!="undefined",et=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};$.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty($.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var De=a.event;function tt(){}function nt(){return this.cancelBubble}function ot(){return this.defaultPrevented}a.event=function(e){return De&&(e=De(e)),e.persist=tt,e.isPropagationStopped=nt,e.isDefaultPrevented=ot,e.nativeEvent=e};var Ue={configurable:!0,get:function(){return this.class}},We=a.vnode;a.vnode=function(e){var t=e.type,n=e.props,o=n;if(typeof t=="string"){var l=t.indexOf("-")===-1;for(var r in o={},n){var i=n[r];je&&r==="children"&&t==="noscript"||r==="value"&&"defaultValue"in n&&i==null||(r==="defaultValue"&&"value"in n&&n.value==null?r="value":r==="download"&&i===!0?i="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!et(n.type)?r="oninput":/^onfocus$/i.test(r)?r="onfocusin":/^onblur$/i.test(r)?r="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():l&&Ye.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():i===null&&(i=void 0),o[r]=i)}t=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=F(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),t=="select"&&o.defaultValue!=null&&(o.value=F(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),e.props=o,n.class!=n.className&&(Ue.enumerable="className"in n,n.className!=null&&(o.class=n.className),Object.defineProperty(o,"className",Ue))}e.$$typeof=Qe,We&&We(e)};var Ie=a.__r;a.__r=function(e){Ie&&Ie(e)};var ct="",Te={exports:{}};/*! | ||
const NetlessAppCountdown=function(K){"use strict";var A,a,oe,D,ne,re,U={},_e=[],ze=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C(e,t){for(var o in t)e[o]=t[o];return e}function ie(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,o){var n,i,r,l={};for(r in t)r=="key"?n=t[r]:r=="ref"?i=t[r]:l[r]=t[r];if(arguments.length>2&&(l.children=arguments.length>3?A.call(arguments,2):o),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)l[r]===void 0&&(l[r]=e.defaultProps[r]);return W(e,l,n,i,null)}function W(e,t,o,n,i){var r={type:e,props:t,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++oe:i};return i==null&&a.vnode!=null&&a.vnode(r),r}function O(e){return e.children}function M(e,t){this.props=e,this.context=t}function N(e,t){if(t==null)return e.__?N(e.__,e.__.__k.indexOf(e)+1):null;for(var o;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null)return o.__e;return typeof e.type=="function"?N(e):null}function le(e){var t,o;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null){e.__e=e.__c.base=o.__e;break}return le(e)}}function ce(e){(!e.__d&&(e.__d=!0)&&D.push(e)&&!T.__r++||re!==a.debounceRendering)&&((re=a.debounceRendering)||ne)(T)}function T(){for(var e;T.__r=D.length;)e=D.sort(function(t,o){return t.__v.__b-o.__v.__b}),D=[],e.some(function(t){var o,n,i,r,l,u;t.__d&&(l=(r=(o=t).__v).__e,(u=o.__P)&&(n=[],(i=C({},r)).__v=r.__v+1,Q(u,r,i,o.__n,u.ownerSVGElement!==void 0,r.__h!=null?[l]:null,n,l==null?N(r):l,r.__h),he(n,r),r.__e!=l&&le(r)))})}function se(e,t,o,n,i,r,l,u,f,d){var _,h,s,c,p,k,b,m=n&&n.__k||_e,y=m.length;for(o.__k=[],_=0;_<t.length;_++)if((c=o.__k[_]=(c=t[_])==null||typeof c=="boolean"?null:typeof c=="string"||typeof c=="number"||typeof c=="bigint"?W(null,c,null,null,c):Array.isArray(c)?W(O,{children:c},null,null,null):c.__b>0?W(c.type,c.props,c.key,null,c.__v):c)!=null){if(c.__=o,c.__b=o.__b+1,(s=m[_])===null||s&&c.key==s.key&&c.type===s.type)m[_]=void 0;else for(h=0;h<y;h++){if((s=m[h])&&c.key==s.key&&c.type===s.type){m[h]=void 0;break}s=null}Q(e,c,s=s||U,i,r,l,u,f,d),p=c.__e,(h=c.ref)&&s.ref!=h&&(b||(b=[]),s.ref&&b.push(s.ref,null,c),b.push(h,c.__c||p,c)),p!=null?(k==null&&(k=p),typeof c.type=="function"&&c.__k===s.__k?c.__d=f=ae(c,f,e):f=ue(e,c,s,m,p,f),typeof o.type=="function"&&(o.__d=f)):f&&s.__e==f&&f.parentNode!=e&&(f=N(s))}for(o.__e=k,_=y;_--;)m[_]!=null&&(typeof o.type=="function"&&m[_].__e!=null&&m[_].__e==o.__d&&(o.__d=N(n,_+1)),be(m[_],m[_]));if(b)for(_=0;_<b.length;_++)ve(b[_],b[++_],b[++_])}function ae(e,t,o){for(var n,i=e.__k,r=0;i&&r<i.length;r++)(n=i[r])&&(n.__=e,t=typeof n.type=="function"?ae(n,t,o):ue(o,n,n,i,n.__e,t));return t}function F(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(o){F(o,t)}):t.push(e)),t}function ue(e,t,o,n,i,r){var l,u,f;if(t.__d!==void 0)l=t.__d,t.__d=void 0;else if(o==null||i!=r||i.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(i),l=null;else{for(u=r,f=0;(u=u.nextSibling)&&f<n.length;f+=2)if(u==i)break e;e.insertBefore(i,r),l=r}return l!==void 0?l:i.nextSibling}function Ve(e,t,o,n,i){var r;for(r in o)r==="children"||r==="key"||r in t||L(e,r,null,o[r],n);for(r in t)i&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||o[r]===t[r]||L(e,r,t[r],o[r],n)}function fe(e,t,o){t[0]==="-"?e.setProperty(t,o):e[t]=o==null?"":typeof o!="number"||ze.test(t)?o:o+"px"}function L(e,t,o,n,i){var r;e:if(t==="style")if(typeof o=="string")e.style.cssText=o;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||fe(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||fe(e.style,t,o[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=o,o?n||e.addEventListener(t,r?pe:de,r):e.removeEventListener(t,r?pe:de,r);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=o==null?"":o;break e}catch{}typeof o=="function"||(o!=null&&(o!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,o):e.removeAttribute(t))}}function de(e){this.l[e.type+!1](a.event?a.event(e):e)}function pe(e){this.l[e.type+!0](a.event?a.event(e):e)}function Q(e,t,o,n,i,r,l,u,f){var d,_,h,s,c,p,k,b,m,y,w,g=t.type;if(t.constructor!==void 0)return null;o.__h!=null&&(f=o.__h,u=t.__e=o.__e,t.__h=null,r=[u]),(d=a.__b)&&d(t);try{e:if(typeof g=="function"){if(b=t.props,m=(d=g.contextType)&&n[d.__c],y=d?m?m.props.value:d.__:n,o.__c?k=(_=t.__c=o.__c).__=_.__E:("prototype"in g&&g.prototype.render?t.__c=_=new g(b,y):(t.__c=_=new M(b,y),_.constructor=g,_.render=Be),m&&m.sub(_),_.props=b,_.state||(_.state={}),_.context=y,_.__n=n,h=_.__d=!0,_.__h=[]),_.__s==null&&(_.__s=_.state),g.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=C({},_.__s)),C(_.__s,g.getDerivedStateFromProps(b,_.__s))),s=_.props,c=_.state,h)g.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==s&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(b,y),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(b,_.__s,y)===!1||t.__v===o.__v){_.props=b,_.state=_.__s,t.__v!==o.__v&&(_.__d=!1),_.__v=t,t.__e=o.__e,t.__k=o.__k,t.__k.forEach(function(S){S&&(S.__=t)}),_.__h.length&&l.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(b,_.__s,y),_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(s,c,p)})}_.context=y,_.props=b,_.state=_.__s,(d=a.__r)&&d(t),_.__d=!1,_.__v=t,_.__P=e,d=_.render(_.props,_.state,_.context),_.state=_.__s,_.getChildContext!=null&&(n=C(C({},n),_.getChildContext())),h||_.getSnapshotBeforeUpdate==null||(p=_.getSnapshotBeforeUpdate(s,c)),w=d!=null&&d.type===O&&d.key==null?d.props.children:d,se(e,Array.isArray(w)?w:[w],t,o,n,i,r,l,u,f),_.base=t.__e,t.__h=null,_.__h.length&&l.push(_),k&&(_.__E=_.__=null),_.__e=!1}else r==null&&t.__v===o.__v?(t.__k=o.__k,t.__e=o.__e):t.__e=qe(o.__e,t,o,n,i,r,l,f);(d=a.diffed)&&d(t)}catch(S){t.__v=null,(f||r!=null)&&(t.__e=u,t.__h=!!f,r[r.indexOf(u)]=null),a.__e(S,t,o)}}function he(e,t){a.__c&&a.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(n){n.call(o)})}catch(n){a.__e(n,o.__v)}})}function qe(e,t,o,n,i,r,l,u){var f,d,_,h=o.props,s=t.props,c=t.type,p=0;if(c==="svg"&&(i=!0),r!=null){for(;p<r.length;p++)if((f=r[p])&&"setAttribute"in f==!!c&&(c?f.localName===c:f.nodeType===3)){e=f,r[p]=null;break}}if(e==null){if(c===null)return document.createTextNode(s);e=i?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c,s.is&&s),r=null,u=!1}if(c===null)h===s||u&&e.data===s||(e.data=s);else{if(r=r&&A.call(e.childNodes),d=(h=o.props||U).dangerouslySetInnerHTML,_=s.dangerouslySetInnerHTML,!u){if(r!=null)for(h={},p=0;p<e.attributes.length;p++)h[e.attributes[p].name]=e.attributes[p].value;(_||d)&&(_&&(d&&_.__html==d.__html||_.__html===e.innerHTML)||(e.innerHTML=_&&_.__html||""))}if(Ve(e,s,h,i,u),_)t.__k=[];else if(p=t.props.children,se(e,Array.isArray(p)?p:[p],t,o,n,i&&c!=="foreignObject",r,l,r?r[0]:o.__k&&N(o,0),u),r!=null)for(p=r.length;p--;)r[p]!=null&&ie(r[p]);u||("value"in s&&(p=s.value)!==void 0&&(p!==e.value||c==="progress"&&!p||c==="option"&&p!==h.value)&&L(e,"value",p,h.value,!1),"checked"in s&&(p=s.checked)!==void 0&&p!==e.checked&&L(e,"checked",p,h.checked,!1))}return e}function ve(e,t,o){try{typeof e=="function"?e(t):e.current=t}catch(n){a.__e(n,o)}}function be(e,t,o){var n,i;if(a.unmount&&a.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||ve(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){a.__e(r,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&be(n[i],t,typeof e.type!="function");o||e.__e==null||ie(e.__e),e.__e=e.__d=void 0}function Be(e,t,o){return this.constructor(e,o)}function me(e,t,o){var n,i,r;a.__&&a.__(e,t),i=(n=typeof o=="function")?null:o&&o.__k||t.__k,r=[],Q(t,e=(!n&&o||t).__k=v(O,null,[e]),i||U,U,t.ownerSVGElement!==void 0,!n&&o?[o]:i?null:t.firstChild?A.call(t.childNodes):null,r,!n&&o?o:i?i.__e:t.firstChild,n),he(r,e)}A=_e.slice,a={__e:function(e,t,o,n){for(var i,r,l;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(e)),l=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),l=i.__d),l)return i.__E=i}catch(u){e=u}throw e}},oe=0,M.prototype.setState=function(e,t){var o;o=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof e=="function"&&(e=e(C({},o),this.props)),e&&C(o,e),e!=null&&this.__v&&(t&&this.__h.push(t),ce(this))},M.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ce(this))},M.prototype.render=O,D=[],ne=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0;const Ge=`.time-cell{display:flex;flex-flow:column nowrap;align-items:center;font-family:sans-serif;font-weight:700}.time-cell.disabled .time-cell-up:before,.time-cell.disabled .time-cell-down:after{border-top-color:#0000000d;border-bottom-color:#0000000d}.time-cell-up:before,.time-cell-down:after{content:"";display:block;width:0;height:0;margin:0 0 4px;border-top:0;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid #151515;transition:border-color .4s;cursor:pointer}.time-cell-down:after{margin:4px 0 0;border-top:12px solid #151515;border-bottom:0}.rotor{position:relative;width:36px;height:64px;border-radius:4px;font-size:48px;text-align:center;perspective:200px}.rotor-top,.rotor-bottom{overflow:hidden;position:absolute;width:36px;height:32px}.rotor-leaf{z-index:1;position:absolute;width:36px;height:64px;transform-style:preserve-3d;transition:transform 0s}.rotor-leaf.flipped{transform:rotateX(-180deg);transition:all .5s ease-in-out}.rotor-leaf-front,.rotor-leaf-rear{overflow:hidden;position:absolute;width:36px;height:32px;margin:0;transform:rotateX(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}.rotor-leaf-front{line-height:64px;border-radius:4px 4px 0 0}.rotor-leaf-rear{line-height:0px;border-radius:0 0 4px 4px;transform:rotateX(-180deg)}.rotor-top{line-height:64px;border-radius:4px 4px 0 0}.rotor-bottom{bottom:0;line-height:0px;border-radius:0 0 4px 4px}.rotor:after{content:"";z-index:2;position:absolute;bottom:0px;left:0px;width:36px;height:32px;border-radius:0 0 4px 4px}.rotor,.rotor-top,.rotor-leaf-front{color:#fff;background-color:#151515}.rotor-bottom,.rotor-leaf-rear{color:#efefef;background-color:#202020}.rotor:after{border-top:solid 1px #151515}.telebox-color-scheme-dark .time-cell.disabled .time-cell-up:before,.telebox-color-scheme-dark .time-cell.disabled .time-cell-down:after{border-top-color:#ffffff14;border-bottom-color:#ffffff14}.telebox-color-scheme-dark .time-cell-up:before,.telebox-color-scheme-dark .time-cell-down:after{border-top-color:#d9d9df;border-bottom-color:#d9d9df}.telebox-color-scheme-dark .rotor,.telebox-color-scheme-dark .rotor-top,.telebox-color-scheme-dark .rotor-leaf-front{color:#383838;background-color:#efeff5}.telebox-color-scheme-dark .rotor-bottom,.telebox-color-scheme-dark .rotor-leaf-rear{color:#333;background-color:#eeecec}.telebox-color-scheme-dark .rotor:after{border-top:solid 1px #efeff5}.countdown-clock{display:flex;padding:5px}.countdown-clock>*{padding:0 5px}.countdown-clock-divider{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 1px}.countdown-clock-divider:before,.countdown-clock-divider:after{content:"";display:block;width:8px;height:8px;margin:6px 0;background-color:#000;border-radius:50%}.netless-app-countdown{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;transition:background-color .4s}.netless-app-countdown-shrink{display:inline-block;transition:background-color .4s}.netless-app-countdown-btns{width:100%;margin-top:10px;display:flex;flex-wrap:nowrap}.netless-app-countdown-btns>button{flex:1;display:block;margin:0 10px 0 0;padding:5px 10px;text-align:center;border:0;border-radius:4px;color:#fff;background-color:#3380ff;transition:background-color .4s,color .4s;cursor:pointer}.netless-app-countdown-btns>button:last-of-type{margin:0}.netless-app-countdown-btns>button:disabled{color:#00000040;background:#f5f5f5;cursor:not-allowed}.telebox-color-scheme-dark .netless-app-countdown-btns>button:disabled{color:#ffffff4d;background:rgba(255,255,255,.08)} | ||
`;var I,x,ye,z=0,ge=[],ke=a.__b,we=a.__r,xe=a.diffed,Se=a.__c,Me=a.unmount;function Y(e,t){a.__h&&a.__h(x,e,z||t),z=0;var o=x.__H||(x.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({}),o.__[e]}function H(e){return z=1,Xe(Oe,e)}function Xe(e,t,o){var n=Y(I++,2);return n.t=e,n.__c||(n.__=[o?o(t):Oe(void 0,t),function(i){var r=n.t(n.__[0],i);n.__[0]!==r&&(n.__=[r,n.__[1]],n.__c.setState({}))}],n.__c=x),n.__}function E(e,t){var o=Y(I++,3);!a.__s&&Pe(o.__H,t)&&(o.__=e,o.__H=t,x.__H.__h.push(o))}function $e(e,t){var o=Y(I++,7);return Pe(o.__H,t)&&(o.__=e(),o.__H=t,o.__h=e),o.__}function R(e,t){return z=8,$e(function(){return e},t)}function Ze(){for(var e;e=ge.shift();)if(e.__P)try{e.__H.__h.forEach(V),e.__H.__h.forEach(j),e.__H.__h=[]}catch(t){e.__H.__h=[],a.__e(t,e.__v)}}a.__b=function(e){x=null,ke&&ke(e)},a.__r=function(e){we&&we(e),I=0;var t=(x=e.__c).__H;t&&(t.__h.forEach(V),t.__h.forEach(j),t.__h=[])},a.diffed=function(e){xe&&xe(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(ge.push(t)!==1&&ye===a.requestAnimationFrame||((ye=a.requestAnimationFrame)||function(o){var n,i=function(){clearTimeout(r),Ce&&cancelAnimationFrame(n),setTimeout(o)},r=setTimeout(i,100);Ce&&(n=requestAnimationFrame(i))})(Ze)),x=null},a.__c=function(e,t){t.some(function(o){try{o.__h.forEach(V),o.__h=o.__h.filter(function(n){return!n.__||j(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],a.__e(n,o.__v)}}),Se&&Se(e,t)},a.unmount=function(e){Me&&Me(e);var t,o=e.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{V(n)}catch(i){t=i}}),t&&a.__e(t,o.__v))};var Ce=typeof requestAnimationFrame=="function";function V(e){var t=x,o=e.__c;typeof o=="function"&&(e.__c=void 0,o()),x=t}function j(e){var t=x;e.__c=e.__(),x=t}function Pe(e,t){return!e||e.length!==t.length||t.some(function(o,n){return o!==e[n]})}function Oe(e,t){return typeof t=="function"?t(e):t}function Je(e,t){for(var o in t)e[o]=t[o];return e}function ee(e,t){for(var o in e)if(o!=="__source"&&!(o in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function He(e){this.props=e}function q(e,t){function o(i){var r=this.props.ref,l=r==i.ref;return!l&&r&&(r.call?r(null):r.current=null),t?!t(this.props,i)||!l:ee(this.props,i)}function n(i){return this.shouldComponentUpdate=o,v(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(He.prototype=new M).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,t){return ee(this.props,e)||ee(this.state,t)};var Ne=a.__b;a.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Ke=a.__e;a.__e=function(e,t,o,n){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=o.__e,t.__k=o.__k),i.__c(e,t)}Ke(e,t,o,n)};var Ee=a.unmount;function te(){this.__u=0,this.t=null,this.__b=null}function Re(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function B(){this.u=null,this.o=null}a.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ee&&Ee(e)},(te.prototype=new M).__c=function(e,t){var o=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(o);var i=Re(n.__v),r=!1,l=function(){r||(r=!0,o.__R=null,i?i(u):u())};o.__R=l;var u=function(){if(!--n.__u){if(n.state.__e){var d=n.state.__e;n.__v.__k[0]=function h(s,c,p){return s&&(s.__v=null,s.__k=s.__k&&s.__k.map(function(k){return h(k,c,p)}),s.__c&&s.__c.__P===c&&(s.__e&&p.insertBefore(s.__e,s.__d),s.__c.__e=!0,s.__c.__P=p)),s}(d,d.__c.__P,d.__c.__O)}var _;for(n.setState({__e:n.__b=null});_=n.t.pop();)_.forceUpdate()}},f=t.__h===!0;n.__u++||f||n.setState({__e:n.__b=n.__v.__k[0]}),e.then(l,l)},te.prototype.componentWillUnmount=function(){this.t=[]},te.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function r(l,u,f){return l&&(l.__c&&l.__c.__H&&(l.__c.__H.__.forEach(function(d){typeof d.__c=="function"&&d.__c()}),l.__c.__H=null),(l=Je({},l)).__c!=null&&(l.__c.__P===f&&(l.__c.__P=u),l.__c=null),l.__k=l.__k&&l.__k.map(function(d){return r(d,u,f)})),l}(this.__b,o,n.__O=n.__P)}this.__b=null}var i=t.__e&&v(O,null,e.fallback);return i&&(i.__h=null),[v(O,null,t.__e?null:e.children),i]};var De=function(e,t,o){if(++o[1]===o[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(o=e.u;o;){for(;o.length>3;)o.pop()();if(o[1]<o[0])break;e.u=o=o[2]}};(B.prototype=new M).__e=function(e){var t=this,o=Re(t.__v),n=t.o.get(e);return n[0]++,function(i){var r=function(){t.props.revealOrder?(n.push(i),De(t,e,n)):i()};o?o(r):r()}},B.prototype.render=function(e){this.u=null,this.o=new Map;var t=F(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var o=t.length;o--;)this.o.set(t[o],this.u=[1,0,this.u]);return e.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,o){De(e,o,t)})};var Qe=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ye=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,je=typeof document<"u",et=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};M.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(M.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ae=a.event;function tt(){}function ot(){return this.cancelBubble}function nt(){return this.defaultPrevented}a.event=function(e){return Ae&&(e=Ae(e)),e.persist=tt,e.isPropagationStopped=ot,e.isDefaultPrevented=nt,e.nativeEvent=e};var Ue={configurable:!0,get:function(){return this.class}},We=a.vnode;a.vnode=function(e){var t=e.type,o=e.props,n=o;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var r in n={},o){var l=o[r];je&&r==="children"&&t==="noscript"||r==="value"&&"defaultValue"in o&&l==null||(r==="defaultValue"&&"value"in o&&o.value==null?r="value":r==="download"&&l===!0?l="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!et(o.type)?r="oninput":/^onfocus$/i.test(r)?r="onfocusin":/^onblur$/i.test(r)?r="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(r)?r=r.toLowerCase():i&&Ye.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():l===null&&(l=void 0),n[r]=l)}t=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=F(o.children).forEach(function(u){u.props.selected=n.value.indexOf(u.props.value)!=-1})),t=="select"&&n.defaultValue!=null&&(n.value=F(o.children).forEach(function(u){u.props.selected=n.multiple?n.defaultValue.indexOf(u.props.value)!=-1:n.defaultValue==u.props.value})),e.props=n,o.class!=o.className&&(Ue.enumerable="className"in o,o.className!=null&&(n.class=o.className),Object.defineProperty(n,"className",Ue))}e.$$typeof=Qe,We&&We(e)};var Te=a.__r;a.__r=function(e){Te&&Te(e),e.__c};const ct="";var Fe={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o=[],l=0;l<arguments.length;l++){var r=arguments[l];if(!!r){var i=typeof r;if(i==="string"||i==="number")o.push(r);else if(Array.isArray(r)){if(r.length){var u=n.apply(null,r);u&&o.push(u)}}else if(i==="object")if(r.toString===Object.prototype.toString)for(var f in r)t.call(r,f)&&r[f]&&o.push(f);else o.push(r.toString())}}return o.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Te);var Fe=Te.exports;const X=q(({digit:e,disabled:t,onUp:n,onDown:o})=>{const[l,r]=H(0),[i,u]=H(!1);return E(()=>{if(t){u(!0);const f=window.setTimeout(()=>{u(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),v("div",{class:Fe("time-cell",{disabled:t})},v("div",{class:"time-cell-up",onClick:t?void 0:n}),v("div",{class:"rotor"},v("div",{class:Fe("rotor-leaf",{flipped:i})},v("figure",{class:"rotor-leaf-rear"},e),v("figure",{class:"rotor-leaf-front"},l)),v("div",{class:"rotor-top"},e),v("div",{class:"rotor-bottom"},l)),v("div",{class:"time-cell-down",onClick:t?void 0:o}))});var M;(function(e){e[e.AddTenMinutes=0]="AddTenMinutes",e[e.ReduceTenMinutes=1]="ReduceTenMinutes",e[e.AddOneMinute=2]="AddOneMinute",e[e.ReduceOneMinute=3]="ReduceOneMinute",e[e.AddTenSeconds=4]="AddTenSeconds",e[e.ReduceTenSeconds=5]="ReduceTenSeconds",e[e.AddOneSecond=6]="AddOneSecond",e[e.ReduceOneSecond=7]="ReduceOneSecond"})(M||(M={}));function Le(e){return $e(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function P(e,t){return R(()=>e(t),[e])}const rt=q(({minutes:e,seconds:t,disabled:n,onAdjustTime:o})=>{const l=Le(e),r=Le(t),i=P(o,0),u=P(o,1),f=P(o,2),d=P(o,3),_=P(o,4),h=P(o,5),s=P(o,6),c=P(o,7);return v("div",{className:"countdown-clock"},v(X,{disabled:n,digit:l[0],onUp:i,onDown:u}),v(X,{digit:l[1],disabled:n,onUp:f,onDown:d}),v("div",{class:"countdown-clock-divider"}),v(X,{disabled:n,digit:r[0],onUp:_,onDown:h}),v(X,{digit:r[1],disabled:n,onUp:s,onDown:c}))}),_t=q(({readonly:e,countdownSecs:t,startTime:n,paused:o,onAdjustTime:l,onStart:r,onPause:i,onResume:u,onReset:f})=>{const[d,_]=H(0),h=n>0&&d>=n,s=t-(h?d-n:0),c=Math.floor(s/60),p=s-c*60;return E(()=>{let k=NaN;if(t>0&&n>0&&!o){const b=()=>{_(Math.floor(Date.now()/1e3)),k=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(k)}else window.cancelAnimationFrame(k)},[n,o,t]),E(()=>{n>0&&d-n>=t&&f()},[d,n,t,f]),v("div",{class:"netless-app-countdown"},v("div",{class:"netless-app-countdown-shrink"},v(rt,{minutes:c,seconds:p,disabled:e||h,onAdjustTime:l}),v("div",{class:"netless-app-countdown-btns"},o?v(O,null,v("button",{onClick:f,disabled:e},"Reset"),v("button",{onClick:u,disabled:e},"Resume")):h?v("button",{onClick:i,disabled:e},"Pause"):v("button",{onClick:r,disabled:e||s<=0},"Start"))))}),lt=q(({context:e,storage:t})=>{const[n,o]=H(()=>e.getIsWritable()),[l,r]=H(0),[i,u]=H(0),[f,d]=H(!1),_=i>0,h=R(()=>{e.getIsWritable()&&(d(!1),u(Math.floor(Date.now()/1e3)))},[e]),s=R(()=>{e.getIsWritable()&&d(!0)},[e]),c=R(()=>{e.getIsWritable()&&d(!1)},[e]),p=R(()=>{e.getIsWritable()&&(d(!1),r(0),u(0))},[e]),k=R(b=>{_||r(m=>{if(!e.getIsWritable())return m;const y=Math.floor(m/60),w=m-y*60,g=Math.floor(y/10),S=y%10,Z=Math.floor(w/10),J=w%10;switch(b){case M.AddTenMinutes:{const K=S+w===0?7:6;return((g+1)%K*10+S)*60+w}case M.ReduceTenMinutes:{const K=S+w===0?7:6;return((g+K-1)%K*10+S)*60+w}case M.AddOneMinute:return(Math.min(5,g)*10+(S+1)%10)*60+w;case M.ReduceOneMinute:return(Math.min(5,g)*10+(S+10-1)%10)*60+w;case M.AddTenSeconds:return y*60+((Z+1)%6*10+J);case M.ReduceTenSeconds:return y*60+((Z+6-1)%6*10+J);case M.AddOneSecond:return y*60+(Math.min(5,Z)*10+(J+1)%10);case M.ReduceOneSecond:return y*60+(Math.min(5,Z)*10+(J+10-1)%10);default:return m}})},[_,e]);return E(()=>(o(e.getIsWritable()),e.emitter.on("writableChange",o),()=>e.emitter.off("writableChange",o)),[e]),E(()=>{const b=m=>{m.countdownSecs&&r(t.state.countdownSecs),m.paused&&d(t.state.paused),m.startTime&&u(t.state.startTime)};return t.onStateChanged.addListener(b),()=>t.onStateChanged.removeListener(b)},[t]),E(()=>{e.getIsWritable()&&t.setState({countdownSecs:l,paused:f,startTime:i})},[l,f,i,e]),v(_t,{readonly:!n,countdownSecs:l,startTime:i,paused:f,onAdjustTime:k,onStart:h,onPause:s,onResume:c,onReset:p})}),it={kind:"Countdown",config:{minwidth:208,minheight:216},setup(e){const t=e.getBox();t.mountStyles(Ge);const n=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});ye(v(lt,{context:e,storage:n}),t.$content),e.emitter.on("destroy",()=>{ye(null,t.$content)})}};return D.default=it,Object.defineProperty(D,"__esModule",{value:!0}),D[Symbol.toStringTag]="Module",D}({}); | ||
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var n=[],i=0;i<arguments.length;i++){var r=arguments[i];if(!!r){var l=typeof r;if(l==="string"||l==="number")n.push(r);else if(Array.isArray(r)){if(r.length){var u=o.apply(null,r);u&&n.push(u)}}else if(l==="object")if(r.toString===Object.prototype.toString)for(var f in r)t.call(r,f)&&r[f]&&n.push(f);else n.push(r.toString())}}return n.join(" ")}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Fe);const Le=Fe.exports,G=q(({digit:e,disabled:t,onUp:o,onDown:n})=>{const[i,r]=H(0),[l,u]=H(!1);return E(()=>{if(t){u(!0);const f=window.setTimeout(()=>{u(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),v("div",{class:Le("time-cell",{disabled:t})},v("div",{class:"time-cell-up",onClick:t?void 0:o}),v("div",{class:"rotor"},v("div",{class:Le("rotor-leaf",{flipped:l})},v("figure",{class:"rotor-leaf-rear"},e),v("figure",{class:"rotor-leaf-front"},i)),v("div",{class:"rotor-top"},e),v("div",{class:"rotor-bottom"},i)),v("div",{class:"time-cell-down",onClick:t?void 0:n}))});var $=(e=>(e[e.AddTenMinutes=0]="AddTenMinutes",e[e.ReduceTenMinutes=1]="ReduceTenMinutes",e[e.AddOneMinute=2]="AddOneMinute",e[e.ReduceOneMinute=3]="ReduceOneMinute",e[e.AddTenSeconds=4]="AddTenSeconds",e[e.ReduceTenSeconds=5]="ReduceTenSeconds",e[e.AddOneSecond=6]="AddOneSecond",e[e.ReduceOneSecond=7]="ReduceOneSecond",e))($||{});function Ie(e){return $e(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function P(e,t){return R(()=>e(t),[e])}const rt=q(({minutes:e,seconds:t,disabled:o,onAdjustTime:n})=>{const i=Ie(e),r=Ie(t),l=P(n,0),u=P(n,1),f=P(n,2),d=P(n,3),_=P(n,4),h=P(n,5),s=P(n,6),c=P(n,7);return v("div",{className:"countdown-clock"},v(G,{disabled:o,digit:i[0],onUp:l,onDown:u}),v(G,{digit:i[1],disabled:o,onUp:f,onDown:d}),v("div",{class:"countdown-clock-divider"}),v(G,{disabled:o,digit:r[0],onUp:_,onDown:h}),v(G,{digit:r[1],disabled:o,onUp:s,onDown:c}))}),_t=q(({readonly:e,countdownSecs:t,startTime:o,paused:n,onAdjustTime:i,onStart:r,onPause:l,onResume:u,onReset:f})=>{const[d,_]=H(0),h=o>0&&d>=o,s=t-(h?d-o:0),c=Math.floor(s/60),p=s-c*60;return E(()=>{let k=NaN;if(t>0&&o>0&&!n){const b=()=>{_(Math.floor(Date.now()/1e3)),k=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(k)}else window.cancelAnimationFrame(k)},[o,n,t]),E(()=>{o>0&&d-o>=t&&f()},[d,o,t,f]),v("div",{class:"netless-app-countdown"},v("div",{class:"netless-app-countdown-shrink"},v(rt,{minutes:c,seconds:p,disabled:e||h,onAdjustTime:i}),v("div",{class:"netless-app-countdown-btns"},n?v(O,null,v("button",{onClick:f,disabled:e},"Reset"),v("button",{onClick:u,disabled:e},"Resume")):h?v("button",{onClick:l,disabled:e},"Pause"):v("button",{onClick:r,disabled:e||s<=0},"Start"))))}),it=q(({context:e,storage:t})=>{const[o,n]=H(()=>e.isWritable),[i,r]=H(0),[l,u]=H(0),[f,d]=H(!1),_=l>0,h=R(()=>{e.isWritable&&(d(!1),u(Math.floor(Date.now()/1e3)))},[e]),s=R(()=>{e.isWritable&&d(!0)},[e]),c=R(()=>{e.isWritable&&d(!1)},[e]),p=R(()=>{e.isWritable&&(d(!1),r(0),u(0))},[e]),k=R(b=>{_||r(m=>{if(!e.isWritable)return m;const y=Math.floor(m/60),w=m-y*60,g=Math.floor(y/10),S=y%10,X=Math.floor(w/10),Z=w%10;switch(b){case $.AddTenMinutes:{const J=S+w===0?7:6;return((g+1)%J*10+S)*60+w}case $.ReduceTenMinutes:{const J=S+w===0?7:6;return((g+J-1)%J*10+S)*60+w}case $.AddOneMinute:return(Math.min(5,g)*10+(S+1)%10)*60+w;case $.ReduceOneMinute:return(Math.min(5,g)*10+(S+10-1)%10)*60+w;case $.AddTenSeconds:return y*60+((X+1)%6*10+Z);case $.ReduceTenSeconds:return y*60+((X+6-1)%6*10+Z);case $.AddOneSecond:return y*60+(Math.min(5,X)*10+(Z+1)%10);case $.ReduceOneSecond:return y*60+(Math.min(5,X)*10+(Z+10-1)%10);default:return m}})},[_,e]);return E(()=>(n(e.isWritable),e.emitter.on("writableChange",n),()=>e.emitter.off("writableChange",n)),[e]),E(()=>{const b=m=>{m.countdownSecs&&r(t.state.countdownSecs),m.paused&&d(t.state.paused),m.startTime&&u(t.state.startTime)};return t.onStateChanged.addListener(b),()=>t.onStateChanged.removeListener(b)},[t]),E(()=>{e.isWritable&&t.setState({countdownSecs:i,paused:f,startTime:l})},[i,f,l,e]),v(_t,{readonly:!o,countdownSecs:i,startTime:l,paused:f,onAdjustTime:k,onStart:h,onPause:s,onResume:c,onReset:p})}),lt={kind:"Countdown",config:{minwidth:208,minheight:216},setup(e){const t=e.box;t.mountStyles(Ge);const o=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});me(v(it,{context:e,storage:o}),t.$content),e.emitter.on("destroy",()=>{me(null,t.$content)})}};return K.default=lt,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),K}({}); | ||
//# sourceMappingURL=main.iife.js.map |
{ | ||
"name": "@netless/app-countdown", | ||
"version": "0.0.2", | ||
"main": "dist/main.cjs.js", | ||
"module": "dist/main.es.js", | ||
"version": "0.0.3", | ||
"main": "dist/main.js", | ||
"module": "dist/main.mjs", | ||
"unpkg": "dist/main.iife.js", | ||
@@ -15,3 +15,3 @@ "jsdelivr": "dist/main.iife.js", | ||
"classnames": "^2.3.1", | ||
"preact": "^10.6.4" | ||
"preact": "^10.7.3" | ||
}, | ||
@@ -18,0 +18,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
297513
1419