layui.define("jquery",function(e){"use strict";var r,t,l,i,n,a,c,o,s,g,u,h=layui.$,d={fixbar:function(t){var e,i,n="layui-fixbar",a="layui-fixbar-top",o=h(document),r=h("body");(t=h.extend({showHeight:200},t)).bar1=!0===t.bar1?"&#xe606;":t.bar1,t.bar2=!0===t.bar2?"&#xe607;":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";function l(){o.scrollTop()>=t.showHeight?e||(s.show(),e=1):e&&(s.hide(),e=0)}var c=[t.bar1,t.bar2,"&#xe604;"],c=h(['<ul class="'+n+'">',t.bar1?'<li class="layui-icon" lay-type="bar1" style="'+t.bgcolor+'">'+c[0]+"</li>":"",t.bar2?'<li class="layui-icon" lay-type="bar2" style="'+t.bgcolor+'">'+c[1]+"</li>":"",'<li class="layui-icon '+a+'" lay-type="top" style="'+t.bgcolor+'">'+c[2]+"</li>","</ul>"].join("")),s=c.find("."+a);h("."+n)[0]||("object"==typeof t.css&&c.css(t.css),r.append(c),l(),c.find("li").on("click",function(){var e=h(this).attr("lay-type");"top"===e&&h("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,e)}),o.on("scroll",function(){clearTimeout(i),i=setTimeout(function(){l()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,o=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);a=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(0<l?o:[0,0,0,0],t,a),l<=0&&clearTimeout(a),a},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return 26784e5<a?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):864e5<=a?(a/1e3/60/60/24|0)+"天前":36e5<=a?(a/1e3/60/60|0)+"小时前":18e4<=a?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";t=t||2;for(var n=(e=String(e)).length;n<t;n++)i+="0";return e<Math.pow(10,t)?i+(0|e):e},toDateString:function(e,t){var i=this,n=new Date(e||new Date),e=[i.digit(n.getFullYear(),4),i.digit(n.getMonth()+1),i.digit(n.getDate())],n=[i.digit(n.getHours()),i.digit(n.getMinutes()),i.digit(n.getSeconds())];return(t=t||"yyyy-MM-dd HH:mm:ss").replace(/yyyy/g,e[0]).replace(/MM/g,e[1]).replace(/dd/g,e[2]).replace(/HH/g,n[0]).replace(/mm/g,n[1]).replace(/ss/g,n[2])},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")},event:function(i,n,e){var t=h("body");return e=e||"click",n=d.event[i]=h.extend(!0,d.event[i],n)||{},d.event.UTIL_EVENT_CALLBACK=d.event.UTIL_EVENT_CALLBACK||{},t.off(e,"*["+i+"]",d.event.UTIL_EVENT_CALLBACK[i]),d.event.UTIL_EVENT_CALLBACK[i]=function(){var e=h(this),t=e.attr(i);"function"==typeof n[t]&&n[t].call(this,e)},t.on(e,"*["+i+"]",d.event.UTIL_EVENT_CALLBACK[i]),n}};r=h,t=window,n=r([]),a=r.resize=r.extend(r.resize,{}),c="setTimeout",s=(o="resize")+"-special-event",u="throttleWindow",a[g="delay"]=250,a[u]=!0,r.event.special[o]={setup:function(){if(!a[u]&&this[c])return!1;var e=r(this);n=n.add(e),r.data(this,s,{w:e.width(),h:e.height()}),1===n.length&&function e(){i=t[c](function(){n.each(function(){var e=r(this),t=e.width(),i=e.height(),n=r.data(this,s);t===n.w&&i===n.h||e.trigger(o,[n.w=t,n.h=i])}),e()},a[g])}()},teardown:function(){if(!a[u]&&this[c])return!1;var e=r(this);n=n.not(e),e.removeData(s),n.length||clearTimeout(i)},add:function(e){function t(e,t,i){var n=r(this),a=r.data(this,s)||{};a.w=t!==l?t:n.width(),a.h=i!==l?i:n.height(),o.apply(this,arguments)}return!(!a[u]&&this[c])&&(r.isFunction(e)?(o=e,t):(o=e.handler,void(e.handler=t)));var o}},e("util",d)});