nimble-ui
Version:
1 lines • 13.2 kB
JavaScript
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="MTQM")}({"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var r=n("lXuC")},"4qRk":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e){var n=t.name||"",r=e.component(n);r||e.component(n,t)});return t}},"5fCB":function(t,e,n){"use strict";var r=n("E5mE"),i=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a instanceof Array&&(n=a.slice(0,1)[0]),"boolean"==typeof n&&(e=n,a.splice(0,1),e||(n=a.splice(0,1)[0])),a&&a.length<1)return"boolean"==typeof n?a[1]:n;e&&(n=null);for(var c=0;c<a.length;c++){var u=a[c];if(u instanceof Object)if(e){for(var f in n&&n instanceof Object||(n=u instanceof Array?[]:{}),u)if(u.hasOwnProperty(f)){var l=u[f];if(v(l)){var p=v(n[f])&&n[f]||(l instanceof Array?[]:{});n[f]=t(p,l)}else void 0!==l?n[f]=l:void 0!==n[f]&&(n[f]=l)}}else n=n&&n instanceof Object?Object.assign(n,u):u}return n;function v(t){return t&&(Object(r.a)(t,"Array")||Object(i.a)(t))||!1}}},"5g7T":function(t,e,n){"use strict";e.a=function(t,e,n){var i=0,o=void 0;if(!t)return new Date;if("string"==typeof t){if(/[a-z]/gi.test(t)&&(o=new Date(t),!/Invalid/i.test(o.toString())))return o;if(!/GMT/.test(t)){var a=[];(t=t.replace(/-/g,"/")).length<5?a[0]=t:a=/^[0-9]*$/.test(t)?t.replace(/(^\d{4}|\d{2})(?=\d)\s*/g,"$1,").split(","):t.split(/[^0-9]/);var s="31";e&&2===a.length&&(s=Object(r.a)(new Date(parseInt(a[0],10)||0,(parseInt(a[1],10)||1)-1))+"");var c=((new Date).getFullYear()+(e?"12"+s+"235959":"0101000000")).replace(/(^\d{4}|\d{2})(?=\d)\s*/g,"$1,").split(",").slice(a.length);a=a.concat(c||[]),t=a.splice(0,3).join("/")+" "+a.splice(0,3).join(":"),!a.length&&e?i=999:a.length&&(i=parseInt(a.join(""),10))}}if(t instanceof Date){if(n)return t;t=t.getTime()}o=new Date(t),i&&o.setMilliseconds(i);return o};var r=n("WPJ2")},"8uyd":function(t,e,n){"use strict";e.a=function(t,e){var n=Object(r.a)(t,!1,!0);if(!n)return"";e=(e||"")+""||"yyyy-MM-dd hh:mm:ss";var i={"y+":n.getFullYear(),"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds(),"w+":n.getDay(),"W+":["日","一","二","三","四","五","六"][n.getDay()]};for(var o in i)if(new RegExp("("+o+")").test(e)){var a=RegExp.$1,s=a.length,c=i[o];e=e.replace(a,1===s?c:("0000"+c).slice(0-s))}return e};var r=n("5g7T")},A6Yr:function(t,e,n){"use strict";e.a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2],r=t=(t||"0")+"",i=r;if(t.length<e||n&&t.length!==e&&e>-1){var o=new Array(e+1).join("0");r=(!n&&o||"")+t+(n&&o||""),i=n?r.slice(0,e):r.slice(-e)}return i}},"B/FW":function(t,e){},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},FNmr:function(t,e,n){"use strict";e.a=function(t,e){var n="";if(t&&e)if(e.name){var i="$s"+(n=Object(r.a)(e.name));t.prototype&&!t.prototype[i]&&function(t,e,n){if(t&&e&&n){t[n]=e;try{Object.defineProperty(t,n,{get:function(){var t=this;return e._getParent=function(){return t},e},enumerable:!1,configurable:!1})}catch(t){}}}(t.prototype,e,i)}else console.error("Mount is not defined for the image name");return n};var r=n("0Zk/")},Lv3q:function(t,e,n){"use strict";n("B/FW");var r=n("VU/8")({methods:{_onClick:function(t){this.$emit("click",t)},_onTap:function(t){this.$emit("tap",t)},_onClickItem:function(t){this.$emit("clickItem",t)}}},null,!1,null,null,null);e.a=r.exports},MTQM:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("eCuX"),i={extends:n("ho/f").a,name:"NuCounttime",props:{endTime:{type:String,default:""},currentTime:{type:String,default:""},timeCount:{type:Number,default:0},formatType:{type:String,default:"h"}},data:function(){return{timeData:""}},watch:{timeCount:function(){this._initCom()},currentTime:function(){this._initCom()},endTime:function(){this._initCom()}},computed:{timeList:function(){var t=this.timeData;return t&&"string"==typeof t?t.split(":"):["00","00","00"]}},mounted:function(){this._initCom()},methods:{_initCom:function(){var t=this;if(t.endTime||t.timeCount){t.countDown&&t.countDown.stop();var e=t.currentTime&&t.currentTime.replace(/-/g,"/")||Date.now(),n=t.endTime.replace(/-/g,"/");t.countDown=Object(r.a)({startTime:e,endTime:n,timeCount:t.timeCount||0,formatType:t.formatType,callback:function(r){r&&"string"==typeof r||t.$emit("countEnd",{startTime:e,endTime:n,formatType:t.formatType,data:r}),t.timeData=r}})}}}},o={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.timeList?n("div",{staticClass:"nus_counttime",on:{click:t._onClick,tap:t._onTap}},[t._t("default",[n("span",{staticClass:"nu_time-item"},[t._v("\n "+t._s(t.timeList[0])+"\n ")]),t._v(" "),n("span",{staticClass:"nu_split"},[t._v(":")]),t._v(" "),n("span",{staticClass:"nu_time-item"},[t._v("\n "+t._s(t.timeList[1])+"\n ")]),t._v(" "),n("span",{staticClass:"nu_split"},[t._v(":")]),t._v(" "),n("span",{staticClass:"nu_time-item"},[t._v("\n "+t._s(t.timeList[2])+"\n ")])],{data:t.timeData})],2):t._e()},staticRenderFns:[]};var a=n("VU/8")(i,o,!1,function(t){n("wrrH")},null,null).exports,s=n("4qRk");e.default=Object(s.a)(a)},"VU/8":function(t,e){t.exports=function(t,e,n,r,i,o){var a,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(a=t,s=t.default);var u,f="function"==typeof s?s.options:s;if(e&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0),n&&(f.functional=!0),i&&(f._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=u):r&&(u=r),u){var l=f.functional,p=l?f.render:f.beforeCreate;l?(f._injectStyles=u,f.render=function(t,e){return u.call(e),p(t,e)}):f.beforeCreate=p?[].concat(p,u):[u]}return{esModule:a,exports:s,options:f}}},WPJ2:function(t,e,n){"use strict";e.a=function(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},Z05q:function(t,e,n){"use strict";e.a=function(t,e,n){if(t&&(t.tagName||t===window||t===document)&&e&&"string"==typeof e){var o=Object(r.a)(e);o._constructed=!0,o=Object(i.a)(!1,o,n),t.dispatchEvent(o)}};var r=n("XAAj"),i=n("5fCB")},eCuX:function(t,e,n){"use strict";var r=n("qd2b"),i=n("A6Yr"),o=n("8uyd"),a=n("5g7T");var s=n("zagf");var c=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));r.name="CountDown",r.defaultOption={startTime:0,endTime:(new Date).getTime(),timeCount:0,interval:1e3,formatType:"ms",minNum:0};var i=r;r.setDefaultOptions(n);var a=i.getOptions();return i.timeCount(Object(o.a)(a.startTime,"yyyy/MM/dd hh:mm:ss"),Object(o.a)(a.endTime,"yyyy/MM/dd hh:mm:ss"),a.timeCount,a.interval,a.formatType,a.callback),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.timeCount=function(t,e,n,r,i,o){var c=this,u=c.getOptions();if(c.stop(),r=r>0&&r||1e3,n||t&&e){var f=function(t,e){if(!t||!e)return 0;t=Object(a.a)(t,!1,!1),e=Object(a.a)(e,!1,!1);var n=t&&t.getTime(),r=e&&e.getTime();return r-n>0&&r-n||0}(t,e),l=n>0&&n-f||f;p(l),l>(u&&u.minNum||0)&&(c._interval=setInterval(function(){(l-=r)<=(u&&u.minNum||0)?(c.stop(),p(u&&u.minNum||0)):p(l)},r))}else p(n);function p(t){t>(u&&u.minNum||0)?t=c._formatDate(parseFloat(t+""),i):u&&void 0!==u.minText&&(t=u&&u.minText),Object(s.a)(o,[t])}},e.prototype._formatDate=function(t,e){var n="",r="",a=new Date("1900/01/01 00:00:00");switch(a.setTime(a.getTime()+t),e){case"ms":return t||"";case"s":n=Object(i.a)(parseInt(t/1e3+"",10),2);break;case"m":n=Object(i.a)(parseInt(t/6e4+"",10),2)+":",r="ss";break;case"h":n=Object(i.a)(parseInt(t/36e5+"",10),2)+":",r="mm:ss";break;case"d":var s=parseInt(t/864e5+"",10);n=s>0&&s+"天"||"00天",r="hh时mm分ss秒";break;default:e&&(r=e)}return n+(r&&Object(o.a)(a,r))},e.prototype.stop=function(){this._interval&&clearInterval(this._interval)},e}(r.a);n.d(e,!1,function(){return c});e.a=function(t){return c.instance(t)}},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(r.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=i.call(e,"constructor")&&e.constructor;return"function"==typeof n&&i.toString.call(n)===i.toString.call(Object)};var r=n("E5mE"),i=Object.prototype.hasOwnProperty},"ho/f":function(t,e,n){"use strict";var r={extends:n("Lv3q").a},i=n("VU/8")(r,null,!1,null,null,null);e.a=i.exports},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},qd2b:function(t,e,n){"use strict";var r=n("5fCB"),i=n("Z05q"),o=n("zagf");var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}return t.prototype.$dispatchEvent=function(t,e,n){return Object(i.a)(t,e,n)},t.prototype.$on=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push([e,n])},t.prototype.$once=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,r=this,i=!1,o=function o(){r.$off(t,o),i||(i=!0,e.apply(n,arguments))};o.fn=e,r.$on(t,o)},t.prototype.$off=function(t,e){var n=this._events&&this._events[t];if(n)for(var r=n.length;r--;)(n[r][0]===e||n[r][0]&&n[r][0].fn===e)&&(n[r][0]=void 0)},t.prototype.$emit=function(t){var e=this._events&&this._events[t];if(e){for(var n=e.length,r=[].concat(e),i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];for(var c=0;c<n;c++){var u=r[c],f=u[0],l=u[1];Object(o.a)(f,a,l)}}},t}(),s=n("FNmr");n.d(e,"a",function(){return c});var c=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.name="",r.defaultOption={},r.setDefaultOptions(!0,n),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.singleton=function(t){var e=this._singleton||this.instance(t);return this._singleton=e,e},e.instance=function(t){return new this(t)},e.install=function(t,e){var n=this.instance(e);return t&&t.use instanceof Function&&t.use(n,e),n},e.prototype.getParent=function(){return Object(o.a)(this._getParent||this._vue&&this._vue.prototype||null,[],this)},e.prototype.install=function(t,e){this._vue=this._vue||t;var n=Object(s.a)(t,this);return this.setDefaultOptions(e&&n&&e[n]||e),this},e.prototype.setDefaultOptions=function(t){var e=void 0,n=!0;"boolean"==typeof t?(n=t,e=arguments[1]||{}):e=t,e&&(this.defaultOption=Object(r.a)(n,this.defaultOption||{},e))},e.prototype.getOptions=function(){for(var t=[{},this.defaultOption||{}],e=!0,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return"boolean"==typeof i[0]&&(e=i[0],i.splice(0,1)),i&&i.length>0&&(t=t.concat(i)),r.a.apply(void 0,[e].concat(t))},e.prototype.preload=function(){var t=this;return new Promise(function(e,n){e(t)})},e}(a)},wrrH:function(t,e){},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var r=t;t instanceof Function&&(r=t.apply(n,e));return r}}});