/*! laydate v5.3.1 | 日期与时间组件 | mit licensed */ ; ! function(e) { "use strict"; var t = e.document, n = { modules: {}, status: {}, timeout: 10, event: {} }, a = function() { this.v = "2.6.7" }, r = e.layui_global || {}, i = function() { var e = t.currentscript ? t.currentscript.src : function() { for (var e, n = t.scripts, a = n.length - 1, r = a; r > 0; r--) if ("interactive" === n[r].readystate) { e = n[r].src; break } return e || n[a].src }(); return n.dir = r.dir || e.substring(0, e.lastindexof("/") + 1) }(), o = function(t, n) { n = n || "log", e.console && console[n] && console[n]("layui error hint: " + t) }, l = "undefined" != typeof opera && "[object opera]" === opera.tostring(), s = n.builtin = { lay: "lay", layer: "layer", laydate: "laydate", laypage: "laypage", laytpl: "laytpl", layedit: "layedit", form: "form", upload: "upload", dropdown: "dropdown", transfer: "transfer", tree: "tree", table: "table", element: "element", rate: "rate", colorpicker: "colorpicker", slider: "slider", carousel: "carousel", flow: "flow", util: "util", code: "code", jquery: "jquery", all: "all", "layui.all": "layui.all" }; a.prototype.cache = n, a.prototype.define = function(e, t) { var a = this, r = "function" == typeof e, i = function() { var e = function(e, t) { u[e] = t, n.status[e] = !0 }; return "function" == typeof t && t(function(a, r) { e(a, r), n.callback[a] = function() { t(e) } }), this }; return r && (t = e, e = []), a.use(e, i, null, "define"), a }, a.prototype.use = function(a, r, c, y) { function d(e, t) { var a = "playstation 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/; ("load" === e.type || a.test((e.currenttarget || e.srcelement).readystate)) && (n.modules[g] = t, p .removechild(w), function r() { return ++v > 1e3 * n.timeout / 4 ? o(g + " is not a valid module", "error") : void(n.status[g] ? m() : settimeout(r, 4)) }()) } function m() { c.push(u[g]), a.length > 1 ? f.use(a.slice(1), r, c, y) : "function" == typeof r && function() { return u.jquery && "function" == typeof u.jquery && "define" !== y ? u.jquery(function() { r.apply(u, c) }) : void r.apply(u, c) }() } var f = this, h = n.dir = n.dir ? n.dir : i, p = t.getelementsbytagname("head")[0]; a = function() { return "string" == typeof a ? [a] : "function" == typeof a ? (r = a, ["all"]) : a }(), e.jquery && jquery.fn.on && (f.each(a, function(e, t) { "jquery" === t && a.splice(e, 1) }), u.jquery = u.$ = jquery); var g = a[0], v = 0; if (c = c || [], n.host = n.host || (h.match(/\/\/([\s\s]+?)\//) || ["//" + location.host + "/"])[0], 0 === a.length || u["layui.all"] && s[g]) return m(), f; var t = (s[g] ? h + "modules/" : /^\{\/\}/.test(f.modules[g]) ? "" : n.base || "") + (f.modules[g] || g) + ".js"; if (t = t.replace(/^\{\/\}/, ""), !n.modules[g] && u[g] && (n.modules[g] = t), n.modules[g]) ! function d() { return ++v > 1e3 * n.timeout / 4 ? o(g + " is not a valid module", "error") : void("string" == typeof n.modules[g] && n.status[g] ? m() : settimeout(d, 4)) }(); else { var w = t.createelement("script"); w.async = !0, w.charset = "utf-8", w.src = t + function() { var e = n.version === !0 ? n.v || (new date).gettime() : n.version || ""; return e ? "?v=" + e : "" }(), p.appendchild(w), !w.attachevent || w.attachevent.tostring && w.attachevent.tostring().indexof( "[native code") < 0 || l ? w.addeventlistener("load", function(e) { d(e, t) }, !1) : w.attachevent("onreadystatechange", function(e) { d(e, t) }), n.modules[g] = t } return f }, a.prototype.getstyle = function(t, n) { var a = t.currentstyle ? t.currentstyle : e.getcomputedstyle(t, null); return a[a.getpropertyvalue ? "getpropertyvalue" : "getattribute"](n) }, a.prototype.link = function(e, a, r) { var i = this, l = t.getelementsbytagname("head")[0], s = t.createelement("link"); "string" == typeof a && (r = a); var c = (r || e).replace(/\.|\//g, ""), u = s.id = "layuicss-" + c, y = "creating", d = 0; return s.rel = "stylesheet", s.href = e + (n.debug ? "?v=" + (new date).gettime() : ""), s.media = "all", t .getelementbyid(u) || l.appendchild(s), "function" != typeof a ? i : (function m(r) { var l = 100, s = t.getelementbyid(u); return ++d > 1e3 * n.timeout / l ? o(e + " timeout") : void(1989 === parseint(i.getstyle(s, "width")) ? (r === y && s.removeattribute("lay-status"), s.getattribute( "lay-status") === y ? settimeout(m, l) : a()) : (s.setattribute("lay-status", y), settimeout(function() { m(y) }, l))) }(), i) }, a.prototype.addcss = function(e, t, a) { return u.link(n.dir + "css/" + e, t, a) }, n.callback = {}, a.prototype.factory = function(e) { if (u[e]) return "function" == typeof n.callback[e] ? n.callback[e] : null }, a.prototype.img = function(e, t, n) { var a = new image; return a.src = e, a.complete ? t(a) : (a.onload = function() { a.onload = null, "function" == typeof t && t(a) }, void(a.onerror = function(e) { a.onerror = null, "function" == typeof n && n(e) })) }, a.prototype.config = function(e) { e = e || {}; for (var t in e) n[t] = e[t]; return this }, a.prototype.modules = function() { var e = {}; for (var t in s) e[t] = s[t]; return e }(), a.prototype.extend = function(e) { var t = this; e = e || {}; for (var n in e) t[n] || t.modules[n] ? o(n + " module already exists", "error") : t.modules[n] = e[n]; return t }, a.prototype.router = function(e) { var t = this, e = e || location.hash, n = { path: [], search: {}, hash: (e.match(/[^#](#.*$)/) || [])[1] || "" }; return /^#\//.test(e) ? (e = e.replace(/^#\//, ""), n.href = "/" + e, e = e.replace(/([^#])(#.*$)/, "$1") .split("/") || [], t.each(e, function(e, t) { /^\w+=/.test(t) ? function() { t = t.split("="), n.search[t[0]] = t[1] }() : n.path.push(t) }), n) : n }, a.prototype.url = function(e) { var t = this, n = { pathname: function() { var t = e ? function() { var t = (e.match(/\.[^.]+?\/.+/) || [])[0] || ""; return t.replace(/^[^\/]+/, "").replace(/\?.+/, "") }() : location.pathname; return t.replace(/^\//, "").split("/") }(), search: function() { var n = {}, a = (e ? function() { var t = (e.match(/\?.+/) || [])[0] || ""; return t.replace(/\#.+/, "") }() : location.search).replace(/^\?+/, "").split("&"); return t.each(a, function(e, t) { var a = t.indexof("="), r = function() { return a < 0 ? t.substr(0, t.length) : 0 !== a && t.substr(0, a) }(); r && (n[r] = a > 0 ? t.substr(a + 1) : null) }), n }(), hash: t.router(function() { return e ? (e.match(/#.+/) || [])[0] || "/" : location.hash }()) }; return n }, a.prototype.data = function(t, n, a) { if (t = t || "layui", a = a || localstorage, e.json && e.json.parse) { if (null === n) return delete a[t]; n = "object" == typeof n ? n : { key: n }; try { var r = json.parse(a[t]) } catch (i) { var r = {} } return "value" in n && (r[n.key] = n.value), n.remove && delete r[n.key], a[t] = json.stringify(r), n .key ? r[n.key] : r } }, a.prototype.sessiondata = function(e, t) { return this.data(e, t, sessionstorage) }, a.prototype.device = function(t) { var n = navigator.useragent.tolowercase(), a = function(e) { var t = new regexp(e + "/([^\\s\\_\\-]+)"); return e = (n.match(t) || [])[1], e || !1 }, r = { os: function() { return /windows/.test(n) ? "windows" : /linux/.test(n) ? "linux" : /iphone|ipod|ipad|ios/ .test(n) ? "ios" : /mac/.test(n) ? "mac" : void 0 }(), ie: function() { return !!(e.activexobject || "activexobject" in e) && ((n.match(/msie\s(\d+)/) || [])[1] || "11") }(), weixin: a("micromessenger") }; return t && !r[t] && (r[t] = a(t)), r.android = /android/.test(n), r.ios = "ios" === r.os, r.mobile = !(!r .android && !r.ios), r }, a.prototype.hint = function() { return { error: o } }, a.prototype._typeof = function(e) { return null === e ? string(e) : "object" == typeof e || "function" == typeof e ? function() { var t = object.prototype.tostring.call(e).match(/\s(.+)\]$/) || [], n = "function|array|date|regexp|object|error|symbol"; return t = t[1] || "object", new regexp("\\b(" + n + ")\\b").test(t) ? t.tolowercase() : "object" }() : typeof e }, a.prototype._isarray = function(t) { var n, a = this, r = a._typeof(t); return !(!t || "object" != typeof t || t === e) && (n = "length" in t && t.length, "array" === r || 0 === n || "number" == typeof n && n > 0 && n - 1 in t) }, a.prototype.each = function(e, t) { var n, a = this, r = function(e, n) { return t.call(n[e], e, n[e]) }; if ("function" != typeof t) return a; if (e = e || [], a._isarray(e)) for (n = 0; n < e.length && !r(n, e); n++); else for (n in e) if (r(n, e)) break; return a }, a.prototype.sort = function(e, t, n) { var a = json.parse(json.stringify(e || [])); return t ? (a.sort(function(e, n) { var a = /^-?\d+$/, r = e[t], i = n[t]; return a.test(r) && (r = parsefloat(r)), a.test(i) && (i = parsefloat(i)), r - i }), n && a.reverse(), a) : a }, a.prototype.stope = function(t) { t = t || e.event; try { t.stoppropagation() } catch (n) { t.cancelbubble = !0 } }; var c = "layui-event-remove"; a.prototype.onevent = function(e, t, n) { return "string" != typeof e || "function" != typeof n ? this : a.event(e, t, null, n) }, a.prototype.event = a.event = function(e, t, a, r) { var i = this, o = null, l = (t || "").match(/\((.*)\)$/) || [], s = (e + "." + t).replace(l[0], ""), y = l[1] || "", d = function(e, t) { var n = t && t.call(i, a); n === !1 && null === o && (o = !1) }; return a === c ? (delete(i.cache.event[s] || {})[y], i) : r ? (n.event[s] = n.event[s] || {}, n.event[s][ y] = [r], this) : (u.each(n.event[s], function(e, t) { return "{*}" === y ? void u.each(t, d) : ("" === e && u.each(t, d), void(y && e === y && u .each(t, d))) }), o) }, a.prototype.on = function(e, t, n) { var a = this; return a.onevent.call(a, t, e, n) }, a.prototype.off = function(e, t) { var n = this; return n.event.call(n, t, e, c) }; var u = new a, y = "lay", d = window.document, m = function(e) { return new f(e) }, f = function(e) { for (var t = 0, n = "object" == typeof e ? [e] : (this.selector = e, d.queryselectorall(e || null)); t < n .length; t++) this.push(n[t]) }; f.prototype = [], f.prototype.constructor = f, m.extend = function() { var e = 1, t = arguments, n = function(e, t) { e = e || (t.constructor === array ? [] : {}); for (var a in t) e[a] = t[a] && t[a].constructor === object ? n(e[a], t[a]) : t[a]; return e }; for (t[0] = "object" == typeof t[0] ? t[0] : {}; e < t.length; e++) "object" == typeof t[e] && n(t[0], t[ e]); return t[0] }, m.v = "1.0.7", m.ie = function() { var e = navigator.useragent.tolowercase(); return !!(window.activexobject || "activexobject" in window) && ((e.match(/msie\s(\d+)/) || [])[1] || "11") }(), m.layui = u, m.getpath = u.cache.dir, m.stope = u.stope, m.each = function() { return u.each.apply(u, arguments), this }, m.digit = function(e, t, n) { var a = ""; e = string(e), t = t || 2; for (var r = e.length; r < t; r++) a += "0"; return e < math.pow(10, t) ? a + (0 | e) : e }, m.elem = function(e, t) { var n = d.createelement(e); return m.each(t || {}, function(e, t) { n.setattribute(e, t) }), n }, m.hasscrollbar = function() { return d.body.scrollheight > (window.innerheight || d.documentelement.clientheight) }, m.position = function(e, t, n) { if (t) { n = n || {}, e !== d && e !== m("body")[0] || (n.clicktype = "right"); var a = "right" === n.clicktype ? function() { var e = n.e || window.event || {}; return { left: e.clientx, top: e.clienty, right: e.clientx, bottom: e.clienty } }() : e.getboundingclientrect(), r = t.offsetwidth, i = t.offsetheight, o = function(e) { return e = e ? "scrollleft" : "scrolltop", d.body[e] | d.documentelement[e] }, l = function(e) { return d.documentelement[e ? "clientwidth" : "clientheight"] }, s = 5, c = a.left, u = a.bottom; c + r + s > l("width") && (c = l("width") - r - s), u + i + s > l() && (a.top > i + s ? u = a.top - i - 2 * s : "right" === n.clicktype && (u = l() - i - 2 * s, u < 0 && (u = 0))); var y = n.position; if (y && (t.style.position = y), t.style.left = c + ("fixed" === y ? 0 : o(1)) + "px", t.style.top = u + ("fixed" === y ? 0 : o()) + "px", !m.hasscrollbar()) { var f = t.getboundingclientrect(); !n.system_reload && f.bottom + s > l() && (n.system_reload = !0, settimeout(function() { m.position(e, t, n) }, 50)) } } }, m.options = function(e, t) { var n = m(e), a = t || "lay-options"; try { return new function("return " + (n.attr(a) || "{}"))() } catch (r) { return hint.error("parseerror\uff1a" + r, "error"), {} } }, m.istopelem = function(e) { var t = [d, m("body")[0]], n = !1; return m.each(t, function(t, a) { if (a === e) return n = !0 }), n }, f.addstr = function(e, t) { return e = e.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), m.each(t, function(t, n) { new regexp("\\b" + n + "\\b").test(e) || (e = e + " " + n) }), e.replace(/^\s|\s$/, "") }, f.removestr = function(e, t) { return e = e.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), m.each(t, function(t, n) { var a = new regexp("\\b" + n + "\\b"); a.test(e) && (e = e.replace(a, "")) }), e.replace(/\s+/, " ").replace(/^\s|\s$/, "") }, f.prototype.find = function(e) { var t = this, n = 0, a = [], r = "object" == typeof e; return this.each(function(i, o) { for (var l = r ? o.contains(e) : o.queryselectorall(e || null); n < l.length; n++) a.push(l[n]); t.shift() }), r || (t.selector = (t.selector ? t.selector + " " : "") + e), m.each(a, function(e, n) { t.push(n) }), t }, f.prototype.each = function(e) { return m.each.call(this, this, e) }, f.prototype.addclass = function(e, t) { return this.each(function(n, a) { a.classname = f[t ? "removestr" : "addstr"](a.classname, e) }) }, f.prototype.removeclass = function(e) { return this.addclass(e, !0) }, f.prototype.hasclass = function(e) { var t = !1; return this.each(function(n, a) { new regexp("\\b" + e + "\\b").test(a.classname) && (t = !0) }), t }, f.prototype.css = function(e, t) { var n = this, a = function(e) { return isnan(e) ? e : e + "px" }; return "string" == typeof e && void 0 === t ? function() { if (n.length > 0) return n[0].style[e] }() : n.each(function(n, r) { "object" == typeof e ? m.each(e, function(e, t) { r.style[e] = a(t) }) : r.style[e] = a(t) }) }, f.prototype.width = function(e) { var t = this; return void 0 === e ? function() { if (t.length > 0) return t[0].offsetwidth }() : t.each(function(n, a) { t.css("width", e) }) }, f.prototype.height = function(e) { var t = this; return void 0 === e ? function() { if (t.length > 0) return t[0].offsetheight }() : t.each(function(n, a) { t.css("height", e) }) }, f.prototype.attr = function(e, t) { var n = this; return void 0 === t ? function() { if (n.length > 0) return n[0].getattribute(e) }() : n.each(function(n, a) { a.setattribute(e, t) }) }, f.prototype.removeattr = function(e) { return this.each(function(t, n) { n.removeattribute(e) }) }, f.prototype.html = function(e) { var t = this; return void 0 === e ? function() { if (t.length > 0) return t[0].innerhtml }() : this.each(function(t, n) { n.innerhtml = e }) }, f.prototype.val = function(e) { var t = this; return void 0 === e ? function() { if (t.length > 0) return t[0].value }() : this.each(function(t, n) { n.value = e }) }, f.prototype.append = function(e) { return this.each(function(t, n) { "object" == typeof e ? n.appendchild(e) : n.innerhtml = n.innerhtml + e }) }, f.prototype.remove = function(e) { return this.each(function(t, n) { e ? n.removechild(e) : n.parentnode.removechild(n) }) }, f.prototype.on = function(e, t) { return this.each(function(n, a) { a.attachevent ? a.attachevent("on" + e, function(e) { e.target = e.srcelement, t.call(a, e) }) : a.addeventlistener(e, t, !1) }) }, f.prototype.off = function(e, t) { return this.each(function(n, a) { a.detachevent ? a.detachevent("on" + e, t) : a.removeeventlistener(e, t, !1) }) }, window.lay = m, window.layui && u.define && u.define(function(e) { e(y, m) }) }(window, window.document), ! function(e, t) { "use strict"; var n = e.layui && layui.define, a = { getpath: e.lay && lay.getpath ? lay.getpath : "", link: function(t, n, a) { i.path && e.lay && lay.layui && lay.layui.link(i.path + t, n, a) } }, r = e.layui_global || {}, i = { v: "5.3.1", config: {}, index: e.laydate && e.laydate.v ? 1e5 : 0, path: r.laydate_dir || a.getpath, set: function(e) { var t = this; return t.config = lay.extend({}, t.config, e), t }, ready: function(e) { var t = "laydate", r = "", o = (n ? "modules/laydate/" : "theme/") + "default/laydate.css?v=" + i.v + r; return n ? layui.addcss(o, e, t) : a.link(o, e, t), this } }, o = function() { var e = this, t = e.config, n = t.id; return o.that[n] = e, { hint: function(t) { e.hint.call(e, t) }, config: e.config } }, l = "laydate", s = ".layui-laydate", c = "layui-this", u = "laydate-disabled", y = [100, 2e5], d = "layui-laydate-static", m = "layui-laydate-list", f = "layui-laydate-hint", h = "layui-laydate-footer", p = ".laydate-btns-confirm", g = "laydate-time-text", v = "laydate-btns-time", t = "layui-laydate-preview", w = function(e) { var t = this; t.index = ++i.index, t.config = lay.extend({}, t.config, i.config, e), e = t.config, e.id = "id" in e ? e .id : t.index, i.ready(function() { t.init() }) }, d = "yyyy|y|mm|m|dd|d|hh|h|mm|m|ss|s"; o.formatarr = function(e) { return (e || "").match(new regexp(d + "|.", "g")) || [] }, w.isleapyear = function(e) { return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0 }, w.prototype.config = { type: "date", range: !1, format: "yyyy-mm-dd", value: null, isinitvalue: !0, min: "1900-1-1", max: "2099-12-31", trigger: "click", show: !1, showbottom: !0, ispreview: !0, btns: ["clear", "now", "confirm"], lang: "cn", theme: "default", position: null, calendar: !1, mark: {}, zindex: null, done: null, change: null }, w.prototype.lang = function() { var e = this, t = e.config, n = { cn: { weeks: [ "周\u4e00", "周\u4e8c", "周\u4e09", "周\u56db", "周\u4e94", "周\u516d","周\u65e5",], time: ["\u65f6", "\u5206", "\u79d2"], timetips: "\u9009\u62e9\u65f6\u95f4", starttime: "\u5f00\u59cb\u65f6\u95f4", endtime: "\u7ed3\u675f\u65f6\u95f4", datetips: "\u8fd4\u56de\u65e5\u671f", month: ["\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d", "\u4e03", "\u516b", "\u4e5d", "\u5341", "\u5341\u4e00", "\u5341\u4e8c" ], tools: { confirm: "\u786e\u5b9a", clear: "\u6e05\u7a7a", now: "\u73b0\u5728" }, timeout: "\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u65e9\u4e8e\u5f00\u59cb\u65f6\u95f4
\u8bf7\u91cd\u65b0\u9009\u62e9", invaliddate: "\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185", formaterror: [ "\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5
\u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a
", "
\u5df2\u4e3a\u4f60\u91cd\u7f6e" ], preview: "\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c" }, en: { weeks:["mo","tu","we","th","fr","sa","su"], time: ["hours", "minutes", "seconds"], timetips: "select time", starttime: "start time", endtime: "end time", datetips: "select date", month: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], tools: { confirm: "confirm", clear: "clear", now: "now" }, timeout: "end time cannot be less than start time
please re-select", invaliddate: "invalid date", formaterror: ["the date format error
must be followed\uff1a
", "
it has been reset"], preview: "the selected result" } }; return n[t.lang] || n.cn }, w.prototype.init = function() { var t = this, n = t.config, a = "static" === n.position, r = { year: "yyyy", month: "yyyy-mm", date: "yyyy-mm-dd", time: "hh:mm:ss", datetime: "yyyy-mm-dd hh:mm:ss" }; n.elem = lay(n.elem), n.eventelem = lay(n.eventelem), n.elem[0] && (t.rangestr = n.range ? "string" == typeof n.range ? n.range : "-" : "", n.range && n.range.constructor === array && (t.rangeelem = [ lay(n.range[0]), lay(n.range[1]) ]), r[n.type] || (e.console && console.error && console.error("laydate type error:'" + n.type + "' is not supported"), n.type = "date"), n.format === r.date && (n.format = r[n.type] || r .date), t.format = o.formatarr(n.format), t.exp_if = "", t.exp_split = "", lay.each(t.format, function(e, n) { var a = new regexp(d).test(n) ? "\\d{" + function() { return new regexp(d).test(t.format[0 === e ? e + 1 : e - 1] || "") ? /^yyyy|y$/ .test(n) ? 4 : n.length : /^yyyy$/.test(n) ? "1,4" : /^y$/.test(n) ? "1,308" : "1,2" }() + "}" : "\\" + n; t.exp_if = t.exp_if + a, t.exp_split = t.exp_split + "(" + a + ")" }), t.exp_if_one = new regexp("^" + t.exp_if + "$"), t.exp_if = new regexp("^" + (n.range ? t .exp_if + "\\s\\" + t.rangestr + "\\s" + t.exp_if : t.exp_if) + "$"), t.exp_split = new regexp( "^" + t.exp_split + "$", ""), t.isinput(n.elem[0]) || "focus" === n.trigger && (n.trigger = "click"), n.elem.attr("lay-key") || (n.elem.attr("lay-key", t.index), n.eventelem.attr( "lay-key", t.index)), n.mark = lay.extend({}, n.calendar && "cn" === n.lang ? { "0-1-1": "\u5143\u65e6", "0-2-14": "\u60c5\u4eba", "0-3-8": "\u5987\u5973", "0-3-12": "\u690d\u6811", "0-4-1": "\u611a\u4eba", "0-5-1": "\u52b3\u52a8", "0-5-4": "\u9752\u5e74", "0-6-1": "\u513f\u7ae5", "0-9-10": "\u6559\u5e08", "0-9-18": "\u56fd\u803b", "0-10-1": "\u56fd\u5e86", "0-12-25": "\u5723\u8bde" } : {}, n.mark), lay.each(["min", "max"], function(e, t) { var a = [], r = []; if ("number" == typeof n[t]) { var i = n[t], o = (new date).gettime(), l = 864e5, s = new date(i ? i < l ? o + i * l : i : o); a = [s.getfullyear(), s.getmonth() + 1, s.getdate()], i < l || (r = [s.gethours(), s .getminutes(), s.getseconds() ]) } else a = (n[t].match(/\d+-\d+-\d+/) || [""])[0].split("-"), r = (n[t].match( /\d+:\d+:\d+/) || [""])[0].split(":"); n[t] = { year: 0 | a[0] || (new date).getfullyear(), month: a[1] ? (0 | a[1]) - 1 : (new date).getmonth(), date: 0 | a[2] || (new date).getdate(), hours: 0 | r[0], minutes: 0 | r[1], seconds: 0 | r[2] } }), t.elemid = "layui-laydate" + n.elem.attr("lay-key"), (n.show || a) && t.render(), a || t .events(), n.value && n.isinitvalue && (n.value.constructor === date ? t.setvalue(t.parse(0, t .systemdate(n.value))) : t.setvalue(n.value))) }, w.prototype.render = function() { var e = this, n = e.config, a = e.lang(), r = "static" === n.position, o = e.elem = lay.elem("div", { id: e.elemid, "class": ["layui-laydate", n.range ? " layui-laydate-range" : "", r ? " " + d : "", n.theme && "default" !== n.theme && !/^#/.test(n.theme) ? " laydate-theme-" + n.theme : "" ].join("") }), l = e.elemmain = [], s = e.elemheader = [], c = e.elemcont = [], u = e.table = [], y = e.footer = lay.elem("div", { "class": h }); if (n.zindex && (o.style.zindex = n.zindex), lay.each(new array(2), function(e) { if (!n.range && e > 0) return !0; var t = lay.elem("div", { "class": "layui-laydate-header" }), r = [function() { var e = lay.elem("i", { "class": "layui-icon laydate-icon laydate-prev-y" }); return e.innerhtml = "", e }(), function() { var e = lay.elem("i", { "class": "layui-icon laydate-icon laydate-prev-m" }); return e.innerhtml = "", e }(), function() { var e = lay.elem("div", { "class": "laydate-set-ym" }), t = lay.elem("span"), n = lay.elem("span"); return e.appendchild(t), e.appendchild(n), e }(), function() { var e = lay.elem("i", { "class": "layui-icon laydate-icon laydate-next-m" }); return e.innerhtml = "", e }(), function() { var e = lay.elem("i", { "class": "layui-icon laydate-icon laydate-next-y" }); return e.innerhtml = "", e }()], i = lay.elem("div", { "class": "layui-laydate-content" }), o = lay.elem("table"), y = lay.elem("thead"), d = lay.elem("tr"); lay.each(r, function(e, n) { t.appendchild(n) }), y.appendchild(d), lay.each(new array(6), function(e) { var t = o.insertrow(0); lay.each(new array(7), function(n) { if (0 === e) { var r = lay.elem("th"); r.innerhtml = a.weeks[n], d.appendchild(r) } t.insertcell(n) }) }), o.insertbefore(y, o.children[0]), i.appendchild(o), l[e] = lay.elem("div", { "class": "layui-laydate-main laydate-main-list-" + e }), l[e].appendchild(t), l[e].appendchild(i), s.push(r), c.push(i), u.push(o) }), lay(y).html(function() { var e = [], t = []; return "datetime" === n.type && e.push('' + a .timetips + ""), (n.range || "datetime" !== n.type) && e.push(''), lay.each(n.btns, function(e, i) { var o = a.tools[i] || "btn"; n.range && "now" === i || (r && "clear" === i && (o = "cn" === n.lang ? "\u91cd\u7f6e" : "reset"), t.push('' + o + "")) }), e.push('"), e.join("") }()), lay.each(l, function(e, t) { o.appendchild(t) }), n.showbottom && o.appendchild(y), /^#/.test(n.theme)) { var m = lay.elem("style"), f = ["#{{id}} .layui-laydate-header{background-color:{{theme}};}", "#{{id}} .layui-this{background-color:{{theme}} !important;}" ].join("").replace(/{{id}}/g, e.elemid).replace(/{{theme}}/g, n.theme); "stylesheet" in m ? (m.setattribute("type", "text/css"), m.stylesheet.csstext = f) : m.innerhtml = f, lay(o).addclass("laydate-theme-molv"), o.appendchild(m) } i.thisid = n.id, e.remove(w.thiselemdate), r ? n.elem.append(o) : (t.body.appendchild(o), e.position()), e .checkdate().calendar(null, 0, "init"), e.changeevent(), w.thiselemdate = e.elemid, "function" == typeof n.ready && n.ready(lay.extend({}, n.datetime, { month: n.datetime.month + 1 })), e.preview() }, w.prototype.remove = function(e) { var t = this, n = (t.config, lay("#" + (e || t.elemid))); return n[0] ? (n.hasclass(d) || t.checkdate(function() { n.remove() }), t) : t }, w.prototype.position = function() { var e = this, t = e.config; return lay.position(e.bindelem || t.elem[0], e.elem, { position: t.position }), e }, w.prototype.hint = function(e) { var t = this, n = (t.config, lay.elem("div", { "class": f })); t.elem && (n.innerhtml = e || "", lay(t.elem).find("." + f).remove(), t.elem.appendchild(n), cleartimeout(t .hintimer), t.hintimer = settimeout(function() { lay(t.elem).find("." + f).remove() }, 3e3)) }, w.prototype.getasym = function(e, t, n) { return n ? t-- : t++, t < 0 && (t = 11, e--), t > 11 && (t = 0, e++), [e, t] }, w.prototype.systemdate = function(e) { var t = e || new date; return { year: t.getfullyear(), month: t.getmonth(), date: t.getdate(), hours: e ? e.gethours() : 0, minutes: e ? e.getminutes() : 0, seconds: e ? e.getseconds() : 0 } }, w.prototype.checkdate = function(e) { var t, n, a = this, r = (new date, a.config), o = a.lang(), l = r.datetime = r.datetime || a.systemdate(), s = a.bindelem || r.elem[0], c = (a.isinput(s) ? "val" : "html", function() { if (a.rangeelem) { var e = [a.rangeelem[0].val(), a.rangeelem[1].val()]; if (e[0] && e[1]) return e.join(" " + a.rangestr + " ") } return a.isinput(s) ? s.value : "static" === r.position ? "" : lay(s).attr("lay-date") }()), u = function(e) { e.year > y[1] && (e.year = y[1], n = !0), e.month > 11 && (e.month = 11, n = !0), e.hours > 23 && (e .hours = 0, n = !0), e.minutes > 59 && (e.minutes = 0, e.hours++, n = !0), e.seconds > 59 && (e.seconds = 0, e.minutes++, n = !0), t = i.getenddate(e.month + 1, e.year), e.date > t && (e .date = t, n = !0) }, d = function(e, t, i) { var o = ["starttime", "endtime"]; t = (t.match(a.exp_split) || []).slice(1), i = i || 0, r.range && (a[o[i]] = a[o[i]] || {}), lay .each(a.format, function(l, s) { var c = parsefloat(t[l]); t[l].length < s.length && (n = !0), /yyyy|y/.test(s) ? (c < y[0] && (c = y[0], n = !0), e.year = c) : /mm|m/.test(s) ? (c < 1 && (c = 1, n = !0), e.month = c - 1) : /dd|d/.test(s) ? (c < 1 && (c = 1, n = !0), e.date = c) : /hh|h/.test(s) ? (c < 1 && (c = 0, n = !0), e.hours = c, r.range && (a[o[i]].hours = c)) : /mm|m/.test(s) ? (c < 1 && (c = 0, n = !0), e.minutes = c, r.range && (a[o[i]].minutes = c)) : /ss|s/ .test(s) && (c < 1 && (c = 0, n = !0), e.seconds = c, r.range && (a[o[i]].seconds = c)) }), u(e) }; if ("limit" === e) return u(l), a; c = c || r.value, "string" == typeof c && (c = c.replace(/\s+/g, " ").replace(/^\s|\s$/g, "")); var m = function() { r.range && (a.enddate = a.enddate || lay.extend({}, r.datetime, function() { var e = {}, t = r.datetime, n = a.getasym(t.year, t.month); return "year" === r.type ? e.year = t.year + 1 : "time" !== r.type && (e.year = n[ 0], e.month = n[1]), "datetime" !== r.type && "time" !== r.type || (e .hours = 23, e.minutes = e.seconds = 59), e }())) }; m(), "string" == typeof c && c ? a.exp_if.test(c) ? r.range ? (c = c.split(" " + a.rangestr + " "), lay .each([r.datetime, a.enddate], function(e, t) { d(t, c[e], e) })) : d(l, c) : (a.hint(o.formaterror[0] + (r.range ? r.format + " " + a.rangestr + " " + r.format : r.format) + o.formaterror[1]), n = !0) : c && c.constructor === date ? r.datetime = a.systemdate( c) : (r.datetime = a.systemdate(), delete a.starttime, delete a.enddate, m(), delete a.endtime), function() { if (a.rangeelem) { var e = [a.rangeelem[0].val(), a.rangeelem[1].val()], t = [r.datetime, a.enddate]; lay.each(e, function(e, n) { a.exp_if_one.test(n) && d(t[e], n, e) }) } }(), u(l), r.range && u(a.enddate), n && c && a.setvalue(r.range ? a.enddate ? a.parse() : "" : a .parse()); var f = function(e) { return a.newdate(e).gettime() }; return (f(l) > f(r.max) || f(l) < f(r.min)) && (l = r.datetime = lay.extend({}, r.min)), r.range && (f(a .enddate) < f(r.min) || f(a.enddate) > f(r.max)) && (a.enddate = lay.extend({}, r.max)), e && e(), a }, w.prototype.mark = function(e, t) { var n, a = this, r = a.config; return lay.each(r.mark, function(e, a) { var r = e.split("-"); r[0] != t[0] && 0 != r[0] || r[1] != t[1] && 0 != r[1] || r[2] != t[2] || (n = a || t[2]) }), n && e.html('' + n + ""), a }, w.prototype.limit = function(e, t, n, a) { var r, i = this, o = i.config, l = {}, s = o[n > 41 ? "enddate" : "datetime"], c = lay.extend({}, s, t || {}); return lay.each({ now: c, min: o.min, max: o.max }, function(e, t) { l[e] = i.newdate(lay.extend({ year: t.year, month: t.month, date: t.date }, function() { var e = {}; return lay.each(a, function(n, a) { e[a] = t[a] }), e }())).gettime() }), r = l.now < l.min || l.now > l.max, e && e[r ? "addclass" : "removeclass"](u), r }, w.prototype.thisdatetime = function(e) { var t = this, n = t.config; return e ? t.enddate : n.datetime }, w.prototype.calendar = function(e, t, n) { var a, r, o, l = this, s = l.config, t = t ? 1 : 0, u = e || l.thisdatetime(t), d = new date, m = l.lang(), f = "date" !== s.type && "datetime" !== s.type, h = lay(l.table[t]).find("td"), g = lay(l.elemheader[t][2]).find("span"); return u.year < y[0] && (u.year = y[0], l.hint(m.invaliddate)), u.year > y[1] && (u.year = y[1], l.hint(m .invaliddate)), l.firstdate || (l.firstdate = lay.extend({}, u)), d.setfullyear(u.year, u.month, 1), a = (d.getday()+6)%7, r = i.getenddate(u.month || 12, u.year), o = i.getenddate(u.month + 1, u.year), lay .each(h, function(e, t) { var n = [u.year, u.month], i = 0; t = lay(t), t.removeattr("class"), e < a ? (i = r - a + e, t.addclass("laydate-day-prev"), n = l .getasym(u.year, u.month, "sub")) : e >= a && e < o + a ? (i = e - a, i + 1 === u .date && t.addclass(c)) : (i = e - o - a, t.addclass("laydate-day-next"), n = l.getasym( u.year, u.month)), n[1]++, n[2] = i + 1, t.attr("lay-ymd", n.join("-")).html(n[2]), l .mark(t, n).limit(t, { year: n[0], month: n[1] - 1, date: n[2] }, e) }), lay(g[0]).attr("lay-ym", u.year + "-" + (u.month + 1)), lay(g[1]).attr("lay-ym", u.year + "-" + (u .month + 1)), "cn" === s.lang ? (lay(g[0]).attr("lay-type", "year").html(u.year + " \u5e74"), lay(g[ 1]).attr("lay-type", "month").html(u.month + 1 + " \u6708")) : (lay(g[0]).attr("lay-type", "month") .html(m.month[u.month]), lay(g[1]).attr("lay-type", "year").html(u.year)), f && (s.range ? e && (l .listym = [ [s.datetime.year, s.datetime.month + 1], [l.enddate.year, l.enddate.month + 1] ], l.list(s.type, 0).list(s.type, 1), "time" === s.type ? l.setbtnstatus("\u65f6\u95f4", lay .extend({}, l.systemdate(), l.starttime), lay.extend({}, l.systemdate(), l.endtime)) : l .setbtnstatus(!0)) : (l.listym = [ [u.year, u.month + 1] ], l.list(s.type, 0))), s.range && "init" === n && !e && l.calendar(l.enddate, 1), s.range || l.limit( lay(l.footer).find(p), null, 0, ["hours", "minutes", "seconds"]), l.setbtnstatus(), l }, w.prototype.list = function(e, t) { var n = this, a = n.config, r = a.datetime, i = n.lang(), o = a.range && "date" !== a.type && "datetime" !== a.type, l = lay.elem("ul", { "class": m + " " + { year: "laydate-year-list", month: "laydate-month-list", time: "laydate-time-list" } [e] }), s = n.elemheader[t], y = lay(s[2]).find("span"), d = n.elemcont[t || 0], f = lay(d).find("." + m)[0], h = "cn" === a.lang, t = h ? "\u5e74" : "", w = n.listym[t] || {}, d = ["hours", "minutes", "seconds"], b = ["starttime", "endtime"][t]; if (w[0] < 1 && (w[0] = 1), "year" === e) { var e, x = e = w[0] - 7; x < 1 && (x = e = 1), lay.each(new array(15), function(e) { var r = lay.elem("li", { "lay-ym": e }), i = { year: e }; e == w[0] && lay(r).addclass(c), r.innerhtml = e + t, l.appendchild(r), e < n.firstdate .year ? (i.month = a.min.month, i.date = a.min.date) : e >= n.firstdate.year && (i .month = a.max.month, i.date = a.max.date), n.limit(lay(r), i, t), e++ }), lay(y[h ? 0 : 1]).attr("lay-ym", e - 8 + "-" + w[1]).html(x + t + " - " + (e - 1 + t)) } else if ("month" === e) lay.each(new array(12), function(e) { var r = lay.elem("li", { "lay-ym": e }), o = { year: w[0], month: e }; e + 1 == w[1] && lay(r).addclass(c), r.innerhtml = i.month[e] + (h ? "\u6708" : ""), l .appendchild(r), w[0] < n.firstdate.year ? o.date = a.min.date : w[0] >= n.firstdate.year && (o.date = a.max.date), n.limit(lay(r), o, t) }), lay(y[h ? 0 : 1]).attr("lay-ym", w[0] + "-" + w[1]).html(w[0] + t); else if ("time" === e) { var c = function() { lay(l).find("ol").each(function(e, a) { lay(a).find("li").each(function(a, r) { n.limit(lay(r), [{ hours: a }, { hours: n[b].hours, minutes: a }, { hours: n[b].hours, minutes: n[b].minutes, seconds: a }][e], t, [ ["hours"], ["hours", "minutes"], ["hours", "minutes", "seconds"] ][e]) }) }), a.range || n.limit(lay(n.footer).find(p), n[b], 0, ["hours", "minutes", "seconds"]) }; a.range ? n[b] || (n[b] = "starttime" === b ? r : n.enddate) : n[b] = r, lay.each([24, 60, 60], function(e, t) { var a = lay.elem("li"), r = ["

