UNPKG

zui

Version:

ZUI 3 是一个全新的开源 UI 组件库,提供了丰富的实用组件,并提供自由的定制使用方式,不依赖任何 JavaScript 框架,可以在任何 Web 应用中通过原生的方式使用。

1,569 lines 370 kB
var vn = (s, t, e) => { if (!t.has(s)) throw TypeError("Cannot " + e); }; var at = (s, t, e) => (vn(s, t, "read from private field"), e ? e.call(s) : t.get(s)), ct = (s, t, e) => { if (t.has(s)) throw TypeError("Cannot add the same private member more than once"); t instanceof WeakSet ? t.add(s) : t.set(s, e); }, _t = (s, t, e, n) => (vn(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e); var bn = (s, t, e) => (vn(s, t, "access private method"), e); const $u = "3.0.0", Au = 1722070228079, Ht = document, Ts = window, Fr = Ht.documentElement, de = Ht.createElement.bind(Ht), Or = de("div"), wn = de("table"), Ka = de("tbody"), rr = de("tr"), { isArray: Js, prototype: Hr } = Array, { concat: qa, filter: ri, indexOf: Wr, map: jr, push: Ga, slice: Br, some: oi, splice: Ya } = Hr, Ja = /^#(?:[\w-]|\\.|[^\x00-\xa0])*$/, Za = /^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/, Xa = /<.+>/, Qa = /^\w+$/; function ai(s, t) { const e = tl(t); return !s || !e && !le(t) && !X(t) ? [] : !e && Za.test(s) ? t.getElementsByClassName(s.slice(1).replace(/\\/g, "")) : !e && Qa.test(s) ? t.getElementsByTagName(s) : t.querySelectorAll(s); } class Zs { constructor(t, e) { if (!t) return; if (Dn(t)) return t; let n = t; if (it(t)) { const i = e || Ht; if (n = Ja.test(t) && le(i) ? i.getElementById(t.slice(1).replace(/\\/g, "")) : Xa.test(t) ? Kr(t) : Dn(i) ? i.find(t) : it(i) ? d(i).find(t) : ai(t, i), !n) return; } else if (fe(t)) return this.ready(t); (n.nodeType || n === Ts) && (n = [n]), this.length = n.length; for (let i = 0, r = this.length; i < r; i++) this[i] = n[i]; } init(t, e) { return new Zs(t, e); } } const k = Zs.prototype, d = k.init; d.fn = d.prototype = k; k.length = 0; k.splice = Ya; typeof Symbol == "function" && (k[Symbol.iterator] = Hr[Symbol.iterator]); function Dn(s) { return s instanceof Zs; } function Se(s) { return !!s && s === s.window; } function le(s) { return !!s && s.nodeType === 9; } function tl(s) { return !!s && s.nodeType === 11; } function X(s) { return !!s && s.nodeType === 1; } function el(s) { return !!s && s.nodeType === 3; } function sl(s) { return typeof s == "boolean"; } function fe(s) { return typeof s == "function"; } function it(s) { return typeof s == "string"; } function pt(s) { return s === void 0; } function Ve(s) { return s === null; } function Vr(s) { return !isNaN(parseFloat(s)) && isFinite(s); } function li(s) { if (typeof s != "object" || s === null) return !1; const t = Object.getPrototypeOf(s); return t === null || t === Object.prototype; } d.isWindow = Se; d.isFunction = fe; d.isArray = Js; d.isNumeric = Vr; d.isPlainObject = li; function Q(s, t, e) { if (e) { let n = s.length; for (; n--; ) if (t.call(s[n], n, s[n]) === !1) return s; } else if (li(s)) { const n = Object.keys(s); for (let i = 0, r = n.length; i < r; i++) { const o = n[i]; if (t.call(s[o], o, s[o]) === !1) return s; } } else for (let n = 0, i = s.length; n < i; n++) if (t.call(s[n], n, s[n]) === !1) return s; return s; } d.each = Q; k.each = function(s) { return Q(this, s); }; k.empty = function() { return this.each((s, t) => { for (; t.firstChild; ) t.removeChild(t.firstChild); }); }; function Ns(...s) { const t = sl(s[0]) ? s.shift() : !1, e = s.shift(), n = s.length; if (!e) return {}; if (!n) return Ns(t, d, e); for (let i = 0; i < n; i++) { const r = s[i]; for (const o in r) t && (Js(r[o]) || li(r[o])) ? ((!e[o] || e[o].constructor !== r[o].constructor) && (e[o] = new r[o].constructor()), Ns(t, e[o], r[o])) : e[o] = r[o]; } return e; } d.extend = Ns; k.extend = function(s) { return Ns(k, s); }; const nl = /\S+/g; function Xs(s) { return it(s) ? s.match(nl) || [] : []; } k.toggleClass = function(s, t) { const e = Xs(s), n = !pt(t); return this.each((i, r) => { X(r) && Q(e, (o, a) => { n ? t ? r.classList.add(a) : r.classList.remove(a) : r.classList.toggle(a); }); }); }; k.addClass = function(s) { return this.toggleClass(s, !0); }; k.removeAttr = function(s) { const t = Xs(s); return this.each((e, n) => { X(n) && Q(t, (i, r) => { n.removeAttribute(r); }); }); }; function il(s, t) { if (s) { if (it(s)) { if (arguments.length < 2) { if (!this[0] || !X(this[0])) return; const e = this[0].getAttribute(s); return Ve(e) ? void 0 : e; } return pt(t) ? this : Ve(t) ? this.removeAttr(s) : this.each((e, n) => { X(n) && n.setAttribute(s, t); }); } for (const e in s) this.attr(e, s[e]); return this; } } k.attr = il; k.removeClass = function(s) { return arguments.length ? this.toggleClass(s, !1) : this.attr("class", ""); }; k.hasClass = function(s) { return !!s && oi.call(this, (t) => X(t) && t.classList.contains(s)); }; k.get = function(s) { return pt(s) ? Br.call(this) : (s = Number(s), this[s < 0 ? s + this.length : s]); }; k.eq = function(s) { return d(this.get(s)); }; k.first = function() { return this.eq(0); }; k.last = function() { return this.eq(-1); }; function rl(s) { return pt(s) ? this.get().map((t) => X(t) || el(t) ? t.textContent : "").join("") : this.each((t, e) => { X(e) && (e.textContent = s); }); } k.text = rl; function Wt(s, t, e) { if (!X(s)) return; const n = Ts.getComputedStyle(s, null); return e ? n.getPropertyValue(t) || void 0 : n[t] || s.style[t]; } function At(s, t) { return parseInt(Wt(s, t), 10) || 0; } function or(s, t) { return At(s, `border${t ? "Left" : "Top"}Width`) + At(s, `padding${t ? "Left" : "Top"}`) + At(s, `padding${t ? "Right" : "Bottom"}`) + At(s, `border${t ? "Right" : "Bottom"}Width`); } const Cn = {}; function ol(s) { if (Cn[s]) return Cn[s]; const t = de(s); Ht.body.insertBefore(t, null); const e = Wt(t, "display"); return Ht.body.removeChild(t), Cn[s] = e !== "none" ? e : "block"; } function ar(s) { return Wt(s, "display") === "none"; } function Ur(s, t) { const e = s && (s.matches || s.webkitMatchesSelector || s.msMatchesSelector); return !!e && !!t && e.call(s, t); } function Qs(s) { return it(s) ? (t, e) => Ur(e, s) : fe(s) ? s : Dn(s) ? (t, e) => s.is(e) : s ? (t, e) => e === s : () => !1; } k.filter = function(s) { const t = Qs(s); return d(ri.call(this, (e, n) => t.call(e, n, e))); }; function Qt(s, t) { return t ? s.filter(t) : s; } k.detach = function(s) { return Qt(this, s).each((t, e) => { e.parentNode && e.parentNode.removeChild(e); }), this; }; const al = /^\s*<(\w+)[^>]*>/, ll = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, lr = { "*": Or, tr: Ka, td: rr, th: rr, thead: wn, tbody: wn, tfoot: wn }; function Kr(s) { if (!it(s)) return []; if (ll.test(s)) return [de(RegExp.$1)]; const t = al.test(s) && RegExp.$1, e = lr[t] || lr["*"]; return e.innerHTML = s, d(e.childNodes).detach().get(); } d.parseHTML = Kr; k.has = function(s) { const t = it(s) ? (e, n) => ai(s, n).length : (e, n) => n.contains(s); return this.filter(t); }; k.not = function(s) { const t = Qs(s); return this.filter((e, n) => (!it(s) || X(n)) && !t.call(n, e, n)); }; function Bt(s, t, e, n) { const i = [], r = fe(t), o = n && Qs(n); for (let a = 0, l = s.length; a < l; a++) if (r) { const c = t(s[a]); c.length && Ga.apply(i, c); } else { let c = s[a][t]; for (; c != null && !(n && o(-1, c)); ) i.push(c), c = e ? c[t] : null; } return i; } function qr(s) { return s.multiple && s.options ? Bt(ri.call(s.options, (t) => t.selected && !t.disabled && !t.parentNode.disabled), "value") : s.value || ""; } function cl(s) { return arguments.length ? this.each((t, e) => { const n = e.multiple && e.options; if (n || eo.test(e.type)) { const i = Js(s) ? jr.call(s, String) : Ve(s) ? [] : [String(s)]; n ? Q(e.options, (r, o) => { o.selected = i.indexOf(o.value) >= 0; }, !0) : e.checked = i.indexOf(e.value) >= 0; } else e.value = pt(s) || Ve(s) ? "" : s; }) : this[0] && qr(this[0]); } k.val = cl; k.is = function(s) { const t = Qs(s); return oi.call(this, (e, n) => t.call(e, n, e)); }; d.guid = 1; function Rt(s) { return s.length > 1 ? ri.call(s, (t, e, n) => Wr.call(n, t) === e) : s; } d.unique = Rt; k.add = function(s, t) { return d(Rt(this.get().concat(d(s, t).get()))); }; k.children = function(s) { return Qt(d(Rt(Bt(this, (t) => t.children))), s); }; k.parent = function(s) { return Qt(d(Rt(Bt(this, "parentNode"))), s); }; k.index = function(s) { const t = s ? d(s)[0] : this[0], e = s ? this : d(t).parent().children(); return Wr.call(e, t); }; k.closest = function(s) { const t = this.filter(s); if (t.length) return t; const e = this.parent(); return e.length ? e.closest(s) : t; }; k.siblings = function(s) { return Qt(d(Rt(Bt(this, (t) => d(t).parent().children().not(t)))), s); }; k.find = function(s) { return d(Rt(Bt(this, (t) => ai(s, t)))); }; const hl = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, ul = /^$|^module$|\/(java|ecma)script/i, dl = ["type", "src", "nonce", "noModule"]; function fl(s, t) { const e = d(s); e.filter("script").add(e.find("script")).each((n, i) => { if (ul.test(i.type) && Fr.contains(i)) { const r = de("script"); r.text = i.textContent.replace(hl, ""), Q(dl, (o, a) => { i[a] && (r[a] = i[a]); }), t.head.insertBefore(r, null), t.head.removeChild(r); } }); } function pl(s, t, e, n, i) { n ? s.insertBefore(t, e ? s.firstChild : null) : s.nodeName === "HTML" ? s.parentNode.replaceChild(t, s) : s.parentNode.insertBefore(t, e ? s : s.nextSibling), i && fl(t, s.ownerDocument); } function te(s, t, e, n, i, r, o, a) { return Q(s, (l, c) => { Q(d(c), (u, h) => { Q(d(t), (p, f) => { const m = e ? h : f, _ = e ? f : h, y = e ? u : p; pl(m, y ? _.cloneNode(!0) : _, n, i, !y); }, a); }, o); }, r), t; } k.after = function() { return te(arguments, this, !1, !1, !1, !0, !0); }; k.append = function() { return te(arguments, this, !1, !1, !0); }; function gl(s) { if (!arguments.length) return this[0] && this[0].innerHTML; if (pt(s)) return this; const t = /<script[\s>]/.test(s); return this.each((e, n) => { X(n) && (t ? d(n).empty().append(s) : n.innerHTML = s); }); } k.html = gl; k.appendTo = function(s) { return te(arguments, this, !0, !1, !0); }; k.wrapInner = function(s) { return this.each((t, e) => { const n = d(e), i = n.contents(); i.length ? i.wrapAll(s) : n.append(s); }); }; k.before = function() { return te(arguments, this, !1, !0); }; k.wrapAll = function(s) { let t = d(s), e = t[0]; for (; e.children.length; ) e = e.firstElementChild; return this.first().before(t), this.appendTo(e); }; k.wrap = function(s) { return this.each((t, e) => { const n = d(s)[0]; d(e).wrapAll(t ? n.cloneNode(!0) : n); }); }; k.insertAfter = function(s) { return te(arguments, this, !0, !1, !1, !1, !1, !0); }; k.insertBefore = function(s) { return te(arguments, this, !0, !0); }; k.prepend = function() { return te(arguments, this, !1, !0, !0, !0, !0); }; k.prependTo = function(s) { return te(arguments, this, !0, !0, !0, !1, !1, !0); }; k.contents = function() { return d(Rt(Bt(this, (s) => s.tagName === "IFRAME" ? [s.contentDocument] : s.tagName === "TEMPLATE" ? s.content.childNodes : s.childNodes))); }; k.next = function(s, t, e) { return Qt(d(Rt(Bt(this, "nextElementSibling", t, e))), s); }; k.nextAll = function(s) { return this.next(s, !0); }; k.nextUntil = function(s, t) { return this.next(t, !0, s); }; k.parents = function(s, t) { return Qt(d(Rt(Bt(this, "parentElement", !0, t))), s); }; k.parentsUntil = function(s, t) { return this.parents(t, s); }; k.prev = function(s, t, e) { return Qt(d(Rt(Bt(this, "previousElementSibling", t, e))), s); }; k.prevAll = function(s) { return this.prev(s, !0); }; k.prevUntil = function(s, t) { return this.prev(t, !0, s); }; k.map = function(s) { return d(qa.apply([], jr.call(this, (t, e) => s.call(t, e, t)))); }; k.clone = function() { return this.map((s, t) => t.cloneNode(!0)); }; k.offsetParent = function() { return this.map((s, t) => { let e = t.offsetParent; for (; e && Wt(e, "position") === "static"; ) e = e.offsetParent; return e || Fr; }); }; k.slice = function(s, t) { return d(Br.call(this, s, t)); }; const ml = /-([a-z])/g; function ci(s) { return s.replace(ml, (t, e) => e.toUpperCase()); } k.ready = function(s) { const t = () => setTimeout(s, 0, d); return Ht.readyState !== "loading" ? t() : Ht.addEventListener("DOMContentLoaded", t), this; }; k.unwrap = function() { return this.parent().each((s, t) => { if (t.tagName === "BODY") return; const e = d(t); e.replaceWith(e.children()); }), this; }; k.offset = function() { const s = this[0]; if (!s) return; const t = s.getBoundingClientRect(); return { top: t.top + Ts.pageYOffset, left: t.left + Ts.pageXOffset }; }; k.position = function() { const s = this[0]; if (!s) return; const t = Wt(s, "position") === "fixed", e = t ? s.getBoundingClientRect() : this.offset(); if (!t) { const n = s.ownerDocument; let i = s.offsetParent || n.documentElement; for (; (i === n.body || i === n.documentElement) && Wt(i, "position") === "static"; ) i = i.parentNode; if (i !== s && X(i)) { const r = d(i).offset(); e.top -= r.top + At(i, "borderTopWidth"), e.left -= r.left + At(i, "borderLeftWidth"); } } return { top: e.top - At(s, "marginTop"), left: e.left - At(s, "marginLeft") }; }; const Gr = { /* GENERAL */ class: "className", contenteditable: "contentEditable", /* LABEL */ for: "htmlFor", /* INPUT */ readonly: "readOnly", maxlength: "maxLength", tabindex: "tabIndex", /* TABLE */ colspan: "colSpan", rowspan: "rowSpan", /* IMAGE */ usemap: "useMap" }; k.prop = function(s, t) { if (s) { if (it(s)) return s = Gr[s] || s, arguments.length < 2 ? this[0] && this[0][s] : this.each((e, n) => { n[s] = t; }); for (const e in s) this.prop(e, s[e]); return this; } }; k.removeProp = function(s) { return this.each((t, e) => { delete e[Gr[s] || s]; }); }; const _l = /^--/; function hi(s) { return _l.test(s); } const Sn = {}, { style: yl } = Or, vl = ["webkit", "moz", "ms"]; function bl(s, t = hi(s)) { if (t) return s; if (!Sn[s]) { const e = ci(s), n = `${e[0].toUpperCase()}${e.slice(1)}`, i = `${e} ${vl.join(`${n} `)}${n}`.split(" "); Q(i, (r, o) => { if (o in yl) return Sn[s] = o, !1; }); } return Sn[s]; } const wl = { animationIterationCount: !0, columnCount: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, gridArea: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnStart: !0, gridRow: !0, gridRowEnd: !0, gridRowStart: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0 }; function Yr(s, t, e = hi(s)) { return !e && !wl[s] && Vr(t) ? `${t}px` : t; } function Cl(s, t) { if (it(s)) { const e = hi(s); return s = bl(s, e), arguments.length < 2 ? this[0] && Wt(this[0], s, e) : s ? (t = Yr(s, t, e), this.each((n, i) => { X(i) && (e ? i.style.setProperty(s, t) : i.style[s] = t); })) : this; } for (const e in s) this.css(e, s[e]); return this; } k.css = Cl; function Jr(s, t) { try { return s(t); } catch { return t; } } const Sl = /^\s+|\s+$/; function cr(s, t) { const e = s.dataset[t] || s.dataset[ci(t)]; return Sl.test(e) ? e : Jr(JSON.parse, e); } function kl(s, t, e) { e = Jr(JSON.stringify, e), s.dataset[ci(t)] = e; } function xl(s, t) { if (!s) { if (!this[0]) return; const e = {}; for (const n in this[0].dataset) e[n] = cr(this[0], n); return e; } if (it(s)) return arguments.length < 2 ? this[0] && cr(this[0], s) : pt(t) ? this : this.each((e, n) => { kl(n, s, t); }); for (const e in s) this.data(e, s[e]); return this; } k.data = xl; function Zr(s, t) { const e = s.documentElement; return Math.max(s.body[`scroll${t}`], e[`scroll${t}`], s.body[`offset${t}`], e[`offset${t}`], e[`client${t}`]); } Q([!0, !1], (s, t) => { Q(["Width", "Height"], (e, n) => { const i = `${t ? "outer" : "inner"}${n}`; k[i] = function(r) { if (this[0]) return Se(this[0]) ? t ? this[0][`inner${n}`] : this[0].document.documentElement[`client${n}`] : le(this[0]) ? Zr(this[0], n) : this[0][`${t ? "offset" : "client"}${n}`] + (r && t ? At(this[0], `margin${e ? "Top" : "Left"}`) + At(this[0], `margin${e ? "Bottom" : "Right"}`) : 0); }; }); }); Q(["Width", "Height"], (s, t) => { const e = t.toLowerCase(); k[e] = function(n) { if (!this[0]) return pt(n) ? void 0 : this; if (!arguments.length) return Se(this[0]) ? this[0].document.documentElement[`client${t}`] : le(this[0]) ? Zr(this[0], t) : this[0].getBoundingClientRect()[e] - or(this[0], !s); const i = parseInt(n, 10); return this.each((r, o) => { if (!X(o)) return; const a = Wt(o, "boxSizing"); o.style[e] = Yr(e, i + (a === "border-box" ? or(o, !s) : 0)); }); }; }); const hr = "___cd"; k.toggle = function(s) { return this.each((t, e) => { if (!X(e)) return; const n = ar(e); (pt(s) ? n : s) ? (e.style.display = e[hr] || "", ar(e) && (e.style.display = ol(e.tagName))) : n || (e[hr] = Wt(e, "display"), e.style.display = "none"); }); }; k.hide = function() { return this.toggle(!1); }; k.show = function() { return this.toggle(!0); }; const ur = "___ce", ui = ".", di = { focus: "focusin", blur: "focusout" }, Xr = { mouseenter: "mouseover", mouseleave: "mouseout" }, Tl = /^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i; function fi(s) { return Xr[s] || di[s] || s; } function pi(s) { const t = s.split(ui); return [t[0], t.slice(1).sort()]; } k.trigger = function(s, t) { if (it(s)) { const [n, i] = pi(s), r = fi(n); if (!r) return this; const o = Tl.test(r) ? "MouseEvents" : "HTMLEvents"; s = Ht.createEvent(o), s.initEvent(r, !0, !0), s.namespace = i.join(ui), s.___ot = n; } s.___td = t; const e = s.___ot in di; return this.each((n, i) => { e && fe(i[s.___ot]) && (i[`___i${s.type}`] = !0, i[s.___ot](), i[`___i${s.type}`] = !1), i.dispatchEvent(s); }); }; function Qr(s) { return s[ur] = s[ur] || {}; } function Nl(s, t, e, n, i) { const r = Qr(s); r[t] = r[t] || [], r[t].push([e, n, i]), s.addEventListener(t, i); } function to(s, t) { return !t || !oi.call(t, (e) => s.indexOf(e) < 0); } function Es(s, t, e, n, i) { const r = Qr(s); if (t) r[t] && (r[t] = r[t].filter(([o, a, l]) => { if (i && l.guid !== i.guid || !to(o, e) || n && n !== a) return !0; s.removeEventListener(t, l); })); else for (t in r) Es(s, t, e, n, i); } k.off = function(s, t, e) { if (pt(s)) this.each((n, i) => { !X(i) && !le(i) && !Se(i) || Es(i); }); else if (it(s)) fe(t) && (e = t, t = ""), Q(Xs(s), (n, i) => { const [r, o] = pi(i), a = fi(r); this.each((l, c) => { !X(c) && !le(c) && !Se(c) || Es(c, a, o, t, e); }); }); else for (const n in s) this.off(n, s[n]); return this; }; k.remove = function(s) { return Qt(this, s).detach().off(), this; }; k.replaceWith = function(s) { return this.before(s).remove(); }; k.replaceAll = function(s) { return d(s).replaceWith(this), this; }; function El(s, t, e, n, i) { if (!it(s)) { for (const r in s) this.on(r, t, e, s[r], i); return this; } return it(t) || (pt(t) || Ve(t) ? t = "" : pt(e) ? (e = t, t = "") : (n = e, e = t, t = "")), fe(n) || (n = e, e = void 0), n ? (Q(Xs(s), (r, o) => { const [a, l] = pi(o), c = fi(a), u = a in Xr, h = a in di; c && this.each((p, f) => { if (!X(f) && !le(f) && !Se(f)) return; const m = function(_) { if (_.target[`___i${_.type}`]) return _.stopImmediatePropagation(); if (_.namespace && !to(l, _.namespace.split(ui)) || !t && (h && (_.target !== f || _.___ot === c) || u && _.relatedTarget && f.contains(_.relatedTarget))) return; let y = f; if (t) { let b = _.target; for (; !Ur(b, t); ) if (b === f || (b = b.parentNode, !b)) return; y = b; } Object.defineProperty(_, "currentTarget", { configurable: !0, get() { return y; } }), Object.defineProperty(_, "delegateTarget", { configurable: !0, get() { return f; } }), Object.defineProperty(_, "data", { configurable: !0, get() { return e; } }); const v = n.call(y, _, _.___td); i && Es(f, c, l, t, m), v === !1 && (_.preventDefault(), _.stopPropagation()); }; m.guid = n.guid = n.guid || d.guid++, Nl(f, c, l, t, m); }); }), this) : this; } k.on = El; function $l(s, t, e, n) { return this.on(s, t, e, n, !0); } k.one = $l; const Al = /\r?\n/g; function Ml(s, t) { return `&${encodeURIComponent(s)}=${encodeURIComponent(t.replace(Al, `\r `))}`; } const Il = /file|reset|submit|button|image/i, eo = /radio|checkbox/i; k.serialize = function() { let s = ""; return this.each((t, e) => { Q(e.elements || [e], (n, i) => { if (i.disabled || !i.name || i.tagName === "FIELDSET" || Il.test(i.type) || eo.test(i.type) && !i.checked) return; const r = qr(i); if (!pt(r)) { const o = Js(r) ? r : [r]; Q(o, (a, l) => { s += Ml(i.name, l); }); } }); }), s.slice(1); }; window.$ = d; function Pl(s, t) { if (s == null) return [s, void 0]; typeof t == "string" && (t = t.split(".")); const e = t.join("."); let n = s; const i = [n]; for (; typeof n == "object" && n !== null && t.length; ) { let r = t.shift(), o; const a = r.indexOf("["); if (a > 0 && a < r.length - 1 && r.endsWith("]") && (o = r.substring(a + 1, r.length - 1), r = r.substring(0, a)), n = n[r], i.push(n), o !== void 0) if (typeof n == "object" && n !== null) n instanceof Map ? n = n.get(o) : n = n[o], i.push(n); else throw new Error(`Cannot access property "${r}[${o}]", the full path is "${e}".`); } if (t.length) throw new Error(`Cannot access property with rest path "${t.join(".")}", the full path is "${e}".`); return i; } function so(s, t, e) { try { const n = Pl(s, t), i = n[n.length - 1]; return i === void 0 ? e : i; } catch { return e; } } function K(s, ...t) { if (t.length === 0) return s; if (t.length === 1 && typeof t[0] == "object" && t[0]) { const e = t[0]; return Object.keys(e).forEach((n) => { const i = e[n] ?? ""; s = s.replace(new RegExp(`\\{${n}\\}`, "g"), `${i}`); }), s; } for (let e = 0; e < t.length; e++) { const n = t[e] ?? ""; s = s.replace(new RegExp(`\\{${e}\\}`, "g"), `${n}`); } return s; } var gi = /* @__PURE__ */ ((s) => (s[s.B = 1] = "B", s[s.KB = 1024] = "KB", s[s.MB = 1048576] = "MB", s[s.GB = 1073741824] = "GB", s[s.TB = 1099511627776] = "TB", s))(gi || {}); function Dt(s, t = 2, e) { return Number.isNaN(s) ? "?KB" : (e || (s < 1024 ? e = "B" : s < 1048576 ? e = "KB" : s < 1073741824 ? e = "MB" : s < 1099511627776 ? e = "GB" : e = "TB"), (s / gi[e]).toFixed(t) + e); } const fs = (s) => { const t = /^[0-9]*(B|KB|MB|GB|TB)$/; s = s.toUpperCase(); const e = s.match(t); if (!e) return 0; const n = e[1]; return s = s.replace(n, ""), Number.parseInt(s, 10) * gi[n]; }; let mi = (document.documentElement.getAttribute("lang") || "zh_cn").toLowerCase().replace("-", "_"), Ot; function Rl() { return mi; } function Dl(s) { mi = s.toLowerCase().replace("-", "_"); } function no(s, t) { Ot || (Ot = {}), typeof s == "string" && (s = { [s]: t ?? {} }), d.extend(!0, Ot, s); } function H(s, t, e, n, i, r) { Array.isArray(s) ? Ot && s.unshift(Ot) : s = Ot ? [Ot, s] : [s], typeof e == "string" && (r = i, i = n, n = e, e = void 0); const o = i || mi; let a; for (const l of s) { if (!l) continue; const c = l[o] || l.default; if (!c) continue; const u = r && l === Ot ? `${r}.${t}` : t; if (a = so(c, u), a !== void 0) break; } return a === void 0 ? n : e ? K(a, ...Array.isArray(e) ? e : [e]) : a; } function Ll(s, t, e, n) { return H(void 0, s, t, e, n); } H.addLang = no; H.getLang = Ll; H.getCode = Rl; H.setCode = Dl; H.map = Ot; no({ zh_cn: { confirm: "确定", save: "保存", cancel: "取消", delete: "删除", reset: "重置", add: "添加", copy: "复制", close: "关闭" }, zh_tw: { confirm: "確定", save: "儲存", cancel: "取消", delete: "刪除", reset: "重置", add: "添加", Copy: "複製", close: "關閉" }, en: { confirm: "Confirm", save: "Save", cancel: "Cancel", delete: "Delete", reset: "Reset", add: "Add", copy: "Copy", close: "Close" } }); function dr(s, t, e) { s instanceof Headers ? s.set(t, e) : Array.isArray(s) ? s.push([t, e]) : s[t] = e; } function ve(s, t, e) { e != null && (Array.isArray(e) ? e.forEach((n) => ve(s, t, n)) : !(e instanceof Blob) && d.isPlainObject(e) ? Object.entries(e).forEach(([n, i]) => { ve(s, `${t}[${n}]`, i); }) : s.append(t, e instanceof Blob ? e : String(e))); } function zl(s, t) { if (s) { const e = { text: "text/plain", html: "text/html", json: "application/json", ...t }; for (const [n, i] of Object.entries(e)) if (i.split(",").map((r) => r.trim()).includes(s)) return n; } return "text"; } function Fl(s, t) { const e = t || new FormData(); return s && (typeof s == "string" && (s = new URLSearchParams(s)), s instanceof URLSearchParams ? s.forEach((n, i) => { ve(e, i, n); }) : Array.isArray(s) ? s.forEach(([n, i]) => { ve(e, n, i); }) : s instanceof FormData ? s.forEach((n, i) => { ve(e, i, n); }) : d.isPlainObject(s) && Object.entries(s).forEach(([n, i]) => { ve(e, n, i); })), e; } class io { get completed() { return this.data !== void 0 || this.error !== void 0; } get [Symbol.toStringTag]() { return "Ajax"; } constructor(t) { this.setting = t, this._controller = new AbortController(), this._callbacks = { success: [], error: [], complete: [] }; } on(t, e) { return this._callbacks[t].push(e), this; } success(t) { return this.on("success", t); } done(t) { return this.success(t); } fail(t) { return this.on("error", t); } complete(t) { return this.on("complete", t); } always(t) { return this.complete(t); } then(t, e) { return this.completed ? e && this.error ? e(this.error) : t(this.data) : (this.success((n) => t(n)), e && this.fail(e)), this; } catch(t) { return this.error ? (t(this.error), this) : this.on("error", (e) => t(e)); } finally(t) { return this.completed ? (t(), this) : this.complete(() => t()); } abort(t) { return this.completed ? !1 : (this._abortError = t, this._controller.abort(), !0); } getResponseHeader(t) { var e; return (e = this.response) == null ? void 0 : e.headers.get(t); } _init() { if (this.completed) return; const { url: t, type: e, data: n, processData: i = !0, contentType: r, crossDomain: o, accepts: a, dataType: l, timeout: c, dataFilter: u, beforeSend: h, success: p, error: f, complete: m, ..._ } = this.setting; if ((h == null ? void 0 : h(_)) === !1) return; e && (_.method = e); let y = n; y && (i && (y = Fl(y)), _.body = y), o && (_.mode = "cors"); const v = _.headers || {}; dr(v, "X-Requested-With", "XMLHttpRequest"), r && dr(v, "Content-Type", r), _.headers = v, _.signal && _.signal.addEventListener("abort", () => { this.abort(); }), p && this.success(p), f && this.fail(f), m && this.complete(m), _.signal = this._controller.signal, this.url = t, this.request = _; } _emit(t, ...e) { this._callbacks[t].forEach((n) => { n.call(this, ...e); }); } async send() { var u; if (this.completed) return []; this._init(); const { timeout: t, dataType: e, accepts: n, dataFilter: i, throws: r, jsonParser: o } = this.setting; t && (this._timeoutID = window.setTimeout(() => { this.abort(new Error("timeout")); }, t)); let a, l, c; try { a = await fetch(this.url, this.request), this.response = a; const { statusText: h } = a; if (a.ok) { const p = (u = a.headers.get("Content-Disposition")) == null ? void 0 : u.startsWith("attachment"), f = p ? "blob" : e || zl(a.headers.get("Content-Type"), n); p || f === "blob" || f === "file" ? c = await a.blob() : f === "json" ? typeof o == "function" ? (c = await a.text(), c = o(c)) : c = await a.json() : c = await a.text(), this.data = c; const m = (i == null ? void 0 : i(c, f)) ?? c; this._emit("success", m, h, a); } else throw this.data = await a.text(), new Error(h); } catch (h) { l = h; let p = !1; l.name === "AbortError" && (this._abortError ? l = this._abortError : p = !0), this.error = l, p || this._emit("error", l, a == null ? void 0 : a.statusText, l.message); } if (this._timeoutID && clearTimeout(this._timeoutID), this._emit("complete", a, a == null ? void 0 : a.statusText), l && r) throw l; return [c, l, a]; } } d.ajax = (s, t) => { t = t || {}, typeof s == "string" ? t.url = s : d.extend(t, s); const e = new io(t); return e.send(), e; }; d.getJSON = (s, t, e) => (typeof t == "function" && (e = t, t = void 0), d.ajax({ url: s, data: t, success: e, dataType: "json" })); d.get = (s, t, e, n, i = "GET") => { let r, o; return typeof t == "function" ? (r = t, o = void 0) : o = t, typeof e == "function" ? (r = e, n = void 0) : n = e, d.ajax({ method: i, url: s, data: o, success: r, dataType: n }); }; d.post = (s, t, e, n) => d.get(s, t, e, n, "POST"); d.fn.load = function(s, t, e) { typeof t == "function" && (e = t, t = void 0); const [n, i] = s.split(" "); return d.get(n, t, (r, o, a) => { i && (r = d(r).find(i).html()), d(this).html(r).zuiInit(), e == null || e.call(this, r, o, a); }, "html"), this; }; async function _i(s, t = [], e) { const n = { throws: !0, dataType: "json" }; if (typeof s == "string") n.url = s; else if (typeof s == "object") d.extend(n, s); else if (typeof s == "function") { const o = s(...t); return o instanceof Promise ? await o : o; } e && d.extend(n, typeof e == "function" ? e(n) : e); const i = new io(n), [r] = await i.send(); return r; } function Mu(s) { return !!(s && (typeof s == "string" || typeof s == "object" && s.url || typeof s == "function")); } d.fetch = _i; function dt() { return d.guid++; } function Ln(s, t) { if (s === t) return !1; if (s && t) { const e = typeof s, n = typeof t; if (e !== n) return !0; if (e === "object" && n === "object") { const i = Array.isArray(s), r = Array.isArray(t); if (i !== r) return !0; if (i && r) { if (s.length !== t.length) return !0; for (let l = 0; l < s.length; l++) if (Ln(s[l], t[l])) return !0; return !0; } const o = Object.keys(s), a = Object.keys(t); if (o.length !== a.length) return !0; for (const l of o) if (Ln(s[l], t[l])) return !0; return !0; } if (e === "function" && n === "function") return s.toString() !== t.toString(); } return !0; } class $s { /** * Creates a new Computed instance. * @param compute The function that computes the value. * @param dependencies The dependencies of the computed value. */ constructor(t, e) { this._compute = t, this._dependencies = e; } /** * Gets the computed value. */ get value() { return this.compute(); } /** * Gets the cached value of the computed value. */ get cache() { return this._lastDependencies ? this._value : this.compute(); } /** * Forces the computed value to be recomputed. * @param dependencies The new dependencies to use for recomputing the value. * @returns The recomputed value. */ forceCompute(t) { return this._lastDependencies = void 0, this.compute(t); } /** * Computes the value of the computed value. * @param dependencies The dependencies to use for computing the value. * @returns The computed value. */ compute(t) { t !== void 0 && (this._dependencies = t), t = this._dependencies, typeof t == "function" && (t = t()); const e = this._lastDependencies; return (!e || t.some((n, i) => Ln(n instanceof $s ? n.value : n, e[i]))) && (this._value = this._compute(), this._lastDependencies = t.map((n) => n instanceof $s ? n.cache : n)), this._value; } } function ro(...s) { const t = [], e = /* @__PURE__ */ new Map(), n = (i, r) => { if (Array.isArray(i) && (r = i[1], i = i[0]), !i.length) return; const o = e.get(i); typeof o == "number" ? t[o][1] = !!r : (e.set(i, t.length), t.push([i, !!r])); }; return s.forEach((i) => { typeof i == "function" && (i = i()), Array.isArray(i) ? ro(...i).forEach(n) : i && typeof i == "object" ? Object.entries(i).forEach(n) : typeof i == "string" && i.split(" ").forEach((r) => n(r, !0)); }), t.sort((i, r) => (e.get(i[0]) || 0) - (e.get(r[0]) || 0)); } const T = (...s) => ro(...s).reduce((t, [e, n]) => (n && t.push(e), t), []).join(" "); d.classes = T; d.fn.setClass = function(s, ...t) { return this.each((e, n) => { const i = d(n); s === !0 ? i.attr("class", T(i.attr("class"), ...t)) : i.addClass(T(s, ...t)); }); }; const be = /* @__PURE__ */ new WeakMap(); function yi(s, t, e) { const n = be.has(s), i = n ? be.get(s) : {}; typeof t == "string" ? i[t] = e : t === null ? Object.keys(i).forEach((r) => { delete i[r]; }) : Object.assign(i, t), Object.keys(i).forEach((r) => { i[r] === void 0 && delete i[r]; }), Object.keys(i).length ? (!n && s instanceof Element && Object.assign(i, d(s).dataset(), i), be.set(s, i)) : be.delete(s); } function vi(s, t, e) { let n = be.get(s) || {}; return e && s instanceof Element && (n = Object.assign({}, d(s).dataset(), n)), t === void 0 ? n : n[t]; } function Iu(s) { be.delete(s); } d.fn.dataset = d.fn.data; d.fn.data = function(...s) { const [t, e] = s; return !s.length || s.length === 1 && typeof t == "string" ? this.length ? vi(this[0], t, !0) : void 0 : this.each((n, i) => yi(i, t, e)); }; d.fn.removeData = function(s = null) { return this.each((t, e) => yi(e, s)); }; function Ue(s, ...t) { return s.includes("RAWJS") && (s = s.split('"RAWJS<').join("").split('>RAWJS"').join("").split("<RAWJS_QUOTE>").join('"').split("<RAWJS_LINE>").join(` `)), new Function(`return ${s}`)(...t); } function Pu(s, ...t) { return s.includes("RAWJS") ? Ue(s, ...t) : JSON.parse(s); } function Ke(s, t) { const e = d(s)[0]; if (!e) return; const { prefix: n, getter: i, evalValue: r, json: o = !0, evalArgs: a = [] } = { prefix: "z-", ...typeof t == "string" ? { prefix: t } : t }, l = Array.isArray(r) ? new Set(r) : void 0; return Array.from(e.attributes).reduce((c, u) => { let { name: h } = u; const { value: p } = u; let f = p; if (h.startsWith(n)) { if (h = h.slice(n.length).replace(/-([a-z])/g, (m) => m[1].toUpperCase()), i) f = i(h, p); else try { r && (!l || l.has(h)) || r === void 0 && p.includes("RAWJS") ? f = Ue(p, ...a) : o && (f = JSON.parse(p)); } catch { } c[h] = f; } return c; }, {}); } function fr(s, t, e = "z-") { const n = d(s); Object.keys(t).forEach((i) => { let r = t[i]; typeof r == "function" && (r = `RAWJS<${r}>RAWJS`), typeof r != "string" && (r = JSON.stringify(r)), i = i.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`), n.attr(`${e}${i}`, r); }); } function Ol(...s) { var e; const t = s.length; if (!t) return Ke(this); if (t === 1) { const [n] = s; return typeof n == "string" ? (e = Ke(this)) == null ? void 0 : e[n] : (d.isPlainObject(n) && fr(this, n), this); } return fr(this, { [s[0]]: s[1] }), this; } d.fn.z = Ol; d.fn._attr = d.fn.attr; d.fn.extend({ attr(...s) { const [t, e] = s; return !s.length || s.length === 1 && typeof t == "string" ? this._attr.apply(this, s) : typeof t == "object" ? (t && Object.keys(t).forEach((n) => { const i = t[n]; i === null ? this.removeAttr(n) : this._attr(n, i); }), this) : e === null ? this.removeAttr(t) : this._attr(t, e); } }); d.Event || (d.Event = (s, t) => { const [e, ...n] = s.split("."), i = new Event(e, { bubbles: !0, cancelable: !0 }); return i.namespace = n.join("."), i.___ot = e, i.___td = t, i; }); const As = (s, t) => new Promise((e) => { const n = window.setTimeout(e, s); t && t(n); }), Hl = {}; d.share = Hl; var tn, W, oo, St, ie, pr, ao, zn, bi, Fn, On, qe = {}, lo = [], Wl = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, en = Array.isArray; function Gt(s, t) { for (var e in t) s[e] = t[e]; return s; } function co(s) { var t = s.parentNode; t && t.removeChild(s); } function yt(s, t, e) { var n, i, r, o = {}; for (r in t) r == "key" ? n = t[r] : r == "ref" ? i = t[r] : o[r] = t[r]; if (arguments.length > 2 && (o.children = arguments.length > 3 ? tn.call(arguments, 2) : e), typeof s == "function" && s.defaultProps != null) for (r in s.defaultProps) o[r] === void 0 && (o[r] = s.defaultProps[r]); return vs(s, o, n, i, null); } function vs(s, t, e, n, i) { var r = { type: s, props: t, key: e, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i ?? ++oo, __i: -1, __u: 0 }; return i == null && W.vnode != null && W.vnode(r), r; } function J() { return { current: null }; } function Ne(s) { return s.children; } function B(s, t) { this.props = s, this.context = t; } function ce(s, t) { if (t == null) return s.__ ? ce(s.__, s.__i + 1) : null; for (var e; t < s.__k.length; t++) if ((e = s.__k[t]) != null && e.__e != null) return e.__e; return typeof s.type == "function" ? ce(s) : null; } function ho(s) { var t, e; if ((s = s.__) != null && s.__c != null) { for (s.__e = s.__c.base = null, t = 0; t < s.__k.length; t++) if ((e = s.__k[t]) != null && e.__e != null) { s.__e = s.__c.base = e.__e; break; } return ho(s); } } function gr(s) { (!s.__d && (s.__d = !0) && ie.push(s) && !Ms.__r++ || pr !== W.debounceRendering) && ((pr = W.debounceRendering) || ao)(Ms); } function Ms() { var s, t, e, n, i, r, o, a; for (ie.sort(zn); s = ie.shift(); ) s.__d && (t = ie.length, n = void 0, r = (i = (e = s).__v).__e, o = [], a = [], e.__P && ((n = Gt({}, i)).__v = i.__v + 1, W.vnode && W.vnode(n), wi(e.__P, n, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, o, r ?? ce(i), !!(32 & i.__u), a), n.__v = i.__v, n.__.__k[n.__i] = n, po(o, n, a), n.__e != r && ho(n)), ie.length > t && ie.sort(zn)); Ms.__r = 0; } function uo(s, t, e, n, i, r, o, a, l, c, u) { var h, p, f, m, _, y = n && n.__k || lo, v = t.length; for (e.__d = l, jl(e, t, y), l = e.__d, h = 0; h < v; h++) (f = e.__k[h]) != null && typeof f != "boolean" && typeof f != "function" && (p = f.__i === -1 ? qe : y[f.__i] || qe, f.__i = h, wi(s, f, p, i, r, o, a, l, c, u), m = f.__e, f.ref && p.ref != f.ref && (p.ref && Ci(p.ref, null, f), u.push(f.ref, f.__c || m, f)), _ == null && m != null && (_ = m), 65536 & f.__u || p.__k === f.__k ? (l && typeof f.type == "string" && !s.contains(l) && (l = ce(p)), l = fo(f, l, s)) : typeof f.type == "function" && f.__d !== void 0 ? l = f.__d : m && (l = m.nextSibling), f.__d = void 0, f.__u &= -196609); e.__d = l, e.__e = _; } function jl(s, t, e) { var n, i, r, o, a, l = t.length, c = e.length, u = c, h = 0; for (s.__k = [], n = 0; n < l; n++) o = n + h, (i = s.__k[n] = (i = t[n]) == null || typeof i == "boolean" || typeof i == "function" ? null : typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? vs(null, i, null, null, null) : en(i) ? vs(Ne, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? vs(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = s, i.__b = s.__b + 1, a = Bl(i, e, o, u), i.__i = a, r = null, a !== -1 && (u--, (r = e[a]) && (r.__u |= 131072)), r == null || r.__v === null ? (a == -1 && h--, typeof i.type != "function" && (i.__u |= 65536)) : a !== o && (a == o - 1 ? h = a - o : a == o + 1 ? h++ : a > o ? u > l - o ? h += a - o : h-- : a < o && h++, a !== n + h && (i.__u |= 65536))) : (r = e[o]) && r.key == null && r.__e && !(131072 & r.__u) && (r.__e == s.__d && (s.__d = ce(r)), Hn(r, r, !1), e[o] = null, u--); if (u) for (n = 0; n < c; n++) (r = e[n]) != null && !(131072 & r.__u) && (r.__e == s.__d && (s.__d = ce(r)), Hn(r, r)); } function fo(s, t, e) { var n, i; if (typeof s.type == "function") { for (n = s.__k, i = 0; n && i < n.length; i++) n[i] && (n[i].__ = s, t = fo(n[i], t, e)); return t; } s.__e != t && (e.insertBefore(s.__e, t || null), t = s.__e); do t = t && t.nextSibling; while (t != null && t.nodeType === 8); return t; } function Is(s, t) { return t = t || [], s == null || typeof s == "boolean" || (en(s) ? s.some(function(e) { Is(e, t); }) : t.push(s)), t; } function Bl(s, t, e, n) { var i = s.key, r = s.type, o = e - 1, a = e + 1, l = t[e]; if (l === null || l && i == l.key && r === l.type && !(131072 & l.__u)) return e; if (n > (l != null && !(131072 & l.__u) ? 1 : 0)) for (; o >= 0 || a < t.length; ) { if (o >= 0) { if ((l = t[o]) && !(131072 & l.__u) && i == l.key && r === l.type) return o; o--; } if (a < t.length) { if ((l = t[a]) && !(131072 & l.__u) && i == l.key && r === l.type) return a; a++; } } return -1; } function mr(s, t, e) { t[0] === "-" ? s.setProperty(t, e ?? "") : s[t] = e == null ? "" : typeof e != "number" || Wl.test(t) ? e : e + "px"; } function ps(s, t, e, n, i) { var r; t: if (t === "style") if (typeof e == "string") s.style.cssText = e; else { if (typeof n == "string" && (s.style.cssText = n = ""), n) for (t in n) e && t in e || mr(s.style, t, ""); if (e) for (t in e) n && e[t] === n[t] || mr(s.style, t, e[t]); } else if (t[0] === "o" && t[1] === "n") r = t !== (t = t.replace(/(PointerCapture)$|Capture$/i, "$1")), t = t.toLowerCase() in s || t === "onFocusOut" || t === "onFocusIn" ? t.toLowerCase().slice(2) : t.slice(2), s.l || (s.l = {}), s.l[t + r] = e, e ? n ? e.u = n.u : (e.u = bi, s.addEventListener(t, r ? On : Fn, r)) : s.removeEventListener(t, r ? On : Fn, r); else { if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in s) try { s[t] = e ?? ""; break t; } catch { } typeof e == "function" || (e == null || e === !1 && t[4] !== "-" ? s.removeAttribute(t) : s.setAttribute(t, t == "popover" && e == 1 ? "" : e)); } } function _r(s) { return function(t) { if (this.l) { var e = this.l[t.type + s]; if (t.t == null) t.t = bi++; else if (t.t < e.u) return; return e(W.event ? W.event(t) : t); } }; } function wi(s, t, e, n, i, r, o, a, l, c) { var u, h, p, f, m, _, y, v, b, w, C, S, $, A, E, P, x = t.type; if (t.constructor !== void 0) return null; 128 & e.__u && (l = !!(32 & e.__u), r = [a = t.__e = e.__e]), (u = W.__b) && u(t); t: if (typeof x == "function") try { if (v = t.props, b = "prototype" in x && x.prototype.render, w = (u = x.contextType) && n[u.__c], C = u ? w ? w.props.value : u.__ : n, e.__c ? y = (h = t.__c = e.__c).__ = h.__E : (b ? t.__c = h = new x(v, C) : (t.__c = h = new B(v, C), h.constructor = x, h.render = Ul), w && w.sub(h), h.props = v, h.state || (h.state = {}), h.context = C, h.__n = n, p = h.__d = !0, h.__h = [], h._sb = []), b && h.__s == null && (h.__s = h.state), b && x.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = Gt({}, h.__s)), Gt(h.__s, x.getDerivedStateFromProps(v, h.__s))), f = h.props, m = h.state, h.__v = t, p) b && x.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), b && h.componentDidMount != null && h.__h.push(h.componentDidMount); else { if (b && x.getDerivedStateFromProps == null && v !== f && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v, C), !h.__e && (h.shouldComponentUpdate != null && h.shouldComponentUpdate(v, h.__s, C) === !1 || t.__v === e.__v)) { for (t.__v !== e.__v && (h.props = v, h.state = h.__s, h.__d = !1), t.__e = e.__e, t.__k = e.__k, t.__k.forEach(function(M) { M && (M.__ = t); }), S = 0; S < h._sb.length; S++) h.__h.push(h._sb[S]); h._sb = [], h.__h.length && o.push(h); break t; } h.componentWillUpdate != null && h.componentWillUpdate(v, h.__s, C), b && h.componentDidUpdate != null && h.__h.push(function() { h.componentDidUpdate(f, m, _); }); } if (h.context = C, h.props = v, h.__P = s, h.__e = !1, $ = W.__r, A = 0, b) { for (h.state = h.__s, h.__d = !1, $ && $(t), u = h.render(h.props, h.state, h.context), E = 0; E < h._sb.length; E++) h.__h.push(h._sb[E]); h._sb = []; } else do h.__d = !1, $ && $(t), u = h.render(h.props, h.state, h.context), h.state = h.__s; while (h.__d && ++A < 25); h.state = h.__s, h.getChildContext != null && (n = Gt(Gt({}, n), h.getChildContext())), b && !p && h.getSnapshotBeforeUpdate != null && (_ = h.getSnapshotBeforeUpdate(f, m)), uo(s, en(P = u != null && u.type === Ne && u.key == null ? u.props.children : u) ? P : [P], t, e, n, i, r, o, a, l, c), h.base = t.__e, t.__u &= -161, h.__h.length && o.push(h), y && (h.__E = h.__ = null); } catch (M) { t.__v = null, l || r != null ? (t.__e = a, t.__u |= l ? 160 : 32, r[r.indexOf(a)] = null) : (t.__e = e.__e, t.__k = e.__k), W.__e(M, t, e); } else r == null && t.__v === e.__v ? (t.__k = e.__k, t.__e = e.__e) : t.__e = Vl(e.__e, t, e, n, i, r, o, l, c); (u = W.diffed) && u(t); } function po(s, t, e) { t.__d = void 0; for (var n = 0; n < e.length; n++) Ci(e[n], e[++n], e[++n]); W.__c && W.__c(t, s), s.some(function(i) { try { s = i.__h, i.__h = [], s.some(function(r) { r.call(i); }); } catch (r) { W.__e(r, i.__v); } }); } function Vl(s, t, e, n, i, r, o, a, l) { var c, u, h, p, f, m, _, y = e.props, v = t.props, b = t.type; if (b === "svg" ? i = "http://www.w3.org/2000/svg" : b === "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), r != null) { for (c = 0; c < r.length; c++) if ((f = r[c]) && "setAttribute" in f == !!b && (b ? f.localName === b : f.nodeType === 3)) { s = f, r[c] = null; break; } } if (s == null) { if (b === null) return document.createTextNode(v); s = document.createElementNS(i, b, v.is && v), r = null, a = !1; } if (b === null) y === v || a && s.data === v || (s.data = v); else { if (r = r && tn.call(s.childNodes), y = e.props || qe, !a && r != null) for (y = {}, c = 0; c < s.attributes.length; c++) y[(f = s.attributes[c]).name] = f.value; for (c in y) if (f = y[c], c != "children") { if (c == "dangerouslySetInnerHTML") h = f; else if (c !== "key" && !(c in v)) { if (c == "value" && "defaultValue" in v || c == "checked" && "defaultChecked" in v) continue; ps(s, c, null, f, i); } } for (c in v) f = v[c], c == "children" ? p = f : c == "dangerouslySetInnerHTML" ? u = f : c == "value" ? m = f : c == "checked" ? _ = f : c === "key" || a && typeof f != "function" || y[c] === f || ps(s, c, f, y[c], i); if (u) a || h && (u.__html === h.__html || u.__html === s.innerHTML) || (s.innerHTML = u.__html), t.__k = []; else if (h && (s.innerHTML = ""), uo(s, en(p) ? p : [p], t, e, n, b === "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, r, o, r ? r[0] : e.__k && ce(e, 0), a, l), r != null) for (c = r.length; c--; ) r[c] != null && co(r[c]); a || (c = "value", m !== void 0 && (m !== s[c] || b === "progress" && !m || b === "option" && m !== y[c]) && ps(s, c, m, y[c], i), c = "checked", _ !== void 0 && _ !== s[c] && ps(s, c, _, y[c], i)); } return s; } function Ci(s, t, e) { try { typeof s == "function" ? s(t) : s.current = t; } catch (n) { W.__e(n, e); } } function Hn(s, t, e) { var n, i; if (W.unmount && W.unmount(s