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

27 lines
126 KiB
Plaintext

9 months ago
/*!
* =====================================================
* Mui v3.7.2 (http://dev.dcloud.net.cn/mui)
* =====================================================
*/
var mui=function(a,b){var c=/complete|loaded|interactive/,d=/^#([\w-]+)$/,e=/^\.([\w-]+)$/,f=/^[\w-]+$/,g=/translate(?:3d)?\((.+?)\)/,h=/matrix(3d)?\((.+?)\)/,i=function(b,c){if(c=c||a,!b)return j();if("object"==typeof b)return i.isArrayLike(b)?j(i.slice.call(b),null):j([b],null);if("function"==typeof b)return i.ready(b);if("string"==typeof b)try{if(b=b.trim(),d.test(b)){var e=a.getElementById(RegExp.$1);return j(e?[e]:[])}return j(i.qsa(b,c),b)}catch(f){}return j()},j=function(a,b){return a=a||[],Object.setPrototypeOf(a,i.fn),a.selector=b||"",a};i.uuid=0,i.data={},i.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},j=1,k=arguments.length,l=!1;for("boolean"==typeof h&&(l=h,h=arguments[j]||{},j++),"object"==typeof h||i.isFunction(h)||(h={}),j===k&&(h=this,j--);k>j;j++)if(null!=(a=arguments[j]))for(c in a)d=h[c],e=a[c],h!==e&&(l&&e&&(i.isPlainObject(e)||(f=i.isArray(e)))?(f?(f=!1,g=d&&i.isArray(d)?d:[]):g=d&&i.isPlainObject(d)?d:{},h[c]=i.extend(l,g,e)):e!==b&&(h[c]=e));return h},i.noop=function(){},i.slice=[].slice,i.filter=[].filter,i.type=function(a){return null==a?String(a):k[{}.toString.call(a)]||"object"},i.isArray=Array.isArray||function(a){return a instanceof Array},i.isArrayLike=function(a){var b=!!a&&"length"in a&&a.length,c=i.type(a);return"function"===c||i.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a},i.isWindow=function(a){return null!=a&&a===a.window},i.isObject=function(a){return"object"===i.type(a)},i.isPlainObject=function(a){return i.isObject(a)&&!i.isWindow(a)&&Object.getPrototypeOf(a)===Object.prototype},i.isEmptyObject=function(a){for(var c in a)if(c!==b)return!1;return!0},i.isFunction=function(a){return"function"===i.type(a)},i.qsa=function(b,c){return c=c||a,i.slice.call(e.test(b)?c.getElementsByClassName(RegExp.$1):f.test(b)?c.getElementsByTagName(b):c.querySelectorAll(b))},i.ready=function(b){return c.test(a.readyState)?b(i):a.addEventListener("DOMContentLoaded",function(){b(i)},!1),this},i.buffer=function(a,b,c){function d(){e&&(e.cancel(),e=0),f=i.now(),a.apply(c||this,arguments),g=i.now()}var e,f=0,g=0,b=b||150;return i.extend(function(){!f||g>=f&&i.now()-g>b||f>g&&i.now()-f>8*b?d.apply(this,arguments):(e&&e.cancel(),e=i.later(d,b,null,i.slice.call(arguments)))},{stop:function(){e&&(e.cancel(),e=0)}})},i.each=function(a,b,c){if(!a)return this;if("number"==typeof a.length)[].every.call(a,function(a,c){return b.call(a,c,a)!==!1});else for(var d in a)if(c){if(a.hasOwnProperty(d)&&b.call(a[d],d,a[d])===!1)return a}else if(b.call(a[d],d,a[d])===!1)return a;return this},i.focus=function(a){i.os.ios?setTimeout(function(){a.focus()},10):a.focus()},i.trigger=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,cancelable:!0})),this},i.getStyles=function(a,b){var c=a.ownerDocument.defaultView.getComputedStyle(a,null);return b?c.getPropertyValue(b)||c[b]:c},i.parseTranslate=function(a,b){var c=a.match(g||"");return c&&c[1]||(c=["","0,0,0"]),c=c[1].split(","),c={x:parseFloat(c[0]),y:parseFloat(c[1]),z:parseFloat(c[2])},b&&c.hasOwnProperty(b)?c[b]:c},i.parseTranslateMatrix=function(a,b){var c=a.match(h),d=c&&c[1];c?(c=c[2].split(","),"3d"===d?c=c.slice(12,15):(c.push(0),c=c.slice(4,7))):c=[0,0,0];var e={x:parseFloat(c[0]),y:parseFloat(c[1]),z:parseFloat(c[2])};return b&&e.hasOwnProperty(b)?e[b]:e},i.hooks={},i.addAction=function(a,b){var c=i.hooks[a];return c||(c=[]),b.index=b.index||1e3,c.push(b),c.sort(function(a,b){return a.index-b.index}),i.hooks[a]=c,i.hooks[a]},i.doAction=function(a,b){i.isFunction(b)?i.each(i.hooks[a],b):i.each(i.hooks[a],function(a,b){return!b.handle()})},i.later=function(a,b,c,d){b=b||0;var e,f,g=a,h=d;return"string"==typeof a&&(g=c[a]),e=function(){g.apply(c,i.isArray(h)?h:[h])},f=setTimeout(e,b),{id:f,cancel:function(){clearTimeout(f)}}},i.now=Date.now||function(){return+new Date};var k={};return i.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"],function(a,b){k["[object "+b+"]"]=b.toLowerCase()}),window.JSON&&(i.parseJSON=JSON.parse),i.fn={each:function(a){return[].every.call(this,function(
}),!0}}),a.menu=function(){var c=document.querySelector(".mui-action-menu");if(c)a.trigger(c,a.EVENT_START),a.trigger(c,"tap");else if(b.plus){var d=a.currentWebview,e=d.parent();e&&e.evalJS("mui&&mui.menu();")}};var c=function(){a.back()},d=function(){a.menu()};a.plusReady(function(){a.options.keyEventBind.backbutton&&plus.key.addEventListener("backbutton",c,!1),a.options.keyEventBind.menubutton&&plus.key.addEventListener("menubutton",d,!1)}),a.addInit({name:"keyEventBind",index:1e3,handle:function(){a.plusReady(function(){a.options.keyEventBind.backbutton||plus.key.removeEventListener("backbutton",c),a.options.keyEventBind.menubutton||plus.key.removeEventListener("menubutton",d)})}})}(mui,window),function(a){a.addInit({name:"pullrefresh",index:1e3,handle:function(){var b=a.options,c=b.pullRefresh||{},d=c.down&&c.down.hasOwnProperty("callback"),e=c.up&&c.up.hasOwnProperty("callback");if(d||e){var f=c.container;if(f){var g=a(f);1===g.length&&(a.os.plus?d&&"circle"==c.down.style?a.plusReady(function(){a.fn.pullRefresh=a.fn.pullRefresh_native,g.pullRefresh(c)}):a.os.android?a.plusReady(function(){a.fn.pullRefresh=a.fn.pullRefresh_native;var b=plus.webview.currentWebview();if(window.__NWin_Enable__===!1)g.pullRefresh(c);else{if(e){var f={};f.up=c.up,f.webviewId=b.id||b.getURL(),g.pullRefresh(f)}if(d){var h=b.parent(),i=b.id||b.getURL();if(h){e||g.pullRefresh({webviewId:i});var j={webviewId:i};j.down=a.extend({},c.down),j.down.callback="_CALLBACK",h.evalJS("mui.fn.pullRefresh=mui.fn.pullRefresh_native"),h.evalJS("mui&&mui(document.querySelector('.mui-content')).pullRefresh('"+JSON.stringify(j)+"')")}}}}):g.pullRefresh(c):g.pullRefresh(c))}}}})}(mui),function(a,b,c){var d="application/json",e="text/html",f=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,g=/^(?:text|application)\/javascript/i,h=/^(?:text|application)\/xml/i,i=/^\s*$/;a.ajaxSettings={type:"GET",beforeSend:a.noop,success:a.noop,error:a.noop,complete:a.noop,context:null,xhr:function(a){return new b.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:d,xml:"application/xml, text/xml",html:e,text:"text/plain"},timeout:0,processData:!0,cache:!0};var j=function(a,b){var c=b.context;return b.beforeSend.call(c,a,b)===!1?!1:void 0},k=function(a,b,c){c.success.call(c.context,a,"success",b),m("success",b,c)},l=function(a,b,c,d){d.error.call(d.context,c,b,a),m(b,c,d)},m=function(a,b,c){c.complete.call(c.context,b,a)},n=function(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,i){f=a.type(i),e&&(c=d?e:e+"["+(h||"object"===f||"array"===f?c:"")+"]"),!e&&g?b.add(i.name,i.value):"array"===f||!d&&"object"===f?n(b,i,d,c):b.add(c,i)})},o=function(b){if(b.processData&&b.data&&"string"!=typeof b.data){var e=b.contentType;!e&&b.headers&&(e=b.headers["Content-Type"]),e&&~e.indexOf(d)?b.data=JSON.stringify(b.data):b.data=a.param(b.data,b.traditional)}!b.data||b.type&&"GET"!==b.type.toUpperCase()||(b.url=p(b.url,b.data),b.data=c)},p=function(a,b){return""===b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")},q=function(a){return a&&(a=a.split(";",2)[0]),a&&(a===e?"html":a===d?"json":g.test(a)?"script":h.test(a)&&"xml")||"text"},r=function(b,d,e,f){return a.isFunction(d)&&(f=e,e=d,d=c),a.isFunction(e)||(f=e,e=c),{url:b,data:d,success:e,dataType:f}};a.ajax=function(d,e){"object"==typeof d&&(e=d,d=c);var f=e||{};f.url=d||f.url;for(var g in a.ajaxSettings)f[g]===c&&(f[g]=a.ajaxSettings[g]);o(f);var h=f.dataType;f.cache!==!1&&(e&&e.cache===!0||"script"!==h)||(f.url=p(f.url,"_="+a.now()));var m,n=f.accepts[h&&h.toLowerCase()],r={},s=function(a,b){r[a.toLowerCase()]=[a,b]},t=/^([\w-]+:)\/\//.test(f.url)?RegExp.$1:b.location.protocol,u=f.xhr(f),v=u.setRequestHeader;if(s("X-Requested-With","XMLHttpRequest"),s("Accept",n||"*/*"),(n=f.mimeType||n)&&(n.indexOf(",")>-1&&(n=n.split(",",2)[0]),u.overrideMimeType&&u.overrideMimeType(n)),(f.contentType||f.contentType!==!1&&f.data&&"GET"!==f.type.toUpperCase())&&s("Content-Type",f.contentType||"application/x-www-form-urlencoded"),f.headers)for(var w in f.headers)s(w,f.headers[w]);if(u.
this._setCaption(this.options.up.contentdown),this.wrapper.addEventListener("scrollbottom",this)},refresh:function(a){a&&this.finished&&(this.enablePullupToRefresh(),this.finished=!1),this._super()}},a.PullRefresh));a.fn.pullRefresh=function(b){if(1===this.length){var c=this[0],d=null,e=c.getAttribute("data-pullrefresh");return e||"undefined"!=typeof b?(b=b||{},e?d=a.data[e]:(e=++a.uuid,a.data[e]=d=new g(c,b),c.setAttribute("data-pullrefresh",e)),b.down&&b.down.auto?d.pulldownLoading(b.down.autoY):b.up&&b.up.auto&&d.pullupLoading(),d):!1}}}(mui,window,document),function(a,b){var c="mui-slider",d="mui-slider-group",e="mui-slider-loop",f="mui-action-previous",g="mui-action-next",h="mui-slider-item",i="mui-active",j="."+h,k=".mui-slider-progress-bar",l=a.Slider=a.Scroll.extend({init:function(b,c){this._super(b,a.extend(!0,{fingers:1,interval:0,scrollY:!1,scrollX:!0,indicators:!1,scrollTime:1e3,startX:!1,slideTime:0,snap:j},c)),this.options.startX},_init:function(){this._reInit(),this.scroller&&(this.scrollerStyle=this.scroller.style,this.progressBar=this.wrapper.querySelector(k),this.progressBar&&(this.progressBarWidth=this.progressBar.offsetWidth,this.progressBarStyle=this.progressBar.style),this._super(),this._initTimer())},_triggerSlide:function(){var b=this;b.isInTransition=!1;b.currentPage;b.slideNumber=b._fixedSlideNumber(),b.loop&&(0===b.slideNumber?b.setTranslate(b.pages[1][0].x,0):b.slideNumber===b.itemLength-3&&b.setTranslate(b.pages[b.itemLength-2][0].x,0)),b.lastSlideNumber!=b.slideNumber&&(b.lastSlideNumber=b.slideNumber,b.lastPage=b.currentPage,a.trigger(b.wrapper,"slide",{slideNumber:b.slideNumber})),b._initTimer()},_handleSlide:function(b){var c=this;if(b.target===c.wrapper){var d=b.detail;d.slideNumber=d.slideNumber||0;for(var e=c.scroller.querySelectorAll(j),f=[],g=0,h=e.length;h>g;g++){var k=e[g];k.parentNode===c.scroller&&f.push(k)}var l=d.slideNumber;if(c.loop&&(l+=1),!c.wrapper.classList.contains("mui-segmented-control"))for(var g=0,h=f.length;h>g;g++){var k=f[g];k.parentNode===c.scroller&&(g===l?k.classList.add(i):k.classList.remove(i))}var m=c.wrapper.querySelector(".mui-slider-indicator");if(m){m.getAttribute("data-scroll")&&a(m).scroll().gotoPage(d.slideNumber);var n=m.querySelectorAll(".mui-indicator");if(n.length>0)for(var g=0,h=n.length;h>g;g++)n[g].classList[g===d.slideNumber?"add":"remove"](i);else{var o=m.querySelector(".mui-number span");if(o)o.innerText=d.slideNumber+1;else for(var p=m.querySelectorAll(".mui-control-item"),g=0,h=p.length;h>g;g++)p[g].classList[g===d.slideNumber?"add":"remove"](i)}}b.stopPropagation()}},_handleTabShow:function(a){var b=this;b.gotoItem(a.detail.tabNumber||0,b.options.slideTime)},_handleIndicatorTap:function(a){var b=this,c=a.target;(c.classList.contains(f)||c.classList.contains(g))&&(b[c.classList.contains(f)?"prevItem":"nextItem"](),a.stopPropagation())},_initEvent:function(b){var c=this;c._super(b);var d=b?"removeEventListener":"addEventListener";c.wrapper[d]("slide",this),c.wrapper[d](a.eventName("shown","tab"),this)},handleEvent:function(b){switch(this._super(b),b.type){case"slide":this._handleSlide(b);break;case a.eventName("shown","tab"):~this.snaps.indexOf(b.target)&&this._handleTabShow(b)}},_scrollend:function(a){this._super(a),this._triggerSlide(a)},_drag:function(a){this._super(a);var c=a.detail.direction;if("left"===c||"right"===c){var d=this.wrapper.getAttribute("data-slidershowTimer");d&&b.clearTimeout(d),a.stopPropagation()}},_initTimer:function(){var a=this,c=a.wrapper,d=a.options.interval,e=c.getAttribute("data-slidershowTimer");e&&b.clearTimeout(e),d&&(e=b.setTimeout(function(){c&&((c.offsetWidth||c.offsetHeight)&&a.nextItem(!0),a._initTimer())},d),c.setAttribute("data-slidershowTimer",e))},_fixedSlideNumber:function(a){a=a||this.currentPage;var b=a.pageX;return this.loop&&(b=0===a.pageX?this.itemLength-3:a.pageX===this.itemLength-1?0:a.pageX-1),b},_reLayout:function(){this.hasHorizontalScroll=!0,this.loop=this.scroller.classList.contains(e),this._super()},_getScroll:function(){var b=a.parseTranslateMatrix(a.getStyles(this.scroller,"webkitTr
this.classList.add(g), (0 === this.toggleWidth || 0 === this.handleWidth) && this.init()
}, k.prototype.drag = function (a) { var b = a.detail; this.isDragging || ("left" === b.direction || "right" === b.direction) && (this.isDragging = !0, this.lastChanged = void 0, this.initialState = this.classList.contains(f)), this.isDragging && (this.setTranslateX(b.deltaX), a.stopPropagation(), b.gesture.preventDefault()) }, k.prototype.swiperight = function (a) { this.isDragging && a.stopPropagation() }, k.prototype.end = function (b) { this.classList.remove(g), this.isDragging ? (this.isDragging = !1, b.stopPropagation(), a.trigger(this.element, "toggle", { isActive: this.classList.contains(f) })) : this.toggle() }, k.prototype.toggle = function (b) { var c = this.classList; b === !1 ? this.handle.style.webkitTransitionDuration = this.element.style.webkitTransitionDuration = "0s" : this.handle.style.webkitTransitionDuration = this.element.style.webkitTransitionDuration = ".2s", c.contains(f) ? (c.remove(f), this.handle.style.webkitTransform = "translate(0,0)") : (c.add(f), this.handle.style.webkitTransform = "translate(" + this.handleX + "px,0)"), a.trigger(this.element, "toggle", { isActive: this.classList.contains(f) }) }, k.prototype.setTranslateX = a.animationFrame(function (a) { if (this.isDragging) { var b = !1; (this.initialState && -a > this.handleX / 2 || !this.initialState && a > this.handleX / 2) && (b = !0), this.lastChanged !== b && (b ? (this.handle.style.webkitTransform = "translate(" + (this.initialState ? 0 : this.handleX) + "px,0)", this.classList[this.initialState ? "remove" : "add"](f)) : (this.handle.style.webkitTransform = "translate(" + (this.initialState ? this.handleX : 0) + "px,0)", this.classList[this.initialState ? "add" : "remove"](f)), this.lastChanged = b) } }), a.fn["switch"] = function (b) { var c = []; return this.each(function () { var b = null, d = this.getAttribute("data-switch"); d ? b = a.data[d] : (d = ++a.uuid, a.data[d] = new k(this), this.setAttribute("data-switch", d)), c.push(b) }), c.length > 1 ? c : c[0] }, a.ready(function () { a("." + d)["switch"]() })
}(mui, window, "toggle"), function (a, b, c) { function d(a, b) { var c = b ? "removeEventListener" : "addEventListener"; a[c]("drag", F), a[c]("dragend", F), a[c]("swiperight", F), a[c]("swipeleft", F), a[c]("flick", F) } var e, f, g = "mui-active", h = "mui-selected", i = "mui-grid-view", j = "mui-table-view-radio", k = "mui-table-view-cell", l = "mui-collapse-content", m = "mui-disabled", n = "mui-switch", o = "mui-btn", p = "mui-slider-handle", q = "mui-slider-left", r = "mui-slider-right", s = "mui-transitioning", t = "." + p, u = "." + q, v = "." + r, w = "." + h, x = "." + o, y = .8, z = isOpened = openedActions = progress = !1, A = sliderActionLeft = sliderActionRight = buttonsLeft = buttonsRight = sliderDirection = sliderRequestAnimationFrame = !1, B = translateX = lastTranslateX = sliderActionLeftWidth = sliderActionRightWidth = 0, C = function (a) { a ? f ? f.classList.add(g) : e && e.classList.add(g) : (B && B.cancel(), f ? f.classList.remove(g) : e && e.classList.remove(g)) }, D = function () { if (translateX !== lastTranslateX) { if (buttonsRight && buttonsRight.length > 0) { progress = translateX / sliderActionRightWidth, translateX < -sliderActionRightWidth && (translateX = -sliderActionRightWidth - Math.pow(-translateX - sliderActionRightWidth, y)); for (var a = 0, b = buttonsRight.length; b > a; a++){ var c = buttonsRight[a]; "undefined" == typeof c._buttonOffset && (c._buttonOffset = c.offsetLeft), buttonOffset = c._buttonOffset, E(c, translateX - buttonOffset * (1 + Math.max(progress, -1))) } } if (buttonsLeft && buttonsLeft.length > 0) { progress = translateX / sliderActionLeftWidth, translateX > sliderActionLeftWidth && (translateX = sliderActionLeftWidth + Math.pow(translateX - sliderActionLeftWidth, y)); for (var a = 0, b = buttonsLeft.length; b > a; a++){ var d = buttonsLeft[a]; "undefined" == typeof d._buttonOffset && (d._buttonOffset = sliderActionLeftWidth - d.offsetLeft - d.offsetWidth), buttonOffset = d._buttonOffset, buttonsLeft.length > 1 && (d.style.zIndex = buttonsLeft.length - a), E(d, translateX + buttonOffset * (1 - Math.min(progress, 1))) } } E(A, translateX), lastTranslateX = translateX } sliderRequestAnimationFrame = requestAnimationFrame(function () { D() }) }, E = function (a, b) { a && (a.style.webkitTransform = "translate(" + b + "px,0)") }; b.addEventListener(a.EVENT_START, function (b) { e && C(!1), e = f = !1, z = isOpened = openedActions = !1; for (var g = b.target, h = !1; g && g !== c; g = g.parentNode)if (g.classList) { var p = g.classList; if (("INPUT" === g.tagName && "radio" !== g.type && "checkbox" !== g.type || "BUTTON" === g.tagName || p.contains(n) || p.contains(o) || p.contains(m)) && (h = !0), p.contains(l)) break; if (p.contains(k)) { e = g; var q = e.parentNode.querySelector(w); if (!e.parentNode.classList.contains(j) && q && q !== e) return a.swipeoutClose(q), void (e = h = !1); if (!e.parentNode.classList.contains(i)) { var r = e.querySelector("a"); r && r.parentNode === e && (f = r) } var s = e.querySelector(t); s && (d(e), b.stopPropagation()), h || (s ? (B && B.cancel(), B = a.later(function () { C(!0) }, 100)) : C(!0)); break } } }), b.addEventListener(a.EVENT_MOVE, function (a) { C(!1) }); var F = { handleEvent: function (a) { switch (a.type) { case "drag": this.drag(a); break; case "dragend": this.dragend(a); break; case "flick": this.flick(a); break; case "swiperight": this.swiperight(a); break; case "swipeleft": this.swipeleft(a) } }, drag: function (a) { if (e) { z || (A = sliderActionLeft = sliderActionRight = buttonsLeft = buttonsRight = sliderDirection = sliderRequestAnimationFrame = !1, A = e.querySelector(t), A && (sliderActionLeft = e.querySelector(u), sliderActionRight = e.querySelector(v), sliderActionLeft && (sliderActionLeftWidth = sliderActionLeft.offsetWidth, buttonsLeft = sliderActionLeft.querySelectorAll(x)), sliderActionRight && (sliderActionRightWidth = sliderActionRight.offsetWidth, buttonsRight = sliderActionRight.querySelectorAll(x)), e.classList.remove(s), isOpened = e.classList.contains(h), isOpened && (openedActions = e.qu
var b = "ontouchstart" in document, c = b ? "tap" : "click", d = "change", e = "mui-numbox", f = ".mui-btn-numbox-plus,.mui-numbox-btn-plus",
g = ".mui-btn-numbox-minus,.mui-numbox-btn-minus", h = ".mui-input-numbox,.mui-numbox-input",
i = a.Numbox = a.Class.extend({
init: function (b, c) {
var d = this; if (!b) throw "构造 numbox 时缺少容器元素"; d.holder = b, c = c || {}, c.step = parseFloat(c.step || 1), c.bit = parseInt(c.bit || 0),
d.options = c, d.input = a.qsa(h, d.holder)[0], d.plus = a.qsa(f, d.holder)[0], d.minus = a.qsa(g, d.holder)[0], d.checkValue(),
d.initEvent()
}, initEvent: function () {
var b = this; b.plus.addEventListener(c, function (c) {
var e = parseFloat(b.input.value) + b.options.step; b.input.value = Number(e.toString()).toFixed(b.options.bit), a.trigger(b.input, d, null)
}), b.minus.addEventListener(c, function (c) {
var e = parseFloat(b.input.value) - b.options.step; b.input.value = Number(e.toString()).toFixed(b.options.bit), a.trigger(b.input, d, null)
}), b.input.addEventListener(d, function (c) { b.checkValue(); var e = parseFloat(b.input.value); a.trigger(b.holder, d, { value: e }) })
}, getValue: function () { var a = this; return parseFloat(a.input.value) }, checkValue: function () { var a = this, b = a.input.value; if (null == b || "" == b || isNaN(b)) a.input.value = a.options.min || 0, a.minus.disabled = null != a.options.min; else { var b = parseFloat(b); null != a.options.max && !isNaN(a.options.max) && b >= parseFloat(a.options.max) ? (b = a.options.max, a.plus.disabled = !0) : a.plus.disabled = !1, null != a.options.min && !isNaN(a.options.min) && b <= parseFloat(a.options.min) ? (b = a.options.min, a.minus.disabled = !0) : a.minus.disabled = !1, a.input.value = b } }, setOption: function (a, b) { var c = this; c.options[a] = b }, setValue: function (a) { this.input.value = a, this.checkValue() }
}); a.fn.numbox = function (a) { return this.each(function (a, b) { if (!b.numbox) if (d) b.numbox = new i(b, d); else { var c = b.getAttribute("data-numbox-options"), d = c ? JSON.parse(c) : {}; d.step = b.getAttribute("data-numbox-step") || d.step, d.bit = b.getAttribute("data-numbox-bit") || d.bit; d.min = b.getAttribute("data-numbox-min") || d.min, d.max = b.getAttribute("data-numbox-max") || d.max, b.numbox = new i(b, d) } }), this[0] ? this[0].numbox : null }, a.ready(function () { a("." + e).numbox() })
}(mui), function (a, b, c) { var d = "mui-disabled", e = "reset", f = "loading", g = { loadingText: "Loading...", loadingIcon: "mui-spinner mui-spinner-white", loadingIconPosition: "left" }, h = function (b, c) { this.element = b, this.options = a.extend({}, g, c), this.options.loadingText || (this.options.loadingText = g.loadingText), null === this.options.loadingIcon && (this.options.loadingIcon = "mui-spinner", "rgb(255, 255, 255)" === a.getStyles(this.element, "color") && (this.options.loadingIcon += " mui-spinner-white")), this.isInput = "INPUT" === this.element.tagName, this.resetHTML = this.isInput ? this.element.value : this.element.innerHTML, this.state = "" }; h.prototype.loading = function () { this.setState(f) }, h.prototype.reset = function () { this.setState(e) }, h.prototype.setState = function (a) { if (this.state === a) return !1; if (this.state = a, a === e) this.element.disabled = !1, this.element.classList.remove(d), this.setHtml(this.resetHTML); else if (a === f) { this.element.disabled = !0, this.element.classList.add(d); var b = this.isInput ? this.options.loadingText : "<span>" + this.options.loadingText + "</span>"; this.options.loadingIcon && !this.isInput && ("right" === this.options.loadingIconPosition ? b += '&nbsp;<span class="' + this.options.loadingIcon + '"></span>' : b = '<span class="' + this.options.loadingIcon + '"></span>&nbsp;' + b), this.setHtml(b) } }, h.prototype.setHtml = function (a) { this.isInput ? this.element.value = a : this.element.innerHTML = a }, a.fn.button = function (a) { var b = []; return this.each(function () { var c = this.mui_plugin_button; if (!c) { var d = this.getAttribute("data-loading-text"), g = this.getAttribute("data-loading-icon"), i = this.getAttribute("data-loading-icon-position"); this.mui_plugin_button = c = new h(this, { loadingText: d, loadingIcon: g, loadingIconPosition: i }) } (a === f || a === e) && c.setState(a), b.push(c) }), 1 === b.length ? b[0] : b } }(mui, window, document);