" + i.time[e] + "

    "]; lay.each(new array(t), function(t) { r.push("" + lay.digit( t, 2) + "") }), a.innerhtml = r.join("") + "
", l.appendchild(a) }), c() } if (f && d.removechild(f), d.appendchild(l), "year" === e || "month" === e) lay(n.elemmain[t]).addclass( "laydate-ym-show"), lay(l).find("li").on("click", function() { var i = 0 | lay(this).attr("lay-ym"); if (!lay(this).hasclass(u)) { 0 === t ? (r[e] = i, n.limit(lay(n.footer).find(p), null, 0)) : n.enddate[e] = i; var s = "year" === a.type || "month" === a.type; s ? (lay(l).find("." + c).removeclass(c), lay(this).addclass(c), "month" === a.type && "year" === e && (n.listym[t][0] = i, o && ((t ? n.enddate : r).year = i), n.list( "month", t))) : (n.checkdate("limit").calendar(null, t), n.closelist()), n .setbtnstatus(), a.range || ("month" === a.type && "month" === e || "year" === a.type && "year" === e) && n.setvalue(n.parse()).remove().done(), n.done(null, "change"), lay( n.footer).find("." + v).removeclass(u) } }); else { var m = lay.elem("span", { "class": g }), s = function() { lay(l).find("ol").each(function(e) { var t = this, a = lay(t).find("li"); t.scrolltop = 30 * (n[b][d[e]] - 2), t.scrolltop <= 0 && a.each(function(e, n) { if (!lay(this).hasclass(u)) return t.scrolltop = 30 * (e - 2), !0 }) }) }, k = lay(s[2]).find("." + g); s(), m.innerhtml = a.range ? [i.starttime, i.endtime][t] : i.timetips, lay(n.elemmain[t]).addclass( "laydate-time-show"), k[0] && k.remove(), s[2].appendchild(m), lay(l).find("ol").each(function( e) { var t = this; lay(t).find("li").on("click", function() { var i = 0 | this.innerhtml; lay(this).hasclass(u) || (a.range ? n[b][d[e]] = i : r[d[e]] = i, lay(t).find( "." + c).removeclass(c), lay(this).addclass(c), c(), s(), (n .enddate || "time" === a.type) && n.done(null, "change"), n .setbtnstatus()) }) }) } return n }, w.prototype.listym = [], w.prototype.closelist = function() { var e = this; e.config; lay.each(e.elemcont, function(t, n) { lay(this).find("." + m).remove(), lay(e.elemmain[t]).removeclass( "laydate-ym-show laydate-time-show") }), lay(e.elem).find("." + g).remove() }, w.prototype.setbtnstatus = function(e, t, n) { var a, r = this, i = r.config, o = r.lang(), l = lay(r.footer).find(p); i.range && "time" !== i.type && (t = t || i.datetime, n = n || r.enddate, a = r.newdate(t).gettime() > r .newdate(n).gettime(), r.limit(null, t) || r.limit(null, n) ? l.addclass(u) : l[a ? "addclass" : "removeclass"](u), e && a && r.hint("string" == typeof e ? o.timeout.replace(/\u65e5\u671f/g, e) : o.timeout)) }, w.prototype.parse = function(e, t) { var n = this, a = n.config, r = t || ("end" == e ? lay.extend({}, n.enddate, n.endtime) : a.range ? lay.extend({}, a.datetime, n .starttime) : a.datetime), o = i.parse(r, n.format, 1); return a.range && void 0 === e ? o + " " + n.rangestr + " " + n.parse("end") : o }, w.prototype.newdate = function(e) { return e = e || {}, new date(e.year || 1, e.month || 0, e.date || 1, e.hours || 0, e.minutes || 0, e .seconds || 0) }, w.prototype.setvalue = function(e) { var t = this, n = t.config, a = t.bindelem || n.elem[0]; return "static" === n.position ? t : (e = e || "", t.isinput(a) ? lay(a).val(e) : t.rangeelem ? (t .rangeelem[0].val(e ? t.parse("start") : ""), t.rangeelem[1].val(e ? t.parse("end") : "")) : ( 0 === lay(a).find("*").length && lay(a).html(e), lay(a).attr("lay-date", e)), t) }, w.prototype.preview = function() { var e = this, t = e.config; if (t.ispreview) { var n = lay(e.elem).find("." + t), a = t.range ? e.enddate ? e.parse() : "" : e.parse(); n.html(a).css({ color: "#5fb878", "font-size": "14px;" }), settimeout(function() { n.css({ color: "#666", "font-size": "12px;" }) }, 300) } }, w.prototype.done = function(e, t) { var n = this, a = n.config, r = lay.extend({}, lay.extend(a.datetime, n.starttime)), i = lay.extend({}, lay.extend(n.enddate, n.endtime)); return lay.each([r, i], function(e, t) { "month" in t && lay.extend(t, { month: t.month + 1 }) }), n.preview(), e = e || [n.parse(), r, i], "function" == typeof a[t || "done"] && a[t || "done"] .apply(a, e), n }, w.prototype.choose = function(e, t) { var n = this, a = n.config, r = n.thisdatetime(t), i = (lay(n.elem).find("td"), e.attr("lay-ymd").split("-")); i = { year: 0 | i[0], month: (0 | i[1]) - 1, date: 0 | i[2] }, e.hasclass(u) || (lay.extend(r, i), a.range ? (lay.each(["starttime", "endtime"], function(e, t) { n[t] = n[t] || { hours: 0, minutes: 0, seconds: 0 } }), n.calendar(null, t).done(null, "change")) : "static" === a.position ? n.calendar().done().done( null, "change") : "date" === a.type ? n.setvalue(n.parse()).remove().done() : "datetime" === a .type && n.calendar().done(null, "change")) }, w.prototype.tool = function(e, t) { var n = this, a = n.config, r = n.lang(), i = a.datetime, o = "static" === a.position, l = { datetime: function() { lay(e).hasclass(u) || (n.list("time", 0), a.range && n.list("time", 1), lay(e).attr( "lay-type", "date").html(n.lang().datetips)) }, date: function() { n.closelist(), lay(e).attr("lay-type", "datetime").html(n.lang().timetips) }, clear: function() { o && (lay.extend(i, n.firstdate), n.calendar()), a.range && (delete a.datetime, delete n .enddate, delete n.starttime, delete n.endtime), n.setvalue("").remove(), n.done([ "", {}, {} ]) }, now: function() { var e = new date; lay.extend(i, n.systemdate(), { hours: e.gethours(), minutes: e.getminutes(), seconds: e.getseconds() }), n.setvalue(n.parse()).remove(), o && n.calendar(), n.done() }, confirm: function() { if (a.range) { if (lay(e).hasclass(u)) return n.hint("time" === a.type ? r.timeout.replace( /\u65e5\u671f/g, "\u65f6\u95f4") : r.timeout) } else if (lay(e).hasclass(u)) return n.hint(r.invaliddate); n.done(), n.setvalue(n.parse()).remove() } }; l[t] && l[t]() }, w.prototype.change = function(e) { var t = this, n = t.config, a = t.thisdatetime(e), r = n.range && ("year" === n.type || "month" === n.type), i = t.elemcont[e || 0], o = t.listym[e], l = function(l) { var s = lay(i).find(".laydate-year-list")[0], c = lay(i).find(".laydate-month-list")[0]; return s && (o[0] = l ? o[0] - 15 : o[0] + 15, t.list("year", e)), c && (l ? o[0]-- : o[0]++, t .list("month", e)), (s || c) && (lay.extend(a, { year: o[0] }), r && (a.year = o[0]), n.range || t.done(null, "change"), n.range || t.limit(lay(t .footer).find(p), { year: o[0] })), t.setbtnstatus(), s || c }; return { prevyear: function() { l("sub") || (a.year--, t.checkdate("limit").calendar(null, e), t.done(null, "change")) }, prevmonth: function() { var n = t.getasym(a.year, a.month, "sub"); lay.extend(a, { year: n[0], month: n[1] }), t.checkdate("limit").calendar(null, e), t.done(null, "change") }, nextmonth: function() { var n = t.getasym(a.year, a.month); lay.extend(a, { year: n[0], month: n[1] }), t.checkdate("limit").calendar(null, e), t.done(null, "change") }, nextyear: function() { l() || (a.year++, t.checkdate("limit").calendar(null, e), t.done(null, "change")) } } }, w.prototype.changeevent = function() { var e = this; e.config; lay(e.elem).on("click", function(e) { lay.stope(e) }).on("mousedown", function(e) { lay.stope(e) }), lay.each(e.elemheader, function(t, n) { lay(n[0]).on("click", function(n) { e.change(t).prevyear() }), lay(n[1]).on("click", function(n) { e.change(t).prevmonth() }), lay(n[2]).find("span").on("click", function(n) { var a = lay(this), r = a.attr("lay-ym"), i = a.attr("lay-type"); r && (r = r.split("-"), e.listym[t] = [0 | r[0], 0 | r[1]], e.list(i, t), lay(e .footer).find("." + v).addclass(u)) }), lay(n[3]).on("click", function(n) { e.change(t).nextmonth() }), lay(n[4]).on("click", function(n) { e.change(t).nextyear() }) }), lay.each(e.table, function(t, n) { var a = lay(n).find("td"); a.on("click", function() { e.choose(lay(this), t) }) }), lay(e.footer).find("span").on("click", function() { var t = lay(this).attr("lay-type"); e.tool(this, t) }) }, w.prototype.isinput = function(e) { return /input|textarea/.test(e.tagname.tolocalelowercase()) }, w.prototype.events = function() { var e = this, t = e.config, n = function(n, a) { n.on(t.trigger, function() { a && (e.bindelem = this), e.render() }) }; t.elem[0] && !t.elem[0].eventhandler && (n(t.elem, "bind"), n(t.eventelem), t.elem[0].eventhandler = !0) }, o.that = {}, o.getthis = function(e) { var t = o.that[e]; return t || hint.error(e ? l + " instance with id '" + e + "' not found" : "id argument required"), t }, a.run = function(n) { n(t).on("mousedown", function(e) { if (i.thisid) { var t = o.getthis(i.thisid); if (t) { var a = t.config; e.target !== a.elem[0] && e.target !== a.eventelem[0] && e.target !== n(a.closestop)[ 0] && t.remove() } } }).on("keydown", function(e) { if (i.thisid) { var t = o.getthis(i.thisid); t && 13 === e.keycode && n("#" + t.elemid)[0] && t.elemid === w.thiselemdate && (e .preventdefault(), n(t.footer).find(p)[0].click()) } }), n(e).on("resize", function() { if (i.thisid) { var e = o.getthis(i.thisid); if (e) return !(!e.elem || !n(s)[0]) && void e.position() } }) }, i.render = function(e) { var t = new w(e); return o.call(t) }, i.parse = function(e, t, n) { return e = e || {}, "string" == typeof t && (t = o.formatarr(t)), t = (t || []).concat(), lay.each(t, function(a, r) { /yyyy|y/.test(r) ? t[a] = lay.digit(e.year, r.length) : /mm|m/.test(r) ? t[a] = lay.digit(e .month + (n || 0), r.length) : /dd|d/.test(r) ? t[a] = lay.digit(e.date, r.length) : /hh|h/.test(r) ? t[a] = lay.digit(e.hours, r.length) : /mm|m/.test(r) ? t[a] = lay.digit(e .minutes, r.length) : /ss|s/.test(r) && (t[a] = lay.digit(e.seconds, r.length)) }), t.join("") }, i.getenddate = function(e, t) { var n = new date; return n.setfullyear(t || n.getfullyear(), e || n.getmonth() + 1, 1), new date(n.gettime() - 864e5) .getdate() }, n ? (i.ready(), layui.define("lay", function(e) { i.path = layui.cache.dir, a.run(lay), e(l, i) })) : "function" == typeof define && define.amd ? define(function() { return a.run(lay), i }) : function() { i.ready(), a.run(e.lay), e.laydate = i }() }(window, window.document);