var am = Object.defineProperty; var El = Object.getOwnPropertySymbols; var om = Object.prototype.hasOwnProperty, sm = Object.prototype.propertyIsEnumerable; var Rl = Math.pow, Tl = (H, k, e) => k in H ? am(H, k, { enumerable: !0, configurable: !0, writable: !0, value: e }) : H[k] = e, Qs = (H, k) => { for (var e in k || (k = {})) om.call(k, e) && Tl(H, e, k[e]); if (El) for (var e of El(k)) sm.call(k, e) && Tl(H, e, k[e]); return H; }; import { defineComponent as fm, ref as Cl, onMounted as um, nextTick as lm, onBeforeUnmount as cm, watch as hm } from "vue-demi"; import { openBlock as dm, createElementBlock as pm, createElementVNode as ym } from "vue"; class Hi { constructor(k, e = "") { typeof k == "string" ? (this.el = document.createElement(k), this.el.className = e) : this.el = k, this.data = {}; } data(k, e) { return e !== void 0 ? (this.data[k] = e, this) : this.data[k]; } on(k, e) { const [x, ..._] = k.split("."); let u = x; return u === "mousewheel" && /Firefox/i.test(window.navigator.userAgent) && (u = "DOMMouseScroll"), this.el.addEventListener(u, (m) => { e(m); for (let g = 0; g < _.length; g += 1) { const b = _[g]; if (b === "left" && m.button !== 0 || b === "right" && m.button !== 2) return; b === "stop" && m.stopPropagation(); } }), this; } offset(k) { if (k !== void 0) return Object.keys(k).forEach((m) => { this.css(m, `${k[m]}px`); }), this; const { offsetTop: e, offsetLeft: x, offsetHeight: _, offsetWidth: u } = this.el; return { top: e, left: x, height: _, width: u }; } scroll(k) { const { el: e } = this; return k !== void 0 && (k.left !== void 0 && (e.scrollLeft = k.left), k.top !== void 0 && (e.scrollTop = k.top)), { left: e.scrollLeft, top: e.scrollTop }; } box() { return this.el.getBoundingClientRect(); } parent() { return new Hi(this.el.parentNode); } children(...k) { return arguments.length === 0 ? this.el.childNodes : (k.forEach((e) => this.child(e)), this); } removeChild(k) { this.el.removeChild(k); } /* first() { return this.el.firstChild; } last() { return this.el.lastChild; } remove(ele) { return this.el.removeChild(ele); } prepend(ele) { const { el } = this; if (el.children.length > 0) { el.insertBefore(ele, el.firstChild); } else { el.appendChild(ele); } return this; } prev() { return this.el.previousSibling; } next() { return this.el.nextSibling; } */ child(k) { let e = k; return typeof k == "string" ? e = document.createTextNode(k) : k instanceof Hi && (e = k.el), this.el.appendChild(e), this; } contains(k) { return this.el.contains(k); } className(k) { return k !== void 0 ? (this.el.className = k, this) : this.el.className; } addClass(k) { return this.el.classList.add(k), this; } hasClass(k) { return this.el.classList.contains(k); } removeClass(k) { return this.el.classList.remove(k), this; } toggle(k = "active") { return this.toggleClass(k); } toggleClass(k) { return this.el.classList.toggle(k); } active(k = !0, e = "active") { return k ? this.addClass(e) : this.removeClass(e), this; } checked(k = !0) { return this.active(k, "checked"), this; } disabled(k = !0) { return k ? this.addClass("disabled") : this.removeClass("disabled"), this; } // key, value // key // {k, v}... attr(k, e) { if (e !== void 0) this.el.setAttribute(k, e); else { if (typeof k == "string") return this.el.getAttribute(k); Object.keys(k).forEach((x) => { this.el.setAttribute(x, k[x]); }); } return this; } removeAttr(k) { return this.el.removeAttribute(k), this; } html(k) { return k !== void 0 ? (this.el.innerHTML = k, this) : this.el.innerHTML; } val(k) { return k !== void 0 ? (this.el.value = k, this) : this.el.value; } focus() { this.el.focus(); } cssRemoveKeys(...k) { return k.forEach((e) => this.el.style.removeProperty(e)), this; } // css( propertyName ) // css( propertyName, value ) // css( properties ) css(k, e) { return e === void 0 && typeof k != "string" ? (Object.keys(k).forEach((x) => { this.el.style[x] = k[x]; }), this) : e !== void 0 ? (this.el.style[k] = e, this) : this.el.style[k]; } computedStyle() { return window.getComputedStyle(this.el, null); } show() { return this.css("display", "block"), this; } hide() { return this.css("display", "none"), this; } } const $e = (H, k = "") => new Hi(H, k), Ei = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; function cc(H) { let k = "", e = H; for (; e >= Ei.length; ) e /= Ei.length, e -= 1, k += Ei[parseInt(e, 10) % Ei.length]; const x = H % Ei.length; return k += Ei[x], k; } function vm(H) { let k = 0; for (let e = 0; e < H.length - 1; e += 1) { const x = H.charCodeAt(e) - 65, _ = H.length - 1 - e; k += Rl(Ei.length, _) + Ei.length * x; } return k += H.charCodeAt(H.length - 1) - 65, k; } function Ti(H) { let k = "", e = ""; for (let x = 0; x < H.length; x += 1) H.charAt(x) >= "0" && H.charAt(x) <= "9" ? e += H.charAt(x) : k += H.charAt(x); return [vm(k), parseInt(e, 10) - 1]; } function hi(H, k) { return `${cc(H)}${k + 1}`; } function Ha(H, k, e, x = () => !0) { if (k === 0 && e === 0) return H; const [_, u] = Ti(H); return x(_, u) ? hi(_ + k, u + e) : H; } class kr { constructor(k, e, x, _, u = 0, m = 0) { this.sri = k, this.sci = e, this.eri = x, this.eci = _, this.w = u, this.h = m; } set(k, e, x, _) { this.sri = k, this.sci = e, this.eri = x, this.eci = _; } multiple() { return this.eri - this.sri > 0 || this.eci - this.sci > 0; } // cell-index: ri, ci // cell-ref: A10 includes(...k) { let [e, x] = [0, 0]; k.length === 1 ? [x, e] = Ti(k[0]) : k.length === 2 && ([e, x] = k); const { sri: _, sci: u, eri: m, eci: g } = this; return _ <= e && e <= m && u <= x && x <= g; } each(k, e = () => !0) { const { sri: x, sci: _, eri: u, eci: m } = this; for (let g = x; g <= u; g += 1) if (e(g)) for (let b = _; b <= m; b += 1) k(g, b); } contains(k) { return this.sri <= k.sri && this.sci <= k.sci && this.eri >= k.eri && this.eci >= k.eci; } // within within(k) { return this.sri >= k.sri && this.sci >= k.sci && this.eri <= k.eri && this.eci <= k.eci; } // disjoint disjoint(k) { return this.sri > k.eri || this.sci > k.eci || k.sri > this.eri || k.sci > this.eci; } // intersects intersects(k) { return this.sri <= k.eri && this.sci <= k.eci && k.sri <= this.eri && k.sci <= this.eci; } // union union(k) { const { sri: e, sci: x, eri: _, eci: u } = this; return new kr( k.sri < e ? k.sri : e, k.sci < x ? k.sci : x, k.eri > _ ? k.eri : _, k.eci > u ? k.eci : u ); } // intersection // intersection(other) {} // Returns Array that represents that part of this that does not intersect with other // difference difference(k) { const e = [], x = (h, l, d, s) => { e.push(new kr(h, l, d, s)); }, { sri: _, sci: u, eri: m, eci: g } = this, b = k.sri - _, w = k.sci - u, f = m - k.eri, y = g - k.eci; return b > 0 ? (x(_, u, k.sri - 1, g), f > 0 ? (x(k.eri + 1, u, m, g), w > 0 && x(k.sri, u, k.eri, k.sci - 1), y > 0 && x(k.sri, k.eci + 1, k.eri, g)) : (w > 0 && x(k.sri, u, m, k.sci - 1), y > 0 && x(k.sri, k.eci + 1, m, g))) : f > 0 && (x(k.eri + 1, u, m, g), w > 0 && x(_, u, k.eri, k.sci - 1), y > 0 && x(_, k.eci + 1, k.eri, g)), w > 0 ? (x(_, u, m, k.sci - 1), y > 0 ? (x(_, k.eri + 1, m, g), b > 0 && x(_, k.sci, k.sri - 1, k.eci), f > 0 && x(k.sri + 1, k.sci, m, k.eci)) : (b > 0 && x(_, k.sci, k.sri - 1, g), f > 0 && x(k.sri + 1, k.sci, m, g))) : y > 0 && (x(m, k.eci + 1, m, g), b > 0 && x(_, u, k.sri - 1, k.eci), f > 0 && x(k.eri + 1, u, m, k.eci)), e; } size() { return [ this.eri - this.sri + 1, this.eci - this.sci + 1 ]; } toString() { const { sri: k, sci: e, eri: x, eci: _ } = this; let u = hi(e, k); return this.multiple() && (u = `${u}:${hi(_, x)}`), u; } clone() { const { sri: k, sci: e, eri: x, eci: _, w: u, h: m } = this; return new kr(k, e, x, _, u, m); } /* toJSON() { return this.toString(); } */ equals(k) { return this.eri === k.eri && this.eci === k.eci && this.sri === k.sri && this.sci === k.sci; } static valueOf(k) { const e = k.split(":"), [x, _] = Ti(e[0]); let [u, m] = [_, x]; return e.length > 1 && ([m, u] = Ti(e[1])), new kr(_, x, u, m); } } let mm = class { constructor() { this.range = new kr(0, 0, 0, 0), this.ri = 0, this.ci = 0; } multiple() { return this.range.multiple(); } setIndexes(k, e) { this.ri = k, this.ci = e; } size() { return this.range.size(); } }; class bm { constructor() { this.x = 0, this.y = 0, this.ri = 0, this.ci = 0; } } class gm { constructor() { this.undoItems = [], this.redoItems = []; } add(k) { this.undoItems.push(JSON.stringify(k)), this.redoItems = []; } canUndo() { return this.undoItems.length > 0; } canRedo() { return this.redoItems.length > 0; } undo(k, e) { const { undoItems: x, redoItems: _ } = this; this.canUndo() && (_.push(JSON.stringify(k)), e(JSON.parse(x.pop()))); } redo(k, e) { const { undoItems: x, redoItems: _ } = this; this.canRedo() && (x.push(JSON.stringify(k)), e(JSON.parse(_.pop()))); } } class _m { constructor() { this.range = null, this.state = "clear"; } copy(k) { return this.range = k, this.state = "copy", this; } cut(k) { return this.range = k, this.state = "cut", this; } isCopy() { return this.state === "copy"; } isCut() { return this.state === "cut"; } isClear() { return this.state === "clear"; } clear() { this.range = null, this.state = "clear"; } } class Pl { constructor(k, e, x) { this.ci = k, this.operator = e, this.value = x; } set(k, e) { this.operator = k, this.value = e; } includes(k) { const { operator: e, value: x } = this; return e === "all" ? !0 : e === "in" ? x.includes(k) : !1; } vlength() { const { operator: k, value: e } = this; return k === "in" ? e.length : 0; } getData() { const { ci: k, operator: e, value: x } = this; return { ci: k, operator: e, value: x }; } } class Al { constructor(k, e) { this.ci = k, this.order = e; } asc() { return this.order === "asc"; } desc() { return this.order === "desc"; } } class wm { constructor() { this.ref = null, this.filters = [], this.sort = null; } setData({ ref: k, filters: e, sort: x }) { k != null && (this.ref = k, this.filters = e.map((_) => new Pl(_.ci, _.operator, _.value)), x && (this.sort = new Al(x.ci, x.order))); } getData() { if (this.active()) { const { ref: k, filters: e, sort: x } = this; return { ref: k, filters: e.map((_) => _.getData()), sort: x }; } return {}; } addFilter(k, e, x) { const _ = this.getFilter(k); _ == null ? this.filters.push(new Pl(k, e, x)) : _.set(e, x); } setSort(k, e) { this.sort = e ? new Al(k, e) : null; } includes(k, e) { return this.active() ? this.hrange().includes(k, e) : !1; } getSort(k) { const { sort: e } = this; return e && e.ci === k ? e : null; } getFilter(k) { const { filters: e } = this; for (let x = 0; x < e.length; x += 1) if (e[x].ci === k) return e[x]; return null; } filteredRows(k) { const e = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(); if (this.active()) { const { sri: _, eri: u } = this.range(), { filters: m } = this; for (let g = _ + 1; g <= u; g += 1) for (let b = 0; b < m.length; b += 1) { const w = m[b], f = k(g, w.ci), y = f ? f.text : ""; if (w.includes(y)) x.add(g); else { e.add(g); break; } } } return { rset: e, fset: x }; } items(k, e) { const x = {}; if (this.active()) { const { sri: _, eri: u } = this.range(); for (let m = _ + 1; m <= u; m += 1) { const g = e(m, k); if (g !== null && !/^\s*$/.test(g.text)) { const b = g.text, w = (x[b] || 0) + 1; x[b] = w; } else x[""] = (x[""] || 0) + 1; } } return x; } range() { return kr.valueOf(this.ref); } hrange() { const k = this.range(); return k.eri = k.sri, k; } clear() { this.ref = null, this.filters = [], this.sort = null; } active() { return this.ref !== null; } } class xf { constructor(k = []) { this._ = k; } forEach(k) { this._.forEach(k); } deleteWithin(k) { this._ = this._.filter((e) => !e.within(k)); } getFirstIncludes(k, e) { for (let x = 0; x < this._.length; x += 1) { const _ = this._[x]; if (_.includes(k, e)) return _; } return null; } filterIntersects(k) { return new xf(this._.filter((e) => e.intersects(k))); } intersects(k) { for (let e = 0; e < this._.length; e += 1) if (this._[e].intersects(k)) return !0; return !1; } union(k) { let e = k; return this._.forEach((x) => { x.intersects(e) && (e = x.union(e)); }), e; } add(k) { this.deleteWithin(k), this._.push(k); } // type: row | column shift(k, e, x, _) { this._.forEach((u) => { const { sri: m, sci: g, eri: b, eci: w } = u, f = u; k === "row" ? m >= e ? (f.sri += x, f.eri += x) : m < e && e <= b && (f.eri += x, _(m, g, x, 0)) : k === "column" && (g >= e ? (f.sci += x, f.eci += x) : g < e && e <= w && (f.eci += x, _(m, g, 0, x))); }); } move(k, e, x) { this._.forEach((_) => { const u = _; u.within(k) && (u.eri += e, u.sri += e, u.sci += x, u.eci += x); }); } setData(k) { return this._ = k.map((e) => kr.valueOf(e)), this; } getData() { return this._.map((k) => k.toString()); } } function xm(H) { return JSON.parse(JSON.stringify(H)); } const hc = (H = {}, ...k) => (k.forEach((e) => { Object.keys(e).forEach((x) => { const _ = e[x]; typeof _ == "string" || typeof _ == "number" || typeof _ == "boolean" ? H[x] = _ : typeof _ != "function" && !Array.isArray(_) && _ instanceof Object ? (H[x] = H[x] || {}, hc(H[x], _)) : H[x] = _; }); }), H); function cf(H, k) { const e = Object.keys(H); if (e.length !== Object.keys(k).length) return !1; for (let x = 0; x < e.length; x += 1) { const _ = e[x], u = H[_], m = k[_]; if (m === void 0) return !1; if (typeof u == "string" || typeof u == "number" || typeof u == "boolean") { if (u !== m) return !1; } else if (Array.isArray(u)) { if (u.length !== m.length) return !1; for (let g = 0; g < u.length; g += 1) if (!cf(u[g], m[g])) return !1; } else if (typeof u != "function" && !Array.isArray(u) && u instanceof Object && !cf(u, m)) return !1; } return !0; } const Sm = (H, k = (e) => e) => { let e = 0, x = 0; return Object.keys(H).forEach((_) => { e += k(H[_], _), x += 1; }), [e, x]; }; function km(H, k) { const e = H[`${k}`]; return delete H[`${k}`], e; } function Om(H, k, e, x, _, u) { let m = e, g = x, b = H; for (; b < k && !(m > _); b += 1) g = u(b), m += g; return [b, m - g, g]; } function Em(H, k, e) { let x = 0; for (let _ = H; _ < k; _ += 1) x += e(_); return x; } function Tm(H, k, e) { for (let x = H; x < k; x += 1) e(x); } function Rm(H, k) { if (H.length === k.length) { for (let e = 0; e < H.length; e += 1) if (H[e] !== k[e]) return !1; } else return !1; return !0; } function qs(H) { const k = `${H}`; let e = 0, x = !1; for (let _ = 0; _ < k.length; _ += 1) x === !0 && (e += 1), k.charAt(_) === "." && (x = !0); return e; } function ji(H, k, e) { if (Number.isNaN(k) || Number.isNaN(e)) return k + H + e; const x = qs(k), _ = qs(e), u = Number(k), m = Number(e); let g = 0; if (H === "-") g = u - m; else if (H === "+") g = u + m; else if (H === "*") g = u * m; else if (H === "/") return g = u / m, qs(g) > 5 ? g.toFixed(2) : g; return g.toFixed(Math.max(x, _)); } const fn = { cloneDeep: xm, merge: (...H) => hc({}, ...H), equals: cf, arrayEquals: Rm, sum: Sm, rangeEach: Tm, rangeSum: Em, rangeReduceIf: Om, deleteProperty: km, numberCalc: ji }; class Cm { constructor({ len: k, height: e }) { this._ = {}, this.len = k, this.height = e; } getHeight(k) { if (this.isHide(k)) return 0; const e = this.get(k); return e && e.height ? e.height : this.height; } setHeight(k, e) { const x = this.getOrNew(k); x.height = e; } unhide(k) { let e = k; for (; e > 0 && (e -= 1, this.isHide(e)); ) this.setHide(e, !1); } isHide(k) { const e = this.get(k); return e && e.hide; } setHide(k, e) { const x = this.getOrNew(k); e === !0 ? x.hide = !0 : delete x.hide; } setStyle(k, e) { const x = this.getOrNew(k); x.style = e; } sumHeight(k, e, x) { return fn.rangeSum(k, e, (_) => x && x.has(_) ? 0 : this.getHeight(_)); } totalHeight() { return this.sumHeight(0, this.len); } get(k) { return this._[k]; } getOrNew(k) { return this._[k] = this._[k] || { cells: {} }, this._[k]; } getCell(k, e) { const x = this.get(k); return x !== void 0 && x.cells !== void 0 && x.cells[e] !== void 0 ? x.cells[e] : null; } getCellMerge(k, e) { const x = this.getCell(k, e); return x && x.merge ? x.merge : [0, 0]; } getCellOrNew(k, e) { const x = this.getOrNew(k); return x.cells[e] = x.cells[e] || {}, x.cells[e]; } // what: all | text | format setCell(k, e, x, _ = "all") { const u = this.getOrNew(k); _ === "all" ? u.cells[e] = x : _ === "text" ? (u.cells[e] = u.cells[e] || {}, u.cells[e].text = x.text) : _ === "format" && (u.cells[e] = u.cells[e] || {}, u.cells[e].style = x.style, x.merge && (u.cells[e].merge = x.merge)); } setCellText(k, e, x) { const _ = this.getCellOrNew(k, e); _.editable !== !1 && (_.text = x); } // what: all | format | text copyPaste(k, e, x, _ = !1, u = () => { }) { const { sri: m, sci: g, eri: b, eci: w } = k, f = e.sri, y = e.sci, h = e.eri, l = e.eci, [d, s] = k.size(), [v, c] = e.size(); let a = !0, r = 0; (h < m || l < g) && (a = !1, h < m ? r = v : r = c); for (let t = m; t <= b; t += 1) if (this._[t]) { for (let i = g; i <= w; i += 1) if (this._[t].cells && this._[t].cells[i]) for (let n = f; n <= h; n += d) for (let o = y; o <= l; o += s) { const p = n + (t - m), O = o + (i - g), P = fn.cloneDeep(this._[t].cells[i]); if (_ && P && P.text && P.text.length > 0) { const { text: F } = P; let z = o - y + (n - f) + 2; if (a || (z -= r + 1), F[0] === "=") P.text = F.replace(/[a-zA-Z]{1,3}\d+/g, (N) => { let [M, I] = [0, 0]; return m === f ? M = z - 1 : I = z - 1, /^\d+$/.test(N) ? N : Ha(N, M, I); }); else if (d <= 1 && s > 1 && (f > b || h < m) || s <= 1 && d > 1 && (y > w || l < g) || d <= 1 && s <= 1) { const N = /[\\.\d]+$/.exec(F); if (N !== null) { const M = Number(N[0]) + z - 1; P.text = F.substring(0, N.index) + M; } } } this.setCell(p, O, P, x), u(p, O, P); } } } cutPaste(k, e) { const x = {}; this.each((_) => { this.eachCells(_, (u) => { let m = parseInt(_, 10), g = parseInt(u, 10); k.includes(_, u) && (m = e.sri + (m - k.sri), g = e.sci + (g - k.sci)), x[m] = x[m] || { cells: {} }, x[m].cells[g] = this._[_].cells[u]; }); }), this._ = x; } // src: Array> paste(k, e) { if (k.length <= 0) return; const { sri: x, sci: _ } = e; k.forEach((u, m) => { const g = x + m; u.forEach((b, w) => { const f = _ + w; this.setCellText(g, f, b); }); }); } insert(k, e = 1) { const x = {}; this.each((_, u) => { let m = parseInt(_, 10); m >= k && (m += e, this.eachCells(_, (g, b) => { b.text && b.text[0] === "=" && (b.text = b.text.replace(/[a-zA-Z]{1,3}\d+/g, (w) => Ha(w, 0, e, (f, y) => y >= k))); })), x[m] = u; }), this._ = x, this.len += e; } delete(k, e) { const x = e - k + 1, _ = {}; this.each((u, m) => { const g = parseInt(u, 10); g < k ? _[g] = m : u > e && (_[g - x] = m, this.eachCells(u, (b, w) => { w.text && w.text[0] === "=" && (w.text = w.text.replace(/[a-zA-Z]{1,3}\d+/g, (f) => Ha(f, 0, -x, (y, h) => h > e))); })); }), this._ = _, this.len -= x; } insertColumn(k, e = 1) { this.each((x, _) => { const u = {}; this.eachCells(x, (m, g) => { let b = parseInt(m, 10); b >= k && (b += e, g.text && g.text[0] === "=" && (g.text = g.text.replace(/[a-zA-Z]{1,3}\d+/g, (w) => Ha(w, e, 0, (f) => f >= k)))), u[b] = g; }), _.cells = u; }); } deleteColumn(k, e) { const x = e - k + 1; this.each((_, u) => { const m = {}; this.eachCells(_, (g, b) => { const w = parseInt(g, 10); w < k ? m[w] = b : w > e && (m[w - x] = b, b.text && b.text[0] === "=" && (b.text = b.text.replace(/[a-zA-Z]{1,3}\d+/g, (f) => Ha(f, -x, 0, (y) => y > e)))); }), u.cells = m; }); } // what: all | text | format | merge deleteCells(k, e = "all") { k.each((x, _) => { this.deleteCell(x, _, e); }); } // what: all | text | format | merge deleteCell(k, e, x = "all") { const _ = this.get(k); if (_ !== null) { const u = this.getCell(k, e); u !== null && u.editable !== !1 && (x === "all" ? delete _.cells[e] : x === "text" ? (u.text && delete u.text, u.value && delete u.value) : x === "format" ? (u.style !== void 0 && delete u.style, u.merge && delete u.merge) : x === "merge" && u.merge && delete u.merge); } } maxCell() { const k = Object.keys(this._), e = k[k.length - 1], x = this._[e]; if (x) { const { cells: _ } = x, u = Object.keys(_), m = u[u.length - 1]; return [parseInt(e, 10), parseInt(m, 10)]; } return [0, 0]; } each(k) { Object.entries(this._).forEach(([e, x]) => { k(e, x); }); } eachCells(k, e) { this._[k] && this._[k].cells && Object.entries(this._[k].cells).forEach(([x, _]) => { e(x, _); }); } setData(k) { k.len && (this.len = k.len, delete k.len), this._ = k; } getData() { const { len: k } = this; return Object.assign({ len: k }, this._); } } class Pm { constructor({ len: k, width: e, indexWidth: x, minWidth: _ }) { this._ = {}, this.len = k, this.width = e, this.indexWidth = x, this.minWidth = _; } setData(k) { k.len && (this.len = k.len, delete k.len), this._ = k; } getData() { const { len: k } = this; return Object.assign({ len: k }, this._); } getWidth(k) { if (this.isHide(k)) return 0; const e = this._[k]; return e && e.width ? e.width : this.width; } getOrNew(k) { return this._[k] = this._[k] || {}, this._[k]; } setWidth(k, e) { const x = this.getOrNew(k); x.width = e; } unhide(k) { let e = k; for (; e > 0 && (e -= 1, this.isHide(e)); ) this.setHide(e, !1); } isHide(k) { const e = this._[k]; return e && e.hide; } setHide(k, e) { const x = this.getOrNew(k); e === !0 ? x.hide = !0 : delete x.hide; } setStyle(k, e) { const x = this.getOrNew(k); x.style = e; } sumWidth(k, e) { return fn.rangeSum(k, e, (x) => this.getWidth(x)); } totalWidth() { return this.sumWidth(0, this.len); } } const Am = { toolbar: { undo: "Undo", redo: "Redo", print: "Print", paintformat: "Paint format", clearformat: "Clear format", format: "Format", fontName: "Font", fontSize: "Font size", fontBold: "Font bold", fontItalic: "Font italic", underline: "Underline", strike: "Strike", color: "Text color", bgcolor: "Fill color", border: "Borders", merge: "Merge cells", align: "Horizontal align", valign: "Vertical align", textwrap: "Text wrapping", freeze: "Freeze cell", autofilter: "Filter", formula: "Functions", more: "More" }, contextmenu: { copy: "Copy", cut: "Cut", paste: "Paste", pasteValue: "Paste values only", pasteFormat: "Paste format only", hide: "Hide", insertRow: "Insert row", insertColumn: "Insert column", deleteSheet: "Delete", deleteRow: "Delete row", deleteColumn: "Delete column", deleteCell: "Delete cell", deleteCellText: "Delete cell text", validation: "Data validations", cellprintable: "Enable export", cellnonprintable: "Disable export", celleditable: "Enable editing", cellnoneditable: "Disable editing" }, print: { size: "Paper size", orientation: "Page orientation", orientations: ["Landscape", "Portrait"] }, format: { normal: "Normal", text: "Plain Text", number: "Number", percent: "Percent", rmb: "RMB", usd: "USD", eur: "EUR", date: "Date", time: "Time", datetime: "Date time", duration: "Duration" }, formula: { sum: "Sum", average: "Average", max: "Max", min: "Min", _if: "IF", and: "AND", or: "OR", concat: "Concat" }, validation: { required: "it must be required", notMatch: "it not match its validation rule", between: "it is between {} and {}", notBetween: "it is not between {} and {}", notIn: "it is not in list", equal: "it equal to {}", notEqual: "it not equal to {}", lessThan: "it less than {}", lessThanEqual: "it less than or equal to {}", greaterThan: "it greater than {}", greaterThanEqual: "it greater than or equal to {}" }, error: { pasteForMergedCell: "Unable to do this for merged cells" }, calendar: { weeks: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] }, button: { next: "Next", cancel: "Cancel", remove: "Remove", save: "Save", ok: "OK" }, sort: { desc: "Sort Z -> A", asc: "Sort A -> Z" }, filter: { empty: "empty" }, dataValidation: { mode: "Mode", range: "Cell Range", criteria: "Criteria", modeType: { cell: "Cell", column: "Colun", row: "Row" }, type: { list: "List", number: "Number", date: "Date", phone: "Phone", email: "Email" }, operator: { be: "between", nbe: "not betwwen", lt: "less than", lte: "less than or equal to", gt: "greater than", gte: "greater than or equal to", eq: "equal to", neq: "not equal to" } } }; let hf = ["en"]; const dc = { en: Am }; function Ml(H, k) { if (k) for (const e of hf) { if (!k[e]) break; let x = k[e]; const _ = H.match(/(?:\\.|[^.])+/g); for (let u = 0; u < _.length; u += 1) { const m = _[u], g = x[m]; if (!g) break; if (u === _.length - 1) return g; x = g; } } } function Cr(H) { let k = Ml(H, dc); return !k && window && window.x_spreadsheet && window.x_spreadsheet.$messages && (k = Ml(H, window.x_spreadsheet.$messages)), k || ""; } function Jt(H) { return () => Cr(H); } function pc(H, k, e = !1) { e ? hf = [H] : hf.unshift(H), k && (dc[H] = k); } const Il = { phone: /^[1-9]\d{10}$/, email: /w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/ }; function Un(H, k, ...e) { let x = ""; return H || (x = Cr(`validation.${k}`, ...e)), [H, x]; } class yc { // operator: b|nb|eq|neq|lt|lte|gt|gte // type: date|number|list|phone|email constructor(k, e, x, _) { this.required = e, this.value = x, this.type = k, this.operator = _, this.message = ""; } parseValue(k) { const { type: e } = this; return e === "date" ? new Date(k) : e === "number" ? Number(k) : k; } equals(k) { let e = this.type === k.type && this.required === k.required && this.operator === k.operator; return e && (Array.isArray(this.value) ? e = fn.arrayEquals(this.value, k.value) : e = this.value === k.value), e; } values() { return this.value.split(","); } validate(k) { const { required: e, operator: x, value: _, type: u } = this; if (e && /^\s*$/.test(k)) return Un(!1, "required"); if (/^\s*$/.test(k)) return [!0]; if (Il[u] && !Il[u].test(k)) return Un(!1, "notMatch"); if (u === "list") return Un(this.values().includes(k), "notIn"); if (x) { const m = this.parseValue(k); if (x === "be") { const [g, b] = _; return Un( m >= this.parseValue(g) && m <= this.parseValue(b), "between", g, b ); } if (x === "nbe") { const [g, b] = _; return Un( m < this.parseValue(g) || m > this.parseValue(b), "notBetween", g, b ); } if (x === "eq") return Un( m === this.parseValue(_), "equal", _ ); if (x === "neq") return Un( m !== this.parseValue(_), "notEqual", _ ); if (x === "lt") return Un( m < this.parseValue(_), "lessThan", _ ); if (x === "lte") return Un( m <= this.parseValue(_), "lessThanEqual", _ ); if (x === "gt") return Un( m > this.parseValue(_), "greaterThan", _ ); if (x === "gte") return Un( m >= this.parseValue(_), "greaterThanEqual", _ ); } return [!0]; } } class Ko { constructor(k, e, x) { this.refs = e, this.mode = k, this.validator = x; } includes(k, e) { const { refs: x } = this; for (let _ = 0; _ < x.length; _ += 1) if (kr.valueOf(x[_]).includes(k, e)) return !0; return !1; } addRef(k) { this.remove(kr.valueOf(k)), this.refs.push(k); } remove(k) { const e = []; this.refs.forEach((x) => { const _ = kr.valueOf(x); _.intersects(k) ? _.difference(k).forEach((m) => e.push(m.toString())) : e.push(x); }), this.refs = e; } getData() { const { refs: k, mode: e, validator: x } = this, { type: _, required: u, operator: m, value: g } = x; return { refs: k, mode: e, type: _, required: u, operator: m, value: g }; } static valueOf({ refs: k, mode: e, type: x, required: _, operator: u, value: m }) { return new Ko(e, k, new yc(x, _, m, u)); } } class Mm { constructor() { this._ = [], this.errors = /* @__PURE__ */ new Map(); } getError(k, e) { return this.errors.get(`${k}_${e}`); } validate(k, e, x) { const _ = this.get(k, e), u = `${k}_${e}`, { errors: m } = this; if (_ !== null) { const [g, b] = _.validator.validate(x); g ? m.delete(u) : m.set(u, b); } else m.delete(u); return !0; } // type: date|number|phone|email|list // validator: { required, value, operator } add(k, e, { type: x, required: _, value: u, operator: m }) { const g = new yc( x, _, u, m ), b = this.getByValidator(g); b !== null ? b.addRef(e) : this._.push(new Ko(k, [e], g)); } getByValidator(k) { for (let e = 0; e < this._.length; e += 1) { const x = this._[e]; if (x.validator.equals(k)) return x; } return null; } get(k, e) { for (let x = 0; x < this._.length; x += 1) { const _ = this._[x]; if (_.includes(k, e)) return _; } return null; } remove(k) { this.each((e) => { e.remove(k); }); } each(k) { this._.forEach((e) => k(e)); } getData() { return this._.filter((k) => k.refs.length > 0).map((k) => k.getData()); } setData(k) { this._ = k.map((e) => Ko.valueOf(e)); } } const Im = { mode: "edit", // edit | read view: { height: () => document.documentElement.clientHeight, width: () => document.documentElement.clientWidth }, showGrid: !0, showToolbar: !0, showContextmenu: !0, showBottomBar: !0, row: { len: 100, height: 25 }, col: { len: 26, width: 100, indexWidth: 60, minWidth: 60 }, style: { bgcolor: "#ffffff", align: "left", valign: "middle", textwrap: !1, strike: !1, underline: !1, color: "#0a0a0a", font: { name: "Arial", size: 10, bold: !1, italic: !1 }, format: "normal" } }, Dm = 41, Nm = 41, Dl = (H, k) => Object.prototype.hasOwnProperty.call(H, k); function Nl(H, k, e = () => { }) { const { merges: x } = this, _ = k.clone(), [u, m] = H.size(), [g, b] = k.size(); return u > g && (_.eri = k.sri + u - 1), m > b && (_.eci = k.sci + m - 1), x.intersects(_) ? (e(Cr("error.pasteForMergedCell")), !1) : !0; } function Fl(H, k, e, x = !1) { const { rows: _, merges: u } = this; (e === "all" || e === "format") && (_.deleteCells(k, e), u.deleteWithin(k)), _.copyPaste(H, k, e, x, (m, g, b) => { if (b && b.merge) { const [w, f] = b.merge; if (w <= 0 && f <= 0) return; u.add(new kr(m, g, m + w, g + f)); } }); } function Fm(H, k) { const { clipboard: e, rows: x, merges: _ } = this; x.cutPaste(H, k), _.move( H, k.sri - H.sri, k.sci - H.sci ), e.clear(); } function pa(H, k, e) { const { styles: x, rows: _ } = this, u = _.getCellOrNew(H, k); let m = {}; u.style !== void 0 && (m = fn.cloneDeep(x[u.style])), m = fn.merge(m, { border: e }), u.style = this.addStyle(m); } function Bm({ mode: H, style: k, color: e }) { const { styles: x, selector: _, rows: u } = this, { sri: m, sci: g, eri: b, eci: w } = _.range, f = !this.isSignleSelected(); if (!(!f && (H === "inside" || H === "horizontal" || H === "vertical"))) { if (H === "outside" && !f) pa.call(this, m, g, { top: [k, e], bottom: [k, e], left: [k, e], right: [k, e] }); else if (H === "none") _.range.each((y, h) => { const l = u.getCell(y, h); if (l && l.style !== void 0) { const d = fn.cloneDeep(x[l.style]); delete d.border, l.style = this.addStyle(d); } }); else if (H === "all" || H === "inside" || H === "outside" || H === "horizontal" || H === "vertical") { const y = []; for (let h = m; h <= b; h += 1) for (let l = g; l <= w; l += 1) { const d = []; for (let i = 0; i < y.length; i += 1) { const [n, o, p, O] = y[i]; if (h === n + p + 1 && d.push(i), n <= h && h <= n + p && l === o) { l += O + 1; break; } } if (d.forEach((i) => y.splice(i, 1)), l > w) break; const s = u.getCell(h, l); let [v, c] = [0, 0]; s && s.merge && ([v, c] = s.merge, y.push([h, l, v, c])); const a = v > 0 && h + v === b, r = c > 0 && l + c === w; let t = {}; H === "all" ? t = { bottom: [k, e], top: [k, e], left: [k, e], right: [k, e] } : H === "inside" ? (!r && l < w && (t.right = [k, e]), !a && h < b && (t.bottom = [k, e])) : H === "horizontal" ? !a && h < b && (t.bottom = [k, e]) : H === "vertical" ? !r && l < w && (t.right = [k, e]) : H === "outside" && f && (m === h && (t.top = [k, e]), (a || b === h) && (t.bottom = [k, e]), g === l && (t.left = [k, e]), (r || w === l) && (t.right = [k, e])), Object.keys(t).length > 0 && pa.call(this, h, l, t), l += c; } } else if (H === "top" || H === "bottom") for (let y = g; y <= w; y += 1) H === "top" && (pa.call(this, m, y, { top: [k, e] }), y += u.getCellMerge(m, y)[1]), H === "bottom" && (pa.call(this, b, y, { bottom: [k, e] }), y += u.getCellMerge(b, y)[1]); else if (H === "left" || H === "right") for (let y = m; y <= b; y += 1) H === "left" && (pa.call(this, y, g, { left: [k, e] }), y += u.getCellMerge(y, g)[0]), H === "right" && (pa.call(this, y, w, { right: [k, e] }), y += u.getCellMerge(y, w)[0]); } } function jm(H, k) { const { rows: e } = this, x = this.freezeTotalHeight(); let _ = e.height; x + e.height < H && (_ -= k); const u = this.exceptRowSet; let m = 0, g = _, { height: b } = e; for (; m < e.len && !(g > H); m += 1) u.has(m) || (b = e.getHeight(m), g += b); return g -= b, g <= 0 ? { ri: -1, top: 0, height: b } : { ri: m - 1, top: g, height: b }; } function Lm(H, k) { const { cols: e } = this, x = this.freezeTotalWidth(); let _ = e.indexWidth; x + e.indexWidth < H && (_ -= k); const [u, m, g] = fn.rangeReduceIf( 0, e.len, _, e.indexWidth, H, (b) => e.getWidth(b) ); return m <= 0 ? { ci: -1, left: 0, width: e.indexWidth } : { ci: u - 1, left: m, width: g }; } class zm { constructor(k, e) { this.settings = fn.merge(Im, e || {}), this.name = k || "sheet", this.freeze = [0, 0], this.styles = [], this.merges = new xf(), this.rows = new Cm(this.settings.row), this.cols = new Pm(this.settings.col), this.validations = new Mm(), this.hyperlinks = {}, this.comments = {}, this.selector = new mm(), this.scroll = new bm(), this.history = new gm(), this.clipboard = new _m(), this.autoFilter = new wm(), this.change = () => { }, this.exceptRowSet = /* @__PURE__ */ new Set(), this.sortedRowMap = /* @__PURE__ */ new Map(), this.unsortedRowMap = /* @__PURE__ */ new Map(); } addValidation(k, e, x) { this.changeData(() => { this.validations.add(k, e, x); }); } removeValidation() { const { range: k } = this.selector; this.changeData(() => { this.validations.remove(k); }); } getSelectedValidator() { const { ri: k, ci: e } = this.selector, x = this.validations.get(k, e); return x ? x.validator : null; } getSelectedValidation() { const { ri: k, ci: e, range: x } = this.selector, _ = this.validations.get(k, e), u = { ref: x.toString() }; return _ !== null && (u.mode = _.mode, u.validator = _.validator), u; } canUndo() { return this.history.canUndo(); } canRedo() { return this.history.canRedo(); } undo() { this.history.undo(this.getData(), (k) => { this.setData(k); }); } redo() { this.history.redo(this.getData(), (k) => { this.setData(k); }); } copy() { this.clipboard.copy(this.selector.range); } copyToSystemClipboard() { if (navigator.clipboard === void 0) return; let k = ""; const e = this.rows.getData(); for (let x = this.selector.range.sri; x <= this.selector.range.eri; x += 1) { if (Dl(e, x)) { for (let _ = this.selector.range.sci; _ <= this.selector.range.eci; _ += 1) if (_ > this.selector.range.sci && (k += " "), Dl(e[x].cells, _)) { const u = String(e[x].cells[_].text); u.indexOf(` `) === -1 && u.indexOf(" ") === -1 && u.indexOf('"') === -1 ? k += u : k += `"${u}"`; } } else for (let _ = this.selector.range.sci; _ <= this.selector.range.eci; _ += 1) k += " "; k += ` `; } navigator.clipboard.writeText(k).then(() => { }, (x) => { console.log("text copy to the system clipboard error ", k, x); }); } cut() { this.clipboard.cut(this.selector.range); } // what: all | text | format paste(k = "all", e = () => { }) { const { clipboard: x, selector: _ } = this; return x.isClear() || !Nl.call(this, x.range, _.range, e) ? !1 : (this.changeData(() => { x.isCopy() ? Fl.call(this, x.range, _.range, k) : x.isCut() && Fm.call(this, x.range, _.range); }), !0); } pasteFromText(k) { const e = k.split(`\r `).map((u) => u.replace(/"/g, "").split(" ")); e.length > 0 && (e.length -= 1); const { rows: x, selector: _ } = this; this.changeData(() => { x.paste(e, _.range); }); } autofill(k, e, x = () => { }) { const _ = this.selector.range; return Nl.call(this, _, k, x) ? (this.changeData(() => { Fl.call(this, _, k, e, !0); }), !0) : !1; } clearClipboard() { this.clipboard.clear(); } calSelectedRangeByEnd(k, e) { const { selector: x, rows: _, cols: u, merges: m } = this; let { sri: g, sci: b, eri: w, eci: f } = x.range; const y = x.ri, h = x.ci; let [l, d] = [k, e]; return k < 0 && (l = _.len - 1), e < 0 && (d = u.len - 1), l > y ? [g, w] = [y, l] : [g, w] = [l, y], d > h ? [b, f] = [h, d] : [b, f] = [d, h], x.range = m.union(new kr( g, b, w, f )), x.range = m.union(x.range), x.range; } calSelectedRangeByStart(k, e) { const { selector: x, rows: _, cols: u, merges: m } = this; let g = m.getFirstIncludes(k, e); return g === null && (g = new kr(k, e, k, e), k === -1 && (g.sri = 0, g.eri = _.len - 1), e === -1 && (g.sci = 0, g.eci = u.len - 1)), x.range = g, g; } setSelectedCellAttr(k, e) { this.changeData(() => { const { selector: x, styles: _, rows: u } = this; if (k === "merge") e ? this.merge() : this.unmerge(); else if (k === "border") Bm.call(this, e); else if (k === "formula") { const { ri: m, ci: g, range: b } = x; if (x.multiple()) { const [w, f] = x.size(), { sri: y, sci: h, eri: l, eci: d } = b; if (w > 1) for (let s = h; s <= d; s += 1) { const v = u.getCellOrNew(l + 1, s); v.text = `=${e}(${hi(s, y)}:${hi(s, l)})`; } else if (f > 1) { const s = u.getCellOrNew(m, d + 1); s.text = `=${e}(${hi(h, m)}:${hi(d, m)})`; } } else { const w = u.getCellOrNew(m, g); w.text = `=${e}()`; } } else x.range.each((m, g) => { const b = u.getCellOrNew(m, g); let w = {}; if (b.style !== void 0 && (w = fn.cloneDeep(_[b.style])), k === "format") w.format = e, b.style = this.addStyle(w); else if (k === "font-bold" || k === "font-italic" || k === "font-name" || k === "font-size") { const f = {}; f[k.split("-")[1]] = e, w.font = Object.assign(w.font || {}, f), b.style = this.addStyle(w); } else k === "strike" || k === "textwrap" || k === "underline" || k === "align" || k === "valign" || k === "color" || k === "bgcolor" ? (w[k] = e, b.style = this.addStyle(w)) : b[k] = e; }); }); } // state: input | finished setSelectedCellText(k, e = "input") { const { autoFilter: x, selector: _, rows: u } = this, { ri: m, ci: g } = _; let b = m; this.unsortedRowMap.has(m) && (b = this.unsortedRowMap.get(m)); const w = u.getCell(b, g), f = w ? w.text : ""; if (this.setCellText(b, g, k, e), x.active()) { const y = x.getFilter(g); if (y) { const h = y.value.findIndex((l) => l === f); h >= 0 && y.value.splice(h, 1, k); } } } getSelectedCell() { const { ri: k, ci: e } = this.selector; let x = k; return this.unsortedRowMap.has(k) && (x = this.unsortedRowMap.get(k)), this.rows.getCell(x, e); } xyInSelectedRect(k, e) { const { left: x, top: _, width: u, height: m } = this.getSelectedRect(), g = k - this.cols.indexWidth, b = e - this.rows.height; return g > x && g < x + u && b > _ && b < _ + m; } getSelectedRect() { return this.getRect(this.selector.range); } getClipboardRect() { const { clipboard: k } = this; return k.isClear() ? { left: -100, top: -100 } : this.getRect(k.range); } getRect(k) { const { scroll: e, rows: x, cols: _, exceptRowSet: u } = this, { sri: m, sci: g, eri: b, eci: w } = k; if (m < 0 && g < 0) return { left: 0, l: 0, top: 0, t: 0, scroll: e }; const f = _.sumWidth(0, g), y = x.sumHeight(0, m, u), h = x.sumHeight(m, b + 1, u), l = _.sumWidth(g, w + 1); let d = f - e.x, s = y - e.y; const v = this.freezeTotalHeight(), c = this.freezeTotalWidth(); return c > 0 && c > f && (d = f), v > 0 && v > y && (s = y), { l: f, t: y, left: d, top: s, height: h, width: l, scroll: e }; } getCellRectByXY(k, e) { const { scroll: x, merges: _, rows: u, cols: m } = this; let { ri: g, top: b, height: w } = jm.call(this, e, x.y), { ci: f, left: y, width: h } = Lm.call(this, k, x.x); if (f === -1 && (h = m.totalWidth()), g === -1 && (w = u.totalHeight()), g >= 0 || f >= 0) { const l = _.getFirstIncludes(g, f); l && (g = l.sri, f = l.sci, { left: y, top: b, width: h, height: w } = this.cellRect(g, f)); } return { ri: g, ci: f, left: y, top: b, width: h, height: w }; } isSignleSelected() { const { sri: k, sci: e, eri: x, eci: _ } = this.selector.range, u = this.getCell(k, e); if (u && u.merge) { const [m, g] = u.merge; if (k + m === x && e + g === _) return !0; } return !this.selector.multiple(); } canUnmerge() { const { sri: k, sci: e, eri: x, eci: _ } = this.selector.range, u = this.getCell(k, e); if (u && u.merge) { const [m, g] = u.merge; if (k + m === x && e + g === _) return !0; } return !1; } merge() { const { selector: k, rows: e } = this; if (this.isSignleSelected()) return; const [x, _] = k.size(); if (x > 1 || _ > 1) { const { sri: u, sci: m } = k.range; this.changeData(() => { const g = e.getCellOrNew(u, m); g.merge = [x - 1, _ - 1], this.merges.add(k.range), this.rows.deleteCells(k.range), this.rows.setCell(u, m, g); }); } } unmerge() { const { selector: k } = this; if (!this.isSignleSelected()) return; const { sri: e, sci: x } = k.range; this.changeData(() => { this.rows.deleteCell(e, x, "merge"), this.merges.deleteWithin(k.range); }); } canAutofilter() { return !this.autoFilter.active(); } autofilter() { const { autoFilter: k, selector: e } = this; this.changeData(() => { k.active() ? (k.clear(), this.exceptRowSet = /* @__PURE__ */ new Set(), this.sortedRowMap = /* @__PURE__ */ new Map(), this.unsortedRowMap = /* @__PURE__ */ new Map()) : k.ref = e.range.toString(); }); } setAutoFilter(k, e, x, _) { const { autoFilter: u } = this; u.addFilter(k, x, _), u.setSort(k, e), this.resetAutoFilter(); } resetAutoFilter() { const { autoFilter: k, rows: e } = this; if (!k.active()) return; const { sort: x } = k, { rset: _, fset: u } = k.filteredRows((b, w) => e.getCell(b, w)), m = Array.from(u), g = Array.from(u); x && m.sort((b, w) => x.order === "asc" ? b - w : x.order === "desc" ? w - b : 0), this.exceptRowSet = _, this.sortedRowMap = /* @__PURE__ */ new Map(), this.unsortedRowMap = /* @__PURE__ */ new Map(), m.forEach((b, w) => { this.sortedRowMap.set(g[w], b), this.unsortedRowMap.set(b, g[w]); }); } deleteCell(k = "all") { const { selector: e } = this; this.changeData(() => { this.rows.deleteCells(e.range, k), (k === "all" || k === "format") && this.merges.deleteWithin(e.range); }); } // type: row | column insert(k, e = 1) { this.changeData(() => { const { sri: x, sci: _ } = this.selector.range, { rows: u, merges: m, cols: g } = this; let b = x; k === "row" ? u.insert(x, e) : k === "column" && (u.insertColumn(_, e), b = _, g.len += 1), m.shift(k, b, e, (w, f, y, h) => { const l = u.getCell(w, f); l.merge[0] += y, l.merge[1] += h; }); }); } // type: row | column delete(k) { this.changeData(() => { const { rows: e, merges: x, selector: _, cols: u } = this, { range: m } = _, { sri: g, sci: b, eri: w, eci: f } = _.range, [y, h] = _.range.size(); let l = g, d = y; k === "row" ? e.delete(g, w) : k === "column" && (e.deleteColumn(b, f), l = m.sci, d = h, u.len -= 1), x.shift(k, l, -d, (s, v, c, a) => { const r = e.getCell(s, v); r.merge[0] += c, r.merge[1] += a, r.merge[0] === 0 && r.merge[1] === 0 && delete r.merge; }); }); } scrollx(k, e) { const { scroll: x, freeze: _, cols: u } = this, [, m] = _, [ g, b, w ] = fn.rangeReduceIf(m, u.len, 0, 0, k, (y) => u.getWidth(y)); let f = b; k > 0 && (f += w), x.x !== f && (x.ci = k > 0 ? g : 0, x.x = f, e()); } scrolly(k, e) { const { scroll: x, freeze: _, rows: u } = this, [m] = _, [ g, b, w ] = fn.rangeReduceIf(m, u.len, 0, 0, k, (y) => u.getHeight(y)); let f = b; k > 0 && (f += w), x.y !== f && (x.ri = k > 0 ? g : 0, x.y = f, e()); } cellRect(k, e) { const { rows: x, cols: _ } = this, u = _.sumWidth(0, e), m = x.sumHeight(0, k), g = x.getCell(k, e); let b = _.getWidth(e), w = x.getHeight(k); if (g !== null && g.merge) { const [f, y] = g.merge; if (f > 0) for (let h = 1; h <= f; h += 1) w += x.getHeight(k + h); if (y > 0) for (let h = 1; h <= y; h += 1) b += _.getWidth(e + h); } return { left: u, top: m, width: b, height: w, cell: g }; } getCell(k, e) { return this.rows.getCell(k, e); } getCellTextOrDefault(k, e) { const x = this.getCell(k, e); return x && x.text ? x.text : ""; } getCellStyle(k, e) { const x = this.getCell(k, e); return x && x.style !== void 0 ? this.styles[x.style] : null; } getCellStyleOrDefault(k, e) { const { styles: x, rows: _ } = this, u = _.getCell(k, e), m = u && u.style !== void 0 ? x[u.style] : {}; return fn.merge(this.defaultStyle(), m); } getSelectedCellStyle() { const { ri: k, ci: e } = this.selector; return this.getCellStyleOrDefault(k, e); } // state: input | finished setCellText(k, e, x, _) { const { rows: u, history: m, validations: g } = this; _ === "finished" ? (u.setCellText(k, e, ""), m.add(this.getData()), u.setCellText(k, e, x)) : (u.setCellText(k, e, x), this.change(this.getData())), g.validate(k, e, x); } freezeIsActive() { const [k, e] = this.freeze; return k > 0 || e > 0; } setFreeze(k, e) { this.changeData(() => { this.freeze = [k, e]; }); } freezeTotalWidth() { return this.cols.sumWidth(0, this.freeze[1]); } freezeTotalHeight() { return this.rows.sumHeight(0, this.freeze[0]); } setRowHeight(k, e) { this.changeData(() => { this.rows.setHeight(k, e); }); } setColWidth(k, e) { this.changeData(() => { this.cols.setWidth(k, e); }); } viewHeight() { const { view: k, showToolbar: e, showBottomBar: x } = this.settings; let _ = k.height(); return x && (_ -= Nm), e && (_ -= Dm), _; } viewWidth() { return this.settings.view.width(); } freezeViewRange() { const [k, e] = this.freeze; return new kr(0, 0, k - 1, e - 1, this.freezeTotalWidth(), this.freezeTotalHeight()); } contentRange() { const { rows: k, cols: e } = this, [x, _] = k.maxCell(), u = k.sumHeight(0, x + 1), m = e.sumWidth(0, _ + 1); return new kr(0, 0, x, _, m, u); } exceptRowTotalHeight(k, e) { const { exceptRowSet: x, rows: _ } = this, u = Array.from(x); let m = 0; return u.forEach((g) => { if (g < k || g > e) { const b = _.getHeight(g); m += b; } }), m; } viewRange() { const { scroll: k, rows: e, cols: x, freeze: _, exceptRowSet: u } = this; let { ri: m, ci: g } = k; m <= 0 && ([m] = _), g <= 0 && ([, g] = _); let [b, w] = [0, 0], [f, y] = [e.len, x.len]; for (let h = m; h < e.len && (u.has(h) || (w += e.getHeight(h), f = h), !(w > this.viewHeight())); h += 1) ; for (let h = g; h < x.len && (b += x.getWidth(h), y = h, !(b > this.viewWidth())); h += 1) ; return new kr(m, g, f, y, b, w); } eachMergesInView(k, e) { this.merges.filterIntersects(k).forEach((x) => e(x)); } hideRowsOrCols() { const { rows: k, cols: e, selector: x } = this, [_, u] = x.size(), { sri: m, sci: g, eri: b, eci: w } = x.range; if (_ === k.len) for (let f = g; f <= w; f += 1) e.setHide(f, !0); else if (u === e.len) for (let f = m; f <= b; f += 1) k.setHide(f, !0); } // type: row | col // index row-index | col-index unhideRowsOrCols(k, e) { this[`${k}s`].unhide(e); } rowEach(k, e, x) { let _ = 0; const { rows: u } = this, m = this.exceptRowSet, g = [...m]; let b = 0; for (let w = 0; w < g.length; w += 1) g[w] < k && (b += 1); for (let w = k + b; w <= e + b; w += 1) if (m.has(w)) b += 1; else { const f = u.getHeight(w); if (f > 0 && (x(w, _, f), _ += f, _ > this.viewHeight())) break; } } colEach(k, e, x) { let _ = 0; const { cols: u } = this; for (let m = k; m <= e; m += 1) { const g = u.getWidth(m); if (g > 0 && (x(m, _, g), _ += g, _ > this.viewWidth())) break; } } defaultStyle() { return this.settings.style; } addStyle(k) { const { styles: e } = this; for (let x = 0; x < e.length; x += 1) { const _ = e[x]; if (fn.equals(_, k)) return x; } return e.push(k), e.length - 1; } changeData(k) { this.history.add(this.getData()), k(), this.change(this.getData()); } setData(k) { return Object.keys(k).forEach((e) => { if (e === "merges" || e === "rows" || e === "cols" || e === "validations") this[e].setData(k[e]); else if (e === "freeze") { const [x, _] = Ti(k[e]); this.freeze = [_, x]; } else e === "autofilter" ? this.autoFilter.setData(k[e]) : k[e] !== void 0 && (this[e] = k[e]); }), this; } getData() { const { name: k, freeze: e, styles: x, merges: _, rows: u, cols: m, validations: g, autoFilter: b } = this; return { name: k, freeze: hi(e[1], e[0]), styles: x, merges: _.getData(), rows: u.getData(), cols: m.getData(), validations: g.getData(), autofilter: b.getData() }; } } function ln(H, k, e) { H.addEventListener(k, e); } function Go(H, k, e) { H.removeEventListener(k, e); } function _a(H) { H.xclickoutside && (Go(window.document.body, "click", H.xclickoutside), delete H.xclickoutside); } function Va(H, k) { H.xclickoutside = (e) => { e.detail === 2 || H.contains(e.target) || (k ? k(H) : (H.hide(), _a(H))); }, ln(window.document.body, "click", H.xclickoutside); } function vc(H, k, e) { ln(H, "mousemove", k); const x = H; x.xEvtUp = (_) => { Go(H, "mousemove", k), Go(H, "mouseup", H.xEvtUp), e(_); }, ln(H, "mouseup", H.xEvtUp); } function Bl(H, k, e, x) { let _ = ""; Math.abs(H) > Math.abs(k) ? (_ = H > 0 ? "right" : "left", x(_, H, e)) : (_ = k > 0 ? "down" : "up", x(_, k, e)); } function Hm(H, { move: k, end: e }) { let x = 0, _ = 0; ln(H, "touchstart", (u) => { const { pageX: m, pageY: g } = u.touches[0]; x = m, _ = g; }), ln(H, "touchmove", (u) => { if (!k) return; const { pageX: m, pageY: g } = u.changedTouches[0], b = m - x, w = g - _; (Math.abs(b) > 10 || Math.abs(w) > 10) && (Bl(b, w, u, k), x = m, _ = g), u.preventDefault(); }), ln(H, "touchend", (u) => { if (!e) return; const { pageX: m, pageY: g } = u.changedTouches[0], b = m - x, w = g - _; Bl(b, w, u, e); }); } function Xm() { const H = /* @__PURE__ */ new Map(); function k(m, g) { const b = () => { const f = H.get(m); return Array.isArray(f) && f.push(g) || !1; }, w = () => H.set(m, [].concat(g)); return H.has(m) && b() || w(); } function e(m, g) { const b = () => { const w = H.get(m); for (const f of w) f.call(null, ...g); }; return H.has(m) && b(); } function x(m, g) { const b = () => { const w = H.get(m), f = w.indexOf(g); return f >= 0 && w.splice(f, 1) && H.get(m).length === 0 && H.delete(m); }; return H.has(m) && b(); } function _(m, g) { const b = (...w) => { g.call(null, ...w), x(m, b); }; return k(m, b); } function u() { H.clear(); } return { get current() { return H; }, on: k, once: _, fire: e, removeListener: x, removeAllListeners: u }; } const lt = "x-spreadsheet"; class jl { constructor(k = !1, e) { this.moving = !1, this.vertical = k, this.el = $e("div", `${lt}-resizer ${k ? "vertical" : "horizontal"}`).children( this.unhideHoverEl = $e("div", `${lt}-resizer-hover`).on("dblclick.stop", (x) => this.mousedblclickHandler(x)).css("position", "absolute").hide(), this.hoverEl = $e("div", `${lt}-resizer-hover`).on("mousedown.stop", (x) => this.mousedownHandler(x)), this.lineEl = $e("div", `${lt}-resizer-line`).hide() ).hide(), this.cRect = null, this.finishedFn = null, this.minDistance = e, this.unhideFn = () => { }; } showUnhide(k) { this.unhideIndex = k, this.unhideHoverEl.show(); } hideUnhide() { this.unhideHoverEl.hide(); } // rect : {top, left, width, height} // line : {width, height} show(k, e) { const { moving: x, vertical: _, hoverEl: u, lineEl: m, el: g, unhideHoverEl: b } = this; if (x) return; this.cRect = k; const { left: w, top: f, width: y, height: h } = k; g.offset({ left: _ ? w + y - 5 : w, top: _ ? f : f + h - 5 }).show(), u.offset({ width: _ ? 5 : y, height: _ ? h : 5 }), m.offset({ width: _ ? 0 : e.width, height: _ ? e.height : 0 }), b.offset({ left: _ ? 5 - y : w, top: _ ? f : 5 - h, width: _ ? 5 : y, height: _ ? h : 5 }); } hide() { this.el.offset({ left: 0, top: 0 }).hide(), this.hideUnhide(); } mousedblclickHandler() { this.unhideIndex && this.unhideFn(this.unhideIndex); } mousedownHandler(k) { let e = k; const { el: x, lineEl: _, cRect: u, vertical: m, minDistance: g } = this; let b = m ? u.width : u.height; _.show(), vc(window, (w) => { this.moving = !0, e !== null && w.buttons === 1 && (m ? (b += w.movementX, b > g && x.css("left", `${u.left + b}px`)) : (b += w.movementY, b > g && x.css("top", `${u.top + b}px`)), e = w); }, () => { e = null, _.hide(), this.moving = !1, this.hide(), this.finishedFn && (b < g && (b = g), this.finishedFn(u, b)); }); } } class Ll { constructor(k) { this.vertical = k, this.moveFn = null, this.el = $e("div", `${lt}-scrollbar ${k ? "vertical" : "horizontal"}`).child(this.contentEl = $e("div", "")).on("mousemove.stop", () => { }).on("scroll.stop", (e) => { const { scrollTop: x, scrollLeft: _ } = e.target; this.moveFn && this.moveFn(this.vertical ? x : _, e); }); } move(k) { return this.el.scroll(k), this; } scroll() { return this.el.scroll(); } set(k, e) { const x = k - 1; if (e > x) { const _ = this.vertical ? "height" : "width"; this.el.css(_, `${x - 15}px`).show(), this.contentEl.css(this.vertical ? "width" : "height", "1px").css(_, `${e}px`); } else this.el.hide(); return this; } } const Do = 2 * 2 - 1; let df = 10; class No { constructor(k = !1) { this.useHideInput = k, this.inputChange = () => { }, this.cornerEl = $e("div", `${lt}-selector-corner`), this.areaEl = $e("div", `${lt}-selector-area`).child(this.cornerEl).hide(), this.clipboardEl = $e("div", `${lt}-selector-clipboard`).hide(), this.autofillEl = $e("div", `${lt}-selector-autofill`).hide(), this.el = $e("div", `${lt}-selector`).css("z-index", `${df}`).children(this.areaEl, this.clipboardEl, this.autofillEl).hide(), k && (this.hideInput = $e("input", "").on("compositionend", (e) => { this.inputChange(e.target.value); }), this.el.child(this.hideInputDiv = $e("div", "hide-input").child(this.hideInput)), this.el.child(this.hideInputDiv = $e("div", "hide-input").child(this.hideInput))), df += 1; } setOffset(k) { return this.el.offset(k).show(), this; } hide() { return this.el.hide(), this; } setAreaOffset(k) { const { left: e, top: x, width: _, height: u } = k, m = { width: _ - Do + 0.8, height: u - Do + 0.8, left: e - 0.8, top: x - 0.8 }; this.areaEl.offset(m).show(), this.useHideInput && (this.hideInputDiv.offset(m), this.hideInput.val("").focus()); } setClipboardOffset(k) { const { left: e, top: x, width: _, height: u } = k; this.clipboardEl.offset({ left: e, top: x, width: _ - 5, height: u - 5 }); } showAutofill(k) { const { left: e, top: x, width: _, height: u } = k; this.autofillEl.offset({ width: _ - Do, height: u - Do, left: e, top: x }).show(); } hideAutofill() { this.autofillEl.hide(); } showClipboard() { this.clipboardEl.show(); } hideClipboard() { this.clipboardEl.hide(); } } function Sf(H) { const { data: k } = this, { left: e, top: x, width: _, height: u, scroll: m, l: g, t: b } = H, w = k.freezeTotalWidth(), f = k.freezeTotalHeight(); let y = e - w; w > g && (y -= m.x); let h = x - f; return f > b && (h -= m.y), { left: y, top: h, width: _, height: u }; } function kf(H) { const { data: k } = this, { left: e, width: x, height: _, l: u, t: m, scroll: g } = H, b = k.freezeTotalWidth(); let w = e - b; return b > u && (w -= g.x), { left: w, top: m, width: x, height: _ }; } function Of(H) { const { data: k } = this, { top: e, width: x, height: _, l: u, t: m, scroll: g } = H, b = k.freezeTotalHeight(); let w = e - b; return b > m && (w -= g.y), { left: u, top: w, width: x, height: _ }; } function pf(H) { const { br: k } = this; k.setAreaOffset(Sf.call(this, H)); } function Um(H) { const { tl: k } = this; k.setAreaOffset(H); } function mc(H) { const { t: k } = this; k.setAreaOffset(kf.call(this, H)); } function bc(H) { const { l: k } = this; k.setAreaOffset(Of.call(this, H)); } function gc(H) { const { l: k } = this; k.setClipboardOffset(Of.call(this, H)); } function yf(H) { const { br: k } = this; k.setClipboardOffset(Sf.call(this, H)); } function $m(H) { const { tl: k } = this; k.setClipboardOffset(H); } function _c(H) { const { t: k } = this; k.setClipboardOffset(kf.call(this, H)); } function zl(H) { pf.call(this, H), Um.call(this, H), mc.call(this, H), bc.call(this, H); } function Hl(H) { yf.call(this, H), $m.call(this, H), _c.call(this, H), gc.call(this, H); } class Wm { constructor(k) { this.inputChange = () => { }, this.data = k, this.br = new No(!0), this.t = new No(), this.l = new No(), this.tl = new No(), this.br.inputChange = (e) => { this.inputChange(e); }, this.br.el.show(), this.offset = null, this.areaOffset = null, this.indexes = null, this.range = null, this.arange = null, this.el = $e("div", `${lt}-selectors`).children( this.tl.el, this.t.el, this.l.el, this.br.el ).hide(), this.lastri = -1, this.lastci = -1, df += 1; } resetData(k) { this.data = k, this.range = k.selector.range, this.resetAreaOffset(); } hide() { this.el.hide(); } resetOffset() { const { data: k, tl: e, t: x, l: _, br: u } = this, m = k.freezeTotalHeight(), g = k.freezeTotalWidth(); m > 0 || g > 0 ? (e.setOffset({ width: g, height: m }), x.setOffset({ left: g, height: m }), _.setOffset({ top: m, width: g }), u.setOffset({ left: g, top: m })) : (e.hide(), x.hide(), _.hide(), u.setOffset({ left: 0, top: 0 })); } resetAreaOffset() { const k = this.data.getSelectedRect(), e = this.data.getClipboardRect(); zl.call(this, k), Hl.call(this, e), this.resetOffset(); } resetBRTAreaOffset() { const k = this.data.getSelectedRect(), e = this.data.getClipboardRect(); pf.call(this, k), mc.call(this, k), yf.call(this, e), _c.call(this, e), this.resetOffset(); } resetBRLAreaOffset() { const k = this.data.getSelectedRect(), e = this.data.getClipboardRect(); pf.call(this, k), bc.call(this, k), yf.call(this, e), gc.call(this, e), this.resetOffset(); } set(k, e, x = !0) { const { data: _ } = this, u = _.calSelectedRangeByStart(k, e), { sri: m, sci: g } = u; if (x) { let [b, w] = [k, e]; k < 0 && (b = 0), e < 0 && (w = 0), _.selector.setIndexes(b, w), this.indexes = [b, w]; } this.moveIndexes = [m, g], this.range = u, this.resetAreaOffset(), this.el.show(); } setEnd(k, e, x = !0) { const { data: _, lastri: u, lastci: m } = this; if (x) { if (k === u && e === m) return; this.lastri = k, this.lastci = e; } this.range = _.calSelectedRangeByEnd(k, e), zl.call(this, this.data.getSelectedRect()); } reset() { const { eri: k, eci: e } = this.data.selector.range; this.setEnd(k, e); } showAutofill(k, e) { if (k === -1 && e === -1) return; const { sri: x, sci: _, eri: u, eci: m } = this.range, [g, b] = [k, e], w = x - k, f = _ - e, y = u - k, h = m - e; if (f > 0) this.arange = new kr(x, b, u, _ - 1); else if (w > 0) this.arange = new kr(g, _, x - 1, m); else if (h < 0) this.arange = new kr(x, m + 1, u, b); else if (y < 0) this.arange = new kr(u + 1, _, g, m); else { this.arange = null; return; } if (this.arange !== null) { const l = this.data.getRect(this.arange); l.width += 2, l.height += 2; const { br: d, l: s, t: v, tl: c } = this; d.showAutofill(Sf.call(this, l)), s.showAutofill(Of.call(this, l)), v.showAutofill(kf.call(this, l)), c.showAutofill(l); } } hideAutofill() { ["br", "l", "t", "tl"].forEach((k) => { this[k].hideAutofill(); }); } showClipboard() { const k = this.data.getClipboardRect(); Hl.call(this, k), ["br", "l", "t", "tl"].forEach((e) => { this[e].showClipboard(); }); } hideClipboard() { ["br", "l", "t", "tl"].forEach((k) => { this[k].hideClipboard(); }); } } function Vm(H) { H.preventDefault(), H.stopPropagation(); const { filterItems: k } = this; k.length <= 0 || (this.itemIndex >= 0 && k[this.itemIndex].toggle(), this.itemIndex -= 1, this.itemIndex < 0 && (this.itemIndex = k.length - 1), k[this.itemIndex].toggle()); } function Km(H) { H.stopPropagation(); const { filterItems: k } = this; k.length <= 0 || (this.itemIndex >= 0 && k[this.itemIndex].toggle(), this.itemIndex += 1, this.itemIndex > k.length - 1 && (this.itemIndex = 0), k[this.itemIndex].toggle()); } function Xl(H) { H.preventDefault(); const { filterItems: k } = this; k.length <= 0 || (H.stopPropagation(), this.itemIndex < 0 && (this.itemIndex = 0), k[this.itemIndex].el.click(), this.hide()); } function Gm(H) { const { keyCode: k } = H; switch (H.ctrlKey && H.stopPropagation(), k) { case 37: H.stopPropagation(); break; case 38: Vm.call(this, H); break; case 39: H.stopPropagation(); break; case 40: Km.call(this, H); break; case 13: Xl.call(this, H); break; case 9: Xl.call(this, H); break; default: H.stopPropagation(); break; } } class wc { constructor(k, e, x = "200px") { this.filterItems = [], this.items = k, this.el = $e("div", `${lt}-suggest`).css("width", x).hide(), this.itemClick = e, this.itemIndex = -1; } setOffset(k) { this.el.cssRemoveKeys("top", "bottom").offset(k); } hide() { const { el: k } = this; this.filterItems = [], this.itemIndex = -1, k.hide(), _a(this.el.parent()); } setItems(k) { this.items = k; } search(k) { let { items: e } = this; if (/^\s*$/.test(k) || (e = e.filter((_) => (_.key || _).startsWith(k.toUpperCase()))), e = e.map((_) => { let { title: u } = _; u ? typeof u == "function" && (u = u()) : u = _; const m = $e("div", `${lt}-item`).child(u).on("click.stop", () => { this.itemClick(_), this.hide(); }); return _.label && m.child($e("div", "label").html(_.label)), m; }), this.filterItems = e, e.length <= 0) return; const { el: x } = this; x.html("").children(...e).show(), Va(x.parent(), () => { this.hide(); }); } bindInputEvents(k) { k.on("keydown", (e) => Gm.call(this, e)); } } class Kr extends Hi { constructor(k) { super("div", `${lt}-icon`), this.iconNameEl = $e("div", `${lt}-icon-img ${k}`), this.child(this.iconNameEl); } setName(k) { this.iconNameEl.className(`${lt}-icon-img ${k}`); } } function Ul(H, k) { H.setMonth(H.getMonth() + k); } function Ym(H, k) { const e = new Date(H); return e.setDate(k - H.getDay() + 1), e; } function Zm(H, k, e) { const x = new Date(H, k, 1, 23, 59, 59), _ = [[], [], [], [], [], []]; for (let u = 0; u < 6; u += 1) for (let m = 0; m < 7; m += 1) { const g = u * 7 + m, b = Ym(x, g), w = b.getMonth() !== k, f = b.getMonth() === e.getMonth() && b.getDate() === e.getDate(); _[u][m] = { d: b, disabled: w, active: f }; } return _; } class Jm { constructor(k) { this.value = k, this.cvalue = new Date(k), this.headerLeftEl = $e("div", "calendar-header-left"), this.bodyEl = $e("tbody", ""), this.buildAll(), this.el = $e("div", "x-spreadsheet-calendar").children( $e("div", "calendar-header").children( this.headerLeftEl, $e("div", "calendar-header-right").children( $e("a", "calendar-prev").on("click.stop", () => this.prev()).child(new Kr("chevron-left")), $e("a", "calendar-next").on("click.stop", () => this.next()).child(new Kr("chevron-right")) ) ), $e("table", "calendar-body").children( $e("thead", "").child( $e("tr", "").children( ...Cr("calendar.weeks").map((e) => $e("th", "cell").child(e)) ) ), this.bodyEl ) ), this.selectChange = () => { }; } setValue(k) { this.value = k, this.cvalue = new Date(k), this.buildAll(); } prev() { const { value: k } = this; Ul(k, -1), this.buildAll(); } next() { const { value: k } = this; Ul(k, 1), this.buildAll(); } buildAll() { this.buildHeaderLeft(), this.buildBody(); } buildHeaderLeft() { const { value: k } = this; this.headerLeftEl.html(`${Cr("calendar.months")[k.getMonth()]} ${k.getFullYear()}`); } buildBody() { const { value: k, cvalue: e, bodyEl: x } = this, u = Zm(k.getFullYear(), k.getMonth(), e).map((m) => { const g = m.map((b) => { let w = "cell"; return b.disabled && (w += " disabled"), b.active && (w += " active"), $e("td", "").child( $e("div", w).on("click.stop", () => { this.selectChange(b.d); }).child(b.d.getDate().toString()) ); }); return $e("tr", "").children(...g); }); x.html("").children(...u); } } class Qm { constructor() { this.calendar = new Jm(/* @__PURE__ */ new Date()), this.el = $e("div", `${lt}-datepicker`).child( this.calendar.el ).hide(); } setValue(k) { const { calendar: e } = this; return typeof k == "string" ? /^\d{4}-\d{1,2}-\d{1,2}$/.test(k) && e.setValue(new Date(k.replace(new RegExp("-", "g"), "/"))) : k instanceof Date && e.setValue(k), this; } change(k) { this.calendar.selectChange = (e) => { k(e), this.hide(); }; } show() { this.el.show(); } hide() { this.el.hide(); } } function Yo() { const { inputText: H } = this; if (!/^\s*$/.test(H)) { const { textlineEl: k, textEl: e, areaOffset: x } = this, _ = H.split(` `), u = Math.max(..._.map((y) => y.length)), g = k.offset().width / H.length, b = (u + 1) * g + 5, w = this.viewFn().width - x.left - g; let f = _.length; if (b > x.width) { let y = b; b > w && (y = w, f += parseInt(b / w, 10), f += b % w > 0 ? 1 : 0), e.css("width", `${y}px`); } f *= this.rowHeight, f > x.height && e.css("height", `${f}px`); } } function qm({ target: H }, k) { const { value: e, selectionEnd: x } = H, _ = `${e.slice(0, x)}${k}${e.slice(x)}`; H.value = _, H.setSelectionRange(x + 1, x + 1), this.inputText = _, this.textlineEl.html(_), Yo.call(this); } function eb(H) { const { keyCode: k, altKey: e } = H; k !== 13 && k !== 9 && H.stopPropagation(), k === 13 && e && (qm.call(this, H, ` `), H.stopPropagation()), k === 13 && !e && H.preventDefault(); } function tb(H) { const k = H.target.value, { suggest: e, textlineEl: x, validator: _ } = this, { cell: u } = this; if (u !== null) if ("editable" in u && u.editable === !0 || u.editable === void 0) { if (this.inputText = k, _) _.type === "list" ? e.search(k) : e.hide(); else { const m = k.lastIndexOf("="); m !== -1 ? e.search(k.substring(m + 1)) : e.hide(); } x.html(k), Yo.call(this), this.change("input", k); } else H.target.value = u.text; else { if (this.inputText = k, _) _.type === "list" ? e.search(k) : e.hide(); else { const m = k.lastIndexOf("="); m !== -1 ? e.search(k.substring(m + 1)) : e.hide(); } x.html(k), Yo.call(this), this.change("input", k); } } function rb(H) { const { el: k } = this.textEl; setTimeout(() => { k.focus(), k.setSelectionRange(H, H); }, 0); } function xc(H, k) { const { textEl: e, textlineEl: x } = this; e.el.blur(), e.val(H), x.html(H), rb.call(this, k); } function nb(H) { const { inputText: k, validator: e } = this; let x = 0; if (e && e.type === "list") this.inputText = H, x = this.inputText.length; else { const _ = k.lastIndexOf("="), u = k.substring(0, _ + 1); let m = k.substring(_ + 1); m.indexOf(")") !== -1 ? m = m.substring(m.indexOf(")")) : m = "", this.inputText = `${u + H.key}(`, x = this.inputText.length, this.inputText += `)${m}`; } xc.call(this, this.inputText, x); } function ib() { this.suggest.setItems(this.formulas); } function ab(H) { let k = H.getMonth() + 1, e = H.getDate(); return k < 10 && (k = `0${k}`), e < 10 && (e = `0${e}`), `${H.getFullYear()}-${k}-${e}`; } class ob { constructor(k, e, x) { this.viewFn = e, this.rowHeight = x, this.formulas = k, this.suggest = new wc(k, (_) => { nb.call(this, _); }), this.datepicker = new Qm(), this.datepicker.change((_) => { this.setText(ab(_)), this.clear(); }), this.areaEl = $e("div", `${lt}-editor-area`).children( this.textEl = $e("textarea", "").on("input", (_) => tb.call(this, _)).on("paste.stop", () => { }).on("keydown", (_) => eb.call(this, _)), this.textlineEl = $e("div", "textline"), this.suggest.el, this.datepicker.el ).on("mousemove.stop", () => { }).on("mousedown.stop", () => { }), this.el = $e("div", `${lt}-editor`).child(this.areaEl).hide(), this.suggest.bindInputEvents(this.textEl), this.areaOffset = null, this.freeze = { w: 0, h: 0 }, this.cell = null, this.inputText = "", this.change = () => { }; } setFreezeLengths(k, e) { this.freeze.w = k, this.freeze.h = e; } clear() { this.inputText !== "" && this.change("finished", this.inputText), this.cell = null, this.areaOffset = null, this.inputText = "", this.el.hide(), this.textEl.val(""), this.textlineEl.html(""), ib.call(this), this.datepicker.hide(); } setOffset(k, e = "top") { const { textEl: x, areaEl: _, suggest: u, freeze: m, el: g } = this; if (k) { this.areaOffset = k; const { left: b, top: w, width: f, height: y, l: h, t: l } = k, d = { left: 0, top: 0 }; m.w > h && m.h > l || (m.w < h && m.h < l ? (d.left = m.w, d.top = m.h) : m.w > h ? d.top = m.h : m.h > l && (d.left = m.w)), g.offset(d), _.offset({ left: b - d.left - 0.8, top: w - d.top - 0.8 }), x.offset({ width: f - 9 + 0.8, height: y - 3 + 0.8 }); const s = { left: 0 }; s[e] = y, u.setOffset(s), u.hide(); } } setCell(k, e) { const { el: x, datepicker: _, suggest: u } = this; x.show(), this.cell = k; const m = k && k.text || ""; if (this.setText(m), this.validator = e, e) { const { type: g } = e; g === "date" && (_.show(), /^\s*$/.test(m) || _.setValue(m)), g === "list" && (u.setItems(e.values()), u.search("")); } } setText(k) { this.inputText = k, xc.call(this, k, k.length), Yo.call(this); } } class Li extends Hi { // type: primary constructor(k, e = "") { super("div", `${lt}-button ${e}`), this.child(Cr(`button.${k}`)); } } function Zo() { return window.devicePixelRatio || 1; } function Ef() { return Zo() - 0.5; } function zt(H) { return parseInt(H * Zo(), 10); } function ya(H) { const k = zt(H); return k > 0 ? k - 0.5 : 0.5; } class sb { constructor(k, e, x, _, u = 0) { this.x = k, this.y = e, this.width = x, this.height = _, this.padding = u, this.bgcolor = "#ffffff", this.borderTop = null, this.borderRight = null, this.borderBottom = null, this.borderLeft = null; } setBorders({ top: k, bottom: e, left: x, right: _ }) { k && (this.borderTop = k), _ && (this.borderRight = _), e && (this.borderBottom = e), x && (this.borderLeft = x); } innerWidth() { return this.width - this.padding * 2 - 2; } innerHeight() { return this.height - this.padding * 2 - 2; } textx(k) { const { width: e, padding: x } = this; let { x: _ } = this; return k === "left" ? _ += x : k === "center" ? _ += e / 2 : k === "right" && (_ += e - x), _; } texty(k, e) { const { height: x, padding: _ } = this; let { y: u } = this; return k === "top" ? u += _ : k === "middle" ? u += x / 2 - e / 2 : k === "bottom" && (u += x - _ - e), u; } topxys() { const { x: k, y: e, width: x } = this; return [[k, e], [k + x, e]]; } rightxys() { const { x: k, y: e, width: x, height: _ } = this; return [[k + x, e], [k + x, e + _]]; } bottomxys() { const { x: k, y: e, width: x, height: _ } = this; return [[k, e + _], [k + x, e + _]]; } leftxys() { const { x: k, y: e, height: x } = this; return [[k, e], [k, e + x]]; } } function $l(H, k, e, x, _, u, m) { const g = { x: 0, y: 0 }; H === "underline" ? _ === "bottom" ? g.y = 0 : _ === "top" ? g.y = -(u + 2) : g.y = -u / 2 : H === "strike" && (_ === "bottom" ? g.y = u / 2 : _ === "top" && (g.y = -(u / 2 + 2))), x === "center" ? g.x = m / 2 : x === "right" && (g.x = m), this.line( [k - g.x, e - g.y], [k - g.x + m, e - g.y] ); } class Sc { constructor(k, e, x) { this.el = k, this.ctx = k.getContext("2d"), this.resize(e, x), this.ctx.scale(Zo(), Zo()); } resize(k, e) { this.el.style.width = `${k}px`, this.el.style.height = `${e}px`, this.el.width = zt(k), this.el.height = zt(e); } clear() { const { width: k, height: e } = this.el; return this.ctx.clearRect(0, 0, k, e), this; } attr(k) { return Object.assign(this.ctx, k), this; } save() { return this.ctx.save(), this.ctx.beginPath(), this; } restore() { return this.ctx.restore(), this; } beginPath() { return this.ctx.beginPath(), this; } translate(k, e) { return this.ctx.translate(zt(k), zt(e)), this; } scale(k, e) { return this.ctx.scale(k, e), this; } clearRect(k, e, x, _) { return this.ctx.clearRect(k, e, x, _), this; } fillRect(k, e, x, _) { return this.ctx.fillRect(zt(k) - 0.5, zt(e) - 0.5, zt(x), zt(_)), this; } fillText(k, e, x) { return this.ctx.fillText(k, zt(e), zt(x)), this; } /* txt: render text box: DrawBox attr: { align: left | center | right valign: top | middle | bottom color: '#333333', strike: false, font: { name: 'Arial', size: 14, bold: false, italic: false, } } textWrap: text wrapping */ text(k, e, x = {}, _ = !0) { const { ctx: u } = this, { align: m, valign: g, font: b, color: w, strike: f, underline: y } = x, h = e.textx(m); u.save(), u.beginPath(), this.attr({ textAlign: m, textBaseline: g, font: `${b.italic ? "italic" : ""} ${b.bold ? "bold" : ""} ${zt(b.size)}px ${b.name}`, fillStyle: w, strokeStyle: w }); const l = `${k}`.split(` `), d = e.innerWidth(), s = []; l.forEach((a) => { const r = u.measureText(a).width; if (_ && r > zt(d)) { let t = { w: 0, len: 0, start: 0 }; for (let i = 0; i < a.length; i += 1) t.w >= zt(d) && (s.push(a.substr(t.start, t.len)), t = { w: 0, len: 0, start: i }), t.len += 1, t.w += u.measureText(a[i]).width + 1; t.len > 0 && s.push(a.substr(t.start, t.len)); } else s.push(a); }); const v = (s.length - 1) * (b.size + 2); let c = e.texty(g, v); return s.forEach((a) => { const r = u.measureText(a).width; this.fillText(a, h, c), f && $l.call(this, "strike", h, c, m, g, b.size, r), y && $l.call(this, "underline", h, c, m, g, b.size, r), c += b.size + 2; }), u.restore(), this; } border(k, e) { const { ctx: x } = this; return x.lineWidth = Ef, x.strokeStyle = e, k === "medium" ? x.lineWidth = zt(2) - 0.5 : k === "thick" ? x.lineWidth = zt(3) : k === "dashed" ? x.setLineDash([zt(3), zt(2)]) : k === "dotted" ? x.setLineDash([zt(1), zt(1)]) : k === "double" && x.setLineDash([zt(2), 0]), this; } line(...k) { const { ctx: e } = this; if (k.length > 1) { e.beginPath(); const [x, _] = k[0]; e.moveTo(ya(x), ya(_)); for (let u = 1; u < k.length; u += 1) { const [m, g] = k[u]; e.lineTo(ya(m), ya(g)); } e.stroke(); } return this; } strokeBorders(k) { const { ctx: e } = this; e.save(); const { borderTop: x, borderRight: _, borderBottom: u, borderLeft: m } = k; x && (this.border(...x), this.line(...k.topxys())), _ && (this.border(..._), this.line(...k.rightxys())), u && (this.border(...u), this.line(...k.bottomxys())), m && (this.border(...m), this.line(...k.leftxys())), e.restore(); } dropdown(k) { const { ctx: e } = this, { x, y: _, width: u, height: m } = k, g = x + u - 15, b = _ + m - 15; e.save(), e.beginPath(), e.moveTo(zt(g), zt(b)), e.lineTo(zt(g + 8), zt(b)), e.lineTo(zt(g + 4), zt(b + 6)), e.closePath(), e.fillStyle = "rgba(0, 0, 0, .45)", e.fill(), e.restore(); } error(k) { const { ctx: e } = this, { x, y: _, width: u } = k, m = x + u - 1; e.save(), e.beginPath(), e.moveTo(zt(m - 8), zt(_ - 1)), e.lineTo(zt(m), zt(_ - 1)), e.lineTo(zt(m), zt(_ + 8)), e.closePath(), e.fillStyle = "rgba(255, 0, 0, .65)", e.fill(), e.restore(); } frozen(k) { const { ctx: e } = this, { x, y: _, width: u } = k, m = x + u - 1; e.save(), e.beginPath(), e.moveTo(zt(m - 8), zt(_ - 1)), e.lineTo(zt(m), zt(_ - 1)), e.lineTo(zt(m), zt(_ + 8)), e.closePath(), e.fillStyle = "rgba(0, 255, 0, .85)", e.fill(), e.restore(); } rect(k, e) { const { ctx: x } = this, { x: _, y: u, width: m, height: g, bgcolor: b } = k; x.save(), x.beginPath(), x.fillStyle = b || "#fff", x.rect(ya(_ + 1), ya(u + 1), zt(m - 2), zt(g - 2)), x.clip(), x.fill(), e(), x.restore(); } } const Wl = [ { key: "Arial", title: "Arial" }, { key: "Helvetica", title: "Helvetica" }, { key: "Source Sans Pro", title: "Source Sans Pro" }, { key: "Comic Sans MS", title: "Comic Sans MS" }, { key: "Courier New", title: "Courier New" }, { key: "Verdana", title: "Verdana" }, { key: "Lato", title: "Lato" } ], vf = [ { pt: 7.5, px: 10 }, { pt: 8, px: 11 }, { pt: 9, px: 12 }, { pt: 10, px: 13 }, { pt: 10.5, px: 14 }, { pt: 11, px: 15 }, { pt: 12, px: 16 }, { pt: 14, px: 18.7 }, { pt: 15, px: 20 }, { pt: 16, px: 21.3 }, { pt: 18, px: 24 }, { pt: 22, px: 29.3 }, { pt: 24, px: 32 }, { pt: 26, px: 34.7 }, { pt: 36, px: 48 }, { pt: 42, px: 56 } // { pt: 54, px: 71.7 }, // { pt: 63, px: 83.7 }, // { pt: 72, px: 95.6 }, ]; function fb(H) { for (let k = 0; k < vf.length; k += 1) { const e = vf[k]; if (e.pt === H) return e.px; } return H; } const ub = (H) => { const k = [], e = []; let x = [], _ = 0, u = "", m = 1, g = ""; for (let b = 0; b < H.length; b += 1) { const w = H.charAt(b); if (w !== " ") { if (w >= "a" && w <= "z") x.push(w.toUpperCase()); else if (w >= "0" && w <= "9" || w >= "A" && w <= "Z" || w === ".") x.push(w); else if (w === '"') { for (b += 1; H.charAt(b) !== '"'; ) x.push(H.charAt(b)), b += 1; e.push(`"${x.join("")}`), x = []; } else if (w === "-" && /[+\-*/,(]/.test(g)) x.push(w); else { if (w !== "(" && x.length > 0 && e.push(x.join("")), w === ")") { let f = k.pop(); if (_ === 2) try { const [y, h] = Ti(e.pop()), [l, d] = Ti(e.pop()); let s = 0; for (let v = l; v <= y; v += 1) for (let c = d; c <= h; c += 1) e.push(hi(v, c)), s += 1; e.push([f, s]); } catch (y) { } else if (_ === 1 || _ === 3) _ === 3 && e.push(u), e.push([f, m]), m = 1; else for (; f !== "(" && (e.push(f), !(k.length <= 0)); ) f = k.pop(); _ = 0; } else if (w === "=" || w === ">" || w === "<") { const f = H.charAt(b + 1); u = w, (f === "=" || f === "-") && (u += f, b += 1), _ = 3; } else if (w === ":") _ = 2; else if (w === ",") _ === 3 && e.push(u), _ = 1, m += 1; else if (w === "(" && x.length > 0) k.push(x.join("")); else { if (k.length > 0 && (w === "+" || w === "-")) { let f = k[k.length - 1]; if (f !== "(" && e.push(k.pop()), f === "*" || f === "/") for (; k.length > 0 && (f = k[k.length - 1], f !== "("); ) e.push(k.pop()); } else if (k.length > 0) { const f = k[k.length - 1]; (f === "*" || f === "/") && e.push(k.pop()); } k.push(w); } x = []; } g = w; } } for (x.length > 0 && e.push(x.join("")); k.length > 0; ) e.push(k.pop()); return e; }, lb = (H, k) => { const [e] = H; let x = H; if (e === '"') return H.substring(1); let _ = 1; if (e === "-" && (x = H.substring(1), _ = -1), x[0] >= "0" && x[0] <= "9") return _ * Number(x); const [u, m] = Ti(x); return _ * k(u, m); }, cb = (H, k, e, x) => { const _ = []; for (let u = 0; u < H.length; u += 1) { const m = H[u], g = m[0]; if (m === "+") { const b = _.pop(); _.push(ji("+", _.pop(), b)); } else if (m === "-") if (_.length === 1) { const b = _.pop(); _.push(ji("*", b, -1)); } else { const b = _.pop(); _.push(ji("-", _.pop(), b)); } else if (m === "*") _.push(ji("*", _.pop(), _.pop())); else if (m === "/") { const b = _.pop(); _.push(ji("/", _.pop(), b)); } else if (g === "=" || g === ">" || g === "<") { let b = _.pop(); Number.isNaN(b) || (b = Number(b)); let w = _.pop(); Number.isNaN(w) || (w = Number(w)); let f = !1; g === "=" ? f = w === b : m === ">" ? f = w > b : m === ">=" ? f = w >= b : m === "<" ? f = w < b : m === "<=" && (f = w <= b), _.push(f); } else if (Array.isArray(m)) { const [b, w] = m, f = []; for (let y = 0; y < w; y += 1) f.push(_.pop()); _.push(k[b].render(f.reverse())); } else { if (x.includes(m)) return 0; (g >= "a" && g <= "z" || g >= "A" && g <= "Z") && x.push(m), _.push(lb(m, e)), x.pop(); } } return _[0]; }, kc = (H, k, e, x = []) => { if (H[0] === "=") { const _ = ub(H.substring(1)); return _.length <= 0 ? H : cb( _, k, (u, m) => kc(e(u, m), k, e, x), x ); } return H; }, hb = { render: kc }, Tf = [ { key: "SUM", title: Jt("formula.sum"), render: (H) => H.reduce((k, e) => ji("+", k, e), 0) }, { key: "AVERAGE", title: Jt("formula.average"), render: (H) => H.reduce((k, e) => Number(k) + Number(e), 0) / H.length }, { key: "MAX", title: Jt("formula.max"), render: (H) => Math.max(...H.map((k) => Number(k))) }, { key: "MIN", title: Jt("formula.min"), render: (H) => Math.min(...H.map((k) => Number(k))) }, { key: "IF", title: Jt("formula._if"), render: ([H, k, e]) => H ? k : e }, { key: "AND", title: Jt("formula.and"), render: (H) => H.every((k) => k) }, { key: "OR", title: Jt("formula.or"), render: (H) => H.some((k) => k) }, { key: "CONCAT", title: Jt("formula.concat"), render: (H) => H.join("") } /* support: 1 + A1 + B2 * 3 { key: 'DIVIDE', title: tf('formula.divide'), render: ary => ary.reduce((a, b) => Number(a) / Number(b)), }, { key: 'PRODUCT', title: tf('formula.product'), render: ary => ary.reduce((a, b) => Number(a) * Number(b),1), }, { key: 'SUBTRACT', title: tf('formula.subtract'), render: ary => ary.reduce((a, b) => Number(a) - Number(b)), }, */ ], db = Tf, Oc = {}; Tf.forEach((H) => { Oc[H.key] = H; }); const va = (H) => H, Fo = (H) => { if (/^(-?\d*.?\d*)$/.test(H)) { const k = Number(H).toFixed(2).toString(), [e, ...x] = k.split("\\."); return [e.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"), ...x]; } return H; }, Xa = [ { key: "normal", title: Jt("format.normal"), type: "string", render: va }, { key: "text", title: Jt("format.text"), type: "string", render: va }, { key: "number", title: Jt("format.number"), type: "number", label: "1,000.12", render: Fo }, { key: "percent", title: Jt("format.percent"), type: "number", label: "10.12%", render: (H) => `${H}%` }, { key: "rmb", title: Jt("format.rmb"), type: "number", label: "¥10.00", render: (H) => `¥${Fo(H)}` }, { key: "usd", title: Jt("format.usd"), type: "number", label: "$10.00", render: (H) => `$${Fo(H)}` }, { key: "eur", title: Jt("format.eur"), type: "number", label: "€10.00", render: (H) => `€${Fo(H)}` }, { key: "date", title: Jt("format.date"), type: "date", label: "26/09/2008", render: va }, { key: "time", title: Jt("format.time"), type: "date", label: "15:59:00", render: va }, { key: "datetime", title: Jt("format.datetime"), type: "date", label: "26/09/2008 15:59:00", render: va }, { key: "duration", title: Jt("format.duration"), type: "date", label: "24:01:00", render: va } ], Ec = {}; Xa.forEach((H) => { Ec[H.key] = H; }); const pb = 5, yb = { fillStyle: "#f4f5f8" }, vb = { fillStyle: "#fff", lineWidth: Ef, strokeStyle: "#e6e6e6" }; function mb() { return { textAlign: "center", textBaseline: "middle", font: `500 ${zt(12)}px Source Sans Pro`, fillStyle: "#585757", lineWidth: Ef(), strokeStyle: "#e6e6e6" }; } function Tc(H, k, e, x = 0) { const { left: _, top: u, width: m, height: g } = H.cellRect(k, e); return new sb(_, u + x, m, g, pb); } function Jo(H, k, e, x, _ = 0) { const { sortedRowMap: u, rows: m, cols: g } = k; if (m.isHide(e) || g.isHide(x)) return; let b = e; u.has(e) && (b = u.get(e)); const w = k.getCell(b, x); if (w === null) return; let f = !1; "editable" in w && w.editable === !1 && (f = !0); const y = k.getCellStyleOrDefault(b, x), h = Tc(k, e, x, _); h.bgcolor = y.bgcolor, y.border !== void 0 && (h.setBorders(y.border), H.strokeBorders(h)), H.rect(h, () => { let l = ""; k.settings.evalPaused ? l = w.text || "" : l = hb.render(w.text || "", Oc, (v, c) => k.getCellTextOrDefault(c, v)), y.format && (l = Ec[y.format].render(l)); const d = Object.assign({}, y.font); d.size = fb(d.size), H.text(l, h, { align: y.align, valign: y.valign, font: d, color: y.color, strike: y.strike, underline: y.underline }, y.textwrap), k.validations.getError(e, x) && H.error(h), f && H.frozen(h); }); } function bb(H) { const { data: k, draw: e } = this; if (H) { const { autoFilter: x } = k; if (!x.active()) return; const _ = x.hrange(); H.intersects(_) && _.each((u, m) => { const g = Tc(k, u, m); e.dropdown(g); }); } } function Bo(H, k, e, x, _) { const { draw: u, data: m } = this; u.save(), u.translate(k, e).translate(x, _); const { exceptRowSet: g } = m, b = (y) => { const h = g.has(y); if (h) { const l = m.rows.getHeight(y); u.translate(0, -l); } return !h; }, w = m.exceptRowTotalHeight(H.sri, H.eri); u.save(), u.translate(0, -w), H.each((y, h) => { Jo(u, m, y, h); }, (y) => b(y)), u.restore(); const f = /* @__PURE__ */ new Set(); u.save(), u.translate(0, -w), m.eachMergesInView(H, ({ sri: y, sci: h, eri: l }) => { if (!g.has(y)) Jo(u, m, y, h); else if (!f.has(y)) { f.add(y); const d = m.rows.sumHeight(y, l + 1); u.translate(0, -d); } }), u.restore(), bb.call(this, H), u.restore(); } function Vl(H, k, e, x) { const { draw: _ } = this; _.save(), _.attr({ fillStyle: "rgba(75, 137, 255, 0.08)" }).fillRect(H, k, e, x), _.restore(); } function jo(H, k, e, x, _, u) { const { draw: m, data: g } = this, b = k.h, w = k.w, f = u + x, y = _ + e; m.save(), m.attr(yb), (H === "all" || H === "left") && m.fillRect(0, f, e, b), (H === "all" || H === "top") && m.fillRect(y, 0, w, x); const { sri: h, sci: l, eri: d, eci: s } = g.selector.range; m.attr(mb()), (H === "all" || H === "left") && (g.rowEach(k.sri, k.eri, (v, c, a) => { const r = f + c, t = v; m.line([0, r], [e, r]), h <= t && t < d + 1 && Vl.call(this, 0, r, e, a), m.fillText(t + 1, e / 2, r + a / 2), v > 0 && g.rows.isHide(v - 1) && (m.save(), m.attr({ strokeStyle: "#c6c6c6" }), m.line([5, r + 5], [e - 5, r + 5]), m.restore()); }), m.line([0, b + f], [e, b + f]), m.line([e, f], [e, b + f])), (H === "all" || H === "top") && (g.colEach(k.sci, k.eci, (v, c, a) => { const r = y + c, t = v; m.line([r, 0], [r, x]), l <= t && t < s + 1 && Vl.call(this, r, 0, a, x), m.fillText(cc(t), r + a / 2, x / 2), v > 0 && g.cols.isHide(v - 1) && (m.save(), m.attr({ strokeStyle: "#c6c6c6" }), m.line([r + 5, 5], [r + 5, x - 5]), m.restore()); }), m.line([w + y, 0], [w + y, x]), m.line([0, x], [w + y, x])), m.restore(); } function gb(H, k) { const { draw: e } = this; e.save(), e.attr({ fillStyle: "#f4f5f8" }).fillRect(0, 0, H, k), e.restore(); } function Lo({ sri: H, sci: k, eri: e, eci: x, w: _, h: u }, m, g, b, w) { const { draw: f, data: y } = this, { settings: h } = y; if (f.save(), f.attr(vb).translate(m + b, g + w), !h.showGrid) { f.restore(); return; } y.rowEach(H, e, (l, d, s) => { l !== H && f.line([0, d], [_, d]), l === e && f.line([0, d + s], [_, d + s]); }), y.colEach(k, x, (l, d, s) => { l !== k && f.line([d, 0], [d, u]), l === x && f.line([d + s, 0], [d + s, u]); }), f.restore(); } function _b(H, k, e, x) { const { draw: _, data: u } = this, m = u.viewWidth() - H, g = u.viewHeight() - k; _.save().translate(H, k).attr({ strokeStyle: "rgba(75, 137, 255, .6)" }), _.line([0, x], [m, x]), _.line([e, 0], [e, g]), _.restore(); } class wb { constructor(k, e) { this.el = k, this.draw = new Sc(k, e.viewWidth(), e.viewHeight()), this.data = e; } resetData(k) { this.data = k, this.render(); } render() { const { data: k } = this, { rows: e, cols: x } = k, _ = x.indexWidth, u = e.height; this.draw.resize(k.viewWidth(), k.viewHeight()), this.clear(); const m = k.viewRange(), g = k.freezeTotalWidth(), b = k.freezeTotalHeight(), { x: w, y: f } = k.scroll; Lo.call(this, m, _, u, g, b), Bo.call(this, m, _, u, -w, -f), jo.call(this, "all", m, _, u, g, b), gb.call(this, _, u); const [y, h] = k.freeze; if (y > 0 || h > 0) { if (y > 0) { const d = m.clone(); d.sri = 0, d.eri = y - 1, d.h = b, Lo.call(this, d, _, u, g, 0), Bo.call(this, d, _, u, -w, 0), jo.call(this, "top", d, _, u, g, 0); } if (h > 0) { const d = m.clone(); d.sci = 0, d.eci = h - 1, d.w = g, Lo.call(this, d, _, u, 0, b), jo.call(this, "left", d, _, u, 0, b), Bo.call(this, d, _, u, 0, -f); } const l = k.freezeViewRange(); Lo.call(this, l, _, u, 0, 0), jo.call(this, "all", l, _, u, 0, 0), Bo.call(this, l, _, u, 0, 0), _b.call(this, _, u, g, b); } } clear() { this.draw.clear(); } } const Xo = [ ["A3", 11.69, 16.54], ["A4", 8.27, 11.69], ["A5", 5.83, 8.27], ["B4", 9.84, 13.9], ["B5", 6.93, 9.84] ], mf = ["landscape", "portrait"]; function Qo(H) { return parseInt(96 * H, 10); } function Kl(H) { H === "cancel" ? this.el.hide() : this.toPrint(); } function xb(H) { const { paper: k } = this, { value: e } = H.target, x = Xo[e]; k.w = Qo(x[1]), k.h = Qo(x[2]), this.preview(); } function Sb(H) { const { paper: k } = this, { value: e } = H.target, x = mf[e]; k.orientation = x, this.preview(); } let kb = class { constructor(k) { this.paper = { w: Qo(Xo[0][1]), h: Qo(Xo[0][2]), padding: 50, orientation: mf[0], get width() { return this.orientation === "landscape" ? this.h : this.w; }, get height() { return this.orientation === "landscape" ? this.w : this.h; } }, this.data = k, this.el = $e("div", `${lt}-print`).children( $e("div", `${lt}-print-bar`).children( $e("div", "-title").child("Print settings"), $e("div", "-right").children( $e("div", `${lt}-buttons`).children( new Li("cancel").on("click", Kl.bind(this, "cancel")), new Li("next", "primary").on("click", Kl.bind(this, "next")) ) ) ), $e("div", `${lt}-print-content`).children( this.contentEl = $e("div", "-content"), $e("div", "-sider").child( $e("form", "").children( $e("fieldset", "").children( $e("label", "").child(`${Cr("print.size")}`), $e("select", "").children( ...Xo.map((e, x) => $e("option", "").attr("value", x).child(`${e[0]} ( ${e[1]}''x${e[2]}'' )`)) ).on("change", xb.bind(this)) ), $e("fieldset", "").children( $e("label", "").child(`${Cr("print.orientation")}`), $e("select", "").children( ...mf.map((e, x) => $e("option", "").attr("value", x).child(`${Cr("print.orientations")[x]}`)) ).on("change", Sb.bind(this)) ) ) ) ) ).hide(); } resetData(k) { this.data = k; } preview() { const { data: k, paper: e } = this, { width: x, height: _, padding: u } = e, m = x - u * 2, g = _ - u * 2, b = k.contentRange(), w = parseInt(b.h / g, 10) + 1, f = m / b.w; let y = u; const h = u; f > 1 && (y += (m - b.w) / 2); let l = 0, d = 0; this.contentEl.html(""), this.canvases = []; const s = { sri: 0, sci: 0, eri: 0, eci: 0 }; for (let v = 0; v < w; v += 1) { let c = 0, a = 0; const r = $e("div", `${lt}-canvas-card`), t = $e("canvas", `${lt}-canvas`); this.canvases.push(t.el); const i = new Sc(t.el, x, _); for (i.save(), i.translate(y, h), f < 1 && i.scale(f, f); l <= b.eri; l += 1) { const o = k.rows.getHeight(l); if (c += o, c < g) for (let p = 0; p <= b.eci; p += 1) Jo(i, k, l, p, d), s.eci = p; else { a = -(c - o); break; } } s.eri = l, i.restore(), i.save(), i.translate(y, h), f < 1 && i.scale(f, f); const n = d; k.eachMergesInView(s, ({ sri: o, sci: p }) => { Jo(i, k, o, p, n); }), i.restore(), s.sri = s.eri, s.sci = s.eci, d += a, this.contentEl.child($e("div", `${lt}-canvas-card-wraper`).child(r.child(t))); } this.el.show(); } toPrint() { this.el.hide(); const { paper: k } = this, e = $e("iframe", "").hide(), { el: x } = e; window.document.body.appendChild(x); const { contentWindow: _ } = x, u = _.document, m = document.createElement("style"); m.innerHTML = ` @page { size: ${k.width}px ${k.height}px; }; canvas { page-break-before: auto; page-break-after: always; image-rendering: pixelated; }; `, u.head.appendChild(m), this.canvases.forEach((g) => { const b = g.cloneNode(!1); b.getContext("2d").drawImage(g, 0, 0), u.body.appendChild(b); }), _.print(); } }; const Ob = [ { key: "copy", title: Jt("contextmenu.copy"), label: "Ctrl+C" }, { key: "cut", title: Jt("contextmenu.cut"), label: "Ctrl+X" }, { key: "paste", title: Jt("contextmenu.paste"), label: "Ctrl+V" }, { key: "paste-value", title: Jt("contextmenu.pasteValue"), label: "Ctrl+Shift+V" }, { key: "paste-format", title: Jt("contextmenu.pasteFormat"), label: "Ctrl+Alt+V" }, { key: "divider" }, { key: "insert-row", title: Jt("contextmenu.insertRow") }, { key: "insert-column", title: Jt("contextmenu.insertColumn") }, { key: "divider" }, { key: "delete-row", title: Jt("contextmenu.deleteRow") }, { key: "delete-column", title: Jt("contextmenu.deleteColumn") }, { key: "delete-cell-text", title: Jt("contextmenu.deleteCellText") }, { key: "hide", title: Jt("contextmenu.hide") }, { key: "divider" }, { key: "validation", title: Jt("contextmenu.validation") }, { key: "divider" }, { key: "cell-printable", title: Jt("contextmenu.cellprintable") }, { key: "cell-non-printable", title: Jt("contextmenu.cellnonprintable") }, { key: "divider" }, { key: "cell-editable", title: Jt("contextmenu.celleditable") }, { key: "cell-non-editable", title: Jt("contextmenu.cellnoneditable") } ]; function Eb(H) { return H.key === "divider" ? $e("div", `${lt}-item divider`) : $e("div", `${lt}-item`).on("click", () => { this.itemClick(H.key), this.hide(); }).children( H.title(), $e("div", "label").child(H.label || "") ); } function Tb() { return Ob.map((H) => Eb.call(this, H)); } let Rb = class { constructor(k, e = !1) { this.menuItems = Tb.call(this), this.el = $e("div", `${lt}-contextmenu`).children(...this.menuItems).hide(), this.viewFn = k, this.itemClick = () => { }, this.isHide = e, this.setMode("range"); } // row-col: the whole rows or the whole cols // range: select range setMode(k) { const e = this.menuItems[12]; k === "row-col" ? e.show() : e.hide(); } hide() { const { el: k } = this; k.hide(), _a(k); } setPosition(k, e) { if (this.isHide) return; const { el: x } = this, { width: _ } = x.show().offset(), u = this.viewFn(), m = u.height / 2; let g = k; u.width - k <= _ && (g -= _), x.css("left", `${g}px`), e > m ? x.css("bottom", `${u.height - e}px`).css("max-height", `${e}px`).css("top", "auto") : x.css("top", `${e}px`).css("max-height", `${u.height - e}px`).css("bottom", "auto"), Va(x); } }; function Cb(H, k) { if (k.classList.contains("active")) return; const { left: e, top: x, width: _, height: u } = k.getBoundingClientRect(), m = $e("div", `${lt}-tooltip`).html(H).show(); document.body.appendChild(m.el); const g = m.box(); m.css("left", `${e + _ / 2 - g.width / 2}px`).css("top", `${x + u + 2}px`), ln(k, "mouseleave", () => { document.body.contains(m.el) && document.body.removeChild(m.el); }), ln(k, "click", () => { document.body.contains(m.el) && document.body.removeChild(m.el); }); } class Rf { // tooltip // tag: the subclass type // shortcut: shortcut key constructor(k, e, x) { this.tip = Cr(`toolbar.${k.replace(/-[a-z]/g, (_) => _[1].toUpperCase())}`), e && (this.tip += ` (${e})`), this.tag = k, this.shortcut = e, this.value = x, this.el = this.element(), this.change = () => { }; } element() { const { tip: k } = this; return $e("div", `${lt}-toolbar-btn`).on("mouseenter", (e) => { Cb(k, e.target); }).attr("data-tooltip", k); } setState() { } } class Qn extends Rf { dropdown() { } getValue(k) { return k; } element() { const { tag: k } = this; return this.dd = this.dropdown(), this.dd.change = (e) => this.change(k, this.getValue(e)), super.element().child( this.dd ); } setState(k) { k && (this.value = k, this.dd.setTitle(k)); } } class qn extends Hi { constructor(k, e, x, _, ...u) { super("div", `${lt}-dropdown ${_}`), this.title = k, this.change = () => { }, this.headerClick = () => { }, typeof k == "string" ? this.title = $e("div", `${lt}-dropdown-title`).child(k) : x && this.title.addClass("arrow-left"), this.contentEl = $e("div", `${lt}-dropdown-content`).css("width", e).hide(), this.setContentChildren(...u), this.headerEl = $e("div", `${lt}-dropdown-header`), this.headerEl.on("click", () => { this.contentEl.css("display") !== "block" ? this.show() : this.hide(); }).children( this.title, x ? $e("div", `${lt}-icon arrow-right`).child( $e("div", `${lt}-icon-img arrow-down`) ) : "" ), this.children(this.headerEl, this.contentEl); } setContentChildren(...k) { this.contentEl.html(""), k.length > 0 && this.contentEl.children(...k); } setTitle(k) { this.title.html(k), this.hide(); } show() { const { contentEl: k } = this; k.show(), this.parent().active(), Va(this.parent(), () => { this.hide(); }); } hide() { this.parent().active(!1), this.contentEl.hide(), _a(this.parent()); } } function Pb(H) { return $e("div", `${lt}-item`).child(new Kr(H)); } class Rc extends qn { constructor(k, e) { const x = new Kr(`align-${e}`), _ = k.map((u) => Pb(`align-${u}`).on("click", () => { this.setTitle(u), this.change(u); })); super(x, "auto", !0, "bottom-left", ..._); } setTitle(k) { this.title.setName(`align-${k}`), this.hide(); } } class Ab extends Qn { constructor(k) { super("align", "", k); } dropdown() { const { value: k } = this; return new Rc(["left", "center", "right"], k); } } class Mb extends Qn { constructor(k) { super("valign", "", k); } dropdown() { const { value: k } = this; return new Rc(["top", "middle", "bottom"], k); } } class di extends Rf { element() { const { tag: k } = this; return super.element().child(new Kr(k)).on("click", () => this.click()); } click() { this.change(this.tag, this.toggle()); } setState(k) { this.el.active(k); } toggle() { return this.el.toggle(); } active() { return this.el.hasClass("active"); } } class Ib extends di { constructor() { super("autofilter"); } setState() { } } class Db extends di { constructor() { super("font-bold", "Ctrl+B"); } } class Nb extends di { constructor() { super("font-italic", "Ctrl+I"); } } class Fb extends di { constructor() { super("strike", "Ctrl+U"); } } class Bb extends di { constructor() { super("underline", "Ctrl+U"); } } const jb = ["#ffffff", "#000100", "#e7e5e6", "#445569", "#5b9cd6", "#ed7d31", "#a5a5a5", "#ffc001", "#4371c6", "#71ae47"], Lb = [ ["#f2f2f2", "#7f7f7f", "#d0cecf", "#d5dce4", "#deeaf6", "#fce5d5", "#ededed", "#fff2cd", "#d9e2f3", "#e3efd9"], ["#d8d8d8", "#595959", "#afabac", "#adb8ca", "#bdd7ee", "#f7ccac", "#dbdbdb", "#ffe59a", "#b3c6e7", "#c5e0b3"], ["#bfbfbf", "#3f3f3f", "#756f6f", "#8596b0", "#9cc2e6", "#f4b184", "#c9c9c9", "#fed964", "#8eaada", "#a7d08c"], ["#a5a5a5", "#262626", "#3a3839", "#333f4f", "#2e75b5", "#c45a10", "#7b7b7b", "#bf8e01", "#2f5596", "#538136"], ["#7f7f7f", "#0c0c0c", "#171516", "#222a35", "#1f4e7a", "#843c0a", "#525252", "#7e6000", "#203864", "#365624"] ], zb = ["#c00000", "#fe0000", "#fdc101", "#ffff01", "#93d051", "#00b04e", "#01b0f1", "#0170c1", "#012060", "#7030a0"]; function ef(H) { return $e("td", "").child( $e("div", `${lt}-color-palette-cell`).on("click.stop", () => this.change(H)).css("background-color", H) ); } class Hb { constructor() { this.el = $e("div", `${lt}-color-palette`), this.change = () => { }; const k = $e("table", "").children( $e("tbody", "").children( $e("tr", `${lt}-theme-color-placeholders`).children( ...jb.map((e) => ef.call(this, e)) ), ...Lb.map((e) => $e("tr", `${lt}-theme-colors`).children( ...e.map((x) => ef.call(this, x)) )), $e("tr", `${lt}-standard-colors`).children( ...zb.map((e) => ef.call(this, e)) ) ) ); this.el.child(k); } } class Cf extends qn { constructor(k, e) { const x = new Kr(k).css("height", "16px").css("border-bottom", `3px solid ${e}`), _ = new Hb(); _.change = (u) => { this.setTitle(u), this.change(u); }, super(x, "auto", !1, "bottom-left", _.el); } setTitle(k) { this.title.css("border-color", k), this.hide(); } } const Xb = [ ["thin", ''], ["medium", ''], ["thick", ''], ["dashed", ''], ["dotted", ''] // ['double', ''], ]; class Ub extends qn { constructor(k) { const e = new Kr("line-type"); let x = 0; const _ = Xb.map((u, m) => $e("div", `${lt}-item state ${k === u[0] ? "checked" : ""}`).on("click", () => { _[x].toggle("checked"), _[m].toggle("checked"), x = m, this.hide(), this.change(u); }).child( $e("div", `${lt}-line-type`).html(u[1]) )); super(e, "auto", !1, "bottom-left", ..._); } } function Gl(...H) { return $e("table", "").child( $e("tbody", "").children(...H) ); } function Yl(H) { return $e("td", "").child( $e("div", `${lt}-border-palette-cell`).child( new Kr(`border-${H}`) ).on("click", () => { this.mode = H; const { mode: k, style: e, color: x } = this; this.change({ mode: k, style: e, color: x }); }) ); } class $b { constructor() { this.color = "#000", this.style = "thin", this.mode = "all", this.change = () => { }, this.ddColor = new Cf("line-color", this.color), this.ddColor.change = (e) => { this.color = e; }, this.ddType = new Ub(this.style), this.ddType.change = ([e]) => { this.style = e; }, this.el = $e("div", `${lt}-border-palette`); const k = Gl( $e("tr", "").children( $e("td", `${lt}-border-palette-left`).child( Gl( $e("tr", "").children( ...["all", "inside", "horizontal", "vertical", "outside"].map((e) => Yl.call(this, e)) ), $e("tr", "").children( ...["left", "top", "right", "bottom", "none"].map((e) => Yl.call(this, e)) ) ) ), $e("td", `${lt}-border-palette-right`).children( $e("div", `${lt}-toolbar-btn`).child(this.ddColor.el), $e("div", `${lt}-toolbar-btn`).child(this.ddType.el) ) ) ); this.el.child(k); } } class Wb extends qn { constructor() { const k = new Kr("border-all"), e = new $b(); e.change = (x) => { this.change(x), this.hide(); }, super(k, "auto", !1, "bottom-left", e.el); } } class Vb extends Qn { constructor() { super("border"); } dropdown() { return new Wb(); } } class es extends Rf { element() { return super.element().child(new Kr(this.tag)).on("click", () => this.change(this.tag)); } setState(k) { this.el.disabled(k); } } class Kb extends es { constructor() { super("clearformat"); } } class Gb extends di { constructor() { super("paintformat"); } setState() { } } class Yb extends Qn { constructor(k) { super("color", void 0, k); } dropdown() { const { tag: k, value: e } = this; return new Cf(k, e); } } class Zb extends Qn { constructor(k) { super("bgcolor", void 0, k); } dropdown() { const { tag: k, value: e } = this; return new Cf(k, e); } } class Jb extends qn { constructor() { const k = vf.map((e) => $e("div", `${lt}-item`).on("click", () => { this.setTitle(`${e.pt}`), this.change(e); }).child(`${e.pt}`)); super("10", "60px", !0, "bottom-left", ...k); } } let Qb = class extends Qn { constructor() { super("font-size"); } getValue(k) { return k.pt; } dropdown() { return new Jb(); } }; class qb extends qn { constructor() { const k = Wl.map((e) => $e("div", `${lt}-item`).on("click", () => { this.setTitle(e.title), this.change(e); }).child(e.title)); super(Wl[0].title, "160px", !0, "bottom-left", ...k); } } class eg extends Qn { constructor() { super("font-name"); } getValue(k) { return k.key; } dropdown() { return new qb(); } } class tg extends qn { constructor() { let k = Xa.slice(0); k.splice(2, 0, { key: "divider" }), k.splice(8, 0, { key: "divider" }), k = k.map((e) => { const x = $e("div", `${lt}-item`); return e.key === "divider" ? x.addClass("divider") : (x.child(e.title()).on("click", () => { this.setTitle(e.title()), this.change(e); }), e.label && x.child($e("div", "label").html(e.label))), x; }), super("Normal", "220px", !0, "bottom-left", ...k); } setTitle(k) { for (let e = 0; e < Xa.length; e += 1) Xa[e].key === k && this.title.html(Xa[e].title()); this.hide(); } } let rg = class extends Qn { constructor() { super("format"); } getValue(k) { return k.key; } dropdown() { return new tg(); } }; class ng extends qn { constructor() { const k = Tf.map((e) => $e("div", `${lt}-item`).on("click", () => { this.hide(), this.change(e); }).child(e.key)); super(new Kr("formula"), "180px", !0, "bottom-left", ...k); } } class ig extends Qn { constructor() { super("formula"); } getValue(k) { return k.key; } dropdown() { return new ng(); } } class ag extends di { constructor() { super("freeze"); } } class og extends di { constructor() { super("merge"); } setState(k, e) { this.el.active(k).disabled(e); } } class sg extends es { constructor() { super("redo", "Ctrl+Y"); } } class fg extends es { constructor() { super("undo", "Ctrl+Z"); } } class ug extends es { constructor() { super("print", "Ctrl+P"); } } class lg extends di { constructor() { super("textwrap"); } } let cg = class extends qn { constructor() { const k = new Kr("ellipsis"), e = $e("div", `${lt}-toolbar-more`); super(k, "auto", !1, "bottom-right", e), this.moreBtns = e, this.contentEl.css("max-width", "420px"); } }; class hg extends Qn { constructor() { super("more"), this.el.hide(); } dropdown() { return new cg(); } show() { this.el.show(); } hide() { this.el.hide(); } } function ma() { return $e("div", `${lt}-toolbar-divider`); } function dg() { this.btns2 = [], this.items.forEach((H) => { if (Array.isArray(H)) H.forEach(({ el: k }) => { const e = k.box(), { marginLeft: x, marginRight: _ } = k.computedStyle(); this.btns2.push([k, e.width + parseInt(x, 10) + parseInt(_, 10)]); }); else { const k = H.box(), { marginLeft: e, marginRight: x } = H.computedStyle(); this.btns2.push([H, k.width + parseInt(e, 10) + parseInt(x, 10)]); } }); } function Zl() { const { el: H, btns: k, moreEl: e, btns2: x } = this, { moreBtns: _, contentEl: u } = e.dd; H.css("width", `${this.widthFn() - 60}px`); const m = H.box(); let g = 160, b = 12; const w = [], f = []; x.forEach(([y, h], l) => { g += h, l === x.length - 1 || g < m.width ? w.push(y) : (b += h, f.push(y)); }), k.html("").children(...w), _.html("").children(...f), u.css("width", `${b}px`), f.length > 0 ? e.show() : e.hide(); } class pg { constructor(k, e, x = !1) { this.data = k, this.change = () => { }, this.widthFn = e, this.isHide = x; const _ = k.defaultStyle(); this.items = [ [ this.undoEl = new fg(), this.redoEl = new sg(), new ug(), this.paintformatEl = new Gb(), this.clearformatEl = new Kb() ], ma(), [ this.formatEl = new rg() ], ma(), [ this.fontEl = new eg(), this.fontSizeEl = new Qb() ], ma(), [ this.boldEl = new Db(), this.italicEl = new Nb(), this.underlineEl = new Bb(), this.strikeEl = new Fb(), this.textColorEl = new Yb(_.color) ], ma(), [ this.fillColorEl = new Zb(_.bgcolor), this.borderEl = new Vb(), this.mergeEl = new og() ], ma(), [ this.alignEl = new Ab(_.align), this.valignEl = new Mb(_.valign), this.textwrapEl = new lg() ], ma(), [ this.freezeEl = new ag(), this.autofilterEl = new Ib(), this.formulaEl = new ig(), this.moreEl = new hg() ] ], this.el = $e("div", `${lt}-toolbar`), this.btns = $e("div", `${lt}-toolbar-btns`), this.items.forEach((u) => { Array.isArray(u) ? u.forEach((m) => { this.btns.child(m.el), m.change = (...g) => { this.change(...g); }; }) : this.btns.child(u.el); }), this.el.child(this.btns), x ? this.el.hide() : (this.reset(), setTimeout(() => { dg.call(this), Zl.call(this); }, 0), ln(window, "resize", () => { Zl.call(this); })); } paintformatActive() { return this.paintformatEl.active(); } paintformatToggle() { this.paintformatEl.toggle(); } trigger(k) { this[`${k}El`].click(); } resetData(k) { this.data = k, this.reset(); } reset() { if (this.isHide) return; const { data: k } = this, e = k.getSelectedCellStyle(); this.undoEl.setState(!k.canUndo()), this.redoEl.setState(!k.canRedo()), this.mergeEl.setState(k.canUnmerge(), !k.selector.multiple()), this.autofilterEl.setState(!k.canAutofilter()); const { font: x, format: _ } = e; this.formatEl.setState(_), this.fontEl.setState(x.name), this.fontSizeEl.setState(x.size), this.boldEl.setState(x.bold), this.italicEl.setState(x.italic), this.underlineEl.setState(e.underline), this.strikeEl.setState(e.strike), this.textColorEl.setState(e.color), this.fillColorEl.setState(e.bgcolor), this.alignEl.setState(e.align), this.valignEl.setState(e.valign), this.textwrapEl.setState(e.textwrap), this.freezeEl.setState(k.freezeIsActive()); } } class yg { constructor(k, e, x = "600px") { this.title = k, this.el = $e("div", `${lt}-modal`).css("width", x).children( $e("div", `${lt}-modal-header`).children( new Kr("close").on("click.stop", () => this.hide()), this.title ), $e("div", `${lt}-modal-content`).children(...e) ).hide(); } show() { this.dimmer = $e("div", `${lt}-dimmer active`), document.body.appendChild(this.dimmer.el); const { width: k, height: e } = this.el.show().box(), { clientHeight: x, clientWidth: _ } = document.documentElement; this.el.offset({ left: (_ - k) / 2, top: (x - e) / 3 }), window.xkeydownEsc = (u) => { u.keyCode === 27 && this.hide(); }, ln(window, "keydown", window.xkeydownEsc); } hide() { this.el.hide(), document.body.removeChild(this.dimmer.el), Go(window, "keydown", window.xkeydownEsc), delete window.xkeydownEsc; } } class ba { constructor(k, e) { this.vchange = () => { }, this.el = $e("div", `${lt}-form-input`), this.input = $e("input", "").css("width", k).on("input", (x) => this.vchange(x)).attr("placeholder", e), this.el.child(this.input); } focus() { setTimeout(() => { this.input.el.focus(); }, 10); } hint(k) { this.input.attr("placeholder", k); } val(k) { return this.input.val(k); } } class tf { constructor(k, e, x, _ = (m) => m, u = () => { }) { this.key = k, this.getTitle = _, this.vchange = () => { }, this.el = $e("div", `${lt}-form-select`), this.suggest = new wc(e.map((m) => ({ key: m, title: this.getTitle(m) })), (m) => { this.itemClick(m.key), u(m.key), this.vchange(m.key); }, x, this.el), this.el.children( this.itemEl = $e("div", "input-text").html(this.getTitle(k)), this.suggest.el ).on("click", () => this.show()); } show() { this.suggest.search(""); } itemClick(k) { this.key = k, this.itemEl.html(this.getTitle(k)); } val(k) { return k !== void 0 ? (this.key = k, this.itemEl.html(this.getTitle(k)), this) : this.key; } } const vg = { number: /(^\d+$)|(^\d+(\.\d{0,4})?$)/, date: /^\d{4}-\d{1,2}-\d{1,2}$/ }; class Oi { constructor(k, e, x, _) { this.label = "", this.rule = e, x && (this.label = $e("label", "label").css("width", `${_}px`).html(x)), this.tip = $e("div", "tip").child("tip").hide(), this.input = k, this.input.vchange = () => this.validate(), this.el = $e("div", `${lt}-form-field`).children(this.label, k.el, this.tip); } isShow() { return this.el.css("display") !== "none"; } show() { this.el.show(); } hide() { return this.el.hide(), this; } val(k) { return this.input.val(k); } hint(k) { this.input.hint(k); } validate() { const { input: k, rule: e, tip: x, el: _ } = this, u = k.val(); return e.required && /^\s*$/.test(u) ? (x.html(Cr("validation.required")), _.addClass("error"), !1) : (e.type || e.pattern) && !(e.pattern || vg[e.type]).test(u) ? (x.html(Cr("validation.notMatch")), _.addClass("error"), !1) : (_.removeClass("error"), !0); } } const Jl = 100; class mg extends yg { constructor() { const k = new Oi( new tf( "cell", ["cell"], // cell|row|column "100%", (w) => Cr(`dataValidation.modeType.${w}`) ), { required: !0 }, `${Cr("dataValidation.range")}:`, Jl ), e = new Oi( new ba("120px", "E3 or E3:F12"), { required: !0, pattern: /^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/ } ), x = new Oi( new tf( "list", ["list", "number", "date", "phone", "email"], "100%", (w) => Cr(`dataValidation.type.${w}`), (w) => this.criteriaSelected(w) ), { required: !0 }, `${Cr("dataValidation.criteria")}:`, Jl ), _ = new Oi( new tf( "be", ["be", "nbe", "eq", "neq", "lt", "lte", "gt", "gte"], "160px", (w) => Cr(`dataValidation.operator.${w}`), (w) => this.criteriaOperatorSelected(w) ), { required: !0 } ).hide(), u = new Oi( new ba("70px", "10"), { required: !0 } ).hide(), m = new Oi( new ba("70px", "100"), { required: !0, type: "number" } ).hide(), g = new Oi( new ba("120px", "a,b,c"), { required: !0 } ), b = new Oi( new ba("70px", "10"), { required: !0, type: "number" } ).hide(); super(Cr("contextmenu.validation"), [ $e("div", `${lt}-form-fields`).children( k.el, e.el ), $e("div", `${lt}-form-fields`).children( x.el, _.el, u.el, m.el, b.el, g.el ), $e("div", `${lt}-buttons`).children( new Li("cancel").on("click", () => this.btnClick("cancel")), new Li("remove").on("click", () => this.btnClick("remove")), new Li("save", "primary").on("click", () => this.btnClick("save")) ) ]), this.mf = k, this.rf = e, this.cf = x, this.of = _, this.minvf = u, this.maxvf = m, this.vf = b, this.svf = g, this.change = () => { }; } showVf(k) { const e = k === "date" ? "2018-11-12" : "10", { vf: x } = this; x.input.hint(e), x.show(); } criteriaSelected(k) { const { of: e, minvf: x, maxvf: _, vf: u, svf: m } = this; k === "date" || k === "number" ? (e.show(), x.rule.type = k, _.rule.type = k, k === "date" ? (x.hint("2018-11-12"), _.hint("2019-11-12")) : (x.hint("10"), _.hint("100")), x.show(), _.show(), u.hide(), m.hide()) : (k === "list" ? m.show() : m.hide(), u.hide(), e.hide(), x.hide(), _.hide()); } criteriaOperatorSelected(k) { if (!k) return; const { minvf: e, maxvf: x, vf: _ } = this; if (k === "be" || k === "nbe") e.show(), x.show(), _.hide(); else { const u = this.cf.val(); _.rule.type = u, u === "date" ? _.hint("2018-11-12") : _.hint("10"), _.show(), e.hide(), x.hide(); } } btnClick(k) { if (k === "cancel") this.hide(); else if (k === "remove") this.change("remove"), this.hide(); else if (k === "save") { const e = ["mf", "rf", "cf", "of", "svf", "vf", "minvf", "maxvf"]; for (let b = 0; b < e.length; b += 1) { const w = this[e[b]]; if (w.isShow() && !w.validate()) return; } const x = this.mf.val(), _ = this.rf.val(), u = this.cf.val(), m = this.of.val(); let g = this.svf.val(); (u === "number" || u === "date") && (m === "be" || m === "nbe" ? g = [this.minvf.val(), this.maxvf.val()] : g = this.vf.val()), this.change( "save", x, _, { type: u, operator: m, required: !1, value: g } ), this.hide(); } } // validation: { mode, ref, validator } setValue(k) { if (k) { const { mf: e, rf: x, cf: _, of: u, svf: m, vf: g, minvf: b, maxvf: w } = this, { mode: f, ref: y, validator: h } = k, { type: l, operator: d, value: s } = h || { type: "list" }; e.val(f || "cell"), x.val(y), _.val(l), u.val(d), Array.isArray(s) ? (b.val(s[0]), w.val(s[1])) : (m.val(s || ""), g.val(s || "")), this.criteriaSelected(l), this.criteriaOperatorSelected(d); } this.show(); } } function Cc(H) { return $e("div", `${lt}-item ${H}`); } function Ql(H) { return Cc("state").child(Cr(`sort.${H}`)).on("click.stop", () => this.itemClick(H)); } function bg(H) { const { filterbEl: k, filterValues: e } = this; k.html(""), Object.keys(H).forEach((_, u) => { const m = H[_], g = e.includes(_) ? "checked" : ""; k.child($e("div", `${lt}-item state ${g}`).on("click.stop", () => this.filterClick(u, _)).children(_ === "" ? Cr("filter.empty") : _, $e("div", "label").html(`(${m})`))); }); } function ql() { const { filterhEl: H, filterValues: k, values: e } = this; H.html(`${k.length} / ${e.length}`), H.checked(k.length === e.length); } class gg { constructor() { this.filterbEl = $e("div", `${lt}-body`), this.filterhEl = $e("div", `${lt}-header state`).on("click.stop", () => this.filterClick(0, "all")), this.el = $e("div", `${lt}-sort-filter`).children( this.sortAscEl = Ql.call(this, "asc"), this.sortDescEl = Ql.call(this, "desc"), Cc("divider"), $e("div", `${lt}-filter`).children( this.filterhEl, this.filterbEl ), $e("div", `${lt}-buttons`).children( new Li("cancel").on("click", () => this.btnClick("cancel")), new Li("ok", "primary").on("click", () => this.btnClick("ok")) ) ).hide(), this.ci = null, this.sortDesc = null, this.values = null, this.filterValues = []; } btnClick(k) { if (k === "ok") { const { ci: e, sort: x, filterValues: _ } = this; this.ok && this.ok(e, x, "in", _); } this.hide(); } itemClick(k) { this.sort = k; const { sortAscEl: e, sortDescEl: x } = this; e.checked(k === "asc"), x.checked(k === "desc"); } filterClick(k, e) { const { filterbEl: x, filterValues: _, values: u } = this, m = x.children(); e === "all" ? m.length === _.length ? (this.filterValues = [], m.forEach((g) => $e(g).checked(!1))) : (this.filterValues = Array.from(u), m.forEach((g) => $e(g).checked(!0))) : $e(m[k]).toggle("checked") ? _.push(e) : _.splice(_.findIndex((b) => b === e), 1), ql.call(this); } // v: autoFilter // items: {value: cnt} // sort { ci, order } set(k, e, x, _) { this.ci = k; const { sortAscEl: u, sortDescEl: m } = this; _ !== null ? (this.sort = _.order, u.checked(_.asc()), m.checked(_.desc())) : (this.sortDesc = null, u.checked(!1), m.checked(!1)), this.values = Object.keys(e), this.filterValues = x ? Array.from(x.value) : Object.keys(e), bg.call(this, e, x), ql.call(this); } setOffset(k) { this.el.offset(k).show(); let e = 1; Va(this.el, () => { e <= 0 && this.hide(), e -= 1; }); } show() { this.el.show(); } hide() { this.el.hide(), _a(this.el); } } function Pc(H, k) { const e = $e("div", `${lt}-toast`), x = $e("div", `${lt}-dimmer active`), _ = () => { document.body.removeChild(e.el), document.body.removeChild(x.el); }; e.children( $e("div", `${lt}-toast-header`).children( new Kr("close").on("click.stop", () => _()), H ), $e("div", `${lt}-toast-content`).html(k) ), document.body.appendChild(e.el), document.body.appendChild(x.el); const { width: u, height: m } = e.box(), { clientHeight: g, clientWidth: b } = document.documentElement; e.offset({ left: (b - u) / 2, top: (g - m) / 3 }); } function rf(H, k) { let e; return (...x) => { const _ = this, u = x; e || (e = setTimeout(() => { e = null, H.apply(_, u); }, k)); }; } function _g() { const { data: H, verticalScrollbar: k, horizontalScrollbar: e } = this, { l: x, t: _, left: u, top: m, width: g, height: b } = H.getSelectedRect(), w = this.getTableOffset(); if (Math.abs(u) + g > w.width) e.move({ left: x + g - w.width }); else { const f = H.freezeTotalWidth(); u < f && e.move({ left: x - 1 - f }); } if (Math.abs(m) + b > w.height) k.move({ top: _ + b - w.height - 1 }); else { const f = H.freezeTotalHeight(); m < f && k.move({ top: _ - 1 - f }); } } function zi(H, k, e, x = !0, _ = !1) { if (k === -1 && e === -1) return; const { table: u, selector: m, toolbar: g, data: b, contextMenu: w } = this; w.setMode(k === -1 || e === -1 ? "row-col" : "range"); const f = b.getCell(k, e); H ? (m.setEnd(k, e, _), this.trigger("cells-selected", f, m.range)) : (m.set(k, e, x), this.trigger("cell-selected", f, k, e)), g.reset(), u.render(); } function Zn(H, k) { const { selector: e, data: x } = this, { rows: _, cols: u } = x; let [m, g] = e.indexes; const { eri: b, eci: w } = e.range; H && ([m, g] = e.moveIndexes), k === "left" ? g > 0 && (g -= 1) : k === "right" ? (w !== g && (g = w), g < u.len - 1 && (g += 1)) : k === "up" ? m > 0 && (m -= 1) : k === "down" ? (b !== m && (m = b), m < _.len - 1 && (m += 1)) : k === "row-first" ? g = 0 : k === "row-last" ? g = u.len - 1 : k === "col-first" ? m = 0 : k === "col-last" && (m = _.len - 1), H && (e.moveIndexes = [m, g]), zi.call(this, H, m, g), _g.call(this); } function wg(H) { if (H.buttons !== 0 || H.target.className === `${lt}-resizer-hover`) return; const { offsetX: k, offsetY: e } = H, { rowResizer: x, colResizer: _, tableEl: u, data: m } = this, { rows: g, cols: b } = m; if (k > b.indexWidth && e > g.height) { x.hide(), _.hide(); return; } const w = u.box(), f = m.getCellRectByXY(H.offsetX, H.offsetY); f.ri >= 0 && f.ci === -1 ? (f.width = b.indexWidth, x.show(f, { width: w.width }), g.isHide(f.ri - 1) ? x.showUnhide(f.ri) : x.hideUnhide()) : x.hide(), f.ri === -1 && f.ci >= 0 ? (f.height = g.height, _.show(f, { height: w.height }), b.isHide(f.ci - 1) ? _.showUnhide(f.ci) : _.hideUnhide()) : _.hide(); } function xg(H) { const { verticalScrollbar: k, horizontalScrollbar: e, data: x } = this, { top: _ } = k.scroll(), { left: u } = e.scroll(), { rows: m, cols: g } = x, { deltaY: b, deltaX: w } = H, f = (v, c) => { let a = v, r = 0; do r = c(a), a += 1; while (r <= 0); return r; }, y = (v) => { if (v > 0) { const c = x.scroll.ri + 1; if (c < m.len) { const a = f(c, (r) => m.getHeight(r)); k.move({ top: _ + a - 1 }); } } else { const c = x.scroll.ri - 1; if (c >= 0) { const a = f(c, (r) => m.getHeight(r)); k.move({ top: c === 0 ? 0 : _ - a }); } } }, h = (v) => { if (v > 0) { const c = x.scroll.ci + 1; if (c < g.len) { const a = f(c, (r) => g.getWidth(r)); e.move({ left: u + a - 1 }); } } else { const c = x.scroll.ci - 1; if (c >= 0) { const a = f(c, (r) => g.getWidth(r)); e.move({ left: c === 0 ? 0 : u - a }); } } }, l = Math.abs(b), d = Math.abs(w), s = Math.max(l, d); /Firefox/i.test(window.navigator.userAgent) && rf(y(H.detail), 50), s === d && rf(h(w), 50), s === l && rf(y(b), 50); } function Sg(H, k) { const { verticalScrollbar: e, horizontalScrollbar: x } = this, { top: _ } = e.scroll(), { left: u } = x.scroll(); H === "left" || H === "right" ? x.move({ left: u - k }) : (H === "up" || H === "down") && e.move({ top: _ - k }); } function Pf() { const { data: H, verticalScrollbar: k } = this, { height: e } = this.getTableOffset(), x = H.exceptRowTotalHeight(0, -1); k.set(e, H.rows.totalHeight() - x); } function Af() { const { data: H, horizontalScrollbar: k } = this, { width: e } = this.getTableOffset(); H && k.set(e, H.cols.totalWidth()); } function kg() { const { selector: H, data: k, editor: e } = this, [x, _] = k.freeze; if (x > 0 || _ > 0) { const u = k.freezeTotalWidth(), m = k.freezeTotalHeight(); e.setFreezeLengths(u, m); } H.resetAreaOffset(); } function un() { const { tableEl: H, overlayerEl: k, overlayerCEl: e, table: x, toolbar: _, selector: u, el: m } = this, g = this.getTableOffset(), b = this.getRect(); H.attr(b), k.offset(b), e.offset(g), m.css("width", `${b.width}px`), Pf.call(this), Af.call(this), kg.call(this), x.render(), _.reset(), u.reset(); } function Ka() { const { data: H, selector: k } = this; H.clearClipboard(), k.hideClipboard(); } function bf() { const { data: H, selector: k } = this; H.copy(), H.copyToSystemClipboard(), k.showClipboard(); } function ec() { const { data: H, selector: k } = this; H.cut(), k.showClipboard(); } function Ua(H, k) { const { data: e } = this; if (e.settings.mode !== "read") { if (e.paste(H, (x) => Pc("Tip", x))) un.call(this); else if (k) { const x = k.clipboardData.getData("text/plain"); this.data.pasteFromText(x), un.call(this); } } } function Og() { this.data.hideRowsOrCols(), un.call(this); } function tc(H, k) { this.data.unhideRowsOrCols(H, k), un.call(this); } function Eg() { const { data: H } = this; H.autofilter(), un.call(this); } function Tg() { const { toolbar: H } = this; H.paintformatActive() && (Ua.call(this, "format"), Ka.call(this), H.paintformatToggle()); } function rc(H) { const { selector: k, data: e, table: x, sortFilter: _ } = this, { offsetX: u, offsetY: m } = H, g = H.target.className === `${lt}-selector-corner`, b = e.getCellRectByXY(u, m), { left: w, top: f, width: y, height: h } = b; let { ri: l, ci: d } = b; const { autoFilter: s } = e; if (s.includes(l, d) && w + y - 20 < u && f + h - 20 < m) { const v = s.items(d, (c, a) => e.rows.getCell(c, a)); _.hide(), _.set(d, v, s.getFilter(d), s.getSort(d)), _.setOffset({ left: w, top: f + h + 2 }); return; } H.shiftKey || (g ? k.showAutofill(l, d) : zi.call(this, !1, l, d), vc(window, (v) => { ({ ri: l, ci: d } = e.getCellRectByXY(v.offsetX, v.offsetY)), g ? k.showAutofill(l, d) : v.buttons === 1 && !v.shiftKey && zi.call(this, !0, l, d, !0, !0); }, () => { g && k.arange && e.settings.mode !== "read" && e.autofill(k.arange, "all", (v) => Pc("Tip", v)) && x.render(), k.hideAutofill(), Tg.call(this); })), !g && H.buttons === 1 && H.shiftKey && zi.call(this, !0, l, d); } function Ga() { const { editor: H, data: k } = this, e = k.getSelectedRect(), x = this.getTableOffset(); let _ = "top"; e.top > x.height / 2 && (_ = "bottom"), H.setOffset(e, _); } function $a() { const { editor: H, data: k } = this; k.settings.mode !== "read" && (Ga.call(this), H.setCell(k.getSelectedCell(), k.getSelectedValidator()), Ka.call(this)); } function Rg(H) { const { data: k, table: e, selector: x } = this; k.scrolly(H, () => { x.resetBRLAreaOffset(), Ga.call(this), e.render(); }); } function Cg(H) { const { data: k, table: e, selector: x } = this; k.scrollx(H, () => { x.resetBRTAreaOffset(), Ga.call(this), e.render(); }); } function Pg(H, k) { const { ri: e } = H, { table: x, selector: _, data: u } = this; u.rows.setHeight(e, k), x.render(), _.resetAreaOffset(), Pf.call(this), Ga.call(this); } function Ag(H, k) { const { ci: e } = H, { table: x, selector: _, data: u } = this; u.cols.setWidth(e, k), x.render(), _.resetAreaOffset(), Af.call(this), Ga.call(this); } function nf(H, k = "finished") { const { data: e, table: x } = this; if (e.settings.mode === "read") return; e.setSelectedCellText(H, k); const { ri: _, ci: u } = e.selector; k === "finished" ? x.render() : this.trigger("cell-edited", H, _, u); } function Uo(H) { const { data: k } = this; k.settings.mode !== "read" && (H === "insert-row" ? k.insert("row") : H === "delete-row" ? k.delete("row") : H === "insert-column" ? k.insert("column") : H === "delete-column" ? k.delete("column") : H === "delete-cell" ? k.deleteCell() : H === "delete-cell-format" ? k.deleteCell("format") : H === "delete-cell-text" ? k.deleteCell("text") : H === "cell-printable" ? k.setSelectedCellAttr("printable", !0) : H === "cell-non-printable" ? k.setSelectedCellAttr("printable", !1) : H === "cell-editable" ? k.setSelectedCellAttr("editable", !0) : H === "cell-non-editable" && k.setSelectedCellAttr("editable", !1), Ka.call(this), un.call(this)); } function Mg(H, k) { const { data: e } = this; if (H === "undo") this.undo(); else if (H === "redo") this.redo(); else if (H === "print") this.print.preview(); else if (H === "paintformat") k === !0 ? bf.call(this) : Ka.call(this); else if (H === "clearformat") Uo.call(this, "delete-cell-format"); else if (H !== "link") { if (H !== "chart") if (H === "autofilter") Eg.call(this); else if (H === "freeze") if (k) { const { ri: x, ci: _ } = e.selector; this.freeze(x, _); } else this.freeze(0, 0); else e.setSelectedCellAttr(H, k), H === "formula" && !e.selector.multiple() && $a.call(this), un.call(this); } } function Ig(H, k, e, x) { this.data.setAutoFilter(H, k, e, x), un.call(this); } function Dg() { const { selector: H, overlayerEl: k, rowResizer: e, colResizer: x, verticalScrollbar: _, horizontalScrollbar: u, editor: m, contextMenu: g, toolbar: b, modalValidation: w, sortFilter: f } = this; k.on("mousemove", (y) => { wg.call(this, y); }).on("mousedown", (y) => { m.clear(), g.hide(), y.buttons === 2 ? (this.data.xyInSelectedRect(y.offsetX, y.offsetY) || rc.call(this, y), g.setPosition(y.offsetX, y.offsetY), y.stopPropagation()) : y.detail === 2 ? $a.call(this) : rc.call(this, y); }).on("mousewheel.stop", (y) => { xg.call(this, y); }).on("mouseout", (y) => { const { offsetX: h, offsetY: l } = y; l <= 0 && x.hide(), h <= 0 && e.hide(); }), H.inputChange = (y) => { nf.call(this, y, "input"), $a.call(this); }, Hm(k.el, { move: (y, h) => { Sg.call(this, y, h); } }), b.change = (y, h) => Mg.call(this, y, h), f.ok = (y, h, l, d) => Ig.call(this, y, h, l, d), e.finishedFn = (y, h) => { Pg.call(this, y, h); }, x.finishedFn = (y, h) => { Ag.call(this, y, h); }, e.unhideFn = (y) => { tc.call(this, "row", y); }, x.unhideFn = (y) => { tc.call(this, "col", y); }, _.moveFn = (y, h) => { Rg.call(this, y, h); }, u.moveFn = (y, h) => { Cg.call(this, y, h); }, m.change = (y, h) => { nf.call(this, h, y); }, w.change = (y, ...h) => { y === "save" ? this.data.addValidation(...h) : this.data.removeValidation(); }, g.itemClick = (y) => { y === "validation" ? w.setValue(this.data.getSelectedValidation()) : y === "copy" ? bf.call(this) : y === "cut" ? ec.call(this) : y === "paste" ? Ua.call(this, "all") : y === "paste-value" ? Ua.call(this, "text") : y === "paste-format" ? Ua.call(this, "format") : y === "hide" ? Og.call(this) : Uo.call(this, y); }, ln(window, "resize", () => { this.reload(); }), ln(window, "click", (y) => { this.focusing = k.contains(y.target); }), ln(window, "paste", (y) => { this.focusing && (Ua.call(this, "all", y), y.preventDefault()); }), ln(window, "keydown", (y) => { if (!this.focusing) return; const h = y.keyCode || y.which, { key: l, ctrlKey: d, shiftKey: s, metaKey: v } = y; if (d || v) switch (h) { case 90: this.undo(), y.preventDefault(); break; case 89: this.redo(), y.preventDefault(); break; case 67: bf.call(this), y.preventDefault(); break; case 88: ec.call(this), y.preventDefault(); break; case 85: b.trigger("underline"), y.preventDefault(); break; case 86: break; case 37: Zn.call(this, s, "row-first"), y.preventDefault(); break; case 38: Zn.call(this, s, "col-first"), y.preventDefault(); break; case 39: Zn.call(this, s, "row-last"), y.preventDefault(); break; case 40: Zn.call(this, s, "col-last"), y.preventDefault(); break; case 32: zi.call(this, !1, -1, this.data.selector.ci, !1), y.preventDefault(); break; case 66: b.trigger("bold"); break; case 73: b.trigger("italic"); break; } else { switch (h) { case 32: s && zi.call(this, !1, this.data.selector.ri, -1, !1); break; case 27: g.hide(), Ka.call(this); break; case 37: Zn.call(this, s, "left"), y.preventDefault(); break; case 38: Zn.call(this, s, "up"), y.preventDefault(); break; case 39: Zn.call(this, s, "right"), y.preventDefault(); break; case 40: Zn.call(this, s, "down"), y.preventDefault(); break; case 9: m.clear(), Zn.call(this, !1, s ? "left" : "right"), y.preventDefault(); break; case 13: m.clear(), Zn.call(this, !1, s ? "up" : "down"), y.preventDefault(); break; case 8: Uo.call(this, "delete-cell-text"), y.preventDefault(); break; } l === "Delete" ? (Uo.call(this, "delete-cell-text"), y.preventDefault()) : h >= 65 && h <= 90 || h >= 48 && h <= 57 || h >= 96 && h <= 105 || y.key === "=" ? (nf.call(this, y.key, "input"), $a.call(this)) : h === 113 && $a.call(this); } }); } class Ng { constructor(k, e) { this.eventMap = Xm(); const { view: x, showToolbar: _, showContextmenu: u } = e.settings; this.el = $e("div", `${lt}-sheet`), this.toolbar = new pg(e, x.width, !_), this.print = new kb(e), k.children(this.toolbar.el, this.el, this.print.el), this.data = e, this.tableEl = $e("canvas", `${lt}-table`), this.rowResizer = new jl(!1, e.rows.height), this.colResizer = new jl(!0, e.cols.minWidth), this.verticalScrollbar = new Ll(!0), this.horizontalScrollbar = new Ll(!1), this.editor = new ob( db, () => this.getTableOffset(), e.rows.height ), this.modalValidation = new mg(), this.contextMenu = new Rb(() => this.getRect(), !u), this.selector = new Wm(e), this.overlayerCEl = $e("div", `${lt}-overlayer-content`).children( this.editor.el, this.selector.el ), this.overlayerEl = $e("div", `${lt}-overlayer`).child(this.overlayerCEl), this.sortFilter = new gg(), this.el.children( this.tableEl, this.overlayerEl.el, this.rowResizer.el, this.colResizer.el, this.verticalScrollbar.el, this.horizontalScrollbar.el, this.contextMenu.el, this.modalValidation.el, this.sortFilter.el ), this.table = new wb(this.tableEl.el, e), Dg.call(this), un.call(this), zi.call(this, !1, 0, 0); } on(k, e) { return this.eventMap.on(k, e), this; } trigger(k, ...e) { const { eventMap: x } = this; x.fire(k, e); } resetData(k) { this.editor.clear(), this.data = k, Pf.call(this), Af.call(this), this.toolbar.resetData(k), this.print.resetData(k), this.selector.resetData(k), this.table.resetData(k); } loadData(k) { return this.data.setData(k), un.call(this), this; } // freeze rows or cols freeze(k, e) { const { data: x } = this; return x.setFreeze(k, e), un.call(this), this; } undo() { this.data.undo(), un.call(this); } redo() { this.data.redo(), un.call(this); } reload() { return un.call(this), this; } getRect() { const { data: k } = this; return { width: k.viewWidth(), height: k.viewHeight() }; } getTableOffset() { const { rows: k, cols: e } = this.data, { width: x, height: _ } = this.getRect(); return { width: x - e.indexWidth, height: _ - k.height, left: e.indexWidth, top: k.height }; } } class Fg extends qn { constructor(k) { const e = new Kr("ellipsis"); super(e, "auto", !1, "top-left"), this.contentClick = k; } reset(k) { const e = k.map((x, _) => $e("div", `${lt}-item`).css("width", "150px").css("font-weight", "normal").on("click", () => { this.contentClick(_), this.hide(); }).child(x)); this.setContentChildren(...e); } setTitle() { } } const Bg = [ { key: "delete", title: Jt("contextmenu.deleteSheet") } ]; function jg(H) { return $e("div", `${lt}-item`).child(H.title()).on("click", () => { this.itemClick(H.key), this.hide(); }); } function Lg() { return Bg.map((H) => jg.call(this, H)); } class zg { constructor() { this.el = $e("div", `${lt}-contextmenu`).css("width", "160px").children(...Lg.call(this)).hide(), this.itemClick = () => { }; } hide() { const { el: k } = this; k.hide(), _a(k); } setOffset(k) { const { el: e } = this; e.offset(k), e.show(), Va(e); } } class Hg { constructor(k = () => { }, e = () => { }, x = () => { }, _ = () => { }) { this.swapFunc = e, this.updateFunc = _, this.dataNames = [], this.activeEl = null, this.deleteEl = null, this.items = [], this.moreEl = new Fg((u) => { this.clickSwap2(this.items[u]); }), this.contextMenu = new zg(), this.contextMenu.itemClick = x, this.el = $e("div", `${lt}-bottombar`).children( this.contextMenu.el, this.menuEl = $e("ul", `${lt}-menu`).child( $e("li", "").children( new Kr("add").on("click", () => { k(); }), $e("span", "").child(this.moreEl) ) ) ); } addItem(k, e) { this.dataNames.push(k); const x = $e("li", e ? "active" : "").child(k); x.on("click", () => { this.clickSwap2(x); }).on("contextmenu", (_) => { const { offsetLeft: u, offsetHeight: m } = _.target; this.contextMenu.setOffset({ left: u, bottom: m + 1 }), this.deleteEl = x; }).on("dblclick", () => { const _ = x.html(), u = new ba("auto", ""); u.val(_), u.input.on("blur", ({ target: m }) => { const { value: g } = m, b = this.dataNames.findIndex((w) => w === _); this.renameItem(b, g); }), x.html("").child(u.el), u.focus(); }), e && this.clickSwap(x), this.items.push(x), this.menuEl.child(x), this.moreEl.reset(this.dataNames); } renameItem(k, e) { this.dataNames.splice(k, 1, e), this.moreEl.reset(this.dataNames), this.items[k].html("").child(e), this.updateFunc(k, e); } clear() { this.items.forEach((k) => { this.menuEl.removeChild(k.el); }), this.items = [], this.dataNames = [], this.moreEl.reset(this.dataNames); } deleteItem() { const { activeEl: k, deleteEl: e } = this; if (this.items.length > 1) { const x = this.items.findIndex((_) => _ === e); if (this.items.splice(x, 1), this.dataNames.splice(x, 1), this.menuEl.removeChild(e.el), this.moreEl.reset(this.dataNames), k === e) { const [_] = this.items; return this.activeEl = _, this.activeEl.toggle(), [x, 0]; } return [x, -1]; } return [-1]; } clickSwap2(k) { const e = this.items.findIndex((x) => x === k); this.clickSwap(k), this.activeEl.toggle(), this.swapFunc(e); } clickSwap(k) { this.activeEl !== null && this.activeEl.toggle(), this.activeEl = k; } } class Ac { constructor(k, e = {}) { let x = k; this.options = Qs({ showBottomBar: !0 }, e), this.sheetIndex = 1, this.datas = [], typeof k == "string" && (x = document.querySelector(k)), this.bottombar = this.options.showBottomBar ? new Hg(() => { const u = this.addSheet(); this.sheet.resetData(u); }, (u) => { const m = this.datas[u]; this.sheet.resetData(m); }, () => { this.deleteSheet(); }, (u, m) => { this.datas[u].name = m; }) : null, this.data = this.addSheet(); const _ = $e("div", `${lt}`).on("contextmenu", (u) => u.preventDefault()); x.appendChild(_.el), this.sheet = new Ng(_, this.data), this.bottombar !== null && _.child(this.bottombar.el); } addSheet(k, e = !0) { const x = k || `sheet${this.sheetIndex}`, _ = new zm(x, this.options); return _.change = (...u) => { this.sheet.trigger("change", ...u); }, this.datas.push(_), this.bottombar !== null && this.bottombar.addItem(x, e), this.sheetIndex += 1, _; } deleteSheet() { if (this.bottombar === null) return; const [k, e] = this.bottombar.deleteItem(); k >= 0 && (this.datas.splice(k, 1), e >= 0 && this.sheet.resetData(this.datas[e])); } loadData(k) { const e = Array.isArray(k) ? k : [k]; if (this.bottombar !== null && this.bottombar.clear(), this.datas = [], e.length > 0) for (let x = 0; x < e.length; x += 1) { const _ = e[x], u = this.addSheet(_.name, x === 0); u.setData(_), x === 0 && this.sheet.resetData(u); } return this; } getData() { return this.datas.map((k) => k.getData()); } cellText(k, e, x, _ = 0) { return this.datas[_].setCellText(k, e, x, "finished"), this; } cell(k, e, x = 0) { return this.datas[x].getCell(k, e); } cellStyle(k, e, x = 0) { return this.datas[x].getCellStyle(k, e); } reRender() { return this.sheet.table.render(), this; } on(k, e) { return this.sheet.on(k, e), this; } validate() { const { validations: k } = this.data; return k.errors.size <= 0; } change(k) { return this.sheet.on("change", k), this; } static locale(k, e) { pc(k, e); } } const Xg = (H, k = {}) => new Ac(H, k); window && (window.x_spreadsheet = Xg, window.x_spreadsheet.locale = (H, k) => pc(H, k)); var Wt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}; function zo(H) { throw new Error('Could not dynamically require "' + H + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var gf = {}, Ug = { get exports() { return gf; }, set exports(H) { gf = H; } }; (function(H, k) { (function(e) { H.exports = e(); })(function() { return function() { function e(x, _, u) { function m(w, f) { if (!_[w]) { if (!x[w]) { var y = typeof zo == "function" && zo; if (!f && y) return y(w, !0); if (g) return g(w, !0); var h = new Error("Cannot find module '" + w + "'"); throw h.code = "MODULE_NOT_FOUND", h; } var l = _[w] = { exports: {} }; x[w][0].call(l.exports, function(d) { var s = x[w][1][d]; return m(s || d); }, l, l.exports, e, x, _, u); } return _[w].exports; } for (var g = typeof zo == "function" && zo, b = 0; b < u.length; b++) m(u[b]); return m; } return e; }()({ 1: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n, o, p, O, P, F) { try { var z = i[P](F), N = z.value; } catch (M) { o(M); return; } z.done ? n(N) : Promise.resolve(N).then(p, O); } function g(i) { return function() { var n = this, o = arguments; return new Promise(function(p, O) { var P = i.apply(n, o); function F(N) { m(P, p, O, F, z, "next", N); } function z(N) { m(P, p, O, F, z, "throw", N); } F(void 0); }); }; } function b(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function w(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function f(i, n, o) { return n && w(i.prototype, n), o && w(i, o), i; } var y = e("fs"), h = e("fast-csv"), l = e("dayjs/plugin/customParseFormat"), d = e("dayjs/plugin/utc"), s = e("dayjs").extend(l).extend(d), v = e("../utils/stream-buf"), c = e("../utils/utils"), a = c.fs.exists, r = { true: !0, false: !1, "#N/A": { error: "#N/A" }, "#REF!": { error: "#REF!" }, "#NAME?": { error: "#NAME?" }, "#DIV/0!": { error: "#DIV/0!" }, "#NULL!": { error: "#NULL!" }, "#VALUE!": { error: "#VALUE!" }, "#NUM!": { error: "#NUM!" } }, t = /* @__PURE__ */ function() { function i(n) { b(this, i), this.workbook = n, this.worksheet = null; } return f(i, [{ key: "readFile", value: function() { var n = g(/* @__PURE__ */ regeneratorRuntime.mark(function p(O, P) { var F, z; return regeneratorRuntime.wrap(function(M) { for (; ; ) switch (M.prev = M.next) { case 0: return P = P || {}, M.next = 3, a(O); case 3: if (M.sent) { M.next = 5; break; } throw new Error("File not found: ".concat(O)); case 5: return F = y.createReadStream(O), M.next = 8, this.read(F, P); case 8: return z = M.sent, F.close(), M.abrupt("return", z); case 11: case "end": return M.stop(); } }, p, this); })); function o(p, O) { return n.apply(this, arguments); } return o; }() }, { key: "read", value: function(o, p) { var O = this; return p = p || {}, new Promise(function(P, F) { var z = O.workbook.addWorksheet(p.sheetName), N = p.dateFormats || ["YYYY-MM-DD[T]HH:mm:ssZ", "YYYY-MM-DD[T]HH:mm:ss", "MM-DD-YYYY", "YYYY-MM-DD"], M = p.map || function(R) { if (R === "") return null; var C = Number(R); if (!Number.isNaN(C) && C !== 1 / 0) return C; var E = N.reduce(function(L, $) { if (L) return L; var W = s(R, $, !0); return W.isValid() ? W : null; }, null); if (E) return new Date(E.valueOf()); var A = r[R]; return A !== void 0 ? A : R; }, I = h.parse(p.parserOptions).on("data", function(R) { z.addRow(R.map(M)); }).on("end", function() { I.emit("worksheet", z); }); I.on("worksheet", P).on("error", F), o.pipe(I); }); } /** * @deprecated since version 4.0. You should use `CSV#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md */ }, { key: "createInputStream", value: function() { throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md"); } }, { key: "write", value: function(o, p) { var O = this; return new Promise(function(P, F) { p = p || {}; var z = O.workbook.getWorksheet(p.sheetName || p.sheetId), N = h.format(p.formatterOptions); o.on("finish", function() { P(); }), N.on("error", F), N.pipe(o); var M = p, I = M.dateFormat, R = M.dateUTC, C = p.map || function(L) { if (L) { if (L.text || L.hyperlink) return L.hyperlink || L.text || ""; if (L.formula || L.result) return L.result || ""; if (L instanceof Date) return I ? R ? s.utc(L).format(I) : s(L).format(I) : R ? s.utc(L).format() : s(L).format(); if (L.error) return L.error; if (u(L) === "object") return JSON.stringify(L); } return L; }, E = p.includeEmptyRows === void 0 || p.includeEmptyRows, A = 1; z && z.eachRow(function(L, $) { if (E) for (; A++ < $ - 1; ) N.write([]); var W = L.values; W.shift(), N.write(W.map(C)), A = $; }), N.end(); }); } }, { key: "writeFile", value: function(o, p) { p = p || {}; var O = { encoding: p.encoding || "utf8" }, P = y.createWriteStream(o, O); return this.write(P, p); } }, { key: "writeBuffer", value: function() { var n = g(/* @__PURE__ */ regeneratorRuntime.mark(function p(O) { var P; return regeneratorRuntime.wrap(function(z) { for (; ; ) switch (z.prev = z.next) { case 0: return P = new v(), z.next = 3, this.write(P, O); case 3: return z.abrupt("return", P.read()); case 4: case "end": return z.stop(); } }, p, this); })); function o(p) { return n.apply(this, arguments); } return o; }() }]), i; }(); x.exports = t; }, { "../utils/stream-buf": 23, "../utils/utils": 26, dayjs: 336, "dayjs/plugin/customParseFormat": 337, "dayjs/plugin/utc": 338, "fast-csv": 369, fs: 215 }], 2: [function(e, x, _) { function u(f, y) { if (!(f instanceof y)) throw new TypeError("Cannot call a class as a function"); } function m(f, y) { for (var h = 0; h < y.length; h++) { var l = y[h]; l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(f, l.key, l); } } function g(f, y, h) { return y && m(f.prototype, y), h && m(f, h), f; } var b = e("../utils/col-cache"), w = /* @__PURE__ */ function() { function f(y, h) { var l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (u(this, f), !h) this.nativeCol = 0, this.nativeColOff = 0, this.nativeRow = 0, this.nativeRowOff = 0; else if (typeof h == "string") { var d = b.decodeAddress(h); this.nativeCol = d.col + l, this.nativeColOff = 0, this.nativeRow = d.row + l, this.nativeRowOff = 0; } else h.nativeCol !== void 0 ? (this.nativeCol = h.nativeCol || 0, this.nativeColOff = h.nativeColOff || 0, this.nativeRow = h.nativeRow || 0, this.nativeRowOff = h.nativeRowOff || 0) : h.col !== void 0 ? (this.col = h.col + l, this.row = h.row + l) : (this.nativeCol = 0, this.nativeColOff = 0, this.nativeRow = 0, this.nativeRowOff = 0); this.worksheet = y; } return g(f, [{ key: "col", get: function() { return this.nativeCol + Math.min(this.colWidth - 1, this.nativeColOff) / this.colWidth; }, set: function(h) { this.nativeCol = Math.floor(h), this.nativeColOff = Math.floor((h - this.nativeCol) * this.colWidth); } }, { key: "row", get: function() { return this.nativeRow + Math.min(this.rowHeight - 1, this.nativeRowOff) / this.rowHeight; }, set: function(h) { this.nativeRow = Math.floor(h), this.nativeRowOff = Math.floor((h - this.nativeRow) * this.rowHeight); } }, { key: "colWidth", get: function() { return this.worksheet && this.worksheet.getColumn(this.nativeCol + 1) && this.worksheet.getColumn(this.nativeCol + 1).isCustomWidth ? Math.floor(this.worksheet.getColumn(this.nativeCol + 1).width * 1e4) : 64e4; } }, { key: "rowHeight", get: function() { return this.worksheet && this.worksheet.getRow(this.nativeRow + 1) && this.worksheet.getRow(this.nativeRow + 1).height ? Math.floor(this.worksheet.getRow(this.nativeRow + 1).height * 1e4) : 18e4; } }, { key: "model", get: function() { return { nativeCol: this.nativeCol, nativeColOff: this.nativeColOff, nativeRow: this.nativeRow, nativeRowOff: this.nativeRowOff }; }, set: function(h) { this.nativeCol = h.nativeCol, this.nativeColOff = h.nativeColOff, this.nativeRow = h.nativeRow, this.nativeRowOff = h.nativeRowOff; } }], [{ key: "asInstance", value: function(h) { return h instanceof f || h == null ? h : new f(h); } }]), f; }(); x.exports = w; }, { "../utils/col-cache": 19 }], 3: [function(e, x, _) { function u(z, N) { if (!(z instanceof N)) throw new TypeError("Cannot call a class as a function"); } function m(z, N) { for (var M = 0; M < N.length; M++) { var I = N[M]; I.enumerable = I.enumerable || !1, I.configurable = !0, "value" in I && (I.writable = !0), Object.defineProperty(z, I.key, I); } } function g(z, N, M) { return N && m(z.prototype, N), M && m(z, M), z; } var b = e("../utils/col-cache"), w = e("../utils/under-dash"), f = e("./enums"), y = e("../utils/shared-formula"), h = y.slideFormula, l = e("./note"), d = /* @__PURE__ */ function() { function z(N, M, I) { if (u(this, z), !N || !M) throw new Error("A Cell needs a Row"); this._row = N, this._column = M, b.validateAddress(I), this._address = I, this._value = F.create(z.Types.Null, this), this.style = this._mergeStyle(N.style, M.style, {}), this._mergeCount = 0; } return g(z, [{ key: "destroy", // help GC by removing cyclic (and other) references value: function() { delete this.style, delete this._value, delete this._row, delete this._column, delete this._address; } // ========================================================================= // Styles stuff }, { key: "_mergeStyle", value: function(M, I, R) { var C = M && M.numFmt || I && I.numFmt; C && (R.numFmt = C); var E = M && M.font || I && I.font; E && (R.font = E); var A = M && M.alignment || I && I.alignment; A && (R.alignment = A); var L = M && M.border || I && I.border; L && (R.border = L); var $ = M && M.fill || I && I.fill; $ && (R.fill = $); var W = M && M.protection || I && I.protection; return W && (R.protection = W), R; } // ========================================================================= // return the address for this cell }, { key: "toCsvString", value: function() { return this._value.toCsvString(); } // ========================================================================= // Merge stuff }, { key: "addMergeRef", value: function() { this._mergeCount++; } }, { key: "releaseMergeRef", value: function() { this._mergeCount--; } }, { key: "merge", value: function(M, I) { this._value.release(), this._value = F.create(z.Types.Merge, this, M), I || (this.style = M.style); } }, { key: "unmerge", value: function() { this.type === z.Types.Merge && (this._value.release(), this._value = F.create(z.Types.Null, this), this.style = this._mergeStyle(this._row.style, this._column.style, {})); } }, { key: "isMergedTo", value: function(M) { return this._value.type !== z.Types.Merge ? !1 : this._value.isMergedTo(M); } }, { key: "toString", value: function() { return this.text; } }, { key: "_upgradeToHyperlink", value: function(M) { this.type === z.Types.String && (this._value = F.create(z.Types.Hyperlink, this, { text: this._value.value, hyperlink: M })); } // ========================================================================= // Formula stuff }, { key: "addName", value: function(M) { this.workbook.definedNames.addEx(this.fullAddress, M); } }, { key: "removeName", value: function(M) { this.workbook.definedNames.removeEx(this.fullAddress, M); } }, { key: "removeAllNames", value: function() { this.workbook.definedNames.removeAllNames(this.fullAddress); } // ========================================================================= // Data Validation stuff }, { key: "worksheet", get: function() { return this._row.worksheet; } }, { key: "workbook", get: function() { return this._row.worksheet.workbook; } }, { key: "numFmt", get: function() { return this.style.numFmt; }, set: function(M) { this.style.numFmt = M; } }, { key: "font", get: function() { return this.style.font; }, set: function(M) { this.style.font = M; } }, { key: "alignment", get: function() { return this.style.alignment; }, set: function(M) { this.style.alignment = M; } }, { key: "border", get: function() { return this.style.border; }, set: function(M) { this.style.border = M; } }, { key: "fill", get: function() { return this.style.fill; }, set: function(M) { this.style.fill = M; } }, { key: "protection", get: function() { return this.style.protection; }, set: function(M) { this.style.protection = M; } }, { key: "address", get: function() { return this._address; } }, { key: "row", get: function() { return this._row.number; } }, { key: "col", get: function() { return this._column.number; } }, { key: "$col$row", get: function() { return "$".concat(this._column.letter, "$").concat(this.row); } // ========================================================================= // Value stuff }, { key: "type", get: function() { return this._value.type; } }, { key: "effectiveType", get: function() { return this._value.effectiveType; } }, { key: "isMerged", get: function() { return this._mergeCount > 0 || this.type === z.Types.Merge; } }, { key: "master", get: function() { return this.type === z.Types.Merge ? this._value.master : this; } }, { key: "isHyperlink", get: function() { return this._value.type === z.Types.Hyperlink; } }, { key: "hyperlink", get: function() { return this._value.hyperlink; } // return the value }, { key: "value", get: function() { return this._value.value; }, set: function(M) { if (this.type === z.Types.Merge) { this._value.master.value = M; return; } this._value.release(), this._value = F.create(F.getType(M), this, M); } }, { key: "note", get: function() { return this._comment && this._comment.note; }, set: function(M) { this._comment = new l(M); } }, { key: "text", get: function() { return this._value.toString(); } }, { key: "html", get: function() { return w.escapeHtml(this.text); } }, { key: "formula", get: function() { return this._value.formula; } }, { key: "result", get: function() { return this._value.result; } }, { key: "formulaType", get: function() { return this._value.formulaType; } // ========================================================================= // Name stuff }, { key: "fullAddress", get: function() { var M = this._row.worksheet; return { sheetName: M.name, address: this.address, row: this.row, col: this.col }; } }, { key: "name", get: function() { return this.names[0]; }, set: function(M) { this.names = [M]; } }, { key: "names", get: function() { return this.workbook.definedNames.getNamesEx(this.fullAddress); }, set: function(M) { var I = this, R = this.workbook.definedNames; R.removeAllNames(this.fullAddress), M.forEach(function(C) { R.addEx(I.fullAddress, C); }); } }, { key: "_dataValidations", get: function() { return this.worksheet.dataValidations; } }, { key: "dataValidation", get: function() { return this._dataValidations.find(this.address); }, set: function(M) { this._dataValidations.add(this.address, M); } // ========================================================================= // Model stuff }, { key: "model", get: function() { var M = this._value.model; return M.style = this.style, this._comment && (M.comment = this._comment.model), M; }, set: function(M) { if (this._value.release(), this._value = F.create(M.type, this), this._value.model = M, M.comment) switch (M.comment.type) { case "note": this._comment = l.fromModel(M.comment); break; } M.style ? this.style = M.style : this.style = {}; } }]), z; }(); d.Types = f.ValueType; var s = /* @__PURE__ */ function() { function z(N) { u(this, z), this.model = { address: N.address, type: d.Types.Null }; } return g(z, [{ key: "toCsvString", value: function() { return ""; } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return ""; } }, { key: "value", get: function() { return null; }, set: function(M) { } }, { key: "type", get: function() { return d.Types.Null; } }, { key: "effectiveType", get: function() { return d.Types.Null; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), v = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Number, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.model.value.toString(); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value.toString(); } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.Number; } }, { key: "effectiveType", get: function() { return d.Types.Number; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), c = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.String, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return '"'.concat(this.model.value.replace(/"/g, '""'), '"'); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value; } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.String; } }, { key: "effectiveType", get: function() { return d.Types.String; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), a = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.String, value: M }; } return g(z, [{ key: "toString", value: function() { return this.model.value.richText.map(function(M) { return M.text; }).join(""); } }, { key: "toCsvString", value: function() { return '"'.concat(this.text.replace(/"/g, '""'), '"'); } }, { key: "release", value: function() { } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.RichText; } }, { key: "effectiveType", get: function() { return d.Types.RichText; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), r = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Date, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.model.value.toISOString(); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value.toString(); } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.Date; } }, { key: "effectiveType", get: function() { return d.Types.Date; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), t = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Hyperlink, text: M ? M.text : void 0, hyperlink: M ? M.hyperlink : void 0 }, M && M.tooltip && (this.model.tooltip = M.tooltip); } return g(z, [{ key: "toCsvString", value: function() { return this.model.hyperlink; } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.text; } }, { key: "value", get: function() { var M = { text: this.model.text, hyperlink: this.model.hyperlink }; return this.model.tooltip && (M.tooltip = this.model.tooltip), M; }, set: function(M) { this.model = { text: M.text, hyperlink: M.hyperlink }, M.tooltip && (this.model.tooltip = M.tooltip); } }, { key: "text", get: function() { return this.model.text; }, set: function(M) { this.model.text = M; } /* get tooltip() { return this.model.tooltip; } set tooltip(value) { this.model.tooltip = value; } */ }, { key: "hyperlink", get: function() { return this.model.hyperlink; }, set: function(M) { this.model.hyperlink = M; } }, { key: "type", get: function() { return d.Types.Hyperlink; } }, { key: "effectiveType", get: function() { return d.Types.Hyperlink; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), i = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Merge, master: M ? M.address : void 0 }, this._master = M, M && M.addMergeRef(); } return g(z, [{ key: "isMergedTo", value: function(M) { return M === this._master; } }, { key: "toCsvString", value: function() { return ""; } }, { key: "release", value: function() { this._master.releaseMergeRef(); } }, { key: "toString", value: function() { return this.value.toString(); } }, { key: "value", get: function() { return this._master.value; }, set: function(M) { M instanceof d ? (this._master && this._master.releaseMergeRef(), M.addMergeRef(), this._master = M) : this._master.value = M; } }, { key: "master", get: function() { return this._master; } }, { key: "type", get: function() { return d.Types.Merge; } }, { key: "effectiveType", get: function() { return this._master.effectiveType; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), n = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.cell = N, this.model = { address: N.address, type: d.Types.Formula, shareType: M ? M.shareType : void 0, ref: M ? M.ref : void 0, formula: M ? M.formula : void 0, sharedFormula: M ? M.sharedFormula : void 0, result: M ? M.result : void 0 }; } return g(z, [{ key: "_copyModel", value: function(M) { var I = {}, R = function(E) { var A = M[E]; A && (I[E] = A); }; return R("formula"), R("result"), R("ref"), R("shareType"), R("sharedFormula"), I; } }, { key: "validate", value: function(M) { switch (F.getType(M)) { case d.Types.Null: case d.Types.String: case d.Types.Number: case d.Types.Date: break; case d.Types.Hyperlink: case d.Types.Formula: default: throw new Error("Cannot process that type of result value"); } } }, { key: "_getTranslatedFormula", value: function() { if (!this._translatedFormula && this.model.sharedFormula) { var M = this.cell.worksheet, I = M.findCell(this.model.sharedFormula); this._translatedFormula = I && h(I.formula, I.address, this.model.address); } return this._translatedFormula; } }, { key: "toCsvString", value: function() { return "".concat(this.model.result || ""); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.result ? this.model.result.toString() : ""; } }, { key: "value", get: function() { return this._copyModel(this.model); }, set: function(M) { this.model = this._copyModel(M); } }, { key: "dependencies", get: function() { var M = this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g), I = this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g, "").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g); return { ranges: M, cells: I }; } }, { key: "formula", get: function() { return this.model.formula || this._getTranslatedFormula(); }, set: function(M) { this.model.formula = M; } }, { key: "formulaType", get: function() { return this.model.formula ? f.FormulaType.Master : this.model.sharedFormula ? f.FormulaType.Shared : f.FormulaType.None; } }, { key: "result", get: function() { return this.model.result; }, set: function(M) { this.model.result = M; } }, { key: "type", get: function() { return d.Types.Formula; } }, { key: "effectiveType", get: function() { var M = this.model.result; return M == null ? f.ValueType.Null : M instanceof String || typeof M == "string" ? f.ValueType.String : typeof M == "number" ? f.ValueType.Number : M instanceof Date ? f.ValueType.Date : M.text && M.hyperlink ? f.ValueType.Hyperlink : M.formula ? f.ValueType.Formula : f.ValueType.Null; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), o = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.SharedString, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.model.value.toString(); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value.toString(); } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.SharedString; } }, { key: "effectiveType", get: function() { return d.Types.SharedString; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), p = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Boolean, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.model.value ? 1 : 0; } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value.toString(); } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.Boolean; } }, { key: "effectiveType", get: function() { return d.Types.Boolean; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), O = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.Error, value: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.toString(); } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value.error.toString(); } }, { key: "value", get: function() { return this.model.value; }, set: function(M) { this.model.value = M; } }, { key: "type", get: function() { return d.Types.Error; } }, { key: "effectiveType", get: function() { return d.Types.Error; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), P = /* @__PURE__ */ function() { function z(N, M) { u(this, z), this.model = { address: N.address, type: d.Types.String, value: JSON.stringify(M), rawValue: M }; } return g(z, [{ key: "toCsvString", value: function() { return this.model.value; } }, { key: "release", value: function() { } }, { key: "toString", value: function() { return this.model.value; } }, { key: "value", get: function() { return this.model.rawValue; }, set: function(M) { this.model.rawValue = M, this.model.value = JSON.stringify(M); } }, { key: "type", get: function() { return d.Types.String; } }, { key: "effectiveType", get: function() { return d.Types.String; } }, { key: "address", get: function() { return this.model.address; }, set: function(M) { this.model.address = M; } }]), z; }(), F = { getType: function(N) { return N == null ? d.Types.Null : N instanceof String || typeof N == "string" ? d.Types.String : typeof N == "number" ? d.Types.Number : typeof N == "boolean" ? d.Types.Boolean : N instanceof Date ? d.Types.Date : N.text && N.hyperlink ? d.Types.Hyperlink : N.formula || N.sharedFormula ? d.Types.Formula : N.richText ? d.Types.RichText : N.sharedString ? d.Types.SharedString : N.error ? d.Types.Error : d.Types.JSON; }, // map valueType to constructor types: [{ t: d.Types.Null, f: s }, { t: d.Types.Number, f: v }, { t: d.Types.String, f: c }, { t: d.Types.Date, f: r }, { t: d.Types.Hyperlink, f: t }, { t: d.Types.Formula, f: n }, { t: d.Types.Merge, f: i }, { t: d.Types.JSON, f: P }, { t: d.Types.SharedString, f: o }, { t: d.Types.RichText, f: a }, { t: d.Types.Boolean, f: p }, { t: d.Types.Error, f: O }].reduce(function(z, N) { return z[N.t] = N.f, z; }, []), create: function(N, M, I) { var R = this.types[N]; if (!R) throw new Error("Could not create Value of type ".concat(N)); return new R(M, I); } }; x.exports = d; }, { "../utils/col-cache": 19, "../utils/shared-formula": 22, "../utils/under-dash": 25, "./enums": 7, "./note": 9 }], 4: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } var b = e("../utils/under-dash"), w = e("./enums"), f = e("../utils/col-cache"), y = 9, h = /* @__PURE__ */ function() { function l(d, s, v) { u(this, l), this._worksheet = d, this._number = s, v !== !1 && (this.defn = v); } return g(l, [{ key: "toString", value: function() { return JSON.stringify({ key: this.key, width: this.width, headers: this.headers.length ? this.headers : void 0 }); } }, { key: "equivalentTo", value: function(s) { return this.width === s.width && this.hidden === s.hidden && this.outlineLevel === s.outlineLevel && b.isEqual(this.style, s.style); } }, { key: "eachCell", value: function(s, v) { var c = this.number; v || (v = s, s = null), this._worksheet.eachRow(s, function(a, r) { v(a.getCell(c), r); }); } }, { key: "_applyStyle", // ========================================================================= // styles value: function(s, v) { return this.style[s] = v, this.eachCell(function(c) { c[s] = v; }), v; } }, { key: "number", get: function() { return this._number; } }, { key: "worksheet", get: function() { return this._worksheet; } }, { key: "letter", get: function() { return f.n2l(this._number); } }, { key: "isCustomWidth", get: function() { return this.width !== void 0 && this.width !== y; } }, { key: "defn", get: function() { return { header: this._header, key: this.key, width: this.width, style: this.style, hidden: this.hidden, outlineLevel: this.outlineLevel }; }, set: function(s) { s ? (this.key = s.key, this.width = s.width !== void 0 ? s.width : y, this.outlineLevel = s.outlineLevel, s.style ? this.style = s.style : this.style = {}, this.header = s.header, this._hidden = !!s.hidden) : (delete this._header, delete this._key, delete this.width, this.style = {}, this.outlineLevel = 0); } }, { key: "headers", get: function() { return this._header && this._header instanceof Array ? this._header : [this._header]; } }, { key: "header", get: function() { return this._header; }, set: function(s) { var v = this; s !== void 0 ? (this._header = s, this.headers.forEach(function(c, a) { v._worksheet.getCell(a + 1, v.number).value = c; })) : this._header = void 0; } }, { key: "key", get: function() { return this._key; }, set: function(s) { var v = this._key && this._worksheet.getColumnKey(this._key); v === this && this._worksheet.deleteColumnKey(this._key), this._key = s, s && this._worksheet.setColumnKey(this._key, this); } }, { key: "hidden", get: function() { return !!this._hidden; }, set: function(s) { this._hidden = s; } }, { key: "outlineLevel", get: function() { return this._outlineLevel || 0; }, set: function(s) { this._outlineLevel = s; } }, { key: "collapsed", get: function() { return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelCol); } }, { key: "isDefault", get: function() { if (this.isCustomWidth || this.hidden || this.outlineLevel) return !1; var s = this.style; return !(s && (s.font || s.numFmt || s.alignment || s.border || s.fill || s.protection)); } }, { key: "headerCount", get: function() { return this.headers.length; } }, { key: "values", get: function() { var s = []; return this.eachCell(function(v, c) { v && v.type !== w.ValueType.Null && (s[c] = v.value); }), s; }, set: function(s) { var v = this; if (s) { var c = this.number, a = 0; s.hasOwnProperty("0") && (a = 1), s.forEach(function(r, t) { v._worksheet.getCell(t + a, c).value = r; }); } } }, { key: "numFmt", get: function() { return this.style.numFmt; }, set: function(s) { this._applyStyle("numFmt", s); } }, { key: "font", get: function() { return this.style.font; }, set: function(s) { this._applyStyle("font", s); } }, { key: "alignment", get: function() { return this.style.alignment; }, set: function(s) { this._applyStyle("alignment", s); } }, { key: "protection", get: function() { return this.style.protection; }, set: function(s) { this._applyStyle("protection", s); } }, { key: "border", get: function() { return this.style.border; }, set: function(s) { this._applyStyle("border", s); } }, { key: "fill", get: function() { return this.style.fill; }, set: function(s) { this._applyStyle("fill", s); } // ============================================================================= // static functions }], [{ key: "toModel", value: function(s) { var v = [], c = null; return s && s.forEach(function(a, r) { a.isDefault ? c && (c = null) : !c || !a.equivalentTo(c) ? (c = { min: r + 1, max: r + 1, width: a.width !== void 0 ? a.width : y, style: a.style, isCustomWidth: a.isCustomWidth, hidden: a.hidden, outlineLevel: a.outlineLevel, collapsed: a.collapsed }, v.push(c)) : c.max = r + 1; }), v.length ? v : void 0; } }, { key: "fromModel", value: function(s, v) { v = v || []; for (var c = [], a = 1, r = 0; r < v.length; ) { for (var t = v[r++]; a < t.min; ) c.push(new l(s, a++)); for (; a <= t.max; ) c.push(new l(s, a++, t)); } return c.length ? c : null; } }]), l; }(); x.exports = h; }, { "../utils/col-cache": 19, "../utils/under-dash": 25, "./enums": 7 }], 5: [function(e, x, _) { function u(w, f) { if (!(w instanceof f)) throw new TypeError("Cannot call a class as a function"); } function m(w, f) { for (var y = 0; y < f.length; y++) { var h = f[y]; h.enumerable = h.enumerable || !1, h.configurable = !0, "value" in h && (h.writable = !0), Object.defineProperty(w, h.key, h); } } function g(w, f, y) { return f && m(w.prototype, f), y && m(w, y), w; } var b = /* @__PURE__ */ function() { function w(f) { u(this, w), this.model = f || {}; } return g(w, [{ key: "add", value: function(y, h) { return this.model[y] = h; } }, { key: "find", value: function(y) { return this.model[y]; } }, { key: "remove", value: function(y) { this.model[y] = void 0; } }]), w; }(); x.exports = b; }, {}], 6: [function(e, x, _) { function u(d, s) { if (!(d instanceof s)) throw new TypeError("Cannot call a class as a function"); } function m(d, s) { for (var v = 0; v < s.length; v++) { var c = s[v]; c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(d, c.key, c); } } function g(d, s, v) { return s && m(d.prototype, s), v && m(d, v), d; } var b = e("../utils/under-dash"), w = e("../utils/col-cache"), f = e("../utils/cell-matrix"), y = e("./range"), h = /[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/, l = /* @__PURE__ */ function() { function d() { u(this, d), this.matrixMap = {}; } return g(d, [{ key: "getMatrix", value: function(v) { var c = this.matrixMap[v] || (this.matrixMap[v] = new f()); return c; } // add a name to a cell. locStr in the form SheetName!$col$row or SheetName!$c1$r1:$c2:$r2 }, { key: "add", value: function(v, c) { var a = w.decodeEx(v); this.addEx(a, c); } }, { key: "addEx", value: function(v, c) { var a = this.getMatrix(c); if (v.top) for (var r = v.left; r <= v.right; r++) for (var t = v.top; t <= v.bottom; t++) { var i = { sheetName: v.sheetName, address: w.n2l(r) + t, row: t, col: r }; a.addCellEx(i); } else a.addCellEx(v); } }, { key: "remove", value: function(v, c) { var a = w.decodeEx(v); this.removeEx(a, c); } }, { key: "removeEx", value: function(v, c) { var a = this.getMatrix(c); a.removeCellEx(v); } }, { key: "removeAllNames", value: function(v) { b.each(this.matrixMap, function(c) { c.removeCellEx(v); }); } }, { key: "forEach", value: function(v) { b.each(this.matrixMap, function(c, a) { c.forEach(function(r) { v(a, r); }); }); } // get all the names of a cell }, { key: "getNames", value: function(v) { return this.getNamesEx(w.decodeEx(v)); } }, { key: "getNamesEx", value: function(v) { return b.map(this.matrixMap, function(c, a) { return c.findCellEx(v) && a; }).filter(Boolean); } }, { key: "_explore", value: function(v, c) { c.mark = !1; var a = c.sheetName, r = new y(c.row, c.col, c.row, c.col, a), t, i; function n(p, O) { var P = v.findCellAt(a, p, c.col); return !P || !P.mark ? !1 : (r[O] = p, P.mark = !1, !0); } for (i = c.row - 1; n(i, "top"); i--) ; for (i = c.row + 1; n(i, "bottom"); i++) ; function o(p, O) { var P = []; for (i = r.top; i <= r.bottom; i++) { var F = v.findCellAt(a, i, p); if (F && F.mark) P.push(F); else return !1; } r[O] = p; for (var z = 0; z < P.length; z++) P[z].mark = !1; return !0; } for (t = c.col - 1; o(t, "left"); t--) ; for (t = c.col + 1; o(t, "right"); t++) ; return r; } }, { key: "getRanges", value: function(v, c) { var a = this; if (c = c || this.matrixMap[v], !c) return { name: v, ranges: [] }; c.forEach(function(t) { t.mark = !0; }); var r = c.map(function(t) { return t.mark && a._explore(c, t); }).filter(Boolean).map(function(t) { return t.$shortRange; }); return { name: v, ranges: r }; } }, { key: "normaliseMatrix", value: function(v, c) { v.forEachInSheet(c, function(a, r, t) { a && (a.row !== r || a.col !== t) && (a.row = r, a.col = t, a.address = w.n2l(t) + r); }); } }, { key: "spliceRows", value: function(v, c, a, r) { var t = this; b.each(this.matrixMap, function(i) { i.spliceRows(v, c, a, r), t.normaliseMatrix(i, v); }); } }, { key: "spliceColumns", value: function(v, c, a, r) { var t = this; b.each(this.matrixMap, function(i) { i.spliceColumns(v, c, a, r), t.normaliseMatrix(i, v); }); } }, { key: "model", get: function() { var v = this; return b.map(this.matrixMap, function(c, a) { return v.getRanges(a, c); }).filter(function(c) { return c.ranges.length; }); }, set: function(v) { var c = this.matrixMap = {}; v.forEach(function(a) { var r = c[a.name] = new f(); a.ranges.forEach(function(t) { h.test(t.split("!").pop() || "") && r.addCell(t); }); }); } }]), d; }(); x.exports = l; }, { "../utils/cell-matrix": 18, "../utils/col-cache": 19, "../utils/under-dash": 25, "./range": 10 }], 7: [function(e, x, _) { x.exports = { ValueType: { Null: 0, Merge: 1, Number: 2, String: 3, Date: 4, Hyperlink: 5, Formula: 6, SharedString: 7, RichText: 8, Boolean: 9, Error: 10 }, FormulaType: { None: 0, Master: 1, Shared: 2 }, RelationshipType: { None: 0, OfficeDocument: 1, Worksheet: 2, CalcChain: 3, SharedStrings: 4, Styles: 5, Theme: 6, Hyperlink: 7 }, DocumentType: { Xlsx: 1 }, ReadingOrder: { LeftToRight: 1, RightToLeft: 2 }, ErrorValue: { NotApplicable: "#N/A", Ref: "#REF!", Name: "#NAME?", DivZero: "#DIV/0!", Null: "#NULL!", Value: "#VALUE!", Num: "#NUM!" } }; }, {}], 8: [function(e, x, _) { function u(y, h) { if (!(y instanceof h)) throw new TypeError("Cannot call a class as a function"); } function m(y, h) { for (var l = 0; l < h.length; l++) { var d = h[l]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(y, d.key, d); } } function g(y, h, l) { return h && m(y.prototype, h), l && m(y, l), y; } var b = e("../utils/col-cache"), w = e("./anchor"), f = /* @__PURE__ */ function() { function y(h, l) { u(this, y), this.worksheet = h, this.model = l; } return g(y, [{ key: "model", get: function() { switch (this.type) { case "background": return { type: this.type, imageId: this.imageId }; case "image": return { type: this.type, imageId: this.imageId, hyperlinks: this.range.hyperlinks, range: { tl: this.range.tl.model, br: this.range.br && this.range.br.model, ext: this.range.ext, editAs: this.range.editAs } }; default: throw new Error("Invalid Image Type"); } }, set: function(l) { var d = l.type, s = l.imageId, v = l.range, c = l.hyperlinks; if (this.type = d, this.imageId = s, d === "image") if (typeof v == "string") { var a = b.decode(v); this.range = { tl: new w(this.worksheet, { col: a.left, row: a.top }, -1), br: new w(this.worksheet, { col: a.right, row: a.bottom }, 0), editAs: "oneCell" }; } else this.range = { tl: new w(this.worksheet, v.tl, 0), br: v.br && new w(this.worksheet, v.br, 0), ext: v.ext, editAs: v.editAs, hyperlinks: c || v.hyperlinks }; } }]), y; }(); x.exports = f; }, { "../utils/col-cache": 19, "./anchor": 2 }], 9: [function(e, x, _) { function u(y) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(l) { return typeof l; } : u = function(l) { return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l; }, u(y); } function m(y, h) { if (!(y instanceof h)) throw new TypeError("Cannot call a class as a function"); } function g(y, h) { for (var l = 0; l < h.length; l++) { var d = h[l]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(y, d.key, d); } } function b(y, h, l) { return h && g(y.prototype, h), l && g(y, l), y; } var w = e("../utils/under-dash"), f = /* @__PURE__ */ function() { function y(h) { m(this, y), this.note = h; } return b(y, [{ key: "model", get: function() { var l = null; switch (u(this.note)) { case "string": l = { type: "note", note: { texts: [{ text: this.note }] } }; break; default: l = { type: "note", note: this.note }; break; } return w.deepMerge({}, y.DEFAULT_CONFIGS, l); }, set: function(l) { var d = l.note, s = d.texts; s.length === 1 && Object.keys(s[0]).length === 1 ? this.note = s[0].text : this.note = d; } }], [{ key: "fromModel", value: function(l) { var d = new y(); return d.model = l, d; } }]), y; }(); f.DEFAULT_CONFIGS = { note: { margins: { insetmode: "auto", inset: [0.13, 0.13, 0.25, 0.25] }, protection: { locked: "True", lockText: "True" }, editAs: "absolute" } }, x.exports = f; }, { "../utils/under-dash": 25 }], 10: [function(e, x, _) { function u(f, y) { if (!(f instanceof y)) throw new TypeError("Cannot call a class as a function"); } function m(f, y) { for (var h = 0; h < y.length; h++) { var l = y[h]; l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(f, l.key, l); } } function g(f, y, h) { return y && m(f.prototype, y), h && m(f, h), f; } var b = e("../utils/col-cache"), w = /* @__PURE__ */ function() { function f() { u(this, f), this.decode(arguments); } return g(f, [{ key: "setTLBR", value: function(h, l, d, s, v) { if (arguments.length < 4) { var c = b.decodeAddress(h), a = b.decodeAddress(l); this.model = { top: Math.min(c.row, a.row), left: Math.min(c.col, a.col), bottom: Math.max(c.row, a.row), right: Math.max(c.col, a.col), sheetName: d }, this.setTLBR(c.row, c.col, a.row, a.col, v); } else this.model = { top: Math.min(h, d), left: Math.min(l, s), bottom: Math.max(h, d), right: Math.max(l, s), sheetName: v }; } }, { key: "decode", value: function(h) { switch (h.length) { case 5: this.setTLBR(h[0], h[1], h[2], h[3], h[4]); break; case 4: this.setTLBR(h[0], h[1], h[2], h[3]); break; case 3: this.setTLBR(h[0], h[1], h[2]); break; case 2: this.setTLBR(h[0], h[1]); break; case 1: { var l = h[0]; if (l instanceof f) this.model = { top: l.model.top, left: l.model.left, bottom: l.model.bottom, right: l.model.right, sheetName: l.sheetName }; else if (l instanceof Array) this.decode(l); else if (l.top && l.left && l.bottom && l.right) this.model = { top: l.top, left: l.left, bottom: l.bottom, right: l.right, sheetName: l.sheetName }; else { var d = b.decodeEx(l); d.top ? this.model = { top: d.top, left: d.left, bottom: d.bottom, right: d.right, sheetName: d.sheetName } : this.model = { top: d.row, left: d.col, bottom: d.row, right: d.col, sheetName: d.sheetName }; } break; } case 0: this.model = { top: 0, left: 0, bottom: 0, right: 0 }; break; default: throw new Error("Invalid number of arguments to _getDimensions() - ".concat(h.length)); } } }, { key: "expand", value: function(h, l, d, s) { (!this.model.top || h < this.top) && (this.top = h), (!this.model.left || l < this.left) && (this.left = l), (!this.model.bottom || d > this.bottom) && (this.bottom = d), (!this.model.right || s > this.right) && (this.right = s); } }, { key: "expandRow", value: function(h) { if (h) { var l = h.dimensions, d = h.number; l && this.expand(d, l.min, d, l.max); } } }, { key: "expandToAddress", value: function(h) { var l = b.decodeEx(h); this.expand(l.row, l.col, l.row, l.col); } }, { key: "toString", value: function() { return this.range; } }, { key: "intersects", value: function(h) { return !(h.sheetName && this.sheetName && h.sheetName !== this.sheetName || h.bottom < this.top || h.top > this.bottom || h.right < this.left || h.left > this.right); } }, { key: "contains", value: function(h) { var l = b.decodeEx(h); return this.containsEx(l); } }, { key: "containsEx", value: function(h) { return h.sheetName && this.sheetName && h.sheetName !== this.sheetName ? !1 : h.row >= this.top && h.row <= this.bottom && h.col >= this.left && h.col <= this.right; } }, { key: "forEachAddress", value: function(h) { for (var l = this.left; l <= this.right; l++) for (var d = this.top; d <= this.bottom; d++) h(b.encodeAddress(d, l), d, l); } }, { key: "top", get: function() { return this.model.top || 1; }, set: function(h) { this.model.top = h; } }, { key: "left", get: function() { return this.model.left || 1; }, set: function(h) { this.model.left = h; } }, { key: "bottom", get: function() { return this.model.bottom || 1; }, set: function(h) { this.model.bottom = h; } }, { key: "right", get: function() { return this.model.right || 1; }, set: function(h) { this.model.right = h; } }, { key: "sheetName", get: function() { return this.model.sheetName; }, set: function(h) { this.model.sheetName = h; } }, { key: "_serialisedSheetName", get: function() { var h = this.model.sheetName; return h ? /^[a-zA-Z0-9]*$/.test(h) ? "".concat(h, "!") : "'".concat(h, "'!") : ""; } }, { key: "tl", get: function() { return b.n2l(this.left) + this.top; } }, { key: "$t$l", get: function() { return "$".concat(b.n2l(this.left), "$").concat(this.top); } }, { key: "br", get: function() { return b.n2l(this.right) + this.bottom; } }, { key: "$b$r", get: function() { return "$".concat(b.n2l(this.right), "$").concat(this.bottom); } }, { key: "range", get: function() { return "".concat(this._serialisedSheetName + this.tl, ":").concat(this.br); } }, { key: "$range", get: function() { return "".concat(this._serialisedSheetName + this.$t$l, ":").concat(this.$b$r); } }, { key: "shortRange", get: function() { return this.count > 1 ? this.range : this._serialisedSheetName + this.tl; } }, { key: "$shortRange", get: function() { return this.count > 1 ? this.$range : this._serialisedSheetName + this.$t$l; } }, { key: "count", get: function() { return (1 + this.bottom - this.top) * (1 + this.right - this.left); } }]), f; }(); x.exports = w; }, { "../utils/col-cache": 19 }], 11: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } var b = e("../utils/under-dash"), w = e("./enums"), f = e("../utils/col-cache"), y = e("./cell"), h = /* @__PURE__ */ function() { function l(d, s) { u(this, l), this._worksheet = d, this._number = s, this._cells = [], this.style = {}, this.outlineLevel = 0; } return g(l, [{ key: "commit", // Inform Streaming Writer that this row (and all rows before it) are complete // and ready to write. Has no effect on Worksheet document value: function() { this._worksheet._commitRow(this); } // helps GC by breaking cyclic references }, { key: "destroy", value: function() { delete this._worksheet, delete this._cells, delete this.style; } }, { key: "findCell", value: function(s) { return this._cells[s - 1]; } // given {address, row, col}, find or create new cell }, { key: "getCellEx", value: function(s) { var v = this._cells[s.col - 1]; if (!v) { var c = this._worksheet.getColumn(s.col); v = new y(this, c, s.address), this._cells[s.col - 1] = v; } return v; } // get cell by key, letter or column number }, { key: "getCell", value: function(s) { if (typeof s == "string") { var v = this._worksheet.getColumnKey(s); v ? s = v.number : s = f.l2n(s); } return this._cells[s - 1] || this.getCellEx({ address: f.encodeAddress(this._number, s), row: this._number, col: s }); } // remove cell(s) and shift all higher cells down by count }, { key: "splice", value: function(s, v) { for (var c = s + v, a = arguments.length, r = new Array(a > 2 ? a - 2 : 0), t = 2; t < a; t++) r[t - 2] = arguments[t]; var i = r.length - v, n = this._cells.length, o, p, O; if (i < 0) for (o = s + r.length; o <= n; o++) O = this._cells[o - 1], p = this._cells[o - i - 1], p ? (O = this.getCell(o), O.value = p.value, O.style = p.style, O._comment = p._comment) : O && (O.value = null, O.style = {}, O._comment = void 0); else if (i > 0) for (o = n; o >= c; o--) p = this._cells[o - 1], p ? (O = this.getCell(o + i), O.value = p.value, O.style = p.style, O._comment = p._comment) : this._cells[o + i - 1] = void 0; for (o = 0; o < r.length; o++) O = this.getCell(s + o), O.value = r[o], O.style = {}, O._comment = void 0; } // Iterate over all non-null cells in this row }, { key: "eachCell", value: function(s, v) { if (v || (v = s, s = null), s && s.includeEmpty) for (var c = this._cells.length, a = 1; a <= c; a++) v(this.getCell(a), a); else this._cells.forEach(function(r, t) { r && r.type !== w.ValueType.Null && v(r, t + 1); }); } // =========================================================================== // Page Breaks }, { key: "addPageBreak", value: function(s, v) { var c = this._worksheet, a = Math.max(0, s - 1) || 0, r = Math.max(0, v - 1) || 16838, t = { id: this._number, max: r, man: 1 }; a && (t.min = a), c.rowBreaks.push(t); } // return a sparse array of cell values }, { key: "_applyStyle", // ========================================================================= // styles value: function(s, v) { return this.style[s] = v, this._cells.forEach(function(c) { c && (c[s] = v); }), v; } }, { key: "number", get: function() { return this._number; } }, { key: "worksheet", get: function() { return this._worksheet; } }, { key: "values", get: function() { var s = []; return this._cells.forEach(function(v) { v && v.type !== w.ValueType.Null && (s[v.col] = v.value); }), s; }, set: function(s) { var v = this; if (this._cells = [], s) if (s instanceof Array) { var c = 0; s.hasOwnProperty("0") && (c = 1), s.forEach(function(a, r) { a !== void 0 && (v.getCellEx({ address: f.encodeAddress(v._number, r + c), row: v._number, col: r + c }).value = a); }); } else this._worksheet.eachColumnKey(function(a, r) { s[r] !== void 0 && (v.getCellEx({ address: f.encodeAddress(v._number, a.number), row: v._number, col: a.number }).value = s[r]); }); } // returns true if the row includes at least one cell with a value }, { key: "hasValues", get: function() { return b.some(this._cells, function(s) { return s && s.type !== w.ValueType.Null; }); } }, { key: "cellCount", get: function() { return this._cells.length; } }, { key: "actualCellCount", get: function() { var s = 0; return this.eachCell(function() { s++; }), s; } // get the min and max column number for the non-null cells in this row or null }, { key: "dimensions", get: function() { var s = 0, v = 0; return this._cells.forEach(function(c) { c && c.type !== w.ValueType.Null && ((!s || s > c.col) && (s = c.col), v < c.col && (v = c.col)); }), s > 0 ? { min: s, max: v } : null; } }, { key: "numFmt", get: function() { return this.style.numFmt; }, set: function(s) { this._applyStyle("numFmt", s); } }, { key: "font", get: function() { return this.style.font; }, set: function(s) { this._applyStyle("font", s); } }, { key: "alignment", get: function() { return this.style.alignment; }, set: function(s) { this._applyStyle("alignment", s); } }, { key: "protection", get: function() { return this.style.protection; }, set: function(s) { this._applyStyle("protection", s); } }, { key: "border", get: function() { return this.style.border; }, set: function(s) { this._applyStyle("border", s); } }, { key: "fill", get: function() { return this.style.fill; }, set: function(s) { this._applyStyle("fill", s); } }, { key: "hidden", get: function() { return !!this._hidden; }, set: function(s) { this._hidden = s; } }, { key: "outlineLevel", get: function() { return this._outlineLevel || 0; }, set: function(s) { this._outlineLevel = s; } }, { key: "collapsed", get: function() { return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelRow); } // ========================================================================= }, { key: "model", get: function() { var s = [], v = 0, c = 0; return this._cells.forEach(function(a) { if (a) { var r = a.model; r && ((!v || v > a.col) && (v = a.col), c < a.col && (c = a.col), s.push(r)); } }), this.height || s.length ? { cells: s, number: this.number, min: v, max: c, height: this.height, style: this.style, hidden: this.hidden, outlineLevel: this.outlineLevel, collapsed: this.collapsed } : null; }, set: function(s) { var v = this; if (s.number !== this._number) throw new Error("Invalid row number in model"); this._cells = []; var c; s.cells.forEach(function(a) { switch (a.type) { case y.Types.Merge: break; default: { var r; if (a.address) r = f.decodeAddress(a.address); else if (c) { var t = c, i = t.row, n = c.col + 1; r = { row: i, col: n, address: f.encodeAddress(i, n), $col$row: "$".concat(f.n2l(n), "$").concat(i) }; } c = r; var o = v.getCellEx(r); o.model = a; break; } } }), s.height ? this.height = s.height : delete this.height, this.hidden = s.hidden, this.outlineLevel = s.outlineLevel || 0, this.style = s.style && JSON.parse(JSON.stringify(s.style)) || {}; } }]), l; }(); x.exports = h; }, { "../utils/col-cache": 19, "../utils/under-dash": 25, "./cell": 3, "./enums": 7 }], 12: [function(e, x, _) { function u(y, h) { if (!(y instanceof h)) throw new TypeError("Cannot call a class as a function"); } function m(y, h) { for (var l = 0; l < h.length; l++) { var d = h[l]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(y, d.key, d); } } function g(y, h, l) { return h && m(y.prototype, h), l && m(y, l), y; } var b = e("../utils/col-cache"), w = /* @__PURE__ */ function() { function y(h, l, d) { u(this, y), this.table = h, this.column = l, this.index = d; } return g(y, [{ key: "_set", value: function(l, d) { this.table.cacheState(), this.column[l] = d; } /* eslint-disable lines-between-class-members */ }, { key: "name", get: function() { return this.column.name; }, set: function(l) { this._set("name", l); } }, { key: "filterButton", get: function() { return this.column.filterButton; }, set: function(l) { this.column.filterButton = l; } }, { key: "style", get: function() { return this.column.style; }, set: function(l) { this.column.style = l; } }, { key: "totalsRowLabel", get: function() { return this.column.totalsRowLabel; }, set: function(l) { this._set("totalsRowLabel", l); } }, { key: "totalsRowFunction", get: function() { return this.column.totalsRowFunction; }, set: function(l) { this._set("totalsRowFunction", l); } }, { key: "totalsRowResult", get: function() { return this.column.totalsRowResult; }, set: function(l) { this._set("totalsRowResult", l); } }, { key: "totalsRowFormula", get: function() { return this.column.totalsRowFormula; }, set: function(l) { this._set("totalsRowFormula", l); } /* eslint-enable lines-between-class-members */ }]), y; }(), f = /* @__PURE__ */ function() { function y(h, l) { u(this, y), this.worksheet = h, l && (this.table = l, this.validate(), this.store()); } return g(y, [{ key: "getFormula", value: function(l) { switch (l.totalsRowFunction) { case "none": return null; case "average": return "SUBTOTAL(101,".concat(this.table.name, "[").concat(l.name, "])"); case "countNums": return "SUBTOTAL(102,".concat(this.table.name, "[").concat(l.name, "])"); case "count": return "SUBTOTAL(103,".concat(this.table.name, "[").concat(l.name, "])"); case "max": return "SUBTOTAL(104,".concat(this.table.name, "[").concat(l.name, "])"); case "min": return "SUBTOTAL(105,".concat(this.table.name, "[").concat(l.name, "])"); case "stdDev": return "SUBTOTAL(106,".concat(this.table.name, "[").concat(l.name, "])"); case "var": return "SUBTOTAL(107,".concat(this.table.name, "[").concat(l.name, "])"); case "sum": return "SUBTOTAL(109,".concat(this.table.name, "[").concat(l.name, "])"); case "custom": return l.totalsRowFormula; default: throw new Error("Invalid Totals Row Function: ".concat(l.totalsRowFunction)); } } }, { key: "validate", value: function() { var l = this, d = this.table, s = function(p, O, P) { p[O] === void 0 && (p[O] = P); }; s(d, "headerRow", !0), s(d, "totalsRow", !1), s(d, "style", {}), s(d.style, "theme", "TableStyleMedium2"), s(d.style, "showFirstColumn", !1), s(d.style, "showLastColumn", !1), s(d.style, "showRowStripes", !1), s(d.style, "showColumnStripes", !1); var v = function(p, O) { if (!p) throw new Error(O); }; v(d.ref, "Table must have ref"), v(d.columns, "Table must have column definitions"), v(d.rows, "Table must have row definitions"), d.tl = b.decodeAddress(d.ref); var c = d.tl, a = c.row, r = c.col; v(a > 0, "Table must be on valid row"), v(r > 0, "Table must be on valid col"); var t = this.width, i = this.filterHeight, n = this.tableHeight; d.autoFilterRef = b.encode(a, r, a + i - 1, r + t - 1), d.tableRef = b.encode(a, r, a + n - 1, r + t - 1), d.columns.forEach(function(o, p) { v(o.name, "Column ".concat(p, " must have a name")), p === 0 ? s(o, "totalsRowLabel", "Total") : (s(o, "totalsRowFunction", "none"), o.totalsRowFormula = l.getFormula(o)); }); } }, { key: "store", value: function() { var l = this, d = function(p, O) { O && Object.keys(O).forEach(function(P) { p[P] = O[P]; }); }, s = this.worksheet, v = this.table, c = v.tl, a = c.row, r = c.col, t = 0; if (v.headerRow) { var i = s.getRow(a + t++); v.columns.forEach(function(o, p) { var O = o.style, P = o.name, F = i.getCell(r + p); F.value = P, d(F, O); }); } if (v.rows.forEach(function(o) { var p = s.getRow(a + t++); o.forEach(function(O, P) { var F = p.getCell(r + P); F.value = O, d(F, v.columns[P].style); }); }), v.totalsRow) { var n = s.getRow(a + t++); v.columns.forEach(function(o, p) { var O = n.getCell(r + p); if (p === 0) O.value = o.totalsRowLabel; else { var P = l.getFormula(o); P ? O.value = { formula: o.totalsRowFormula, result: o.totalsRowResult } : O.value = null; } d(O, o.style); }); } } }, { key: "load", value: function(l) { var d = this, s = this.table, v = s.tl, c = v.row, a = v.col, r = 0; if (s.headerRow) { var t = l.getRow(c + r++); s.columns.forEach(function(n, o) { var p = t.getCell(a + o); p.value = n.name; }); } if (s.rows.forEach(function(n) { var o = l.getRow(c + r++); n.forEach(function(p, O) { var P = o.getCell(a + O); P.value = p; }); }), s.totalsRow) { var i = l.getRow(c + r++); s.columns.forEach(function(n, o) { var p = i.getCell(a + o); if (o === 0) p.value = n.totalsRowLabel; else { var O = d.getFormula(n); O && (p.value = { formula: n.totalsRowFormula, result: n.totalsRowResult }); } }); } } }, { key: "cacheState", // ================================================================ // TODO: Mutating methods value: function() { this._cache || (this._cache = { ref: this.ref, width: this.width, tableHeight: this.tableHeight }); } }, { key: "commit", value: function() { if (this._cache) { this.validate(); var l = b.decodeAddress(this._cache.ref); if (this.ref !== this._cache.ref) for (var d = 0; d < this._cache.tableHeight; d++) for (var s = this.worksheet.getRow(l.row + d), v = 0; v < this._cache.width; v++) { var c = s.getCell(l.col + v); c.value = null; } else { for (var a = this.tableHeight; a < this._cache.tableHeight; a++) for (var r = this.worksheet.getRow(l.row + a), t = 0; t < this._cache.width; t++) { var i = r.getCell(l.col + t); i.value = null; } for (var n = 0; n < this.tableHeight; n++) for (var o = this.worksheet.getRow(l.row + n), p = this.width; p < this._cache.width; p++) { var O = o.getCell(l.col + p); O.value = null; } } this.store(); } } }, { key: "addRow", value: function(l, d) { this.cacheState(), d === void 0 ? this.table.rows.push(l) : this.table.rows.splice(d, 0, l); } }, { key: "removeRows", value: function(l) { var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; this.cacheState(), this.table.rows.splice(l, d); } }, { key: "getColumn", value: function(l) { var d = this.table.columns[l]; return new w(this, d, l); } }, { key: "addColumn", value: function(l, d, s) { this.cacheState(), s === void 0 ? (this.table.columns.push(l), this.table.rows.forEach(function(v, c) { v.push(d[c]); })) : (this.table.columns.splice(s, 0, l), this.table.rows.forEach(function(v, c) { v.splice(s, 0, d[c]); })); } }, { key: "removeColumns", value: function(l) { var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; this.cacheState(), this.table.columns.splice(l, d), this.table.rows.forEach(function(s) { s.splice(l, d); }); } }, { key: "_assign", value: function(l, d, s) { this.cacheState(), l[d] = s; } /* eslint-disable lines-between-class-members */ }, { key: "width", get: function() { return this.table.columns.length; } }, { key: "height", get: function() { return this.table.rows.length; } }, { key: "filterHeight", get: function() { return this.height + (this.table.headerRow ? 1 : 0); } }, { key: "tableHeight", get: function() { return this.filterHeight + (this.table.totalsRow ? 1 : 0); } }, { key: "model", get: function() { return this.table; }, set: function(l) { this.table = l; } }, { key: "ref", get: function() { return this.table.ref; }, set: function(l) { this._assign(this.table, "ref", l); } }, { key: "name", get: function() { return this.table.name; }, set: function(l) { this.table.name = l; } }, { key: "displayName", get: function() { return this.table.displyName || this.table.name; } }, { key: "displayNamename", set: function(l) { this.table.displayName = l; } }, { key: "headerRow", get: function() { return this.table.headerRow; }, set: function(l) { this._assign(this.table, "headerRow", l); } }, { key: "totalsRow", get: function() { return this.table.totalsRow; }, set: function(l) { this._assign(this.table, "totalsRow", l); } }, { key: "theme", get: function() { return this.table.style.name; }, set: function(l) { this.table.style.name = l; } }, { key: "showFirstColumn", get: function() { return this.table.style.showFirstColumn; }, set: function(l) { this.table.style.showFirstColumn = l; } }, { key: "showLastColumn", get: function() { return this.table.style.showLastColumn; }, set: function(l) { this.table.style.showLastColumn = l; } }, { key: "showRowStripes", get: function() { return this.table.style.showRowStripes; }, set: function(l) { this.table.style.showRowStripes = l; } }, { key: "showColumnStripes", get: function() { return this.table.style.showColumnStripes; }, set: function(l) { this.table.style.showColumnStripes = l; } /* eslint-enable lines-between-class-members */ }]), y; }(); x.exports = f; }, { "../utils/col-cache": 19 }], 13: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } var b = e("./worksheet"), w = e("./defined-names"), f = e("../xlsx/xlsx"), y = e("../csv/csv"), h = /* @__PURE__ */ function() { function l() { u(this, l), this.category = "", this.company = "", this.created = /* @__PURE__ */ new Date(), this.description = "", this.keywords = "", this.manager = "", this.modified = this.created, this.properties = {}, this.calcProperties = {}, this._worksheets = [], this.subject = "", this.title = "", this.views = [], this.media = [], this._definedNames = new w(); } return g(l, [{ key: "addWorksheet", value: function(s, v) { var c = this.nextId; if (s && s.length > 31 && console.warn("Worksheet name ".concat(s, " exceeds 31 chars. This will be truncated")), /[*?:/\\[\]]/.test(s)) throw new Error("Worksheet name ".concat(s, " cannot include any of the following characters: * ? : \\ / [ ]")); if (/(^')|('$)/.test(s)) throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(s)); if (s = (s || "sheet".concat(c)).substring(0, 31), this._worksheets.find(function(i) { return i && i.name.toLowerCase() === s.toLowerCase(); })) throw new Error("Worksheet name already exists: ".concat(s)); v && (typeof v == "string" ? (console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'), v = { properties: { tabColor: { argb: v } } }) : (v.argb || v.theme || v.indexed) && (console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"), v = { properties: { tabColor: v } })); var a = this._worksheets.reduce(function(i, n) { return (n && n.orderNo) > i ? n.orderNo : i; }, 0), r = Object.assign({}, v, { id: c, name: s, orderNo: a + 1, workbook: this }), t = new b(r); return this._worksheets[c] = t, t; } }, { key: "removeWorksheetEx", value: function(s) { delete this._worksheets[s.id]; } }, { key: "removeWorksheet", value: function(s) { var v = this.getWorksheet(s); v && v.destroy(); } }, { key: "getWorksheet", value: function(s) { if (s === void 0) return this._worksheets.find(Boolean); if (typeof s == "number") return this._worksheets[s]; if (typeof s == "string") return this._worksheets.find(function(v) { return v && v.name === s; }); } }, { key: "eachSheet", value: function(s) { this.worksheets.forEach(function(v) { s(v, v.id); }); } }, { key: "clearThemes", value: function() { this._themes = void 0; } }, { key: "addImage", value: function(s) { var v = this.media.length; return this.media.push(Object.assign({}, s, { type: "image" })), v; } }, { key: "getImage", value: function(s) { return this.media[s]; } }, { key: "xlsx", get: function() { return this._xlsx || (this._xlsx = new f(this)), this._xlsx; } }, { key: "csv", get: function() { return this._csv || (this._csv = new y(this)), this._csv; } }, { key: "nextId", get: function() { for (var s = 1; s < this._worksheets.length; s++) if (!this._worksheets[s]) return s; return this._worksheets.length || 1; } }, { key: "worksheets", get: function() { return this._worksheets.slice(1).sort(function(s, v) { return s.orderNo - v.orderNo; }).filter(Boolean); } }, { key: "definedNames", get: function() { return this._definedNames; } }, { key: "model", get: function() { return { creator: this.creator || "Unknown", lastModifiedBy: this.lastModifiedBy || "Unknown", lastPrinted: this.lastPrinted, created: this.created, modified: this.modified, properties: this.properties, worksheets: this.worksheets.map(function(s) { return s.model; }), sheets: this.worksheets.map(function(s) { return s.model; }).filter(Boolean), definedNames: this._definedNames.model, views: this.views, company: this.company, manager: this.manager, title: this.title, subject: this.subject, keywords: this.keywords, category: this.category, description: this.description, language: this.language, revision: this.revision, contentStatus: this.contentStatus, themes: this._themes, media: this.media, calcProperties: this.calcProperties }; }, set: function(s) { var v = this; this.creator = s.creator, this.lastModifiedBy = s.lastModifiedBy, this.lastPrinted = s.lastPrinted, this.created = s.created, this.modified = s.modified, this.company = s.company, this.manager = s.manager, this.title = s.title, this.subject = s.subject, this.keywords = s.keywords, this.category = s.category, this.description = s.description, this.language = s.language, this.revision = s.revision, this.contentStatus = s.contentStatus, this.properties = s.properties, this.calcProperties = s.calcProperties, this._worksheets = [], s.worksheets.forEach(function(c) { var a = c.id, r = c.name, t = c.state, i = s.sheets && s.sheets.findIndex(function(o) { return o.id === a; }), n = v._worksheets[a] = new b({ id: a, name: r, orderNo: i, state: t, workbook: v }); n.model = c; }), this._definedNames.model = s.definedNames, this.views = s.views, this._themes = s.themes, this.media = s.media || []; } }]), l; }(); x.exports = h; }, { "../csv/csv": 1, "../xlsx/xlsx": 141, "./defined-names": 6, "./worksheet": 14 }], 14: [function(e, x, _) { function u(z, N) { var M = Object.keys(z); if (Object.getOwnPropertySymbols) { var I = Object.getOwnPropertySymbols(z); N && (I = I.filter(function(R) { return Object.getOwnPropertyDescriptor(z, R).enumerable; })), M.push.apply(M, I); } return M; } function m(z) { for (var N = 1; N < arguments.length; N++) { var M = arguments[N] != null ? arguments[N] : {}; N % 2 ? u(Object(M), !0).forEach(function(I) { g(z, I, M[I]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(z, Object.getOwnPropertyDescriptors(M)) : u(Object(M)).forEach(function(I) { Object.defineProperty(z, I, Object.getOwnPropertyDescriptor(M, I)); }); } return z; } function g(z, N, M) { return N in z ? Object.defineProperty(z, N, { value: M, enumerable: !0, configurable: !0, writable: !0 }) : z[N] = M, z; } function b(z) { return h(z) || y(z) || f(z) || w(); } function w() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function f(z, N) { if (z) { if (typeof z == "string") return l(z, N); var M = Object.prototype.toString.call(z).slice(8, -1); if (M === "Object" && z.constructor && (M = z.constructor.name), M === "Map" || M === "Set") return Array.from(z); if (M === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)) return l(z, N); } } function y(z) { if (typeof Symbol != "undefined" && Symbol.iterator in Object(z)) return Array.from(z); } function h(z) { if (Array.isArray(z)) return l(z); } function l(z, N) { (N == null || N > z.length) && (N = z.length); for (var M = 0, I = new Array(N); M < N; M++) I[M] = z[M]; return I; } function d(z, N) { if (!(z instanceof N)) throw new TypeError("Cannot call a class as a function"); } function s(z, N) { for (var M = 0; M < N.length; M++) { var I = N[M]; I.enumerable = I.enumerable || !1, I.configurable = !0, "value" in I && (I.writable = !0), Object.defineProperty(z, I.key, I); } } function v(z, N, M) { return N && s(z.prototype, N), M && s(z, M), z; } var c = e("../utils/under-dash"), a = e("../utils/col-cache"), r = e("./range"), t = e("./row"), i = e("./column"), n = e("./enums"), o = e("./image"), p = e("./table"), O = e("./data-validations"), P = e("../utils/encryptor"), F = /* @__PURE__ */ function() { function z(N) { d(this, z), N = N || {}, this.id = N.id, this.orderNo = N.orderNo, this.name = N.name || "Sheet".concat(this.id), this.state = N.state || "visible", this._rows = [], this._columns = null, this._keys = {}, this._merges = {}, this.rowBreaks = [], this._workbook = N.workbook, this.properties = Object.assign({}, { defaultRowHeight: 15, dyDescent: 55, outlineLevelCol: 0, outlineLevelRow: 0 }, N.properties), this.pageSetup = Object.assign({}, { margins: { left: 0.7, right: 0.7, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3 }, orientation: "portrait", horizontalDpi: 4294967295, verticalDpi: 4294967295, fitToPage: !!(N.pageSetup && (N.pageSetup.fitToWidth || N.pageSetup.fitToHeight) && !N.pageSetup.scale), pageOrder: "downThenOver", blackAndWhite: !1, draft: !1, cellComments: "None", errors: "displayed", scale: 100, fitToWidth: 1, fitToHeight: 1, paperSize: void 0, showRowColHeaders: !1, showGridLines: !1, firstPageNumber: void 0, horizontalCentered: !1, verticalCentered: !1, rowBreaks: null, colBreaks: null }, N.pageSetup), this.headerFooter = Object.assign({}, { differentFirst: !1, differentOddEven: !1, oddHeader: null, oddFooter: null, evenHeader: null, evenFooter: null, firstHeader: null, firstFooter: null }, N.headerFooter), this.dataValidations = new O(), this.views = N.views || [], this.autoFilter = N.autoFilter || null, this._media = [], this.sheetProtection = null, this.tables = {}, this.conditionalFormattings = []; } return v(z, [{ key: "destroy", // when you're done with this worksheet, call this to remove from workbook value: function() { this._workbook.removeWorksheetEx(this); } // Get the bounding range of the cells in this worksheet }, { key: "getColumnKey", value: function(M) { return this._keys[M]; } }, { key: "setColumnKey", value: function(M, I) { this._keys[M] = I; } }, { key: "deleteColumnKey", value: function(M) { delete this._keys[M]; } }, { key: "eachColumnKey", value: function(M) { c.each(this._keys, M); } // get a single column by col number. If it doesn't exist, create it and any gaps before it }, { key: "getColumn", value: function(M) { if (typeof M == "string") { var I = this._keys[M]; if (I) return I; M = a.l2n(M); } if (this._columns || (this._columns = []), M > this._columns.length) for (var R = this._columns.length + 1; R <= M; ) this._columns.push(new i(this, R++)); return this._columns[M - 1]; } }, { key: "spliceColumns", value: function(M, I) { for (var R = this, C = this._rows, E = C.length, A = arguments.length, L = new Array(A > 2 ? A - 2 : 0), $ = 2; $ < A; $++) L[$ - 2] = arguments[$]; if (L.length > 0) for (var W = function(ve) { var ge = [M, I]; L.forEach(function(J) { ge.push(J[ve] || null); }); var oe = R.getRow(ve + 1); oe.splice.apply(oe, ge); }, U = 0; U < E; U++) W(U); else this._rows.forEach(function(ce) { ce && ce.splice(M, I); }); var D = L.length - I, B = M + I, j = this._columns.length; if (D < 0) for (var V = M + L.length; V <= j; V++) this.getColumn(V).defn = this.getColumn(V - D).defn; else if (D > 0) for (var re = j; re >= B; re--) this.getColumn(re + D).defn = this.getColumn(re).defn; for (var ee = M; ee < M + L.length; ee++) this.getColumn(ee).defn = null; this.workbook.definedNames.spliceColumns(this.name, M, I, L.length); } }, { key: "_commitRow", // ========================================================================= // Rows value: function() { } }, { key: "findRow", // find a row (if exists) by row number value: function(M) { return this._rows[M - 1]; } // find multiple rows (if exists) by row number }, { key: "findRows", value: function(M, I) { return this._rows.slice(M - 1, M - 1 + I); } }, { key: "getRow", // get a row by row number. value: function(M) { var I = this._rows[M - 1]; return I || (I = this._rows[M - 1] = new t(this, M)), I; } // get multiple rows by row number. }, { key: "getRows", value: function(M, I) { if (!(I < 1)) { for (var R = [], C = M; C < M + I; C++) R.push(this.getRow(C)); return R; } } }, { key: "addRow", value: function(M) { var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "n", R = this._nextRow, C = this.getRow(R); return C.values = M, this._setStyleOption(R, I[0] === "i" ? I : "n"), C; } }, { key: "addRows", value: function(M) { var I = this, R = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "n", C = []; return M.forEach(function(E) { C.push(I.addRow(E, R)); }), C; } }, { key: "insertRow", value: function(M, I) { var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "n"; return this.spliceRows(M, 0, I), this._setStyleOption(M, R), this.getRow(M); } }, { key: "insertRows", value: function(M, I) { var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "n"; if (this.spliceRows.apply(this, [M, 0].concat(b(I))), R !== "n") for (var C = 0; C < I.length; C++) R[0] === "o" && this.findRow(I.length + M + C) !== void 0 ? this._copyStyle(I.length + M + C, M + C, R[1] === "+") : R[0] === "i" && this.findRow(M - 1) !== void 0 && this._copyStyle(M - 1, M + C, R[1] === "+"); return this.getRows(M, I.length); } // set row at position to same style as of either pervious row (option 'i') or next row (option 'o') }, { key: "_setStyleOption", value: function(M) { var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "n"; I[0] === "o" && this.findRow(M + 1) !== void 0 ? this._copyStyle(M + 1, M, I[1] === "+") : I[0] === "i" && this.findRow(M - 1) !== void 0 && this._copyStyle(M - 1, M, I[1] === "+"); } }, { key: "_copyStyle", value: function(M, I) { var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, C = this.getRow(M), E = this.getRow(I); E.style = Object.freeze(m({}, C.style)), C.eachCell({ includeEmpty: R }, function(A, L) { E.getCell(L).style = Object.freeze(m({}, A.style)); }), E.height = C.height; } }, { key: "duplicateRow", value: function(M, I) { var R = this, C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, E = this._rows[M - 1], A = new Array(I).fill(E.values); this.spliceRows.apply(this, [M + 1, C ? 0 : I].concat(b(A))); for (var L = function(U) { var D = R._rows[M + U]; D.style = E.style, D.height = E.height, E.eachCell({ includeEmpty: !0 }, function(B, j) { D.getCell(j).style = B.style; }); }, $ = 0; $ < I; $++) L($); } }, { key: "spliceRows", value: function(M, I) { for (var R = this, C = M + I, E = arguments.length, A = new Array(E > 2 ? E - 2 : 0), L = 2; L < E; L++) A[L - 2] = arguments[L]; var $ = A.length, W = $ - I, U = this._rows.length, D, B; if (W < 0) for (D = C; D <= U; D++) B = this._rows[D - 1], B ? function() { var V = R.getRow(D + W); V.values = B.values, V.style = B.style, V.height = B.height, B.eachCell({ includeEmpty: !0 }, function(re, ee) { V.getCell(ee).style = re.style; }), R._rows[D - 1] = void 0; }() : this._rows[D + W - 1] = void 0; else if (W > 0) for (D = U; D >= C; D--) B = this._rows[D - 1], B ? function() { var V = R.getRow(D + W); V.values = B.values, V.style = B.style, V.height = B.height, B.eachCell({ includeEmpty: !0 }, function(re, ee) { if (V.getCell(ee).style = re.style, re._value.constructor.name === "MergeValue") { var ce = R.getRow(re._row._number + $).getCell(ee), ve = re._value._master, ge = R.getRow(ve._row._number + $).getCell(ve._column._number); ce.merge(ge); } }); }() : this._rows[D + W - 1] = void 0; for (D = 0; D < $; D++) { var j = this.getRow(M + D); j.style = {}, j.values = A[D]; } this.workbook.definedNames.spliceRows(this.name, M, I, $); } // iterate over every row in the worksheet, including maybe empty rows }, { key: "eachRow", value: function(M, I) { if (I || (I = M, M = void 0), M && M.includeEmpty) for (var R = this._rows.length, C = 1; C <= R; C++) I(this.getRow(C), C); else this._rows.forEach(function(E) { E && E.hasValues && I(E, E.number); }); } // return all rows as sparse array }, { key: "getSheetValues", value: function() { var M = []; return this._rows.forEach(function(I) { I && (M[I.number] = I.values); }), M; } // ========================================================================= // Cells // returns the cell at [r,c] or address given by r. If not found, return undefined }, { key: "findCell", value: function(M, I) { var R = a.getAddress(M, I), C = this._rows[R.row - 1]; return C ? C.findCell(R.col) : void 0; } // return the cell at [r,c] or address given by r. If not found, create a new one. }, { key: "getCell", value: function(M, I) { var R = a.getAddress(M, I), C = this.getRow(R.row); return C.getCellEx(R); } // ========================================================================= // Merge // convert the range defined by ['tl:br'], [tl,br] or [t,l,b,r] into a single 'merged' cell }, { key: "mergeCells", value: function() { for (var M = arguments.length, I = new Array(M), R = 0; R < M; R++) I[R] = arguments[R]; var C = new r(I); this._mergeCellsInternal(C); } }, { key: "mergeCellsWithoutStyle", value: function() { for (var M = arguments.length, I = new Array(M), R = 0; R < M; R++) I[R] = arguments[R]; var C = new r(I); this._mergeCellsInternal(C, !0); } }, { key: "_mergeCellsInternal", value: function(M, I) { c.each(this._merges, function(A) { if (A.intersects(M)) throw new Error("Cannot merge already merged cells"); }); for (var R = this.getCell(M.top, M.left), C = M.top; C <= M.bottom; C++) for (var E = M.left; E <= M.right; E++) (C > M.top || E > M.left) && this.getCell(C, E).merge(R, I); this._merges[R.address] = M; } }, { key: "_unMergeMaster", value: function(M) { var I = this._merges[M.address]; if (I) { for (var R = I.top; R <= I.bottom; R++) for (var C = I.left; C <= I.right; C++) this.getCell(R, C).unmerge(); delete this._merges[M.address]; } } }, { key: "unMergeCells", // scan the range defined by ['tl:br'], [tl,br] or [t,l,b,r] and if any cell is part of a merge, // un-merge the group. Note this function can affect multiple merges and merge-blocks are // atomic - either they're all merged or all un-merged. value: function() { for (var M = arguments.length, I = new Array(M), R = 0; R < M; R++) I[R] = arguments[R]; for (var C = new r(I), E = C.top; E <= C.bottom; E++) for (var A = C.left; A <= C.right; A++) { var L = this.findCell(E, A); L && (L.type === n.ValueType.Merge ? this._unMergeMaster(L.master) : this._merges[L.address] && this._unMergeMaster(L)); } } // =========================================================================== // Shared/Array Formula }, { key: "fillFormula", value: function(M, I, R) { var C = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "shared", E = a.decode(M), A = E.top, L = E.left, $ = E.bottom, W = E.right, U = W - L + 1, D = a.encodeAddress(A, L), B = C === "shared", j; typeof R == "function" ? j = R : Array.isArray(R) ? Array.isArray(R[0]) ? j = function(ve, ge) { return R[ve - A][ge - L]; } : j = function(ve, ge) { return R[(ve - A) * U + (ge - L)]; } : j = function() { }; for (var V = !0, re = A; re <= $; re++) for (var ee = L; ee <= W; ee++) V ? (this.getCell(re, ee).value = { shareType: C, formula: I, ref: M, result: j(re, ee) }, V = !1) : this.getCell(re, ee).value = B ? { sharedFormula: D, result: j(re, ee) } : j(re, ee); } // ========================================================================= // Images }, { key: "addImage", value: function(M, I) { var R = { type: "image", imageId: M, range: I }; this._media.push(new o(this, R)); } }, { key: "getImages", value: function() { return this._media.filter(function(M) { return M.type === "image"; }); } }, { key: "addBackgroundImage", value: function(M) { var I = { type: "background", imageId: M }; this._media.push(new o(this, I)); } }, { key: "getBackgroundImageId", value: function() { var M = this._media.find(function(I) { return I.type === "background"; }); return M && M.imageId; } // ========================================================================= // Worksheet Protection }, { key: "protect", value: function(M, I) { var R = this; return new Promise(function(C) { R.sheetProtection = { sheet: !0 }, I && "spinCount" in I && (I.spinCount = Number.isFinite(I.spinCount) ? Math.round(Math.max(0, I.spinCount)) : 1e5), M && (R.sheetProtection.algorithmName = "SHA-512", R.sheetProtection.saltValue = P.randomBytes(16).toString("base64"), R.sheetProtection.spinCount = I && "spinCount" in I ? I.spinCount : 1e5, R.sheetProtection.hashValue = P.convertPasswordToHash(M, "SHA512", R.sheetProtection.saltValue, R.sheetProtection.spinCount)), I && (R.sheetProtection = Object.assign(R.sheetProtection, I), !M && "spinCount" in I && delete R.sheetProtection.spinCount), C(); }); } }, { key: "unprotect", value: function() { this.sheetProtection = null; } // ========================================================================= // Tables }, { key: "addTable", value: function(M) { var I = new p(this, M); return this.tables[M.name] = I, I; } }, { key: "getTable", value: function(M) { return this.tables[M]; } }, { key: "removeTable", value: function(M) { delete this.tables[M]; } }, { key: "getTables", value: function() { return Object.values(this.tables); } // =========================================================================== // Conditional Formatting }, { key: "addConditionalFormatting", value: function(M) { this.conditionalFormattings.push(M); } }, { key: "removeConditionalFormatting", value: function(M) { typeof M == "number" ? this.conditionalFormattings.splice(M, 1) : M instanceof Function ? this.conditionalFormattings = this.conditionalFormattings.filter(M) : this.conditionalFormattings = []; } // =========================================================================== // Deprecated }, { key: "_parseRows", value: function(M) { var I = this; this._rows = [], M.rows.forEach(function(R) { var C = new t(I, R.number); I._rows[C.number - 1] = C, C.model = R; }); } }, { key: "_parseMergeCells", value: function(M) { var I = this; c.each(M.mergeCells, function(R) { I.mergeCellsWithoutStyle(R); }); } }, { key: "workbook", get: function() { return this._workbook; } }, { key: "dimensions", get: function() { var M = new r(); return this._rows.forEach(function(I) { if (I) { var R = I.dimensions; R && M.expand(I.number, R.min, I.number, R.max); } }), M; } // ========================================================================= // Columns // get the current columns array. }, { key: "columns", get: function() { return this._columns; }, set: function(M) { var I = this; this._headerRowCount = M.reduce(function(E, A) { var L = A.header && 1 || A.headers && A.headers.length || 0; return Math.max(E, L); }, 0); var R = 1, C = this._columns = []; M.forEach(function(E) { var A = new i(I, R++, !1); C.push(A), A.defn = E; }); } }, { key: "lastColumn", get: function() { return this.getColumn(this.columnCount); } }, { key: "columnCount", get: function() { var M = 0; return this.eachRow(function(I) { M = Math.max(M, I.cellCount); }), M; } }, { key: "actualColumnCount", get: function() { var M = [], I = 0; return this.eachRow(function(R) { R.eachCell(function(C) { var E = C.col; M[E] || (M[E] = !0, I++); }); }), I; } }, { key: "_lastRowNumber", get: function() { for (var M = this._rows, I = M.length; I > 0 && M[I - 1] === void 0; ) I--; return I; } }, { key: "_nextRow", get: function() { return this._lastRowNumber + 1; } }, { key: "lastRow", get: function() { if (this._rows.length) return this._rows[this._rows.length - 1]; } }, { key: "rowCount", get: function() { return this._lastRowNumber; } }, { key: "actualRowCount", get: function() { var M = 0; return this.eachRow(function() { M++; }), M; } }, { key: "hasMerges", get: function() { return c.some(this._merges, Boolean); } }, { key: "tabColor", get: function() { return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"), this.properties.tabColor; }, set: function(M) { console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"), this.properties.tabColor = M; } // =========================================================================== // Model }, { key: "model", get: function() { var M = { id: this.id, name: this.name, dataValidations: this.dataValidations.model, properties: this.properties, state: this.state, pageSetup: this.pageSetup, headerFooter: this.headerFooter, rowBreaks: this.rowBreaks, views: this.views, autoFilter: this.autoFilter, media: this._media.map(function(C) { return C.model; }), sheetProtection: this.sheetProtection, tables: Object.values(this.tables).map(function(C) { return C.model; }), conditionalFormattings: this.conditionalFormattings }; M.cols = i.toModel(this.columns); var I = M.rows = [], R = M.dimensions = new r(); return this._rows.forEach(function(C) { var E = C && C.model; E && (R.expand(E.number, E.min, E.number, E.max), I.push(E)); }), M.merges = [], c.each(this._merges, function(C) { M.merges.push(C.range); }), M; }, set: function(M) { var I = this; this.name = M.name, this._columns = i.fromModel(this, M.cols), this._parseRows(M), this._parseMergeCells(M), this.dataValidations = new O(M.dataValidations), this.properties = M.properties, this.pageSetup = M.pageSetup, this.headerFooter = M.headerFooter, this.views = M.views, this.autoFilter = M.autoFilter, this._media = M.media.map(function(R) { return new o(I, R); }), this.sheetProtection = M.sheetProtection, this.tables = M.tables.reduce(function(R, C) { var E = new p(); return E.model = C, R[C.name] = E, R; }, {}), this.conditionalFormattings = M.conditionalFormattings; } }]), z; }(); x.exports = F; }, { "../utils/col-cache": 19, "../utils/encryptor": 20, "../utils/under-dash": 25, "./column": 4, "./data-validations": 5, "./enums": 7, "./image": 8, "./range": 10, "./row": 11, "./table": 12 }], 15: [function(e, x, _) { e("core-js/modules/es.promise"), e("core-js/modules/es.object.assign"), e("core-js/modules/es.object.keys"), e("core-js/modules/es.object.values"), e("core-js/modules/es.symbol"), e("core-js/modules/es.symbol.async-iterator"), e("core-js/modules/es.array.iterator"), e("core-js/modules/es.array.includes"), e("core-js/modules/es.array.find-index"), e("core-js/modules/es.array.find"), e("core-js/modules/es.string.from-code-point"), e("core-js/modules/es.string.includes"), e("core-js/modules/es.number.is-nan"), e("regenerator-runtime/runtime"); var u = { Workbook: e("./doc/workbook") }, m = e("./doc/enums"); Object.keys(m).forEach(function(g) { u[g] = m[g]; }), x.exports = u; }, { "./doc/enums": 7, "./doc/workbook": 13, "core-js/modules/es.array.find": 316, "core-js/modules/es.array.find-index": 315, "core-js/modules/es.array.includes": 317, "core-js/modules/es.array.iterator": 318, "core-js/modules/es.number.is-nan": 319, "core-js/modules/es.object.assign": 320, "core-js/modules/es.object.keys": 321, "core-js/modules/es.object.values": 322, "core-js/modules/es.promise": 323, "core-js/modules/es.string.from-code-point": 324, "core-js/modules/es.string.includes": 325, "core-js/modules/es.symbol": 327, "core-js/modules/es.symbol.async-iterator": 326, "regenerator-runtime/runtime": 492 }], 16: [function(e, x, _) { var u = typeof TextDecoder == "undefined" ? null : new TextDecoder("utf-8"); function m(g) { return typeof g == "string" ? g : u ? u.decode(g) : g.toString(); } _.bufferToString = m; }, {}], 17: [function(e, x, _) { var u = typeof TextEncoder == "undefined" ? null : new TextEncoder("utf-8"), m = e("buffer"), g = m.Buffer; function b(w) { return typeof w != "string" ? w : u ? g.from(u.encode(w).buffer) : g.from(w); } _.stringToBuffer = b; }, { buffer: 216 }], 18: [function(e, x, _) { function u(y, h) { if (!(y instanceof h)) throw new TypeError("Cannot call a class as a function"); } function m(y, h) { for (var l = 0; l < h.length; l++) { var d = h[l]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(y, d.key, d); } } function g(y, h, l) { return h && m(y.prototype, h), l && m(y, l), y; } var b = e("./under-dash"), w = e("./col-cache"), f = /* @__PURE__ */ function() { function y(h) { u(this, y), this.template = h, this.sheets = {}; } return g(y, [{ key: "addCell", value: function(l) { this.addCellEx(w.decodeEx(l)); } }, { key: "getCell", value: function(l) { return this.findCellEx(w.decodeEx(l), !0); } }, { key: "findCell", value: function(l) { return this.findCellEx(w.decodeEx(l), !1); } }, { key: "findCellAt", value: function(l, d, s) { var v = this.sheets[l], c = v && v[d]; return c && c[s]; } }, { key: "addCellEx", value: function(l) { if (l.top) for (var d = l.top; d <= l.bottom; d++) for (var s = l.left; s <= l.right; s++) this.getCellAt(l.sheetName, d, s); else this.findCellEx(l, !0); } }, { key: "getCellEx", value: function(l) { return this.findCellEx(l, !0); } }, { key: "findCellEx", value: function(l, d) { var s = this.findSheet(l, d), v = this.findSheetRow(s, l, d); return this.findRowCell(v, l, d); } }, { key: "getCellAt", value: function(l, d, s) { var v = this.sheets[l] || (this.sheets[l] = []), c = v[d] || (v[d] = []), a = c[s] || (c[s] = { sheetName: l, address: w.n2l(s) + d, row: d, col: s }); return a; } }, { key: "removeCellEx", value: function(l) { var d = this.findSheet(l); if (d) { var s = this.findSheetRow(d, l); s && delete s[l.col]; } } }, { key: "forEachInSheet", value: function(l, d) { var s = this.sheets[l]; s && s.forEach(function(v, c) { v && v.forEach(function(a, r) { a && d(a, c, r); }); }); } }, { key: "forEach", value: function(l) { var d = this; b.each(this.sheets, function(s, v) { d.forEachInSheet(v, l); }); } }, { key: "map", value: function(l) { var d = []; return this.forEach(function(s) { d.push(l(s)); }), d; } }, { key: "findSheet", value: function(l, d) { var s = l.sheetName; if (this.sheets[s]) return this.sheets[s]; if (d) return this.sheets[s] = []; } }, { key: "findSheetRow", value: function(l, d, s) { var v = d.row; if (l && l[v]) return l[v]; if (s) return l[v] = []; } }, { key: "findRowCell", value: function(l, d, s) { var v = d.col; if (l && l[v]) return l[v]; if (s) return l[v] = this.template ? Object.assign(d, JSON.parse(JSON.stringify(this.template))) : d; } }, { key: "spliceRows", value: function(l, d, s, v) { var c = this.sheets[l]; if (c) { for (var a = [], r = 0; r < v; r++) a.push([]); c.splice.apply(c, [d, s].concat(a)); } } }, { key: "spliceColumns", value: function(l, d, s, v) { var c = this.sheets[l]; if (c) { for (var a = [], r = 0; r < v; r++) a.push(null); b.each(c, function(t) { t.splice.apply(t, [d, s].concat(a)); }); } } }]), y; }(); x.exports = f; }, { "./col-cache": 19, "./under-dash": 25 }], 19: [function(e, x, _) { function u(v, c) { return f(v) || w(v, c) || g(v, c) || m(); } function m() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function g(v, c) { if (v) { if (typeof v == "string") return b(v, c); var a = Object.prototype.toString.call(v).slice(8, -1); if (a === "Object" && v.constructor && (a = v.constructor.name), a === "Map" || a === "Set") return Array.from(v); if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return b(v, c); } } function b(v, c) { (c == null || c > v.length) && (c = v.length); for (var a = 0, r = new Array(c); a < c; a++) r[a] = v[a]; return r; } function w(v, c) { if (!(typeof Symbol == "undefined" || !(Symbol.iterator in Object(v)))) { var a = [], r = !0, t = !1, i = void 0; try { for (var n = v[Symbol.iterator](), o; !(r = (o = n.next()).done) && (a.push(o.value), !(c && a.length === c)); r = !0) ; } catch (p) { t = !0, i = p; } finally { try { !r && n.return != null && n.return(); } finally { if (t) throw i; } } return a; } } function f(v) { if (Array.isArray(v)) return v; } function y(v, c) { var a = Object.keys(v); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(v); c && (r = r.filter(function(t) { return Object.getOwnPropertyDescriptor(v, t).enumerable; })), a.push.apply(a, r); } return a; } function h(v) { for (var c = 1; c < arguments.length; c++) { var a = arguments[c] != null ? arguments[c] : {}; c % 2 ? y(Object(a), !0).forEach(function(r) { l(v, r, a[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(v, Object.getOwnPropertyDescriptors(a)) : y(Object(a)).forEach(function(r) { Object.defineProperty(v, r, Object.getOwnPropertyDescriptor(a, r)); }); } return v; } function l(v, c, a) { return c in v ? Object.defineProperty(v, c, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : v[c] = a, v; } var d = /^[A-Z]+\d+$/, s = { _dictionary: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], _l2nFill: 0, _l2n: {}, _n2l: [], _level: function(c) { return c <= 26 ? 1 : c <= 26 * 26 ? 2 : 3; }, _fill: function(c) { var a, r, t, i, n, o = 1; if (c >= 4) throw new Error("Out of bounds. Excel supports columns from 1 to 16384"); if (this._l2nFill < 1 && c >= 1) { for (; o <= 26; ) a = this._dictionary[o - 1], this._n2l[o] = a, this._l2n[a] = o, o++; this._l2nFill = 1; } if (this._l2nFill < 2 && c >= 2) { for (o = 27; o <= 26 + 26 * 26; ) r = o - (26 + 1), t = r % 26, i = Math.floor(r / 26), a = this._dictionary[i] + this._dictionary[t], this._n2l[o] = a, this._l2n[a] = o, o++; this._l2nFill = 2; } if (this._l2nFill < 3 && c >= 3) { for (o = 26 + 26 * 26 + 1; o <= 16384; ) r = o - (26 * 26 + 26 + 1), t = r % 26, i = Math.floor(r / 26) % 26, n = Math.floor(r / (26 * 26)), a = this._dictionary[n] + this._dictionary[i] + this._dictionary[t], this._n2l[o] = a, this._l2n[a] = o, o++; this._l2nFill = 3; } }, l2n: function(c) { if (this._l2n[c] || this._fill(c.length), !this._l2n[c]) throw new Error("Out of bounds. Invalid column letter: ".concat(c)); return this._l2n[c]; }, n2l: function(c) { if (c < 1 || c > 16384) throw new Error("".concat(c, " is out of bounds. Excel supports columns from 1 to 16384")); return this._n2l[c] || this._fill(this._level(c)), this._n2l[c]; }, // ========================================================================= // Address processing _hash: {}, // check if value looks like an address validateAddress: function(c) { if (!d.test(c)) throw new Error("Invalid Address: ".concat(c)); return !0; }, // convert address string into structure decodeAddress: function(c) { var a = c.length < 5 && this._hash[c]; if (a) return a; for (var r = !1, t = "", i = 0, n = !1, o = "", p = 0, O = 0, P; O < c.length; O++) if (P = c.charCodeAt(O), !n && P >= 65 && P <= 90) r = !0, t += c[O], i = i * 26 + P - 64; else if (P >= 48 && P <= 57) n = !0, o += c[O], p = p * 10 + P - 48; else if (n && r && P !== 36) break; if (!r) i = void 0; else if (i > 16384) throw new Error("Out of bounds. Invalid column letter: ".concat(t)); n || (p = void 0), c = t + o; var F = { address: c, col: i, row: p, $col$row: "$".concat(t, "$").concat(o) }; return i <= 100 && p <= 100 && (this._hash[c] = F, this._hash[F.$col$row] = F), F; }, // convert r,c into structure (if only 1 arg, assume r is address string) getAddress: function(c, a) { if (a) { var r = this.n2l(a) + c; return this.decodeAddress(r); } return this.decodeAddress(c); }, // convert [address], [tl:br] into address structures decode: function(c) { var a = c.split(":"); if (a.length === 2) { var r = this.decodeAddress(a[0]), t = this.decodeAddress(a[1]), i = { top: Math.min(r.row, t.row), left: Math.min(r.col, t.col), bottom: Math.max(r.row, t.row), right: Math.max(r.col, t.col) }; return i.tl = this.n2l(i.left) + i.top, i.br = this.n2l(i.right) + i.bottom, i.dimensions = "".concat(i.tl, ":").concat(i.br), i; } return this.decodeAddress(c); }, // convert [sheetName!][$]col[$]row[[$]col[$]row] into address or range structures decodeEx: function(c) { var a = c.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/), r = a[1] || a[2], t = a[3], i = t.split(":"); if (i.length > 1) { var n = this.decodeAddress(i[0]), o = this.decodeAddress(i[1]), p = Math.min(n.row, o.row), O = Math.min(n.col, o.col), P = Math.max(n.row, o.row), F = Math.max(n.col, o.col); return n = this.n2l(O) + p, o = this.n2l(F) + P, { top: p, left: O, bottom: P, right: F, sheetName: r, tl: { address: n, col: O, row: p, $col$row: "$".concat(this.n2l(O), "$").concat(p), sheetName: r }, br: { address: o, col: F, row: P, $col$row: "$".concat(this.n2l(F), "$").concat(P), sheetName: r }, dimensions: "".concat(n, ":").concat(o) }; } if (t.startsWith("#")) return r ? { sheetName: r, error: t } : { error: t }; var z = this.decodeAddress(t); return r ? h({ sheetName: r }, z) : z; }, // convert row,col into address string encodeAddress: function(c, a) { return s.n2l(a) + c; }, // convert row,col into string address or t,l,b,r into range encode: function() { switch (arguments.length) { case 2: return s.encodeAddress(arguments[0], arguments[1]); case 4: return "".concat(s.encodeAddress(arguments[0], arguments[1]), ":").concat(s.encodeAddress(arguments[2], arguments[3])); default: throw new Error("Can only encode with 2 or 4 arguments"); } }, // return true if address is contained within range inRange: function(c, a) { var r = u(c, 5), t = r[0], i = r[1], n = r[3], o = r[4], p = u(a, 2), O = p[0], P = p[1]; return O >= t && O <= n && P >= i && P <= o; } }; x.exports = s; }, {}], 20: [function(e, x, _) { (function(u) { var m = e("crypto"), g = { /** * Calculate a hash of the concatenated buffers with the given algorithm. * @param {string} algorithm - The hash algorithm. * @returns {Buffer} The hash */ hash: function(w) { for (var f = m.createHash(w), y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), l = 1; l < y; l++) h[l - 1] = arguments[l]; return f.update(u.concat(h)), f.digest(); }, /** * Convert a password into an encryption key * @param {string} password - The password * @param {string} hashAlgorithm - The hash algoritm * @param {string} saltValue - The salt value * @param {number} spinCount - The spin count * @param {number} keyBits - The length of the key in bits * @param {Buffer} blockKey - The block key * @returns {Buffer} The encryption key */ convertPasswordToHash: function(w, f, y, h) { f = f.toLowerCase(); var l = m.getHashes(); if (l.indexOf(f) < 0) throw new Error("Hash algorithm '".concat(f, "' not supported!")); for (var d = u.from(w, "utf16le"), s = this.hash(f, u.from(y, "base64"), d), v = 0; v < h; v++) { var c = u.alloc(4); c.writeUInt32LE(v, 0), s = this.hash(f, s, c); } return s.toString("base64"); }, /** * Generates cryptographically strong pseudo-random data. * @param size The size argument is a number indicating the number of bytes to generate. */ randomBytes: function(w) { return m.randomBytes(w); } }; x.exports = g; }).call(this, e("buffer").Buffer); }, { buffer: 216, crypto: 335 }], 21: [function(e, x, _) { function u(v) { return new b(v); } function m(v) { return function() { return new g(v.apply(this, arguments)); }; } function g(v) { var c, a; function r(n, o) { return new Promise(function(p, O) { var P = { key: n, arg: o, resolve: p, reject: O, next: null }; a ? a = a.next = P : (c = a = P, t(n, o)); }); } function t(n, o) { try { var p = v[n](o), O = p.value, P = O instanceof b; Promise.resolve(P ? O.wrapped : O).then(function(F) { if (P) { t(n === "return" ? "return" : "next", F); return; } i(p.done ? "return" : "normal", F); }, function(F) { t("throw", F); }); } catch (F) { i("throw", F); } } function i(n, o) { switch (n) { case "return": c.resolve({ value: o, done: !0 }); break; case "throw": c.reject(o); break; default: c.resolve({ value: o, done: !1 }); break; } c = c.next, c ? t(c.key, c.arg) : a = null; } this._invoke = r, typeof v.return != "function" && (this.return = void 0); } typeof Symbol == "function" && Symbol.asyncIterator && (g.prototype[Symbol.asyncIterator] = function() { return this; }), g.prototype.next = function(v) { return this._invoke("next", v); }, g.prototype.throw = function(v) { return this._invoke("throw", v); }, g.prototype.return = function(v) { return this._invoke("return", v); }; function b(v) { this.wrapped = v; } function w(v) { var c; if (typeof Symbol != "undefined" && (Symbol.asyncIterator && (c = v[Symbol.asyncIterator], c != null) || Symbol.iterator && (c = v[Symbol.iterator], c != null))) return c.call(v); throw new TypeError("Object is not async iterable"); } var f = e("saxes"), y = f.SaxesParser, h = e("readable-stream"), l = h.PassThrough, d = e("./browser-buffer-decode"), s = d.bufferToString; x.exports = /* @__PURE__ */ function() { var v = m(/* @__PURE__ */ regeneratorRuntime.mark(function c(a) { var r, t, i, n, o, p, O, P, F, z; return regeneratorRuntime.wrap(function(M) { for (; ; ) switch (M.prev = M.next) { case 0: a.pipe && !a[Symbol.asyncIterator] && (a = a.pipe(new l())), r = new y(), r.on("error", function(I) { t = I; }), i = [], r.on("opentag", function(I) { return i.push({ eventType: "opentag", value: I }); }), r.on("text", function(I) { return i.push({ eventType: "text", value: I }); }), r.on("closetag", function(I) { return i.push({ eventType: "closetag", value: I }); }), n = !0, o = !1, M.prev = 9, O = w(a); case 11: return M.next = 13, u(O.next()); case 13: return P = M.sent, n = P.done, M.next = 17, u(P.value); case 17: if (F = M.sent, n) { M.next = 29; break; } if (z = F, r.write(s(z)), !t) { M.next = 23; break; } throw t; case 23: return M.next = 25, i; case 25: i = []; case 26: n = !0, M.next = 11; break; case 29: M.next = 35; break; case 31: M.prev = 31, M.t0 = M.catch(9), o = !0, p = M.t0; case 35: if (M.prev = 35, M.prev = 36, !(!n && O.return != null)) { M.next = 40; break; } return M.next = 40, u(O.return()); case 40: if (M.prev = 40, !o) { M.next = 43; break; } throw p; case 43: return M.finish(40); case 44: return M.finish(35); case 45: case "end": return M.stop(); } }, c, null, [[9, 31, 35, 45], [36, , 40, 44]]); })); return function(c) { return v.apply(this, arguments); }; }(); }, { "./browser-buffer-decode": 16, "readable-stream": 491, saxes: 496 }], 22: [function(e, x, _) { var u = e("./col-cache"), m = /(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi, g = /^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i; function b(w, f, y) { var h = u.decode(f), l = u.decode(y); return w.replace(m, function(d, s, v, c, a) { if (a) return d; var r = g.exec(c); if (r) { var t = r[1], i = r[2].toUpperCase(), n = r[3], o = r[4]; if (i.length > 3 || i.length === 3 && i > "XFD") return d; var p = u.l2n(i), O = parseInt(o, 10); t || (p += l.col - h.col), n || (O += l.row - h.row); var P = (s || "") + (t || "") + u.n2l(p) + (n || "") + O; return P; } return d; }); } x.exports = { slideFormula: b }; }, { "./col-cache": 19 }], 23: [function(e, x, _) { (function(u, m) { function g(t, i, n, o, p, O, P) { try { var F = t[O](P), z = F.value; } catch (N) { n(N); return; } F.done ? i(z) : Promise.resolve(z).then(o, p); } function b(t) { return function() { var i = this, n = arguments; return new Promise(function(o, p) { var O = t.apply(i, n); function P(z) { g(O, o, p, P, F, "next", z); } function F(z) { g(O, o, p, P, F, "throw", z); } P(void 0); }); }; } function w(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function f(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function y(t, i, n) { return i && f(t.prototype, i), n && f(t, n), t; } var h = e("readable-stream"), l = e("./utils"), d = e("./string-buf"), s = /* @__PURE__ */ function() { function t(i, n) { w(this, t), this._data = i, this._encoding = n; } return y(t, [{ key: "copy", // copy to target buffer value: function(n, o, p, O) { return this.toBuffer().copy(n, o, p, O); } }, { key: "toBuffer", value: function() { return this._buffer || (this._buffer = m.from(this._data, this._encoding)), this._buffer; } }, { key: "length", get: function() { return this.toBuffer().length; } }]), t; }(), v = /* @__PURE__ */ function() { function t(i) { w(this, t), this._data = i; } return y(t, [{ key: "copy", // copy to target buffer value: function(n, o, p, O) { return this._data._buf.copy(n, o, p, O); } }, { key: "toBuffer", value: function() { return this._data.toBuffer(); } }, { key: "length", get: function() { return this._data.length; } }]), t; }(), c = /* @__PURE__ */ function() { function t(i) { w(this, t), this._data = i; } return y(t, [{ key: "copy", // copy to target buffer value: function(n, o, p, O) { this._data.copy(n, o, p, O); } }, { key: "toBuffer", value: function() { return this._data; } }, { key: "length", get: function() { return this._data.length; } }]), t; }(), a = /* @__PURE__ */ function() { function t(i) { w(this, t), this.size = i, this.buffer = m.alloc(i), this.iRead = 0, this.iWrite = 0; } return y(t, [{ key: "toBuffer", value: function() { if (this.iRead === 0 && this.iWrite === this.size) return this.buffer; var n = m.alloc(this.iWrite - this.iRead); return this.buffer.copy(n, 0, this.iRead, this.iWrite), n; } }, { key: "read", value: function(n) { var o; return n === 0 ? null : n === void 0 || n >= this.length ? (o = this.toBuffer(), this.iRead = this.iWrite, o) : (o = m.alloc(n), this.buffer.copy(o, 0, this.iRead, n), this.iRead += n, o); } }, { key: "write", value: function(n, o, p) { var O = Math.min(p, this.size - this.iWrite); return n.copy(this.buffer, this.iWrite, o, o + O), this.iWrite += O, O; } }, { key: "length", get: function() { return this.iWrite - this.iRead; } }, { key: "eod", get: function() { return this.iRead === this.iWrite; } }, { key: "full", get: function() { return this.iWrite === this.size; } }]), t; }(), r = function(i) { i = i || {}, this.bufSize = i.bufSize || 1024 * 1024, this.buffers = [], this.batch = i.batch || !1, this.corked = !1, this.inPos = 0, this.outPos = 0, this.pipes = [], this.paused = !1, this.encoding = null; }; l.inherits(r, h.Duplex, { toBuffer: function() { switch (this.buffers.length) { case 0: return null; case 1: return this.buffers[0].toBuffer(); default: return m.concat(this.buffers.map(function(i) { return i.toBuffer(); })); } }, // writable // event drain - if write returns false (which it won't), indicates when safe to write again. // finish - end() has been called // pipe(src) - pipe() has been called on readable // unpipe(src) - unpipe() has been called on readable // error - duh _getWritableBuffer: function() { if (this.buffers.length) { var i = this.buffers[this.buffers.length - 1]; if (!i.full) return i; } var n = new a(this.bufSize); return this.buffers.push(n), n; }, _pipe: function(i) { var n = this; return b(/* @__PURE__ */ regeneratorRuntime.mark(function o() { var p; return regeneratorRuntime.wrap(function(P) { for (; ; ) switch (P.prev = P.next) { case 0: return p = function(z) { return new Promise(function(N) { z.write(i.toBuffer(), function() { N(); }); }); }, P.next = 3, Promise.all(n.pipes.map(p)); case 3: case "end": return P.stop(); } }, o); }))(); }, _writeToBuffers: function(i) { for (var n = 0, o = i.length; n < o; ) { var p = this._getWritableBuffer(); n += p.write(i, n, o - n); } }, write: function(i, n, o) { var p = this; return b(/* @__PURE__ */ regeneratorRuntime.mark(function O() { var P; return regeneratorRuntime.wrap(function(z) { for (; ; ) switch (z.prev = z.next) { case 0: if (n instanceof Function && (o = n, n = "utf8"), o = o || l.nop, !(i instanceof d)) { z.next = 6; break; } P = new v(i), z.next = 15; break; case 6: if (!(i instanceof m)) { z.next = 10; break; } P = new c(i), z.next = 15; break; case 10: if (!(typeof i == "string" || i instanceof String || i instanceof ArrayBuffer)) { z.next = 14; break; } P = new s(i, n), z.next = 15; break; case 14: throw new Error("Chunk must be one of type String, Buffer or StringBuf."); case 15: if (!p.pipes.length) { z.next = 31; break; } if (!p.batch) { z.next = 21; break; } for (p._writeToBuffers(P); !p.corked && p.buffers.length > 1; ) p._pipe(p.buffers.shift()); z.next = 29; break; case 21: if (p.corked) { z.next = 27; break; } return z.next = 24, p._pipe(P); case 24: o(), z.next = 29; break; case 27: p._writeToBuffers(P), u.nextTick(o); case 29: z.next = 34; break; case 31: p.paused || p.emit("data", P.toBuffer()), p._writeToBuffers(P), p.emit("readable"); case 34: return z.abrupt("return", !0); case 35: case "end": return z.stop(); } }, O); }))(); }, cork: function() { this.corked = !0; }, _flush: function() { if (this.pipes.length) for (; this.buffers.length; ) this._pipe(this.buffers.shift()); }, uncork: function() { this.corked = !1, this._flush(); }, end: function(i, n, o) { var p = this, O = function(F) { F ? o(F) : (p._flush(), p.pipes.forEach(function(z) { z.end(); }), p.emit("finish")); }; i ? this.write(i, n, O) : O(); }, // readable // event readable - some data is now available // event data - switch to flowing mode - feeds chunks to handler // event end - no more data // event close - optional, indicates upstream close // event error - duh read: function(i) { var n; if (i) { for (n = []; i && this.buffers.length && !this.buffers[0].eod; ) { var o = this.buffers[0], p = o.read(i); i -= p.length, n.push(p), o.eod && o.full && this.buffers.shift(); } return m.concat(n); } return n = this.buffers.map(function(O) { return O.toBuffer(); }).filter(Boolean), this.buffers = [], m.concat(n); }, setEncoding: function(i) { this.encoding = i; }, pause: function() { this.paused = !0; }, resume: function() { this.paused = !1; }, isPaused: function() { return !!this.paused; }, pipe: function(i) { this.pipes.push(i), !this.paused && this.buffers.length && this.end(); }, unpipe: function(i) { this.pipes = this.pipes.filter(function(n) { return n !== i; }); }, unshift: function() { throw new Error("Not Implemented"); }, wrap: function() { throw new Error("Not Implemented"); } }), x.exports = r; }).call(this, e("_process"), e("buffer").Buffer); }, { "./string-buf": 24, "./utils": 26, _process: 467, buffer: 216, "readable-stream": 491 }], 24: [function(e, x, _) { (function(u) { function m(f, y) { if (!(f instanceof y)) throw new TypeError("Cannot call a class as a function"); } function g(f, y) { for (var h = 0; h < y.length; h++) { var l = y[h]; l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(f, l.key, l); } } function b(f, y, h) { return y && g(f.prototype, y), h && g(f, h), f; } var w = /* @__PURE__ */ function() { function f(y) { m(this, f), this._buf = u.alloc(y && y.size || 16384), this._encoding = y && y.encoding || "utf8", this._inPos = 0, this._buffer = void 0; } return b(f, [{ key: "toBuffer", value: function() { return this._buffer || (this._buffer = u.alloc(this.length), this._buf.copy(this._buffer, 0, 0, this.length)), this._buffer; } }, { key: "reset", value: function(h) { h = h || 0, this._buffer = void 0, this._inPos = h; } }, { key: "_grow", value: function(h) { for (var l = this._buf.length * 2; l < h; ) l *= 2; var d = u.alloc(l); this._buf.copy(d, 0), this._buf = d; } }, { key: "addText", value: function(h) { this._buffer = void 0; for (var l = this._inPos + this._buf.write(h, this._inPos, this._encoding); l >= this._buf.length - 4; ) this._grow(this._inPos + h.length), l = this._inPos + this._buf.write(h, this._inPos, this._encoding); this._inPos = l; } }, { key: "addStringBuf", value: function(h) { h.length && (this._buffer = void 0, this.length + h.length > this.capacity && this._grow(this.length + h.length), h._buf.copy(this._buf, this._inPos, 0, h.length), this._inPos += h.length); } }, { key: "length", get: function() { return this._inPos; } }, { key: "capacity", get: function() { return this._buf.length; } }, { key: "buffer", get: function() { return this._buf; } }]), f; }(); x.exports = w; }).call(this, e("buffer").Buffer); }, { buffer: 216 }], 25: [function(e, x, _) { function u(w) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(y) { return typeof y; } : u = function(y) { return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y; }, u(w); } var m = Object.prototype.toString, g = /["&<>]/, b = { each: function(f, y) { f && (Array.isArray(f) ? f.forEach(y) : Object.keys(f).forEach(function(h) { y(f[h], h); })); }, some: function(f, y) { return f ? Array.isArray(f) ? f.some(y) : Object.keys(f).some(function(h) { return y(f[h], h); }) : !1; }, every: function(f, y) { return f ? Array.isArray(f) ? f.every(y) : Object.keys(f).every(function(h) { return y(f[h], h); }) : !0; }, map: function(f, y) { return f ? Array.isArray(f) ? f.map(y) : Object.keys(f).map(function(h) { return y(f[h], h); }) : []; }, keyBy: function(f, y) { return f.reduce(function(h, l) { return h[l[y]] = l, h; }, {}); }, isEqual: function(f, y) { var h = u(f), l = u(y), d = Array.isArray(f), s = Array.isArray(y); if (h !== l) return !1; switch (u(f)) { case "object": return d || s ? d && s ? f.length === y.length && f.every(function(v, c) { var a = y[c]; return b.isEqual(v, a); }) : !1 : b.every(f, function(v, c) { var a = y[c]; return b.isEqual(v, a); }); default: return f === y; } }, escapeHtml: function(f) { var y = g.exec(f); if (!y) return f; for (var h = "", l = "", d = 0, s = y.index; s < f.length; s++) { switch (f.charAt(s)) { case '"': l = """; break; case "&": l = "&"; break; case "'": l = "'"; break; case "<": l = "<"; break; case ">": l = ">"; break; default: continue; } d !== s && (h += f.substring(d, s)), d = s + 1, h += l; } return d !== s ? h + f.substring(d, s) : h; }, strcmp: function(f, y) { return f < y ? -1 : f > y ? 1 : 0; }, isUndefined: function(f) { return m.call(f) === "[object Undefined]"; }, isObject: function(f) { return m.call(f) === "[object Object]"; }, deepMerge: function() { var f = arguments[0] || {}, y = arguments.length, h, l, d; function s(c, a) { h = f[a], d = Array.isArray(c), b.isObject(c) || d ? (d ? (d = !1, l = h && Array.isArray(h) ? h : []) : l = h && b.isObject(h) ? h : {}, f[a] = b.deepMerge(l, c)) : b.isUndefined(c) || (f[a] = c); } for (var v = 0; v < y; v++) b.each(arguments[v], s); return f; } }; x.exports = b; }, {}], 26: [function(e, x, _) { (function(u, m) { var g = e("fs"), b = function(h, l, d, s) { h.super_ = l, s || (s = d, d = null), d && Object.keys(d).forEach(function(c) { Object.defineProperty(h, c, Object.getOwnPropertyDescriptor(d, c)); }); var v = { constructor: { value: h, enumerable: !1, writable: !1, configurable: !0 } }; s && Object.keys(s).forEach(function(c) { v[c] = Object.getOwnPropertyDescriptor(s, c); }), h.prototype = Object.create(l.prototype, v); }, w = /[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/, f = { nop: function() { }, promiseImmediate: function(h) { return new Promise(function(l) { u.setImmediate ? m(function() { l(h); }) : setTimeout(function() { l(h); }, 1); }); }, inherits: b, dateToExcel: function(h, l) { return 25569 + h.getTime() / (24 * 3600 * 1e3) - (l ? 1462 : 0); }, excelToDate: function(h, l) { var d = Math.round((h - 25569 + (l ? 1462 : 0)) * 24 * 3600 * 1e3); return new Date(d); }, parsePath: function(h) { var l = h.lastIndexOf("/"); return { path: h.substring(0, l), name: h.substring(l + 1) }; }, getRelsPath: function(h) { var l = f.parsePath(h); return "".concat(l.path, "/_rels/").concat(l.name, ".rels"); }, xmlEncode: function(h) { var l = w.exec(h); if (!l) return h; for (var d = "", s = "", v = 0, c = l.index; c < h.length; c++) { var a = h.charCodeAt(c); switch (a) { case 34: s = """; break; case 38: s = "&"; break; case 39: s = "'"; break; case 60: s = "<"; break; case 62: s = ">"; break; case 127: s = ""; break; default: { if (a <= 31 && (a <= 8 || a >= 11 && a !== 13)) { s = ""; break; } continue; } } v !== c && (d += h.substring(v, c)), v = c + 1, s && (d += s); } return v !== c ? d + h.substring(v, c) : d; }, xmlDecode: function(h) { return h.replace(/&([a-z]*);/g, function(l) { switch (l) { case "<": return "<"; case ">": return ">"; case "&": return "&"; case "'": return "'"; case """: return '"'; default: return l; } }); }, validInt: function(h) { var l = parseInt(h, 10); return Number.isNaN(l) ? 0 : l; }, isDateFmt: function(h) { if (!h) return !1; h = h.replace(/\[[^\]]*]/g, ""), h = h.replace(/"[^"]*"/g, ""); var l = h.match(/[ymdhMsb]+/) !== null; return l; }, fs: { exists: function(h) { return new Promise(function(l) { g.access(h, g.constants.F_OK, function(d) { l(!d); }); }); } }, toIsoDateString: function(h) { return h.toIsoString().subsstr(0, 10); } }; x.exports = f; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}, e("timers").setImmediate); }, { fs: 215, timers: 521 }], 27: [function(e, x, _) { function u(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function m(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function g(t, i, n) { return i && m(t.prototype, i), n && m(t, n), t; } var b = e("./under-dash"), w = e("./utils"), f = "<", y = ">", h = "", d = '="', s = '"', v = " "; function c(t, i, n) { t.push(v), t.push(i), t.push(d), t.push(w.xmlEncode(n.toString())), t.push(s); } function a(t, i) { i && b.each(i, function(n, o) { n !== void 0 && c(t, o, n); }); } var r = /* @__PURE__ */ function() { function t() { u(this, t), this._xml = [], this._stack = [], this._rollbacks = []; } return g(t, [{ key: "openXml", value: function(n) { var o = this._xml; o.push(" `); } }, { key: "openNode", value: function(n, o) { var p = this.tos, O = this._xml; p && this.open && O.push(y), this._stack.push(n), O.push(f), O.push(n), a(O, o), this.leaf = !0, this.open = !0; } }, { key: "addAttribute", value: function(n, o) { if (!this.open) throw new Error("Cannot write attributes to node if it is not open"); o !== void 0 && c(this._xml, n, o); } }, { key: "addAttributes", value: function(n) { if (!this.open) throw new Error("Cannot write attributes to node if it is not open"); a(this._xml, n); } }, { key: "writeText", value: function(n) { var o = this._xml; this.open && (o.push(y), this.open = !1), this.leaf = !1, o.push(w.xmlEncode(n.toString())); } }, { key: "writeXml", value: function(n) { this.open && (this._xml.push(y), this.open = !1), this.leaf = !1, this._xml.push(n); } }, { key: "closeNode", value: function() { var n = this._stack.pop(), o = this._xml; this.leaf ? o.push(l) : (o.push(h), o.push(n), o.push(y)), this.open = !1, this.leaf = !1; } }, { key: "leafNode", value: function(n, o, p) { this.openNode(n, o), p !== void 0 && this.writeText(p), this.closeNode(); } }, { key: "closeAll", value: function() { for (; this._stack.length; ) this.closeNode(); } }, { key: "addRollback", value: function() { return this._rollbacks.push({ xml: this._xml.length, stack: this._stack.length, leaf: this.leaf, open: this.open }), this.cursor; } }, { key: "commit", value: function() { this._rollbacks.pop(); } }, { key: "rollback", value: function() { var n = this._rollbacks.pop(); this._xml.length > n.xml && this._xml.splice(n.xml, this._xml.length - n.xml), this._stack.length > n.stack && this._stack.splice(n.stack, this._stack.length - n.stack), this.leaf = n.leaf, this.open = n.open; } }, { key: "tos", get: function() { return this._stack.length ? this._stack[this._stack.length - 1] : void 0; } }, { key: "cursor", get: function() { return this._xml.length; } }, { key: "xml", get: function() { return this.closeAll(), this._xml.join(""); } }]), t; }(); r.StdDocAttributes = { version: "1.0", encoding: "UTF-8", standalone: "yes" }, x.exports = r; }, { "./under-dash": 25, "./utils": 26 }], 28: [function(e, x, _) { (function(u) { function m(O) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(F) { return typeof F; } : m = function(F) { return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F; }, m(O); } function g(O, P, F, z, N, M, I) { try { var R = O[M](I), C = R.value; } catch (E) { F(E); return; } R.done ? P(C) : Promise.resolve(C).then(z, N); } function b(O) { return function() { var P = this, F = arguments; return new Promise(function(z, N) { var M = O.apply(P, F); function I(C) { g(M, z, N, I, R, "next", C); } function R(C) { g(M, z, N, I, R, "throw", C); } I(void 0); }); }; } function w(O, P) { if (!(O instanceof P)) throw new TypeError("Cannot call a class as a function"); } function f(O, P) { for (var F = 0; F < P.length; F++) { var z = P[F]; z.enumerable = z.enumerable || !1, z.configurable = !0, "value" in z && (z.writable = !0), Object.defineProperty(O, z.key, z); } } function y(O, P, F) { return P && f(O.prototype, P), F && f(O, F), O; } function h(O, P) { if (typeof P != "function" && P !== null) throw new TypeError("Super expression must either be null or a function"); O.prototype = Object.create(P && P.prototype, { constructor: { value: O, writable: !0, configurable: !0 } }), P && l(O, P); } function l(O, P) { return l = Object.setPrototypeOf || function(z, N) { return z.__proto__ = N, z; }, l(O, P); } function d(O) { var P = c(); return function() { var z = a(O), N; if (P) { var M = a(this).constructor; N = Reflect.construct(z, arguments, M); } else N = z.apply(this, arguments); return s(this, N); }; } function s(O, P) { return P && (m(P) === "object" || typeof P == "function") ? P : v(O); } function v(O) { if (O === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return O; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (O) { return !1; } } function a(O) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(F) { return F.__proto__ || Object.getPrototypeOf(F); }, a(O); } var r = e("events"), t = e("jszip"), i = e("./stream-buf"), n = e("./browser-buffer-encode"), o = n.stringToBuffer, p = /* @__PURE__ */ function(O) { h(F, O); var P = d(F); function F(z) { var N; return w(this, F), N = P.call(this), N.options = Object.assign({ type: "nodebuffer", compression: "DEFLATE" }, z), N.zip = new t(), N.stream = new i(), N; } return y(F, [{ key: "append", value: function(N, M) { M.hasOwnProperty("base64") && M.base64 ? this.zip.file(M.name, N, { base64: !0 }) : (u.browser && typeof N == "string" && (N = o(N)), this.zip.file(M.name, N)); } }, { key: "finalize", value: function() { var z = b(/* @__PURE__ */ regeneratorRuntime.mark(function M() { var I; return regeneratorRuntime.wrap(function(C) { for (; ; ) switch (C.prev = C.next) { case 0: return C.next = 2, this.zip.generateAsync(this.options); case 2: I = C.sent, this.stream.end(I), this.emit("finish"); case 5: case "end": return C.stop(); } }, M, this); })); function N() { return z.apply(this, arguments); } return N; }() // ========================================================================== // Stream.Readable interface }, { key: "read", value: function(N) { return this.stream.read(N); } }, { key: "setEncoding", value: function(N) { return this.stream.setEncoding(N); } }, { key: "pause", value: function() { return this.stream.pause(); } }, { key: "resume", value: function() { return this.stream.resume(); } }, { key: "isPaused", value: function() { return this.stream.isPaused(); } }, { key: "pipe", value: function(N, M) { return this.stream.pipe(N, M); } }, { key: "unpipe", value: function(N) { return this.stream.unpipe(N); } }, { key: "unshift", value: function(N) { return this.stream.unshift(N); } }, { key: "wrap", value: function(N) { return this.stream.wrap(N); } }]), F; }(r.EventEmitter); x.exports = { ZipWriter: p }; }).call(this, e("_process")); }, { "./browser-buffer-encode": 17, "./stream-buf": 23, _process: 467, events: 367, jszip: 399 }], 29: [function(e, x, _) { x.exports = { 0: { f: "General" }, 1: { f: "0" }, 2: { f: "0.00" }, 3: { f: "#,##0" }, 4: { f: "#,##0.00" }, 9: { f: "0%" }, 10: { f: "0.00%" }, 11: { f: "0.00E+00" }, 12: { f: "# ?/?" }, 13: { f: "# ??/??" }, 14: { f: "mm-dd-yy" }, 15: { f: "d-mmm-yy" }, 16: { f: "d-mmm" }, 17: { f: "mmm-yy" }, 18: { f: "h:mm AM/PM" }, 19: { f: "h:mm:ss AM/PM" }, 20: { f: "h:mm" }, 21: { f: "h:mm:ss" }, 22: { f: 'm/d/yy "h":mm' }, 27: { "zh-tw": "[$-404]e/m/d", "zh-cn": 'yyyy"年"m"月"', "ja-jp": "[$-411]ge.m.d", "ko-kr": 'yyyy"年" mm"月" dd"日"' }, 28: { "zh-tw": '[$-404]e"年"m"月"d"日"', "zh-cn": 'm"月"d"日"', "ja-jp": '[$-411]ggge"年"m"月"d"日"', "ko-kr": "mm-dd" }, 29: { "zh-tw": '[$-404]e"年"m"月"d"日"', "zh-cn": 'm"月"d"日"', "ja-jp": '[$-411]ggge"年"m"月"d"日"', "ko-kr": "mm-dd" }, 30: { "zh-tw": "m/d/yy ", "zh-cn": "m-d-yy", "ja-jp": "m/d/yy", "ko-kr": "mm-dd-yy" }, 31: { "zh-tw": 'yyyy"年"m"月"d"日"', "zh-cn": 'yyyy"年"m"月"d"日"', "ja-jp": 'yyyy"年"m"月"d"日"', "ko-kr": 'yyyy"년" mm"월" dd"일"' }, 32: { "zh-tw": 'hh"時"mm"分"', "zh-cn": 'h"时"mm"分"', "ja-jp": 'h"時"mm"分"', "ko-kr": 'h"시" mm"분"' }, 33: { "zh-tw": 'hh"時"mm"分"ss"秒"', "zh-cn": 'h"时"mm"分"ss"秒"', "ja-jp": 'h"時"mm"分"ss"秒"', "ko-kr": 'h"시" mm"분" ss"초"' }, 34: { "zh-tw": '上午/下午 hh"時"mm"分"', "zh-cn": '上午/下午 h"时"mm"分"', "ja-jp": 'yyyy"年"m"月"', "ko-kr": "yyyy-mm-dd" }, 35: { "zh-tw": '上午/下午 hh"時"mm"分"ss"秒"', "zh-cn": '上午/下午 h"时"mm"分"ss"秒"', "ja-jp": 'm"月"d"日"', "ko-kr": "yyyy-mm-dd" }, 36: { "zh-tw": "[$-404]e/m/d", "zh-cn": 'yyyy"年"m"月"', "ja-jp": "[$-411]ge.m.d", "ko-kr": 'yyyy"年" mm"月" dd"日"' }, 37: { f: "#,##0 ;(#,##0)" }, 38: { f: "#,##0 ;[Red](#,##0)" }, 39: { f: "#,##0.00 ;(#,##0.00)" }, 40: { f: "#,##0.00 ;[Red](#,##0.00)" }, 45: { f: "mm:ss" }, 46: { f: "[h]:mm:ss" }, 47: { f: "mmss.0" }, 48: { f: "##0.0E+0" }, 49: { f: "@" }, 50: { "zh-tw": "[$-404]e/m/d", "zh-cn": 'yyyy"年"m"月"', "ja-jp": "[$-411]ge.m.d", "ko-kr": 'yyyy"年" mm"月" dd"日"' }, 51: { "zh-tw": '[$-404]e"年"m"月"d"日"', "zh-cn": 'm"月"d"日"', "ja-jp": '[$-411]ggge"年"m"月"d"日"', "ko-kr": "mm-dd" }, 52: { "zh-tw": '上午/下午 hh"時"mm"分"', "zh-cn": 'yyyy"年"m"月"', "ja-jp": 'yyyy"年"m"月"', "ko-kr": "yyyy-mm-dd" }, 53: { "zh-tw": '上午/下午 hh"時"mm"分"ss"秒"', "zh-cn": 'm"月"d"日"', "ja-jp": 'm"月"d"日"', "ko-kr": "yyyy-mm-dd" }, 54: { "zh-tw": '[$-404]e"年"m"月"d"日"', "zh-cn": 'm"月"d"日"', "ja-jp": '[$-411]ggge"年"m"月"d"日"', "ko-kr": "mm-dd" }, 55: { "zh-tw": '上午/下午 hh"時"mm"分"', "zh-cn": '上午/下午 h"时"mm"分"', "ja-jp": 'yyyy"年"m"月"', "ko-kr": "yyyy-mm-dd" }, 56: { "zh-tw": '上午/下午 hh"時"mm"分"ss"秒"', "zh-cn": '上午/下午 h"时"mm"分"ss"秒"', "ja-jp": 'm"月"d"日"', "ko-kr": "yyyy-mm-dd" }, 57: { "zh-tw": "[$-404]e/m/d", "zh-cn": 'yyyy"年"m"月"', "ja-jp": "[$-411]ge.m.d", "ko-kr": 'yyyy"年" mm"月" dd"日"' }, 58: { "zh-tw": '[$-404]e"年"m"月"d"日"', "zh-cn": 'm"月"d"日"', "ja-jp": '[$-411]ggge"年"m"月"d"日"', "ko-kr": "mm-dd" }, 59: { "th-th": "t0" }, 60: { "th-th": "t0.00" }, 61: { "th-th": "t#,##0" }, 62: { "th-th": "t#,##0.00" }, 67: { "th-th": "t0%" }, 68: { "th-th": "t0.00%" }, 69: { "th-th": "t# ?/?" }, 70: { "th-th": "t# ??/??" }, 81: { "th-th": "d/m/bb" } }; }, {}], 30: [function(e, x, _) { x.exports = { OfficeDocument: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", Worksheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", CalcChain: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain", SharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", Styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", Theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", Hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", Image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", CoreProperties: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", ExtenderProperties: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", Comments: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", VmlDrawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", Table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" }; }, {}], 31: [function(e, x, _) { function u(c, a) { var r; if (typeof Symbol == "undefined" || c[Symbol.iterator] == null) { if (Array.isArray(c) || (r = m(c)) || a && c && typeof c.length == "number") { r && (c = r); var t = 0, i = function() { }; return { s: i, n: function() { return t >= c.length ? { done: !0 } : { done: !1, value: c[t++] }; }, e: function(P) { throw P; }, f: i }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var n = !0, o = !1, p; return { s: function() { r = c[Symbol.iterator](); }, n: function() { var P = r.next(); return n = P.done, P; }, e: function(P) { o = !0, p = P; }, f: function() { try { !n && r.return != null && r.return(); } finally { if (o) throw p; } } }; } function m(c, a) { if (c) { if (typeof c == "string") return g(c, a); var r = Object.prototype.toString.call(c).slice(8, -1); if (r === "Object" && c.constructor && (r = c.constructor.name), r === "Map" || r === "Set") return Array.from(c); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return g(c, a); } } function g(c, a) { (a == null || a > c.length) && (a = c.length); for (var r = 0, t = new Array(a); r < a; r++) t[r] = c[r]; return t; } function b(c, a, r, t, i, n, o) { try { var p = c[n](o), O = p.value; } catch (P) { r(P); return; } p.done ? a(O) : Promise.resolve(O).then(t, i); } function w(c) { return function() { var a = this, r = arguments; return new Promise(function(t, i) { var n = c.apply(a, r); function o(O) { b(n, t, i, o, p, "next", O); } function p(O) { b(n, t, i, o, p, "throw", O); } o(void 0); }); }; } function f(c, a) { if (!(c instanceof a)) throw new TypeError("Cannot call a class as a function"); } function y(c, a) { for (var r = 0; r < a.length; r++) { var t = a[r]; t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(c, t.key, t); } } function h(c, a, r) { return a && y(c.prototype, a), r && y(c, r), c; } function l(c) { var a; if (typeof Symbol != "undefined" && (Symbol.asyncIterator && (a = c[Symbol.asyncIterator], a != null) || Symbol.iterator && (a = c[Symbol.iterator], a != null))) return a.call(c); throw new TypeError("Object is not async iterable"); } var d = e("../../utils/parse-sax"), s = e("../../utils/xml-stream"), v = /* @__PURE__ */ function() { function c() { f(this, c); } return h(c, [{ key: "prepare", // constructor(/* model, name */) {} // ============================================================ // Virtual Interface value: function() { } }, { key: "render", value: function() { } }, { key: "parseOpen", value: function(r) { } }, { key: "parseText", value: function(r) { } }, { key: "parseClose", value: function(r) { } }, { key: "reconcile", value: function(r, t) { } // ============================================================ }, { key: "reset", value: function() { this.model = null, this.map && Object.values(this.map).forEach(function(r) { r instanceof c ? r.reset() : r.xform && r.xform.reset(); }); } }, { key: "mergeModel", value: function(r) { this.model = Object.assign(this.model || {}, r); } }, { key: "parse", value: function() { var a = w(/* @__PURE__ */ regeneratorRuntime.mark(function t(i) { var n, o, p, O, P, F, z, N, M, I, R, C; return regeneratorRuntime.wrap(function(A) { for (; ; ) switch (A.prev = A.next) { case 0: n = !0, o = !1, A.prev = 2, O = l(i); case 4: return A.next = 6, O.next(); case 6: return P = A.sent, n = P.done, A.next = 10, P.value; case 10: if (F = A.sent, n) { A.next = 42; break; } z = F, N = u(z), A.prev = 14, N.s(); case 16: if ((M = N.n()).done) { A.next = 31; break; } if (I = M.value, R = I.eventType, C = I.value, R !== "opentag") { A.next = 22; break; } this.parseOpen(C), A.next = 29; break; case 22: if (R !== "text") { A.next = 26; break; } this.parseText(C), A.next = 29; break; case 26: if (R !== "closetag") { A.next = 29; break; } if (this.parseClose(C.name)) { A.next = 29; break; } return A.abrupt("return", this.model); case 29: A.next = 16; break; case 31: A.next = 36; break; case 33: A.prev = 33, A.t0 = A.catch(14), N.e(A.t0); case 36: return A.prev = 36, N.f(), A.finish(36); case 39: n = !0, A.next = 4; break; case 42: A.next = 48; break; case 44: A.prev = 44, A.t1 = A.catch(2), o = !0, p = A.t1; case 48: if (A.prev = 48, A.prev = 49, !(!n && O.return != null)) { A.next = 53; break; } return A.next = 53, O.return(); case 53: if (A.prev = 53, !o) { A.next = 56; break; } throw p; case 56: return A.finish(53); case 57: return A.finish(48); case 58: return A.abrupt("return", this.model); case 59: case "end": return A.stop(); } }, t, this, [[2, 44, 48, 58], [14, 33, 36, 39], [49, , 53, 57]]); })); function r(t) { return a.apply(this, arguments); } return r; }() }, { key: "parseStream", value: function() { var a = w(/* @__PURE__ */ regeneratorRuntime.mark(function t(i) { return regeneratorRuntime.wrap(function(o) { for (; ; ) switch (o.prev = o.next) { case 0: return o.abrupt("return", this.parse(d(i))); case 1: case "end": return o.stop(); } }, t, this); })); function r(t) { return a.apply(this, arguments); } return r; }() }, { key: "toXml", value: function(r) { var t = new s(); return this.render(t, r), t.xml; } // ============================================================ // Useful Utilities }, { key: "xml", get: function() { return this.toXml(this.model); } }], [{ key: "toAttribute", value: function(r, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; if (r === void 0) { if (i) return t; } else if (i || r !== t) return r.toString(); } }, { key: "toStringAttribute", value: function(r, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; return c.toAttribute(r, t, i); } }, { key: "toStringValue", value: function(r, t) { return r === void 0 ? t : r; } }, { key: "toBoolAttribute", value: function(r, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; if (r === void 0) { if (i) return t; } else if (i || r !== t) return r ? "1" : "0"; } }, { key: "toBoolValue", value: function(r, t) { return r === void 0 ? t : r === "1"; } }, { key: "toIntAttribute", value: function(r, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; return c.toAttribute(r, t, i); } }, { key: "toIntValue", value: function(r, t) { return r === void 0 ? t : parseInt(r, 10); } }, { key: "toFloatAttribute", value: function(r, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; return c.toAttribute(r, t, i); } }, { key: "toFloatValue", value: function(r, t) { return r === void 0 ? t : parseFloat(r); } }]), c; }(); x.exports = v; }, { "../../utils/parse-sax": 21, "../../utils/xml-stream": 27 }], 32: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("../base-xform"), c = e("../../../utils/col-cache"), a = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { return m(this, o), n.apply(this, arguments); } return b(o, [{ key: "render", value: function(O, P) { O.openNode("definedName", { name: P.name, localSheetId: P.localSheetId }), O.writeText(P.ranges.join(",")), O.closeNode(); } }, { key: "parseOpen", value: function(O) { switch (O.name) { case "definedName": return this._parsedName = O.attributes.name, this._parsedLocalSheetId = O.attributes.localSheetId, this._parsedText = [], !0; default: return !1; } } }, { key: "parseText", value: function(O) { this._parsedText.push(O); } }, { key: "parseClose", value: function() { return this.model = { name: this._parsedName, ranges: t(this._parsedText.join("")) }, this._parsedLocalSheetId !== void 0 && (this.model.localSheetId = parseInt(this._parsedLocalSheetId, 10)), !1; } }]), o; }(v); function r(i) { try { return c.decodeEx(i), !0; } catch (n) { return !1; } } function t(i) { var n = [], o = !1, p = ""; return i.split(",").forEach(function(O) { if (O) { var P = (O.match(/'/g) || []).length; if (!P) { o ? p += "".concat(O, ",") : r(O) && n.push(O); return; } var F = P % 2 === 0; !o && F && r(O) ? n.push(O) : o && !F ? (o = !1, r(p + O) && n.push(p + O), p = "") : (o = !0, p += "".concat(O, ",")); } }), n; } x.exports = a; }, { "../../../utils/col-cache": 19, "../base-xform": 31 }], 33: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../../utils/utils"), c = e("../base-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { o.leafNode("sheet", { sheetId: p.id, name: p.name, state: p.state, "r:id": p.rId }); } }, { key: "parseOpen", value: function(o) { return o.name === "sheet" ? (this.model = { name: v.xmlDecode(o.attributes.name), id: parseInt(o.attributes.sheetId, 10), state: o.attributes.state, rId: o.attributes["r:id"] }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), i; }(c); x.exports = a; }, { "../../../utils/utils": 26, "../base-xform": 31 }], 34: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("calcPr", { calcId: 171027, fullCalcOnLoad: o.fullCalcOnLoad ? 1 : void 0 }); } }, { key: "parseOpen", value: function(n) { return n.name === "calcPr" ? (this.model = {}, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 35: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("workbookPr", { date1904: o.date1904 ? 1 : void 0, defaultThemeVersion: 164011, filterPrivacy: 1 }); } }, { key: "parseOpen", value: function(n) { return n.name === "workbookPr" ? (this.model = { date1904: n.attributes.date1904 === "1" }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 36: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { var p = { xWindow: o.x || 0, yWindow: o.y || 0, windowWidth: o.width || 12e3, windowHeight: o.height || 24e3, firstSheet: o.firstSheet, activeTab: o.activeTab }; o.visibility && o.visibility !== "visible" && (p.visibility = o.visibility), n.leafNode("workbookView", p); } }, { key: "parseOpen", value: function(n) { if (n.name === "workbookView") { var o = this.model = {}, p = function(F, z, N) { var M = z !== void 0 ? o[F] = z : N; M !== void 0 && (o[F] = M); }, O = function(F, z, N) { var M = z !== void 0 ? o[F] = parseInt(z, 10) : N; M !== void 0 && (o[F] = M); }; return O("x", n.attributes.xWindow, 0), O("y", n.attributes.yWindow, 0), O("width", n.attributes.windowWidth, 25e3), O("height", n.attributes.windowHeight, 1e4), p("visibility", n.attributes.visibility, "visible"), O("activeTab", n.attributes.activeTab, void 0), O("firstSheet", n.attributes.firstSheet, void 0), !0; } return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 37: [function(e, x, _) { function u(z) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(M) { return typeof M; } : u = function(M) { return M && typeof Symbol == "function" && M.constructor === Symbol && M !== Symbol.prototype ? "symbol" : typeof M; }, u(z); } function m(z, N) { if (!(z instanceof N)) throw new TypeError("Cannot call a class as a function"); } function g(z, N) { for (var M = 0; M < N.length; M++) { var I = N[M]; I.enumerable = I.enumerable || !1, I.configurable = !0, "value" in I && (I.writable = !0), Object.defineProperty(z, I.key, I); } } function b(z, N, M) { return N && g(z.prototype, N), M && g(z, M), z; } function w(z, N) { if (typeof N != "function" && N !== null) throw new TypeError("Super expression must either be null or a function"); z.prototype = Object.create(N && N.prototype, { constructor: { value: z, writable: !0, configurable: !0 } }), N && f(z, N); } function f(z, N) { return f = Object.setPrototypeOf || function(I, R) { return I.__proto__ = R, I; }, f(z, N); } function y(z) { var N = d(); return function() { var I = s(z), R; if (N) { var C = s(this).constructor; R = Reflect.construct(I, arguments, C); } else R = I.apply(this, arguments); return h(this, R); }; } function h(z, N) { return N && (u(N) === "object" || typeof N == "function") ? N : l(z); } function l(z) { if (z === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return z; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (z) { return !1; } } function s(z) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(M) { return M.__proto__ || Object.getPrototypeOf(M); }, s(z); } var v = e("../../../utils/under-dash"), c = e("../../../utils/col-cache"), a = e("../../../utils/xml-stream"), r = e("../base-xform"), t = e("../static-xform"), i = e("../list-xform"), n = e("./defined-name-xform"), o = e("./sheet-xform"), p = e("./workbook-view-xform"), O = e("./workbook-properties-xform"), P = e("./workbook-calc-properties-xform"), F = /* @__PURE__ */ function(z) { w(M, z); var N = y(M); function M() { var I; return m(this, M), I = N.call(this), I.map = { fileVersion: M.STATIC_XFORMS.fileVersion, workbookPr: new O(), bookViews: new i({ tag: "bookViews", count: !1, childXform: new p() }), sheets: new i({ tag: "sheets", count: !1, childXform: new o() }), definedNames: new i({ tag: "definedNames", count: !1, childXform: new n() }), calcPr: new P() }, I; } return b(M, [{ key: "prepare", value: function(R) { R.sheets = R.worksheets; var C = [], E = 0; R.sheets.forEach(function(A) { if (A.pageSetup && A.pageSetup.printArea && A.pageSetup.printArea.split("&&").forEach(function(D) { var B = D.split(":"), j = { name: "_xlnm.Print_Area", ranges: ["'".concat(A.name, "'!$").concat(B[0], ":$").concat(B[1])], localSheetId: E }; C.push(j); }), A.pageSetup && (A.pageSetup.printTitlesRow || A.pageSetup.printTitlesColumn)) { var L = []; if (A.pageSetup.printTitlesColumn) { var $ = A.pageSetup.printTitlesColumn.split(":"); L.push("'".concat(A.name, "'!$").concat($[0], ":$").concat($[1])); } if (A.pageSetup.printTitlesRow) { var W = A.pageSetup.printTitlesRow.split(":"); L.push("'".concat(A.name, "'!$").concat(W[0], ":$").concat(W[1])); } var U = { name: "_xlnm.Print_Titles", ranges: L, localSheetId: E }; C.push(U); } E++; }), C.length && (R.definedNames = R.definedNames.concat(C)), (R.media || []).forEach(function(A, L) { A.name = A.type + (L + 1); }); } }, { key: "render", value: function(R, C) { R.openXml(a.StdDocAttributes), R.openNode("workbook", M.WORKBOOK_ATTRIBUTES), this.map.fileVersion.render(R), this.map.workbookPr.render(R, C.properties), this.map.bookViews.render(R, C.views), this.map.sheets.render(R, C.sheets), this.map.definedNames.render(R, C.definedNames), this.map.calcPr.render(R, C.calcProperties), R.closeNode(); } }, { key: "parseOpen", value: function(R) { if (this.parser) return this.parser.parseOpen(R), !0; switch (R.name) { case "workbook": return !0; default: return this.parser = this.map[R.name], this.parser && this.parser.parseOpen(R), !0; } } }, { key: "parseText", value: function(R) { this.parser && this.parser.parseText(R); } }, { key: "parseClose", value: function(R) { if (this.parser) return this.parser.parseClose(R) || (this.parser = void 0), !0; switch (R) { case "workbook": return this.model = { sheets: this.map.sheets.model, properties: this.map.workbookPr.model || {}, views: this.map.bookViews.model, calcProperties: {} }, this.map.definedNames.model && (this.model.definedNames = this.map.definedNames.model), !1; default: return !0; } } }, { key: "reconcile", value: function(R) { var C = (R.workbookRels || []).reduce(function(W, U) { return W[U.Id] = U, W; }, {}), E = [], A, L = 0; (R.sheets || []).forEach(function(W) { var U = C[W.rId]; U && (A = R.worksheetHash["xl/".concat(U.Target.replace(/^(\s|\/xl\/)+/, ""))], A && (A.name = W.name, A.id = W.id, A.state = W.state, E[L++] = A)); }); var $ = []; v.each(R.definedNames, function(W) { if (W.name === "_xlnm.Print_Area") { if (A = E[W.localSheetId], A) { A.pageSetup || (A.pageSetup = {}); var U = c.decodeEx(W.ranges[0]); A.pageSetup.printArea = A.pageSetup.printArea ? "".concat(A.pageSetup.printArea, "&&").concat(U.dimensions) : U.dimensions; } } else if (W.name === "_xlnm.Print_Titles") { if (A = E[W.localSheetId], A) { A.pageSetup || (A.pageSetup = {}); var D = W.ranges.join(","), B = /\$/g, j = /\$\d+:\$\d+/, V = D.match(j); if (V && V.length) { var re = V[0]; A.pageSetup.printTitlesRow = re.replace(B, ""); } var ee = /\$[A-Z]+:\$[A-Z]+/, ce = D.match(ee); if (ce && ce.length) { var ve = ce[0]; A.pageSetup.printTitlesColumn = ve.replace(B, ""); } } } else $.push(W); }), R.definedNames = $, R.media.forEach(function(W, U) { W.index = U; }); } }]), M; }(r); F.WORKBOOK_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", "mc:Ignorable": "x15", "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" }, F.STATIC_XFORMS = { fileVersion: new t({ tag: "fileVersion", $: { appName: "xl", lastEdited: 5, lowestEdited: 5, rupBuild: 9303 } }) }, x.exports = F; }, { "../../../utils/col-cache": 19, "../../../utils/under-dash": 25, "../../../utils/xml-stream": 27, "../base-xform": 31, "../list-xform": 70, "../static-xform": 119, "./defined-name-xform": 32, "./sheet-xform": 33, "./workbook-calc-properties-xform": 34, "./workbook-properties-xform": 35, "./workbook-view-xform": 36 }], 38: [function(e, x, _) { function u(h, l) { var d = Object.keys(h); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(h); l && (s = s.filter(function(v) { return Object.getOwnPropertyDescriptor(h, v).enumerable; })), d.push.apply(d, s); } return d; } function m(h) { for (var l = 1; l < arguments.length; l++) { var d = arguments[l] != null ? arguments[l] : {}; l % 2 ? u(Object(d), !0).forEach(function(s) { g(h, s, d[s]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(d)) : u(Object(d)).forEach(function(s) { Object.defineProperty(h, s, Object.getOwnPropertyDescriptor(d, s)); }); } return h; } function g(h, l, d) { return l in h ? Object.defineProperty(h, l, { value: d, enumerable: !0, configurable: !0, writable: !0 }) : h[l] = d, h; } var b = e("../strings/rich-text-xform"), w = e("../../../utils/utils"), f = e("../base-xform"), y = x.exports = function(h) { this.model = h; }; w.inherits(y, f, { get tag() { return "r"; }, get richTextXform() { return this._richTextXform || (this._richTextXform = new b()), this._richTextXform; }, render: function(l, d) { var s = this; d = d || this.model, l.openNode("comment", { ref: d.ref, authorId: 0 }), l.openNode("text"), d && d.note && d.note.texts && d.note.texts.forEach(function(v) { s.richTextXform.render(l, v); }), l.closeNode(), l.closeNode(); }, parseOpen: function(l) { if (this.parser) return this.parser.parseOpen(l), !0; switch (l.name) { case "comment": return this.model = m({ type: "note", note: { texts: [] } }, l.attributes), !0; case "r": return this.parser = this.richTextXform, this.parser.parseOpen(l), !0; default: return !1; } }, parseText: function(l) { this.parser && this.parser.parseText(l); }, parseClose: function(l) { switch (l) { case "comment": return !1; case "r": return this.model.note.texts.push(this.parser.model), this.parser = void 0, !0; default: return this.parser && this.parser.parseClose(l), !0; } } }); }, { "../../../utils/utils": 26, "../base-xform": 31, "../strings/rich-text-xform": 121 }], 39: [function(e, x, _) { var u = e("../../../utils/xml-stream"), m = e("../../../utils/utils"), g = e("../base-xform"), b = e("./comment-xform"), w = x.exports = function() { this.map = { comment: new b() }; }; m.inherits(w, g, { COMMENTS_ATTRIBUTES: { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" } }, { render: function(y, h) { var l = this; h = h || this.model, y.openXml(u.StdDocAttributes), y.openNode("comments", w.COMMENTS_ATTRIBUTES), y.openNode("authors"), y.leafNode("author", null, "Author"), y.closeNode(), y.openNode("commentList"), h.comments.forEach(function(d) { l.map.comment.render(y, d); }), y.closeNode(), y.closeNode(); }, parseOpen: function(y) { if (this.parser) return this.parser.parseOpen(y), !0; switch (y.name) { case "commentList": return this.model = { comments: [] }, !0; case "comment": return this.parser = this.map.comment, this.parser.parseOpen(y), !0; default: return !1; } }, parseText: function(y) { this.parser && this.parser.parseText(y); }, parseClose: function(y) { switch (y) { case "commentList": return !1; case "comment": return this.model.comments.push(this.parser.model), this.parser = void 0, !0; default: return this.parser && this.parser.parseClose(y), !0; } } }); }, { "../../../utils/utils": 26, "../../../utils/xml-stream": 27, "../base-xform": 31, "./comment-xform": 38 }], 40: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n._model = i, n; } return b(t, [{ key: "render", value: function(n, o, p) { o === p[2] ? n.leafNode(this.tag) : this.tag === "x:SizeWithCells" && o === p[1] && n.leafNode(this.tag); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = {}, this.model[this.tag] = !0, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return this._model && this._model.tag; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 41: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n._model = i, n; } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, null, o); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.text = "", !0; default: return !1; } } }, { key: "parseText", value: function(n) { this.text = n; } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return this._model && this._model.tag; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 42: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "getAnchorRect", value: function(n) { var o = Math.floor(n.left), p = Math.floor((n.left - o) * 68), O = Math.floor(n.top), P = Math.floor((n.top - O) * 18), F = Math.floor(n.right), z = Math.floor((n.right - F) * 68), N = Math.floor(n.bottom), M = Math.floor((n.bottom - N) * 18); return [o, p, O, P, F, z, N, M]; } }, { key: "getDefaultRect", value: function(n) { var o = n.col, p = 6, O = Math.max(n.row - 2, 0), P = 14, F = o + 2, z = 2, N = O + 4, M = 16; return [o, p, O, P, F, z, N, M]; } }, { key: "render", value: function(n, o) { var p = o.anchor ? this.getAnchorRect(o.anchor) : this.getDefaultRect(o.refAddress); n.leafNode("x:Anchor", null, p.join(", ")); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.text = "", !0; default: return !1; } } }, { key: "parseText", value: function(n) { this.text = n; } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "x:Anchor"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 43: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../base-xform"), c = e("./vml-anchor-xform"), a = e("./style/vml-protection-xform"), r = e("./style/vml-position-xform"), t = ["twoCells", "oneCells", "absolute"], i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { "x:Anchor": new c(), "x:Locked": new a({ tag: "x:Locked" }), "x:LockText": new a({ tag: "x:LockText" }), "x:SizeWithCells": new r({ tag: "x:SizeWithCells" }), "x:MoveWithCells": new r({ tag: "x:MoveWithCells" }) }, O; } return b(p, [{ key: "render", value: function(P, F) { var z = F.note, N = z.protection, M = z.editAs; P.openNode(this.tag, { ObjectType: "Note" }), this.map["x:MoveWithCells"].render(P, M, t), this.map["x:SizeWithCells"].render(P, M, t), this.map["x:Anchor"].render(P, F), this.map["x:Locked"].render(P, N.locked), P.leafNode("x:AutoFill", null, "False"), this.map["x:LockText"].render(P, N.lockText), P.leafNode("x:Row", null, F.refAddress.row - 1), P.leafNode("x:Column", null, F.refAddress.col - 1), P.closeNode(); } }, { key: "parseOpen", value: function(P) { switch (P.name) { case this.tag: this.reset(), this.model = { anchor: [], protection: {}, editAs: "" }; break; default: this.parser = this.map[P.name], this.parser && this.parser.parseOpen(P); break; } return !0; } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { if (this.parser) return this.parser.parseClose(P) || (this.parser = void 0), !0; switch (P) { case this.tag: return this.normalizeModel(), !1; default: return !0; } } }, { key: "normalizeModel", value: function() { var P = Object.assign({}, this.map["x:MoveWithCells"].model, this.map["x:SizeWithCells"].model), F = Object.keys(P).length; this.model.editAs = t[F], this.model.anchor = this.map["x:Anchor"].text, this.model.protection.locked = this.map["x:Locked"].text, this.model.protection.lockText = this.map["x:LockText"].text; } }, { key: "tag", get: function() { return "x:ClientData"; } }]), p; }(v); x.exports = i; }, { "../base-xform": 31, "./style/vml-position-xform": 40, "./style/vml-protection-xform": 41, "./vml-anchor-xform": 42 }], 44: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = e("./vml-shape-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "v:shape": new a() }, o; } return b(n, [{ key: "render", value: function(p, O) { var P = this; p.openXml(v.StdDocAttributes), p.openNode(this.tag, n.DRAWING_ATTRIBUTES), p.openNode("o:shapelayout", { "v:ext": "edit" }), p.leafNode("o:idmap", { "v:ext": "edit", data: 1 }), p.closeNode(), p.openNode("v:shapetype", { id: "_x0000_t202", coordsize: "21600,21600", "o:spt": 202, path: "m,l,21600r21600,l21600,xe" }), p.leafNode("v:stroke", { joinstyle: "miter" }), p.leafNode("v:path", { gradientshapeok: "t", "o:connecttype": "rect" }), p.closeNode(), O.comments.forEach(function(F, z) { P.map["v:shape"].render(p, F, z); }), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case this.tag: this.reset(), this.model = { comments: [] }; break; default: this.parser = this.map[p.name], this.parser && this.parser.parseOpen(p); break; } return !0; } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.model.comments.push(this.parser.model), this.parser = void 0), !0; switch (p) { case this.tag: return !1; default: return !0; } } }, { key: "reconcile", value: function(p, O) { var P = this; p.anchors.forEach(function(F) { F.br ? P.map["xdr:twoCellAnchor"].reconcile(F, O) : P.map["xdr:oneCellAnchor"].reconcile(F, O); }); } }, { key: "tag", get: function() { return "xml"; } }]), n; }(c); r.DRAWING_ATTRIBUTES = { "xmlns:v": "urn:schemas-microsoft-com:vml", "xmlns:o": "urn:schemas-microsoft-com:office:office", "xmlns:x": "urn:schemas-microsoft-com:office:excel" }, x.exports = r; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "./vml-shape-xform": 45 }], 45: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../base-xform"), c = e("./vml-textbox-xform"), a = e("./vml-client-data-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "v:textbox": new c(), "x:ClientData": new a() }, o; } return b(n, [{ key: "render", value: function(p, O, P) { p.openNode("v:shape", n.V_SHAPE_ATTRIBUTES(O, P)), p.leafNode("v:fill", { color2: "infoBackground [80]" }), p.leafNode("v:shadow", { color: "none [81]", obscured: "t" }), p.leafNode("v:path", { "o:connecttype": "none" }), this.map["v:textbox"].render(p, O), this.map["x:ClientData"].render(p, O), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case this.tag: this.reset(), this.model = { margins: { insetmode: p.attributes["o:insetmode"] }, anchor: "", editAs: "", protection: {} }; break; default: this.parser = this.map[p.name], this.parser && this.parser.parseOpen(p); break; } return !0; } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.parser = void 0), !0; switch (p) { case this.tag: return this.model.margins.inset = this.map["v:textbox"].model && this.map["v:textbox"].model.inset, this.model.protection = this.map["x:ClientData"].model && this.map["x:ClientData"].model.protection, this.model.anchor = this.map["x:ClientData"].model && this.map["x:ClientData"].model.anchor, this.model.editAs = this.map["x:ClientData"].model && this.map["x:ClientData"].model.editAs, !1; default: return !0; } } }, { key: "tag", get: function() { return "v:shape"; } }]), n; }(v); r.V_SHAPE_ATTRIBUTES = function(t, i) { return { id: "_x0000_s".concat(1025 + i), type: "#_x0000_t202", style: "position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden", fillcolor: "infoBackground [80]", strokecolor: "none [81]", "o:insetmode": t.note.margins && t.note.margins.insetmode }; }, x.exports = r; }, { "../base-xform": 31, "./vml-client-data-xform": 43, "./vml-textbox-xform": 46 }], 46: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "conversionUnit", value: function(n, o, p) { return "".concat(parseFloat(n) * o.toFixed(2)).concat(p); } }, { key: "reverseConversionUnit", value: function(n) { var o = this; return (n || "").split(",").map(function(p) { return Number(parseFloat(o.conversionUnit(parseFloat(p), 0.1, "")).toFixed(2)); }); } }, { key: "render", value: function(n, o) { var p = this, O = { style: "mso-direction-alt:auto" }; if (o && o.note) { var P = o.note && o.note.margins, F = P.inset; Array.isArray(F) && (F = F.map(function(z) { return p.conversionUnit(z, 10, "mm"); }).join(",")), F && (O.inset = F); } n.openNode("v:textbox", O), n.leafNode("div", { style: "text-align:left" }), n.closeNode(); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { inset: this.reverseConversionUnit(n.attributes.inset) }, !0; default: return !0; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { switch (n) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "v:textbox"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 47: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("./base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "createNewModel", value: function(n) { return {}; } }, { key: "parseOpen", value: function(n) { return this.parser = this.parser || this.map[n.name], this.parser ? (this.parser.parseOpen(n), !0) : n.name === this.tag ? (this.model = this.createNewModel(n), !0) : !1; } }, { key: "parseText", value: function(n) { this.parser && this.parser.parseText(n); } }, { key: "onParserClose", value: function(n, o) { this.model[n] = o.model; } }, { key: "parseClose", value: function(n) { return this.parser ? (this.parser.parseClose(n) || (this.onParserClose(n, this.parser), this.parser = void 0), !0) : n !== this.tag; } }]), t; }(v); x.exports = c; }, { "./base-xform": 31 }], 48: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.openNode("HeadingPairs"), n.openNode("vt:vector", { size: 2, baseType: "variant" }), n.openNode("vt:variant"), n.leafNode("vt:lpstr", void 0, "Worksheets"), n.closeNode(), n.openNode("vt:variant"), n.leafNode("vt:i4", void 0, o.length), n.closeNode(), n.closeNode(), n.closeNode(); } }, { key: "parseOpen", value: function(n) { return n.name === "HeadingPairs"; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { return n !== "HeadingPairs"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 49: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.openNode("TitlesOfParts"), n.openNode("vt:vector", { size: o.length, baseType: "lpstr" }), o.forEach(function(p) { n.leafNode("vt:lpstr", void 0, p.name); }), n.closeNode(), n.closeNode(); } }, { key: "parseOpen", value: function(n) { return n.name === "TitlesOfParts"; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { return n !== "TitlesOfParts"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 50: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = e("../simple/string-xform"), r = e("./app-heading-pairs-xform"), t = e("./app-titles-of-parts-xform"), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { Company: new a({ tag: "Company" }), Manager: new a({ tag: "Manager" }), HeadingPairs: new r(), TitleOfParts: new t() }, O; } return b(p, [{ key: "render", value: function(P, F) { P.openXml(v.StdDocAttributes), P.openNode("Properties", p.PROPERTY_ATTRIBUTES), P.leafNode("Application", void 0, "Microsoft Excel"), P.leafNode("DocSecurity", void 0, "0"), P.leafNode("ScaleCrop", void 0, "false"), this.map.HeadingPairs.render(P, F.worksheets), this.map.TitleOfParts.render(P, F.worksheets), this.map.Company.render(P, F.company || ""), this.map.Manager.render(P, F.manager), P.leafNode("LinksUpToDate", void 0, "false"), P.leafNode("SharedDoc", void 0, "false"), P.leafNode("HyperlinksChanged", void 0, "false"), P.leafNode("AppVersion", void 0, "16.0300"), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "Properties": return !0; default: return this.parser = this.map[P.name], this.parser ? (this.parser.parseOpen(P), !0) : !1; } } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { if (this.parser) return this.parser.parseClose(P) || (this.parser = void 0), !0; switch (P) { case "Properties": return this.model = { worksheets: this.map.TitleOfParts.model, company: this.map.Company.model, manager: this.map.Manager.model }, !1; default: return !0; } } }]), p; }(c); i.DateFormat = function(n) { return n.toISOString().replace(/[.]\d{3,6}/, ""); }, i.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }, i.PROPERTY_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" }, x.exports = i; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "../simple/string-xform": 118, "./app-heading-pairs-xform": 48, "./app-titles-of-parts-xform": 49 }], 51: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { o.openXml(v.StdDocAttributes), o.openNode("Types", i.PROPERTY_ATTRIBUTES); var O = {}; (p.media || []).forEach(function(F) { if (F.type === "image") { var z = F.extension; O[z] || (O[z] = !0, o.leafNode("Default", { Extension: z, ContentType: "image/".concat(z) })); } }), o.leafNode("Default", { Extension: "rels", ContentType: "application/vnd.openxmlformats-package.relationships+xml" }), o.leafNode("Default", { Extension: "xml", ContentType: "application/xml" }), o.leafNode("Override", { PartName: "/xl/workbook.xml", ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" }), p.worksheets.forEach(function(F) { var z = "/xl/worksheets/sheet".concat(F.id, ".xml"); o.leafNode("Override", { PartName: z, ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" }); }), o.leafNode("Override", { PartName: "/xl/theme/theme1.xml", ContentType: "application/vnd.openxmlformats-officedocument.theme+xml" }), o.leafNode("Override", { PartName: "/xl/styles.xml", ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" }); var P = p.sharedStrings && p.sharedStrings.count; P && o.leafNode("Override", { PartName: "/xl/sharedStrings.xml", ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" }), p.tables && p.tables.forEach(function(F) { o.leafNode("Override", { PartName: "/xl/tables/".concat(F.target), ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" }); }), p.drawings && p.drawings.forEach(function(F) { o.leafNode("Override", { PartName: "/xl/drawings/".concat(F.name, ".xml"), ContentType: "application/vnd.openxmlformats-officedocument.drawing+xml" }); }), p.commentRefs && (o.leafNode("Default", { Extension: "vml", ContentType: "application/vnd.openxmlformats-officedocument.vmlDrawing" }), p.commentRefs.forEach(function(F) { var z = F.commentName; o.leafNode("Override", { PartName: "/xl/".concat(z, ".xml"), ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml" }); })), o.leafNode("Override", { PartName: "/docProps/core.xml", ContentType: "application/vnd.openxmlformats-package.core-properties+xml" }), o.leafNode("Override", { PartName: "/docProps/app.xml", ContentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml" }), o.closeNode(); } }, { key: "parseOpen", value: function() { return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), i; }(c); a.PROPERTY_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/package/2006/content-types" }, x.exports = a; }, { "../../../utils/xml-stream": 27, "../base-xform": 31 }], 52: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = e("../simple/date-xform"), r = e("../simple/string-xform"), t = e("../simple/integer-xform"), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { "dc:creator": new r({ tag: "dc:creator" }), "dc:title": new r({ tag: "dc:title" }), "dc:subject": new r({ tag: "dc:subject" }), "dc:description": new r({ tag: "dc:description" }), "dc:identifier": new r({ tag: "dc:identifier" }), "dc:language": new r({ tag: "dc:language" }), "cp:keywords": new r({ tag: "cp:keywords" }), "cp:category": new r({ tag: "cp:category" }), "cp:lastModifiedBy": new r({ tag: "cp:lastModifiedBy" }), "cp:lastPrinted": new a({ tag: "cp:lastPrinted", format: p.DateFormat }), "cp:revision": new t({ tag: "cp:revision" }), "cp:version": new r({ tag: "cp:version" }), "cp:contentStatus": new r({ tag: "cp:contentStatus" }), "cp:contentType": new r({ tag: "cp:contentType" }), "dcterms:created": new a({ tag: "dcterms:created", attrs: p.DateAttrs, format: p.DateFormat }), "dcterms:modified": new a({ tag: "dcterms:modified", attrs: p.DateAttrs, format: p.DateFormat }) }, O; } return b(p, [{ key: "render", value: function(P, F) { P.openXml(v.StdDocAttributes), P.openNode("cp:coreProperties", p.CORE_PROPERTY_ATTRIBUTES), this.map["dc:creator"].render(P, F.creator), this.map["dc:title"].render(P, F.title), this.map["dc:subject"].render(P, F.subject), this.map["dc:description"].render(P, F.description), this.map["dc:identifier"].render(P, F.identifier), this.map["dc:language"].render(P, F.language), this.map["cp:keywords"].render(P, F.keywords), this.map["cp:category"].render(P, F.category), this.map["cp:lastModifiedBy"].render(P, F.lastModifiedBy), this.map["cp:lastPrinted"].render(P, F.lastPrinted), this.map["cp:revision"].render(P, F.revision), this.map["cp:version"].render(P, F.version), this.map["cp:contentStatus"].render(P, F.contentStatus), this.map["cp:contentType"].render(P, F.contentType), this.map["dcterms:created"].render(P, F.created), this.map["dcterms:modified"].render(P, F.modified), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "cp:coreProperties": case "coreProperties": return !0; default: if (this.parser = this.map[P.name], this.parser) return this.parser.parseOpen(P), !0; throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(P))); } } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { if (this.parser) return this.parser.parseClose(P) || (this.parser = void 0), !0; switch (P) { case "cp:coreProperties": case "coreProperties": return this.model = { creator: this.map["dc:creator"].model, title: this.map["dc:title"].model, subject: this.map["dc:subject"].model, description: this.map["dc:description"].model, identifier: this.map["dc:identifier"].model, language: this.map["dc:language"].model, keywords: this.map["cp:keywords"].model, category: this.map["cp:category"].model, lastModifiedBy: this.map["cp:lastModifiedBy"].model, lastPrinted: this.map["cp:lastPrinted"].model, revision: this.map["cp:revision"].model, contentStatus: this.map["cp:contentStatus"].model, contentType: this.map["cp:contentType"].model, created: this.map["dcterms:created"].model, modified: this.map["dcterms:modified"].model }, !1; default: throw new Error("Unexpected xml node in parseClose: ".concat(P)); } } }]), p; }(c); i.DateFormat = function(n) { return n.toISOString().replace(/[.]\d{3}/, ""); }, i.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }, i.CORE_PROPERTY_ATTRIBUTES = { "xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties", "xmlns:dc": "http://purl.org/dc/elements/1.1/", "xmlns:dcterms": "http://purl.org/dc/terms/", "xmlns:dcmitype": "http://purl.org/dc/dcmitype/", "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance" }, x.exports = i; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "../simple/date-xform": 116, "../simple/integer-xform": 117, "../simple/string-xform": 118 }], 53: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("Relationship", o); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case "Relationship": return this.model = n.attributes, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 54: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = e("./relationship-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { Relationship: new a() }, o; } return b(n, [{ key: "render", value: function(p, O) { var P = this; O = O || this._values, p.openXml(v.StdDocAttributes), p.openNode("Relationships", n.RELATIONSHIPS_ATTRIBUTES), O.forEach(function(F) { P.map.Relationship.render(p, F); }), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case "Relationships": return this.model = [], !0; default: if (this.parser = this.map[p.name], this.parser) return this.parser.parseOpen(p), !0; throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(p))); } } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.model.push(this.parser.model), this.parser = void 0), !0; switch (p) { case "Relationships": return !1; default: throw new Error("Unexpected xml node in parseClose: ".concat(p)); } } }]), n; }(c); r.RELATIONSHIPS_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" }, x.exports = r; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "./relationship-xform": 53 }], 55: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "parseOpen", value: function(n) { if (this.parser) return this.parser.parseOpen(n), !0; switch (n.name) { case this.tag: this.reset(), this.model = { range: { editAs: n.attributes.editAs || "oneCell" } }; break; default: this.parser = this.map[n.name], this.parser && this.parser.parseOpen(n); break; } return !0; } }, { key: "parseText", value: function(n) { this.parser && this.parser.parseText(n); } }, { key: "reconcilePicture", value: function(n, o) { if (n && n.rId) { var p = o.rels[n.rId], O = p.Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/); if (O) { var P = O[1], F = o.mediaIndex[P]; return o.media[F]; } } } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 56: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = e("./blip-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { var n; return m(this, i), n = t.call(this), n.map = { "a:blip": new c() }, n; } return b(i, [{ key: "render", value: function(o, p) { o.openNode(this.tag), this.map["a:blip"].render(o, p), o.openNode("a:stretch"), o.leafNode("a:fillRect"), o.closeNode(), o.closeNode(); } }, { key: "parseOpen", value: function(o) { if (this.parser) return this.parser.parseOpen(o), !0; switch (o.name) { case this.tag: this.reset(); break; default: this.parser = this.map[o.name], this.parser && this.parser.parseOpen(o); break; } return !0; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(o) { if (this.parser) return this.parser.parseClose(o) || (this.parser = void 0), !0; switch (o) { case this.tag: return this.model = this.map["a:blip"].model, !1; default: return !0; } } }, { key: "tag", get: function() { return "xdr:blipFill"; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31, "./blip-xform": 57 }], 57: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "r:embed": o.rId, cstate: "print" }); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { rId: n.attributes["r:embed"] }, !0; default: return !0; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { switch (n) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "a:blip"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 58: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n) { n.openNode(this.tag), n.leafNode("a:picLocks", { noChangeAspect: "1" }), n.closeNode(); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return !0; default: return !0; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { switch (n) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "xdr:cNvPicPr"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 59: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../base-xform"), c = e("./hlink-click-xform"), a = e("./ext-lst-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "a:hlinkClick": new c(), "a:extLst": new a() }, o; } return b(n, [{ key: "render", value: function(p, O) { p.openNode(this.tag, { id: O.index, name: "Picture ".concat(O.index) }), this.map["a:hlinkClick"].render(p, O), this.map["a:extLst"].render(p, O), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case this.tag: this.reset(); break; default: this.parser = this.map[p.name], this.parser && this.parser.parseOpen(p); break; } return !0; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.parser = void 0), !0; switch (p) { case this.tag: return this.model = this.map["a:hlinkClick"].model, !1; default: return !0; } } }, { key: "tag", get: function() { return "xdr:cNvPr"; } }]), n; }(v); x.exports = r; }, { "../base-xform": 31, "./ext-lst-xform": 62, "./hlink-click-xform": 64 }], 60: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = e("../simple/integer-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i(n) { var o; return m(this, i), o = t.call(this), o.tag = n.tag, o.map = { "xdr:col": new c({ tag: "xdr:col", zero: !0 }), "xdr:colOff": new c({ tag: "xdr:colOff", zero: !0 }), "xdr:row": new c({ tag: "xdr:row", zero: !0 }), "xdr:rowOff": new c({ tag: "xdr:rowOff", zero: !0 }) }, o; } return b(i, [{ key: "render", value: function(o, p) { o.openNode(this.tag), this.map["xdr:col"].render(o, p.nativeCol), this.map["xdr:colOff"].render(o, p.nativeColOff), this.map["xdr:row"].render(o, p.nativeRow), this.map["xdr:rowOff"].render(o, p.nativeRowOff), o.closeNode(); } }, { key: "parseOpen", value: function(o) { if (this.parser) return this.parser.parseOpen(o), !0; switch (o.name) { case this.tag: this.reset(); break; default: this.parser = this.map[o.name], this.parser && this.parser.parseOpen(o); break; } return !0; } }, { key: "parseText", value: function(o) { this.parser && this.parser.parseText(o); } }, { key: "parseClose", value: function(o) { if (this.parser) return this.parser.parseClose(o) || (this.parser = void 0), !0; switch (o) { case this.tag: return this.model = { nativeCol: this.map["xdr:col"].model, nativeColOff: this.map["xdr:colOff"].model, nativeRow: this.map["xdr:row"].model, nativeRowOff: this.map["xdr:rowOff"].model }, !1; default: return !0; } } }]), i; }(v); x.exports = a; }, { "../base-xform": 31, "../simple/integer-xform": 117 }], 61: [function(e, x, _) { function u(o) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(O) { return typeof O; } : u = function(O) { return O && typeof Symbol == "function" && O.constructor === Symbol && O !== Symbol.prototype ? "symbol" : typeof O; }, u(o); } function m(o, p) { if (!(o instanceof p)) throw new TypeError("Cannot call a class as a function"); } function g(o, p) { for (var O = 0; O < p.length; O++) { var P = p[O]; P.enumerable = P.enumerable || !1, P.configurable = !0, "value" in P && (P.writable = !0), Object.defineProperty(o, P.key, P); } } function b(o, p, O) { return p && g(o.prototype, p), O && g(o, O), o; } function w(o, p) { if (typeof p != "function" && p !== null) throw new TypeError("Super expression must either be null or a function"); o.prototype = Object.create(p && p.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), p && f(o, p); } function f(o, p) { return f = Object.setPrototypeOf || function(P, F) { return P.__proto__ = F, P; }, f(o, p); } function y(o) { var p = d(); return function() { var P = s(o), F; if (p) { var z = s(this).constructor; F = Reflect.construct(P, arguments, z); } else F = P.apply(this, arguments); return h(this, F); }; } function h(o, p) { return p && (u(p) === "object" || typeof p == "function") ? p : l(o); } function l(o) { if (o === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return o; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (o) { return !1; } } function s(o) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(O) { return O.__proto__ || Object.getPrototypeOf(O); }, s(o); } var v = e("../../../utils/col-cache"), c = e("../../../utils/xml-stream"), a = e("../base-xform"), r = e("./two-cell-anchor-xform"), t = e("./one-cell-anchor-xform"); function i(o) { var p = typeof o.range == "string" ? v.decode(o.range) : o.range; return p.br ? "xdr:twoCellAnchor" : "xdr:oneCellAnchor"; } var n = /* @__PURE__ */ function(o) { w(O, o); var p = y(O); function O() { var P; return m(this, O), P = p.call(this), P.map = { "xdr:twoCellAnchor": new r(), "xdr:oneCellAnchor": new t() }, P; } return b(O, [{ key: "prepare", value: function(F) { var z = this; F.anchors.forEach(function(N, M) { N.anchorType = i(N); var I = z.map[N.anchorType]; I.prepare(N, { index: M }); }); } }, { key: "render", value: function(F, z) { var N = this; F.openXml(c.StdDocAttributes), F.openNode(this.tag, O.DRAWING_ATTRIBUTES), z.anchors.forEach(function(M) { var I = N.map[M.anchorType]; I.render(F, M); }), F.closeNode(); } }, { key: "parseOpen", value: function(F) { if (this.parser) return this.parser.parseOpen(F), !0; switch (F.name) { case this.tag: this.reset(), this.model = { anchors: [] }; break; default: this.parser = this.map[F.name], this.parser && this.parser.parseOpen(F); break; } return !0; } }, { key: "parseText", value: function(F) { this.parser && this.parser.parseText(F); } }, { key: "parseClose", value: function(F) { if (this.parser) return this.parser.parseClose(F) || (this.model.anchors.push(this.parser.model), this.parser = void 0), !0; switch (F) { case this.tag: return !1; default: return !0; } } }, { key: "reconcile", value: function(F, z) { var N = this; F.anchors.forEach(function(M) { M.br ? N.map["xdr:twoCellAnchor"].reconcile(M, z) : N.map["xdr:oneCellAnchor"].reconcile(M, z); }); } }, { key: "tag", get: function() { return "xdr:wsDr"; } }]), O; }(a); n.DRAWING_ATTRIBUTES = { "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing", "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main" }, x.exports = n; }, { "../../../utils/col-cache": 19, "../../../utils/xml-stream": 27, "../base-xform": 31, "./one-cell-anchor-xform": 66, "./two-cell-anchor-xform": 69 }], 62: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n) { n.openNode(this.tag), n.openNode("a:ext", { uri: "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }), n.leafNode("a16:creationId", { "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main", id: "{00000000-0008-0000-0000-000002000000}" }), n.closeNode(), n.closeNode(); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return !0; default: return !0; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(n) { switch (n) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "a:extLst"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 63: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = 9525, a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i(n) { var o; return m(this, i), o = t.call(this), o.tag = n.tag, o.map = {}, o; } return b(i, [{ key: "render", value: function(o, p) { o.openNode(this.tag); var O = Math.floor(p.width * c), P = Math.floor(p.height * c); o.addAttribute("cx", O), o.addAttribute("cy", P), o.closeNode(); } }, { key: "parseOpen", value: function(o) { return o.name === this.tag ? (this.model = { width: parseInt(o.attributes.cx || "0", 10) / c, height: parseInt(o.attributes.cy || "0", 10) / c }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31 }], 64: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { o.hyperlinks && o.hyperlinks.rId && n.leafNode(this.tag, { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "r:id": o.hyperlinks.rId, tooltip: o.hyperlinks.tooltip }); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { hyperlinks: { rId: n.attributes["r:id"], tooltip: n.attributes.tooltip } }, !0; default: return !0; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "a:hlinkClick"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 65: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../base-xform"), c = e("./c-nv-pr-xform"), a = e("./c-nv-pic-pr-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "xdr:cNvPr": new c(), "xdr:cNvPicPr": new a() }, o; } return b(n, [{ key: "render", value: function(p, O) { p.openNode(this.tag), this.map["xdr:cNvPr"].render(p, O), this.map["xdr:cNvPicPr"].render(p, O), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case this.tag: this.reset(); break; default: this.parser = this.map[p.name], this.parser && this.parser.parseOpen(p); break; } return !0; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.parser = void 0), !0; switch (p) { case this.tag: return this.model = this.map["xdr:cNvPr"].model, !1; default: return !0; } } }, { key: "tag", get: function() { return "xdr:nvPicPr"; } }]), n; }(v); x.exports = r; }, { "../base-xform": 31, "./c-nv-pic-pr-xform": 58, "./c-nv-pr-xform": 59 }], 66: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("./base-cell-anchor-xform"), c = e("../static-xform"), a = e("./cell-position-xform"), r = e("./ext-xform"), t = e("./pic-xform"), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { "xdr:from": new a({ tag: "xdr:from" }), "xdr:ext": new r({ tag: "xdr:ext" }), "xdr:pic": new t(), "xdr:clientData": new c({ tag: "xdr:clientData" }) }, O; } return b(p, [{ key: "prepare", value: function(P, F) { this.map["xdr:pic"].prepare(P.picture, F); } }, { key: "render", value: function(P, F) { P.openNode(this.tag, { editAs: F.range.editAs || "oneCell" }), this.map["xdr:from"].render(P, F.range.tl), this.map["xdr:ext"].render(P, F.range.ext), this.map["xdr:pic"].render(P, F.picture), this.map["xdr:clientData"].render(P, {}), P.closeNode(); } }, { key: "parseClose", value: function(P) { if (this.parser) return this.parser.parseClose(P) || (this.parser = void 0), !0; switch (P) { case this.tag: return this.model.range.tl = this.map["xdr:from"].model, this.model.range.ext = this.map["xdr:ext"].model, this.model.picture = this.map["xdr:pic"].model, !1; default: return !0; } } }, { key: "reconcile", value: function(P, F) { P.medium = this.reconcilePicture(P.picture, F); } }, { key: "tag", get: function() { return "xdr:oneCellAnchor"; } }]), p; }(v); x.exports = i; }, { "../static-xform": 119, "./base-cell-anchor-xform": 55, "./cell-position-xform": 60, "./ext-xform": 63, "./pic-xform": 67 }], 67: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../base-xform"), c = e("../static-xform"), a = e("./blip-fill-xform"), r = e("./nv-pic-pr-xform"), t = e("./sp-pr"), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { "xdr:nvPicPr": new r(), "xdr:blipFill": new a(), "xdr:spPr": new c(t) }, O; } return b(p, [{ key: "prepare", value: function(P, F) { P.index = F.index + 1; } }, { key: "render", value: function(P, F) { P.openNode(this.tag), this.map["xdr:nvPicPr"].render(P, F), this.map["xdr:blipFill"].render(P, F), this.map["xdr:spPr"].render(P, F), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case this.tag: this.reset(); break; default: this.parser = this.map[P.name], this.parser && this.parser.parseOpen(P); break; } return !0; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(P) { if (this.parser) return this.parser.parseClose(P) || (this.mergeModel(this.parser.model), this.parser = void 0), !0; switch (P) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "xdr:pic"; } }]), p; }(v); x.exports = i; }, { "../base-xform": 31, "../static-xform": 119, "./blip-fill-xform": 56, "./nv-pic-pr-xform": 65, "./sp-pr": 68 }], 68: [function(e, x, _) { x.exports = { tag: "xdr:spPr", c: [{ tag: "a:xfrm", c: [{ tag: "a:off", $: { x: "0", y: "0" } }, { tag: "a:ext", $: { cx: "0", cy: "0" } }] }, { tag: "a:prstGeom", $: { prst: "rect" }, c: [{ tag: "a:avLst" }] }] }; }, {}], 69: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("./base-cell-anchor-xform"), c = e("../static-xform"), a = e("./cell-position-xform"), r = e("./pic-xform"), t = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { var p; return m(this, o), p = n.call(this), p.map = { "xdr:from": new a({ tag: "xdr:from" }), "xdr:to": new a({ tag: "xdr:to" }), "xdr:pic": new r(), "xdr:clientData": new c({ tag: "xdr:clientData" }) }, p; } return b(o, [{ key: "prepare", value: function(O, P) { this.map["xdr:pic"].prepare(O.picture, P); } }, { key: "render", value: function(O, P) { O.openNode(this.tag, { editAs: P.range.editAs || "oneCell" }), this.map["xdr:from"].render(O, P.range.tl), this.map["xdr:to"].render(O, P.range.br), this.map["xdr:pic"].render(O, P.picture), this.map["xdr:clientData"].render(O, {}), O.closeNode(); } }, { key: "parseClose", value: function(O) { if (this.parser) return this.parser.parseClose(O) || (this.parser = void 0), !0; switch (O) { case this.tag: return this.model.range.tl = this.map["xdr:from"].model, this.model.range.br = this.map["xdr:to"].model, this.model.picture = this.map["xdr:pic"].model, !1; default: return !0; } } }, { key: "reconcile", value: function(O, P) { O.medium = this.reconcilePicture(O.picture, P); } }, { key: "tag", get: function() { return "xdr:twoCellAnchor"; } }]), o; }(v); x.exports = t; }, { "../static-xform": 119, "./base-cell-anchor-xform": 55, "./cell-position-xform": 60, "./pic-xform": 67 }], 70: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("./base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.tag = i.tag, n.always = !!i.always, n.count = i.count, n.empty = i.empty, n.$count = i.$count || "count", n.$ = i.$, n.childXform = i.childXform, n.maxItems = i.maxItems, n; } return b(t, [{ key: "prepare", value: function(n, o) { var p = this.childXform; n && n.forEach(function(O, P) { o.index = P, p.prepare(O, o); }); } }, { key: "render", value: function(n, o) { if (this.always || o && o.length) { n.openNode(this.tag, this.$), this.count && n.addAttribute(this.$count, o && o.length || 0); var p = this.childXform; (o || []).forEach(function(O, P) { p.render(n, O, P); }), n.closeNode(); } else this.empty && n.leafNode(this.tag); } }, { key: "parseOpen", value: function(n) { if (this.parser) return this.parser.parseOpen(n), !0; switch (n.name) { case this.tag: return this.model = [], !0; default: return this.childXform.parseOpen(n) ? (this.parser = this.childXform, !0) : !1; } } }, { key: "parseText", value: function(n) { this.parser && this.parser.parseText(n); } }, { key: "parseClose", value: function(n) { if (this.parser) { if (!this.parser.parseClose(n) && (this.model.push(this.parser.model), this.parser = void 0, this.maxItems && this.model.length > this.maxItems)) throw new Error("Max ".concat(this.childXform.tag, " count (").concat(this.maxItems, ") exceeded")); return !0; } return !1; } }, { key: "reconcile", value: function(n, o) { if (n) { var p = this.childXform; n.forEach(function(O) { p.reconcile(O, o); }); } } }]), t; }(v); x.exports = c; }, { "./base-xform": 31 }], 71: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../../utils/col-cache"), c = e("../base-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { if (p) if (typeof p == "string") o.leafNode("autoFilter", { ref: p }); else { var O = function(N) { return typeof N == "string" ? N : v.getAddress(N.row, N.column).address; }, P = O(p.from), F = O(p.to); P && F && o.leafNode("autoFilter", { ref: "".concat(P, ":").concat(F) }); } } }, { key: "parseOpen", value: function(o) { o.name === "autoFilter" && (this.model = o.attributes.ref); } }, { key: "tag", get: function() { return "autoFilter"; } }]), i; }(c); x.exports = a; }, { "../../../utils/col-cache": 19, "../base-xform": 31 }], 72: [function(e, x, _) { function u(F) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(N) { return typeof N; } : u = function(N) { return N && typeof Symbol == "function" && N.constructor === Symbol && N !== Symbol.prototype ? "symbol" : typeof N; }, u(F); } function m(F, z) { var N = Object.keys(F); if (Object.getOwnPropertySymbols) { var M = Object.getOwnPropertySymbols(F); z && (M = M.filter(function(I) { return Object.getOwnPropertyDescriptor(F, I).enumerable; })), N.push.apply(N, M); } return N; } function g(F) { for (var z = 1; z < arguments.length; z++) { var N = arguments[z] != null ? arguments[z] : {}; z % 2 ? m(Object(N), !0).forEach(function(M) { b(F, M, N[M]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(F, Object.getOwnPropertyDescriptors(N)) : m(Object(N)).forEach(function(M) { Object.defineProperty(F, M, Object.getOwnPropertyDescriptor(N, M)); }); } return F; } function b(F, z, N) { return z in F ? Object.defineProperty(F, z, { value: N, enumerable: !0, configurable: !0, writable: !0 }) : F[z] = N, F; } function w(F, z) { if (!(F instanceof z)) throw new TypeError("Cannot call a class as a function"); } function f(F, z) { for (var N = 0; N < z.length; N++) { var M = z[N]; M.enumerable = M.enumerable || !1, M.configurable = !0, "value" in M && (M.writable = !0), Object.defineProperty(F, M.key, M); } } function y(F, z, N) { return z && f(F.prototype, z), N && f(F, N), F; } function h(F, z) { if (typeof z != "function" && z !== null) throw new TypeError("Super expression must either be null or a function"); F.prototype = Object.create(z && z.prototype, { constructor: { value: F, writable: !0, configurable: !0 } }), z && l(F, z); } function l(F, z) { return l = Object.setPrototypeOf || function(M, I) { return M.__proto__ = I, M; }, l(F, z); } function d(F) { var z = c(); return function() { var M = a(F), I; if (z) { var R = a(this).constructor; I = Reflect.construct(M, arguments, R); } else I = M.apply(this, arguments); return s(this, I); }; } function s(F, z) { return z && (u(z) === "object" || typeof z == "function") ? z : v(F); } function v(F) { if (F === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return F; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (F) { return !1; } } function a(F) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(N) { return N.__proto__ || Object.getPrototypeOf(N); }, a(F); } var r = e("../../../utils/utils"), t = e("../base-xform"), i = e("../../../doc/range"), n = e("../../../doc/enums"), o = e("../strings/rich-text-xform"); function p(F) { if (F == null) return n.ValueType.Null; if (F instanceof String || typeof F == "string") return n.ValueType.String; if (typeof F == "number") return n.ValueType.Number; if (typeof F == "boolean") return n.ValueType.Boolean; if (F instanceof Date) return n.ValueType.Date; if (F.text && F.hyperlink) return n.ValueType.Hyperlink; if (F.formula) return n.ValueType.Formula; if (F.error) return n.ValueType.Error; throw new Error("I could not understand type of value"); } function O(F) { switch (F.type) { case n.ValueType.Formula: return p(F.result); default: return F.type; } } var P = /* @__PURE__ */ function(F) { h(N, F); var z = d(N); function N() { var M; return w(this, N), M = z.call(this), M.richTextXForm = new o(), M; } return y(N, [{ key: "prepare", value: function(I, R) { var C = R.styles.addStyleModel(I.style || {}, O(I)); switch (C && (I.styleId = C), I.comment && R.comments.push(g(g({}, I.comment), {}, { ref: I.address })), I.type) { case n.ValueType.String: case n.ValueType.RichText: R.sharedStrings && (I.ssId = R.sharedStrings.add(I.value)); break; case n.ValueType.Date: R.date1904 && (I.date1904 = !0); break; case n.ValueType.Hyperlink: R.sharedStrings && I.text !== void 0 && I.text !== null && (I.ssId = R.sharedStrings.add(I.text)), R.hyperlinks.push({ address: I.address, target: I.hyperlink, tooltip: I.tooltip }); break; case n.ValueType.Merge: R.merges.add(I); break; case n.ValueType.Formula: if (R.date1904 && (I.date1904 = !0), I.shareType === "shared" && (I.si = R.siFormulae++), I.formula) R.formulae[I.address] = I; else if (I.sharedFormula) { var E = R.formulae[I.sharedFormula]; if (!E) throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(I.address)); E.si === void 0 ? (E.shareType = "shared", E.si = R.siFormulae++, E.range = new i(E.address, I.address)) : E.range && E.range.expandToAddress(I.address), I.si = E.si; } break; } } }, { key: "renderFormula", value: function(I, R) { var C = null; switch (R.shareType) { case "shared": C = { t: "shared", ref: R.ref || R.range.range, si: R.si }; break; case "array": C = { t: "array", ref: R.ref }; break; default: R.si !== void 0 && (C = { t: "shared", si: R.si }); break; } switch (p(R.result)) { case n.ValueType.Null: I.leafNode("f", C, R.formula); break; case n.ValueType.String: I.addAttribute("t", "str"), I.leafNode("f", C, R.formula), I.leafNode("v", null, R.result); break; case n.ValueType.Number: I.leafNode("f", C, R.formula), I.leafNode("v", null, R.result); break; case n.ValueType.Boolean: I.addAttribute("t", "b"), I.leafNode("f", C, R.formula), I.leafNode("v", null, R.result ? 1 : 0); break; case n.ValueType.Error: I.addAttribute("t", "e"), I.leafNode("f", C, R.formula), I.leafNode("v", null, R.result.error); break; case n.ValueType.Date: I.leafNode("f", C, R.formula), I.leafNode("v", null, r.dateToExcel(R.result, R.date1904)); break; default: throw new Error("I could not understand type of value"); } } }, { key: "render", value: function(I, R) { var C = this; if (!(R.type === n.ValueType.Null && !R.styleId)) { switch (I.openNode("c"), I.addAttribute("r", R.address), R.styleId && I.addAttribute("s", R.styleId), R.type) { case n.ValueType.Null: break; case n.ValueType.Number: I.leafNode("v", null, R.value); break; case n.ValueType.Boolean: I.addAttribute("t", "b"), I.leafNode("v", null, R.value ? "1" : "0"); break; case n.ValueType.Error: I.addAttribute("t", "e"), I.leafNode("v", null, R.value.error); break; case n.ValueType.String: case n.ValueType.RichText: R.ssId !== void 0 ? (I.addAttribute("t", "s"), I.leafNode("v", null, R.ssId)) : R.value && R.value.richText ? (I.addAttribute("t", "inlineStr"), I.openNode("is"), R.value.richText.forEach(function(E) { C.richTextXForm.render(I, E); }), I.closeNode("is")) : (I.addAttribute("t", "str"), I.leafNode("v", null, R.value)); break; case n.ValueType.Date: I.leafNode("v", null, r.dateToExcel(R.value, R.date1904)); break; case n.ValueType.Hyperlink: R.ssId !== void 0 ? (I.addAttribute("t", "s"), I.leafNode("v", null, R.ssId)) : (I.addAttribute("t", "str"), I.leafNode("v", null, R.text)); break; case n.ValueType.Formula: this.renderFormula(I, R); break; case n.ValueType.Merge: break; } I.closeNode(); } } }, { key: "parseOpen", value: function(I) { if (this.parser) return this.parser.parseOpen(I), !0; switch (I.name) { case "c": return this.model = { address: I.attributes.r }, this.t = I.attributes.t, I.attributes.s && (this.model.styleId = parseInt(I.attributes.s, 10)), !0; case "f": return this.currentNode = "f", this.model.si = I.attributes.si, this.model.shareType = I.attributes.t, this.model.ref = I.attributes.ref, !0; case "v": return this.currentNode = "v", !0; case "t": return this.currentNode = "t", !0; case "r": return this.parser = this.richTextXForm, this.parser.parseOpen(I), !0; default: return !1; } } }, { key: "parseText", value: function(I) { if (this.parser) { this.parser.parseText(I); return; } switch (this.currentNode) { case "f": this.model.formula = this.model.formula ? this.model.formula + I : I; break; case "v": case "t": this.model.value && this.model.value.richText ? this.model.value.richText.text = this.model.value.richText.text ? this.model.value.richText.text + I : I : this.model.value = this.model.value ? this.model.value + I : I; break; } } }, { key: "parseClose", value: function(I) { switch (I) { case "c": { var R = this.model; if (R.formula || R.shareType) R.type = n.ValueType.Formula, R.value && (this.t === "str" ? R.result = r.xmlDecode(R.value) : this.t === "b" ? R.result = parseInt(R.value, 10) !== 0 : this.t === "e" ? R.result = { error: R.value } : R.result = parseFloat(R.value), R.value = void 0); else if (R.value !== void 0) switch (this.t) { case "s": R.type = n.ValueType.String, R.value = parseInt(R.value, 10); break; case "str": R.type = n.ValueType.String, R.value = r.xmlDecode(R.value); break; case "inlineStr": R.type = n.ValueType.String; break; case "b": R.type = n.ValueType.Boolean, R.value = parseInt(R.value, 10) !== 0; break; case "e": R.type = n.ValueType.Error, R.value = { error: R.value }; break; default: R.type = n.ValueType.Number, R.value = parseFloat(R.value); break; } else R.styleId ? R.type = n.ValueType.Null : R.type = n.ValueType.Merge; return !1; } case "f": case "v": case "is": return this.currentNode = void 0, !0; case "t": return this.parser ? (this.parser.parseClose(I), !0) : (this.currentNode = void 0, !0); case "r": return this.model.value = this.model.value || {}, this.model.value.richText = this.model.value.richText || [], this.model.value.richText.push(this.parser.model), this.parser = void 0, this.currentNode = void 0, !0; default: return this.parser ? (this.parser.parseClose(I), !0) : !1; } } }, { key: "reconcile", value: function(I, R) { var C = I.styleId && R.styles && R.styles.getStyleModel(I.styleId); switch (C && (I.style = C), I.styleId !== void 0 && (I.styleId = void 0), I.type) { case n.ValueType.String: typeof I.value == "number" && R.sharedStrings && (I.value = R.sharedStrings.getString(I.value)), I.value.richText && (I.type = n.ValueType.RichText); break; case n.ValueType.Number: C && r.isDateFmt(C.numFmt) && (I.type = n.ValueType.Date, I.value = r.excelToDate(I.value, R.date1904)); break; case n.ValueType.Formula: I.result !== void 0 && C && r.isDateFmt(C.numFmt) && (I.result = r.excelToDate(I.result, R.date1904)), I.shareType === "shared" && (I.ref ? R.formulae[I.si] = I.address : (I.sharedFormula = R.formulae[I.si], delete I.shareType), delete I.si); break; } var E = R.hyperlinkMap[I.address]; E && (I.type === n.ValueType.Formula ? (I.text = I.result, I.result = void 0) : (I.text = I.value, I.value = void 0), I.type = n.ValueType.Hyperlink, I.hyperlink = E); var A = R.commentsMap && R.commentsMap[I.address]; A && (I.comment = A); } }, { key: "tag", get: function() { return "c"; } }]), N; }(t); x.exports = P; }, { "../../../doc/enums": 7, "../../../doc/range": 10, "../../../utils/utils": 26, "../base-xform": 31, "../strings/rich-text-xform": 121 }], 73: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, { iconSet: o.iconSet, iconId: o.iconId }); } }, { key: "parseOpen", value: function(n) { var o = n.attributes; this.model = { iconSet: o.iconSet, iconId: v.toIntValue(o.iconId) }; } }, { key: "parseClose", value: function(n) { return n !== this.tag; } }, { key: "tag", get: function() { return "x14:cfIcon"; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 74: [function(e, x, _) { function u(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(P) { return typeof P; } : u = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, u(p); } function m(p, O) { if (!(p instanceof O)) throw new TypeError("Cannot call a class as a function"); } function g(p, O) { for (var P = 0; P < O.length; P++) { var F = O[P]; F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(p, F.key, F); } } function b(p, O, P) { return O && g(p.prototype, O), P && g(p, P), p; } function w(p, O) { if (typeof O != "function" && O !== null) throw new TypeError("Super expression must either be null or a function"); p.prototype = Object.create(O && O.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), O && f(p, O); } function f(p, O) { return f = Object.setPrototypeOf || function(F, z) { return F.__proto__ = z, F; }, f(p, O); } function y(p) { var O = d(); return function() { var F = s(p), z; if (O) { var N = s(this).constructor; z = Reflect.construct(F, arguments, N); } else z = F.apply(this, arguments); return h(this, z); }; } function h(p, O) { return O && (u(O) === "object" || typeof O == "function") ? O : l(p); } function l(p) { if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return p; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (p) { return !1; } } function s(p) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(P) { return P.__proto__ || Object.getPrototypeOf(P); }, s(p); } var v = e("uuid"), c = v.v4, a = e("../../base-xform"), r = e("../../composite-xform"), t = e("./databar-ext-xform"), i = e("./icon-set-ext-xform"), n = { "3Triangles": !0, "3Stars": !0, "5Boxes": !0 }, o = /* @__PURE__ */ function(p) { w(P, p); var O = y(P); function P() { var F; return m(this, P), F = O.call(this), F.map = { "x14:dataBar": F.databarXform = new t(), "x14:iconSet": F.iconSetXform = new i() }, F; } return b(P, [{ key: "prepare", value: function(z) { P.isExt(z) && (z.x14Id = "{".concat(c(), "}").toUpperCase()); } }, { key: "render", value: function(z, N) { if (P.isExt(N)) switch (N.type) { case "dataBar": this.renderDataBar(z, N); break; case "iconSet": this.renderIconSet(z, N); break; } } }, { key: "renderDataBar", value: function(z, N) { z.openNode(this.tag, { type: "dataBar", id: N.x14Id }), this.databarXform.render(z, N), z.closeNode(); } }, { key: "renderIconSet", value: function(z, N) { z.openNode(this.tag, { type: "iconSet", priority: N.priority, id: N.x14Id || "{".concat(c(), "}") }), this.iconSetXform.render(z, N), z.closeNode(); } }, { key: "createNewModel", value: function(z) { var N = z.attributes; return { type: N.type, x14Id: N.id, priority: a.toIntValue(N.priority) }; } }, { key: "onParserClose", value: function(z, N) { Object.assign(this.model, N.model); } }, { key: "tag", get: function() { return "x14:cfRule"; } }], [{ key: "isExt", value: function(z) { return z.type === "dataBar" ? t.isExt(z) : !!(z.type === "iconSet" && (z.custom || n[z.iconSet])); } }]), P; }(r); x.exports = o; }, { "../../base-xform": 31, "../../composite-xform": 47, "./databar-ext-xform": 78, "./icon-set-ext-xform": 80, uuid: 526 }], 75: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../composite-xform"), c = e("./f-ext-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { var n; return m(this, i), n = t.call(this), n.map = { "xm:f": n.fExtXform = new c() }, n; } return b(i, [{ key: "render", value: function(o, p) { o.openNode(this.tag, { type: p.type }), p.value !== void 0 && this.fExtXform.render(o, p.value), o.closeNode(); } }, { key: "createNewModel", value: function(o) { return { type: o.attributes.type }; } }, { key: "onParserClose", value: function(o, p) { switch (o) { case "xm:f": this.model.value = p.model ? parseFloat(p.model) : 0; break; } } }, { key: "tag", get: function() { return "x14:cfvo"; } }]), i; }(v); x.exports = a; }, { "../../composite-xform": 47, "./f-ext-xform": 79 }], 76: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../composite-xform"), c = e("./sqref-ext-xform"), a = e("./cf-rule-ext-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "xm:sqref": o.sqRef = new c(), "x14:cfRule": o.cfRule = new a() }, o; } return b(n, [{ key: "prepare", value: function(p, O) { var P = this; p.rules.forEach(function(F) { P.cfRule.prepare(F, O); }); } }, { key: "render", value: function(p, O) { var P = this; O.rules.some(a.isExt) && (p.openNode(this.tag, { "xmlns:xm": "http://schemas.microsoft.com/office/excel/2006/main" }), O.rules.filter(a.isExt).forEach(function(F) { return P.cfRule.render(p, F); }), this.sqRef.render(p, O.ref), p.closeNode()); } }, { key: "createNewModel", value: function() { return { rules: [] }; } }, { key: "onParserClose", value: function(p, O) { switch (p) { case "xm:sqref": this.model.ref = O.model; break; case "x14:cfRule": this.model.rules.push(O.model); break; } } }, { key: "tag", get: function() { return "x14:conditionalFormatting"; } }]), n; }(v); x.exports = r; }, { "../../composite-xform": 47, "./cf-rule-ext-xform": 74, "./sqref-ext-xform": 81 }], 77: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../composite-xform"), c = e("./cf-rule-ext-xform"), a = e("./conditional-formatting-ext-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "x14:conditionalFormatting": o.cfXform = new a() }, o; } return b(n, [{ key: "hasContent", value: function(p) { return p.hasExtContent === void 0 && (p.hasExtContent = p.some(function(O) { return O.rules.some(c.isExt); })), p.hasExtContent; } }, { key: "prepare", value: function(p, O) { var P = this; p.forEach(function(F) { P.cfXform.prepare(F, O); }); } }, { key: "render", value: function(p, O) { var P = this; this.hasContent(O) && (p.openNode(this.tag), O.forEach(function(F) { return P.cfXform.render(p, F); }), p.closeNode()); } }, { key: "createNewModel", value: function() { return []; } }, { key: "onParserClose", value: function(p, O) { this.model.push(O.model); } }, { key: "tag", get: function() { return "x14:conditionalFormattings"; } }]), n; }(v); x.exports = r; }, { "../../composite-xform": 47, "./cf-rule-ext-xform": 74, "./conditional-formatting-ext-xform": 76 }], 78: [function(e, x, _) { function u(F) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(N) { return typeof N; } : u = function(N) { return N && typeof Symbol == "function" && N.constructor === Symbol && N !== Symbol.prototype ? "symbol" : typeof N; }, u(F); } function m(F, z) { return y(F) || f(F, z) || b(F, z) || g(); } function g() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function b(F, z) { if (F) { if (typeof F == "string") return w(F, z); var N = Object.prototype.toString.call(F).slice(8, -1); if (N === "Object" && F.constructor && (N = F.constructor.name), N === "Map" || N === "Set") return Array.from(F); if (N === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)) return w(F, z); } } function w(F, z) { (z == null || z > F.length) && (z = F.length); for (var N = 0, M = new Array(z); N < z; N++) M[N] = F[N]; return M; } function f(F, z) { if (!(typeof Symbol == "undefined" || !(Symbol.iterator in Object(F)))) { var N = [], M = !0, I = !1, R = void 0; try { for (var C = F[Symbol.iterator](), E; !(M = (E = C.next()).done) && (N.push(E.value), !(z && N.length === z)); M = !0) ; } catch (A) { I = !0, R = A; } finally { try { !M && C.return != null && C.return(); } finally { if (I) throw R; } } return N; } } function y(F) { if (Array.isArray(F)) return F; } function h(F, z) { if (!(F instanceof z)) throw new TypeError("Cannot call a class as a function"); } function l(F, z) { for (var N = 0; N < z.length; N++) { var M = z[N]; M.enumerable = M.enumerable || !1, M.configurable = !0, "value" in M && (M.writable = !0), Object.defineProperty(F, M.key, M); } } function d(F, z, N) { return z && l(F.prototype, z), N && l(F, N), F; } function s(F, z) { if (typeof z != "function" && z !== null) throw new TypeError("Super expression must either be null or a function"); F.prototype = Object.create(z && z.prototype, { constructor: { value: F, writable: !0, configurable: !0 } }), z && v(F, z); } function v(F, z) { return v = Object.setPrototypeOf || function(M, I) { return M.__proto__ = I, M; }, v(F, z); } function c(F) { var z = t(); return function() { var M = i(F), I; if (z) { var R = i(this).constructor; I = Reflect.construct(M, arguments, R); } else I = M.apply(this, arguments); return a(this, I); }; } function a(F, z) { return z && (u(z) === "object" || typeof z == "function") ? z : r(F); } function r(F) { if (F === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return F; } function t() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (F) { return !1; } } function i(F) { return i = Object.setPrototypeOf ? Object.getPrototypeOf : function(N) { return N.__proto__ || Object.getPrototypeOf(N); }, i(F); } var n = e("../../base-xform"), o = e("../../composite-xform"), p = e("../../style/color-xform"), O = e("./cfvo-ext-xform"), P = /* @__PURE__ */ function(F) { s(N, F); var z = c(N); function N() { var M; return h(this, N), M = z.call(this), M.map = { "x14:cfvo": M.cfvoXform = new O(), "x14:borderColor": M.borderColorXform = new p("x14:borderColor"), "x14:negativeBorderColor": M.negativeBorderColorXform = new p("x14:negativeBorderColor"), "x14:negativeFillColor": M.negativeFillColorXform = new p("x14:negativeFillColor"), "x14:axisColor": M.axisColorXform = new p("x14:axisColor") }, M; } return d(N, [{ key: "render", value: function(I, R) { var C = this; I.openNode(this.tag, { minLength: n.toIntAttribute(R.minLength, 0, !0), maxLength: n.toIntAttribute(R.maxLength, 100, !0), border: n.toBoolAttribute(R.border, !1), gradient: n.toBoolAttribute(R.gradient, !0), negativeBarColorSameAsPositive: n.toBoolAttribute(R.negativeBarColorSameAsPositive, !0), negativeBarBorderColorSameAsPositive: n.toBoolAttribute(R.negativeBarBorderColorSameAsPositive, !0), axisPosition: n.toAttribute(R.axisPosition, "auto"), direction: n.toAttribute(R.direction, "leftToRight") }), R.cfvo.forEach(function(E) { C.cfvoXform.render(I, E); }), this.borderColorXform.render(I, R.borderColor), this.negativeBorderColorXform.render(I, R.negativeBorderColor), this.negativeFillColorXform.render(I, R.negativeFillColor), this.axisColorXform.render(I, R.axisColor), I.closeNode(); } }, { key: "createNewModel", value: function(I) { var R = I.attributes; return { cfvo: [], minLength: n.toIntValue(R.minLength, 0), maxLength: n.toIntValue(R.maxLength, 100), border: n.toBoolValue(R.border, !1), gradient: n.toBoolValue(R.gradient, !0), negativeBarColorSameAsPositive: n.toBoolValue(R.negativeBarColorSameAsPositive, !0), negativeBarBorderColorSameAsPositive: n.toBoolValue(R.negativeBarBorderColorSameAsPositive, !0), axisPosition: n.toStringValue(R.axisPosition, "auto"), direction: n.toStringValue(R.direction, "leftToRight") }; } }, { key: "onParserClose", value: function(I, R) { var C = I.split(":"), E = m(C, 2), A = E[1]; switch (A) { case "cfvo": this.model.cfvo.push(R.model); break; default: this.model[A] = R.model; break; } } }, { key: "tag", get: function() { return "x14:dataBar"; } }], [{ key: "isExt", value: function(I) { return !I.gradient; } }]), N; }(o); x.exports = P; }, { "../../base-xform": 31, "../../composite-xform": 47, "../../style/color-xform": 127, "./cfvo-ext-xform": 75 }], 79: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, null, o); } }, { key: "parseOpen", value: function() { this.model = ""; } }, { key: "parseText", value: function(n) { this.model += n; } }, { key: "parseClose", value: function(n) { return n !== this.tag; } }, { key: "tag", get: function() { return "xm:f"; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 80: [function(e, x, _) { function u(F) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(N) { return typeof N; } : u = function(N) { return N && typeof Symbol == "function" && N.constructor === Symbol && N !== Symbol.prototype ? "symbol" : typeof N; }, u(F); } function m(F, z) { return y(F) || f(F, z) || b(F, z) || g(); } function g() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function b(F, z) { if (F) { if (typeof F == "string") return w(F, z); var N = Object.prototype.toString.call(F).slice(8, -1); if (N === "Object" && F.constructor && (N = F.constructor.name), N === "Map" || N === "Set") return Array.from(F); if (N === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)) return w(F, z); } } function w(F, z) { (z == null || z > F.length) && (z = F.length); for (var N = 0, M = new Array(z); N < z; N++) M[N] = F[N]; return M; } function f(F, z) { if (!(typeof Symbol == "undefined" || !(Symbol.iterator in Object(F)))) { var N = [], M = !0, I = !1, R = void 0; try { for (var C = F[Symbol.iterator](), E; !(M = (E = C.next()).done) && (N.push(E.value), !(z && N.length === z)); M = !0) ; } catch (A) { I = !0, R = A; } finally { try { !M && C.return != null && C.return(); } finally { if (I) throw R; } } return N; } } function y(F) { if (Array.isArray(F)) return F; } function h(F, z) { if (!(F instanceof z)) throw new TypeError("Cannot call a class as a function"); } function l(F, z) { for (var N = 0; N < z.length; N++) { var M = z[N]; M.enumerable = M.enumerable || !1, M.configurable = !0, "value" in M && (M.writable = !0), Object.defineProperty(F, M.key, M); } } function d(F, z, N) { return z && l(F.prototype, z), N && l(F, N), F; } function s(F, z) { if (typeof z != "function" && z !== null) throw new TypeError("Super expression must either be null or a function"); F.prototype = Object.create(z && z.prototype, { constructor: { value: F, writable: !0, configurable: !0 } }), z && v(F, z); } function v(F, z) { return v = Object.setPrototypeOf || function(M, I) { return M.__proto__ = I, M; }, v(F, z); } function c(F) { var z = t(); return function() { var M = i(F), I; if (z) { var R = i(this).constructor; I = Reflect.construct(M, arguments, R); } else I = M.apply(this, arguments); return a(this, I); }; } function a(F, z) { return z && (u(z) === "object" || typeof z == "function") ? z : r(F); } function r(F) { if (F === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return F; } function t() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (F) { return !1; } } function i(F) { return i = Object.setPrototypeOf ? Object.getPrototypeOf : function(N) { return N.__proto__ || Object.getPrototypeOf(N); }, i(F); } var n = e("../../base-xform"), o = e("../../composite-xform"), p = e("./cfvo-ext-xform"), O = e("./cf-icon-ext-xform"), P = /* @__PURE__ */ function(F) { s(N, F); var z = c(N); function N() { var M; return h(this, N), M = z.call(this), M.map = { "x14:cfvo": M.cfvoXform = new p(), "x14:cfIcon": M.cfIconXform = new O() }, M; } return d(N, [{ key: "render", value: function(I, R) { var C = this; I.openNode(this.tag, { iconSet: n.toStringAttribute(R.iconSet), reverse: n.toBoolAttribute(R.reverse, !1), showValue: n.toBoolAttribute(R.showValue, !0), custom: n.toBoolAttribute(R.icons, !1) }), R.cfvo.forEach(function(E) { C.cfvoXform.render(I, E); }), R.icons && R.icons.forEach(function(E, A) { E.iconId = A, C.cfIconXform.render(I, E); }), I.closeNode(); } }, { key: "createNewModel", value: function(I) { var R = I.attributes; return { cfvo: [], iconSet: n.toStringValue(R.iconSet, "3TrafficLights"), reverse: n.toBoolValue(R.reverse, !1), showValue: n.toBoolValue(R.showValue, !0) }; } }, { key: "onParserClose", value: function(I, R) { var C = I.split(":"), E = m(C, 2), A = E[1]; switch (A) { case "cfvo": this.model.cfvo.push(R.model); break; case "cfIcon": this.model.icons || (this.model.icons = []), this.model.icons.push(R.model); break; default: this.model[A] = R.model; break; } } }, { key: "tag", get: function() { return "x14:iconSet"; } }]), N; }(o); x.exports = P; }, { "../../base-xform": 31, "../../composite-xform": 47, "./cf-icon-ext-xform": 73, "./cfvo-ext-xform": 75 }], 81: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, null, o); } }, { key: "parseOpen", value: function() { this.model = ""; } }, { key: "parseText", value: function(n) { this.model += n; } }, { key: "parseClose", value: function(n) { return n !== this.tag; } }, { key: "tag", get: function() { return "xm:sqref"; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 82: [function(e, x, _) { function u(R) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(E) { return typeof E; } : u = function(E) { return E && typeof Symbol == "function" && E.constructor === Symbol && E !== Symbol.prototype ? "symbol" : typeof E; }, u(R); } function m(R, C) { var E = Object.keys(R); if (Object.getOwnPropertySymbols) { var A = Object.getOwnPropertySymbols(R); C && (A = A.filter(function(L) { return Object.getOwnPropertyDescriptor(R, L).enumerable; })), E.push.apply(E, A); } return E; } function g(R) { for (var C = 1; C < arguments.length; C++) { var E = arguments[C] != null ? arguments[C] : {}; C % 2 ? m(Object(E), !0).forEach(function(A) { b(R, A, E[A]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(R, Object.getOwnPropertyDescriptors(E)) : m(Object(E)).forEach(function(A) { Object.defineProperty(R, A, Object.getOwnPropertyDescriptor(E, A)); }); } return R; } function b(R, C, E) { return C in R ? Object.defineProperty(R, C, { value: E, enumerable: !0, configurable: !0, writable: !0 }) : R[C] = E, R; } function w(R, C) { if (!(R instanceof C)) throw new TypeError("Cannot call a class as a function"); } function f(R, C) { for (var E = 0; E < C.length; E++) { var A = C[E]; A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(R, A.key, A); } } function y(R, C, E) { return C && f(R.prototype, C), E && f(R, E), R; } function h(R, C) { if (typeof C != "function" && C !== null) throw new TypeError("Super expression must either be null or a function"); R.prototype = Object.create(C && C.prototype, { constructor: { value: R, writable: !0, configurable: !0 } }), C && l(R, C); } function l(R, C) { return l = Object.setPrototypeOf || function(A, L) { return A.__proto__ = L, A; }, l(R, C); } function d(R) { var C = c(); return function() { var A = a(R), L; if (C) { var $ = a(this).constructor; L = Reflect.construct(A, arguments, $); } else L = A.apply(this, arguments); return s(this, L); }; } function s(R, C) { return C && (u(C) === "object" || typeof C == "function") ? C : v(R); } function v(R) { if (R === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return R; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (R) { return !1; } } function a(R) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(E) { return E.__proto__ || Object.getPrototypeOf(E); }, a(R); } var r = e("../../base-xform"), t = e("../../composite-xform"), i = e("../../../../doc/range"), n = e("./databar-xform"), o = e("./ext-lst-ref-xform"), p = e("./formula-xform"), O = e("./color-scale-xform"), P = e("./icon-set-xform"), F = { "3Triangles": !0, "3Stars": !0, "5Boxes": !0 }, z = function(C) { if (C.formulae && C.formulae[0]) return C.formulae[0]; var E = new i(C.ref), A = E.tl; switch (C.operator) { case "containsText": return 'NOT(ISERROR(SEARCH("'.concat(C.text, '",').concat(A, ")))"); case "containsBlanks": return "LEN(TRIM(".concat(A, "))=0"); case "notContainsBlanks": return "LEN(TRIM(".concat(A, "))>0"); case "containsErrors": return "ISERROR(".concat(A, ")"); case "notContainsErrors": return "NOT(ISERROR(".concat(A, "))"); default: return; } }, N = function(C) { if (C.formulae && C.formulae[0]) return C.formulae[0]; var E = new i(C.ref), A = E.tl; switch (C.timePeriod) { case "thisWeek": return "AND(TODAY()-ROUNDDOWN(".concat(A, ",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(A, ",0)-TODAY()<=7-WEEKDAY(TODAY()))"); case "lastWeek": return "AND(TODAY()-ROUNDDOWN(".concat(A, ",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(A, ",0)<(WEEKDAY(TODAY())+7))"); case "nextWeek": return "AND(ROUNDDOWN(".concat(A, ",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(A, ",0)-TODAY()<(15-WEEKDAY(TODAY())))"); case "yesterday": return "FLOOR(".concat(A, ",1)=TODAY()-1"); case "today": return "FLOOR(".concat(A, ",1)=TODAY()"); case "tomorrow": return "FLOOR(".concat(A, ",1)=TODAY()+1"); case "last7Days": return "AND(TODAY()-FLOOR(".concat(A, ",1)<=6,FLOOR(").concat(A, ",1)<=TODAY())"); case "lastMonth": return "AND(MONTH(".concat(A, ")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(A, ")=YEAR(EDATE(TODAY(),0-1)))"); case "thisMonth": return "AND(MONTH(".concat(A, ")=MONTH(TODAY()),YEAR(").concat(A, ")=YEAR(TODAY()))"); case "nextMonth": return "AND(MONTH(".concat(A, ")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(A, ")=YEAR(EDATE(TODAY(),0+1)))"); default: return; } }, M = function(C) { var E = C.type, A = C.operator; switch (E) { case "containsText": case "containsBlanks": case "notContainsBlanks": case "containsErrors": case "notContainsErrors": return { type: "containsText", operator: E }; default: return { type: E, operator: A }; } }, I = /* @__PURE__ */ function(R) { h(E, R); var C = d(E); function E() { var A; return w(this, E), A = C.call(this), A.map = { dataBar: A.databarXform = new n(), extLst: A.extLstRefXform = new o(), formula: A.formulaXform = new p(), colorScale: A.colorScaleXform = new O(), iconSet: A.iconSetXform = new P() }, A; } return y(E, [{ key: "render", value: function(L, $) { switch ($.type) { case "expression": this.renderExpression(L, $); break; case "cellIs": this.renderCellIs(L, $); break; case "top10": this.renderTop10(L, $); break; case "aboveAverage": this.renderAboveAverage(L, $); break; case "dataBar": this.renderDataBar(L, $); break; case "colorScale": this.renderColorScale(L, $); break; case "iconSet": this.renderIconSet(L, $); break; case "containsText": this.renderText(L, $); break; case "timePeriod": this.renderTimePeriod(L, $); break; } } }, { key: "renderExpression", value: function(L, $) { L.openNode(this.tag, { type: "expression", dxfId: $.dxfId, priority: $.priority }), this.formulaXform.render(L, $.formulae[0]), L.closeNode(); } }, { key: "renderCellIs", value: function(L, $) { var W = this; L.openNode(this.tag, { type: "cellIs", dxfId: $.dxfId, priority: $.priority, operator: $.operator }), $.formulae.forEach(function(U) { W.formulaXform.render(L, U); }), L.closeNode(); } }, { key: "renderTop10", value: function(L, $) { L.leafNode(this.tag, { type: "top10", dxfId: $.dxfId, priority: $.priority, percent: r.toBoolAttribute($.percent, !1), bottom: r.toBoolAttribute($.bottom, !1), rank: r.toIntValue($.rank, 10, !0) }); } }, { key: "renderAboveAverage", value: function(L, $) { L.leafNode(this.tag, { type: "aboveAverage", dxfId: $.dxfId, priority: $.priority, aboveAverage: r.toBoolAttribute($.aboveAverage, !0) }); } }, { key: "renderDataBar", value: function(L, $) { L.openNode(this.tag, { type: "dataBar", priority: $.priority }), this.databarXform.render(L, $), this.extLstRefXform.render(L, $), L.closeNode(); } }, { key: "renderColorScale", value: function(L, $) { L.openNode(this.tag, { type: "colorScale", priority: $.priority }), this.colorScaleXform.render(L, $), L.closeNode(); } }, { key: "renderIconSet", value: function(L, $) { E.isPrimitive($) && (L.openNode(this.tag, { type: "iconSet", priority: $.priority }), this.iconSetXform.render(L, $), L.closeNode()); } }, { key: "renderText", value: function(L, $) { L.openNode(this.tag, { type: $.operator, dxfId: $.dxfId, priority: $.priority, operator: r.toStringAttribute($.operator, "containsText") }); var W = z($); W && this.formulaXform.render(L, W), L.closeNode(); } }, { key: "renderTimePeriod", value: function(L, $) { L.openNode(this.tag, { type: "timePeriod", dxfId: $.dxfId, priority: $.priority, timePeriod: $.timePeriod }); var W = N($); W && this.formulaXform.render(L, W), L.closeNode(); } }, { key: "createNewModel", value: function(L) { var $ = L.attributes; return g(g({}, M($)), {}, { dxfId: r.toIntValue($.dxfId), priority: r.toIntValue($.priority), timePeriod: $.timePeriod, percent: r.toBoolValue($.percent), bottom: r.toBoolValue($.bottom), rank: r.toIntValue($.rank), aboveAverage: r.toBoolValue($.aboveAverage) }); } }, { key: "onParserClose", value: function(L, $) { switch (L) { case "dataBar": case "extLst": case "colorScale": case "iconSet": Object.assign(this.model, $.model); break; case "formula": this.model.formulae = this.model.formulae || [], this.model.formulae.push($.model); break; } } }, { key: "tag", get: function() { return "cfRule"; } }], [{ key: "isPrimitive", value: function(L) { return !(L.type === "iconSet" && (L.custom || F[L.iconSet])); } }]), E; }(t); x.exports = I; }, { "../../../../doc/range": 10, "../../base-xform": 31, "../../composite-xform": 47, "./color-scale-xform": 84, "./databar-xform": 87, "./ext-lst-ref-xform": 88, "./formula-xform": 89, "./icon-set-xform": 90 }], 83: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, { type: o.type, val: o.value }); } }, { key: "parseOpen", value: function(n) { this.model = { type: n.attributes.type, value: v.toFloatValue(n.attributes.val) }; } }, { key: "parseClose", value: function(n) { return n !== this.tag; } }, { key: "tag", get: function() { return "cfvo"; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 84: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../composite-xform"), c = e("../../style/color-xform"), a = e("./cfvo-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { cfvo: o.cfvoXform = new a(), color: o.colorXform = new c() }, o; } return b(n, [{ key: "render", value: function(p, O) { var P = this; p.openNode(this.tag), O.cfvo.forEach(function(F) { P.cfvoXform.render(p, F); }), O.color.forEach(function(F) { P.colorXform.render(p, F); }), p.closeNode(); } }, { key: "createNewModel", value: function(p) { return { cfvo: [], color: [] }; } }, { key: "onParserClose", value: function(p, O) { this.model[p].push(O.model); } }, { key: "tag", get: function() { return "colorScale"; } }]), n; }(v); x.exports = r; }, { "../../composite-xform": 47, "../../style/color-xform": 127, "./cfvo-xform": 83 }], 85: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../composite-xform"), c = e("./cf-rule-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { var n; return m(this, i), n = t.call(this), n.map = { cfRule: new c() }, n; } return b(i, [{ key: "render", value: function(o, p) { var O = this; p.rules.some(c.isPrimitive) && (o.openNode(this.tag, { sqref: p.ref }), p.rules.forEach(function(P) { c.isPrimitive(P) && (P.ref = p.ref, O.map.cfRule.render(o, P)); }), o.closeNode()); } }, { key: "createNewModel", value: function(o) { var p = o.attributes; return { ref: p.sqref, rules: [] }; } }, { key: "onParserClose", value: function(o, p) { this.model.rules.push(p.model); } }, { key: "tag", get: function() { return "conditionalFormatting"; } }]), i; }(v); x.exports = a; }, { "../../composite-xform": 47, "./cf-rule-xform": 82 }], 86: [function(e, x, _) { function u(O) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(F) { return typeof F; } : u = function(F) { return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F; }, u(O); } function m(O) { return f(O) || w(O) || b(O) || g(); } function g() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function b(O, P) { if (O) { if (typeof O == "string") return y(O, P); var F = Object.prototype.toString.call(O).slice(8, -1); if (F === "Object" && O.constructor && (F = O.constructor.name), F === "Map" || F === "Set") return Array.from(O); if (F === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)) return y(O, P); } } function w(O) { if (typeof Symbol != "undefined" && Symbol.iterator in Object(O)) return Array.from(O); } function f(O) { if (Array.isArray(O)) return y(O); } function y(O, P) { (P == null || P > O.length) && (P = O.length); for (var F = 0, z = new Array(P); F < P; F++) z[F] = O[F]; return z; } function h(O, P) { if (!(O instanceof P)) throw new TypeError("Cannot call a class as a function"); } function l(O, P) { for (var F = 0; F < P.length; F++) { var z = P[F]; z.enumerable = z.enumerable || !1, z.configurable = !0, "value" in z && (z.writable = !0), Object.defineProperty(O, z.key, z); } } function d(O, P, F) { return P && l(O.prototype, P), F && l(O, F), O; } function s(O, P) { if (typeof P != "function" && P !== null) throw new TypeError("Super expression must either be null or a function"); O.prototype = Object.create(P && P.prototype, { constructor: { value: O, writable: !0, configurable: !0 } }), P && v(O, P); } function v(O, P) { return v = Object.setPrototypeOf || function(z, N) { return z.__proto__ = N, z; }, v(O, P); } function c(O) { var P = t(); return function() { var z = i(O), N; if (P) { var M = i(this).constructor; N = Reflect.construct(z, arguments, M); } else N = z.apply(this, arguments); return a(this, N); }; } function a(O, P) { return P && (u(P) === "object" || typeof P == "function") ? P : r(O); } function r(O) { if (O === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return O; } function t() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (O) { return !1; } } function i(O) { return i = Object.setPrototypeOf ? Object.getPrototypeOf : function(F) { return F.__proto__ || Object.getPrototypeOf(F); }, i(O); } var n = e("../../base-xform"), o = e("./conditional-formatting-xform"), p = /* @__PURE__ */ function(O) { s(F, O); var P = c(F); function F() { var z; return h(this, F), z = P.call(this), z.cfXform = new o(), z; } return d(F, [{ key: "reset", value: function() { this.model = []; } }, { key: "prepare", value: function(N, M) { var I = N.reduce(function(R, C) { return Math.max.apply(Math, [R].concat(m(C.rules.map(function(E) { return E.priority || 0; })))); }, 1); N.forEach(function(R) { R.rules.forEach(function(C) { C.priority || (C.priority = I++), C.style && (C.dxfId = M.styles.addDxfStyle(C.style)); }); }); } }, { key: "render", value: function(N, M) { var I = this; M.forEach(function(R) { I.cfXform.render(N, R); }); } }, { key: "parseOpen", value: function(N) { if (this.parser) return this.parser.parseOpen(N), !0; switch (N.name) { case "conditionalFormatting": return this.parser = this.cfXform, this.parser.parseOpen(N), !0; default: return !1; } } }, { key: "parseText", value: function(N) { this.parser && this.parser.parseText(N); } }, { key: "parseClose", value: function(N) { return this.parser ? this.parser.parseClose(N) ? !0 : (this.model.push(this.parser.model), this.parser = void 0, !1) : !1; } }, { key: "reconcile", value: function(N, M) { N.forEach(function(I) { I.rules.forEach(function(R) { R.dxfId !== void 0 && (R.style = M.styles.getDxfStyle(R.dxfId), delete R.dxfId); }); }); } }, { key: "tag", get: function() { return "conditionalFormatting"; } }]), F; }(n); x.exports = p; }, { "../../base-xform": 31, "./conditional-formatting-xform": 85 }], 87: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../composite-xform"), c = e("../../style/color-xform"), a = e("./cfvo-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { cfvo: o.cfvoXform = new a(), color: o.colorXform = new c() }, o; } return b(n, [{ key: "render", value: function(p, O) { var P = this; p.openNode(this.tag), O.cfvo.forEach(function(F) { P.cfvoXform.render(p, F); }), this.colorXform.render(p, O.color), p.closeNode(); } }, { key: "createNewModel", value: function() { return { cfvo: [] }; } }, { key: "onParserClose", value: function(p, O) { switch (p) { case "cfvo": this.model.cfvo.push(O.model); break; case "color": this.model.color = O.model; break; } } }, { key: "tag", get: function() { return "dataBar"; } }]), n; }(v); x.exports = r; }, { "../../composite-xform": 47, "../../style/color-xform": 127, "./cfvo-xform": 83 }], 88: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("../../base-xform"), c = e("../../composite-xform"), a = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { return m(this, o), n.apply(this, arguments); } return b(o, [{ key: "render", value: function(O, P) { O.leafNode(this.tag, null, P); } }, { key: "parseOpen", value: function() { this.model = ""; } }, { key: "parseText", value: function(O) { this.model += O; } }, { key: "parseClose", value: function(O) { return O !== this.tag; } }, { key: "tag", get: function() { return "x14:id"; } }]), o; }(v), r = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { var p; return m(this, o), p = n.call(this), p.map = { "x14:id": p.idXform = new a() }, p; } return b(o, [{ key: "render", value: function(O, P) { O.openNode(this.tag, { uri: "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}", "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" }), this.idXform.render(O, P.x14Id), O.closeNode(); } }, { key: "createNewModel", value: function() { return {}; } }, { key: "onParserClose", value: function(O, P) { this.model.x14Id = P.model; } }, { key: "tag", get: function() { return "ext"; } }]), o; }(c), t = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { var p; return m(this, o), p = n.call(this), p.map = { ext: new r() }, p; } return b(o, [{ key: "render", value: function(O, P) { O.openNode(this.tag), this.map.ext.render(O, P), O.closeNode(); } }, { key: "createNewModel", value: function() { return {}; } }, { key: "onParserClose", value: function(O, P) { Object.assign(this.model, P.model); } }, { key: "tag", get: function() { return "extLst"; } }]), o; }(c); x.exports = t; }, { "../../base-xform": 31, "../../composite-xform": 47 }], 89: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode(this.tag, null, o); } }, { key: "parseOpen", value: function() { this.model = ""; } }, { key: "parseText", value: function(n) { this.model += n; } }, { key: "parseClose", value: function(n) { return n !== this.tag; } }, { key: "tag", get: function() { return "formula"; } }]), t; }(v); x.exports = c; }, { "../../base-xform": 31 }], 90: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../base-xform"), c = e("../../composite-xform"), a = e("./cfvo-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { cfvo: o.cfvoXform = new a() }, o; } return b(n, [{ key: "render", value: function(p, O) { var P = this; p.openNode(this.tag, { iconSet: v.toStringAttribute(O.iconSet, "3TrafficLights"), reverse: v.toBoolAttribute(O.reverse, !1), showValue: v.toBoolAttribute(O.showValue, !0) }), O.cfvo.forEach(function(F) { P.cfvoXform.render(p, F); }), p.closeNode(); } }, { key: "createNewModel", value: function(p) { var O = p.attributes; return { iconSet: v.toStringValue(O.iconSet, "3TrafficLights"), reverse: v.toBoolValue(O.reverse), showValue: v.toBoolValue(O.showValue), cfvo: [] }; } }, { key: "onParserClose", value: function(p, O) { this.model[p].push(O.model); } }, { key: "tag", get: function() { return "iconSet"; } }]), n; }(c); x.exports = r; }, { "../../base-xform": 31, "../../composite-xform": 47, "./cfvo-xform": 83 }], 91: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "prepare", value: function(n, o) { var p = o.styles.addStyleModel(n.style || {}); p && (n.styleId = p); } }, { key: "render", value: function(n, o) { n.openNode("col"), n.addAttribute("min", o.min), n.addAttribute("max", o.max), o.width && n.addAttribute("width", o.width), o.styleId && n.addAttribute("style", o.styleId), o.hidden && n.addAttribute("hidden", "1"), o.bestFit && n.addAttribute("bestFit", "1"), o.outlineLevel && n.addAttribute("outlineLevel", o.outlineLevel), o.collapsed && n.addAttribute("collapsed", "1"), n.addAttribute("customWidth", "1"), n.closeNode(); } }, { key: "parseOpen", value: function(n) { if (n.name === "col") { var o = this.model = { min: parseInt(n.attributes.min || "0", 10), max: parseInt(n.attributes.max || "0", 10), width: n.attributes.width === void 0 ? void 0 : parseFloat(n.attributes.width || "0") }; return n.attributes.style && (o.styleId = parseInt(n.attributes.style, 10)), (n.attributes.hidden === !0 || n.attributes.hidden === "true" || n.attributes.hidden === 1 || n.attributes.hidden === "1") && (o.hidden = !0), n.attributes.bestFit && (o.bestFit = !0), n.attributes.outlineLevel && (o.outlineLevel = parseInt(n.attributes.outlineLevel, 10)), n.attributes.collapsed && (o.collapsed = !0), !0; } return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "reconcile", value: function(n, o) { n.styleId && (n.style = o.styles.getStyleModel(n.styleId)); } }, { key: "tag", get: function() { return "col"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 92: [function(e, x, _) { function u(N) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(I) { return typeof I; } : u = function(I) { return I && typeof Symbol == "function" && I.constructor === Symbol && I !== Symbol.prototype ? "symbol" : typeof I; }, u(N); } function m(N, M) { if (!(N instanceof M)) throw new TypeError("Cannot call a class as a function"); } function g(N, M) { for (var I = 0; I < M.length; I++) { var R = M[I]; R.enumerable = R.enumerable || !1, R.configurable = !0, "value" in R && (R.writable = !0), Object.defineProperty(N, R.key, R); } } function b(N, M, I) { return M && g(N.prototype, M), I && g(N, I), N; } function w(N, M) { if (typeof M != "function" && M !== null) throw new TypeError("Super expression must either be null or a function"); N.prototype = Object.create(M && M.prototype, { constructor: { value: N, writable: !0, configurable: !0 } }), M && f(N, M); } function f(N, M) { return f = Object.setPrototypeOf || function(R, C) { return R.__proto__ = C, R; }, f(N, M); } function y(N) { var M = d(); return function() { var R = s(N), C; if (M) { var E = s(this).constructor; C = Reflect.construct(R, arguments, E); } else C = R.apply(this, arguments); return h(this, C); }; } function h(N, M) { return M && (u(M) === "object" || typeof M == "function") ? M : l(N); } function l(N) { if (N === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return N; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (N) { return !1; } } function s(N) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(I) { return I.__proto__ || Object.getPrototypeOf(I); }, s(N); } function v(N, M) { var I = Object.keys(N); if (Object.getOwnPropertySymbols) { var R = Object.getOwnPropertySymbols(N); M && (R = R.filter(function(C) { return Object.getOwnPropertyDescriptor(N, C).enumerable; })), I.push.apply(I, R); } return I; } function c(N) { for (var M = 1; M < arguments.length; M++) { var I = arguments[M] != null ? arguments[M] : {}; M % 2 ? v(Object(I), !0).forEach(function(R) { a(N, R, I[R]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(N, Object.getOwnPropertyDescriptors(I)) : v(Object(I)).forEach(function(R) { Object.defineProperty(N, R, Object.getOwnPropertyDescriptor(I, R)); }); } return N; } function a(N, M, I) { return M in N ? Object.defineProperty(N, M, { value: I, enumerable: !0, configurable: !0, writable: !0 }) : N[M] = I, N; } var r = e("../../../utils/under-dash"), t = e("../../../utils/utils"), i = e("../../../utils/col-cache"), n = e("../base-xform"), o = e("../../../doc/range"); function p(N, M, I, R) { var C = M[I]; C !== void 0 ? N[I] = C : R !== void 0 && (N[I] = R); } function O(N) { switch (N) { case "1": case "true": return !0; default: return !1; } } function P(N, M, I, R) { var C = M[I]; C !== void 0 ? N[I] = O(C) : R !== void 0 && (N[I] = R); } function F(N) { var M = r.map(N, function(C, E) { return { address: E, dataValidation: C, marked: !1 }; }).sort(function(C, E) { return r.strcmp(C.address, E.address); }), I = r.keyBy(M, "address"), R = function(E, A, L) { for (var $ = 0; $ < A; $++) { var W = i.encodeAddress(E.row + $, L); if (!N[W] || !r.isEqual(N[E.address], N[W])) return !1; } return !0; }; return M.map(function(C) { if (!C.marked) { var E = i.decodeEx(C.address); if (E.dimensions) return I[E.dimensions].marked = !0, c(c({}, C.dataValidation), {}, { sqref: C.address }); for (var A = 1, L = i.encodeAddress(E.row + A, E.col); N[L] && r.isEqual(C.dataValidation, N[L]); ) A++, L = i.encodeAddress(E.row + A, E.col); for (var $ = 1; R(E, A, E.col + $); ) $++; for (var W = 0; W < A; W++) for (var U = 0; U < $; U++) L = i.encodeAddress(E.row + W, E.col + U), I[L].marked = !0; if (A > 1 || $ > 1) { var D = E.row + (A - 1), B = E.col + ($ - 1); return c(c({}, C.dataValidation), {}, { sqref: "".concat(C.address, ":").concat(i.encodeAddress(D, B)) }); } return c(c({}, C.dataValidation), {}, { sqref: C.address }); } return null; }).filter(Boolean); } var z = /* @__PURE__ */ function(N) { w(I, N); var M = y(I); function I() { return m(this, I), M.apply(this, arguments); } return b(I, [{ key: "render", value: function(C, E) { var A = F(E); A.length && (C.openNode("dataValidations", { count: A.length }), A.forEach(function(L) { C.openNode("dataValidation"), L.type !== "any" && (C.addAttribute("type", L.type), L.operator && L.type !== "list" && L.operator !== "between" && C.addAttribute("operator", L.operator), L.allowBlank && C.addAttribute("allowBlank", "1")), L.showInputMessage && C.addAttribute("showInputMessage", "1"), L.promptTitle && C.addAttribute("promptTitle", L.promptTitle), L.prompt && C.addAttribute("prompt", L.prompt), L.showErrorMessage && C.addAttribute("showErrorMessage", "1"), L.errorStyle && C.addAttribute("errorStyle", L.errorStyle), L.errorTitle && C.addAttribute("errorTitle", L.errorTitle), L.error && C.addAttribute("error", L.error), C.addAttribute("sqref", L.sqref), (L.formulae || []).forEach(function($, W) { C.openNode("formula".concat(W + 1)), L.type === "date" ? C.writeText(t.dateToExcel(new Date($))) : C.writeText($), C.closeNode(); }), C.closeNode(); }), C.closeNode()); } }, { key: "parseOpen", value: function(C) { switch (C.name) { case "dataValidations": return this.model = {}, !0; case "dataValidation": { this._address = C.attributes.sqref; var E = { type: C.attributes.type || "any", formulae: [] }; switch (C.attributes.type && P(E, C.attributes, "allowBlank"), P(E, C.attributes, "showInputMessage"), P(E, C.attributes, "showErrorMessage"), E.type) { case "any": case "list": case "custom": break; default: p(E, C.attributes, "operator", "between"); break; } return p(E, C.attributes, "promptTitle"), p(E, C.attributes, "prompt"), p(E, C.attributes, "errorStyle"), p(E, C.attributes, "errorTitle"), p(E, C.attributes, "error"), this._dataValidation = E, !0; } case "formula1": case "formula2": return this._formula = [], !0; default: return !1; } } }, { key: "parseText", value: function(C) { this._formula && this._formula.push(C); } }, { key: "parseClose", value: function(C) { var E = this; switch (C) { case "dataValidations": return !1; case "dataValidation": { (!this._dataValidation.formulae || !this._dataValidation.formulae.length) && (delete this._dataValidation.formulae, delete this._dataValidation.operator); var A = this._address.split(/\s+/g) || []; return A.forEach(function($) { if ($.includes(":")) { var W = new o($); W.forEachAddress(function(U) { E.model[U] = E._dataValidation; }); } else E.model[$] = E._dataValidation; }), !0; } case "formula1": case "formula2": { var L = this._formula.join(""); switch (this._dataValidation.type) { case "whole": case "textLength": L = parseInt(L, 10); break; case "decimal": L = parseFloat(L); break; case "date": L = t.excelToDate(parseFloat(L)); break; } return this._dataValidation.formulae.push(L), this._formula = void 0, !0; } default: return !0; } } }, { key: "tag", get: function() { return "dataValidations"; } }]), I; }(n); x.exports = z; }, { "../../../doc/range": 10, "../../../utils/col-cache": 19, "../../../utils/under-dash": 25, "../../../utils/utils": 26, "../base-xform": 31 }], 93: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { o && n.leafNode("dimension", { ref: o }); } }, { key: "parseOpen", value: function(n) { return n.name === "dimension" ? (this.model = n.attributes.ref, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "dimension"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 94: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { o && n.leafNode(this.tag, { "r:id": o.rId }); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { rId: n.attributes["r:id"] }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "drawing"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 95: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../composite-xform"), c = e("./cf-ext/conditional-formattings-ext-xform"), a = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { "x14:conditionalFormattings": o.conditionalFormattings = new c() }, o; } return b(n, [{ key: "hasContent", value: function(p) { return this.conditionalFormattings.hasContent(p.conditionalFormattings); } }, { key: "prepare", value: function(p, O) { this.conditionalFormattings.prepare(p.conditionalFormattings, O); } }, { key: "render", value: function(p, O) { p.openNode("ext", { uri: "{78C0D931-6437-407d-A8EE-F0AAD7539E65}", "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" }), this.conditionalFormattings.render(p, O.conditionalFormattings), p.closeNode(); } }, { key: "createNewModel", value: function() { return {}; } }, { key: "onParserClose", value: function(p, O) { this.model[p] = O.model; } }, { key: "tag", get: function() { return "ext"; } }]), n; }(v), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { ext: o.ext = new a() }, o; } return b(n, [{ key: "prepare", value: function(p, O) { this.ext.prepare(p, O); } }, { key: "hasContent", value: function(p) { return this.ext.hasContent(p); } }, { key: "render", value: function(p, O) { this.hasContent(O) && (p.openNode("extLst"), this.ext.render(p, O), p.closeNode()); } }, { key: "createNewModel", value: function() { return {}; } }, { key: "onParserClose", value: function(p, O) { Object.assign(this.model, O.model); } }, { key: "tag", get: function() { return "extLst"; } }]), n; }(v); x.exports = r; }, { "../composite-xform": 47, "./cf-ext/conditional-formattings-ext-xform": 77 }], 96: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { if (o) { n.addRollback(); var p = !1; n.openNode("headerFooter"), o.differentFirst && (n.addAttribute("differentFirst", "1"), p = !0), o.differentOddEven && (n.addAttribute("differentOddEven", "1"), p = !0), o.oddHeader && typeof o.oddHeader == "string" && (n.leafNode("oddHeader", null, o.oddHeader), p = !0), o.oddFooter && typeof o.oddFooter == "string" && (n.leafNode("oddFooter", null, o.oddFooter), p = !0), o.evenHeader && typeof o.evenHeader == "string" && (n.leafNode("evenHeader", null, o.evenHeader), p = !0), o.evenFooter && typeof o.evenFooter == "string" && (n.leafNode("evenFooter", null, o.evenFooter), p = !0), o.firstHeader && typeof o.firstHeader == "string" && (n.leafNode("firstHeader", null, o.firstHeader), p = !0), o.firstFooter && typeof o.firstFooter == "string" && (n.leafNode("firstFooter", null, o.firstFooter), p = !0), p ? (n.closeNode(), n.commit()) : n.rollback(); } } }, { key: "parseOpen", value: function(n) { switch (n.name) { case "headerFooter": return this.model = {}, n.attributes.differentFirst && (this.model.differentFirst = parseInt(n.attributes.differentFirst, 0) === 1), n.attributes.differentOddEven && (this.model.differentOddEven = parseInt(n.attributes.differentOddEven, 0) === 1), !0; case "oddHeader": return this.currentNode = "oddHeader", !0; case "oddFooter": return this.currentNode = "oddFooter", !0; case "evenHeader": return this.currentNode = "evenHeader", !0; case "evenFooter": return this.currentNode = "evenFooter", !0; case "firstHeader": return this.currentNode = "firstHeader", !0; case "firstFooter": return this.currentNode = "firstFooter", !0; default: return !1; } } }, { key: "parseText", value: function(n) { switch (this.currentNode) { case "oddHeader": this.model.oddHeader = n; break; case "oddFooter": this.model.oddFooter = n; break; case "evenHeader": this.model.evenHeader = n; break; case "evenFooter": this.model.evenFooter = n; break; case "firstHeader": this.model.firstHeader = n; break; case "firstFooter": this.model.firstFooter = n; break; } } }, { key: "parseClose", value: function() { switch (this.currentNode) { case "oddHeader": case "oddFooter": case "evenHeader": case "evenFooter": case "firstHeader": case "firstFooter": return this.currentNode = void 0, !0; default: return !1; } } }, { key: "tag", get: function() { return "headerFooter"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 97: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("hyperlink", { ref: o.address, "r:id": o.rId, tooltip: o.tooltip }); } }, { key: "parseOpen", value: function(n) { return n.name === "hyperlink" ? (this.model = { address: n.attributes.ref, rId: n.attributes["r:id"], tooltip: n.attributes.tooltip }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "hyperlink"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 98: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("mergeCell", { ref: o }); } }, { key: "parseOpen", value: function(n) { return n.name === "mergeCell" ? (this.model = n.attributes.ref, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "mergeCell"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 99: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } var b = e("../../../utils/under-dash"), w = e("../../../doc/range"), f = e("../../../utils/col-cache"), y = e("../../../doc/enums"), h = /* @__PURE__ */ function() { function l() { u(this, l), this.merges = {}; } return g(l, [{ key: "add", value: function(s) { if (this.merges[s.master]) this.merges[s.master].expandToAddress(s.address); else { var v = "".concat(s.master, ":").concat(s.address); this.merges[s.master] = new w(v); } } }, { key: "reconcile", value: function(s, v) { b.each(s, function(c) { for (var a = f.decode(c), r = a.top; r <= a.bottom; r++) for (var t = v[r - 1], i = a.left; i <= a.right; i++) { var n = t.cells[i - 1]; n ? n.type === y.ValueType.Merge && (n.master = a.tl) : t.cells[i] = { type: y.ValueType.Null, address: f.encodeAddress(r, i) }; } }); } }, { key: "getMasterAddress", value: function(s) { var v = this.hash[s]; return v && v.tl; } }, { key: "mergeCells", get: function() { return b.map(this.merges, function(s) { return s.range; }); } }]), l; }(); x.exports = h; }, { "../../../doc/enums": 7, "../../../doc/range": 10, "../../../utils/col-cache": 19, "../../../utils/under-dash": 25 }], 100: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = function(t) { return typeof t != "undefined"; }, a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { return p && (c(p.summaryBelow) || c(p.summaryRight)) ? (o.leafNode(this.tag, { summaryBelow: c(p.summaryBelow) ? Number(p.summaryBelow) : void 0, summaryRight: c(p.summaryRight) ? Number(p.summaryRight) : void 0 }), !0) : !1; } }, { key: "parseOpen", value: function(o) { return o.name === this.tag ? (this.model = { summaryBelow: c(o.attributes.summaryBelow) ? !!Number(o.attributes.summaryBelow) : void 0, summaryRight: c(o.attributes.summaryRight) ? !!Number(o.attributes.summaryRight) : void 0 }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "outlinePr"; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31 }], 101: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.leafNode("brk", o); } }, { key: "parseOpen", value: function(n) { return n.name === "brk" ? (this.model = n.attributes.ref, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "brk"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 102: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../../utils/under-dash"), c = e("../base-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { if (p) { var O = { left: p.left, right: p.right, top: p.top, bottom: p.bottom, header: p.header, footer: p.footer }; v.some(O, function(P) { return P !== void 0; }) && o.leafNode(this.tag, O); } } }, { key: "parseOpen", value: function(o) { switch (o.name) { case this.tag: return this.model = { left: parseFloat(o.attributes.left || 0.7), right: parseFloat(o.attributes.right || 0.7), top: parseFloat(o.attributes.top || 0.75), bottom: parseFloat(o.attributes.bottom || 0.75), header: parseFloat(o.attributes.header || 0.3), footer: parseFloat(o.attributes.footer || 0.3) }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "pageMargins"; } }]), i; }(c); x.exports = a; }, { "../../../utils/under-dash": 25, "../base-xform": 31 }], 103: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { return o && o.fitToPage ? (n.leafNode(this.tag, { fitToPage: o.fitToPage ? "1" : void 0 }), !0) : !1; } }, { key: "parseOpen", value: function(n) { return n.name === this.tag ? (this.model = { fitToPage: n.attributes.fitToPage === "1" }, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "pageSetUpPr"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 104: [function(e, x, _) { function u(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(P) { return typeof P; } : u = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, u(p); } function m(p, O) { if (!(p instanceof O)) throw new TypeError("Cannot call a class as a function"); } function g(p, O) { for (var P = 0; P < O.length; P++) { var F = O[P]; F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(p, F.key, F); } } function b(p, O, P) { return O && g(p.prototype, O), P && g(p, P), p; } function w(p, O) { if (typeof O != "function" && O !== null) throw new TypeError("Super expression must either be null or a function"); p.prototype = Object.create(O && O.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), O && f(p, O); } function f(p, O) { return f = Object.setPrototypeOf || function(F, z) { return F.__proto__ = z, F; }, f(p, O); } function y(p) { var O = d(); return function() { var F = s(p), z; if (O) { var N = s(this).constructor; z = Reflect.construct(F, arguments, N); } else z = F.apply(this, arguments); return h(this, z); }; } function h(p, O) { return O && (u(O) === "object" || typeof O == "function") ? O : l(p); } function l(p) { if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return p; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (p) { return !1; } } function s(p) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(P) { return P.__proto__ || Object.getPrototypeOf(P); }, s(p); } var v = e("../../../utils/under-dash"), c = e("../base-xform"); function a(p) { return p ? "1" : void 0; } function r(p) { switch (p) { case "overThenDown": return p; default: return; } } function t(p) { switch (p) { case "atEnd": case "asDisplyed": return p; default: return; } } function i(p) { switch (p) { case "dash": case "blank": case "NA": return p; default: return; } } function n(p) { return p !== void 0 ? parseInt(p, 10) : void 0; } var o = /* @__PURE__ */ function(p) { w(P, p); var O = y(P); function P() { return m(this, P), O.apply(this, arguments); } return b(P, [{ key: "render", value: function(z, N) { if (N) { var M = { paperSize: N.paperSize, orientation: N.orientation, horizontalDpi: N.horizontalDpi, verticalDpi: N.verticalDpi, pageOrder: r(N.pageOrder), blackAndWhite: a(N.blackAndWhite), draft: a(N.draft), cellComments: t(N.cellComments), errors: i(N.errors), scale: N.scale, fitToWidth: N.fitToWidth, fitToHeight: N.fitToHeight, firstPageNumber: N.firstPageNumber, useFirstPageNumber: a(N.firstPageNumber), usePrinterDefaults: a(N.usePrinterDefaults), copies: N.copies }; v.some(M, function(I) { return I !== void 0; }) && z.leafNode(this.tag, M); } } }, { key: "parseOpen", value: function(z) { switch (z.name) { case this.tag: return this.model = { paperSize: n(z.attributes.paperSize), orientation: z.attributes.orientation || "portrait", horizontalDpi: parseInt(z.attributes.horizontalDpi || "4294967295", 10), verticalDpi: parseInt(z.attributes.verticalDpi || "4294967295", 10), pageOrder: z.attributes.pageOrder || "downThenOver", blackAndWhite: z.attributes.blackAndWhite === "1", draft: z.attributes.draft === "1", cellComments: z.attributes.cellComments || "None", errors: z.attributes.errors || "displayed", scale: parseInt(z.attributes.scale || "100", 10), fitToWidth: parseInt(z.attributes.fitToWidth || "1", 10), fitToHeight: parseInt(z.attributes.fitToHeight || "1", 10), firstPageNumber: parseInt(z.attributes.firstPageNumber || "1", 10), useFirstPageNumber: z.attributes.useFirstPageNumber === "1", usePrinterDefaults: z.attributes.usePrinterDefaults === "1", copies: parseInt(z.attributes.copies || "1", 10) }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "pageSetup"; } }]), P; }(c); x.exports = o; }, { "../../../utils/under-dash": 25, "../base-xform": 31 }], 105: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { o && n.leafNode(this.tag, { "r:id": o.rId }); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { rId: n.attributes["r:id"] }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "picture"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 106: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../../utils/under-dash"), c = e("../base-xform"); function a(t) { return t ? "1" : void 0; } var r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { return m(this, n), i.apply(this, arguments); } return b(n, [{ key: "render", value: function(p, O) { if (O) { var P = { headings: a(O.showRowColHeaders), gridLines: a(O.showGridLines), horizontalCentered: a(O.horizontalCentered), verticalCentered: a(O.verticalCentered) }; v.some(P, function(F) { return F !== void 0; }) && p.leafNode(this.tag, P); } } }, { key: "parseOpen", value: function(p) { switch (p.name) { case this.tag: return this.model = { showRowColHeaders: p.attributes.headings === "1", showGridLines: p.attributes.gridLines === "1", horizontalCentered: p.attributes.horizontalCentered === "1", verticalCentered: p.attributes.verticalCentered === "1" }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "printOptions"; } }]), n; }(c); x.exports = r; }, { "../../../utils/under-dash": 25, "../base-xform": 31 }], 107: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("./page-breaks-xform"), c = e("../list-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { m(this, i); var n = { tag: "rowBreaks", count: !0, childXform: new v() }; return t.call(this, n); } return b(i, [{ key: "render", value: function(o, p) { if (p && p.length) { o.openNode(this.tag, this.$), this.count && (o.addAttribute(this.$count, p.length), o.addAttribute("manualBreakCount", p.length)); var O = this.childXform; p.forEach(function(P) { O.render(o, P); }), o.closeNode(); } else this.empty && o.leafNode(this.tag); } }]), i; }(c); x.exports = a; }, { "../list-xform": 70, "./page-breaks-xform": 101 }], 108: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = e("./cell-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i(n) { var o; return m(this, i), o = t.call(this), o.maxItems = n && n.maxItems, o.map = { c: new c() }, o; } return b(i, [{ key: "prepare", value: function(o, p) { var O = p.styles.addStyleModel(o.style); O && (o.styleId = O); var P = this.map.c; o.cells.forEach(function(F) { P.prepare(F, p); }); } }, { key: "render", value: function(o, p, O) { o.openNode("row"), o.addAttribute("r", p.number), p.height && (o.addAttribute("ht", p.height), o.addAttribute("customHeight", "1")), p.hidden && o.addAttribute("hidden", "1"), p.min > 0 && p.max > 0 && p.min <= p.max && o.addAttribute("spans", "".concat(p.min, ":").concat(p.max)), p.styleId && (o.addAttribute("s", p.styleId), o.addAttribute("customFormat", "1")), o.addAttribute("x14ac:dyDescent", "0.25"), p.outlineLevel && o.addAttribute("outlineLevel", p.outlineLevel), p.collapsed && o.addAttribute("collapsed", "1"); var P = this.map.c; p.cells.forEach(function(F) { P.render(o, F, O); }), o.closeNode(); } }, { key: "parseOpen", value: function(o) { if (this.parser) return this.parser.parseOpen(o), !0; if (o.name === "row") { this.numRowsSeen += 1; var p = o.attributes.spans ? o.attributes.spans.split(":").map(function(P) { return parseInt(P, 10); }) : [void 0, void 0], O = this.model = { number: parseInt(o.attributes.r, 10), min: p[0], max: p[1], cells: [] }; return o.attributes.s && (O.styleId = parseInt(o.attributes.s, 10)), (o.attributes.hidden === !0 || o.attributes.hidden === "true" || o.attributes.hidden === 1 || o.attributes.hidden === "1") && (O.hidden = !0), o.attributes.bestFit && (O.bestFit = !0), o.attributes.ht && (O.height = parseFloat(o.attributes.ht)), o.attributes.outlineLevel && (O.outlineLevel = parseInt(o.attributes.outlineLevel, 10)), o.attributes.collapsed && (O.collapsed = !0), !0; } return this.parser = this.map[o.name], this.parser ? (this.parser.parseOpen(o), !0) : !1; } }, { key: "parseText", value: function(o) { this.parser && this.parser.parseText(o); } }, { key: "parseClose", value: function(o) { if (this.parser) { if (!this.parser.parseClose(o)) { if (this.model.cells.push(this.parser.model), this.maxItems && this.model.cells.length > this.maxItems) throw new Error("Max column count (".concat(this.maxItems, ") exceeded")); this.parser = void 0; } return !0; } return !1; } }, { key: "reconcile", value: function(o, p) { o.style = o.styleId ? p.styles.getStyleModel(o.styleId) : {}, o.styleId !== void 0 && (o.styleId = void 0); var O = this.map.c; o.cells.forEach(function(P) { O.reconcile(P, p); }); } }, { key: "tag", get: function() { return "row"; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31, "./cell-xform": 72 }], 109: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../../../utils/under-dash"), c = e("../base-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { if (p) { var O = { defaultRowHeight: p.defaultRowHeight, outlineLevelRow: p.outlineLevelRow, outlineLevelCol: p.outlineLevelCol, "x14ac:dyDescent": p.dyDescent }; p.defaultColWidth && (O.defaultColWidth = p.defaultColWidth), (!p.defaultRowHeight || p.defaultRowHeight !== 15) && (O.customHeight = "1"), v.some(O, function(P) { return P !== void 0; }) && o.leafNode("sheetFormatPr", O); } } }, { key: "parseOpen", value: function(o) { return o.name === "sheetFormatPr" ? (this.model = { defaultRowHeight: parseFloat(o.attributes.defaultRowHeight || "0"), dyDescent: parseFloat(o.attributes["x14ac:dyDescent"] || "0"), outlineLevelRow: parseInt(o.attributes.outlineLevelRow || "0", 10), outlineLevelCol: parseInt(o.attributes.outlineLevelCol || "0", 10) }, o.attributes.defaultColWidth && (this.model.defaultColWidth = parseFloat(o.attributes.defaultColWidth)), !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "sheetFormatPr"; } }]), i; }(c); x.exports = a; }, { "../../../utils/under-dash": 25, "../base-xform": 31 }], 110: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("../base-xform"), c = e("../style/color-xform"), a = e("./page-setup-properties-xform"), r = e("./outline-properties-xform"), t = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { var p; return m(this, o), p = n.call(this), p.map = { tabColor: new c("tabColor"), pageSetUpPr: new a(), outlinePr: new r() }, p; } return b(o, [{ key: "render", value: function(O, P) { if (P) { O.addRollback(), O.openNode("sheetPr"); var F = !1; F = this.map.tabColor.render(O, P.tabColor) || F, F = this.map.pageSetUpPr.render(O, P.pageSetup) || F, F = this.map.outlinePr.render(O, P.outlineProperties) || F, F ? (O.closeNode(), O.commit()) : O.rollback(); } } }, { key: "parseOpen", value: function(O) { return this.parser ? (this.parser.parseOpen(O), !0) : O.name === this.tag ? (this.reset(), !0) : this.map[O.name] ? (this.parser = this.map[O.name], this.parser.parseOpen(O), !0) : !1; } }, { key: "parseText", value: function(O) { return this.parser ? (this.parser.parseText(O), !0) : !1; } }, { key: "parseClose", value: function(O) { return this.parser ? (this.parser.parseClose(O) || (this.parser = void 0), !0) : (this.map.tabColor.model || this.map.pageSetUpPr.model || this.map.outlinePr.model ? (this.model = {}, this.map.tabColor.model && (this.model.tabColor = this.map.tabColor.model), this.map.pageSetUpPr.model && (this.model.pageSetup = this.map.pageSetUpPr.model), this.map.outlinePr.model && (this.model.outlineProperties = this.map.outlinePr.model)) : this.model = null, !1); } }, { key: "tag", get: function() { return "sheetPr"; } }]), o; }(v); x.exports = t; }, { "../base-xform": 31, "../style/color-xform": 127, "./outline-properties-xform": 100, "./page-setup-properties-xform": 103 }], 111: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("../../../utils/under-dash"), c = e("../base-xform"); function a(i, n) { return i ? n : void 0; } function r(i, n) { return i === n ? !0 : void 0; } var t = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o() { return m(this, o), n.apply(this, arguments); } return b(o, [{ key: "render", value: function(O, P) { if (P) { var F = { sheet: a(P.sheet, "1"), selectLockedCells: P.selectLockedCells === !1 ? "1" : void 0, selectUnlockedCells: P.selectUnlockedCells === !1 ? "1" : void 0, formatCells: a(P.formatCells, "0"), formatColumns: a(P.formatColumns, "0"), formatRows: a(P.formatRows, "0"), insertColumns: a(P.insertColumns, "0"), insertRows: a(P.insertRows, "0"), insertHyperlinks: a(P.insertHyperlinks, "0"), deleteColumns: a(P.deleteColumns, "0"), deleteRows: a(P.deleteRows, "0"), sort: a(P.sort, "0"), autoFilter: a(P.autoFilter, "0"), pivotTables: a(P.pivotTables, "0") }; P.sheet && (F.algorithmName = P.algorithmName, F.hashValue = P.hashValue, F.saltValue = P.saltValue, F.spinCount = P.spinCount, F.objects = a(P.objects === !1, "1"), F.scenarios = a(P.scenarios === !1, "1")), v.some(F, function(z) { return z !== void 0; }) && O.leafNode(this.tag, F); } } }, { key: "parseOpen", value: function(O) { switch (O.name) { case this.tag: return this.model = { sheet: r(O.attributes.sheet, "1"), objects: O.attributes.objects === "1" ? !1 : void 0, scenarios: O.attributes.scenarios === "1" ? !1 : void 0, selectLockedCells: O.attributes.selectLockedCells === "1" ? !1 : void 0, selectUnlockedCells: O.attributes.selectUnlockedCells === "1" ? !1 : void 0, formatCells: r(O.attributes.formatCells, "0"), formatColumns: r(O.attributes.formatColumns, "0"), formatRows: r(O.attributes.formatRows, "0"), insertColumns: r(O.attributes.insertColumns, "0"), insertRows: r(O.attributes.insertRows, "0"), insertHyperlinks: r(O.attributes.insertHyperlinks, "0"), deleteColumns: r(O.attributes.deleteColumns, "0"), deleteRows: r(O.attributes.deleteRows, "0"), sort: r(O.attributes.sort, "0"), autoFilter: r(O.attributes.autoFilter, "0"), pivotTables: r(O.attributes.pivotTables, "0") }, O.attributes.algorithmName && (this.model.algorithmName = O.attributes.algorithmName, this.model.hashValue = O.attributes.hashValue, this.model.saltValue = O.attributes.saltValue, this.model.spinCount = parseInt(O.attributes.spinCount, 10)), !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "sheetProtection"; } }]), o; }(c); x.exports = t; }, { "../../../utils/under-dash": 25, "../base-xform": 31 }], 112: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../../utils/col-cache"), c = e("../base-xform"), a = { frozen: "frozen", frozenSplit: "frozen", split: "split" }, r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { return m(this, n), i.apply(this, arguments); } return b(n, [{ key: "prepare", value: function(p) { switch (p.state) { case "frozen": case "split": break; default: p.state = "normal"; break; } } }, { key: "render", value: function(p, O) { p.openNode("sheetView", { workbookViewId: O.workbookViewId || 0 }); var P = function(R, C, E) { E && p.addAttribute(R, C); }; P("rightToLeft", "1", O.rightToLeft === !0), P("tabSelected", "1", O.tabSelected), P("showRuler", "0", O.showRuler === !1), P("showRowColHeaders", "0", O.showRowColHeaders === !1), P("showGridLines", "0", O.showGridLines === !1), P("zoomScale", O.zoomScale, O.zoomScale), P("zoomScaleNormal", O.zoomScaleNormal, O.zoomScaleNormal), P("view", O.style, O.style); var F, z, N, M; switch (O.state) { case "frozen": z = O.xSplit || 0, N = O.ySplit || 0, F = O.topLeftCell || v.getAddress(N + 1, z + 1).address, M = O.xSplit && O.ySplit && "bottomRight" || O.xSplit && "topRight" || "bottomLeft", p.leafNode("pane", { xSplit: O.xSplit || void 0, ySplit: O.ySplit || void 0, topLeftCell: F, activePane: M, state: "frozen" }), p.leafNode("selection", { pane: M, activeCell: O.activeCell, sqref: O.activeCell }); break; case "split": O.activePane === "topLeft" && (O.activePane = void 0), p.leafNode("pane", { xSplit: O.xSplit || void 0, ySplit: O.ySplit || void 0, topLeftCell: O.topLeftCell, activePane: O.activePane }), p.leafNode("selection", { pane: O.activePane, activeCell: O.activeCell, sqref: O.activeCell }); break; case "normal": O.activeCell && p.leafNode("selection", { activeCell: O.activeCell, sqref: O.activeCell }); break; } p.closeNode(); } }, { key: "parseOpen", value: function(p) { switch (p.name) { case "sheetView": return this.sheetView = { workbookViewId: parseInt(p.attributes.workbookViewId, 10), rightToLeft: p.attributes.rightToLeft === "1", tabSelected: p.attributes.tabSelected === "1", showRuler: p.attributes.showRuler !== "0", showRowColHeaders: p.attributes.showRowColHeaders !== "0", showGridLines: p.attributes.showGridLines !== "0", zoomScale: parseInt(p.attributes.zoomScale || "100", 10), zoomScaleNormal: parseInt(p.attributes.zoomScaleNormal || "100", 10), style: p.attributes.view }, this.pane = void 0, this.selections = {}, !0; case "pane": return this.pane = { xSplit: parseInt(p.attributes.xSplit || "0", 10), ySplit: parseInt(p.attributes.ySplit || "0", 10), topLeftCell: p.attributes.topLeftCell, activePane: p.attributes.activePane || "topLeft", state: p.attributes.state }, !0; case "selection": { var O = p.attributes.pane || "topLeft"; return this.selections[O] = { pane: O, activeCell: p.attributes.activeCell }, !0; } default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(p) { var O, P; switch (p) { case "sheetView": return this.sheetView && this.pane ? (O = this.model = { workbookViewId: this.sheetView.workbookViewId, rightToLeft: this.sheetView.rightToLeft, state: a[this.pane.state] || "split", // split is default xSplit: this.pane.xSplit, ySplit: this.pane.ySplit, topLeftCell: this.pane.topLeftCell, showRuler: this.sheetView.showRuler, showRowColHeaders: this.sheetView.showRowColHeaders, showGridLines: this.sheetView.showGridLines, zoomScale: this.sheetView.zoomScale, zoomScaleNormal: this.sheetView.zoomScaleNormal }, this.model.state === "split" && (O.activePane = this.pane.activePane), P = this.selections[this.pane.activePane], P && P.activeCell && (O.activeCell = P.activeCell), this.sheetView.style && (O.style = this.sheetView.style)) : (O = this.model = { workbookViewId: this.sheetView.workbookViewId, rightToLeft: this.sheetView.rightToLeft, state: "normal", showRuler: this.sheetView.showRuler, showRowColHeaders: this.sheetView.showRowColHeaders, showGridLines: this.sheetView.showGridLines, zoomScale: this.sheetView.zoomScale, zoomScaleNormal: this.sheetView.zoomScaleNormal }, P = this.selections.topLeft, P && P.activeCell && (O.activeCell = P.activeCell), this.sheetView.style && (O.style = this.sheetView.style)), !1; default: return !0; } } }, { key: "reconcile", value: function() { } }, { key: "tag", get: function() { return "sheetView"; } }]), n; }(c); x.exports = r; }, { "../../../utils/col-cache": 19, "../base-xform": 31 }], 113: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { o && n.leafNode(this.tag, { "r:id": o.rId }); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case this.tag: return this.model = { rId: n.attributes["r:id"] }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "tablePart"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 114: [function(e, x, _) { function u(ve) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(oe) { return typeof oe; } : u = function(oe) { return oe && typeof Symbol == "function" && oe.constructor === Symbol && oe !== Symbol.prototype ? "symbol" : typeof oe; }, u(ve); } function m(ve, ge) { if (!(ve instanceof ge)) throw new TypeError("Cannot call a class as a function"); } function g(ve, ge) { for (var oe = 0; oe < ge.length; oe++) { var J = ge[oe]; J.enumerable = J.enumerable || !1, J.configurable = !0, "value" in J && (J.writable = !0), Object.defineProperty(ve, J.key, J); } } function b(ve, ge, oe) { return ge && g(ve.prototype, ge), oe && g(ve, oe), ve; } function w(ve, ge) { if (typeof ge != "function" && ge !== null) throw new TypeError("Super expression must either be null or a function"); ve.prototype = Object.create(ge && ge.prototype, { constructor: { value: ve, writable: !0, configurable: !0 } }), ge && f(ve, ge); } function f(ve, ge) { return f = Object.setPrototypeOf || function(J, Q) { return J.__proto__ = Q, J; }, f(ve, ge); } function y(ve) { var ge = d(); return function() { var J = s(ve), Q; if (ge) { var he = s(this).constructor; Q = Reflect.construct(J, arguments, he); } else Q = J.apply(this, arguments); return h(this, Q); }; } function h(ve, ge) { return ge && (u(ge) === "object" || typeof ge == "function") ? ge : l(ve); } function l(ve) { if (ve === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return ve; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (ve) { return !1; } } function s(ve) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(oe) { return oe.__proto__ || Object.getPrototypeOf(oe); }, s(ve); } var v = e("../../../utils/under-dash"), c = e("../../../utils/col-cache"), a = e("../../../utils/xml-stream"), r = e("../../rel-type"), t = e("./merges"), i = e("../base-xform"), n = e("../list-xform"), o = e("./row-xform"), p = e("./col-xform"), O = e("./dimension-xform"), P = e("./hyperlink-xform"), F = e("./merge-cell-xform"), z = e("./data-validations-xform"), N = e("./sheet-properties-xform"), M = e("./sheet-format-properties-xform"), I = e("./sheet-view-xform"), R = e("./sheet-protection-xform"), C = e("./page-margins-xform"), E = e("./page-setup-xform"), A = e("./print-options-xform"), L = e("./auto-filter-xform"), $ = e("./picture-xform"), W = e("./drawing-xform"), U = e("./table-part-xform"), D = e("./row-breaks-xform"), B = e("./header-footer-xform"), j = e("./cf/conditional-formattings-xform"), V = e("./ext-lst-xform"), re = function(ge, oe) { Object.keys(oe).forEach(function(J) { var Q = ge[J], he = oe[J]; Q === void 0 && he !== void 0 && (ge[J] = he); }); }, ee = function(ge, oe) { if (!oe || !oe.length) return ge; if (!ge || !ge.length) return oe; var J = {}, Q = {}; return ge.forEach(function(he) { J[he.ref] = he, he.rules.forEach(function(ke) { var ne = ke.x14Id; ne && (Q[ne] = ke); }); }), oe.forEach(function(he) { he.rules.forEach(function(ke) { var ne = Q[ke.x14Id]; ne ? re(ne, ke) : J[he.ref] ? J[he.ref].rules.push(ke) : ge.push({ ref: he.ref, rules: [ke] }); }); }), ge; }, ce = /* @__PURE__ */ function(ve) { w(oe, ve); var ge = y(oe); function oe(J) { var Q; m(this, oe), Q = ge.call(this); var he = J || {}, ke = he.maxRows, ne = he.maxCols; return Q.map = { sheetPr: new N(), dimension: new O(), sheetViews: new n({ tag: "sheetViews", count: !1, childXform: new I() }), sheetFormatPr: new M(), cols: new n({ tag: "cols", count: !1, childXform: new p() }), sheetData: new n({ tag: "sheetData", count: !1, empty: !0, childXform: new o({ maxItems: ne }), maxItems: ke }), autoFilter: new L(), mergeCells: new n({ tag: "mergeCells", count: !0, childXform: new F() }), rowBreaks: new D(), hyperlinks: new n({ tag: "hyperlinks", count: !1, childXform: new P() }), pageMargins: new C(), dataValidations: new z(), pageSetup: new E(), headerFooter: new B(), printOptions: new A(), picture: new $(), drawing: new W(), sheetProtection: new R(), tableParts: new n({ tag: "tableParts", count: !0, childXform: new U() }), conditionalFormatting: new j(), extLst: new V() }, Q; } return b(oe, [{ key: "prepare", value: function(Q, he) { var ke = this; he.merges = new t(), Q.hyperlinks = he.hyperlinks = [], Q.comments = he.comments = [], he.formulae = {}, he.siFormulae = 0, this.map.cols.prepare(Q.cols, he), this.map.sheetData.prepare(Q.rows, he), this.map.conditionalFormatting.prepare(Q.conditionalFormattings, he), Q.mergeCells = he.merges.mergeCells; var ne = Q.rels = []; function se(fe) { return "rId".concat(fe.length + 1); } if (Q.hyperlinks.forEach(function(fe) { var we = se(ne); fe.rId = we, ne.push({ Id: we, Type: r.Hyperlink, Target: fe.target, TargetMode: "External" }); }), Q.comments.length > 0) { var Ce = { Id: se(ne), Type: r.Comments, Target: "../comments".concat(Q.id, ".xml") }; ne.push(Ce); var q = { Id: se(ne), Type: r.VmlDrawing, Target: "../drawings/vmlDrawing".concat(Q.id, ".vml") }; ne.push(q), Q.comments.forEach(function(fe) { fe.refAddress = c.decodeAddress(fe.ref); }), he.commentRefs.push({ commentName: "comments".concat(Q.id), vmlDrawing: "vmlDrawing".concat(Q.id) }); } var G = [], Y; Q.media.forEach(function(fe) { if (fe.type === "background") { var we = se(ne); Y = he.media[fe.imageId], ne.push({ Id: we, Type: r.Image, Target: "../media/".concat(Y.name, ".").concat(Y.extension) }), Q.background = { rId: we }, Q.image = he.media[fe.imageId]; } else if (fe.type === "image") { var _e = Q.drawing; Y = he.media[fe.imageId], _e || (_e = Q.drawing = { rId: se(ne), name: "drawing".concat(++he.drawingsCount), anchors: [], rels: [] }, he.drawings.push(_e), ne.push({ Id: _e.rId, Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", Target: "../drawings/".concat(_e.name, ".xml") })); var je = ke.preImageId === fe.imageId ? G[fe.imageId] : G[_e.rels.length]; je || (je = se(_e.rels), G[_e.rels.length] = je, _e.rels.push({ Id: je, Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", Target: "../media/".concat(Y.name, ".").concat(Y.extension) })); var Ye = { picture: { rId: je }, range: fe.range }; if (fe.hyperlinks && fe.hyperlinks.hyperlink) { var nt = se(_e.rels); G[_e.rels.length] = nt, Ye.picture.hyperlinks = { tooltip: fe.hyperlinks.tooltip, rId: nt }, _e.rels.push({ Id: nt, Type: r.Hyperlink, Target: fe.hyperlinks.hyperlink, TargetMode: "External" }); } ke.preImageId = fe.imageId, _e.anchors.push(Ye); } }), Q.tables.forEach(function(fe) { var we = se(ne); fe.rId = we, ne.push({ Id: we, Type: r.Table, Target: "../tables/".concat(fe.target) }), fe.columns.forEach(function(_e) { var je = _e.style; je && (_e.dxfId = he.styles.addDxfStyle(je)); }); }), this.map.extLst.prepare(Q, he); } }, { key: "render", value: function(Q, he) { Q.openXml(a.StdDocAttributes), Q.openNode("worksheet", oe.WORKSHEET_ATTRIBUTES); var ke = he.properties ? { defaultRowHeight: he.properties.defaultRowHeight, dyDescent: he.properties.dyDescent, outlineLevelCol: he.properties.outlineLevelCol, outlineLevelRow: he.properties.outlineLevelRow } : void 0; he.properties && he.properties.defaultColWidth && (ke.defaultColWidth = he.properties.defaultColWidth); var ne = { outlineProperties: he.properties && he.properties.outlineProperties, tabColor: he.properties && he.properties.tabColor, pageSetup: he.pageSetup && he.pageSetup.fitToPage ? { fitToPage: he.pageSetup.fitToPage } : void 0 }, se = he.pageSetup && he.pageSetup.margins, Ce = { showRowColHeaders: he.pageSetup && he.pageSetup.showRowColHeaders, showGridLines: he.pageSetup && he.pageSetup.showGridLines, horizontalCentered: he.pageSetup && he.pageSetup.horizontalCentered, verticalCentered: he.pageSetup && he.pageSetup.verticalCentered }, q = he.sheetProtection; this.map.sheetPr.render(Q, ne), this.map.dimension.render(Q, he.dimensions), this.map.sheetViews.render(Q, he.views), this.map.sheetFormatPr.render(Q, ke), this.map.cols.render(Q, he.cols), this.map.sheetData.render(Q, he.rows), this.map.sheetProtection.render(Q, q), this.map.autoFilter.render(Q, he.autoFilter), this.map.mergeCells.render(Q, he.mergeCells), this.map.conditionalFormatting.render(Q, he.conditionalFormattings), this.map.dataValidations.render(Q, he.dataValidations), this.map.hyperlinks.render(Q, he.hyperlinks), this.map.printOptions.render(Q, Ce), this.map.pageMargins.render(Q, se), this.map.pageSetup.render(Q, he.pageSetup), this.map.headerFooter.render(Q, he.headerFooter), this.map.rowBreaks.render(Q, he.rowBreaks), this.map.drawing.render(Q, he.drawing), this.map.picture.render(Q, he.background), this.map.tableParts.render(Q, he.tables), this.map.extLst.render(Q, he), he.rels && he.rels.forEach(function(G) { G.Type === r.VmlDrawing && Q.leafNode("legacyDrawing", { "r:id": G.Id }); }), Q.closeNode(); } }, { key: "parseOpen", value: function(Q) { return this.parser ? (this.parser.parseOpen(Q), !0) : Q.name === "worksheet" ? (v.each(this.map, function(he) { he.reset(); }), !0) : (this.parser = this.map[Q.name], this.parser && this.parser.parseOpen(Q), !0); } }, { key: "parseText", value: function(Q) { this.parser && this.parser.parseText(Q); } }, { key: "parseClose", value: function(Q) { if (this.parser) return this.parser.parseClose(Q) || (this.parser = void 0), !0; switch (Q) { case "worksheet": { var he = this.map.sheetFormatPr.model || {}; this.map.sheetPr.model && this.map.sheetPr.model.tabColor && (he.tabColor = this.map.sheetPr.model.tabColor), this.map.sheetPr.model && this.map.sheetPr.model.outlineProperties && (he.outlineProperties = this.map.sheetPr.model.outlineProperties); var ke = { fitToPage: this.map.sheetPr.model && this.map.sheetPr.model.pageSetup && this.map.sheetPr.model.pageSetup.fitToPage || !1, margins: this.map.pageMargins.model }, ne = Object.assign(ke, this.map.pageSetup.model, this.map.printOptions.model), se = ee(this.map.conditionalFormatting.model, this.map.extLst.model && this.map.extLst.model["x14:conditionalFormattings"]); return this.model = { dimensions: this.map.dimension.model, cols: this.map.cols.model, rows: this.map.sheetData.model, mergeCells: this.map.mergeCells.model, hyperlinks: this.map.hyperlinks.model, dataValidations: this.map.dataValidations.model, properties: he, views: this.map.sheetViews.model, pageSetup: ne, headerFooter: this.map.headerFooter.model, background: this.map.picture.model, drawing: this.map.drawing.model, tables: this.map.tableParts.model, conditionalFormattings: se }, this.map.autoFilter.model && (this.model.autoFilter = this.map.autoFilter.model), this.map.sheetProtection.model && (this.model.sheetProtection = this.map.sheetProtection.model), !1; } default: return !0; } } }, { key: "reconcile", value: function(Q, he) { var ke = (Q.relationships || []).reduce(function(we, _e) { if (we[_e.Id] = _e, _e.Type === r.Comments && (Q.comments = he.comments[_e.Target].comments), _e.Type === r.VmlDrawing && Q.comments && Q.comments.length) { var je = he.vmlDrawings[_e.Target].comments; Q.comments.forEach(function(Ye, nt) { Ye.note = Object.assign({}, Ye.note, je[nt]); }); } return we; }, {}); if (he.commentsMap = (Q.comments || []).reduce(function(we, _e) { return _e.ref && (we[_e.ref] = _e), we; }, {}), he.hyperlinkMap = (Q.hyperlinks || []).reduce(function(we, _e) { return _e.rId && (we[_e.address] = ke[_e.rId].Target), we; }, {}), he.formulae = {}, Q.rows = Q.rows && Q.rows.filter(Boolean) || [], Q.rows.forEach(function(we) { we.cells = we.cells && we.cells.filter(Boolean) || []; }), this.map.cols.reconcile(Q.cols, he), this.map.sheetData.reconcile(Q.rows, he), this.map.conditionalFormatting.reconcile(Q.conditionalFormattings, he), Q.media = [], Q.drawing) { var ne = ke[Q.drawing.rId], se = ne.Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/); if (se) { var Ce = se[1], q = he.drawings[Ce]; q.anchors.forEach(function(we) { if (we.medium) { var _e = { type: "image", imageId: we.medium.index, range: we.range, hyperlinks: we.picture.hyperlinks }; Q.media.push(_e); } }); } } var G = Q.background && ke[Q.background.rId]; if (G) { var Y = G.Target.split("/media/")[1], fe = he.mediaIndex && he.mediaIndex[Y]; fe !== void 0 && Q.media.push({ type: "background", imageId: fe }); } Q.tables = (Q.tables || []).map(function(we) { var _e = ke[we.rId]; return he.tables[_e.Target]; }), delete Q.relationships, delete Q.hyperlinks, delete Q.comments; } }]), oe; }(i); ce.WORKSHEET_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", "mc:Ignorable": "x14ac", "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" }, x.exports = ce; }, { "../../../utils/col-cache": 19, "../../../utils/under-dash": 25, "../../../utils/xml-stream": 27, "../../rel-type": 30, "../base-xform": 31, "../list-xform": 70, "./auto-filter-xform": 71, "./cf/conditional-formattings-xform": 86, "./col-xform": 91, "./data-validations-xform": 92, "./dimension-xform": 93, "./drawing-xform": 94, "./ext-lst-xform": 95, "./header-footer-xform": 96, "./hyperlink-xform": 97, "./merge-cell-xform": 98, "./merges": 99, "./page-margins-xform": 102, "./page-setup-xform": 104, "./picture-xform": 105, "./print-options-xform": 106, "./row-breaks-xform": 107, "./row-xform": 108, "./sheet-format-properties-xform": 109, "./sheet-properties-xform": 110, "./sheet-protection-xform": 111, "./sheet-view-xform": 112, "./table-part-xform": 113 }], 115: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.tag = i.tag, n.attr = i.attr, n; } return b(t, [{ key: "render", value: function(n, o) { o && (n.openNode(this.tag), n.closeNode()); } }, { key: "parseOpen", value: function(n) { n.name === this.tag && (this.model = !0); } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 116: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.tag = i.tag, n.attr = i.attr, n.attrs = i.attrs, n._format = i.format || function(o) { try { return Number.isNaN(o.getTime()) ? "" : o.toISOString(); } catch (p) { return ""; } }, n._parse = i.parse || function(o) { return new Date(o); }, n; } return b(t, [{ key: "render", value: function(n, o) { o && (n.openNode(this.tag), this.attrs && n.addAttributes(this.attrs), this.attr ? n.addAttribute(this.attr, this._format(o)) : n.writeText(this._format(o)), n.closeNode()); } }, { key: "parseOpen", value: function(n) { n.name === this.tag && (this.attr ? this.model = this._parse(n.attributes[this.attr]) : this.text = []); } }, { key: "parseText", value: function(n) { this.attr || this.text.push(n); } }, { key: "parseClose", value: function() { return this.attr || (this.model = this._parse(this.text.join(""))), !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 117: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.tag = i.tag, n.attr = i.attr, n.attrs = i.attrs, n.zero = i.zero, n; } return b(t, [{ key: "render", value: function(n, o) { (o || this.zero) && (n.openNode(this.tag), this.attrs && n.addAttributes(this.attrs), this.attr ? n.addAttribute(this.attr, o) : n.writeText(o), n.closeNode()); } }, { key: "parseOpen", value: function(n) { return n.name === this.tag ? (this.attr ? this.model = parseInt(n.attributes[this.attr], 10) : this.text = [], !0) : !1; } }, { key: "parseText", value: function(n) { this.attr || this.text.push(n); } }, { key: "parseClose", value: function() { return this.attr || (this.model = parseInt(this.text.join("") || 0, 10)), !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 118: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.tag = i.tag, n.attr = i.attr, n.attrs = i.attrs, n; } return b(t, [{ key: "render", value: function(n, o) { o !== void 0 && (n.openNode(this.tag), this.attrs && n.addAttributes(this.attrs), this.attr ? n.addAttribute(this.attr, o) : n.writeText(o), n.closeNode()); } }, { key: "parseOpen", value: function(n) { n.name === this.tag && (this.attr ? this.model = n.attributes[this.attr] : this.text = []); } }, { key: "parseText", value: function(n) { this.attr || this.text.push(n); } }, { key: "parseClose", value: function() { return this.attr || (this.model = this.text.join("")), !1; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 119: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("./base-xform"), c = e("../../utils/xml-stream"); function a(t, i) { t.openNode(i.tag, i.$), i.c && i.c.forEach(function(n) { a(t, n); }), i.t && t.writeText(i.t), t.closeNode(); } var r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n(o) { var p; return m(this, n), p = i.call(this), p._model = o, p; } return b(n, [{ key: "render", value: function(p) { if (!this._xml) { var O = new c(); a(O, this._model), this._xml = O.xml; } p.writeXml(this._xml); } }, { key: "parseOpen", value: function() { return !0; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(p) { switch (p) { case this._model.tag: return !1; default: return !0; } } }]), n; }(v); x.exports = r; }, { "../../utils/xml-stream": 27, "./base-xform": 31 }], 120: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("./text-xform"), c = e("./rich-text-xform"), a = e("../base-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n() { var o; return m(this, n), o = i.call(this), o.map = { r: new c(), t: new v() }, o; } return b(n, [{ key: "render", value: function(p, O) { if (p.openNode(this.tag, { sb: O.sb || 0, eb: O.eb || 0 }), O && O.hasOwnProperty("richText") && O.richText) { var P = this.map.r; O.richText.forEach(function(F) { P.render(p, F); }); } else O && this.map.t.render(p, O.text); p.closeNode(); } }, { key: "parseOpen", value: function(p) { var O = p.name; return this.parser ? (this.parser.parseOpen(p), !0) : O === this.tag ? (this.model = { sb: parseInt(p.attributes.sb, 10), eb: parseInt(p.attributes.eb, 10) }, !0) : (this.parser = this.map[O], this.parser ? (this.parser.parseOpen(p), !0) : !1); } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { if (this.parser) { if (!this.parser.parseClose(p)) { switch (p) { case "r": { var O = this.model.richText; O || (O = this.model.richText = []), O.push(this.parser.model); break; } case "t": this.model.text = this.parser.model; break; } this.parser = void 0; } return !0; } switch (p) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "rPh"; } }]), n; }(a); x.exports = r; }, { "../base-xform": 31, "./rich-text-xform": 121, "./text-xform": 124 }], 121: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("./text-xform"), c = e("../style/font-xform"), a = e("../base-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n(o) { var p; return m(this, n), p = i.call(this), p.model = o, p; } return b(n, [{ key: "render", value: function(p, O) { O = O || this.model, p.openNode("r"), O.font && this.fontXform.render(p, O.font), this.textXform.render(p, O.text), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case "r": return this.model = {}, !0; case "t": return this.parser = this.textXform, this.parser.parseOpen(p), !0; case "rPr": return this.parser = this.fontXform, this.parser.parseOpen(p), !0; default: return !1; } } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { switch (p) { case "r": return !1; case "t": return this.model.text = this.parser.model, this.parser = void 0, !0; case "rPr": return this.model.font = this.parser.model, this.parser = void 0, !0; default: return this.parser && this.parser.parseClose(p), !0; } } }, { key: "tag", get: function() { return "r"; } }, { key: "textXform", get: function() { return this._textXform || (this._textXform = new v()); } }, { key: "fontXform", get: function() { return this._fontXform || (this._fontXform = new c(n.FONT_OPTIONS)); } }]), n; }(a); r.FONT_OPTIONS = { tagName: "rPr", fontNameTag: "rFont" }, x.exports = r; }, { "../base-xform": 31, "../style/font-xform": 130, "./text-xform": 124 }], 122: [function(e, x, _) { function u(i) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(o) { return typeof o; } : u = function(o) { return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, u(i); } function m(i, n) { if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function"); } function g(i, n) { for (var o = 0; o < n.length; o++) { var p = n[o]; p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(i, p.key, p); } } function b(i, n, o) { return n && g(i.prototype, n), o && g(i, o), i; } function w(i, n) { if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function"); i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), n && f(i, n); } function f(i, n) { return f = Object.setPrototypeOf || function(p, O) { return p.__proto__ = O, p; }, f(i, n); } function y(i) { var n = d(); return function() { var p = s(i), O; if (n) { var P = s(this).constructor; O = Reflect.construct(p, arguments, P); } else O = p.apply(this, arguments); return h(this, O); }; } function h(i, n) { return n && (u(n) === "object" || typeof n == "function") ? n : l(i); } function l(i) { if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return i; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (i) { return !1; } } function s(i) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { return o.__proto__ || Object.getPrototypeOf(o); }, s(i); } var v = e("./text-xform"), c = e("./rich-text-xform"), a = e("./phonetic-text-xform"), r = e("../base-xform"), t = /* @__PURE__ */ function(i) { w(o, i); var n = y(o); function o(p) { var O; return m(this, o), O = n.call(this), O.model = p, O.map = { r: new c(), t: new v(), rPh: new a() }, O; } return b(o, [{ key: "render", value: function(O, P) { var F = this; O.openNode(this.tag), P && P.hasOwnProperty("richText") && P.richText ? P.richText.length ? P.richText.forEach(function(z) { F.map.r.render(O, z); }) : this.map.t.render(O, "") : P != null && this.map.t.render(O, P), O.closeNode(); } }, { key: "parseOpen", value: function(O) { var P = O.name; return this.parser ? (this.parser.parseOpen(O), !0) : P === this.tag ? (this.model = {}, !0) : (this.parser = this.map[P], this.parser ? (this.parser.parseOpen(O), !0) : !1); } }, { key: "parseText", value: function(O) { this.parser && this.parser.parseText(O); } }, { key: "parseClose", value: function(O) { if (this.parser) { if (!this.parser.parseClose(O)) { switch (O) { case "r": { var P = this.model.richText; P || (P = this.model.richText = []), P.push(this.parser.model); break; } case "t": this.model = this.parser.model; break; } this.parser = void 0; } return !0; } switch (O) { case this.tag: return !1; default: return !0; } } }, { key: "tag", get: function() { return "si"; } }]), o; }(r); x.exports = t; }, { "../base-xform": 31, "./phonetic-text-xform": 120, "./rich-text-xform": 121, "./text-xform": 124 }], 123: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../../../utils/xml-stream"), c = e("../base-xform"), a = e("./shared-string-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n(o) { var p; return m(this, n), p = i.call(this), p.model = o || { values: [], count: 0 }, p.hash = /* @__PURE__ */ Object.create(null), p.rich = /* @__PURE__ */ Object.create(null), p; } return b(n, [{ key: "getString", value: function(p) { return this.model.values[p]; } }, { key: "add", value: function(p) { return p.richText ? this.addRichText(p) : this.addText(p); } }, { key: "addText", value: function(p) { var O = this.hash[p]; return O === void 0 && (O = this.hash[p] = this.model.values.length, this.model.values.push(p)), this.model.count++, O; } }, { key: "addRichText", value: function(p) { var O = this.sharedStringXform.toXml(p), P = this.rich[O]; return P === void 0 && (P = this.rich[O] = this.model.values.length, this.model.values.push(p)), this.model.count++, P; } // // // <%=text%> // // }, { key: "render", value: function(p, O) { O = O || this._values, p.openXml(v.StdDocAttributes), p.openNode("sst", { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", count: O.count, uniqueCount: O.values.length }); var P = this.sharedStringXform; O.values.forEach(function(F) { P.render(p, F); }), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case "sst": return !0; case "si": return this.parser = this.sharedStringXform, this.parser.parseOpen(p), !0; default: throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(p))); } } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { if (this.parser) return this.parser.parseClose(p) || (this.model.values.push(this.parser.model), this.model.count++, this.parser = void 0), !0; switch (p) { case "sst": return !1; default: throw new Error("Unexpected xml node in parseClose: ".concat(p)); } } }, { key: "sharedStringXform", get: function() { return this._sharedStringXform || (this._sharedStringXform = new a()); } }, { key: "values", get: function() { return this.model.values; } }, { key: "uniqueCount", get: function() { return this.model.values.length; } }, { key: "count", get: function() { return this.model.count; } }]), n; }(c); x.exports = r; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "./shared-string-xform": 122 }], 124: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { n.openNode("t"), /^\s|\n|\s$/.test(o) && n.addAttribute("xml:space", "preserve"), n.writeText(o), n.closeNode(); } }, { key: "parseOpen", value: function(n) { switch (n.name) { case "t": return this._text = [], !0; default: return !1; } } }, { key: "parseText", value: function(n) { this._text.push(n); } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "t"; } }, { key: "model", get: function() { return this._text.join("").replace(/_x([0-9A-F]{4})_/g, function(n, o) { return String.fromCharCode(parseInt(o, 16)); }); } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 125: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../../../doc/enums"), c = e("../../../utils/utils"), a = e("../base-xform"), r = { horizontalValues: ["left", "center", "right", "fill", "centerContinuous", "distributed", "justify"].reduce(function(n, o) { return n[o] = !0, n; }, {}), horizontal: function(o) { return this.horizontalValues[o] ? o : void 0; }, verticalValues: ["top", "middle", "bottom", "distributed", "justify"].reduce(function(n, o) { return n[o] = !0, n; }, {}), vertical: function(o) { return o === "middle" ? "center" : this.verticalValues[o] ? o : void 0; }, wrapText: function(o) { return o ? !0 : void 0; }, shrinkToFit: function(o) { return o ? !0 : void 0; }, textRotation: function(o) { switch (o) { case "vertical": return o; default: return o = c.validInt(o), o >= -90 && o <= 90 ? o : void 0; } }, indent: function(o) { return o = c.validInt(o), Math.max(0, o); }, readingOrder: function(o) { switch (o) { case "ltr": return v.ReadingOrder.LeftToRight; case "rtl": return v.ReadingOrder.RightToLeft; default: return; } } }, t = { toXml: function(o) { if (o = r.textRotation(o), o) { if (o === "vertical") return 255; var p = Math.round(o); if (p >= 0 && p <= 90) return p; if (p < 0 && p >= -90) return 90 - p; } }, toModel: function(o) { var p = c.validInt(o); if (p !== void 0) { if (p === 255) return "vertical"; if (p >= 0 && p <= 90) return p; if (p > 90 && p <= 180) return 90 - p; } } }, i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { return m(this, p), o.apply(this, arguments); } return b(p, [{ key: "render", value: function(P, F) { P.addRollback(), P.openNode("alignment"); var z = !1; function N(M, I) { I && (P.addAttribute(M, I), z = !0); } N("horizontal", r.horizontal(F.horizontal)), N("vertical", r.vertical(F.vertical)), N("wrapText", r.wrapText(F.wrapText) ? "1" : !1), N("shrinkToFit", r.shrinkToFit(F.shrinkToFit) ? "1" : !1), N("indent", r.indent(F.indent)), N("textRotation", t.toXml(F.textRotation)), N("readingOrder", r.readingOrder(F.readingOrder)), P.closeNode(), z ? P.commit() : P.rollback(); } }, { key: "parseOpen", value: function(P) { var F = {}, z = !1; function N(M, I, R) { M && (F[I] = R, z = !0); } N(P.attributes.horizontal, "horizontal", P.attributes.horizontal), N(P.attributes.vertical, "vertical", P.attributes.vertical === "center" ? "middle" : P.attributes.vertical), N(P.attributes.wrapText, "wrapText", !!P.attributes.wrapText), N(P.attributes.shrinkToFit, "shrinkToFit", !!P.attributes.shrinkToFit), N(P.attributes.indent, "indent", parseInt(P.attributes.indent, 10)), N(P.attributes.textRotation, "textRotation", t.toModel(P.attributes.textRotation)), N(P.attributes.readingOrder, "readingOrder", P.attributes.readingOrder === "2" ? "rtl" : "ltr"), this.model = z ? F : null; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "alignment"; } }]), p; }(a); x.exports = i; }, { "../../../doc/enums": 7, "../../../utils/utils": 26, "../base-xform": 31 }], 126: [function(e, x, _) { function u(o, p) { var O = Object.keys(o); if (Object.getOwnPropertySymbols) { var P = Object.getOwnPropertySymbols(o); p && (P = P.filter(function(F) { return Object.getOwnPropertyDescriptor(o, F).enumerable; })), O.push.apply(O, P); } return O; } function m(o) { for (var p = 1; p < arguments.length; p++) { var O = arguments[p] != null ? arguments[p] : {}; p % 2 ? u(Object(O), !0).forEach(function(P) { g(o, P, O[P]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(O)) : u(Object(O)).forEach(function(P) { Object.defineProperty(o, P, Object.getOwnPropertyDescriptor(O, P)); }); } return o; } function g(o, p, O) { return p in o ? Object.defineProperty(o, p, { value: O, enumerable: !0, configurable: !0, writable: !0 }) : o[p] = O, o; } function b(o) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? b = function(O) { return typeof O; } : b = function(O) { return O && typeof Symbol == "function" && O.constructor === Symbol && O !== Symbol.prototype ? "symbol" : typeof O; }, b(o); } function w(o, p) { if (!(o instanceof p)) throw new TypeError("Cannot call a class as a function"); } function f(o, p) { for (var O = 0; O < p.length; O++) { var P = p[O]; P.enumerable = P.enumerable || !1, P.configurable = !0, "value" in P && (P.writable = !0), Object.defineProperty(o, P.key, P); } } function y(o, p, O) { return p && f(o.prototype, p), O && f(o, O), o; } function h(o, p) { if (typeof p != "function" && p !== null) throw new TypeError("Super expression must either be null or a function"); o.prototype = Object.create(p && p.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), p && l(o, p); } function l(o, p) { return l = Object.setPrototypeOf || function(P, F) { return P.__proto__ = F, P; }, l(o, p); } function d(o) { var p = c(); return function() { var P = a(o), F; if (p) { var z = a(this).constructor; F = Reflect.construct(P, arguments, z); } else F = P.apply(this, arguments); return s(this, F); }; } function s(o, p) { return p && (b(p) === "object" || typeof p == "function") ? p : v(o); } function v(o) { if (o === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return o; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (o) { return !1; } } function a(o) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(O) { return O.__proto__ || Object.getPrototypeOf(O); }, a(o); } var r = e("../base-xform"), t = e("./color-xform"), i = /* @__PURE__ */ function(o) { h(O, o); var p = d(O); function O(P) { var F; return w(this, O), F = p.call(this), F.name = P, F.map = { color: new t() }, F; } return y(O, [{ key: "render", value: function(F, z, N) { var M = z && z.color || N || this.defaultColor; F.openNode(this.name), z && z.style && (F.addAttribute("style", z.style), M && this.map.color.render(F, M)), F.closeNode(); } }, { key: "parseOpen", value: function(F) { if (this.parser) return this.parser.parseOpen(F), !0; switch (F.name) { case this.name: { var z = F.attributes.style; return z ? this.model = { style: z } : this.model = void 0, !0; } case "color": return this.parser = this.map.color, this.parser.parseOpen(F), !0; default: return !1; } } }, { key: "parseText", value: function(F) { this.parser && this.parser.parseText(F); } }, { key: "parseClose", value: function(F) { return this.parser ? (this.parser.parseClose(F) || (this.parser = void 0), !0) : (F === this.name && this.map.color.model && (this.model || (this.model = {}), this.model.color = this.map.color.model), !1); } }, { key: "validStyle", value: function(F) { return O.validStyleValues[F]; } }, { key: "tag", get: function() { return this.name; } }]), O; }(r); i.validStyleValues = ["thin", "dotted", "dashDot", "hair", "dashDotDot", "slantDashDot", "mediumDashed", "mediumDashDotDot", "mediumDashDot", "medium", "double", "thick"].reduce(function(o, p) { return o[p] = !0, o; }, {}); var n = /* @__PURE__ */ function(o) { h(O, o); var p = d(O); function O() { var P; return w(this, O), P = p.call(this), P.map = { top: new i("top"), left: new i("left"), bottom: new i("bottom"), right: new i("right"), diagonal: new i("diagonal") }, P; } return y(O, [{ key: "render", value: function(F, z) { var N = z.color; F.openNode("border"), z.diagonal && z.diagonal.style && (z.diagonal.up && F.addAttribute("diagonalUp", "1"), z.diagonal.down && F.addAttribute("diagonalDown", "1")); function M(I, R) { I && !I.color && z.color && (I = m(m({}, I), {}, { color: z.color })), R.render(F, I, N); } M(z.left, this.map.left), M(z.right, this.map.right), M(z.top, this.map.top), M(z.bottom, this.map.bottom), M(z.diagonal, this.map.diagonal), F.closeNode(); } }, { key: "parseOpen", value: function(F) { if (this.parser) return this.parser.parseOpen(F), !0; switch (F.name) { case "border": return this.reset(), this.diagonalUp = !!F.attributes.diagonalUp, this.diagonalDown = !!F.attributes.diagonalDown, !0; default: return this.parser = this.map[F.name], this.parser ? (this.parser.parseOpen(F), !0) : !1; } } }, { key: "parseText", value: function(F) { this.parser && this.parser.parseText(F); } }, { key: "parseClose", value: function(F) { if (this.parser) return this.parser.parseClose(F) || (this.parser = void 0), !0; if (F === "border") { var z = this.model = {}, N = function(I, R, C) { R && (C && Object.assign(R, C), z[I] = R); }; N("left", this.map.left.model), N("right", this.map.right.model), N("top", this.map.top.model), N("bottom", this.map.bottom.model), N("diagonal", this.map.diagonal.model, { up: this.diagonalUp, down: this.diagonalDown }); } return !1; } }]), O; }(r); x.exports = n; }, { "../base-xform": 31, "./color-xform": 127 }], 127: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.name = i || "color", n; } return b(t, [{ key: "render", value: function(n, o) { return o ? (n.openNode(this.name), o.argb ? n.addAttribute("rgb", o.argb) : o.theme !== void 0 ? (n.addAttribute("theme", o.theme), o.tint !== void 0 && n.addAttribute("tint", o.tint)) : o.indexed !== void 0 ? n.addAttribute("indexed", o.indexed) : n.addAttribute("auto", "1"), n.closeNode(), !0) : !1; } }, { key: "parseOpen", value: function(n) { return n.name === this.name ? (n.attributes.rgb ? this.model = { argb: n.attributes.rgb } : n.attributes.theme ? (this.model = { theme: parseInt(n.attributes.theme, 10) }, n.attributes.tint && (this.model.tint = parseFloat(n.attributes.tint))) : n.attributes.indexed ? this.model = { indexed: parseInt(n.attributes.indexed, 10) } : this.model = void 0, !0) : !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return this.name; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 128: [function(e, x, _) { function u(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(P) { return typeof P; } : u = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, u(p); } function m(p, O) { if (!(p instanceof O)) throw new TypeError("Cannot call a class as a function"); } function g(p, O) { for (var P = 0; P < O.length; P++) { var F = O[P]; F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(p, F.key, F); } } function b(p, O, P) { return O && g(p.prototype, O), P && g(p, P), p; } function w(p, O) { if (typeof O != "function" && O !== null) throw new TypeError("Super expression must either be null or a function"); p.prototype = Object.create(O && O.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), O && f(p, O); } function f(p, O) { return f = Object.setPrototypeOf || function(F, z) { return F.__proto__ = z, F; }, f(p, O); } function y(p) { var O = d(); return function() { var F = s(p), z; if (O) { var N = s(this).constructor; z = Reflect.construct(F, arguments, N); } else z = F.apply(this, arguments); return h(this, z); }; } function h(p, O) { return O && (u(O) === "object" || typeof O == "function") ? O : l(p); } function l(p) { if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return p; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (p) { return !1; } } function s(p) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(P) { return P.__proto__ || Object.getPrototypeOf(P); }, s(p); } var v = e("../base-xform"), c = e("./alignment-xform"), a = e("./border-xform"), r = e("./fill-xform"), t = e("./font-xform"), i = e("./numfmt-xform"), n = e("./protection-xform"), o = /* @__PURE__ */ function(p) { w(P, p); var O = y(P); function P() { var F; return m(this, P), F = O.call(this), F.map = { alignment: new c(), border: new a(), fill: new r(), font: new t(), numFmt: new i(), protection: new n() }, F; } return b(P, [{ key: "render", // how do we generate dxfid? value: function(z, N) { z.openNode(this.tag), N.font && this.map.font.render(z, N.font), N.numFmt && this.map.numFmt.render(z, N.numFmt), N.fill && this.map.fill.render(z, N.fill), N.alignment && this.map.alignment.render(z, N.alignment), N.border && this.map.border.render(z, N.border), N.protection && this.map.protection.render(z, N.protection), z.closeNode(); } }, { key: "parseOpen", value: function(z) { if (this.parser) return this.parser.parseOpen(z), !0; switch (z.name) { case this.tag: return this.reset(), !0; default: return this.parser = this.map[z.name], this.parser && this.parser.parseOpen(z), !0; } } }, { key: "parseText", value: function(z) { this.parser && this.parser.parseText(z); } }, { key: "parseClose", value: function(z) { return this.parser ? (this.parser.parseClose(z) || (this.parser = void 0), !0) : z === this.tag ? (this.model = { alignment: this.map.alignment.model, border: this.map.border.model, fill: this.map.fill.model, font: this.map.font.model, numFmt: this.map.numFmt.model, protection: this.map.protection.model }, !1) : !0; } }, { key: "tag", get: function() { return "dxf"; } }]), P; }(v); x.exports = o; }, { "../base-xform": 31, "./alignment-xform": 125, "./border-xform": 126, "./fill-xform": 129, "./font-xform": 130, "./numfmt-xform": 131, "./protection-xform": 132 }], 129: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../base-xform"), c = e("./color-xform"), a = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { color: new c() }, O; } return b(p, [{ key: "render", value: function(P, F) { P.openNode("stop"), P.addAttribute("position", F.position), this.map.color.render(P, F.color), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "stop": return this.model = { position: parseFloat(P.attributes.position) }, !0; case "color": return this.parser = this.map.color, this.parser.parseOpen(P), !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function(P) { return this.parser ? (this.parser.parseClose(P) || (this.model.color = this.parser.model, this.parser = void 0), !0) : !1; } }, { key: "tag", get: function() { return "stop"; } }]), p; }(v), r = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { fgColor: new c("fgColor"), bgColor: new c("bgColor") }, O; } return b(p, [{ key: "render", value: function(P, F) { P.openNode("patternFill"), P.addAttribute("patternType", F.pattern), F.fgColor && this.map.fgColor.render(P, F.fgColor), F.bgColor && this.map.bgColor.render(P, F.bgColor), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "patternFill": return this.model = { type: "pattern", pattern: P.attributes.patternType }, !0; default: return this.parser = this.map[P.name], this.parser ? (this.parser.parseOpen(P), !0) : !1; } } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { return this.parser ? (this.parser.parseClose(P) || (this.parser.model && (this.model[P] = this.parser.model), this.parser = void 0), !0) : !1; } }, { key: "name", get: function() { return "pattern"; } }, { key: "tag", get: function() { return "patternFill"; } }]), p; }(v), t = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { stop: new a() }, O; } return b(p, [{ key: "render", value: function(P, F) { switch (P.openNode("gradientFill"), F.gradient) { case "angle": P.addAttribute("degree", F.degree); break; case "path": P.addAttribute("type", "path"), F.center.left && (P.addAttribute("left", F.center.left), F.center.right === void 0 && P.addAttribute("right", F.center.left)), F.center.right && P.addAttribute("right", F.center.right), F.center.top && (P.addAttribute("top", F.center.top), F.center.bottom === void 0 && P.addAttribute("bottom", F.center.top)), F.center.bottom && P.addAttribute("bottom", F.center.bottom); break; } var z = this.map.stop; F.stops.forEach(function(N) { z.render(P, N); }), P.closeNode(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "gradientFill": { var F = this.model = { stops: [] }; return P.attributes.degree ? (F.gradient = "angle", F.degree = parseInt(P.attributes.degree, 10)) : P.attributes.type === "path" && (F.gradient = "path", F.center = { left: P.attributes.left ? parseFloat(P.attributes.left) : 0, top: P.attributes.top ? parseFloat(P.attributes.top) : 0 }, P.attributes.right !== P.attributes.left && (F.center.right = P.attributes.right ? parseFloat(P.attributes.right) : 0), P.attributes.bottom !== P.attributes.top && (F.center.bottom = P.attributes.bottom ? parseFloat(P.attributes.bottom) : 0)), !0; } case "stop": return this.parser = this.map.stop, this.parser.parseOpen(P), !0; default: return !1; } } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { return this.parser ? (this.parser.parseClose(P) || (this.model.stops.push(this.parser.model), this.parser = void 0), !0) : !1; } }, { key: "name", get: function() { return "gradient"; } }, { key: "tag", get: function() { return "gradientFill"; } }]), p; }(v), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p() { var O; return m(this, p), O = o.call(this), O.map = { patternFill: new r(), gradientFill: new t() }, O; } return b(p, [{ key: "render", value: function(P, F) { switch (P.addRollback(), P.openNode("fill"), F.type) { case "pattern": this.map.patternFill.render(P, F); break; case "gradient": this.map.gradientFill.render(P, F); break; default: P.rollback(); return; } P.closeNode(), P.commit(); } }, { key: "parseOpen", value: function(P) { if (this.parser) return this.parser.parseOpen(P), !0; switch (P.name) { case "fill": return this.model = {}, !0; default: return this.parser = this.map[P.name], this.parser ? (this.parser.parseOpen(P), !0) : !1; } } }, { key: "parseText", value: function(P) { this.parser && this.parser.parseText(P); } }, { key: "parseClose", value: function(P) { return this.parser ? (this.parser.parseClose(P) || (this.model = this.parser.model, this.model.type = this.parser.name, this.parser = void 0), !0) : !1; } }, { key: "validStyle", value: function(P) { return p.validPatternValues[P]; } }, { key: "tag", get: function() { return "fill"; } }]), p; }(v); i.validPatternValues = ["none", "solid", "darkVertical", "darkGray", "mediumGray", "lightGray", "gray125", "gray0625", "darkHorizontal", "darkVertical", "darkDown", "darkUp", "darkGrid", "darkTrellis", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "lightGrid", "lightTrellis", "lightGrid"].reduce(function(n, o) { return n[o] = !0, n; }, {}), i.StopXform = a, i.PatternFillXform = r, i.GradientFillXform = t, x.exports = i; }, { "../base-xform": 31, "./color-xform": 127 }], 130: [function(e, x, _) { function u(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(P) { return typeof P; } : u = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, u(p); } function m(p, O) { if (!(p instanceof O)) throw new TypeError("Cannot call a class as a function"); } function g(p, O) { for (var P = 0; P < O.length; P++) { var F = O[P]; F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(p, F.key, F); } } function b(p, O, P) { return O && g(p.prototype, O), P && g(p, P), p; } function w(p, O) { if (typeof O != "function" && O !== null) throw new TypeError("Super expression must either be null or a function"); p.prototype = Object.create(O && O.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), O && f(p, O); } function f(p, O) { return f = Object.setPrototypeOf || function(F, z) { return F.__proto__ = z, F; }, f(p, O); } function y(p) { var O = d(); return function() { var F = s(p), z; if (O) { var N = s(this).constructor; z = Reflect.construct(F, arguments, N); } else z = F.apply(this, arguments); return h(this, z); }; } function h(p, O) { return O && (u(O) === "object" || typeof O == "function") ? O : l(p); } function l(p) { if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return p; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (p) { return !1; } } function s(p) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(P) { return P.__proto__ || Object.getPrototypeOf(P); }, s(p); } var v = e("./color-xform"), c = e("../simple/boolean-xform"), a = e("../simple/integer-xform"), r = e("../simple/string-xform"), t = e("./underline-xform"), i = e("../../../utils/under-dash"), n = e("../base-xform"), o = /* @__PURE__ */ function(p) { w(P, p); var O = y(P); function P(F) { var z; return m(this, P), z = O.call(this), z.options = F || P.OPTIONS, z.map = { b: { prop: "bold", xform: new c({ tag: "b", attr: "val" }) }, i: { prop: "italic", xform: new c({ tag: "i", attr: "val" }) }, u: { prop: "underline", xform: new t() }, charset: { prop: "charset", xform: new a({ tag: "charset", attr: "val" }) }, color: { prop: "color", xform: new v() }, condense: { prop: "condense", xform: new c({ tag: "condense", attr: "val" }) }, extend: { prop: "extend", xform: new c({ tag: "extend", attr: "val" }) }, family: { prop: "family", xform: new a({ tag: "family", attr: "val" }) }, outline: { prop: "outline", xform: new c({ tag: "outline", attr: "val" }) }, vertAlign: { prop: "vertAlign", xform: new r({ tag: "vertAlign", attr: "val" }) }, scheme: { prop: "scheme", xform: new r({ tag: "scheme", attr: "val" }) }, shadow: { prop: "shadow", xform: new c({ tag: "shadow", attr: "val" }) }, strike: { prop: "strike", xform: new c({ tag: "strike", attr: "val" }) }, sz: { prop: "size", xform: new a({ tag: "sz", attr: "val" }) } }, z.map[z.options.fontNameTag] = { prop: "name", xform: new r({ tag: z.options.fontNameTag, attr: "val" }) }, z; } return b(P, [{ key: "render", value: function(z, N) { var M = this.map; z.openNode(this.options.tagName), i.each(this.map, function(I, R) { M[R].xform.render(z, N[I.prop]); }), z.closeNode(); } }, { key: "parseOpen", value: function(z) { if (this.parser) return this.parser.parseOpen(z), !0; if (this.map[z.name]) return this.parser = this.map[z.name].xform, this.parser.parseOpen(z); switch (z.name) { case this.options.tagName: return this.model = {}, !0; default: return !1; } } }, { key: "parseText", value: function(z) { this.parser && this.parser.parseText(z); } }, { key: "parseClose", value: function(z) { if (this.parser && !this.parser.parseClose(z)) { var N = this.map[z]; return this.parser.model && (this.model[N.prop] = this.parser.model), this.parser = void 0, !0; } switch (z) { case this.options.tagName: return !1; default: return !0; } } }, { key: "tag", get: function() { return this.options.tagName; } }]), P; }(n); o.OPTIONS = { tagName: "font", fontNameTag: "name" }, x.exports = o; }, { "../../../utils/under-dash": 25, "../base-xform": 31, "../simple/boolean-xform": 115, "../simple/integer-xform": 117, "../simple/string-xform": 118, "./color-xform": 127, "./underline-xform": 135 }], 131: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } function m(n, o) { if (!(n instanceof o)) throw new TypeError("Cannot call a class as a function"); } function g(n, o) { for (var p = 0; p < o.length; p++) { var O = o[p]; O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(n, O.key, O); } } function b(n, o, p) { return o && g(n.prototype, o), p && g(n, p), n; } function w(n, o) { if (typeof o != "function" && o !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(o && o.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), o && f(n, o); } function f(n, o) { return f = Object.setPrototypeOf || function(O, P) { return O.__proto__ = P, O; }, f(n, o); } function y(n) { var o = d(); return function() { var O = s(n), P; if (o) { var F = s(this).constructor; P = Reflect.construct(O, arguments, F); } else P = O.apply(this, arguments); return h(this, P); }; } function h(n, o) { return o && (u(o) === "object" || typeof o == "function") ? o : l(n); } function l(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (n) { return !1; } } function s(n) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) { return p.__proto__ || Object.getPrototypeOf(p); }, s(n); } var v = e("../../../utils/under-dash"), c = e("../../defaultnumformats"), a = e("../base-xform"); function r() { var n = {}; return v.each(c, function(o, p) { o.f && (n[o.f] = parseInt(p, 10)); }), n; } var t = r(), i = /* @__PURE__ */ function(n) { w(p, n); var o = y(p); function p(O, P) { var F; return m(this, p), F = o.call(this), F.id = O, F.formatCode = P, F; } return b(p, [{ key: "render", value: function(P, F) { P.leafNode("numFmt", { numFmtId: F.id, formatCode: F.formatCode }); } }, { key: "parseOpen", value: function(P) { switch (P.name) { case "numFmt": return this.model = { id: parseInt(P.attributes.numFmtId, 10), formatCode: P.attributes.formatCode.replace(/[\\](.)/g, "$1") }, !0; default: return !1; } } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "numFmt"; } }]), p; }(a); i.getDefaultFmtId = function(o) { return t[o]; }, i.getDefaultFmtCode = function(o) { return c[o] && c[o].f; }, x.exports = i; }, { "../../../utils/under-dash": 25, "../../defaultnumformats": 29, "../base-xform": 31 }], 132: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = { boolean: function(t, i) { return t === void 0 ? i : t; } }, a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { return m(this, i), t.apply(this, arguments); } return b(i, [{ key: "render", value: function(o, p) { o.addRollback(), o.openNode("protection"); var O = !1; function P(F, z) { z !== void 0 && (o.addAttribute(F, z), O = !0); } P("locked", c.boolean(p.locked, !0) ? void 0 : "0"), P("hidden", c.boolean(p.hidden, !1) ? "1" : void 0), o.closeNode(), O ? o.commit() : o.rollback(); } }, { key: "parseOpen", value: function(o) { var p = { locked: o.attributes.locked !== "0", hidden: o.attributes.hidden === "1" }, O = !p.locked || p.hidden; this.model = O ? p : null; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "protection"; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31 }], 133: [function(e, x, _) { function u(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(n) { return typeof n; } : u = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, u(t); } function m(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function g(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function b(t, i, n) { return i && g(t.prototype, i), n && g(t, n), t; } function w(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && f(t, i); } function f(t, i) { return f = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, f(t, i); } function y(t) { var i = d(); return function() { var o = s(t), p; if (i) { var O = s(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return h(this, p); }; } function h(t, i) { return i && (u(i) === "object" || typeof i == "function") ? i : l(t); } function l(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function s(t) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, s(t); } var v = e("../base-xform"), c = e("./alignment-xform"), a = e("./protection-xform"), r = /* @__PURE__ */ function(t) { w(n, t); var i = y(n); function n(o) { var p; return m(this, n), p = i.call(this), p.xfId = !!(o && o.xfId), p.map = { alignment: new c(), protection: new a() }, p; } return b(n, [{ key: "render", value: function(p, O) { p.openNode("xf", { numFmtId: O.numFmtId || 0, fontId: O.fontId || 0, fillId: O.fillId || 0, borderId: O.borderId || 0 }), this.xfId && p.addAttribute("xfId", O.xfId || 0), O.numFmtId && p.addAttribute("applyNumberFormat", "1"), O.fontId && p.addAttribute("applyFont", "1"), O.fillId && p.addAttribute("applyFill", "1"), O.borderId && p.addAttribute("applyBorder", "1"), O.alignment && p.addAttribute("applyAlignment", "1"), O.protection && p.addAttribute("applyProtection", "1"), O.alignment && this.map.alignment.render(p, O.alignment), O.protection && this.map.protection.render(p, O.protection), p.closeNode(); } }, { key: "parseOpen", value: function(p) { if (this.parser) return this.parser.parseOpen(p), !0; switch (p.name) { case "xf": return this.model = { numFmtId: parseInt(p.attributes.numFmtId, 10), fontId: parseInt(p.attributes.fontId, 10), fillId: parseInt(p.attributes.fillId, 10), borderId: parseInt(p.attributes.borderId, 10) }, this.xfId && (this.model.xfId = parseInt(p.attributes.xfId, 10)), !0; case "alignment": return this.parser = this.map.alignment, this.parser.parseOpen(p), !0; case "protection": return this.parser = this.map.protection, this.parser.parseOpen(p), !0; default: return !1; } } }, { key: "parseText", value: function(p) { this.parser && this.parser.parseText(p); } }, { key: "parseClose", value: function(p) { return this.parser ? (this.parser.parseClose(p) || (this.map.protection === this.parser ? this.model.protection = this.parser.model : this.model.alignment = this.parser.model, this.parser = void 0), !0) : p !== "xf"; } }, { key: "tag", get: function() { return "xf"; } }]), n; }(v); x.exports = r; }, { "../base-xform": 31, "./alignment-xform": 125, "./protection-xform": 132 }], 134: [function(e, x, _) { function u(M) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(R) { return typeof R; } : u = function(R) { return R && typeof Symbol == "function" && R.constructor === Symbol && R !== Symbol.prototype ? "symbol" : typeof R; }, u(M); } function m(M, I) { if (!(M instanceof I)) throw new TypeError("Cannot call a class as a function"); } function g(M, I) { for (var R = 0; R < I.length; R++) { var C = I[R]; C.enumerable = C.enumerable || !1, C.configurable = !0, "value" in C && (C.writable = !0), Object.defineProperty(M, C.key, C); } } function b(M, I, R) { return I && g(M.prototype, I), R && g(M, R), M; } function w(M, I) { if (typeof I != "function" && I !== null) throw new TypeError("Super expression must either be null or a function"); M.prototype = Object.create(I && I.prototype, { constructor: { value: M, writable: !0, configurable: !0 } }), I && f(M, I); } function f(M, I) { return f = Object.setPrototypeOf || function(C, E) { return C.__proto__ = E, C; }, f(M, I); } function y(M) { var I = d(); return function() { var C = s(M), E; if (I) { var A = s(this).constructor; E = Reflect.construct(C, arguments, A); } else E = C.apply(this, arguments); return h(this, E); }; } function h(M, I) { return I && (u(I) === "object" || typeof I == "function") ? I : l(M); } function l(M) { if (M === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return M; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (M) { return !1; } } function s(M) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(R) { return R.__proto__ || Object.getPrototypeOf(R); }, s(M); } var v = e("../../../doc/enums"), c = e("../../../utils/xml-stream"), a = e("../base-xform"), r = e("../static-xform"), t = e("../list-xform"), i = e("./font-xform"), n = e("./fill-xform"), o = e("./border-xform"), p = e("./numfmt-xform"), O = e("./style-xform"), P = e("./dxf-xform"), F = 164, z = /* @__PURE__ */ function(M) { w(R, M); var I = y(R); function R(C) { var E; return m(this, R), E = I.call(this), E.map = { numFmts: new t({ tag: "numFmts", count: !0, childXform: new p() }), fonts: new t({ tag: "fonts", count: !0, childXform: new i(), $: { "x14ac:knownFonts": 1 } }), fills: new t({ tag: "fills", count: !0, childXform: new n() }), borders: new t({ tag: "borders", count: !0, childXform: new o() }), cellStyleXfs: new t({ tag: "cellStyleXfs", count: !0, childXform: new O() }), cellXfs: new t({ tag: "cellXfs", count: !0, childXform: new O({ xfId: !0 }) }), dxfs: new t({ tag: "dxfs", always: !0, count: !0, childXform: new P() }), // for style manager numFmt: new p(), font: new i(), fill: new n(), border: new o(), style: new O({ xfId: !0 }), cellStyles: R.STATIC_XFORMS.cellStyles, tableStyles: R.STATIC_XFORMS.tableStyles, extLst: R.STATIC_XFORMS.extLst }, C && E.init(), E; } return b(R, [{ key: "initIndex", value: function() { this.index = { style: {}, numFmt: {}, numFmtNextId: 164, // start custom format ids here font: {}, border: {}, fill: {} }; } }, { key: "init", value: function() { this.model = { styles: [], numFmts: [], fonts: [], borders: [], fills: [], dxfs: [] }, this.initIndex(), this._addBorder({}), this._addStyle({ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }), this._addFill({ type: "pattern", pattern: "none" }), this._addFill({ type: "pattern", pattern: "gray125" }), this.weakMap = /* @__PURE__ */ new WeakMap(); } }, { key: "render", value: function(E, A) { A = A || this.model, E.openXml(c.StdDocAttributes), E.openNode("styleSheet", R.STYLESHEET_ATTRIBUTES), this.index ? (A.numFmts && A.numFmts.length && (E.openNode("numFmts", { count: A.numFmts.length }), A.numFmts.forEach(function(L) { E.writeXml(L); }), E.closeNode()), A.fonts.length || this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }), E.openNode("fonts", { count: A.fonts.length, "x14ac:knownFonts": 1 }), A.fonts.forEach(function(L) { E.writeXml(L); }), E.closeNode(), E.openNode("fills", { count: A.fills.length }), A.fills.forEach(function(L) { E.writeXml(L); }), E.closeNode(), E.openNode("borders", { count: A.borders.length }), A.borders.forEach(function(L) { E.writeXml(L); }), E.closeNode(), this.map.cellStyleXfs.render(E, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]), E.openNode("cellXfs", { count: A.styles.length }), A.styles.forEach(function(L) { E.writeXml(L); }), E.closeNode()) : (this.map.numFmts.render(E, A.numFmts), this.map.fonts.render(E, A.fonts), this.map.fills.render(E, A.fills), this.map.borders.render(E, A.borders), this.map.cellStyleXfs.render(E, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]), this.map.cellXfs.render(E, A.styles)), R.STATIC_XFORMS.cellStyles.render(E), this.map.dxfs.render(E, A.dxfs), R.STATIC_XFORMS.tableStyles.render(E), R.STATIC_XFORMS.extLst.render(E), E.closeNode(); } }, { key: "parseOpen", value: function(E) { if (this.parser) return this.parser.parseOpen(E), !0; switch (E.name) { case "styleSheet": return this.initIndex(), !0; default: return this.parser = this.map[E.name], this.parser && this.parser.parseOpen(E), !0; } } }, { key: "parseText", value: function(E) { this.parser && this.parser.parseText(E); } }, { key: "parseClose", value: function(E) { var A = this; if (this.parser) return this.parser.parseClose(E) || (this.parser = void 0), !0; switch (E) { case "styleSheet": { this.model = {}; var L = function(U, D) { D.model && D.model.length && (A.model[U] = D.model); }; if (L("numFmts", this.map.numFmts), L("fonts", this.map.fonts), L("fills", this.map.fills), L("borders", this.map.borders), L("styles", this.map.cellXfs), L("dxfs", this.map.dxfs), this.index = { model: [], numFmt: [] }, this.model.numFmts) { var $ = this.index.numFmt; this.model.numFmts.forEach(function(W) { $[W.id] = W.formatCode; }); } return !1; } default: return !0; } } // add a cell's style model to the collection // each style property is processed and cross-referenced, etc. // the styleId is returned. Note: cellType is used when numFmt not defined }, { key: "addStyleModel", value: function(E, A) { if (!E) return 0; if (this.model.fonts.length || this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }), this.weakMap && this.weakMap.has(E)) return this.weakMap.get(E); var L = {}; if (A = A || v.ValueType.Number, E.numFmt) L.numFmtId = this._addNumFmtStr(E.numFmt); else switch (A) { case v.ValueType.Number: L.numFmtId = this._addNumFmtStr("General"); break; case v.ValueType.Date: L.numFmtId = this._addNumFmtStr("mm-dd-yy"); break; } E.font && (L.fontId = this._addFont(E.font)), E.border && (L.borderId = this._addBorder(E.border)), E.fill && (L.fillId = this._addFill(E.fill)), E.alignment && (L.alignment = E.alignment), E.protection && (L.protection = E.protection); var $ = this._addStyle(L); return this.weakMap && this.weakMap.set(E, $), $; } // given a styleId (i.e. s="n"), get the cell's style model // objects are shared where possible. }, { key: "getStyleModel", value: function(E) { var A = this.model.styles[E]; if (!A) return null; var L = this.index.model[E]; if (L) return L; if (L = this.index.model[E] = {}, A.numFmtId) { var $ = this.index.numFmt[A.numFmtId] || p.getDefaultFmtCode(A.numFmtId); $ && (L.numFmt = $); } function W(U, D, B) { if (B || B === 0) { var j = D[B]; j && (L[U] = j); } } return W("font", this.model.fonts, A.fontId), W("border", this.model.borders, A.borderId), W("fill", this.model.fills, A.fillId), A.alignment && (L.alignment = A.alignment), A.protection && (L.protection = A.protection), L; } }, { key: "addDxfStyle", value: function(E) { return this.model.dxfs.push(E), this.model.dxfs.length - 1; } }, { key: "getDxfStyle", value: function(E) { return this.model.dxfs[E]; } // ========================================================================= // Private Interface }, { key: "_addStyle", value: function(E) { var A = this.map.style.toXml(E), L = this.index.style[A]; return L === void 0 && (L = this.index.style[A] = this.model.styles.length, this.model.styles.push(A)), L; } // ========================================================================= // Number Formats }, { key: "_addNumFmtStr", value: function(E) { var A = p.getDefaultFmtId(E); if (A !== void 0 || (A = this.index.numFmt[E], A !== void 0)) return A; A = this.index.numFmt[E] = F + this.model.numFmts.length; var L = this.map.numFmt.toXml({ id: A, formatCode: E }); return this.model.numFmts.push(L), A; } // ========================================================================= // Fonts }, { key: "_addFont", value: function(E) { var A = this.map.font.toXml(E), L = this.index.font[A]; return L === void 0 && (L = this.index.font[A] = this.model.fonts.length, this.model.fonts.push(A)), L; } // ========================================================================= // Borders }, { key: "_addBorder", value: function(E) { var A = this.map.border.toXml(E), L = this.index.border[A]; return L === void 0 && (L = this.index.border[A] = this.model.borders.length, this.model.borders.push(A)), L; } // ========================================================================= // Fills }, { key: "_addFill", value: function(E) { var A = this.map.fill.toXml(E), L = this.index.fill[A]; return L === void 0 && (L = this.index.fill[A] = this.model.fills.length, this.model.fills.push(A)), L; } // ========================================================================= }]), R; }(a); z.STYLESHEET_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", "mc:Ignorable": "x14ac x16r2", "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac", "xmlns:x16r2": "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" }, z.STATIC_XFORMS = { cellStyles: new r({ tag: "cellStyles", $: { count: 1 }, c: [{ tag: "cellStyle", $: { name: "Normal", xfId: 0, builtinId: 0 } }] }), dxfs: new r({ tag: "dxfs", $: { count: 0 } }), tableStyles: new r({ tag: "tableStyles", $: { count: 0, defaultTableStyle: "TableStyleMedium2", defaultPivotStyle: "PivotStyleLight16" } }), extLst: new r({ tag: "extLst", c: [{ tag: "ext", $: { uri: "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}", "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" }, c: [{ tag: "x14:slicerStyles", $: { defaultSlicerStyle: "SlicerStyleLight1" } }] }, { tag: "ext", $: { uri: "{9260A510-F301-46a8-8635-F512D64BE5F5}", "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" }, c: [{ tag: "x15:timelineStyles", $: { defaultTimelineStyle: "TimeSlicerStyleLight1" } }] }] }) }; var N = /* @__PURE__ */ function(M) { w(R, M); var I = y(R); function R() { var C; return m(this, R), C = I.call(this), C.model = { styles: [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }], numFmts: [], fonts: [{ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }], borders: [{}], fills: [{ type: "pattern", pattern: "none" }, { type: "pattern", pattern: "gray125" }] }, C; } return b(R, [{ key: "parseStream", value: function(E) { return E.autodrain(), Promise.resolve(); } // add a cell's style model to the collection // each style property is processed and cross-referenced, etc. // the styleId is returned. Note: cellType is used when numFmt not defined }, { key: "addStyleModel", value: function(E, A) { switch (A) { case v.ValueType.Date: return this.dateStyleId; default: return 0; } } }, { key: "getStyleModel", // given a styleId (i.e. s="n"), get the cell's style model // objects are shared where possible. value: function() { return {}; } }, { key: "dateStyleId", get: function() { if (!this._dateStyleId) { var E = { numFmtId: p.getDefaultFmtId("mm-dd-yy") }; this._dateStyleId = this.model.styles.length, this.model.styles.push(E); } return this._dateStyleId; } }]), R; }(z); z.Mock = N, x.exports = z; }, { "../../../doc/enums": 7, "../../../utils/xml-stream": 27, "../base-xform": 31, "../list-xform": 70, "../static-xform": 119, "./border-xform": 126, "./dxf-xform": 128, "./fill-xform": 129, "./font-xform": 130, "./numfmt-xform": 131, "./style-xform": 133 }], 135: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t(i) { var n; return m(this, t), n = r.call(this), n.model = i, n; } return b(t, [{ key: "render", value: function(n, o) { if (o = o || this.model, o === !0) n.leafNode("u"); else { var p = t.Attributes[o]; p && n.leafNode("u", p); } } }, { key: "parseOpen", value: function(n) { n.name === "u" && (this.model = n.attributes.val || !0); } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "u"; } }]), t; }(v); c.Attributes = { single: {}, double: { val: "double" }, singleAccounting: { val: "singleAccounting" }, doubleAccounting: { val: "doubleAccounting" } }, x.exports = c; }, { "../base-xform": 31 }], 136: [function(e, x, _) { function u(r) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(i) { return typeof i; } : u = function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }, u(r); } function m(r, t) { if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function"); } function g(r, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function b(r, t, i) { return t && g(r.prototype, t), i && g(r, i), r; } function w(r, t) { if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), t && f(r, t); } function f(r, t) { return f = Object.setPrototypeOf || function(n, o) { return n.__proto__ = o, n; }, f(r, t); } function y(r) { var t = d(); return function() { var n = s(r), o; if (t) { var p = s(this).constructor; o = Reflect.construct(n, arguments, p); } else o = n.apply(this, arguments); return h(this, o); }; } function h(r, t) { return t && (u(t) === "object" || typeof t == "function") ? t : l(r); } function l(r) { if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return r; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (r) { return !1; } } function s(r) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) { return i.__proto__ || Object.getPrototypeOf(i); }, s(r); } var v = e("../base-xform"), c = e("./filter-column-xform"), a = /* @__PURE__ */ function(r) { w(i, r); var t = y(i); function i() { var n; return m(this, i), n = t.call(this), n.map = { filterColumn: new c() }, n; } return b(i, [{ key: "prepare", value: function(o) { var p = this; o.columns.forEach(function(O, P) { p.map.filterColumn.prepare(O, { index: P }); }); } }, { key: "render", value: function(o, p) { var O = this; return o.openNode(this.tag, { ref: p.autoFilterRef }), p.columns.forEach(function(P) { O.map.filterColumn.render(o, P); }), o.closeNode(), !0; } }, { key: "parseOpen", value: function(o) { if (this.parser) return this.parser.parseOpen(o), !0; switch (o.name) { case this.tag: return this.model = { autoFilterRef: o.attributes.ref, columns: [] }, !0; default: if (this.parser = this.map[o.name], this.parser) return this.parseOpen(o), !0; throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(o))); } } }, { key: "parseText", value: function(o) { this.parser && this.parser.parseText(o); } }, { key: "parseClose", value: function(o) { if (this.parser) return this.parser.parseClose(o) || (this.model.columns.push(this.parser.model), this.parser = void 0), !0; switch (o) { case this.tag: return !1; default: throw new Error("Unexpected xml node in parseClose: ".concat(o)); } } }, { key: "tag", get: function() { return "autoFilter"; } }]), i; }(v); x.exports = a; }, { "../base-xform": 31, "./filter-column-xform": 137 }], 137: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "prepare", value: function(n, o) { n.colId = o.index.toString(); } }, { key: "render", value: function(n, o) { return n.leafNode(this.tag, { colId: o.colId, hiddenButton: o.filterButton ? "0" : "1" }), !0; } }, { key: "parseOpen", value: function(n) { if (n.name === this.tag) { var o = n.attributes; return this.model = { filterButton: o.hiddenButton === "0" }, !0; } return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "filterColumn"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 138: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "prepare", value: function(n, o) { n.id = o.index + 1; } }, { key: "render", value: function(n, o) { return n.leafNode(this.tag, { id: o.id.toString(), name: o.name, totalsRowLabel: o.totalsRowLabel, totalsRowFunction: o.totalsRowFunction, dxfId: o.dxfId }), !0; } }, { key: "parseOpen", value: function(n) { if (n.name === this.tag) { var o = n.attributes; return this.model = { name: o.name, totalsRowLabel: o.totalsRowLabel, totalsRowFunction: o.totalsRowFunction, dxfId: o.dxfId }, !0; } return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "tableColumn"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 139: [function(e, x, _) { function u(a) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(t) { return typeof t; } : u = function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, u(a); } function m(a, r) { if (!(a instanceof r)) throw new TypeError("Cannot call a class as a function"); } function g(a, r) { for (var t = 0; t < r.length; t++) { var i = r[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, i.key, i); } } function b(a, r, t) { return r && g(a.prototype, r), t && g(a, t), a; } function w(a, r) { if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(r && r.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), r && f(a, r); } function f(a, r) { return f = Object.setPrototypeOf || function(i, n) { return i.__proto__ = n, i; }, f(a, r); } function y(a) { var r = d(); return function() { var i = s(a), n; if (r) { var o = s(this).constructor; n = Reflect.construct(i, arguments, o); } else n = i.apply(this, arguments); return h(this, n); }; } function h(a, r) { return r && (u(r) === "object" || typeof r == "function") ? r : l(a); } function l(a) { if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return a; } function d() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (a) { return !1; } } function s(a) { return s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, s(a); } var v = e("../base-xform"), c = /* @__PURE__ */ function(a) { w(t, a); var r = y(t); function t() { return m(this, t), r.apply(this, arguments); } return b(t, [{ key: "render", value: function(n, o) { return n.leafNode(this.tag, { name: o.theme ? o.theme : void 0, showFirstColumn: o.showFirstColumn ? "1" : "0", showLastColumn: o.showLastColumn ? "1" : "0", showRowStripes: o.showRowStripes ? "1" : "0", showColumnStripes: o.showColumnStripes ? "1" : "0" }), !0; } }, { key: "parseOpen", value: function(n) { if (n.name === this.tag) { var o = n.attributes; return this.model = { theme: o.name ? o.name : null, showFirstColumn: o.showFirstColumn === "1", showLastColumn: o.showLastColumn === "1", showRowStripes: o.showRowStripes === "1", showColumnStripes: o.showColumnStripes === "1" }, !0; } return !1; } }, { key: "parseText", value: function() { } }, { key: "parseClose", value: function() { return !1; } }, { key: "tag", get: function() { return "tableStyleInfo"; } }]), t; }(v); x.exports = c; }, { "../base-xform": 31 }], 140: [function(e, x, _) { function u(P) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(z) { return typeof z; } : u = function(z) { return z && typeof Symbol == "function" && z.constructor === Symbol && z !== Symbol.prototype ? "symbol" : typeof z; }, u(P); } function m(P, F) { var z = Object.keys(P); if (Object.getOwnPropertySymbols) { var N = Object.getOwnPropertySymbols(P); F && (N = N.filter(function(M) { return Object.getOwnPropertyDescriptor(P, M).enumerable; })), z.push.apply(z, N); } return z; } function g(P) { for (var F = 1; F < arguments.length; F++) { var z = arguments[F] != null ? arguments[F] : {}; F % 2 ? m(Object(z), !0).forEach(function(N) { b(P, N, z[N]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(P, Object.getOwnPropertyDescriptors(z)) : m(Object(z)).forEach(function(N) { Object.defineProperty(P, N, Object.getOwnPropertyDescriptor(z, N)); }); } return P; } function b(P, F, z) { return F in P ? Object.defineProperty(P, F, { value: z, enumerable: !0, configurable: !0, writable: !0 }) : P[F] = z, P; } function w(P, F) { if (!(P instanceof F)) throw new TypeError("Cannot call a class as a function"); } function f(P, F) { for (var z = 0; z < F.length; z++) { var N = F[z]; N.enumerable = N.enumerable || !1, N.configurable = !0, "value" in N && (N.writable = !0), Object.defineProperty(P, N.key, N); } } function y(P, F, z) { return F && f(P.prototype, F), z && f(P, z), P; } function h(P, F) { if (typeof F != "function" && F !== null) throw new TypeError("Super expression must either be null or a function"); P.prototype = Object.create(F && F.prototype, { constructor: { value: P, writable: !0, configurable: !0 } }), F && l(P, F); } function l(P, F) { return l = Object.setPrototypeOf || function(N, M) { return N.__proto__ = M, N; }, l(P, F); } function d(P) { var F = c(); return function() { var N = a(P), M; if (F) { var I = a(this).constructor; M = Reflect.construct(N, arguments, I); } else M = N.apply(this, arguments); return s(this, M); }; } function s(P, F) { return F && (u(F) === "object" || typeof F == "function") ? F : v(P); } function v(P) { if (P === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return P; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (P) { return !1; } } function a(P) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(z) { return z.__proto__ || Object.getPrototypeOf(z); }, a(P); } var r = e("../../../utils/xml-stream"), t = e("../base-xform"), i = e("../list-xform"), n = e("./auto-filter-xform"), o = e("./table-column-xform"), p = e("./table-style-info-xform"), O = /* @__PURE__ */ function(P) { h(z, P); var F = d(z); function z() { var N; return w(this, z), N = F.call(this), N.map = { autoFilter: new n(), tableColumns: new i({ tag: "tableColumns", count: !0, empty: !0, childXform: new o() }), tableStyleInfo: new p() }, N; } return y(z, [{ key: "prepare", value: function(M, I) { this.map.autoFilter.prepare(M), this.map.tableColumns.prepare(M.columns, I); } }, { key: "render", value: function(M, I) { M.openXml(r.StdDocAttributes), M.openNode(this.tag, g(g({}, z.TABLE_ATTRIBUTES), {}, { id: I.id, name: I.name, displayName: I.displayName || I.name, ref: I.tableRef, totalsRowCount: I.totalsRow ? "1" : void 0, totalsRowShown: I.totalsRow ? void 0 : "1", headerRowCount: I.headerRow ? "1" : "0" })), this.map.autoFilter.render(M, I), this.map.tableColumns.render(M, I.columns), this.map.tableStyleInfo.render(M, I.style), M.closeNode(); } }, { key: "parseOpen", value: function(M) { if (this.parser) return this.parser.parseOpen(M), !0; var I = M.name, R = M.attributes; switch (I) { case this.tag: this.reset(), this.model = { name: R.name, displayName: R.displayName || R.name, tableRef: R.ref, totalsRow: R.totalsRowCount === "1", headerRow: R.headerRowCount === "1" }; break; default: this.parser = this.map[M.name], this.parser && this.parser.parseOpen(M); break; } return !0; } }, { key: "parseText", value: function(M) { this.parser && this.parser.parseText(M); } }, { key: "parseClose", value: function(M) { var I = this; if (this.parser) return this.parser.parseClose(M) || (this.parser = void 0), !0; switch (M) { case this.tag: return this.model.columns = this.map.tableColumns.model, this.map.autoFilter.model && (this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef, this.map.autoFilter.model.columns.forEach(function(R, C) { I.model.columns[C].filterButton = R.filterButton; })), this.model.style = this.map.tableStyleInfo.model, !1; default: return !0; } } }, { key: "reconcile", value: function(M, I) { M.columns.forEach(function(R) { R.dxfId !== void 0 && (R.style = I.styles.getDxfStyle(R.dxfId)); }); } }, { key: "tag", get: function() { return "table"; } }]), z; }(t); O.TABLE_ATTRIBUTES = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", "mc:Ignorable": "xr xr3", "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" // 'xr:uid': '{00000000-000C-0000-FFFF-FFFF00000000}', }, x.exports = O; }, { "../../../utils/xml-stream": 27, "../base-xform": 31, "../list-xform": 70, "./auto-filter-xform": 136, "./table-column-xform": 138, "./table-style-info-xform": 139 }], 141: [function(e, x, _) { (function(u, m) { function g(W, U, D, B, j, V, re) { try { var ee = W[V](re), ce = ee.value; } catch (ve) { D(ve); return; } ee.done ? U(ce) : Promise.resolve(ce).then(B, j); } function b(W) { return function() { var U = this, D = arguments; return new Promise(function(B, j) { var V = W.apply(U, D); function re(ce) { g(V, B, j, re, ee, "next", ce); } function ee(ce) { g(V, B, j, re, ee, "throw", ce); } re(void 0); }); }; } function w(W, U) { if (!(W instanceof U)) throw new TypeError("Cannot call a class as a function"); } function f(W, U) { for (var D = 0; D < U.length; D++) { var B = U[D]; B.enumerable = B.enumerable || !1, B.configurable = !0, "value" in B && (B.writable = !0), Object.defineProperty(W, B.key, B); } } function y(W, U, D) { return U && f(W.prototype, U), D && f(W, D), W; } function h(W) { var U; if (typeof Symbol != "undefined" && (Symbol.asyncIterator && (U = W[Symbol.asyncIterator], U != null) || Symbol.iterator && (U = W[Symbol.iterator], U != null))) return U.call(W); throw new TypeError("Object is not async iterable"); } var l = e("fs"), d = e("jszip"), s = e("readable-stream"), v = s.PassThrough, c = e("../utils/zip-stream"), a = e("../utils/stream-buf"), r = e("../utils/utils"), t = e("../utils/xml-stream"), i = e("../utils/browser-buffer-decode"), n = i.bufferToString, o = e("./xform/style/styles-xform"), p = e("./xform/core/core-xform"), O = e("./xform/strings/shared-strings-xform"), P = e("./xform/core/relationships-xform"), F = e("./xform/core/content-types-xform"), z = e("./xform/core/app-xform"), N = e("./xform/book/workbook-xform"), M = e("./xform/sheet/worksheet-xform"), I = e("./xform/drawing/drawing-xform"), R = e("./xform/table/table-xform"), C = e("./xform/comment/comments-xform"), E = e("./xform/comment/vml-notes-xform"), A = e("./xml/theme1.js"); function L(W, U) { return new Promise(function(D, B) { l.readFile(W, U, function(j, V) { j ? B(j) : D(V); }); }); } var $ = /* @__PURE__ */ function() { function W(U) { w(this, W), this.workbook = U; } return y(W, [{ key: "readFile", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee; return regeneratorRuntime.wrap(function(ve) { for (; ; ) switch (ve.prev = ve.next) { case 0: return ve.next = 2, r.fs.exists(j); case 2: if (ve.sent) { ve.next = 4; break; } throw new Error("File not found: ".concat(j)); case 4: return re = l.createReadStream(j), ve.prev = 5, ve.next = 8, this.read(re, V); case 8: return ee = ve.sent, re.close(), ve.abrupt("return", ee); case 13: throw ve.prev = 13, ve.t0 = ve.catch(5), re.close(), ve.t0; case 17: case "end": return ve.stop(); } }, B, this, [[5, 13]]); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "parseRels", value: function(D) { var B = new P(); return B.parseStream(D); } }, { key: "parseWorkbook", value: function(D) { var B = new N(); return B.parseStream(D); } }, { key: "parseSharedStrings", value: function(D) { var B = new O(); return B.parseStream(D); } }, { key: "reconcile", value: function(D, B) { var j = new N(), V = new M(B), re = new I(), ee = new R(); j.reconcile(D); var ce = { media: D.media, mediaIndex: D.mediaIndex }; Object.keys(D.drawings).forEach(function(oe) { var J = D.drawings[oe], Q = D.drawingRels[oe]; Q && (ce.rels = Q.reduce(function(he, ke) { return he[ke.Id] = ke, he; }, {}), (J.anchors || []).forEach(function(he) { var ke = he.picture && he.picture.hyperlinks; ke && ce.rels[ke.rId] && (ke.hyperlink = ce.rels[ke.rId].Target, delete ke.rId); }), re.reconcile(J, ce)); }); var ve = { styles: D.styles }; Object.values(D.tables).forEach(function(oe) { ee.reconcile(oe, ve); }); var ge = { styles: D.styles, sharedStrings: D.sharedStrings, media: D.media, mediaIndex: D.mediaIndex, date1904: D.properties && D.properties.date1904, drawings: D.drawings, comments: D.comments, tables: D.tables, vmlDrawings: D.vmlDrawings }; D.worksheets.forEach(function(oe) { oe.relationships = D.worksheetRels[oe.sheetNo], V.reconcile(oe, ge); }), delete D.worksheetHash, delete D.worksheetRels, delete D.globalRels, delete D.sharedStrings, delete D.workbookRels, delete D.sheetDefs, delete D.styles, delete D.mediaIndex, delete D.drawings, delete D.drawingRels, delete D.vmlDrawings; } }, { key: "_processWorksheetEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re, ee, ce) { var ve, ge; return regeneratorRuntime.wrap(function(J) { for (; ; ) switch (J.prev = J.next) { case 0: return ve = new M(ee), J.next = 3, ve.parseStream(j); case 3: ge = J.sent, ge.sheetNo = re, V.worksheetHash[ce] = ge, V.worksheets.push(ge); case 7: case "end": return J.stop(); } }, B); })); function D(B, j, V, re, ee) { return U.apply(this, arguments); } return D; }() }, { key: "_processCommentEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new C(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.comments["../".concat(re, ".xml")] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processTableEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new R(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.tables["../tables/".concat(re, ".xml")] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processWorksheetRelsEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new P(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.worksheetRels[re] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processMediaEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce, ve; return regeneratorRuntime.wrap(function(oe) { for (; ; ) switch (oe.prev = oe.next) { case 0: if (ee = re.lastIndexOf("."), !(ee >= 1)) { oe.next = 6; break; } return ce = re.substr(ee + 1), ve = re.substr(0, ee), oe.next = 6, new Promise(function(J, Q) { var he = new a(); he.on("finish", function() { V.mediaIndex[re] = V.media.length, V.mediaIndex[ve] = V.media.length; var ke = { type: "image", name: ve, extension: ce, buffer: he.toBuffer() }; V.media.push(ke), J(); }), j.on("error", function(ke) { Q(ke); }), j.pipe(he); }); case 6: case "end": return oe.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processDrawingEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new I(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.drawings[re] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processDrawingRelsEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new P(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.drawingRels[re] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processVmlDrawingEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { var ee, ce; return regeneratorRuntime.wrap(function(ge) { for (; ; ) switch (ge.prev = ge.next) { case 0: return ee = new E(), ge.next = 3, ee.parseStream(j); case 3: ce = ge.sent, V.vmlDrawings["../drawings/".concat(re, ".vml")] = ce; case 5: case "end": return ge.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() }, { key: "_processThemeEntry", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V, re) { return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: return ce.next = 2, new Promise(function(ve, ge) { var oe = new a(); j.on("error", ge), oe.on("error", ge), oe.on("finish", function() { V.themes[re] = oe.read().toString(), ve(); }), j.pipe(oe); }); case 2: case "end": return ce.stop(); } }, B); })); function D(B, j, V) { return U.apply(this, arguments); } return D; }() /** * @deprecated since version 4.0. You should use `#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md */ }, { key: "createInputStream", value: function() { throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md"); } }, { key: "read", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee, ce, ve, ge, oe, J, Q; return regeneratorRuntime.wrap(function(ke) { for (; ; ) switch (ke.prev = ke.next) { case 0: !j[Symbol.asyncIterator] && j.pipe && (j = j.pipe(new v())), re = [], ee = !0, ce = !1, ke.prev = 4, ge = h(j); case 6: return ke.next = 8, ge.next(); case 8: return oe = ke.sent, ee = oe.done, ke.next = 12, oe.value; case 12: if (J = ke.sent, ee) { ke.next = 19; break; } Q = J, re.push(Q); case 16: ee = !0, ke.next = 6; break; case 19: ke.next = 25; break; case 21: ke.prev = 21, ke.t0 = ke.catch(4), ce = !0, ve = ke.t0; case 25: if (ke.prev = 25, ke.prev = 26, !(!ee && ge.return != null)) { ke.next = 30; break; } return ke.next = 30, ge.return(); case 30: if (ke.prev = 30, !ce) { ke.next = 33; break; } throw ve; case 33: return ke.finish(30); case 34: return ke.finish(25); case 35: return ke.abrupt("return", this.load(m.concat(re), V)); case 36: case "end": return ke.stop(); } }, B, this, [[4, 21, 25, 35], [26, , 30, 34]]); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "load", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee, ce, ve, ge, oe, J, Q, he, ke, ne, se, Ce, q, G, Y, fe; return regeneratorRuntime.wrap(function(_e) { for (; ; ) switch (_e.prev = _e.next) { case 0: return V && V.base64 ? re = m.from(j.toString(), "base64") : re = j, ee = { worksheets: [], worksheetHash: {}, worksheetRels: [], themes: {}, media: [], mediaIndex: {}, drawings: {}, drawingRels: {}, comments: {}, tables: {}, vmlDrawings: {} }, _e.next = 4, d.loadAsync(re); case 4: ce = _e.sent, ve = 0, ge = Object.values(ce.files); case 6: if (!(ve < ge.length)) { _e.next = 126; break; } if (oe = ge[ve], oe.dir) { _e.next = 123; break; } if (J = oe.name, J[0] === "/" && (J = J.substr(1)), Q = void 0, !(J.match(/xl\/media\//) || // themes are not parsed as stream J.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))) { _e.next = 21; break; } return Q = new v(), _e.t0 = Q, _e.next = 17, oe.async("nodebuffer"); case 17: _e.t1 = _e.sent, _e.t0.write.call(_e.t0, _e.t1), _e.next = 36; break; case 21: if (Q = new v({ writableObjectMode: !0, readableObjectMode: !0 }), he = void 0, !u.browser) { _e.next = 31; break; } return _e.t2 = n, _e.next = 27, oe.async("nodebuffer"); case 27: _e.t3 = _e.sent, he = (0, _e.t2)(_e.t3), _e.next = 34; break; case 31: return _e.next = 33, oe.async("string"); case 33: he = _e.sent; case 34: for (ke = 16384, ne = 0; ne < he.length; ne += ke) Q.write(he.substring(ne, ne + ke)); case 36: Q.end(), _e.t4 = J, _e.next = _e.t4 === "_rels/.rels" ? 40 : _e.t4 === "xl/workbook.xml" ? 44 : _e.t4 === "xl/_rels/workbook.xml.rels" ? 53 : _e.t4 === "xl/sharedStrings.xml" ? 57 : _e.t4 === "xl/styles.xml" ? 61 : _e.t4 === "docProps/app.xml" ? 65 : _e.t4 === "docProps/core.xml" ? 72 : 78; break; case 40: return _e.next = 42, this.parseRels(Q); case 42: return ee.globalRels = _e.sent, _e.abrupt("break", 123); case 44: return _e.next = 46, this.parseWorkbook(Q); case 46: return se = _e.sent, ee.sheets = se.sheets, ee.definedNames = se.definedNames, ee.views = se.views, ee.properties = se.properties, ee.calcProperties = se.calcProperties, _e.abrupt("break", 123); case 53: return _e.next = 55, this.parseRels(Q); case 55: return ee.workbookRels = _e.sent, _e.abrupt("break", 123); case 57: return ee.sharedStrings = new O(), _e.next = 60, ee.sharedStrings.parseStream(Q); case 60: return _e.abrupt("break", 123); case 61: return ee.styles = new o(), _e.next = 64, ee.styles.parseStream(Q); case 64: return _e.abrupt("break", 123); case 65: return Ce = new z(), _e.next = 68, Ce.parseStream(Q); case 68: return q = _e.sent, ee.company = q.company, ee.manager = q.manager, _e.abrupt("break", 123); case 72: return G = new p(), _e.next = 75, G.parseStream(Q); case 75: return Y = _e.sent, Object.assign(ee, Y), _e.abrupt("break", 123); case 78: if (fe = J.match(/xl\/worksheets\/sheet(\d+)[.]xml/), !fe) { _e.next = 83; break; } return _e.next = 82, this._processWorksheetEntry(Q, ee, fe[1], V, J); case 82: return _e.abrupt("break", 123); case 83: if (fe = J.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/), !fe) { _e.next = 88; break; } return _e.next = 87, this._processWorksheetRelsEntry(Q, ee, fe[1]); case 87: return _e.abrupt("break", 123); case 88: if (fe = J.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/), !fe) { _e.next = 93; break; } return _e.next = 92, this._processThemeEntry(Q, ee, fe[1]); case 92: return _e.abrupt("break", 123); case 93: if (fe = J.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/), !fe) { _e.next = 98; break; } return _e.next = 97, this._processMediaEntry(Q, ee, fe[1]); case 97: return _e.abrupt("break", 123); case 98: if (fe = J.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/), !fe) { _e.next = 103; break; } return _e.next = 102, this._processDrawingEntry(Q, ee, fe[1]); case 102: return _e.abrupt("break", 123); case 103: if (fe = J.match(/xl\/(comments\d+)[.]xml/), !fe) { _e.next = 108; break; } return _e.next = 107, this._processCommentEntry(Q, ee, fe[1]); case 107: return _e.abrupt("break", 123); case 108: if (fe = J.match(/xl\/tables\/(table\d+)[.]xml/), !fe) { _e.next = 113; break; } return _e.next = 112, this._processTableEntry(Q, ee, fe[1]); case 112: return _e.abrupt("break", 123); case 113: if (fe = J.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/), !fe) { _e.next = 118; break; } return _e.next = 117, this._processDrawingRelsEntry(Q, ee, fe[1]); case 117: return _e.abrupt("break", 123); case 118: if (fe = J.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/), !fe) { _e.next = 123; break; } return _e.next = 122, this._processVmlDrawingEntry(Q, ee, fe[1]); case 122: return _e.abrupt("break", 123); case 123: ve++, _e.next = 6; break; case 126: return this.reconcile(ee, V), this.workbook.model = ee, _e.abrupt("return", this.workbook); case 129: case "end": return _e.stop(); } }, B, this); })); function D(B, j) { return U.apply(this, arguments); } return D; }() // ========================================================================= // Write }, { key: "addMedia", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { return regeneratorRuntime.wrap(function(ee) { for (; ; ) switch (ee.prev = ee.next) { case 0: return ee.next = 2, Promise.all(V.media.map(/* @__PURE__ */ function() { var ce = b(/* @__PURE__ */ regeneratorRuntime.mark(function ve(ge) { var oe, J, Q, he; return regeneratorRuntime.wrap(function(ne) { for (; ; ) switch (ne.prev = ne.next) { case 0: if (ge.type !== "image") { ne.next = 13; break; } if (oe = "xl/media/".concat(ge.name, ".").concat(ge.extension), !ge.filename) { ne.next = 7; break; } return ne.next = 5, L(ge.filename); case 5: return J = ne.sent, ne.abrupt("return", j.append(J, { name: oe })); case 7: if (!ge.buffer) { ne.next = 9; break; } return ne.abrupt("return", j.append(ge.buffer, { name: oe })); case 9: if (!ge.base64) { ne.next = 13; break; } return Q = ge.base64, he = Q.substring(Q.indexOf(",") + 1), ne.abrupt("return", j.append(he, { name: oe, base64: !0 })); case 13: throw new Error("Unsupported media"); case 14: case "end": return ne.stop(); } }, ve); })); return function(ve) { return ce.apply(this, arguments); }; }())); case 2: case "end": return ee.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addDrawings", value: function(D, B) { var j = new I(), V = new P(); B.worksheets.forEach(function(re) { var ee = re.drawing; if (ee) { j.prepare(ee, {}); var ce = j.toXml(ee); D.append(ce, { name: "xl/drawings/".concat(ee.name, ".xml") }), ce = V.toXml(ee.rels), D.append(ce, { name: "xl/drawings/_rels/".concat(ee.name, ".xml.rels") }); } }); } }, { key: "addTables", value: function(D, B) { var j = new R(); B.worksheets.forEach(function(V) { var re = V.tables; re.forEach(function(ee) { j.prepare(ee, {}); var ce = j.toXml(ee); D.append(ce, { name: "xl/tables/".concat(ee.target) }); }); }); } }, { key: "addContentTypes", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee; return regeneratorRuntime.wrap(function(ve) { for (; ; ) switch (ve.prev = ve.next) { case 0: re = new F(), ee = re.toXml(V), j.append(ee, { name: "[Content_Types].xml" }); case 3: case "end": return ve.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addApp", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee; return regeneratorRuntime.wrap(function(ve) { for (; ; ) switch (ve.prev = ve.next) { case 0: re = new z(), ee = re.toXml(V), j.append(ee, { name: "docProps/app.xml" }); case 3: case "end": return ve.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addCore", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re; return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: re = new p(), j.append(re.toXml(V), { name: "docProps/core.xml" }); case 2: case "end": return ce.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addThemes", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re; return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: re = V.themes || { theme1: A }, Object.keys(re).forEach(function(ve) { var ge = re[ve], oe = "xl/theme/".concat(ve, ".xml"); j.append(ge, { name: oe }); }); case 2: case "end": return ce.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addOfficeRels", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j) { var V, re; return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: V = new P(), re = V.toXml([{ Id: "rId1", Type: W.RelType.OfficeDocument, Target: "xl/workbook.xml" }, { Id: "rId2", Type: W.RelType.CoreProperties, Target: "docProps/core.xml" }, { Id: "rId3", Type: W.RelType.ExtenderProperties, Target: "docProps/app.xml" }]), j.append(re, { name: "_rels/.rels" }); case 3: case "end": return ce.stop(); } }, B); })); function D(B) { return U.apply(this, arguments); } return D; }() }, { key: "addWorkbookRels", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee, ce, ve; return regeneratorRuntime.wrap(function(oe) { for (; ; ) switch (oe.prev = oe.next) { case 0: re = 1, ee = [{ Id: "rId".concat(re++), Type: W.RelType.Styles, Target: "styles.xml" }, { Id: "rId".concat(re++), Type: W.RelType.Theme, Target: "theme/theme1.xml" }], V.sharedStrings.count && ee.push({ Id: "rId".concat(re++), Type: W.RelType.SharedStrings, Target: "sharedStrings.xml" }), V.worksheets.forEach(function(J) { J.rId = "rId".concat(re++), ee.push({ Id: J.rId, Type: W.RelType.Worksheet, Target: "worksheets/sheet".concat(J.id, ".xml") }); }), ce = new P(), ve = ce.toXml(ee), j.append(ve, { name: "xl/_rels/workbook.xml.rels" }); case 7: case "end": return oe.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addSharedStrings", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { return regeneratorRuntime.wrap(function(ee) { for (; ; ) switch (ee.prev = ee.next) { case 0: V.sharedStrings && V.sharedStrings.count && j.append(V.sharedStrings.xml, { name: "xl/sharedStrings.xml" }); case 1: case "end": return ee.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addStyles", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re; return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: re = V.styles.xml, re && j.append(re, { name: "xl/styles.xml" }); case 2: case "end": return ce.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addWorkbook", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re; return regeneratorRuntime.wrap(function(ce) { for (; ; ) switch (ce.prev = ce.next) { case 0: re = new N(), j.append(re.toXml(V), { name: "xl/workbook.xml" }); case 2: case "end": return ce.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "addWorksheets", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee, ce, ve; return regeneratorRuntime.wrap(function(oe) { for (; ; ) switch (oe.prev = oe.next) { case 0: re = new M(), ee = new P(), ce = new C(), ve = new E(), V.worksheets.forEach(function(J) { var Q = new t(); re.render(Q, J), j.append(Q.xml, { name: "xl/worksheets/sheet".concat(J.id, ".xml") }), J.rels && J.rels.length && (Q = new t(), ee.render(Q, J.rels), j.append(Q.xml, { name: "xl/worksheets/_rels/sheet".concat(J.id, ".xml.rels") })), J.comments.length > 0 && (Q = new t(), ce.render(Q, J), j.append(Q.xml, { name: "xl/comments".concat(J.id, ".xml") }), Q = new t(), ve.render(Q, J), j.append(Q.xml, { name: "xl/drawings/vmlDrawing".concat(J.id, ".vml") })); }); case 5: case "end": return oe.stop(); } }, B); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "_finalize", value: function(D) { var B = this; return new Promise(function(j, V) { D.on("finish", function() { j(B); }), D.on("error", V), D.finalize(); }); } }, { key: "prepareModel", value: function(D, B) { D.creator = D.creator || "ExcelJS", D.lastModifiedBy = D.lastModifiedBy || "ExcelJS", D.created = D.created || /* @__PURE__ */ new Date(), D.modified = D.modified || /* @__PURE__ */ new Date(), D.useSharedStrings = B.useSharedStrings !== void 0 ? B.useSharedStrings : !0, D.useStyles = B.useStyles !== void 0 ? B.useStyles : !0, D.sharedStrings = new O(), D.styles = D.useStyles ? new o(!0) : new o.Mock(); var j = new N(), V = new M(); j.prepare(D); var re = { sharedStrings: D.sharedStrings, styles: D.styles, date1904: D.properties.date1904, drawingsCount: 0, media: D.media }; re.drawings = D.drawings = [], re.commentRefs = D.commentRefs = []; var ee = 0; D.tables = [], D.worksheets.forEach(function(ce) { ce.tables.forEach(function(ve) { ee++, ve.target = "table".concat(ee, ".xml"), ve.id = ee, D.tables.push(ve); }), V.prepare(ce, re); }); } }, { key: "write", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j, V) { var re, ee; return regeneratorRuntime.wrap(function(ve) { for (; ; ) switch (ve.prev = ve.next) { case 0: return V = V || {}, re = this.workbook.model, ee = new c.ZipWriter(V.zip), ee.pipe(j), this.prepareModel(re, V), ve.next = 7, this.addContentTypes(ee, re); case 7: return ve.next = 9, this.addOfficeRels(ee, re); case 9: return ve.next = 11, this.addWorkbookRels(ee, re); case 11: return ve.next = 13, this.addWorksheets(ee, re); case 13: return ve.next = 15, this.addSharedStrings(ee, re); case 15: return ve.next = 17, this.addDrawings(ee, re); case 17: return ve.next = 19, this.addTables(ee, re); case 19: return ve.next = 21, Promise.all([this.addThemes(ee, re), this.addStyles(ee, re)]); case 21: return ve.next = 23, this.addMedia(ee, re); case 23: return ve.next = 25, Promise.all([this.addApp(ee, re), this.addCore(ee, re)]); case 25: return ve.next = 27, this.addWorkbook(ee, re); case 27: return ve.abrupt("return", this._finalize(ee)); case 28: case "end": return ve.stop(); } }, B, this); })); function D(B, j) { return U.apply(this, arguments); } return D; }() }, { key: "writeFile", value: function(D, B) { var j = this, V = l.createWriteStream(D); return new Promise(function(re, ee) { V.on("finish", function() { re(); }), V.on("error", function(ce) { ee(ce); }), j.write(V, B).then(function() { V.end(); }); }); } }, { key: "writeBuffer", value: function() { var U = b(/* @__PURE__ */ regeneratorRuntime.mark(function B(j) { var V; return regeneratorRuntime.wrap(function(ee) { for (; ; ) switch (ee.prev = ee.next) { case 0: return V = new a(), ee.next = 3, this.write(V, j); case 3: return ee.abrupt("return", V.read()); case 4: case "end": return ee.stop(); } }, B, this); })); function D(B) { return U.apply(this, arguments); } return D; }() }]), W; }(); $.RelType = e("./rel-type"), x.exports = $; }).call(this, e("_process"), e("buffer").Buffer); }, { "../utils/browser-buffer-decode": 16, "../utils/stream-buf": 23, "../utils/utils": 26, "../utils/xml-stream": 27, "../utils/zip-stream": 28, "./rel-type": 30, "./xform/book/workbook-xform": 37, "./xform/comment/comments-xform": 39, "./xform/comment/vml-notes-xform": 44, "./xform/core/app-xform": 50, "./xform/core/content-types-xform": 51, "./xform/core/core-xform": 52, "./xform/core/relationships-xform": 54, "./xform/drawing/drawing-xform": 61, "./xform/sheet/worksheet-xform": 114, "./xform/strings/shared-strings-xform": 123, "./xform/style/styles-xform": 134, "./xform/table/table-xform": 140, "./xml/theme1.js": 142, _process: 467, buffer: 216, fs: 215, jszip: 399, "readable-stream": 491 }], 142: [function(e, x, _) { x.exports = ` `; }, {}], 143: [function(e, x, _) { (function(u) { function m(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(n) { return typeof n; } : m = function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, m(t); } function g(t, i) { if (!(t instanceof i)) throw new TypeError("Cannot call a class as a function"); } function b(t, i) { for (var n = 0; n < i.length; n++) { var o = i[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function w(t, i, n) { return i && b(t.prototype, i), n && b(t, n), t; } function f(t, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(i && i.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), i && y(t, i); } function y(t, i) { return y = Object.setPrototypeOf || function(o, p) { return o.__proto__ = p, o; }, y(t, i); } function h(t) { var i = s(); return function() { var o = v(t), p; if (i) { var O = v(this).constructor; p = Reflect.construct(o, arguments, O); } else p = o.apply(this, arguments); return l(this, p); }; } function l(t, i) { return i && (m(i) === "object" || typeof i == "function") ? i : d(t); } function d(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function s() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (t) { return !1; } } function v(t) { return v = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, v(t); } Object.defineProperty(_, "__esModule", { value: !0 }), _.CsvFormatterStream = void 0; var c = e("stream"), a = e("./formatter"), r = /* @__PURE__ */ function(t) { f(n, t); var i = h(n); function n(o) { var p; return g(this, n), p = i.call(this, { writableObjectMode: o.objectMode }), p.hasWrittenBOM = !1, p.formatterOptions = o, p.rowFormatter = new a.RowFormatter(o), p.hasWrittenBOM = !o.writeBOM, p; } return w(n, [{ key: "transform", value: function(p) { return this.rowFormatter.rowTransform = p, this; } }, { key: "_transform", value: function(p, O, P) { var F = this, z = !1; try { this.hasWrittenBOM || (this.push(this.formatterOptions.BOM), this.hasWrittenBOM = !0), this.rowFormatter.format(p, function(N, M) { return N ? (z = !0, P(N)) : (M && M.forEach(function(I) { F.push(u.from(I, "utf8")); }), z = !0, P()); }); } catch (N) { if (z) throw N; P(N); } } }, { key: "_flush", value: function(p) { var O = this; this.rowFormatter.finish(function(P, F) { return P ? p(P) : (F && F.forEach(function(z) { O.push(u.from(z, "utf8")); }), p()); }); } }]), n; }(c.Transform); _.CsvFormatterStream = r; }).call(this, e("buffer").Buffer); }, { "./formatter": 147, buffer: 216, stream: 506 }], 144: [function(e, x, _) { function u(g, b) { if (!(g instanceof b)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(_, "__esModule", { value: !0 }), _.FormatterOptions = void 0; var m = function g() { var b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; u(this, g); var w; this.objectMode = !0, this.delimiter = ",", this.rowDelimiter = ` `, this.quote = '"', this.escape = this.quote, this.quoteColumns = !1, this.quoteHeaders = this.quoteColumns, this.headers = null, this.includeEndRowDelimiter = !1, this.writeBOM = !1, this.BOM = "\uFEFF", this.alwaysWriteHeaders = !1, Object.assign(this, b || {}), typeof (b == null ? void 0 : b.quoteHeaders) == "undefined" && (this.quoteHeaders = this.quoteColumns), (b == null ? void 0 : b.quote) === !0 ? this.quote = '"' : (b == null ? void 0 : b.quote) === !1 && (this.quote = ""), typeof (b == null ? void 0 : b.escape) != "string" && (this.escape = this.quote), this.shouldWriteHeaders = !!this.headers && ((w = b.writeHeaders) !== null && w !== void 0 ? w : !0), this.headers = Array.isArray(this.headers) ? this.headers : null, this.escapedQuote = "".concat(this.escape).concat(this.quote); }; _.FormatterOptions = m; }, {}], 145: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } var b = function(l) { return l && l.__esModule ? l : { default: l }; }; Object.defineProperty(_, "__esModule", { value: !0 }), _.FieldFormatter = void 0; var w = b(e("lodash.isboolean")), f = b(e("lodash.isnil")), y = b(e("lodash.escaperegexp")), h = /* @__PURE__ */ function() { function l(d) { u(this, l), this._headers = null, this.formatterOptions = d, d.headers !== null && (this.headers = d.headers), this.REPLACE_REGEXP = new RegExp(d.quote, "g"); var s = "[".concat(d.delimiter).concat(y.default(d.rowDelimiter), `|\r| ']`); this.ESCAPE_REGEXP = new RegExp(s); } return g(l, [{ key: "shouldQuote", value: function(s, v) { var c = v ? this.formatterOptions.quoteHeaders : this.formatterOptions.quoteColumns; return w.default(c) ? c : Array.isArray(c) ? c[s] : this._headers !== null ? c[this._headers[s]] : !1; } }, { key: "format", value: function(s, v, c) { var a = "".concat(f.default(s) ? "" : s).replace(/\0/g, ""), r = this.formatterOptions; if (r.quote !== "") { var t = a.indexOf(r.quote) !== -1; if (t) return this.quoteField(a.replace(this.REPLACE_REGEXP, r.escapedQuote)); } var i = a.search(this.ESCAPE_REGEXP) !== -1; return i || this.shouldQuote(v, c) ? this.quoteField(a) : a; } }, { key: "quoteField", value: function(s) { var v = this.formatterOptions.quote; return "".concat(v).concat(s).concat(v); } }, { key: "headers", set: function(s) { this._headers = s; } }]), l; }(); _.FieldFormatter = h; }, { "lodash.escaperegexp": 426, "lodash.isboolean": 428, "lodash.isnil": 431 }], 146: [function(e, x, _) { function u(d, s) { if (!(d instanceof s)) throw new TypeError("Cannot call a class as a function"); } function m(d, s) { for (var v = 0; v < s.length; v++) { var c = s[v]; c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(d, c.key, c); } } function g(d, s, v) { return s && m(d.prototype, s), v && m(d, v), d; } var b = function(d) { return d && d.__esModule ? d : { default: d }; }; Object.defineProperty(_, "__esModule", { value: !0 }), _.RowFormatter = void 0; var w = b(e("lodash.isfunction")), f = b(e("lodash.isequal")), y = e("./FieldFormatter"), h = e("../types"), l = /* @__PURE__ */ function() { function d(s) { u(this, d), this.rowCount = 0, this.formatterOptions = s, this.fieldFormatter = new y.FieldFormatter(s), this.headers = s.headers, this.shouldWriteHeaders = s.shouldWriteHeaders, this.hasWrittenHeaders = !1, this.headers !== null && (this.fieldFormatter.headers = this.headers), s.transform && (this.rowTransform = s.transform); } return g(d, [{ key: "format", value: function(v, c) { var a = this; this.callTransformer(v, function(r, t) { if (r) return c(r); if (!v) return c(null); var i = []; if (t) { var n = a.checkHeaders(t), o = n.shouldFormatColumns, p = n.headers; if (a.shouldWriteHeaders && p && !a.hasWrittenHeaders && (i.push(a.formatColumns(p, !0)), a.hasWrittenHeaders = !0), o) { var O = a.gatherColumns(t); i.push(a.formatColumns(O, !1)); } } return c(null, i); }); } }, { key: "finish", value: function(v) { var c = []; if (this.formatterOptions.alwaysWriteHeaders && this.rowCount === 0) { if (!this.headers) return v(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided.")); c.push(this.formatColumns(this.headers, !0)); } return this.formatterOptions.includeEndRowDelimiter && c.push(this.formatterOptions.rowDelimiter), v(null, c); } // check if we need to write header return true if we should also write a row // could be false if headers is true and the header row(first item) is passed in }, { key: "checkHeaders", value: function(v) { if (this.headers) return { shouldFormatColumns: !0, headers: this.headers }; var c = d.gatherHeaders(v); return this.headers = c, this.fieldFormatter.headers = c, this.shouldWriteHeaders ? { shouldFormatColumns: !f.default(c, v), headers: c } : { shouldFormatColumns: !0, headers: null }; } // todo change this method to unknown[] }, { key: "gatherColumns", value: function(v) { if (this.headers === null) throw new Error("Headers is currently null"); return Array.isArray(v) ? d.isHashArray(v) ? this.headers.map(function(c, a) { var r = v[a]; return r ? r[1] : ""; }) : this.headers.map(function(c, a) { return v[a]; }) : this.headers.map(function(c) { return v[c]; }); } }, { key: "callTransformer", value: function(v, c) { return this._rowTransform ? this._rowTransform(v, c) : c(null, v); } }, { key: "formatColumns", value: function(v, c) { var a = this, r = v.map(function(i, n) { return a.fieldFormatter.format(i, n, c); }).join(this.formatterOptions.delimiter), t = this.rowCount; return this.rowCount += 1, t ? [this.formatterOptions.rowDelimiter, r].join("") : r; } }, { key: "rowTransform", set: function(v) { if (!w.default(v)) throw new TypeError("The transform should be a function"); this._rowTransform = d.createTransform(v); } }], [{ key: "isHashArray", value: function(v) { return Array.isArray(v) ? Array.isArray(v[0]) && v[0].length === 2 : !1; } // get headers from a row item }, { key: "gatherHeaders", value: function(v) { return d.isHashArray(v) ? v.map(function(c) { return c[0]; }) : Array.isArray(v) ? v : Object.keys(v); } }, { key: "createTransform", value: function(v) { return h.isSyncTransform(v) ? function(c, a) { var r = null; try { r = v(c); } catch (t) { return a(t); } return a(null, r); } : function(c, a) { v(c, a); }; } }]), d; }(); _.RowFormatter = l; }, { "../types": 149, "./FieldFormatter": 145, "lodash.isequal": 429, "lodash.isfunction": 430 }], 147: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }); var u = e("./RowFormatter"); Object.defineProperty(_, "RowFormatter", { enumerable: !0, get: function() { return u.RowFormatter; } }); var m = e("./FieldFormatter"); Object.defineProperty(_, "FieldFormatter", { enumerable: !0, get: function() { return m.FieldFormatter; } }); }, { "./FieldFormatter": 145, "./RowFormatter": 146 }], 148: [function(e, x, _) { (function(u) { var m = Object.create ? function(c, a, r, t) { t === void 0 && (t = r), Object.defineProperty(c, t, { enumerable: !0, get: function() { return a[r]; } }); } : function(c, a, r, t) { t === void 0 && (t = r), c[t] = a[r]; }, g = Object.create ? function(c, a) { Object.defineProperty(c, "default", { enumerable: !0, value: a }); } : function(c, a) { c.default = a; }, b = function(c) { if (c && c.__esModule) return c; var a = {}; if (c != null) for (var r in c) r !== "default" && Object.hasOwnProperty.call(c, r) && m(a, c, r); return g(a, c), a; }, w = function(c, a) { for (var r in c) r !== "default" && !a.hasOwnProperty(r) && m(a, c, r); }; Object.defineProperty(_, "__esModule", { value: !0 }), _.writeToPath = _.writeToString = _.writeToBuffer = _.writeToStream = _.write = _.format = void 0; var f = e("util"), y = e("stream"), h = b(e("fs")), l = e("./FormatterOptions"), d = e("./CsvFormatterStream"); w(e("./types"), _); var s = e("./CsvFormatterStream"); Object.defineProperty(_, "CsvFormatterStream", { enumerable: !0, get: function() { return s.CsvFormatterStream; } }); var v = e("./FormatterOptions"); Object.defineProperty(_, "FormatterOptions", { enumerable: !0, get: function() { return v.FormatterOptions; } }), _.format = function(c) { return new d.CsvFormatterStream(new l.FormatterOptions(c)); }, _.write = function(c, a) { var r = _.format(a), t = f.promisify(function(i, n) { r.write(i, void 0, n); }); return c.reduce(function(i, n) { return i.then(function() { return t(n); }); }, Promise.resolve()).then(function() { return r.end(); }).catch(function(i) { r.emit("error", i); }), r; }, _.writeToStream = function(c, a, r) { return _.write(a, r).pipe(c); }, _.writeToBuffer = function(c) { var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], t = new y.Writable({ write: function(n, o, p) { r.push(n), p(); } }); return new Promise(function(i, n) { t.on("error", n).on("finish", function() { return i(u.concat(r)); }), _.write(c, a).pipe(t); }); }, _.writeToString = function(c, a) { return _.writeToBuffer(c, a).then(function(r) { return r.toString(); }); }, _.writeToPath = function(c, a, r) { var t = h.createWriteStream(c, { encoding: "utf8" }); return _.write(a, r).pipe(t); }; }).call(this, e("buffer").Buffer); }, { "./CsvFormatterStream": 143, "./FormatterOptions": 144, "./types": 149, buffer: 216, fs: 215, stream: 506, util: 525 }], 149: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.isSyncTransform = void 0, _.isSyncTransform = function(u) { return u.length === 1; }; }, {}], 150: [function(e, x, _) { (function(u) { function m(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(P) { return typeof P; } : m = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, m(p); } function g(p, O) { if (!(p instanceof O)) throw new TypeError("Cannot call a class as a function"); } function b(p, O) { for (var P = 0; P < O.length; P++) { var F = O[P]; F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(p, F.key, F); } } function w(p, O, P) { return O && b(p.prototype, O), P && b(p, P), p; } function f(p, O, P) { return typeof Reflect != "undefined" && Reflect.get ? f = Reflect.get : f = function(z, N, M) { var I = y(z, N); if (I) { var R = Object.getOwnPropertyDescriptor(I, N); return R.get ? R.get.call(M) : R.value; } }, f(p, O, P || p); } function y(p, O) { for (; !Object.prototype.hasOwnProperty.call(p, O) && (p = a(p), p !== null); ) ; return p; } function h(p, O) { if (typeof O != "function" && O !== null) throw new TypeError("Super expression must either be null or a function"); p.prototype = Object.create(O && O.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), O && l(p, O); } function l(p, O) { return l = Object.setPrototypeOf || function(F, z) { return F.__proto__ = z, F; }, l(p, O); } function d(p) { var O = c(); return function() { var F = a(p), z; if (O) { var N = a(this).constructor; z = Reflect.construct(F, arguments, N); } else z = F.apply(this, arguments); return s(this, z); }; } function s(p, O) { return O && (m(O) === "object" || typeof O == "function") ? O : v(p); } function v(p) { if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return p; } function c() { if (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() { })), !0; } catch (p) { return !1; } } function a(p) { return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(P) { return P.__proto__ || Object.getPrototypeOf(P); }, a(p); } Object.defineProperty(_, "__esModule", { value: !0 }), _.CsvParserStream = void 0; var r = e("string_decoder"), t = e("stream"), i = e("./transforms"), n = e("./parser"), o = /* @__PURE__ */ function(p) { h(P, p); var O = d(P); function P(F) { var z; return g(this, P), z = O.call(this, { objectMode: F.objectMode }), z.lines = "", z.rowCount = 0, z.parsedRowCount = 0, z.parsedLineCount = 0, z.endEmitted = !1, z.headersEmitted = !1, z.parserOptions = F, z.parser = new n.Parser(F), z.headerTransformer = new i.HeaderTransformer(F), z.decoder = new r.StringDecoder(F.encoding), z.rowTransformerValidator = new i.RowTransformerValidator(), z; } return w(P, [{ key: "transform", value: function(z) { return this.rowTransformerValidator.rowTransform = z, this; } }, { key: "validate", value: function(z) { return this.rowTransformerValidator.rowValidator = z, this; } // eslint-disable-next-line @typescript-eslint/no-explicit-any }, { key: "emit", value: function(z) { var N; if (z === "end") return this.endEmitted || (this.endEmitted = !0, f(a(P.prototype), "emit", this).call(this, "end", this.rowCount)), !1; for (var M = arguments.length, I = new Array(M > 1 ? M - 1 : 0), R = 1; R < M; R++) I[R - 1] = arguments[R]; return (N = f(a(P.prototype), "emit", this)).call.apply(N, [this, z].concat(I)); } }, { key: "_transform", value: function(z, N, M) { if (this.hasHitRowLimit) return M(); try { var I = this.lines, R = I + this.decoder.write(z), C = this.parse(R, !0); return this.processRows(C, M); } catch (E) { return M(E); } } }, { key: "_flush", value: function(z) { if (this.hasHitRowLimit) return z(); try { var N = this.lines + this.decoder.end(), M = this.parse(N, !1); return this.processRows(M, z); } catch (I) { return z(I); } } }, { key: "parse", value: function(z, N) { if (!z) return []; var M = this.parser.parse(z, N), I = M.line, R = M.rows; return this.lines = I, R; } }, { key: "processRows", value: function(z, N) { var M = this, I = z.length, R = function C(E) { var A = function(U) { if (U) return N(U); if (E % 100 === 0) { u(function() { return C(E + 1); }); return; } return C(E + 1); }; if (M.checkAndEmitHeaders(), E >= I || M.hasHitRowLimit) return N(); if (M.parsedLineCount += 1, M.shouldSkipLine) return A(); var L = z[E]; M.rowCount += 1, M.parsedRowCount += 1; var $ = M.rowCount; return M.transformRow(L, function(W, U) { if (W) return M.rowCount -= 1, A(W); if (!U) return A(new Error("expected transform result")); if (!U.isValid) M.emit("data-invalid", U.row, $, U.reason); else if (U.row) return M.pushRow(U.row, A); return A(); }); }; R(0); } }, { key: "transformRow", value: function(z, N) { var M = this; try { this.headerTransformer.transform(z, function(I, R) { return I ? N(I) : R ? R.isValid ? R.row ? M.shouldEmitRows ? M.rowTransformerValidator.transformAndValidate(R.row, N) : M.skipRow(N) : (M.rowCount -= 1, M.parsedRowCount -= 1, N(null, { row: null, isValid: !0 })) : M.shouldEmitRows ? N(null, { isValid: !1, row: z }) : M.skipRow(N) : N(new Error("Expected result from header transform")); }); } catch (I) { N(I); } } }, { key: "checkAndEmitHeaders", value: function() { !this.headersEmitted && this.headerTransformer.headers && (this.headersEmitted = !0, this.emit("headers", this.headerTransformer.headers)); } }, { key: "skipRow", value: function(z) { return this.rowCount -= 1, z(null, { row: null, isValid: !0 }); } }, { key: "pushRow", value: function(z, N) { try { this.parserOptions.objectMode ? this.push(z) : this.push(JSON.stringify(z)), N(); } catch (M) { N(M); } } }, { key: "hasHitRowLimit", get: function() { return this.parserOptions.limitRows && this.rowCount >= this.parserOptions.maxRows; } }, { key: "shouldEmitRows", get: function() { return this.parsedRowCount > this.parserOptions.skipRows; } }, { key: "shouldSkipLine", get: function() { return this.parsedLineCount <= this.parserOptions.skipLines; } }]), P; }(t.Transform); _.CsvParserStream = o; }).call(this, e("timers").setImmediate); }, { "./parser": 162, "./transforms": 165, stream: 506, string_decoder: 520, timers: 521 }], 151: [function(e, x, _) { function u(f, y) { if (!(f instanceof y)) throw new TypeError("Cannot call a class as a function"); } var m = function(f) { return f && f.__esModule ? f : { default: f }; }; Object.defineProperty(_, "__esModule", { value: !0 }), _.ParserOptions = void 0; var g = m(e("lodash.escaperegexp")), b = m(e("lodash.isnil")), w = function f(y) { u(this, f); var h; if (this.objectMode = !0, this.delimiter = ",", this.ignoreEmpty = !1, this.quote = '"', this.escape = null, this.escapeChar = this.quote, this.comment = null, this.supportsComments = !1, this.ltrim = !1, this.rtrim = !1, this.trim = !1, this.headers = null, this.renameHeaders = !1, this.strictColumnHandling = !1, this.discardUnmappedColumns = !1, this.carriageReturn = "\r", this.encoding = "utf8", this.limitRows = !1, this.maxRows = 0, this.skipLines = 0, this.skipRows = 0, Object.assign(this, y || {}), this.delimiter.length > 1) throw new Error("delimiter option must be one character long"); this.escapedDelimiter = g.default(this.delimiter), this.escapeChar = (h = this.escape) !== null && h !== void 0 ? h : this.quote, this.supportsComments = !b.default(this.comment), this.NEXT_TOKEN_REGEXP = new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter, ")")), this.maxRows > 0 && (this.limitRows = !0); }; _.ParserOptions = w; }, { "lodash.escaperegexp": 426, "lodash.isnil": 431 }], 152: [function(e, x, _) { var u = Object.create ? function(s, v, c, a) { a === void 0 && (a = c), Object.defineProperty(s, a, { enumerable: !0, get: function() { return v[c]; } }); } : function(s, v, c, a) { a === void 0 && (a = c), s[a] = v[c]; }, m = Object.create ? function(s, v) { Object.defineProperty(s, "default", { enumerable: !0, value: v }); } : function(s, v) { s.default = v; }, g = function(s) { if (s && s.__esModule) return s; var v = {}; if (s != null) for (var c in s) c !== "default" && Object.hasOwnProperty.call(s, c) && u(v, s, c); return m(v, s), v; }, b = function(s, v) { for (var c in s) c !== "default" && !v.hasOwnProperty(c) && u(v, s, c); }; Object.defineProperty(_, "__esModule", { value: !0 }), _.parseString = _.parseFile = _.parseStream = _.parse = void 0; var w = g(e("fs")), f = e("stream"), y = e("./ParserOptions"), h = e("./CsvParserStream"); b(e("./types"), _); var l = e("./CsvParserStream"); Object.defineProperty(_, "CsvParserStream", { enumerable: !0, get: function() { return l.CsvParserStream; } }); var d = e("./ParserOptions"); Object.defineProperty(_, "ParserOptions", { enumerable: !0, get: function() { return d.ParserOptions; } }), _.parse = function(s) { return new h.CsvParserStream(new y.ParserOptions(s)); }, _.parseStream = function(s, v) { return s.pipe(new h.CsvParserStream(new y.ParserOptions(v))); }, _.parseFile = function(s) { var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return w.createReadStream(s).pipe(new h.CsvParserStream(new y.ParserOptions(v))); }, _.parseString = function(s, v) { var c = new f.Readable(); return c.push(s), c.push(null), c.pipe(new h.CsvParserStream(new y.ParserOptions(v))); }; }, { "./CsvParserStream": 150, "./ParserOptions": 151, "./types": 166, fs: 215, stream: 506 }], 153: [function(e, x, _) { function u(l, d) { if (!(l instanceof d)) throw new TypeError("Cannot call a class as a function"); } function m(l, d) { for (var s = 0; s < d.length; s++) { var v = d[s]; v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(l, v.key, v); } } function g(l, d, s) { return d && m(l.prototype, d), s && m(l, s), l; } Object.defineProperty(_, "__esModule", { value: !0 }), _.Parser = void 0; var b = e("./Scanner"), w = e("./RowParser"), f = e("./Token"), y = /^\s*(?:''|"")?\s*(?:,\s*(?:''|"")?\s*)*$/, h = /* @__PURE__ */ function() { function l(d) { u(this, l), this.parserOptions = d, this.rowParser = new w.RowParser(this.parserOptions); } return g(l, [{ key: "parse", value: function(s, v) { var c = new b.Scanner({ line: l.removeBOM(s), parserOptions: this.parserOptions, hasMoreData: v }); return this.parserOptions.supportsComments ? this.parseWithComments(c) : this.parseWithoutComments(c); } }, { key: "parseWithoutComments", value: function(s) { for (var v = [], c = !0; c; ) c = this.parseRow(s, v); return { line: s.line, rows: v }; } }, { key: "parseWithComments", value: function(s) { for (var v = this.parserOptions, c = [], a = s.nextCharacterToken; a !== null; a = s.nextCharacterToken) if (f.Token.isTokenComment(a, v)) { var r = s.advancePastLine(); if (r === null) return { line: s.lineFromCursor, rows: c }; if (!s.hasMoreCharacters) return { line: s.lineFromCursor, rows: c }; s.truncateToCursor(); } else if (!this.parseRow(s, c)) break; return { line: s.line, rows: c }; } }, { key: "parseRow", value: function(s, v) { var c = s.nextNonSpaceToken; if (!c) return !1; var a = this.rowParser.parse(s); return a === null ? !1 : (this.parserOptions.ignoreEmpty && y.test(a.join("")) || v.push(a), !0); } }], [{ key: "removeBOM", value: function(s) { return s && s.charCodeAt(0) === 65279 ? s.slice(1) : s; } }]), l; }(); _.Parser = h; }, { "./RowParser": 154, "./Scanner": 155, "./Token": 156 }], 154: [function(e, x, _) { function u(s, v) { if (!(s instanceof v)) throw new TypeError("Cannot call a class as a function"); } function m(s, v) { for (var c = 0; c < v.length; c++) { var a = v[c]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(s, a.key, a); } } function g(s, v, c) { return v && m(s.prototype, v), c && m(s, c), s; } Object.defineProperty(_, "__esModule", { value: !0 }), _.RowParser = void 0; var b = e("./column"), w = e("./Token"), f = w.Token, y = f.isTokenRowDelimiter, h = f.isTokenCarriageReturn, l = f.isTokenDelimiter, d = /* @__PURE__ */ function() { function s(v) { u(this, s), this.parserOptions = v, this.columnParser = new b.ColumnParser(v); } return g(s, [{ key: "parse", value: function(c) { for (var a = this.parserOptions, r = c.hasMoreData, t = c, i = [], n = this.getStartToken(t, i); n; ) { if (y(n)) return t.advancePastToken(n), !t.hasMoreCharacters && h(n, a) && r ? null : (t.truncateToCursor(), i); if (!this.shouldSkipColumnParse(t, n, i)) { var o = this.columnParser.parse(t); if (o === null) return null; i.push(o); } n = t.nextNonSpaceToken; } return r ? null : (t.truncateToCursor(), i); } }, { key: "getStartToken", value: function(c, a) { var r = c.nextNonSpaceToken; return r !== null && l(r, this.parserOptions) ? (a.push(""), c.nextNonSpaceToken) : r; } }, { key: "shouldSkipColumnParse", value: function(c, a, r) { var t = this.parserOptions; if (l(a, t)) { c.advancePastToken(a); var i = c.nextCharacterToken; if (!c.hasMoreCharacters || i !== null && y(i) || i !== null && l(i, t)) return r.push(""), !0; } return !1; } }]), s; }(); _.RowParser = d; }, { "./Token": 156, "./column": 161 }], 155: [function(e, x, _) { function u(y, h) { if (!(y instanceof h)) throw new TypeError("Cannot call a class as a function"); } function m(y, h) { for (var l = 0; l < h.length; l++) { var d = h[l]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(y, d.key, d); } } function g(y, h, l) { return h && m(y.prototype, h), l && m(y, l), y; } Object.defineProperty(_, "__esModule", { value: !0 }), _.Scanner = void 0; var b = e("./Token"), w = /((?:\r\n)|\n|\r)/, f = /* @__PURE__ */ function() { function y(h) { u(this, y), this.cursor = 0, this.line = h.line, this.lineLength = this.line.length, this.parserOptions = h.parserOptions, this.hasMoreData = h.hasMoreData, this.cursor = h.cursor || 0; } return g(y, [{ key: "advancePastLine", value: function() { var l = w.exec(this.lineFromCursor); return l ? (this.cursor += (l.index || 0) + l[0].length, this) : this.hasMoreData ? null : (this.cursor = this.lineLength, this); } }, { key: "advanceTo", value: function(l) { return this.cursor = l, this; } }, { key: "advanceToToken", value: function(l) { return this.cursor = l.startCursor, this; } }, { key: "advancePastToken", value: function(l) { return this.cursor = l.endCursor + 1, this; } }, { key: "truncateToCursor", value: function() { return this.line = this.lineFromCursor, this.lineLength = this.line.length, this.cursor = 0, this; } }, { key: "hasMoreCharacters", get: function() { return this.lineLength > this.cursor; } }, { key: "nextNonSpaceToken", get: function() { var l = this.lineFromCursor, d = this.parserOptions.NEXT_TOKEN_REGEXP; if (l.search(d) === -1) return null; var s = d.exec(l); if (s == null) return null; var v = s[1], c = this.cursor + (s.index || 0); return new b.Token({ token: v, startCursor: c, endCursor: c + v.length - 1 }); } }, { key: "nextCharacterToken", get: function() { var l = this.cursor, d = this.lineLength; return d <= l ? null : new b.Token({ token: this.line[l], startCursor: l, endCursor: l }); } }, { key: "lineFromCursor", get: function() { return this.line.substr(this.cursor); } }]), y; }(); _.Scanner = f; }, { "./Token": 156 }], 156: [function(e, x, _) { function u(w, f) { if (!(w instanceof f)) throw new TypeError("Cannot call a class as a function"); } function m(w, f) { for (var y = 0; y < f.length; y++) { var h = f[y]; h.enumerable = h.enumerable || !1, h.configurable = !0, "value" in h && (h.writable = !0), Object.defineProperty(w, h.key, h); } } function g(w, f, y) { return f && m(w.prototype, f), y && m(w, y), w; } Object.defineProperty(_, "__esModule", { value: !0 }), _.Token = void 0; var b = /* @__PURE__ */ function() { function w(f) { u(this, w), this.token = f.token, this.startCursor = f.startCursor, this.endCursor = f.endCursor; } return g(w, null, [{ key: "isTokenRowDelimiter", value: function(y) { var h = y.token; return h === "\r" || h === ` ` || h === `\r `; } }, { key: "isTokenCarriageReturn", value: function(y, h) { return y.token === h.carriageReturn; } }, { key: "isTokenComment", value: function(y, h) { return h.supportsComments && !!y && y.token === h.comment; } }, { key: "isTokenEscapeCharacter", value: function(y, h) { return y.token === h.escapeChar; } }, { key: "isTokenQuote", value: function(y, h) { return y.token === h.quote; } }, { key: "isTokenDelimiter", value: function(y, h) { return y.token === h.delimiter; } }]), w; }(); _.Token = b; }, {}], 157: [function(e, x, _) { function u(g, b) { if (!(g instanceof b)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(_, "__esModule", { value: !0 }), _.ColumnFormatter = void 0; var m = function g(b) { u(this, g), b.trim ? this.format = function(w) { return w.trim(); } : b.ltrim ? this.format = function(w) { return w.trimLeft(); } : b.rtrim ? this.format = function(w) { return w.trimRight(); } : this.format = function(w) { return w; }; }; _.ColumnFormatter = m; }, {}], 158: [function(e, x, _) { function u(h, l) { if (!(h instanceof l)) throw new TypeError("Cannot call a class as a function"); } function m(h, l) { for (var d = 0; d < l.length; d++) { var s = l[d]; s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(h, s.key, s); } } function g(h, l, d) { return l && m(h.prototype, l), d && m(h, d), h; } Object.defineProperty(_, "__esModule", { value: !0 }), _.ColumnParser = void 0; var b = e("./NonQuotedColumnParser"), w = e("./QuotedColumnParser"), f = e("../Token"), y = /* @__PURE__ */ function() { function h(l) { u(this, h), this.parserOptions = l, this.quotedColumnParser = new w.QuotedColumnParser(l), this.nonQuotedColumnParser = new b.NonQuotedColumnParser(l); } return g(h, [{ key: "parse", value: function(d) { var s = d.nextNonSpaceToken; return s !== null && f.Token.isTokenQuote(s, this.parserOptions) ? (d.advanceToToken(s), this.quotedColumnParser.parse(d)) : this.nonQuotedColumnParser.parse(d); } }]), h; }(); _.ColumnParser = y; }, { "../Token": 156, "./NonQuotedColumnParser": 159, "./QuotedColumnParser": 160 }], 159: [function(e, x, _) { function u(d, s) { if (!(d instanceof s)) throw new TypeError("Cannot call a class as a function"); } function m(d, s) { for (var v = 0; v < s.length; v++) { var c = s[v]; c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(d, c.key, c); } } function g(d, s, v) { return s && m(d.prototype, s), v && m(d, v), d; } Object.defineProperty(_, "__esModule", { value: !0 }), _.NonQuotedColumnParser = void 0; var b = e("./ColumnFormatter"), w = e("../Token"), f = w.Token, y = f.isTokenDelimiter, h = f.isTokenRowDelimiter, l = /* @__PURE__ */ function() { function d(s) { u(this, d), this.parserOptions = s, this.columnFormatter = new b.ColumnFormatter(s); } return g(d, [{ key: "parse", value: function(v) { if (!v.hasMoreCharacters) return null; for (var c = this.parserOptions, a = [], r = v.nextCharacterToken; r && !(y(r, c) || h(r)); r = v.nextCharacterToken) a.push(r.token), v.advancePastToken(r); return this.columnFormatter.format(a.join("")); } }]), d; }(); _.NonQuotedColumnParser = l; }, { "../Token": 156, "./ColumnFormatter": 157 }], 160: [function(e, x, _) { function u(v, c) { if (!(v instanceof c)) throw new TypeError("Cannot call a class as a function"); } function m(v, c) { for (var a = 0; a < c.length; a++) { var r = c[a]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(v, r.key, r); } } function g(v, c, a) { return c && m(v.prototype, c), a && m(v, a), v; } Object.defineProperty(_, "__esModule", { value: !0 }), _.QuotedColumnParser = void 0; var b = e("./ColumnFormatter"), w = e("../Token"), f = w.Token, y = f.isTokenDelimiter, h = f.isTokenRowDelimiter, l = f.isTokenEscapeCharacter, d = f.isTokenQuote, s = /* @__PURE__ */ function() { function v(c) { u(this, v), this.parserOptions = c, this.columnFormatter = new b.ColumnFormatter(c); } return g(v, [{ key: "parse", value: function(a) { if (!a.hasMoreCharacters) return null; var r = a.cursor, t = this.gatherDataBetweenQuotes(a), i = t.foundClosingQuote, n = t.col; if (!i) { if (a.advanceTo(r), !a.hasMoreData) throw new Error("Parse Error: missing closing: '".concat(this.parserOptions.quote || "", "' in line: at '").concat(a.lineFromCursor.replace(/[\r\n]/g, "\\n'"), "'")); return null; } return this.checkForMalformedColumn(a), n; } }, { key: "gatherDataBetweenQuotes", value: function(a) { for (var r = this.parserOptions, t = !1, i = !1, n = [], o = a.nextCharacterToken; !i && o !== null; o = a.nextCharacterToken) { var p = d(o, r); if (!t && p) t = !0; else if (t) if (l(o, r)) { a.advancePastToken(o); var O = a.nextCharacterToken; O !== null && (d(O, r) || l(O, r)) ? (n.push(O.token), o = O) : p ? i = !0 : n.push(o.token); } else p ? i = !0 : n.push(o.token); a.advancePastToken(o); } return { col: this.columnFormatter.format(n.join("")), foundClosingQuote: i }; } }, { key: "checkForMalformedColumn", value: function(a) { var r = this.parserOptions, t = a.nextNonSpaceToken; if (t) { var i = y(t, r), n = h(t); if (!(i || n)) { var o = a.lineFromCursor.substr(0, 10).replace(/[\r\n]/g, "\\n'"); throw new Error("Parse Error: expected: '".concat(r.escapedDelimiter, "' OR new line got: '").concat(t.token, "'. at '").concat(o)); } a.advanceToToken(t); } else a.hasMoreData || a.advancePastLine(); } }]), v; }(); _.QuotedColumnParser = s; }, { "../Token": 156, "./ColumnFormatter": 157 }], 161: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }); var u = e("./ColumnParser"); Object.defineProperty(_, "ColumnParser", { enumerable: !0, get: function() { return u.ColumnParser; } }); var m = e("./NonQuotedColumnParser"); Object.defineProperty(_, "NonQuotedColumnParser", { enumerable: !0, get: function() { return m.NonQuotedColumnParser; } }); var g = e("./QuotedColumnParser"); Object.defineProperty(_, "QuotedColumnParser", { enumerable: !0, get: function() { return g.QuotedColumnParser; } }); var b = e("./ColumnFormatter"); Object.defineProperty(_, "ColumnFormatter", { enumerable: !0, get: function() { return b.ColumnFormatter; } }); }, { "./ColumnFormatter": 157, "./ColumnParser": 158, "./NonQuotedColumnParser": 159, "./QuotedColumnParser": 160 }], 162: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }); var u = e("./Parser"); Object.defineProperty(_, "Parser", { enumerable: !0, get: function() { return u.Parser; } }); var m = e("./RowParser"); Object.defineProperty(_, "RowParser", { enumerable: !0, get: function() { return m.RowParser; } }); var g = e("./Scanner"); Object.defineProperty(_, "Scanner", { enumerable: !0, get: function() { return g.Scanner; } }); var b = e("./Token"); Object.defineProperty(_, "Token", { enumerable: !0, get: function() { return b.Token; } }); var w = e("./column"); Object.defineProperty(_, "ColumnParser", { enumerable: !0, get: function() { return w.ColumnParser; } }), Object.defineProperty(_, "NonQuotedColumnParser", { enumerable: !0, get: function() { return w.NonQuotedColumnParser; } }), Object.defineProperty(_, "QuotedColumnParser", { enumerable: !0, get: function() { return w.QuotedColumnParser; } }); }, { "./Parser": 153, "./RowParser": 154, "./Scanner": 155, "./Token": 156, "./column": 161 }], 163: [function(e, x, _) { function u(d, s) { if (!(d instanceof s)) throw new TypeError("Cannot call a class as a function"); } function m(d, s) { for (var v = 0; v < s.length; v++) { var c = s[v]; c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(d, c.key, c); } } function g(d, s, v) { return s && m(d.prototype, s), v && m(d, v), d; } var b = function(d) { return d && d.__esModule ? d : { default: d }; }; Object.defineProperty(_, "__esModule", { value: !0 }), _.HeaderTransformer = void 0; var w = b(e("lodash.isundefined")), f = b(e("lodash.isfunction")), y = b(e("lodash.uniq")), h = b(e("lodash.groupby")), l = /* @__PURE__ */ function() { function d(s) { u(this, d), this.headers = null, this.receivedHeaders = !1, this.shouldUseFirstRow = !1, this.processedFirstRow = !1, this.headersLength = 0, this.parserOptions = s, s.headers === !0 ? this.shouldUseFirstRow = !0 : Array.isArray(s.headers) ? this.setHeaders(s.headers) : f.default(s.headers) && (this.headersTransform = s.headers); } return g(d, [{ key: "transform", value: function(v, c) { return this.shouldMapRow(v) ? c(null, this.processRow(v)) : c(null, { row: null, isValid: !0 }); } }, { key: "shouldMapRow", value: function(v) { var c = this.parserOptions; if (!this.headersTransform && c.renameHeaders && !this.processedFirstRow) { if (!this.receivedHeaders) throw new Error("Error renaming headers: new headers must be provided in an array"); return this.processedFirstRow = !0, !1; } if (!this.receivedHeaders && Array.isArray(v)) { if (this.headersTransform) this.setHeaders(this.headersTransform(v)); else if (this.shouldUseFirstRow) this.setHeaders(v); else return !0; return !1; } return !0; } }, { key: "processRow", value: function(v) { if (!this.headers) return { row: v, isValid: !0 }; var c = this.parserOptions; if (!c.discardUnmappedColumns && v.length > this.headersLength) { if (!c.strictColumnHandling) throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength, " columns got: ").concat(v.length)); return { row: v, isValid: !1, reason: "Column header mismatch expected: ".concat(this.headersLength, " columns got: ").concat(v.length) }; } return c.strictColumnHandling && v.length < this.headersLength ? { row: v, isValid: !1, reason: "Column header mismatch expected: ".concat(this.headersLength, " columns got: ").concat(v.length) } : { row: this.mapHeaders(v), isValid: !0 }; } }, { key: "mapHeaders", value: function(v) { for (var c = {}, a = this.headers, r = this.headersLength, t = 0; t < r; t += 1) { var i = a[t]; if (!w.default(i)) { var n = v[t]; w.default(n) ? c[i] = "" : c[i] = n; } } return c; } }, { key: "setHeaders", value: function(v) { var c, a = v.filter(function(i) { return !!i; }); if (y.default(a).length !== a.length) { var r = h.default(a), t = Object.keys(r).filter(function(i) { return r[i].length > 1; }); throw new Error("Duplicate headers found ".concat(JSON.stringify(t))); } this.headers = v, this.receivedHeaders = !0, this.headersLength = ((c = this.headers) === null || c === void 0 ? void 0 : c.length) || 0; } }]), d; }(); _.HeaderTransformer = l; }, { "lodash.groupby": 427, "lodash.isfunction": 430, "lodash.isundefined": 432, "lodash.uniq": 433 }], 164: [function(e, x, _) { function u(h, l) { if (!(h instanceof l)) throw new TypeError("Cannot call a class as a function"); } function m(h, l) { for (var d = 0; d < l.length; d++) { var s = l[d]; s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(h, s.key, s); } } function g(h, l, d) { return l && m(h.prototype, l), d && m(h, d), h; } var b = function(h) { return h && h.__esModule ? h : { default: h }; }; Object.defineProperty(_, "__esModule", { value: !0 }), _.RowTransformerValidator = void 0; var w = b(e("lodash.isfunction")), f = e("../types"), y = /* @__PURE__ */ function() { function h() { u(this, h), this._rowTransform = null, this._rowValidator = null; } return g(h, [{ key: "transformAndValidate", value: function(d, s) { var v = this; return this.callTransformer(d, function(c, a) { return c ? s(c) : a ? v.callValidator(a, function(r, t) { return r ? s(r) : t && !t.isValid ? s(null, { row: a, isValid: !1, reason: t.reason }) : s(null, { row: a, isValid: !0 }); }) : s(null, { row: null, isValid: !0 }); }); } }, { key: "callTransformer", value: function(d, s) { return this._rowTransform ? this._rowTransform(d, s) : s(null, d); } }, { key: "callValidator", value: function(d, s) { return this._rowValidator ? this._rowValidator(d, s) : s(null, { row: d, isValid: !0 }); } }, { key: "rowTransform", set: function(d) { if (!w.default(d)) throw new TypeError("The transform should be a function"); this._rowTransform = h.createTransform(d); } }, { key: "rowValidator", set: function(d) { if (!w.default(d)) throw new TypeError("The validate should be a function"); this._rowValidator = h.createValidator(d); } }], [{ key: "createTransform", value: function(d) { return f.isSyncTransform(d) ? function(s, v) { var c = null; try { c = d(s); } catch (a) { return v(a); } return v(null, c); } : d; } }, { key: "createValidator", value: function(d) { return f.isSyncValidate(d) ? function(s, v) { v(null, { row: s, isValid: d(s) }); } : function(s, v) { d(s, function(c, a, r) { return c ? v(c) : a ? v(null, { row: s, isValid: a, reason: r }) : v(null, { row: s, isValid: !1, reason: r }); }); }; } }]), h; }(); _.RowTransformerValidator = y; }, { "../types": 166, "lodash.isfunction": 430 }], 165: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }); var u = e("./RowTransformerValidator"); Object.defineProperty(_, "RowTransformerValidator", { enumerable: !0, get: function() { return u.RowTransformerValidator; } }); var m = e("./HeaderTransformer"); Object.defineProperty(_, "HeaderTransformer", { enumerable: !0, get: function() { return m.HeaderTransformer; } }); }, { "./HeaderTransformer": 163, "./RowTransformerValidator": 164 }], 166: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.isSyncValidate = _.isSyncTransform = void 0, _.isSyncTransform = function(u) { return u.length === 1; }, _.isSyncValidate = function(u) { return u.length === 1; }; }, {}], 167: [function(e, x, _) { var u = _; u.bignum = e("bn.js"), u.define = e("./asn1/api").define, u.base = e("./asn1/base"), u.constants = e("./asn1/constants"), u.decoders = e("./asn1/decoders"), u.encoders = e("./asn1/encoders"); }, { "./asn1/api": 168, "./asn1/base": 170, "./asn1/constants": 174, "./asn1/decoders": 176, "./asn1/encoders": 179, "bn.js": 181 }], 168: [function(e, x, _) { var u = e("./encoders"), m = e("./decoders"), g = e("inherits"), b = _; b.define = function(y, h) { return new w(y, h); }; function w(f, y) { this.name = f, this.body = y, this.decoders = {}, this.encoders = {}; } w.prototype._createNamed = function(y) { var h = this.name; function l(d) { this._initNamed(d, h); } return g(l, y), l.prototype._initNamed = function(s, v) { y.call(this, s, v); }, new l(this); }, w.prototype._getDecoder = function(y) { return y = y || "der", this.decoders.hasOwnProperty(y) || (this.decoders[y] = this._createNamed(m[y])), this.decoders[y]; }, w.prototype.decode = function(y, h, l) { return this._getDecoder(h).decode(y, l); }, w.prototype._getEncoder = function(y) { return y = y || "der", this.encoders.hasOwnProperty(y) || (this.encoders[y] = this._createNamed(u[y])), this.encoders[y]; }, w.prototype.encode = function(y, h, l) { return this._getEncoder(h).encode(y, l); }; }, { "./decoders": 176, "./encoders": 179, inherits: 387 }], 169: [function(e, x, _) { function u(y) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(l) { return typeof l; } : u = function(l) { return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l; }, u(y); } var m = e("inherits"), g = e("../base/reporter").Reporter, b = e("safer-buffer").Buffer; function w(y, h) { if (g.call(this, h), !b.isBuffer(y)) { this.error("Input not Buffer"); return; } this.base = y, this.offset = 0, this.length = y.length; } m(w, g), _.DecoderBuffer = w, w.isDecoderBuffer = function(h) { if (h instanceof w) return !0; var l = u(h) === "object" && b.isBuffer(h.base) && h.constructor.name === "DecoderBuffer" && typeof h.offset == "number" && typeof h.length == "number" && typeof h.save == "function" && typeof h.restore == "function" && typeof h.isEmpty == "function" && typeof h.readUInt8 == "function" && typeof h.skip == "function" && typeof h.raw == "function"; return l; }, w.prototype.save = function() { return { offset: this.offset, reporter: g.prototype.save.call(this) }; }, w.prototype.restore = function(h) { var l = new w(this.base); return l.offset = h.offset, l.length = this.offset, this.offset = h.offset, g.prototype.restore.call(this, h.reporter), l; }, w.prototype.isEmpty = function() { return this.offset === this.length; }, w.prototype.readUInt8 = function(h) { return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(h || "DecoderBuffer overrun"); }, w.prototype.skip = function(h, l) { if (!(this.offset + h <= this.length)) return this.error(l || "DecoderBuffer overrun"); var d = new w(this.base); return d._reporterState = this._reporterState, d.offset = this.offset, d.length = this.offset + h, this.offset += h, d; }, w.prototype.raw = function(h) { return this.base.slice(h ? h.offset : this.offset, this.length); }; function f(y, h) { if (Array.isArray(y)) this.length = 0, this.value = y.map(function(l) { return f.isEncoderBuffer(l) || (l = new f(l, h)), this.length += l.length, l; }, this); else if (typeof y == "number") { if (!(0 <= y && y <= 255)) return h.error("non-byte EncoderBuffer value"); this.value = y, this.length = 1; } else if (typeof y == "string") this.value = y, this.length = b.byteLength(y); else if (b.isBuffer(y)) this.value = y, this.length = y.length; else return h.error("Unsupported type: " + u(y)); } _.EncoderBuffer = f, f.isEncoderBuffer = function(h) { if (h instanceof f) return !0; var l = u(h) === "object" && h.constructor.name === "EncoderBuffer" && typeof h.length == "number" && typeof h.join == "function"; return l; }, f.prototype.join = function(h, l) { return h || (h = b.alloc(this.length)), l || (l = 0), this.length === 0 || (Array.isArray(this.value) ? this.value.forEach(function(d) { d.join(h, l), l += d.length; }) : (typeof this.value == "number" ? h[l] = this.value : typeof this.value == "string" ? h.write(this.value, l) : b.isBuffer(this.value) && this.value.copy(h, l), l += this.length)), h; }; }, { "../base/reporter": 172, inherits: 387, "safer-buffer": 495 }], 170: [function(e, x, _) { var u = _; u.Reporter = e("./reporter").Reporter, u.DecoderBuffer = e("./buffer").DecoderBuffer, u.EncoderBuffer = e("./buffer").EncoderBuffer, u.Node = e("./node"); }, { "./buffer": 169, "./node": 171, "./reporter": 172 }], 171: [function(e, x, _) { function u(s) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(c) { return typeof c; } : u = function(c) { return c && typeof Symbol == "function" && c.constructor === Symbol && c !== Symbol.prototype ? "symbol" : typeof c; }, u(s); } var m = e("../base/reporter").Reporter, g = e("../base/buffer").EncoderBuffer, b = e("../base/buffer").DecoderBuffer, w = e("minimalistic-assert"), f = ["seq", "seqof", "set", "setof", "objid", "bool", "gentime", "utctime", "null_", "enum", "int", "objDesc", "bitstr", "bmpstr", "charstr", "genstr", "graphstr", "ia5str", "iso646str", "numstr", "octstr", "printstr", "t61str", "unistr", "utf8str", "videostr"], y = ["key", "obj", "use", "optional", "explicit", "implicit", "def", "choice", "any", "contains"].concat(f), h = ["_peekTag", "_decodeTag", "_use", "_decodeStr", "_decodeObjid", "_decodeTime", "_decodeNull", "_decodeInt", "_decodeBool", "_decodeList", "_encodeComposite", "_encodeStr", "_encodeObjid", "_encodeTime", "_encodeNull", "_encodeInt", "_encodeBool"]; function l(s, v, c) { var a = {}; this._baseState = a, a.name = c, a.enc = s, a.parent = v || null, a.children = null, a.tag = null, a.args = null, a.reverseArgs = null, a.choice = null, a.optional = !1, a.any = !1, a.obj = !1, a.use = null, a.useDecoder = null, a.key = null, a.default = null, a.explicit = null, a.implicit = null, a.contains = null, a.parent || (a.children = [], this._wrap()); } x.exports = l; var d = ["enc", "parent", "children", "tag", "args", "reverseArgs", "choice", "optional", "any", "obj", "use", "alteredUse", "key", "default", "explicit", "implicit", "contains"]; l.prototype.clone = function() { var v = this._baseState, c = {}; d.forEach(function(r) { c[r] = v[r]; }); var a = new this.constructor(c.parent); return a._baseState = c, a; }, l.prototype._wrap = function() { var v = this._baseState; y.forEach(function(c) { this[c] = function() { var r = new this.constructor(this); return v.children.push(r), r[c].apply(r, arguments); }; }, this); }, l.prototype._init = function(v) { var c = this._baseState; w(c.parent === null), v.call(this), c.children = c.children.filter(function(a) { return a._baseState.parent === this; }, this), w.equal(c.children.length, 1, "Root node can have only one child"); }, l.prototype._useArgs = function(v) { var c = this._baseState, a = v.filter(function(r) { return r instanceof this.constructor; }, this); v = v.filter(function(r) { return !(r instanceof this.constructor); }, this), a.length !== 0 && (w(c.children === null), c.children = a, a.forEach(function(r) { r._baseState.parent = this; }, this)), v.length !== 0 && (w(c.args === null), c.args = v, c.reverseArgs = v.map(function(r) { if (u(r) !== "object" || r.constructor !== Object) return r; var t = {}; return Object.keys(r).forEach(function(i) { i == (i | 0) && (i |= 0); var n = r[i]; t[n] = i; }), t; })); }, h.forEach(function(s) { l.prototype[s] = function() { var c = this._baseState; throw new Error(s + " not implemented for encoding: " + c.enc); }; }), f.forEach(function(s) { l.prototype[s] = function() { var c = this._baseState, a = Array.prototype.slice.call(arguments); return w(c.tag === null), c.tag = s, this._useArgs(a), this; }; }), l.prototype.use = function(v) { w(v); var c = this._baseState; return w(c.use === null), c.use = v, this; }, l.prototype.optional = function() { var v = this._baseState; return v.optional = !0, this; }, l.prototype.def = function(v) { var c = this._baseState; return w(c.default === null), c.default = v, c.optional = !0, this; }, l.prototype.explicit = function(v) { var c = this._baseState; return w(c.explicit === null && c.implicit === null), c.explicit = v, this; }, l.prototype.implicit = function(v) { var c = this._baseState; return w(c.explicit === null && c.implicit === null), c.implicit = v, this; }, l.prototype.obj = function() { var v = this._baseState, c = Array.prototype.slice.call(arguments); return v.obj = !0, c.length !== 0 && this._useArgs(c), this; }, l.prototype.key = function(v) { var c = this._baseState; return w(c.key === null), c.key = v, this; }, l.prototype.any = function() { var v = this._baseState; return v.any = !0, this; }, l.prototype.choice = function(v) { var c = this._baseState; return w(c.choice === null), c.choice = v, this._useArgs(Object.keys(v).map(function(a) { return v[a]; })), this; }, l.prototype.contains = function(v) { var c = this._baseState; return w(c.use === null), c.contains = v, this; }, l.prototype._decode = function(v, c) { var a = this._baseState; if (a.parent === null) return v.wrapResult(a.children[0]._decode(v, c)); var r = a.default, t = !0, i = null; if (a.key !== null && (i = v.enterKey(a.key)), a.optional) { var n = null; if (a.explicit !== null ? n = a.explicit : a.implicit !== null ? n = a.implicit : a.tag !== null && (n = a.tag), n === null && !a.any) { var o = v.save(); try { a.choice === null ? this._decodeGeneric(a.tag, v, c) : this._decodeChoice(v, c), t = !0; } catch (M) { t = !1; } v.restore(o); } else if (t = this._peekTag(v, n, a.any), v.isError(t)) return t; } var p; if (a.obj && t && (p = v.enterObject()), t) { if (a.explicit !== null) { var O = this._decodeTag(v, a.explicit); if (v.isError(O)) return O; v = O; } var P = v.offset; if (a.use === null && a.choice === null) { var F; a.any && (F = v.save()); var z = this._decodeTag(v, a.implicit !== null ? a.implicit : a.tag, a.any); if (v.isError(z)) return z; a.any ? r = v.raw(F) : v = z; } if (c && c.track && a.tag !== null && c.track(v.path(), P, v.length, "tagged"), c && c.track && a.tag !== null && c.track(v.path(), v.offset, v.length, "content"), a.any || (a.choice === null ? r = this._decodeGeneric(a.tag, v, c) : r = this._decodeChoice(v, c)), v.isError(r)) return r; if (!a.any && a.choice === null && a.children !== null && a.children.forEach(function(I) { I._decode(v, c); }), a.contains && (a.tag === "octstr" || a.tag === "bitstr")) { var N = new b(r); r = this._getUse(a.contains, v._reporterState.obj)._decode(N, c); } } return a.obj && t && (r = v.leaveObject(p)), a.key !== null && (r !== null || t === !0) ? v.leaveKey(i, a.key, r) : i !== null && v.exitKey(i), r; }, l.prototype._decodeGeneric = function(v, c, a) { var r = this._baseState; return v === "seq" || v === "set" ? null : v === "seqof" || v === "setof" ? this._decodeList(c, v, r.args[0], a) : /str$/.test(v) ? this._decodeStr(c, v, a) : v === "objid" && r.args ? this._decodeObjid(c, r.args[0], r.args[1], a) : v === "objid" ? this._decodeObjid(c, null, null, a) : v === "gentime" || v === "utctime" ? this._decodeTime(c, v, a) : v === "null_" ? this._decodeNull(c, a) : v === "bool" ? this._decodeBool(c, a) : v === "objDesc" ? this._decodeStr(c, v, a) : v === "int" || v === "enum" ? this._decodeInt(c, r.args && r.args[0], a) : r.use !== null ? this._getUse(r.use, c._reporterState.obj)._decode(c, a) : c.error("unknown tag: " + v); }, l.prototype._getUse = function(v, c) { var a = this._baseState; return a.useDecoder = this._use(v, c), w(a.useDecoder._baseState.parent === null), a.useDecoder = a.useDecoder._baseState.children[0], a.implicit !== a.useDecoder._baseState.implicit && (a.useDecoder = a.useDecoder.clone(), a.useDecoder._baseState.implicit = a.implicit), a.useDecoder; }, l.prototype._decodeChoice = function(v, c) { var a = this._baseState, r = null, t = !1; return Object.keys(a.choice).some(function(i) { var n = v.save(), o = a.choice[i]; try { var p = o._decode(v, c); if (v.isError(p)) return !1; r = { type: i, value: p }, t = !0; } catch (O) { return v.restore(n), !1; } return !0; }, this), t ? r : v.error("Choice not matched"); }, l.prototype._createEncoderBuffer = function(v) { return new g(v, this.reporter); }, l.prototype._encode = function(v, c, a) { var r = this._baseState; if (!(r.default !== null && r.default === v)) { var t = this._encodeValue(v, c, a); if (t !== void 0 && !this._skipDefault(t, c, a)) return t; } }, l.prototype._encodeValue = function(v, c, a) { var r = this._baseState; if (r.parent === null) return r.children[0]._encode(v, c || new m()); var t = null; if (this.reporter = c, r.optional && v === void 0) if (r.default !== null) v = r.default; else return; var i = null, n = !1; if (r.any) t = this._createEncoderBuffer(v); else if (r.choice) t = this._encodeChoice(v, c); else if (r.contains) i = this._getUse(r.contains, a)._encode(v, c), n = !0; else if (r.children) i = r.children.map(function(P) { if (P._baseState.tag === "null_") return P._encode(null, c, v); if (P._baseState.key === null) return c.error("Child should have a key"); var F = c.enterKey(P._baseState.key); if (u(v) !== "object") return c.error("Child expected, but input is not object"); var z = P._encode(v[P._baseState.key], c, v); return c.leaveKey(F), z; }, this).filter(function(P) { return P; }), i = this._createEncoderBuffer(i); else if (r.tag === "seqof" || r.tag === "setof") { if (!(r.args && r.args.length === 1)) return c.error("Too many args for : " + r.tag); if (!Array.isArray(v)) return c.error("seqof/setof, but data is not Array"); var o = this.clone(); o._baseState.implicit = null, i = this._createEncoderBuffer(v.map(function(P) { var F = this._baseState; return this._getUse(F.args[0], v)._encode(P, c); }, o)); } else r.use !== null ? t = this._getUse(r.use, a)._encode(v, c) : (i = this._encodePrimitive(r.tag, v), n = !0); if (!r.any && r.choice === null) { var p = r.implicit !== null ? r.implicit : r.tag, O = r.implicit === null ? "universal" : "context"; p === null ? r.use === null && c.error("Tag could be omitted only for .use()") : r.use === null && (t = this._encodeComposite(p, n, O, i)); } return r.explicit !== null && (t = this._encodeComposite(r.explicit, !1, "context", t)), t; }, l.prototype._encodeChoice = function(v, c) { var a = this._baseState, r = a.choice[v.type]; return r || w(!1, v.type + " not found in " + JSON.stringify(Object.keys(a.choice))), r._encode(v.value, c); }, l.prototype._encodePrimitive = function(v, c) { var a = this._baseState; if (/str$/.test(v)) return this._encodeStr(c, v); if (v === "objid" && a.args) return this._encodeObjid(c, a.reverseArgs[0], a.args[1]); if (v === "objid") return this._encodeObjid(c, null, null); if (v === "gentime" || v === "utctime") return this._encodeTime(c, v); if (v === "null_") return this._encodeNull(); if (v === "int" || v === "enum") return this._encodeInt(c, a.args && a.reverseArgs[0]); if (v === "bool") return this._encodeBool(c); if (v === "objDesc") return this._encodeStr(c, v); throw new Error("Unsupported tag: " + v); }, l.prototype._isNumstr = function(v) { return /^[0-9 ]*$/.test(v); }, l.prototype._isPrintstr = function(v) { return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(v); }; }, { "../base/buffer": 169, "../base/reporter": 172, "minimalistic-assert": 437 }], 172: [function(e, x, _) { var u = e("inherits"); function m(b) { this._reporterState = { obj: null, path: [], options: b || {}, errors: [] }; } _.Reporter = m, m.prototype.isError = function(w) { return w instanceof g; }, m.prototype.save = function() { var w = this._reporterState; return { obj: w.obj, pathLen: w.path.length }; }, m.prototype.restore = function(w) { var f = this._reporterState; f.obj = w.obj, f.path = f.path.slice(0, w.pathLen); }, m.prototype.enterKey = function(w) { return this._reporterState.path.push(w); }, m.prototype.exitKey = function(w) { var f = this._reporterState; f.path = f.path.slice(0, w - 1); }, m.prototype.leaveKey = function(w, f, y) { var h = this._reporterState; this.exitKey(w), h.obj !== null && (h.obj[f] = y); }, m.prototype.path = function() { return this._reporterState.path.join("/"); }, m.prototype.enterObject = function() { var w = this._reporterState, f = w.obj; return w.obj = {}, f; }, m.prototype.leaveObject = function(w) { var f = this._reporterState, y = f.obj; return f.obj = w, y; }, m.prototype.error = function(w) { var f, y = this._reporterState, h = w instanceof g; if (h ? f = w : f = new g(y.path.map(function(l) { return "[" + JSON.stringify(l) + "]"; }).join(""), w.message || w, w.stack), !y.options.partial) throw f; return h || y.errors.push(f), f; }, m.prototype.wrapResult = function(w) { var f = this._reporterState; return f.options.partial ? { result: this.isError(w) ? null : w, errors: f.errors } : w; }; function g(b, w) { this.path = b, this.rethrow(w); } u(g, Error), g.prototype.rethrow = function(w) { if (this.message = w + " at: " + (this.path || "(shallow)"), Error.captureStackTrace && Error.captureStackTrace(this, g), !this.stack) try { throw new Error(this.message); } catch (f) { this.stack = f.stack; } return this; }; }, { inherits: 387 }], 173: [function(e, x, _) { function u(m) { var g = {}; return Object.keys(m).forEach(function(b) { (b | 0) == b && (b = b | 0); var w = m[b]; g[w] = b; }), g; } _.tagClass = { 0: "universal", 1: "application", 2: "context", 3: "private" }, _.tagClassByName = u(_.tagClass), _.tag = { 0: "end", 1: "bool", 2: "int", 3: "bitstr", 4: "octstr", 5: "null_", 6: "objid", 7: "objDesc", 8: "external", 9: "real", 10: "enum", 11: "embed", 12: "utf8str", 13: "relativeOid", 16: "seq", 17: "set", 18: "numstr", 19: "printstr", 20: "t61str", 21: "videostr", 22: "ia5str", 23: "utctime", 24: "gentime", 25: "graphstr", 26: "iso646str", 27: "genstr", 28: "unistr", 29: "charstr", 30: "bmpstr" }, _.tagByName = u(_.tag); }, {}], 174: [function(e, x, _) { var u = _; u._reverse = function(g) { var b = {}; return Object.keys(g).forEach(function(w) { (w | 0) == w && (w = w | 0); var f = g[w]; b[f] = w; }), b; }, u.der = e("./der"); }, { "./der": 173 }], 175: [function(e, x, _) { var u = e("inherits"), m = e("bn.js"), g = e("../base/buffer").DecoderBuffer, b = e("../base/node"), w = e("../constants/der"); function f(d) { this.enc = "der", this.name = d.name, this.entity = d, this.tree = new y(), this.tree._init(d.body); } x.exports = f, f.prototype.decode = function(s, v) { return g.isDecoderBuffer(s) || (s = new g(s, v)), this.tree._decode(s, v); }; function y(d) { b.call(this, "der", d); } u(y, b), y.prototype._peekTag = function(s, v, c) { if (s.isEmpty()) return !1; var a = s.save(), r = h(s, 'Failed to peek tag: "' + v + '"'); return s.isError(r) ? r : (s.restore(a), r.tag === v || r.tagStr === v || r.tagStr + "of" === v || c); }, y.prototype._decodeTag = function(s, v, c) { var a = h(s, 'Failed to decode tag of "' + v + '"'); if (s.isError(a)) return a; var r = l(s, a.primitive, 'Failed to get length of "' + v + '"'); if (s.isError(r)) return r; if (!c && a.tag !== v && a.tagStr !== v && a.tagStr + "of" !== v) return s.error('Failed to match tag: "' + v + '"'); if (a.primitive || r !== null) return s.skip(r, 'Failed to match body of: "' + v + '"'); var t = s.save(), i = this._skipUntilEnd(s, 'Failed to skip indefinite length body: "' + this.tag + '"'); return s.isError(i) ? i : (r = s.offset - t.offset, s.restore(t), s.skip(r, 'Failed to match body of: "' + v + '"')); }, y.prototype._skipUntilEnd = function(s, v) { for (; ; ) { var c = h(s, v); if (s.isError(c)) return c; var a = l(s, c.primitive, v); if (s.isError(a)) return a; var r = void 0; if (c.primitive || a !== null ? r = s.skip(a) : r = this._skipUntilEnd(s, v), s.isError(r)) return r; if (c.tagStr === "end") break; } }, y.prototype._decodeList = function(s, v, c, a) { for (var r = []; !s.isEmpty(); ) { var t = this._peekTag(s, "end"); if (s.isError(t)) return t; var i = c.decode(s, "der", a); if (s.isError(i) && t) break; r.push(i); } return r; }, y.prototype._decodeStr = function(s, v) { if (v === "bitstr") { var c = s.readUInt8(); return s.isError(c) ? c : { unused: c, data: s.raw() }; } else if (v === "bmpstr") { var a = s.raw(); if (a.length % 2 === 1) return s.error("Decoding of string type: bmpstr length mismatch"); for (var r = "", t = 0; t < a.length / 2; t++) r += String.fromCharCode(a.readUInt16BE(t * 2)); return r; } else if (v === "numstr") { var i = s.raw().toString("ascii"); return this._isNumstr(i) ? i : s.error("Decoding of string type: numstr unsupported characters"); } else { if (v === "octstr") return s.raw(); if (v === "objDesc") return s.raw(); if (v === "printstr") { var n = s.raw().toString("ascii"); return this._isPrintstr(n) ? n : s.error("Decoding of string type: printstr unsupported characters"); } else return /str$/.test(v) ? s.raw().toString() : s.error("Decoding of string type: " + v + " unsupported"); } }, y.prototype._decodeObjid = function(s, v, c) { for (var a, r = [], t = 0, i = 0; !s.isEmpty(); ) i = s.readUInt8(), t <<= 7, t |= i & 127, i & 128 || (r.push(t), t = 0); i & 128 && r.push(t); var n = r[0] / 40 | 0, o = r[0] % 40; if (c ? a = r : a = [n, o].concat(r.slice(1)), v) { var p = v[a.join(" ")]; p === void 0 && (p = v[a.join(".")]), p !== void 0 && (a = p); } return a; }, y.prototype._decodeTime = function(s, v) { var c = s.raw().toString(), a, r, t, i, n, o; if (v === "gentime") a = c.slice(0, 4) | 0, r = c.slice(4, 6) | 0, t = c.slice(6, 8) | 0, i = c.slice(8, 10) | 0, n = c.slice(10, 12) | 0, o = c.slice(12, 14) | 0; else if (v === "utctime") a = c.slice(0, 2) | 0, r = c.slice(2, 4) | 0, t = c.slice(4, 6) | 0, i = c.slice(6, 8) | 0, n = c.slice(8, 10) | 0, o = c.slice(10, 12) | 0, a < 70 ? a = 2e3 + a : a = 1900 + a; else return s.error("Decoding " + v + " time is not supported yet"); return Date.UTC(a, r - 1, t, i, n, o, 0); }, y.prototype._decodeNull = function() { return null; }, y.prototype._decodeBool = function(s) { var v = s.readUInt8(); return s.isError(v) ? v : v !== 0; }, y.prototype._decodeInt = function(s, v) { var c = s.raw(), a = new m(c); return v && (a = v[a.toString(10)] || a), a; }, y.prototype._use = function(s, v) { return typeof s == "function" && (s = s(v)), s._getDecoder("der").tree; }; function h(d, s) { var v = d.readUInt8(s); if (d.isError(v)) return v; var c = w.tagClass[v >> 6], a = (v & 32) === 0; if ((v & 31) === 31) { var r = v; for (v = 0; (r & 128) === 128; ) { if (r = d.readUInt8(s), d.isError(r)) return r; v <<= 7, v |= r & 127; } } else v &= 31; var t = w.tag[v]; return { cls: c, primitive: a, tag: v, tagStr: t }; } function l(d, s, v) { var c = d.readUInt8(v); if (d.isError(c)) return c; if (!s && c === 128) return null; if (!(c & 128)) return c; var a = c & 127; if (a > 4) return d.error("length octect is too long"); c = 0; for (var r = 0; r < a; r++) { c <<= 8; var t = d.readUInt8(v); if (d.isError(t)) return t; c |= t; } return c; } }, { "../base/buffer": 169, "../base/node": 171, "../constants/der": 173, "bn.js": 181, inherits: 387 }], 176: [function(e, x, _) { var u = _; u.der = e("./der"), u.pem = e("./pem"); }, { "./der": 175, "./pem": 177 }], 177: [function(e, x, _) { var u = e("inherits"), m = e("safer-buffer").Buffer, g = e("./der"); function b(w) { g.call(this, w), this.enc = "pem"; } u(b, g), x.exports = b, b.prototype.decode = function(f, y) { for (var h = f.toString().split(/[\r\n]+/g), l = y.label.toUpperCase(), d = /^-----(BEGIN|END) ([^-]+)-----$/, s = -1, v = -1, c = 0; c < h.length; c++) { var a = h[c].match(d); if (a !== null && a[2] === l) if (s === -1) { if (a[1] !== "BEGIN") break; s = c; } else { if (a[1] !== "END") break; v = c; break; } } if (s === -1 || v === -1) throw new Error("PEM section not found for: " + l); var r = h.slice(s + 1, v).join(""); r.replace(/[^a-z0-9+/=]+/gi, ""); var t = m.from(r, "base64"); return g.prototype.decode.call(this, t, y); }; }, { "./der": 175, inherits: 387, "safer-buffer": 495 }], 178: [function(e, x, _) { var u = e("inherits"), m = e("safer-buffer").Buffer, g = e("../base/node"), b = e("../constants/der"); function w(l) { this.enc = "der", this.name = l.name, this.entity = l, this.tree = new f(), this.tree._init(l.body); } x.exports = w, w.prototype.encode = function(d, s) { return this.tree._encode(d, s).join(); }; function f(l) { g.call(this, "der", l); } u(f, g), f.prototype._encodeComposite = function(d, s, v, c) { var a = h(d, s, v, this.reporter); if (c.length < 128) { var r = m.alloc(2); return r[0] = a, r[1] = c.length, this._createEncoderBuffer([r, c]); } for (var t = 1, i = c.length; i >= 256; i >>= 8) t++; var n = m.alloc(1 + 1 + t); n[0] = a, n[1] = 128 | t; for (var o = 1 + t, p = c.length; p > 0; o--, p >>= 8) n[o] = p & 255; return this._createEncoderBuffer([n, c]); }, f.prototype._encodeStr = function(d, s) { if (s === "bitstr") return this._createEncoderBuffer([d.unused | 0, d.data]); if (s === "bmpstr") { for (var v = m.alloc(d.length * 2), c = 0; c < d.length; c++) v.writeUInt16BE(d.charCodeAt(c), c * 2); return this._createEncoderBuffer(v); } else return s === "numstr" ? this._isNumstr(d) ? this._createEncoderBuffer(d) : this.reporter.error("Encoding of string type: numstr supports only digits and space") : s === "printstr" ? this._isPrintstr(d) ? this._createEncoderBuffer(d) : this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(s) ? this._createEncoderBuffer(d) : s === "objDesc" ? this._createEncoderBuffer(d) : this.reporter.error("Encoding of string type: " + s + " unsupported"); }, f.prototype._encodeObjid = function(d, s, v) { if (typeof d == "string") { if (!s) return this.reporter.error("string objid given, but no values map found"); if (!s.hasOwnProperty(d)) return this.reporter.error("objid not found in values map"); d = s[d].split(/[\s.]+/g); for (var c = 0; c < d.length; c++) d[c] |= 0; } else if (Array.isArray(d)) { d = d.slice(); for (var a = 0; a < d.length; a++) d[a] |= 0; } if (!Array.isArray(d)) return this.reporter.error("objid() should be either array or string, got: " + JSON.stringify(d)); if (!v) { if (d[1] >= 40) return this.reporter.error("Second objid identifier OOB"); d.splice(0, 2, d[0] * 40 + d[1]); } for (var r = 0, t = 0; t < d.length; t++) { var i = d[t]; for (r++; i >= 128; i >>= 7) r++; } for (var n = m.alloc(r), o = n.length - 1, p = d.length - 1; p >= 0; p--) { var O = d[p]; for (n[o--] = O & 127; (O >>= 7) > 0; ) n[o--] = 128 | O & 127; } return this._createEncoderBuffer(n); }; function y(l) { return l < 10 ? "0" + l : l; } f.prototype._encodeTime = function(d, s) { var v, c = new Date(d); return s === "gentime" ? v = [y(c.getUTCFullYear()), y(c.getUTCMonth() + 1), y(c.getUTCDate()), y(c.getUTCHours()), y(c.getUTCMinutes()), y(c.getUTCSeconds()), "Z"].join("") : s === "utctime" ? v = [y(c.getUTCFullYear() % 100), y(c.getUTCMonth() + 1), y(c.getUTCDate()), y(c.getUTCHours()), y(c.getUTCMinutes()), y(c.getUTCSeconds()), "Z"].join("") : this.reporter.error("Encoding " + s + " time is not supported yet"), this._encodeStr(v, "octstr"); }, f.prototype._encodeNull = function() { return this._createEncoderBuffer(""); }, f.prototype._encodeInt = function(d, s) { if (typeof d == "string") { if (!s) return this.reporter.error("String int or enum given, but no values map"); if (!s.hasOwnProperty(d)) return this.reporter.error("Values map doesn't contain: " + JSON.stringify(d)); d = s[d]; } if (typeof d != "number" && !m.isBuffer(d)) { var v = d.toArray(); !d.sign && v[0] & 128 && v.unshift(0), d = m.from(v); } if (m.isBuffer(d)) { var c = d.length; d.length === 0 && c++; var a = m.alloc(c); return d.copy(a), d.length === 0 && (a[0] = 0), this._createEncoderBuffer(a); } if (d < 128) return this._createEncoderBuffer(d); if (d < 256) return this._createEncoderBuffer([0, d]); for (var r = 1, t = d; t >= 256; t >>= 8) r++; for (var i = new Array(r), n = i.length - 1; n >= 0; n--) i[n] = d & 255, d >>= 8; return i[0] & 128 && i.unshift(0), this._createEncoderBuffer(m.from(i)); }, f.prototype._encodeBool = function(d) { return this._createEncoderBuffer(d ? 255 : 0); }, f.prototype._use = function(d, s) { return typeof d == "function" && (d = d(s)), d._getEncoder("der").tree; }, f.prototype._skipDefault = function(d, s, v) { var c = this._baseState, a; if (c.default === null) return !1; var r = d.join(); if (c.defaultBuffer === void 0 && (c.defaultBuffer = this._encodeValue(c.default, s, v).join()), r.length !== c.defaultBuffer.length) return !1; for (a = 0; a < r.length; a++) if (r[a] !== c.defaultBuffer[a]) return !1; return !0; }; function h(l, d, s, v) { var c; if (l === "seqof" ? l = "seq" : l === "setof" && (l = "set"), b.tagByName.hasOwnProperty(l)) c = b.tagByName[l]; else if (typeof l == "number" && (l | 0) === l) c = l; else return v.error("Unknown tag: " + l); return c >= 31 ? v.error("Multi-octet tag encoding unsupported") : (d || (c |= 32), c |= b.tagClassByName[s || "universal"] << 6, c); } }, { "../base/node": 171, "../constants/der": 173, inherits: 387, "safer-buffer": 495 }], 179: [function(e, x, _) { var u = _; u.der = e("./der"), u.pem = e("./pem"); }, { "./der": 178, "./pem": 180 }], 180: [function(e, x, _) { var u = e("inherits"), m = e("./der"); function g(b) { m.call(this, b), this.enc = "pem"; } u(g, m), x.exports = g, g.prototype.encode = function(w, f) { for (var y = m.prototype.encode.call(this, w), h = y.toString("base64"), l = ["-----BEGIN " + f.label + "-----"], d = 0; d < h.length; d += 64) l.push(h.slice(d, d + 64)); return l.push("-----END " + f.label + "-----"), l.join(` `); }; }, { "./der": 178, inherits: 387 }], 181: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } (function(m, g) { function b(I, R) { if (!I) throw new Error(R || "Assertion failed"); } function w(I, R) { I.super_ = R; var C = function() { }; C.prototype = R.prototype, I.prototype = new C(), I.prototype.constructor = I; } function f(I, R, C) { if (f.isBN(I)) return I; this.negative = 0, this.words = null, this.length = 0, this.red = null, I !== null && ((R === "le" || R === "be") && (C = R, R = 10), this._init(I || 0, R || 10, C || "be")); } u(m) === "object" ? m.exports = f : g.BN = f, f.BN = f, f.wordSize = 26; var y; try { y = e("buffer").Buffer; } catch (I) { } f.isBN = function(R) { return R instanceof f ? !0 : R !== null && u(R) === "object" && R.constructor.wordSize === f.wordSize && Array.isArray(R.words); }, f.max = function(R, C) { return R.cmp(C) > 0 ? R : C; }, f.min = function(R, C) { return R.cmp(C) < 0 ? R : C; }, f.prototype._init = function(R, C, E) { if (typeof R == "number") return this._initNumber(R, C, E); if (u(R) === "object") return this._initArray(R, C, E); C === "hex" && (C = 16), b(C === (C | 0) && C >= 2 && C <= 36), R = R.toString().replace(/\s+/g, ""); var A = 0; R[0] === "-" && A++, C === 16 ? this._parseHex(R, A) : this._parseBase(R, C, A), R[0] === "-" && (this.negative = 1), this.strip(), E === "le" && this._initArray(this.toArray(), C, E); }, f.prototype._initNumber = function(R, C, E) { R < 0 && (this.negative = 1, R = -R), R < 67108864 ? (this.words = [R & 67108863], this.length = 1) : R < 4503599627370496 ? (this.words = [R & 67108863, R / 67108864 & 67108863], this.length = 2) : (b(R < 9007199254740992), this.words = [R & 67108863, R / 67108864 & 67108863, 1], this.length = 3), E === "le" && this._initArray(this.toArray(), C, E); }, f.prototype._initArray = function(R, C, E) { if (b(typeof R.length == "number"), R.length <= 0) return this.words = [0], this.length = 1, this; this.length = Math.ceil(R.length / 3), this.words = new Array(this.length); for (var A = 0; A < this.length; A++) this.words[A] = 0; var L, $, W = 0; if (E === "be") for (A = R.length - 1, L = 0; A >= 0; A -= 3) $ = R[A] | R[A - 1] << 8 | R[A - 2] << 16, this.words[L] |= $ << W & 67108863, this.words[L + 1] = $ >>> 26 - W & 67108863, W += 24, W >= 26 && (W -= 26, L++); else if (E === "le") for (A = 0, L = 0; A < R.length; A += 3) $ = R[A] | R[A + 1] << 8 | R[A + 2] << 16, this.words[L] |= $ << W & 67108863, this.words[L + 1] = $ >>> 26 - W & 67108863, W += 24, W >= 26 && (W -= 26, L++); return this.strip(); }; function h(I, R, C) { for (var E = 0, A = Math.min(I.length, C), L = R; L < A; L++) { var $ = I.charCodeAt(L) - 48; E <<= 4, $ >= 49 && $ <= 54 ? E |= $ - 49 + 10 : $ >= 17 && $ <= 22 ? E |= $ - 17 + 10 : E |= $ & 15; } return E; } f.prototype._parseHex = function(R, C) { this.length = Math.ceil((R.length - C) / 6), this.words = new Array(this.length); for (var E = 0; E < this.length; E++) this.words[E] = 0; var A, L, $ = 0; for (E = R.length - 6, A = 0; E >= C; E -= 6) L = h(R, E, E + 6), this.words[A] |= L << $ & 67108863, this.words[A + 1] |= L >>> 26 - $ & 4194303, $ += 24, $ >= 26 && ($ -= 26, A++); E + 6 !== C && (L = h(R, C, E + 6), this.words[A] |= L << $ & 67108863, this.words[A + 1] |= L >>> 26 - $ & 4194303), this.strip(); }; function l(I, R, C, E) { for (var A = 0, L = Math.min(I.length, C), $ = R; $ < L; $++) { var W = I.charCodeAt($) - 48; A *= E, W >= 49 ? A += W - 49 + 10 : W >= 17 ? A += W - 17 + 10 : A += W; } return A; } f.prototype._parseBase = function(R, C, E) { this.words = [0], this.length = 1; for (var A = 0, L = 1; L <= 67108863; L *= C) A++; A--, L = L / C | 0; for (var $ = R.length - E, W = $ % A, U = Math.min($, $ - W) + E, D = 0, B = E; B < U; B += A) D = l(R, B, B + A, C), this.imuln(L), this.words[0] + D < 67108864 ? this.words[0] += D : this._iaddn(D); if (W !== 0) { var j = 1; for (D = l(R, B, R.length, C), B = 0; B < W; B++) j *= C; this.imuln(j), this.words[0] + D < 67108864 ? this.words[0] += D : this._iaddn(D); } }, f.prototype.copy = function(R) { R.words = new Array(this.length); for (var C = 0; C < this.length; C++) R.words[C] = this.words[C]; R.length = this.length, R.negative = this.negative, R.red = this.red; }, f.prototype.clone = function() { var R = new f(null); return this.copy(R), R; }, f.prototype._expand = function(R) { for (; this.length < R; ) this.words[this.length++] = 0; return this; }, f.prototype.strip = function() { for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length--; return this._normSign(); }, f.prototype._normSign = function() { return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this; }, f.prototype.inspect = function() { return (this.red ? ""; }; var d = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"], s = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], v = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; f.prototype.toString = function(R, C) { R = R || 10, C = C | 0 || 1; var E; if (R === 16 || R === "hex") { E = ""; for (var A = 0, L = 0, $ = 0; $ < this.length; $++) { var W = this.words[$], U = ((W << A | L) & 16777215).toString(16); L = W >>> 24 - A & 16777215, L !== 0 || $ !== this.length - 1 ? E = d[6 - U.length] + U + E : E = U + E, A += 2, A >= 26 && (A -= 26, $--); } for (L !== 0 && (E = L.toString(16) + E); E.length % C !== 0; ) E = "0" + E; return this.negative !== 0 && (E = "-" + E), E; } if (R === (R | 0) && R >= 2 && R <= 36) { var D = s[R], B = v[R]; E = ""; var j = this.clone(); for (j.negative = 0; !j.isZero(); ) { var V = j.modn(B).toString(R); j = j.idivn(B), j.isZero() ? E = V + E : E = d[D - V.length] + V + E; } for (this.isZero() && (E = "0" + E); E.length % C !== 0; ) E = "0" + E; return this.negative !== 0 && (E = "-" + E), E; } b(!1, "Base should be between 2 and 36"); }, f.prototype.toNumber = function() { var R = this.words[0]; return this.length === 2 ? R += this.words[1] * 67108864 : this.length === 3 && this.words[2] === 1 ? R += 4503599627370496 + this.words[1] * 67108864 : this.length > 2 && b(!1, "Number can only safely store up to 53 bits"), this.negative !== 0 ? -R : R; }, f.prototype.toJSON = function() { return this.toString(16); }, f.prototype.toBuffer = function(R, C) { return b(typeof y != "undefined"), this.toArrayLike(y, R, C); }, f.prototype.toArray = function(R, C) { return this.toArrayLike(Array, R, C); }, f.prototype.toArrayLike = function(R, C, E) { var A = this.byteLength(), L = E || Math.max(1, A); b(A <= L, "byte array longer than desired length"), b(L > 0, "Requested array length <= 0"), this.strip(); var $ = C === "le", W = new R(L), U, D, B = this.clone(); if ($) { for (D = 0; !B.isZero(); D++) U = B.andln(255), B.iushrn(8), W[D] = U; for (; D < L; D++) W[D] = 0; } else { for (D = 0; D < L - A; D++) W[D] = 0; for (D = 0; !B.isZero(); D++) U = B.andln(255), B.iushrn(8), W[L - D - 1] = U; } return W; }, Math.clz32 ? f.prototype._countBits = function(R) { return 32 - Math.clz32(R); } : f.prototype._countBits = function(R) { var C = R, E = 0; return C >= 4096 && (E += 13, C >>>= 13), C >= 64 && (E += 7, C >>>= 7), C >= 8 && (E += 4, C >>>= 4), C >= 2 && (E += 2, C >>>= 2), E + C; }, f.prototype._zeroBits = function(R) { if (R === 0) return 26; var C = R, E = 0; return C & 8191 || (E += 13, C >>>= 13), C & 127 || (E += 7, C >>>= 7), C & 15 || (E += 4, C >>>= 4), C & 3 || (E += 2, C >>>= 2), C & 1 || E++, E; }, f.prototype.bitLength = function() { var R = this.words[this.length - 1], C = this._countBits(R); return (this.length - 1) * 26 + C; }; function c(I) { for (var R = new Array(I.bitLength()), C = 0; C < R.length; C++) { var E = C / 26 | 0, A = C % 26; R[C] = (I.words[E] & 1 << A) >>> A; } return R; } f.prototype.zeroBits = function() { if (this.isZero()) return 0; for (var R = 0, C = 0; C < this.length; C++) { var E = this._zeroBits(this.words[C]); if (R += E, E !== 26) break; } return R; }, f.prototype.byteLength = function() { return Math.ceil(this.bitLength() / 8); }, f.prototype.toTwos = function(R) { return this.negative !== 0 ? this.abs().inotn(R).iaddn(1) : this.clone(); }, f.prototype.fromTwos = function(R) { return this.testn(R - 1) ? this.notn(R).iaddn(1).ineg() : this.clone(); }, f.prototype.isNeg = function() { return this.negative !== 0; }, f.prototype.neg = function() { return this.clone().ineg(); }, f.prototype.ineg = function() { return this.isZero() || (this.negative ^= 1), this; }, f.prototype.iuor = function(R) { for (; this.length < R.length; ) this.words[this.length++] = 0; for (var C = 0; C < R.length; C++) this.words[C] = this.words[C] | R.words[C]; return this.strip(); }, f.prototype.ior = function(R) { return b((this.negative | R.negative) === 0), this.iuor(R); }, f.prototype.or = function(R) { return this.length > R.length ? this.clone().ior(R) : R.clone().ior(this); }, f.prototype.uor = function(R) { return this.length > R.length ? this.clone().iuor(R) : R.clone().iuor(this); }, f.prototype.iuand = function(R) { var C; this.length > R.length ? C = R : C = this; for (var E = 0; E < C.length; E++) this.words[E] = this.words[E] & R.words[E]; return this.length = C.length, this.strip(); }, f.prototype.iand = function(R) { return b((this.negative | R.negative) === 0), this.iuand(R); }, f.prototype.and = function(R) { return this.length > R.length ? this.clone().iand(R) : R.clone().iand(this); }, f.prototype.uand = function(R) { return this.length > R.length ? this.clone().iuand(R) : R.clone().iuand(this); }, f.prototype.iuxor = function(R) { var C, E; this.length > R.length ? (C = this, E = R) : (C = R, E = this); for (var A = 0; A < E.length; A++) this.words[A] = C.words[A] ^ E.words[A]; if (this !== C) for (; A < C.length; A++) this.words[A] = C.words[A]; return this.length = C.length, this.strip(); }, f.prototype.ixor = function(R) { return b((this.negative | R.negative) === 0), this.iuxor(R); }, f.prototype.xor = function(R) { return this.length > R.length ? this.clone().ixor(R) : R.clone().ixor(this); }, f.prototype.uxor = function(R) { return this.length > R.length ? this.clone().iuxor(R) : R.clone().iuxor(this); }, f.prototype.inotn = function(R) { b(typeof R == "number" && R >= 0); var C = Math.ceil(R / 26) | 0, E = R % 26; this._expand(C), E > 0 && C--; for (var A = 0; A < C; A++) this.words[A] = ~this.words[A] & 67108863; return E > 0 && (this.words[A] = ~this.words[A] & 67108863 >> 26 - E), this.strip(); }, f.prototype.notn = function(R) { return this.clone().inotn(R); }, f.prototype.setn = function(R, C) { b(typeof R == "number" && R >= 0); var E = R / 26 | 0, A = R % 26; return this._expand(E + 1), C ? this.words[E] = this.words[E] | 1 << A : this.words[E] = this.words[E] & ~(1 << A), this.strip(); }, f.prototype.iadd = function(R) { var C; if (this.negative !== 0 && R.negative === 0) return this.negative = 0, C = this.isub(R), this.negative ^= 1, this._normSign(); if (this.negative === 0 && R.negative !== 0) return R.negative = 0, C = this.isub(R), R.negative = 1, C._normSign(); var E, A; this.length > R.length ? (E = this, A = R) : (E = R, A = this); for (var L = 0, $ = 0; $ < A.length; $++) C = (E.words[$] | 0) + (A.words[$] | 0) + L, this.words[$] = C & 67108863, L = C >>> 26; for (; L !== 0 && $ < E.length; $++) C = (E.words[$] | 0) + L, this.words[$] = C & 67108863, L = C >>> 26; if (this.length = E.length, L !== 0) this.words[this.length] = L, this.length++; else if (E !== this) for (; $ < E.length; $++) this.words[$] = E.words[$]; return this; }, f.prototype.add = function(R) { var C; return R.negative !== 0 && this.negative === 0 ? (R.negative = 0, C = this.sub(R), R.negative ^= 1, C) : R.negative === 0 && this.negative !== 0 ? (this.negative = 0, C = R.sub(this), this.negative = 1, C) : this.length > R.length ? this.clone().iadd(R) : R.clone().iadd(this); }, f.prototype.isub = function(R) { if (R.negative !== 0) { R.negative = 0; var C = this.iadd(R); return R.negative = 1, C._normSign(); } else if (this.negative !== 0) return this.negative = 0, this.iadd(R), this.negative = 1, this._normSign(); var E = this.cmp(R); if (E === 0) return this.negative = 0, this.length = 1, this.words[0] = 0, this; var A, L; E > 0 ? (A = this, L = R) : (A = R, L = this); for (var $ = 0, W = 0; W < L.length; W++) C = (A.words[W] | 0) - (L.words[W] | 0) + $, $ = C >> 26, this.words[W] = C & 67108863; for (; $ !== 0 && W < A.length; W++) C = (A.words[W] | 0) + $, $ = C >> 26, this.words[W] = C & 67108863; if ($ === 0 && W < A.length && A !== this) for (; W < A.length; W++) this.words[W] = A.words[W]; return this.length = Math.max(this.length, W), A !== this && (this.negative = 1), this.strip(); }, f.prototype.sub = function(R) { return this.clone().isub(R); }; function a(I, R, C) { C.negative = R.negative ^ I.negative; var E = I.length + R.length | 0; C.length = E, E = E - 1 | 0; var A = I.words[0] | 0, L = R.words[0] | 0, $ = A * L, W = $ & 67108863, U = $ / 67108864 | 0; C.words[0] = W; for (var D = 1; D < E; D++) { for (var B = U >>> 26, j = U & 67108863, V = Math.min(D, R.length - 1), re = Math.max(0, D - I.length + 1); re <= V; re++) { var ee = D - re | 0; A = I.words[ee] | 0, L = R.words[re] | 0, $ = A * L + j, B += $ / 67108864 | 0, j = $ & 67108863; } C.words[D] = j | 0, U = B | 0; } return U !== 0 ? C.words[D] = U | 0 : C.length--, C.strip(); } var r = function(R, C, E) { var A = R.words, L = C.words, $ = E.words, W = 0, U, D, B, j = A[0] | 0, V = j & 8191, re = j >>> 13, ee = A[1] | 0, ce = ee & 8191, ve = ee >>> 13, ge = A[2] | 0, oe = ge & 8191, J = ge >>> 13, Q = A[3] | 0, he = Q & 8191, ke = Q >>> 13, ne = A[4] | 0, se = ne & 8191, Ce = ne >>> 13, q = A[5] | 0, G = q & 8191, Y = q >>> 13, fe = A[6] | 0, we = fe & 8191, _e = fe >>> 13, je = A[7] | 0, Ye = je & 8191, nt = je >>> 13, ut = A[8] | 0, ot = ut & 8191, Ue = ut >>> 13, Ve = A[9] | 0, Qe = Ve & 8191, tt = Ve >>> 13, ae = L[0] | 0, Re = ae & 8191, be = ae >>> 13, Ee = L[1] | 0, pe = Ee & 8191, Pe = Ee >>> 13, te = L[2] | 0, He = te & 8191, it = te >>> 13, K = L[3] | 0, Me = K & 8191, Le = K >>> 13, ue = L[4] | 0, Se = ue & 8191, Ie = ue >>> 13, st = L[5] | 0, Ge = st & 8191, rt = st >>> 13, _t = L[6] | 0, wt = _t & 8191, Ot = _t >>> 13, pt = L[7] | 0, ct = pt & 8191, At = pt >>> 13, Pt = L[8] | 0, bt = Pt & 8191, Kt = Pt >>> 13, Ct = L[9] | 0, xt = Ct & 8191, Ft = Ct >>> 13; E.negative = R.negative ^ C.negative, E.length = 19, U = Math.imul(V, Re), D = Math.imul(V, be), D = D + Math.imul(re, Re) | 0, B = Math.imul(re, be); var Lt = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Lt >>> 26) | 0, Lt &= 67108863, U = Math.imul(ce, Re), D = Math.imul(ce, be), D = D + Math.imul(ve, Re) | 0, B = Math.imul(ve, be), U = U + Math.imul(V, pe) | 0, D = D + Math.imul(V, Pe) | 0, D = D + Math.imul(re, pe) | 0, B = B + Math.imul(re, Pe) | 0; var Et = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Et >>> 26) | 0, Et &= 67108863, U = Math.imul(oe, Re), D = Math.imul(oe, be), D = D + Math.imul(J, Re) | 0, B = Math.imul(J, be), U = U + Math.imul(ce, pe) | 0, D = D + Math.imul(ce, Pe) | 0, D = D + Math.imul(ve, pe) | 0, B = B + Math.imul(ve, Pe) | 0, U = U + Math.imul(V, He) | 0, D = D + Math.imul(V, it) | 0, D = D + Math.imul(re, He) | 0, B = B + Math.imul(re, it) | 0; var Dr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Dr >>> 26) | 0, Dr &= 67108863, U = Math.imul(he, Re), D = Math.imul(he, be), D = D + Math.imul(ke, Re) | 0, B = Math.imul(ke, be), U = U + Math.imul(oe, pe) | 0, D = D + Math.imul(oe, Pe) | 0, D = D + Math.imul(J, pe) | 0, B = B + Math.imul(J, Pe) | 0, U = U + Math.imul(ce, He) | 0, D = D + Math.imul(ce, it) | 0, D = D + Math.imul(ve, He) | 0, B = B + Math.imul(ve, it) | 0, U = U + Math.imul(V, Me) | 0, D = D + Math.imul(V, Le) | 0, D = D + Math.imul(re, Me) | 0, B = B + Math.imul(re, Le) | 0; var Or = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Or >>> 26) | 0, Or &= 67108863, U = Math.imul(se, Re), D = Math.imul(se, be), D = D + Math.imul(Ce, Re) | 0, B = Math.imul(Ce, be), U = U + Math.imul(he, pe) | 0, D = D + Math.imul(he, Pe) | 0, D = D + Math.imul(ke, pe) | 0, B = B + Math.imul(ke, Pe) | 0, U = U + Math.imul(oe, He) | 0, D = D + Math.imul(oe, it) | 0, D = D + Math.imul(J, He) | 0, B = B + Math.imul(J, it) | 0, U = U + Math.imul(ce, Me) | 0, D = D + Math.imul(ce, Le) | 0, D = D + Math.imul(ve, Me) | 0, B = B + Math.imul(ve, Le) | 0, U = U + Math.imul(V, Se) | 0, D = D + Math.imul(V, Ie) | 0, D = D + Math.imul(re, Se) | 0, B = B + Math.imul(re, Ie) | 0; var Gr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Gr >>> 26) | 0, Gr &= 67108863, U = Math.imul(G, Re), D = Math.imul(G, be), D = D + Math.imul(Y, Re) | 0, B = Math.imul(Y, be), U = U + Math.imul(se, pe) | 0, D = D + Math.imul(se, Pe) | 0, D = D + Math.imul(Ce, pe) | 0, B = B + Math.imul(Ce, Pe) | 0, U = U + Math.imul(he, He) | 0, D = D + Math.imul(he, it) | 0, D = D + Math.imul(ke, He) | 0, B = B + Math.imul(ke, it) | 0, U = U + Math.imul(oe, Me) | 0, D = D + Math.imul(oe, Le) | 0, D = D + Math.imul(J, Me) | 0, B = B + Math.imul(J, Le) | 0, U = U + Math.imul(ce, Se) | 0, D = D + Math.imul(ce, Ie) | 0, D = D + Math.imul(ve, Se) | 0, B = B + Math.imul(ve, Ie) | 0, U = U + Math.imul(V, Ge) | 0, D = D + Math.imul(V, rt) | 0, D = D + Math.imul(re, Ge) | 0, B = B + Math.imul(re, rt) | 0; var Nr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Nr >>> 26) | 0, Nr &= 67108863, U = Math.imul(we, Re), D = Math.imul(we, be), D = D + Math.imul(_e, Re) | 0, B = Math.imul(_e, be), U = U + Math.imul(G, pe) | 0, D = D + Math.imul(G, Pe) | 0, D = D + Math.imul(Y, pe) | 0, B = B + Math.imul(Y, Pe) | 0, U = U + Math.imul(se, He) | 0, D = D + Math.imul(se, it) | 0, D = D + Math.imul(Ce, He) | 0, B = B + Math.imul(Ce, it) | 0, U = U + Math.imul(he, Me) | 0, D = D + Math.imul(he, Le) | 0, D = D + Math.imul(ke, Me) | 0, B = B + Math.imul(ke, Le) | 0, U = U + Math.imul(oe, Se) | 0, D = D + Math.imul(oe, Ie) | 0, D = D + Math.imul(J, Se) | 0, B = B + Math.imul(J, Ie) | 0, U = U + Math.imul(ce, Ge) | 0, D = D + Math.imul(ce, rt) | 0, D = D + Math.imul(ve, Ge) | 0, B = B + Math.imul(ve, rt) | 0, U = U + Math.imul(V, wt) | 0, D = D + Math.imul(V, Ot) | 0, D = D + Math.imul(re, wt) | 0, B = B + Math.imul(re, Ot) | 0; var Yr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Yr >>> 26) | 0, Yr &= 67108863, U = Math.imul(Ye, Re), D = Math.imul(Ye, be), D = D + Math.imul(nt, Re) | 0, B = Math.imul(nt, be), U = U + Math.imul(we, pe) | 0, D = D + Math.imul(we, Pe) | 0, D = D + Math.imul(_e, pe) | 0, B = B + Math.imul(_e, Pe) | 0, U = U + Math.imul(G, He) | 0, D = D + Math.imul(G, it) | 0, D = D + Math.imul(Y, He) | 0, B = B + Math.imul(Y, it) | 0, U = U + Math.imul(se, Me) | 0, D = D + Math.imul(se, Le) | 0, D = D + Math.imul(Ce, Me) | 0, B = B + Math.imul(Ce, Le) | 0, U = U + Math.imul(he, Se) | 0, D = D + Math.imul(he, Ie) | 0, D = D + Math.imul(ke, Se) | 0, B = B + Math.imul(ke, Ie) | 0, U = U + Math.imul(oe, Ge) | 0, D = D + Math.imul(oe, rt) | 0, D = D + Math.imul(J, Ge) | 0, B = B + Math.imul(J, rt) | 0, U = U + Math.imul(ce, wt) | 0, D = D + Math.imul(ce, Ot) | 0, D = D + Math.imul(ve, wt) | 0, B = B + Math.imul(ve, Ot) | 0, U = U + Math.imul(V, ct) | 0, D = D + Math.imul(V, At) | 0, D = D + Math.imul(re, ct) | 0, B = B + Math.imul(re, At) | 0; var Qt = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Qt >>> 26) | 0, Qt &= 67108863, U = Math.imul(ot, Re), D = Math.imul(ot, be), D = D + Math.imul(Ue, Re) | 0, B = Math.imul(Ue, be), U = U + Math.imul(Ye, pe) | 0, D = D + Math.imul(Ye, Pe) | 0, D = D + Math.imul(nt, pe) | 0, B = B + Math.imul(nt, Pe) | 0, U = U + Math.imul(we, He) | 0, D = D + Math.imul(we, it) | 0, D = D + Math.imul(_e, He) | 0, B = B + Math.imul(_e, it) | 0, U = U + Math.imul(G, Me) | 0, D = D + Math.imul(G, Le) | 0, D = D + Math.imul(Y, Me) | 0, B = B + Math.imul(Y, Le) | 0, U = U + Math.imul(se, Se) | 0, D = D + Math.imul(se, Ie) | 0, D = D + Math.imul(Ce, Se) | 0, B = B + Math.imul(Ce, Ie) | 0, U = U + Math.imul(he, Ge) | 0, D = D + Math.imul(he, rt) | 0, D = D + Math.imul(ke, Ge) | 0, B = B + Math.imul(ke, rt) | 0, U = U + Math.imul(oe, wt) | 0, D = D + Math.imul(oe, Ot) | 0, D = D + Math.imul(J, wt) | 0, B = B + Math.imul(J, Ot) | 0, U = U + Math.imul(ce, ct) | 0, D = D + Math.imul(ce, At) | 0, D = D + Math.imul(ve, ct) | 0, B = B + Math.imul(ve, At) | 0, U = U + Math.imul(V, bt) | 0, D = D + Math.imul(V, Kt) | 0, D = D + Math.imul(re, bt) | 0, B = B + Math.imul(re, Kt) | 0; var Xr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Xr >>> 26) | 0, Xr &= 67108863, U = Math.imul(Qe, Re), D = Math.imul(Qe, be), D = D + Math.imul(tt, Re) | 0, B = Math.imul(tt, be), U = U + Math.imul(ot, pe) | 0, D = D + Math.imul(ot, Pe) | 0, D = D + Math.imul(Ue, pe) | 0, B = B + Math.imul(Ue, Pe) | 0, U = U + Math.imul(Ye, He) | 0, D = D + Math.imul(Ye, it) | 0, D = D + Math.imul(nt, He) | 0, B = B + Math.imul(nt, it) | 0, U = U + Math.imul(we, Me) | 0, D = D + Math.imul(we, Le) | 0, D = D + Math.imul(_e, Me) | 0, B = B + Math.imul(_e, Le) | 0, U = U + Math.imul(G, Se) | 0, D = D + Math.imul(G, Ie) | 0, D = D + Math.imul(Y, Se) | 0, B = B + Math.imul(Y, Ie) | 0, U = U + Math.imul(se, Ge) | 0, D = D + Math.imul(se, rt) | 0, D = D + Math.imul(Ce, Ge) | 0, B = B + Math.imul(Ce, rt) | 0, U = U + Math.imul(he, wt) | 0, D = D + Math.imul(he, Ot) | 0, D = D + Math.imul(ke, wt) | 0, B = B + Math.imul(ke, Ot) | 0, U = U + Math.imul(oe, ct) | 0, D = D + Math.imul(oe, At) | 0, D = D + Math.imul(J, ct) | 0, B = B + Math.imul(J, At) | 0, U = U + Math.imul(ce, bt) | 0, D = D + Math.imul(ce, Kt) | 0, D = D + Math.imul(ve, bt) | 0, B = B + Math.imul(ve, Kt) | 0, U = U + Math.imul(V, xt) | 0, D = D + Math.imul(V, Ft) | 0, D = D + Math.imul(re, xt) | 0, B = B + Math.imul(re, Ft) | 0; var Fr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Fr >>> 26) | 0, Fr &= 67108863, U = Math.imul(Qe, pe), D = Math.imul(Qe, Pe), D = D + Math.imul(tt, pe) | 0, B = Math.imul(tt, Pe), U = U + Math.imul(ot, He) | 0, D = D + Math.imul(ot, it) | 0, D = D + Math.imul(Ue, He) | 0, B = B + Math.imul(Ue, it) | 0, U = U + Math.imul(Ye, Me) | 0, D = D + Math.imul(Ye, Le) | 0, D = D + Math.imul(nt, Me) | 0, B = B + Math.imul(nt, Le) | 0, U = U + Math.imul(we, Se) | 0, D = D + Math.imul(we, Ie) | 0, D = D + Math.imul(_e, Se) | 0, B = B + Math.imul(_e, Ie) | 0, U = U + Math.imul(G, Ge) | 0, D = D + Math.imul(G, rt) | 0, D = D + Math.imul(Y, Ge) | 0, B = B + Math.imul(Y, rt) | 0, U = U + Math.imul(se, wt) | 0, D = D + Math.imul(se, Ot) | 0, D = D + Math.imul(Ce, wt) | 0, B = B + Math.imul(Ce, Ot) | 0, U = U + Math.imul(he, ct) | 0, D = D + Math.imul(he, At) | 0, D = D + Math.imul(ke, ct) | 0, B = B + Math.imul(ke, At) | 0, U = U + Math.imul(oe, bt) | 0, D = D + Math.imul(oe, Kt) | 0, D = D + Math.imul(J, bt) | 0, B = B + Math.imul(J, Kt) | 0, U = U + Math.imul(ce, xt) | 0, D = D + Math.imul(ce, Ft) | 0, D = D + Math.imul(ve, xt) | 0, B = B + Math.imul(ve, Ft) | 0; var Lr = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Lr >>> 26) | 0, Lr &= 67108863, U = Math.imul(Qe, He), D = Math.imul(Qe, it), D = D + Math.imul(tt, He) | 0, B = Math.imul(tt, it), U = U + Math.imul(ot, Me) | 0, D = D + Math.imul(ot, Le) | 0, D = D + Math.imul(Ue, Me) | 0, B = B + Math.imul(Ue, Le) | 0, U = U + Math.imul(Ye, Se) | 0, D = D + Math.imul(Ye, Ie) | 0, D = D + Math.imul(nt, Se) | 0, B = B + Math.imul(nt, Ie) | 0, U = U + Math.imul(we, Ge) | 0, D = D + Math.imul(we, rt) | 0, D = D + Math.imul(_e, Ge) | 0, B = B + Math.imul(_e, rt) | 0, U = U + Math.imul(G, wt) | 0, D = D + Math.imul(G, Ot) | 0, D = D + Math.imul(Y, wt) | 0, B = B + Math.imul(Y, Ot) | 0, U = U + Math.imul(se, ct) | 0, D = D + Math.imul(se, At) | 0, D = D + Math.imul(Ce, ct) | 0, B = B + Math.imul(Ce, At) | 0, U = U + Math.imul(he, bt) | 0, D = D + Math.imul(he, Kt) | 0, D = D + Math.imul(ke, bt) | 0, B = B + Math.imul(ke, Kt) | 0, U = U + Math.imul(oe, xt) | 0, D = D + Math.imul(oe, Ft) | 0, D = D + Math.imul(J, xt) | 0, B = B + Math.imul(J, Ft) | 0; var Ur = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Ur >>> 26) | 0, Ur &= 67108863, U = Math.imul(Qe, Me), D = Math.imul(Qe, Le), D = D + Math.imul(tt, Me) | 0, B = Math.imul(tt, Le), U = U + Math.imul(ot, Se) | 0, D = D + Math.imul(ot, Ie) | 0, D = D + Math.imul(Ue, Se) | 0, B = B + Math.imul(Ue, Ie) | 0, U = U + Math.imul(Ye, Ge) | 0, D = D + Math.imul(Ye, rt) | 0, D = D + Math.imul(nt, Ge) | 0, B = B + Math.imul(nt, rt) | 0, U = U + Math.imul(we, wt) | 0, D = D + Math.imul(we, Ot) | 0, D = D + Math.imul(_e, wt) | 0, B = B + Math.imul(_e, Ot) | 0, U = U + Math.imul(G, ct) | 0, D = D + Math.imul(G, At) | 0, D = D + Math.imul(Y, ct) | 0, B = B + Math.imul(Y, At) | 0, U = U + Math.imul(se, bt) | 0, D = D + Math.imul(se, Kt) | 0, D = D + Math.imul(Ce, bt) | 0, B = B + Math.imul(Ce, Kt) | 0, U = U + Math.imul(he, xt) | 0, D = D + Math.imul(he, Ft) | 0, D = D + Math.imul(ke, xt) | 0, B = B + Math.imul(ke, Ft) | 0; var vt = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (vt >>> 26) | 0, vt &= 67108863, U = Math.imul(Qe, Se), D = Math.imul(Qe, Ie), D = D + Math.imul(tt, Se) | 0, B = Math.imul(tt, Ie), U = U + Math.imul(ot, Ge) | 0, D = D + Math.imul(ot, rt) | 0, D = D + Math.imul(Ue, Ge) | 0, B = B + Math.imul(Ue, rt) | 0, U = U + Math.imul(Ye, wt) | 0, D = D + Math.imul(Ye, Ot) | 0, D = D + Math.imul(nt, wt) | 0, B = B + Math.imul(nt, Ot) | 0, U = U + Math.imul(we, ct) | 0, D = D + Math.imul(we, At) | 0, D = D + Math.imul(_e, ct) | 0, B = B + Math.imul(_e, At) | 0, U = U + Math.imul(G, bt) | 0, D = D + Math.imul(G, Kt) | 0, D = D + Math.imul(Y, bt) | 0, B = B + Math.imul(Y, Kt) | 0, U = U + Math.imul(se, xt) | 0, D = D + Math.imul(se, Ft) | 0, D = D + Math.imul(Ce, xt) | 0, B = B + Math.imul(Ce, Ft) | 0; var Ke = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Ke >>> 26) | 0, Ke &= 67108863, U = Math.imul(Qe, Ge), D = Math.imul(Qe, rt), D = D + Math.imul(tt, Ge) | 0, B = Math.imul(tt, rt), U = U + Math.imul(ot, wt) | 0, D = D + Math.imul(ot, Ot) | 0, D = D + Math.imul(Ue, wt) | 0, B = B + Math.imul(Ue, Ot) | 0, U = U + Math.imul(Ye, ct) | 0, D = D + Math.imul(Ye, At) | 0, D = D + Math.imul(nt, ct) | 0, B = B + Math.imul(nt, At) | 0, U = U + Math.imul(we, bt) | 0, D = D + Math.imul(we, Kt) | 0, D = D + Math.imul(_e, bt) | 0, B = B + Math.imul(_e, Kt) | 0, U = U + Math.imul(G, xt) | 0, D = D + Math.imul(G, Ft) | 0, D = D + Math.imul(Y, xt) | 0, B = B + Math.imul(Y, Ft) | 0; var me = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (me >>> 26) | 0, me &= 67108863, U = Math.imul(Qe, wt), D = Math.imul(Qe, Ot), D = D + Math.imul(tt, wt) | 0, B = Math.imul(tt, Ot), U = U + Math.imul(ot, ct) | 0, D = D + Math.imul(ot, At) | 0, D = D + Math.imul(Ue, ct) | 0, B = B + Math.imul(Ue, At) | 0, U = U + Math.imul(Ye, bt) | 0, D = D + Math.imul(Ye, Kt) | 0, D = D + Math.imul(nt, bt) | 0, B = B + Math.imul(nt, Kt) | 0, U = U + Math.imul(we, xt) | 0, D = D + Math.imul(we, Ft) | 0, D = D + Math.imul(_e, xt) | 0, B = B + Math.imul(_e, Ft) | 0; var Fe = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Fe >>> 26) | 0, Fe &= 67108863, U = Math.imul(Qe, ct), D = Math.imul(Qe, At), D = D + Math.imul(tt, ct) | 0, B = Math.imul(tt, At), U = U + Math.imul(ot, bt) | 0, D = D + Math.imul(ot, Kt) | 0, D = D + Math.imul(Ue, bt) | 0, B = B + Math.imul(Ue, Kt) | 0, U = U + Math.imul(Ye, xt) | 0, D = D + Math.imul(Ye, Ft) | 0, D = D + Math.imul(nt, xt) | 0, B = B + Math.imul(nt, Ft) | 0; var Be = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (Be >>> 26) | 0, Be &= 67108863, U = Math.imul(Qe, bt), D = Math.imul(Qe, Kt), D = D + Math.imul(tt, bt) | 0, B = Math.imul(tt, Kt), U = U + Math.imul(ot, xt) | 0, D = D + Math.imul(ot, Ft) | 0, D = D + Math.imul(Ue, xt) | 0, B = B + Math.imul(Ue, Ft) | 0; var dt = (W + U | 0) + ((D & 8191) << 13) | 0; W = (B + (D >>> 13) | 0) + (dt >>> 26) | 0, dt &= 67108863, U = Math.imul(Qe, xt), D = Math.imul(Qe, Ft), D = D + Math.imul(tt, xt) | 0, B = Math.imul(tt, Ft); var St = (W + U | 0) + ((D & 8191) << 13) | 0; return W = (B + (D >>> 13) | 0) + (St >>> 26) | 0, St &= 67108863, $[0] = Lt, $[1] = Et, $[2] = Dr, $[3] = Or, $[4] = Gr, $[5] = Nr, $[6] = Yr, $[7] = Qt, $[8] = Xr, $[9] = Fr, $[10] = Lr, $[11] = Ur, $[12] = vt, $[13] = Ke, $[14] = me, $[15] = Fe, $[16] = Be, $[17] = dt, $[18] = St, W !== 0 && ($[19] = W, E.length++), E; }; Math.imul || (r = a); function t(I, R, C) { C.negative = R.negative ^ I.negative, C.length = I.length + R.length; for (var E = 0, A = 0, L = 0; L < C.length - 1; L++) { var $ = A; A = 0; for (var W = E & 67108863, U = Math.min(L, R.length - 1), D = Math.max(0, L - I.length + 1); D <= U; D++) { var B = L - D, j = I.words[B] | 0, V = R.words[D] | 0, re = j * V, ee = re & 67108863; $ = $ + (re / 67108864 | 0) | 0, ee = ee + W | 0, W = ee & 67108863, $ = $ + (ee >>> 26) | 0, A += $ >>> 26, $ &= 67108863; } C.words[L] = W, E = $, $ = A; } return E !== 0 ? C.words[L] = E : C.length--, C.strip(); } function i(I, R, C) { var E = new n(); return E.mulp(I, R, C); } f.prototype.mulTo = function(R, C) { var E, A = this.length + R.length; return this.length === 10 && R.length === 10 ? E = r(this, R, C) : A < 63 ? E = a(this, R, C) : A < 1024 ? E = t(this, R, C) : E = i(this, R, C), E; }; function n(I, R) { this.x = I, this.y = R; } n.prototype.makeRBT = function(R) { for (var C = new Array(R), E = f.prototype._countBits(R) - 1, A = 0; A < R; A++) C[A] = this.revBin(A, E, R); return C; }, n.prototype.revBin = function(R, C, E) { if (R === 0 || R === E - 1) return R; for (var A = 0, L = 0; L < C; L++) A |= (R & 1) << C - L - 1, R >>= 1; return A; }, n.prototype.permute = function(R, C, E, A, L, $) { for (var W = 0; W < $; W++) A[W] = C[R[W]], L[W] = E[R[W]]; }, n.prototype.transform = function(R, C, E, A, L, $) { this.permute($, R, C, E, A, L); for (var W = 1; W < L; W <<= 1) for (var U = W << 1, D = Math.cos(2 * Math.PI / U), B = Math.sin(2 * Math.PI / U), j = 0; j < L; j += U) for (var V = D, re = B, ee = 0; ee < W; ee++) { var ce = E[j + ee], ve = A[j + ee], ge = E[j + ee + W], oe = A[j + ee + W], J = V * ge - re * oe; oe = V * oe + re * ge, ge = J, E[j + ee] = ce + ge, A[j + ee] = ve + oe, E[j + ee + W] = ce - ge, A[j + ee + W] = ve - oe, ee !== U && (J = D * V - B * re, re = D * re + B * V, V = J); } }, n.prototype.guessLen13b = function(R, C) { var E = Math.max(C, R) | 1, A = E & 1, L = 0; for (E = E / 2 | 0; E; E = E >>> 1) L++; return 1 << L + 1 + A; }, n.prototype.conjugate = function(R, C, E) { if (!(E <= 1)) for (var A = 0; A < E / 2; A++) { var L = R[A]; R[A] = R[E - A - 1], R[E - A - 1] = L, L = C[A], C[A] = -C[E - A - 1], C[E - A - 1] = -L; } }, n.prototype.normalize13b = function(R, C) { for (var E = 0, A = 0; A < C / 2; A++) { var L = Math.round(R[2 * A + 1] / C) * 8192 + Math.round(R[2 * A] / C) + E; R[A] = L & 67108863, L < 67108864 ? E = 0 : E = L / 67108864 | 0; } return R; }, n.prototype.convert13b = function(R, C, E, A) { for (var L = 0, $ = 0; $ < C; $++) L = L + (R[$] | 0), E[2 * $] = L & 8191, L = L >>> 13, E[2 * $ + 1] = L & 8191, L = L >>> 13; for ($ = 2 * C; $ < A; ++$) E[$] = 0; b(L === 0), b((L & -8192) === 0); }, n.prototype.stub = function(R) { for (var C = new Array(R), E = 0; E < R; E++) C[E] = 0; return C; }, n.prototype.mulp = function(R, C, E) { var A = 2 * this.guessLen13b(R.length, C.length), L = this.makeRBT(A), $ = this.stub(A), W = new Array(A), U = new Array(A), D = new Array(A), B = new Array(A), j = new Array(A), V = new Array(A), re = E.words; re.length = A, this.convert13b(R.words, R.length, W, A), this.convert13b(C.words, C.length, B, A), this.transform(W, $, U, D, A, L), this.transform(B, $, j, V, A, L); for (var ee = 0; ee < A; ee++) { var ce = U[ee] * j[ee] - D[ee] * V[ee]; D[ee] = U[ee] * V[ee] + D[ee] * j[ee], U[ee] = ce; } return this.conjugate(U, D, A), this.transform(U, D, re, $, A, L), this.conjugate(re, $, A), this.normalize13b(re, A), E.negative = R.negative ^ C.negative, E.length = R.length + C.length, E.strip(); }, f.prototype.mul = function(R) { var C = new f(null); return C.words = new Array(this.length + R.length), this.mulTo(R, C); }, f.prototype.mulf = function(R) { var C = new f(null); return C.words = new Array(this.length + R.length), i(this, R, C); }, f.prototype.imul = function(R) { return this.clone().mulTo(R, this); }, f.prototype.imuln = function(R) { b(typeof R == "number"), b(R < 67108864); for (var C = 0, E = 0; E < this.length; E++) { var A = (this.words[E] | 0) * R, L = (A & 67108863) + (C & 67108863); C >>= 26, C += A / 67108864 | 0, C += L >>> 26, this.words[E] = L & 67108863; } return C !== 0 && (this.words[E] = C, this.length++), this; }, f.prototype.muln = function(R) { return this.clone().imuln(R); }, f.prototype.sqr = function() { return this.mul(this); }, f.prototype.isqr = function() { return this.imul(this.clone()); }, f.prototype.pow = function(R) { var C = c(R); if (C.length === 0) return new f(1); for (var E = this, A = 0; A < C.length && C[A] === 0; A++, E = E.sqr()) ; if (++A < C.length) for (var L = E.sqr(); A < C.length; A++, L = L.sqr()) C[A] !== 0 && (E = E.mul(L)); return E; }, f.prototype.iushln = function(R) { b(typeof R == "number" && R >= 0); var C = R % 26, E = (R - C) / 26, A = 67108863 >>> 26 - C << 26 - C, L; if (C !== 0) { var $ = 0; for (L = 0; L < this.length; L++) { var W = this.words[L] & A, U = (this.words[L] | 0) - W << C; this.words[L] = U | $, $ = W >>> 26 - C; } $ && (this.words[L] = $, this.length++); } if (E !== 0) { for (L = this.length - 1; L >= 0; L--) this.words[L + E] = this.words[L]; for (L = 0; L < E; L++) this.words[L] = 0; this.length += E; } return this.strip(); }, f.prototype.ishln = function(R) { return b(this.negative === 0), this.iushln(R); }, f.prototype.iushrn = function(R, C, E) { b(typeof R == "number" && R >= 0); var A; C ? A = (C - C % 26) / 26 : A = 0; var L = R % 26, $ = Math.min((R - L) / 26, this.length), W = 67108863 ^ 67108863 >>> L << L, U = E; if (A -= $, A = Math.max(0, A), U) { for (var D = 0; D < $; D++) U.words[D] = this.words[D]; U.length = $; } if ($ !== 0) if (this.length > $) for (this.length -= $, D = 0; D < this.length; D++) this.words[D] = this.words[D + $]; else this.words[0] = 0, this.length = 1; var B = 0; for (D = this.length - 1; D >= 0 && (B !== 0 || D >= A); D--) { var j = this.words[D] | 0; this.words[D] = B << 26 - L | j >>> L, B = j & W; } return U && B !== 0 && (U.words[U.length++] = B), this.length === 0 && (this.words[0] = 0, this.length = 1), this.strip(); }, f.prototype.ishrn = function(R, C, E) { return b(this.negative === 0), this.iushrn(R, C, E); }, f.prototype.shln = function(R) { return this.clone().ishln(R); }, f.prototype.ushln = function(R) { return this.clone().iushln(R); }, f.prototype.shrn = function(R) { return this.clone().ishrn(R); }, f.prototype.ushrn = function(R) { return this.clone().iushrn(R); }, f.prototype.testn = function(R) { b(typeof R == "number" && R >= 0); var C = R % 26, E = (R - C) / 26, A = 1 << C; if (this.length <= E) return !1; var L = this.words[E]; return !!(L & A); }, f.prototype.imaskn = function(R) { b(typeof R == "number" && R >= 0); var C = R % 26, E = (R - C) / 26; if (b(this.negative === 0, "imaskn works only with positive numbers"), this.length <= E) return this; if (C !== 0 && E++, this.length = Math.min(E, this.length), C !== 0) { var A = 67108863 ^ 67108863 >>> C << C; this.words[this.length - 1] &= A; } return this.strip(); }, f.prototype.maskn = function(R) { return this.clone().imaskn(R); }, f.prototype.iaddn = function(R) { return b(typeof R == "number"), b(R < 67108864), R < 0 ? this.isubn(-R) : this.negative !== 0 ? this.length === 1 && (this.words[0] | 0) < R ? (this.words[0] = R - (this.words[0] | 0), this.negative = 0, this) : (this.negative = 0, this.isubn(R), this.negative = 1, this) : this._iaddn(R); }, f.prototype._iaddn = function(R) { this.words[0] += R; for (var C = 0; C < this.length && this.words[C] >= 67108864; C++) this.words[C] -= 67108864, C === this.length - 1 ? this.words[C + 1] = 1 : this.words[C + 1]++; return this.length = Math.max(this.length, C + 1), this; }, f.prototype.isubn = function(R) { if (b(typeof R == "number"), b(R < 67108864), R < 0) return this.iaddn(-R); if (this.negative !== 0) return this.negative = 0, this.iaddn(R), this.negative = 1, this; if (this.words[0] -= R, this.length === 1 && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; else for (var C = 0; C < this.length && this.words[C] < 0; C++) this.words[C] += 67108864, this.words[C + 1] -= 1; return this.strip(); }, f.prototype.addn = function(R) { return this.clone().iaddn(R); }, f.prototype.subn = function(R) { return this.clone().isubn(R); }, f.prototype.iabs = function() { return this.negative = 0, this; }, f.prototype.abs = function() { return this.clone().iabs(); }, f.prototype._ishlnsubmul = function(R, C, E) { var A = R.length + E, L; this._expand(A); var $, W = 0; for (L = 0; L < R.length; L++) { $ = (this.words[L + E] | 0) + W; var U = (R.words[L] | 0) * C; $ -= U & 67108863, W = ($ >> 26) - (U / 67108864 | 0), this.words[L + E] = $ & 67108863; } for (; L < this.length - E; L++) $ = (this.words[L + E] | 0) + W, W = $ >> 26, this.words[L + E] = $ & 67108863; if (W === 0) return this.strip(); for (b(W === -1), W = 0, L = 0; L < this.length; L++) $ = -(this.words[L] | 0) + W, W = $ >> 26, this.words[L] = $ & 67108863; return this.negative = 1, this.strip(); }, f.prototype._wordDiv = function(R, C) { var E = this.length - R.length, A = this.clone(), L = R, $ = L.words[L.length - 1] | 0, W = this._countBits($); E = 26 - W, E !== 0 && (L = L.ushln(E), A.iushln(E), $ = L.words[L.length - 1] | 0); var U = A.length - L.length, D; if (C !== "mod") { D = new f(null), D.length = U + 1, D.words = new Array(D.length); for (var B = 0; B < D.length; B++) D.words[B] = 0; } var j = A.clone()._ishlnsubmul(L, 1, U); j.negative === 0 && (A = j, D && (D.words[U] = 1)); for (var V = U - 1; V >= 0; V--) { var re = (A.words[L.length + V] | 0) * 67108864 + (A.words[L.length + V - 1] | 0); for (re = Math.min(re / $ | 0, 67108863), A._ishlnsubmul(L, re, V); A.negative !== 0; ) re--, A.negative = 0, A._ishlnsubmul(L, 1, V), A.isZero() || (A.negative ^= 1); D && (D.words[V] = re); } return D && D.strip(), A.strip(), C !== "div" && E !== 0 && A.iushrn(E), { div: D || null, mod: A }; }, f.prototype.divmod = function(R, C, E) { if (b(!R.isZero()), this.isZero()) return { div: new f(0), mod: new f(0) }; var A, L, $; return this.negative !== 0 && R.negative === 0 ? ($ = this.neg().divmod(R, C), C !== "mod" && (A = $.div.neg()), C !== "div" && (L = $.mod.neg(), E && L.negative !== 0 && L.iadd(R)), { div: A, mod: L }) : this.negative === 0 && R.negative !== 0 ? ($ = this.divmod(R.neg(), C), C !== "mod" && (A = $.div.neg()), { div: A, mod: $.mod }) : this.negative & R.negative ? ($ = this.neg().divmod(R.neg(), C), C !== "div" && (L = $.mod.neg(), E && L.negative !== 0 && L.isub(R)), { div: $.div, mod: L }) : R.length > this.length || this.cmp(R) < 0 ? { div: new f(0), mod: this } : R.length === 1 ? C === "div" ? { div: this.divn(R.words[0]), mod: null } : C === "mod" ? { div: null, mod: new f(this.modn(R.words[0])) } : { div: this.divn(R.words[0]), mod: new f(this.modn(R.words[0])) } : this._wordDiv(R, C); }, f.prototype.div = function(R) { return this.divmod(R, "div", !1).div; }, f.prototype.mod = function(R) { return this.divmod(R, "mod", !1).mod; }, f.prototype.umod = function(R) { return this.divmod(R, "mod", !0).mod; }, f.prototype.divRound = function(R) { var C = this.divmod(R); if (C.mod.isZero()) return C.div; var E = C.div.negative !== 0 ? C.mod.isub(R) : C.mod, A = R.ushrn(1), L = R.andln(1), $ = E.cmp(A); return $ < 0 || L === 1 && $ === 0 ? C.div : C.div.negative !== 0 ? C.div.isubn(1) : C.div.iaddn(1); }, f.prototype.modn = function(R) { b(R <= 67108863); for (var C = (1 << 26) % R, E = 0, A = this.length - 1; A >= 0; A--) E = (C * E + (this.words[A] | 0)) % R; return E; }, f.prototype.idivn = function(R) { b(R <= 67108863); for (var C = 0, E = this.length - 1; E >= 0; E--) { var A = (this.words[E] | 0) + C * 67108864; this.words[E] = A / R | 0, C = A % R; } return this.strip(); }, f.prototype.divn = function(R) { return this.clone().idivn(R); }, f.prototype.egcd = function(R) { b(R.negative === 0), b(!R.isZero()); var C = this, E = R.clone(); C.negative !== 0 ? C = C.umod(R) : C = C.clone(); for (var A = new f(1), L = new f(0), $ = new f(0), W = new f(1), U = 0; C.isEven() && E.isEven(); ) C.iushrn(1), E.iushrn(1), ++U; for (var D = E.clone(), B = C.clone(); !C.isZero(); ) { for (var j = 0, V = 1; !(C.words[0] & V) && j < 26; ++j, V <<= 1) ; if (j > 0) for (C.iushrn(j); j-- > 0; ) (A.isOdd() || L.isOdd()) && (A.iadd(D), L.isub(B)), A.iushrn(1), L.iushrn(1); for (var re = 0, ee = 1; !(E.words[0] & ee) && re < 26; ++re, ee <<= 1) ; if (re > 0) for (E.iushrn(re); re-- > 0; ) ($.isOdd() || W.isOdd()) && ($.iadd(D), W.isub(B)), $.iushrn(1), W.iushrn(1); C.cmp(E) >= 0 ? (C.isub(E), A.isub($), L.isub(W)) : (E.isub(C), $.isub(A), W.isub(L)); } return { a: $, b: W, gcd: E.iushln(U) }; }, f.prototype._invmp = function(R) { b(R.negative === 0), b(!R.isZero()); var C = this, E = R.clone(); C.negative !== 0 ? C = C.umod(R) : C = C.clone(); for (var A = new f(1), L = new f(0), $ = E.clone(); C.cmpn(1) > 0 && E.cmpn(1) > 0; ) { for (var W = 0, U = 1; !(C.words[0] & U) && W < 26; ++W, U <<= 1) ; if (W > 0) for (C.iushrn(W); W-- > 0; ) A.isOdd() && A.iadd($), A.iushrn(1); for (var D = 0, B = 1; !(E.words[0] & B) && D < 26; ++D, B <<= 1) ; if (D > 0) for (E.iushrn(D); D-- > 0; ) L.isOdd() && L.iadd($), L.iushrn(1); C.cmp(E) >= 0 ? (C.isub(E), A.isub(L)) : (E.isub(C), L.isub(A)); } var j; return C.cmpn(1) === 0 ? j = A : j = L, j.cmpn(0) < 0 && j.iadd(R), j; }, f.prototype.gcd = function(R) { if (this.isZero()) return R.abs(); if (R.isZero()) return this.abs(); var C = this.clone(), E = R.clone(); C.negative = 0, E.negative = 0; for (var A = 0; C.isEven() && E.isEven(); A++) C.iushrn(1), E.iushrn(1); do { for (; C.isEven(); ) C.iushrn(1); for (; E.isEven(); ) E.iushrn(1); var L = C.cmp(E); if (L < 0) { var $ = C; C = E, E = $; } else if (L === 0 || E.cmpn(1) === 0) break; C.isub(E); } while (!0); return E.iushln(A); }, f.prototype.invm = function(R) { return this.egcd(R).a.umod(R); }, f.prototype.isEven = function() { return (this.words[0] & 1) === 0; }, f.prototype.isOdd = function() { return (this.words[0] & 1) === 1; }, f.prototype.andln = function(R) { return this.words[0] & R; }, f.prototype.bincn = function(R) { b(typeof R == "number"); var C = R % 26, E = (R - C) / 26, A = 1 << C; if (this.length <= E) return this._expand(E + 1), this.words[E] |= A, this; for (var L = A, $ = E; L !== 0 && $ < this.length; $++) { var W = this.words[$] | 0; W += L, L = W >>> 26, W &= 67108863, this.words[$] = W; } return L !== 0 && (this.words[$] = L, this.length++), this; }, f.prototype.isZero = function() { return this.length === 1 && this.words[0] === 0; }, f.prototype.cmpn = function(R) { var C = R < 0; if (this.negative !== 0 && !C) return -1; if (this.negative === 0 && C) return 1; this.strip(); var E; if (this.length > 1) E = 1; else { C && (R = -R), b(R <= 67108863, "Number is too big"); var A = this.words[0] | 0; E = A === R ? 0 : A < R ? -1 : 1; } return this.negative !== 0 ? -E | 0 : E; }, f.prototype.cmp = function(R) { if (this.negative !== 0 && R.negative === 0) return -1; if (this.negative === 0 && R.negative !== 0) return 1; var C = this.ucmp(R); return this.negative !== 0 ? -C | 0 : C; }, f.prototype.ucmp = function(R) { if (this.length > R.length) return 1; if (this.length < R.length) return -1; for (var C = 0, E = this.length - 1; E >= 0; E--) { var A = this.words[E] | 0, L = R.words[E] | 0; if (A !== L) { A < L ? C = -1 : A > L && (C = 1); break; } } return C; }, f.prototype.gtn = function(R) { return this.cmpn(R) === 1; }, f.prototype.gt = function(R) { return this.cmp(R) === 1; }, f.prototype.gten = function(R) { return this.cmpn(R) >= 0; }, f.prototype.gte = function(R) { return this.cmp(R) >= 0; }, f.prototype.ltn = function(R) { return this.cmpn(R) === -1; }, f.prototype.lt = function(R) { return this.cmp(R) === -1; }, f.prototype.lten = function(R) { return this.cmpn(R) <= 0; }, f.prototype.lte = function(R) { return this.cmp(R) <= 0; }, f.prototype.eqn = function(R) { return this.cmpn(R) === 0; }, f.prototype.eq = function(R) { return this.cmp(R) === 0; }, f.red = function(R) { return new N(R); }, f.prototype.toRed = function(R) { return b(!this.red, "Already a number in reduction context"), b(this.negative === 0, "red works only with positives"), R.convertTo(this)._forceRed(R); }, f.prototype.fromRed = function() { return b(this.red, "fromRed works only with numbers in reduction context"), this.red.convertFrom(this); }, f.prototype._forceRed = function(R) { return this.red = R, this; }, f.prototype.forceRed = function(R) { return b(!this.red, "Already a number in reduction context"), this._forceRed(R); }, f.prototype.redAdd = function(R) { return b(this.red, "redAdd works only with red numbers"), this.red.add(this, R); }, f.prototype.redIAdd = function(R) { return b(this.red, "redIAdd works only with red numbers"), this.red.iadd(this, R); }, f.prototype.redSub = function(R) { return b(this.red, "redSub works only with red numbers"), this.red.sub(this, R); }, f.prototype.redISub = function(R) { return b(this.red, "redISub works only with red numbers"), this.red.isub(this, R); }, f.prototype.redShl = function(R) { return b(this.red, "redShl works only with red numbers"), this.red.shl(this, R); }, f.prototype.redMul = function(R) { return b(this.red, "redMul works only with red numbers"), this.red._verify2(this, R), this.red.mul(this, R); }, f.prototype.redIMul = function(R) { return b(this.red, "redMul works only with red numbers"), this.red._verify2(this, R), this.red.imul(this, R); }, f.prototype.redSqr = function() { return b(this.red, "redSqr works only with red numbers"), this.red._verify1(this), this.red.sqr(this); }, f.prototype.redISqr = function() { return b(this.red, "redISqr works only with red numbers"), this.red._verify1(this), this.red.isqr(this); }, f.prototype.redSqrt = function() { return b(this.red, "redSqrt works only with red numbers"), this.red._verify1(this), this.red.sqrt(this); }, f.prototype.redInvm = function() { return b(this.red, "redInvm works only with red numbers"), this.red._verify1(this), this.red.invm(this); }, f.prototype.redNeg = function() { return b(this.red, "redNeg works only with red numbers"), this.red._verify1(this), this.red.neg(this); }, f.prototype.redPow = function(R) { return b(this.red && !R.red, "redPow(normalNum)"), this.red._verify1(this), this.red.pow(this, R); }; var o = { k256: null, p224: null, p192: null, p25519: null }; function p(I, R) { this.name = I, this.p = new f(R, 16), this.n = this.p.bitLength(), this.k = new f(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); } p.prototype._tmp = function() { var R = new f(null); return R.words = new Array(Math.ceil(this.n / 13)), R; }, p.prototype.ireduce = function(R) { var C = R, E; do this.split(C, this.tmp), C = this.imulK(C), C = C.iadd(this.tmp), E = C.bitLength(); while (E > this.n); var A = E < this.n ? -1 : C.ucmp(this.p); return A === 0 ? (C.words[0] = 0, C.length = 1) : A > 0 ? C.isub(this.p) : C.strip !== void 0 ? C.strip() : C._strip(), C; }, p.prototype.split = function(R, C) { R.iushrn(this.n, 0, C); }, p.prototype.imulK = function(R) { return R.imul(this.k); }; function O() { p.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f"); } w(O, p), O.prototype.split = function(R, C) { for (var E = 4194303, A = Math.min(R.length, 9), L = 0; L < A; L++) C.words[L] = R.words[L]; if (C.length = A, R.length <= 9) { R.words[0] = 0, R.length = 1; return; } var $ = R.words[9]; for (C.words[C.length++] = $ & E, L = 10; L < R.length; L++) { var W = R.words[L] | 0; R.words[L - 10] = (W & E) << 4 | $ >>> 22, $ = W; } $ >>>= 22, R.words[L - 10] = $, $ === 0 && R.length > 10 ? R.length -= 10 : R.length -= 9; }, O.prototype.imulK = function(R) { R.words[R.length] = 0, R.words[R.length + 1] = 0, R.length += 2; for (var C = 0, E = 0; E < R.length; E++) { var A = R.words[E] | 0; C += A * 977, R.words[E] = C & 67108863, C = A * 64 + (C / 67108864 | 0); } return R.words[R.length - 1] === 0 && (R.length--, R.words[R.length - 1] === 0 && R.length--), R; }; function P() { p.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001"); } w(P, p); function F() { p.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff"); } w(F, p); function z() { p.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed"); } w(z, p), z.prototype.imulK = function(R) { for (var C = 0, E = 0; E < R.length; E++) { var A = (R.words[E] | 0) * 19 + C, L = A & 67108863; A >>>= 26, R.words[E] = L, C = A; } return C !== 0 && (R.words[R.length++] = C), R; }, f._prime = function(R) { if (o[R]) return o[R]; var C; if (R === "k256") C = new O(); else if (R === "p224") C = new P(); else if (R === "p192") C = new F(); else if (R === "p25519") C = new z(); else throw new Error("Unknown prime " + R); return o[R] = C, C; }; function N(I) { if (typeof I == "string") { var R = f._prime(I); this.m = R.p, this.prime = R; } else b(I.gtn(1), "modulus must be greater than 1"), this.m = I, this.prime = null; } N.prototype._verify1 = function(R) { b(R.negative === 0, "red works only with positives"), b(R.red, "red works only with red numbers"); }, N.prototype._verify2 = function(R, C) { b((R.negative | C.negative) === 0, "red works only with positives"), b(R.red && R.red === C.red, "red works only with red numbers"); }, N.prototype.imod = function(R) { return this.prime ? this.prime.ireduce(R)._forceRed(this) : R.umod(this.m)._forceRed(this); }, N.prototype.neg = function(R) { return R.isZero() ? R.clone() : this.m.sub(R)._forceRed(this); }, N.prototype.add = function(R, C) { this._verify2(R, C); var E = R.add(C); return E.cmp(this.m) >= 0 && E.isub(this.m), E._forceRed(this); }, N.prototype.iadd = function(R, C) { this._verify2(R, C); var E = R.iadd(C); return E.cmp(this.m) >= 0 && E.isub(this.m), E; }, N.prototype.sub = function(R, C) { this._verify2(R, C); var E = R.sub(C); return E.cmpn(0) < 0 && E.iadd(this.m), E._forceRed(this); }, N.prototype.isub = function(R, C) { this._verify2(R, C); var E = R.isub(C); return E.cmpn(0) < 0 && E.iadd(this.m), E; }, N.prototype.shl = function(R, C) { return this._verify1(R), this.imod(R.ushln(C)); }, N.prototype.imul = function(R, C) { return this._verify2(R, C), this.imod(R.imul(C)); }, N.prototype.mul = function(R, C) { return this._verify2(R, C), this.imod(R.mul(C)); }, N.prototype.isqr = function(R) { return this.imul(R, R.clone()); }, N.prototype.sqr = function(R) { return this.mul(R, R); }, N.prototype.sqrt = function(R) { if (R.isZero()) return R.clone(); var C = this.m.andln(3); if (b(C % 2 === 1), C === 3) { var E = this.m.add(new f(1)).iushrn(2); return this.pow(R, E); } for (var A = this.m.subn(1), L = 0; !A.isZero() && A.andln(1) === 0; ) L++, A.iushrn(1); b(!A.isZero()); var $ = new f(1).toRed(this), W = $.redNeg(), U = this.m.subn(1).iushrn(1), D = this.m.bitLength(); for (D = new f(2 * D * D).toRed(this); this.pow(D, U).cmp(W) !== 0; ) D.redIAdd(W); for (var B = this.pow(D, A), j = this.pow(R, A.addn(1).iushrn(1)), V = this.pow(R, A), re = L; V.cmp($) !== 0; ) { for (var ee = V, ce = 0; ee.cmp($) !== 0; ce++) ee = ee.redSqr(); b(ce < re); var ve = this.pow(B, new f(1).iushln(re - ce - 1)); j = j.redMul(ve), B = ve.redSqr(), V = V.redMul(B), re = ce; } return j; }, N.prototype.invm = function(R) { var C = R._invmp(this.m); return C.negative !== 0 ? (C.negative = 0, this.imod(C).redNeg()) : this.imod(C); }, N.prototype.pow = function(R, C) { if (C.isZero()) return new f(1).toRed(this); if (C.cmpn(1) === 0) return R.clone(); var E = 4, A = new Array(1 << E); A[0] = new f(1).toRed(this), A[1] = R; for (var L = 2; L < A.length; L++) A[L] = this.mul(A[L - 1], R); var $ = A[0], W = 0, U = 0, D = C.bitLength() % 26; for (D === 0 && (D = 26), L = C.length - 1; L >= 0; L--) { for (var B = C.words[L], j = D - 1; j >= 0; j--) { var V = B >> j & 1; if ($ !== A[0] && ($ = this.sqr($)), V === 0 && W === 0) { U = 0; continue; } W <<= 1, W |= V, U++, !(U !== E && (L !== 0 || j !== 0)) && ($ = this.mul($, A[W]), U = 0, W = 0); } D = 26; } return $; }, N.prototype.convertTo = function(R) { var C = R.umod(this.m); return C === R ? C.clone() : C; }, N.prototype.convertFrom = function(R) { var C = R.clone(); return C.red = null, C; }, f.mont = function(R) { return new M(R); }; function M(I) { N.call(this, I), this.shift = this.m.bitLength(), this.shift % 26 !== 0 && (this.shift += 26 - this.shift % 26), this.r = new f(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv); } w(M, N), M.prototype.convertTo = function(R) { return this.imod(R.ushln(this.shift)); }, M.prototype.convertFrom = function(R) { var C = this.imod(R.mul(this.rinv)); return C.red = null, C; }, M.prototype.imul = function(R, C) { if (R.isZero() || C.isZero()) return R.words[0] = 0, R.length = 1, R; var E = R.imul(C), A = E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), L = E.isub(A).iushrn(this.shift), $ = L; return L.cmp(this.m) >= 0 ? $ = L.isub(this.m) : L.cmpn(0) < 0 && ($ = L.iadd(this.m)), $._forceRed(this); }, M.prototype.mul = function(R, C) { if (R.isZero() || C.isZero()) return new f(0)._forceRed(this); var E = R.mul(C), A = E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), L = E.isub(A).iushrn(this.shift), $ = L; return L.cmp(this.m) >= 0 ? $ = L.isub(this.m) : L.cmpn(0) < 0 && ($ = L.iadd(this.m)), $._forceRed(this); }, M.prototype.invm = function(R) { var C = this.imod(R._invmp(this.m).mul(this.r2)); return C._forceRed(this); }; })(typeof x == "undefined" || x, void 0); }, { buffer: 185 }], 182: [function(e, x, _) { _.byteLength = h, _.toByteArray = d, _.fromByteArray = c; for (var u = [], m = [], g = typeof Uint8Array != "undefined" ? Uint8Array : Array, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", w = 0, f = b.length; w < f; ++w) u[w] = b[w], m[b.charCodeAt(w)] = w; m["-".charCodeAt(0)] = 62, m["_".charCodeAt(0)] = 63; function y(a) { var r = a.length; if (r % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); var t = a.indexOf("="); t === -1 && (t = r); var i = t === r ? 0 : 4 - t % 4; return [t, i]; } function h(a) { var r = y(a), t = r[0], i = r[1]; return (t + i) * 3 / 4 - i; } function l(a, r, t) { return (r + t) * 3 / 4 - t; } function d(a) { var r, t = y(a), i = t[0], n = t[1], o = new g(l(a, i, n)), p = 0, O = n > 0 ? i - 4 : i, P; for (P = 0; P < O; P += 4) r = m[a.charCodeAt(P)] << 18 | m[a.charCodeAt(P + 1)] << 12 | m[a.charCodeAt(P + 2)] << 6 | m[a.charCodeAt(P + 3)], o[p++] = r >> 16 & 255, o[p++] = r >> 8 & 255, o[p++] = r & 255; return n === 2 && (r = m[a.charCodeAt(P)] << 2 | m[a.charCodeAt(P + 1)] >> 4, o[p++] = r & 255), n === 1 && (r = m[a.charCodeAt(P)] << 10 | m[a.charCodeAt(P + 1)] << 4 | m[a.charCodeAt(P + 2)] >> 2, o[p++] = r >> 8 & 255, o[p++] = r & 255), o; } function s(a) { return u[a >> 18 & 63] + u[a >> 12 & 63] + u[a >> 6 & 63] + u[a & 63]; } function v(a, r, t) { for (var i, n = [], o = r; o < t; o += 3) i = (a[o] << 16 & 16711680) + (a[o + 1] << 8 & 65280) + (a[o + 2] & 255), n.push(s(i)); return n.join(""); } function c(a) { for (var r, t = a.length, i = t % 3, n = [], o = 16383, p = 0, O = t - i; p < O; p += o) n.push(v(a, p, p + o > O ? O : p + o)); return i === 1 ? (r = a[t - 1], n.push(u[r >> 2] + u[r << 4 & 63] + "==")) : i === 2 && (r = (a[t - 2] << 8) + a[t - 1], n.push(u[r >> 10] + u[r >> 4 & 63] + u[r << 2 & 63] + "=")), n.join(""); } }, {}], 183: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } (function(m, g) { function b(C, E) { if (!C) throw new Error(E || "Assertion failed"); } function w(C, E) { C.super_ = E; var A = function() { }; A.prototype = E.prototype, C.prototype = new A(), C.prototype.constructor = C; } function f(C, E, A) { if (f.isBN(C)) return C; this.negative = 0, this.words = null, this.length = 0, this.red = null, C !== null && ((E === "le" || E === "be") && (A = E, E = 10), this._init(C || 0, E || 10, A || "be")); } u(m) === "object" ? m.exports = f : g.BN = f, f.BN = f, f.wordSize = 26; var y; try { y = e("buffer").Buffer; } catch (C) { } f.isBN = function(E) { return E instanceof f ? !0 : E !== null && u(E) === "object" && E.constructor.wordSize === f.wordSize && Array.isArray(E.words); }, f.max = function(E, A) { return E.cmp(A) > 0 ? E : A; }, f.min = function(E, A) { return E.cmp(A) < 0 ? E : A; }, f.prototype._init = function(E, A, L) { if (typeof E == "number") return this._initNumber(E, A, L); if (u(E) === "object") return this._initArray(E, A, L); A === "hex" && (A = 16), b(A === (A | 0) && A >= 2 && A <= 36), E = E.toString().replace(/\s+/g, ""); var $ = 0; E[0] === "-" && $++, A === 16 ? this._parseHex(E, $) : this._parseBase(E, A, $), E[0] === "-" && (this.negative = 1), this._strip(), L === "le" && this._initArray(this.toArray(), A, L); }, f.prototype._initNumber = function(E, A, L) { E < 0 && (this.negative = 1, E = -E), E < 67108864 ? (this.words = [E & 67108863], this.length = 1) : E < 4503599627370496 ? (this.words = [E & 67108863, E / 67108864 & 67108863], this.length = 2) : (b(E < 9007199254740992), this.words = [E & 67108863, E / 67108864 & 67108863, 1], this.length = 3), L === "le" && this._initArray(this.toArray(), A, L); }, f.prototype._initArray = function(E, A, L) { if (b(typeof E.length == "number"), E.length <= 0) return this.words = [0], this.length = 1, this; this.length = Math.ceil(E.length / 3), this.words = new Array(this.length); for (var $ = 0; $ < this.length; $++) this.words[$] = 0; var W, U, D = 0; if (L === "be") for ($ = E.length - 1, W = 0; $ >= 0; $ -= 3) U = E[$] | E[$ - 1] << 8 | E[$ - 2] << 16, this.words[W] |= U << D & 67108863, this.words[W + 1] = U >>> 26 - D & 67108863, D += 24, D >= 26 && (D -= 26, W++); else if (L === "le") for ($ = 0, W = 0; $ < E.length; $ += 3) U = E[$] | E[$ + 1] << 8 | E[$ + 2] << 16, this.words[W] |= U << D & 67108863, this.words[W + 1] = U >>> 26 - D & 67108863, D += 24, D >= 26 && (D -= 26, W++); return this._strip(); }; function h(C, E, A) { for (var L = 0, $ = Math.min(C.length, A), W = 0, U = E; U < $; U++) { var D = C.charCodeAt(U) - 48; L <<= 4; var B; D >= 49 && D <= 54 ? B = D - 49 + 10 : D >= 17 && D <= 22 ? B = D - 17 + 10 : B = D, L |= B, W |= B; } return b(!(W & 240), "Invalid character in " + C), L; } f.prototype._parseHex = function(E, A) { this.length = Math.ceil((E.length - A) / 6), this.words = new Array(this.length); for (var L = 0; L < this.length; L++) this.words[L] = 0; var $, W, U = 0; for (L = E.length - 6, $ = 0; L >= A; L -= 6) W = h(E, L, L + 6), this.words[$] |= W << U & 67108863, this.words[$ + 1] |= W >>> 26 - U & 4194303, U += 24, U >= 26 && (U -= 26, $++); L + 6 !== A && (W = h(E, A, L + 6), this.words[$] |= W << U & 67108863, this.words[$ + 1] |= W >>> 26 - U & 4194303), this._strip(); }; function l(C, E, A, L) { for (var $ = 0, W = 0, U = Math.min(C.length, A), D = E; D < U; D++) { var B = C.charCodeAt(D) - 48; $ *= L, B >= 49 ? W = B - 49 + 10 : B >= 17 ? W = B - 17 + 10 : W = B, b(B >= 0 && W < L, "Invalid character"), $ += W; } return $; } f.prototype._parseBase = function(E, A, L) { this.words = [0], this.length = 1; for (var $ = 0, W = 1; W <= 67108863; W *= A) $++; $--, W = W / A | 0; for (var U = E.length - L, D = U % $, B = Math.min(U, U - D) + L, j = 0, V = L; V < B; V += $) j = l(E, V, V + $, A), this.imuln(W), this.words[0] + j < 67108864 ? this.words[0] += j : this._iaddn(j); if (D !== 0) { var re = 1; for (j = l(E, V, E.length, A), V = 0; V < D; V++) re *= A; this.imuln(re), this.words[0] + j < 67108864 ? this.words[0] += j : this._iaddn(j); } }, f.prototype.copy = function(E) { E.words = new Array(this.length); for (var A = 0; A < this.length; A++) E.words[A] = this.words[A]; E.length = this.length, E.negative = this.negative, E.red = this.red; }; function d(C, E) { C.words = E.words, C.length = E.length, C.negative = E.negative, C.red = E.red; } if (f.prototype._move = function(E) { d(E, this); }, f.prototype.clone = function() { var E = new f(null); return this.copy(E), E; }, f.prototype._expand = function(E) { for (; this.length < E; ) this.words[this.length++] = 0; return this; }, f.prototype._strip = function() { for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length--; return this._normSign(); }, f.prototype._normSign = function() { return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this; }, typeof Symbol != "undefined" && typeof Symbol.for == "function") try { f.prototype[Symbol.for("nodejs.util.inspect.custom")] = s; } catch (C) { f.prototype.inspect = s; } else f.prototype.inspect = s; function s() { return (this.red ? ""; } var v = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"], c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], a = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; f.prototype.toString = function(E, A) { E = E || 10, A = A | 0 || 1; var L; if (E === 16 || E === "hex") { L = ""; for (var $ = 0, W = 0, U = 0; U < this.length; U++) { var D = this.words[U], B = ((D << $ | W) & 16777215).toString(16); W = D >>> 24 - $ & 16777215, W !== 0 || U !== this.length - 1 ? L = v[6 - B.length] + B + L : L = B + L, $ += 2, $ >= 26 && ($ -= 26, U--); } for (W !== 0 && (L = W.toString(16) + L); L.length % A !== 0; ) L = "0" + L; return this.negative !== 0 && (L = "-" + L), L; } if (E === (E | 0) && E >= 2 && E <= 36) { var j = c[E], V = a[E]; L = ""; var re = this.clone(); for (re.negative = 0; !re.isZero(); ) { var ee = re.modrn(V).toString(E); re = re.idivn(V), re.isZero() ? L = ee + L : L = v[j - ee.length] + ee + L; } for (this.isZero() && (L = "0" + L); L.length % A !== 0; ) L = "0" + L; return this.negative !== 0 && (L = "-" + L), L; } b(!1, "Base should be between 2 and 36"); }, f.prototype.toNumber = function() { var E = this.words[0]; return this.length === 2 ? E += this.words[1] * 67108864 : this.length === 3 && this.words[2] === 1 ? E += 4503599627370496 + this.words[1] * 67108864 : this.length > 2 && b(!1, "Number can only safely store up to 53 bits"), this.negative !== 0 ? -E : E; }, f.prototype.toJSON = function() { return this.toString(16, 2); }, y && (f.prototype.toBuffer = function(E, A) { return this.toArrayLike(y, E, A); }), f.prototype.toArray = function(E, A) { return this.toArrayLike(Array, E, A); }; var r = function(E, A) { return E.allocUnsafe ? E.allocUnsafe(A) : new E(A); }; f.prototype.toArrayLike = function(E, A, L) { this._strip(); var $ = this.byteLength(), W = L || Math.max(1, $); b($ <= W, "byte array longer than desired length"), b(W > 0, "Requested array length <= 0"); var U = r(E, W), D = A === "le" ? "LE" : "BE"; return this["_toArrayLike" + D](U, $), U; }, f.prototype._toArrayLikeLE = function(E, A) { for (var L = 0, $ = 0, W = 0, U = 0; W < this.length; W++) { var D = this.words[W] << U | $; E[L++] = D & 255, L < E.length && (E[L++] = D >> 8 & 255), L < E.length && (E[L++] = D >> 16 & 255), U === 6 ? (L < E.length && (E[L++] = D >> 24 & 255), $ = 0, U = 0) : ($ = D >>> 24, U += 2); } if (L < E.length) for (E[L++] = $; L < E.length; ) E[L++] = 0; }, f.prototype._toArrayLikeBE = function(E, A) { for (var L = E.length - 1, $ = 0, W = 0, U = 0; W < this.length; W++) { var D = this.words[W] << U | $; E[L--] = D & 255, L >= 0 && (E[L--] = D >> 8 & 255), L >= 0 && (E[L--] = D >> 16 & 255), U === 6 ? (L >= 0 && (E[L--] = D >> 24 & 255), $ = 0, U = 0) : ($ = D >>> 24, U += 2); } if (L >= 0) for (E[L--] = $; L >= 0; ) E[L--] = 0; }, Math.clz32 ? f.prototype._countBits = function(E) { return 32 - Math.clz32(E); } : f.prototype._countBits = function(E) { var A = E, L = 0; return A >= 4096 && (L += 13, A >>>= 13), A >= 64 && (L += 7, A >>>= 7), A >= 8 && (L += 4, A >>>= 4), A >= 2 && (L += 2, A >>>= 2), L + A; }, f.prototype._zeroBits = function(E) { if (E === 0) return 26; var A = E, L = 0; return A & 8191 || (L += 13, A >>>= 13), A & 127 || (L += 7, A >>>= 7), A & 15 || (L += 4, A >>>= 4), A & 3 || (L += 2, A >>>= 2), A & 1 || L++, L; }, f.prototype.bitLength = function() { var E = this.words[this.length - 1], A = this._countBits(E); return (this.length - 1) * 26 + A; }; function t(C) { for (var E = new Array(C.bitLength()), A = 0; A < E.length; A++) { var L = A / 26 | 0, $ = A % 26; E[A] = C.words[L] >>> $ & 1; } return E; } f.prototype.zeroBits = function() { if (this.isZero()) return 0; for (var E = 0, A = 0; A < this.length; A++) { var L = this._zeroBits(this.words[A]); if (E += L, L !== 26) break; } return E; }, f.prototype.byteLength = function() { return Math.ceil(this.bitLength() / 8); }, f.prototype.toTwos = function(E) { return this.negative !== 0 ? this.abs().inotn(E).iaddn(1) : this.clone(); }, f.prototype.fromTwos = function(E) { return this.testn(E - 1) ? this.notn(E).iaddn(1).ineg() : this.clone(); }, f.prototype.isNeg = function() { return this.negative !== 0; }, f.prototype.neg = function() { return this.clone().ineg(); }, f.prototype.ineg = function() { return this.isZero() || (this.negative ^= 1), this; }, f.prototype.iuor = function(E) { for (; this.length < E.length; ) this.words[this.length++] = 0; for (var A = 0; A < E.length; A++) this.words[A] = this.words[A] | E.words[A]; return this._strip(); }, f.prototype.ior = function(E) { return b((this.negative | E.negative) === 0), this.iuor(E); }, f.prototype.or = function(E) { return this.length > E.length ? this.clone().ior(E) : E.clone().ior(this); }, f.prototype.uor = function(E) { return this.length > E.length ? this.clone().iuor(E) : E.clone().iuor(this); }, f.prototype.iuand = function(E) { var A; this.length > E.length ? A = E : A = this; for (var L = 0; L < A.length; L++) this.words[L] = this.words[L] & E.words[L]; return this.length = A.length, this._strip(); }, f.prototype.iand = function(E) { return b((this.negative | E.negative) === 0), this.iuand(E); }, f.prototype.and = function(E) { return this.length > E.length ? this.clone().iand(E) : E.clone().iand(this); }, f.prototype.uand = function(E) { return this.length > E.length ? this.clone().iuand(E) : E.clone().iuand(this); }, f.prototype.iuxor = function(E) { var A, L; this.length > E.length ? (A = this, L = E) : (A = E, L = this); for (var $ = 0; $ < L.length; $++) this.words[$] = A.words[$] ^ L.words[$]; if (this !== A) for (; $ < A.length; $++) this.words[$] = A.words[$]; return this.length = A.length, this._strip(); }, f.prototype.ixor = function(E) { return b((this.negative | E.negative) === 0), this.iuxor(E); }, f.prototype.xor = function(E) { return this.length > E.length ? this.clone().ixor(E) : E.clone().ixor(this); }, f.prototype.uxor = function(E) { return this.length > E.length ? this.clone().iuxor(E) : E.clone().iuxor(this); }, f.prototype.inotn = function(E) { b(typeof E == "number" && E >= 0); var A = Math.ceil(E / 26) | 0, L = E % 26; this._expand(A), L > 0 && A--; for (var $ = 0; $ < A; $++) this.words[$] = ~this.words[$] & 67108863; return L > 0 && (this.words[$] = ~this.words[$] & 67108863 >> 26 - L), this._strip(); }, f.prototype.notn = function(E) { return this.clone().inotn(E); }, f.prototype.setn = function(E, A) { b(typeof E == "number" && E >= 0); var L = E / 26 | 0, $ = E % 26; return this._expand(L + 1), A ? this.words[L] = this.words[L] | 1 << $ : this.words[L] = this.words[L] & ~(1 << $), this._strip(); }, f.prototype.iadd = function(E) { var A; if (this.negative !== 0 && E.negative === 0) return this.negative = 0, A = this.isub(E), this.negative ^= 1, this._normSign(); if (this.negative === 0 && E.negative !== 0) return E.negative = 0, A = this.isub(E), E.negative = 1, A._normSign(); var L, $; this.length > E.length ? (L = this, $ = E) : (L = E, $ = this); for (var W = 0, U = 0; U < $.length; U++) A = (L.words[U] | 0) + ($.words[U] | 0) + W, this.words[U] = A & 67108863, W = A >>> 26; for (; W !== 0 && U < L.length; U++) A = (L.words[U] | 0) + W, this.words[U] = A & 67108863, W = A >>> 26; if (this.length = L.length, W !== 0) this.words[this.length] = W, this.length++; else if (L !== this) for (; U < L.length; U++) this.words[U] = L.words[U]; return this; }, f.prototype.add = function(E) { var A; return E.negative !== 0 && this.negative === 0 ? (E.negative = 0, A = this.sub(E), E.negative ^= 1, A) : E.negative === 0 && this.negative !== 0 ? (this.negative = 0, A = E.sub(this), this.negative = 1, A) : this.length > E.length ? this.clone().iadd(E) : E.clone().iadd(this); }, f.prototype.isub = function(E) { if (E.negative !== 0) { E.negative = 0; var A = this.iadd(E); return E.negative = 1, A._normSign(); } else if (this.negative !== 0) return this.negative = 0, this.iadd(E), this.negative = 1, this._normSign(); var L = this.cmp(E); if (L === 0) return this.negative = 0, this.length = 1, this.words[0] = 0, this; var $, W; L > 0 ? ($ = this, W = E) : ($ = E, W = this); for (var U = 0, D = 0; D < W.length; D++) A = ($.words[D] | 0) - (W.words[D] | 0) + U, U = A >> 26, this.words[D] = A & 67108863; for (; U !== 0 && D < $.length; D++) A = ($.words[D] | 0) + U, U = A >> 26, this.words[D] = A & 67108863; if (U === 0 && D < $.length && $ !== this) for (; D < $.length; D++) this.words[D] = $.words[D]; return this.length = Math.max(this.length, D), $ !== this && (this.negative = 1), this._strip(); }, f.prototype.sub = function(E) { return this.clone().isub(E); }; function i(C, E, A) { A.negative = E.negative ^ C.negative; var L = C.length + E.length | 0; A.length = L, L = L - 1 | 0; var $ = C.words[0] | 0, W = E.words[0] | 0, U = $ * W, D = U & 67108863, B = U / 67108864 | 0; A.words[0] = D; for (var j = 1; j < L; j++) { for (var V = B >>> 26, re = B & 67108863, ee = Math.min(j, E.length - 1), ce = Math.max(0, j - C.length + 1); ce <= ee; ce++) { var ve = j - ce | 0; $ = C.words[ve] | 0, W = E.words[ce] | 0, U = $ * W + re, V += U / 67108864 | 0, re = U & 67108863; } A.words[j] = re | 0, B = V | 0; } return B !== 0 ? A.words[j] = B | 0 : A.length--, A._strip(); } var n = function(E, A, L) { var $ = E.words, W = A.words, U = L.words, D = 0, B, j, V, re = $[0] | 0, ee = re & 8191, ce = re >>> 13, ve = $[1] | 0, ge = ve & 8191, oe = ve >>> 13, J = $[2] | 0, Q = J & 8191, he = J >>> 13, ke = $[3] | 0, ne = ke & 8191, se = ke >>> 13, Ce = $[4] | 0, q = Ce & 8191, G = Ce >>> 13, Y = $[5] | 0, fe = Y & 8191, we = Y >>> 13, _e = $[6] | 0, je = _e & 8191, Ye = _e >>> 13, nt = $[7] | 0, ut = nt & 8191, ot = nt >>> 13, Ue = $[8] | 0, Ve = Ue & 8191, Qe = Ue >>> 13, tt = $[9] | 0, ae = tt & 8191, Re = tt >>> 13, be = W[0] | 0, Ee = be & 8191, pe = be >>> 13, Pe = W[1] | 0, te = Pe & 8191, He = Pe >>> 13, it = W[2] | 0, K = it & 8191, Me = it >>> 13, Le = W[3] | 0, ue = Le & 8191, Se = Le >>> 13, Ie = W[4] | 0, st = Ie & 8191, Ge = Ie >>> 13, rt = W[5] | 0, _t = rt & 8191, wt = rt >>> 13, Ot = W[6] | 0, pt = Ot & 8191, ct = Ot >>> 13, At = W[7] | 0, Pt = At & 8191, bt = At >>> 13, Kt = W[8] | 0, Ct = Kt & 8191, xt = Kt >>> 13, Ft = W[9] | 0, Lt = Ft & 8191, Et = Ft >>> 13; L.negative = E.negative ^ A.negative, L.length = 19, B = Math.imul(ee, Ee), j = Math.imul(ee, pe), j = j + Math.imul(ce, Ee) | 0, V = Math.imul(ce, pe); var Dr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Dr >>> 26) | 0, Dr &= 67108863, B = Math.imul(ge, Ee), j = Math.imul(ge, pe), j = j + Math.imul(oe, Ee) | 0, V = Math.imul(oe, pe), B = B + Math.imul(ee, te) | 0, j = j + Math.imul(ee, He) | 0, j = j + Math.imul(ce, te) | 0, V = V + Math.imul(ce, He) | 0; var Or = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Or >>> 26) | 0, Or &= 67108863, B = Math.imul(Q, Ee), j = Math.imul(Q, pe), j = j + Math.imul(he, Ee) | 0, V = Math.imul(he, pe), B = B + Math.imul(ge, te) | 0, j = j + Math.imul(ge, He) | 0, j = j + Math.imul(oe, te) | 0, V = V + Math.imul(oe, He) | 0, B = B + Math.imul(ee, K) | 0, j = j + Math.imul(ee, Me) | 0, j = j + Math.imul(ce, K) | 0, V = V + Math.imul(ce, Me) | 0; var Gr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Gr >>> 26) | 0, Gr &= 67108863, B = Math.imul(ne, Ee), j = Math.imul(ne, pe), j = j + Math.imul(se, Ee) | 0, V = Math.imul(se, pe), B = B + Math.imul(Q, te) | 0, j = j + Math.imul(Q, He) | 0, j = j + Math.imul(he, te) | 0, V = V + Math.imul(he, He) | 0, B = B + Math.imul(ge, K) | 0, j = j + Math.imul(ge, Me) | 0, j = j + Math.imul(oe, K) | 0, V = V + Math.imul(oe, Me) | 0, B = B + Math.imul(ee, ue) | 0, j = j + Math.imul(ee, Se) | 0, j = j + Math.imul(ce, ue) | 0, V = V + Math.imul(ce, Se) | 0; var Nr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Nr >>> 26) | 0, Nr &= 67108863, B = Math.imul(q, Ee), j = Math.imul(q, pe), j = j + Math.imul(G, Ee) | 0, V = Math.imul(G, pe), B = B + Math.imul(ne, te) | 0, j = j + Math.imul(ne, He) | 0, j = j + Math.imul(se, te) | 0, V = V + Math.imul(se, He) | 0, B = B + Math.imul(Q, K) | 0, j = j + Math.imul(Q, Me) | 0, j = j + Math.imul(he, K) | 0, V = V + Math.imul(he, Me) | 0, B = B + Math.imul(ge, ue) | 0, j = j + Math.imul(ge, Se) | 0, j = j + Math.imul(oe, ue) | 0, V = V + Math.imul(oe, Se) | 0, B = B + Math.imul(ee, st) | 0, j = j + Math.imul(ee, Ge) | 0, j = j + Math.imul(ce, st) | 0, V = V + Math.imul(ce, Ge) | 0; var Yr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Yr >>> 26) | 0, Yr &= 67108863, B = Math.imul(fe, Ee), j = Math.imul(fe, pe), j = j + Math.imul(we, Ee) | 0, V = Math.imul(we, pe), B = B + Math.imul(q, te) | 0, j = j + Math.imul(q, He) | 0, j = j + Math.imul(G, te) | 0, V = V + Math.imul(G, He) | 0, B = B + Math.imul(ne, K) | 0, j = j + Math.imul(ne, Me) | 0, j = j + Math.imul(se, K) | 0, V = V + Math.imul(se, Me) | 0, B = B + Math.imul(Q, ue) | 0, j = j + Math.imul(Q, Se) | 0, j = j + Math.imul(he, ue) | 0, V = V + Math.imul(he, Se) | 0, B = B + Math.imul(ge, st) | 0, j = j + Math.imul(ge, Ge) | 0, j = j + Math.imul(oe, st) | 0, V = V + Math.imul(oe, Ge) | 0, B = B + Math.imul(ee, _t) | 0, j = j + Math.imul(ee, wt) | 0, j = j + Math.imul(ce, _t) | 0, V = V + Math.imul(ce, wt) | 0; var Qt = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Qt >>> 26) | 0, Qt &= 67108863, B = Math.imul(je, Ee), j = Math.imul(je, pe), j = j + Math.imul(Ye, Ee) | 0, V = Math.imul(Ye, pe), B = B + Math.imul(fe, te) | 0, j = j + Math.imul(fe, He) | 0, j = j + Math.imul(we, te) | 0, V = V + Math.imul(we, He) | 0, B = B + Math.imul(q, K) | 0, j = j + Math.imul(q, Me) | 0, j = j + Math.imul(G, K) | 0, V = V + Math.imul(G, Me) | 0, B = B + Math.imul(ne, ue) | 0, j = j + Math.imul(ne, Se) | 0, j = j + Math.imul(se, ue) | 0, V = V + Math.imul(se, Se) | 0, B = B + Math.imul(Q, st) | 0, j = j + Math.imul(Q, Ge) | 0, j = j + Math.imul(he, st) | 0, V = V + Math.imul(he, Ge) | 0, B = B + Math.imul(ge, _t) | 0, j = j + Math.imul(ge, wt) | 0, j = j + Math.imul(oe, _t) | 0, V = V + Math.imul(oe, wt) | 0, B = B + Math.imul(ee, pt) | 0, j = j + Math.imul(ee, ct) | 0, j = j + Math.imul(ce, pt) | 0, V = V + Math.imul(ce, ct) | 0; var Xr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Xr >>> 26) | 0, Xr &= 67108863, B = Math.imul(ut, Ee), j = Math.imul(ut, pe), j = j + Math.imul(ot, Ee) | 0, V = Math.imul(ot, pe), B = B + Math.imul(je, te) | 0, j = j + Math.imul(je, He) | 0, j = j + Math.imul(Ye, te) | 0, V = V + Math.imul(Ye, He) | 0, B = B + Math.imul(fe, K) | 0, j = j + Math.imul(fe, Me) | 0, j = j + Math.imul(we, K) | 0, V = V + Math.imul(we, Me) | 0, B = B + Math.imul(q, ue) | 0, j = j + Math.imul(q, Se) | 0, j = j + Math.imul(G, ue) | 0, V = V + Math.imul(G, Se) | 0, B = B + Math.imul(ne, st) | 0, j = j + Math.imul(ne, Ge) | 0, j = j + Math.imul(se, st) | 0, V = V + Math.imul(se, Ge) | 0, B = B + Math.imul(Q, _t) | 0, j = j + Math.imul(Q, wt) | 0, j = j + Math.imul(he, _t) | 0, V = V + Math.imul(he, wt) | 0, B = B + Math.imul(ge, pt) | 0, j = j + Math.imul(ge, ct) | 0, j = j + Math.imul(oe, pt) | 0, V = V + Math.imul(oe, ct) | 0, B = B + Math.imul(ee, Pt) | 0, j = j + Math.imul(ee, bt) | 0, j = j + Math.imul(ce, Pt) | 0, V = V + Math.imul(ce, bt) | 0; var Fr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Fr >>> 26) | 0, Fr &= 67108863, B = Math.imul(Ve, Ee), j = Math.imul(Ve, pe), j = j + Math.imul(Qe, Ee) | 0, V = Math.imul(Qe, pe), B = B + Math.imul(ut, te) | 0, j = j + Math.imul(ut, He) | 0, j = j + Math.imul(ot, te) | 0, V = V + Math.imul(ot, He) | 0, B = B + Math.imul(je, K) | 0, j = j + Math.imul(je, Me) | 0, j = j + Math.imul(Ye, K) | 0, V = V + Math.imul(Ye, Me) | 0, B = B + Math.imul(fe, ue) | 0, j = j + Math.imul(fe, Se) | 0, j = j + Math.imul(we, ue) | 0, V = V + Math.imul(we, Se) | 0, B = B + Math.imul(q, st) | 0, j = j + Math.imul(q, Ge) | 0, j = j + Math.imul(G, st) | 0, V = V + Math.imul(G, Ge) | 0, B = B + Math.imul(ne, _t) | 0, j = j + Math.imul(ne, wt) | 0, j = j + Math.imul(se, _t) | 0, V = V + Math.imul(se, wt) | 0, B = B + Math.imul(Q, pt) | 0, j = j + Math.imul(Q, ct) | 0, j = j + Math.imul(he, pt) | 0, V = V + Math.imul(he, ct) | 0, B = B + Math.imul(ge, Pt) | 0, j = j + Math.imul(ge, bt) | 0, j = j + Math.imul(oe, Pt) | 0, V = V + Math.imul(oe, bt) | 0, B = B + Math.imul(ee, Ct) | 0, j = j + Math.imul(ee, xt) | 0, j = j + Math.imul(ce, Ct) | 0, V = V + Math.imul(ce, xt) | 0; var Lr = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Lr >>> 26) | 0, Lr &= 67108863, B = Math.imul(ae, Ee), j = Math.imul(ae, pe), j = j + Math.imul(Re, Ee) | 0, V = Math.imul(Re, pe), B = B + Math.imul(Ve, te) | 0, j = j + Math.imul(Ve, He) | 0, j = j + Math.imul(Qe, te) | 0, V = V + Math.imul(Qe, He) | 0, B = B + Math.imul(ut, K) | 0, j = j + Math.imul(ut, Me) | 0, j = j + Math.imul(ot, K) | 0, V = V + Math.imul(ot, Me) | 0, B = B + Math.imul(je, ue) | 0, j = j + Math.imul(je, Se) | 0, j = j + Math.imul(Ye, ue) | 0, V = V + Math.imul(Ye, Se) | 0, B = B + Math.imul(fe, st) | 0, j = j + Math.imul(fe, Ge) | 0, j = j + Math.imul(we, st) | 0, V = V + Math.imul(we, Ge) | 0, B = B + Math.imul(q, _t) | 0, j = j + Math.imul(q, wt) | 0, j = j + Math.imul(G, _t) | 0, V = V + Math.imul(G, wt) | 0, B = B + Math.imul(ne, pt) | 0, j = j + Math.imul(ne, ct) | 0, j = j + Math.imul(se, pt) | 0, V = V + Math.imul(se, ct) | 0, B = B + Math.imul(Q, Pt) | 0, j = j + Math.imul(Q, bt) | 0, j = j + Math.imul(he, Pt) | 0, V = V + Math.imul(he, bt) | 0, B = B + Math.imul(ge, Ct) | 0, j = j + Math.imul(ge, xt) | 0, j = j + Math.imul(oe, Ct) | 0, V = V + Math.imul(oe, xt) | 0, B = B + Math.imul(ee, Lt) | 0, j = j + Math.imul(ee, Et) | 0, j = j + Math.imul(ce, Lt) | 0, V = V + Math.imul(ce, Et) | 0; var Ur = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Ur >>> 26) | 0, Ur &= 67108863, B = Math.imul(ae, te), j = Math.imul(ae, He), j = j + Math.imul(Re, te) | 0, V = Math.imul(Re, He), B = B + Math.imul(Ve, K) | 0, j = j + Math.imul(Ve, Me) | 0, j = j + Math.imul(Qe, K) | 0, V = V + Math.imul(Qe, Me) | 0, B = B + Math.imul(ut, ue) | 0, j = j + Math.imul(ut, Se) | 0, j = j + Math.imul(ot, ue) | 0, V = V + Math.imul(ot, Se) | 0, B = B + Math.imul(je, st) | 0, j = j + Math.imul(je, Ge) | 0, j = j + Math.imul(Ye, st) | 0, V = V + Math.imul(Ye, Ge) | 0, B = B + Math.imul(fe, _t) | 0, j = j + Math.imul(fe, wt) | 0, j = j + Math.imul(we, _t) | 0, V = V + Math.imul(we, wt) | 0, B = B + Math.imul(q, pt) | 0, j = j + Math.imul(q, ct) | 0, j = j + Math.imul(G, pt) | 0, V = V + Math.imul(G, ct) | 0, B = B + Math.imul(ne, Pt) | 0, j = j + Math.imul(ne, bt) | 0, j = j + Math.imul(se, Pt) | 0, V = V + Math.imul(se, bt) | 0, B = B + Math.imul(Q, Ct) | 0, j = j + Math.imul(Q, xt) | 0, j = j + Math.imul(he, Ct) | 0, V = V + Math.imul(he, xt) | 0, B = B + Math.imul(ge, Lt) | 0, j = j + Math.imul(ge, Et) | 0, j = j + Math.imul(oe, Lt) | 0, V = V + Math.imul(oe, Et) | 0; var vt = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (vt >>> 26) | 0, vt &= 67108863, B = Math.imul(ae, K), j = Math.imul(ae, Me), j = j + Math.imul(Re, K) | 0, V = Math.imul(Re, Me), B = B + Math.imul(Ve, ue) | 0, j = j + Math.imul(Ve, Se) | 0, j = j + Math.imul(Qe, ue) | 0, V = V + Math.imul(Qe, Se) | 0, B = B + Math.imul(ut, st) | 0, j = j + Math.imul(ut, Ge) | 0, j = j + Math.imul(ot, st) | 0, V = V + Math.imul(ot, Ge) | 0, B = B + Math.imul(je, _t) | 0, j = j + Math.imul(je, wt) | 0, j = j + Math.imul(Ye, _t) | 0, V = V + Math.imul(Ye, wt) | 0, B = B + Math.imul(fe, pt) | 0, j = j + Math.imul(fe, ct) | 0, j = j + Math.imul(we, pt) | 0, V = V + Math.imul(we, ct) | 0, B = B + Math.imul(q, Pt) | 0, j = j + Math.imul(q, bt) | 0, j = j + Math.imul(G, Pt) | 0, V = V + Math.imul(G, bt) | 0, B = B + Math.imul(ne, Ct) | 0, j = j + Math.imul(ne, xt) | 0, j = j + Math.imul(se, Ct) | 0, V = V + Math.imul(se, xt) | 0, B = B + Math.imul(Q, Lt) | 0, j = j + Math.imul(Q, Et) | 0, j = j + Math.imul(he, Lt) | 0, V = V + Math.imul(he, Et) | 0; var Ke = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Ke >>> 26) | 0, Ke &= 67108863, B = Math.imul(ae, ue), j = Math.imul(ae, Se), j = j + Math.imul(Re, ue) | 0, V = Math.imul(Re, Se), B = B + Math.imul(Ve, st) | 0, j = j + Math.imul(Ve, Ge) | 0, j = j + Math.imul(Qe, st) | 0, V = V + Math.imul(Qe, Ge) | 0, B = B + Math.imul(ut, _t) | 0, j = j + Math.imul(ut, wt) | 0, j = j + Math.imul(ot, _t) | 0, V = V + Math.imul(ot, wt) | 0, B = B + Math.imul(je, pt) | 0, j = j + Math.imul(je, ct) | 0, j = j + Math.imul(Ye, pt) | 0, V = V + Math.imul(Ye, ct) | 0, B = B + Math.imul(fe, Pt) | 0, j = j + Math.imul(fe, bt) | 0, j = j + Math.imul(we, Pt) | 0, V = V + Math.imul(we, bt) | 0, B = B + Math.imul(q, Ct) | 0, j = j + Math.imul(q, xt) | 0, j = j + Math.imul(G, Ct) | 0, V = V + Math.imul(G, xt) | 0, B = B + Math.imul(ne, Lt) | 0, j = j + Math.imul(ne, Et) | 0, j = j + Math.imul(se, Lt) | 0, V = V + Math.imul(se, Et) | 0; var me = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (me >>> 26) | 0, me &= 67108863, B = Math.imul(ae, st), j = Math.imul(ae, Ge), j = j + Math.imul(Re, st) | 0, V = Math.imul(Re, Ge), B = B + Math.imul(Ve, _t) | 0, j = j + Math.imul(Ve, wt) | 0, j = j + Math.imul(Qe, _t) | 0, V = V + Math.imul(Qe, wt) | 0, B = B + Math.imul(ut, pt) | 0, j = j + Math.imul(ut, ct) | 0, j = j + Math.imul(ot, pt) | 0, V = V + Math.imul(ot, ct) | 0, B = B + Math.imul(je, Pt) | 0, j = j + Math.imul(je, bt) | 0, j = j + Math.imul(Ye, Pt) | 0, V = V + Math.imul(Ye, bt) | 0, B = B + Math.imul(fe, Ct) | 0, j = j + Math.imul(fe, xt) | 0, j = j + Math.imul(we, Ct) | 0, V = V + Math.imul(we, xt) | 0, B = B + Math.imul(q, Lt) | 0, j = j + Math.imul(q, Et) | 0, j = j + Math.imul(G, Lt) | 0, V = V + Math.imul(G, Et) | 0; var Fe = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Fe >>> 26) | 0, Fe &= 67108863, B = Math.imul(ae, _t), j = Math.imul(ae, wt), j = j + Math.imul(Re, _t) | 0, V = Math.imul(Re, wt), B = B + Math.imul(Ve, pt) | 0, j = j + Math.imul(Ve, ct) | 0, j = j + Math.imul(Qe, pt) | 0, V = V + Math.imul(Qe, ct) | 0, B = B + Math.imul(ut, Pt) | 0, j = j + Math.imul(ut, bt) | 0, j = j + Math.imul(ot, Pt) | 0, V = V + Math.imul(ot, bt) | 0, B = B + Math.imul(je, Ct) | 0, j = j + Math.imul(je, xt) | 0, j = j + Math.imul(Ye, Ct) | 0, V = V + Math.imul(Ye, xt) | 0, B = B + Math.imul(fe, Lt) | 0, j = j + Math.imul(fe, Et) | 0, j = j + Math.imul(we, Lt) | 0, V = V + Math.imul(we, Et) | 0; var Be = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Be >>> 26) | 0, Be &= 67108863, B = Math.imul(ae, pt), j = Math.imul(ae, ct), j = j + Math.imul(Re, pt) | 0, V = Math.imul(Re, ct), B = B + Math.imul(Ve, Pt) | 0, j = j + Math.imul(Ve, bt) | 0, j = j + Math.imul(Qe, Pt) | 0, V = V + Math.imul(Qe, bt) | 0, B = B + Math.imul(ut, Ct) | 0, j = j + Math.imul(ut, xt) | 0, j = j + Math.imul(ot, Ct) | 0, V = V + Math.imul(ot, xt) | 0, B = B + Math.imul(je, Lt) | 0, j = j + Math.imul(je, Et) | 0, j = j + Math.imul(Ye, Lt) | 0, V = V + Math.imul(Ye, Et) | 0; var dt = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (dt >>> 26) | 0, dt &= 67108863, B = Math.imul(ae, Pt), j = Math.imul(ae, bt), j = j + Math.imul(Re, Pt) | 0, V = Math.imul(Re, bt), B = B + Math.imul(Ve, Ct) | 0, j = j + Math.imul(Ve, xt) | 0, j = j + Math.imul(Qe, Ct) | 0, V = V + Math.imul(Qe, xt) | 0, B = B + Math.imul(ut, Lt) | 0, j = j + Math.imul(ut, Et) | 0, j = j + Math.imul(ot, Lt) | 0, V = V + Math.imul(ot, Et) | 0; var St = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (St >>> 26) | 0, St &= 67108863, B = Math.imul(ae, Ct), j = Math.imul(ae, xt), j = j + Math.imul(Re, Ct) | 0, V = Math.imul(Re, xt), B = B + Math.imul(Ve, Lt) | 0, j = j + Math.imul(Ve, Et) | 0, j = j + Math.imul(Qe, Lt) | 0, V = V + Math.imul(Qe, Et) | 0; var Ht = (D + B | 0) + ((j & 8191) << 13) | 0; D = (V + (j >>> 13) | 0) + (Ht >>> 26) | 0, Ht &= 67108863, B = Math.imul(ae, Lt), j = Math.imul(ae, Et), j = j + Math.imul(Re, Lt) | 0, V = Math.imul(Re, Et); var lr = (D + B | 0) + ((j & 8191) << 13) | 0; return D = (V + (j >>> 13) | 0) + (lr >>> 26) | 0, lr &= 67108863, U[0] = Dr, U[1] = Or, U[2] = Gr, U[3] = Nr, U[4] = Yr, U[5] = Qt, U[6] = Xr, U[7] = Fr, U[8] = Lr, U[9] = Ur, U[10] = vt, U[11] = Ke, U[12] = me, U[13] = Fe, U[14] = Be, U[15] = dt, U[16] = St, U[17] = Ht, U[18] = lr, D !== 0 && (U[19] = D, L.length++), L; }; Math.imul || (n = i); function o(C, E, A) { A.negative = E.negative ^ C.negative, A.length = C.length + E.length; for (var L = 0, $ = 0, W = 0; W < A.length - 1; W++) { var U = $; $ = 0; for (var D = L & 67108863, B = Math.min(W, E.length - 1), j = Math.max(0, W - C.length + 1); j <= B; j++) { var V = W - j, re = C.words[V] | 0, ee = E.words[j] | 0, ce = re * ee, ve = ce & 67108863; U = U + (ce / 67108864 | 0) | 0, ve = ve + D | 0, D = ve & 67108863, U = U + (ve >>> 26) | 0, $ += U >>> 26, U &= 67108863; } A.words[W] = D, L = U, U = $; } return L !== 0 ? A.words[W] = L : A.length--, A._strip(); } function p(C, E, A) { return o(C, E, A); } f.prototype.mulTo = function(E, A) { var L, $ = this.length + E.length; return this.length === 10 && E.length === 10 ? L = n(this, E, A) : $ < 63 ? L = i(this, E, A) : $ < 1024 ? L = o(this, E, A) : L = p(this, E, A), L; }, f.prototype.mul = function(E) { var A = new f(null); return A.words = new Array(this.length + E.length), this.mulTo(E, A); }, f.prototype.mulf = function(E) { var A = new f(null); return A.words = new Array(this.length + E.length), p(this, E, A); }, f.prototype.imul = function(E) { return this.clone().mulTo(E, this); }, f.prototype.imuln = function(E) { var A = E < 0; A && (E = -E), b(typeof E == "number"), b(E < 67108864); for (var L = 0, $ = 0; $ < this.length; $++) { var W = (this.words[$] | 0) * E, U = (W & 67108863) + (L & 67108863); L >>= 26, L += W / 67108864 | 0, L += U >>> 26, this.words[$] = U & 67108863; } return L !== 0 && (this.words[$] = L, this.length++), A ? this.ineg() : this; }, f.prototype.muln = function(E) { return this.clone().imuln(E); }, f.prototype.sqr = function() { return this.mul(this); }, f.prototype.isqr = function() { return this.imul(this.clone()); }, f.prototype.pow = function(E) { var A = t(E); if (A.length === 0) return new f(1); for (var L = this, $ = 0; $ < A.length && A[$] === 0; $++, L = L.sqr()) ; if (++$ < A.length) for (var W = L.sqr(); $ < A.length; $++, W = W.sqr()) A[$] !== 0 && (L = L.mul(W)); return L; }, f.prototype.iushln = function(E) { b(typeof E == "number" && E >= 0); var A = E % 26, L = (E - A) / 26, $ = 67108863 >>> 26 - A << 26 - A, W; if (A !== 0) { var U = 0; for (W = 0; W < this.length; W++) { var D = this.words[W] & $, B = (this.words[W] | 0) - D << A; this.words[W] = B | U, U = D >>> 26 - A; } U && (this.words[W] = U, this.length++); } if (L !== 0) { for (W = this.length - 1; W >= 0; W--) this.words[W + L] = this.words[W]; for (W = 0; W < L; W++) this.words[W] = 0; this.length += L; } return this._strip(); }, f.prototype.ishln = function(E) { return b(this.negative === 0), this.iushln(E); }, f.prototype.iushrn = function(E, A, L) { b(typeof E == "number" && E >= 0); var $; A ? $ = (A - A % 26) / 26 : $ = 0; var W = E % 26, U = Math.min((E - W) / 26, this.length), D = 67108863 ^ 67108863 >>> W << W, B = L; if ($ -= U, $ = Math.max(0, $), B) { for (var j = 0; j < U; j++) B.words[j] = this.words[j]; B.length = U; } if (U !== 0) if (this.length > U) for (this.length -= U, j = 0; j < this.length; j++) this.words[j] = this.words[j + U]; else this.words[0] = 0, this.length = 1; var V = 0; for (j = this.length - 1; j >= 0 && (V !== 0 || j >= $); j--) { var re = this.words[j] | 0; this.words[j] = V << 26 - W | re >>> W, V = re & D; } return B && V !== 0 && (B.words[B.length++] = V), this.length === 0 && (this.words[0] = 0, this.length = 1), this._strip(); }, f.prototype.ishrn = function(E, A, L) { return b(this.negative === 0), this.iushrn(E, A, L); }, f.prototype.shln = function(E) { return this.clone().ishln(E); }, f.prototype.ushln = function(E) { return this.clone().iushln(E); }, f.prototype.shrn = function(E) { return this.clone().ishrn(E); }, f.prototype.ushrn = function(E) { return this.clone().iushrn(E); }, f.prototype.testn = function(E) { b(typeof E == "number" && E >= 0); var A = E % 26, L = (E - A) / 26, $ = 1 << A; if (this.length <= L) return !1; var W = this.words[L]; return !!(W & $); }, f.prototype.imaskn = function(E) { b(typeof E == "number" && E >= 0); var A = E % 26, L = (E - A) / 26; if (b(this.negative === 0, "imaskn works only with positive numbers"), this.length <= L) return this; if (A !== 0 && L++, this.length = Math.min(L, this.length), A !== 0) { var $ = 67108863 ^ 67108863 >>> A << A; this.words[this.length - 1] &= $; } return this._strip(); }, f.prototype.maskn = function(E) { return this.clone().imaskn(E); }, f.prototype.iaddn = function(E) { return b(typeof E == "number"), b(E < 67108864), E < 0 ? this.isubn(-E) : this.negative !== 0 ? this.length === 1 && (this.words[0] | 0) <= E ? (this.words[0] = E - (this.words[0] | 0), this.negative = 0, this) : (this.negative = 0, this.isubn(E), this.negative = 1, this) : this._iaddn(E); }, f.prototype._iaddn = function(E) { this.words[0] += E; for (var A = 0; A < this.length && this.words[A] >= 67108864; A++) this.words[A] -= 67108864, A === this.length - 1 ? this.words[A + 1] = 1 : this.words[A + 1]++; return this.length = Math.max(this.length, A + 1), this; }, f.prototype.isubn = function(E) { if (b(typeof E == "number"), b(E < 67108864), E < 0) return this.iaddn(-E); if (this.negative !== 0) return this.negative = 0, this.iaddn(E), this.negative = 1, this; if (this.words[0] -= E, this.length === 1 && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; else for (var A = 0; A < this.length && this.words[A] < 0; A++) this.words[A] += 67108864, this.words[A + 1] -= 1; return this._strip(); }, f.prototype.addn = function(E) { return this.clone().iaddn(E); }, f.prototype.subn = function(E) { return this.clone().isubn(E); }, f.prototype.iabs = function() { return this.negative = 0, this; }, f.prototype.abs = function() { return this.clone().iabs(); }, f.prototype._ishlnsubmul = function(E, A, L) { var $ = E.length + L, W; this._expand($); var U, D = 0; for (W = 0; W < E.length; W++) { U = (this.words[W + L] | 0) + D; var B = (E.words[W] | 0) * A; U -= B & 67108863, D = (U >> 26) - (B / 67108864 | 0), this.words[W + L] = U & 67108863; } for (; W < this.length - L; W++) U = (this.words[W + L] | 0) + D, D = U >> 26, this.words[W + L] = U & 67108863; if (D === 0) return this._strip(); for (b(D === -1), D = 0, W = 0; W < this.length; W++) U = -(this.words[W] | 0) + D, D = U >> 26, this.words[W] = U & 67108863; return this.negative = 1, this._strip(); }, f.prototype._wordDiv = function(E, A) { var L = this.length - E.length, $ = this.clone(), W = E, U = W.words[W.length - 1] | 0, D = this._countBits(U); L = 26 - D, L !== 0 && (W = W.ushln(L), $.iushln(L), U = W.words[W.length - 1] | 0); var B = $.length - W.length, j; if (A !== "mod") { j = new f(null), j.length = B + 1, j.words = new Array(j.length); for (var V = 0; V < j.length; V++) j.words[V] = 0; } var re = $.clone()._ishlnsubmul(W, 1, B); re.negative === 0 && ($ = re, j && (j.words[B] = 1)); for (var ee = B - 1; ee >= 0; ee--) { var ce = ($.words[W.length + ee] | 0) * 67108864 + ($.words[W.length + ee - 1] | 0); for (ce = Math.min(ce / U | 0, 67108863), $._ishlnsubmul(W, ce, ee); $.negative !== 0; ) ce--, $.negative = 0, $._ishlnsubmul(W, 1, ee), $.isZero() || ($.negative ^= 1); j && (j.words[ee] = ce); } return j && j._strip(), $._strip(), A !== "div" && L !== 0 && $.iushrn(L), { div: j || null, mod: $ }; }, f.prototype.divmod = function(E, A, L) { if (b(!E.isZero()), this.isZero()) return { div: new f(0), mod: new f(0) }; var $, W, U; return this.negative !== 0 && E.negative === 0 ? (U = this.neg().divmod(E, A), A !== "mod" && ($ = U.div.neg()), A !== "div" && (W = U.mod.neg(), L && W.negative !== 0 && W.iadd(E)), { div: $, mod: W }) : this.negative === 0 && E.negative !== 0 ? (U = this.divmod(E.neg(), A), A !== "mod" && ($ = U.div.neg()), { div: $, mod: U.mod }) : this.negative & E.negative ? (U = this.neg().divmod(E.neg(), A), A !== "div" && (W = U.mod.neg(), L && W.negative !== 0 && W.isub(E)), { div: U.div, mod: W }) : E.length > this.length || this.cmp(E) < 0 ? { div: new f(0), mod: this } : E.length === 1 ? A === "div" ? { div: this.divn(E.words[0]), mod: null } : A === "mod" ? { div: null, mod: new f(this.modrn(E.words[0])) } : { div: this.divn(E.words[0]), mod: new f(this.modrn(E.words[0])) } : this._wordDiv(E, A); }, f.prototype.div = function(E) { return this.divmod(E, "div", !1).div; }, f.prototype.mod = function(E) { return this.divmod(E, "mod", !1).mod; }, f.prototype.umod = function(E) { return this.divmod(E, "mod", !0).mod; }, f.prototype.divRound = function(E) { var A = this.divmod(E); if (A.mod.isZero()) return A.div; var L = A.div.negative !== 0 ? A.mod.isub(E) : A.mod, $ = E.ushrn(1), W = E.andln(1), U = L.cmp($); return U < 0 || W === 1 && U === 0 ? A.div : A.div.negative !== 0 ? A.div.isubn(1) : A.div.iaddn(1); }, f.prototype.modrn = function(E) { var A = E < 0; A && (E = -E), b(E <= 67108863); for (var L = (1 << 26) % E, $ = 0, W = this.length - 1; W >= 0; W--) $ = (L * $ + (this.words[W] | 0)) % E; return A ? -$ : $; }, f.prototype.modn = function(E) { return this.modrn(E); }, f.prototype.idivn = function(E) { var A = E < 0; A && (E = -E), b(E <= 67108863); for (var L = 0, $ = this.length - 1; $ >= 0; $--) { var W = (this.words[$] | 0) + L * 67108864; this.words[$] = W / E | 0, L = W % E; } return this._strip(), A ? this.ineg() : this; }, f.prototype.divn = function(E) { return this.clone().idivn(E); }, f.prototype.egcd = function(E) { b(E.negative === 0), b(!E.isZero()); var A = this, L = E.clone(); A.negative !== 0 ? A = A.umod(E) : A = A.clone(); for (var $ = new f(1), W = new f(0), U = new f(0), D = new f(1), B = 0; A.isEven() && L.isEven(); ) A.iushrn(1), L.iushrn(1), ++B; for (var j = L.clone(), V = A.clone(); !A.isZero(); ) { for (var re = 0, ee = 1; !(A.words[0] & ee) && re < 26; ++re, ee <<= 1) ; if (re > 0) for (A.iushrn(re); re-- > 0; ) ($.isOdd() || W.isOdd()) && ($.iadd(j), W.isub(V)), $.iushrn(1), W.iushrn(1); for (var ce = 0, ve = 1; !(L.words[0] & ve) && ce < 26; ++ce, ve <<= 1) ; if (ce > 0) for (L.iushrn(ce); ce-- > 0; ) (U.isOdd() || D.isOdd()) && (U.iadd(j), D.isub(V)), U.iushrn(1), D.iushrn(1); A.cmp(L) >= 0 ? (A.isub(L), $.isub(U), W.isub(D)) : (L.isub(A), U.isub($), D.isub(W)); } return { a: U, b: D, gcd: L.iushln(B) }; }, f.prototype._invmp = function(E) { b(E.negative === 0), b(!E.isZero()); var A = this, L = E.clone(); A.negative !== 0 ? A = A.umod(E) : A = A.clone(); for (var $ = new f(1), W = new f(0), U = L.clone(); A.cmpn(1) > 0 && L.cmpn(1) > 0; ) { for (var D = 0, B = 1; !(A.words[0] & B) && D < 26; ++D, B <<= 1) ; if (D > 0) for (A.iushrn(D); D-- > 0; ) $.isOdd() && $.iadd(U), $.iushrn(1); for (var j = 0, V = 1; !(L.words[0] & V) && j < 26; ++j, V <<= 1) ; if (j > 0) for (L.iushrn(j); j-- > 0; ) W.isOdd() && W.iadd(U), W.iushrn(1); A.cmp(L) >= 0 ? (A.isub(L), $.isub(W)) : (L.isub(A), W.isub($)); } var re; return A.cmpn(1) === 0 ? re = $ : re = W, re.cmpn(0) < 0 && re.iadd(E), re; }, f.prototype.gcd = function(E) { if (this.isZero()) return E.abs(); if (E.isZero()) return this.abs(); var A = this.clone(), L = E.clone(); A.negative = 0, L.negative = 0; for (var $ = 0; A.isEven() && L.isEven(); $++) A.iushrn(1), L.iushrn(1); do { for (; A.isEven(); ) A.iushrn(1); for (; L.isEven(); ) L.iushrn(1); var W = A.cmp(L); if (W < 0) { var U = A; A = L, L = U; } else if (W === 0 || L.cmpn(1) === 0) break; A.isub(L); } while (!0); return L.iushln($); }, f.prototype.invm = function(E) { return this.egcd(E).a.umod(E); }, f.prototype.isEven = function() { return (this.words[0] & 1) === 0; }, f.prototype.isOdd = function() { return (this.words[0] & 1) === 1; }, f.prototype.andln = function(E) { return this.words[0] & E; }, f.prototype.bincn = function(E) { b(typeof E == "number"); var A = E % 26, L = (E - A) / 26, $ = 1 << A; if (this.length <= L) return this._expand(L + 1), this.words[L] |= $, this; for (var W = $, U = L; W !== 0 && U < this.length; U++) { var D = this.words[U] | 0; D += W, W = D >>> 26, D &= 67108863, this.words[U] = D; } return W !== 0 && (this.words[U] = W, this.length++), this; }, f.prototype.isZero = function() { return this.length === 1 && this.words[0] === 0; }, f.prototype.cmpn = function(E) { var A = E < 0; if (this.negative !== 0 && !A) return -1; if (this.negative === 0 && A) return 1; this._strip(); var L; if (this.length > 1) L = 1; else { A && (E = -E), b(E <= 67108863, "Number is too big"); var $ = this.words[0] | 0; L = $ === E ? 0 : $ < E ? -1 : 1; } return this.negative !== 0 ? -L | 0 : L; }, f.prototype.cmp = function(E) { if (this.negative !== 0 && E.negative === 0) return -1; if (this.negative === 0 && E.negative !== 0) return 1; var A = this.ucmp(E); return this.negative !== 0 ? -A | 0 : A; }, f.prototype.ucmp = function(E) { if (this.length > E.length) return 1; if (this.length < E.length) return -1; for (var A = 0, L = this.length - 1; L >= 0; L--) { var $ = this.words[L] | 0, W = E.words[L] | 0; if ($ !== W) { $ < W ? A = -1 : $ > W && (A = 1); break; } } return A; }, f.prototype.gtn = function(E) { return this.cmpn(E) === 1; }, f.prototype.gt = function(E) { return this.cmp(E) === 1; }, f.prototype.gten = function(E) { return this.cmpn(E) >= 0; }, f.prototype.gte = function(E) { return this.cmp(E) >= 0; }, f.prototype.ltn = function(E) { return this.cmpn(E) === -1; }, f.prototype.lt = function(E) { return this.cmp(E) === -1; }, f.prototype.lten = function(E) { return this.cmpn(E) <= 0; }, f.prototype.lte = function(E) { return this.cmp(E) <= 0; }, f.prototype.eqn = function(E) { return this.cmpn(E) === 0; }, f.prototype.eq = function(E) { return this.cmp(E) === 0; }, f.red = function(E) { return new I(E); }, f.prototype.toRed = function(E) { return b(!this.red, "Already a number in reduction context"), b(this.negative === 0, "red works only with positives"), E.convertTo(this)._forceRed(E); }, f.prototype.fromRed = function() { return b(this.red, "fromRed works only with numbers in reduction context"), this.red.convertFrom(this); }, f.prototype._forceRed = function(E) { return this.red = E, this; }, f.prototype.forceRed = function(E) { return b(!this.red, "Already a number in reduction context"), this._forceRed(E); }, f.prototype.redAdd = function(E) { return b(this.red, "redAdd works only with red numbers"), this.red.add(this, E); }, f.prototype.redIAdd = function(E) { return b(this.red, "redIAdd works only with red numbers"), this.red.iadd(this, E); }, f.prototype.redSub = function(E) { return b(this.red, "redSub works only with red numbers"), this.red.sub(this, E); }, f.prototype.redISub = function(E) { return b(this.red, "redISub works only with red numbers"), this.red.isub(this, E); }, f.prototype.redShl = function(E) { return b(this.red, "redShl works only with red numbers"), this.red.shl(this, E); }, f.prototype.redMul = function(E) { return b(this.red, "redMul works only with red numbers"), this.red._verify2(this, E), this.red.mul(this, E); }, f.prototype.redIMul = function(E) { return b(this.red, "redMul works only with red numbers"), this.red._verify2(this, E), this.red.imul(this, E); }, f.prototype.redSqr = function() { return b(this.red, "redSqr works only with red numbers"), this.red._verify1(this), this.red.sqr(this); }, f.prototype.redISqr = function() { return b(this.red, "redISqr works only with red numbers"), this.red._verify1(this), this.red.isqr(this); }, f.prototype.redSqrt = function() { return b(this.red, "redSqrt works only with red numbers"), this.red._verify1(this), this.red.sqrt(this); }, f.prototype.redInvm = function() { return b(this.red, "redInvm works only with red numbers"), this.red._verify1(this), this.red.invm(this); }, f.prototype.redNeg = function() { return b(this.red, "redNeg works only with red numbers"), this.red._verify1(this), this.red.neg(this); }, f.prototype.redPow = function(E) { return b(this.red && !E.red, "redPow(normalNum)"), this.red._verify1(this), this.red.pow(this, E); }; var O = { k256: null, p224: null, p192: null, p25519: null }; function P(C, E) { this.name = C, this.p = new f(E, 16), this.n = this.p.bitLength(), this.k = new f(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); } P.prototype._tmp = function() { var E = new f(null); return E.words = new Array(Math.ceil(this.n / 13)), E; }, P.prototype.ireduce = function(E) { var A = E, L; do this.split(A, this.tmp), A = this.imulK(A), A = A.iadd(this.tmp), L = A.bitLength(); while (L > this.n); var $ = L < this.n ? -1 : A.ucmp(this.p); return $ === 0 ? (A.words[0] = 0, A.length = 1) : $ > 0 ? A.isub(this.p) : A.strip !== void 0 ? A.strip() : A._strip(), A; }, P.prototype.split = function(E, A) { E.iushrn(this.n, 0, A); }, P.prototype.imulK = function(E) { return E.imul(this.k); }; function F() { P.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f"); } w(F, P), F.prototype.split = function(E, A) { for (var L = 4194303, $ = Math.min(E.length, 9), W = 0; W < $; W++) A.words[W] = E.words[W]; if (A.length = $, E.length <= 9) { E.words[0] = 0, E.length = 1; return; } var U = E.words[9]; for (A.words[A.length++] = U & L, W = 10; W < E.length; W++) { var D = E.words[W] | 0; E.words[W - 10] = (D & L) << 4 | U >>> 22, U = D; } U >>>= 22, E.words[W - 10] = U, U === 0 && E.length > 10 ? E.length -= 10 : E.length -= 9; }, F.prototype.imulK = function(E) { E.words[E.length] = 0, E.words[E.length + 1] = 0, E.length += 2; for (var A = 0, L = 0; L < E.length; L++) { var $ = E.words[L] | 0; A += $ * 977, E.words[L] = A & 67108863, A = $ * 64 + (A / 67108864 | 0); } return E.words[E.length - 1] === 0 && (E.length--, E.words[E.length - 1] === 0 && E.length--), E; }; function z() { P.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001"); } w(z, P); function N() { P.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff"); } w(N, P); function M() { P.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed"); } w(M, P), M.prototype.imulK = function(E) { for (var A = 0, L = 0; L < E.length; L++) { var $ = (E.words[L] | 0) * 19 + A, W = $ & 67108863; $ >>>= 26, E.words[L] = W, A = $; } return A !== 0 && (E.words[E.length++] = A), E; }, f._prime = function(E) { if (O[E]) return O[E]; var A; if (E === "k256") A = new F(); else if (E === "p224") A = new z(); else if (E === "p192") A = new N(); else if (E === "p25519") A = new M(); else throw new Error("Unknown prime " + E); return O[E] = A, A; }; function I(C) { if (typeof C == "string") { var E = f._prime(C); this.m = E.p, this.prime = E; } else b(C.gtn(1), "modulus must be greater than 1"), this.m = C, this.prime = null; } I.prototype._verify1 = function(E) { b(E.negative === 0, "red works only with positives"), b(E.red, "red works only with red numbers"); }, I.prototype._verify2 = function(E, A) { b((E.negative | A.negative) === 0, "red works only with positives"), b(E.red && E.red === A.red, "red works only with red numbers"); }, I.prototype.imod = function(E) { return this.prime ? this.prime.ireduce(E)._forceRed(this) : (d(E, E.umod(this.m)._forceRed(this)), E); }, I.prototype.neg = function(E) { return E.isZero() ? E.clone() : this.m.sub(E)._forceRed(this); }, I.prototype.add = function(E, A) { this._verify2(E, A); var L = E.add(A); return L.cmp(this.m) >= 0 && L.isub(this.m), L._forceRed(this); }, I.prototype.iadd = function(E, A) { this._verify2(E, A); var L = E.iadd(A); return L.cmp(this.m) >= 0 && L.isub(this.m), L; }, I.prototype.sub = function(E, A) { this._verify2(E, A); var L = E.sub(A); return L.cmpn(0) < 0 && L.iadd(this.m), L._forceRed(this); }, I.prototype.isub = function(E, A) { this._verify2(E, A); var L = E.isub(A); return L.cmpn(0) < 0 && L.iadd(this.m), L; }, I.prototype.shl = function(E, A) { return this._verify1(E), this.imod(E.ushln(A)); }, I.prototype.imul = function(E, A) { return this._verify2(E, A), this.imod(E.imul(A)); }, I.prototype.mul = function(E, A) { return this._verify2(E, A), this.imod(E.mul(A)); }, I.prototype.isqr = function(E) { return this.imul(E, E.clone()); }, I.prototype.sqr = function(E) { return this.mul(E, E); }, I.prototype.sqrt = function(E) { if (E.isZero()) return E.clone(); var A = this.m.andln(3); if (b(A % 2 === 1), A === 3) { var L = this.m.add(new f(1)).iushrn(2); return this.pow(E, L); } for (var $ = this.m.subn(1), W = 0; !$.isZero() && $.andln(1) === 0; ) W++, $.iushrn(1); b(!$.isZero()); var U = new f(1).toRed(this), D = U.redNeg(), B = this.m.subn(1).iushrn(1), j = this.m.bitLength(); for (j = new f(2 * j * j).toRed(this); this.pow(j, B).cmp(D) !== 0; ) j.redIAdd(D); for (var V = this.pow(j, $), re = this.pow(E, $.addn(1).iushrn(1)), ee = this.pow(E, $), ce = W; ee.cmp(U) !== 0; ) { for (var ve = ee, ge = 0; ve.cmp(U) !== 0; ge++) ve = ve.redSqr(); b(ge < ce); var oe = this.pow(V, new f(1).iushln(ce - ge - 1)); re = re.redMul(oe), V = oe.redSqr(), ee = ee.redMul(V), ce = ge; } return re; }, I.prototype.invm = function(E) { var A = E._invmp(this.m); return A.negative !== 0 ? (A.negative = 0, this.imod(A).redNeg()) : this.imod(A); }, I.prototype.pow = function(E, A) { if (A.isZero()) return new f(1).toRed(this); if (A.cmpn(1) === 0) return E.clone(); var L = 4, $ = new Array(1 << L); $[0] = new f(1).toRed(this), $[1] = E; for (var W = 2; W < $.length; W++) $[W] = this.mul($[W - 1], E); var U = $[0], D = 0, B = 0, j = A.bitLength() % 26; for (j === 0 && (j = 26), W = A.length - 1; W >= 0; W--) { for (var V = A.words[W], re = j - 1; re >= 0; re--) { var ee = V >> re & 1; if (U !== $[0] && (U = this.sqr(U)), ee === 0 && D === 0) { B = 0; continue; } D <<= 1, D |= ee, B++, !(B !== L && (W !== 0 || re !== 0)) && (U = this.mul(U, $[D]), B = 0, D = 0); } j = 26; } return U; }, I.prototype.convertTo = function(E) { var A = E.umod(this.m); return A === E ? A.clone() : A; }, I.prototype.convertFrom = function(E) { var A = E.clone(); return A.red = null, A; }, f.mont = function(E) { return new R(E); }; function R(C) { I.call(this, C), this.shift = this.m.bitLength(), this.shift % 26 !== 0 && (this.shift += 26 - this.shift % 26), this.r = new f(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv); } w(R, I), R.prototype.convertTo = function(E) { return this.imod(E.ushln(this.shift)); }, R.prototype.convertFrom = function(E) { var A = this.imod(E.mul(this.rinv)); return A.red = null, A; }, R.prototype.imul = function(E, A) { if (E.isZero() || A.isZero()) return E.words[0] = 0, E.length = 1, E; var L = E.imul(A), $ = L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), W = L.isub($).iushrn(this.shift), U = W; return W.cmp(this.m) >= 0 ? U = W.isub(this.m) : W.cmpn(0) < 0 && (U = W.iadd(this.m)), U._forceRed(this); }, R.prototype.mul = function(E, A) { if (E.isZero() || A.isZero()) return new f(0)._forceRed(this); var L = E.mul(A), $ = L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), W = L.isub($).iushrn(this.shift), U = W; return W.cmp(this.m) >= 0 ? U = W.isub(this.m) : W.cmpn(0) < 0 && (U = W.iadd(this.m)), U._forceRed(this); }, R.prototype.invm = function(E) { var A = this.imod(E._invmp(this.m).mul(this.r2)); return A._forceRed(this); }; })(typeof x == "undefined" || x, void 0); }, { buffer: 185 }], 184: [function(e, x, _) { function u(w) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(y) { return typeof y; } : u = function(y) { return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y; }, u(w); } var m; x.exports = function(f) { return m || (m = new g(null)), m.generate(f); }; function g(w) { this.rand = w; } if (x.exports.Rand = g, g.prototype.generate = function(f) { return this._rand(f); }, g.prototype._rand = function(f) { if (this.rand.getBytes) return this.rand.getBytes(f); for (var y = new Uint8Array(f), h = 0; h < y.length; h++) y[h] = this.rand.getByte(); return y; }, (typeof self == "undefined" ? "undefined" : u(self)) === "object") self.crypto && self.crypto.getRandomValues ? g.prototype._rand = function(f) { var y = new Uint8Array(f); return self.crypto.getRandomValues(y), y; } : self.msCrypto && self.msCrypto.getRandomValues ? g.prototype._rand = function(f) { var y = new Uint8Array(f); return self.msCrypto.getRandomValues(y), y; } : (typeof window == "undefined" ? "undefined" : u(window)) === "object" && (g.prototype._rand = function() { throw new Error("Not implemented yet"); }); else try { var b = e("crypto"); if (typeof b.randomBytes != "function") throw new Error("Not supported"); g.prototype._rand = function(f) { return b.randomBytes(f); }; } catch (w) { } }, { crypto: 185 }], 185: [function(e, x, _) { }, {}], 186: [function(e, x, _) { var u = e("safe-buffer").Buffer; function m(h) { u.isBuffer(h) || (h = u.from(h)); for (var l = h.length / 4 | 0, d = new Array(l), s = 0; s < l; s++) d[s] = h.readUInt32BE(s * 4); return d; } function g(h) { for (var l = 0; l < h.length; h++) h[l] = 0; } function b(h, l, d, s, v) { for (var c = d[0], a = d[1], r = d[2], t = d[3], i = h[0] ^ l[0], n = h[1] ^ l[1], o = h[2] ^ l[2], p = h[3] ^ l[3], O, P, F, z, N = 4, M = 1; M < v; M++) O = c[i >>> 24] ^ a[n >>> 16 & 255] ^ r[o >>> 8 & 255] ^ t[p & 255] ^ l[N++], P = c[n >>> 24] ^ a[o >>> 16 & 255] ^ r[p >>> 8 & 255] ^ t[i & 255] ^ l[N++], F = c[o >>> 24] ^ a[p >>> 16 & 255] ^ r[i >>> 8 & 255] ^ t[n & 255] ^ l[N++], z = c[p >>> 24] ^ a[i >>> 16 & 255] ^ r[n >>> 8 & 255] ^ t[o & 255] ^ l[N++], i = O, n = P, o = F, p = z; return O = (s[i >>> 24] << 24 | s[n >>> 16 & 255] << 16 | s[o >>> 8 & 255] << 8 | s[p & 255]) ^ l[N++], P = (s[n >>> 24] << 24 | s[o >>> 16 & 255] << 16 | s[p >>> 8 & 255] << 8 | s[i & 255]) ^ l[N++], F = (s[o >>> 24] << 24 | s[p >>> 16 & 255] << 16 | s[i >>> 8 & 255] << 8 | s[n & 255]) ^ l[N++], z = (s[p >>> 24] << 24 | s[i >>> 16 & 255] << 16 | s[n >>> 8 & 255] << 8 | s[o & 255]) ^ l[N++], O = O >>> 0, P = P >>> 0, F = F >>> 0, z = z >>> 0, [O, P, F, z]; } var w = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], f = function() { for (var h = new Array(256), l = 0; l < 256; l++) l < 128 ? h[l] = l << 1 : h[l] = l << 1 ^ 283; for (var d = [], s = [], v = [[], [], [], []], c = [[], [], [], []], a = 0, r = 0, t = 0; t < 256; ++t) { var i = r ^ r << 1 ^ r << 2 ^ r << 3 ^ r << 4; i = i >>> 8 ^ i & 255 ^ 99, d[a] = i, s[i] = a; var n = h[a], o = h[n], p = h[o], O = h[i] * 257 ^ i * 16843008; v[0][a] = O << 24 | O >>> 8, v[1][a] = O << 16 | O >>> 16, v[2][a] = O << 8 | O >>> 24, v[3][a] = O, O = p * 16843009 ^ o * 65537 ^ n * 257 ^ a * 16843008, c[0][i] = O << 24 | O >>> 8, c[1][i] = O << 16 | O >>> 16, c[2][i] = O << 8 | O >>> 24, c[3][i] = O, a === 0 ? a = r = 1 : (a = n ^ h[h[h[p ^ n]]], r ^= h[h[r]]); } return { SBOX: d, INV_SBOX: s, SUB_MIX: v, INV_SUB_MIX: c }; }(); function y(h) { this._key = m(h), this._reset(); } y.blockSize = 4 * 4, y.keySize = 256 / 8, y.prototype.blockSize = y.blockSize, y.prototype.keySize = y.keySize, y.prototype._reset = function() { for (var h = this._key, l = h.length, d = l + 6, s = (d + 1) * 4, v = [], c = 0; c < l; c++) v[c] = h[c]; for (c = l; c < s; c++) { var a = v[c - 1]; c % l === 0 ? (a = a << 8 | a >>> 24, a = f.SBOX[a >>> 24] << 24 | f.SBOX[a >>> 16 & 255] << 16 | f.SBOX[a >>> 8 & 255] << 8 | f.SBOX[a & 255], a ^= w[c / l | 0] << 24) : l > 6 && c % l === 4 && (a = f.SBOX[a >>> 24] << 24 | f.SBOX[a >>> 16 & 255] << 16 | f.SBOX[a >>> 8 & 255] << 8 | f.SBOX[a & 255]), v[c] = v[c - l] ^ a; } for (var r = [], t = 0; t < s; t++) { var i = s - t, n = v[i - (t % 4 ? 0 : 4)]; t < 4 || i <= 4 ? r[t] = n : r[t] = f.INV_SUB_MIX[0][f.SBOX[n >>> 24]] ^ f.INV_SUB_MIX[1][f.SBOX[n >>> 16 & 255]] ^ f.INV_SUB_MIX[2][f.SBOX[n >>> 8 & 255]] ^ f.INV_SUB_MIX[3][f.SBOX[n & 255]]; } this._nRounds = d, this._keySchedule = v, this._invKeySchedule = r; }, y.prototype.encryptBlockRaw = function(h) { return h = m(h), b(h, this._keySchedule, f.SUB_MIX, f.SBOX, this._nRounds); }, y.prototype.encryptBlock = function(h) { var l = this.encryptBlockRaw(h), d = u.allocUnsafe(16); return d.writeUInt32BE(l[0], 0), d.writeUInt32BE(l[1], 4), d.writeUInt32BE(l[2], 8), d.writeUInt32BE(l[3], 12), d; }, y.prototype.decryptBlock = function(h) { h = m(h); var l = h[1]; h[1] = h[3], h[3] = l; var d = b(h, this._invKeySchedule, f.INV_SUB_MIX, f.INV_SBOX, this._nRounds), s = u.allocUnsafe(16); return s.writeUInt32BE(d[0], 0), s.writeUInt32BE(d[3], 4), s.writeUInt32BE(d[2], 8), s.writeUInt32BE(d[1], 12), s; }, y.prototype.scrub = function() { g(this._keySchedule), g(this._invKeySchedule), g(this._key); }, x.exports.AES = y; }, { "safe-buffer": 494 }], 187: [function(e, x, _) { var u = e("./aes"), m = e("safe-buffer").Buffer, g = e("cipher-base"), b = e("inherits"), w = e("./ghash"), f = e("buffer-xor"), y = e("./incr32"); function h(s, v) { var c = 0; s.length !== v.length && c++; for (var a = Math.min(s.length, v.length), r = 0; r < a; ++r) c += s[r] ^ v[r]; return c; } function l(s, v, c) { if (v.length === 12) return s._finID = m.concat([v, m.from([0, 0, 0, 1])]), m.concat([v, m.from([0, 0, 0, 2])]); var a = new w(c), r = v.length, t = r % 16; a.update(v), t && (t = 16 - t, a.update(m.alloc(t, 0))), a.update(m.alloc(8, 0)); var i = r * 8, n = m.alloc(8); n.writeUIntBE(i, 0, 8), a.update(n), s._finID = a.state; var o = m.from(s._finID); return y(o), o; } function d(s, v, c, a) { g.call(this); var r = m.alloc(4, 0); this._cipher = new u.AES(v); var t = this._cipher.encryptBlock(r); this._ghash = new w(t), c = l(this, c, t), this._prev = m.from(c), this._cache = m.allocUnsafe(0), this._secCache = m.allocUnsafe(0), this._decrypt = a, this._alen = 0, this._len = 0, this._mode = s, this._authTag = null, this._called = !1; } b(d, g), d.prototype._update = function(s) { if (!this._called && this._alen) { var v = 16 - this._alen % 16; v < 16 && (v = m.alloc(v, 0), this._ghash.update(v)); } this._called = !0; var c = this._mode.encrypt(this, s); return this._decrypt ? this._ghash.update(s) : this._ghash.update(c), this._len += s.length, c; }, d.prototype._final = function() { if (this._decrypt && !this._authTag) throw new Error("Unsupported state or unable to authenticate data"); var s = f(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)); if (this._decrypt && h(s, this._authTag)) throw new Error("Unsupported state or unable to authenticate data"); this._authTag = s, this._cipher.scrub(); }, d.prototype.getAuthTag = function() { if (this._decrypt || !m.isBuffer(this._authTag)) throw new Error("Attempting to get auth tag in unsupported state"); return this._authTag; }, d.prototype.setAuthTag = function(v) { if (!this._decrypt) throw new Error("Attempting to set auth tag in unsupported state"); this._authTag = v; }, d.prototype.setAAD = function(v) { if (this._called) throw new Error("Attempting to set AAD in unsupported state"); this._ghash.update(v), this._alen += v.length; }, x.exports = d; }, { "./aes": 186, "./ghash": 191, "./incr32": 192, "buffer-xor": 217, "cipher-base": 218, inherits: 387, "safe-buffer": 494 }], 188: [function(e, x, _) { var u = e("./encrypter"), m = e("./decrypter"), g = e("./modes/list.json"); function b() { return Object.keys(g); } _.createCipher = _.Cipher = u.createCipher, _.createCipheriv = _.Cipheriv = u.createCipheriv, _.createDecipher = _.Decipher = m.createDecipher, _.createDecipheriv = _.Decipheriv = m.createDecipheriv, _.listCiphers = _.getCiphers = b; }, { "./decrypter": 189, "./encrypter": 190, "./modes/list.json": 200 }], 189: [function(e, x, _) { var u = e("./authCipher"), m = e("safe-buffer").Buffer, g = e("./modes"), b = e("./streamCipher"), w = e("cipher-base"), f = e("./aes"), y = e("evp_bytestokey"), h = e("inherits"); function l(a, r, t) { w.call(this), this._cache = new d(), this._last = void 0, this._cipher = new f.AES(r), this._prev = m.from(t), this._mode = a, this._autopadding = !0; } h(l, w), l.prototype._update = function(a) { this._cache.add(a); for (var r, t, i = []; r = this._cache.get(this._autopadding); ) t = this._mode.decrypt(this, r), i.push(t); return m.concat(i); }, l.prototype._final = function() { var a = this._cache.flush(); if (this._autopadding) return s(this._mode.decrypt(this, a)); if (a) throw new Error("data not multiple of block length"); }, l.prototype.setAutoPadding = function(a) { return this._autopadding = !!a, this; }; function d() { this.cache = m.allocUnsafe(0); } d.prototype.add = function(a) { this.cache = m.concat([this.cache, a]); }, d.prototype.get = function(a) { var r; if (a) { if (this.cache.length > 16) return r = this.cache.slice(0, 16), this.cache = this.cache.slice(16), r; } else if (this.cache.length >= 16) return r = this.cache.slice(0, 16), this.cache = this.cache.slice(16), r; return null; }, d.prototype.flush = function() { if (this.cache.length) return this.cache; }; function s(a) { var r = a[15]; if (r < 1 || r > 16) throw new Error("unable to decrypt data"); for (var t = -1; ++t < r; ) if (a[t + (16 - r)] !== r) throw new Error("unable to decrypt data"); if (r !== 16) return a.slice(0, 16 - r); } function v(a, r, t) { var i = g[a.toLowerCase()]; if (!i) throw new TypeError("invalid suite type"); if (typeof t == "string" && (t = m.from(t)), i.mode !== "GCM" && t.length !== i.iv) throw new TypeError("invalid iv length " + t.length); if (typeof r == "string" && (r = m.from(r)), r.length !== i.key / 8) throw new TypeError("invalid key length " + r.length); return i.type === "stream" ? new b(i.module, r, t, !0) : i.type === "auth" ? new u(i.module, r, t, !0) : new l(i.module, r, t); } function c(a, r) { var t = g[a.toLowerCase()]; if (!t) throw new TypeError("invalid suite type"); var i = y(r, !1, t.key, t.iv); return v(a, i.key, i.iv); } _.createDecipher = c, _.createDecipheriv = v; }, { "./aes": 186, "./authCipher": 187, "./modes": 199, "./streamCipher": 202, "cipher-base": 218, evp_bytestokey: 368, inherits: 387, "safe-buffer": 494 }], 190: [function(e, x, _) { var u = e("./modes"), m = e("./authCipher"), g = e("safe-buffer").Buffer, b = e("./streamCipher"), w = e("cipher-base"), f = e("./aes"), y = e("evp_bytestokey"), h = e("inherits"); function l(a, r, t) { w.call(this), this._cache = new s(), this._cipher = new f.AES(r), this._prev = g.from(t), this._mode = a, this._autopadding = !0; } h(l, w), l.prototype._update = function(a) { this._cache.add(a); for (var r, t, i = []; r = this._cache.get(); ) t = this._mode.encrypt(this, r), i.push(t); return g.concat(i); }; var d = g.alloc(16, 16); l.prototype._final = function() { var a = this._cache.flush(); if (this._autopadding) return a = this._mode.encrypt(this, a), this._cipher.scrub(), a; if (!a.equals(d)) throw this._cipher.scrub(), new Error("data not multiple of block length"); }, l.prototype.setAutoPadding = function(a) { return this._autopadding = !!a, this; }; function s() { this.cache = g.allocUnsafe(0); } s.prototype.add = function(a) { this.cache = g.concat([this.cache, a]); }, s.prototype.get = function() { if (this.cache.length > 15) { var a = this.cache.slice(0, 16); return this.cache = this.cache.slice(16), a; } return null; }, s.prototype.flush = function() { for (var a = 16 - this.cache.length, r = g.allocUnsafe(a), t = -1; ++t < a; ) r.writeUInt8(a, t); return g.concat([this.cache, r]); }; function v(a, r, t) { var i = u[a.toLowerCase()]; if (!i) throw new TypeError("invalid suite type"); if (typeof r == "string" && (r = g.from(r)), r.length !== i.key / 8) throw new TypeError("invalid key length " + r.length); if (typeof t == "string" && (t = g.from(t)), i.mode !== "GCM" && t.length !== i.iv) throw new TypeError("invalid iv length " + t.length); return i.type === "stream" ? new b(i.module, r, t) : i.type === "auth" ? new m(i.module, r, t) : new l(i.module, r, t); } function c(a, r) { var t = u[a.toLowerCase()]; if (!t) throw new TypeError("invalid suite type"); var i = y(r, !1, t.key, t.iv); return v(a, i.key, i.iv); } _.createCipheriv = v, _.createCipher = c; }, { "./aes": 186, "./authCipher": 187, "./modes": 199, "./streamCipher": 202, "cipher-base": 218, evp_bytestokey: 368, inherits: 387, "safe-buffer": 494 }], 191: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = u.alloc(16, 0); function g(f) { return [f.readUInt32BE(0), f.readUInt32BE(4), f.readUInt32BE(8), f.readUInt32BE(12)]; } function b(f) { var y = u.allocUnsafe(16); return y.writeUInt32BE(f[0] >>> 0, 0), y.writeUInt32BE(f[1] >>> 0, 4), y.writeUInt32BE(f[2] >>> 0, 8), y.writeUInt32BE(f[3] >>> 0, 12), y; } function w(f) { this.h = f, this.state = u.alloc(16, 0), this.cache = u.allocUnsafe(0); } w.prototype.ghash = function(f) { for (var y = -1; ++y < f.length; ) this.state[y] ^= f[y]; this._multiply(); }, w.prototype._multiply = function() { for (var f = g(this.h), y = [0, 0, 0, 0], h, l, d, s = -1; ++s < 128; ) { for (l = (this.state[~~(s / 8)] & 1 << 7 - s % 8) !== 0, l && (y[0] ^= f[0], y[1] ^= f[1], y[2] ^= f[2], y[3] ^= f[3]), d = (f[3] & 1) !== 0, h = 3; h > 0; h--) f[h] = f[h] >>> 1 | (f[h - 1] & 1) << 31; f[0] = f[0] >>> 1, d && (f[0] = f[0] ^ 225 << 24); } this.state = b(y); }, w.prototype.update = function(f) { this.cache = u.concat([this.cache, f]); for (var y; this.cache.length >= 16; ) y = this.cache.slice(0, 16), this.cache = this.cache.slice(16), this.ghash(y); }, w.prototype.final = function(f, y) { return this.cache.length && this.ghash(u.concat([this.cache, m], 16)), this.ghash(b([0, f, 0, y])), this.state; }, x.exports = w; }, { "safe-buffer": 494 }], 192: [function(e, x, _) { function u(m) { for (var g = m.length, b; g--; ) if (b = m.readUInt8(g), b === 255) m.writeUInt8(0, g); else { b++, m.writeUInt8(b, g); break; } } x.exports = u; }, {}], 193: [function(e, x, _) { var u = e("buffer-xor"); _.encrypt = function(m, g) { var b = u(g, m._prev); return m._prev = m._cipher.encryptBlock(b), m._prev; }, _.decrypt = function(m, g) { var b = m._prev; m._prev = g; var w = m._cipher.decryptBlock(g); return u(w, b); }; }, { "buffer-xor": 217 }], 194: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("buffer-xor"); function g(b, w, f) { var y = w.length, h = m(w, b._cache); return b._cache = b._cache.slice(y), b._prev = u.concat([b._prev, f ? w : h]), h; } _.encrypt = function(b, w, f) { for (var y = u.allocUnsafe(0), h; w.length; ) if (b._cache.length === 0 && (b._cache = b._cipher.encryptBlock(b._prev), b._prev = u.allocUnsafe(0)), b._cache.length <= w.length) h = b._cache.length, y = u.concat([y, g(b, w.slice(0, h), f)]), w = w.slice(h); else { y = u.concat([y, g(b, w, f)]); break; } return y; }; }, { "buffer-xor": 217, "safe-buffer": 494 }], 195: [function(e, x, _) { var u = e("safe-buffer").Buffer; function m(b, w, f) { for (var y, h = -1, l = 8, d = 0, s, v; ++h < l; ) y = b._cipher.encryptBlock(b._prev), s = w & 1 << 7 - h ? 128 : 0, v = y[0] ^ s, d += (v & 128) >> h % 8, b._prev = g(b._prev, f ? s : v); return d; } function g(b, w) { var f = b.length, y = -1, h = u.allocUnsafe(b.length); for (b = u.concat([b, u.from([w])]); ++y < f; ) h[y] = b[y] << 1 | b[y + 1] >> 7; return h; } _.encrypt = function(b, w, f) { for (var y = w.length, h = u.allocUnsafe(y), l = -1; ++l < y; ) h[l] = m(b, w[l], f); return h; }; }, { "safe-buffer": 494 }], 196: [function(e, x, _) { var u = e("safe-buffer").Buffer; function m(g, b, w) { var f = g._cipher.encryptBlock(g._prev), y = f[0] ^ b; return g._prev = u.concat([g._prev.slice(1), u.from([w ? b : y])]), y; } _.encrypt = function(g, b, w) { for (var f = b.length, y = u.allocUnsafe(f), h = -1; ++h < f; ) y[h] = m(g, b[h], w); return y; }; }, { "safe-buffer": 494 }], 197: [function(e, x, _) { var u = e("buffer-xor"), m = e("safe-buffer").Buffer, g = e("../incr32"); function b(f) { var y = f._cipher.encryptBlockRaw(f._prev); return g(f._prev), y; } var w = 16; _.encrypt = function(f, y) { var h = Math.ceil(y.length / w), l = f._cache.length; f._cache = m.concat([f._cache, m.allocUnsafe(h * w)]); for (var d = 0; d < h; d++) { var s = b(f), v = l + d * w; f._cache.writeUInt32BE(s[0], v + 0), f._cache.writeUInt32BE(s[1], v + 4), f._cache.writeUInt32BE(s[2], v + 8), f._cache.writeUInt32BE(s[3], v + 12); } var c = f._cache.slice(0, y.length); return f._cache = f._cache.slice(y.length), u(y, c); }; }, { "../incr32": 192, "buffer-xor": 217, "safe-buffer": 494 }], 198: [function(e, x, _) { _.encrypt = function(u, m) { return u._cipher.encryptBlock(m); }, _.decrypt = function(u, m) { return u._cipher.decryptBlock(m); }; }, {}], 199: [function(e, x, _) { var u = { ECB: e("./ecb"), CBC: e("./cbc"), CFB: e("./cfb"), CFB8: e("./cfb8"), CFB1: e("./cfb1"), OFB: e("./ofb"), CTR: e("./ctr"), GCM: e("./ctr") }, m = e("./list.json"); for (var g in m) m[g].module = u[m[g].mode]; x.exports = m; }, { "./cbc": 193, "./cfb": 194, "./cfb1": 195, "./cfb8": 196, "./ctr": 197, "./ecb": 198, "./list.json": 200, "./ofb": 201 }], 200: [function(e, x, _) { x.exports = { "aes-128-ecb": { cipher: "AES", key: 128, iv: 0, mode: "ECB", type: "block" }, "aes-192-ecb": { cipher: "AES", key: 192, iv: 0, mode: "ECB", type: "block" }, "aes-256-ecb": { cipher: "AES", key: 256, iv: 0, mode: "ECB", type: "block" }, "aes-128-cbc": { cipher: "AES", key: 128, iv: 16, mode: "CBC", type: "block" }, "aes-192-cbc": { cipher: "AES", key: 192, iv: 16, mode: "CBC", type: "block" }, "aes-256-cbc": { cipher: "AES", key: 256, iv: 16, mode: "CBC", type: "block" }, aes128: { cipher: "AES", key: 128, iv: 16, mode: "CBC", type: "block" }, aes192: { cipher: "AES", key: 192, iv: 16, mode: "CBC", type: "block" }, aes256: { cipher: "AES", key: 256, iv: 16, mode: "CBC", type: "block" }, "aes-128-cfb": { cipher: "AES", key: 128, iv: 16, mode: "CFB", type: "stream" }, "aes-192-cfb": { cipher: "AES", key: 192, iv: 16, mode: "CFB", type: "stream" }, "aes-256-cfb": { cipher: "AES", key: 256, iv: 16, mode: "CFB", type: "stream" }, "aes-128-cfb8": { cipher: "AES", key: 128, iv: 16, mode: "CFB8", type: "stream" }, "aes-192-cfb8": { cipher: "AES", key: 192, iv: 16, mode: "CFB8", type: "stream" }, "aes-256-cfb8": { cipher: "AES", key: 256, iv: 16, mode: "CFB8", type: "stream" }, "aes-128-cfb1": { cipher: "AES", key: 128, iv: 16, mode: "CFB1", type: "stream" }, "aes-192-cfb1": { cipher: "AES", key: 192, iv: 16, mode: "CFB1", type: "stream" }, "aes-256-cfb1": { cipher: "AES", key: 256, iv: 16, mode: "CFB1", type: "stream" }, "aes-128-ofb": { cipher: "AES", key: 128, iv: 16, mode: "OFB", type: "stream" }, "aes-192-ofb": { cipher: "AES", key: 192, iv: 16, mode: "OFB", type: "stream" }, "aes-256-ofb": { cipher: "AES", key: 256, iv: 16, mode: "OFB", type: "stream" }, "aes-128-ctr": { cipher: "AES", key: 128, iv: 16, mode: "CTR", type: "stream" }, "aes-192-ctr": { cipher: "AES", key: 192, iv: 16, mode: "CTR", type: "stream" }, "aes-256-ctr": { cipher: "AES", key: 256, iv: 16, mode: "CTR", type: "stream" }, "aes-128-gcm": { cipher: "AES", key: 128, iv: 12, mode: "GCM", type: "auth" }, "aes-192-gcm": { cipher: "AES", key: 192, iv: 12, mode: "GCM", type: "auth" }, "aes-256-gcm": { cipher: "AES", key: 256, iv: 12, mode: "GCM", type: "auth" } }; }, {}], 201: [function(e, x, _) { (function(u) { var m = e("buffer-xor"); function g(b) { return b._prev = b._cipher.encryptBlock(b._prev), b._prev; } _.encrypt = function(b, w) { for (; b._cache.length < w.length; ) b._cache = u.concat([b._cache, g(b)]); var f = b._cache.slice(0, w.length); return b._cache = b._cache.slice(w.length), m(w, f); }; }).call(this, e("buffer").Buffer); }, { buffer: 216, "buffer-xor": 217 }], 202: [function(e, x, _) { var u = e("./aes"), m = e("safe-buffer").Buffer, g = e("cipher-base"), b = e("inherits"); function w(f, y, h, l) { g.call(this), this._cipher = new u.AES(y), this._prev = m.from(h), this._cache = m.allocUnsafe(0), this._secCache = m.allocUnsafe(0), this._decrypt = l, this._mode = f; } b(w, g), w.prototype._update = function(f) { return this._mode.encrypt(this, f, this._decrypt); }, w.prototype._final = function() { this._cipher.scrub(); }, x.exports = w; }, { "./aes": 186, "cipher-base": 218, inherits: 387, "safe-buffer": 494 }], 203: [function(e, x, _) { var u = e("browserify-des"), m = e("browserify-aes/browser"), g = e("browserify-aes/modes"), b = e("browserify-des/modes"), w = e("evp_bytestokey"); function f(s, v) { s = s.toLowerCase(); var c, a; if (g[s]) c = g[s].key, a = g[s].iv; else if (b[s]) c = b[s].key * 8, a = b[s].iv; else throw new TypeError("invalid suite type"); var r = w(v, !1, c, a); return h(s, r.key, r.iv); } function y(s, v) { s = s.toLowerCase(); var c, a; if (g[s]) c = g[s].key, a = g[s].iv; else if (b[s]) c = b[s].key * 8, a = b[s].iv; else throw new TypeError("invalid suite type"); var r = w(v, !1, c, a); return l(s, r.key, r.iv); } function h(s, v, c) { if (s = s.toLowerCase(), g[s]) return m.createCipheriv(s, v, c); if (b[s]) return new u({ key: v, iv: c, mode: s }); throw new TypeError("invalid suite type"); } function l(s, v, c) { if (s = s.toLowerCase(), g[s]) return m.createDecipheriv(s, v, c); if (b[s]) return new u({ key: v, iv: c, mode: s, decrypt: !0 }); throw new TypeError("invalid suite type"); } function d() { return Object.keys(b).concat(m.getCiphers()); } _.createCipher = _.Cipher = f, _.createCipheriv = _.Cipheriv = h, _.createDecipher = _.Decipher = y, _.createDecipheriv = _.Decipheriv = l, _.listCiphers = _.getCiphers = d; }, { "browserify-aes/browser": 188, "browserify-aes/modes": 199, "browserify-des": 204, "browserify-des/modes": 205, evp_bytestokey: 368 }], 204: [function(e, x, _) { var u = e("cipher-base"), m = e("des.js"), g = e("inherits"), b = e("safe-buffer").Buffer, w = { "des-ede3-cbc": m.CBC.instantiate(m.EDE), "des-ede3": m.EDE, "des-ede-cbc": m.CBC.instantiate(m.EDE), "des-ede": m.EDE, "des-cbc": m.CBC.instantiate(m.DES), "des-ecb": m.DES }; w.des = w["des-cbc"], w.des3 = w["des-ede3-cbc"], x.exports = f, g(f, u); function f(y) { u.call(this); var h = y.mode.toLowerCase(), l = w[h], d; y.decrypt ? d = "decrypt" : d = "encrypt"; var s = y.key; b.isBuffer(s) || (s = b.from(s)), (h === "des-ede" || h === "des-ede-cbc") && (s = b.concat([s, s.slice(0, 8)])); var v = y.iv; b.isBuffer(v) || (v = b.from(v)), this._des = l.create({ key: s, iv: v, type: d }); } f.prototype._update = function(y) { return b.from(this._des.update(y)); }, f.prototype._final = function() { return b.from(this._des.final()); }; }, { "cipher-base": 218, "des.js": 339, inherits: 387, "safe-buffer": 494 }], 205: [function(e, x, _) { _["des-ecb"] = { key: 8, iv: 0 }, _["des-cbc"] = _.des = { key: 8, iv: 8 }, _["des-ede3-cbc"] = _.des3 = { key: 24, iv: 8 }, _["des-ede3"] = { key: 24, iv: 0 }, _["des-ede-cbc"] = { key: 16, iv: 8 }, _["des-ede"] = { key: 16, iv: 0 }; }, {}], 206: [function(e, x, _) { (function(u) { var m = e("bn.js"), g = e("randombytes"); x.exports = w; function b(y) { var h = f(y), l = h.toRed(m.mont(y.modulus)).redPow(new m(y.publicExponent)).fromRed(); return { blinder: l, unblinder: h.invm(y.modulus) }; } function w(y, h) { var l = b(h), d = h.modulus.byteLength(); m.mont(h.modulus); var s = new m(y).mul(l.blinder).umod(h.modulus), v = s.toRed(m.mont(h.prime1)), c = s.toRed(m.mont(h.prime2)), a = h.coefficient, r = h.prime1, t = h.prime2, i = v.redPow(h.exponent1), n = c.redPow(h.exponent2); i = i.fromRed(), n = n.fromRed(); var o = i.isub(n).imul(a).umod(r); return o.imul(t), n.iadd(o), new u(n.imul(l.unblinder).umod(h.modulus).toArray(!1, d)); } w.getr = f; function f(y) { for (var h = y.modulus.byteLength(), l = new m(g(h)); l.cmp(y.modulus) >= 0 || !l.umod(y.prime1) || !l.umod(y.prime2); ) l = new m(g(h)); return l; } }).call(this, e("buffer").Buffer); }, { "bn.js": 207, buffer: 216, randombytes: 475 }], 207: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 208: [function(e, x, _) { x.exports = e("./browser/algorithms.json"); }, { "./browser/algorithms.json": 209 }], 209: [function(e, x, _) { x.exports = { sha224WithRSAEncryption: { sign: "rsa", hash: "sha224", id: "302d300d06096086480165030402040500041c" }, "RSA-SHA224": { sign: "ecdsa/rsa", hash: "sha224", id: "302d300d06096086480165030402040500041c" }, sha256WithRSAEncryption: { sign: "rsa", hash: "sha256", id: "3031300d060960864801650304020105000420" }, "RSA-SHA256": { sign: "ecdsa/rsa", hash: "sha256", id: "3031300d060960864801650304020105000420" }, sha384WithRSAEncryption: { sign: "rsa", hash: "sha384", id: "3041300d060960864801650304020205000430" }, "RSA-SHA384": { sign: "ecdsa/rsa", hash: "sha384", id: "3041300d060960864801650304020205000430" }, sha512WithRSAEncryption: { sign: "rsa", hash: "sha512", id: "3051300d060960864801650304020305000440" }, "RSA-SHA512": { sign: "ecdsa/rsa", hash: "sha512", id: "3051300d060960864801650304020305000440" }, "RSA-SHA1": { sign: "rsa", hash: "sha1", id: "3021300906052b0e03021a05000414" }, "ecdsa-with-SHA1": { sign: "ecdsa", hash: "sha1", id: "" }, sha256: { sign: "ecdsa", hash: "sha256", id: "" }, sha224: { sign: "ecdsa", hash: "sha224", id: "" }, sha384: { sign: "ecdsa", hash: "sha384", id: "" }, sha512: { sign: "ecdsa", hash: "sha512", id: "" }, "DSA-SHA": { sign: "dsa", hash: "sha1", id: "" }, "DSA-SHA1": { sign: "dsa", hash: "sha1", id: "" }, DSA: { sign: "dsa", hash: "sha1", id: "" }, "DSA-WITH-SHA224": { sign: "dsa", hash: "sha224", id: "" }, "DSA-SHA224": { sign: "dsa", hash: "sha224", id: "" }, "DSA-WITH-SHA256": { sign: "dsa", hash: "sha256", id: "" }, "DSA-SHA256": { sign: "dsa", hash: "sha256", id: "" }, "DSA-WITH-SHA384": { sign: "dsa", hash: "sha384", id: "" }, "DSA-SHA384": { sign: "dsa", hash: "sha384", id: "" }, "DSA-WITH-SHA512": { sign: "dsa", hash: "sha512", id: "" }, "DSA-SHA512": { sign: "dsa", hash: "sha512", id: "" }, "DSA-RIPEMD160": { sign: "dsa", hash: "rmd160", id: "" }, ripemd160WithRSA: { sign: "rsa", hash: "rmd160", id: "3021300906052b2403020105000414" }, "RSA-RIPEMD160": { sign: "rsa", hash: "rmd160", id: "3021300906052b2403020105000414" }, md5WithRSAEncryption: { sign: "rsa", hash: "md5", id: "3020300c06082a864886f70d020505000410" }, "RSA-MD5": { sign: "rsa", hash: "md5", id: "3020300c06082a864886f70d020505000410" } }; }, {}], 210: [function(e, x, _) { x.exports = { "1.3.132.0.10": "secp256k1", "1.3.132.0.33": "p224", "1.2.840.10045.3.1.1": "p192", "1.2.840.10045.3.1.7": "p256", "1.3.132.0.34": "p384", "1.3.132.0.35": "p521" }; }, {}], 211: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("create-hash"), g = e("readable-stream"), b = e("inherits"), w = e("./sign"), f = e("./verify"), y = e("./algorithms.json"); Object.keys(y).forEach(function(v) { y[v].id = u.from(y[v].id, "hex"), y[v.toLowerCase()] = y[v]; }); function h(v) { g.Writable.call(this); var c = y[v]; if (!c) throw new Error("Unknown message digest"); this._hashType = c.hash, this._hash = m(c.hash), this._tag = c.id, this._signType = c.sign; } b(h, g.Writable), h.prototype._write = function(c, a, r) { this._hash.update(c), r(); }, h.prototype.update = function(c, a) { return typeof c == "string" && (c = u.from(c, a)), this._hash.update(c), this; }, h.prototype.sign = function(c, a) { this.end(); var r = this._hash.digest(), t = w(r, c, this._hashType, this._signType, this._tag); return a ? t.toString(a) : t; }; function l(v) { g.Writable.call(this); var c = y[v]; if (!c) throw new Error("Unknown message digest"); this._hash = m(c.hash), this._tag = c.id, this._signType = c.sign; } b(l, g.Writable), l.prototype._write = function(c, a, r) { this._hash.update(c), r(); }, l.prototype.update = function(c, a) { return typeof c == "string" && (c = u.from(c, a)), this._hash.update(c), this; }, l.prototype.verify = function(c, a, r) { typeof a == "string" && (a = u.from(a, r)), this.end(); var t = this._hash.digest(); return f(a, t, c, this._signType, this._tag); }; function d(v) { return new h(v); } function s(v) { return new l(v); } x.exports = { Sign: d, Verify: s, createSign: d, createVerify: s }; }, { "./algorithms.json": 209, "./sign": 212, "./verify": 213, "create-hash": 331, inherits: 387, "readable-stream": 491, "safe-buffer": 214 }], 212: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("create-hmac"), g = e("browserify-rsa"), b = e("elliptic").ec, w = e("bn.js"), f = e("parse-asn1"), y = e("./curves.json"); function h(i, n, o, p, O) { var P = f(n); if (P.curve) { if (p !== "ecdsa" && p !== "ecdsa/rsa") throw new Error("wrong private key type"); return l(i, P); } else if (P.type === "dsa") { if (p !== "dsa") throw new Error("wrong private key type"); return d(i, P, o); } else if (p !== "rsa" && p !== "ecdsa/rsa") throw new Error("wrong private key type"); i = u.concat([O, i]); for (var F = P.modulus.byteLength(), z = [0, 1]; i.length + z.length + 1 < F; ) z.push(255); z.push(0); for (var N = -1; ++N < i.length; ) z.push(i[N]); var M = g(z, P); return M; } function l(i, n) { var o = y[n.curve.join(".")]; if (!o) throw new Error("unknown curve " + n.curve.join(".")); var p = new b(o), O = p.keyFromPrivate(n.privateKey), P = O.sign(i); return u.from(P.toDER()); } function d(i, n, o) { for (var p = n.params.priv_key, O = n.params.p, P = n.params.q, F = n.params.g, z = new w(0), N, M = c(i, P).mod(P), I = !1, R = v(p, P, i, o); I === !1; ) N = r(P, R, o), z = t(F, N, O, P), I = N.invm(P).imul(M.add(p.mul(z))).mod(P), I.cmpn(0) === 0 && (I = !1, z = new w(0)); return s(z, I); } function s(i, n) { i = i.toArray(), n = n.toArray(), i[0] & 128 && (i = [0].concat(i)), n[0] & 128 && (n = [0].concat(n)); var o = i.length + n.length + 4, p = [48, o, 2, i.length]; return p = p.concat(i, [2, n.length], n), u.from(p); } function v(i, n, o, p) { if (i = u.from(i.toArray()), i.length < n.byteLength()) { var O = u.alloc(n.byteLength() - i.length); i = u.concat([O, i]); } var P = o.length, F = a(o, n), z = u.alloc(P); z.fill(1); var N = u.alloc(P); return N = m(p, N).update(z).update(u.from([0])).update(i).update(F).digest(), z = m(p, N).update(z).digest(), N = m(p, N).update(z).update(u.from([1])).update(i).update(F).digest(), z = m(p, N).update(z).digest(), { k: N, v: z }; } function c(i, n) { var o = new w(i), p = (i.length << 3) - n.bitLength(); return p > 0 && o.ishrn(p), o; } function a(i, n) { i = c(i, n), i = i.mod(n); var o = u.from(i.toArray()); if (o.length < n.byteLength()) { var p = u.alloc(n.byteLength() - o.length); o = u.concat([p, o]); } return o; } function r(i, n, o) { var p, O; do { for (p = u.alloc(0); p.length * 8 < i.bitLength(); ) n.v = m(o, n.k).update(n.v).digest(), p = u.concat([p, n.v]); O = c(p, i), n.k = m(o, n.k).update(n.v).update(u.from([0])).digest(), n.v = m(o, n.k).update(n.v).digest(); } while (O.cmp(i) !== -1); return O; } function t(i, n, o, p) { return i.toRed(w.mont(o)).redPow(n).fromRed().mod(p); } x.exports = h, x.exports.getKey = v, x.exports.makeKey = r; }, { "./curves.json": 210, "bn.js": 183, "browserify-rsa": 206, "create-hmac": 333, elliptic: 350, "parse-asn1": 459, "safe-buffer": 214 }], 213: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("bn.js"), g = e("elliptic").ec, b = e("parse-asn1"), w = e("./curves.json"); function f(d, s, v, c, a) { var r = b(v); if (r.type === "ec") { if (c !== "ecdsa" && c !== "ecdsa/rsa") throw new Error("wrong public key type"); return y(d, s, r); } else if (r.type === "dsa") { if (c !== "dsa") throw new Error("wrong public key type"); return h(d, s, r); } else if (c !== "rsa" && c !== "ecdsa/rsa") throw new Error("wrong public key type"); s = u.concat([a, s]); for (var t = r.modulus.byteLength(), i = [1], n = 0; s.length + i.length + 2 < t; ) i.push(255), n++; i.push(0); for (var o = -1; ++o < s.length; ) i.push(s[o]); i = u.from(i); var p = m.mont(r.modulus); d = new m(d).toRed(p), d = d.redPow(new m(r.publicExponent)), d = u.from(d.fromRed().toArray()); var O = n < 8 ? 1 : 0; for (t = Math.min(d.length, i.length), d.length !== i.length && (O = 1), o = -1; ++o < t; ) O |= d[o] ^ i[o]; return O === 0; } function y(d, s, v) { var c = w[v.data.algorithm.curve.join(".")]; if (!c) throw new Error("unknown curve " + v.data.algorithm.curve.join(".")); var a = new g(c), r = v.data.subjectPrivateKey.data; return a.verify(s, d, r); } function h(d, s, v) { var c = v.data.p, a = v.data.q, r = v.data.g, t = v.data.pub_key, i = b.signature.decode(d, "der"), n = i.s, o = i.r; l(n, a), l(o, a); var p = m.mont(c), O = n.invm(a), P = r.toRed(p).redPow(new m(s).mul(O).mod(a)).fromRed().mul(t.toRed(p).redPow(o.mul(O).mod(a)).fromRed()).mod(c).mod(a); return P.cmp(o) === 0; } function l(d, s) { if (d.cmpn(0) <= 0) throw new Error("invalid sig"); if (d.cmp(s) >= s) throw new Error("invalid sig"); } x.exports = f; }, { "./curves.json": 210, "bn.js": 183, elliptic: 350, "parse-asn1": 459, "safe-buffer": 214 }], 214: [function(e, x, _) { /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var u = e("buffer"), m = u.Buffer; function g(w, f) { for (var y in w) f[y] = w[y]; } m.from && m.alloc && m.allocUnsafe && m.allocUnsafeSlow ? x.exports = u : (g(u, _), _.Buffer = b); function b(w, f, y) { return m(w, f, y); } b.prototype = Object.create(m.prototype), g(m, b), b.from = function(w, f, y) { if (typeof w == "number") throw new TypeError("Argument must not be a number"); return m(w, f, y); }, b.alloc = function(w, f, y) { if (typeof w != "number") throw new TypeError("Argument must be a number"); var h = m(w); return f !== void 0 ? typeof y == "string" ? h.fill(f, y) : h.fill(f) : h.fill(0), h; }, b.allocUnsafe = function(w) { if (typeof w != "number") throw new TypeError("Argument must be a number"); return m(w); }, b.allocUnsafeSlow = function(w) { if (typeof w != "number") throw new TypeError("Argument must be a number"); return u.SlowBuffer(w); }; }, { buffer: 216 }], 215: [function(e, x, _) { arguments[4][185][0].apply(_, arguments); }, { dup: 185 }], 216: [function(e, x, _) { (function(h) { function m(q) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(Y) { return typeof Y; } : m = function(Y) { return Y && typeof Symbol == "function" && Y.constructor === Symbol && Y !== Symbol.prototype ? "symbol" : typeof Y; }, m(q); } var g = e("base64-js"), b = e("ieee754"); _.Buffer = h, _.SlowBuffer = n, _.INSPECT_MAX_BYTES = 50; var w = 2147483647; _.kMaxLength = w, h.TYPED_ARRAY_SUPPORT = f(), !h.TYPED_ARRAY_SUPPORT && typeof console != "undefined" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."); function f() { try { var q = new Uint8Array(1); return q.__proto__ = { __proto__: Uint8Array.prototype, foo: function() { return 42; } }, q.foo() === 42; } catch (G) { return !1; } } Object.defineProperty(h.prototype, "parent", { enumerable: !0, get: function() { if (h.isBuffer(this)) return this.buffer; } }), Object.defineProperty(h.prototype, "offset", { enumerable: !0, get: function() { if (h.isBuffer(this)) return this.byteOffset; } }); function y(q) { if (q > w) throw new RangeError('The value "' + q + '" is invalid for option "size"'); var G = new Uint8Array(q); return G.__proto__ = h.prototype, G; } function h(q, G, Y) { if (typeof q == "number") { if (typeof G == "string") throw new TypeError('The "string" argument must be of type string. Received type number'); return v(q); } return l(q, G, Y); } typeof Symbol != "undefined" && Symbol.species != null && h[Symbol.species] === h && Object.defineProperty(h, Symbol.species, { value: null, configurable: !0, enumerable: !1, writable: !1 }), h.poolSize = 8192; function l(q, G, Y) { if (typeof q == "string") return c(q, G); if (ArrayBuffer.isView(q)) return a(q); if (q == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + m(q)); if (se(q, ArrayBuffer) || q && se(q.buffer, ArrayBuffer)) return r(q, G, Y); if (typeof q == "number") throw new TypeError('The "value" argument must not be of type number. Received type number'); var fe = q.valueOf && q.valueOf(); if (fe != null && fe !== q) return h.from(fe, G, Y); var we = t(q); if (we) return we; if (typeof Symbol != "undefined" && Symbol.toPrimitive != null && typeof q[Symbol.toPrimitive] == "function") return h.from(q[Symbol.toPrimitive]("string"), G, Y); throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + m(q)); } h.from = function(q, G, Y) { return l(q, G, Y); }, h.prototype.__proto__ = Uint8Array.prototype, h.__proto__ = Uint8Array; function d(q) { if (typeof q != "number") throw new TypeError('"size" argument must be of type number'); if (q < 0) throw new RangeError('The value "' + q + '" is invalid for option "size"'); } function s(q, G, Y) { return d(q), q <= 0 ? y(q) : G !== void 0 ? typeof Y == "string" ? y(q).fill(G, Y) : y(q).fill(G) : y(q); } h.alloc = function(q, G, Y) { return s(q, G, Y); }; function v(q) { return d(q), y(q < 0 ? 0 : i(q) | 0); } h.allocUnsafe = function(q) { return v(q); }, h.allocUnsafeSlow = function(q) { return v(q); }; function c(q, G) { if ((typeof G != "string" || G === "") && (G = "utf8"), !h.isEncoding(G)) throw new TypeError("Unknown encoding: " + G); var Y = o(q, G) | 0, fe = y(Y), we = fe.write(q, G); return we !== Y && (fe = fe.slice(0, we)), fe; } function a(q) { for (var G = q.length < 0 ? 0 : i(q.length) | 0, Y = y(G), fe = 0; fe < G; fe += 1) Y[fe] = q[fe] & 255; return Y; } function r(q, G, Y) { if (G < 0 || q.byteLength < G) throw new RangeError('"offset" is outside of buffer bounds'); if (q.byteLength < G + (Y || 0)) throw new RangeError('"length" is outside of buffer bounds'); var fe; return G === void 0 && Y === void 0 ? fe = new Uint8Array(q) : Y === void 0 ? fe = new Uint8Array(q, G) : fe = new Uint8Array(q, G, Y), fe.__proto__ = h.prototype, fe; } function t(q) { if (h.isBuffer(q)) { var G = i(q.length) | 0, Y = y(G); return Y.length === 0 || q.copy(Y, 0, 0, G), Y; } if (q.length !== void 0) return typeof q.length != "number" || Ce(q.length) ? y(0) : a(q); if (q.type === "Buffer" && Array.isArray(q.data)) return a(q.data); } function i(q) { if (q >= w) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + w.toString(16) + " bytes"); return q | 0; } function n(q) { return +q != q && (q = 0), h.alloc(+q); } h.isBuffer = function(G) { return G != null && G._isBuffer === !0 && G !== h.prototype; }, h.compare = function(G, Y) { if (se(G, Uint8Array) && (G = h.from(G, G.offset, G.byteLength)), se(Y, Uint8Array) && (Y = h.from(Y, Y.offset, Y.byteLength)), !h.isBuffer(G) || !h.isBuffer(Y)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (G === Y) return 0; for (var fe = G.length, we = Y.length, _e = 0, je = Math.min(fe, we); _e < je; ++_e) if (G[_e] !== Y[_e]) { fe = G[_e], we = Y[_e]; break; } return fe < we ? -1 : we < fe ? 1 : 0; }, h.isEncoding = function(G) { switch (String(G).toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "latin1": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return !0; default: return !1; } }, h.concat = function(G, Y) { if (!Array.isArray(G)) throw new TypeError('"list" argument must be an Array of Buffers'); if (G.length === 0) return h.alloc(0); var fe; if (Y === void 0) for (Y = 0, fe = 0; fe < G.length; ++fe) Y += G[fe].length; var we = h.allocUnsafe(Y), _e = 0; for (fe = 0; fe < G.length; ++fe) { var je = G[fe]; if (se(je, Uint8Array) && (je = h.from(je)), !h.isBuffer(je)) throw new TypeError('"list" argument must be an Array of Buffers'); je.copy(we, _e), _e += je.length; } return we; }; function o(q, G) { if (h.isBuffer(q)) return q.length; if (ArrayBuffer.isView(q) || se(q, ArrayBuffer)) return q.byteLength; if (typeof q != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + m(q)); var Y = q.length, fe = arguments.length > 2 && arguments[2] === !0; if (!fe && Y === 0) return 0; for (var we = !1; ; ) switch (G) { case "ascii": case "latin1": case "binary": return Y; case "utf8": case "utf-8": return J(q).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return Y * 2; case "hex": return Y >>> 1; case "base64": return ke(q).length; default: if (we) return fe ? -1 : J(q).length; G = ("" + G).toLowerCase(), we = !0; } } h.byteLength = o; function p(q, G, Y) { var fe = !1; if ((G === void 0 || G < 0) && (G = 0), G > this.length || ((Y === void 0 || Y > this.length) && (Y = this.length), Y <= 0) || (Y >>>= 0, G >>>= 0, Y <= G)) return ""; for (q || (q = "utf8"); ; ) switch (q) { case "hex": return D(this, G, Y); case "utf8": case "utf-8": return A(this, G, Y); case "ascii": return W(this, G, Y); case "latin1": case "binary": return U(this, G, Y); case "base64": return E(this, G, Y); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return B(this, G, Y); default: if (fe) throw new TypeError("Unknown encoding: " + q); q = (q + "").toLowerCase(), fe = !0; } } h.prototype._isBuffer = !0; function O(q, G, Y) { var fe = q[G]; q[G] = q[Y], q[Y] = fe; } h.prototype.swap16 = function() { var G = this.length; if (G % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var Y = 0; Y < G; Y += 2) O(this, Y, Y + 1); return this; }, h.prototype.swap32 = function() { var G = this.length; if (G % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var Y = 0; Y < G; Y += 4) O(this, Y, Y + 3), O(this, Y + 1, Y + 2); return this; }, h.prototype.swap64 = function() { var G = this.length; if (G % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var Y = 0; Y < G; Y += 8) O(this, Y, Y + 7), O(this, Y + 1, Y + 6), O(this, Y + 2, Y + 5), O(this, Y + 3, Y + 4); return this; }, h.prototype.toString = function() { var G = this.length; return G === 0 ? "" : arguments.length === 0 ? A(this, 0, G) : p.apply(this, arguments); }, h.prototype.toLocaleString = h.prototype.toString, h.prototype.equals = function(G) { if (!h.isBuffer(G)) throw new TypeError("Argument must be a Buffer"); return this === G ? !0 : h.compare(this, G) === 0; }, h.prototype.inspect = function() { var G = "", Y = _.INSPECT_MAX_BYTES; return G = this.toString("hex", 0, Y).replace(/(.{2})/g, "$1 ").trim(), this.length > Y && (G += " ... "), ""; }, h.prototype.compare = function(G, Y, fe, we, _e) { if (se(G, Uint8Array) && (G = h.from(G, G.offset, G.byteLength)), !h.isBuffer(G)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + m(G)); if (Y === void 0 && (Y = 0), fe === void 0 && (fe = G ? G.length : 0), we === void 0 && (we = 0), _e === void 0 && (_e = this.length), Y < 0 || fe > G.length || we < 0 || _e > this.length) throw new RangeError("out of range index"); if (we >= _e && Y >= fe) return 0; if (we >= _e) return -1; if (Y >= fe) return 1; if (Y >>>= 0, fe >>>= 0, we >>>= 0, _e >>>= 0, this === G) return 0; for (var je = _e - we, Ye = fe - Y, nt = Math.min(je, Ye), ut = this.slice(we, _e), ot = G.slice(Y, fe), Ue = 0; Ue < nt; ++Ue) if (ut[Ue] !== ot[Ue]) { je = ut[Ue], Ye = ot[Ue]; break; } return je < Ye ? -1 : Ye < je ? 1 : 0; }; function P(q, G, Y, fe, we) { if (q.length === 0) return -1; if (typeof Y == "string" ? (fe = Y, Y = 0) : Y > 2147483647 ? Y = 2147483647 : Y < -2147483648 && (Y = -2147483648), Y = +Y, Ce(Y) && (Y = we ? 0 : q.length - 1), Y < 0 && (Y = q.length + Y), Y >= q.length) { if (we) return -1; Y = q.length - 1; } else if (Y < 0) if (we) Y = 0; else return -1; if (typeof G == "string" && (G = h.from(G, fe)), h.isBuffer(G)) return G.length === 0 ? -1 : F(q, G, Y, fe, we); if (typeof G == "number") return G = G & 255, typeof Uint8Array.prototype.indexOf == "function" ? we ? Uint8Array.prototype.indexOf.call(q, G, Y) : Uint8Array.prototype.lastIndexOf.call(q, G, Y) : F(q, [G], Y, fe, we); throw new TypeError("val must be string, number or Buffer"); } function F(q, G, Y, fe, we) { var _e = 1, je = q.length, Ye = G.length; if (fe !== void 0 && (fe = String(fe).toLowerCase(), fe === "ucs2" || fe === "ucs-2" || fe === "utf16le" || fe === "utf-16le")) { if (q.length < 2 || G.length < 2) return -1; _e = 2, je /= 2, Ye /= 2, Y /= 2; } function nt(Qe, tt) { return _e === 1 ? Qe[tt] : Qe.readUInt16BE(tt * _e); } var ut; if (we) { var ot = -1; for (ut = Y; ut < je; ut++) if (nt(q, ut) === nt(G, ot === -1 ? 0 : ut - ot)) { if (ot === -1 && (ot = ut), ut - ot + 1 === Ye) return ot * _e; } else ot !== -1 && (ut -= ut - ot), ot = -1; } else for (Y + Ye > je && (Y = je - Ye), ut = Y; ut >= 0; ut--) { for (var Ue = !0, Ve = 0; Ve < Ye; Ve++) if (nt(q, ut + Ve) !== nt(G, Ve)) { Ue = !1; break; } if (Ue) return ut; } return -1; } h.prototype.includes = function(G, Y, fe) { return this.indexOf(G, Y, fe) !== -1; }, h.prototype.indexOf = function(G, Y, fe) { return P(this, G, Y, fe, !0); }, h.prototype.lastIndexOf = function(G, Y, fe) { return P(this, G, Y, fe, !1); }; function z(q, G, Y, fe) { Y = Number(Y) || 0; var we = q.length - Y; fe ? (fe = Number(fe), fe > we && (fe = we)) : fe = we; var _e = G.length; fe > _e / 2 && (fe = _e / 2); for (var je = 0; je < fe; ++je) { var Ye = parseInt(G.substr(je * 2, 2), 16); if (Ce(Ye)) return je; q[Y + je] = Ye; } return je; } function N(q, G, Y, fe) { return ne(J(G, q.length - Y), q, Y, fe); } function M(q, G, Y, fe) { return ne(Q(G), q, Y, fe); } function I(q, G, Y, fe) { return M(q, G, Y, fe); } function R(q, G, Y, fe) { return ne(ke(G), q, Y, fe); } function C(q, G, Y, fe) { return ne(he(G, q.length - Y), q, Y, fe); } h.prototype.write = function(G, Y, fe, we) { if (Y === void 0) we = "utf8", fe = this.length, Y = 0; else if (fe === void 0 && typeof Y == "string") we = Y, fe = this.length, Y = 0; else if (isFinite(Y)) Y = Y >>> 0, isFinite(fe) ? (fe = fe >>> 0, we === void 0 && (we = "utf8")) : (we = fe, fe = void 0); else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); var _e = this.length - Y; if ((fe === void 0 || fe > _e) && (fe = _e), G.length > 0 && (fe < 0 || Y < 0) || Y > this.length) throw new RangeError("Attempt to write outside buffer bounds"); we || (we = "utf8"); for (var je = !1; ; ) switch (we) { case "hex": return z(this, G, Y, fe); case "utf8": case "utf-8": return N(this, G, Y, fe); case "ascii": return M(this, G, Y, fe); case "latin1": case "binary": return I(this, G, Y, fe); case "base64": return R(this, G, Y, fe); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return C(this, G, Y, fe); default: if (je) throw new TypeError("Unknown encoding: " + we); we = ("" + we).toLowerCase(), je = !0; } }, h.prototype.toJSON = function() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; }; function E(q, G, Y) { return G === 0 && Y === q.length ? g.fromByteArray(q) : g.fromByteArray(q.slice(G, Y)); } function A(q, G, Y) { Y = Math.min(q.length, Y); for (var fe = [], we = G; we < Y; ) { var _e = q[we], je = null, Ye = _e > 239 ? 4 : _e > 223 ? 3 : _e > 191 ? 2 : 1; if (we + Ye <= Y) { var nt, ut, ot, Ue; switch (Ye) { case 1: _e < 128 && (je = _e); break; case 2: nt = q[we + 1], (nt & 192) === 128 && (Ue = (_e & 31) << 6 | nt & 63, Ue > 127 && (je = Ue)); break; case 3: nt = q[we + 1], ut = q[we + 2], (nt & 192) === 128 && (ut & 192) === 128 && (Ue = (_e & 15) << 12 | (nt & 63) << 6 | ut & 63, Ue > 2047 && (Ue < 55296 || Ue > 57343) && (je = Ue)); break; case 4: nt = q[we + 1], ut = q[we + 2], ot = q[we + 3], (nt & 192) === 128 && (ut & 192) === 128 && (ot & 192) === 128 && (Ue = (_e & 15) << 18 | (nt & 63) << 12 | (ut & 63) << 6 | ot & 63, Ue > 65535 && Ue < 1114112 && (je = Ue)); } } je === null ? (je = 65533, Ye = 1) : je > 65535 && (je -= 65536, fe.push(je >>> 10 & 1023 | 55296), je = 56320 | je & 1023), fe.push(je), we += Ye; } return $(fe); } var L = 4096; function $(q) { var G = q.length; if (G <= L) return String.fromCharCode.apply(String, q); for (var Y = "", fe = 0; fe < G; ) Y += String.fromCharCode.apply(String, q.slice(fe, fe += L)); return Y; } function W(q, G, Y) { var fe = ""; Y = Math.min(q.length, Y); for (var we = G; we < Y; ++we) fe += String.fromCharCode(q[we] & 127); return fe; } function U(q, G, Y) { var fe = ""; Y = Math.min(q.length, Y); for (var we = G; we < Y; ++we) fe += String.fromCharCode(q[we]); return fe; } function D(q, G, Y) { var fe = q.length; (!G || G < 0) && (G = 0), (!Y || Y < 0 || Y > fe) && (Y = fe); for (var we = "", _e = G; _e < Y; ++_e) we += oe(q[_e]); return we; } function B(q, G, Y) { for (var fe = q.slice(G, Y), we = "", _e = 0; _e < fe.length; _e += 2) we += String.fromCharCode(fe[_e] + fe[_e + 1] * 256); return we; } h.prototype.slice = function(G, Y) { var fe = this.length; G = ~~G, Y = Y === void 0 ? fe : ~~Y, G < 0 ? (G += fe, G < 0 && (G = 0)) : G > fe && (G = fe), Y < 0 ? (Y += fe, Y < 0 && (Y = 0)) : Y > fe && (Y = fe), Y < G && (Y = G); var we = this.subarray(G, Y); return we.__proto__ = h.prototype, we; }; function j(q, G, Y) { if (q % 1 !== 0 || q < 0) throw new RangeError("offset is not uint"); if (q + G > Y) throw new RangeError("Trying to access beyond buffer length"); } h.prototype.readUIntLE = function(G, Y, fe) { G = G >>> 0, Y = Y >>> 0, fe || j(G, Y, this.length); for (var we = this[G], _e = 1, je = 0; ++je < Y && (_e *= 256); ) we += this[G + je] * _e; return we; }, h.prototype.readUIntBE = function(G, Y, fe) { G = G >>> 0, Y = Y >>> 0, fe || j(G, Y, this.length); for (var we = this[G + --Y], _e = 1; Y > 0 && (_e *= 256); ) we += this[G + --Y] * _e; return we; }, h.prototype.readUInt8 = function(G, Y) { return G = G >>> 0, Y || j(G, 1, this.length), this[G]; }, h.prototype.readUInt16LE = function(G, Y) { return G = G >>> 0, Y || j(G, 2, this.length), this[G] | this[G + 1] << 8; }, h.prototype.readUInt16BE = function(G, Y) { return G = G >>> 0, Y || j(G, 2, this.length), this[G] << 8 | this[G + 1]; }, h.prototype.readUInt32LE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), (this[G] | this[G + 1] << 8 | this[G + 2] << 16) + this[G + 3] * 16777216; }, h.prototype.readUInt32BE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), this[G] * 16777216 + (this[G + 1] << 16 | this[G + 2] << 8 | this[G + 3]); }, h.prototype.readIntLE = function(G, Y, fe) { G = G >>> 0, Y = Y >>> 0, fe || j(G, Y, this.length); for (var we = this[G], _e = 1, je = 0; ++je < Y && (_e *= 256); ) we += this[G + je] * _e; return _e *= 128, we >= _e && (we -= Math.pow(2, 8 * Y)), we; }, h.prototype.readIntBE = function(G, Y, fe) { G = G >>> 0, Y = Y >>> 0, fe || j(G, Y, this.length); for (var we = Y, _e = 1, je = this[G + --we]; we > 0 && (_e *= 256); ) je += this[G + --we] * _e; return _e *= 128, je >= _e && (je -= Math.pow(2, 8 * Y)), je; }, h.prototype.readInt8 = function(G, Y) { return G = G >>> 0, Y || j(G, 1, this.length), this[G] & 128 ? (255 - this[G] + 1) * -1 : this[G]; }, h.prototype.readInt16LE = function(G, Y) { G = G >>> 0, Y || j(G, 2, this.length); var fe = this[G] | this[G + 1] << 8; return fe & 32768 ? fe | 4294901760 : fe; }, h.prototype.readInt16BE = function(G, Y) { G = G >>> 0, Y || j(G, 2, this.length); var fe = this[G + 1] | this[G] << 8; return fe & 32768 ? fe | 4294901760 : fe; }, h.prototype.readInt32LE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), this[G] | this[G + 1] << 8 | this[G + 2] << 16 | this[G + 3] << 24; }, h.prototype.readInt32BE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), this[G] << 24 | this[G + 1] << 16 | this[G + 2] << 8 | this[G + 3]; }, h.prototype.readFloatLE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), b.read(this, G, !0, 23, 4); }, h.prototype.readFloatBE = function(G, Y) { return G = G >>> 0, Y || j(G, 4, this.length), b.read(this, G, !1, 23, 4); }, h.prototype.readDoubleLE = function(G, Y) { return G = G >>> 0, Y || j(G, 8, this.length), b.read(this, G, !0, 52, 8); }, h.prototype.readDoubleBE = function(G, Y) { return G = G >>> 0, Y || j(G, 8, this.length), b.read(this, G, !1, 52, 8); }; function V(q, G, Y, fe, we, _e) { if (!h.isBuffer(q)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (G > we || G < _e) throw new RangeError('"value" argument is out of bounds'); if (Y + fe > q.length) throw new RangeError("Index out of range"); } h.prototype.writeUIntLE = function(G, Y, fe, we) { if (G = +G, Y = Y >>> 0, fe = fe >>> 0, !we) { var _e = Math.pow(2, 8 * fe) - 1; V(this, G, Y, fe, _e, 0); } var je = 1, Ye = 0; for (this[Y] = G & 255; ++Ye < fe && (je *= 256); ) this[Y + Ye] = G / je & 255; return Y + fe; }, h.prototype.writeUIntBE = function(G, Y, fe, we) { if (G = +G, Y = Y >>> 0, fe = fe >>> 0, !we) { var _e = Math.pow(2, 8 * fe) - 1; V(this, G, Y, fe, _e, 0); } var je = fe - 1, Ye = 1; for (this[Y + je] = G & 255; --je >= 0 && (Ye *= 256); ) this[Y + je] = G / Ye & 255; return Y + fe; }, h.prototype.writeUInt8 = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 1, 255, 0), this[Y] = G & 255, Y + 1; }, h.prototype.writeUInt16LE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 2, 65535, 0), this[Y] = G & 255, this[Y + 1] = G >>> 8, Y + 2; }, h.prototype.writeUInt16BE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 2, 65535, 0), this[Y] = G >>> 8, this[Y + 1] = G & 255, Y + 2; }, h.prototype.writeUInt32LE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 4, 4294967295, 0), this[Y + 3] = G >>> 24, this[Y + 2] = G >>> 16, this[Y + 1] = G >>> 8, this[Y] = G & 255, Y + 4; }, h.prototype.writeUInt32BE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 4, 4294967295, 0), this[Y] = G >>> 24, this[Y + 1] = G >>> 16, this[Y + 2] = G >>> 8, this[Y + 3] = G & 255, Y + 4; }, h.prototype.writeIntLE = function(G, Y, fe, we) { if (G = +G, Y = Y >>> 0, !we) { var _e = Math.pow(2, 8 * fe - 1); V(this, G, Y, fe, _e - 1, -_e); } var je = 0, Ye = 1, nt = 0; for (this[Y] = G & 255; ++je < fe && (Ye *= 256); ) G < 0 && nt === 0 && this[Y + je - 1] !== 0 && (nt = 1), this[Y + je] = (G / Ye >> 0) - nt & 255; return Y + fe; }, h.prototype.writeIntBE = function(G, Y, fe, we) { if (G = +G, Y = Y >>> 0, !we) { var _e = Math.pow(2, 8 * fe - 1); V(this, G, Y, fe, _e - 1, -_e); } var je = fe - 1, Ye = 1, nt = 0; for (this[Y + je] = G & 255; --je >= 0 && (Ye *= 256); ) G < 0 && nt === 0 && this[Y + je + 1] !== 0 && (nt = 1), this[Y + je] = (G / Ye >> 0) - nt & 255; return Y + fe; }, h.prototype.writeInt8 = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 1, 127, -128), G < 0 && (G = 255 + G + 1), this[Y] = G & 255, Y + 1; }, h.prototype.writeInt16LE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 2, 32767, -32768), this[Y] = G & 255, this[Y + 1] = G >>> 8, Y + 2; }, h.prototype.writeInt16BE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 2, 32767, -32768), this[Y] = G >>> 8, this[Y + 1] = G & 255, Y + 2; }, h.prototype.writeInt32LE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 4, 2147483647, -2147483648), this[Y] = G & 255, this[Y + 1] = G >>> 8, this[Y + 2] = G >>> 16, this[Y + 3] = G >>> 24, Y + 4; }, h.prototype.writeInt32BE = function(G, Y, fe) { return G = +G, Y = Y >>> 0, fe || V(this, G, Y, 4, 2147483647, -2147483648), G < 0 && (G = 4294967295 + G + 1), this[Y] = G >>> 24, this[Y + 1] = G >>> 16, this[Y + 2] = G >>> 8, this[Y + 3] = G & 255, Y + 4; }; function re(q, G, Y, fe, we, _e) { if (Y + fe > q.length) throw new RangeError("Index out of range"); if (Y < 0) throw new RangeError("Index out of range"); } function ee(q, G, Y, fe, we) { return G = +G, Y = Y >>> 0, we || re(q, G, Y, 4), b.write(q, G, Y, fe, 23, 4), Y + 4; } h.prototype.writeFloatLE = function(G, Y, fe) { return ee(this, G, Y, !0, fe); }, h.prototype.writeFloatBE = function(G, Y, fe) { return ee(this, G, Y, !1, fe); }; function ce(q, G, Y, fe, we) { return G = +G, Y = Y >>> 0, we || re(q, G, Y, 8), b.write(q, G, Y, fe, 52, 8), Y + 8; } h.prototype.writeDoubleLE = function(G, Y, fe) { return ce(this, G, Y, !0, fe); }, h.prototype.writeDoubleBE = function(G, Y, fe) { return ce(this, G, Y, !1, fe); }, h.prototype.copy = function(G, Y, fe, we) { if (!h.isBuffer(G)) throw new TypeError("argument should be a Buffer"); if (fe || (fe = 0), !we && we !== 0 && (we = this.length), Y >= G.length && (Y = G.length), Y || (Y = 0), we > 0 && we < fe && (we = fe), we === fe || G.length === 0 || this.length === 0) return 0; if (Y < 0) throw new RangeError("targetStart out of bounds"); if (fe < 0 || fe >= this.length) throw new RangeError("Index out of range"); if (we < 0) throw new RangeError("sourceEnd out of bounds"); we > this.length && (we = this.length), G.length - Y < we - fe && (we = G.length - Y + fe); var _e = we - fe; if (this === G && typeof Uint8Array.prototype.copyWithin == "function") this.copyWithin(Y, fe, we); else if (this === G && fe < Y && Y < we) for (var je = _e - 1; je >= 0; --je) G[je + Y] = this[je + fe]; else Uint8Array.prototype.set.call(G, this.subarray(fe, we), Y); return _e; }, h.prototype.fill = function(G, Y, fe, we) { if (typeof G == "string") { if (typeof Y == "string" ? (we = Y, Y = 0, fe = this.length) : typeof fe == "string" && (we = fe, fe = this.length), we !== void 0 && typeof we != "string") throw new TypeError("encoding must be a string"); if (typeof we == "string" && !h.isEncoding(we)) throw new TypeError("Unknown encoding: " + we); if (G.length === 1) { var _e = G.charCodeAt(0); (we === "utf8" && _e < 128 || we === "latin1") && (G = _e); } } else typeof G == "number" && (G = G & 255); if (Y < 0 || this.length < Y || this.length < fe) throw new RangeError("Out of range index"); if (fe <= Y) return this; Y = Y >>> 0, fe = fe === void 0 ? this.length : fe >>> 0, G || (G = 0); var je; if (typeof G == "number") for (je = Y; je < fe; ++je) this[je] = G; else { var Ye = h.isBuffer(G) ? G : h.from(G, we), nt = Ye.length; if (nt === 0) throw new TypeError('The value "' + G + '" is invalid for argument "value"'); for (je = 0; je < fe - Y; ++je) this[je + Y] = Ye[je % nt]; } return this; }; var ve = /[^+/0-9A-Za-z-_]/g; function ge(q) { if (q = q.split("=")[0], q = q.trim().replace(ve, ""), q.length < 2) return ""; for (; q.length % 4 !== 0; ) q = q + "="; return q; } function oe(q) { return q < 16 ? "0" + q.toString(16) : q.toString(16); } function J(q, G) { G = G || 1 / 0; for (var Y, fe = q.length, we = null, _e = [], je = 0; je < fe; ++je) { if (Y = q.charCodeAt(je), Y > 55295 && Y < 57344) { if (!we) { if (Y > 56319) { (G -= 3) > -1 && _e.push(239, 191, 189); continue; } else if (je + 1 === fe) { (G -= 3) > -1 && _e.push(239, 191, 189); continue; } we = Y; continue; } if (Y < 56320) { (G -= 3) > -1 && _e.push(239, 191, 189), we = Y; continue; } Y = (we - 55296 << 10 | Y - 56320) + 65536; } else we && (G -= 3) > -1 && _e.push(239, 191, 189); if (we = null, Y < 128) { if ((G -= 1) < 0) break; _e.push(Y); } else if (Y < 2048) { if ((G -= 2) < 0) break; _e.push(Y >> 6 | 192, Y & 63 | 128); } else if (Y < 65536) { if ((G -= 3) < 0) break; _e.push(Y >> 12 | 224, Y >> 6 & 63 | 128, Y & 63 | 128); } else if (Y < 1114112) { if ((G -= 4) < 0) break; _e.push(Y >> 18 | 240, Y >> 12 & 63 | 128, Y >> 6 & 63 | 128, Y & 63 | 128); } else throw new Error("Invalid code point"); } return _e; } function Q(q) { for (var G = [], Y = 0; Y < q.length; ++Y) G.push(q.charCodeAt(Y) & 255); return G; } function he(q, G) { for (var Y, fe, we, _e = [], je = 0; je < q.length && !((G -= 2) < 0); ++je) Y = q.charCodeAt(je), fe = Y >> 8, we = Y % 256, _e.push(we), _e.push(fe); return _e; } function ke(q) { return g.toByteArray(ge(q)); } function ne(q, G, Y, fe) { for (var we = 0; we < fe && !(we + Y >= G.length || we >= q.length); ++we) G[we + Y] = q[we]; return we; } function se(q, G) { return q instanceof G || q != null && q.constructor != null && q.constructor.name != null && q.constructor.name === G.name; } function Ce(q) { return q !== q; } }).call(this, e("buffer").Buffer); }, { "base64-js": 182, buffer: 216, ieee754: 385 }], 217: [function(e, x, _) { (function(u) { x.exports = function(g, b) { for (var w = Math.min(g.length, b.length), f = new u(w), y = 0; y < w; ++y) f[y] = g[y] ^ b[y]; return f; }; }).call(this, e("buffer").Buffer); }, { buffer: 216 }], 218: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("stream").Transform, g = e("string_decoder").StringDecoder, b = e("inherits"); function w(f) { m.call(this), this.hashMode = typeof f == "string", this.hashMode ? this[f] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null; } b(w, m), w.prototype.update = function(f, y, h) { typeof f == "string" && (f = u.from(f, y)); var l = this._update(f); return this.hashMode ? this : (h && (l = this._toString(l, h)), l); }, w.prototype.setAutoPadding = function() { }, w.prototype.getAuthTag = function() { throw new Error("trying to get auth tag in unsupported state"); }, w.prototype.setAuthTag = function() { throw new Error("trying to set auth tag in unsupported state"); }, w.prototype.setAAD = function() { throw new Error("trying to set aad in unsupported state"); }, w.prototype._transform = function(f, y, h) { var l; try { this.hashMode ? this._update(f) : this.push(this._update(f)); } catch (d) { l = d; } finally { h(l); } }, w.prototype._flush = function(f) { var y; try { this.push(this.__final()); } catch (h) { y = h; } f(y); }, w.prototype._finalOrDigest = function(f) { var y = this.__final() || u.alloc(0); return f && (y = this._toString(y, f, !0)), y; }, w.prototype._toString = function(f, y, h) { if (this._decoder || (this._decoder = new g(y), this._encoding = y), this._encoding !== y) throw new Error("can't switch encodings"); var l = this._decoder.write(f); return h && (l += this._decoder.end()), l; }, x.exports = w; }, { inherits: 387, "safe-buffer": 494, stream: 506, string_decoder: 520 }], 219: [function(e, x, _) { x.exports = function(u) { if (typeof u != "function") throw TypeError(String(u) + " is not a function"); return u; }; }, {}], 220: [function(e, x, _) { var u = e("../internals/is-object"); x.exports = function(m) { if (!u(m) && m !== null) throw TypeError("Can't set " + String(m) + " as a prototype"); return m; }; }, { "../internals/is-object": 263 }], 221: [function(e, x, _) { var u = e("../internals/well-known-symbol"), m = e("../internals/object-create"), g = e("../internals/object-define-property"), b = u("unscopables"), w = Array.prototype; w[b] == null && g.f(w, b, { configurable: !0, value: m(null) }), x.exports = function(f) { w[b][f] = !0; }; }, { "../internals/object-create": 276, "../internals/object-define-property": 278, "../internals/well-known-symbol": 314 }], 222: [function(e, x, _) { x.exports = function(u, m, g) { if (!(u instanceof m)) throw TypeError("Incorrect " + (g ? g + " " : "") + "invocation"); return u; }; }, {}], 223: [function(e, x, _) { var u = e("../internals/is-object"); x.exports = function(m) { if (!u(m)) throw TypeError(String(m) + " is not an object"); return m; }; }, { "../internals/is-object": 263 }], 224: [function(e, x, _) { var u = e("../internals/to-indexed-object"), m = e("../internals/to-length"), g = e("../internals/to-absolute-index"), b = function(w) { return function(f, y, h) { var l = u(f), d = m(l.length), s = g(h, d), v; if (w && y != y) { for (; d > s; ) if (v = l[s++], v != v) return !0; } else for (; d > s; s++) if ((w || s in l) && l[s] === y) return w || s || 0; return !w && -1; }; }; x.exports = { // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes includes: b(!0), // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof indexOf: b(!1) }; }, { "../internals/to-absolute-index": 304, "../internals/to-indexed-object": 305, "../internals/to-length": 307 }], 225: [function(e, x, _) { var u = e("../internals/function-bind-context"), m = e("../internals/indexed-object"), g = e("../internals/to-object"), b = e("../internals/to-length"), w = e("../internals/array-species-create"), f = [].push, y = function(h) { var l = h == 1, d = h == 2, s = h == 3, v = h == 4, c = h == 6, a = h == 5 || c; return function(r, t, i, n) { for (var o = g(r), p = m(o), O = u(t, i, 3), P = b(p.length), F = 0, z = n || w, N = l ? z(r, P) : d ? z(r, 0) : void 0, M, I; P > F; F++) if ((a || F in p) && (M = p[F], I = O(M, F, o), h)) { if (l) N[F] = I; else if (I) switch (h) { case 3: return !0; case 5: return M; case 6: return F; case 2: f.call(N, M); } else if (v) return !1; } return c ? -1 : s || v ? v : N; }; }; x.exports = { // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach forEach: y(0), // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map map: y(1), // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter filter: y(2), // `Array.prototype.some` method // https://tc39.github.io/ecma262/#sec-array.prototype.some some: y(3), // `Array.prototype.every` method // https://tc39.github.io/ecma262/#sec-array.prototype.every every: y(4), // `Array.prototype.find` method // https://tc39.github.io/ecma262/#sec-array.prototype.find find: y(5), // `Array.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex findIndex: y(6) }; }, { "../internals/array-species-create": 227, "../internals/function-bind-context": 248, "../internals/indexed-object": 257, "../internals/to-length": 307, "../internals/to-object": 308 }], 226: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/fails"), g = e("../internals/has"), b = Object.defineProperty, w = {}, f = function(y) { throw y; }; x.exports = function(y, h) { if (g(w, y)) return w[y]; h || (h = {}); var l = [][y], d = g(h, "ACCESSORS") ? h.ACCESSORS : !1, s = g(h, 0) ? h[0] : f, v = g(h, 1) ? h[1] : void 0; return w[y] = !!l && !m(function() { if (d && !u) return !0; var c = { length: -1 }; d ? b(c, 1, { enumerable: !0, get: f }) : c[1] = 1, l.call(c, s, v); }); }; }, { "../internals/descriptors": 240, "../internals/fails": 247, "../internals/has": 252 }], 227: [function(e, x, _) { var u = e("../internals/is-object"), m = e("../internals/is-array"), g = e("../internals/well-known-symbol"), b = g("species"); x.exports = function(w, f) { var y; return m(w) && (y = w.constructor, typeof y == "function" && (y === Array || m(y.prototype)) ? y = void 0 : u(y) && (y = y[b], y === null && (y = void 0))), new (y === void 0 ? Array : y)(f === 0 ? 0 : f); }; }, { "../internals/is-array": 261, "../internals/is-object": 263, "../internals/well-known-symbol": 314 }], 228: [function(e, x, _) { var u = e("../internals/an-object"); x.exports = function(m, g, b, w) { try { return w ? g(u(b)[0], b[1]) : g(b); } catch (y) { var f = m.return; throw f !== void 0 && u(f.call(m)), y; } }; }, { "../internals/an-object": 223 }], 229: [function(e, x, _) { var u = e("../internals/well-known-symbol"), m = u("iterator"), g = !1; try { var b = 0, w = { next: function() { return { done: !!b++ }; }, return: function() { g = !0; } }; w[m] = function() { return this; }, Array.from(w, function() { throw 2; }); } catch (f) { } x.exports = function(f, y) { if (!y && !g) return !1; var h = !1; try { var l = {}; l[m] = function() { return { next: function() { return { done: h = !0 }; } }; }, f(l); } catch (d) { } return h; }; }, { "../internals/well-known-symbol": 314 }], 230: [function(e, x, _) { var u = {}.toString; x.exports = function(m) { return u.call(m).slice(8, -1); }; }, {}], 231: [function(e, x, _) { var u = e("../internals/to-string-tag-support"), m = e("../internals/classof-raw"), g = e("../internals/well-known-symbol"), b = g("toStringTag"), w = m(function() { return arguments; }()) == "Arguments", f = function(y, h) { try { return y[h]; } catch (l) { } }; x.exports = u ? m : function(y) { var h, l, d; return y === void 0 ? "Undefined" : y === null ? "Null" : typeof (l = f(h = Object(y), b)) == "string" ? l : w ? m(h) : (d = m(h)) == "Object" && typeof h.callee == "function" ? "Arguments" : d; }; }, { "../internals/classof-raw": 230, "../internals/to-string-tag-support": 310, "../internals/well-known-symbol": 314 }], 232: [function(e, x, _) { var u = e("../internals/has"), m = e("../internals/own-keys"), g = e("../internals/object-get-own-property-descriptor"), b = e("../internals/object-define-property"); x.exports = function(w, f) { for (var y = m(f), h = b.f, l = g.f, d = 0; d < y.length; d++) { var s = y[d]; u(w, s) || h(w, s, l(f, s)); } }; }, { "../internals/has": 252, "../internals/object-define-property": 278, "../internals/object-get-own-property-descriptor": 279, "../internals/own-keys": 289 }], 233: [function(e, x, _) { var u = e("../internals/well-known-symbol"), m = u("match"); x.exports = function(g) { var b = /./; try { "/./"[g](b); } catch (w) { try { return b[m] = !1, "/./"[g](b); } catch (f) { } } return !1; }; }, { "../internals/well-known-symbol": 314 }], 234: [function(e, x, _) { var u = e("../internals/fails"); x.exports = !u(function() { function m() { } return m.prototype.constructor = null, Object.getPrototypeOf(new m()) !== m.prototype; }); }, { "../internals/fails": 247 }], 235: [function(e, x, _) { var u = e("../internals/iterators-core").IteratorPrototype, m = e("../internals/object-create"), g = e("../internals/create-property-descriptor"), b = e("../internals/set-to-string-tag"), w = e("../internals/iterators"), f = function() { return this; }; x.exports = function(y, h, l) { var d = h + " Iterator"; return y.prototype = m(u, { next: g(1, l) }), b(y, d, !1, !0), w[d] = f, y; }; }, { "../internals/create-property-descriptor": 237, "../internals/iterators": 268, "../internals/iterators-core": 267, "../internals/object-create": 276, "../internals/set-to-string-tag": 298 }], 236: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/object-define-property"), g = e("../internals/create-property-descriptor"); x.exports = u ? function(b, w, f) { return m.f(b, w, g(1, f)); } : function(b, w, f) { return b[w] = f, b; }; }, { "../internals/create-property-descriptor": 237, "../internals/descriptors": 240, "../internals/object-define-property": 278 }], 237: [function(e, x, _) { x.exports = function(u, m) { return { enumerable: !(u & 1), configurable: !(u & 2), writable: !(u & 4), value: m }; }; }, {}], 238: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/create-iterator-constructor"), g = e("../internals/object-get-prototype-of"), b = e("../internals/object-set-prototype-of"), w = e("../internals/set-to-string-tag"), f = e("../internals/create-non-enumerable-property"), y = e("../internals/redefine"), h = e("../internals/well-known-symbol"), l = e("../internals/is-pure"), d = e("../internals/iterators"), s = e("../internals/iterators-core"), v = s.IteratorPrototype, c = s.BUGGY_SAFARI_ITERATORS, a = h("iterator"), r = "keys", t = "values", i = "entries", n = function() { return this; }; x.exports = function(o, p, O, P, F, z, N) { m(O, p, P); var M = function(D) { if (D === F && A) return A; if (!c && D in C) return C[D]; switch (D) { case r: return function() { return new O(this, D); }; case t: return function() { return new O(this, D); }; case i: return function() { return new O(this, D); }; } return function() { return new O(this); }; }, I = p + " Iterator", R = !1, C = o.prototype, E = C[a] || C["@@iterator"] || F && C[F], A = !c && E || M(F), L = p == "Array" && C.entries || E, $, W, U; if (L && ($ = g(L.call(new o())), v !== Object.prototype && $.next && (!l && g($) !== v && (b ? b($, v) : typeof $[a] != "function" && f($, a, n)), w($, I, !0, !0), l && (d[I] = n))), F == t && E && E.name !== t && (R = !0, A = function() { return E.call(this); }), (!l || N) && C[a] !== A && f(C, a, A), d[p] = A, F) if (W = { values: M(t), keys: z ? A : M(r), entries: M(i) }, N) for (U in W) (c || R || !(U in C)) && y(C, U, W[U]); else u({ target: p, proto: !0, forced: c || R }, W); return W; }; }, { "../internals/create-iterator-constructor": 235, "../internals/create-non-enumerable-property": 236, "../internals/export": 246, "../internals/is-pure": 264, "../internals/iterators": 268, "../internals/iterators-core": 267, "../internals/object-get-prototype-of": 283, "../internals/object-set-prototype-of": 287, "../internals/redefine": 294, "../internals/set-to-string-tag": 298, "../internals/well-known-symbol": 314 }], 239: [function(e, x, _) { var u = e("../internals/path"), m = e("../internals/has"), g = e("../internals/well-known-symbol-wrapped"), b = e("../internals/object-define-property").f; x.exports = function(w) { var f = u.Symbol || (u.Symbol = {}); m(f, w) || b(f, w, { value: g.f(w) }); }; }, { "../internals/has": 252, "../internals/object-define-property": 278, "../internals/path": 290, "../internals/well-known-symbol-wrapped": 313 }], 240: [function(e, x, _) { var u = e("../internals/fails"); x.exports = !u(function() { return Object.defineProperty({}, 1, { get: function() { return 7; } })[1] != 7; }); }, { "../internals/fails": 247 }], 241: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/is-object"), g = u.document, b = m(g) && m(g.createElement); x.exports = function(w) { return b ? g.createElement(w) : {}; }; }, { "../internals/global": 251, "../internals/is-object": 263 }], 242: [function(e, x, _) { var u = e("../internals/engine-user-agent"); x.exports = /(iphone|ipod|ipad).*applewebkit/i.test(u); }, { "../internals/engine-user-agent": 243 }], 243: [function(e, x, _) { var u = e("../internals/get-built-in"); x.exports = u("navigator", "userAgent") || ""; }, { "../internals/get-built-in": 249 }], 244: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/engine-user-agent"), g = u.process, b = g && g.versions, w = b && b.v8, f, y; w ? (f = w.split("."), y = f[0] + f[1]) : m && (f = m.match(/Edge\/(\d+)/), (!f || f[1] >= 74) && (f = m.match(/Chrome\/(\d+)/), f && (y = f[1]))), x.exports = y && +y; }, { "../internals/engine-user-agent": 243, "../internals/global": 251 }], 245: [function(e, x, _) { x.exports = [ "constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf" ]; }, {}], 246: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/object-get-own-property-descriptor").f, g = e("../internals/create-non-enumerable-property"), b = e("../internals/redefine"), w = e("../internals/set-global"), f = e("../internals/copy-constructor-properties"), y = e("../internals/is-forced"); x.exports = function(h, l) { var d = h.target, s = h.global, v = h.stat, c, a, r, t, i, n; if (s ? a = u : v ? a = u[d] || w(d, {}) : a = (u[d] || {}).prototype, a) for (r in l) { if (i = l[r], h.noTargetGet ? (n = m(a, r), t = n && n.value) : t = a[r], c = y(s ? r : d + (v ? "." : "#") + r, h.forced), !c && t !== void 0) { if (typeof i == typeof t) continue; f(i, t); } (h.sham || t && t.sham) && g(i, "sham", !0), b(a, r, i, h); } }; }, { "../internals/copy-constructor-properties": 232, "../internals/create-non-enumerable-property": 236, "../internals/global": 251, "../internals/is-forced": 262, "../internals/object-get-own-property-descriptor": 279, "../internals/redefine": 294, "../internals/set-global": 296 }], 247: [function(e, x, _) { x.exports = function(u) { try { return !!u(); } catch (m) { return !0; } }; }, {}], 248: [function(e, x, _) { var u = e("../internals/a-function"); x.exports = function(m, g, b) { if (u(m), g === void 0) return m; switch (b) { case 0: return function() { return m.call(g); }; case 1: return function(w) { return m.call(g, w); }; case 2: return function(w, f) { return m.call(g, w, f); }; case 3: return function(w, f, y) { return m.call(g, w, f, y); }; } return function() { return m.apply(g, arguments); }; }; }, { "../internals/a-function": 219 }], 249: [function(e, x, _) { var u = e("../internals/path"), m = e("../internals/global"), g = function(b) { return typeof b == "function" ? b : void 0; }; x.exports = function(b, w) { return arguments.length < 2 ? g(u[b]) || g(m[b]) : u[b] && u[b][w] || m[b] && m[b][w]; }; }, { "../internals/global": 251, "../internals/path": 290 }], 250: [function(e, x, _) { var u = e("../internals/classof"), m = e("../internals/iterators"), g = e("../internals/well-known-symbol"), b = g("iterator"); x.exports = function(w) { if (w != null) return w[b] || w["@@iterator"] || m[u(w)]; }; }, { "../internals/classof": 231, "../internals/iterators": 268, "../internals/well-known-symbol": 314 }], 251: [function(e, x, _) { (function(u) { var m = function(g) { return g && g.Math == Math && g; }; x.exports = // eslint-disable-next-line no-undef m(typeof globalThis == "object" && globalThis) || m(typeof window == "object" && window) || m(typeof self == "object" && self) || m(typeof u == "object" && u) || // eslint-disable-next-line no-new-func Function("return this")(); }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 252: [function(e, x, _) { var u = {}.hasOwnProperty; x.exports = function(m, g) { return u.call(m, g); }; }, {}], 253: [function(e, x, _) { x.exports = {}; }, {}], 254: [function(e, x, _) { var u = e("../internals/global"); x.exports = function(m, g) { var b = u.console; b && b.error && (arguments.length === 1 ? b.error(m) : b.error(m, g)); }; }, { "../internals/global": 251 }], 255: [function(e, x, _) { var u = e("../internals/get-built-in"); x.exports = u("document", "documentElement"); }, { "../internals/get-built-in": 249 }], 256: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/fails"), g = e("../internals/document-create-element"); x.exports = !u && !m(function() { return Object.defineProperty(g("div"), "a", { get: function() { return 7; } }).a != 7; }); }, { "../internals/descriptors": 240, "../internals/document-create-element": 241, "../internals/fails": 247 }], 257: [function(e, x, _) { var u = e("../internals/fails"), m = e("../internals/classof-raw"), g = "".split; x.exports = u(function() { return !Object("z").propertyIsEnumerable(0); }) ? function(b) { return m(b) == "String" ? g.call(b, "") : Object(b); } : Object; }, { "../internals/classof-raw": 230, "../internals/fails": 247 }], 258: [function(e, x, _) { var u = e("../internals/shared-store"), m = Function.toString; typeof u.inspectSource != "function" && (u.inspectSource = function(g) { return m.call(g); }), x.exports = u.inspectSource; }, { "../internals/shared-store": 300 }], 259: [function(e, x, _) { var u = e("../internals/native-weak-map"), m = e("../internals/global"), g = e("../internals/is-object"), b = e("../internals/create-non-enumerable-property"), w = e("../internals/has"), f = e("../internals/shared-key"), y = e("../internals/hidden-keys"), h = m.WeakMap, l, d, s, v = function(o) { return s(o) ? d(o) : l(o, {}); }, c = function(o) { return function(p) { var O; if (!g(p) || (O = d(p)).type !== o) throw TypeError("Incompatible receiver, " + o + " required"); return O; }; }; if (u) { var a = new h(), r = a.get, t = a.has, i = a.set; l = function(o, p) { return i.call(a, o, p), p; }, d = function(o) { return r.call(a, o) || {}; }, s = function(o) { return t.call(a, o); }; } else { var n = f("state"); y[n] = !0, l = function(o, p) { return b(o, n, p), p; }, d = function(o) { return w(o, n) ? o[n] : {}; }, s = function(o) { return w(o, n); }; } x.exports = { set: l, get: d, has: s, enforce: v, getterFor: c }; }, { "../internals/create-non-enumerable-property": 236, "../internals/global": 251, "../internals/has": 252, "../internals/hidden-keys": 253, "../internals/is-object": 263, "../internals/native-weak-map": 272, "../internals/shared-key": 299 }], 260: [function(e, x, _) { var u = e("../internals/well-known-symbol"), m = e("../internals/iterators"), g = u("iterator"), b = Array.prototype; x.exports = function(w) { return w !== void 0 && (m.Array === w || b[g] === w); }; }, { "../internals/iterators": 268, "../internals/well-known-symbol": 314 }], 261: [function(e, x, _) { var u = e("../internals/classof-raw"); x.exports = Array.isArray || function(g) { return u(g) == "Array"; }; }, { "../internals/classof-raw": 230 }], 262: [function(e, x, _) { var u = e("../internals/fails"), m = /#|\.prototype\./, g = function(h, l) { var d = w[b(h)]; return d == y ? !0 : d == f ? !1 : typeof l == "function" ? u(l) : !!l; }, b = g.normalize = function(h) { return String(h).replace(m, ".").toLowerCase(); }, w = g.data = {}, f = g.NATIVE = "N", y = g.POLYFILL = "P"; x.exports = g; }, { "../internals/fails": 247 }], 263: [function(e, x, _) { x.exports = function(u) { return typeof u == "object" ? u !== null : typeof u == "function"; }; }, {}], 264: [function(e, x, _) { x.exports = !1; }, {}], 265: [function(e, x, _) { var u = e("../internals/is-object"), m = e("../internals/classof-raw"), g = e("../internals/well-known-symbol"), b = g("match"); x.exports = function(w) { var f; return u(w) && ((f = w[b]) !== void 0 ? !!f : m(w) == "RegExp"); }; }, { "../internals/classof-raw": 230, "../internals/is-object": 263, "../internals/well-known-symbol": 314 }], 266: [function(e, x, _) { var u = e("../internals/an-object"), m = e("../internals/is-array-iterator-method"), g = e("../internals/to-length"), b = e("../internals/function-bind-context"), w = e("../internals/get-iterator-method"), f = e("../internals/call-with-safe-iteration-closing"), y = function(l, d) { this.stopped = l, this.result = d; }, h = x.exports = function(l, d, s, v, c) { var a = b(d, s, v ? 2 : 1), r, t, i, n, o, p, O; if (c) r = l; else { if (t = w(l), typeof t != "function") throw TypeError("Target is not iterable"); if (m(t)) { for (i = 0, n = g(l.length); n > i; i++) if (o = v ? a(u(O = l[i])[0], O[1]) : a(l[i]), o && o instanceof y) return o; return new y(!1); } r = t.call(l); } for (p = r.next; !(O = p.call(r)).done; ) if (o = f(r, a, O.value, v), typeof o == "object" && o && o instanceof y) return o; return new y(!1); }; h.stop = function(l) { return new y(!0, l); }; }, { "../internals/an-object": 223, "../internals/call-with-safe-iteration-closing": 228, "../internals/function-bind-context": 248, "../internals/get-iterator-method": 250, "../internals/is-array-iterator-method": 260, "../internals/to-length": 307 }], 267: [function(e, x, _) { var u = e("../internals/object-get-prototype-of"), m = e("../internals/create-non-enumerable-property"), g = e("../internals/has"), b = e("../internals/well-known-symbol"), w = e("../internals/is-pure"), f = b("iterator"), y = !1, h = function() { return this; }, l, d, s; [].keys && (s = [].keys(), "next" in s ? (d = u(u(s)), d !== Object.prototype && (l = d)) : y = !0), l == null && (l = {}), !w && !g(l, f) && m(l, f, h), x.exports = { IteratorPrototype: l, BUGGY_SAFARI_ITERATORS: y }; }, { "../internals/create-non-enumerable-property": 236, "../internals/has": 252, "../internals/is-pure": 264, "../internals/object-get-prototype-of": 283, "../internals/well-known-symbol": 314 }], 268: [function(e, x, _) { arguments[4][253][0].apply(_, arguments); }, { dup: 253 }], 269: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/object-get-own-property-descriptor").f, g = e("../internals/classof-raw"), b = e("../internals/task").set, w = e("../internals/engine-is-ios"), f = u.MutationObserver || u.WebKitMutationObserver, y = u.process, h = u.Promise, l = g(y) == "process", d = m(u, "queueMicrotask"), s = d && d.value, v, c, a, r, t, i, n, o; s || (v = function() { var p, O; for (l && (p = y.domain) && p.exit(); c; ) { O = c.fn, c = c.next; try { O(); } catch (P) { throw c ? r() : a = void 0, P; } } a = void 0, p && p.enter(); }, l ? r = function() { y.nextTick(v); } : f && !w ? (t = !0, i = document.createTextNode(""), new f(v).observe(i, { characterData: !0 }), r = function() { i.data = t = !t; }) : h && h.resolve ? (n = h.resolve(void 0), o = n.then, r = function() { o.call(n, v); }) : r = function() { b.call(u, v); }), x.exports = s || function(p) { var O = { fn: p, next: void 0 }; a && (a.next = O), c || (c = O, r()), a = O; }; }, { "../internals/classof-raw": 230, "../internals/engine-is-ios": 242, "../internals/global": 251, "../internals/object-get-own-property-descriptor": 279, "../internals/task": 303 }], 270: [function(e, x, _) { var u = e("../internals/global"); x.exports = u.Promise; }, { "../internals/global": 251 }], 271: [function(e, x, _) { var u = e("../internals/fails"); x.exports = !!Object.getOwnPropertySymbols && !u(function() { return !String(Symbol()); }); }, { "../internals/fails": 247 }], 272: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/inspect-source"), g = u.WeakMap; x.exports = typeof g == "function" && /native code/.test(m(g)); }, { "../internals/global": 251, "../internals/inspect-source": 258 }], 273: [function(e, x, _) { var u = e("../internals/a-function"), m = function(g) { var b, w; this.promise = new g(function(f, y) { if (b !== void 0 || w !== void 0) throw TypeError("Bad Promise constructor"); b = f, w = y; }), this.resolve = u(b), this.reject = u(w); }; x.exports.f = function(g) { return new m(g); }; }, { "../internals/a-function": 219 }], 274: [function(e, x, _) { var u = e("../internals/is-regexp"); x.exports = function(m) { if (u(m)) throw TypeError("The method doesn't accept regular expressions"); return m; }; }, { "../internals/is-regexp": 265 }], 275: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/fails"), g = e("../internals/object-keys"), b = e("../internals/object-get-own-property-symbols"), w = e("../internals/object-property-is-enumerable"), f = e("../internals/to-object"), y = e("../internals/indexed-object"), h = Object.assign, l = Object.defineProperty; x.exports = !h || m(function() { if (u && h({ b: 1 }, h(l({}, "a", { enumerable: !0, get: function() { l(this, "b", { value: 3, enumerable: !1 }); } }), { b: 2 })).b !== 1) return !0; var d = {}, s = {}, v = Symbol(), c = "abcdefghijklmnopqrst"; return d[v] = 7, c.split("").forEach(function(a) { s[a] = a; }), h({}, d)[v] != 7 || g(h({}, s)).join("") != c; }) ? function(s, v) { for (var c = f(s), a = arguments.length, r = 1, t = b.f, i = w.f; a > r; ) for (var n = y(arguments[r++]), o = t ? g(n).concat(t(n)) : g(n), p = o.length, O = 0, P; p > O; ) P = o[O++], (!u || i.call(n, P)) && (c[P] = n[P]); return c; } : h; }, { "../internals/descriptors": 240, "../internals/fails": 247, "../internals/indexed-object": 257, "../internals/object-get-own-property-symbols": 282, "../internals/object-keys": 285, "../internals/object-property-is-enumerable": 286, "../internals/to-object": 308 }], 276: [function(e, x, _) { var u = e("../internals/an-object"), m = e("../internals/object-define-properties"), g = e("../internals/enum-bug-keys"), b = e("../internals/hidden-keys"), w = e("../internals/html"), f = e("../internals/document-create-element"), y = e("../internals/shared-key"), h = ">", l = "<", d = "prototype", s = "script", v = y("IE_PROTO"), c = function() { }, a = function(o) { return l + s + h + o + l + "/" + s + h; }, r = function(o) { o.write(a("")), o.close(); var p = o.parentWindow.Object; return o = null, p; }, t = function() { var o = f("iframe"), p = "java" + s + ":", O; return o.style.display = "none", w.appendChild(o), o.src = String(p), O = o.contentWindow.document, O.open(), O.write(a("document.F=Object")), O.close(), O.F; }, i, n = function() { try { i = document.domain && new ActiveXObject("htmlfile"); } catch (p) { } n = i ? r(i) : t(); for (var o = g.length; o--; ) delete n[d][g[o]]; return n(); }; b[v] = !0, x.exports = Object.create || function(p, O) { var P; return p !== null ? (c[d] = u(p), P = new c(), c[d] = null, P[v] = p) : P = n(), O === void 0 ? P : m(P, O); }; }, { "../internals/an-object": 223, "../internals/document-create-element": 241, "../internals/enum-bug-keys": 245, "../internals/hidden-keys": 253, "../internals/html": 255, "../internals/object-define-properties": 277, "../internals/shared-key": 299 }], 277: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/object-define-property"), g = e("../internals/an-object"), b = e("../internals/object-keys"); x.exports = u ? Object.defineProperties : function(f, y) { g(f); for (var h = b(y), l = h.length, d = 0, s; l > d; ) m.f(f, s = h[d++], y[s]); return f; }; }, { "../internals/an-object": 223, "../internals/descriptors": 240, "../internals/object-define-property": 278, "../internals/object-keys": 285 }], 278: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/ie8-dom-define"), g = e("../internals/an-object"), b = e("../internals/to-primitive"), w = Object.defineProperty; _.f = u ? w : function(y, h, l) { if (g(y), h = b(h, !0), g(l), m) try { return w(y, h, l); } catch (d) { } if ("get" in l || "set" in l) throw TypeError("Accessors not supported"); return "value" in l && (y[h] = l.value), y; }; }, { "../internals/an-object": 223, "../internals/descriptors": 240, "../internals/ie8-dom-define": 256, "../internals/to-primitive": 309 }], 279: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/object-property-is-enumerable"), g = e("../internals/create-property-descriptor"), b = e("../internals/to-indexed-object"), w = e("../internals/to-primitive"), f = e("../internals/has"), y = e("../internals/ie8-dom-define"), h = Object.getOwnPropertyDescriptor; _.f = u ? h : function(d, s) { if (d = b(d), s = w(s, !0), y) try { return h(d, s); } catch (v) { } if (f(d, s)) return g(!m.f.call(d, s), d[s]); }; }, { "../internals/create-property-descriptor": 237, "../internals/descriptors": 240, "../internals/has": 252, "../internals/ie8-dom-define": 256, "../internals/object-property-is-enumerable": 286, "../internals/to-indexed-object": 305, "../internals/to-primitive": 309 }], 280: [function(e, x, _) { var u = e("../internals/to-indexed-object"), m = e("../internals/object-get-own-property-names").f, g = {}.toString, b = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], w = function(f) { try { return m(f); } catch (y) { return b.slice(); } }; x.exports.f = function(y) { return b && g.call(y) == "[object Window]" ? w(y) : m(u(y)); }; }, { "../internals/object-get-own-property-names": 281, "../internals/to-indexed-object": 305 }], 281: [function(e, x, _) { var u = e("../internals/object-keys-internal"), m = e("../internals/enum-bug-keys"), g = m.concat("length", "prototype"); _.f = Object.getOwnPropertyNames || function(w) { return u(w, g); }; }, { "../internals/enum-bug-keys": 245, "../internals/object-keys-internal": 284 }], 282: [function(e, x, _) { _.f = Object.getOwnPropertySymbols; }, {}], 283: [function(e, x, _) { var u = e("../internals/has"), m = e("../internals/to-object"), g = e("../internals/shared-key"), b = e("../internals/correct-prototype-getter"), w = g("IE_PROTO"), f = Object.prototype; x.exports = b ? Object.getPrototypeOf : function(y) { return y = m(y), u(y, w) ? y[w] : typeof y.constructor == "function" && y instanceof y.constructor ? y.constructor.prototype : y instanceof Object ? f : null; }; }, { "../internals/correct-prototype-getter": 234, "../internals/has": 252, "../internals/shared-key": 299, "../internals/to-object": 308 }], 284: [function(e, x, _) { var u = e("../internals/has"), m = e("../internals/to-indexed-object"), g = e("../internals/array-includes").indexOf, b = e("../internals/hidden-keys"); x.exports = function(w, f) { var y = m(w), h = 0, l = [], d; for (d in y) !u(b, d) && u(y, d) && l.push(d); for (; f.length > h; ) u(y, d = f[h++]) && (~g(l, d) || l.push(d)); return l; }; }, { "../internals/array-includes": 224, "../internals/has": 252, "../internals/hidden-keys": 253, "../internals/to-indexed-object": 305 }], 285: [function(e, x, _) { var u = e("../internals/object-keys-internal"), m = e("../internals/enum-bug-keys"); x.exports = Object.keys || function(b) { return u(b, m); }; }, { "../internals/enum-bug-keys": 245, "../internals/object-keys-internal": 284 }], 286: [function(e, x, _) { var u = {}.propertyIsEnumerable, m = Object.getOwnPropertyDescriptor, g = m && !u.call({ 1: 2 }, 1); _.f = g ? function(w) { var f = m(this, w); return !!f && f.enumerable; } : u; }, {}], 287: [function(e, x, _) { var u = e("../internals/an-object"), m = e("../internals/a-possible-prototype"); x.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() { var g = !1, b = {}, w; try { w = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set, w.call(b, []), g = b instanceof Array; } catch (f) { } return function(y, h) { return u(y), m(h), g ? w.call(y, h) : y.__proto__ = h, y; }; }() : void 0); }, { "../internals/a-possible-prototype": 220, "../internals/an-object": 223 }], 288: [function(e, x, _) { var u = e("../internals/descriptors"), m = e("../internals/object-keys"), g = e("../internals/to-indexed-object"), b = e("../internals/object-property-is-enumerable").f, w = function(f) { return function(y) { for (var h = g(y), l = m(h), d = l.length, s = 0, v = [], c; d > s; ) c = l[s++], (!u || b.call(h, c)) && v.push(f ? [c, h[c]] : h[c]); return v; }; }; x.exports = { // `Object.entries` method // https://tc39.github.io/ecma262/#sec-object.entries entries: w(!0), // `Object.values` method // https://tc39.github.io/ecma262/#sec-object.values values: w(!1) }; }, { "../internals/descriptors": 240, "../internals/object-keys": 285, "../internals/object-property-is-enumerable": 286, "../internals/to-indexed-object": 305 }], 289: [function(e, x, _) { var u = e("../internals/get-built-in"), m = e("../internals/object-get-own-property-names"), g = e("../internals/object-get-own-property-symbols"), b = e("../internals/an-object"); x.exports = u("Reflect", "ownKeys") || function(f) { var y = m.f(b(f)), h = g.f; return h ? y.concat(h(f)) : y; }; }, { "../internals/an-object": 223, "../internals/get-built-in": 249, "../internals/object-get-own-property-names": 281, "../internals/object-get-own-property-symbols": 282 }], 290: [function(e, x, _) { var u = e("../internals/global"); x.exports = u; }, { "../internals/global": 251 }], 291: [function(e, x, _) { x.exports = function(u) { try { return { error: !1, value: u() }; } catch (m) { return { error: !0, value: m }; } }; }, {}], 292: [function(e, x, _) { var u = e("../internals/an-object"), m = e("../internals/is-object"), g = e("../internals/new-promise-capability"); x.exports = function(b, w) { if (u(b), m(w) && w.constructor === b) return w; var f = g.f(b), y = f.resolve; return y(w), f.promise; }; }, { "../internals/an-object": 223, "../internals/is-object": 263, "../internals/new-promise-capability": 273 }], 293: [function(e, x, _) { var u = e("../internals/redefine"); x.exports = function(m, g, b) { for (var w in g) u(m, w, g[w], b); return m; }; }, { "../internals/redefine": 294 }], 294: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/create-non-enumerable-property"), g = e("../internals/has"), b = e("../internals/set-global"), w = e("../internals/inspect-source"), f = e("../internals/internal-state"), y = f.get, h = f.enforce, l = String(String).split("String"); (x.exports = function(d, s, v, c) { var a = c ? !!c.unsafe : !1, r = c ? !!c.enumerable : !1, t = c ? !!c.noTargetGet : !1; if (typeof v == "function" && (typeof s == "string" && !g(v, "name") && m(v, "name", s), h(v).source = l.join(typeof s == "string" ? s : "")), d === u) { r ? d[s] = v : b(s, v); return; } else a ? !t && d[s] && (r = !0) : delete d[s]; r ? d[s] = v : m(d, s, v); })(Function.prototype, "toString", function() { return typeof this == "function" && y(this).source || w(this); }); }, { "../internals/create-non-enumerable-property": 236, "../internals/global": 251, "../internals/has": 252, "../internals/inspect-source": 258, "../internals/internal-state": 259, "../internals/set-global": 296 }], 295: [function(e, x, _) { x.exports = function(u) { if (u == null) throw TypeError("Can't call method on " + u); return u; }; }, {}], 296: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/create-non-enumerable-property"); x.exports = function(g, b) { try { m(u, g, b); } catch (w) { u[g] = b; } return b; }; }, { "../internals/create-non-enumerable-property": 236, "../internals/global": 251 }], 297: [function(e, x, _) { var u = e("../internals/get-built-in"), m = e("../internals/object-define-property"), g = e("../internals/well-known-symbol"), b = e("../internals/descriptors"), w = g("species"); x.exports = function(f) { var y = u(f), h = m.f; b && y && !y[w] && h(y, w, { configurable: !0, get: function() { return this; } }); }; }, { "../internals/descriptors": 240, "../internals/get-built-in": 249, "../internals/object-define-property": 278, "../internals/well-known-symbol": 314 }], 298: [function(e, x, _) { var u = e("../internals/object-define-property").f, m = e("../internals/has"), g = e("../internals/well-known-symbol"), b = g("toStringTag"); x.exports = function(w, f, y) { w && !m(w = y ? w : w.prototype, b) && u(w, b, { configurable: !0, value: f }); }; }, { "../internals/has": 252, "../internals/object-define-property": 278, "../internals/well-known-symbol": 314 }], 299: [function(e, x, _) { var u = e("../internals/shared"), m = e("../internals/uid"), g = u("keys"); x.exports = function(b) { return g[b] || (g[b] = m(b)); }; }, { "../internals/shared": 301, "../internals/uid": 311 }], 300: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/set-global"), g = "__core-js_shared__", b = u[g] || m(g, {}); x.exports = b; }, { "../internals/global": 251, "../internals/set-global": 296 }], 301: [function(e, x, _) { var u = e("../internals/is-pure"), m = e("../internals/shared-store"); (x.exports = function(g, b) { return m[g] || (m[g] = b !== void 0 ? b : {}); })("versions", []).push({ version: "3.6.5", mode: u ? "pure" : "global", copyright: "© 2020 Denis Pushkarev (zloirock.ru)" }); }, { "../internals/is-pure": 264, "../internals/shared-store": 300 }], 302: [function(e, x, _) { var u = e("../internals/an-object"), m = e("../internals/a-function"), g = e("../internals/well-known-symbol"), b = g("species"); x.exports = function(w, f) { var y = u(w).constructor, h; return y === void 0 || (h = u(y)[b]) == null ? f : m(h); }; }, { "../internals/a-function": 219, "../internals/an-object": 223, "../internals/well-known-symbol": 314 }], 303: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/fails"), g = e("../internals/classof-raw"), b = e("../internals/function-bind-context"), w = e("../internals/html"), f = e("../internals/document-create-element"), y = e("../internals/engine-is-ios"), h = u.location, l = u.setImmediate, d = u.clearImmediate, s = u.process, v = u.MessageChannel, c = u.Dispatch, a = 0, r = {}, t = "onreadystatechange", i, n, o, p = function(z) { if (r.hasOwnProperty(z)) { var N = r[z]; delete r[z], N(); } }, O = function(z) { return function() { p(z); }; }, P = function(z) { p(z.data); }, F = function(z) { u.postMessage(z + "", h.protocol + "//" + h.host); }; (!l || !d) && (l = function(N) { for (var M = [], I = 1; arguments.length > I; ) M.push(arguments[I++]); return r[++a] = function() { (typeof N == "function" ? N : Function(N)).apply(void 0, M); }, i(a), a; }, d = function(N) { delete r[N]; }, g(s) == "process" ? i = function(z) { s.nextTick(O(z)); } : c && c.now ? i = function(z) { c.now(O(z)); } : v && !y ? (n = new v(), o = n.port2, n.port1.onmessage = P, i = b(o.postMessage, o, 1)) : u.addEventListener && typeof postMessage == "function" && !u.importScripts && !m(F) && h.protocol !== "file:" ? (i = F, u.addEventListener("message", P, !1)) : t in f("script") ? i = function(z) { w.appendChild(f("script"))[t] = function() { w.removeChild(this), p(z); }; } : i = function(z) { setTimeout(O(z), 0); }), x.exports = { set: l, clear: d }; }, { "../internals/classof-raw": 230, "../internals/document-create-element": 241, "../internals/engine-is-ios": 242, "../internals/fails": 247, "../internals/function-bind-context": 248, "../internals/global": 251, "../internals/html": 255 }], 304: [function(e, x, _) { var u = e("../internals/to-integer"), m = Math.max, g = Math.min; x.exports = function(b, w) { var f = u(b); return f < 0 ? m(f + w, 0) : g(f, w); }; }, { "../internals/to-integer": 306 }], 305: [function(e, x, _) { var u = e("../internals/indexed-object"), m = e("../internals/require-object-coercible"); x.exports = function(g) { return u(m(g)); }; }, { "../internals/indexed-object": 257, "../internals/require-object-coercible": 295 }], 306: [function(e, x, _) { var u = Math.ceil, m = Math.floor; x.exports = function(g) { return isNaN(g = +g) ? 0 : (g > 0 ? m : u)(g); }; }, {}], 307: [function(e, x, _) { var u = e("../internals/to-integer"), m = Math.min; x.exports = function(g) { return g > 0 ? m(u(g), 9007199254740991) : 0; }; }, { "../internals/to-integer": 306 }], 308: [function(e, x, _) { var u = e("../internals/require-object-coercible"); x.exports = function(m) { return Object(u(m)); }; }, { "../internals/require-object-coercible": 295 }], 309: [function(e, x, _) { var u = e("../internals/is-object"); x.exports = function(m, g) { if (!u(m)) return m; var b, w; if (g && typeof (b = m.toString) == "function" && !u(w = b.call(m)) || typeof (b = m.valueOf) == "function" && !u(w = b.call(m)) || !g && typeof (b = m.toString) == "function" && !u(w = b.call(m))) return w; throw TypeError("Can't convert object to primitive value"); }; }, { "../internals/is-object": 263 }], 310: [function(e, x, _) { var u = e("../internals/well-known-symbol"), m = u("toStringTag"), g = {}; g[m] = "z", x.exports = String(g) === "[object z]"; }, { "../internals/well-known-symbol": 314 }], 311: [function(e, x, _) { var u = 0, m = Math.random(); x.exports = function(g) { return "Symbol(" + String(g === void 0 ? "" : g) + ")_" + (++u + m).toString(36); }; }, {}], 312: [function(e, x, _) { var u = e("../internals/native-symbol"); x.exports = u && !Symbol.sham && typeof Symbol.iterator == "symbol"; }, { "../internals/native-symbol": 271 }], 313: [function(e, x, _) { var u = e("../internals/well-known-symbol"); _.f = u; }, { "../internals/well-known-symbol": 314 }], 314: [function(e, x, _) { var u = e("../internals/global"), m = e("../internals/shared"), g = e("../internals/has"), b = e("../internals/uid"), w = e("../internals/native-symbol"), f = e("../internals/use-symbol-as-uid"), y = m("wks"), h = u.Symbol, l = f ? h : h && h.withoutSetter || b; x.exports = function(d) { return g(y, d) || (w && g(h, d) ? y[d] = h[d] : y[d] = l("Symbol." + d)), y[d]; }; }, { "../internals/global": 251, "../internals/has": 252, "../internals/native-symbol": 271, "../internals/shared": 301, "../internals/uid": 311, "../internals/use-symbol-as-uid": 312 }], 315: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/array-iteration").findIndex, g = e("../internals/add-to-unscopables"), b = e("../internals/array-method-uses-to-length"), w = "findIndex", f = !0, y = b(w); w in [] && Array(1)[w](function() { f = !1; }), u({ target: "Array", proto: !0, forced: f || !y }, { findIndex: function(l) { return m(this, l, arguments.length > 1 ? arguments[1] : void 0); } }), g(w); }, { "../internals/add-to-unscopables": 221, "../internals/array-iteration": 225, "../internals/array-method-uses-to-length": 226, "../internals/export": 246 }], 316: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/array-iteration").find, g = e("../internals/add-to-unscopables"), b = e("../internals/array-method-uses-to-length"), w = "find", f = !0, y = b(w); w in [] && Array(1)[w](function() { f = !1; }), u({ target: "Array", proto: !0, forced: f || !y }, { find: function(l) { return m(this, l, arguments.length > 1 ? arguments[1] : void 0); } }), g(w); }, { "../internals/add-to-unscopables": 221, "../internals/array-iteration": 225, "../internals/array-method-uses-to-length": 226, "../internals/export": 246 }], 317: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/array-includes").includes, g = e("../internals/add-to-unscopables"), b = e("../internals/array-method-uses-to-length"), w = b("indexOf", { ACCESSORS: !0, 1: 0 }); u({ target: "Array", proto: !0, forced: !w }, { includes: function(y) { return m(this, y, arguments.length > 1 ? arguments[1] : void 0); } }), g("includes"); }, { "../internals/add-to-unscopables": 221, "../internals/array-includes": 224, "../internals/array-method-uses-to-length": 226, "../internals/export": 246 }], 318: [function(e, x, _) { var u = e("../internals/to-indexed-object"), m = e("../internals/add-to-unscopables"), g = e("../internals/iterators"), b = e("../internals/internal-state"), w = e("../internals/define-iterator"), f = "Array Iterator", y = b.set, h = b.getterFor(f); x.exports = w(Array, "Array", function(l, d) { y(this, { type: f, target: u(l), // target index: 0, // next index kind: d // kind }); }, function() { var l = h(this), d = l.target, s = l.kind, v = l.index++; return !d || v >= d.length ? (l.target = void 0, { value: void 0, done: !0 }) : s == "keys" ? { value: v, done: !1 } : s == "values" ? { value: d[v], done: !1 } : { value: [v, d[v]], done: !1 }; }, "values"), g.Arguments = g.Array, m("keys"), m("values"), m("entries"); }, { "../internals/add-to-unscopables": 221, "../internals/define-iterator": 238, "../internals/internal-state": 259, "../internals/iterators": 268, "../internals/to-indexed-object": 305 }], 319: [function(e, x, _) { var u = e("../internals/export"); u({ target: "Number", stat: !0 }, { isNaN: function(g) { return g != g; } }); }, { "../internals/export": 246 }], 320: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/object-assign"); u({ target: "Object", stat: !0, forced: Object.assign !== m }, { assign: m }); }, { "../internals/export": 246, "../internals/object-assign": 275 }], 321: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/to-object"), g = e("../internals/object-keys"), b = e("../internals/fails"), w = b(function() { g(1); }); u({ target: "Object", stat: !0, forced: w }, { keys: function(y) { return g(m(y)); } }); }, { "../internals/export": 246, "../internals/fails": 247, "../internals/object-keys": 285, "../internals/to-object": 308 }], 322: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/object-to-array").values; u({ target: "Object", stat: !0 }, { values: function(b) { return m(b); } }); }, { "../internals/export": 246, "../internals/object-to-array": 288 }], 323: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/is-pure"), g = e("../internals/global"), b = e("../internals/get-built-in"), w = e("../internals/native-promise-constructor"), f = e("../internals/redefine"), y = e("../internals/redefine-all"), h = e("../internals/set-to-string-tag"), l = e("../internals/set-species"), d = e("../internals/is-object"), s = e("../internals/a-function"), v = e("../internals/an-instance"), c = e("../internals/classof-raw"), a = e("../internals/inspect-source"), r = e("../internals/iterate"), t = e("../internals/check-correctness-of-iteration"), i = e("../internals/species-constructor"), n = e("../internals/task").set, o = e("../internals/microtask"), p = e("../internals/promise-resolve"), O = e("../internals/host-report-errors"), P = e("../internals/new-promise-capability"), F = e("../internals/perform"), z = e("../internals/internal-state"), N = e("../internals/is-forced"), M = e("../internals/well-known-symbol"), I = e("../internals/engine-v8-version"), R = M("species"), C = "Promise", E = z.get, A = z.set, L = z.getterFor(C), $ = w, W = g.TypeError, U = g.document, D = g.process, B = b("fetch"), j = P.f, V = j, re = c(D) == "process", ee = !!(U && U.createEvent && g.dispatchEvent), ce = "unhandledrejection", ve = "rejectionhandled", ge = 0, oe = 1, J = 2, Q = 1, he = 2, ke, ne, se, Ce, q = N(C, function() { var Ue = a($) !== String($); if (!Ue && (I === 66 || !re && typeof PromiseRejectionEvent != "function") || m && !$.prototype.finally) return !0; if (I >= 51 && /native code/.test($)) return !1; var Ve = $.resolve(1), Qe = function(ae) { ae(function() { }, function() { }); }, tt = Ve.constructor = {}; return tt[R] = Qe, !(Ve.then(function() { }) instanceof Qe); }), G = q || !t(function(Ue) { $.all(Ue).catch(function() { }); }), Y = function(Ue) { var Ve; return d(Ue) && typeof (Ve = Ue.then) == "function" ? Ve : !1; }, fe = function(Ue, Ve, Qe) { if (!Ve.notified) { Ve.notified = !0; var tt = Ve.reactions; o(function() { for (var ae = Ve.value, Re = Ve.state == oe, be = 0; tt.length > be; ) { var Ee = tt[be++], pe = Re ? Ee.ok : Ee.fail, Pe = Ee.resolve, te = Ee.reject, He = Ee.domain, it, K, Me; try { pe ? (Re || (Ve.rejection === he && Ye(Ue, Ve), Ve.rejection = Q), pe === !0 ? it = ae : (He && He.enter(), it = pe(ae), He && (He.exit(), Me = !0)), it === Ee.promise ? te(W("Promise-chain cycle")) : (K = Y(it)) ? K.call(it, Pe, te) : Pe(it)) : te(ae); } catch (Le) { He && !Me && He.exit(), te(Le); } } Ve.reactions = [], Ve.notified = !1, Qe && !Ve.rejection && _e(Ue, Ve); }); } }, we = function(Ue, Ve, Qe) { var tt, ae; ee ? (tt = U.createEvent("Event"), tt.promise = Ve, tt.reason = Qe, tt.initEvent(Ue, !1, !0), g.dispatchEvent(tt)) : tt = { promise: Ve, reason: Qe }, (ae = g["on" + Ue]) ? ae(tt) : Ue === ce && O("Unhandled promise rejection", Qe); }, _e = function(Ue, Ve) { n.call(g, function() { var Qe = Ve.value, tt = je(Ve), ae; if (tt && (ae = F(function() { re ? D.emit("unhandledRejection", Qe, Ue) : we(ce, Ue, Qe); }), Ve.rejection = re || je(Ve) ? he : Q, ae.error)) throw ae.value; }); }, je = function(Ue) { return Ue.rejection !== Q && !Ue.parent; }, Ye = function(Ue, Ve) { n.call(g, function() { re ? D.emit("rejectionHandled", Ue) : we(ve, Ue, Ve.value); }); }, nt = function(Ue, Ve, Qe, tt) { return function(ae) { Ue(Ve, Qe, ae, tt); }; }, ut = function(Ue, Ve, Qe, tt) { Ve.done || (Ve.done = !0, tt && (Ve = tt), Ve.value = Qe, Ve.state = J, fe(Ue, Ve, !0)); }, ot = function(Ue, Ve, Qe, tt) { if (!Ve.done) { Ve.done = !0, tt && (Ve = tt); try { if (Ue === Qe) throw W("Promise can't be resolved itself"); var ae = Y(Qe); ae ? o(function() { var Re = { done: !1 }; try { ae.call( Qe, nt(ot, Ue, Re, Ve), nt(ut, Ue, Re, Ve) ); } catch (be) { ut(Ue, Re, be, Ve); } }) : (Ve.value = Qe, Ve.state = oe, fe(Ue, Ve, !1)); } catch (Re) { ut(Ue, { done: !1 }, Re, Ve); } } }; q && ($ = function(Ve) { v(this, $, C), s(Ve), ke.call(this); var Qe = E(this); try { Ve(nt(ot, this, Qe), nt(ut, this, Qe)); } catch (tt) { ut(this, Qe, tt); } }, ke = function(Ve) { A(this, { type: C, done: !1, notified: !1, parent: !1, reactions: [], rejection: !1, state: ge, value: void 0 }); }, ke.prototype = y($.prototype, { // `Promise.prototype.then` method // https://tc39.github.io/ecma262/#sec-promise.prototype.then then: function(Ve, Qe) { var tt = L(this), ae = j(i(this, $)); return ae.ok = typeof Ve == "function" ? Ve : !0, ae.fail = typeof Qe == "function" && Qe, ae.domain = re ? D.domain : void 0, tt.parent = !0, tt.reactions.push(ae), tt.state != ge && fe(this, tt, !1), ae.promise; }, // `Promise.prototype.catch` method // https://tc39.github.io/ecma262/#sec-promise.prototype.catch catch: function(Ue) { return this.then(void 0, Ue); } }), ne = function() { var Ue = new ke(), Ve = E(Ue); this.promise = Ue, this.resolve = nt(ot, Ue, Ve), this.reject = nt(ut, Ue, Ve); }, P.f = j = function(Ue) { return Ue === $ || Ue === se ? new ne(Ue) : V(Ue); }, !m && typeof w == "function" && (Ce = w.prototype.then, f(w.prototype, "then", function(Ve, Qe) { var tt = this; return new $(function(ae, Re) { Ce.call(tt, ae, Re); }).then(Ve, Qe); }, { unsafe: !0 }), typeof B == "function" && u({ global: !0, enumerable: !0, forced: !0 }, { // eslint-disable-next-line no-unused-vars fetch: function(Ve) { return p($, B.apply(g, arguments)); } }))), u({ global: !0, wrap: !0, forced: q }, { Promise: $ }), h($, C, !1, !0), l(C), se = b(C), u({ target: C, stat: !0, forced: q }, { // `Promise.reject` method // https://tc39.github.io/ecma262/#sec-promise.reject reject: function(Ve) { var Qe = j(this); return Qe.reject.call(void 0, Ve), Qe.promise; } }), u({ target: C, stat: !0, forced: m || q }, { // `Promise.resolve` method // https://tc39.github.io/ecma262/#sec-promise.resolve resolve: function(Ve) { return p(m && this === se ? $ : this, Ve); } }), u({ target: C, stat: !0, forced: G }, { // `Promise.all` method // https://tc39.github.io/ecma262/#sec-promise.all all: function(Ve) { var Qe = this, tt = j(Qe), ae = tt.resolve, Re = tt.reject, be = F(function() { var Ee = s(Qe.resolve), pe = [], Pe = 0, te = 1; r(Ve, function(He) { var it = Pe++, K = !1; pe.push(void 0), te++, Ee.call(Qe, He).then(function(Me) { K || (K = !0, pe[it] = Me, --te || ae(pe)); }, Re); }), --te || ae(pe); }); return be.error && Re(be.value), tt.promise; }, // `Promise.race` method // https://tc39.github.io/ecma262/#sec-promise.race race: function(Ve) { var Qe = this, tt = j(Qe), ae = tt.reject, Re = F(function() { var be = s(Qe.resolve); r(Ve, function(Ee) { be.call(Qe, Ee).then(tt.resolve, ae); }); }); return Re.error && ae(Re.value), tt.promise; } }); }, { "../internals/a-function": 219, "../internals/an-instance": 222, "../internals/check-correctness-of-iteration": 229, "../internals/classof-raw": 230, "../internals/engine-v8-version": 244, "../internals/export": 246, "../internals/get-built-in": 249, "../internals/global": 251, "../internals/host-report-errors": 254, "../internals/inspect-source": 258, "../internals/internal-state": 259, "../internals/is-forced": 262, "../internals/is-object": 263, "../internals/is-pure": 264, "../internals/iterate": 266, "../internals/microtask": 269, "../internals/native-promise-constructor": 270, "../internals/new-promise-capability": 273, "../internals/perform": 291, "../internals/promise-resolve": 292, "../internals/redefine": 294, "../internals/redefine-all": 293, "../internals/set-species": 297, "../internals/set-to-string-tag": 298, "../internals/species-constructor": 302, "../internals/task": 303, "../internals/well-known-symbol": 314 }], 324: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/to-absolute-index"), g = String.fromCharCode, b = String.fromCodePoint, w = !!b && b.length != 1; u({ target: "String", stat: !0, forced: w }, { fromCodePoint: function(y) { for (var h = [], l = arguments.length, d = 0, s; l > d; ) { if (s = +arguments[d++], m(s, 1114111) !== s) throw RangeError(s + " is not a valid code point"); h.push( s < 65536 ? g(s) : g(((s -= 65536) >> 10) + 55296, s % 1024 + 56320) ); } return h.join(""); } }); }, { "../internals/export": 246, "../internals/to-absolute-index": 304 }], 325: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/not-a-regexp"), g = e("../internals/require-object-coercible"), b = e("../internals/correct-is-regexp-logic"); u({ target: "String", proto: !0, forced: !b("includes") }, { includes: function(f) { return !!~String(g(this)).indexOf(m(f), arguments.length > 1 ? arguments[1] : void 0); } }); }, { "../internals/correct-is-regexp-logic": 233, "../internals/export": 246, "../internals/not-a-regexp": 274, "../internals/require-object-coercible": 295 }], 326: [function(e, x, _) { var u = e("../internals/define-well-known-symbol"); u("asyncIterator"); }, { "../internals/define-well-known-symbol": 239 }], 327: [function(e, x, _) { var u = e("../internals/export"), m = e("../internals/global"), g = e("../internals/get-built-in"), b = e("../internals/is-pure"), w = e("../internals/descriptors"), f = e("../internals/native-symbol"), y = e("../internals/use-symbol-as-uid"), h = e("../internals/fails"), l = e("../internals/has"), d = e("../internals/is-array"), s = e("../internals/is-object"), v = e("../internals/an-object"), c = e("../internals/to-object"), a = e("../internals/to-indexed-object"), r = e("../internals/to-primitive"), t = e("../internals/create-property-descriptor"), i = e("../internals/object-create"), n = e("../internals/object-keys"), o = e("../internals/object-get-own-property-names"), p = e("../internals/object-get-own-property-names-external"), O = e("../internals/object-get-own-property-symbols"), P = e("../internals/object-get-own-property-descriptor"), F = e("../internals/object-define-property"), z = e("../internals/object-property-is-enumerable"), N = e("../internals/create-non-enumerable-property"), M = e("../internals/redefine"), I = e("../internals/shared"), R = e("../internals/shared-key"), C = e("../internals/hidden-keys"), E = e("../internals/uid"), A = e("../internals/well-known-symbol"), L = e("../internals/well-known-symbol-wrapped"), $ = e("../internals/define-well-known-symbol"), W = e("../internals/set-to-string-tag"), U = e("../internals/internal-state"), D = e("../internals/array-iteration").forEach, B = R("hidden"), j = "Symbol", V = "prototype", re = A("toPrimitive"), ee = U.set, ce = U.getterFor(j), ve = Object[V], ge = m.Symbol, oe = g("JSON", "stringify"), J = P.f, Q = F.f, he = p.f, ke = z.f, ne = I("symbols"), se = I("op-symbols"), Ce = I("string-to-symbol-registry"), q = I("symbol-to-string-registry"), G = I("wks"), Y = m.QObject, fe = !Y || !Y[V] || !Y[V].findChild, we = w && h(function() { return i(Q({}, "a", { get: function() { return Q(this, "a", { value: 7 }).a; } })).a != 7; }) ? function(ae, Re, be) { var Ee = J(ve, Re); Ee && delete ve[Re], Q(ae, Re, be), Ee && ae !== ve && Q(ve, Re, Ee); } : Q, _e = function(ae, Re) { var be = ne[ae] = i(ge[V]); return ee(be, { type: j, tag: ae, description: Re }), w || (be.description = Re), be; }, je = y ? function(ae) { return typeof ae == "symbol"; } : function(ae) { return Object(ae) instanceof ge; }, Ye = function(Re, be, Ee) { Re === ve && Ye(se, be, Ee), v(Re); var pe = r(be, !0); return v(Ee), l(ne, pe) ? (Ee.enumerable ? (l(Re, B) && Re[B][pe] && (Re[B][pe] = !1), Ee = i(Ee, { enumerable: t(0, !1) })) : (l(Re, B) || Q(Re, B, t(1, {})), Re[B][pe] = !0), we(Re, pe, Ee)) : Q(Re, pe, Ee); }, nt = function(Re, be) { v(Re); var Ee = a(be), pe = n(Ee).concat(Qe(Ee)); return D(pe, function(Pe) { (!w || ot.call(Ee, Pe)) && Ye(Re, Pe, Ee[Pe]); }), Re; }, ut = function(Re, be) { return be === void 0 ? i(Re) : nt(i(Re), be); }, ot = function(Re) { var be = r(Re, !0), Ee = ke.call(this, be); return this === ve && l(ne, be) && !l(se, be) ? !1 : Ee || !l(this, be) || !l(ne, be) || l(this, B) && this[B][be] ? Ee : !0; }, Ue = function(Re, be) { var Ee = a(Re), pe = r(be, !0); if (!(Ee === ve && l(ne, pe) && !l(se, pe))) { var Pe = J(Ee, pe); return Pe && l(ne, pe) && !(l(Ee, B) && Ee[B][pe]) && (Pe.enumerable = !0), Pe; } }, Ve = function(Re) { var be = he(a(Re)), Ee = []; return D(be, function(pe) { !l(ne, pe) && !l(C, pe) && Ee.push(pe); }), Ee; }, Qe = function(Re) { var be = Re === ve, Ee = he(be ? se : a(Re)), pe = []; return D(Ee, function(Pe) { l(ne, Pe) && (!be || l(ve, Pe)) && pe.push(ne[Pe]); }), pe; }; if (f || (ge = function() { if (this instanceof ge) throw TypeError("Symbol is not a constructor"); var Re = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), be = E(Re), Ee = function(pe) { this === ve && Ee.call(se, pe), l(this, B) && l(this[B], be) && (this[B][be] = !1), we(this, be, t(1, pe)); }; return w && fe && we(ve, be, { configurable: !0, set: Ee }), _e(be, Re); }, M(ge[V], "toString", function() { return ce(this).tag; }), M(ge, "withoutSetter", function(ae) { return _e(E(ae), ae); }), z.f = ot, F.f = Ye, P.f = Ue, o.f = p.f = Ve, O.f = Qe, L.f = function(ae) { return _e(A(ae), ae); }, w && (Q(ge[V], "description", { configurable: !0, get: function() { return ce(this).description; } }), b || M(ve, "propertyIsEnumerable", ot, { unsafe: !0 }))), u({ global: !0, wrap: !0, forced: !f, sham: !f }, { Symbol: ge }), D(n(G), function(ae) { $(ae); }), u({ target: j, stat: !0, forced: !f }, { // `Symbol.for` method // https://tc39.github.io/ecma262/#sec-symbol.for for: function(ae) { var Re = String(ae); if (l(Ce, Re)) return Ce[Re]; var be = ge(Re); return Ce[Re] = be, q[be] = Re, be; }, // `Symbol.keyFor` method // https://tc39.github.io/ecma262/#sec-symbol.keyfor keyFor: function(Re) { if (!je(Re)) throw TypeError(Re + " is not a symbol"); if (l(q, Re)) return q[Re]; }, useSetter: function() { fe = !0; }, useSimple: function() { fe = !1; } }), u({ target: "Object", stat: !0, forced: !f, sham: !w }, { // `Object.create` method // https://tc39.github.io/ecma262/#sec-object.create create: ut, // `Object.defineProperty` method // https://tc39.github.io/ecma262/#sec-object.defineproperty defineProperty: Ye, // `Object.defineProperties` method // https://tc39.github.io/ecma262/#sec-object.defineproperties defineProperties: nt, // `Object.getOwnPropertyDescriptor` method // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors getOwnPropertyDescriptor: Ue }), u({ target: "Object", stat: !0, forced: !f }, { // `Object.getOwnPropertyNames` method // https://tc39.github.io/ecma262/#sec-object.getownpropertynames getOwnPropertyNames: Ve, // `Object.getOwnPropertySymbols` method // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols getOwnPropertySymbols: Qe }), u({ target: "Object", stat: !0, forced: h(function() { O.f(1); }) }, { getOwnPropertySymbols: function(Re) { return O.f(c(Re)); } }), oe) { var tt = !f || h(function() { var ae = ge(); return oe([ae]) != "[null]" || oe({ a: ae }) != "{}" || oe(Object(ae)) != "{}"; }); u({ target: "JSON", stat: !0, forced: tt }, { // eslint-disable-next-line no-unused-vars stringify: function(Re, be, Ee) { for (var pe = [Re], Pe = 1, te; arguments.length > Pe; ) pe.push(arguments[Pe++]); if (te = be, !(!s(be) && Re === void 0 || je(Re))) return d(be) || (be = function(He, it) { if (typeof te == "function" && (it = te.call(this, He, it)), !je(it)) return it; }), pe[1] = be, oe.apply(null, pe); } }); } ge[V][re] || N(ge[V], re, ge[V].valueOf), W(ge, j), C[B] = !0; }, { "../internals/an-object": 223, "../internals/array-iteration": 225, "../internals/create-non-enumerable-property": 236, "../internals/create-property-descriptor": 237, "../internals/define-well-known-symbol": 239, "../internals/descriptors": 240, "../internals/export": 246, "../internals/fails": 247, "../internals/get-built-in": 249, "../internals/global": 251, "../internals/has": 252, "../internals/hidden-keys": 253, "../internals/internal-state": 259, "../internals/is-array": 261, "../internals/is-object": 263, "../internals/is-pure": 264, "../internals/native-symbol": 271, "../internals/object-create": 276, "../internals/object-define-property": 278, "../internals/object-get-own-property-descriptor": 279, "../internals/object-get-own-property-names": 281, "../internals/object-get-own-property-names-external": 280, "../internals/object-get-own-property-symbols": 282, "../internals/object-keys": 285, "../internals/object-property-is-enumerable": 286, "../internals/redefine": 294, "../internals/set-to-string-tag": 298, "../internals/shared": 301, "../internals/shared-key": 299, "../internals/to-indexed-object": 305, "../internals/to-object": 308, "../internals/to-primitive": 309, "../internals/uid": 311, "../internals/use-symbol-as-uid": 312, "../internals/well-known-symbol": 314, "../internals/well-known-symbol-wrapped": 313 }], 328: [function(e, x, _) { (function(u) { function m(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(p) { return typeof p; } : m = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, m(n); } function g(n) { return Array.isArray ? Array.isArray(n) : i(n) === "[object Array]"; } _.isArray = g; function b(n) { return typeof n == "boolean"; } _.isBoolean = b; function w(n) { return n === null; } _.isNull = w; function f(n) { return n == null; } _.isNullOrUndefined = f; function y(n) { return typeof n == "number"; } _.isNumber = y; function h(n) { return typeof n == "string"; } _.isString = h; function l(n) { return m(n) === "symbol"; } _.isSymbol = l; function d(n) { return n === void 0; } _.isUndefined = d; function s(n) { return i(n) === "[object RegExp]"; } _.isRegExp = s; function v(n) { return m(n) === "object" && n !== null; } _.isObject = v; function c(n) { return i(n) === "[object Date]"; } _.isDate = c; function a(n) { return i(n) === "[object Error]" || n instanceof Error; } _.isError = a; function r(n) { return typeof n == "function"; } _.isFunction = r; function t(n) { return n === null || typeof n == "boolean" || typeof n == "number" || typeof n == "string" || m(n) === "symbol" || // ES6 symbol typeof n == "undefined"; } _.isPrimitive = t, _.isBuffer = u.isBuffer; function i(n) { return Object.prototype.toString.call(n); } }).call(this, { isBuffer: e("../../is-buffer/index.js") }); }, { "../../is-buffer/index.js": 388 }], 329: [function(e, x, _) { (function(u) { var m = e("elliptic"), g = e("bn.js"); x.exports = function(h) { return new w(h); }; var b = { secp256k1: { name: "secp256k1", byteLength: 32 }, secp224r1: { name: "p224", byteLength: 28 }, prime256v1: { name: "p256", byteLength: 32 }, prime192v1: { name: "p192", byteLength: 24 }, ed25519: { name: "ed25519", byteLength: 32 }, secp384r1: { name: "p384", byteLength: 48 }, secp521r1: { name: "p521", byteLength: 66 } }; b.p224 = b.secp224r1, b.p256 = b.secp256r1 = b.prime256v1, b.p192 = b.secp192r1 = b.prime192v1, b.p384 = b.secp384r1, b.p521 = b.secp521r1; function w(y) { this.curveType = b[y], this.curveType || (this.curveType = { name: y }), this.curve = new m.ec(this.curveType.name), this.keys = void 0; } w.prototype.generateKeys = function(y, h) { return this.keys = this.curve.genKeyPair(), this.getPublicKey(y, h); }, w.prototype.computeSecret = function(y, h, l) { h = h || "utf8", u.isBuffer(y) || (y = new u(y, h)); var d = this.curve.keyFromPublic(y).getPublic(), s = d.mul(this.keys.getPrivate()).getX(); return f(s, l, this.curveType.byteLength); }, w.prototype.getPublicKey = function(y, h) { var l = this.keys.getPublic(h === "compressed", !0); return h === "hybrid" && (l[l.length - 1] % 2 ? l[0] = 7 : l[0] = 6), f(l, y); }, w.prototype.getPrivateKey = function(y) { return f(this.keys.getPrivate(), y); }, w.prototype.setPublicKey = function(y, h) { return h = h || "utf8", u.isBuffer(y) || (y = new u(y, h)), this.keys._importPublic(y), this; }, w.prototype.setPrivateKey = function(y, h) { h = h || "utf8", u.isBuffer(y) || (y = new u(y, h)); var l = new g(y); return l = l.toString(16), this.keys = this.curve.genKeyPair(), this.keys._importPrivate(l), this; }; function f(y, h, l) { Array.isArray(y) || (y = y.toArray()); var d = new u(y); if (l && d.length < l) { var s = new u(l - d.length); s.fill(0), d = u.concat([s, d]); } return h ? d.toString(h) : d; } }).call(this, e("buffer").Buffer); }, { "bn.js": 330, buffer: 216, elliptic: 350 }], 330: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 331: [function(e, x, _) { var u = e("inherits"), m = e("md5.js"), g = e("ripemd160"), b = e("sha.js"), w = e("cipher-base"); function f(y) { w.call(this, "digest"), this._hash = y; } u(f, w), f.prototype._update = function(y) { this._hash.update(y); }, f.prototype._final = function() { return this._hash.digest(); }, x.exports = function(h) { return h = h.toLowerCase(), h === "md5" ? new m() : h === "rmd160" || h === "ripemd160" ? new g() : new f(b(h)); }; }, { "cipher-base": 218, inherits: 387, "md5.js": 434, ripemd160: 493, "sha.js": 499 }], 332: [function(e, x, _) { var u = e("md5.js"); x.exports = function(m) { return new u().update(m).digest(); }; }, { "md5.js": 434 }], 333: [function(e, x, _) { var u = e("inherits"), m = e("./legacy"), g = e("cipher-base"), b = e("safe-buffer").Buffer, w = e("create-hash/md5"), f = e("ripemd160"), y = e("sha.js"), h = b.alloc(128); function l(d, s) { g.call(this, "digest"), typeof s == "string" && (s = b.from(s)); var v = d === "sha512" || d === "sha384" ? 128 : 64; if (this._alg = d, this._key = s, s.length > v) { var c = d === "rmd160" ? new f() : y(d); s = c.update(s).digest(); } else s.length < v && (s = b.concat([s, h], v)); for (var a = this._ipad = b.allocUnsafe(v), r = this._opad = b.allocUnsafe(v), t = 0; t < v; t++) a[t] = s[t] ^ 54, r[t] = s[t] ^ 92; this._hash = d === "rmd160" ? new f() : y(d), this._hash.update(a); } u(l, g), l.prototype._update = function(d) { this._hash.update(d); }, l.prototype._final = function() { var d = this._hash.digest(), s = this._alg === "rmd160" ? new f() : y(this._alg); return s.update(this._opad).update(d).digest(); }, x.exports = function(s, v) { return s = s.toLowerCase(), s === "rmd160" || s === "ripemd160" ? new l("rmd160", v) : s === "md5" ? new m(w, v) : new l(s, v); }; }, { "./legacy": 334, "cipher-base": 218, "create-hash/md5": 332, inherits: 387, ripemd160: 493, "safe-buffer": 494, "sha.js": 499 }], 334: [function(e, x, _) { var u = e("inherits"), m = e("safe-buffer").Buffer, g = e("cipher-base"), b = m.alloc(128), w = 64; function f(y, h) { g.call(this, "digest"), typeof h == "string" && (h = m.from(h)), this._alg = y, this._key = h, h.length > w ? h = y(h) : h.length < w && (h = m.concat([h, b], w)); for (var l = this._ipad = m.allocUnsafe(w), d = this._opad = m.allocUnsafe(w), s = 0; s < w; s++) l[s] = h[s] ^ 54, d[s] = h[s] ^ 92; this._hash = [l]; } u(f, g), f.prototype._update = function(y) { this._hash.push(y); }, f.prototype._final = function() { var y = this._alg(m.concat(this._hash)); return this._alg(m.concat([this._opad, y])); }, x.exports = f; }, { "cipher-base": 218, inherits: 387, "safe-buffer": 494 }], 335: [function(e, x, _) { _.randomBytes = _.rng = _.pseudoRandomBytes = _.prng = e("randombytes"), _.createHash = _.Hash = e("create-hash"), _.createHmac = _.Hmac = e("create-hmac"); var u = e("browserify-sign/algos"), m = Object.keys(u), g = ["sha1", "sha224", "sha256", "sha384", "sha512", "md5", "rmd160"].concat(m); _.getHashes = function() { return g; }; var b = e("pbkdf2"); _.pbkdf2 = b.pbkdf2, _.pbkdf2Sync = b.pbkdf2Sync; var w = e("browserify-cipher"); _.Cipher = w.Cipher, _.createCipher = w.createCipher, _.Cipheriv = w.Cipheriv, _.createCipheriv = w.createCipheriv, _.Decipher = w.Decipher, _.createDecipher = w.createDecipher, _.Decipheriv = w.Decipheriv, _.createDecipheriv = w.createDecipheriv, _.getCiphers = w.getCiphers, _.listCiphers = w.listCiphers; var f = e("diffie-hellman"); _.DiffieHellmanGroup = f.DiffieHellmanGroup, _.createDiffieHellmanGroup = f.createDiffieHellmanGroup, _.getDiffieHellman = f.getDiffieHellman, _.createDiffieHellman = f.createDiffieHellman, _.DiffieHellman = f.DiffieHellman; var y = e("browserify-sign"); _.createSign = y.createSign, _.Sign = y.Sign, _.createVerify = y.createVerify, _.Verify = y.Verify, _.createECDH = e("create-ecdh"); var h = e("public-encrypt"); _.publicEncrypt = h.publicEncrypt, _.privateEncrypt = h.privateEncrypt, _.publicDecrypt = h.publicDecrypt, _.privateDecrypt = h.privateDecrypt; var l = e("randomfill"); _.randomFill = l.randomFill, _.randomFillSync = l.randomFillSync, _.createCredentials = function() { throw new Error(["sorry, createCredentials is not implemented yet", "we accept pull requests", "https://github.com/crypto-browserify/crypto-browserify"].join(` `)); }, _.constants = { DH_CHECK_P_NOT_SAFE_PRIME: 2, DH_CHECK_P_NOT_PRIME: 1, DH_UNABLE_TO_CHECK_GENERATOR: 4, DH_NOT_SUITABLE_GENERATOR: 8, NPN_ENABLED: 1, ALPN_ENABLED: 1, RSA_PKCS1_PADDING: 1, RSA_SSLV23_PADDING: 2, RSA_NO_PADDING: 3, RSA_PKCS1_OAEP_PADDING: 4, RSA_X931_PADDING: 5, RSA_PKCS1_PSS_PADDING: 6, POINT_CONVERSION_COMPRESSED: 2, POINT_CONVERSION_UNCOMPRESSED: 4, POINT_CONVERSION_HYBRID: 6 }; }, { "browserify-cipher": 203, "browserify-sign": 211, "browserify-sign/algos": 208, "create-ecdh": 329, "create-hash": 331, "create-hmac": 333, "diffie-hellman": 345, pbkdf2: 460, "public-encrypt": 468, randombytes: 475, randomfill: 476 }], 336: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } (function(m, g) { (typeof _ == "undefined" ? "undefined" : u(_)) == "object" && typeof x != "undefined" ? x.exports = g() : m.dayjs = g(); })(void 0, function() { var m = "millisecond", g = "second", b = "minute", w = "hour", f = "day", y = "week", h = "month", l = "quarter", d = "year", s = "date", v = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d+)?$/, c = /\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, a = function(M, I, R) { var C = String(M); return !C || C.length >= I ? M : "" + Array(I + 1 - C.length).join(R) + M; }, r = { s: a, z: function(M) { var I = -M.utcOffset(), R = Math.abs(I), C = Math.floor(R / 60), E = R % 60; return (I <= 0 ? "+" : "-") + a(C, 2, "0") + ":" + a(E, 2, "0"); }, m: function N(M, I) { if (M.date() < I.date()) return -N(I, M); var R = 12 * (I.year() - M.year()) + (I.month() - M.month()), C = M.add(R, h), E = I - C < 0, A = M.add(R + (E ? -1 : 1), h); return +(-(R + (I - C) / (E ? C - A : A - C)) || 0); }, a: function(M) { return M < 0 ? Math.ceil(M) || 0 : Math.floor(M); }, p: function(M) { return { M: h, y: d, w: y, d: f, D: s, h: w, m: b, s: g, ms: m, Q: l }[M] || String(M || "").toLowerCase().replace(/s$/, ""); }, u: function(M) { return M === void 0; } }, t = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") }, i = "en", n = {}; n[i] = t; var o = function(M) { return M instanceof F; }, p = function(M, I, R) { var C; if (!M) return i; if (typeof M == "string") n[M] && (C = M), I && (n[M] = I, C = M); else { var E = M.name; n[E] = M, C = E; } return !R && C && (i = C), C || !R && i; }, O = function(M, I) { if (o(M)) return M.clone(); var R = u(I) == "object" ? I : {}; return R.date = M, R.args = arguments, new F(R); }, P = r; P.l = p, P.i = o, P.w = function(N, M) { return O(N, { locale: M.$L, utc: M.$u, $offset: M.$offset }); }; var F = function() { function N(I) { this.$L = this.$L || p(I.locale, null, !0), this.parse(I); } var M = N.prototype; return M.parse = function(I) { this.$d = function(R) { var C = R.date, E = R.utc; if (C === null) return /* @__PURE__ */ new Date(NaN); if (P.u(C)) return /* @__PURE__ */ new Date(); if (C instanceof Date) return new Date(C); if (typeof C == "string" && !/Z$/i.test(C)) { var A = C.match(v); if (A) { var L = A[2] - 1 || 0, $ = (A[7] || "0").substring(0, 3); return E ? new Date(Date.UTC(A[1], L, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, $)) : new Date(A[1], L, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, $); } } return new Date(C); }(I), this.init(); }, M.init = function() { var I = this.$d; this.$y = I.getFullYear(), this.$M = I.getMonth(), this.$D = I.getDate(), this.$W = I.getDay(), this.$H = I.getHours(), this.$m = I.getMinutes(), this.$s = I.getSeconds(), this.$ms = I.getMilliseconds(); }, M.$utils = function() { return P; }, M.isValid = function() { return this.$d.toString() !== "Invalid Date"; }, M.isSame = function(I, R) { var C = O(I); return this.startOf(R) <= C && C <= this.endOf(R); }, M.isAfter = function(I, R) { return O(I) < this.startOf(R); }, M.isBefore = function(I, R) { return this.endOf(R) < O(I); }, M.$g = function(I, R, C) { return P.u(I) ? this[R] : this.set(C, I); }, M.unix = function() { return Math.floor(this.valueOf() / 1e3); }, M.valueOf = function() { return this.$d.getTime(); }, M.startOf = function(I, R) { var C = this, E = !!P.u(R) || R, A = P.p(I), L = function(ee, ce) { var ve = P.w(C.$u ? Date.UTC(C.$y, ce, ee) : new Date(C.$y, ce, ee), C); return E ? ve : ve.endOf(f); }, $ = function(ee, ce) { return P.w(C.toDate()[ee].apply(C.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ce)), C); }, W = this.$W, U = this.$M, D = this.$D, B = "set" + (this.$u ? "UTC" : ""); switch (A) { case d: return E ? L(1, 0) : L(31, 11); case h: return E ? L(1, U) : L(0, U + 1); case y: var j = this.$locale().weekStart || 0, V = (W < j ? W + 7 : W) - j; return L(E ? D - V : D + (6 - V), U); case f: case s: return $(B + "Hours", 0); case w: return $(B + "Minutes", 1); case b: return $(B + "Seconds", 2); case g: return $(B + "Milliseconds", 3); default: return this.clone(); } }, M.endOf = function(I) { return this.startOf(I, !1); }, M.$set = function(I, R) { var C, E = P.p(I), A = "set" + (this.$u ? "UTC" : ""), L = (C = {}, C[f] = A + "Date", C[s] = A + "Date", C[h] = A + "Month", C[d] = A + "FullYear", C[w] = A + "Hours", C[b] = A + "Minutes", C[g] = A + "Seconds", C[m] = A + "Milliseconds", C)[E], $ = E === f ? this.$D + (R - this.$W) : R; if (E === h || E === d) { var W = this.clone().set(s, 1); W.$d[L]($), W.init(), this.$d = W.set(s, Math.min(this.$D, W.daysInMonth())).$d; } else L && this.$d[L]($); return this.init(), this; }, M.set = function(I, R) { return this.clone().$set(I, R); }, M.get = function(I) { return this[P.p(I)](); }, M.add = function(I, R) { var C, E = this; I = Number(I); var A = P.p(R), L = function(D) { var B = O(E); return P.w(B.date(B.date() + Math.round(D * I)), E); }; if (A === h) return this.set(h, this.$M + I); if (A === d) return this.set(d, this.$y + I); if (A === f) return L(1); if (A === y) return L(7); var $ = (C = {}, C[b] = 6e4, C[w] = 36e5, C[g] = 1e3, C)[A] || 1, W = this.$d.getTime() + I * $; return P.w(W, this); }, M.subtract = function(I, R) { return this.add(-1 * I, R); }, M.format = function(I) { var R = this; if (!this.isValid()) return "Invalid Date"; var C = I || "YYYY-MM-DDTHH:mm:ssZ", E = P.z(this), A = this.$locale(), L = this.$H, $ = this.$m, W = this.$M, U = A.weekdays, D = A.months, B = function(ce, ve, ge, oe) { return ce && (ce[ve] || ce(R, C)) || ge[ve].substr(0, oe); }, j = function(ce) { return P.s(L % 12 || 12, ce, "0"); }, V = A.meridiem || function(ee, ce, ve) { var ge = ee < 12 ? "AM" : "PM"; return ve ? ge.toLowerCase() : ge; }, re = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: W + 1, MM: P.s(W + 1, 2, "0"), MMM: B(A.monthsShort, W, D, 3), MMMM: B(D, W), D: this.$D, DD: P.s(this.$D, 2, "0"), d: String(this.$W), dd: B(A.weekdaysMin, this.$W, U, 2), ddd: B(A.weekdaysShort, this.$W, U, 3), dddd: U[this.$W], H: String(L), HH: P.s(L, 2, "0"), h: j(1), hh: j(2), a: V(L, $, !0), A: V(L, $, !1), m: String($), mm: P.s($, 2, "0"), s: String(this.$s), ss: P.s(this.$s, 2, "0"), SSS: P.s(this.$ms, 3, "0"), Z: E }; return C.replace(c, function(ee, ce) { return ce || re[ee] || E.replace(":", ""); }); }, M.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, M.diff = function(I, R, C) { var E, A = P.p(R), L = O(I), $ = 6e4 * (L.utcOffset() - this.utcOffset()), W = this - L, U = P.m(this, L); return U = (E = {}, E[d] = U / 12, E[h] = U, E[l] = U / 3, E[y] = (W - $) / 6048e5, E[f] = (W - $) / 864e5, E[w] = W / 36e5, E[b] = W / 6e4, E[g] = W / 1e3, E)[A] || W, C ? U : P.a(U); }, M.daysInMonth = function() { return this.endOf(h).$D; }, M.$locale = function() { return n[this.$L]; }, M.locale = function(I, R) { if (!I) return this.$L; var C = this.clone(), E = p(I, R, !0); return E && (C.$L = E), C; }, M.clone = function() { return P.w(this.$d, this); }, M.toDate = function() { return new Date(this.valueOf()); }, M.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, M.toISOString = function() { return this.$d.toISOString(); }, M.toString = function() { return this.$d.toUTCString(); }, N; }(), z = F.prototype; return O.prototype = z, [["$ms", m], ["$s", g], ["$m", b], ["$H", w], ["$W", f], ["$M", h], ["$y", d], ["$D", s]].forEach(function(N) { z[N[1]] = function(M) { return this.$g(M, N[0], N[1]); }; }), O.extend = function(N, M) { return N(M, F, O), O; }, O.locale = p, O.isDayjs = o, O.unix = function(N) { return O(1e3 * N); }, O.en = n[i], O.Ls = n, O; }); }, {}], 337: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } (function(m, g) { (typeof _ == "undefined" ? "undefined" : u(_)) == "object" && typeof x != "undefined" ? x.exports = g() : m.dayjs_plugin_customParseFormat = g(); })(void 0, function() { var m, g = /(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, b = /\d\d/, w = /\d\d?/, f = /\d*[^\s\d-:/()]+/, y = function(c) { return function(a) { this[c] = +a; }; }, h = [/[+-]\d\d:?\d\d/, function(v) { var c, a; (this.zone || (this.zone = {})).offset = (c = v.match(/([+-]|\d\d)/g), (a = 60 * c[1] + +c[2]) === 0 ? 0 : c[0] === "+" ? -a : a); }], l = function(c) { var a = m[c]; return a && (a.indexOf ? a : a.s.concat(a.f)); }, d = { A: [/[AP]M/, function(v) { this.afternoon = v === "PM"; }], a: [/[ap]m/, function(v) { this.afternoon = v === "pm"; }], S: [/\d/, function(v) { this.milliseconds = 100 * +v; }], SS: [b, function(v) { this.milliseconds = 10 * +v; }], SSS: [/\d{3}/, function(v) { this.milliseconds = +v; }], s: [w, y("seconds")], ss: [w, y("seconds")], m: [w, y("minutes")], mm: [w, y("minutes")], H: [w, y("hours")], h: [w, y("hours")], HH: [w, y("hours")], hh: [w, y("hours")], D: [w, y("day")], DD: [b, y("day")], Do: [f, function(v) { var c = m.ordinal, a = v.match(/\d+/); if (this.day = a[0], c) for (var r = 1; r <= 31; r += 1) c(r).replace(/\[|\]/g, "") === v && (this.day = r); }], M: [w, y("month")], MM: [b, y("month")], MMM: [f, function(v) { var c = l("months"), a = (l("monthsShort") || c.map(function(r) { return r.substr(0, 3); })).indexOf(v) + 1; if (a < 1) throw new Error(); this.month = a % 12 || a; }], MMMM: [f, function(v) { var c = l("months").indexOf(v) + 1; if (c < 1) throw new Error(); this.month = c % 12 || c; }], Y: [/[+-]?\d+/, y("year")], YY: [b, function(v) { v = +v, this.year = v + (v > 68 ? 1900 : 2e3); }], YYYY: [/\d{4}/, y("year")], Z: h, ZZ: h }, s = function(c, a, r) { try { var t = function($) { for (var W = $.match(g), U = W.length, D = 0; D < U; D += 1) { var B = W[D], j = d[B], V = j && j[0], re = j && j[1]; W[D] = re ? { regex: V, parser: re } : B.replace(/^\[|\]$/g, ""); } return function(ee) { for (var ce = {}, ve = 0, ge = 0; ve < U; ve += 1) { var oe = W[ve]; if (typeof oe == "string") ge += oe.length; else { var J = oe.regex, Q = oe.parser, he = ee.substr(ge), ke = J.exec(he)[0]; Q.call(ce, ke), ee = ee.replace(ke, ""); } } return function(ne) { var se = ne.afternoon; if (se !== void 0) { var Ce = ne.hours; se ? Ce < 12 && (ne.hours += 12) : Ce === 12 && (ne.hours = 0), delete ne.afternoon; } }(ce), ce; }; }(a)(c), i = t.year, n = t.month, o = t.day, p = t.hours, O = t.minutes, P = t.seconds, F = t.milliseconds, z = t.zone, N = /* @__PURE__ */ new Date(), M = o || (i || n ? 1 : N.getDate()), I = i || N.getFullYear(), R = 0; i && !n || (R = n > 0 ? n - 1 : N.getMonth()); var C = p || 0, E = O || 0, A = P || 0, L = F || 0; return z ? new Date(Date.UTC(I, R, M, C, E, A, L + 60 * z.offset * 1e3)) : r ? new Date(Date.UTC(I, R, M, C, E, A, L)) : new Date(I, R, M, C, E, A, L); } catch ($) { return /* @__PURE__ */ new Date(""); } }; return function(v, c, a) { var r = c.prototype, t = r.parse; r.parse = function(i) { var n = i.date, o = i.utc, p = i.args; this.$u = o; var O = p[1]; if (typeof O == "string") { var P = p[2] === !0, F = p[3] === !0, z = P || F, N = p[2]; F && (N = p[2]), P || (m = N ? a.Ls[N] : this.$locale()), this.$d = s(n, O, o), this.init(), N && N !== !0 && (this.$L = this.locale(N).$L), z && n !== this.format(O) && (this.$d = /* @__PURE__ */ new Date("")); } else if (O instanceof Array) for (var M = O.length, I = 1; I <= M; I += 1) { p[1] = O[I - 1]; var R = a.apply(this, p); if (R.isValid()) { this.$d = R.$d, this.$L = R.$L, this.init(); break; } I === M && (this.$d = /* @__PURE__ */ new Date("")); } else t.call(this, i); }; }; }); }, {}], 338: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } (function(m, g) { (typeof _ == "undefined" ? "undefined" : u(_)) == "object" && typeof x != "undefined" ? x.exports = g() : m.dayjs_plugin_utc = g(); })(void 0, function() { return function(m, g, b) { var w = (/* @__PURE__ */ new Date()).getTimezoneOffset(), f = g.prototype; b.utc = function(c) { return new g({ date: c, utc: !0, args: arguments }); }, f.utc = function() { return b(this.toDate(), { locale: this.$L, utc: !0 }); }, f.local = function() { return b(this.toDate(), { locale: this.$L, utc: !1 }); }; var y = f.parse; f.parse = function(c) { c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), y.call(this, c); }; var h = f.init; f.init = function() { if (this.$u) { var c = this.$d; this.$y = c.getUTCFullYear(), this.$M = c.getUTCMonth(), this.$D = c.getUTCDate(), this.$W = c.getUTCDay(), this.$H = c.getUTCHours(), this.$m = c.getUTCMinutes(), this.$s = c.getUTCSeconds(), this.$ms = c.getUTCMilliseconds(); } else h.call(this); }; var l = f.utcOffset; f.utcOffset = function(c, a) { var r = this.$utils().u; if (r(c)) return this.$u ? 0 : r(this.$offset) ? l.call(this) : this.$offset; var t = Math.abs(c) <= 16 ? 60 * c : c, i = this; return a ? (i.$offset = t, i.$u = c === 0, i) : (c !== 0 ? (i = this.local().add(t + w, "minute")).$offset = t : i = this.utc(), i); }; var d = f.format; f.format = function(c) { var a = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : ""); return d.call(this, a); }, f.valueOf = function() { var c = this.$utils().u(this.$offset) ? 0 : this.$offset + w; return this.$d.valueOf() - 6e4 * c; }, f.isUTC = function() { return !!this.$u; }, f.toISOString = function() { return this.toDate().toISOString(); }, f.toString = function() { return this.toDate().toUTCString(); }; var s = f.toDate; f.toDate = function(c) { return c === "s" && this.$offset ? b(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : s.call(this); }; var v = f.diff; f.diff = function(c, a, r) { var t = this.local(), i = b(c).local(); return v.call(t, i, a, r); }; }; }); }, {}], 339: [function(e, x, _) { _.utils = e("./des/utils"), _.Cipher = e("./des/cipher"), _.DES = e("./des/des"), _.CBC = e("./des/cbc"), _.EDE = e("./des/ede"); }, { "./des/cbc": 340, "./des/cipher": 341, "./des/des": 342, "./des/ede": 343, "./des/utils": 344 }], 340: [function(e, x, _) { var u = e("minimalistic-assert"), m = e("inherits"), g = {}; function b(f) { u.equal(f.length, 8, "Invalid IV length"), this.iv = new Array(8); for (var y = 0; y < this.iv.length; y++) this.iv[y] = f[y]; } function w(f) { function y(s) { f.call(this, s), this._cbcInit(); } m(y, f); for (var h = Object.keys(g), l = 0; l < h.length; l++) { var d = h[l]; y.prototype[d] = g[d]; } return y.create = function(v) { return new y(v); }, y; } _.instantiate = w, g._cbcInit = function() { var y = new b(this.options.iv); this._cbcState = y; }, g._update = function(y, h, l, d) { var s = this._cbcState, v = this.constructor.super_.prototype, c = s.iv; if (this.type === "encrypt") { for (var a = 0; a < this.blockSize; a++) c[a] ^= y[h + a]; v._update.call(this, c, 0, l, d); for (var a = 0; a < this.blockSize; a++) c[a] = l[d + a]; } else { v._update.call(this, y, h, l, d); for (var a = 0; a < this.blockSize; a++) l[d + a] ^= c[a]; for (var a = 0; a < this.blockSize; a++) c[a] = y[h + a]; } }; }, { inherits: 387, "minimalistic-assert": 437 }], 341: [function(e, x, _) { var u = e("minimalistic-assert"); function m(g) { this.options = g, this.type = this.options.type, this.blockSize = 8, this._init(), this.buffer = new Array(this.blockSize), this.bufferOff = 0; } x.exports = m, m.prototype._init = function() { }, m.prototype.update = function(b) { return b.length === 0 ? [] : this.type === "decrypt" ? this._updateDecrypt(b) : this._updateEncrypt(b); }, m.prototype._buffer = function(b, w) { for (var f = Math.min(this.buffer.length - this.bufferOff, b.length - w), y = 0; y < f; y++) this.buffer[this.bufferOff + y] = b[w + y]; return this.bufferOff += f, f; }, m.prototype._flushBuffer = function(b, w) { return this._update(this.buffer, 0, b, w), this.bufferOff = 0, this.blockSize; }, m.prototype._updateEncrypt = function(b) { var w = 0, f = 0, y = (this.bufferOff + b.length) / this.blockSize | 0, h = new Array(y * this.blockSize); this.bufferOff !== 0 && (w += this._buffer(b, w), this.bufferOff === this.buffer.length && (f += this._flushBuffer(h, f))); for (var l = b.length - (b.length - w) % this.blockSize; w < l; w += this.blockSize) this._update(b, w, h, f), f += this.blockSize; for (; w < b.length; w++, this.bufferOff++) this.buffer[this.bufferOff] = b[w]; return h; }, m.prototype._updateDecrypt = function(b) { for (var w = 0, f = 0, y = Math.ceil((this.bufferOff + b.length) / this.blockSize) - 1, h = new Array(y * this.blockSize); y > 0; y--) w += this._buffer(b, w), f += this._flushBuffer(h, f); return w += this._buffer(b, w), h; }, m.prototype.final = function(b) { var w; b && (w = this.update(b)); var f; return this.type === "encrypt" ? f = this._finalEncrypt() : f = this._finalDecrypt(), w ? w.concat(f) : f; }, m.prototype._pad = function(b, w) { if (w === 0) return !1; for (; w < b.length; ) b[w++] = 0; return !0; }, m.prototype._finalEncrypt = function() { if (!this._pad(this.buffer, this.bufferOff)) return []; var b = new Array(this.blockSize); return this._update(this.buffer, 0, b, 0), b; }, m.prototype._unpad = function(b) { return b; }, m.prototype._finalDecrypt = function() { u.equal(this.bufferOff, this.blockSize, "Not enough data to decrypt"); var b = new Array(this.blockSize); return this._flushBuffer(b, 0), this._unpad(b); }; }, { "minimalistic-assert": 437 }], 342: [function(e, x, _) { var u = e("minimalistic-assert"), m = e("inherits"), g = e("./utils"), b = e("./cipher"); function w() { this.tmp = new Array(2), this.keys = null; } function f(h) { b.call(this, h); var l = new w(); this._desState = l, this.deriveKeys(l, h.key); } m(f, b), x.exports = f, f.create = function(l) { return new f(l); }; var y = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]; f.prototype.deriveKeys = function(l, d) { l.keys = new Array(16 * 2), u.equal(d.length, this.blockSize, "Invalid key length"); var s = g.readUInt32BE(d, 0), v = g.readUInt32BE(d, 4); g.pc1(s, v, l.tmp, 0), s = l.tmp[0], v = l.tmp[1]; for (var c = 0; c < l.keys.length; c += 2) { var a = y[c >>> 1]; s = g.r28shl(s, a), v = g.r28shl(v, a), g.pc2(s, v, l.keys, c); } }, f.prototype._update = function(l, d, s, v) { var c = this._desState, a = g.readUInt32BE(l, d), r = g.readUInt32BE(l, d + 4); g.ip(a, r, c.tmp, 0), a = c.tmp[0], r = c.tmp[1], this.type === "encrypt" ? this._encrypt(c, a, r, c.tmp, 0) : this._decrypt(c, a, r, c.tmp, 0), a = c.tmp[0], r = c.tmp[1], g.writeUInt32BE(s, a, v), g.writeUInt32BE(s, r, v + 4); }, f.prototype._pad = function(l, d) { for (var s = l.length - d, v = d; v < l.length; v++) l[v] = s; return !0; }, f.prototype._unpad = function(l) { for (var d = l[l.length - 1], s = l.length - d; s < l.length; s++) u.equal(l[s], d); return l.slice(0, l.length - d); }, f.prototype._encrypt = function(l, d, s, v, c) { for (var a = d, r = s, t = 0; t < l.keys.length; t += 2) { var i = l.keys[t], n = l.keys[t + 1]; g.expand(r, l.tmp, 0), i ^= l.tmp[0], n ^= l.tmp[1]; var o = g.substitute(i, n), p = g.permute(o), O = r; r = (a ^ p) >>> 0, a = O; } g.rip(r, a, v, c); }, f.prototype._decrypt = function(l, d, s, v, c) { for (var a = s, r = d, t = l.keys.length - 2; t >= 0; t -= 2) { var i = l.keys[t], n = l.keys[t + 1]; g.expand(a, l.tmp, 0), i ^= l.tmp[0], n ^= l.tmp[1]; var o = g.substitute(i, n), p = g.permute(o), O = a; a = (r ^ p) >>> 0, r = O; } g.rip(a, r, v, c); }; }, { "./cipher": 341, "./utils": 344, inherits: 387, "minimalistic-assert": 437 }], 343: [function(e, x, _) { var u = e("minimalistic-assert"), m = e("inherits"), g = e("./cipher"), b = e("./des"); function w(y, h) { u.equal(h.length, 24, "Invalid key length"); var l = h.slice(0, 8), d = h.slice(8, 16), s = h.slice(16, 24); y === "encrypt" ? this.ciphers = [b.create({ type: "encrypt", key: l }), b.create({ type: "decrypt", key: d }), b.create({ type: "encrypt", key: s })] : this.ciphers = [b.create({ type: "decrypt", key: s }), b.create({ type: "encrypt", key: d }), b.create({ type: "decrypt", key: l })]; } function f(y) { g.call(this, y); var h = new w(this.type, this.options.key); this._edeState = h; } m(f, g), x.exports = f, f.create = function(h) { return new f(h); }, f.prototype._update = function(h, l, d, s) { var v = this._edeState; v.ciphers[0]._update(h, l, d, s), v.ciphers[1]._update(d, s, d, s), v.ciphers[2]._update(d, s, d, s); }, f.prototype._pad = b.prototype._pad, f.prototype._unpad = b.prototype._unpad; }, { "./cipher": 341, "./des": 342, inherits: 387, "minimalistic-assert": 437 }], 344: [function(e, x, _) { _.readUInt32BE = function(w, f) { var y = w[0 + f] << 24 | w[1 + f] << 16 | w[2 + f] << 8 | w[3 + f]; return y >>> 0; }, _.writeUInt32BE = function(w, f, y) { w[0 + y] = f >>> 24, w[1 + y] = f >>> 16 & 255, w[2 + y] = f >>> 8 & 255, w[3 + y] = f & 255; }, _.ip = function(w, f, y, h) { for (var l = 0, d = 0, s = 6; s >= 0; s -= 2) { for (var v = 0; v <= 24; v += 8) l <<= 1, l |= f >>> v + s & 1; for (var v = 0; v <= 24; v += 8) l <<= 1, l |= w >>> v + s & 1; } for (var s = 6; s >= 0; s -= 2) { for (var v = 1; v <= 25; v += 8) d <<= 1, d |= f >>> v + s & 1; for (var v = 1; v <= 25; v += 8) d <<= 1, d |= w >>> v + s & 1; } y[h + 0] = l >>> 0, y[h + 1] = d >>> 0; }, _.rip = function(w, f, y, h) { for (var l = 0, d = 0, s = 0; s < 4; s++) for (var v = 24; v >= 0; v -= 8) l <<= 1, l |= f >>> v + s & 1, l <<= 1, l |= w >>> v + s & 1; for (var s = 4; s < 8; s++) for (var v = 24; v >= 0; v -= 8) d <<= 1, d |= f >>> v + s & 1, d <<= 1, d |= w >>> v + s & 1; y[h + 0] = l >>> 0, y[h + 1] = d >>> 0; }, _.pc1 = function(w, f, y, h) { for (var l = 0, d = 0, s = 7; s >= 5; s--) { for (var v = 0; v <= 24; v += 8) l <<= 1, l |= f >> v + s & 1; for (var v = 0; v <= 24; v += 8) l <<= 1, l |= w >> v + s & 1; } for (var v = 0; v <= 24; v += 8) l <<= 1, l |= f >> v + s & 1; for (var s = 1; s <= 3; s++) { for (var v = 0; v <= 24; v += 8) d <<= 1, d |= f >> v + s & 1; for (var v = 0; v <= 24; v += 8) d <<= 1, d |= w >> v + s & 1; } for (var v = 0; v <= 24; v += 8) d <<= 1, d |= w >> v + s & 1; y[h + 0] = l >>> 0, y[h + 1] = d >>> 0; }, _.r28shl = function(w, f) { return w << f & 268435455 | w >>> 28 - f; }; var u = [ // inL => outL 14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, 12, 21, 1, 8, 15, 26, // inR => outR 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24 ]; _.pc2 = function(w, f, y, h) { for (var l = 0, d = 0, s = u.length >>> 1, v = 0; v < s; v++) l <<= 1, l |= w >>> u[v] & 1; for (var v = s; v < u.length; v++) d <<= 1, d |= f >>> u[v] & 1; y[h + 0] = l >>> 0, y[h + 1] = d >>> 0; }, _.expand = function(w, f, y) { var h = 0, l = 0; h = (w & 1) << 5 | w >>> 27; for (var d = 23; d >= 15; d -= 4) h <<= 6, h |= w >>> d & 63; for (var d = 11; d >= 3; d -= 4) l |= w >>> d & 63, l <<= 6; l |= (w & 31) << 1 | w >>> 31, f[y + 0] = h >>> 0, f[y + 1] = l >>> 0; }; var m = [14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11]; _.substitute = function(w, f) { for (var y = 0, h = 0; h < 4; h++) { var l = w >>> 18 - h * 6 & 63, d = m[h * 64 + l]; y <<= 4, y |= d; } for (var h = 0; h < 4; h++) { var l = f >>> 18 - h * 6 & 63, d = m[4 * 64 + h * 64 + l]; y <<= 4, y |= d; } return y >>> 0; }; var g = [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7]; _.permute = function(w) { for (var f = 0, y = 0; y < g.length; y++) f <<= 1, f |= w >>> g[y] & 1; return f >>> 0; }, _.padSplit = function(w, f, y) { for (var h = w.toString(2); h.length < f; ) h = "0" + h; for (var l = [], d = 0; d < f; d += y) l.push(h.slice(d, d + y)); return l.join(" "); }; }, {}], 345: [function(e, x, _) { (function(u) { var m = e("./lib/generatePrime"), g = e("./lib/primes.json"), b = e("./lib/dh"); function w(h) { var l = new u(g[h].prime, "hex"), d = new u(g[h].gen, "hex"); return new b(l, d); } var f = { binary: !0, hex: !0, base64: !0 }; function y(h, l, d, s) { return u.isBuffer(l) || f[l] === void 0 ? y(h, "binary", l, d) : (l = l || "binary", s = s || "binary", d = d || new u([2]), u.isBuffer(d) || (d = new u(d, s)), typeof h == "number" ? new b(m(h, d), d, !0) : (u.isBuffer(h) || (h = new u(h, l)), new b(h, d, !0))); } _.DiffieHellmanGroup = _.createDiffieHellmanGroup = _.getDiffieHellman = w, _.createDiffieHellman = _.DiffieHellman = y; }).call(this, e("buffer").Buffer); }, { "./lib/dh": 346, "./lib/generatePrime": 347, "./lib/primes.json": 348, buffer: 216 }], 346: [function(e, x, _) { (function(u) { var m = e("bn.js"), g = e("miller-rabin"), b = new g(), w = new m(24), f = new m(11), y = new m(10), h = new m(3), l = new m(7), d = e("./generatePrime"), s = e("randombytes"); x.exports = t; function v(n, o) { return o = o || "utf8", u.isBuffer(n) || (n = new u(n, o)), this._pub = new m(n), this; } function c(n, o) { return o = o || "utf8", u.isBuffer(n) || (n = new u(n, o)), this._priv = new m(n), this; } var a = {}; function r(n, o) { var p = o.toString("hex"), O = [p, n.toString(16)].join("_"); if (O in a) return a[O]; var P = 0; if (n.isEven() || !d.simpleSieve || !d.fermatTest(n) || !b.test(n)) return P += 1, p === "02" || p === "05" ? P += 8 : P += 4, a[O] = P, P; b.test(n.shrn(1)) || (P += 2); var F; switch (p) { case "02": n.mod(w).cmp(f) && (P += 8); break; case "05": F = n.mod(y), F.cmp(h) && F.cmp(l) && (P += 8); break; default: P += 4; } return a[O] = P, P; } function t(n, o, p) { this.setGenerator(o), this.__prime = new m(n), this._prime = m.mont(this.__prime), this._primeLen = n.length, this._pub = void 0, this._priv = void 0, this._primeCode = void 0, p ? (this.setPublicKey = v, this.setPrivateKey = c) : this._primeCode = 8; } Object.defineProperty(t.prototype, "verifyError", { enumerable: !0, get: function() { return typeof this._primeCode != "number" && (this._primeCode = r(this.__prime, this.__gen)), this._primeCode; } }), t.prototype.generateKeys = function() { return this._priv || (this._priv = new m(s(this._primeLen))), this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(), this.getPublicKey(); }, t.prototype.computeSecret = function(n) { n = new m(n), n = n.toRed(this._prime); var o = n.redPow(this._priv).fromRed(), p = new u(o.toArray()), O = this.getPrime(); if (p.length < O.length) { var P = new u(O.length - p.length); P.fill(0), p = u.concat([P, p]); } return p; }, t.prototype.getPublicKey = function(o) { return i(this._pub, o); }, t.prototype.getPrivateKey = function(o) { return i(this._priv, o); }, t.prototype.getPrime = function(n) { return i(this.__prime, n); }, t.prototype.getGenerator = function(n) { return i(this._gen, n); }, t.prototype.setGenerator = function(n, o) { return o = o || "utf8", u.isBuffer(n) || (n = new u(n, o)), this.__gen = n, this._gen = new m(n), this; }; function i(n, o) { var p = new u(n.toArray()); return o ? p.toString(o) : p; } }).call(this, e("buffer").Buffer); }, { "./generatePrime": 347, "bn.js": 349, buffer: 216, "miller-rabin": 435, randombytes: 475 }], 347: [function(e, x, _) { var u = e("randombytes"); x.exports = i, i.simpleSieve = r, i.fermatTest = t; var m = e("bn.js"), g = new m(24), b = e("miller-rabin"), w = new b(), f = new m(1), y = new m(2), h = new m(5); new m(16), new m(8); var l = new m(10), d = new m(3); new m(7); var s = new m(11), v = new m(4); new m(12); var c = null; function a() { if (c !== null) return c; var n = 1048576, o = []; o[0] = 2; for (var p = 1, O = 3; O < n; O += 2) { for (var P = Math.ceil(Math.sqrt(O)), F = 0; F < p && o[F] <= P && O % o[F] !== 0; F++) ; p !== F && o[F] <= P || (o[p++] = O); } return c = o, o; } function r(n) { for (var o = a(), p = 0; p < o.length; p++) if (n.modn(o[p]) === 0) return n.cmpn(o[p]) === 0; return !0; } function t(n) { var o = m.mont(n); return y.toRed(o).redPow(n.subn(1)).fromRed().cmpn(1) === 0; } function i(n, o) { if (n < 16) return o === 2 || o === 5 ? new m([140, 123]) : new m([140, 39]); o = new m(o); for (var p, O; ; ) { for (p = new m(u(Math.ceil(n / 8))); p.bitLength() > n; ) p.ishrn(1); if (p.isEven() && p.iadd(f), p.testn(1) || p.iadd(y), o.cmp(y)) { if (!o.cmp(h)) for (; p.mod(l).cmp(d); ) p.iadd(v); } else for (; p.mod(g).cmp(s); ) p.iadd(v); if (O = p.shrn(1), r(O) && r(p) && t(O) && t(p) && w.test(O) && w.test(p)) return p; } } }, { "bn.js": 349, "miller-rabin": 435, randombytes: 475 }], 348: [function(e, x, _) { x.exports = { modp1: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff" }, modp2: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff" }, modp5: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" }, modp14: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff" }, modp15: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff" }, modp16: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff" }, modp17: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff" }, modp18: { gen: "02", prime: "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" } }; }, {}], 349: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 350: [function(e, x, _) { var u = _; u.version = e("../package.json").version, u.utils = e("./elliptic/utils"), u.rand = e("brorand"), u.curve = e("./elliptic/curve"), u.curves = e("./elliptic/curves"), u.ec = e("./elliptic/ec"), u.eddsa = e("./elliptic/eddsa"); }, { "../package.json": 366, "./elliptic/curve": 353, "./elliptic/curves": 356, "./elliptic/ec": 357, "./elliptic/eddsa": 360, "./elliptic/utils": 364, brorand: 184 }], 351: [function(e, x, _) { var u = e("bn.js"), m = e("../utils"), g = m.getNAF, b = m.getJSF, w = m.assert; function f(h, l) { this.type = h, this.p = new u(l.p, 16), this.red = l.prime ? u.red(l.prime) : u.mont(this.p), this.zero = new u(0).toRed(this.red), this.one = new u(1).toRed(this.red), this.two = new u(2).toRed(this.red), this.n = l.n && new u(l.n, 16), this.g = l.g && this.pointFromJSON(l.g, l.gRed), this._wnafT1 = new Array(4), this._wnafT2 = new Array(4), this._wnafT3 = new Array(4), this._wnafT4 = new Array(4), this._bitLength = this.n ? this.n.bitLength() : 0; var d = this.n && this.p.div(this.n); !d || d.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red)); } x.exports = f, f.prototype.point = function() { throw new Error("Not implemented"); }, f.prototype.validate = function() { throw new Error("Not implemented"); }, f.prototype._fixedNafMul = function(l, d) { w(l.precomputed); var s = l._getDoubles(), v = g(d, 1, this._bitLength), c = (1 << s.step + 1) - (s.step % 2 === 0 ? 2 : 1); c /= 3; for (var a = [], r = 0; r < v.length; r += s.step) { for (var t = 0, d = r + s.step - 1; d >= r; d--) t = (t << 1) + v[d]; a.push(t); } for (var i = this.jpoint(null, null, null), n = this.jpoint(null, null, null), o = c; o > 0; o--) { for (var r = 0; r < a.length; r++) { var t = a[r]; t === o ? n = n.mixedAdd(s.points[r]) : t === -o && (n = n.mixedAdd(s.points[r].neg())); } i = i.add(n); } return i.toP(); }, f.prototype._wnafMul = function(l, d) { var s = 4, v = l._getNAFPoints(s); s = v.wnd; for (var c = v.points, a = g(d, s, this._bitLength), r = this.jpoint(null, null, null), t = a.length - 1; t >= 0; t--) { for (var d = 0; t >= 0 && a[t] === 0; t--) d++; if (t >= 0 && d++, r = r.dblp(d), t < 0) break; var i = a[t]; w(i !== 0), l.type === "affine" ? i > 0 ? r = r.mixedAdd(c[i - 1 >> 1]) : r = r.mixedAdd(c[-i - 1 >> 1].neg()) : i > 0 ? r = r.add(c[i - 1 >> 1]) : r = r.add(c[-i - 1 >> 1].neg()); } return l.type === "affine" ? r.toP() : r; }, f.prototype._wnafMulAdd = function(l, d, s, v, c) { for (var a = this._wnafT1, r = this._wnafT2, t = this._wnafT3, i = 0, n = 0; n < v; n++) { var o = d[n], p = o._getNAFPoints(l); a[n] = p.wnd, r[n] = p.points; } for (var n = v - 1; n >= 1; n -= 2) { var O = n - 1, P = n; if (a[O] !== 1 || a[P] !== 1) { t[O] = g(s[O], a[O], this._bitLength), t[P] = g(s[P], a[P], this._bitLength), i = Math.max(t[O].length, i), i = Math.max(t[P].length, i); continue; } var F = [ d[O], /* 1 */ null, /* 3 */ null, /* 5 */ d[P] /* 7 */ ]; d[O].y.cmp(d[P].y) === 0 ? (F[1] = d[O].add(d[P]), F[2] = d[O].toJ().mixedAdd(d[P].neg())) : d[O].y.cmp(d[P].y.redNeg()) === 0 ? (F[1] = d[O].toJ().mixedAdd(d[P]), F[2] = d[O].add(d[P].neg())) : (F[1] = d[O].toJ().mixedAdd(d[P]), F[2] = d[O].toJ().mixedAdd(d[P].neg())); var z = [ -3, /* -1 -1 */ -1, /* -1 0 */ -5, /* -1 1 */ -7, /* 0 -1 */ 0, /* 0 0 */ 7, /* 0 1 */ 5, /* 1 -1 */ 1, /* 1 0 */ 3 /* 1 1 */ ], N = b(s[O], s[P]); i = Math.max(N[0].length, i), t[O] = new Array(i), t[P] = new Array(i); for (var M = 0; M < i; M++) { var I = N[0][M] | 0, R = N[1][M] | 0; t[O][M] = z[(I + 1) * 3 + (R + 1)], t[P][M] = 0, r[O] = F; } } for (var C = this.jpoint(null, null, null), E = this._wnafT4, n = i; n >= 0; n--) { for (var A = 0; n >= 0; ) { for (var L = !0, M = 0; M < v; M++) E[M] = t[M][n] | 0, E[M] !== 0 && (L = !1); if (!L) break; A++, n--; } if (n >= 0 && A++, C = C.dblp(A), n < 0) break; for (var M = 0; M < v; M++) { var $ = E[M], o; $ !== 0 && ($ > 0 ? o = r[M][$ - 1 >> 1] : $ < 0 && (o = r[M][-$ - 1 >> 1].neg()), o.type === "affine" ? C = C.mixedAdd(o) : C = C.add(o)); } } for (var n = 0; n < v; n++) r[n] = null; return c ? C : C.toP(); }; function y(h, l) { this.curve = h, this.type = l, this.precomputed = null; } f.BasePoint = y, y.prototype.eq = function() { throw new Error("Not implemented"); }, y.prototype.validate = function() { return this.curve.validate(this); }, f.prototype.decodePoint = function(l, d) { l = m.toArray(l, d); var s = this.p.byteLength(); if ((l[0] === 4 || l[0] === 6 || l[0] === 7) && l.length - 1 === 2 * s) { l[0] === 6 ? w(l[l.length - 1] % 2 === 0) : l[0] === 7 && w(l[l.length - 1] % 2 === 1); var v = this.point(l.slice(1, 1 + s), l.slice(1 + s, 1 + 2 * s)); return v; } else if ((l[0] === 2 || l[0] === 3) && l.length - 1 === s) return this.pointFromX(l.slice(1, 1 + s), l[0] === 3); throw new Error("Unknown point format"); }, y.prototype.encodeCompressed = function(l) { return this.encode(l, !0); }, y.prototype._encode = function(l) { var d = this.curve.p.byteLength(), s = this.getX().toArray("be", d); return l ? [this.getY().isEven() ? 2 : 3].concat(s) : [4].concat(s, this.getY().toArray("be", d)); }, y.prototype.encode = function(l, d) { return m.encode(this._encode(d), l); }, y.prototype.precompute = function(l) { if (this.precomputed) return this; var d = { doubles: null, naf: null, beta: null }; return d.naf = this._getNAFPoints(8), d.doubles = this._getDoubles(4, l), d.beta = this._getBeta(), this.precomputed = d, this; }, y.prototype._hasDoubles = function(l) { if (!this.precomputed) return !1; var d = this.precomputed.doubles; return d ? d.points.length >= Math.ceil((l.bitLength() + 1) / d.step) : !1; }, y.prototype._getDoubles = function(l, d) { if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; for (var s = [this], v = this, c = 0; c < d; c += l) { for (var a = 0; a < l; a++) v = v.dbl(); s.push(v); } return { step: l, points: s }; }, y.prototype._getNAFPoints = function(l) { if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; for (var d = [this], s = (1 << l) - 1, v = s === 1 ? null : this.dbl(), c = 1; c < s; c++) d[c] = d[c - 1].add(v); return { wnd: l, points: d }; }, y.prototype._getBeta = function() { return null; }, y.prototype.dblp = function(l) { for (var d = this, s = 0; s < l; s++) d = d.dbl(); return d; }; }, { "../utils": 364, "bn.js": 365 }], 352: [function(e, x, _) { var u = e("../utils"), m = e("bn.js"), g = e("inherits"), b = e("./base"), w = u.assert; function f(h) { this.twisted = (h.a | 0) !== 1, this.mOneA = this.twisted && (h.a | 0) === -1, this.extended = this.mOneA, b.call(this, "edwards", h), this.a = new m(h.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new m(h.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new m(h.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), w(!this.twisted || this.c.fromRed().cmpn(1) === 0), this.oneC = (h.c | 0) === 1; } g(f, b), x.exports = f, f.prototype._mulA = function(l) { return this.mOneA ? l.redNeg() : this.a.redMul(l); }, f.prototype._mulC = function(l) { return this.oneC ? l : this.c.redMul(l); }, f.prototype.jpoint = function(l, d, s, v) { return this.point(l, d, s, v); }, f.prototype.pointFromX = function(l, d) { l = new m(l, 16), l.red || (l = l.toRed(this.red)); var s = l.redSqr(), v = this.c2.redSub(this.a.redMul(s)), c = this.one.redSub(this.c2.redMul(this.d).redMul(s)), a = v.redMul(c.redInvm()), r = a.redSqrt(); if (r.redSqr().redSub(a).cmp(this.zero) !== 0) throw new Error("invalid point"); var t = r.fromRed().isOdd(); return (d && !t || !d && t) && (r = r.redNeg()), this.point(l, r); }, f.prototype.pointFromY = function(l, d) { l = new m(l, 16), l.red || (l = l.toRed(this.red)); var s = l.redSqr(), v = s.redSub(this.c2), c = s.redMul(this.d).redMul(this.c2).redSub(this.a), a = v.redMul(c.redInvm()); if (a.cmp(this.zero) === 0) { if (d) throw new Error("invalid point"); return this.point(this.zero, l); } var r = a.redSqrt(); if (r.redSqr().redSub(a).cmp(this.zero) !== 0) throw new Error("invalid point"); return r.fromRed().isOdd() !== d && (r = r.redNeg()), this.point(r, l); }, f.prototype.validate = function(l) { if (l.isInfinity()) return !0; l.normalize(); var d = l.x.redSqr(), s = l.y.redSqr(), v = d.redMul(this.a).redAdd(s), c = this.c2.redMul(this.one.redAdd(this.d.redMul(d).redMul(s))); return v.cmp(c) === 0; }; function y(h, l, d, s, v) { b.BasePoint.call(this, h, "projective"), l === null && d === null && s === null ? (this.x = this.curve.zero, this.y = this.curve.one, this.z = this.curve.one, this.t = this.curve.zero, this.zOne = !0) : (this.x = new m(l, 16), this.y = new m(d, 16), this.z = s ? new m(s, 16) : this.curve.one, this.t = v && new m(v, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), this.zOne = this.z === this.curve.one, this.curve.extended && !this.t && (this.t = this.x.redMul(this.y), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))); } g(y, b.BasePoint), f.prototype.pointFromJSON = function(l) { return y.fromJSON(this, l); }, f.prototype.point = function(l, d, s, v) { return new y(this, l, d, s, v); }, y.fromJSON = function(l, d) { return new y(l, d[0], d[1], d[2]); }, y.prototype.inspect = function() { return this.isInfinity() ? "" : ""; }, y.prototype.isInfinity = function() { return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0); }, y.prototype._extDbl = function() { var l = this.x.redSqr(), d = this.y.redSqr(), s = this.z.redSqr(); s = s.redIAdd(s); var v = this.curve._mulA(l), c = this.x.redAdd(this.y).redSqr().redISub(l).redISub(d), a = v.redAdd(d), r = a.redSub(s), t = v.redSub(d), i = c.redMul(r), n = a.redMul(t), o = c.redMul(t), p = r.redMul(a); return this.curve.point(i, n, p, o); }, y.prototype._projDbl = function() { var l = this.x.redAdd(this.y).redSqr(), d = this.x.redSqr(), s = this.y.redSqr(), v, c, a; if (this.curve.twisted) { var r = this.curve._mulA(d), t = r.redAdd(s); if (this.zOne) v = l.redSub(d).redSub(s).redMul(t.redSub(this.curve.two)), c = t.redMul(r.redSub(s)), a = t.redSqr().redSub(t).redSub(t); else { var i = this.z.redSqr(), n = t.redSub(i).redISub(i); v = l.redSub(d).redISub(s).redMul(n), c = t.redMul(r.redSub(s)), a = t.redMul(n); } } else { var r = d.redAdd(s), i = this.curve._mulC(this.z).redSqr(), n = r.redSub(i).redSub(i); v = this.curve._mulC(l.redISub(r)).redMul(n), c = this.curve._mulC(r).redMul(d.redISub(s)), a = r.redMul(n); } return this.curve.point(v, c, a); }, y.prototype.dbl = function() { return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl(); }, y.prototype._extAdd = function(l) { var d = this.y.redSub(this.x).redMul(l.y.redSub(l.x)), s = this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)), v = this.t.redMul(this.curve.dd).redMul(l.t), c = this.z.redMul(l.z.redAdd(l.z)), a = s.redSub(d), r = c.redSub(v), t = c.redAdd(v), i = s.redAdd(d), n = a.redMul(r), o = t.redMul(i), p = a.redMul(i), O = r.redMul(t); return this.curve.point(n, o, O, p); }, y.prototype._projAdd = function(l) { var d = this.z.redMul(l.z), s = d.redSqr(), v = this.x.redMul(l.x), c = this.y.redMul(l.y), a = this.curve.d.redMul(v).redMul(c), r = s.redSub(a), t = s.redAdd(a), i = this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(v).redISub(c), n = d.redMul(r).redMul(i), o, p; return this.curve.twisted ? (o = d.redMul(t).redMul(c.redSub(this.curve._mulA(v))), p = r.redMul(t)) : (o = d.redMul(t).redMul(c.redSub(v)), p = this.curve._mulC(r).redMul(t)), this.curve.point(n, o, p); }, y.prototype.add = function(l) { return this.isInfinity() ? l : l.isInfinity() ? this : this.curve.extended ? this._extAdd(l) : this._projAdd(l); }, y.prototype.mul = function(l) { return this._hasDoubles(l) ? this.curve._fixedNafMul(this, l) : this.curve._wnafMul(this, l); }, y.prototype.mulAdd = function(l, d, s) { return this.curve._wnafMulAdd(1, [this, d], [l, s], 2, !1); }, y.prototype.jmulAdd = function(l, d, s) { return this.curve._wnafMulAdd(1, [this, d], [l, s], 2, !0); }, y.prototype.normalize = function() { if (this.zOne) return this; var l = this.z.redInvm(); return this.x = this.x.redMul(l), this.y = this.y.redMul(l), this.t && (this.t = this.t.redMul(l)), this.z = this.curve.one, this.zOne = !0, this; }, y.prototype.neg = function() { return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()); }, y.prototype.getX = function() { return this.normalize(), this.x.fromRed(); }, y.prototype.getY = function() { return this.normalize(), this.y.fromRed(); }, y.prototype.eq = function(l) { return this === l || this.getX().cmp(l.getX()) === 0 && this.getY().cmp(l.getY()) === 0; }, y.prototype.eqXToP = function(l) { var d = l.toRed(this.curve.red).redMul(this.z); if (this.x.cmp(d) === 0) return !0; for (var s = l.clone(), v = this.curve.redN.redMul(this.z); ; ) { if (s.iadd(this.curve.n), s.cmp(this.curve.p) >= 0) return !1; if (d.redIAdd(v), this.x.cmp(d) === 0) return !0; } }, y.prototype.toP = y.prototype.normalize, y.prototype.mixedAdd = y.prototype.add; }, { "../utils": 364, "./base": 351, "bn.js": 365, inherits: 387 }], 353: [function(e, x, _) { var u = _; u.base = e("./base"), u.short = e("./short"), u.mont = e("./mont"), u.edwards = e("./edwards"); }, { "./base": 351, "./edwards": 352, "./mont": 354, "./short": 355 }], 354: [function(e, x, _) { var u = e("bn.js"), m = e("inherits"), g = e("./base"), b = e("../utils"); function w(y) { g.call(this, "mont", y), this.a = new u(y.a, 16).toRed(this.red), this.b = new u(y.b, 16).toRed(this.red), this.i4 = new u(4).toRed(this.red).redInvm(), this.two = new u(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two)); } m(w, g), x.exports = w, w.prototype.validate = function(h) { var l = h.normalize().x, d = l.redSqr(), s = d.redMul(l).redAdd(d.redMul(this.a)).redAdd(l), v = s.redSqrt(); return v.redSqr().cmp(s) === 0; }; function f(y, h, l) { g.BasePoint.call(this, y, "projective"), h === null && l === null ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new u(h, 16), this.z = new u(l, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red))); } m(f, g.BasePoint), w.prototype.decodePoint = function(h, l) { return this.point(b.toArray(h, l), 1); }, w.prototype.point = function(h, l) { return new f(this, h, l); }, w.prototype.pointFromJSON = function(h) { return f.fromJSON(this, h); }, f.prototype.precompute = function() { }, f.prototype._encode = function() { return this.getX().toArray("be", this.curve.p.byteLength()); }, f.fromJSON = function(h, l) { return new f(h, l[0], l[1] || h.one); }, f.prototype.inspect = function() { return this.isInfinity() ? "" : ""; }, f.prototype.isInfinity = function() { return this.z.cmpn(0) === 0; }, f.prototype.dbl = function() { var h = this.x.redAdd(this.z), l = h.redSqr(), d = this.x.redSub(this.z), s = d.redSqr(), v = l.redSub(s), c = l.redMul(s), a = v.redMul(s.redAdd(this.curve.a24.redMul(v))); return this.curve.point(c, a); }, f.prototype.add = function() { throw new Error("Not supported on Montgomery curve"); }, f.prototype.diffAdd = function(h, l) { var d = this.x.redAdd(this.z), s = this.x.redSub(this.z), v = h.x.redAdd(h.z), c = h.x.redSub(h.z), a = c.redMul(d), r = v.redMul(s), t = l.z.redMul(a.redAdd(r).redSqr()), i = l.x.redMul(a.redISub(r).redSqr()); return this.curve.point(t, i); }, f.prototype.mul = function(h) { for (var l = h.clone(), d = this, s = this.curve.point(null, null), v = this, c = []; l.cmpn(0) !== 0; l.iushrn(1)) c.push(l.andln(1)); for (var a = c.length - 1; a >= 0; a--) c[a] === 0 ? (d = d.diffAdd(s, v), s = s.dbl()) : (s = d.diffAdd(s, v), d = d.dbl()); return s; }, f.prototype.mulAdd = function() { throw new Error("Not supported on Montgomery curve"); }, f.prototype.jumlAdd = function() { throw new Error("Not supported on Montgomery curve"); }, f.prototype.eq = function(h) { return this.getX().cmp(h.getX()) === 0; }, f.prototype.normalize = function() { return this.x = this.x.redMul(this.z.redInvm()), this.z = this.curve.one, this; }, f.prototype.getX = function() { return this.normalize(), this.x.fromRed(); }; }, { "../utils": 364, "./base": 351, "bn.js": 365, inherits: 387 }], 355: [function(e, x, _) { var u = e("../utils"), m = e("bn.js"), g = e("inherits"), b = e("./base"), w = u.assert; function f(l) { b.call(this, "short", l), this.a = new m(l.a, 16).toRed(this.red), this.b = new m(l.b, 16).toRed(this.red), this.tinv = this.two.redInvm(), this.zeroA = this.a.fromRed().cmpn(0) === 0, this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0, this.endo = this._getEndomorphism(l), this._endoWnafT1 = new Array(4), this._endoWnafT2 = new Array(4); } g(f, b), x.exports = f, f.prototype._getEndomorphism = function(d) { if (!(!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)) { var s, v; if (d.beta) s = new m(d.beta, 16).toRed(this.red); else { var c = this._getEndoRoots(this.p); s = c[0].cmp(c[1]) < 0 ? c[0] : c[1], s = s.toRed(this.red); } if (d.lambda) v = new m(d.lambda, 16); else { var a = this._getEndoRoots(this.n); this.g.mul(a[0]).x.cmp(this.g.x.redMul(s)) === 0 ? v = a[0] : (v = a[1], w(this.g.mul(v).x.cmp(this.g.x.redMul(s)) === 0)); } var r; return d.basis ? r = d.basis.map(function(t) { return { a: new m(t.a, 16), b: new m(t.b, 16) }; }) : r = this._getEndoBasis(v), { beta: s, lambda: v, basis: r }; } }, f.prototype._getEndoRoots = function(d) { var s = d === this.p ? this.red : m.mont(d), v = new m(2).toRed(s).redInvm(), c = v.redNeg(), a = new m(3).toRed(s).redNeg().redSqrt().redMul(v), r = c.redAdd(a).fromRed(), t = c.redSub(a).fromRed(); return [r, t]; }, f.prototype._getEndoBasis = function(d) { for (var s = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), v = d, c = this.n.clone(), a = new m(1), r = new m(0), t = new m(0), i = new m(1), n, o, p, O, P, F, z, N = 0, M, I; v.cmpn(0) !== 0; ) { var R = c.div(v); M = c.sub(R.mul(v)), I = t.sub(R.mul(a)); var C = i.sub(R.mul(r)); if (!p && M.cmp(s) < 0) n = z.neg(), o = a, p = M.neg(), O = I; else if (p && ++N === 2) break; z = M, c = v, v = M, t = a, a = I, i = r, r = C; } P = M.neg(), F = I; var E = p.sqr().add(O.sqr()), A = P.sqr().add(F.sqr()); return A.cmp(E) >= 0 && (P = n, F = o), p.negative && (p = p.neg(), O = O.neg()), P.negative && (P = P.neg(), F = F.neg()), [{ a: p, b: O }, { a: P, b: F }]; }, f.prototype._endoSplit = function(d) { var s = this.endo.basis, v = s[0], c = s[1], a = c.b.mul(d).divRound(this.n), r = v.b.neg().mul(d).divRound(this.n), t = a.mul(v.a), i = r.mul(c.a), n = a.mul(v.b), o = r.mul(c.b), p = d.sub(t).sub(i), O = n.add(o).neg(); return { k1: p, k2: O }; }, f.prototype.pointFromX = function(d, s) { d = new m(d, 16), d.red || (d = d.toRed(this.red)); var v = d.redSqr().redMul(d).redIAdd(d.redMul(this.a)).redIAdd(this.b), c = v.redSqrt(); if (c.redSqr().redSub(v).cmp(this.zero) !== 0) throw new Error("invalid point"); var a = c.fromRed().isOdd(); return (s && !a || !s && a) && (c = c.redNeg()), this.point(d, c); }, f.prototype.validate = function(d) { if (d.inf) return !0; var s = d.x, v = d.y, c = this.a.redMul(s), a = s.redSqr().redMul(s).redIAdd(c).redIAdd(this.b); return v.redSqr().redISub(a).cmpn(0) === 0; }, f.prototype._endoWnafMulAdd = function(d, s, v) { for (var c = this._endoWnafT1, a = this._endoWnafT2, r = 0; r < d.length; r++) { var t = this._endoSplit(s[r]), i = d[r], n = i._getBeta(); t.k1.negative && (t.k1.ineg(), i = i.neg(!0)), t.k2.negative && (t.k2.ineg(), n = n.neg(!0)), c[r * 2] = i, c[r * 2 + 1] = n, a[r * 2] = t.k1, a[r * 2 + 1] = t.k2; } for (var o = this._wnafMulAdd(1, c, a, r * 2, v), p = 0; p < r * 2; p++) c[p] = null, a[p] = null; return o; }; function y(l, d, s, v) { b.BasePoint.call(this, l, "affine"), d === null && s === null ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new m(d, 16), this.y = new m(s, 16), v && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.inf = !1); } g(y, b.BasePoint), f.prototype.point = function(d, s, v) { return new y(this, d, s, v); }, f.prototype.pointFromJSON = function(d, s) { return y.fromJSON(this, d, s); }, y.prototype._getBeta = function() { if (this.curve.endo) { var d = this.precomputed; if (d && d.beta) return d.beta; var s = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); if (d) { var v = this.curve, c = function(r) { return v.point(r.x.redMul(v.endo.beta), r.y); }; d.beta = s, s.precomputed = { beta: null, naf: d.naf && { wnd: d.naf.wnd, points: d.naf.points.map(c) }, doubles: d.doubles && { step: d.doubles.step, points: d.doubles.points.map(c) } }; } return s; } }, y.prototype.toJSON = function() { return this.precomputed ? [this.x, this.y, this.precomputed && { doubles: this.precomputed.doubles && { step: this.precomputed.doubles.step, points: this.precomputed.doubles.points.slice(1) }, naf: this.precomputed.naf && { wnd: this.precomputed.naf.wnd, points: this.precomputed.naf.points.slice(1) } }] : [this.x, this.y]; }, y.fromJSON = function(d, s, v) { typeof s == "string" && (s = JSON.parse(s)); var c = d.point(s[0], s[1], v); if (!s[2]) return c; function a(t) { return d.point(t[0], t[1], v); } var r = s[2]; return c.precomputed = { beta: null, doubles: r.doubles && { step: r.doubles.step, points: [c].concat(r.doubles.points.map(a)) }, naf: r.naf && { wnd: r.naf.wnd, points: [c].concat(r.naf.points.map(a)) } }, c; }, y.prototype.inspect = function() { return this.isInfinity() ? "" : ""; }, y.prototype.isInfinity = function() { return this.inf; }, y.prototype.add = function(d) { if (this.inf) return d; if (d.inf) return this; if (this.eq(d)) return this.dbl(); if (this.neg().eq(d)) return this.curve.point(null, null); if (this.x.cmp(d.x) === 0) return this.curve.point(null, null); var s = this.y.redSub(d.y); s.cmpn(0) !== 0 && (s = s.redMul(this.x.redSub(d.x).redInvm())); var v = s.redSqr().redISub(this.x).redISub(d.x), c = s.redMul(this.x.redSub(v)).redISub(this.y); return this.curve.point(v, c); }, y.prototype.dbl = function() { if (this.inf) return this; var d = this.y.redAdd(this.y); if (d.cmpn(0) === 0) return this.curve.point(null, null); var s = this.curve.a, v = this.x.redSqr(), c = d.redInvm(), a = v.redAdd(v).redIAdd(v).redIAdd(s).redMul(c), r = a.redSqr().redISub(this.x.redAdd(this.x)), t = a.redMul(this.x.redSub(r)).redISub(this.y); return this.curve.point(r, t); }, y.prototype.getX = function() { return this.x.fromRed(); }, y.prototype.getY = function() { return this.y.fromRed(); }, y.prototype.mul = function(d) { return d = new m(d, 16), this.isInfinity() ? this : this._hasDoubles(d) ? this.curve._fixedNafMul(this, d) : this.curve.endo ? this.curve._endoWnafMulAdd([this], [d]) : this.curve._wnafMul(this, d); }, y.prototype.mulAdd = function(d, s, v) { var c = [this, s], a = [d, v]; return this.curve.endo ? this.curve._endoWnafMulAdd(c, a) : this.curve._wnafMulAdd(1, c, a, 2); }, y.prototype.jmulAdd = function(d, s, v) { var c = [this, s], a = [d, v]; return this.curve.endo ? this.curve._endoWnafMulAdd(c, a, !0) : this.curve._wnafMulAdd(1, c, a, 2, !0); }, y.prototype.eq = function(d) { return this === d || this.inf === d.inf && (this.inf || this.x.cmp(d.x) === 0 && this.y.cmp(d.y) === 0); }, y.prototype.neg = function(d) { if (this.inf) return this; var s = this.curve.point(this.x, this.y.redNeg()); if (d && this.precomputed) { var v = this.precomputed, c = function(r) { return r.neg(); }; s.precomputed = { naf: v.naf && { wnd: v.naf.wnd, points: v.naf.points.map(c) }, doubles: v.doubles && { step: v.doubles.step, points: v.doubles.points.map(c) } }; } return s; }, y.prototype.toJ = function() { if (this.inf) return this.curve.jpoint(null, null, null); var d = this.curve.jpoint(this.x, this.y, this.curve.one); return d; }; function h(l, d, s, v) { b.BasePoint.call(this, l, "jacobian"), d === null && s === null && v === null ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new m(0)) : (this.x = new m(d, 16), this.y = new m(s, 16), this.z = new m(v, 16)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.zOne = this.z === this.curve.one; } g(h, b.BasePoint), f.prototype.jpoint = function(d, s, v) { return new h(this, d, s, v); }, h.prototype.toP = function() { if (this.isInfinity()) return this.curve.point(null, null); var d = this.z.redInvm(), s = d.redSqr(), v = this.x.redMul(s), c = this.y.redMul(s).redMul(d); return this.curve.point(v, c); }, h.prototype.neg = function() { return this.curve.jpoint(this.x, this.y.redNeg(), this.z); }, h.prototype.add = function(d) { if (this.isInfinity()) return d; if (d.isInfinity()) return this; var s = d.z.redSqr(), v = this.z.redSqr(), c = this.x.redMul(s), a = d.x.redMul(v), r = this.y.redMul(s.redMul(d.z)), t = d.y.redMul(v.redMul(this.z)), i = c.redSub(a), n = r.redSub(t); if (i.cmpn(0) === 0) return n.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl(); var o = i.redSqr(), p = o.redMul(i), O = c.redMul(o), P = n.redSqr().redIAdd(p).redISub(O).redISub(O), F = n.redMul(O.redISub(P)).redISub(r.redMul(p)), z = this.z.redMul(d.z).redMul(i); return this.curve.jpoint(P, F, z); }, h.prototype.mixedAdd = function(d) { if (this.isInfinity()) return d.toJ(); if (d.isInfinity()) return this; var s = this.z.redSqr(), v = this.x, c = d.x.redMul(s), a = this.y, r = d.y.redMul(s).redMul(this.z), t = v.redSub(c), i = a.redSub(r); if (t.cmpn(0) === 0) return i.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl(); var n = t.redSqr(), o = n.redMul(t), p = v.redMul(n), O = i.redSqr().redIAdd(o).redISub(p).redISub(p), P = i.redMul(p.redISub(O)).redISub(a.redMul(o)), F = this.z.redMul(t); return this.curve.jpoint(O, P, F); }, h.prototype.dblp = function(d) { if (d === 0) return this; if (this.isInfinity()) return this; if (!d) return this.dbl(); if (this.curve.zeroA || this.curve.threeA) { for (var s = this, v = 0; v < d; v++) s = s.dbl(); return s; } for (var c = this.curve.a, a = this.curve.tinv, r = this.x, t = this.y, i = this.z, n = i.redSqr().redSqr(), o = t.redAdd(t), v = 0; v < d; v++) { var p = r.redSqr(), O = o.redSqr(), P = O.redSqr(), F = p.redAdd(p).redIAdd(p).redIAdd(c.redMul(n)), z = r.redMul(O), N = F.redSqr().redISub(z.redAdd(z)), M = z.redISub(N), I = F.redMul(M); I = I.redIAdd(I).redISub(P); var R = o.redMul(i); v + 1 < d && (n = n.redMul(P)), r = N, i = R, o = I; } return this.curve.jpoint(r, o.redMul(a), i); }, h.prototype.dbl = function() { return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl(); }, h.prototype._zeroDbl = function() { var d, s, v; if (this.zOne) { var c = this.x.redSqr(), a = this.y.redSqr(), r = a.redSqr(), t = this.x.redAdd(a).redSqr().redISub(c).redISub(r); t = t.redIAdd(t); var i = c.redAdd(c).redIAdd(c), n = i.redSqr().redISub(t).redISub(t), o = r.redIAdd(r); o = o.redIAdd(o), o = o.redIAdd(o), d = n, s = i.redMul(t.redISub(n)).redISub(o), v = this.y.redAdd(this.y); } else { var p = this.x.redSqr(), O = this.y.redSqr(), P = O.redSqr(), F = this.x.redAdd(O).redSqr().redISub(p).redISub(P); F = F.redIAdd(F); var z = p.redAdd(p).redIAdd(p), N = z.redSqr(), M = P.redIAdd(P); M = M.redIAdd(M), M = M.redIAdd(M), d = N.redISub(F).redISub(F), s = z.redMul(F.redISub(d)).redISub(M), v = this.y.redMul(this.z), v = v.redIAdd(v); } return this.curve.jpoint(d, s, v); }, h.prototype._threeDbl = function() { var d, s, v; if (this.zOne) { var c = this.x.redSqr(), a = this.y.redSqr(), r = a.redSqr(), t = this.x.redAdd(a).redSqr().redISub(c).redISub(r); t = t.redIAdd(t); var i = c.redAdd(c).redIAdd(c).redIAdd(this.curve.a), n = i.redSqr().redISub(t).redISub(t); d = n; var o = r.redIAdd(r); o = o.redIAdd(o), o = o.redIAdd(o), s = i.redMul(t.redISub(n)).redISub(o), v = this.y.redAdd(this.y); } else { var p = this.z.redSqr(), O = this.y.redSqr(), P = this.x.redMul(O), F = this.x.redSub(p).redMul(this.x.redAdd(p)); F = F.redAdd(F).redIAdd(F); var z = P.redIAdd(P); z = z.redIAdd(z); var N = z.redAdd(z); d = F.redSqr().redISub(N), v = this.y.redAdd(this.z).redSqr().redISub(O).redISub(p); var M = O.redSqr(); M = M.redIAdd(M), M = M.redIAdd(M), M = M.redIAdd(M), s = F.redMul(z.redISub(d)).redISub(M); } return this.curve.jpoint(d, s, v); }, h.prototype._dbl = function() { var d = this.curve.a, s = this.x, v = this.y, c = this.z, a = c.redSqr().redSqr(), r = s.redSqr(), t = v.redSqr(), i = r.redAdd(r).redIAdd(r).redIAdd(d.redMul(a)), n = s.redAdd(s); n = n.redIAdd(n); var o = n.redMul(t), p = i.redSqr().redISub(o.redAdd(o)), O = o.redISub(p), P = t.redSqr(); P = P.redIAdd(P), P = P.redIAdd(P), P = P.redIAdd(P); var F = i.redMul(O).redISub(P), z = v.redAdd(v).redMul(c); return this.curve.jpoint(p, F, z); }, h.prototype.trpl = function() { if (!this.curve.zeroA) return this.dbl().add(this); var d = this.x.redSqr(), s = this.y.redSqr(), v = this.z.redSqr(), c = s.redSqr(), a = d.redAdd(d).redIAdd(d), r = a.redSqr(), t = this.x.redAdd(s).redSqr().redISub(d).redISub(c); t = t.redIAdd(t), t = t.redAdd(t).redIAdd(t), t = t.redISub(r); var i = t.redSqr(), n = c.redIAdd(c); n = n.redIAdd(n), n = n.redIAdd(n), n = n.redIAdd(n); var o = a.redIAdd(t).redSqr().redISub(r).redISub(i).redISub(n), p = s.redMul(o); p = p.redIAdd(p), p = p.redIAdd(p); var O = this.x.redMul(i).redISub(p); O = O.redIAdd(O), O = O.redIAdd(O); var P = this.y.redMul(o.redMul(n.redISub(o)).redISub(t.redMul(i))); P = P.redIAdd(P), P = P.redIAdd(P), P = P.redIAdd(P); var F = this.z.redAdd(t).redSqr().redISub(v).redISub(i); return this.curve.jpoint(O, P, F); }, h.prototype.mul = function(d, s) { return d = new m(d, s), this.curve._wnafMul(this, d); }, h.prototype.eq = function(d) { if (d.type === "affine") return this.eq(d.toJ()); if (this === d) return !0; var s = this.z.redSqr(), v = d.z.redSqr(); if (this.x.redMul(v).redISub(d.x.redMul(s)).cmpn(0) !== 0) return !1; var c = s.redMul(this.z), a = v.redMul(d.z); return this.y.redMul(a).redISub(d.y.redMul(c)).cmpn(0) === 0; }, h.prototype.eqXToP = function(d) { var s = this.z.redSqr(), v = d.toRed(this.curve.red).redMul(s); if (this.x.cmp(v) === 0) return !0; for (var c = d.clone(), a = this.curve.redN.redMul(s); ; ) { if (c.iadd(this.curve.n), c.cmp(this.curve.p) >= 0) return !1; if (v.redIAdd(a), this.x.cmp(v) === 0) return !0; } }, h.prototype.inspect = function() { return this.isInfinity() ? "" : ""; }, h.prototype.isInfinity = function() { return this.z.cmpn(0) === 0; }; }, { "../utils": 364, "./base": 351, "bn.js": 365, inherits: 387 }], 356: [function(e, x, _) { var u = _, m = e("hash.js"), g = e("./curve"), b = e("./utils"), w = b.assert; function f(l) { l.type === "short" ? this.curve = new g.short(l) : l.type === "edwards" ? this.curve = new g.edwards(l) : this.curve = new g.mont(l), this.g = this.curve.g, this.n = this.curve.n, this.hash = l.hash, w(this.g.validate(), "Invalid curve"), w(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O"); } u.PresetCurve = f; function y(l, d) { Object.defineProperty(u, l, { configurable: !0, enumerable: !0, get: function() { var v = new f(d); return Object.defineProperty(u, l, { configurable: !0, enumerable: !0, value: v }), v; } }); } y("p192", { type: "short", prime: "p192", p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff", a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc", b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1", n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831", hash: m.sha256, gRed: !1, g: ["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012", "07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"] }), y("p224", { type: "short", prime: "p224", p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001", a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe", b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4", n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d", hash: m.sha256, gRed: !1, g: ["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21", "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"] }), y("p256", { type: "short", prime: null, p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff", a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc", b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b", n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551", hash: m.sha256, gRed: !1, g: ["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296", "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"] }), y("p384", { type: "short", prime: null, p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff", a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc", b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef", n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973", hash: m.sha384, gRed: !1, g: ["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7", "3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"] }), y("p521", { type: "short", prime: null, p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff", a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc", b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00", n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409", hash: m.sha512, gRed: !1, g: ["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66", "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"] }), y("curve25519", { type: "mont", prime: "p25519", p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", a: "76d06", b: "1", n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", hash: m.sha256, gRed: !1, g: ["9"] }), y("ed25519", { type: "edwards", prime: "p25519", p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", a: "-1", c: "1", // -121665 * (121666^(-1)) (mod P) d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3", n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", hash: m.sha256, gRed: !1, g: [ "216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a", // 4/5 "6666666666666666666666666666666666666666666666666666666666666658" ] }); var h; try { h = e("./precomputed/secp256k1"); } catch (l) { h = void 0; } y("secp256k1", { type: "short", prime: "k256", p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f", a: "0", b: "7", n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141", h: "1", hash: m.sha256, // Precomputed endomorphism beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", lambda: "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", basis: [{ a: "3086d221a7d46bcde86c90e49284eb15", b: "-e4437ed6010e88286f547fa90abfe4c3" }, { a: "114ca50f7a8e2f3f657c1108d9d44cfd8", b: "3086d221a7d46bcde86c90e49284eb15" }], gRed: !1, g: ["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", h] }); }, { "./curve": 353, "./precomputed/secp256k1": 363, "./utils": 364, "hash.js": 372 }], 357: [function(e, x, _) { function u(s) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(c) { return typeof c; } : u = function(c) { return c && typeof Symbol == "function" && c.constructor === Symbol && c !== Symbol.prototype ? "symbol" : typeof c; }, u(s); } var m = e("bn.js"), g = e("hmac-drbg"), b = e("../utils"), w = e("../curves"), f = e("brorand"), y = b.assert, h = e("./key"), l = e("./signature"); function d(s) { if (!(this instanceof d)) return new d(s); typeof s == "string" && (y(w.hasOwnProperty(s), "Unknown curve " + s), s = w[s]), s instanceof w.PresetCurve && (s = { curve: s }), this.curve = s.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = s.curve.g, this.g.precompute(s.curve.n.bitLength() + 1), this.hash = s.hash || s.curve.hash; } x.exports = d, d.prototype.keyPair = function(v) { return new h(this, v); }, d.prototype.keyFromPrivate = function(v, c) { return h.fromPrivate(this, v, c); }, d.prototype.keyFromPublic = function(v, c) { return h.fromPublic(this, v, c); }, d.prototype.genKeyPair = function(v) { v || (v = {}); var c = new g({ hash: this.hash, pers: v.pers, persEnc: v.persEnc || "utf8", entropy: v.entropy || f(this.hash.hmacStrength), entropyEnc: v.entropy && v.entropyEnc || "utf8", nonce: this.n.toArray() }), a = this.n.byteLength(), r = this.n.sub(new m(2)); do { var t = new m(c.generate(a)); if (!(t.cmp(r) > 0)) return t.iaddn(1), this.keyFromPrivate(t); } while (!0); }, d.prototype._truncateToN = function(v, c) { var a = v.byteLength() * 8 - this.n.bitLength(); return a > 0 && (v = v.ushrn(a)), !c && v.cmp(this.n) >= 0 ? v.sub(this.n) : v; }, d.prototype.sign = function(v, c, a, r) { u(a) === "object" && (r = a, a = null), r || (r = {}), c = this.keyFromPrivate(c, a), v = this._truncateToN(new m(v, 16)); for (var t = this.n.byteLength(), i = c.getPrivate().toArray("be", t), n = v.toArray("be", t), o = new g({ hash: this.hash, entropy: i, nonce: n, pers: r.pers, persEnc: r.persEnc || "utf8" }), p = this.n.sub(new m(1)), O = 0; ; O++) { var P = r.k ? r.k(O) : new m(o.generate(this.n.byteLength())); if (P = this._truncateToN(P, !0), !(P.cmpn(1) <= 0 || P.cmp(p) >= 0)) { var F = this.g.mul(P); if (!F.isInfinity()) { var z = F.getX(), N = z.umod(this.n); if (N.cmpn(0) !== 0) { var M = P.invm(this.n).mul(N.mul(c.getPrivate()).iadd(v)); if (M = M.umod(this.n), M.cmpn(0) !== 0) { var I = (F.getY().isOdd() ? 1 : 0) | (z.cmp(N) !== 0 ? 2 : 0); return r.canonical && M.cmp(this.nh) > 0 && (M = this.n.sub(M), I ^= 1), new l({ r: N, s: M, recoveryParam: I }); } } } } } }, d.prototype.verify = function(v, c, a, r) { v = this._truncateToN(new m(v, 16)), a = this.keyFromPublic(a, r), c = new l(c, "hex"); var t = c.r, i = c.s; if (t.cmpn(1) < 0 || t.cmp(this.n) >= 0 || i.cmpn(1) < 0 || i.cmp(this.n) >= 0) return !1; var n = i.invm(this.n), o = n.mul(v).umod(this.n), p = n.mul(t).umod(this.n); if (!this.curve._maxwellTrick) { var O = this.g.mulAdd(o, a.getPublic(), p); return O.isInfinity() ? !1 : O.getX().umod(this.n).cmp(t) === 0; } var O = this.g.jmulAdd(o, a.getPublic(), p); return O.isInfinity() ? !1 : O.eqXToP(t); }, d.prototype.recoverPubKey = function(s, v, c, a) { y((3 & c) === c, "The recovery param is more than two bits"), v = new l(v, a); var r = this.n, t = new m(s), i = v.r, n = v.s, o = c & 1, p = c >> 1; if (i.cmp(this.curve.p.umod(this.curve.n)) >= 0 && p) throw new Error("Unable to find sencond key candinate"); p ? i = this.curve.pointFromX(i.add(this.curve.n), o) : i = this.curve.pointFromX(i, o); var O = v.r.invm(r), P = r.sub(t).mul(O).umod(r), F = n.mul(O).umod(r); return this.g.mulAdd(P, i, F); }, d.prototype.getKeyRecoveryParam = function(s, v, c, a) { if (v = new l(v, a), v.recoveryParam !== null) return v.recoveryParam; for (var r = 0; r < 4; r++) { var t; try { t = this.recoverPubKey(s, v, r); } catch (i) { continue; } if (t.eq(c)) return r; } throw new Error("Unable to find valid recovery factor"); }; }, { "../curves": 356, "../utils": 364, "./key": 358, "./signature": 359, "bn.js": 365, brorand: 184, "hmac-drbg": 384 }], 358: [function(e, x, _) { var u = e("bn.js"), m = e("../utils"), g = m.assert; function b(w, f) { this.ec = w, this.priv = null, this.pub = null, f.priv && this._importPrivate(f.priv, f.privEnc), f.pub && this._importPublic(f.pub, f.pubEnc); } x.exports = b, b.fromPublic = function(f, y, h) { return y instanceof b ? y : new b(f, { pub: y, pubEnc: h }); }, b.fromPrivate = function(f, y, h) { return y instanceof b ? y : new b(f, { priv: y, privEnc: h }); }, b.prototype.validate = function() { var f = this.getPublic(); return f.isInfinity() ? { result: !1, reason: "Invalid public key" } : f.validate() ? f.mul(this.ec.curve.n).isInfinity() ? { result: !0, reason: null } : { result: !1, reason: "Public key * N != O" } : { result: !1, reason: "Public key is not a point" }; }, b.prototype.getPublic = function(f, y) { return typeof f == "string" && (y = f, f = null), this.pub || (this.pub = this.ec.g.mul(this.priv)), y ? this.pub.encode(y, f) : this.pub; }, b.prototype.getPrivate = function(f) { return f === "hex" ? this.priv.toString(16, 2) : this.priv; }, b.prototype._importPrivate = function(f, y) { this.priv = new u(f, y || 16), this.priv = this.priv.umod(this.ec.curve.n); }, b.prototype._importPublic = function(f, y) { if (f.x || f.y) { this.ec.curve.type === "mont" ? g(f.x, "Need x coordinate") : (this.ec.curve.type === "short" || this.ec.curve.type === "edwards") && g(f.x && f.y, "Need both x and y coordinate"), this.pub = this.ec.curve.point(f.x, f.y); return; } this.pub = this.ec.curve.decodePoint(f, y); }, b.prototype.derive = function(f) { return f.mul(this.priv).getX(); }, b.prototype.sign = function(f, y, h) { return this.ec.sign(f, this, y, h); }, b.prototype.verify = function(f, y) { return this.ec.verify(f, y, this); }, b.prototype.inspect = function() { return ""; }; }, { "../utils": 364, "bn.js": 365 }], 359: [function(e, x, _) { var u = e("bn.js"), m = e("../utils"), g = m.assert; function b(l, d) { if (l instanceof b) return l; this._importDER(l, d) || (g(l.r && l.s, "Signature without r or s"), this.r = new u(l.r, 16), this.s = new u(l.s, 16), l.recoveryParam === void 0 ? this.recoveryParam = null : this.recoveryParam = l.recoveryParam); } x.exports = b; function w() { this.place = 0; } function f(l, d) { var s = l[d.place++]; if (!(s & 128)) return s; var v = s & 15; if (v === 0 || v > 4) return !1; for (var c = 0, a = 0, r = d.place; a < v; a++, r++) c <<= 8, c |= l[r], c >>>= 0; return c <= 127 ? !1 : (d.place = r, c); } function y(l) { for (var d = 0, s = l.length - 1; !l[d] && !(l[d + 1] & 128) && d < s; ) d++; return d === 0 ? l : l.slice(d); } b.prototype._importDER = function(d, s) { d = m.toArray(d, s); var v = new w(); if (d[v.place++] !== 48) return !1; var c = f(d, v); if (c === !1 || c + v.place !== d.length || d[v.place++] !== 2) return !1; var a = f(d, v); if (a === !1) return !1; var r = d.slice(v.place, a + v.place); if (v.place += a, d[v.place++] !== 2) return !1; var t = f(d, v); if (t === !1 || d.length !== t + v.place) return !1; var i = d.slice(v.place, t + v.place); if (r[0] === 0) if (r[1] & 128) r = r.slice(1); else return !1; if (i[0] === 0) if (i[1] & 128) i = i.slice(1); else return !1; return this.r = new u(r), this.s = new u(i), this.recoveryParam = null, !0; }; function h(l, d) { if (d < 128) { l.push(d); return; } var s = 1 + (Math.log(d) / Math.LN2 >>> 3); for (l.push(s | 128); --s; ) l.push(d >>> (s << 3) & 255); l.push(d); } b.prototype.toDER = function(d) { var s = this.r.toArray(), v = this.s.toArray(); for (s[0] & 128 && (s = [0].concat(s)), v[0] & 128 && (v = [0].concat(v)), s = y(s), v = y(v); !v[0] && !(v[1] & 128); ) v = v.slice(1); var c = [2]; h(c, s.length), c = c.concat(s), c.push(2), h(c, v.length); var a = c.concat(v), r = [48]; return h(r, a.length), r = r.concat(a), m.encode(r, d); }; }, { "../utils": 364, "bn.js": 365 }], 360: [function(e, x, _) { var u = e("hash.js"), m = e("../curves"), g = e("../utils"), b = g.assert, w = g.parseBytes, f = e("./key"), y = e("./signature"); function h(d) { if (b(d === "ed25519", "only tested with ed25519 so far"), !(this instanceof h)) return new h(d); var d = m[d].curve; this.curve = d, this.g = d.g, this.g.precompute(d.n.bitLength() + 1), this.pointClass = d.point().constructor, this.encodingLength = Math.ceil(d.n.bitLength() / 8), this.hash = u.sha512; } x.exports = h, h.prototype.sign = function(d, s) { d = w(d); var v = this.keyFromSecret(s), c = this.hashInt(v.messagePrefix(), d), a = this.g.mul(c), r = this.encodePoint(a), t = this.hashInt(r, v.pubBytes(), d).mul(v.priv()), i = c.add(t).umod(this.curve.n); return this.makeSignature({ R: a, S: i, Rencoded: r }); }, h.prototype.verify = function(d, s, v) { d = w(d), s = this.makeSignature(s); var c = this.keyFromPublic(v), a = this.hashInt(s.Rencoded(), c.pubBytes(), d), r = this.g.mul(s.S()), t = s.R().add(c.pub().mul(a)); return t.eq(r); }, h.prototype.hashInt = function() { for (var d = this.hash(), s = 0; s < arguments.length; s++) d.update(arguments[s]); return g.intFromLE(d.digest()).umod(this.curve.n); }, h.prototype.keyFromPublic = function(d) { return f.fromPublic(this, d); }, h.prototype.keyFromSecret = function(d) { return f.fromSecret(this, d); }, h.prototype.makeSignature = function(d) { return d instanceof y ? d : new y(this, d); }, h.prototype.encodePoint = function(d) { var s = d.getY().toArray("le", this.encodingLength); return s[this.encodingLength - 1] |= d.getX().isOdd() ? 128 : 0, s; }, h.prototype.decodePoint = function(d) { d = g.parseBytes(d); var s = d.length - 1, v = d.slice(0, s).concat(d[s] & -129), c = (d[s] & 128) !== 0, a = g.intFromLE(v); return this.curve.pointFromY(a, c); }, h.prototype.encodeInt = function(d) { return d.toArray("le", this.encodingLength); }, h.prototype.decodeInt = function(d) { return g.intFromLE(d); }, h.prototype.isPoint = function(d) { return d instanceof this.pointClass; }; }, { "../curves": 356, "../utils": 364, "./key": 361, "./signature": 362, "hash.js": 372 }], 361: [function(e, x, _) { var u = e("../utils"), m = u.assert, g = u.parseBytes, b = u.cachedProperty; function w(f, y) { this.eddsa = f, this._secret = g(y.secret), f.isPoint(y.pub) ? this._pub = y.pub : this._pubBytes = g(y.pub); } w.fromPublic = function(y, h) { return h instanceof w ? h : new w(y, { pub: h }); }, w.fromSecret = function(y, h) { return h instanceof w ? h : new w(y, { secret: h }); }, w.prototype.secret = function() { return this._secret; }, b(w, "pubBytes", function() { return this.eddsa.encodePoint(this.pub()); }), b(w, "pub", function() { return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()); }), b(w, "privBytes", function() { var y = this.eddsa, h = this.hash(), l = y.encodingLength - 1, d = h.slice(0, y.encodingLength); return d[0] &= 248, d[l] &= 127, d[l] |= 64, d; }), b(w, "priv", function() { return this.eddsa.decodeInt(this.privBytes()); }), b(w, "hash", function() { return this.eddsa.hash().update(this.secret()).digest(); }), b(w, "messagePrefix", function() { return this.hash().slice(this.eddsa.encodingLength); }), w.prototype.sign = function(y) { return m(this._secret, "KeyPair can only verify"), this.eddsa.sign(y, this); }, w.prototype.verify = function(y, h) { return this.eddsa.verify(y, h, this); }, w.prototype.getSecret = function(y) { return m(this._secret, "KeyPair is public only"), u.encode(this.secret(), y); }, w.prototype.getPublic = function(y) { return u.encode(this.pubBytes(), y); }, x.exports = w; }, { "../utils": 364 }], 362: [function(e, x, _) { function u(h) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(d) { return typeof d; } : u = function(d) { return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d; }, u(h); } var m = e("bn.js"), g = e("../utils"), b = g.assert, w = g.cachedProperty, f = g.parseBytes; function y(h, l) { this.eddsa = h, u(l) !== "object" && (l = f(l)), Array.isArray(l) && (l = { R: l.slice(0, h.encodingLength), S: l.slice(h.encodingLength) }), b(l.R && l.S, "Signature without R or S"), h.isPoint(l.R) && (this._R = l.R), l.S instanceof m && (this._S = l.S), this._Rencoded = Array.isArray(l.R) ? l.R : l.Rencoded, this._Sencoded = Array.isArray(l.S) ? l.S : l.Sencoded; } w(y, "S", function() { return this.eddsa.decodeInt(this.Sencoded()); }), w(y, "R", function() { return this.eddsa.decodePoint(this.Rencoded()); }), w(y, "Rencoded", function() { return this.eddsa.encodePoint(this.R()); }), w(y, "Sencoded", function() { return this.eddsa.encodeInt(this.S()); }), y.prototype.toBytes = function() { return this.Rencoded().concat(this.Sencoded()); }, y.prototype.toHex = function() { return g.encode(this.toBytes(), "hex").toUpperCase(); }, x.exports = y; }, { "../utils": 364, "bn.js": 365 }], 363: [function(e, x, _) { x.exports = { doubles: { step: 4, points: [["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a", "f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"], ["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", "11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"], ["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739", "d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"], ["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", "4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"], ["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c", "4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"], ["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda", "96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"], ["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa", "5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"], ["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0", "cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"], ["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d", "9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"], ["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d", "e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"], ["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1", "9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"], ["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0", "5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"], ["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047", "10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"], ["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862", "283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"], ["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7", "7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"], ["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd", "56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"], ["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83", "7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"], ["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a", "53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"], ["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8", "bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"], ["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d", "4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"], ["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725", "7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"], ["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754", "4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"], ["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c", "17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"], ["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6", "6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"], ["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39", "c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"], ["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891", "893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"], ["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b", "febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"], ["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03", "2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"], ["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d", "eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"], ["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070", "7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"], ["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4", "e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"], ["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da", "662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"], ["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11", "1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"], ["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e", "efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"], ["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41", "2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"], ["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef", "67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"], ["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8", "db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"], ["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d", "648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"], ["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96", "35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"], ["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd", "ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"], ["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5", "9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"], ["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266", "40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"], ["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71", "34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"], ["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac", "c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"], ["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751", "1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"], ["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e", "493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"], ["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241", "c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"], ["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3", "be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"], ["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f", "4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"], ["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19", "aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"], ["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be", "b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"], ["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9", "6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"], ["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2", "8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"], ["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13", "7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"], ["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c", "ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"], ["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba", "2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"], ["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151", "e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"], ["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073", "d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"], ["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458", "38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"], ["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b", "69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"], ["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366", "d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"], ["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa", "40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"], ["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0", "620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"], ["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787", "7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"], ["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e", "ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]] }, naf: { wnd: 7, points: [["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9", "388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"], ["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4", "d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"], ["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc", "6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"], ["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe", "cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"], ["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb", "d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"], ["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8", "ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"], ["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e", "581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"], ["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34", "4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"], ["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c", "85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"], ["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5", "321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"], ["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f", "2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"], ["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714", "73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"], ["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729", "a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"], ["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db", "2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"], ["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4", "e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"], ["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5", "b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"], ["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479", "2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"], ["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d", "80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"], ["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f", "1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"], ["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb", "d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"], ["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9", "eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"], ["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963", "758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"], ["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74", "958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"], ["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530", "e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"], ["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b", "5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"], ["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247", "cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"], ["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1", "cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"], ["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120", "4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"], ["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435", "91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"], ["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18", "673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"], ["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8", "59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"], ["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb", "3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"], ["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f", "55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"], ["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143", "efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"], ["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba", "e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"], ["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45", "f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"], ["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a", "744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"], ["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e", "c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"], ["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8", "e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"], ["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c", "30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"], ["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519", "e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"], ["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab", "100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"], ["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca", "ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"], ["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf", "8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"], ["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610", "68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"], ["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4", "f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"], ["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c", "d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"], ["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940", "edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"], ["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980", "a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"], ["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3", "66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"], ["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf", "9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"], ["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63", "4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"], ["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448", "fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"], ["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf", "5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"], ["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5", "8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"], ["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6", "8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"], ["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5", "5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"], ["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99", "f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"], ["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51", "f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"], ["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5", "42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"], ["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5", "204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"], ["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997", "4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"], ["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881", "73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"], ["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5", "39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"], ["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66", "d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"], ["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726", "ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"], ["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede", "6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"], ["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94", "60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"], ["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31", "3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"], ["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51", "b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"], ["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252", "ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"], ["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5", "cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"], ["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b", "6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"], ["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4", "322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"], ["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f", "6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"], ["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889", "2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"], ["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246", "b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"], ["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984", "998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"], ["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a", "b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"], ["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030", "bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"], ["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197", "6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"], ["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593", "c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"], ["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef", "21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"], ["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38", "60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"], ["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a", "49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"], ["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111", "5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"], ["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502", "7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"], ["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea", "be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"], ["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26", "8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"], ["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986", "39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"], ["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e", "62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"], ["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4", "25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"], ["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda", "ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"], ["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859", "cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"], ["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f", "f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"], ["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c", "6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"], ["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942", "fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"], ["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a", "1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"], ["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80", "5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"], ["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d", "438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"], ["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1", "cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"], ["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63", "c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"], ["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352", "6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"], ["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193", "ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"], ["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00", "9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"], ["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58", "ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"], ["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7", "d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"], ["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8", "c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"], ["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e", "67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"], ["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d", "cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"], ["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b", "299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"], ["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f", "f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"], ["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6", "462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"], ["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297", "62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"], ["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a", "7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"], ["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c", "ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"], ["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52", "4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"], ["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb", "bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"], ["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065", "bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"], ["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917", "603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"], ["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9", "cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"], ["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3", "553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"], ["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57", "712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"], ["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66", "ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"], ["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8", "9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"], ["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721", "9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"], ["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180", "4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]] } }; }, {}], 364: [function(e, x, _) { var u = _, m = e("bn.js"), g = e("minimalistic-assert"), b = e("minimalistic-crypto-utils"); u.assert = g, u.toArray = b.toArray, u.zero2 = b.zero2, u.toHex = b.toHex, u.encode = b.encode; function w(d, s, v) { var c = new Array(Math.max(d.bitLength(), v) + 1); c.fill(0); for (var a = 1 << s + 1, r = d.clone(), t = 0; t < c.length; t++) { var i, n = r.andln(a - 1); r.isOdd() ? (n > (a >> 1) - 1 ? i = (a >> 1) - n : i = n, r.isubn(i)) : i = 0, c[t] = i, r.iushrn(1); } return c; } u.getNAF = w; function f(d, s) { var v = [[], []]; d = d.clone(), s = s.clone(); for (var c = 0, a = 0; d.cmpn(-c) > 0 || s.cmpn(-a) > 0; ) { var r = d.andln(3) + c & 3, t = s.andln(3) + a & 3; r === 3 && (r = -1), t === 3 && (t = -1); var i; if (!(r & 1)) i = 0; else { var n = d.andln(7) + c & 7; (n === 3 || n === 5) && t === 2 ? i = -r : i = r; } v[0].push(i); var o; if (!(t & 1)) o = 0; else { var n = s.andln(7) + a & 7; (n === 3 || n === 5) && r === 2 ? o = -t : o = t; } v[1].push(o), 2 * c === i + 1 && (c = 1 - c), 2 * a === o + 1 && (a = 1 - a), d.iushrn(1), s.iushrn(1); } return v; } u.getJSF = f; function y(d, s, v) { var c = "_" + s; d.prototype[s] = function() { return this[c] !== void 0 ? this[c] : this[c] = v.call(this); }; } u.cachedProperty = y; function h(d) { return typeof d == "string" ? u.toArray(d, "hex") : d; } u.parseBytes = h; function l(d) { return new m(d, "hex", "le"); } u.intFromLE = l; }, { "bn.js": 365, "minimalistic-assert": 437, "minimalistic-crypto-utils": 438 }], 365: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 366: [function(e, x, _) { x.exports = { _from: "elliptic@^6.5.3", _id: "elliptic@6.5.3", _inBundle: !1, _integrity: "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", _location: "/elliptic", _phantomChildren: {}, _requested: { type: "range", registry: !0, raw: "elliptic@^6.5.3", name: "elliptic", escapedName: "elliptic", rawSpec: "^6.5.3", saveSpec: null, fetchSpec: "^6.5.3" }, _requiredBy: [ "/browserify-sign", "/create-ecdh" ], _resolved: "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", _shasum: "cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6", _spec: "elliptic@^6.5.3", _where: "/mnt/d/dev/git/exceljs/node_modules/browserify-sign", author: { name: "Fedor Indutny", email: "fedor@indutny.com" }, bugs: { url: "https://github.com/indutny/elliptic/issues" }, bundleDependencies: !1, dependencies: { "bn.js": "^4.4.0", brorand: "^1.0.1", "hash.js": "^1.0.0", "hmac-drbg": "^1.0.0", inherits: "^2.0.1", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" }, deprecated: !1, description: "EC cryptography", devDependencies: { brfs: "^1.4.3", coveralls: "^3.0.8", grunt: "^1.0.4", "grunt-browserify": "^5.0.0", "grunt-cli": "^1.2.0", "grunt-contrib-connect": "^1.0.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-uglify": "^1.0.1", "grunt-mocha-istanbul": "^3.0.1", "grunt-saucelabs": "^9.0.1", istanbul: "^0.4.2", jscs: "^3.0.7", jshint: "^2.10.3", mocha: "^6.2.2" }, files: [ "lib" ], homepage: "https://github.com/indutny/elliptic", keywords: [ "EC", "Elliptic", "curve", "Cryptography" ], license: "MIT", main: "lib/elliptic.js", name: "elliptic", repository: { type: "git", url: "git+ssh://git@github.com/indutny/elliptic.git" }, scripts: { jscs: "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", jshint: "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", lint: "npm run jscs && npm run jshint", test: "npm run lint && npm run unit", unit: "istanbul test _mocha --reporter=spec test/index.js", version: "grunt dist && git add dist/" }, version: "6.5.3" }; }, {}], 367: [function(e, x, _) { function u(M) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(R) { return typeof R; } : u = function(R) { return R && typeof Symbol == "function" && R.constructor === Symbol && R !== Symbol.prototype ? "symbol" : typeof R; }, u(M); } var m = Object.create || F, g = Object.keys || z, b = Function.prototype.bind || N; function w() { (!this._events || !Object.prototype.hasOwnProperty.call(this, "_events")) && (this._events = m(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; } x.exports = w, w.EventEmitter = w, w.prototype._events = void 0, w.prototype._maxListeners = void 0; var f = 10, y; try { var h = {}; Object.defineProperty && Object.defineProperty(h, "x", { value: 0 }), y = h.x === 0; } catch (M) { y = !1; } y ? Object.defineProperty(w, "defaultMaxListeners", { enumerable: !0, get: function() { return f; }, set: function(I) { if (typeof I != "number" || I < 0 || I !== I) throw new TypeError('"defaultMaxListeners" must be a positive number'); f = I; } }) : w.defaultMaxListeners = f, w.prototype.setMaxListeners = function(I) { if (typeof I != "number" || I < 0 || isNaN(I)) throw new TypeError('"n" argument must be a positive number'); return this._maxListeners = I, this; }; function l(M) { return M._maxListeners === void 0 ? w.defaultMaxListeners : M._maxListeners; } w.prototype.getMaxListeners = function() { return l(this); }; function d(M, I, R) { if (I) M.call(R); else for (var C = M.length, E = O(M, C), A = 0; A < C; ++A) E[A].call(R); } function s(M, I, R, C) { if (I) M.call(R, C); else for (var E = M.length, A = O(M, E), L = 0; L < E; ++L) A[L].call(R, C); } function v(M, I, R, C, E) { if (I) M.call(R, C, E); else for (var A = M.length, L = O(M, A), $ = 0; $ < A; ++$) L[$].call(R, C, E); } function c(M, I, R, C, E, A) { if (I) M.call(R, C, E, A); else for (var L = M.length, $ = O(M, L), W = 0; W < L; ++W) $[W].call(R, C, E, A); } function a(M, I, R, C) { if (I) M.apply(R, C); else for (var E = M.length, A = O(M, E), L = 0; L < E; ++L) A[L].apply(R, C); } w.prototype.emit = function(I) { var R, C, E, A, L, $, W = I === "error"; if ($ = this._events, $) W = W && $.error == null; else if (!W) return !1; if (W) { if (arguments.length > 1 && (R = arguments[1]), R instanceof Error) throw R; var U = new Error('Unhandled "error" event. (' + R + ")"); throw U.context = R, U; } if (C = $[I], !C) return !1; var D = typeof C == "function"; switch (E = arguments.length, E) { case 1: d(C, D, this); break; case 2: s(C, D, this, arguments[1]); break; case 3: v(C, D, this, arguments[1], arguments[2]); break; case 4: c(C, D, this, arguments[1], arguments[2], arguments[3]); break; default: for (A = new Array(E - 1), L = 1; L < E; L++) A[L - 1] = arguments[L]; a(C, D, this, A); } return !0; }; function r(M, I, R, C) { var E, A, L; if (typeof R != "function") throw new TypeError('"listener" argument must be a function'); if (A = M._events, A ? (A.newListener && (M.emit("newListener", I, R.listener ? R.listener : R), A = M._events), L = A[I]) : (A = M._events = m(null), M._eventsCount = 0), !L) L = A[I] = R, ++M._eventsCount; else if (typeof L == "function" ? L = A[I] = C ? [R, L] : [L, R] : C ? L.unshift(R) : L.push(R), !L.warned && (E = l(M), E && E > 0 && L.length > E)) { L.warned = !0; var $ = new Error("Possible EventEmitter memory leak detected. " + L.length + ' "' + String(I) + '" listeners added. Use emitter.setMaxListeners() to increase limit.'); $.name = "MaxListenersExceededWarning", $.emitter = M, $.type = I, $.count = L.length, (typeof console == "undefined" ? "undefined" : u(console)) === "object" && console.warn && console.warn("%s: %s", $.name, $.message); } return M; } w.prototype.addListener = function(I, R) { return r(this, I, R, !1); }, w.prototype.on = w.prototype.addListener, w.prototype.prependListener = function(I, R) { return r(this, I, R, !0); }; function t() { if (!this.fired) switch (this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length) { case 0: return this.listener.call(this.target); case 1: return this.listener.call(this.target, arguments[0]); case 2: return this.listener.call(this.target, arguments[0], arguments[1]); case 3: return this.listener.call(this.target, arguments[0], arguments[1], arguments[2]); default: for (var M = new Array(arguments.length), I = 0; I < M.length; ++I) M[I] = arguments[I]; this.listener.apply(this.target, M); } } function i(M, I, R) { var C = { fired: !1, wrapFn: void 0, target: M, type: I, listener: R }, E = b.call(t, C); return E.listener = R, C.wrapFn = E, E; } w.prototype.once = function(I, R) { if (typeof R != "function") throw new TypeError('"listener" argument must be a function'); return this.on(I, i(this, I, R)), this; }, w.prototype.prependOnceListener = function(I, R) { if (typeof R != "function") throw new TypeError('"listener" argument must be a function'); return this.prependListener(I, i(this, I, R)), this; }, w.prototype.removeListener = function(I, R) { var C, E, A, L, $; if (typeof R != "function") throw new TypeError('"listener" argument must be a function'); if (E = this._events, !E) return this; if (C = E[I], !C) return this; if (C === R || C.listener === R) --this._eventsCount === 0 ? this._events = m(null) : (delete E[I], E.removeListener && this.emit("removeListener", I, C.listener || R)); else if (typeof C != "function") { for (A = -1, L = C.length - 1; L >= 0; L--) if (C[L] === R || C[L].listener === R) { $ = C[L].listener, A = L; break; } if (A < 0) return this; A === 0 ? C.shift() : p(C, A), C.length === 1 && (E[I] = C[0]), E.removeListener && this.emit("removeListener", I, $ || R); } return this; }, w.prototype.removeAllListeners = function(I) { var R, C, E; if (C = this._events, !C) return this; if (!C.removeListener) return arguments.length === 0 ? (this._events = m(null), this._eventsCount = 0) : C[I] && (--this._eventsCount === 0 ? this._events = m(null) : delete C[I]), this; if (arguments.length === 0) { var A = g(C), L; for (E = 0; E < A.length; ++E) L = A[E], L !== "removeListener" && this.removeAllListeners(L); return this.removeAllListeners("removeListener"), this._events = m(null), this._eventsCount = 0, this; } if (R = C[I], typeof R == "function") this.removeListener(I, R); else if (R) for (E = R.length - 1; E >= 0; E--) this.removeListener(I, R[E]); return this; }; function n(M, I, R) { var C = M._events; if (!C) return []; var E = C[I]; return E ? typeof E == "function" ? R ? [E.listener || E] : [E] : R ? P(E) : O(E, E.length) : []; } w.prototype.listeners = function(I) { return n(this, I, !0); }, w.prototype.rawListeners = function(I) { return n(this, I, !1); }, w.listenerCount = function(M, I) { return typeof M.listenerCount == "function" ? M.listenerCount(I) : o.call(M, I); }, w.prototype.listenerCount = o; function o(M) { var I = this._events; if (I) { var R = I[M]; if (typeof R == "function") return 1; if (R) return R.length; } return 0; } w.prototype.eventNames = function() { return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; }; function p(M, I) { for (var R = I, C = R + 1, E = M.length; C < E; R += 1, C += 1) M[R] = M[C]; M.pop(); } function O(M, I) { for (var R = new Array(I), C = 0; C < I; ++C) R[C] = M[C]; return R; } function P(M) { for (var I = new Array(M.length), R = 0; R < I.length; ++R) I[R] = M[R].listener || M[R]; return I; } function F(M) { var I = function() { }; return I.prototype = M, new I(); } function z(M) { for (var I in M) Object.prototype.hasOwnProperty.call(M, I); return I; } function N(M) { var I = this; return function() { return I.apply(M, arguments); }; } }, {}], 368: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("md5.js"); function g(b, w, f, y) { if (u.isBuffer(b) || (b = u.from(b, "binary")), w && (u.isBuffer(w) || (w = u.from(w, "binary")), w.length !== 8)) throw new RangeError("salt should be Buffer with 8 byte length"); for (var h = f / 8, l = u.alloc(h), d = u.alloc(y || 0), s = u.alloc(0); h > 0 || y > 0; ) { var v = new m(); v.update(s), v.update(b), w && v.update(w), s = v.digest(); var c = 0; if (h > 0) { var a = l.length - h; c = Math.min(h, s.length), s.copy(l, a, 0, c), h -= c; } if (c < s.length && y > 0) { var r = d.length - y, t = Math.min(y, s.length - c); s.copy(d, r, c, c + t), y -= t; } } return s.fill(0), { key: l, iv: d }; } x.exports = g; }, { "md5.js": 434, "safe-buffer": 494 }], 369: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }); var u = e("@fast-csv/format"); Object.defineProperty(_, "format", { enumerable: !0, get: function() { return u.format; } }), Object.defineProperty(_, "write", { enumerable: !0, get: function() { return u.write; } }), Object.defineProperty(_, "writeToStream", { enumerable: !0, get: function() { return u.writeToStream; } }), Object.defineProperty(_, "writeToBuffer", { enumerable: !0, get: function() { return u.writeToBuffer; } }), Object.defineProperty(_, "writeToString", { enumerable: !0, get: function() { return u.writeToString; } }), Object.defineProperty(_, "writeToPath", { enumerable: !0, get: function() { return u.writeToPath; } }), Object.defineProperty(_, "CsvFormatterStream", { enumerable: !0, get: function() { return u.CsvFormatterStream; } }), Object.defineProperty(_, "FormatterOptions", { enumerable: !0, get: function() { return u.FormatterOptions; } }); var m = e("@fast-csv/parse"); Object.defineProperty(_, "parse", { enumerable: !0, get: function() { return m.parse; } }), Object.defineProperty(_, "parseString", { enumerable: !0, get: function() { return m.parseString; } }), Object.defineProperty(_, "parseStream", { enumerable: !0, get: function() { return m.parseStream; } }), Object.defineProperty(_, "parseFile", { enumerable: !0, get: function() { return m.parseFile; } }), Object.defineProperty(_, "ParserOptions", { enumerable: !0, get: function() { return m.ParserOptions; } }), Object.defineProperty(_, "CsvParserStream", { enumerable: !0, get: function() { return m.CsvParserStream; } }); }, { "@fast-csv/format": 148, "@fast-csv/parse": 152 }], 370: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = e("readable-stream").Transform, g = e("inherits"); function b(f, y) { if (!u.isBuffer(f) && typeof f != "string") throw new TypeError(y + " must be a string or a buffer"); } function w(f) { m.call(this), this._block = u.allocUnsafe(f), this._blockSize = f, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1; } g(w, m), w.prototype._transform = function(f, y, h) { var l = null; try { this.update(f, y); } catch (d) { l = d; } h(l); }, w.prototype._flush = function(f) { var y = null; try { this.push(this.digest()); } catch (h) { y = h; } f(y); }, w.prototype.update = function(f, y) { if (b(f, "Data"), this._finalized) throw new Error("Digest already called"); u.isBuffer(f) || (f = u.from(f, y)); for (var h = this._block, l = 0; this._blockOffset + f.length - l >= this._blockSize; ) { for (var d = this._blockOffset; d < this._blockSize; ) h[d++] = f[l++]; this._update(), this._blockOffset = 0; } for (; l < f.length; ) h[this._blockOffset++] = f[l++]; for (var s = 0, v = f.length * 8; v > 0; ++s) this._length[s] += v, v = this._length[s] / 4294967296 | 0, v > 0 && (this._length[s] -= 4294967296 * v); return this; }, w.prototype._update = function() { throw new Error("_update is not implemented"); }, w.prototype.digest = function(f) { if (this._finalized) throw new Error("Digest already called"); this._finalized = !0; var y = this._digest(); f !== void 0 && (y = y.toString(f)), this._block.fill(0), this._blockOffset = 0; for (var h = 0; h < 4; ++h) this._length[h] = 0; return y; }, w.prototype._digest = function() { throw new Error("_digest is not implemented"); }, x.exports = w; }, { inherits: 387, "readable-stream": 491, "safe-buffer": 371 }], 371: [function(e, x, _) { arguments[4][214][0].apply(_, arguments); }, { buffer: 216, dup: 214 }], 372: [function(e, x, _) { var u = _; u.utils = e("./hash/utils"), u.common = e("./hash/common"), u.sha = e("./hash/sha"), u.ripemd = e("./hash/ripemd"), u.hmac = e("./hash/hmac"), u.sha1 = u.sha.sha1, u.sha256 = u.sha.sha256, u.sha224 = u.sha.sha224, u.sha384 = u.sha.sha384, u.sha512 = u.sha.sha512, u.ripemd160 = u.ripemd.ripemd160; }, { "./hash/common": 373, "./hash/hmac": 374, "./hash/ripemd": 375, "./hash/sha": 376, "./hash/utils": 383 }], 373: [function(e, x, _) { var u = e("./utils"), m = e("minimalistic-assert"); function g() { this.pending = null, this.pendingTotal = 0, this.blockSize = this.constructor.blockSize, this.outSize = this.constructor.outSize, this.hmacStrength = this.constructor.hmacStrength, this.padLength = this.constructor.padLength / 8, this.endian = "big", this._delta8 = this.blockSize / 8, this._delta32 = this.blockSize / 32; } _.BlockHash = g, g.prototype.update = function(w, f) { if (w = u.toArray(w, f), this.pending ? this.pending = this.pending.concat(w) : this.pending = w, this.pendingTotal += w.length, this.pending.length >= this._delta8) { w = this.pending; var y = w.length % this._delta8; this.pending = w.slice(w.length - y, w.length), this.pending.length === 0 && (this.pending = null), w = u.join32(w, 0, w.length - y, this.endian); for (var h = 0; h < w.length; h += this._delta32) this._update(w, h, h + this._delta32); } return this; }, g.prototype.digest = function(w) { return this.update(this._pad()), m(this.pending === null), this._digest(w); }, g.prototype._pad = function() { var w = this.pendingTotal, f = this._delta8, y = f - (w + this.padLength) % f, h = new Array(y + this.padLength); h[0] = 128; for (var l = 1; l < y; l++) h[l] = 0; if (w <<= 3, this.endian === "big") { for (var d = 8; d < this.padLength; d++) h[l++] = 0; h[l++] = 0, h[l++] = 0, h[l++] = 0, h[l++] = 0, h[l++] = w >>> 24 & 255, h[l++] = w >>> 16 & 255, h[l++] = w >>> 8 & 255, h[l++] = w & 255; } else for (h[l++] = w & 255, h[l++] = w >>> 8 & 255, h[l++] = w >>> 16 & 255, h[l++] = w >>> 24 & 255, h[l++] = 0, h[l++] = 0, h[l++] = 0, h[l++] = 0, d = 8; d < this.padLength; d++) h[l++] = 0; return h; }; }, { "./utils": 383, "minimalistic-assert": 437 }], 374: [function(e, x, _) { var u = e("./utils"), m = e("minimalistic-assert"); function g(b, w, f) { if (!(this instanceof g)) return new g(b, w, f); this.Hash = b, this.blockSize = b.blockSize / 8, this.outSize = b.outSize / 8, this.inner = null, this.outer = null, this._init(u.toArray(w, f)); } x.exports = g, g.prototype._init = function(w) { w.length > this.blockSize && (w = new this.Hash().update(w).digest()), m(w.length <= this.blockSize); for (var f = w.length; f < this.blockSize; f++) w.push(0); for (f = 0; f < w.length; f++) w[f] ^= 54; for (this.inner = new this.Hash().update(w), f = 0; f < w.length; f++) w[f] ^= 106; this.outer = new this.Hash().update(w); }, g.prototype.update = function(w, f) { return this.inner.update(w, f), this; }, g.prototype.digest = function(w) { return this.outer.update(this.inner.digest()), this.outer.digest(w); }; }, { "./utils": 383, "minimalistic-assert": 437 }], 375: [function(e, x, _) { var u = e("./utils"), m = e("./common"), g = u.rotl32, b = u.sum32, w = u.sum32_3, f = u.sum32_4, y = m.BlockHash; function h() { if (!(this instanceof h)) return new h(); y.call(this), this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], this.endian = "little"; } u.inherits(h, y), _.ripemd160 = h, h.blockSize = 512, h.outSize = 160, h.hmacStrength = 192, h.padLength = 64, h.prototype._update = function(i, n) { for (var o = this.h[0], p = this.h[1], O = this.h[2], P = this.h[3], F = this.h[4], z = o, N = p, M = O, I = P, R = F, C = 0; C < 80; C++) { var E = b(g(f(o, l(C, p, O, P), i[v[C] + n], d(C)), a[C]), F); o = F, F = P, P = g(O, 10), O = p, p = E, E = b(g(f(z, l(79 - C, N, M, I), i[c[C] + n], s(C)), r[C]), R), z = R, R = I, I = g(M, 10), M = N, N = E; } E = w(this.h[1], O, I), this.h[1] = w(this.h[2], P, R), this.h[2] = w(this.h[3], F, z), this.h[3] = w(this.h[4], o, N), this.h[4] = w(this.h[0], p, M), this.h[0] = E; }, h.prototype._digest = function(i) { return i === "hex" ? u.toHex32(this.h, "little") : u.split32(this.h, "little"); }; function l(t, i, n, o) { return t <= 15 ? i ^ n ^ o : t <= 31 ? i & n | ~i & o : t <= 47 ? (i | ~n) ^ o : t <= 63 ? i & o | n & ~o : i ^ (n | ~o); } function d(t) { return t <= 15 ? 0 : t <= 31 ? 1518500249 : t <= 47 ? 1859775393 : t <= 63 ? 2400959708 : 2840853838; } function s(t) { return t <= 15 ? 1352829926 : t <= 31 ? 1548603684 : t <= 47 ? 1836072691 : t <= 63 ? 2053994217 : 0; } var v = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13], c = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11], a = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6], r = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]; }, { "./common": 373, "./utils": 383 }], 376: [function(e, x, _) { _.sha1 = e("./sha/1"), _.sha224 = e("./sha/224"), _.sha256 = e("./sha/256"), _.sha384 = e("./sha/384"), _.sha512 = e("./sha/512"); }, { "./sha/1": 377, "./sha/224": 378, "./sha/256": 379, "./sha/384": 380, "./sha/512": 381 }], 377: [function(e, x, _) { var u = e("../utils"), m = e("../common"), g = e("./common"), b = u.rotl32, w = u.sum32, f = u.sum32_5, y = g.ft_1, h = m.BlockHash, l = [1518500249, 1859775393, 2400959708, 3395469782]; function d() { if (!(this instanceof d)) return new d(); h.call(this), this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], this.W = new Array(80); } u.inherits(d, h), x.exports = d, d.blockSize = 512, d.outSize = 160, d.hmacStrength = 80, d.padLength = 64, d.prototype._update = function(v, c) { for (var a = this.W, r = 0; r < 16; r++) a[r] = v[c + r]; for (; r < a.length; r++) a[r] = b(a[r - 3] ^ a[r - 8] ^ a[r - 14] ^ a[r - 16], 1); var t = this.h[0], i = this.h[1], n = this.h[2], o = this.h[3], p = this.h[4]; for (r = 0; r < a.length; r++) { var O = ~~(r / 20), P = f(b(t, 5), y(O, i, n, o), p, a[r], l[O]); p = o, o = n, n = b(i, 30), i = t, t = P; } this.h[0] = w(this.h[0], t), this.h[1] = w(this.h[1], i), this.h[2] = w(this.h[2], n), this.h[3] = w(this.h[3], o), this.h[4] = w(this.h[4], p); }, d.prototype._digest = function(v) { return v === "hex" ? u.toHex32(this.h, "big") : u.split32(this.h, "big"); }; }, { "../common": 373, "../utils": 383, "./common": 382 }], 378: [function(e, x, _) { var u = e("../utils"), m = e("./256"); function g() { if (!(this instanceof g)) return new g(); m.call(this), this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]; } u.inherits(g, m), x.exports = g, g.blockSize = 512, g.outSize = 224, g.hmacStrength = 192, g.padLength = 64, g.prototype._digest = function(w) { return w === "hex" ? u.toHex32(this.h.slice(0, 7), "big") : u.split32(this.h.slice(0, 7), "big"); }; }, { "../utils": 383, "./256": 379 }], 379: [function(e, x, _) { var u = e("../utils"), m = e("../common"), g = e("./common"), b = e("minimalistic-assert"), w = u.sum32, f = u.sum32_4, y = u.sum32_5, h = g.ch32, l = g.maj32, d = g.s0_256, s = g.s1_256, v = g.g0_256, c = g.g1_256, a = m.BlockHash, r = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]; function t() { if (!(this instanceof t)) return new t(); a.call(this), this.h = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], this.k = r, this.W = new Array(64); } u.inherits(t, a), x.exports = t, t.blockSize = 512, t.outSize = 256, t.hmacStrength = 192, t.padLength = 64, t.prototype._update = function(n, o) { for (var p = this.W, O = 0; O < 16; O++) p[O] = n[o + O]; for (; O < p.length; O++) p[O] = f(c(p[O - 2]), p[O - 7], v(p[O - 15]), p[O - 16]); var P = this.h[0], F = this.h[1], z = this.h[2], N = this.h[3], M = this.h[4], I = this.h[5], R = this.h[6], C = this.h[7]; for (b(this.k.length === p.length), O = 0; O < p.length; O++) { var E = y(C, s(M), h(M, I, R), this.k[O], p[O]), A = w(d(P), l(P, F, z)); C = R, R = I, I = M, M = w(N, E), N = z, z = F, F = P, P = w(E, A); } this.h[0] = w(this.h[0], P), this.h[1] = w(this.h[1], F), this.h[2] = w(this.h[2], z), this.h[3] = w(this.h[3], N), this.h[4] = w(this.h[4], M), this.h[5] = w(this.h[5], I), this.h[6] = w(this.h[6], R), this.h[7] = w(this.h[7], C); }, t.prototype._digest = function(n) { return n === "hex" ? u.toHex32(this.h, "big") : u.split32(this.h, "big"); }; }, { "../common": 373, "../utils": 383, "./common": 382, "minimalistic-assert": 437 }], 380: [function(e, x, _) { var u = e("../utils"), m = e("./512"); function g() { if (!(this instanceof g)) return new g(); m.call(this), this.h = [3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428]; } u.inherits(g, m), x.exports = g, g.blockSize = 1024, g.outSize = 384, g.hmacStrength = 192, g.padLength = 128, g.prototype._digest = function(w) { return w === "hex" ? u.toHex32(this.h.slice(0, 12), "big") : u.split32(this.h.slice(0, 12), "big"); }; }, { "../utils": 383, "./512": 381 }], 381: [function(e, x, _) { var u = e("../utils"), m = e("../common"), g = e("minimalistic-assert"), b = u.rotr64_hi, w = u.rotr64_lo, f = u.shr64_hi, y = u.shr64_lo, h = u.sum64, l = u.sum64_hi, d = u.sum64_lo, s = u.sum64_4_hi, v = u.sum64_4_lo, c = u.sum64_5_hi, a = u.sum64_5_lo, r = m.BlockHash, t = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591]; function i() { if (!(this instanceof i)) return new i(); r.call(this), this.h = [1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209], this.k = t, this.W = new Array(160); } u.inherits(i, r), x.exports = i, i.blockSize = 1024, i.outSize = 512, i.hmacStrength = 192, i.padLength = 128, i.prototype._prepareBlock = function(A, L) { for (var $ = this.W, W = 0; W < 32; W++) $[W] = A[L + W]; for (; W < $.length; W += 2) { var U = R($[W - 4], $[W - 3]), D = C($[W - 4], $[W - 3]), B = $[W - 14], j = $[W - 13], V = M($[W - 30], $[W - 29]), re = I($[W - 30], $[W - 29]), ee = $[W - 32], ce = $[W - 31]; $[W] = s(U, D, B, j, V, re, ee, ce), $[W + 1] = v(U, D, B, j, V, re, ee, ce); } }, i.prototype._update = function(A, L) { this._prepareBlock(A, L); var $ = this.W, W = this.h[0], U = this.h[1], D = this.h[2], B = this.h[3], j = this.h[4], V = this.h[5], re = this.h[6], ee = this.h[7], ce = this.h[8], ve = this.h[9], ge = this.h[10], oe = this.h[11], J = this.h[12], Q = this.h[13], he = this.h[14], ke = this.h[15]; g(this.k.length === $.length); for (var ne = 0; ne < $.length; ne += 2) { var se = he, Ce = ke, q = z(ce, ve), G = N(ce, ve), Y = n(ce, ve, ge, oe, J), fe = o(ce, ve, ge, oe, J, Q), we = this.k[ne], _e = this.k[ne + 1], je = $[ne], Ye = $[ne + 1], nt = c(se, Ce, q, G, Y, fe, we, _e, je, Ye), ut = a(se, Ce, q, G, Y, fe, we, _e, je, Ye); se = P(W, U), Ce = F(W, U), q = p(W, U, D, B, j), G = O(W, U, D, B, j, V); var ot = l(se, Ce, q, G), Ue = d(se, Ce, q, G); he = J, ke = Q, J = ge, Q = oe, ge = ce, oe = ve, ce = l(re, ee, nt, ut), ve = d(ee, ee, nt, ut), re = j, ee = V, j = D, V = B, D = W, B = U, W = l(nt, ut, ot, Ue), U = d(nt, ut, ot, Ue); } h(this.h, 0, W, U), h(this.h, 2, D, B), h(this.h, 4, j, V), h(this.h, 6, re, ee), h(this.h, 8, ce, ve), h(this.h, 10, ge, oe), h(this.h, 12, J, Q), h(this.h, 14, he, ke); }, i.prototype._digest = function(A) { return A === "hex" ? u.toHex32(this.h, "big") : u.split32(this.h, "big"); }; function n(E, A, L, $, W) { var U = E & L ^ ~E & W; return U < 0 && (U += 4294967296), U; } function o(E, A, L, $, W, U) { var D = A & $ ^ ~A & U; return D < 0 && (D += 4294967296), D; } function p(E, A, L, $, W) { var U = E & L ^ E & W ^ L & W; return U < 0 && (U += 4294967296), U; } function O(E, A, L, $, W, U) { var D = A & $ ^ A & U ^ $ & U; return D < 0 && (D += 4294967296), D; } function P(E, A) { var L = b(E, A, 28), $ = b(A, E, 2), W = b(A, E, 7), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function F(E, A) { var L = w(E, A, 28), $ = w(A, E, 2), W = w(A, E, 7), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function z(E, A) { var L = b(E, A, 14), $ = b(E, A, 18), W = b(A, E, 9), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function N(E, A) { var L = w(E, A, 14), $ = w(E, A, 18), W = w(A, E, 9), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function M(E, A) { var L = b(E, A, 1), $ = b(E, A, 8), W = f(E, A, 7), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function I(E, A) { var L = w(E, A, 1), $ = w(E, A, 8), W = y(E, A, 7), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function R(E, A) { var L = b(E, A, 19), $ = b(A, E, 29), W = f(E, A, 6), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } function C(E, A) { var L = w(E, A, 19), $ = w(A, E, 29), W = y(E, A, 6), U = L ^ $ ^ W; return U < 0 && (U += 4294967296), U; } }, { "../common": 373, "../utils": 383, "minimalistic-assert": 437 }], 382: [function(e, x, _) { var u = e("../utils"), m = u.rotr32; function g(s, v, c, a) { if (s === 0) return b(v, c, a); if (s === 1 || s === 3) return f(v, c, a); if (s === 2) return w(v, c, a); } _.ft_1 = g; function b(s, v, c) { return s & v ^ ~s & c; } _.ch32 = b; function w(s, v, c) { return s & v ^ s & c ^ v & c; } _.maj32 = w; function f(s, v, c) { return s ^ v ^ c; } _.p32 = f; function y(s) { return m(s, 2) ^ m(s, 13) ^ m(s, 22); } _.s0_256 = y; function h(s) { return m(s, 6) ^ m(s, 11) ^ m(s, 25); } _.s1_256 = h; function l(s) { return m(s, 7) ^ m(s, 18) ^ s >>> 3; } _.g0_256 = l; function d(s) { return m(s, 17) ^ m(s, 19) ^ s >>> 10; } _.g1_256 = d; }, { "../utils": 383 }], 383: [function(e, x, _) { var u = e("minimalistic-assert"), m = e("inherits"); _.inherits = m; function g(C, E) { return (C.charCodeAt(E) & 64512) !== 55296 || E < 0 || E + 1 >= C.length ? !1 : (C.charCodeAt(E + 1) & 64512) === 56320; } function b(C, E) { if (Array.isArray(C)) return C.slice(); if (!C) return []; var A = []; if (typeof C == "string") if (E) { if (E === "hex") for (C = C.replace(/[^a-z0-9]+/ig, ""), C.length % 2 !== 0 && (C = "0" + C), $ = 0; $ < C.length; $ += 2) A.push(parseInt(C[$] + C[$ + 1], 16)); } else for (var L = 0, $ = 0; $ < C.length; $++) { var W = C.charCodeAt($); W < 128 ? A[L++] = W : W < 2048 ? (A[L++] = W >> 6 | 192, A[L++] = W & 63 | 128) : g(C, $) ? (W = 65536 + ((W & 1023) << 10) + (C.charCodeAt(++$) & 1023), A[L++] = W >> 18 | 240, A[L++] = W >> 12 & 63 | 128, A[L++] = W >> 6 & 63 | 128, A[L++] = W & 63 | 128) : (A[L++] = W >> 12 | 224, A[L++] = W >> 6 & 63 | 128, A[L++] = W & 63 | 128); } else for ($ = 0; $ < C.length; $++) A[$] = C[$] | 0; return A; } _.toArray = b; function w(C) { for (var E = "", A = 0; A < C.length; A++) E += h(C[A].toString(16)); return E; } _.toHex = w; function f(C) { var E = C >>> 24 | C >>> 8 & 65280 | C << 8 & 16711680 | (C & 255) << 24; return E >>> 0; } _.htonl = f; function y(C, E) { for (var A = "", L = 0; L < C.length; L++) { var $ = C[L]; E === "little" && ($ = f($)), A += l($.toString(16)); } return A; } _.toHex32 = y; function h(C) { return C.length === 1 ? "0" + C : C; } _.zero2 = h; function l(C) { return C.length === 7 ? "0" + C : C.length === 6 ? "00" + C : C.length === 5 ? "000" + C : C.length === 4 ? "0000" + C : C.length === 3 ? "00000" + C : C.length === 2 ? "000000" + C : C.length === 1 ? "0000000" + C : C; } _.zero8 = l; function d(C, E, A, L) { var $ = A - E; u($ % 4 === 0); for (var W = new Array($ / 4), U = 0, D = E; U < W.length; U++, D += 4) { var B; L === "big" ? B = C[D] << 24 | C[D + 1] << 16 | C[D + 2] << 8 | C[D + 3] : B = C[D + 3] << 24 | C[D + 2] << 16 | C[D + 1] << 8 | C[D], W[U] = B >>> 0; } return W; } _.join32 = d; function s(C, E) { for (var A = new Array(C.length * 4), L = 0, $ = 0; L < C.length; L++, $ += 4) { var W = C[L]; E === "big" ? (A[$] = W >>> 24, A[$ + 1] = W >>> 16 & 255, A[$ + 2] = W >>> 8 & 255, A[$ + 3] = W & 255) : (A[$ + 3] = W >>> 24, A[$ + 2] = W >>> 16 & 255, A[$ + 1] = W >>> 8 & 255, A[$] = W & 255); } return A; } _.split32 = s; function v(C, E) { return C >>> E | C << 32 - E; } _.rotr32 = v; function c(C, E) { return C << E | C >>> 32 - E; } _.rotl32 = c; function a(C, E) { return C + E >>> 0; } _.sum32 = a; function r(C, E, A) { return C + E + A >>> 0; } _.sum32_3 = r; function t(C, E, A, L) { return C + E + A + L >>> 0; } _.sum32_4 = t; function i(C, E, A, L, $) { return C + E + A + L + $ >>> 0; } _.sum32_5 = i; function n(C, E, A, L) { var $ = C[E], W = C[E + 1], U = L + W >>> 0, D = (U < L ? 1 : 0) + A + $; C[E] = D >>> 0, C[E + 1] = U; } _.sum64 = n; function o(C, E, A, L) { var $ = E + L >>> 0, W = ($ < E ? 1 : 0) + C + A; return W >>> 0; } _.sum64_hi = o; function p(C, E, A, L) { var $ = E + L; return $ >>> 0; } _.sum64_lo = p; function O(C, E, A, L, $, W, U, D) { var B = 0, j = E; j = j + L >>> 0, B += j < E ? 1 : 0, j = j + W >>> 0, B += j < W ? 1 : 0, j = j + D >>> 0, B += j < D ? 1 : 0; var V = C + A + $ + U + B; return V >>> 0; } _.sum64_4_hi = O; function P(C, E, A, L, $, W, U, D) { var B = E + L + W + D; return B >>> 0; } _.sum64_4_lo = P; function F(C, E, A, L, $, W, U, D, B, j) { var V = 0, re = E; re = re + L >>> 0, V += re < E ? 1 : 0, re = re + W >>> 0, V += re < W ? 1 : 0, re = re + D >>> 0, V += re < D ? 1 : 0, re = re + j >>> 0, V += re < j ? 1 : 0; var ee = C + A + $ + U + B + V; return ee >>> 0; } _.sum64_5_hi = F; function z(C, E, A, L, $, W, U, D, B, j) { var V = E + L + W + D + j; return V >>> 0; } _.sum64_5_lo = z; function N(C, E, A) { var L = E << 32 - A | C >>> A; return L >>> 0; } _.rotr64_hi = N; function M(C, E, A) { var L = C << 32 - A | E >>> A; return L >>> 0; } _.rotr64_lo = M; function I(C, E, A) { return C >>> A; } _.shr64_hi = I; function R(C, E, A) { var L = C << 32 - A | E >>> A; return L >>> 0; } _.shr64_lo = R; }, { inherits: 387, "minimalistic-assert": 437 }], 384: [function(e, x, _) { var u = e("hash.js"), m = e("minimalistic-crypto-utils"), g = e("minimalistic-assert"); function b(w) { if (!(this instanceof b)) return new b(w); this.hash = w.hash, this.predResist = !!w.predResist, this.outLen = this.hash.outSize, this.minEntropy = w.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null; var f = m.toArray(w.entropy, w.entropyEnc || "hex"), y = m.toArray(w.nonce, w.nonceEnc || "hex"), h = m.toArray(w.pers, w.persEnc || "hex"); g(f.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits"), this._init(f, y, h); } x.exports = b, b.prototype._init = function(f, y, h) { var l = f.concat(y).concat(h); this.K = new Array(this.outLen / 8), this.V = new Array(this.outLen / 8); for (var d = 0; d < this.V.length; d++) this.K[d] = 0, this.V[d] = 1; this._update(l), this._reseed = 1, this.reseedInterval = 281474976710656; }, b.prototype._hmac = function() { return new u.hmac(this.hash, this.K); }, b.prototype._update = function(f) { var y = this._hmac().update(this.V).update([0]); f && (y = y.update(f)), this.K = y.digest(), this.V = this._hmac().update(this.V).digest(), f && (this.K = this._hmac().update(this.V).update([1]).update(f).digest(), this.V = this._hmac().update(this.V).digest()); }, b.prototype.reseed = function(f, y, h, l) { typeof y != "string" && (l = h, h = y, y = null), f = m.toArray(f, y), h = m.toArray(h, l), g(f.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits"), this._update(f.concat(h || [])), this._reseed = 1; }, b.prototype.generate = function(f, y, h, l) { if (this._reseed > this.reseedInterval) throw new Error("Reseed is required"); typeof y != "string" && (l = h, h = y, y = null), h && (h = m.toArray(h, l || "hex"), this._update(h)); for (var d = []; d.length < f; ) this.V = this._hmac().update(this.V).digest(), d = d.concat(this.V); var s = d.slice(0, f); return this._update(h), this._reseed++, m.encode(s, y); }; }, { "hash.js": 372, "minimalistic-assert": 437, "minimalistic-crypto-utils": 438 }], 385: [function(e, x, _) { _.read = function(u, m, g, b, w) { var f, y, h = w * 8 - b - 1, l = (1 << h) - 1, d = l >> 1, s = -7, v = g ? w - 1 : 0, c = g ? -1 : 1, a = u[m + v]; for (v += c, f = a & (1 << -s) - 1, a >>= -s, s += h; s > 0; f = f * 256 + u[m + v], v += c, s -= 8) ; for (y = f & (1 << -s) - 1, f >>= -s, s += b; s > 0; y = y * 256 + u[m + v], v += c, s -= 8) ; if (f === 0) f = 1 - d; else { if (f === l) return y ? NaN : (a ? -1 : 1) * (1 / 0); y = y + Math.pow(2, b), f = f - d; } return (a ? -1 : 1) * y * Math.pow(2, f - b); }, _.write = function(u, m, g, b, w, f) { var y, h, l, d = f * 8 - w - 1, s = (1 << d) - 1, v = s >> 1, c = w === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, a = b ? 0 : f - 1, r = b ? 1 : -1, t = m < 0 || m === 0 && 1 / m < 0 ? 1 : 0; for (m = Math.abs(m), isNaN(m) || m === 1 / 0 ? (h = isNaN(m) ? 1 : 0, y = s) : (y = Math.floor(Math.log(m) / Math.LN2), m * (l = Math.pow(2, -y)) < 1 && (y--, l *= 2), y + v >= 1 ? m += c / l : m += c * Math.pow(2, 1 - v), m * l >= 2 && (y++, l /= 2), y + v >= s ? (h = 0, y = s) : y + v >= 1 ? (h = (m * l - 1) * Math.pow(2, w), y = y + v) : (h = m * Math.pow(2, v - 1) * Math.pow(2, w), y = 0)); w >= 8; u[g + a] = h & 255, a += r, h /= 256, w -= 8) ; for (y = y << w | h, d += w; d > 0; u[g + a] = y & 255, a += r, y /= 256, d -= 8) ; u[g + a - r] |= t * 128; }; }, {}], 386: [function(e, x, _) { (function(u) { var m = u.MutationObserver || u.WebKitMutationObserver, g; if (m) { var b = 0, w = new m(d), f = u.document.createTextNode(""); w.observe(f, { characterData: !0 }), g = function() { f.data = b = ++b % 2; }; } else if (!u.setImmediate && typeof u.MessageChannel != "undefined") { var y = new u.MessageChannel(); y.port1.onmessage = d, g = function() { y.port2.postMessage(0); }; } else "document" in u && "onreadystatechange" in u.document.createElement("script") ? g = function() { var c = u.document.createElement("script"); c.onreadystatechange = function() { d(), c.onreadystatechange = null, c.parentNode.removeChild(c), c = null; }, u.document.documentElement.appendChild(c); } : g = function() { setTimeout(d, 0); }; var h, l = []; function d() { h = !0; for (var v, c, a = l.length; a; ) { for (c = l, l = [], v = -1; ++v < a; ) c[v](); a = l.length; } h = !1; } x.exports = s; function s(v) { l.push(v) === 1 && !h && g(); } }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 387: [function(e, x, _) { typeof Object.create == "function" ? x.exports = function(m, g) { g && (m.super_ = g, m.prototype = Object.create(g.prototype, { constructor: { value: m, enumerable: !1, writable: !0, configurable: !0 } })); } : x.exports = function(m, g) { if (g) { m.super_ = g; var b = function() { }; b.prototype = g.prototype, m.prototype = new b(), m.prototype.constructor = m; } }; }, {}], 388: [function(e, x, _) { /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ x.exports = function(g) { return g != null && (u(g) || m(g) || !!g._isBuffer); }; function u(g) { return !!g.constructor && typeof g.constructor.isBuffer == "function" && g.constructor.isBuffer(g); } function m(g) { return typeof g.readFloatLE == "function" && typeof g.slice == "function" && u(g.slice(0, 0)); } }, {}], 389: [function(e, x, _) { var u = {}.toString; x.exports = Array.isArray || function(m) { return u.call(m) == "[object Array]"; }; }, {}], 390: [function(e, x, _) { var u = e("./utils"), m = e("./support"), g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; _.encode = function(b) { for (var w = [], f, y, h, l, d, s, v, c = 0, a = b.length, r = a, t = u.getTypeOf(b) !== "string"; c < b.length; ) r = a - c, t ? (f = b[c++], y = c < a ? b[c++] : 0, h = c < a ? b[c++] : 0) : (f = b.charCodeAt(c++), y = c < a ? b.charCodeAt(c++) : 0, h = c < a ? b.charCodeAt(c++) : 0), l = f >> 2, d = (f & 3) << 4 | y >> 4, s = r > 1 ? (y & 15) << 2 | h >> 6 : 64, v = r > 2 ? h & 63 : 64, w.push(g.charAt(l) + g.charAt(d) + g.charAt(s) + g.charAt(v)); return w.join(""); }, _.decode = function(b) { var w, f, y, h, l, d, s, v = 0, c = 0, a = "data:"; if (b.substr(0, a.length) === a) throw new Error("Invalid base64 input, it looks like a data url."); b = b.replace(/[^A-Za-z0-9\+\/\=]/g, ""); var r = b.length * 3 / 4; if (b.charAt(b.length - 1) === g.charAt(64) && r--, b.charAt(b.length - 2) === g.charAt(64) && r--, r % 1 !== 0) throw new Error("Invalid base64 input, bad content length."); var t; for (m.uint8array ? t = new Uint8Array(r | 0) : t = new Array(r | 0); v < b.length; ) h = g.indexOf(b.charAt(v++)), l = g.indexOf(b.charAt(v++)), d = g.indexOf(b.charAt(v++)), s = g.indexOf(b.charAt(v++)), w = h << 2 | l >> 4, f = (l & 15) << 4 | d >> 2, y = (d & 3) << 6 | s, t[c++] = w, d !== 64 && (t[c++] = f), s !== 64 && (t[c++] = y); return t; }; }, { "./support": 419, "./utils": 421 }], 391: [function(e, x, _) { var u = e("./external"), m = e("./stream/DataWorker"), b = e("./stream/DataLengthProbe"), g = e("./stream/Crc32Probe"), b = e("./stream/DataLengthProbe"); function w(f, y, h, l, d) { this.compressedSize = f, this.uncompressedSize = y, this.crc32 = h, this.compression = l, this.compressedContent = d; } w.prototype = { /** * Create a worker to get the uncompressed content. * @return {GenericWorker} the worker. */ getContentWorker: function() { var y = new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new b("data_length")), h = this; return y.on("end", function() { if (this.streamInfo.data_length !== h.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch"); }), y; }, /** * Create a worker to get the compressed content. * @return {GenericWorker} the worker. */ getCompressedWorker: function() { return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression); } }, w.createWorkerFrom = function(f, y, h) { return f.pipe(new g()).pipe(new b("uncompressedSize")).pipe(y.compressWorker(h)).pipe(new b("compressedSize")).withStreamInfo("compression", y); }, x.exports = w; }, { "./external": 395, "./stream/Crc32Probe": 414, "./stream/DataLengthProbe": 415, "./stream/DataWorker": 416 }], 392: [function(e, x, _) { var u = e("./stream/GenericWorker"); _.STORE = { magic: "\0\0", compressWorker: function(g) { return new u("STORE compression"); }, uncompressWorker: function() { return new u("STORE decompression"); } }, _.DEFLATE = e("./flate"); }, { "./flate": 396, "./stream/GenericWorker": 417 }], 393: [function(e, x, _) { var u = e("./utils"); function m() { for (var f, y = [], h = 0; h < 256; h++) { f = h; for (var l = 0; l < 8; l++) f = f & 1 ? 3988292384 ^ f >>> 1 : f >>> 1; y[h] = f; } return y; } var g = m(); function b(f, y, h, l) { var d = g, s = l + h; f = f ^ -1; for (var v = l; v < s; v++) f = f >>> 8 ^ d[(f ^ y[v]) & 255]; return f ^ -1; } function w(f, y, h, l) { var d = g, s = l + h; f = f ^ -1; for (var v = l; v < s; v++) f = f >>> 8 ^ d[(f ^ y.charCodeAt(v)) & 255]; return f ^ -1; } x.exports = function(y, h) { if (typeof y == "undefined" || !y.length) return 0; var l = u.getTypeOf(y) !== "string"; return l ? b(h | 0, y, y.length, 0) : w(h | 0, y, y.length, 0); }; }, { "./utils": 421 }], 394: [function(e, x, _) { _.base64 = !1, _.binary = !1, _.dir = !1, _.createFolders = !0, _.date = null, _.compression = null, _.compressionOptions = null, _.comment = null, _.unixPermissions = null, _.dosPermissions = null; }, {}], 395: [function(e, x, _) { var u = null; typeof Promise != "undefined" ? u = Promise : u = e("lie"), x.exports = { Promise: u }; }, { lie: 425 }], 396: [function(e, x, _) { var u = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Uint32Array != "undefined", m = e("pako"), g = e("./utils"), b = e("./stream/GenericWorker"), w = u ? "uint8array" : "array"; _.magic = "\b\0"; function f(y, h) { b.call(this, "FlateWorker/" + y), this._pako = null, this._pakoAction = y, this._pakoOptions = h, this.meta = {}; } g.inherits(f, b), f.prototype.processChunk = function(y) { this.meta = y.meta, this._pako === null && this._createPako(), this._pako.push(g.transformTo(w, y.data), !1); }, f.prototype.flush = function() { b.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0); }, f.prototype.cleanUp = function() { b.prototype.cleanUp.call(this), this._pako = null; }, f.prototype._createPako = function() { this._pako = new m[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 // default compression }); var y = this; this._pako.onData = function(h) { y.push({ data: h, meta: y.meta }); }; }, _.compressWorker = function(y) { return new f("Deflate", y); }, _.uncompressWorker = function() { return new f("Inflate", {}); }; }, { "./stream/GenericWorker": 417, "./utils": 421, pako: 439 }], 397: [function(e, x, _) { var u = e("../utils"), m = e("../stream/GenericWorker"), g = e("../utf8"), b = e("../crc32"), w = e("../signature"), f = function(a, r) { var t = "", i; for (i = 0; i < r; i++) t += String.fromCharCode(a & 255), a = a >>> 8; return t; }, y = function(a, r) { var t = a; return a || (t = r ? 16893 : 33204), (t & 65535) << 16; }, h = function(a, r) { return (a || 0) & 63; }, l = function(a, r, t, i, n, o) { var p = a.file, O = a.compression, P = o !== g.utf8encode, F = u.transformTo("string", o(p.name)), z = u.transformTo("string", g.utf8encode(p.name)), N = p.comment, M = u.transformTo("string", o(N)), I = u.transformTo("string", g.utf8encode(N)), R = z.length !== p.name.length, C = I.length !== N.length, E, A, L = "", $ = "", W = "", U = p.dir, D = p.date, B = { crc32: 0, compressedSize: 0, uncompressedSize: 0 }; (!r || t) && (B.crc32 = a.crc32, B.compressedSize = a.compressedSize, B.uncompressedSize = a.uncompressedSize); var j = 0; r && (j |= 8), !P && (R || C) && (j |= 2048); var V = 0, re = 0; U && (V |= 16), n === "UNIX" ? (re = 798, V |= y(p.unixPermissions, U)) : (re = 20, V |= h(p.dosPermissions)), E = D.getUTCHours(), E = E << 6, E = E | D.getUTCMinutes(), E = E << 5, E = E | D.getUTCSeconds() / 2, A = D.getUTCFullYear() - 1980, A = A << 4, A = A | D.getUTCMonth() + 1, A = A << 5, A = A | D.getUTCDate(), R && ($ = // Version f(1, 1) + // NameCRC32 f(b(F), 4) + // UnicodeName z, L += // Info-ZIP Unicode Path Extra Field "up" + // size f($.length, 2) + // content $), C && (W = // Version f(1, 1) + // CommentCRC32 f(b(M), 4) + // UnicodeName I, L += // Info-ZIP Unicode Path Extra Field "uc" + // size f(W.length, 2) + // content W); var ee = ""; ee += ` \0`, ee += f(j, 2), ee += O.magic, ee += f(E, 2), ee += f(A, 2), ee += f(B.crc32, 4), ee += f(B.compressedSize, 4), ee += f(B.uncompressedSize, 4), ee += f(F.length, 2), ee += f(L.length, 2); var ce = w.LOCAL_FILE_HEADER + ee + F + L, ve = w.CENTRAL_FILE_HEADER + // version made by (00: DOS) f(re, 2) + // file header (common to file and central directory) ee + // file comment length f(M.length, 2) + // disk number start "\0\0\0\0" + // external file attributes f(V, 4) + // relative offset of local header f(i, 4) + // file name F + // extra field L + // file comment M; return { fileRecord: ce, dirRecord: ve }; }, d = function(a, r, t, i, n) { var o = "", p = u.transformTo("string", n(i)); return o = w.CENTRAL_DIRECTORY_END + // number of this disk "\0\0\0\0" + // total number of entries in the central directory on this disk f(a, 2) + // total number of entries in the central directory f(a, 2) + // size of the central directory 4 bytes f(r, 4) + // offset of start of central directory with respect to the starting disk number f(t, 4) + // .ZIP file comment length f(p.length, 2) + // .ZIP file comment p, o; }, s = function(a) { var r = ""; return r = w.DATA_DESCRIPTOR + // crc-32 4 bytes f(a.crc32, 4) + // compressed size 4 bytes f(a.compressedSize, 4) + // uncompressed size 4 bytes f(a.uncompressedSize, 4), r; }; function v(c, a, r, t) { m.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = a, this.zipPlatform = r, this.encodeFileName = t, this.streamFiles = c, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = []; } u.inherits(v, m), v.prototype.push = function(c) { var a = c.meta.percent || 0, r = this.entriesCount, t = this._sources.length; this.accumulate ? this.contentBuffer.push(c) : (this.bytesWritten += c.data.length, m.prototype.push.call(this, { data: c.data, meta: { currentFile: this.currentFile, percent: r ? (a + 100 * (r - t - 1)) / r : 100 } })); }, v.prototype.openedSource = function(c) { this.currentSourceOffset = this.bytesWritten, this.currentFile = c.file.name; var a = this.streamFiles && !c.file.dir; if (a) { var r = l(c, a, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); this.push({ data: r.fileRecord, meta: { percent: 0 } }); } else this.accumulate = !0; }, v.prototype.closedSource = function(c) { this.accumulate = !1; var a = this.streamFiles && !c.file.dir, r = l(c, a, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); if (this.dirRecords.push(r.dirRecord), a) this.push({ data: s(c), meta: { percent: 100 } }); else for (this.push({ data: r.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift()); this.currentFile = null; }, v.prototype.flush = function() { for (var c = this.bytesWritten, a = 0; a < this.dirRecords.length; a++) this.push({ data: this.dirRecords[a], meta: { percent: 100 } }); var r = this.bytesWritten - c, t = d(this.dirRecords.length, r, c, this.zipComment, this.encodeFileName); this.push({ data: t, meta: { percent: 100 } }); }, v.prototype.prepareNextSource = function() { this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume(); }, v.prototype.registerPrevious = function(c) { this._sources.push(c); var a = this; return c.on("data", function(r) { a.processChunk(r); }), c.on("end", function() { a.closedSource(a.previous.streamInfo), a._sources.length ? a.prepareNextSource() : a.end(); }), c.on("error", function(r) { a.error(r); }), this; }, v.prototype.resume = function() { if (!m.prototype.resume.call(this)) return !1; if (!this.previous && this._sources.length) return this.prepareNextSource(), !0; if (!this.previous && !this._sources.length && !this.generatedError) return this.end(), !0; }, v.prototype.error = function(c) { var a = this._sources; if (!m.prototype.error.call(this, c)) return !1; for (var r = 0; r < a.length; r++) try { a[r].error(c); } catch (t) { } return !0; }, v.prototype.lock = function() { m.prototype.lock.call(this); for (var c = this._sources, a = 0; a < c.length; a++) c[a].lock(); }, x.exports = v; }, { "../crc32": 393, "../signature": 412, "../stream/GenericWorker": 417, "../utf8": 420, "../utils": 421 }], 398: [function(e, x, _) { var u = e("../compressions"), m = e("./ZipFileWorker"), g = function(w, f) { var y = w || f, h = u[y]; if (!h) throw new Error(y + " is not a valid compression method !"); return h; }; _.generateWorker = function(b, w, f) { var y = new m(w.streamFiles, f, w.platform, w.encodeFileName), h = 0; try { b.forEach(function(l, d) { h++; var s = g(d.options.compression, w.compression), v = d.options.compressionOptions || w.compressionOptions || {}, c = d.dir, a = d.date; d._compressWorker(s, v).withStreamInfo("file", { name: l, dir: c, date: a, comment: d.comment || "", unixPermissions: d.unixPermissions, dosPermissions: d.dosPermissions }).pipe(y); }), y.entriesCount = h; } catch (l) { y.error(l); } return y; }; }, { "../compressions": 392, "./ZipFileWorker": 397 }], 399: [function(e, x, _) { function u() { if (!(this instanceof u)) return new u(); if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); this.files = {}, this.comment = null, this.root = "", this.clone = function() { var m = new u(); for (var g in this) typeof this[g] != "function" && (m[g] = this[g]); return m; }; } u.prototype = e("./object"), u.prototype.loadAsync = e("./load"), u.support = e("./support"), u.defaults = e("./defaults"), u.version = "3.5.0", u.loadAsync = function(m, g) { return new u().loadAsync(m, g); }, u.external = e("./external"), x.exports = u; }, { "./defaults": 394, "./external": 395, "./load": 400, "./object": 404, "./support": 419 }], 400: [function(e, x, _) { var g = e("./utils"), u = e("./external"), m = e("./utf8"), g = e("./utils"), b = e("./zipEntries"), w = e("./stream/Crc32Probe"), f = e("./nodejsUtils"); function y(h) { return new u.Promise(function(l, d) { var s = h.decompressed.getContentWorker().pipe(new w()); s.on("error", function(v) { d(v); }).on("end", function() { s.streamInfo.crc32 !== h.decompressed.crc32 ? d(new Error("Corrupted zip : CRC32 mismatch")) : l(); }).resume(); }); } x.exports = function(h, l) { var d = this; return l = g.extend(l || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: m.utf8decode }), f.isNode && f.isStream(h) ? u.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : g.prepareContent("the loaded zip file", h, !0, l.optimizedBinaryString, l.base64).then(function(s) { var v = new b(l); return v.load(s), v; }).then(function(v) { var c = [u.Promise.resolve(v)], a = v.files; if (l.checkCRC32) for (var r = 0; r < a.length; r++) c.push(y(a[r])); return u.Promise.all(c); }).then(function(v) { for (var c = v.shift(), a = c.files, r = 0; r < a.length; r++) { var t = a[r]; d.file(t.fileNameStr, t.decompressed, { binary: !0, optimizedBinaryString: !0, date: t.date, dir: t.dir, comment: t.fileCommentStr.length ? t.fileCommentStr : null, unixPermissions: t.unixPermissions, dosPermissions: t.dosPermissions, createFolders: l.createFolders }); } return c.zipComment.length && (d.comment = c.zipComment), d; }); }; }, { "./external": 395, "./nodejsUtils": 403, "./stream/Crc32Probe": 414, "./utf8": 420, "./utils": 421, "./zipEntries": 422 }], 401: [function(e, x, _) { var u = e("../utils"), m = e("../stream/GenericWorker"); function g(b, w) { m.call(this, "Nodejs stream input adapter for " + b), this._upstreamEnded = !1, this._bindStream(w); } u.inherits(g, m), g.prototype._bindStream = function(b) { var w = this; this._stream = b, b.pause(), b.on("data", function(f) { w.push({ data: f, meta: { percent: 0 } }); }).on("error", function(f) { w.isPaused ? this.generatedError = f : w.error(f); }).on("end", function() { w.isPaused ? w._upstreamEnded = !0 : w.end(); }); }, g.prototype.pause = function() { return m.prototype.pause.call(this) ? (this._stream.pause(), !0) : !1; }, g.prototype.resume = function() { return m.prototype.resume.call(this) ? (this._upstreamEnded ? this.end() : this._stream.resume(), !0) : !1; }, x.exports = g; }, { "../stream/GenericWorker": 417, "../utils": 421 }], 402: [function(e, x, _) { var u = e("readable-stream").Readable, m = e("../utils"); m.inherits(g, u); function g(b, w, f) { u.call(this, w), this._helper = b; var y = this; b.on("data", function(h, l) { y.push(h) || y._helper.pause(), f && f(l); }).on("error", function(h) { y.emit("error", h); }).on("end", function() { y.push(null); }); } g.prototype._read = function() { this._helper.resume(); }, x.exports = g; }, { "../utils": 421, "readable-stream": 405 }], 403: [function(e, x, _) { (function(u) { x.exports = { /** * True if this is running in Nodejs, will be undefined in a browser. * In a browser, browserify won't include this file and the whole module * will be resolved an empty object. */ isNode: typeof u != "undefined", /** * Create a new nodejs Buffer from an existing content. * @param {Object} data the data to pass to the constructor. * @param {String} encoding the encoding to use. * @return {Buffer} a new Buffer. */ newBufferFrom: function(g, b) { if (u.from && u.from !== Uint8Array.from) return u.from(g, b); if (typeof g == "number") throw new Error('The "data" argument must not be a number'); return new u(g, b); }, /** * Create a new nodejs Buffer with the specified size. * @param {Integer} size the size of the buffer. * @return {Buffer} a new Buffer. */ allocBuffer: function(g) { if (u.alloc) return u.alloc(g); var b = new u(g); return b.fill(0), b; }, /** * Find out if an object is a Buffer. * @param {Object} b the object to test. * @return {Boolean} true if the object is a Buffer, false otherwise. */ isBuffer: function(g) { return u.isBuffer(g); }, isStream: function(g) { return g && typeof g.on == "function" && typeof g.pause == "function" && typeof g.resume == "function"; } }; }).call(this, e("buffer").Buffer); }, { buffer: 216 }], 404: [function(e, x, _) { var u = e("./utf8"), m = e("./utils"), g = e("./stream/GenericWorker"), b = e("./stream/StreamHelper"), w = e("./defaults"), f = e("./compressedObject"), y = e("./zipObject"), h = e("./generate"), l = e("./nodejsUtils"), d = e("./nodejs/NodejsStreamInputAdapter"), s = function(n, o, p) { var O = m.getTypeOf(o), P, F = m.extend(p || {}, w); F.date = F.date || /* @__PURE__ */ new Date(), F.compression !== null && (F.compression = F.compression.toUpperCase()), typeof F.unixPermissions == "string" && (F.unixPermissions = parseInt(F.unixPermissions, 8)), F.unixPermissions && F.unixPermissions & 16384 && (F.dir = !0), F.dosPermissions && F.dosPermissions & 16 && (F.dir = !0), F.dir && (n = c(n)), F.createFolders && (P = v(n)) && a.call(this, P, !0); var z = O === "string" && F.binary === !1 && F.base64 === !1; (!p || typeof p.binary == "undefined") && (F.binary = !z); var N = o instanceof f && o.uncompressedSize === 0; (N || F.dir || !o || o.length === 0) && (F.base64 = !1, F.binary = !0, o = "", F.compression = "STORE", O = "string"); var M = null; o instanceof f || o instanceof g ? M = o : l.isNode && l.isStream(o) ? M = new d(n, o) : M = m.prepareContent(n, o, F.binary, F.optimizedBinaryString, F.base64); var I = new y(n, M, F); this.files[n] = I; }, v = function(n) { n.slice(-1) === "/" && (n = n.substring(0, n.length - 1)); var o = n.lastIndexOf("/"); return o > 0 ? n.substring(0, o) : ""; }, c = function(n) { return n.slice(-1) !== "/" && (n += "/"), n; }, a = function(n, o) { return o = typeof o != "undefined" ? o : w.createFolders, n = c(n), this.files[n] || s.call(this, n, null, { dir: !0, createFolders: o }), this.files[n]; }; function r(i) { return Object.prototype.toString.call(i) === "[object RegExp]"; } var t = { /** * @see loadAsync */ load: function() { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, /** * Call a callback function for each entry at this folder level. * @param {Function} cb the callback function: * function (relativePath, file) {...} * It takes 2 arguments : the relative path and the file. */ forEach: function(n) { var o, p, O; for (o in this.files) this.files.hasOwnProperty(o) && (O = this.files[o], p = o.slice(this.root.length, o.length), p && o.slice(0, this.root.length) === this.root && n(p, O)); }, /** * Filter nested files/folders with the specified function. * @param {Function} search the predicate to use : * function (relativePath, file) {...} * It takes 2 arguments : the relative path and the file. * @return {Array} An array of matching elements. */ filter: function(n) { var o = []; return this.forEach(function(p, O) { n(p, O) && o.push(O); }), o; }, /** * Add a file to the zip file, or search a file. * @param {string|RegExp} name The name of the file to add (if data is defined), * the name of the file to find (if no data) or a regex to match files. * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded * @param {Object} o File options * @return {JSZip|Object|Array} this JSZip object (when adding a file), * a file (when searching by string) or an array of files (when searching by regex). */ file: function(n, o, p) { if (arguments.length === 1) if (r(n)) { var O = n; return this.filter(function(F, z) { return !z.dir && O.test(F); }); } else { var P = this.files[this.root + n]; return P && !P.dir ? P : null; } else n = this.root + n, s.call(this, n, o, p); return this; }, /** * Add a directory to the zip file, or search. * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. */ folder: function(n) { if (!n) return this; if (r(n)) return this.filter(function(P, F) { return F.dir && n.test(P); }); var o = this.root + n, p = a.call(this, o), O = this.clone(); return O.root = p.name, O; }, /** * Delete a file, or a directory and all sub-files, from the zip * @param {string} name the name of the file to delete * @return {JSZip} this JSZip object */ remove: function(n) { n = this.root + n; var o = this.files[n]; if (o || (n.slice(-1) !== "/" && (n += "/"), o = this.files[n]), o && !o.dir) delete this.files[n]; else for (var p = this.filter(function(P, F) { return F.name.slice(0, n.length) === n; }), O = 0; O < p.length; O++) delete this.files[p[O].name]; return this; }, /** * Generate the complete zip file * @param {Object} options the options to generate the zip file : * - compression, "STORE" by default. * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file */ generate: function(n) { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, /** * Generate the complete zip file as an internal stream. * @param {Object} options the options to generate the zip file : * - compression, "STORE" by default. * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. * @return {StreamHelper} the streamed zip file. */ generateInternalStream: function(n) { var o, p = {}; try { if (p = m.extend(n || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: u.utf8encode }), p.type = p.type.toLowerCase(), p.compression = p.compression.toUpperCase(), p.type === "binarystring" && (p.type = "string"), !p.type) throw new Error("No output type specified."); m.checkSupport(p.type), (p.platform === "darwin" || p.platform === "freebsd" || p.platform === "linux" || p.platform === "sunos") && (p.platform = "UNIX"), p.platform === "win32" && (p.platform = "DOS"); var O = p.comment || this.comment || ""; o = h.generateWorker(this, p, O); } catch (P) { o = new g("error"), o.error(P); } return new b(o, p.type || "string", p.mimeType); }, /** * Generate the complete zip file asynchronously. * @see generateInternalStream */ generateAsync: function(n, o) { return this.generateInternalStream(n).accumulate(o); }, /** * Generate the complete zip file asynchronously. * @see generateInternalStream */ generateNodeStream: function(n, o) { return n = n || {}, n.type || (n.type = "nodebuffer"), this.generateInternalStream(n).toNodejsStream(o); } }; x.exports = t; }, { "./compressedObject": 391, "./defaults": 394, "./generate": 398, "./nodejs/NodejsStreamInputAdapter": 401, "./nodejsUtils": 403, "./stream/GenericWorker": 417, "./stream/StreamHelper": 418, "./utf8": 420, "./utils": 421, "./zipObject": 424 }], 405: [function(e, x, _) { x.exports = e("stream"); }, { stream: 506 }], 406: [function(e, x, _) { var u = e("./DataReader"), m = e("../utils"); function g(b) { u.call(this, b); for (var w = 0; w < this.data.length; w++) b[w] = b[w] & 255; } m.inherits(g, u), g.prototype.byteAt = function(b) { return this.data[this.zero + b]; }, g.prototype.lastIndexOfSignature = function(b) { for (var w = b.charCodeAt(0), f = b.charCodeAt(1), y = b.charCodeAt(2), h = b.charCodeAt(3), l = this.length - 4; l >= 0; --l) if (this.data[l] === w && this.data[l + 1] === f && this.data[l + 2] === y && this.data[l + 3] === h) return l - this.zero; return -1; }, g.prototype.readAndCheckSignature = function(b) { var w = b.charCodeAt(0), f = b.charCodeAt(1), y = b.charCodeAt(2), h = b.charCodeAt(3), l = this.readData(4); return w === l[0] && f === l[1] && y === l[2] && h === l[3]; }, g.prototype.readData = function(b) { if (this.checkOffset(b), b === 0) return []; var w = this.data.slice(this.zero + this.index, this.zero + this.index + b); return this.index += b, w; }, x.exports = g; }, { "../utils": 421, "./DataReader": 407 }], 407: [function(e, x, _) { var u = e("../utils"); function m(g) { this.data = g, this.length = g.length, this.index = 0, this.zero = 0; } m.prototype = { /** * Check that the offset will not go too far. * @param {string} offset the additional offset to check. * @throws {Error} an Error if the offset is out of bounds. */ checkOffset: function(b) { this.checkIndex(this.index + b); }, /** * Check that the specified index will not be too far. * @param {string} newIndex the index to check. * @throws {Error} an Error if the index is out of bounds. */ checkIndex: function(b) { if (this.length < this.zero + b || b < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + b + "). Corrupted zip ?"); }, /** * Change the index. * @param {number} newIndex The new index. * @throws {Error} if the new index is out of the data. */ setIndex: function(b) { this.checkIndex(b), this.index = b; }, /** * Skip the next n bytes. * @param {number} n the number of bytes to skip. * @throws {Error} if the new index is out of the data. */ skip: function(b) { this.setIndex(this.index + b); }, /** * Get the byte at the specified index. * @param {number} i the index to use. * @return {number} a byte. */ byteAt: function(b) { }, /** * Get the next number with a given byte size. * @param {number} size the number of bytes to read. * @return {number} the corresponding number. */ readInt: function(b) { var w = 0, f; for (this.checkOffset(b), f = this.index + b - 1; f >= this.index; f--) w = (w << 8) + this.byteAt(f); return this.index += b, w; }, /** * Get the next string with a given byte size. * @param {number} size the number of bytes to read. * @return {string} the corresponding string. */ readString: function(b) { return u.transformTo("string", this.readData(b)); }, /** * Get raw data without conversion, bytes. * @param {number} size the number of bytes to read. * @return {Object} the raw data, implementation specific. */ readData: function(b) { }, /** * Find the last occurrence of a zip signature (4 bytes). * @param {string} sig the signature to find. * @return {number} the index of the last occurrence, -1 if not found. */ lastIndexOfSignature: function(b) { }, /** * Read the signature (4 bytes) at the current position and compare it with sig. * @param {string} sig the expected signature * @return {boolean} true if the signature matches, false otherwise. */ readAndCheckSignature: function(b) { }, /** * Get the next date. * @return {Date} the date. */ readDate: function() { var b = this.readInt(4); return new Date(Date.UTC( (b >> 25 & 127) + 1980, // year (b >> 21 & 15) - 1, // month b >> 16 & 31, // day b >> 11 & 31, // hour b >> 5 & 63, // minute (b & 31) << 1 )); } }, x.exports = m; }, { "../utils": 421 }], 408: [function(e, x, _) { var u = e("./Uint8ArrayReader"), m = e("../utils"); function g(b) { u.call(this, b); } m.inherits(g, u), g.prototype.readData = function(b) { this.checkOffset(b); var w = this.data.slice(this.zero + this.index, this.zero + this.index + b); return this.index += b, w; }, x.exports = g; }, { "../utils": 421, "./Uint8ArrayReader": 410 }], 409: [function(e, x, _) { var u = e("./DataReader"), m = e("../utils"); function g(b) { u.call(this, b); } m.inherits(g, u), g.prototype.byteAt = function(b) { return this.data.charCodeAt(this.zero + b); }, g.prototype.lastIndexOfSignature = function(b) { return this.data.lastIndexOf(b) - this.zero; }, g.prototype.readAndCheckSignature = function(b) { var w = this.readData(4); return b === w; }, g.prototype.readData = function(b) { this.checkOffset(b); var w = this.data.slice(this.zero + this.index, this.zero + this.index + b); return this.index += b, w; }, x.exports = g; }, { "../utils": 421, "./DataReader": 407 }], 410: [function(e, x, _) { var u = e("./ArrayReader"), m = e("../utils"); function g(b) { u.call(this, b); } m.inherits(g, u), g.prototype.readData = function(b) { if (this.checkOffset(b), b === 0) return new Uint8Array(0); var w = this.data.subarray(this.zero + this.index, this.zero + this.index + b); return this.index += b, w; }, x.exports = g; }, { "../utils": 421, "./ArrayReader": 406 }], 411: [function(e, x, _) { var u = e("../utils"), m = e("../support"), g = e("./ArrayReader"), b = e("./StringReader"), w = e("./NodeBufferReader"), f = e("./Uint8ArrayReader"); x.exports = function(y) { var h = u.getTypeOf(y); return u.checkSupport(h), h === "string" && !m.uint8array ? new b(y) : h === "nodebuffer" ? new w(y) : m.uint8array ? new f(u.transformTo("uint8array", y)) : new g(u.transformTo("array", y)); }; }, { "../support": 419, "../utils": 421, "./ArrayReader": 406, "./NodeBufferReader": 408, "./StringReader": 409, "./Uint8ArrayReader": 410 }], 412: [function(e, x, _) { _.LOCAL_FILE_HEADER = "PK", _.CENTRAL_FILE_HEADER = "PK", _.CENTRAL_DIRECTORY_END = "PK", _.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", _.ZIP64_CENTRAL_DIRECTORY_END = "PK", _.DATA_DESCRIPTOR = "PK\x07\b"; }, {}], 413: [function(e, x, _) { var u = e("./GenericWorker"), m = e("../utils"); function g(b) { u.call(this, "ConvertWorker to " + b), this.destType = b; } m.inherits(g, u), g.prototype.processChunk = function(b) { this.push({ data: m.transformTo(this.destType, b.data), meta: b.meta }); }, x.exports = g; }, { "../utils": 421, "./GenericWorker": 417 }], 414: [function(e, x, _) { var u = e("./GenericWorker"), m = e("../crc32"), g = e("../utils"); function b() { u.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0); } g.inherits(b, u), b.prototype.processChunk = function(w) { this.streamInfo.crc32 = m(w.data, this.streamInfo.crc32 || 0), this.push(w); }, x.exports = b; }, { "../crc32": 393, "../utils": 421, "./GenericWorker": 417 }], 415: [function(e, x, _) { var u = e("../utils"), m = e("./GenericWorker"); function g(b) { m.call(this, "DataLengthProbe for " + b), this.propName = b, this.withStreamInfo(b, 0); } u.inherits(g, m), g.prototype.processChunk = function(b) { if (b) { var w = this.streamInfo[this.propName] || 0; this.streamInfo[this.propName] = w + b.data.length; } m.prototype.processChunk.call(this, b); }, x.exports = g; }, { "../utils": 421, "./GenericWorker": 417 }], 416: [function(e, x, _) { var u = e("../utils"), m = e("./GenericWorker"), g = 16 * 1024; function b(w) { m.call(this, "DataWorker"); var f = this; this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, w.then(function(y) { f.dataIsReady = !0, f.data = y, f.max = y && y.length || 0, f.type = u.getTypeOf(y), f.isPaused || f._tickAndRepeat(); }, function(y) { f.error(y); }); } u.inherits(b, m), b.prototype.cleanUp = function() { m.prototype.cleanUp.call(this), this.data = null; }, b.prototype.resume = function() { return m.prototype.resume.call(this) ? (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, u.delay(this._tickAndRepeat, [], this)), !0) : !1; }, b.prototype._tickAndRepeat = function() { this._tickScheduled = !1, !(this.isPaused || this.isFinished) && (this._tick(), this.isFinished || (u.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0)); }, b.prototype._tick = function() { if (this.isPaused || this.isFinished) return !1; var w = g, f = null, y = Math.min(this.max, this.index + w); if (this.index >= this.max) return this.end(); switch (this.type) { case "string": f = this.data.substring(this.index, y); break; case "uint8array": f = this.data.subarray(this.index, y); break; case "array": case "nodebuffer": f = this.data.slice(this.index, y); break; } return this.index = y, this.push({ data: f, meta: { percent: this.max ? this.index / this.max * 100 : 0 } }); }, x.exports = b; }, { "../utils": 421, "./GenericWorker": 417 }], 417: [function(e, x, _) { function u(m) { this.name = m || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null; } u.prototype = { /** * Push a chunk to the next workers. * @param {Object} chunk the chunk to push */ push: function(g) { this.emit("data", g); }, /** * End the stream. * @return {Boolean} true if this call ended the worker, false otherwise. */ end: function() { if (this.isFinished) return !1; this.flush(); try { this.emit("end"), this.cleanUp(), this.isFinished = !0; } catch (g) { this.emit("error", g); } return !0; }, /** * End the stream with an error. * @param {Error} e the error which caused the premature end. * @return {Boolean} true if this call ended the worker with an error, false otherwise. */ error: function(g) { return this.isFinished ? !1 : (this.isPaused ? this.generatedError = g : (this.isFinished = !0, this.emit("error", g), this.previous && this.previous.error(g), this.cleanUp()), !0); }, /** * Add a callback on an event. * @param {String} name the name of the event (data, end, error) * @param {Function} listener the function to call when the event is triggered * @return {GenericWorker} the current object for chainability */ on: function(g, b) { return this._listeners[g].push(b), this; }, /** * Clean any references when a worker is ending. */ cleanUp: function() { this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = []; }, /** * Trigger an event. This will call registered callback with the provided arg. * @param {String} name the name of the event (data, end, error) * @param {Object} arg the argument to call the callback with. */ emit: function(g, b) { if (this._listeners[g]) for (var w = 0; w < this._listeners[g].length; w++) this._listeners[g][w].call(this, b); }, /** * Chain a worker with an other. * @param {Worker} next the worker receiving events from the current one. * @return {worker} the next worker for chainability */ pipe: function(g) { return g.registerPrevious(this); }, /** * Same as `pipe` in the other direction. * Using an API with `pipe(next)` is very easy. * Implementing the API with the point of view of the next one registering * a source is easier, see the ZipFileWorker. * @param {Worker} previous the previous worker, sending events to this one * @return {Worker} the current worker for chainability */ registerPrevious: function(g) { if (this.isLocked) throw new Error("The stream '" + this + "' has already been used."); this.streamInfo = g.streamInfo, this.mergeStreamInfo(), this.previous = g; var b = this; return g.on("data", function(w) { b.processChunk(w); }), g.on("end", function() { b.end(); }), g.on("error", function(w) { b.error(w); }), this; }, /** * Pause the stream so it doesn't send events anymore. * @return {Boolean} true if this call paused the worker, false otherwise. */ pause: function() { return this.isPaused || this.isFinished ? !1 : (this.isPaused = !0, this.previous && this.previous.pause(), !0); }, /** * Resume a paused stream. * @return {Boolean} true if this call resumed the worker, false otherwise. */ resume: function() { if (!this.isPaused || this.isFinished) return !1; this.isPaused = !1; var g = !1; return this.generatedError && (this.error(this.generatedError), g = !0), this.previous && this.previous.resume(), !g; }, /** * Flush any remaining bytes as the stream is ending. */ flush: function() { }, /** * Process a chunk. This is usually the method overridden. * @param {Object} chunk the chunk to process. */ processChunk: function(g) { this.push(g); }, /** * Add a key/value to be added in the workers chain streamInfo once activated. * @param {String} key the key to use * @param {Object} value the associated value * @return {Worker} the current worker for chainability */ withStreamInfo: function(g, b) { return this.extraStreamInfo[g] = b, this.mergeStreamInfo(), this; }, /** * Merge this worker's streamInfo into the chain's streamInfo. */ mergeStreamInfo: function() { for (var g in this.extraStreamInfo) this.extraStreamInfo.hasOwnProperty(g) && (this.streamInfo[g] = this.extraStreamInfo[g]); }, /** * Lock the stream to prevent further updates on the workers chain. * After calling this method, all calls to pipe will fail. */ lock: function() { if (this.isLocked) throw new Error("The stream '" + this + "' has already been used."); this.isLocked = !0, this.previous && this.previous.lock(); }, /** * * Pretty print the workers chain. */ toString: function() { var g = "Worker " + this.name; return this.previous ? this.previous + " -> " + g : g; } }, x.exports = u; }, {}], 418: [function(e, x, _) { (function(u) { var m = e("../utils"), g = e("./ConvertWorker"), b = e("./GenericWorker"), w = e("../base64"), f = e("../support"), y = e("../external"), h = null; if (f.nodestream) try { h = e("../nodejs/NodejsStreamOutputAdapter"); } catch (c) { } function l(c, a, r) { switch (c) { case "blob": return m.newBlob(m.transformTo("arraybuffer", a), r); case "base64": return w.encode(a); default: return m.transformTo(c, a); } } function d(c, a) { var r, t = 0, i = null, n = 0; for (r = 0; r < a.length; r++) n += a[r].length; switch (c) { case "string": return a.join(""); case "array": return Array.prototype.concat.apply([], a); case "uint8array": for (i = new Uint8Array(n), r = 0; r < a.length; r++) i.set(a[r], t), t += a[r].length; return i; case "nodebuffer": return u.concat(a); default: throw new Error("concat : unsupported type '" + c + "'"); } } function s(c, a) { return new y.Promise(function(r, t) { var i = [], n = c._internalType, o = c._outputType, p = c._mimeType; c.on("data", function(O, P) { i.push(O), a && a(P); }).on("error", function(O) { i = [], t(O); }).on("end", function() { try { var O = l(o, d(n, i), p); r(O); } catch (P) { t(P); } i = []; }).resume(); }); } function v(c, a, r) { var t = a; switch (a) { case "blob": case "arraybuffer": t = "uint8array"; break; case "base64": t = "string"; break; } try { this._internalType = t, this._outputType = a, this._mimeType = r, m.checkSupport(t), this._worker = c.pipe(new g(t)), c.lock(); } catch (i) { this._worker = new b("error"), this._worker.error(i); } } v.prototype = { /** * Listen a StreamHelper, accumulate its content and concatenate it into a * complete block. * @param {Function} updateCb the update callback. * @return Promise the promise for the accumulation. */ accumulate: function(a) { return s(this, a); }, /** * Add a listener on an event triggered on a stream. * @param {String} evt the name of the event * @param {Function} fn the listener * @return {StreamHelper} the current helper. */ on: function(a, r) { var t = this; return a === "data" ? this._worker.on(a, function(i) { r.call(t, i.data, i.meta); }) : this._worker.on(a, function() { m.delay(r, arguments, t); }), this; }, /** * Resume the flow of chunks. * @return {StreamHelper} the current helper. */ resume: function() { return m.delay(this._worker.resume, [], this._worker), this; }, /** * Pause the flow of chunks. * @return {StreamHelper} the current helper. */ pause: function() { return this._worker.pause(), this; }, /** * Return a nodejs stream for this helper. * @param {Function} updateCb the update callback. * @return {NodejsStreamOutputAdapter} the nodejs stream. */ toNodejsStream: function(a) { if (m.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method"); return new h(this, { objectMode: this._outputType !== "nodebuffer" }, a); } }, x.exports = v; }).call(this, e("buffer").Buffer); }, { "../base64": 390, "../external": 395, "../nodejs/NodejsStreamOutputAdapter": 402, "../support": 419, "../utils": 421, "./ConvertWorker": 413, "./GenericWorker": 417, buffer: 216 }], 419: [function(e, x, _) { (function(u) { if (_.base64 = !0, _.array = !0, _.string = !0, _.arraybuffer = typeof ArrayBuffer != "undefined" && typeof Uint8Array != "undefined", _.nodebuffer = typeof u != "undefined", _.uint8array = typeof Uint8Array != "undefined", typeof ArrayBuffer == "undefined") _.blob = !1; else { var m = new ArrayBuffer(0); try { _.blob = new Blob([m], { type: "application/zip" }).size === 0; } catch (w) { try { var g = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder, b = new g(); b.append(m), _.blob = b.getBlob("application/zip").size === 0; } catch (f) { _.blob = !1; } } } try { _.nodestream = !!e("readable-stream").Readable; } catch (w) { _.nodestream = !1; } }).call(this, e("buffer").Buffer); }, { buffer: 216, "readable-stream": 405 }], 420: [function(e, x, _) { for (var u = e("./utils"), m = e("./support"), g = e("./nodejsUtils"), b = e("./stream/GenericWorker"), w = new Array(256), f = 0; f < 256; f++) w[f] = f >= 252 ? 6 : f >= 248 ? 5 : f >= 240 ? 4 : f >= 224 ? 3 : f >= 192 ? 2 : 1; w[254] = w[254] = 1; var y = function(c) { var a, r, t, i, n, o = c.length, p = 0; for (i = 0; i < o; i++) r = c.charCodeAt(i), (r & 64512) === 55296 && i + 1 < o && (t = c.charCodeAt(i + 1), (t & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (t - 56320), i++)), p += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4; for (m.uint8array ? a = new Uint8Array(p) : a = new Array(p), n = 0, i = 0; n < p; i++) r = c.charCodeAt(i), (r & 64512) === 55296 && i + 1 < o && (t = c.charCodeAt(i + 1), (t & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (t - 56320), i++)), r < 128 ? a[n++] = r : r < 2048 ? (a[n++] = 192 | r >>> 6, a[n++] = 128 | r & 63) : r < 65536 ? (a[n++] = 224 | r >>> 12, a[n++] = 128 | r >>> 6 & 63, a[n++] = 128 | r & 63) : (a[n++] = 240 | r >>> 18, a[n++] = 128 | r >>> 12 & 63, a[n++] = 128 | r >>> 6 & 63, a[n++] = 128 | r & 63); return a; }, h = function(c, a) { var r; for (a = a || c.length, a > c.length && (a = c.length), r = a - 1; r >= 0 && (c[r] & 192) === 128; ) r--; return r < 0 || r === 0 ? a : r + w[c[r]] > a ? r : a; }, l = function(c) { var a, r, t, i, n = c.length, o = new Array(n * 2); for (r = 0, a = 0; a < n; ) { if (t = c[a++], t < 128) { o[r++] = t; continue; } if (i = w[t], i > 4) { o[r++] = 65533, a += i - 1; continue; } for (t &= i === 2 ? 31 : i === 3 ? 15 : 7; i > 1 && a < n; ) t = t << 6 | c[a++] & 63, i--; if (i > 1) { o[r++] = 65533; continue; } t < 65536 ? o[r++] = t : (t -= 65536, o[r++] = 55296 | t >> 10 & 1023, o[r++] = 56320 | t & 1023); } return o.length !== r && (o.subarray ? o = o.subarray(0, r) : o.length = r), u.applyFromCharCode(o); }; _.utf8encode = function(c) { return m.nodebuffer ? g.newBufferFrom(c, "utf-8") : y(c); }, _.utf8decode = function(c) { return m.nodebuffer ? u.transformTo("nodebuffer", c).toString("utf-8") : (c = u.transformTo(m.uint8array ? "uint8array" : "array", c), l(c)); }; function d() { b.call(this, "utf-8 decode"), this.leftOver = null; } u.inherits(d, b), d.prototype.processChunk = function(v) { var c = u.transformTo(m.uint8array ? "uint8array" : "array", v.data); if (this.leftOver && this.leftOver.length) { if (m.uint8array) { var a = c; c = new Uint8Array(a.length + this.leftOver.length), c.set(this.leftOver, 0), c.set(a, this.leftOver.length); } else c = this.leftOver.concat(c); this.leftOver = null; } var r = h(c), t = c; r !== c.length && (m.uint8array ? (t = c.subarray(0, r), this.leftOver = c.subarray(r, c.length)) : (t = c.slice(0, r), this.leftOver = c.slice(r, c.length))), this.push({ data: _.utf8decode(t), meta: v.meta }); }, d.prototype.flush = function() { this.leftOver && this.leftOver.length && (this.push({ data: _.utf8decode(this.leftOver), meta: {} }), this.leftOver = null); }, _.Utf8DecodeWorker = d; function s() { b.call(this, "utf-8 encode"); } u.inherits(s, b), s.prototype.processChunk = function(v) { this.push({ data: _.utf8encode(v.data), meta: v.meta }); }, _.Utf8EncodeWorker = s; }, { "./nodejsUtils": 403, "./stream/GenericWorker": 417, "./support": 419, "./utils": 421 }], 421: [function(e, x, _) { var u = e("./support"), m = e("./base64"), g = e("./nodejsUtils"), b = e("set-immediate-shim"), w = e("./external"); function f(c) { var a = null; return u.uint8array ? a = new Uint8Array(c.length) : a = new Array(c.length), h(c, a); } _.newBlob = function(c, a) { _.checkSupport("blob"); try { return new Blob([c], { type: a }); } catch (i) { try { var r = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder, t = new r(); return t.append(c), t.getBlob(a); } catch (n) { throw new Error("Bug : can't construct the Blob."); } } }; function y(c) { return c; } function h(c, a) { for (var r = 0; r < c.length; ++r) a[r] = c.charCodeAt(r) & 255; return a; } var l = { /** * Transform an array of int into a string, chunk by chunk. * See the performances notes on arrayLikeToString. * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. * @param {String} type the type of the array. * @param {Integer} chunk the chunk size. * @return {String} the resulting string. * @throws Error if the chunk is too big for the stack. */ stringifyByChunk: function(a, r, t) { var i = [], n = 0, o = a.length; if (o <= t) return String.fromCharCode.apply(null, a); for (; n < o; ) r === "array" || r === "nodebuffer" ? i.push(String.fromCharCode.apply(null, a.slice(n, Math.min(n + t, o)))) : i.push(String.fromCharCode.apply(null, a.subarray(n, Math.min(n + t, o)))), n += t; return i.join(""); }, /** * Call String.fromCharCode on every item in the array. * This is the naive implementation, which generate A LOT of intermediate string. * This should be used when everything else fail. * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. * @return {String} the result. */ stringifyByChar: function(a) { for (var r = "", t = 0; t < a.length; t++) r += String.fromCharCode(a[t]); return r; }, applyCanBeUsed: { /** * true if the browser accepts to use String.fromCharCode on Uint8Array */ uint8array: function() { try { return u.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; } catch (c) { return !1; } }(), /** * true if the browser accepts to use String.fromCharCode on nodejs Buffer. */ nodebuffer: function() { try { return u.nodebuffer && String.fromCharCode.apply(null, g.allocBuffer(1)).length === 1; } catch (c) { return !1; } }() } }; function d(c) { var a = 65536, r = _.getTypeOf(c), t = !0; if (r === "uint8array" ? t = l.applyCanBeUsed.uint8array : r === "nodebuffer" && (t = l.applyCanBeUsed.nodebuffer), t) for (; a > 1; ) try { return l.stringifyByChunk(c, r, a); } catch (i) { a = Math.floor(a / 2); } return l.stringifyByChar(c); } _.applyFromCharCode = d; function s(c, a) { for (var r = 0; r < c.length; r++) a[r] = c[r]; return a; } var v = {}; v.string = { string: y, array: function(a) { return h(a, new Array(a.length)); }, arraybuffer: function(a) { return v.string.uint8array(a).buffer; }, uint8array: function(a) { return h(a, new Uint8Array(a.length)); }, nodebuffer: function(a) { return h(a, g.allocBuffer(a.length)); } }, v.array = { string: d, array: y, arraybuffer: function(a) { return new Uint8Array(a).buffer; }, uint8array: function(a) { return new Uint8Array(a); }, nodebuffer: function(a) { return g.newBufferFrom(a); } }, v.arraybuffer = { string: function(a) { return d(new Uint8Array(a)); }, array: function(a) { return s(new Uint8Array(a), new Array(a.byteLength)); }, arraybuffer: y, uint8array: function(a) { return new Uint8Array(a); }, nodebuffer: function(a) { return g.newBufferFrom(new Uint8Array(a)); } }, v.uint8array = { string: d, array: function(a) { return s(a, new Array(a.length)); }, arraybuffer: function(a) { return a.buffer; }, uint8array: y, nodebuffer: function(a) { return g.newBufferFrom(a); } }, v.nodebuffer = { string: d, array: function(a) { return s(a, new Array(a.length)); }, arraybuffer: function(a) { return v.nodebuffer.uint8array(a).buffer; }, uint8array: function(a) { return s(a, new Uint8Array(a.length)); }, nodebuffer: y }, _.transformTo = function(c, a) { if (a || (a = ""), !c) return a; _.checkSupport(c); var r = _.getTypeOf(a), t = v[r][c](a); return t; }, _.getTypeOf = function(c) { if (typeof c == "string") return "string"; if (Object.prototype.toString.call(c) === "[object Array]") return "array"; if (u.nodebuffer && g.isBuffer(c)) return "nodebuffer"; if (u.uint8array && c instanceof Uint8Array) return "uint8array"; if (u.arraybuffer && c instanceof ArrayBuffer) return "arraybuffer"; }, _.checkSupport = function(c) { var a = u[c.toLowerCase()]; if (!a) throw new Error(c + " is not supported by this platform"); }, _.MAX_VALUE_16BITS = 65535, _.MAX_VALUE_32BITS = -1, _.pretty = function(c) { var a = "", r, t; for (t = 0; t < (c || "").length; t++) r = c.charCodeAt(t), a += "\\x" + (r < 16 ? "0" : "") + r.toString(16).toUpperCase(); return a; }, _.delay = function(c, a, r) { b(function() { c.apply(r || null, a || []); }); }, _.inherits = function(c, a) { var r = function() { }; r.prototype = a.prototype, c.prototype = new r(); }, _.extend = function() { var c = {}, a, r; for (a = 0; a < arguments.length; a++) for (r in arguments[a]) arguments[a].hasOwnProperty(r) && typeof c[r] == "undefined" && (c[r] = arguments[a][r]); return c; }, _.prepareContent = function(c, a, r, t, i) { var n = w.Promise.resolve(a).then(function(o) { var p = u.blob && (o instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(o)) !== -1); return p && typeof FileReader != "undefined" ? new w.Promise(function(O, P) { var F = new FileReader(); F.onload = function(z) { O(z.target.result); }, F.onerror = function(z) { P(z.target.error); }, F.readAsArrayBuffer(o); }) : o; }); return n.then(function(o) { var p = _.getTypeOf(o); return p ? (p === "arraybuffer" ? o = _.transformTo("uint8array", o) : p === "string" && (i ? o = m.decode(o) : r && t !== !0 && (o = f(o))), o) : w.Promise.reject(new Error("Can't read the data of '" + c + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")); }); }; }, { "./base64": 390, "./external": 395, "./nodejsUtils": 403, "./support": 419, "set-immediate-shim": 497 }], 422: [function(e, x, _) { var u = e("./reader/readerFor"), m = e("./utils"), g = e("./signature"), b = e("./zipEntry"); e("./utf8"); var w = e("./support"); function f(y) { this.files = [], this.loadOptions = y; } f.prototype = { /** * Check that the reader is on the specified signature. * @param {string} expectedSignature the expected signature. * @throws {Error} if it is an other signature. */ checkSignature: function(h) { if (!this.reader.readAndCheckSignature(h)) { this.reader.index -= 4; var l = this.reader.readString(4); throw new Error("Corrupted zip or bug: unexpected signature (" + m.pretty(l) + ", expected " + m.pretty(h) + ")"); } }, /** * Check if the given signature is at the given index. * @param {number} askedIndex the index to check. * @param {string} expectedSignature the signature to expect. * @return {boolean} true if the signature is here, false otherwise. */ isSignature: function(h, l) { var d = this.reader.index; this.reader.setIndex(h); var s = this.reader.readString(4), v = s === l; return this.reader.setIndex(d), v; }, /** * Read the end of the central directory. */ readBlockEndOfCentral: function() { this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2); var h = this.reader.readData(this.zipCommentLength), l = w.uint8array ? "uint8array" : "array", d = m.transformTo(l, h); this.zipComment = this.loadOptions.decodeFileName(d); }, /** * Read the end of the Zip 64 central directory. * Not merged with the method readEndOfCentral : * The end of central can coexist with its Zip64 brother, * I don't want to read the wrong number of bytes ! */ readBlockZip64EndOfCentral: function() { this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {}; for (var h = this.zip64EndOfCentralSize - 44, l = 0, d, s, v; l < h; ) d = this.reader.readInt(2), s = this.reader.readInt(4), v = this.reader.readData(s), this.zip64ExtensibleData[d] = { id: d, length: s, value: v }; }, /** * Read the end of the Zip 64 central directory locator. */ readBlockZip64EndOfCentralLocator: function() { if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), this.disksCount > 1) throw new Error("Multi-volumes zip are not supported"); }, /** * Read the local files, based on the offset read in the central part. */ readLocalFiles: function() { var h, l; for (h = 0; h < this.files.length; h++) l = this.files[h], this.reader.setIndex(l.localHeaderOffset), this.checkSignature(g.LOCAL_FILE_HEADER), l.readLocalPart(this.reader), l.handleUTF8(), l.processAttributes(); }, /** * Read the central directory. */ readCentralDir: function() { var h; for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER); ) h = new b({ zip64: this.zip64 }, this.loadOptions), h.readCentralPart(this.reader), this.files.push(h); if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); }, /** * Read the end of central directory. */ readEndOfCentral: function() { var h = this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END); if (h < 0) { var l = !this.isSignature(0, g.LOCAL_FILE_HEADER); throw l ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory"); } this.reader.setIndex(h); var d = h; if (this.checkSignature(g.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === m.MAX_VALUE_16BITS || this.diskWithCentralDirStart === m.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === m.MAX_VALUE_16BITS || this.centralDirRecords === m.MAX_VALUE_16BITS || this.centralDirSize === m.MAX_VALUE_32BITS || this.centralDirOffset === m.MAX_VALUE_32BITS) { if (this.zip64 = !0, h = this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR), h < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); if (this.reader.setIndex(h), this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, g.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral(); } var s = this.centralDirOffset + this.centralDirSize; this.zip64 && (s += 20, s += 12 + this.zip64EndOfCentralSize); var v = d - s; if (v > 0) this.isSignature(d, g.CENTRAL_FILE_HEADER) || (this.reader.zero = v); else if (v < 0) throw new Error("Corrupted zip: missing " + Math.abs(v) + " bytes."); }, prepareReader: function(h) { this.reader = u(h); }, /** * Read a zip file and create ZipEntries. * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. */ load: function(h) { this.prepareReader(h), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles(); } }, x.exports = f; }, { "./reader/readerFor": 411, "./signature": 412, "./support": 419, "./utf8": 420, "./utils": 421, "./zipEntry": 423 }], 423: [function(e, x, _) { var u = e("./reader/readerFor"), m = e("./utils"), g = e("./compressedObject"), b = e("./crc32"), w = e("./utf8"), f = e("./compressions"), y = e("./support"), h = 0, l = 3, d = function(c) { for (var a in f) if (f.hasOwnProperty(a) && f[a].magic === c) return f[a]; return null; }; function s(v, c) { this.options = v, this.loadOptions = c; } s.prototype = { /** * say if the file is encrypted. * @return {boolean} true if the file is encrypted, false otherwise. */ isEncrypted: function() { return (this.bitFlag & 1) === 1; }, /** * say if the file has utf-8 filename/comment. * @return {boolean} true if the filename/comment is in utf-8, false otherwise. */ useUTF8: function() { return (this.bitFlag & 2048) === 2048; }, /** * Read the local part of a zip file and add the info in this object. * @param {DataReader} reader the reader to use. */ readLocalPart: function(c) { var a, r; if (c.skip(22), this.fileNameLength = c.readInt(2), r = c.readInt(2), this.fileName = c.readData(this.fileNameLength), c.skip(r), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)"); if (a = d(this.compressionMethod), a === null) throw new Error("Corrupted zip : compression " + m.pretty(this.compressionMethod) + " unknown (inner file : " + m.transformTo("string", this.fileName) + ")"); this.decompressed = new g(this.compressedSize, this.uncompressedSize, this.crc32, a, c.readData(this.compressedSize)); }, /** * Read the central part of a zip file and add the info in this object. * @param {DataReader} reader the reader to use. */ readCentralPart: function(c) { this.versionMadeBy = c.readInt(2), c.skip(2), this.bitFlag = c.readInt(2), this.compressionMethod = c.readString(2), this.date = c.readDate(), this.crc32 = c.readInt(4), this.compressedSize = c.readInt(4), this.uncompressedSize = c.readInt(4); var a = c.readInt(2); if (this.extraFieldsLength = c.readInt(2), this.fileCommentLength = c.readInt(2), this.diskNumberStart = c.readInt(2), this.internalFileAttributes = c.readInt(2), this.externalFileAttributes = c.readInt(4), this.localHeaderOffset = c.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported"); c.skip(a), this.readExtraFields(c), this.parseZIP64ExtraField(c), this.fileComment = c.readData(this.fileCommentLength); }, /** * Parse the external file attributes and get the unix/dos permissions. */ processAttributes: function() { this.unixPermissions = null, this.dosPermissions = null; var c = this.versionMadeBy >> 8; this.dir = !!(this.externalFileAttributes & 16), c === h && (this.dosPermissions = this.externalFileAttributes & 63), c === l && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), !this.dir && this.fileNameStr.slice(-1) === "/" && (this.dir = !0); }, /** * Parse the ZIP64 extra field and merge the info in the current ZipEntry. * @param {DataReader} reader the reader to use. */ parseZIP64ExtraField: function(c) { if (this.extraFields[1]) { var a = u(this.extraFields[1].value); this.uncompressedSize === m.MAX_VALUE_32BITS && (this.uncompressedSize = a.readInt(8)), this.compressedSize === m.MAX_VALUE_32BITS && (this.compressedSize = a.readInt(8)), this.localHeaderOffset === m.MAX_VALUE_32BITS && (this.localHeaderOffset = a.readInt(8)), this.diskNumberStart === m.MAX_VALUE_32BITS && (this.diskNumberStart = a.readInt(4)); } }, /** * Read the central part of a zip file and add the info in this object. * @param {DataReader} reader the reader to use. */ readExtraFields: function(c) { var a = c.index + this.extraFieldsLength, r, t, i; for (this.extraFields || (this.extraFields = {}); c.index + 4 < a; ) r = c.readInt(2), t = c.readInt(2), i = c.readData(t), this.extraFields[r] = { id: r, length: t, value: i }; c.setIndex(a); }, /** * Apply an UTF8 transformation if needed. */ handleUTF8: function() { var c = y.uint8array ? "uint8array" : "array"; if (this.useUTF8()) this.fileNameStr = w.utf8decode(this.fileName), this.fileCommentStr = w.utf8decode(this.fileComment); else { var a = this.findExtraFieldUnicodePath(); if (a !== null) this.fileNameStr = a; else { var r = m.transformTo(c, this.fileName); this.fileNameStr = this.loadOptions.decodeFileName(r); } var t = this.findExtraFieldUnicodeComment(); if (t !== null) this.fileCommentStr = t; else { var i = m.transformTo(c, this.fileComment); this.fileCommentStr = this.loadOptions.decodeFileName(i); } } }, /** * Find the unicode path declared in the extra field, if any. * @return {String} the unicode path, null otherwise. */ findExtraFieldUnicodePath: function() { var c = this.extraFields[28789]; if (c) { var a = u(c.value); return a.readInt(1) !== 1 || b(this.fileName) !== a.readInt(4) ? null : w.utf8decode(a.readData(c.length - 5)); } return null; }, /** * Find the unicode comment declared in the extra field, if any. * @return {String} the unicode comment, null otherwise. */ findExtraFieldUnicodeComment: function() { var c = this.extraFields[25461]; if (c) { var a = u(c.value); return a.readInt(1) !== 1 || b(this.fileComment) !== a.readInt(4) ? null : w.utf8decode(a.readData(c.length - 5)); } return null; } }, x.exports = s; }, { "./compressedObject": 391, "./compressions": 392, "./crc32": 393, "./reader/readerFor": 411, "./support": 419, "./utf8": 420, "./utils": 421 }], 424: [function(e, x, _) { var u = e("./stream/StreamHelper"), m = e("./stream/DataWorker"), g = e("./utf8"), b = e("./compressedObject"), w = e("./stream/GenericWorker"), f = function(s, v, c) { this.name = s, this.dir = c.dir, this.date = c.date, this.comment = c.comment, this.unixPermissions = c.unixPermissions, this.dosPermissions = c.dosPermissions, this._data = v, this._dataBinary = c.binary, this.options = { compression: c.compression, compressionOptions: c.compressionOptions }; }; f.prototype = { /** * Create an internal stream for the content of this object. * @param {String} type the type of each chunk. * @return StreamHelper the stream. */ internalStream: function(s) { var v = null, c = "string"; try { if (!s) throw new Error("No output type specified."); c = s.toLowerCase(); var a = c === "string" || c === "text"; (c === "binarystring" || c === "text") && (c = "string"), v = this._decompressWorker(); var r = !this._dataBinary; r && !a && (v = v.pipe(new g.Utf8EncodeWorker())), !r && a && (v = v.pipe(new g.Utf8DecodeWorker())); } catch (t) { v = new w("error"), v.error(t); } return new u(v, c, ""); }, /** * Prepare the content in the asked type. * @param {String} type the type of the result. * @param {Function} onUpdate a function to call on each internal update. * @return Promise the promise of the result. */ async: function(s, v) { return this.internalStream(s).accumulate(v); }, /** * Prepare the content as a nodejs stream. * @param {String} type the type of each chunk. * @param {Function} onUpdate a function to call on each internal update. * @return Stream the stream. */ nodeStream: function(s, v) { return this.internalStream(s || "nodebuffer").toNodejsStream(v); }, /** * Return a worker for the compressed content. * @private * @param {Object} compression the compression object to use. * @param {Object} compressionOptions the options to use when compressing. * @return Worker the worker. */ _compressWorker: function(s, v) { if (this._data instanceof b && this._data.compression.magic === s.magic) return this._data.getCompressedWorker(); var c = this._decompressWorker(); return this._dataBinary || (c = c.pipe(new g.Utf8EncodeWorker())), b.createWorkerFrom(c, s, v); }, /** * Return a worker for the decompressed content. * @private * @return Worker the worker. */ _decompressWorker: function() { return this._data instanceof b ? this._data.getContentWorker() : this._data instanceof w ? this._data : new m(this._data); } }; for (var y = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], h = function() { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, l = 0; l < y.length; l++) f.prototype[y[l]] = h; x.exports = f; }, { "./compressedObject": 391, "./stream/DataWorker": 416, "./stream/GenericWorker": 417, "./stream/StreamHelper": 418, "./utf8": 420 }], 425: [function(e, x, _) { function u(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(p) { return typeof p; } : u = function(p) { return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; }, u(n); } var m = e("immediate"); function g() { } var b = {}, w = ["REJECTED"], f = ["FULFILLED"], y = ["PENDING"]; x.exports = h; function h(n) { if (typeof n != "function") throw new TypeError("resolver must be a function"); this.state = y, this.queue = [], this.outcome = void 0, n !== g && v(this, n); } h.prototype.finally = function(n) { if (typeof n != "function") return this; var o = this.constructor; return this.then(p, O); function p(P) { function F() { return P; } return o.resolve(n()).then(F); } function O(P) { function F() { throw P; } return o.resolve(n()).then(F); } }, h.prototype.catch = function(n) { return this.then(null, n); }, h.prototype.then = function(n, o) { if (typeof n != "function" && this.state === f || typeof o != "function" && this.state === w) return this; var p = new this.constructor(g); if (this.state !== y) { var O = this.state === f ? n : o; d(p, O, this.outcome); } else this.queue.push(new l(p, n, o)); return p; }; function l(n, o, p) { this.promise = n, typeof o == "function" && (this.onFulfilled = o, this.callFulfilled = this.otherCallFulfilled), typeof p == "function" && (this.onRejected = p, this.callRejected = this.otherCallRejected); } l.prototype.callFulfilled = function(n) { b.resolve(this.promise, n); }, l.prototype.otherCallFulfilled = function(n) { d(this.promise, this.onFulfilled, n); }, l.prototype.callRejected = function(n) { b.reject(this.promise, n); }, l.prototype.otherCallRejected = function(n) { d(this.promise, this.onRejected, n); }; function d(n, o, p) { m(function() { var O; try { O = o(p); } catch (P) { return b.reject(n, P); } O === n ? b.reject(n, new TypeError("Cannot resolve promise with itself")) : b.resolve(n, O); }); } b.resolve = function(n, o) { var p = c(s, o); if (p.status === "error") return b.reject(n, p.value); var O = p.value; if (O) v(n, O); else { n.state = f, n.outcome = o; for (var P = -1, F = n.queue.length; ++P < F; ) n.queue[P].callFulfilled(o); } return n; }, b.reject = function(n, o) { n.state = w, n.outcome = o; for (var p = -1, O = n.queue.length; ++p < O; ) n.queue[p].callRejected(o); return n; }; function s(n) { var o = n && n.then; if (n && (u(n) === "object" || typeof n == "function") && typeof o == "function") return function() { o.apply(n, arguments); }; } function v(n, o) { var p = !1; function O(N) { p || (p = !0, b.reject(n, N)); } function P(N) { p || (p = !0, b.resolve(n, N)); } function F() { o(P, O); } var z = c(F); z.status === "error" && O(z.value); } function c(n, o) { var p = {}; try { p.value = n(o), p.status = "success"; } catch (O) { p.status = "error", p.value = O; } return p; } h.resolve = a; function a(n) { return n instanceof this ? n : b.resolve(new this(g), n); } h.reject = r; function r(n) { var o = new this(g); return b.reject(o, n); } h.all = t; function t(n) { var o = this; if (Object.prototype.toString.call(n) !== "[object Array]") return this.reject(new TypeError("must be an array")); var p = n.length, O = !1; if (!p) return this.resolve([]); for (var P = new Array(p), F = 0, z = -1, N = new this(g); ++z < p; ) M(n[z], z); return N; function M(I, R) { o.resolve(I).then(C, function(E) { O || (O = !0, b.reject(N, E)); }); function C(E) { P[R] = E, ++F === p && !O && (O = !0, b.resolve(N, P)); } } } h.race = i; function i(n) { var o = this; if (Object.prototype.toString.call(n) !== "[object Array]") return this.reject(new TypeError("must be an array")); var p = n.length, O = !1; if (!p) return this.resolve([]); for (var P = -1, F = new this(g); ++P < p; ) z(n[P]); return F; function z(N) { o.resolve(N).then(function(M) { O || (O = !0, b.resolve(F, M)); }, function(M) { O || (O = !0, b.reject(F, M)); }); } } }, { immediate: 386 }], 426: [function(e, x, _) { (function(u) { function m(p) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(P) { return typeof P; } : m = function(P) { return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; }, m(p); } var g = 1 / 0, b = "[object Symbol]", w = /[\\^$.*+?()[\]{}|]/g, f = RegExp(w.source), y = (typeof u == "undefined" ? "undefined" : m(u)) == "object" && u && u.Object === Object && u, h = (typeof self == "undefined" ? "undefined" : m(self)) == "object" && self && self.Object === Object && self, l = y || h || Function("return this")(), d = Object.prototype, s = d.toString, v = l.Symbol, c = v ? v.prototype : void 0, a = c ? c.toString : void 0; function r(p) { if (typeof p == "string") return p; if (i(p)) return a ? a.call(p) : ""; var O = p + ""; return O == "0" && 1 / p == -g ? "-0" : O; } function t(p) { return !!p && m(p) == "object"; } function i(p) { return m(p) == "symbol" || t(p) && s.call(p) == b; } function n(p) { return p == null ? "" : r(p); } function o(p) { return p = n(p), p && f.test(p) ? p.replace(w, "\\$&") : p; } x.exports = o; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 427: [function(e, x, _) { (function(u) { function m(le) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(Xe) { return typeof Xe; } : m = function(Xe) { return Xe && typeof Symbol == "function" && Xe.constructor === Symbol && Xe !== Symbol.prototype ? "symbol" : typeof Xe; }, m(le); } var g = 200, b = "Expected a function", w = "__lodash_hash_undefined__", f = 1, y = 2, h = 1 / 0, l = 9007199254740991, d = "[object Arguments]", s = "[object Array]", v = "[object Boolean]", c = "[object Date]", a = "[object Error]", r = "[object Function]", t = "[object GeneratorFunction]", i = "[object Map]", n = "[object Number]", o = "[object Object]", p = "[object Promise]", O = "[object RegExp]", P = "[object Set]", F = "[object String]", z = "[object Symbol]", N = "[object WeakMap]", M = "[object ArrayBuffer]", I = "[object DataView]", R = "[object Float32Array]", C = "[object Float64Array]", E = "[object Int8Array]", A = "[object Int16Array]", L = "[object Int32Array]", $ = "[object Uint8Array]", W = "[object Uint8ClampedArray]", U = "[object Uint16Array]", D = "[object Uint32Array]", B = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, j = /^\w*$/, V = /^\./, re = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ee = /[\\^$.*+?()[\]{}|]/g, ce = /\\(\\)?/g, ve = /^\[object .+?Constructor\]$/, ge = /^(?:0|[1-9]\d*)$/, oe = {}; oe[R] = oe[C] = oe[E] = oe[A] = oe[L] = oe[$] = oe[W] = oe[U] = oe[D] = !0, oe[d] = oe[s] = oe[M] = oe[v] = oe[I] = oe[c] = oe[a] = oe[r] = oe[i] = oe[n] = oe[o] = oe[O] = oe[P] = oe[F] = oe[N] = !1; var J = (typeof u == "undefined" ? "undefined" : m(u)) == "object" && u && u.Object === Object && u, Q = (typeof self == "undefined" ? "undefined" : m(self)) == "object" && self && self.Object === Object && self, he = J || Q || Function("return this")(), ke = (typeof _ == "undefined" ? "undefined" : m(_)) == "object" && _ && !_.nodeType && _, ne = ke && (typeof x == "undefined" ? "undefined" : m(x)) == "object" && x && !x.nodeType && x, se = ne && ne.exports === ke, Ce = se && J.process, q = function() { try { return Ce && Ce.binding("util"); } catch (le) { } }(), G = q && q.isTypedArray; function Y(le, Oe, Xe, ft) { for (var Tt = -1, mt = le ? le.length : 0; ++Tt < mt; ) { var Xt = le[Tt]; Oe(ft, Xt, Xe(Xt), le); } return ft; } function fe(le, Oe) { for (var Xe = -1, ft = le ? le.length : 0; ++Xe < ft; ) if (Oe(le[Xe], Xe, le)) return !0; return !1; } function we(le) { return function(Oe) { return Oe == null ? void 0 : Oe[le]; }; } function _e(le, Oe) { for (var Xe = -1, ft = Array(le); ++Xe < le; ) ft[Xe] = Oe(Xe); return ft; } function je(le) { return function(Oe) { return le(Oe); }; } function Ye(le, Oe) { return le == null ? void 0 : le[Oe]; } function nt(le) { var Oe = !1; if (le != null && typeof le.toString != "function") try { Oe = !!(le + ""); } catch (Xe) { } return Oe; } function ut(le) { var Oe = -1, Xe = Array(le.size); return le.forEach(function(ft, Tt) { Xe[++Oe] = [Tt, ft]; }), Xe; } function ot(le, Oe) { return function(Xe) { return le(Oe(Xe)); }; } function Ue(le) { var Oe = -1, Xe = Array(le.size); return le.forEach(function(ft) { Xe[++Oe] = ft; }), Xe; } var Ve = Array.prototype, Qe = Function.prototype, tt = Object.prototype, ae = he["__core-js_shared__"], Re = function() { var le = /[^.]+$/.exec(ae && ae.keys && ae.keys.IE_PROTO || ""); return le ? "Symbol(src)_1." + le : ""; }(), be = Qe.toString, Ee = tt.hasOwnProperty, pe = tt.toString, Pe = RegExp("^" + be.call(Ee).replace(ee, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), te = he.Symbol, He = he.Uint8Array, it = tt.propertyIsEnumerable, K = Ve.splice, Me = ot(Object.keys, Object), Le = kn(he, "DataView"), ue = kn(he, "Map"), Se = kn(he, "Promise"), Ie = kn(he, "Set"), st = kn(he, "WeakMap"), Ge = kn(Object, "create"), rt = Je(Le), _t = Je(ue), wt = Je(Se), Ot = Je(Ie), pt = Je(st), ct = te ? te.prototype : void 0, At = ct ? ct.valueOf : void 0, Pt = ct ? ct.toString : void 0; function bt(le) { var Oe = -1, Xe = le ? le.length : 0; for (this.clear(); ++Oe < Xe; ) { var ft = le[Oe]; this.set(ft[0], ft[1]); } } function Kt() { this.__data__ = Ge ? Ge(null) : {}; } function Ct(le) { return this.has(le) && delete this.__data__[le]; } function xt(le) { var Oe = this.__data__; if (Ge) { var Xe = Oe[le]; return Xe === w ? void 0 : Xe; } return Ee.call(Oe, le) ? Oe[le] : void 0; } function Ft(le) { var Oe = this.__data__; return Ge ? Oe[le] !== void 0 : Ee.call(Oe, le); } function Lt(le, Oe) { var Xe = this.__data__; return Xe[le] = Ge && Oe === void 0 ? w : Oe, this; } bt.prototype.clear = Kt, bt.prototype.delete = Ct, bt.prototype.get = xt, bt.prototype.has = Ft, bt.prototype.set = Lt; function Et(le) { var Oe = -1, Xe = le ? le.length : 0; for (this.clear(); ++Oe < Xe; ) { var ft = le[Oe]; this.set(ft[0], ft[1]); } } function Dr() { this.__data__ = []; } function Or(le) { var Oe = this.__data__, Xe = zr(Oe, le); if (Xe < 0) return !1; var ft = Oe.length - 1; return Xe == ft ? Oe.pop() : K.call(Oe, Xe, 1), !0; } function Gr(le) { var Oe = this.__data__, Xe = zr(Oe, le); return Xe < 0 ? void 0 : Oe[Xe][1]; } function Nr(le) { return zr(this.__data__, le) > -1; } function Yr(le, Oe) { var Xe = this.__data__, ft = zr(Xe, le); return ft < 0 ? Xe.push([le, Oe]) : Xe[ft][1] = Oe, this; } Et.prototype.clear = Dr, Et.prototype.delete = Or, Et.prototype.get = Gr, Et.prototype.has = Nr, Et.prototype.set = Yr; function Qt(le) { var Oe = -1, Xe = le ? le.length : 0; for (this.clear(); ++Oe < Xe; ) { var ft = le[Oe]; this.set(ft[0], ft[1]); } } function Xr() { this.__data__ = { hash: new bt(), map: new (ue || Et)(), string: new bt() }; } function Fr(le) { return jn(this, le).delete(le); } function Lr(le) { return jn(this, le).get(le); } function Ur(le) { return jn(this, le).has(le); } function vt(le, Oe) { return jn(this, le).set(le, Oe), this; } Qt.prototype.clear = Xr, Qt.prototype.delete = Fr, Qt.prototype.get = Lr, Qt.prototype.has = Ur, Qt.prototype.set = vt; function Ke(le) { var Oe = -1, Xe = le ? le.length : 0; for (this.__data__ = new Qt(); ++Oe < Xe; ) this.add(le[Oe]); } function me(le) { return this.__data__.set(le, w), this; } function Fe(le) { return this.__data__.has(le); } Ke.prototype.add = Ke.prototype.push = me, Ke.prototype.has = Fe; function Be(le) { this.__data__ = new Et(le); } function dt() { this.__data__ = new Et(); } function St(le) { return this.__data__.delete(le); } function Ht(le) { return this.__data__.get(le); } function lr(le) { return this.__data__.has(le); } function gr(le, Oe) { var Xe = this.__data__; if (Xe instanceof Et) { var ft = Xe.__data__; if (!ue || ft.length < g - 1) return ft.push([le, Oe]), this; Xe = this.__data__ = new Qt(ft); } return Xe.set(le, Oe), this; } Be.prototype.clear = dt, Be.prototype.delete = St, Be.prototype.get = Ht, Be.prototype.has = lr, Be.prototype.set = gr; function rn(le, Oe) { var Xe = nr(le) || fr(le) ? _e(le.length, String) : [], ft = Xe.length, Tt = !!ft; for (var mt in le) (Oe || Ee.call(le, mt)) && !(Tt && (mt == "length" || rr(mt, ft))) && Xe.push(mt); return Xe; } function zr(le, Oe) { for (var Xe = le.length; Xe--; ) if (Mt(le[Xe][0], Oe)) return Xe; return -1; } function pi(le, Oe, Xe, ft) { return $r(le, function(Tt, mt, Xt) { Oe(ft, Tt, Xe(Tt), Xt); }), ft; } var $r = xa(cn), Dn = Sa(); function cn(le, Oe) { return le && Dn(le, Oe, En); } function yi(le, Oe) { Oe = er(Oe, le) ? [Oe] : Ki(Oe); for (var Xe = 0, ft = Oe.length; le != null && Xe < ft; ) le = le[De(Oe[Xe++])]; return Xe && Xe == ft ? le : void 0; } function hn(le) { return pe.call(le); } function dn(le, Oe) { return le != null && Oe in Object(le); } function Nn(le, Oe, Xe, ft, Tt) { return le === Oe ? !0 : le == null || Oe == null || !dr(le) && !Er(Oe) ? le !== le && Oe !== Oe : Fn(le, Oe, Nn, Xe, ft, Tt); } function Fn(le, Oe, Xe, ft, Tt, mt) { var Xt = nr(le), ir = nr(Oe), hr = s, _r = s; Xt || (hr = On(le), hr = hr == d ? o : hr), ir || (_r = On(Oe), _r = _r == d ? o : _r); var Tr = hr == o && !nt(le), wr = _r == o && !nt(Oe), Rr = hr == _r; if (Rr && !Tr) return mt || (mt = new Be()), Xt || pr(le) ? Sn(le, Oe, Xe, ft, Tt, mt) : Yi(le, Oe, hr, Xe, ft, Tt, mt); if (!(Tt & y)) { var Jr = Tr && Ee.call(le, "__wrapped__"), Qr = wr && Ee.call(Oe, "__wrapped__"); if (Jr || Qr) { var Tn = Jr ? le.value() : le, yn = Qr ? Oe.value() : Oe; return mt || (mt = new Be()), Xe(Tn, yn, ft, Tt, mt); } } return Rr ? (mt || (mt = new Be()), Ri(le, Oe, Xe, ft, Tt, mt)) : !1; } function Xi(le, Oe, Xe, ft) { var Tt = Xe.length, mt = Tt, Xt = !ft; if (le == null) return !mt; for (le = Object(le); Tt--; ) { var ir = Xe[Tt]; if (Xt && ir[2] ? ir[1] !== le[ir[0]] : !(ir[0] in le)) return !1; } for (; ++Tt < mt; ) { ir = Xe[Tt]; var hr = ir[0], _r = le[hr], Tr = ir[1]; if (Xt && ir[2]) { if (_r === void 0 && !(hr in le)) return !1; } else { var wr = new Be(); if (ft) var Rr = ft(_r, Tr, hr, le, Oe, wr); if (!(Rr === void 0 ? Nn(Tr, _r, ft, f | y, wr) : Rr)) return !1; } } return !0; } function Ui(le) { if (!dr(le) || Ji(le)) return !1; var Oe = Pr(le) || nt(le) ? Pe : ve; return Oe.test(Je(le)); } function $i(le) { return Er(le) && Br(le.length) && !!oe[pe.call(le)]; } function ei(le) { return typeof le == "function" ? le : le == null ? Zr : m(le) == "object" ? nr(le) ? Vi(le[0], le[1]) : Wi(le) : ta(le); } function Bn(le) { if (!Oa(le)) return Me(le); var Oe = []; for (var Xe in Object(le)) Ee.call(le, Xe) && Xe != "constructor" && Oe.push(Xe); return Oe; } function Wi(le) { var Oe = ka(le); return Oe.length == 1 && Oe[0][2] ? qi(Oe[0][0], Oe[0][1]) : function(Xe) { return Xe === le || Xi(Xe, le, Oe); }; } function Vi(le, Oe) { return er(le) && Qi(Oe) ? qi(De(le), Oe) : function(Xe) { var ft = mr(Xe, le); return ft === void 0 && ft === Oe ? ea(Xe, le) : Nn(Oe, ft, void 0, f | y); }; } function xn(le) { return function(Oe) { return yi(Oe, le); }; } function wa(le) { if (typeof le == "string") return le; if (Ar(le)) return Pt ? Pt.call(le) : ""; var Oe = le + ""; return Oe == "0" && 1 / le == -h ? "-0" : Oe; } function Ki(le) { return nr(le) ? le : xe(le); } function Gi(le, Oe) { return function(Xe, ft) { var Tt = nr(Xe) ? Y : pi, mt = Oe ? Oe() : {}; return Tt(Xe, le, ei(ft), mt); }; } function xa(le, Oe) { return function(Xe, ft) { if (Xe == null) return Xe; if (!tr(Xe)) return le(Xe, ft); for (var Tt = Xe.length, mt = Oe ? Tt : -1, Xt = Object(Xe); (Oe ? mt-- : ++mt < Tt) && ft(Xt[mt], mt, Xt) !== !1; ) ; return Xe; }; } function Sa(le) { return function(Oe, Xe, ft) { for (var Tt = -1, mt = Object(Oe), Xt = ft(Oe), ir = Xt.length; ir--; ) { var hr = Xt[le ? ir : ++Tt]; if (Xe(mt[hr], hr, mt) === !1) break; } return Oe; }; } function Sn(le, Oe, Xe, ft, Tt, mt) { var Xt = Tt & y, ir = le.length, hr = Oe.length; if (ir != hr && !(Xt && hr > ir)) return !1; var _r = mt.get(le); if (_r && mt.get(Oe)) return _r == Oe; var Tr = -1, wr = !0, Rr = Tt & f ? new Ke() : void 0; for (mt.set(le, Oe), mt.set(Oe, le); ++Tr < ir; ) { var Jr = le[Tr], Qr = Oe[Tr]; if (ft) var Tn = Xt ? ft(Qr, Jr, Tr, Oe, le, mt) : ft(Jr, Qr, Tr, le, Oe, mt); if (Tn !== void 0) { if (Tn) continue; wr = !1; break; } if (Rr) { if (!fe(Oe, function(yn, Vn) { if (!Rr.has(Vn) && (Jr === yn || Xe(Jr, yn, ft, Tt, mt))) return Rr.add(Vn); })) { wr = !1; break; } } else if (!(Jr === Qr || Xe(Jr, Qr, ft, Tt, mt))) { wr = !1; break; } } return mt.delete(le), mt.delete(Oe), wr; } function Yi(le, Oe, Xe, ft, Tt, mt, Xt) { switch (Xe) { case I: if (le.byteLength != Oe.byteLength || le.byteOffset != Oe.byteOffset) return !1; le = le.buffer, Oe = Oe.buffer; case M: return !(le.byteLength != Oe.byteLength || !ft(new He(le), new He(Oe))); case v: case c: case n: return Mt(+le, +Oe); case a: return le.name == Oe.name && le.message == Oe.message; case O: case F: return le == Oe + ""; case i: var ir = ut; case P: var hr = mt & y; if (ir || (ir = Ue), le.size != Oe.size && !hr) return !1; var _r = Xt.get(le); if (_r) return _r == Oe; mt |= f, Xt.set(le, Oe); var Tr = Sn(ir(le), ir(Oe), ft, Tt, mt, Xt); return Xt.delete(le), Tr; case z: if (At) return At.call(le) == At.call(Oe); } return !1; } function Ri(le, Oe, Xe, ft, Tt, mt) { var Xt = Tt & y, ir = En(le), hr = ir.length, _r = En(Oe), Tr = _r.length; if (hr != Tr && !Xt) return !1; for (var wr = hr; wr--; ) { var Rr = ir[wr]; if (!(Xt ? Rr in Oe : Ee.call(Oe, Rr))) return !1; } var Jr = mt.get(le); if (Jr && mt.get(Oe)) return Jr == Oe; var Qr = !0; mt.set(le, Oe), mt.set(Oe, le); for (var Tn = Xt; ++wr < hr; ) { Rr = ir[wr]; var yn = le[Rr], Vn = Oe[Rr]; if (ft) var Ya = Xt ? ft(Vn, yn, Rr, Oe, le, mt) : ft(yn, Vn, Rr, le, Oe, mt); if (!(Ya === void 0 ? yn === Vn || Xe(yn, Vn, ft, Tt, mt) : Ya)) { Qr = !1; break; } Tn || (Tn = Rr == "constructor"); } if (Qr && !Tn) { var vi = le.constructor, mi = Oe.constructor; vi != mi && "constructor" in le && "constructor" in Oe && !(typeof vi == "function" && vi instanceof vi && typeof mi == "function" && mi instanceof mi) && (Qr = !1); } return mt.delete(le), mt.delete(Oe), Qr; } function jn(le, Oe) { var Xe = le.__data__; return ti(Oe) ? Xe[typeof Oe == "string" ? "string" : "hash"] : Xe.map; } function ka(le) { for (var Oe = En(le), Xe = Oe.length; Xe--; ) { var ft = Oe[Xe], Tt = le[ft]; Oe[Xe] = [ft, Tt, Qi(Tt)]; } return Oe; } function kn(le, Oe) { var Xe = Ye(le, Oe); return Ui(Xe) ? Xe : void 0; } var On = hn; (Le && On(new Le(new ArrayBuffer(1))) != I || ue && On(new ue()) != i || Se && On(Se.resolve()) != p || Ie && On(new Ie()) != P || st && On(new st()) != N) && (On = function(Oe) { var Xe = pe.call(Oe), ft = Xe == o ? Oe.constructor : void 0, Tt = ft ? Je(ft) : void 0; if (Tt) switch (Tt) { case rt: return I; case _t: return i; case wt: return p; case Ot: return P; case pt: return N; } return Xe; }); function Zi(le, Oe, Xe) { Oe = er(Oe, le) ? [Oe] : Ki(Oe); for (var ft, Tt = -1, Xt = Oe.length; ++Tt < Xt; ) { var mt = De(Oe[Tt]); if (!(ft = le != null && Xe(le, mt))) break; le = le[mt]; } if (ft) return ft; var Xt = le ? le.length : 0; return !!Xt && Br(Xt) && rr(mt, Xt) && (nr(le) || fr(le)); } function rr(le, Oe) { return Oe = Oe == null ? l : Oe, !!Oe && (typeof le == "number" || ge.test(le)) && le > -1 && le % 1 == 0 && le < Oe; } function er(le, Oe) { if (nr(le)) return !1; var Xe = m(le); return Xe == "number" || Xe == "symbol" || Xe == "boolean" || le == null || Ar(le) ? !0 : j.test(le) || !B.test(le) || Oe != null && le in Object(Oe); } function ti(le) { var Oe = m(le); return Oe == "string" || Oe == "number" || Oe == "symbol" || Oe == "boolean" ? le !== "__proto__" : le === null; } function Ji(le) { return !!Re && Re in le; } function Oa(le) { var Oe = le && le.constructor, Xe = typeof Oe == "function" && Oe.prototype || tt; return le === Xe; } function Qi(le) { return le === le && !dr(le); } function qi(le, Oe) { return function(Xe) { return Xe == null ? !1 : Xe[le] === Oe && (Oe !== void 0 || le in Object(Xe)); }; } var xe = Yt(function(le) { le = pn(le); var Oe = []; return V.test(le) && Oe.push(""), le.replace(re, function(Xe, ft, Tt, mt) { Oe.push(Tt ? mt.replace(ce, "$1") : ft || Xe); }), Oe; }); function De(le) { if (typeof le == "string" || Ar(le)) return le; var Oe = le + ""; return Oe == "0" && 1 / le == -h ? "-0" : Oe; } function Je(le) { if (le != null) { try { return be.call(le); } catch (Oe) { } try { return le + ""; } catch (Oe) { } } return ""; } var ht = Gi(function(le, Oe, Xe) { Ee.call(le, Xe) ? le[Xe].push(Oe) : le[Xe] = [Oe]; }); function Yt(le, Oe) { if (typeof le != "function" || Oe && typeof Oe != "function") throw new TypeError(b); var Xe = function ft() { var Tt = arguments, mt = Oe ? Oe.apply(this, Tt) : Tt[0], Xt = ft.cache; if (Xt.has(mt)) return Xt.get(mt); var ir = le.apply(this, Tt); return ft.cache = Xt.set(mt, ir), ir; }; return Xe.cache = new (Yt.Cache || Qt)(), Xe; } Yt.Cache = Qt; function Mt(le, Oe) { return le === Oe || le !== le && Oe !== Oe; } function fr(le) { return ur(le) && Ee.call(le, "callee") && (!it.call(le, "callee") || pe.call(le) == d); } var nr = Array.isArray; function tr(le) { return le != null && Br(le.length) && !Pr(le); } function ur(le) { return Er(le) && tr(le); } function Pr(le) { var Oe = dr(le) ? pe.call(le) : ""; return Oe == r || Oe == t; } function Br(le) { return typeof le == "number" && le > -1 && le % 1 == 0 && le <= l; } function dr(le) { var Oe = m(le); return !!le && (Oe == "object" || Oe == "function"); } function Er(le) { return !!le && m(le) == "object"; } function Ar(le) { return m(le) == "symbol" || Er(le) && pe.call(le) == z; } var pr = G ? je(G) : $i; function pn(le) { return le == null ? "" : wa(le); } function mr(le, Oe, Xe) { var ft = le == null ? void 0 : yi(le, Oe); return ft === void 0 ? Xe : ft; } function ea(le, Oe) { return le != null && Zi(le, Oe, dn); } function En(le) { return tr(le) ? rn(le) : Bn(le); } function Zr(le) { return le; } function ta(le) { return er(le) ? we(De(le)) : xn(le); } x.exports = ht; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 428: [function(e, x, _) { function u(y) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(l) { return typeof l; } : u = function(l) { return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l; }, u(y); } var m = "[object Boolean]", g = Object.prototype, b = g.toString; function w(y) { return y === !0 || y === !1 || f(y) && b.call(y) == m; } function f(y) { return !!y && u(y) == "object"; } x.exports = w; }, {}], 429: [function(e, x, _) { (function(u) { function m(xe) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(Je) { return typeof Je; } : m = function(Je) { return Je && typeof Symbol == "function" && Je.constructor === Symbol && Je !== Symbol.prototype ? "symbol" : typeof Je; }, m(xe); } var g = 200, b = "__lodash_hash_undefined__", w = 1, f = 2, y = 9007199254740991, h = "[object Arguments]", l = "[object Array]", d = "[object AsyncFunction]", s = "[object Boolean]", v = "[object Date]", c = "[object Error]", a = "[object Function]", r = "[object GeneratorFunction]", t = "[object Map]", i = "[object Number]", n = "[object Null]", o = "[object Object]", p = "[object Promise]", O = "[object Proxy]", P = "[object RegExp]", F = "[object Set]", z = "[object String]", N = "[object Symbol]", M = "[object Undefined]", I = "[object WeakMap]", R = "[object ArrayBuffer]", C = "[object DataView]", E = "[object Float32Array]", A = "[object Float64Array]", L = "[object Int8Array]", $ = "[object Int16Array]", W = "[object Int32Array]", U = "[object Uint8Array]", D = "[object Uint8ClampedArray]", B = "[object Uint16Array]", j = "[object Uint32Array]", V = /[\\^$.*+?()[\]{}|]/g, re = /^\[object .+?Constructor\]$/, ee = /^(?:0|[1-9]\d*)$/, ce = {}; ce[E] = ce[A] = ce[L] = ce[$] = ce[W] = ce[U] = ce[D] = ce[B] = ce[j] = !0, ce[h] = ce[l] = ce[R] = ce[s] = ce[C] = ce[v] = ce[c] = ce[a] = ce[t] = ce[i] = ce[o] = ce[P] = ce[F] = ce[z] = ce[I] = !1; var ve = (typeof u == "undefined" ? "undefined" : m(u)) == "object" && u && u.Object === Object && u, ge = (typeof self == "undefined" ? "undefined" : m(self)) == "object" && self && self.Object === Object && self, oe = ve || ge || Function("return this")(), J = (typeof _ == "undefined" ? "undefined" : m(_)) == "object" && _ && !_.nodeType && _, Q = J && (typeof x == "undefined" ? "undefined" : m(x)) == "object" && x && !x.nodeType && x, he = Q && Q.exports === J, ke = he && ve.process, ne = function() { try { return ke && ke.binding && ke.binding("util"); } catch (xe) { } }(), se = ne && ne.isTypedArray; function Ce(xe, De) { for (var Je = -1, ht = xe == null ? 0 : xe.length, Yt = 0, Mt = []; ++Je < ht; ) { var fr = xe[Je]; De(fr, Je, xe) && (Mt[Yt++] = fr); } return Mt; } function q(xe, De) { for (var Je = -1, ht = De.length, Yt = xe.length; ++Je < ht; ) xe[Yt + Je] = De[Je]; return xe; } function G(xe, De) { for (var Je = -1, ht = xe == null ? 0 : xe.length; ++Je < ht; ) if (De(xe[Je], Je, xe)) return !0; return !1; } function Y(xe, De) { for (var Je = -1, ht = Array(xe); ++Je < xe; ) ht[Je] = De(Je); return ht; } function fe(xe) { return function(De) { return xe(De); }; } function we(xe, De) { return xe.has(De); } function _e(xe, De) { return xe == null ? void 0 : xe[De]; } function je(xe) { var De = -1, Je = Array(xe.size); return xe.forEach(function(ht, Yt) { Je[++De] = [Yt, ht]; }), Je; } function Ye(xe, De) { return function(Je) { return xe(De(Je)); }; } function nt(xe) { var De = -1, Je = Array(xe.size); return xe.forEach(function(ht) { Je[++De] = ht; }), Je; } var ut = Array.prototype, ot = Function.prototype, Ue = Object.prototype, Ve = oe["__core-js_shared__"], Qe = ot.toString, tt = Ue.hasOwnProperty, ae = function() { var xe = /[^.]+$/.exec(Ve && Ve.keys && Ve.keys.IE_PROTO || ""); return xe ? "Symbol(src)_1." + xe : ""; }(), Re = Ue.toString, be = RegExp("^" + Qe.call(tt).replace(V, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Ee = he ? oe.Buffer : void 0, pe = oe.Symbol, Pe = oe.Uint8Array, te = Ue.propertyIsEnumerable, He = ut.splice, it = pe ? pe.toStringTag : void 0, K = Object.getOwnPropertySymbols, Me = Ee ? Ee.isBuffer : void 0, Le = Ye(Object.keys, Object), ue = Bn(oe, "DataView"), Se = Bn(oe, "Map"), Ie = Bn(oe, "Promise"), st = Bn(oe, "Set"), Ge = Bn(oe, "WeakMap"), rt = Bn(Object, "create"), _t = Sn(ue), wt = Sn(Se), Ot = Sn(Ie), pt = Sn(st), ct = Sn(Ge), At = pe ? pe.prototype : void 0, Pt = At ? At.valueOf : void 0; function bt(xe) { var De = -1, Je = xe == null ? 0 : xe.length; for (this.clear(); ++De < Je; ) { var ht = xe[De]; this.set(ht[0], ht[1]); } } function Kt() { this.__data__ = rt ? rt(null) : {}, this.size = 0; } function Ct(xe) { var De = this.has(xe) && delete this.__data__[xe]; return this.size -= De ? 1 : 0, De; } function xt(xe) { var De = this.__data__; if (rt) { var Je = De[xe]; return Je === b ? void 0 : Je; } return tt.call(De, xe) ? De[xe] : void 0; } function Ft(xe) { var De = this.__data__; return rt ? De[xe] !== void 0 : tt.call(De, xe); } function Lt(xe, De) { var Je = this.__data__; return this.size += this.has(xe) ? 0 : 1, Je[xe] = rt && De === void 0 ? b : De, this; } bt.prototype.clear = Kt, bt.prototype.delete = Ct, bt.prototype.get = xt, bt.prototype.has = Ft, bt.prototype.set = Lt; function Et(xe) { var De = -1, Je = xe == null ? 0 : xe.length; for (this.clear(); ++De < Je; ) { var ht = xe[De]; this.set(ht[0], ht[1]); } } function Dr() { this.__data__ = [], this.size = 0; } function Or(xe) { var De = this.__data__, Je = zr(De, xe); if (Je < 0) return !1; var ht = De.length - 1; return Je == ht ? De.pop() : He.call(De, Je, 1), --this.size, !0; } function Gr(xe) { var De = this.__data__, Je = zr(De, xe); return Je < 0 ? void 0 : De[Je][1]; } function Nr(xe) { return zr(this.__data__, xe) > -1; } function Yr(xe, De) { var Je = this.__data__, ht = zr(Je, xe); return ht < 0 ? (++this.size, Je.push([xe, De])) : Je[ht][1] = De, this; } Et.prototype.clear = Dr, Et.prototype.delete = Or, Et.prototype.get = Gr, Et.prototype.has = Nr, Et.prototype.set = Yr; function Qt(xe) { var De = -1, Je = xe == null ? 0 : xe.length; for (this.clear(); ++De < Je; ) { var ht = xe[De]; this.set(ht[0], ht[1]); } } function Xr() { this.size = 0, this.__data__ = { hash: new bt(), map: new (Se || Et)(), string: new bt() }; } function Fr(xe) { var De = ei(this, xe).delete(xe); return this.size -= De ? 1 : 0, De; } function Lr(xe) { return ei(this, xe).get(xe); } function Ur(xe) { return ei(this, xe).has(xe); } function vt(xe, De) { var Je = ei(this, xe), ht = Je.size; return Je.set(xe, De), this.size += Je.size == ht ? 0 : 1, this; } Qt.prototype.clear = Xr, Qt.prototype.delete = Fr, Qt.prototype.get = Lr, Qt.prototype.has = Ur, Qt.prototype.set = vt; function Ke(xe) { var De = -1, Je = xe == null ? 0 : xe.length; for (this.__data__ = new Qt(); ++De < Je; ) this.add(xe[De]); } function me(xe) { return this.__data__.set(xe, b), this; } function Fe(xe) { return this.__data__.has(xe); } Ke.prototype.add = Ke.prototype.push = me, Ke.prototype.has = Fe; function Be(xe) { var De = this.__data__ = new Et(xe); this.size = De.size; } function dt() { this.__data__ = new Et(), this.size = 0; } function St(xe) { var De = this.__data__, Je = De.delete(xe); return this.size = De.size, Je; } function Ht(xe) { return this.__data__.get(xe); } function lr(xe) { return this.__data__.has(xe); } function gr(xe, De) { var Je = this.__data__; if (Je instanceof Et) { var ht = Je.__data__; if (!Se || ht.length < g - 1) return ht.push([xe, De]), this.size = ++Je.size, this; Je = this.__data__ = new Qt(ht); } return Je.set(xe, De), this.size = Je.size, this; } Be.prototype.clear = dt, Be.prototype.delete = St, Be.prototype.get = Ht, Be.prototype.has = lr, Be.prototype.set = gr; function rn(xe, De) { var Je = jn(xe), ht = !Je && Ri(xe), Yt = !Je && !ht && kn(xe), Mt = !Je && !ht && !Yt && Ji(xe), fr = Je || ht || Yt || Mt, nr = fr ? Y(xe.length, String) : [], tr = nr.length; for (var ur in xe) (De || tt.call(xe, ur)) && !(fr && // Safari 9 has enumerable `arguments.length` in strict mode. (ur == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. Yt && (ur == "offset" || ur == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. Mt && (ur == "buffer" || ur == "byteLength" || ur == "byteOffset") || // Skip index properties. wa(ur, tr))) && nr.push(ur); return nr; } function zr(xe, De) { for (var Je = xe.length; Je--; ) if (Yi(xe[Je][0], De)) return Je; return -1; } function pi(xe, De, Je) { var ht = De(xe); return jn(xe) ? ht : q(ht, Je(xe)); } function $r(xe) { return xe == null ? xe === void 0 ? M : n : it && it in Object(xe) ? Wi(xe) : Sa(xe); } function Dn(xe) { return ti(xe) && $r(xe) == h; } function cn(xe, De, Je, ht, Yt) { return xe === De ? !0 : xe == null || De == null || !ti(xe) && !ti(De) ? xe !== xe && De !== De : yi(xe, De, Je, ht, cn, Yt); } function yi(xe, De, Je, ht, Yt, Mt) { var fr = jn(xe), nr = jn(De), tr = fr ? l : xn(xe), ur = nr ? l : xn(De); tr = tr == h ? o : tr, ur = ur == h ? o : ur; var Pr = tr == o, Br = ur == o, dr = tr == ur; if (dr && kn(xe)) { if (!kn(De)) return !1; fr = !0, Pr = !1; } if (dr && !Pr) return Mt || (Mt = new Be()), fr || Ji(xe) ? Fn(xe, De, Je, ht, Yt, Mt) : Xi(xe, De, tr, Je, ht, Yt, Mt); if (!(Je & w)) { var Er = Pr && tt.call(xe, "__wrapped__"), Ar = Br && tt.call(De, "__wrapped__"); if (Er || Ar) { var pr = Er ? xe.value() : xe, pn = Ar ? De.value() : De; return Mt || (Mt = new Be()), Yt(pr, pn, Je, ht, Mt); } } return dr ? (Mt || (Mt = new Be()), Ui(xe, De, Je, ht, Yt, Mt)) : !1; } function hn(xe) { if (!er(xe) || Gi(xe)) return !1; var De = Zi(xe) ? be : re; return De.test(Sn(xe)); } function dn(xe) { return ti(xe) && rr(xe.length) && !!ce[$r(xe)]; } function Nn(xe) { if (!xa(xe)) return Le(xe); var De = []; for (var Je in Object(xe)) tt.call(xe, Je) && Je != "constructor" && De.push(Je); return De; } function Fn(xe, De, Je, ht, Yt, Mt) { var fr = Je & w, nr = xe.length, tr = De.length; if (nr != tr && !(fr && tr > nr)) return !1; var ur = Mt.get(xe); if (ur && Mt.get(De)) return ur == De; var Pr = -1, Br = !0, dr = Je & f ? new Ke() : void 0; for (Mt.set(xe, De), Mt.set(De, xe); ++Pr < nr; ) { var Er = xe[Pr], Ar = De[Pr]; if (ht) var pr = fr ? ht(Ar, Er, Pr, De, xe, Mt) : ht(Er, Ar, Pr, xe, De, Mt); if (pr !== void 0) { if (pr) continue; Br = !1; break; } if (dr) { if (!G(De, function(pn, mr) { if (!we(dr, mr) && (Er === pn || Yt(Er, pn, Je, ht, Mt))) return dr.push(mr); })) { Br = !1; break; } } else if (!(Er === Ar || Yt(Er, Ar, Je, ht, Mt))) { Br = !1; break; } } return Mt.delete(xe), Mt.delete(De), Br; } function Xi(xe, De, Je, ht, Yt, Mt, fr) { switch (Je) { case C: if (xe.byteLength != De.byteLength || xe.byteOffset != De.byteOffset) return !1; xe = xe.buffer, De = De.buffer; case R: return !(xe.byteLength != De.byteLength || !Mt(new Pe(xe), new Pe(De))); case s: case v: case i: return Yi(+xe, +De); case c: return xe.name == De.name && xe.message == De.message; case P: case z: return xe == De + ""; case t: var nr = je; case F: var tr = ht & w; if (nr || (nr = nt), xe.size != De.size && !tr) return !1; var ur = fr.get(xe); if (ur) return ur == De; ht |= f, fr.set(xe, De); var Pr = Fn(nr(xe), nr(De), ht, Yt, Mt, fr); return fr.delete(xe), Pr; case N: if (Pt) return Pt.call(xe) == Pt.call(De); } return !1; } function Ui(xe, De, Je, ht, Yt, Mt) { var fr = Je & w, nr = $i(xe), tr = nr.length, ur = $i(De), Pr = ur.length; if (tr != Pr && !fr) return !1; for (var Br = tr; Br--; ) { var dr = nr[Br]; if (!(fr ? dr in De : tt.call(De, dr))) return !1; } var Er = Mt.get(xe); if (Er && Mt.get(De)) return Er == De; var Ar = !0; Mt.set(xe, De), Mt.set(De, xe); for (var pr = fr; ++Br < tr; ) { dr = nr[Br]; var pn = xe[dr], mr = De[dr]; if (ht) var ea = fr ? ht(mr, pn, dr, De, xe, Mt) : ht(pn, mr, dr, xe, De, Mt); if (!(ea === void 0 ? pn === mr || Yt(pn, mr, Je, ht, Mt) : ea)) { Ar = !1; break; } pr || (pr = dr == "constructor"); } if (Ar && !pr) { var En = xe.constructor, Zr = De.constructor; En != Zr && "constructor" in xe && "constructor" in De && !(typeof En == "function" && En instanceof En && typeof Zr == "function" && Zr instanceof Zr) && (Ar = !1); } return Mt.delete(xe), Mt.delete(De), Ar; } function $i(xe) { return pi(xe, Oa, Vi); } function ei(xe, De) { var Je = xe.__data__; return Ki(De) ? Je[typeof De == "string" ? "string" : "hash"] : Je.map; } function Bn(xe, De) { var Je = _e(xe, De); return hn(Je) ? Je : void 0; } function Wi(xe) { var De = tt.call(xe, it), Je = xe[it]; try { xe[it] = void 0; var ht = !0; } catch (Mt) { } var Yt = Re.call(xe); return ht && (De ? xe[it] = Je : delete xe[it]), Yt; } var Vi = K ? function(xe) { return xe == null ? [] : (xe = Object(xe), Ce(K(xe), function(De) { return te.call(xe, De); })); } : Qi, xn = $r; (ue && xn(new ue(new ArrayBuffer(1))) != C || Se && xn(new Se()) != t || Ie && xn(Ie.resolve()) != p || st && xn(new st()) != F || Ge && xn(new Ge()) != I) && (xn = function(De) { var Je = $r(De), ht = Je == o ? De.constructor : void 0, Yt = ht ? Sn(ht) : ""; if (Yt) switch (Yt) { case _t: return C; case wt: return t; case Ot: return p; case pt: return F; case ct: return I; } return Je; }); function wa(xe, De) { return De = De == null ? y : De, !!De && (typeof xe == "number" || ee.test(xe)) && xe > -1 && xe % 1 == 0 && xe < De; } function Ki(xe) { var De = m(xe); return De == "string" || De == "number" || De == "symbol" || De == "boolean" ? xe !== "__proto__" : xe === null; } function Gi(xe) { return !!ae && ae in xe; } function xa(xe) { var De = xe && xe.constructor, Je = typeof De == "function" && De.prototype || Ue; return xe === Je; } function Sa(xe) { return Re.call(xe); } function Sn(xe) { if (xe != null) { try { return Qe.call(xe); } catch (De) { } try { return xe + ""; } catch (De) { } } return ""; } function Yi(xe, De) { return xe === De || xe !== xe && De !== De; } var Ri = Dn(function() { return arguments; }()) ? Dn : function(xe) { return ti(xe) && tt.call(xe, "callee") && !te.call(xe, "callee"); }, jn = Array.isArray; function ka(xe) { return xe != null && rr(xe.length) && !Zi(xe); } var kn = Me || qi; function On(xe, De) { return cn(xe, De); } function Zi(xe) { if (!er(xe)) return !1; var De = $r(xe); return De == a || De == r || De == d || De == O; } function rr(xe) { return typeof xe == "number" && xe > -1 && xe % 1 == 0 && xe <= y; } function er(xe) { var De = m(xe); return xe != null && (De == "object" || De == "function"); } function ti(xe) { return xe != null && m(xe) == "object"; } var Ji = se ? fe(se) : dn; function Oa(xe) { return ka(xe) ? rn(xe) : Nn(xe); } function Qi() { return []; } function qi() { return !1; } x.exports = On; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 430: [function(e, x, _) { (function(u) { function m(P) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(z) { return typeof z; } : m = function(z) { return z && typeof Symbol == "function" && z.constructor === Symbol && z !== Symbol.prototype ? "symbol" : typeof z; }, m(P); } var g = "[object AsyncFunction]", b = "[object Function]", w = "[object GeneratorFunction]", f = "[object Null]", y = "[object Proxy]", h = "[object Undefined]", l = (typeof u == "undefined" ? "undefined" : m(u)) == "object" && u && u.Object === Object && u, d = (typeof self == "undefined" ? "undefined" : m(self)) == "object" && self && self.Object === Object && self, s = l || d || Function("return this")(), v = Object.prototype, c = v.hasOwnProperty, a = v.toString, r = s.Symbol, t = r ? r.toStringTag : void 0; function i(P) { return P == null ? P === void 0 ? h : f : t && t in Object(P) ? n(P) : o(P); } function n(P) { var F = c.call(P, t), z = P[t]; try { P[t] = void 0; var N = !0; } catch (I) { } var M = a.call(P); return N && (F ? P[t] = z : delete P[t]), M; } function o(P) { return a.call(P); } function p(P) { if (!O(P)) return !1; var F = i(P); return F == b || F == w || F == g || F == y; } function O(P) { var F = m(P); return P != null && (F == "object" || F == "function"); } x.exports = p; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 431: [function(e, x, _) { function u(m) { return m == null; } x.exports = u; }, {}], 432: [function(e, x, _) { function u(m) { return m === void 0; } x.exports = u; }, {}], 433: [function(e, x, _) { (function(u) { function m(be) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(pe) { return typeof pe; } : m = function(pe) { return pe && typeof Symbol == "function" && pe.constructor === Symbol && pe !== Symbol.prototype ? "symbol" : typeof pe; }, m(be); } var g = 200, b = "__lodash_hash_undefined__", w = 1 / 0, f = "[object Function]", y = "[object GeneratorFunction]", h = /[\\^$.*+?()[\]{}|]/g, l = /^\[object .+?Constructor\]$/, d = (typeof u == "undefined" ? "undefined" : m(u)) == "object" && u && u.Object === Object && u, s = (typeof self == "undefined" ? "undefined" : m(self)) == "object" && self && self.Object === Object && self, v = d || s || Function("return this")(); function c(be, Ee) { var pe = be ? be.length : 0; return !!pe && t(be, Ee, 0) > -1; } function a(be, Ee, pe) { for (var Pe = -1, te = be ? be.length : 0; ++Pe < te; ) if (pe(Ee, be[Pe])) return !0; return !1; } function r(be, Ee, pe, Pe) { for (var te = be.length, He = pe + (Pe ? 1 : -1); Pe ? He-- : ++He < te; ) if (Ee(be[He], He, be)) return He; return -1; } function t(be, Ee, pe) { if (Ee !== Ee) return r(be, i, pe); for (var Pe = pe - 1, te = be.length; ++Pe < te; ) if (be[Pe] === Ee) return Pe; return -1; } function i(be) { return be !== be; } function n(be, Ee) { return be.has(Ee); } function o(be, Ee) { return be == null ? void 0 : be[Ee]; } function p(be) { var Ee = !1; if (be != null && typeof be.toString != "function") try { Ee = !!(be + ""); } catch (pe) { } return Ee; } function O(be) { var Ee = -1, pe = Array(be.size); return be.forEach(function(Pe) { pe[++Ee] = Pe; }), pe; } var P = Array.prototype, F = Function.prototype, z = Object.prototype, N = v["__core-js_shared__"], M = function() { var be = /[^.]+$/.exec(N && N.keys && N.keys.IE_PROTO || ""); return be ? "Symbol(src)_1." + be : ""; }(), I = F.toString, R = z.hasOwnProperty, C = z.toString, E = RegExp("^" + I.call(R).replace(h, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), A = P.splice, L = nt(v, "Map"), $ = nt(v, "Set"), W = nt(Object, "create"); function U(be) { var Ee = -1, pe = be ? be.length : 0; for (this.clear(); ++Ee < pe; ) { var Pe = be[Ee]; this.set(Pe[0], Pe[1]); } } function D() { this.__data__ = W ? W(null) : {}; } function B(be) { return this.has(be) && delete this.__data__[be]; } function j(be) { var Ee = this.__data__; if (W) { var pe = Ee[be]; return pe === b ? void 0 : pe; } return R.call(Ee, be) ? Ee[be] : void 0; } function V(be) { var Ee = this.__data__; return W ? Ee[be] !== void 0 : R.call(Ee, be); } function re(be, Ee) { var pe = this.__data__; return pe[be] = W && Ee === void 0 ? b : Ee, this; } U.prototype.clear = D, U.prototype.delete = B, U.prototype.get = j, U.prototype.has = V, U.prototype.set = re; function ee(be) { var Ee = -1, pe = be ? be.length : 0; for (this.clear(); ++Ee < pe; ) { var Pe = be[Ee]; this.set(Pe[0], Pe[1]); } } function ce() { this.__data__ = []; } function ve(be) { var Ee = this.__data__, pe = fe(Ee, be); if (pe < 0) return !1; var Pe = Ee.length - 1; return pe == Pe ? Ee.pop() : A.call(Ee, pe, 1), !0; } function ge(be) { var Ee = this.__data__, pe = fe(Ee, be); return pe < 0 ? void 0 : Ee[pe][1]; } function oe(be) { return fe(this.__data__, be) > -1; } function J(be, Ee) { var pe = this.__data__, Pe = fe(pe, be); return Pe < 0 ? pe.push([be, Ee]) : pe[Pe][1] = Ee, this; } ee.prototype.clear = ce, ee.prototype.delete = ve, ee.prototype.get = ge, ee.prototype.has = oe, ee.prototype.set = J; function Q(be) { var Ee = -1, pe = be ? be.length : 0; for (this.clear(); ++Ee < pe; ) { var Pe = be[Ee]; this.set(Pe[0], Pe[1]); } } function he() { this.__data__ = { hash: new U(), map: new (L || ee)(), string: new U() }; } function ke(be) { return Ye(this, be).delete(be); } function ne(be) { return Ye(this, be).get(be); } function se(be) { return Ye(this, be).has(be); } function Ce(be, Ee) { return Ye(this, be).set(be, Ee), this; } Q.prototype.clear = he, Q.prototype.delete = ke, Q.prototype.get = ne, Q.prototype.has = se, Q.prototype.set = Ce; function q(be) { var Ee = -1, pe = be ? be.length : 0; for (this.__data__ = new Q(); ++Ee < pe; ) this.add(be[Ee]); } function G(be) { return this.__data__.set(be, b), this; } function Y(be) { return this.__data__.has(be); } q.prototype.add = q.prototype.push = G, q.prototype.has = Y; function fe(be, Ee) { for (var pe = be.length; pe--; ) if (Qe(be[pe][0], Ee)) return pe; return -1; } function we(be) { if (!ae(be) || ot(be)) return !1; var Ee = tt(be) || p(be) ? E : l; return Ee.test(Ue(be)); } function _e(be, Ee, pe) { var Pe = -1, te = c, He = be.length, it = !0, K = [], Me = K; if (pe) it = !1, te = a; else if (He >= g) { var Le = Ee ? null : je(be); if (Le) return O(Le); it = !1, te = n, Me = new q(); } else Me = Ee ? [] : K; e: for (; ++Pe < He; ) { var ue = be[Pe], Se = Ee ? Ee(ue) : ue; if (ue = pe || ue !== 0 ? ue : 0, it && Se === Se) { for (var Ie = Me.length; Ie--; ) if (Me[Ie] === Se) continue e; Ee && Me.push(Se), K.push(ue); } else te(Me, Se, pe) || (Me !== K && Me.push(Se), K.push(ue)); } return K; } var je = $ && 1 / O(new $([, -0]))[1] == w ? function(be) { return new $(be); } : Re; function Ye(be, Ee) { var pe = be.__data__; return ut(Ee) ? pe[typeof Ee == "string" ? "string" : "hash"] : pe.map; } function nt(be, Ee) { var pe = o(be, Ee); return we(pe) ? pe : void 0; } function ut(be) { var Ee = m(be); return Ee == "string" || Ee == "number" || Ee == "symbol" || Ee == "boolean" ? be !== "__proto__" : be === null; } function ot(be) { return !!M && M in be; } function Ue(be) { if (be != null) { try { return I.call(be); } catch (Ee) { } try { return be + ""; } catch (Ee) { } } return ""; } function Ve(be) { return be && be.length ? _e(be) : []; } function Qe(be, Ee) { return be === Ee || be !== be && Ee !== Ee; } function tt(be) { var Ee = ae(be) ? C.call(be) : ""; return Ee == f || Ee == y; } function ae(be) { var Ee = m(be); return !!be && (Ee == "object" || Ee == "function"); } function Re() { } x.exports = Ve; }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 434: [function(e, x, _) { var u = e("inherits"), m = e("hash-base"), g = e("safe-buffer").Buffer, b = new Array(16); function w() { m.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878; } u(w, m), w.prototype._update = function() { for (var s = b, v = 0; v < 16; ++v) s[v] = this._block.readInt32LE(v * 4); var c = this._a, a = this._b, r = this._c, t = this._d; c = y(c, a, r, t, s[0], 3614090360, 7), t = y(t, c, a, r, s[1], 3905402710, 12), r = y(r, t, c, a, s[2], 606105819, 17), a = y(a, r, t, c, s[3], 3250441966, 22), c = y(c, a, r, t, s[4], 4118548399, 7), t = y(t, c, a, r, s[5], 1200080426, 12), r = y(r, t, c, a, s[6], 2821735955, 17), a = y(a, r, t, c, s[7], 4249261313, 22), c = y(c, a, r, t, s[8], 1770035416, 7), t = y(t, c, a, r, s[9], 2336552879, 12), r = y(r, t, c, a, s[10], 4294925233, 17), a = y(a, r, t, c, s[11], 2304563134, 22), c = y(c, a, r, t, s[12], 1804603682, 7), t = y(t, c, a, r, s[13], 4254626195, 12), r = y(r, t, c, a, s[14], 2792965006, 17), a = y(a, r, t, c, s[15], 1236535329, 22), c = h(c, a, r, t, s[1], 4129170786, 5), t = h(t, c, a, r, s[6], 3225465664, 9), r = h(r, t, c, a, s[11], 643717713, 14), a = h(a, r, t, c, s[0], 3921069994, 20), c = h(c, a, r, t, s[5], 3593408605, 5), t = h(t, c, a, r, s[10], 38016083, 9), r = h(r, t, c, a, s[15], 3634488961, 14), a = h(a, r, t, c, s[4], 3889429448, 20), c = h(c, a, r, t, s[9], 568446438, 5), t = h(t, c, a, r, s[14], 3275163606, 9), r = h(r, t, c, a, s[3], 4107603335, 14), a = h(a, r, t, c, s[8], 1163531501, 20), c = h(c, a, r, t, s[13], 2850285829, 5), t = h(t, c, a, r, s[2], 4243563512, 9), r = h(r, t, c, a, s[7], 1735328473, 14), a = h(a, r, t, c, s[12], 2368359562, 20), c = l(c, a, r, t, s[5], 4294588738, 4), t = l(t, c, a, r, s[8], 2272392833, 11), r = l(r, t, c, a, s[11], 1839030562, 16), a = l(a, r, t, c, s[14], 4259657740, 23), c = l(c, a, r, t, s[1], 2763975236, 4), t = l(t, c, a, r, s[4], 1272893353, 11), r = l(r, t, c, a, s[7], 4139469664, 16), a = l(a, r, t, c, s[10], 3200236656, 23), c = l(c, a, r, t, s[13], 681279174, 4), t = l(t, c, a, r, s[0], 3936430074, 11), r = l(r, t, c, a, s[3], 3572445317, 16), a = l(a, r, t, c, s[6], 76029189, 23), c = l(c, a, r, t, s[9], 3654602809, 4), t = l(t, c, a, r, s[12], 3873151461, 11), r = l(r, t, c, a, s[15], 530742520, 16), a = l(a, r, t, c, s[2], 3299628645, 23), c = d(c, a, r, t, s[0], 4096336452, 6), t = d(t, c, a, r, s[7], 1126891415, 10), r = d(r, t, c, a, s[14], 2878612391, 15), a = d(a, r, t, c, s[5], 4237533241, 21), c = d(c, a, r, t, s[12], 1700485571, 6), t = d(t, c, a, r, s[3], 2399980690, 10), r = d(r, t, c, a, s[10], 4293915773, 15), a = d(a, r, t, c, s[1], 2240044497, 21), c = d(c, a, r, t, s[8], 1873313359, 6), t = d(t, c, a, r, s[15], 4264355552, 10), r = d(r, t, c, a, s[6], 2734768916, 15), a = d(a, r, t, c, s[13], 1309151649, 21), c = d(c, a, r, t, s[4], 4149444226, 6), t = d(t, c, a, r, s[11], 3174756917, 10), r = d(r, t, c, a, s[2], 718787259, 15), a = d(a, r, t, c, s[9], 3951481745, 21), this._a = this._a + c | 0, this._b = this._b + a | 0, this._c = this._c + r | 0, this._d = this._d + t | 0; }, w.prototype._digest = function() { this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update(); var s = g.allocUnsafe(16); return s.writeInt32LE(this._a, 0), s.writeInt32LE(this._b, 4), s.writeInt32LE(this._c, 8), s.writeInt32LE(this._d, 12), s; }; function f(s, v) { return s << v | s >>> 32 - v; } function y(s, v, c, a, r, t, i) { return f(s + (v & c | ~v & a) + r + t | 0, i) + v | 0; } function h(s, v, c, a, r, t, i) { return f(s + (v & a | c & ~a) + r + t | 0, i) + v | 0; } function l(s, v, c, a, r, t, i) { return f(s + (v ^ c ^ a) + r + t | 0, i) + v | 0; } function d(s, v, c, a, r, t, i) { return f(s + (c ^ (v | ~a)) + r + t | 0, i) + v | 0; } x.exports = w; }, { "hash-base": 370, inherits: 387, "safe-buffer": 494 }], 435: [function(e, x, _) { var u = e("bn.js"), m = e("brorand"); function g(b) { this.rand = b || new m.Rand(); } x.exports = g, g.create = function(w) { return new g(w); }, g.prototype._randbelow = function(w) { var f = w.bitLength(), y = Math.ceil(f / 8); do var h = new u(this.rand.generate(y)); while (h.cmp(w) >= 0); return h; }, g.prototype._randrange = function(w, f) { var y = f.sub(w); return w.add(this._randbelow(y)); }, g.prototype.test = function(w, f, y) { var h = w.bitLength(), l = u.mont(w), d = new u(1).toRed(l); f || (f = Math.max(1, h / 48 | 0)); for (var s = w.subn(1), v = 0; !s.testn(v); v++) ; for (var c = w.shrn(v), a = s.toRed(l), r = !0; f > 0; f--) { var t = this._randrange(new u(2), s); y && y(t); var i = t.toRed(l).redPow(c); if (!(i.cmp(d) === 0 || i.cmp(a) === 0)) { for (var n = 1; n < v; n++) { if (i = i.redSqr(), i.cmp(d) === 0) return !1; if (i.cmp(a) === 0) break; } if (n === v) return !1; } } return r; }, g.prototype.getDivisor = function(w, f) { var y = w.bitLength(), h = u.mont(w), l = new u(1).toRed(h); f || (f = Math.max(1, y / 48 | 0)); for (var d = w.subn(1), s = 0; !d.testn(s); s++) ; for (var v = w.shrn(s), c = d.toRed(h); f > 0; f--) { var a = this._randrange(new u(2), d), r = w.gcd(a); if (r.cmpn(1) !== 0) return r; var t = a.toRed(h).redPow(v); if (!(t.cmp(l) === 0 || t.cmp(c) === 0)) { for (var i = 1; i < s; i++) { if (t = t.redSqr(), t.cmp(l) === 0) return t.fromRed().subn(1).gcd(w); if (t.cmp(c) === 0) break; } if (i === s) return t = t.redSqr(), t.fromRed().subn(1).gcd(w); } } return !1; }; }, { "bn.js": 436, brorand: 184 }], 436: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 437: [function(e, x, _) { x.exports = u; function u(m, g) { if (!m) throw new Error(g || "Assertion failed"); } u.equal = function(g, b, w) { if (g != b) throw new Error(w || "Assertion failed: " + g + " != " + b); }; }, {}], 438: [function(e, x, _) { var u = _; function m(w, f) { if (Array.isArray(w)) return w.slice(); if (!w) return []; var y = []; if (typeof w != "string") { for (var h = 0; h < w.length; h++) y[h] = w[h] | 0; return y; } if (f === "hex") { w = w.replace(/[^a-z0-9]+/ig, ""), w.length % 2 !== 0 && (w = "0" + w); for (var h = 0; h < w.length; h += 2) y.push(parseInt(w[h] + w[h + 1], 16)); } else for (var h = 0; h < w.length; h++) { var l = w.charCodeAt(h), d = l >> 8, s = l & 255; d ? y.push(d, s) : y.push(s); } return y; } u.toArray = m; function g(w) { return w.length === 1 ? "0" + w : w; } u.zero2 = g; function b(w) { for (var f = "", y = 0; y < w.length; y++) f += g(w[y].toString(16)); return f; } u.toHex = b, u.encode = function(f, y) { return y === "hex" ? b(f) : f; }; }, {}], 439: [function(e, x, _) { var u = e("./lib/utils/common").assign, m = e("./lib/deflate"), g = e("./lib/inflate"), b = e("./lib/zlib/constants"), w = {}; u(w, m, g, b), x.exports = w; }, { "./lib/deflate": 440, "./lib/inflate": 441, "./lib/utils/common": 442, "./lib/zlib/constants": 445 }], 440: [function(e, x, _) { var u = e("./zlib/deflate"), m = e("./utils/common"), g = e("./utils/strings"), b = e("./zlib/messages"), w = e("./zlib/zstream"), f = Object.prototype.toString, y = 0, h = 4, l = 0, d = 1, s = 2, v = -1, c = 0, a = 8; function r(o) { if (!(this instanceof r)) return new r(o); this.options = m.assign({ level: v, method: a, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c, to: "" }, o || {}); var p = this.options; p.raw && p.windowBits > 0 ? p.windowBits = -p.windowBits : p.gzip && p.windowBits > 0 && p.windowBits < 16 && (p.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new w(), this.strm.avail_out = 0; var O = u.deflateInit2(this.strm, p.level, p.method, p.windowBits, p.memLevel, p.strategy); if (O !== l) throw new Error(b[O]); if (p.header && u.deflateSetHeader(this.strm, p.header), p.dictionary) { var P; if (typeof p.dictionary == "string" ? P = g.string2buf(p.dictionary) : f.call(p.dictionary) === "[object ArrayBuffer]" ? P = new Uint8Array(p.dictionary) : P = p.dictionary, O = u.deflateSetDictionary(this.strm, P), O !== l) throw new Error(b[O]); this._dict_set = !0; } } r.prototype.push = function(o, p) { var O = this.strm, P = this.options.chunkSize, F, z; if (this.ended) return !1; z = p === ~~p ? p : p === !0 ? h : y, typeof o == "string" ? O.input = g.string2buf(o) : f.call(o) === "[object ArrayBuffer]" ? O.input = new Uint8Array(o) : O.input = o, O.next_in = 0, O.avail_in = O.input.length; do { if (O.avail_out === 0 && (O.output = new m.Buf8(P), O.next_out = 0, O.avail_out = P), F = u.deflate(O, z), F !== d && F !== l) return this.onEnd(F), this.ended = !0, !1; (O.avail_out === 0 || O.avail_in === 0 && (z === h || z === s)) && (this.options.to === "string" ? this.onData(g.buf2binstring(m.shrinkBuf(O.output, O.next_out))) : this.onData(m.shrinkBuf(O.output, O.next_out))); } while ((O.avail_in > 0 || O.avail_out === 0) && F !== d); return z === h ? (F = u.deflateEnd(this.strm), this.onEnd(F), this.ended = !0, F === l) : (z === s && (this.onEnd(l), O.avail_out = 0), !0); }, r.prototype.onData = function(o) { this.chunks.push(o); }, r.prototype.onEnd = function(o) { o === l && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = m.flattenChunks(this.chunks)), this.chunks = [], this.err = o, this.msg = this.strm.msg; }; function t(o, p) { var O = new r(p); if (O.push(o, !0), O.err) throw O.msg || b[O.err]; return O.result; } function i(o, p) { return p = p || {}, p.raw = !0, t(o, p); } function n(o, p) { return p = p || {}, p.gzip = !0, t(o, p); } _.Deflate = r, _.deflate = t, _.deflateRaw = i, _.gzip = n; }, { "./utils/common": 442, "./utils/strings": 443, "./zlib/deflate": 447, "./zlib/messages": 452, "./zlib/zstream": 454 }], 441: [function(e, x, _) { var u = e("./zlib/inflate"), m = e("./utils/common"), g = e("./utils/strings"), b = e("./zlib/constants"), w = e("./zlib/messages"), f = e("./zlib/zstream"), y = e("./zlib/gzheader"), h = Object.prototype.toString; function l(v) { if (!(this instanceof l)) return new l(v); this.options = m.assign({ chunkSize: 16384, windowBits: 0, to: "" }, v || {}); var c = this.options; c.raw && c.windowBits >= 0 && c.windowBits < 16 && (c.windowBits = -c.windowBits, c.windowBits === 0 && (c.windowBits = -15)), c.windowBits >= 0 && c.windowBits < 16 && !(v && v.windowBits) && (c.windowBits += 32), c.windowBits > 15 && c.windowBits < 48 && (c.windowBits & 15 || (c.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new f(), this.strm.avail_out = 0; var a = u.inflateInit2(this.strm, c.windowBits); if (a !== b.Z_OK) throw new Error(w[a]); if (this.header = new y(), u.inflateGetHeader(this.strm, this.header), c.dictionary && (typeof c.dictionary == "string" ? c.dictionary = g.string2buf(c.dictionary) : h.call(c.dictionary) === "[object ArrayBuffer]" && (c.dictionary = new Uint8Array(c.dictionary)), c.raw && (a = u.inflateSetDictionary(this.strm, c.dictionary), a !== b.Z_OK))) throw new Error(w[a]); } l.prototype.push = function(v, c) { var a = this.strm, r = this.options.chunkSize, t = this.options.dictionary, i, n, o, p, O, P = !1; if (this.ended) return !1; n = c === ~~c ? c : c === !0 ? b.Z_FINISH : b.Z_NO_FLUSH, typeof v == "string" ? a.input = g.binstring2buf(v) : h.call(v) === "[object ArrayBuffer]" ? a.input = new Uint8Array(v) : a.input = v, a.next_in = 0, a.avail_in = a.input.length; do { if (a.avail_out === 0 && (a.output = new m.Buf8(r), a.next_out = 0, a.avail_out = r), i = u.inflate(a, b.Z_NO_FLUSH), i === b.Z_NEED_DICT && t && (i = u.inflateSetDictionary(this.strm, t)), i === b.Z_BUF_ERROR && P === !0 && (i = b.Z_OK, P = !1), i !== b.Z_STREAM_END && i !== b.Z_OK) return this.onEnd(i), this.ended = !0, !1; a.next_out && (a.avail_out === 0 || i === b.Z_STREAM_END || a.avail_in === 0 && (n === b.Z_FINISH || n === b.Z_SYNC_FLUSH)) && (this.options.to === "string" ? (o = g.utf8border(a.output, a.next_out), p = a.next_out - o, O = g.buf2string(a.output, o), a.next_out = p, a.avail_out = r - p, p && m.arraySet(a.output, a.output, o, p, 0), this.onData(O)) : this.onData(m.shrinkBuf(a.output, a.next_out))), a.avail_in === 0 && a.avail_out === 0 && (P = !0); } while ((a.avail_in > 0 || a.avail_out === 0) && i !== b.Z_STREAM_END); return i === b.Z_STREAM_END && (n = b.Z_FINISH), n === b.Z_FINISH ? (i = u.inflateEnd(this.strm), this.onEnd(i), this.ended = !0, i === b.Z_OK) : (n === b.Z_SYNC_FLUSH && (this.onEnd(b.Z_OK), a.avail_out = 0), !0); }, l.prototype.onData = function(v) { this.chunks.push(v); }, l.prototype.onEnd = function(v) { v === b.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = m.flattenChunks(this.chunks)), this.chunks = [], this.err = v, this.msg = this.strm.msg; }; function d(v, c) { var a = new l(c); if (a.push(v, !0), a.err) throw a.msg || w[a.err]; return a.result; } function s(v, c) { return c = c || {}, c.raw = !0, d(v, c); } _.Inflate = l, _.inflate = d, _.inflateRaw = s, _.ungzip = d; }, { "./utils/common": 442, "./utils/strings": 443, "./zlib/constants": 445, "./zlib/gzheader": 448, "./zlib/inflate": 450, "./zlib/messages": 452, "./zlib/zstream": 454 }], 442: [function(e, x, _) { function u(f) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(h) { return typeof h; } : u = function(h) { return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h; }, u(f); } var m = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Int32Array != "undefined"; function g(f, y) { return Object.prototype.hasOwnProperty.call(f, y); } _.assign = function(f) { for (var y = Array.prototype.slice.call(arguments, 1); y.length; ) { var h = y.shift(); if (h) { if (u(h) !== "object") throw new TypeError(h + "must be non-object"); for (var l in h) g(h, l) && (f[l] = h[l]); } } return f; }, _.shrinkBuf = function(f, y) { return f.length === y ? f : f.subarray ? f.subarray(0, y) : (f.length = y, f); }; var b = { arraySet: function(y, h, l, d, s) { if (h.subarray && y.subarray) { y.set(h.subarray(l, l + d), s); return; } for (var v = 0; v < d; v++) y[s + v] = h[l + v]; }, // Join array of chunks to single array. flattenChunks: function(y) { var h, l, d, s, v, c; for (d = 0, h = 0, l = y.length; h < l; h++) d += y[h].length; for (c = new Uint8Array(d), s = 0, h = 0, l = y.length; h < l; h++) v = y[h], c.set(v, s), s += v.length; return c; } }, w = { arraySet: function(y, h, l, d, s) { for (var v = 0; v < d; v++) y[s + v] = h[l + v]; }, // Join array of chunks to single array. flattenChunks: function(y) { return [].concat.apply([], y); } }; _.setTyped = function(f) { f ? (_.Buf8 = Uint8Array, _.Buf16 = Uint16Array, _.Buf32 = Int32Array, _.assign(_, b)) : (_.Buf8 = Array, _.Buf16 = Array, _.Buf32 = Array, _.assign(_, w)); }, _.setTyped(m); }, {}], 443: [function(e, x, _) { var u = e("./common"), m = !0, g = !0; try { String.fromCharCode.apply(null, [0]); } catch (y) { m = !1; } try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (y) { g = !1; } for (var b = new u.Buf8(256), w = 0; w < 256; w++) b[w] = w >= 252 ? 6 : w >= 248 ? 5 : w >= 240 ? 4 : w >= 224 ? 3 : w >= 192 ? 2 : 1; b[254] = b[254] = 1, _.string2buf = function(y) { var h, l, d, s, v, c = y.length, a = 0; for (s = 0; s < c; s++) l = y.charCodeAt(s), (l & 64512) === 55296 && s + 1 < c && (d = y.charCodeAt(s + 1), (d & 64512) === 56320 && (l = 65536 + (l - 55296 << 10) + (d - 56320), s++)), a += l < 128 ? 1 : l < 2048 ? 2 : l < 65536 ? 3 : 4; for (h = new u.Buf8(a), v = 0, s = 0; v < a; s++) l = y.charCodeAt(s), (l & 64512) === 55296 && s + 1 < c && (d = y.charCodeAt(s + 1), (d & 64512) === 56320 && (l = 65536 + (l - 55296 << 10) + (d - 56320), s++)), l < 128 ? h[v++] = l : l < 2048 ? (h[v++] = 192 | l >>> 6, h[v++] = 128 | l & 63) : l < 65536 ? (h[v++] = 224 | l >>> 12, h[v++] = 128 | l >>> 6 & 63, h[v++] = 128 | l & 63) : (h[v++] = 240 | l >>> 18, h[v++] = 128 | l >>> 12 & 63, h[v++] = 128 | l >>> 6 & 63, h[v++] = 128 | l & 63); return h; }; function f(y, h) { if (h < 65534 && (y.subarray && g || !y.subarray && m)) return String.fromCharCode.apply(null, u.shrinkBuf(y, h)); for (var l = "", d = 0; d < h; d++) l += String.fromCharCode(y[d]); return l; } _.buf2binstring = function(y) { return f(y, y.length); }, _.binstring2buf = function(y) { for (var h = new u.Buf8(y.length), l = 0, d = h.length; l < d; l++) h[l] = y.charCodeAt(l); return h; }, _.buf2string = function(y, h) { var l, d, s, v, c = h || y.length, a = new Array(c * 2); for (d = 0, l = 0; l < c; ) { if (s = y[l++], s < 128) { a[d++] = s; continue; } if (v = b[s], v > 4) { a[d++] = 65533, l += v - 1; continue; } for (s &= v === 2 ? 31 : v === 3 ? 15 : 7; v > 1 && l < c; ) s = s << 6 | y[l++] & 63, v--; if (v > 1) { a[d++] = 65533; continue; } s < 65536 ? a[d++] = s : (s -= 65536, a[d++] = 55296 | s >> 10 & 1023, a[d++] = 56320 | s & 1023); } return f(a, d); }, _.utf8border = function(y, h) { var l; for (h = h || y.length, h > y.length && (h = y.length), l = h - 1; l >= 0 && (y[l] & 192) === 128; ) l--; return l < 0 || l === 0 ? h : l + b[y[l]] > h ? l : h; }; }, { "./common": 442 }], 444: [function(e, x, _) { function u(m, g, b, w) { for (var f = m & 65535 | 0, y = m >>> 16 & 65535 | 0, h = 0; b !== 0; ) { h = b > 2e3 ? 2e3 : b, b -= h; do f = f + g[w++] | 0, y = y + f | 0; while (--h); f %= 65521, y %= 65521; } return f | y << 16 | 0; } x.exports = u; }, {}], 445: [function(e, x, _) { x.exports = { /* Allowed flush values; see deflate() and inflate() below for details */ Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, /* Return codes for the compression/decompression functions. Negative values * are errors, positive values are used for special but normal events. */ Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, //Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, //Z_VERSION_ERROR: -6, /* compression levels */ Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, /* Possible values of the data_type field (though see inflate()) */ Z_BINARY: 0, Z_TEXT: 1, //Z_ASCII: 1, // = Z_TEXT (deprecated) Z_UNKNOWN: 2, /* The deflate compression method */ Z_DEFLATED: 8 //Z_NULL: null // Use -1 or null inline, depending on var type }; }, {}], 446: [function(e, x, _) { function u() { for (var b, w = [], f = 0; f < 256; f++) { b = f; for (var y = 0; y < 8; y++) b = b & 1 ? 3988292384 ^ b >>> 1 : b >>> 1; w[f] = b; } return w; } var m = u(); function g(b, w, f, y) { var h = m, l = y + f; b ^= -1; for (var d = y; d < l; d++) b = b >>> 8 ^ h[(b ^ w[d]) & 255]; return b ^ -1; } x.exports = g; }, {}], 447: [function(e, x, _) { var u = e("../utils/common"), m = e("./trees"), g = e("./adler32"), b = e("./crc32"), w = e("./messages"), f = 0, y = 1, h = 3, l = 4, d = 5, s = 0, v = 1, c = -2, a = -3, r = -5, t = -1, i = 1, n = 2, o = 3, p = 4, O = 0, P = 2, F = 8, z = 9, N = 15, M = 8, I = 29, R = 256, C = R + 1 + I, E = 30, A = 19, L = 2 * C + 1, $ = 15, W = 3, U = 258, D = U + W + 1, B = 32, j = 42, V = 69, re = 73, ee = 91, ce = 103, ve = 113, ge = 666, oe = 1, J = 2, Q = 3, he = 4, ke = 3; function ne(K, Me) { return K.msg = w[Me], Me; } function se(K) { return (K << 1) - (K > 4 ? 9 : 0); } function Ce(K) { for (var Me = K.length; --Me >= 0; ) K[Me] = 0; } function q(K) { var Me = K.state, Le = Me.pending; Le > K.avail_out && (Le = K.avail_out), Le !== 0 && (u.arraySet(K.output, Me.pending_buf, Me.pending_out, Le, K.next_out), K.next_out += Le, Me.pending_out += Le, K.total_out += Le, K.avail_out -= Le, Me.pending -= Le, Me.pending === 0 && (Me.pending_out = 0)); } function G(K, Me) { m._tr_flush_block(K, K.block_start >= 0 ? K.block_start : -1, K.strstart - K.block_start, Me), K.block_start = K.strstart, q(K.strm); } function Y(K, Me) { K.pending_buf[K.pending++] = Me; } function fe(K, Me) { K.pending_buf[K.pending++] = Me >>> 8 & 255, K.pending_buf[K.pending++] = Me & 255; } function we(K, Me, Le, ue) { var Se = K.avail_in; return Se > ue && (Se = ue), Se === 0 ? 0 : (K.avail_in -= Se, u.arraySet(Me, K.input, K.next_in, Se, Le), K.state.wrap === 1 ? K.adler = g(K.adler, Me, Se, Le) : K.state.wrap === 2 && (K.adler = b(K.adler, Me, Se, Le)), K.next_in += Se, K.total_in += Se, Se); } function _e(K, Me) { var Le = K.max_chain_length, ue = K.strstart, Se, Ie, st = K.prev_length, Ge = K.nice_match, rt = K.strstart > K.w_size - D ? K.strstart - (K.w_size - D) : 0, _t = K.window, wt = K.w_mask, Ot = K.prev, pt = K.strstart + U, ct = _t[ue + st - 1], At = _t[ue + st]; K.prev_length >= K.good_match && (Le >>= 2), Ge > K.lookahead && (Ge = K.lookahead); do if (Se = Me, !(_t[Se + st] !== At || _t[Se + st - 1] !== ct || _t[Se] !== _t[ue] || _t[++Se] !== _t[ue + 1])) { ue += 2, Se++; do ; while (_t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && _t[++ue] === _t[++Se] && ue < pt); if (Ie = U - (pt - ue), ue = pt - U, Ie > st) { if (K.match_start = Me, st = Ie, Ie >= Ge) break; ct = _t[ue + st - 1], At = _t[ue + st]; } } while ((Me = Ot[Me & wt]) > rt && --Le !== 0); return st <= K.lookahead ? st : K.lookahead; } function je(K) { var Me = K.w_size, Le, ue, Se, Ie, st; do { if (Ie = K.window_size - K.lookahead - K.strstart, K.strstart >= Me + (Me - D)) { u.arraySet(K.window, K.window, Me, Me, 0), K.match_start -= Me, K.strstart -= Me, K.block_start -= Me, ue = K.hash_size, Le = ue; do Se = K.head[--Le], K.head[Le] = Se >= Me ? Se - Me : 0; while (--ue); ue = Me, Le = ue; do Se = K.prev[--Le], K.prev[Le] = Se >= Me ? Se - Me : 0; while (--ue); Ie += Me; } if (K.strm.avail_in === 0) break; if (ue = we(K.strm, K.window, K.strstart + K.lookahead, Ie), K.lookahead += ue, K.lookahead + K.insert >= W) for (st = K.strstart - K.insert, K.ins_h = K.window[st], K.ins_h = (K.ins_h << K.hash_shift ^ K.window[st + 1]) & K.hash_mask; K.insert && (K.ins_h = (K.ins_h << K.hash_shift ^ K.window[st + W - 1]) & K.hash_mask, K.prev[st & K.w_mask] = K.head[K.ins_h], K.head[K.ins_h] = st, st++, K.insert--, !(K.lookahead + K.insert < W)); ) ; } while (K.lookahead < D && K.strm.avail_in !== 0); } function Ye(K, Me) { var Le = 65535; for (Le > K.pending_buf_size - 5 && (Le = K.pending_buf_size - 5); ; ) { if (K.lookahead <= 1) { if (je(K), K.lookahead === 0 && Me === f) return oe; if (K.lookahead === 0) break; } K.strstart += K.lookahead, K.lookahead = 0; var ue = K.block_start + Le; if ((K.strstart === 0 || K.strstart >= ue) && (K.lookahead = K.strstart - ue, K.strstart = ue, G(K, !1), K.strm.avail_out === 0) || K.strstart - K.block_start >= K.w_size - D && (G(K, !1), K.strm.avail_out === 0)) return oe; } return K.insert = 0, Me === l ? (G(K, !0), K.strm.avail_out === 0 ? Q : he) : (K.strstart > K.block_start && (G(K, !1), K.strm.avail_out === 0), oe); } function nt(K, Me) { for (var Le, ue; ; ) { if (K.lookahead < D) { if (je(K), K.lookahead < D && Me === f) return oe; if (K.lookahead === 0) break; } if (Le = 0, K.lookahead >= W && (K.ins_h = (K.ins_h << K.hash_shift ^ K.window[K.strstart + W - 1]) & K.hash_mask, Le = K.prev[K.strstart & K.w_mask] = K.head[K.ins_h], K.head[K.ins_h] = K.strstart), Le !== 0 && K.strstart - Le <= K.w_size - D && (K.match_length = _e(K, Le)), K.match_length >= W) if (ue = m._tr_tally(K, K.strstart - K.match_start, K.match_length - W), K.lookahead -= K.match_length, K.match_length <= K.max_lazy_match && K.lookahead >= W) { K.match_length--; do K.strstart++, K.ins_h = (K.ins_h << K.hash_shift ^ K.window[K.strstart + W - 1]) & K.hash_mask, Le = K.prev[K.strstart & K.w_mask] = K.head[K.ins_h], K.head[K.ins_h] = K.strstart; while (--K.match_length !== 0); K.strstart++; } else K.strstart += K.match_length, K.match_length = 0, K.ins_h = K.window[K.strstart], K.ins_h = (K.ins_h << K.hash_shift ^ K.window[K.strstart + 1]) & K.hash_mask; else ue = m._tr_tally(K, 0, K.window[K.strstart]), K.lookahead--, K.strstart++; if (ue && (G(K, !1), K.strm.avail_out === 0)) return oe; } return K.insert = K.strstart < W - 1 ? K.strstart : W - 1, Me === l ? (G(K, !0), K.strm.avail_out === 0 ? Q : he) : K.last_lit && (G(K, !1), K.strm.avail_out === 0) ? oe : J; } function ut(K, Me) { for (var Le, ue, Se; ; ) { if (K.lookahead < D) { if (je(K), K.lookahead < D && Me === f) return oe; if (K.lookahead === 0) break; } if (Le = 0, K.lookahead >= W && (K.ins_h = (K.ins_h << K.hash_shift ^ K.window[K.strstart + W - 1]) & K.hash_mask, Le = K.prev[K.strstart & K.w_mask] = K.head[K.ins_h], K.head[K.ins_h] = K.strstart), K.prev_length = K.match_length, K.prev_match = K.match_start, K.match_length = W - 1, Le !== 0 && K.prev_length < K.max_lazy_match && K.strstart - Le <= K.w_size - D && (K.match_length = _e(K, Le), K.match_length <= 5 && (K.strategy === i || K.match_length === W && K.strstart - K.match_start > 4096) && (K.match_length = W - 1)), K.prev_length >= W && K.match_length <= K.prev_length) { Se = K.strstart + K.lookahead - W, ue = m._tr_tally(K, K.strstart - 1 - K.prev_match, K.prev_length - W), K.lookahead -= K.prev_length - 1, K.prev_length -= 2; do ++K.strstart <= Se && (K.ins_h = (K.ins_h << K.hash_shift ^ K.window[K.strstart + W - 1]) & K.hash_mask, Le = K.prev[K.strstart & K.w_mask] = K.head[K.ins_h], K.head[K.ins_h] = K.strstart); while (--K.prev_length !== 0); if (K.match_available = 0, K.match_length = W - 1, K.strstart++, ue && (G(K, !1), K.strm.avail_out === 0)) return oe; } else if (K.match_available) { if (ue = m._tr_tally(K, 0, K.window[K.strstart - 1]), ue && G(K, !1), K.strstart++, K.lookahead--, K.strm.avail_out === 0) return oe; } else K.match_available = 1, K.strstart++, K.lookahead--; } return K.match_available && (ue = m._tr_tally(K, 0, K.window[K.strstart - 1]), K.match_available = 0), K.insert = K.strstart < W - 1 ? K.strstart : W - 1, Me === l ? (G(K, !0), K.strm.avail_out === 0 ? Q : he) : K.last_lit && (G(K, !1), K.strm.avail_out === 0) ? oe : J; } function ot(K, Me) { for (var Le, ue, Se, Ie, st = K.window; ; ) { if (K.lookahead <= U) { if (je(K), K.lookahead <= U && Me === f) return oe; if (K.lookahead === 0) break; } if (K.match_length = 0, K.lookahead >= W && K.strstart > 0 && (Se = K.strstart - 1, ue = st[Se], ue === st[++Se] && ue === st[++Se] && ue === st[++Se])) { Ie = K.strstart + U; do ; while (ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && ue === st[++Se] && Se < Ie); K.match_length = U - (Ie - Se), K.match_length > K.lookahead && (K.match_length = K.lookahead); } if (K.match_length >= W ? (Le = m._tr_tally(K, 1, K.match_length - W), K.lookahead -= K.match_length, K.strstart += K.match_length, K.match_length = 0) : (Le = m._tr_tally(K, 0, K.window[K.strstart]), K.lookahead--, K.strstart++), Le && (G(K, !1), K.strm.avail_out === 0)) return oe; } return K.insert = 0, Me === l ? (G(K, !0), K.strm.avail_out === 0 ? Q : he) : K.last_lit && (G(K, !1), K.strm.avail_out === 0) ? oe : J; } function Ue(K, Me) { for (var Le; ; ) { if (K.lookahead === 0 && (je(K), K.lookahead === 0)) { if (Me === f) return oe; break; } if (K.match_length = 0, Le = m._tr_tally(K, 0, K.window[K.strstart]), K.lookahead--, K.strstart++, Le && (G(K, !1), K.strm.avail_out === 0)) return oe; } return K.insert = 0, Me === l ? (G(K, !0), K.strm.avail_out === 0 ? Q : he) : K.last_lit && (G(K, !1), K.strm.avail_out === 0) ? oe : J; } function Ve(K, Me, Le, ue, Se) { this.good_length = K, this.max_lazy = Me, this.nice_length = Le, this.max_chain = ue, this.func = Se; } var Qe; Qe = [ /* good lazy nice chain */ new Ve(0, 0, 0, 0, Ye), /* 0 store only */ new Ve(4, 4, 8, 4, nt), /* 1 max speed, no lazy matches */ new Ve(4, 5, 16, 8, nt), /* 2 */ new Ve(4, 6, 32, 32, nt), /* 3 */ new Ve(4, 4, 16, 16, ut), /* 4 lazy matches */ new Ve(8, 16, 32, 32, ut), /* 5 */ new Ve(8, 16, 128, 128, ut), /* 6 */ new Ve(8, 32, 128, 256, ut), /* 7 */ new Ve(32, 128, 258, 1024, ut), /* 8 */ new Ve(32, 258, 258, 4096, ut) /* 9 max compression */ ]; function tt(K) { K.window_size = 2 * K.w_size, Ce(K.head), K.max_lazy_match = Qe[K.level].max_lazy, K.good_match = Qe[K.level].good_length, K.nice_match = Qe[K.level].nice_length, K.max_chain_length = Qe[K.level].max_chain, K.strstart = 0, K.block_start = 0, K.lookahead = 0, K.insert = 0, K.match_length = K.prev_length = W - 1, K.match_available = 0, K.ins_h = 0; } function ae() { this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = F, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new u.Buf16(L * 2), this.dyn_dtree = new u.Buf16((2 * E + 1) * 2), this.bl_tree = new u.Buf16((2 * A + 1) * 2), Ce(this.dyn_ltree), Ce(this.dyn_dtree), Ce(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new u.Buf16($ + 1), this.heap = new u.Buf16(2 * C + 1), Ce(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new u.Buf16(2 * C + 1), Ce(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; } function Re(K) { var Me; return !K || !K.state ? ne(K, c) : (K.total_in = K.total_out = 0, K.data_type = P, Me = K.state, Me.pending = 0, Me.pending_out = 0, Me.wrap < 0 && (Me.wrap = -Me.wrap), Me.status = Me.wrap ? j : ve, K.adler = Me.wrap === 2 ? 0 : 1, Me.last_flush = f, m._tr_init(Me), s); } function be(K) { var Me = Re(K); return Me === s && tt(K.state), Me; } function Ee(K, Me) { return !K || !K.state || K.state.wrap !== 2 ? c : (K.state.gzhead = Me, s); } function pe(K, Me, Le, ue, Se, Ie) { if (!K) return c; var st = 1; if (Me === t && (Me = 6), ue < 0 ? (st = 0, ue = -ue) : ue > 15 && (st = 2, ue -= 16), Se < 1 || Se > z || Le !== F || ue < 8 || ue > 15 || Me < 0 || Me > 9 || Ie < 0 || Ie > p) return ne(K, c); ue === 8 && (ue = 9); var Ge = new ae(); return K.state = Ge, Ge.strm = K, Ge.wrap = st, Ge.gzhead = null, Ge.w_bits = ue, Ge.w_size = 1 << Ge.w_bits, Ge.w_mask = Ge.w_size - 1, Ge.hash_bits = Se + 7, Ge.hash_size = 1 << Ge.hash_bits, Ge.hash_mask = Ge.hash_size - 1, Ge.hash_shift = ~~((Ge.hash_bits + W - 1) / W), Ge.window = new u.Buf8(Ge.w_size * 2), Ge.head = new u.Buf16(Ge.hash_size), Ge.prev = new u.Buf16(Ge.w_size), Ge.lit_bufsize = 1 << Se + 6, Ge.pending_buf_size = Ge.lit_bufsize * 4, Ge.pending_buf = new u.Buf8(Ge.pending_buf_size), Ge.d_buf = 1 * Ge.lit_bufsize, Ge.l_buf = (1 + 2) * Ge.lit_bufsize, Ge.level = Me, Ge.strategy = Ie, Ge.method = Le, be(K); } function Pe(K, Me) { return pe(K, Me, F, N, M, O); } function te(K, Me) { var Le, ue, Se, Ie; if (!K || !K.state || Me > d || Me < 0) return K ? ne(K, c) : c; if (ue = K.state, !K.output || !K.input && K.avail_in !== 0 || ue.status === ge && Me !== l) return ne(K, K.avail_out === 0 ? r : c); if (ue.strm = K, Le = ue.last_flush, ue.last_flush = Me, ue.status === j) if (ue.wrap === 2) K.adler = 0, Y(ue, 31), Y(ue, 139), Y(ue, 8), ue.gzhead ? (Y(ue, (ue.gzhead.text ? 1 : 0) + (ue.gzhead.hcrc ? 2 : 0) + (ue.gzhead.extra ? 4 : 0) + (ue.gzhead.name ? 8 : 0) + (ue.gzhead.comment ? 16 : 0)), Y(ue, ue.gzhead.time & 255), Y(ue, ue.gzhead.time >> 8 & 255), Y(ue, ue.gzhead.time >> 16 & 255), Y(ue, ue.gzhead.time >> 24 & 255), Y(ue, ue.level === 9 ? 2 : ue.strategy >= n || ue.level < 2 ? 4 : 0), Y(ue, ue.gzhead.os & 255), ue.gzhead.extra && ue.gzhead.extra.length && (Y(ue, ue.gzhead.extra.length & 255), Y(ue, ue.gzhead.extra.length >> 8 & 255)), ue.gzhead.hcrc && (K.adler = b(K.adler, ue.pending_buf, ue.pending, 0)), ue.gzindex = 0, ue.status = V) : (Y(ue, 0), Y(ue, 0), Y(ue, 0), Y(ue, 0), Y(ue, 0), Y(ue, ue.level === 9 ? 2 : ue.strategy >= n || ue.level < 2 ? 4 : 0), Y(ue, ke), ue.status = ve); else { var st = F + (ue.w_bits - 8 << 4) << 8, Ge = -1; ue.strategy >= n || ue.level < 2 ? Ge = 0 : ue.level < 6 ? Ge = 1 : ue.level === 6 ? Ge = 2 : Ge = 3, st |= Ge << 6, ue.strstart !== 0 && (st |= B), st += 31 - st % 31, ue.status = ve, fe(ue, st), ue.strstart !== 0 && (fe(ue, K.adler >>> 16), fe(ue, K.adler & 65535)), K.adler = 1; } if (ue.status === V) if (ue.gzhead.extra) { for (Se = ue.pending; ue.gzindex < (ue.gzhead.extra.length & 65535) && !(ue.pending === ue.pending_buf_size && (ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), q(K), Se = ue.pending, ue.pending === ue.pending_buf_size)); ) Y(ue, ue.gzhead.extra[ue.gzindex] & 255), ue.gzindex++; ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), ue.gzindex === ue.gzhead.extra.length && (ue.gzindex = 0, ue.status = re); } else ue.status = re; if (ue.status === re) if (ue.gzhead.name) { Se = ue.pending; do { if (ue.pending === ue.pending_buf_size && (ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), q(K), Se = ue.pending, ue.pending === ue.pending_buf_size)) { Ie = 1; break; } ue.gzindex < ue.gzhead.name.length ? Ie = ue.gzhead.name.charCodeAt(ue.gzindex++) & 255 : Ie = 0, Y(ue, Ie); } while (Ie !== 0); ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), Ie === 0 && (ue.gzindex = 0, ue.status = ee); } else ue.status = ee; if (ue.status === ee) if (ue.gzhead.comment) { Se = ue.pending; do { if (ue.pending === ue.pending_buf_size && (ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), q(K), Se = ue.pending, ue.pending === ue.pending_buf_size)) { Ie = 1; break; } ue.gzindex < ue.gzhead.comment.length ? Ie = ue.gzhead.comment.charCodeAt(ue.gzindex++) & 255 : Ie = 0, Y(ue, Ie); } while (Ie !== 0); ue.gzhead.hcrc && ue.pending > Se && (K.adler = b(K.adler, ue.pending_buf, ue.pending - Se, Se)), Ie === 0 && (ue.status = ce); } else ue.status = ce; if (ue.status === ce && (ue.gzhead.hcrc ? (ue.pending + 2 > ue.pending_buf_size && q(K), ue.pending + 2 <= ue.pending_buf_size && (Y(ue, K.adler & 255), Y(ue, K.adler >> 8 & 255), K.adler = 0, ue.status = ve)) : ue.status = ve), ue.pending !== 0) { if (q(K), K.avail_out === 0) return ue.last_flush = -1, s; } else if (K.avail_in === 0 && se(Me) <= se(Le) && Me !== l) return ne(K, r); if (ue.status === ge && K.avail_in !== 0) return ne(K, r); if (K.avail_in !== 0 || ue.lookahead !== 0 || Me !== f && ue.status !== ge) { var rt = ue.strategy === n ? Ue(ue, Me) : ue.strategy === o ? ot(ue, Me) : Qe[ue.level].func(ue, Me); if ((rt === Q || rt === he) && (ue.status = ge), rt === oe || rt === Q) return K.avail_out === 0 && (ue.last_flush = -1), s; if (rt === J && (Me === y ? m._tr_align(ue) : Me !== d && (m._tr_stored_block(ue, 0, 0, !1), Me === h && (Ce(ue.head), ue.lookahead === 0 && (ue.strstart = 0, ue.block_start = 0, ue.insert = 0))), q(K), K.avail_out === 0)) return ue.last_flush = -1, s; } return Me !== l ? s : ue.wrap <= 0 ? v : (ue.wrap === 2 ? (Y(ue, K.adler & 255), Y(ue, K.adler >> 8 & 255), Y(ue, K.adler >> 16 & 255), Y(ue, K.adler >> 24 & 255), Y(ue, K.total_in & 255), Y(ue, K.total_in >> 8 & 255), Y(ue, K.total_in >> 16 & 255), Y(ue, K.total_in >> 24 & 255)) : (fe(ue, K.adler >>> 16), fe(ue, K.adler & 65535)), q(K), ue.wrap > 0 && (ue.wrap = -ue.wrap), ue.pending !== 0 ? s : v); } function He(K) { var Me; return !K || !K.state ? c : (Me = K.state.status, Me !== j && Me !== V && Me !== re && Me !== ee && Me !== ce && Me !== ve && Me !== ge ? ne(K, c) : (K.state = null, Me === ve ? ne(K, a) : s)); } function it(K, Me) { var Le = Me.length, ue, Se, Ie, st, Ge, rt, _t, wt; if (!K || !K.state || (ue = K.state, st = ue.wrap, st === 2 || st === 1 && ue.status !== j || ue.lookahead)) return c; for (st === 1 && (K.adler = g(K.adler, Me, Le, 0)), ue.wrap = 0, Le >= ue.w_size && (st === 0 && (Ce(ue.head), ue.strstart = 0, ue.block_start = 0, ue.insert = 0), wt = new u.Buf8(ue.w_size), u.arraySet(wt, Me, Le - ue.w_size, ue.w_size, 0), Me = wt, Le = ue.w_size), Ge = K.avail_in, rt = K.next_in, _t = K.input, K.avail_in = Le, K.next_in = 0, K.input = Me, je(ue); ue.lookahead >= W; ) { Se = ue.strstart, Ie = ue.lookahead - (W - 1); do ue.ins_h = (ue.ins_h << ue.hash_shift ^ ue.window[Se + W - 1]) & ue.hash_mask, ue.prev[Se & ue.w_mask] = ue.head[ue.ins_h], ue.head[ue.ins_h] = Se, Se++; while (--Ie); ue.strstart = Se, ue.lookahead = W - 1, je(ue); } return ue.strstart += ue.lookahead, ue.block_start = ue.strstart, ue.insert = ue.lookahead, ue.lookahead = 0, ue.match_length = ue.prev_length = W - 1, ue.match_available = 0, K.next_in = rt, K.input = _t, K.avail_in = Ge, ue.wrap = st, s; } _.deflateInit = Pe, _.deflateInit2 = pe, _.deflateReset = be, _.deflateResetKeep = Re, _.deflateSetHeader = Ee, _.deflate = te, _.deflateEnd = He, _.deflateSetDictionary = it, _.deflateInfo = "pako deflate (from Nodeca project)"; }, { "../utils/common": 442, "./adler32": 444, "./crc32": 446, "./messages": 452, "./trees": 453 }], 448: [function(e, x, _) { function u() { this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1; } x.exports = u; }, {}], 449: [function(e, x, _) { var u = 30, m = 12; x.exports = function(b, w) { var f, y, h, l, d, s, v, c, a, r, t, i, n, o, p, O, P, F, z, N, M, I, R, C, E; f = b.state, y = b.next_in, C = b.input, h = y + (b.avail_in - 5), l = b.next_out, E = b.output, d = l - (w - b.avail_out), s = l + (b.avail_out - 257), v = f.dmax, c = f.wsize, a = f.whave, r = f.wnext, t = f.window, i = f.hold, n = f.bits, o = f.lencode, p = f.distcode, O = (1 << f.lenbits) - 1, P = (1 << f.distbits) - 1; e: do { n < 15 && (i += C[y++] << n, n += 8, i += C[y++] << n, n += 8), F = o[i & O]; t: for (; ; ) { if (z = F >>> 24, i >>>= z, n -= z, z = F >>> 16 & 255, z === 0) E[l++] = F & 65535; else if (z & 16) { N = F & 65535, z &= 15, z && (n < z && (i += C[y++] << n, n += 8), N += i & (1 << z) - 1, i >>>= z, n -= z), n < 15 && (i += C[y++] << n, n += 8, i += C[y++] << n, n += 8), F = p[i & P]; r: for (; ; ) { if (z = F >>> 24, i >>>= z, n -= z, z = F >>> 16 & 255, z & 16) { if (M = F & 65535, z &= 15, n < z && (i += C[y++] << n, n += 8, n < z && (i += C[y++] << n, n += 8)), M += i & (1 << z) - 1, M > v) { b.msg = "invalid distance too far back", f.mode = u; break e; } if (i >>>= z, n -= z, z = l - d, M > z) { if (z = M - z, z > a && f.sane) { b.msg = "invalid distance too far back", f.mode = u; break e; } if (I = 0, R = t, r === 0) { if (I += c - z, z < N) { N -= z; do E[l++] = t[I++]; while (--z); I = l - M, R = E; } } else if (r < z) { if (I += c + r - z, z -= r, z < N) { N -= z; do E[l++] = t[I++]; while (--z); if (I = 0, r < N) { z = r, N -= z; do E[l++] = t[I++]; while (--z); I = l - M, R = E; } } } else if (I += r - z, z < N) { N -= z; do E[l++] = t[I++]; while (--z); I = l - M, R = E; } for (; N > 2; ) E[l++] = R[I++], E[l++] = R[I++], E[l++] = R[I++], N -= 3; N && (E[l++] = R[I++], N > 1 && (E[l++] = R[I++])); } else { I = l - M; do E[l++] = E[I++], E[l++] = E[I++], E[l++] = E[I++], N -= 3; while (N > 2); N && (E[l++] = E[I++], N > 1 && (E[l++] = E[I++])); } } else if (z & 64) { b.msg = "invalid distance code", f.mode = u; break e; } else { F = p[(F & 65535) + /*here.val*/ (i & (1 << z) - 1)]; continue r; } break; } } else if (z & 64) if (z & 32) { f.mode = m; break e; } else { b.msg = "invalid literal/length code", f.mode = u; break e; } else { F = o[(F & 65535) + /*here.val*/ (i & (1 << z) - 1)]; continue t; } break; } } while (y < h && l < s); N = n >> 3, y -= N, n -= N << 3, i &= (1 << n) - 1, b.next_in = y, b.next_out = l, b.avail_in = y < h ? 5 + (h - y) : 5 - (y - h), b.avail_out = l < s ? 257 + (s - l) : 257 - (l - s), f.hold = i, f.bits = n; }; }, {}], 450: [function(e, x, _) { var u = e("../utils/common"), m = e("./adler32"), g = e("./crc32"), b = e("./inffast"), w = e("./inftrees"), f = 0, y = 1, h = 2, l = 4, d = 5, s = 6, v = 0, c = 1, a = 2, r = -2, t = -3, i = -4, n = -5, o = 8, p = 1, O = 2, P = 3, F = 4, z = 5, N = 6, M = 7, I = 8, R = 9, C = 10, E = 11, A = 12, L = 13, $ = 14, W = 15, U = 16, D = 17, B = 18, j = 19, V = 20, re = 21, ee = 22, ce = 23, ve = 24, ge = 25, oe = 26, J = 27, Q = 28, he = 29, ke = 30, ne = 31, se = 32, Ce = 852, q = 592, G = 15, Y = G; function fe(pe) { return (pe >>> 24 & 255) + (pe >>> 8 & 65280) + ((pe & 65280) << 8) + ((pe & 255) << 24); } function we() { this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new u.Buf16(320), this.work = new u.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; } function _e(pe) { var Pe; return !pe || !pe.state ? r : (Pe = pe.state, pe.total_in = pe.total_out = Pe.total = 0, pe.msg = "", Pe.wrap && (pe.adler = Pe.wrap & 1), Pe.mode = p, Pe.last = 0, Pe.havedict = 0, Pe.dmax = 32768, Pe.head = null, Pe.hold = 0, Pe.bits = 0, Pe.lencode = Pe.lendyn = new u.Buf32(Ce), Pe.distcode = Pe.distdyn = new u.Buf32(q), Pe.sane = 1, Pe.back = -1, v); } function je(pe) { var Pe; return !pe || !pe.state ? r : (Pe = pe.state, Pe.wsize = 0, Pe.whave = 0, Pe.wnext = 0, _e(pe)); } function Ye(pe, Pe) { var te, He; return !pe || !pe.state || (He = pe.state, Pe < 0 ? (te = 0, Pe = -Pe) : (te = (Pe >> 4) + 1, Pe < 48 && (Pe &= 15)), Pe && (Pe < 8 || Pe > 15)) ? r : (He.window !== null && He.wbits !== Pe && (He.window = null), He.wrap = te, He.wbits = Pe, je(pe)); } function nt(pe, Pe) { var te, He; return pe ? (He = new we(), pe.state = He, He.window = null, te = Ye(pe, Pe), te !== v && (pe.state = null), te) : r; } function ut(pe) { return nt(pe, Y); } var ot = !0, Ue, Ve; function Qe(pe) { if (ot) { var Pe; for (Ue = new u.Buf32(512), Ve = new u.Buf32(32), Pe = 0; Pe < 144; ) pe.lens[Pe++] = 8; for (; Pe < 256; ) pe.lens[Pe++] = 9; for (; Pe < 280; ) pe.lens[Pe++] = 7; for (; Pe < 288; ) pe.lens[Pe++] = 8; for (w(y, pe.lens, 0, 288, Ue, 0, pe.work, { bits: 9 }), Pe = 0; Pe < 32; ) pe.lens[Pe++] = 5; w(h, pe.lens, 0, 32, Ve, 0, pe.work, { bits: 5 }), ot = !1; } pe.lencode = Ue, pe.lenbits = 9, pe.distcode = Ve, pe.distbits = 5; } function tt(pe, Pe, te, He) { var it, K = pe.state; return K.window === null && (K.wsize = 1 << K.wbits, K.wnext = 0, K.whave = 0, K.window = new u.Buf8(K.wsize)), He >= K.wsize ? (u.arraySet(K.window, Pe, te - K.wsize, K.wsize, 0), K.wnext = 0, K.whave = K.wsize) : (it = K.wsize - K.wnext, it > He && (it = He), u.arraySet(K.window, Pe, te - He, it, K.wnext), He -= it, He ? (u.arraySet(K.window, Pe, te - He, He, 0), K.wnext = He, K.whave = K.wsize) : (K.wnext += it, K.wnext === K.wsize && (K.wnext = 0), K.whave < K.wsize && (K.whave += it))), 0; } function ae(pe, Pe) { var te, He, it, K, Me, Le, ue, Se, Ie, st, Ge, rt, _t, wt, Ot = 0, pt, ct, At, Pt, bt, Kt, Ct, xt, Ft = new u.Buf8(4), Lt, Et, Dr = ( /* permutation of code lengths */ [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] ); if (!pe || !pe.state || !pe.output || !pe.input && pe.avail_in !== 0) return r; te = pe.state, te.mode === A && (te.mode = L), Me = pe.next_out, it = pe.output, ue = pe.avail_out, K = pe.next_in, He = pe.input, Le = pe.avail_in, Se = te.hold, Ie = te.bits, st = Le, Ge = ue, xt = v; e: for (; ; ) switch (te.mode) { case p: if (te.wrap === 0) { te.mode = L; break; } for (; Ie < 16; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (te.wrap & 2 && Se === 35615) { te.check = 0, Ft[0] = Se & 255, Ft[1] = Se >>> 8 & 255, te.check = g(te.check, Ft, 2, 0), Se = 0, Ie = 0, te.mode = O; break; } if (te.flags = 0, te.head && (te.head.done = !1), !(te.wrap & 1) || /* check if zlib header allowed */ (((Se & 255) << /*BITS(8)*/ 8) + (Se >> 8)) % 31) { pe.msg = "incorrect header check", te.mode = ke; break; } if ((Se & 15) !== /*BITS(4)*/ o) { pe.msg = "unknown compression method", te.mode = ke; break; } if (Se >>>= 4, Ie -= 4, Ct = (Se & 15) + /*BITS(4)*/ 8, te.wbits === 0) te.wbits = Ct; else if (Ct > te.wbits) { pe.msg = "invalid window size", te.mode = ke; break; } te.dmax = 1 << Ct, pe.adler = te.check = 1, te.mode = Se & 512 ? C : A, Se = 0, Ie = 0; break; case O: for (; Ie < 16; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (te.flags = Se, (te.flags & 255) !== o) { pe.msg = "unknown compression method", te.mode = ke; break; } if (te.flags & 57344) { pe.msg = "unknown header flags set", te.mode = ke; break; } te.head && (te.head.text = Se >> 8 & 1), te.flags & 512 && (Ft[0] = Se & 255, Ft[1] = Se >>> 8 & 255, te.check = g(te.check, Ft, 2, 0)), Se = 0, Ie = 0, te.mode = P; case P: for (; Ie < 32; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.head && (te.head.time = Se), te.flags & 512 && (Ft[0] = Se & 255, Ft[1] = Se >>> 8 & 255, Ft[2] = Se >>> 16 & 255, Ft[3] = Se >>> 24 & 255, te.check = g(te.check, Ft, 4, 0)), Se = 0, Ie = 0, te.mode = F; case F: for (; Ie < 16; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.head && (te.head.xflags = Se & 255, te.head.os = Se >> 8), te.flags & 512 && (Ft[0] = Se & 255, Ft[1] = Se >>> 8 & 255, te.check = g(te.check, Ft, 2, 0)), Se = 0, Ie = 0, te.mode = z; case z: if (te.flags & 1024) { for (; Ie < 16; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.length = Se, te.head && (te.head.extra_len = Se), te.flags & 512 && (Ft[0] = Se & 255, Ft[1] = Se >>> 8 & 255, te.check = g(te.check, Ft, 2, 0)), Se = 0, Ie = 0; } else te.head && (te.head.extra = null); te.mode = N; case N: if (te.flags & 1024 && (rt = te.length, rt > Le && (rt = Le), rt && (te.head && (Ct = te.head.extra_len - te.length, te.head.extra || (te.head.extra = new Array(te.head.extra_len)), u.arraySet( te.head.extra, He, K, // extra field is limited to 65536 bytes // - no need for additional size check rt, /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ Ct )), te.flags & 512 && (te.check = g(te.check, He, rt, K)), Le -= rt, K += rt, te.length -= rt), te.length)) break e; te.length = 0, te.mode = M; case M: if (te.flags & 2048) { if (Le === 0) break e; rt = 0; do Ct = He[K + rt++], te.head && Ct && te.length < 65536 && (te.head.name += String.fromCharCode(Ct)); while (Ct && rt < Le); if (te.flags & 512 && (te.check = g(te.check, He, rt, K)), Le -= rt, K += rt, Ct) break e; } else te.head && (te.head.name = null); te.length = 0, te.mode = I; case I: if (te.flags & 4096) { if (Le === 0) break e; rt = 0; do Ct = He[K + rt++], te.head && Ct && te.length < 65536 && (te.head.comment += String.fromCharCode(Ct)); while (Ct && rt < Le); if (te.flags & 512 && (te.check = g(te.check, He, rt, K)), Le -= rt, K += rt, Ct) break e; } else te.head && (te.head.comment = null); te.mode = R; case R: if (te.flags & 512) { for (; Ie < 16; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (Se !== (te.check & 65535)) { pe.msg = "header crc mismatch", te.mode = ke; break; } Se = 0, Ie = 0; } te.head && (te.head.hcrc = te.flags >> 9 & 1, te.head.done = !0), pe.adler = te.check = 0, te.mode = A; break; case C: for (; Ie < 32; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } pe.adler = te.check = fe(Se), Se = 0, Ie = 0, te.mode = E; case E: if (te.havedict === 0) return pe.next_out = Me, pe.avail_out = ue, pe.next_in = K, pe.avail_in = Le, te.hold = Se, te.bits = Ie, a; pe.adler = te.check = 1, te.mode = A; case A: if (Pe === d || Pe === s) break e; case L: if (te.last) { Se >>>= Ie & 7, Ie -= Ie & 7, te.mode = J; break; } for (; Ie < 3; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } switch (te.last = Se & 1, Se >>>= 1, Ie -= 1, Se & 3) { case 0: te.mode = $; break; case 1: if (Qe(te), te.mode = V, Pe === s) { Se >>>= 2, Ie -= 2; break e; } break; case 2: te.mode = D; break; case 3: pe.msg = "invalid block type", te.mode = ke; } Se >>>= 2, Ie -= 2; break; case $: for (Se >>>= Ie & 7, Ie -= Ie & 7; Ie < 32; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if ((Se & 65535) !== (Se >>> 16 ^ 65535)) { pe.msg = "invalid stored block lengths", te.mode = ke; break; } if (te.length = Se & 65535, Se = 0, Ie = 0, te.mode = W, Pe === s) break e; case W: te.mode = U; case U: if (rt = te.length, rt) { if (rt > Le && (rt = Le), rt > ue && (rt = ue), rt === 0) break e; u.arraySet(it, He, K, rt, Me), Le -= rt, K += rt, ue -= rt, Me += rt, te.length -= rt; break; } te.mode = A; break; case D: for (; Ie < 14; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (te.nlen = (Se & 31) + /*BITS(5)*/ 257, Se >>>= 5, Ie -= 5, te.ndist = (Se & 31) + /*BITS(5)*/ 1, Se >>>= 5, Ie -= 5, te.ncode = (Se & 15) + /*BITS(4)*/ 4, Se >>>= 4, Ie -= 4, te.nlen > 286 || te.ndist > 30) { pe.msg = "too many length or distance symbols", te.mode = ke; break; } te.have = 0, te.mode = B; case B: for (; te.have < te.ncode; ) { for (; Ie < 3; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.lens[Dr[te.have++]] = Se & 7, Se >>>= 3, Ie -= 3; } for (; te.have < 19; ) te.lens[Dr[te.have++]] = 0; if (te.lencode = te.lendyn, te.lenbits = 7, Lt = { bits: te.lenbits }, xt = w(f, te.lens, 0, 19, te.lencode, 0, te.work, Lt), te.lenbits = Lt.bits, xt) { pe.msg = "invalid code lengths set", te.mode = ke; break; } te.have = 0, te.mode = j; case j: for (; te.have < te.nlen + te.ndist; ) { for (; Ot = te.lencode[Se & (1 << te.lenbits) - 1], pt = Ot >>> 24, ct = Ot >>> 16 & 255, At = Ot & 65535, !(pt <= Ie); ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (At < 16) Se >>>= pt, Ie -= pt, te.lens[te.have++] = At; else { if (At === 16) { for (Et = pt + 2; Ie < Et; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (Se >>>= pt, Ie -= pt, te.have === 0) { pe.msg = "invalid bit length repeat", te.mode = ke; break; } Ct = te.lens[te.have - 1], rt = 3 + (Se & 3), Se >>>= 2, Ie -= 2; } else if (At === 17) { for (Et = pt + 3; Ie < Et; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } Se >>>= pt, Ie -= pt, Ct = 0, rt = 3 + (Se & 7), Se >>>= 3, Ie -= 3; } else { for (Et = pt + 7; Ie < Et; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } Se >>>= pt, Ie -= pt, Ct = 0, rt = 11 + (Se & 127), Se >>>= 7, Ie -= 7; } if (te.have + rt > te.nlen + te.ndist) { pe.msg = "invalid bit length repeat", te.mode = ke; break; } for (; rt--; ) te.lens[te.have++] = Ct; } } if (te.mode === ke) break; if (te.lens[256] === 0) { pe.msg = "invalid code -- missing end-of-block", te.mode = ke; break; } if (te.lenbits = 9, Lt = { bits: te.lenbits }, xt = w(y, te.lens, 0, te.nlen, te.lencode, 0, te.work, Lt), te.lenbits = Lt.bits, xt) { pe.msg = "invalid literal/lengths set", te.mode = ke; break; } if (te.distbits = 6, te.distcode = te.distdyn, Lt = { bits: te.distbits }, xt = w(h, te.lens, te.nlen, te.ndist, te.distcode, 0, te.work, Lt), te.distbits = Lt.bits, xt) { pe.msg = "invalid distances set", te.mode = ke; break; } if (te.mode = V, Pe === s) break e; case V: te.mode = re; case re: if (Le >= 6 && ue >= 258) { pe.next_out = Me, pe.avail_out = ue, pe.next_in = K, pe.avail_in = Le, te.hold = Se, te.bits = Ie, b(pe, Ge), Me = pe.next_out, it = pe.output, ue = pe.avail_out, K = pe.next_in, He = pe.input, Le = pe.avail_in, Se = te.hold, Ie = te.bits, te.mode === A && (te.back = -1); break; } for (te.back = 0; Ot = te.lencode[Se & (1 << te.lenbits) - 1], pt = Ot >>> 24, ct = Ot >>> 16 & 255, At = Ot & 65535, !(pt <= Ie); ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (ct && !(ct & 240)) { for (Pt = pt, bt = ct, Kt = At; Ot = te.lencode[Kt + ((Se & (1 << Pt + bt) - 1) >> /*BITS(last.bits + last.op)*/ Pt)], pt = Ot >>> 24, ct = Ot >>> 16 & 255, At = Ot & 65535, !(Pt + pt <= Ie); ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } Se >>>= Pt, Ie -= Pt, te.back += Pt; } if (Se >>>= pt, Ie -= pt, te.back += pt, te.length = At, ct === 0) { te.mode = oe; break; } if (ct & 32) { te.back = -1, te.mode = A; break; } if (ct & 64) { pe.msg = "invalid literal/length code", te.mode = ke; break; } te.extra = ct & 15, te.mode = ee; case ee: if (te.extra) { for (Et = te.extra; Ie < Et; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.length += Se & (1 << te.extra) - 1, Se >>>= te.extra, Ie -= te.extra, te.back += te.extra; } te.was = te.length, te.mode = ce; case ce: for (; Ot = te.distcode[Se & (1 << te.distbits) - 1], pt = Ot >>> 24, ct = Ot >>> 16 & 255, At = Ot & 65535, !(pt <= Ie); ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (!(ct & 240)) { for (Pt = pt, bt = ct, Kt = At; Ot = te.distcode[Kt + ((Se & (1 << Pt + bt) - 1) >> /*BITS(last.bits + last.op)*/ Pt)], pt = Ot >>> 24, ct = Ot >>> 16 & 255, At = Ot & 65535, !(Pt + pt <= Ie); ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } Se >>>= Pt, Ie -= Pt, te.back += Pt; } if (Se >>>= pt, Ie -= pt, te.back += pt, ct & 64) { pe.msg = "invalid distance code", te.mode = ke; break; } te.offset = At, te.extra = ct & 15, te.mode = ve; case ve: if (te.extra) { for (Et = te.extra; Ie < Et; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } te.offset += Se & (1 << te.extra) - 1, Se >>>= te.extra, Ie -= te.extra, te.back += te.extra; } if (te.offset > te.dmax) { pe.msg = "invalid distance too far back", te.mode = ke; break; } te.mode = ge; case ge: if (ue === 0) break e; if (rt = Ge - ue, te.offset > rt) { if (rt = te.offset - rt, rt > te.whave && te.sane) { pe.msg = "invalid distance too far back", te.mode = ke; break; } rt > te.wnext ? (rt -= te.wnext, _t = te.wsize - rt) : _t = te.wnext - rt, rt > te.length && (rt = te.length), wt = te.window; } else wt = it, _t = Me - te.offset, rt = te.length; rt > ue && (rt = ue), ue -= rt, te.length -= rt; do it[Me++] = wt[_t++]; while (--rt); te.length === 0 && (te.mode = re); break; case oe: if (ue === 0) break e; it[Me++] = te.length, ue--, te.mode = re; break; case J: if (te.wrap) { for (; Ie < 32; ) { if (Le === 0) break e; Le--, Se |= He[K++] << Ie, Ie += 8; } if (Ge -= ue, pe.total_out += Ge, te.total += Ge, Ge && (pe.adler = te.check = /*UPDATE(state.check, put - _out, _out);*/ te.flags ? g(te.check, it, Ge, Me - Ge) : m(te.check, it, Ge, Me - Ge)), Ge = ue, (te.flags ? Se : fe(Se)) !== te.check) { pe.msg = "incorrect data check", te.mode = ke; break; } Se = 0, Ie = 0; } te.mode = Q; case Q: if (te.wrap && te.flags) { for (; Ie < 32; ) { if (Le === 0) break e; Le--, Se += He[K++] << Ie, Ie += 8; } if (Se !== (te.total & 4294967295)) { pe.msg = "incorrect length check", te.mode = ke; break; } Se = 0, Ie = 0; } te.mode = he; case he: xt = c; break e; case ke: xt = t; break e; case ne: return i; case se: default: return r; } return pe.next_out = Me, pe.avail_out = ue, pe.next_in = K, pe.avail_in = Le, te.hold = Se, te.bits = Ie, (te.wsize || Ge !== pe.avail_out && te.mode < ke && (te.mode < J || Pe !== l)) && tt(pe, pe.output, pe.next_out, Ge - pe.avail_out), st -= pe.avail_in, Ge -= pe.avail_out, pe.total_in += st, pe.total_out += Ge, te.total += Ge, te.wrap && Ge && (pe.adler = te.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ te.flags ? g(te.check, it, Ge, pe.next_out - Ge) : m(te.check, it, Ge, pe.next_out - Ge)), pe.data_type = te.bits + (te.last ? 64 : 0) + (te.mode === A ? 128 : 0) + (te.mode === V || te.mode === W ? 256 : 0), (st === 0 && Ge === 0 || Pe === l) && xt === v && (xt = n), xt; } function Re(pe) { if (!pe || !pe.state) return r; var Pe = pe.state; return Pe.window && (Pe.window = null), pe.state = null, v; } function be(pe, Pe) { var te; return !pe || !pe.state || (te = pe.state, !(te.wrap & 2)) ? r : (te.head = Pe, Pe.done = !1, v); } function Ee(pe, Pe) { var te = Pe.length, He, it, K; return !pe || !pe.state || (He = pe.state, He.wrap !== 0 && He.mode !== E) ? r : He.mode === E && (it = 1, it = m(it, Pe, te, 0), it !== He.check) ? t : (K = tt(pe, Pe, te, te), K ? (He.mode = ne, i) : (He.havedict = 1, v)); } _.inflateReset = je, _.inflateReset2 = Ye, _.inflateResetKeep = _e, _.inflateInit = ut, _.inflateInit2 = nt, _.inflate = ae, _.inflateEnd = Re, _.inflateGetHeader = be, _.inflateSetDictionary = Ee, _.inflateInfo = "pako inflate (from Nodeca project)"; }, { "../utils/common": 442, "./adler32": 444, "./crc32": 446, "./inffast": 449, "./inftrees": 451 }], 451: [function(e, x, _) { var u = e("../utils/common"), m = 15, g = 852, b = 592, w = 0, f = 1, y = 2, h = [ /* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 ], l = [ /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 ], d = [ /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0 ], s = [ /* Distance codes 0..29 extra */ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64 ]; x.exports = function(c, a, r, t, i, n, o, p) { var O = p.bits, P = 0, F = 0, z = 0, N = 0, M = 0, I = 0, R = 0, C = 0, E = 0, A = 0, L, $, W, U, D, B = null, j = 0, V, re = new u.Buf16(m + 1), ee = new u.Buf16(m + 1), ce = null, ve = 0, ge, oe, J; for (P = 0; P <= m; P++) re[P] = 0; for (F = 0; F < t; F++) re[a[r + F]]++; for (M = O, N = m; N >= 1 && re[N] === 0; N--) ; if (M > N && (M = N), N === 0) return i[n++] = 1 << 24 | 64 << 16 | 0, i[n++] = 1 << 24 | 64 << 16 | 0, p.bits = 1, 0; for (z = 1; z < N && re[z] === 0; z++) ; for (M < z && (M = z), C = 1, P = 1; P <= m; P++) if (C <<= 1, C -= re[P], C < 0) return -1; if (C > 0 && (c === w || N !== 1)) return -1; for (ee[1] = 0, P = 1; P < m; P++) ee[P + 1] = ee[P] + re[P]; for (F = 0; F < t; F++) a[r + F] !== 0 && (o[ee[a[r + F]]++] = F); if (c === w ? (B = ce = o, V = 19) : c === f ? (B = h, j -= 257, ce = l, ve -= 257, V = 256) : (B = d, ce = s, V = -1), A = 0, F = 0, P = z, D = n, I = M, R = 0, W = -1, E = 1 << M, U = E - 1, c === f && E > g || c === y && E > b) return 1; for (; ; ) { ge = P - R, o[F] < V ? (oe = 0, J = o[F]) : o[F] > V ? (oe = ce[ve + o[F]], J = B[j + o[F]]) : (oe = 32 + 64, J = 0), L = 1 << P - R, $ = 1 << I, z = $; do $ -= L, i[D + (A >> R) + $] = ge << 24 | oe << 16 | J | 0; while ($ !== 0); for (L = 1 << P - 1; A & L; ) L >>= 1; if (L !== 0 ? (A &= L - 1, A += L) : A = 0, F++, --re[P] === 0) { if (P === N) break; P = a[r + o[F]]; } if (P > M && (A & U) !== W) { for (R === 0 && (R = M), D += z, I = P - R, C = 1 << I; I + R < N && (C -= re[I + R], !(C <= 0)); ) I++, C <<= 1; if (E += 1 << I, c === f && E > g || c === y && E > b) return 1; W = A & U, i[W] = M << 24 | I << 16 | D - n | 0; } } return A !== 0 && (i[D + A] = P - R << 24 | 64 << 16 | 0), p.bits = M, 0; }; }, { "../utils/common": 442 }], 452: [function(e, x, _) { x.exports = { 2: "need dictionary", /* Z_NEED_DICT 2 */ 1: "stream end", /* Z_STREAM_END 1 */ 0: "", /* Z_OK 0 */ "-1": "file error", /* Z_ERRNO (-1) */ "-2": "stream error", /* Z_STREAM_ERROR (-2) */ "-3": "data error", /* Z_DATA_ERROR (-3) */ "-4": "insufficient memory", /* Z_MEM_ERROR (-4) */ "-5": "buffer error", /* Z_BUF_ERROR (-5) */ "-6": "incompatible version" /* Z_VERSION_ERROR (-6) */ }; }, {}], 453: [function(e, x, _) { var u = e("../utils/common"), m = 4, g = 0, b = 1, w = 2; function f(ae) { for (var Re = ae.length; --Re >= 0; ) ae[Re] = 0; } var y = 0, h = 1, l = 2, d = 3, s = 258, v = 29, c = 256, a = c + 1 + v, r = 30, t = 19, i = 2 * a + 1, n = 15, o = 16, p = 7, O = 256, P = 16, F = 17, z = 18, N = ( /* extra bits for each length code */ [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] ), M = ( /* extra bits for each distance code */ [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] ), I = ( /* extra bits for each bit length code */ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] ), R = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], C = 512, E = new Array((a + 2) * 2); f(E); var A = new Array(r * 2); f(A); var L = new Array(C); f(L); var $ = new Array(s - d + 1); f($); var W = new Array(v); f(W); var U = new Array(r); f(U); function D(ae, Re, be, Ee, pe) { this.static_tree = ae, this.extra_bits = Re, this.extra_base = be, this.elems = Ee, this.max_length = pe, this.has_stree = ae && ae.length; } var B, j, V; function re(ae, Re) { this.dyn_tree = ae, this.max_code = 0, this.stat_desc = Re; } function ee(ae) { return ae < 256 ? L[ae] : L[256 + (ae >>> 7)]; } function ce(ae, Re) { ae.pending_buf[ae.pending++] = Re & 255, ae.pending_buf[ae.pending++] = Re >>> 8 & 255; } function ve(ae, Re, be) { ae.bi_valid > o - be ? (ae.bi_buf |= Re << ae.bi_valid & 65535, ce(ae, ae.bi_buf), ae.bi_buf = Re >> o - ae.bi_valid, ae.bi_valid += be - o) : (ae.bi_buf |= Re << ae.bi_valid & 65535, ae.bi_valid += be); } function ge(ae, Re, be) { ve( ae, be[Re * 2], be[Re * 2 + 1] /*.Len*/ ); } function oe(ae, Re) { var be = 0; do be |= ae & 1, ae >>>= 1, be <<= 1; while (--Re > 0); return be >>> 1; } function J(ae) { ae.bi_valid === 16 ? (ce(ae, ae.bi_buf), ae.bi_buf = 0, ae.bi_valid = 0) : ae.bi_valid >= 8 && (ae.pending_buf[ae.pending++] = ae.bi_buf & 255, ae.bi_buf >>= 8, ae.bi_valid -= 8); } function Q(ae, Re) { var be = Re.dyn_tree, Ee = Re.max_code, pe = Re.stat_desc.static_tree, Pe = Re.stat_desc.has_stree, te = Re.stat_desc.extra_bits, He = Re.stat_desc.extra_base, it = Re.stat_desc.max_length, K, Me, Le, ue, Se, Ie, st = 0; for (ue = 0; ue <= n; ue++) ae.bl_count[ue] = 0; for (be[ae.heap[ae.heap_max] * 2 + 1] = 0, K = ae.heap_max + 1; K < i; K++) Me = ae.heap[K], ue = be[be[Me * 2 + 1] * 2 + 1] + 1, ue > it && (ue = it, st++), be[Me * 2 + 1] = ue, !(Me > Ee) && (ae.bl_count[ue]++, Se = 0, Me >= He && (Se = te[Me - He]), Ie = be[Me * 2], ae.opt_len += Ie * (ue + Se), Pe && (ae.static_len += Ie * (pe[Me * 2 + 1] + Se))); if (st !== 0) { do { for (ue = it - 1; ae.bl_count[ue] === 0; ) ue--; ae.bl_count[ue]--, ae.bl_count[ue + 1] += 2, ae.bl_count[it]--, st -= 2; } while (st > 0); for (ue = it; ue !== 0; ue--) for (Me = ae.bl_count[ue]; Me !== 0; ) Le = ae.heap[--K], !(Le > Ee) && (be[Le * 2 + 1] !== ue && (ae.opt_len += (ue - be[Le * 2 + 1]) * be[Le * 2], be[Le * 2 + 1] = ue), Me--); } } function he(ae, Re, be) { var Ee = new Array(n + 1), pe = 0, Pe, te; for (Pe = 1; Pe <= n; Pe++) Ee[Pe] = pe = pe + be[Pe - 1] << 1; for (te = 0; te <= Re; te++) { var He = ae[te * 2 + 1]; He !== 0 && (ae[te * 2] = oe(Ee[He]++, He)); } } function ke() { var ae, Re, be, Ee, pe, Pe = new Array(n + 1); for (be = 0, Ee = 0; Ee < v - 1; Ee++) for (W[Ee] = be, ae = 0; ae < 1 << N[Ee]; ae++) $[be++] = Ee; for ($[be - 1] = Ee, pe = 0, Ee = 0; Ee < 16; Ee++) for (U[Ee] = pe, ae = 0; ae < 1 << M[Ee]; ae++) L[pe++] = Ee; for (pe >>= 7; Ee < r; Ee++) for (U[Ee] = pe << 7, ae = 0; ae < 1 << M[Ee] - 7; ae++) L[256 + pe++] = Ee; for (Re = 0; Re <= n; Re++) Pe[Re] = 0; for (ae = 0; ae <= 143; ) E[ae * 2 + 1] = 8, ae++, Pe[8]++; for (; ae <= 255; ) E[ae * 2 + 1] = 9, ae++, Pe[9]++; for (; ae <= 279; ) E[ae * 2 + 1] = 7, ae++, Pe[7]++; for (; ae <= 287; ) E[ae * 2 + 1] = 8, ae++, Pe[8]++; for (he(E, a + 1, Pe), ae = 0; ae < r; ae++) A[ae * 2 + 1] = 5, A[ae * 2] = oe(ae, 5); B = new D(E, N, c + 1, a, n), j = new D(A, M, 0, r, n), V = new D(new Array(0), I, 0, t, p); } function ne(ae) { var Re; for (Re = 0; Re < a; Re++) ae.dyn_ltree[Re * 2] = 0; for (Re = 0; Re < r; Re++) ae.dyn_dtree[Re * 2] = 0; for (Re = 0; Re < t; Re++) ae.bl_tree[Re * 2] = 0; ae.dyn_ltree[O * 2] = 1, ae.opt_len = ae.static_len = 0, ae.last_lit = ae.matches = 0; } function se(ae) { ae.bi_valid > 8 ? ce(ae, ae.bi_buf) : ae.bi_valid > 0 && (ae.pending_buf[ae.pending++] = ae.bi_buf), ae.bi_buf = 0, ae.bi_valid = 0; } function Ce(ae, Re, be, Ee) { se(ae), Ee && (ce(ae, be), ce(ae, ~be)), u.arraySet(ae.pending_buf, ae.window, Re, be, ae.pending), ae.pending += be; } function q(ae, Re, be, Ee) { var pe = Re * 2, Pe = be * 2; return ae[pe] < ae[Pe] || ae[pe] === ae[Pe] && Ee[Re] <= Ee[be]; } function G(ae, Re, be) { for (var Ee = ae.heap[be], pe = be << 1; pe <= ae.heap_len && (pe < ae.heap_len && q(Re, ae.heap[pe + 1], ae.heap[pe], ae.depth) && pe++, !q(Re, Ee, ae.heap[pe], ae.depth)); ) ae.heap[be] = ae.heap[pe], be = pe, pe <<= 1; ae.heap[be] = Ee; } function Y(ae, Re, be) { var Ee, pe, Pe = 0, te, He; if (ae.last_lit !== 0) do Ee = ae.pending_buf[ae.d_buf + Pe * 2] << 8 | ae.pending_buf[ae.d_buf + Pe * 2 + 1], pe = ae.pending_buf[ae.l_buf + Pe], Pe++, Ee === 0 ? ge(ae, pe, Re) : (te = $[pe], ge(ae, te + c + 1, Re), He = N[te], He !== 0 && (pe -= W[te], ve(ae, pe, He)), Ee--, te = ee(Ee), ge(ae, te, be), He = M[te], He !== 0 && (Ee -= U[te], ve(ae, Ee, He))); while (Pe < ae.last_lit); ge(ae, O, Re); } function fe(ae, Re) { var be = Re.dyn_tree, Ee = Re.stat_desc.static_tree, pe = Re.stat_desc.has_stree, Pe = Re.stat_desc.elems, te, He, it = -1, K; for (ae.heap_len = 0, ae.heap_max = i, te = 0; te < Pe; te++) be[te * 2] !== 0 ? (ae.heap[++ae.heap_len] = it = te, ae.depth[te] = 0) : be[te * 2 + 1] = 0; for (; ae.heap_len < 2; ) K = ae.heap[++ae.heap_len] = it < 2 ? ++it : 0, be[K * 2] = 1, ae.depth[K] = 0, ae.opt_len--, pe && (ae.static_len -= Ee[K * 2 + 1]); for (Re.max_code = it, te = ae.heap_len >> 1; te >= 1; te--) G(ae, be, te); K = Pe; do te = ae.heap[ 1 /*SMALLEST*/ ], ae.heap[ 1 /*SMALLEST*/ ] = ae.heap[ae.heap_len--], G( ae, be, 1 /*SMALLEST*/ ), He = ae.heap[ 1 /*SMALLEST*/ ], ae.heap[--ae.heap_max] = te, ae.heap[--ae.heap_max] = He, be[K * 2] = be[te * 2] + be[He * 2], ae.depth[K] = (ae.depth[te] >= ae.depth[He] ? ae.depth[te] : ae.depth[He]) + 1, be[te * 2 + 1] = be[He * 2 + 1] = K, ae.heap[ 1 /*SMALLEST*/ ] = K++, G( ae, be, 1 /*SMALLEST*/ ); while (ae.heap_len >= 2); ae.heap[--ae.heap_max] = ae.heap[ 1 /*SMALLEST*/ ], Q(ae, Re), he(be, it, ae.bl_count); } function we(ae, Re, be) { var Ee, pe = -1, Pe, te = Re[0 * 2 + 1], He = 0, it = 7, K = 4; for (te === 0 && (it = 138, K = 3), Re[(be + 1) * 2 + 1] = 65535, Ee = 0; Ee <= be; Ee++) Pe = te, te = Re[(Ee + 1) * 2 + 1], !(++He < it && Pe === te) && (He < K ? ae.bl_tree[Pe * 2] += He : Pe !== 0 ? (Pe !== pe && ae.bl_tree[Pe * 2]++, ae.bl_tree[P * 2]++) : He <= 10 ? ae.bl_tree[F * 2]++ : ae.bl_tree[z * 2]++, He = 0, pe = Pe, te === 0 ? (it = 138, K = 3) : Pe === te ? (it = 6, K = 3) : (it = 7, K = 4)); } function _e(ae, Re, be) { var Ee, pe = -1, Pe, te = Re[0 * 2 + 1], He = 0, it = 7, K = 4; for (te === 0 && (it = 138, K = 3), Ee = 0; Ee <= be; Ee++) if (Pe = te, te = Re[(Ee + 1) * 2 + 1], !(++He < it && Pe === te)) { if (He < K) do ge(ae, Pe, ae.bl_tree); while (--He !== 0); else Pe !== 0 ? (Pe !== pe && (ge(ae, Pe, ae.bl_tree), He--), ge(ae, P, ae.bl_tree), ve(ae, He - 3, 2)) : He <= 10 ? (ge(ae, F, ae.bl_tree), ve(ae, He - 3, 3)) : (ge(ae, z, ae.bl_tree), ve(ae, He - 11, 7)); He = 0, pe = Pe, te === 0 ? (it = 138, K = 3) : Pe === te ? (it = 6, K = 3) : (it = 7, K = 4); } } function je(ae) { var Re; for (we(ae, ae.dyn_ltree, ae.l_desc.max_code), we(ae, ae.dyn_dtree, ae.d_desc.max_code), fe(ae, ae.bl_desc), Re = t - 1; Re >= 3 && ae.bl_tree[R[Re] * 2 + 1] === 0; Re--) ; return ae.opt_len += 3 * (Re + 1) + 5 + 5 + 4, Re; } function Ye(ae, Re, be, Ee) { var pe; for (ve(ae, Re - 257, 5), ve(ae, be - 1, 5), ve(ae, Ee - 4, 4), pe = 0; pe < Ee; pe++) ve( ae, ae.bl_tree[R[pe] * 2 + 1], 3 ); _e(ae, ae.dyn_ltree, Re - 1), _e(ae, ae.dyn_dtree, be - 1); } function nt(ae) { var Re = 4093624447, be; for (be = 0; be <= 31; be++, Re >>>= 1) if (Re & 1 && ae.dyn_ltree[be * 2] !== 0) return g; if (ae.dyn_ltree[9 * 2] !== 0 || ae.dyn_ltree[10 * 2] !== 0 || ae.dyn_ltree[13 * 2] !== 0) return b; for (be = 32; be < c; be++) if (ae.dyn_ltree[be * 2] !== 0) return b; return g; } var ut = !1; function ot(ae) { ut || (ke(), ut = !0), ae.l_desc = new re(ae.dyn_ltree, B), ae.d_desc = new re(ae.dyn_dtree, j), ae.bl_desc = new re(ae.bl_tree, V), ae.bi_buf = 0, ae.bi_valid = 0, ne(ae); } function Ue(ae, Re, be, Ee) { ve(ae, (y << 1) + (Ee ? 1 : 0), 3), Ce(ae, Re, be, !0); } function Ve(ae) { ve(ae, h << 1, 3), ge(ae, O, E), J(ae); } function Qe(ae, Re, be, Ee) { var pe, Pe, te = 0; ae.level > 0 ? (ae.strm.data_type === w && (ae.strm.data_type = nt(ae)), fe(ae, ae.l_desc), fe(ae, ae.d_desc), te = je(ae), pe = ae.opt_len + 3 + 7 >>> 3, Pe = ae.static_len + 3 + 7 >>> 3, Pe <= pe && (pe = Pe)) : pe = Pe = be + 5, be + 4 <= pe && Re !== -1 ? Ue(ae, Re, be, Ee) : ae.strategy === m || Pe === pe ? (ve(ae, (h << 1) + (Ee ? 1 : 0), 3), Y(ae, E, A)) : (ve(ae, (l << 1) + (Ee ? 1 : 0), 3), Ye(ae, ae.l_desc.max_code + 1, ae.d_desc.max_code + 1, te + 1), Y(ae, ae.dyn_ltree, ae.dyn_dtree)), ne(ae), Ee && se(ae); } function tt(ae, Re, be) { return ae.pending_buf[ae.d_buf + ae.last_lit * 2] = Re >>> 8 & 255, ae.pending_buf[ae.d_buf + ae.last_lit * 2 + 1] = Re & 255, ae.pending_buf[ae.l_buf + ae.last_lit] = be & 255, ae.last_lit++, Re === 0 ? ae.dyn_ltree[be * 2]++ : (ae.matches++, Re--, ae.dyn_ltree[($[be] + c + 1) * 2]++, ae.dyn_dtree[ee(Re) * 2]++), ae.last_lit === ae.lit_bufsize - 1; } _._tr_init = ot, _._tr_stored_block = Ue, _._tr_flush_block = Qe, _._tr_tally = tt, _._tr_align = Ve; }, { "../utils/common": 442 }], 454: [function(e, x, _) { function u() { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0; } x.exports = u; }, {}], 455: [function(e, x, _) { x.exports = { "2.16.840.1.101.3.4.1.1": "aes-128-ecb", "2.16.840.1.101.3.4.1.2": "aes-128-cbc", "2.16.840.1.101.3.4.1.3": "aes-128-ofb", "2.16.840.1.101.3.4.1.4": "aes-128-cfb", "2.16.840.1.101.3.4.1.21": "aes-192-ecb", "2.16.840.1.101.3.4.1.22": "aes-192-cbc", "2.16.840.1.101.3.4.1.23": "aes-192-ofb", "2.16.840.1.101.3.4.1.24": "aes-192-cfb", "2.16.840.1.101.3.4.1.41": "aes-256-ecb", "2.16.840.1.101.3.4.1.42": "aes-256-cbc", "2.16.840.1.101.3.4.1.43": "aes-256-ofb", "2.16.840.1.101.3.4.1.44": "aes-256-cfb" }; }, {}], 456: [function(e, x, _) { var u = e("asn1.js"); _.certificate = e("./certificate"); var m = u.define("RSAPrivateKey", function() { this.seq().obj(this.key("version").int(), this.key("modulus").int(), this.key("publicExponent").int(), this.key("privateExponent").int(), this.key("prime1").int(), this.key("prime2").int(), this.key("exponent1").int(), this.key("exponent2").int(), this.key("coefficient").int()); }); _.RSAPrivateKey = m; var g = u.define("RSAPublicKey", function() { this.seq().obj(this.key("modulus").int(), this.key("publicExponent").int()); }); _.RSAPublicKey = g; var b = u.define("SubjectPublicKeyInfo", function() { this.seq().obj(this.key("algorithm").use(w), this.key("subjectPublicKey").bitstr()); }); _.PublicKey = b; var w = u.define("AlgorithmIdentifier", function() { this.seq().obj(this.key("algorithm").objid(), this.key("none").null_().optional(), this.key("curve").objid().optional(), this.key("params").seq().obj(this.key("p").int(), this.key("q").int(), this.key("g").int()).optional()); }), f = u.define("PrivateKeyInfo", function() { this.seq().obj(this.key("version").int(), this.key("algorithm").use(w), this.key("subjectPrivateKey").octstr()); }); _.PrivateKey = f; var y = u.define("EncryptedPrivateKeyInfo", function() { this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(), this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(), this.key("kdeparams").seq().obj(this.key("salt").octstr(), this.key("iters").int())), this.key("cipher").seq().obj(this.key("algo").objid(), this.key("iv").octstr()))), this.key("subjectPrivateKey").octstr()); }); _.EncryptedPrivateKey = y; var h = u.define("DSAPrivateKey", function() { this.seq().obj(this.key("version").int(), this.key("p").int(), this.key("q").int(), this.key("g").int(), this.key("pub_key").int(), this.key("priv_key").int()); }); _.DSAPrivateKey = h, _.DSAparam = u.define("DSAparam", function() { this.int(); }); var l = u.define("ECPrivateKey", function() { this.seq().obj(this.key("version").int(), this.key("privateKey").octstr(), this.key("parameters").optional().explicit(0).use(d), this.key("publicKey").optional().explicit(1).bitstr()); }); _.ECPrivateKey = l; var d = u.define("ECParameters", function() { this.choice({ namedCurve: this.objid() }); }); _.signature = u.define("signature", function() { this.seq().obj(this.key("r").int(), this.key("s").int()); }); }, { "./certificate": 457, "asn1.js": 167 }], 457: [function(e, x, _) { var u = e("asn1.js"), m = u.define("Time", function() { this.choice({ utcTime: this.utctime(), generalTime: this.gentime() }); }), g = u.define("AttributeTypeValue", function() { this.seq().obj(this.key("type").objid(), this.key("value").any()); }), b = u.define("AlgorithmIdentifier", function() { this.seq().obj(this.key("algorithm").objid(), this.key("parameters").optional(), this.key("curve").objid().optional()); }), w = u.define("SubjectPublicKeyInfo", function() { this.seq().obj(this.key("algorithm").use(b), this.key("subjectPublicKey").bitstr()); }), f = u.define("RelativeDistinguishedName", function() { this.setof(g); }), y = u.define("RDNSequence", function() { this.seqof(f); }), h = u.define("Name", function() { this.choice({ rdnSequence: this.use(y) }); }), l = u.define("Validity", function() { this.seq().obj(this.key("notBefore").use(m), this.key("notAfter").use(m)); }), d = u.define("Extension", function() { this.seq().obj(this.key("extnID").objid(), this.key("critical").bool().def(!1), this.key("extnValue").octstr()); }), s = u.define("TBSCertificate", function() { this.seq().obj(this.key("version").explicit(0).int().optional(), this.key("serialNumber").int(), this.key("signature").use(b), this.key("issuer").use(h), this.key("validity").use(l), this.key("subject").use(h), this.key("subjectPublicKeyInfo").use(w), this.key("issuerUniqueID").implicit(1).bitstr().optional(), this.key("subjectUniqueID").implicit(2).bitstr().optional(), this.key("extensions").explicit(3).seqof(d).optional()); }), v = u.define("X509Certificate", function() { this.seq().obj(this.key("tbsCertificate").use(s), this.key("signatureAlgorithm").use(b), this.key("signatureValue").bitstr()); }); x.exports = v; }, { "asn1.js": 167 }], 458: [function(e, x, _) { var u = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, m = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, g = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, b = e("evp_bytestokey"), w = e("browserify-aes"), f = e("safe-buffer").Buffer; x.exports = function(y, h) { var l = y.toString(), d = l.match(u), s; if (d) { var c = "aes" + d[1], a = f.from(d[2], "hex"), r = f.from(d[3].replace(/[\r\n]/g, ""), "base64"), t = b(h, a.slice(0, 8), parseInt(d[1], 10)).key, i = [], n = w.createDecipheriv(c, t, a); i.push(n.update(r)), i.push(n.final()), s = f.concat(i); } else { var v = l.match(g); s = f.from(v[2].replace(/[\r\n]/g, ""), "base64"); } var o = l.match(m)[1]; return { tag: o, data: s }; }; }, { "browserify-aes": 188, evp_bytestokey: 368, "safe-buffer": 494 }], 459: [function(e, x, _) { function u(d) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(v) { return typeof v; } : u = function(v) { return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v; }, u(d); } var m = e("./asn1"), g = e("./aesid.json"), b = e("./fixProc"), w = e("browserify-aes"), f = e("pbkdf2"), y = e("safe-buffer").Buffer; x.exports = h; function h(d) { var s; u(d) === "object" && !y.isBuffer(d) && (s = d.passphrase, d = d.key), typeof d == "string" && (d = y.from(d)); var v = b(d, s), c = v.tag, a = v.data, r, t; switch (c) { case "CERTIFICATE": t = m.certificate.decode(a, "der").tbsCertificate.subjectPublicKeyInfo; case "PUBLIC KEY": switch (t || (t = m.PublicKey.decode(a, "der")), r = t.algorithm.algorithm.join("."), r) { case "1.2.840.113549.1.1.1": return m.RSAPublicKey.decode(t.subjectPublicKey.data, "der"); case "1.2.840.10045.2.1": return t.subjectPrivateKey = t.subjectPublicKey, { type: "ec", data: t }; case "1.2.840.10040.4.1": return t.algorithm.params.pub_key = m.DSAparam.decode(t.subjectPublicKey.data, "der"), { type: "dsa", data: t.algorithm.params }; default: throw new Error("unknown key id " + r); } case "ENCRYPTED PRIVATE KEY": a = m.EncryptedPrivateKey.decode(a, "der"), a = l(a, s); case "PRIVATE KEY": switch (t = m.PrivateKey.decode(a, "der"), r = t.algorithm.algorithm.join("."), r) { case "1.2.840.113549.1.1.1": return m.RSAPrivateKey.decode(t.subjectPrivateKey, "der"); case "1.2.840.10045.2.1": return { curve: t.algorithm.curve, privateKey: m.ECPrivateKey.decode(t.subjectPrivateKey, "der").privateKey }; case "1.2.840.10040.4.1": return t.algorithm.params.priv_key = m.DSAparam.decode(t.subjectPrivateKey, "der"), { type: "dsa", params: t.algorithm.params }; default: throw new Error("unknown key id " + r); } case "RSA PUBLIC KEY": return m.RSAPublicKey.decode(a, "der"); case "RSA PRIVATE KEY": return m.RSAPrivateKey.decode(a, "der"); case "DSA PRIVATE KEY": return { type: "dsa", params: m.DSAPrivateKey.decode(a, "der") }; case "EC PRIVATE KEY": return a = m.ECPrivateKey.decode(a, "der"), { curve: a.parameters.value, privateKey: a.privateKey }; default: throw new Error("unknown key type " + c); } } h.signature = m.signature; function l(d, s) { var v = d.algorithm.decrypt.kde.kdeparams.salt, c = parseInt(d.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), a = g[d.algorithm.decrypt.cipher.algo.join(".")], r = d.algorithm.decrypt.cipher.iv, t = d.subjectPrivateKey, i = parseInt(a.split("-")[1], 10) / 8, n = f.pbkdf2Sync(s, v, c, i, "sha1"), o = w.createDecipheriv(a, n, r), p = []; return p.push(o.update(t)), p.push(o.final()), y.concat(p); } }, { "./aesid.json": 455, "./asn1": 456, "./fixProc": 458, "browserify-aes": 188, pbkdf2: 460, "safe-buffer": 494 }], 460: [function(e, x, _) { _.pbkdf2 = e("./lib/async"), _.pbkdf2Sync = e("./lib/sync"); }, { "./lib/async": 461, "./lib/sync": 464 }], 461: [function(e, x, _) { (function(u, m) { var g = e("safe-buffer").Buffer, b = e("./precondition"), w = e("./default-encoding"), f = e("./sync"), y = e("./to-buffer"), h, l = m.crypto && m.crypto.subtle, d = { sha: "SHA-1", "sha-1": "SHA-1", sha1: "SHA-1", sha256: "SHA-256", "sha-256": "SHA-256", sha384: "SHA-384", "sha-384": "SHA-384", "sha-512": "SHA-512", sha512: "SHA-512" }, s = []; function v(r) { if (m.process && !m.process.browser || !l || !l.importKey || !l.deriveBits) return Promise.resolve(!1); if (s[r] !== void 0) return s[r]; h = h || g.alloc(8); var t = c(h, h, 10, 128, r).then(function() { return !0; }).catch(function() { return !1; }); return s[r] = t, t; } function c(r, t, i, n, o) { return l.importKey("raw", r, { name: "PBKDF2" }, !1, ["deriveBits"]).then(function(p) { return l.deriveBits({ name: "PBKDF2", salt: t, iterations: i, hash: { name: o } }, p, n << 3); }).then(function(p) { return g.from(p); }); } function a(r, t) { r.then(function(i) { u.nextTick(function() { t(null, i); }); }, function(i) { u.nextTick(function() { t(i); }); }); } x.exports = function(r, t, i, n, o, p) { typeof o == "function" && (p = o, o = void 0), o = o || "sha1"; var O = d[o.toLowerCase()]; if (!O || typeof m.Promise != "function") return u.nextTick(function() { var P; try { P = f(r, t, i, n, o); } catch (F) { return p(F); } p(null, P); }); if (b(i, n), r = y(r, w, "Password"), t = y(t, w, "Salt"), typeof p != "function") throw new Error("No callback provided to pbkdf2"); a(v(O).then(function(P) { return P ? c(r, t, i, n, O) : f(r, t, i, n, o); }), p); }; }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { "./default-encoding": 462, "./precondition": 463, "./sync": 464, "./to-buffer": 465, _process: 467, "safe-buffer": 494 }], 462: [function(e, x, _) { (function(u) { var m; if (u.browser) m = "utf-8"; else if (u.version) { var g = parseInt(u.version.split(".")[0].slice(1), 10); m = g >= 6 ? "utf-8" : "binary"; } else m = "utf-8"; x.exports = m; }).call(this, e("_process")); }, { _process: 467 }], 463: [function(e, x, _) { var u = Math.pow(2, 30) - 1; x.exports = function(m, g) { if (typeof m != "number") throw new TypeError("Iterations not a number"); if (m < 0) throw new TypeError("Bad iterations"); if (typeof g != "number") throw new TypeError("Key length not a number"); if (g < 0 || g > u || g !== g) throw new TypeError("Bad key length"); }; }, {}], 464: [function(e, x, _) { var u = e("create-hash/md5"), m = e("ripemd160"), g = e("sha.js"), b = e("safe-buffer").Buffer, w = e("./precondition"), f = e("./default-encoding"), y = e("./to-buffer"), h = b.alloc(128), l = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, rmd160: 20, ripemd160: 20 }; function d(c, a, r) { var t = s(c), i = c === "sha512" || c === "sha384" ? 128 : 64; a.length > i ? a = t(a) : a.length < i && (a = b.concat([a, h], i)); for (var n = b.allocUnsafe(i + l[c]), o = b.allocUnsafe(i + l[c]), p = 0; p < i; p++) n[p] = a[p] ^ 54, o[p] = a[p] ^ 92; var O = b.allocUnsafe(i + r + 4); n.copy(O, 0, 0, i), this.ipad1 = O, this.ipad2 = n, this.opad = o, this.alg = c, this.blocksize = i, this.hash = t, this.size = l[c]; } d.prototype.run = function(c, a) { c.copy(a, this.blocksize); var r = this.hash(a); return r.copy(this.opad, this.blocksize), this.hash(this.opad); }; function s(c) { function a(t) { return g(c).update(t).digest(); } function r(t) { return new m().update(t).digest(); } return c === "rmd160" || c === "ripemd160" ? r : c === "md5" ? u : a; } function v(c, a, r, t, i) { w(r, t), c = y(c, f, "Password"), a = y(a, f, "Salt"), i = i || "sha1"; var n = new d(i, c, a.length), o = b.allocUnsafe(t), p = b.allocUnsafe(a.length + 4); a.copy(p, 0, 0, a.length); for (var O = 0, P = l[i], F = Math.ceil(t / P), z = 1; z <= F; z++) { p.writeUInt32BE(z, a.length); for (var N = n.run(p, n.ipad1), M = N, I = 1; I < r; I++) { M = n.run(M, n.ipad2); for (var R = 0; R < P; R++) N[R] ^= M[R]; } N.copy(o, O), O += P; } return o; } x.exports = v; }, { "./default-encoding": 462, "./precondition": 463, "./to-buffer": 465, "create-hash/md5": 332, ripemd160: 493, "safe-buffer": 494, "sha.js": 499 }], 465: [function(e, x, _) { var u = e("safe-buffer").Buffer; x.exports = function(m, g, b) { if (u.isBuffer(m)) return m; if (typeof m == "string") return u.from(m, g); if (ArrayBuffer.isView(m)) return u.from(m.buffer); throw new TypeError(b + " must be a string, a Buffer, a typed array or a DataView"); }; }, { "safe-buffer": 494 }], 466: [function(e, x, _) { (function(u) { typeof u == "undefined" || !u.version || u.version.indexOf("v0.") === 0 || u.version.indexOf("v1.") === 0 && u.version.indexOf("v1.8.") !== 0 ? x.exports = { nextTick: m } : x.exports = u; function m(g, b, w, f) { if (typeof g != "function") throw new TypeError('"callback" argument must be a function'); var y = arguments.length, h, l; switch (y) { case 0: case 1: return u.nextTick(g); case 2: return u.nextTick(function() { g.call(null, b); }); case 3: return u.nextTick(function() { g.call(null, b, w); }); case 4: return u.nextTick(function() { g.call(null, b, w, f); }); default: for (h = new Array(y - 1), l = 0; l < h.length; ) h[l++] = arguments[l]; return u.nextTick(function() { g.apply(null, h); }); } } }).call(this, e("_process")); }, { _process: 467 }], 467: [function(e, x, _) { var u = x.exports = {}, m, g; function b() { throw new Error("setTimeout has not been defined"); } function w() { throw new Error("clearTimeout has not been defined"); } (function() { try { typeof setTimeout == "function" ? m = setTimeout : m = b; } catch (t) { m = b; } try { typeof clearTimeout == "function" ? g = clearTimeout : g = w; } catch (t) { g = w; } })(); function f(t) { if (m === setTimeout) return setTimeout(t, 0); if ((m === b || !m) && setTimeout) return m = setTimeout, setTimeout(t, 0); try { return m(t, 0); } catch (i) { try { return m.call(null, t, 0); } catch (n) { return m.call(this, t, 0); } } } function y(t) { if (g === clearTimeout) return clearTimeout(t); if ((g === w || !g) && clearTimeout) return g = clearTimeout, clearTimeout(t); try { return g(t); } catch (i) { try { return g.call(null, t); } catch (n) { return g.call(this, t); } } } var h = [], l = !1, d, s = -1; function v() { !l || !d || (l = !1, d.length ? h = d.concat(h) : s = -1, h.length && c()); } function c() { if (!l) { var t = f(v); l = !0; for (var i = h.length; i; ) { for (d = h, h = []; ++s < i; ) d && d[s].run(); s = -1, i = h.length; } d = null, l = !1, y(t); } } u.nextTick = function(t) { var i = new Array(arguments.length - 1); if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) i[n - 1] = arguments[n]; h.push(new a(t, i)), h.length === 1 && !l && f(c); }; function a(t, i) { this.fun = t, this.array = i; } a.prototype.run = function() { this.fun.apply(null, this.array); }, u.title = "browser", u.browser = !0, u.env = {}, u.argv = [], u.version = "", u.versions = {}; function r() { } u.on = r, u.addListener = r, u.once = r, u.off = r, u.removeListener = r, u.removeAllListeners = r, u.emit = r, u.prependListener = r, u.prependOnceListener = r, u.listeners = function(t) { return []; }, u.binding = function(t) { throw new Error("process.binding is not supported"); }, u.cwd = function() { return "/"; }, u.chdir = function(t) { throw new Error("process.chdir is not supported"); }, u.umask = function() { return 0; }; }, {}], 468: [function(e, x, _) { _.publicEncrypt = e("./publicEncrypt"), _.privateDecrypt = e("./privateDecrypt"), _.privateEncrypt = function(m, g) { return _.publicEncrypt(m, g, !0); }, _.publicDecrypt = function(m, g) { return _.privateDecrypt(m, g, !0); }; }, { "./privateDecrypt": 471, "./publicEncrypt": 472 }], 469: [function(e, x, _) { var u = e("create-hash"), m = e("safe-buffer").Buffer; x.exports = function(b, w) { for (var f = m.alloc(0), y = 0, h; f.length < w; ) h = g(y++), f = m.concat([f, u("sha1").update(b).update(h).digest()]); return f.slice(0, w); }; function g(b) { var w = m.allocUnsafe(4); return w.writeUInt32BE(b, 0), w; } }, { "create-hash": 331, "safe-buffer": 494 }], 470: [function(e, x, _) { arguments[4][181][0].apply(_, arguments); }, { buffer: 185, dup: 181 }], 471: [function(e, x, _) { var u = e("parse-asn1"), m = e("./mgf"), g = e("./xor"), b = e("bn.js"), w = e("browserify-rsa"), f = e("create-hash"), y = e("./withPublic"), h = e("safe-buffer").Buffer; x.exports = function(c, a, r) { var t; c.padding ? t = c.padding : r ? t = 1 : t = 4; var i = u(c), n = i.modulus.byteLength(); if (a.length > n || new b(a).cmp(i.modulus) >= 0) throw new Error("decryption error"); var o; r ? o = y(new b(a), i) : o = w(a, i); var p = h.alloc(n - o.length); if (o = h.concat([p, o], n), t === 4) return l(i, o); if (t === 1) return d(i, o, r); if (t === 3) return o; throw new Error("unknown padding"); }; function l(v, c) { var a = v.modulus.byteLength(), r = f("sha1").update(h.alloc(0)).digest(), t = r.length; if (c[0] !== 0) throw new Error("decryption error"); var i = c.slice(1, t + 1), n = c.slice(t + 1), o = g(i, m(n, t)), p = g(n, m(o, a - t - 1)); if (s(r, p.slice(0, t))) throw new Error("decryption error"); for (var O = t; p[O] === 0; ) O++; if (p[O++] !== 1) throw new Error("decryption error"); return p.slice(O); } function d(v, c, a) { for (var r = c.slice(0, 2), t = 2, i = 0; c[t++] !== 0; ) if (t >= c.length) { i++; break; } var n = c.slice(2, t - 1); if ((r.toString("hex") !== "0002" && !a || r.toString("hex") !== "0001" && a) && i++, n.length < 8 && i++, i) throw new Error("decryption error"); return c.slice(t); } function s(v, c) { v = h.from(v), c = h.from(c); var a = 0, r = v.length; v.length !== c.length && (a++, r = Math.min(v.length, c.length)); for (var t = -1; ++t < r; ) a += v[t] ^ c[t]; return a; } }, { "./mgf": 469, "./withPublic": 473, "./xor": 474, "bn.js": 470, "browserify-rsa": 206, "create-hash": 331, "parse-asn1": 459, "safe-buffer": 494 }], 472: [function(e, x, _) { var u = e("parse-asn1"), m = e("randombytes"), g = e("create-hash"), b = e("./mgf"), w = e("./xor"), f = e("bn.js"), y = e("./withPublic"), h = e("browserify-rsa"), l = e("safe-buffer").Buffer; x.exports = function(a, r, t) { var i; a.padding ? i = a.padding : t ? i = 1 : i = 4; var n = u(a), o; if (i === 4) o = d(n, r); else if (i === 1) o = s(n, r, t); else if (i === 3) { if (o = new f(r), o.cmp(n.modulus) >= 0) throw new Error("data too long for modulus"); } else throw new Error("unknown padding"); return t ? h(o, n) : y(o, n); }; function d(c, a) { var r = c.modulus.byteLength(), t = a.length, i = g("sha1").update(l.alloc(0)).digest(), n = i.length, o = 2 * n; if (t > r - o - 2) throw new Error("message too long"); var p = l.alloc(r - t - o - 2), O = r - n - 1, P = m(n), F = w(l.concat([i, p, l.alloc(1, 1), a], O), b(P, O)), z = w(P, b(F, n)); return new f(l.concat([l.alloc(1), z, F], r)); } function s(c, a, r) { var t = a.length, i = c.modulus.byteLength(); if (t > i - 11) throw new Error("message too long"); var n; return r ? n = l.alloc(i - t - 3, 255) : n = v(i - t - 3), new f(l.concat([l.from([0, r ? 1 : 2]), n, l.alloc(1), a], i)); } function v(c) { for (var a = l.allocUnsafe(c), r = 0, t = m(c * 2), i = 0, n; r < c; ) i === t.length && (t = m(c * 2), i = 0), n = t[i++], n && (a[r++] = n); return a; } }, { "./mgf": 469, "./withPublic": 473, "./xor": 474, "bn.js": 470, "browserify-rsa": 206, "create-hash": 331, "parse-asn1": 459, randombytes: 475, "safe-buffer": 494 }], 473: [function(e, x, _) { var u = e("bn.js"), m = e("safe-buffer").Buffer; function g(b, w) { return m.from(b.toRed(u.mont(w.modulus)).redPow(new u(w.publicExponent)).fromRed().toArray()); } x.exports = g; }, { "bn.js": 470, "safe-buffer": 494 }], 474: [function(e, x, _) { x.exports = function(m, g) { for (var b = m.length, w = -1; ++w < b; ) m[w] ^= g[w]; return m; }; }, {}], 475: [function(e, x, _) { (function(u, m) { var g = 65536, b = 4294967295; function w() { throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`); } var f = e("safe-buffer").Buffer, y = m.crypto || m.msCrypto; y && y.getRandomValues ? x.exports = h : x.exports = w; function h(l, d) { if (l > b) throw new RangeError("requested too many random bytes"); var s = f.allocUnsafe(l); if (l > 0) if (l > g) for (var v = 0; v < l; v += g) y.getRandomValues(s.slice(v, v + g)); else y.getRandomValues(s); return typeof d == "function" ? u.nextTick(function() { d(null, s); }) : s; } }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { _process: 467, "safe-buffer": 494 }], 476: [function(e, x, _) { (function(u, m) { function g() { throw new Error(`secure random number generation not supported by this browser use chrome, FireFox or Internet Explorer 11`); } var b = e("safe-buffer"), w = e("randombytes"), f = b.Buffer, y = b.kMaxLength, h = m.crypto || m.msCrypto, l = Math.pow(2, 32) - 1; function d(r, t) { if (typeof r != "number" || r !== r) throw new TypeError("offset must be a number"); if (r > l || r < 0) throw new TypeError("offset must be a uint32"); if (r > y || r > t) throw new RangeError("offset out of range"); } function s(r, t, i) { if (typeof r != "number" || r !== r) throw new TypeError("size must be a number"); if (r > l || r < 0) throw new TypeError("size must be a uint32"); if (r + t > i || r > y) throw new RangeError("buffer too small"); } h && h.getRandomValues || !u.browser ? (_.randomFill = v, _.randomFillSync = a) : (_.randomFill = g, _.randomFillSync = g); function v(r, t, i, n) { if (!f.isBuffer(r) && !(r instanceof m.Uint8Array)) throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); if (typeof t == "function") n = t, t = 0, i = r.length; else if (typeof i == "function") n = i, i = r.length - t; else if (typeof n != "function") throw new TypeError('"cb" argument must be a function'); return d(t, r.length), s(i, t, r.length), c(r, t, i, n); } function c(r, t, i, n) { if (u.browser) { var o = r.buffer, p = new Uint8Array(o, t, i); if (h.getRandomValues(p), n) { u.nextTick(function() { n(null, r); }); return; } return r; } if (n) { w(i, function(P, F) { if (P) return n(P); F.copy(r, t), n(null, r); }); return; } var O = w(i); return O.copy(r, t), r; } function a(r, t, i) { if (typeof t == "undefined" && (t = 0), !f.isBuffer(r) && !(r instanceof m.Uint8Array)) throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); return d(t, r.length), i === void 0 && (i = r.length - t), s(i, t, r.length), c(r, t, i); } }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { _process: 467, randombytes: 475, "safe-buffer": 494 }], 477: [function(e, x, _) { function u(l) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(s) { return typeof s; } : u = function(s) { return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s; }, u(l); } function m(l, d) { l.prototype = Object.create(d.prototype), l.prototype.constructor = l, l.__proto__ = d; } var g = {}; function b(l, d, s) { s || (s = Error); function v(a, r, t) { return typeof d == "string" ? d : d(a, r, t); } var c = /* @__PURE__ */ function(a) { m(r, a); function r(t, i, n) { return a.call(this, v(t, i, n)) || this; } return r; }(s); c.prototype.name = s.name, c.prototype.code = l, g[l] = c; } function w(l, d) { if (Array.isArray(l)) { var s = l.length; return l = l.map(function(v) { return String(v); }), s > 2 ? "one of ".concat(d, " ").concat(l.slice(0, s - 1).join(", "), ", or ") + l[s - 1] : s === 2 ? "one of ".concat(d, " ").concat(l[0], " or ").concat(l[1]) : "of ".concat(d, " ").concat(l[0]); } else return "of ".concat(d, " ").concat(String(l)); } function f(l, d, s) { return l.substr(!s || s < 0 ? 0 : +s, d.length) === d; } function y(l, d, s) { return (s === void 0 || s > l.length) && (s = l.length), l.substring(s - d.length, s) === d; } function h(l, d, s) { return typeof s != "number" && (s = 0), s + d.length > l.length ? !1 : l.indexOf(d, s) !== -1; } b("ERR_INVALID_OPT_VALUE", function(l, d) { return 'The value "' + d + '" is invalid for option "' + l + '"'; }, TypeError), b("ERR_INVALID_ARG_TYPE", function(l, d, s) { var v; typeof d == "string" && f(d, "not ") ? (v = "must not be", d = d.replace(/^not /, "")) : v = "must be"; var c; if (y(l, " argument")) c = "The ".concat(l, " ").concat(v, " ").concat(w(d, "type")); else { var a = h(l, ".") ? "property" : "argument"; c = 'The "'.concat(l, '" ').concat(a, " ").concat(v, " ").concat(w(d, "type")); } return c += ". Received type ".concat(u(s)), c; }, TypeError), b("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), b("ERR_METHOD_NOT_IMPLEMENTED", function(l) { return "The " + l + " method is not implemented"; }), b("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), b("ERR_STREAM_DESTROYED", function(l) { return "Cannot call " + l + " after a stream was destroyed"; }), b("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), b("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), b("ERR_STREAM_WRITE_AFTER_END", "write after end"), b("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), b("ERR_UNKNOWN_ENCODING", function(l) { return "Unknown encoding: " + l; }, TypeError), b("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), x.exports.codes = g; }, {}], 478: [function(e, x, _) { (function(u) { var m = Object.keys || function(s) { var v = []; for (var c in s) v.push(c); return v; }; x.exports = h; var g = e("./_stream_readable"), b = e("./_stream_writable"); e("inherits")(h, g); for (var w = m(b.prototype), f = 0; f < w.length; f++) { var y = w[f]; h.prototype[y] || (h.prototype[y] = b.prototype[y]); } function h(s) { if (!(this instanceof h)) return new h(s); g.call(this, s), b.call(this, s), this.allowHalfOpen = !0, s && (s.readable === !1 && (this.readable = !1), s.writable === !1 && (this.writable = !1), s.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", l))); } Object.defineProperty(h.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.highWaterMark; } }), Object.defineProperty(h.prototype, "writableBuffer", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer(); } }), Object.defineProperty(h.prototype, "writableLength", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.length; } }); function l() { this._writableState.ended || u.nextTick(d, this); } function d(s) { s.end(); } Object.defineProperty(h.prototype, "destroyed", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed; }, set: function(v) { this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = v, this._writableState.destroyed = v); } }); }).call(this, e("_process")); }, { "./_stream_readable": 480, "./_stream_writable": 482, _process: 467, inherits: 387 }], 479: [function(e, x, _) { x.exports = m; var u = e("./_stream_transform"); e("inherits")(m, u); function m(g) { if (!(this instanceof m)) return new m(g); u.call(this, g); } m.prototype._transform = function(g, b, w) { w(null, g); }; }, { "./_stream_transform": 481, inherits: 387 }], 480: [function(e, x, _) { (function(u, m) { x.exports = R; var g; R.ReadableState = I, e("events").EventEmitter; var b = function(se, Ce) { return se.listeners(Ce).length; }, w = e("./internal/streams/stream"), f = e("buffer").Buffer, y = m.Uint8Array || function() { }; function h(ne) { return f.from(ne); } function l(ne) { return f.isBuffer(ne) || ne instanceof y; } var d = e("util"), s; d && d.debuglog ? s = d.debuglog("stream") : s = function() { }; var v = e("./internal/streams/buffer_list"), c = e("./internal/streams/destroy"), a = e("./internal/streams/state"), r = a.getHighWaterMark, t = e("../errors").codes, i = t.ERR_INVALID_ARG_TYPE, n = t.ERR_STREAM_PUSH_AFTER_EOF, o = t.ERR_METHOD_NOT_IMPLEMENTED, p = t.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, O, P, F; e("inherits")(R, w); var z = c.errorOrDestroy, N = ["error", "close", "destroy", "pause", "resume"]; function M(ne, se, Ce) { if (typeof ne.prependListener == "function") return ne.prependListener(se, Ce); !ne._events || !ne._events[se] ? ne.on(se, Ce) : Array.isArray(ne._events[se]) ? ne._events[se].unshift(Ce) : ne._events[se] = [Ce, ne._events[se]]; } function I(ne, se, Ce) { g = g || e("./_stream_duplex"), ne = ne || {}, typeof Ce != "boolean" && (Ce = se instanceof g), this.objectMode = !!ne.objectMode, Ce && (this.objectMode = this.objectMode || !!ne.readableObjectMode), this.highWaterMark = r(this, ne, "readableHighWaterMark", Ce), this.buffer = new v(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = ne.emitClose !== !1, this.autoDestroy = !!ne.autoDestroy, this.destroyed = !1, this.defaultEncoding = ne.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, ne.encoding && (O || (O = e("string_decoder/").StringDecoder), this.decoder = new O(ne.encoding), this.encoding = ne.encoding); } function R(ne) { if (g = g || e("./_stream_duplex"), !(this instanceof R)) return new R(ne); var se = this instanceof g; this._readableState = new I(ne, this, se), this.readable = !0, ne && (typeof ne.read == "function" && (this._read = ne.read), typeof ne.destroy == "function" && (this._destroy = ne.destroy)), w.call(this); } Object.defineProperty(R.prototype, "destroyed", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState === void 0 ? !1 : this._readableState.destroyed; }, set: function(se) { this._readableState && (this._readableState.destroyed = se); } }), R.prototype.destroy = c.destroy, R.prototype._undestroy = c.undestroy, R.prototype._destroy = function(ne, se) { se(ne); }, R.prototype.push = function(ne, se) { var Ce = this._readableState, q; return Ce.objectMode ? q = !0 : typeof ne == "string" && (se = se || Ce.defaultEncoding, se !== Ce.encoding && (ne = f.from(ne, se), se = ""), q = !0), C(this, ne, se, !1, q); }, R.prototype.unshift = function(ne) { return C(this, ne, null, !0, !1); }; function C(ne, se, Ce, q, G) { s("readableAddChunk", se); var Y = ne._readableState; if (se === null) Y.reading = !1, U(ne, Y); else { var fe; if (G || (fe = A(Y, se)), fe) z(ne, fe); else if (Y.objectMode || se && se.length > 0) if (typeof se != "string" && !Y.objectMode && Object.getPrototypeOf(se) !== f.prototype && (se = h(se)), q) Y.endEmitted ? z(ne, new p()) : E(ne, Y, se, !0); else if (Y.ended) z(ne, new n()); else { if (Y.destroyed) return !1; Y.reading = !1, Y.decoder && !Ce ? (se = Y.decoder.write(se), Y.objectMode || se.length !== 0 ? E(ne, Y, se, !1) : j(ne, Y)) : E(ne, Y, se, !1); } else q || (Y.reading = !1, j(ne, Y)); } return !Y.ended && (Y.length < Y.highWaterMark || Y.length === 0); } function E(ne, se, Ce, q) { se.flowing && se.length === 0 && !se.sync ? (se.awaitDrain = 0, ne.emit("data", Ce)) : (se.length += se.objectMode ? 1 : Ce.length, q ? se.buffer.unshift(Ce) : se.buffer.push(Ce), se.needReadable && D(ne)), j(ne, se); } function A(ne, se) { var Ce; return !l(se) && typeof se != "string" && se !== void 0 && !ne.objectMode && (Ce = new i("chunk", ["string", "Buffer", "Uint8Array"], se)), Ce; } R.prototype.isPaused = function() { return this._readableState.flowing === !1; }, R.prototype.setEncoding = function(ne) { O || (O = e("string_decoder/").StringDecoder); var se = new O(ne); this._readableState.decoder = se, this._readableState.encoding = this._readableState.decoder.encoding; for (var Ce = this._readableState.buffer.head, q = ""; Ce !== null; ) q += se.write(Ce.data), Ce = Ce.next; return this._readableState.buffer.clear(), q !== "" && this._readableState.buffer.push(q), this._readableState.length = q.length, this; }; var L = 1073741824; function $(ne) { return ne >= L ? ne = L : (ne--, ne |= ne >>> 1, ne |= ne >>> 2, ne |= ne >>> 4, ne |= ne >>> 8, ne |= ne >>> 16, ne++), ne; } function W(ne, se) { return ne <= 0 || se.length === 0 && se.ended ? 0 : se.objectMode ? 1 : ne !== ne ? se.flowing && se.length ? se.buffer.head.data.length : se.length : (ne > se.highWaterMark && (se.highWaterMark = $(ne)), ne <= se.length ? ne : se.ended ? se.length : (se.needReadable = !0, 0)); } R.prototype.read = function(ne) { s("read", ne), ne = parseInt(ne, 10); var se = this._readableState, Ce = ne; if (ne !== 0 && (se.emittedReadable = !1), ne === 0 && se.needReadable && ((se.highWaterMark !== 0 ? se.length >= se.highWaterMark : se.length > 0) || se.ended)) return s("read: emitReadable", se.length, se.ended), se.length === 0 && se.ended ? Q(this) : D(this), null; if (ne = W(ne, se), ne === 0 && se.ended) return se.length === 0 && Q(this), null; var q = se.needReadable; s("need readable", q), (se.length === 0 || se.length - ne < se.highWaterMark) && (q = !0, s("length less than watermark", q)), se.ended || se.reading ? (q = !1, s("reading or ended", q)) : q && (s("do read"), se.reading = !0, se.sync = !0, se.length === 0 && (se.needReadable = !0), this._read(se.highWaterMark), se.sync = !1, se.reading || (ne = W(Ce, se))); var G; return ne > 0 ? G = J(ne, se) : G = null, G === null ? (se.needReadable = se.length <= se.highWaterMark, ne = 0) : (se.length -= ne, se.awaitDrain = 0), se.length === 0 && (se.ended || (se.needReadable = !0), Ce !== ne && se.ended && Q(this)), G !== null && this.emit("data", G), G; }; function U(ne, se) { if (s("onEofChunk"), !se.ended) { if (se.decoder) { var Ce = se.decoder.end(); Ce && Ce.length && (se.buffer.push(Ce), se.length += se.objectMode ? 1 : Ce.length); } se.ended = !0, se.sync ? D(ne) : (se.needReadable = !1, se.emittedReadable || (se.emittedReadable = !0, B(ne))); } } function D(ne) { var se = ne._readableState; s("emitReadable", se.needReadable, se.emittedReadable), se.needReadable = !1, se.emittedReadable || (s("emitReadable", se.flowing), se.emittedReadable = !0, u.nextTick(B, ne)); } function B(ne) { var se = ne._readableState; s("emitReadable_", se.destroyed, se.length, se.ended), !se.destroyed && (se.length || se.ended) && (ne.emit("readable"), se.emittedReadable = !1), se.needReadable = !se.flowing && !se.ended && se.length <= se.highWaterMark, oe(ne); } function j(ne, se) { se.readingMore || (se.readingMore = !0, u.nextTick(V, ne, se)); } function V(ne, se) { for (; !se.reading && !se.ended && (se.length < se.highWaterMark || se.flowing && se.length === 0); ) { var Ce = se.length; if (s("maybeReadMore read 0"), ne.read(0), Ce === se.length) break; } se.readingMore = !1; } R.prototype._read = function(ne) { z(this, new o("_read()")); }, R.prototype.pipe = function(ne, se) { var Ce = this, q = this._readableState; switch (q.pipesCount) { case 0: q.pipes = ne; break; case 1: q.pipes = [q.pipes, ne]; break; default: q.pipes.push(ne); break; } q.pipesCount += 1, s("pipe count=%d opts=%j", q.pipesCount, se); var G = (!se || se.end !== !1) && ne !== u.stdout && ne !== u.stderr, Y = G ? we : Ve; q.endEmitted ? u.nextTick(Y) : Ce.once("end", Y), ne.on("unpipe", fe); function fe(Qe, tt) { s("onunpipe"), Qe === Ce && tt && tt.hasUnpiped === !1 && (tt.hasUnpiped = !0, Ye()); } function we() { s("onend"), ne.end(); } var _e = re(Ce); ne.on("drain", _e); var je = !1; function Ye() { s("cleanup"), ne.removeListener("close", ot), ne.removeListener("finish", Ue), ne.removeListener("drain", _e), ne.removeListener("error", ut), ne.removeListener("unpipe", fe), Ce.removeListener("end", we), Ce.removeListener("end", Ve), Ce.removeListener("data", nt), je = !0, q.awaitDrain && (!ne._writableState || ne._writableState.needDrain) && _e(); } Ce.on("data", nt); function nt(Qe) { s("ondata"); var tt = ne.write(Qe); s("dest.write", tt), tt === !1 && ((q.pipesCount === 1 && q.pipes === ne || q.pipesCount > 1 && ke(q.pipes, ne) !== -1) && !je && (s("false write response, pause", q.awaitDrain), q.awaitDrain++), Ce.pause()); } function ut(Qe) { s("onerror", Qe), Ve(), ne.removeListener("error", ut), b(ne, "error") === 0 && z(ne, Qe); } M(ne, "error", ut); function ot() { ne.removeListener("finish", Ue), Ve(); } ne.once("close", ot); function Ue() { s("onfinish"), ne.removeListener("close", ot), Ve(); } ne.once("finish", Ue); function Ve() { s("unpipe"), Ce.unpipe(ne); } return ne.emit("pipe", Ce), q.flowing || (s("pipe resume"), Ce.resume()), ne; }; function re(ne) { return function() { var Ce = ne._readableState; s("pipeOnDrain", Ce.awaitDrain), Ce.awaitDrain && Ce.awaitDrain--, Ce.awaitDrain === 0 && b(ne, "data") && (Ce.flowing = !0, oe(ne)); }; } R.prototype.unpipe = function(ne) { var se = this._readableState, Ce = { hasUnpiped: !1 }; if (se.pipesCount === 0) return this; if (se.pipesCount === 1) return ne && ne !== se.pipes ? this : (ne || (ne = se.pipes), se.pipes = null, se.pipesCount = 0, se.flowing = !1, ne && ne.emit("unpipe", this, Ce), this); if (!ne) { var q = se.pipes, G = se.pipesCount; se.pipes = null, se.pipesCount = 0, se.flowing = !1; for (var Y = 0; Y < G; Y++) q[Y].emit("unpipe", this, { hasUnpiped: !1 }); return this; } var fe = ke(se.pipes, ne); return fe === -1 ? this : (se.pipes.splice(fe, 1), se.pipesCount -= 1, se.pipesCount === 1 && (se.pipes = se.pipes[0]), ne.emit("unpipe", this, Ce), this); }, R.prototype.on = function(ne, se) { var Ce = w.prototype.on.call(this, ne, se), q = this._readableState; return ne === "data" ? (q.readableListening = this.listenerCount("readable") > 0, q.flowing !== !1 && this.resume()) : ne === "readable" && !q.endEmitted && !q.readableListening && (q.readableListening = q.needReadable = !0, q.flowing = !1, q.emittedReadable = !1, s("on readable", q.length, q.reading), q.length ? D(this) : q.reading || u.nextTick(ce, this)), Ce; }, R.prototype.addListener = R.prototype.on, R.prototype.removeListener = function(ne, se) { var Ce = w.prototype.removeListener.call(this, ne, se); return ne === "readable" && u.nextTick(ee, this), Ce; }, R.prototype.removeAllListeners = function(ne) { var se = w.prototype.removeAllListeners.apply(this, arguments); return (ne === "readable" || ne === void 0) && u.nextTick(ee, this), se; }; function ee(ne) { var se = ne._readableState; se.readableListening = ne.listenerCount("readable") > 0, se.resumeScheduled && !se.paused ? se.flowing = !0 : ne.listenerCount("data") > 0 && ne.resume(); } function ce(ne) { s("readable nexttick read 0"), ne.read(0); } R.prototype.resume = function() { var ne = this._readableState; return ne.flowing || (s("resume"), ne.flowing = !ne.readableListening, ve(this, ne)), ne.paused = !1, this; }; function ve(ne, se) { se.resumeScheduled || (se.resumeScheduled = !0, u.nextTick(ge, ne, se)); } function ge(ne, se) { s("resume", se.reading), se.reading || ne.read(0), se.resumeScheduled = !1, ne.emit("resume"), oe(ne), se.flowing && !se.reading && ne.read(0); } R.prototype.pause = function() { return s("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (s("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this; }; function oe(ne) { var se = ne._readableState; for (s("flow", se.flowing); se.flowing && ne.read() !== null; ) ; } R.prototype.wrap = function(ne) { var se = this, Ce = this._readableState, q = !1; ne.on("end", function() { if (s("wrapped end"), Ce.decoder && !Ce.ended) { var fe = Ce.decoder.end(); fe && fe.length && se.push(fe); } se.push(null); }), ne.on("data", function(fe) { if (s("wrapped data"), Ce.decoder && (fe = Ce.decoder.write(fe)), !(Ce.objectMode && fe == null) && !(!Ce.objectMode && (!fe || !fe.length))) { var we = se.push(fe); we || (q = !0, ne.pause()); } }); for (var G in ne) this[G] === void 0 && typeof ne[G] == "function" && (this[G] = function(we) { return function() { return ne[we].apply(ne, arguments); }; }(G)); for (var Y = 0; Y < N.length; Y++) ne.on(N[Y], this.emit.bind(this, N[Y])); return this._read = function(fe) { s("wrapped _read", fe), q && (q = !1, ne.resume()); }, this; }, typeof Symbol == "function" && (R.prototype[Symbol.asyncIterator] = function() { return P === void 0 && (P = e("./internal/streams/async_iterator")), P(this); }), Object.defineProperty(R.prototype, "readableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState.highWaterMark; } }), Object.defineProperty(R.prototype, "readableBuffer", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState && this._readableState.buffer; } }), Object.defineProperty(R.prototype, "readableFlowing", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState.flowing; }, set: function(se) { this._readableState && (this._readableState.flowing = se); } }), R._fromList = J, Object.defineProperty(R.prototype, "readableLength", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState.length; } }); function J(ne, se) { if (se.length === 0) return null; var Ce; return se.objectMode ? Ce = se.buffer.shift() : !ne || ne >= se.length ? (se.decoder ? Ce = se.buffer.join("") : se.buffer.length === 1 ? Ce = se.buffer.first() : Ce = se.buffer.concat(se.length), se.buffer.clear()) : Ce = se.buffer.consume(ne, se.decoder), Ce; } function Q(ne) { var se = ne._readableState; s("endReadable", se.endEmitted), se.endEmitted || (se.ended = !0, u.nextTick(he, se, ne)); } function he(ne, se) { if (s("endReadableNT", ne.endEmitted, ne.length), !ne.endEmitted && ne.length === 0 && (ne.endEmitted = !0, se.readable = !1, se.emit("end"), ne.autoDestroy)) { var Ce = se._writableState; (!Ce || Ce.autoDestroy && Ce.finished) && se.destroy(); } } typeof Symbol == "function" && (R.from = function(ne, se) { return F === void 0 && (F = e("./internal/streams/from")), F(R, ne, se); }); function ke(ne, se) { for (var Ce = 0, q = ne.length; Ce < q; Ce++) if (ne[Ce] === se) return Ce; return -1; } }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { "../errors": 477, "./_stream_duplex": 478, "./internal/streams/async_iterator": 483, "./internal/streams/buffer_list": 484, "./internal/streams/destroy": 485, "./internal/streams/from": 487, "./internal/streams/state": 489, "./internal/streams/stream": 490, _process: 467, buffer: 216, events: 367, inherits: 387, "string_decoder/": 520, util: 185 }], 481: [function(e, x, _) { x.exports = h; var u = e("../errors").codes, m = u.ERR_METHOD_NOT_IMPLEMENTED, g = u.ERR_MULTIPLE_CALLBACK, b = u.ERR_TRANSFORM_ALREADY_TRANSFORMING, w = u.ERR_TRANSFORM_WITH_LENGTH_0, f = e("./_stream_duplex"); e("inherits")(h, f); function y(s, v) { var c = this._transformState; c.transforming = !1; var a = c.writecb; if (a === null) return this.emit("error", new g()); c.writechunk = null, c.writecb = null, v != null && this.push(v), a(s); var r = this._readableState; r.reading = !1, (r.needReadable || r.length < r.highWaterMark) && this._read(r.highWaterMark); } function h(s) { if (!(this instanceof h)) return new h(s); f.call(this, s), this._transformState = { afterTransform: y.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, s && (typeof s.transform == "function" && (this._transform = s.transform), typeof s.flush == "function" && (this._flush = s.flush)), this.on("prefinish", l); } function l() { var s = this; typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(v, c) { d(s, v, c); }) : d(this, null, null); } h.prototype.push = function(s, v) { return this._transformState.needTransform = !1, f.prototype.push.call(this, s, v); }, h.prototype._transform = function(s, v, c) { c(new m("_transform()")); }, h.prototype._write = function(s, v, c) { var a = this._transformState; if (a.writecb = c, a.writechunk = s, a.writeencoding = v, !a.transforming) { var r = this._readableState; (a.needTransform || r.needReadable || r.length < r.highWaterMark) && this._read(r.highWaterMark); } }, h.prototype._read = function(s) { var v = this._transformState; v.writechunk !== null && !v.transforming ? (v.transforming = !0, this._transform(v.writechunk, v.writeencoding, v.afterTransform)) : v.needTransform = !0; }, h.prototype._destroy = function(s, v) { f.prototype._destroy.call(this, s, function(c) { v(c); }); }; function d(s, v, c) { if (v) return s.emit("error", v); if (c != null && s.push(c), s._writableState.length) throw new w(); if (s._transformState.transforming) throw new b(); return s.push(null); } }, { "../errors": 477, "./_stream_duplex": 478, inherits: 387 }], 482: [function(e, x, _) { (function(u, m) { x.exports = I; function g(oe) { var J = this; this.next = null, this.entry = null, this.finish = function() { ge(J, oe); }; } var b; I.WritableState = N; var w = { deprecate: e("util-deprecate") }, f = e("./internal/streams/stream"), y = e("buffer").Buffer, h = m.Uint8Array || function() { }; function l(oe) { return y.from(oe); } function d(oe) { return y.isBuffer(oe) || oe instanceof h; } var s = e("./internal/streams/destroy"), v = e("./internal/streams/state"), c = v.getHighWaterMark, a = e("../errors").codes, r = a.ERR_INVALID_ARG_TYPE, t = a.ERR_METHOD_NOT_IMPLEMENTED, i = a.ERR_MULTIPLE_CALLBACK, n = a.ERR_STREAM_CANNOT_PIPE, o = a.ERR_STREAM_DESTROYED, p = a.ERR_STREAM_NULL_VALUES, O = a.ERR_STREAM_WRITE_AFTER_END, P = a.ERR_UNKNOWN_ENCODING, F = s.errorOrDestroy; e("inherits")(I, f); function z() { } function N(oe, J, Q) { b = b || e("./_stream_duplex"), oe = oe || {}, typeof Q != "boolean" && (Q = J instanceof b), this.objectMode = !!oe.objectMode, Q && (this.objectMode = this.objectMode || !!oe.writableObjectMode), this.highWaterMark = c(this, oe, "writableHighWaterMark", Q), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; var he = oe.decodeStrings === !1; this.decodeStrings = !he, this.defaultEncoding = oe.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(ke) { U(J, ke); }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = oe.emitClose !== !1, this.autoDestroy = !!oe.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new g(this); } N.prototype.getBuffer = function() { for (var J = this.bufferedRequest, Q = []; J; ) Q.push(J), J = J.next; return Q; }, function() { try { Object.defineProperty(N.prototype, "buffer", { get: w.deprecate(function() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (oe) { } }(); var M; typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (M = Function.prototype[Symbol.hasInstance], Object.defineProperty(I, Symbol.hasInstance, { value: function(J) { return M.call(this, J) ? !0 : this !== I ? !1 : J && J._writableState instanceof N; } })) : M = function(J) { return J instanceof this; }; function I(oe) { b = b || e("./_stream_duplex"); var J = this instanceof b; if (!J && !M.call(I, this)) return new I(oe); this._writableState = new N(oe, this, J), this.writable = !0, oe && (typeof oe.write == "function" && (this._write = oe.write), typeof oe.writev == "function" && (this._writev = oe.writev), typeof oe.destroy == "function" && (this._destroy = oe.destroy), typeof oe.final == "function" && (this._final = oe.final)), f.call(this); } I.prototype.pipe = function() { F(this, new n()); }; function R(oe, J) { var Q = new O(); F(oe, Q), u.nextTick(J, Q); } function C(oe, J, Q, he) { var ke; return Q === null ? ke = new p() : typeof Q != "string" && !J.objectMode && (ke = new r("chunk", ["string", "Buffer"], Q)), ke ? (F(oe, ke), u.nextTick(he, ke), !1) : !0; } I.prototype.write = function(oe, J, Q) { var he = this._writableState, ke = !1, ne = !he.objectMode && d(oe); return ne && !y.isBuffer(oe) && (oe = l(oe)), typeof J == "function" && (Q = J, J = null), ne ? J = "buffer" : J || (J = he.defaultEncoding), typeof Q != "function" && (Q = z), he.ending ? R(this, Q) : (ne || C(this, he, oe, Q)) && (he.pendingcb++, ke = A(this, he, ne, oe, J, Q)), ke; }, I.prototype.cork = function() { this._writableState.corked++; }, I.prototype.uncork = function() { var oe = this._writableState; oe.corked && (oe.corked--, !oe.writing && !oe.corked && !oe.bufferProcessing && oe.bufferedRequest && j(this, oe)); }, I.prototype.setDefaultEncoding = function(J) { if (typeof J == "string" && (J = J.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((J + "").toLowerCase()) > -1)) throw new P(J); return this._writableState.defaultEncoding = J, this; }, Object.defineProperty(I.prototype, "writableBuffer", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer(); } }); function E(oe, J, Q) { return !oe.objectMode && oe.decodeStrings !== !1 && typeof J == "string" && (J = y.from(J, Q)), J; } Object.defineProperty(I.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.highWaterMark; } }); function A(oe, J, Q, he, ke, ne) { if (!Q) { var se = E(J, he, ke); he !== se && (Q = !0, ke = "buffer", he = se); } var Ce = J.objectMode ? 1 : he.length; J.length += Ce; var q = J.length < J.highWaterMark; if (q || (J.needDrain = !0), J.writing || J.corked) { var G = J.lastBufferedRequest; J.lastBufferedRequest = { chunk: he, encoding: ke, isBuf: Q, callback: ne, next: null }, G ? G.next = J.lastBufferedRequest : J.bufferedRequest = J.lastBufferedRequest, J.bufferedRequestCount += 1; } else L(oe, J, !1, Ce, he, ke, ne); return q; } function L(oe, J, Q, he, ke, ne, se) { J.writelen = he, J.writecb = se, J.writing = !0, J.sync = !0, J.destroyed ? J.onwrite(new o("write")) : Q ? oe._writev(ke, J.onwrite) : oe._write(ke, ne, J.onwrite), J.sync = !1; } function $(oe, J, Q, he, ke) { --J.pendingcb, Q ? (u.nextTick(ke, he), u.nextTick(ce, oe, J), oe._writableState.errorEmitted = !0, F(oe, he)) : (ke(he), oe._writableState.errorEmitted = !0, F(oe, he), ce(oe, J)); } function W(oe) { oe.writing = !1, oe.writecb = null, oe.length -= oe.writelen, oe.writelen = 0; } function U(oe, J) { var Q = oe._writableState, he = Q.sync, ke = Q.writecb; if (typeof ke != "function") throw new i(); if (W(Q), J) $(oe, Q, he, J, ke); else { var ne = V(Q) || oe.destroyed; !ne && !Q.corked && !Q.bufferProcessing && Q.bufferedRequest && j(oe, Q), he ? u.nextTick(D, oe, Q, ne, ke) : D(oe, Q, ne, ke); } } function D(oe, J, Q, he) { Q || B(oe, J), J.pendingcb--, he(), ce(oe, J); } function B(oe, J) { J.length === 0 && J.needDrain && (J.needDrain = !1, oe.emit("drain")); } function j(oe, J) { J.bufferProcessing = !0; var Q = J.bufferedRequest; if (oe._writev && Q && Q.next) { var he = J.bufferedRequestCount, ke = new Array(he), ne = J.corkedRequestsFree; ne.entry = Q; for (var se = 0, Ce = !0; Q; ) ke[se] = Q, Q.isBuf || (Ce = !1), Q = Q.next, se += 1; ke.allBuffers = Ce, L(oe, J, !0, J.length, ke, "", ne.finish), J.pendingcb++, J.lastBufferedRequest = null, ne.next ? (J.corkedRequestsFree = ne.next, ne.next = null) : J.corkedRequestsFree = new g(J), J.bufferedRequestCount = 0; } else { for (; Q; ) { var q = Q.chunk, G = Q.encoding, Y = Q.callback, fe = J.objectMode ? 1 : q.length; if (L(oe, J, !1, fe, q, G, Y), Q = Q.next, J.bufferedRequestCount--, J.writing) break; } Q === null && (J.lastBufferedRequest = null); } J.bufferedRequest = Q, J.bufferProcessing = !1; } I.prototype._write = function(oe, J, Q) { Q(new t("_write()")); }, I.prototype._writev = null, I.prototype.end = function(oe, J, Q) { var he = this._writableState; return typeof oe == "function" ? (Q = oe, oe = null, J = null) : typeof J == "function" && (Q = J, J = null), oe != null && this.write(oe, J), he.corked && (he.corked = 1, this.uncork()), he.ending || ve(this, he, Q), this; }, Object.defineProperty(I.prototype, "writableLength", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.length; } }); function V(oe) { return oe.ending && oe.length === 0 && oe.bufferedRequest === null && !oe.finished && !oe.writing; } function re(oe, J) { oe._final(function(Q) { J.pendingcb--, Q && F(oe, Q), J.prefinished = !0, oe.emit("prefinish"), ce(oe, J); }); } function ee(oe, J) { !J.prefinished && !J.finalCalled && (typeof oe._final == "function" && !J.destroyed ? (J.pendingcb++, J.finalCalled = !0, u.nextTick(re, oe, J)) : (J.prefinished = !0, oe.emit("prefinish"))); } function ce(oe, J) { var Q = V(J); if (Q && (ee(oe, J), J.pendingcb === 0 && (J.finished = !0, oe.emit("finish"), J.autoDestroy))) { var he = oe._readableState; (!he || he.autoDestroy && he.endEmitted) && oe.destroy(); } return Q; } function ve(oe, J, Q) { J.ending = !0, ce(oe, J), Q && (J.finished ? u.nextTick(Q) : oe.once("finish", Q)), J.ended = !0, oe.writable = !1; } function ge(oe, J, Q) { var he = oe.entry; for (oe.entry = null; he; ) { var ke = he.callback; J.pendingcb--, ke(Q), he = he.next; } J.corkedRequestsFree.next = oe; } Object.defineProperty(I.prototype, "destroyed", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState === void 0 ? !1 : this._writableState.destroyed; }, set: function(J) { this._writableState && (this._writableState.destroyed = J); } }), I.prototype.destroy = s.destroy, I.prototype._undestroy = s.undestroy, I.prototype._destroy = function(oe, J) { J(oe); }; }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { "../errors": 477, "./_stream_duplex": 478, "./internal/streams/destroy": 485, "./internal/streams/state": 489, "./internal/streams/stream": 490, _process: 467, buffer: 216, inherits: 387, "util-deprecate": 522 }], 483: [function(e, x, _) { (function(u) { var m; function g(o, p, O) { return p in o ? Object.defineProperty(o, p, { value: O, enumerable: !0, configurable: !0, writable: !0 }) : o[p] = O, o; } var b = e("./end-of-stream"), w = Symbol("lastResolve"), f = Symbol("lastReject"), y = Symbol("error"), h = Symbol("ended"), l = Symbol("lastPromise"), d = Symbol("handlePromise"), s = Symbol("stream"); function v(o, p) { return { value: o, done: p }; } function c(o) { var p = o[w]; if (p !== null) { var O = o[s].read(); O !== null && (o[l] = null, o[w] = null, o[f] = null, p(v(O, !1))); } } function a(o) { u.nextTick(c, o); } function r(o, p) { return function(O, P) { o.then(function() { if (p[h]) { O(v(void 0, !0)); return; } p[d](O, P); }, P); }; } var t = Object.getPrototypeOf(function() { }), i = Object.setPrototypeOf((m = { get stream() { return this[s]; }, next: function() { var p = this, O = this[y]; if (O !== null) return Promise.reject(O); if (this[h]) return Promise.resolve(v(void 0, !0)); if (this[s].destroyed) return new Promise(function(N, M) { u.nextTick(function() { p[y] ? M(p[y]) : N(v(void 0, !0)); }); }); var P = this[l], F; if (P) F = new Promise(r(P, this)); else { var z = this[s].read(); if (z !== null) return Promise.resolve(v(z, !1)); F = new Promise(this[d]); } return this[l] = F, F; } }, g(m, Symbol.asyncIterator, function() { return this; }), g(m, "return", function() { var p = this; return new Promise(function(O, P) { p[s].destroy(null, function(F) { if (F) { P(F); return; } O(v(void 0, !0)); }); }); }), m), t), n = function(p) { var O, P = Object.create(i, (O = {}, g(O, s, { value: p, writable: !0 }), g(O, w, { value: null, writable: !0 }), g(O, f, { value: null, writable: !0 }), g(O, y, { value: null, writable: !0 }), g(O, h, { value: p._readableState.endEmitted, writable: !0 }), g(O, d, { value: function(z, N) { var M = P[s].read(); M ? (P[l] = null, P[w] = null, P[f] = null, z(v(M, !1))) : (P[w] = z, P[f] = N); }, writable: !0 }), O)); return P[l] = null, b(p, function(F) { if (F && F.code !== "ERR_STREAM_PREMATURE_CLOSE") { var z = P[f]; z !== null && (P[l] = null, P[w] = null, P[f] = null, z(F)), P[y] = F; return; } var N = P[w]; N !== null && (P[l] = null, P[w] = null, P[f] = null, N(v(void 0, !0))), P[h] = !0; }), p.on("readable", a.bind(null, P)), P; }; x.exports = n; }).call(this, e("_process")); }, { "./end-of-stream": 486, _process: 467 }], 484: [function(e, x, _) { function u(c, a) { var r = Object.keys(c); if (Object.getOwnPropertySymbols) { var t = Object.getOwnPropertySymbols(c); a && (t = t.filter(function(i) { return Object.getOwnPropertyDescriptor(c, i).enumerable; })), r.push.apply(r, t); } return r; } function m(c) { for (var a = 1; a < arguments.length; a++) { var r = arguments[a] != null ? arguments[a] : {}; a % 2 ? u(Object(r), !0).forEach(function(t) { g(c, t, r[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(c, Object.getOwnPropertyDescriptors(r)) : u(Object(r)).forEach(function(t) { Object.defineProperty(c, t, Object.getOwnPropertyDescriptor(r, t)); }); } return c; } function g(c, a, r) { return a in c ? Object.defineProperty(c, a, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : c[a] = r, c; } function b(c, a) { if (!(c instanceof a)) throw new TypeError("Cannot call a class as a function"); } function w(c, a) { for (var r = 0; r < a.length; r++) { var t = a[r]; t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(c, t.key, t); } } function f(c, a, r) { return a && w(c.prototype, a), r && w(c, r), c; } var y = e("buffer"), h = y.Buffer, l = e("util"), d = l.inspect, s = d && d.custom || "inspect"; function v(c, a, r) { h.prototype.copy.call(c, a, r); } x.exports = /* @__PURE__ */ function() { function c() { b(this, c), this.head = null, this.tail = null, this.length = 0; } return f(c, [{ key: "push", value: function(r) { var t = { data: r, next: null }; this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length; } }, { key: "unshift", value: function(r) { var t = { data: r, next: this.head }; this.length === 0 && (this.tail = t), this.head = t, ++this.length; } }, { key: "shift", value: function() { if (this.length !== 0) { var r = this.head.data; return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, r; } } }, { key: "clear", value: function() { this.head = this.tail = null, this.length = 0; } }, { key: "join", value: function(r) { if (this.length === 0) return ""; for (var t = this.head, i = "" + t.data; t = t.next; ) i += r + t.data; return i; } }, { key: "concat", value: function(r) { if (this.length === 0) return h.alloc(0); for (var t = h.allocUnsafe(r >>> 0), i = this.head, n = 0; i; ) v(i.data, t, n), n += i.data.length, i = i.next; return t; } // Consumes a specified amount of bytes or characters from the buffered data. }, { key: "consume", value: function(r, t) { var i; return r < this.head.data.length ? (i = this.head.data.slice(0, r), this.head.data = this.head.data.slice(r)) : r === this.head.data.length ? i = this.shift() : i = t ? this._getString(r) : this._getBuffer(r), i; } }, { key: "first", value: function() { return this.head.data; } // Consumes a specified amount of characters from the buffered data. }, { key: "_getString", value: function(r) { var t = this.head, i = 1, n = t.data; for (r -= n.length; t = t.next; ) { var o = t.data, p = r > o.length ? o.length : r; if (p === o.length ? n += o : n += o.slice(0, r), r -= p, r === 0) { p === o.length ? (++i, t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t, t.data = o.slice(p)); break; } ++i; } return this.length -= i, n; } // Consumes a specified amount of bytes from the buffered data. }, { key: "_getBuffer", value: function(r) { var t = h.allocUnsafe(r), i = this.head, n = 1; for (i.data.copy(t), r -= i.data.length; i = i.next; ) { var o = i.data, p = r > o.length ? o.length : r; if (o.copy(t, t.length - r, 0, p), r -= p, r === 0) { p === o.length ? (++n, i.next ? this.head = i.next : this.head = this.tail = null) : (this.head = i, i.data = o.slice(p)); break; } ++n; } return this.length -= n, t; } // Make sure the linked list only shows the minimal necessary information. }, { key: s, value: function(r, t) { return d(this, m({}, t, { // Only inspect one level. depth: 0, // It should not recurse. customInspect: !1 })); } }]), c; }(); }, { buffer: 216, util: 185 }], 485: [function(e, x, _) { (function(u) { function m(h, l) { var d = this, s = this._readableState && this._readableState.destroyed, v = this._writableState && this._writableState.destroyed; return s || v ? (l ? l(h) : h && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, u.nextTick(f, this, h)) : u.nextTick(f, this, h)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(h || null, function(c) { !l && c ? d._writableState ? d._writableState.errorEmitted ? u.nextTick(b, d) : (d._writableState.errorEmitted = !0, u.nextTick(g, d, c)) : u.nextTick(g, d, c) : l ? (u.nextTick(b, d), l(c)) : u.nextTick(b, d); }), this); } function g(h, l) { f(h, l), b(h); } function b(h) { h._writableState && !h._writableState.emitClose || h._readableState && !h._readableState.emitClose || h.emit("close"); } function w() { this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1); } function f(h, l) { h.emit("error", l); } function y(h, l) { var d = h._readableState, s = h._writableState; d && d.autoDestroy || s && s.autoDestroy ? h.destroy(l) : h.emit("error", l); } x.exports = { destroy: m, undestroy: w, errorOrDestroy: y }; }).call(this, e("_process")); }, { _process: 467 }], 486: [function(e, x, _) { var u = e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE; function m(f) { var y = !1; return function() { if (!y) { y = !0; for (var h = arguments.length, l = new Array(h), d = 0; d < h; d++) l[d] = arguments[d]; f.apply(this, l); } }; } function g() { } function b(f) { return f.setHeader && typeof f.abort == "function"; } function w(f, y, h) { if (typeof y == "function") return w(f, null, y); y || (y = {}), h = m(h || g); var l = y.readable || y.readable !== !1 && f.readable, d = y.writable || y.writable !== !1 && f.writable, s = function() { f.writable || c(); }, v = f._writableState && f._writableState.finished, c = function() { d = !1, v = !0, l || h.call(f); }, a = f._readableState && f._readableState.endEmitted, r = function() { l = !1, a = !0, d || h.call(f); }, t = function(p) { h.call(f, p); }, i = function() { var p; if (l && !a) return (!f._readableState || !f._readableState.ended) && (p = new u()), h.call(f, p); if (d && !v) return (!f._writableState || !f._writableState.ended) && (p = new u()), h.call(f, p); }, n = function() { f.req.on("finish", c); }; return b(f) ? (f.on("complete", c), f.on("abort", i), f.req ? n() : f.on("request", n)) : d && !f._writableState && (f.on("end", s), f.on("close", s)), f.on("end", r), f.on("finish", c), y.error !== !1 && f.on("error", t), f.on("close", i), function() { f.removeListener("complete", c), f.removeListener("abort", i), f.removeListener("request", n), f.req && f.req.removeListener("finish", c), f.removeListener("end", s), f.removeListener("close", s), f.removeListener("finish", c), f.removeListener("end", r), f.removeListener("error", t), f.removeListener("close", i); }; } x.exports = w; }, { "../../../errors": 477 }], 487: [function(e, x, _) { x.exports = function() { throw new Error("Readable.from is not available in the browser"); }; }, {}], 488: [function(e, x, _) { var u; function m(c) { var a = !1; return function() { a || (a = !0, c.apply(void 0, arguments)); }; } var g = e("../../../errors").codes, b = g.ERR_MISSING_ARGS, w = g.ERR_STREAM_DESTROYED; function f(c) { if (c) throw c; } function y(c) { return c.setHeader && typeof c.abort == "function"; } function h(c, a, r, t) { t = m(t); var i = !1; c.on("close", function() { i = !0; }), u === void 0 && (u = e("./end-of-stream")), u(c, { readable: a, writable: r }, function(o) { if (o) return t(o); i = !0, t(); }); var n = !1; return function(o) { if (!i && !n) { if (n = !0, y(c)) return c.abort(); if (typeof c.destroy == "function") return c.destroy(); t(o || new w("pipe")); } }; } function l(c) { c(); } function d(c, a) { return c.pipe(a); } function s(c) { return !c.length || typeof c[c.length - 1] != "function" ? f : c.pop(); } function v() { for (var c = arguments.length, a = new Array(c), r = 0; r < c; r++) a[r] = arguments[r]; var t = s(a); if (Array.isArray(a[0]) && (a = a[0]), a.length < 2) throw new b("streams"); var i, n = a.map(function(o, p) { var O = p < a.length - 1, P = p > 0; return h(o, O, P, function(F) { i || (i = F), F && n.forEach(l), !O && (n.forEach(l), t(i)); }); }); return a.reduce(d); } x.exports = v; }, { "../../../errors": 477, "./end-of-stream": 486 }], 489: [function(e, x, _) { var u = e("../../../errors").codes.ERR_INVALID_OPT_VALUE; function m(b, w, f) { return b.highWaterMark != null ? b.highWaterMark : w ? b[f] : null; } function g(b, w, f, y) { var h = m(w, y, f); if (h != null) { if (!(isFinite(h) && Math.floor(h) === h) || h < 0) { var l = y ? f : "highWaterMark"; throw new u(l, h); } return Math.floor(h); } return b.objectMode ? 16 : 16 * 1024; } x.exports = { getHighWaterMark: g }; }, { "../../../errors": 477 }], 490: [function(e, x, _) { x.exports = e("events").EventEmitter; }, { events: 367 }], 491: [function(e, x, _) { _ = x.exports = e("./lib/_stream_readable.js"), _.Stream = _, _.Readable = _, _.Writable = e("./lib/_stream_writable.js"), _.Duplex = e("./lib/_stream_duplex.js"), _.Transform = e("./lib/_stream_transform.js"), _.PassThrough = e("./lib/_stream_passthrough.js"), _.finished = e("./lib/internal/streams/end-of-stream.js"), _.pipeline = e("./lib/internal/streams/pipeline.js"); }, { "./lib/_stream_duplex.js": 478, "./lib/_stream_passthrough.js": 479, "./lib/_stream_readable.js": 480, "./lib/_stream_transform.js": 481, "./lib/_stream_writable.js": 482, "./lib/internal/streams/end-of-stream.js": 486, "./lib/internal/streams/pipeline.js": 488 }], 492: [function(e, x, _) { function u(g) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(w) { return typeof w; } : u = function(w) { return w && typeof Symbol == "function" && w.constructor === Symbol && w !== Symbol.prototype ? "symbol" : typeof w; }, u(g); } var m = function(g) { var b = Object.prototype, w = b.hasOwnProperty, f, y = typeof Symbol == "function" ? Symbol : {}, h = y.iterator || "@@iterator", l = y.asyncIterator || "@@asyncIterator", d = y.toStringTag || "@@toStringTag"; function s(U, D, B) { return Object.defineProperty(U, D, { value: B, enumerable: !0, configurable: !0, writable: !0 }), U[D]; } try { s({}, ""); } catch (U) { s = function(B, j, V) { return B[j] = V; }; } function v(U, D, B, j) { var V = D && D.prototype instanceof o ? D : o, re = Object.create(V.prototype), ee = new L(j || []); return re._invoke = R(U, B, ee), re; } g.wrap = v; function c(U, D, B) { try { return { type: "normal", arg: U.call(D, B) }; } catch (j) { return { type: "throw", arg: j }; } } var a = "suspendedStart", r = "suspendedYield", t = "executing", i = "completed", n = {}; function o() { } function p() { } function O() { } var P = {}; P[h] = function() { return this; }; var F = Object.getPrototypeOf, z = F && F(F($([]))); z && z !== b && w.call(z, h) && (P = z); var N = O.prototype = o.prototype = Object.create(P); p.prototype = N.constructor = O, O.constructor = p, p.displayName = s(O, d, "GeneratorFunction"); function M(U) { ["next", "throw", "return"].forEach(function(D) { s(U, D, function(B) { return this._invoke(D, B); }); }); } g.isGeneratorFunction = function(U) { var D = typeof U == "function" && U.constructor; return D ? D === p || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (D.displayName || D.name) === "GeneratorFunction" : !1; }, g.mark = function(U) { return Object.setPrototypeOf ? Object.setPrototypeOf(U, O) : (U.__proto__ = O, s(U, d, "GeneratorFunction")), U.prototype = Object.create(N), U; }, g.awrap = function(U) { return { __await: U }; }; function I(U, D) { function B(re, ee, ce, ve) { var ge = c(U[re], U, ee); if (ge.type === "throw") ve(ge.arg); else { var oe = ge.arg, J = oe.value; return J && u(J) === "object" && w.call(J, "__await") ? D.resolve(J.__await).then(function(Q) { B("next", Q, ce, ve); }, function(Q) { B("throw", Q, ce, ve); }) : D.resolve(J).then(function(Q) { oe.value = Q, ce(oe); }, function(Q) { return B("throw", Q, ce, ve); }); } } var j; function V(re, ee) { function ce() { return new D(function(ve, ge) { B(re, ee, ve, ge); }); } return j = // If enqueue has been called before, then we want to wait until // all previous Promises have been resolved before calling invoke, // so that results are always delivered in the correct order. If // enqueue has not been called before, then it is important to // call invoke immediately, without waiting on a callback to fire, // so that the async generator function has the opportunity to do // any necessary setup in a predictable way. This predictability // is why the Promise constructor synchronously invokes its // executor callback, and why async functions synchronously // execute code before the first await. Since we implement simple // async functions in terms of async generators, it is especially // important to get this right, even though it requires care. j ? j.then( ce, // Avoid propagating failures to Promises returned by later // invocations of the iterator. ce ) : ce(); } this._invoke = V; } M(I.prototype), I.prototype[l] = function() { return this; }, g.AsyncIterator = I, g.async = function(U, D, B, j, V) { V === void 0 && (V = Promise); var re = new I(v(U, D, B, j), V); return g.isGeneratorFunction(D) ? re : re.next().then(function(ee) { return ee.done ? ee.value : re.next(); }); }; function R(U, D, B) { var j = a; return function(re, ee) { if (j === t) throw new Error("Generator is already running"); if (j === i) { if (re === "throw") throw ee; return W(); } for (B.method = re, B.arg = ee; ; ) { var ce = B.delegate; if (ce) { var ve = C(ce, B); if (ve) { if (ve === n) continue; return ve; } } if (B.method === "next") B.sent = B._sent = B.arg; else if (B.method === "throw") { if (j === a) throw j = i, B.arg; B.dispatchException(B.arg); } else B.method === "return" && B.abrupt("return", B.arg); j = t; var ge = c(U, D, B); if (ge.type === "normal") { if (j = B.done ? i : r, ge.arg === n) continue; return { value: ge.arg, done: B.done }; } else ge.type === "throw" && (j = i, B.method = "throw", B.arg = ge.arg); } }; } function C(U, D) { var B = U.iterator[D.method]; if (B === f) { if (D.delegate = null, D.method === "throw") { if (U.iterator.return && (D.method = "return", D.arg = f, C(U, D), D.method === "throw")) return n; D.method = "throw", D.arg = new TypeError("The iterator does not provide a 'throw' method"); } return n; } var j = c(B, U.iterator, D.arg); if (j.type === "throw") return D.method = "throw", D.arg = j.arg, D.delegate = null, n; var V = j.arg; if (!V) return D.method = "throw", D.arg = new TypeError("iterator result is not an object"), D.delegate = null, n; if (V.done) D[U.resultName] = V.value, D.next = U.nextLoc, D.method !== "return" && (D.method = "next", D.arg = f); else return V; return D.delegate = null, n; } M(N), s(N, d, "Generator"), N[h] = function() { return this; }, N.toString = function() { return "[object Generator]"; }; function E(U) { var D = { tryLoc: U[0] }; 1 in U && (D.catchLoc = U[1]), 2 in U && (D.finallyLoc = U[2], D.afterLoc = U[3]), this.tryEntries.push(D); } function A(U) { var D = U.completion || {}; D.type = "normal", delete D.arg, U.completion = D; } function L(U) { this.tryEntries = [{ tryLoc: "root" }], U.forEach(E, this), this.reset(!0); } g.keys = function(U) { var D = []; for (var B in U) D.push(B); return D.reverse(), function j() { for (; D.length; ) { var V = D.pop(); if (V in U) return j.value = V, j.done = !1, j; } return j.done = !0, j; }; }; function $(U) { if (U) { var D = U[h]; if (D) return D.call(U); if (typeof U.next == "function") return U; if (!isNaN(U.length)) { var B = -1, j = function V() { for (; ++B < U.length; ) if (w.call(U, B)) return V.value = U[B], V.done = !1, V; return V.value = f, V.done = !0, V; }; return j.next = j; } } return { next: W }; } g.values = $; function W() { return { value: f, done: !0 }; } return L.prototype = { constructor: L, reset: function(D) { if (this.prev = 0, this.next = 0, this.sent = this._sent = f, this.done = !1, this.delegate = null, this.method = "next", this.arg = f, this.tryEntries.forEach(A), !D) for (var B in this) B.charAt(0) === "t" && w.call(this, B) && !isNaN(+B.slice(1)) && (this[B] = f); }, stop: function() { this.done = !0; var D = this.tryEntries[0], B = D.completion; if (B.type === "throw") throw B.arg; return this.rval; }, dispatchException: function(D) { if (this.done) throw D; var B = this; function j(ge, oe) { return ee.type = "throw", ee.arg = D, B.next = ge, oe && (B.method = "next", B.arg = f), !!oe; } for (var V = this.tryEntries.length - 1; V >= 0; --V) { var re = this.tryEntries[V], ee = re.completion; if (re.tryLoc === "root") return j("end"); if (re.tryLoc <= this.prev) { var ce = w.call(re, "catchLoc"), ve = w.call(re, "finallyLoc"); if (ce && ve) { if (this.prev < re.catchLoc) return j(re.catchLoc, !0); if (this.prev < re.finallyLoc) return j(re.finallyLoc); } else if (ce) { if (this.prev < re.catchLoc) return j(re.catchLoc, !0); } else if (ve) { if (this.prev < re.finallyLoc) return j(re.finallyLoc); } else throw new Error("try statement without catch or finally"); } } }, abrupt: function(D, B) { for (var j = this.tryEntries.length - 1; j >= 0; --j) { var V = this.tryEntries[j]; if (V.tryLoc <= this.prev && w.call(V, "finallyLoc") && this.prev < V.finallyLoc) { var re = V; break; } } re && (D === "break" || D === "continue") && re.tryLoc <= B && B <= re.finallyLoc && (re = null); var ee = re ? re.completion : {}; return ee.type = D, ee.arg = B, re ? (this.method = "next", this.next = re.finallyLoc, n) : this.complete(ee); }, complete: function(D, B) { if (D.type === "throw") throw D.arg; return D.type === "break" || D.type === "continue" ? this.next = D.arg : D.type === "return" ? (this.rval = this.arg = D.arg, this.method = "return", this.next = "end") : D.type === "normal" && B && (this.next = B), n; }, finish: function(D) { for (var B = this.tryEntries.length - 1; B >= 0; --B) { var j = this.tryEntries[B]; if (j.finallyLoc === D) return this.complete(j.completion, j.afterLoc), A(j), n; } }, catch: function(D) { for (var B = this.tryEntries.length - 1; B >= 0; --B) { var j = this.tryEntries[B]; if (j.tryLoc === D) { var V = j.completion; if (V.type === "throw") { var re = V.arg; A(j); } return re; } } throw new Error("illegal catch attempt"); }, delegateYield: function(D, B, j) { return this.delegate = { iterator: $(D), resultName: B, nextLoc: j }, this.method === "next" && (this.arg = f), n; } }, g; }( // If this script is executing as a CommonJS module, use module.exports // as the regeneratorRuntime namespace. Otherwise create a new empty // object. Either way, the resulting object will be used to initialize // the regeneratorRuntime variable at the top of this file. (typeof x == "undefined" ? "undefined" : u(x)) === "object" ? x.exports : {} ); try { regeneratorRuntime = m; } catch (g) { Function("r", "regeneratorRuntime = r")(m); } }, {}], 493: [function(e, x, _) { var u = e("buffer").Buffer, m = e("inherits"), g = e("hash-base"), b = new Array(16), w = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13], f = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11], y = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6], h = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11], l = [0, 1518500249, 1859775393, 2400959708, 2840853838], d = [1352829926, 1548603684, 1836072691, 2053994217, 0]; function s() { g.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520; } m(s, g), s.prototype._update = function() { for (var n = b, o = 0; o < 16; ++o) n[o] = this._block.readInt32LE(o * 4); for (var p = this._a | 0, O = this._b | 0, P = this._c | 0, F = this._d | 0, z = this._e | 0, N = this._a | 0, M = this._b | 0, I = this._c | 0, R = this._d | 0, C = this._e | 0, E = 0; E < 80; E += 1) { var A, L; E < 16 ? (A = c(p, O, P, F, z, n[w[E]], l[0], y[E]), L = i(N, M, I, R, C, n[f[E]], d[0], h[E])) : E < 32 ? (A = a(p, O, P, F, z, n[w[E]], l[1], y[E]), L = t(N, M, I, R, C, n[f[E]], d[1], h[E])) : E < 48 ? (A = r(p, O, P, F, z, n[w[E]], l[2], y[E]), L = r(N, M, I, R, C, n[f[E]], d[2], h[E])) : E < 64 ? (A = t(p, O, P, F, z, n[w[E]], l[3], y[E]), L = a(N, M, I, R, C, n[f[E]], d[3], h[E])) : (A = i(p, O, P, F, z, n[w[E]], l[4], y[E]), L = c(N, M, I, R, C, n[f[E]], d[4], h[E])), p = z, z = F, F = v(P, 10), P = O, O = A, N = C, C = R, R = v(I, 10), I = M, M = L; } var $ = this._b + P + R | 0; this._b = this._c + F + C | 0, this._c = this._d + z + N | 0, this._d = this._e + p + M | 0, this._e = this._a + O + I | 0, this._a = $; }, s.prototype._digest = function() { this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update(); var n = u.alloc ? u.alloc(20) : new u(20); return n.writeInt32LE(this._a, 0), n.writeInt32LE(this._b, 4), n.writeInt32LE(this._c, 8), n.writeInt32LE(this._d, 12), n.writeInt32LE(this._e, 16), n; }; function v(n, o) { return n << o | n >>> 32 - o; } function c(n, o, p, O, P, F, z, N) { return v(n + (o ^ p ^ O) + F + z | 0, N) + P | 0; } function a(n, o, p, O, P, F, z, N) { return v(n + (o & p | ~o & O) + F + z | 0, N) + P | 0; } function r(n, o, p, O, P, F, z, N) { return v(n + ((o | ~p) ^ O) + F + z | 0, N) + P | 0; } function t(n, o, p, O, P, F, z, N) { return v(n + (o & O | p & ~O) + F + z | 0, N) + P | 0; } function i(n, o, p, O, P, F, z, N) { return v(n + (o ^ (p | ~O)) + F + z | 0, N) + P | 0; } x.exports = s; }, { buffer: 216, "hash-base": 370, inherits: 387 }], 494: [function(e, x, _) { var u = e("buffer"), m = u.Buffer; function g(w, f) { for (var y in w) f[y] = w[y]; } m.from && m.alloc && m.allocUnsafe && m.allocUnsafeSlow ? x.exports = u : (g(u, _), _.Buffer = b); function b(w, f, y) { return m(w, f, y); } g(m, b), b.from = function(w, f, y) { if (typeof w == "number") throw new TypeError("Argument must not be a number"); return m(w, f, y); }, b.alloc = function(w, f, y) { if (typeof w != "number") throw new TypeError("Argument must be a number"); var h = m(w); return f !== void 0 ? typeof y == "string" ? h.fill(f, y) : h.fill(f) : h.fill(0), h; }, b.allocUnsafe = function(w) { if (typeof w != "number") throw new TypeError("Argument must be a number"); return m(w); }, b.allocUnsafeSlow = function(w) { if (typeof w != "number") throw new TypeError("Argument must be a number"); return u.SlowBuffer(w); }; }, { buffer: 216 }], 495: [function(e, x, _) { (function(u) { function m(h) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(d) { return typeof d; } : m = function(d) { return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d; }, m(h); } var g = e("buffer"), b = g.Buffer, w = {}, f; for (f in g) g.hasOwnProperty(f) && (f === "SlowBuffer" || f === "Buffer" || (w[f] = g[f])); var y = w.Buffer = {}; for (f in b) b.hasOwnProperty(f) && (f === "allocUnsafe" || f === "allocUnsafeSlow" || (y[f] = b[f])); if (w.Buffer.prototype = b.prototype, (!y.from || y.from === Uint8Array.from) && (y.from = function(h, l, d) { if (typeof h == "number") throw new TypeError('The "value" argument must not be of type number. Received type ' + m(h)); if (h && typeof h.length == "undefined") throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + m(h)); return b(h, l, d); }), y.alloc || (y.alloc = function(h, l, d) { if (typeof h != "number") throw new TypeError('The "size" argument must be of type number. Received type ' + m(h)); if (h < 0 || h >= 2 * (1 << 30)) throw new RangeError('The value "' + h + '" is invalid for option "size"'); var s = b(h); return !l || l.length === 0 ? s.fill(0) : typeof d == "string" ? s.fill(l, d) : s.fill(l), s; }), !w.kStringMaxLength) try { w.kStringMaxLength = u.binding("buffer").kStringMaxLength; } catch (h) { } w.constants || (w.constants = { MAX_LENGTH: w.kMaxLength }, w.kStringMaxLength && (w.constants.MAX_STRING_LENGTH = w.kStringMaxLength)), x.exports = w; }).call(this, e("_process")); }, { _process: 467, buffer: 216 }], 496: [function(e, x, _) { function u(vt, Ke) { var me; if (typeof Symbol == "undefined" || vt[Symbol.iterator] == null) { if (Array.isArray(vt) || (me = h(vt)) || Ke && vt && typeof vt.length == "number") { me && (vt = me); var Fe = 0, Be = function() { }; return { s: Be, n: function() { return Fe >= vt.length ? { done: !0 } : { done: !1, value: vt[Fe++] }; }, e: function(gr) { throw gr; }, f: Be }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var dt = !0, St = !1, Ht; return { s: function() { me = vt[Symbol.iterator](); }, n: function() { var gr = me.next(); return dt = gr.done, gr; }, e: function(gr) { St = !0, Ht = gr; }, f: function() { try { !dt && me.return != null && me.return(); } finally { if (St) throw Ht; } } }; } function m(vt) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(me) { return typeof me; } : m = function(me) { return me && typeof Symbol == "function" && me.constructor === Symbol && me !== Symbol.prototype ? "symbol" : typeof me; }, m(vt); } function g(vt, Ke) { if (!(vt instanceof Ke)) throw new TypeError("Cannot call a class as a function"); } function b(vt, Ke) { for (var me = 0; me < Ke.length; me++) { var Fe = Ke[me]; Fe.enumerable = Fe.enumerable || !1, Fe.configurable = !0, "value" in Fe && (Fe.writable = !0), Object.defineProperty(vt, Fe.key, Fe); } } function w(vt, Ke, me) { return Ke && b(vt.prototype, Ke), me && b(vt, me), vt; } function f(vt) { return d(vt) || l(vt) || h(vt) || y(); } function y() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function h(vt, Ke) { if (vt) { if (typeof vt == "string") return s(vt, Ke); var me = Object.prototype.toString.call(vt).slice(8, -1); if (me === "Object" && vt.constructor && (me = vt.constructor.name), me === "Map" || me === "Set") return Array.from(vt); if (me === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me)) return s(vt, Ke); } } function l(vt) { if (typeof Symbol != "undefined" && Symbol.iterator in Object(vt)) return Array.from(vt); } function d(vt) { if (Array.isArray(vt)) return s(vt); } function s(vt, Ke) { (Ke == null || Ke > vt.length) && (Ke = vt.length); for (var me = 0, Fe = new Array(Ke); me < Ke; me++) Fe[me] = vt[me]; return Fe; } Object.defineProperty(_, "__esModule", { value: !0 }); var v = e("xmlchars/xml/1.0/ed5"), c = e("xmlchars/xml/1.1/ed2"), a = e("xmlchars/xmlns/1.0/ed3"), r = v.isS, t = v.isChar, i = v.isNameStartChar, n = v.isNameChar, o = v.S_LIST, p = v.NAME_RE, O = c.isChar, P = a.isNCNameStartChar, F = a.isNCNameChar, z = a.NC_NAME_RE, N = "http://www.w3.org/XML/1998/namespace", M = "http://www.w3.org/2000/xmlns/", I = { // eslint-disable-next-line @typescript-eslint/no-explicit-any __proto__: null, xml: N, xmlns: M }, R = { // eslint-disable-next-line @typescript-eslint/no-explicit-any __proto__: null, amp: "&", gt: ">", lt: "<", quot: '"', apos: "'" }, C = -1, E = -2, A = 0, L = 1, $ = 2, W = 3, U = 4, D = 5, B = 6, j = 7, V = 8, re = 9, ee = 10, ce = 11, ve = 12, ge = 13, oe = 14, J = 15, Q = 16, he = 17, ke = 18, ne = 19, se = 20, Ce = 21, q = 22, G = 23, Y = 24, fe = 25, we = 26, _e = 27, je = 28, Ye = 29, nt = 30, ut = 31, ot = 32, Ue = 33, Ve = 34, Qe = 35, tt = 36, ae = 37, Re = 38, be = 39, Ee = 40, pe = 41, Pe = 42, te = 43, He = 44, it = 9, K = 10, Me = 13, Le = 32, ue = 33, Se = 34, Ie = 38, st = 39, Ge = 45, rt = 47, _t = 59, wt = 60, Ot = 61, pt = 62, ct = 63, At = 91, Pt = 93, bt = 133, Kt = 8232, Ct = function(Ke) { return Ke === Se || Ke === st; }, xt = [Se, st], Ft = [].concat(xt, [At, pt]), Lt = [].concat(xt, [wt, Pt]), Et = [Ot, ct].concat(f(o)), Dr = [].concat(f(o), [pt, Ie, wt]); function Or(vt, Ke, me) { switch (Ke) { case "xml": me !== N && vt.fail("xml prefix must be bound to ".concat(N, ".")); break; case "xmlns": me !== M && vt.fail("xmlns prefix must be bound to ".concat(M, ".")); break; } switch (me) { case M: vt.fail(Ke === "" ? "the default namespace may not be set to ".concat(me, ".") : 'may not assign a prefix (even "xmlns") to the URI '.concat(M, ".")); break; case N: switch (Ke) { case "xml": break; case "": vt.fail("the default namespace may not be set to ".concat(me, ".")); break; default: vt.fail("may not assign the xml namespace to another prefix."); } break; } } function Gr(vt, Ke) { for (var me = 0, Fe = Object.keys(Ke); me < Fe.length; me++) { var Be = Fe[me]; Or(vt, Be, Ke[Be]); } } var Nr = function(Ke) { return z.test(Ke); }, Yr = function(Ke) { return p.test(Ke); }, Qt = 0, Xr = 1, Fr = 2; _.EVENTS = ["xmldecl", "text", "processinginstruction", "doctype", "comment", "opentagstart", "attribute", "opentag", "closetag", "cdata", "error", "end", "ready"]; var Lr = { xmldecl: "xmldeclHandler", text: "textHandler", processinginstruction: "piHandler", doctype: "doctypeHandler", comment: "commentHandler", opentagstart: "openTagStartHandler", attribute: "attributeHandler", opentag: "openTagHandler", closetag: "closeTagHandler", cdata: "cdataHandler", error: "errorHandler", end: "endHandler", ready: "readyHandler" }, Ur = /* @__PURE__ */ function() { function vt(Ke) { g(this, vt), this.opt = Ke != null ? Ke : {}, this.fragmentOpt = !!this.opt.fragment; var me = this.xmlnsOpt = !!this.opt.xmlns; if (this.trackPosition = this.opt.position !== !1, this.fileName = this.opt.fileName, me) { this.nameStartCheck = P, this.nameCheck = F, this.isName = Nr, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = Object.assign({ __proto__: null }, I); var Fe = this.opt.additionalNamespaces; Fe != null && (Gr(this, Fe), Object.assign(this.ns, Fe)); } else this.nameStartCheck = i, this.nameCheck = n, this.isName = Yr, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain; this.stateTable = [ /* eslint-disable @typescript-eslint/unbound-method */ this.sBegin, this.sBeginWhitespace, this.sDoctype, this.sDoctypeQuote, this.sDTD, this.sDTDQuoted, this.sDTDOpenWaka, this.sDTDOpenWakaBang, this.sDTDComment, this.sDTDCommentEnding, this.sDTDCommentEnded, this.sDTDPI, this.sDTDPIEnding, this.sText, this.sEntity, this.sOpenWaka, this.sOpenWakaBang, this.sComment, this.sCommentEnding, this.sCommentEnded, this.sCData, this.sCDataEnding, this.sCDataEnding2, this.sPIFirstChar, this.sPIRest, this.sPIBody, this.sPIEnding, this.sXMLDeclNameStart, this.sXMLDeclName, this.sXMLDeclEq, this.sXMLDeclValueStart, this.sXMLDeclValue, this.sXMLDeclSeparator, this.sXMLDeclEnding, this.sOpenTag, this.sOpenTagSlash, this.sAttrib, this.sAttribName, this.sAttribNameSawWhite, this.sAttribValue, this.sAttribValueQuoted, this.sAttribValueClosed, this.sAttribValueUnquoted, this.sCloseTag, this.sCloseTagSawWhite ], this._init(); } return w(vt, [{ key: "_init", value: function() { var me; this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = Qt, this.attribList = []; var Fe = this.fragmentOpt; this.state = Fe ? ge : A, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = Fe, this.xmlDeclPossible = !Fe, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0; var Be = this.opt.defaultXMLVersion; if (Be === void 0) { if (this.opt.forceXMLVersion === !0) throw new Error("forceXMLVersion set but defaultXMLVersion is not set"); Be = "1.0"; } this.setXMLVersion(Be), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = { version: void 0, encoding: void 0, standalone: void 0 }, this.line = 1, this.column = 0, this.ENTITIES = Object.create(R), (me = this.readyHandler) === null || me === void 0 || me.call(this); } /** * The stream position the parser is currently looking at. This field is * zero-based. * * This field is not based on counting Unicode characters but is to be * interpreted as a plain index into a JavaScript string. */ }, { key: "on", /** * Set an event listener on an event. The parser supports one handler per * event type. If you try to set an event handler over an existing handler, * the old handler is silently overwritten. * * @param name The event to listen to. * * @param handler The handler to set. */ value: function(me, Fe) { this[Lr[me]] = Fe; } /** * Unset an event handler. * * @parma name The event to stop listening to. */ }, { key: "off", value: function(me) { this[Lr[me]] = void 0; } /** * Make an error object. The error object will have a message that contains * the ``fileName`` option passed at the creation of the parser. If position * tracking was turned on, it will also have line and column number * information. * * @param message The message describing the error to report. * * @returns An error object with a properly formatted message. */ }, { key: "makeError", value: function(me) { var Fe, Be = (Fe = this.fileName) !== null && Fe !== void 0 ? Fe : ""; return this.trackPosition && (Be.length > 0 && (Be += ":"), Be += "".concat(this.line, ":").concat(this.column)), Be.length > 0 && (Be += ": "), new Error(Be + me); } /** * Report a parsing error. This method is made public so that client code may * check for issues that are outside the scope of this project and can report * errors. * * @param message The error to report. * * @returns this */ }, { key: "fail", value: function(me) { var Fe = this.makeError(me), Be = this.errorHandler; if (Be === void 0) throw Fe; return Be(Fe), this; } /** * Write a XML data to the parser. * * @param chunk The XML data to write. * * @returns this */ }, { key: "write", value: function(me) { if (this.closed) return this.fail("cannot write after close; assign an onready handler."); var Fe = !1; me === null ? (Fe = !0, me = "") : m(me) === "object" && (me = me.toString()), this.carriedFromPrevious !== void 0 && (me = "".concat(this.carriedFromPrevious).concat(me), this.carriedFromPrevious = void 0); var Be = me.length, dt = me.charCodeAt(Be - 1); !Fe && // A trailing CR or surrogate must be carried over to the next // chunk. (dt === Me || dt >= 55296 && dt <= 56319) && (this.carriedFromPrevious = me[Be - 1], Be--, me = me.slice(0, Be)); var St = this.stateTable; for (this.chunk = me, this.i = 0; this.i < Be; ) St[this.state].call(this); return this.chunkPosition += Be, Fe ? this.end() : this; } /** * Close the current stream. Perform final well-formedness checks and reset * the parser tstate. * * @returns this */ }, { key: "close", value: function() { return this.write(null); } /** * Get a single code point out of the current chunk. This updates the current * position if we do position tracking. * * This is the algorithm to use for XML 1.0. * * @returns The character read. */ }, { key: "getCode10", value: function() { var me = this.chunk, Fe = this.i; if (this.prevI = Fe, this.i = Fe + 1, Fe >= me.length) return C; var Be = me.charCodeAt(Fe); if (this.column++, Be < 55296) { if (Be >= Le || Be === it) return Be; switch (Be) { case K: return this.line++, this.column = 0, this.positionAtNewLine = this.position, K; case Me: return me.charCodeAt(Fe + 1) === K && (this.i = Fe + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, E; default: return this.fail("disallowed character."), Be; } } if (Be > 56319) return Be >= 57344 && Be <= 65533 || this.fail("disallowed character."), Be; var dt = 65536 + (Be - 55296) * 1024 + (me.charCodeAt(Fe + 1) - 56320); return this.i = Fe + 2, dt > 1114111 && this.fail("disallowed character."), dt; } /** * Get a single code point out of the current chunk. This updates the current * position if we do position tracking. * * This is the algorithm to use for XML 1.1. * * @returns {number} The character read. */ }, { key: "getCode11", value: function() { var me = this.chunk, Fe = this.i; if (this.prevI = Fe, this.i = Fe + 1, Fe >= me.length) return C; var Be = me.charCodeAt(Fe); if (this.column++, Be < 55296) { if (Be > 31 && Be < 127 || Be > 159 && Be !== Kt || Be === it) return Be; switch (Be) { case K: return this.line++, this.column = 0, this.positionAtNewLine = this.position, K; case Me: { var dt = me.charCodeAt(Fe + 1); (dt === K || dt === bt) && (this.i = Fe + 2); } case bt: case Kt: return this.line++, this.column = 0, this.positionAtNewLine = this.position, E; default: return this.fail("disallowed character."), Be; } } if (Be > 56319) return Be >= 57344 && Be <= 65533 || this.fail("disallowed character."), Be; var St = 65536 + (Be - 55296) * 1024 + (me.charCodeAt(Fe + 1) - 56320); return this.i = Fe + 2, St > 1114111 && this.fail("disallowed character."), St; } /** * Like ``getCode`` but with the return value normalized so that ``NL`` is * returned for ``NL_LIKE``. */ }, { key: "getCodeNorm", value: function() { var me = this.getCode(); return me === E ? K : me; } }, { key: "unget", value: function() { this.i = this.prevI, this.column--; } /** * Capture characters into a buffer until encountering one of a set of * characters. * * @param chars An array of codepoints. Encountering a character in the array * ends the capture. (``chars`` may safely contain ``NL``.) * * @return The character code that made the capture end, or ``EOC`` if we hit * the end of the chunk. The return value cannot be NL_LIKE: NL is returned * instead. */ }, { key: "captureTo", value: function(me) { for (var Fe = this.i, Be = this.chunk; ; ) { var dt = this.getCode(), St = dt === E, Ht = St ? K : dt; if (Ht === C || me.includes(Ht)) return this.text += Be.slice(Fe, this.prevI), Ht; St && (this.text += "".concat(Be.slice(Fe, this.prevI), ` `), Fe = this.i); } } /** * Capture characters into a buffer until encountering a character. * * @param char The codepoint that ends the capture. **NOTE ``char`` MAY NOT * CONTAIN ``NL``.** Passing ``NL`` will result in buggy behavior. * * @return ``true`` if we ran into the character. Otherwise, we ran into the * end of the current chunk. */ }, { key: "captureToChar", value: function(me) { for (var Fe = this.i, Be = this.chunk; ; ) { var dt = this.getCode(); switch (dt) { case E: this.text += "".concat(Be.slice(Fe, this.prevI), ` `), Fe = this.i, dt = K; break; case C: return this.text += Be.slice(Fe), !1; } if (dt === me) return this.text += Be.slice(Fe, this.prevI), !0; } } /** * Capture characters that satisfy ``isNameChar`` into the ``name`` field of * this parser. * * @return The character code that made the test fail, or ``EOC`` if we hit * the end of the chunk. The return value cannot be NL_LIKE: NL is returned * instead. */ }, { key: "captureNameChars", value: function() { for (var me = this.chunk, Fe = this.i; ; ) { var Be = this.getCode(); if (Be === C) return this.name += me.slice(Fe), C; if (!n(Be)) return this.name += me.slice(Fe, this.prevI), Be === E ? K : Be; } } /** * Skip white spaces. * * @return The character that ended the skip, or ``EOC`` if we hit * the end of the chunk. The return value cannot be NL_LIKE: NL is returned * instead. */ }, { key: "skipSpaces", value: function() { for (; ; ) { var me = this.getCodeNorm(); if (me === C || !r(me)) return me; } } }, { key: "setXMLVersion", value: function(me) { this.currentXMLVersion = me, me === "1.0" ? (this.isChar = t, this.getCode = this.getCode10) : (this.isChar = O, this.getCode = this.getCode11); } // STATE ENGINE METHODS // This needs to be a state separate from S_BEGIN_WHITESPACE because we want // to be sure never to come back to this state later. }, { key: "sBegin", value: function() { this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = L; } }, { key: "sBeginWhitespace", value: function() { var me = this.i, Fe = this.skipSpaces(); switch (this.prevI !== me && (this.xmlDeclPossible = !1), Fe) { case wt: if (this.state = J, this.text.length !== 0) throw new Error("no-empty text at start"); break; case C: break; default: this.unget(), this.state = ge, this.xmlDeclPossible = !1; } } }, { key: "sDoctype", value: function() { var me, Fe = this.captureTo(Ft); switch (Fe) { case pt: { (me = this.doctypeHandler) === null || me === void 0 || me.call(this, this.text), this.text = "", this.state = ge, this.doctype = !0; break; } case C: break; default: this.text += String.fromCodePoint(Fe), Fe === At ? this.state = U : Ct(Fe) && (this.state = W, this.q = Fe); } } }, { key: "sDoctypeQuote", value: function() { var me = this.q; this.captureToChar(me) && (this.text += String.fromCodePoint(me), this.q = null, this.state = $); } }, { key: "sDTD", value: function() { var me = this.captureTo(Lt); me !== C && (this.text += String.fromCodePoint(me), me === Pt ? this.state = $ : me === wt ? this.state = B : Ct(me) && (this.state = D, this.q = me)); } }, { key: "sDTDQuoted", value: function() { var me = this.q; this.captureToChar(me) && (this.text += String.fromCodePoint(me), this.state = U, this.q = null); } }, { key: "sDTDOpenWaka", value: function() { var me = this.getCodeNorm(); switch (this.text += String.fromCodePoint(me), me) { case ue: this.state = j, this.openWakaBang = ""; break; case ct: this.state = ce; break; default: this.state = U; } } }, { key: "sDTDOpenWakaBang", value: function() { var me = String.fromCodePoint(this.getCodeNorm()), Fe = this.openWakaBang += me; this.text += me, Fe !== "-" && (this.state = Fe === "--" ? V : U, this.openWakaBang = ""); } }, { key: "sDTDComment", value: function() { this.captureToChar(Ge) && (this.text += "-", this.state = re); } }, { key: "sDTDCommentEnding", value: function() { var me = this.getCodeNorm(); this.text += String.fromCodePoint(me), this.state = me === Ge ? ee : V; } }, { key: "sDTDCommentEnded", value: function() { var me = this.getCodeNorm(); this.text += String.fromCodePoint(me), me === pt ? this.state = U : (this.fail("malformed comment."), this.state = V); } }, { key: "sDTDPI", value: function() { this.captureToChar(ct) && (this.text += "?", this.state = ve); } }, { key: "sDTDPIEnding", value: function() { var me = this.getCodeNorm(); this.text += String.fromCodePoint(me), me === pt && (this.state = U); } }, { key: "sText", value: function() { this.tags.length !== 0 ? this.handleTextInRoot() : this.handleTextOutsideRoot(); } }, { key: "sEntity", value: function() { var me = this.i, Fe = this.chunk; e: for (; ; ) switch (this.getCode()) { case E: this.entity += "".concat(Fe.slice(me, this.prevI), ` `), me = this.i; break; case _t: { var Be = this.entityReturnState, dt = this.entity + Fe.slice(me, this.prevI); this.state = Be; var St = void 0; dt === "" ? (this.fail("empty entity name."), St = "&;") : (St = this.parseEntity(dt), this.entity = ""), (Be !== ge || this.textHandler !== void 0) && (this.text += St); break e; } case C: this.entity += Fe.slice(me); break e; } } }, { key: "sOpenWaka", value: function() { var me = this.getCode(); if (i(me)) this.state = Ve, this.unget(), this.xmlDeclPossible = !1; else switch (me) { case rt: this.state = te, this.xmlDeclPossible = !1; break; case ue: this.state = Q, this.openWakaBang = "", this.xmlDeclPossible = !1; break; case ct: this.state = G; break; default: this.fail("disallowed character in tag name"), this.state = ge, this.xmlDeclPossible = !1; } } }, { key: "sOpenWakaBang", value: function() { switch (this.openWakaBang += String.fromCodePoint(this.getCodeNorm()), this.openWakaBang) { case "[CDATA[": !this.sawRoot && !this.reportedTextBeforeRoot && (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0), this.state = se, this.openWakaBang = ""; break; case "--": this.state = he, this.openWakaBang = ""; break; case "DOCTYPE": this.state = $, (this.doctype || this.sawRoot) && this.fail("inappropriately located doctype declaration."), this.openWakaBang = ""; break; default: this.openWakaBang.length >= 7 && this.fail("incorrect syntax."); } } }, { key: "sComment", value: function() { this.captureToChar(Ge) && (this.state = ke); } }, { key: "sCommentEnding", value: function() { var me, Fe = this.getCodeNorm(); Fe === Ge ? (this.state = ne, (me = this.commentHandler) === null || me === void 0 || me.call(this, this.text), this.text = "") : (this.text += "-".concat(String.fromCodePoint(Fe)), this.state = he); } }, { key: "sCommentEnded", value: function() { var me = this.getCodeNorm(); me !== pt ? (this.fail("malformed comment."), this.text += "--".concat(String.fromCodePoint(me)), this.state = he) : this.state = ge; } }, { key: "sCData", value: function() { this.captureToChar(Pt) && (this.state = Ce); } }, { key: "sCDataEnding", value: function() { var me = this.getCodeNorm(); me === Pt ? this.state = q : (this.text += "]".concat(String.fromCodePoint(me)), this.state = se); } }, { key: "sCDataEnding2", value: function() { var me, Fe = this.getCodeNorm(); switch (Fe) { case pt: { (me = this.cdataHandler) === null || me === void 0 || me.call(this, this.text), this.text = "", this.state = ge; break; } case Pt: this.text += "]"; break; default: this.text += "]]".concat(String.fromCodePoint(Fe)), this.state = se; } } // We need this separate state to check the first character fo the pi target // with this.nameStartCheck which allows less characters than this.nameCheck. }, { key: "sPIFirstChar", value: function() { var me = this.getCodeNorm(); this.nameStartCheck(me) ? (this.piTarget += String.fromCodePoint(me), this.state = Y) : me === ct || r(me) ? (this.fail("processing instruction without a target."), this.state = me === ct ? we : fe) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(me), this.state = Y); } }, { key: "sPIRest", value: function() { for (var me = this.chunk, Fe = this.i; ; ) { var Be = this.getCodeNorm(); if (Be === C) { this.piTarget += me.slice(Fe); return; } if (!this.nameCheck(Be)) { this.piTarget += me.slice(Fe, this.prevI); var dt = Be === ct; dt || r(Be) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = dt ? Ue : _e) : this.state = dt ? we : fe : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(Be)); break; } } } }, { key: "sPIBody", value: function() { if (this.text.length === 0) { var me = this.getCodeNorm(); me === ct ? this.state = we : r(me) || (this.text = String.fromCodePoint(me)); } else this.captureToChar(ct) && (this.state = we); } }, { key: "sPIEnding", value: function() { var me, Fe = this.getCodeNorm(); if (Fe === pt) { var Be = this.piTarget; Be.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), (me = this.piHandler) === null || me === void 0 || me.call(this, { target: Be, body: this.text }), this.piTarget = this.text = "", this.state = ge; } else Fe === ct ? this.text += "?" : (this.text += "?".concat(String.fromCodePoint(Fe)), this.state = fe); this.xmlDeclPossible = !1; } }, { key: "sXMLDeclNameStart", value: function() { var me = this.skipSpaces(); if (me === ct) { this.state = Ue; return; } me !== C && (this.state = je, this.name = String.fromCodePoint(me)); } }, { key: "sXMLDeclName", value: function() { var me = this.captureTo(Et); if (me === ct) { this.state = Ue, this.name += this.text, this.text = "", this.fail("XML declaration is incomplete."); return; } if (r(me) || me === Ot) { if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) { case 0: this.fail("did not expect any more name/value pairs."); break; case 1: this.fail("expected the name ".concat(this.xmlDeclExpects[0], ".")); break; default: this.fail("expected one of ".concat(this.xmlDeclExpects.join(", "))); } this.state = me === Ot ? nt : Ye; } } }, { key: "sXMLDeclEq", value: function() { var me = this.getCodeNorm(); if (me === ct) { this.state = Ue, this.fail("XML declaration is incomplete."); return; } r(me) || (me !== Ot && this.fail("value required."), this.state = nt); } }, { key: "sXMLDeclValueStart", value: function() { var me = this.getCodeNorm(); if (me === ct) { this.state = Ue, this.fail("XML declaration is incomplete."); return; } r(me) || (Ct(me) ? this.q = me : (this.fail("value must be quoted."), this.q = Le), this.state = ut); } }, { key: "sXMLDeclValue", value: function() { var me = this.captureTo([this.q, ct]); if (me === ct) { this.state = Ue, this.text = "", this.fail("XML declaration is incomplete."); return; } if (me !== C) { var Fe = this.text; switch (this.text = "", this.name) { case "version": { this.xmlDeclExpects = ["encoding", "standalone"]; var Be = Fe; this.xmlDecl.version = Be, /^1\.[0-9]+$/.test(Be) ? this.opt.forceXMLVersion || this.setXMLVersion(Be) : this.fail("version number must match /^1\\.[0-9]+$/."); break; } case "encoding": /^[A-Za-z][A-Za-z0-9._-]*$/.test(Fe) || this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."), this.xmlDeclExpects = ["standalone"], this.xmlDecl.encoding = Fe; break; case "standalone": Fe !== "yes" && Fe !== "no" && this.fail('standalone value must match "yes" or "no".'), this.xmlDeclExpects = [], this.xmlDecl.standalone = Fe; break; } this.name = "", this.state = ot; } } }, { key: "sXMLDeclSeparator", value: function() { var me = this.getCodeNorm(); if (me === ct) { this.state = Ue; return; } r(me) || (this.fail("whitespace required."), this.unget()), this.state = _e; } }, { key: "sXMLDeclEnding", value: function() { var me, Fe = this.getCodeNorm(); Fe === pt ? (this.piTarget !== "xml" ? this.fail("processing instructions are not allowed before root.") : this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version."), (me = this.xmldeclHandler) === null || me === void 0 || me.call(this, this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = ge) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1; } }, { key: "sOpenTag", value: function() { var me, Fe = this.captureNameChars(); if (Fe !== C) { var Be = this.tag = { name: this.name, attributes: /* @__PURE__ */ Object.create(null) }; switch (this.name = "", this.xmlnsOpt && (this.topNS = Be.ns = /* @__PURE__ */ Object.create(null)), (me = this.openTagStartHandler) === null || me === void 0 || me.call(this, Be), this.sawRoot = !0, !this.fragmentOpt && this.closedRoot && this.fail("documents may contain only one root."), Fe) { case pt: this.openTag(); break; case rt: this.state = Qe; break; default: r(Fe) || this.fail("disallowed character in tag name."), this.state = tt; } } } }, { key: "sOpenTagSlash", value: function() { this.getCode() === pt ? this.openSelfClosingTag() : (this.fail("forward-slash in opening tag not followed by >."), this.state = tt); } }, { key: "sAttrib", value: function() { var me = this.skipSpaces(); me !== C && (i(me) ? (this.unget(), this.state = ae) : me === pt ? this.openTag() : me === rt ? this.state = Qe : this.fail("disallowed character in attribute name.")); } }, { key: "sAttribName", value: function() { var me = this.captureNameChars(); me === Ot ? this.state = be : r(me) ? this.state = Re : me === pt ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : me !== C && this.fail("disallowed character in attribute name."); } }, { key: "sAttribNameSawWhite", value: function() { var me = this.skipSpaces(); switch (me) { case C: return; case Ot: this.state = be; break; default: this.fail("attribute without value."), this.text = "", this.name = "", me === pt ? this.openTag() : i(me) ? (this.unget(), this.state = ae) : (this.fail("disallowed character in attribute name."), this.state = tt); } } }, { key: "sAttribValue", value: function() { var me = this.getCodeNorm(); Ct(me) ? (this.q = me, this.state = Ee) : r(me) || (this.fail("unquoted attribute value."), this.state = Pe, this.unget()); } }, { key: "sAttribValueQuoted", value: function() { for (var me = this.q, Fe = this.chunk, Be = this.i; ; ) switch (this.getCode()) { case me: this.pushAttrib(this.name, this.text + Fe.slice(Be, this.prevI)), this.name = this.text = "", this.q = null, this.state = pe; return; case Ie: this.text += Fe.slice(Be, this.prevI), this.state = oe, this.entityReturnState = Ee; return; case K: case E: case it: this.text += "".concat(Fe.slice(Be, this.prevI), " "), Be = this.i; break; case wt: this.text += Fe.slice(Be, this.prevI), this.fail("disallowed character."); return; case C: this.text += Fe.slice(Be); return; } } }, { key: "sAttribValueClosed", value: function() { var me = this.getCodeNorm(); r(me) ? this.state = tt : me === pt ? this.openTag() : me === rt ? this.state = Qe : i(me) ? (this.fail("no whitespace between attributes."), this.unget(), this.state = ae) : this.fail("disallowed character in attribute name."); } }, { key: "sAttribValueUnquoted", value: function() { var me = this.captureTo(Dr); switch (me) { case Ie: this.state = oe, this.entityReturnState = Pe; break; case wt: this.fail("disallowed character."); break; case C: break; default: this.text.includes("]]>") && this.fail('the string "]]>" is disallowed in char data.'), this.pushAttrib(this.name, this.text), this.name = this.text = "", me === pt ? this.openTag() : this.state = tt; } } }, { key: "sCloseTag", value: function() { var me = this.captureNameChars(); me === pt ? this.closeTag() : r(me) ? this.state = He : me !== C && this.fail("disallowed character in closing tag."); } }, { key: "sCloseTagSawWhite", value: function() { switch (this.skipSpaces()) { case pt: this.closeTag(); break; case C: break; default: this.fail("disallowed character in closing tag."); } } // END OF STATE ENGINE METHODS }, { key: "handleTextInRoot", value: function() { var me = this.i, Fe = this.forbiddenState, Be = this.chunk, dt = this.textHandler; e: for (; ; ) switch (this.getCode()) { case wt: { if (this.state = J, dt !== void 0) { var St = this.text, Ht = Be.slice(me, this.prevI); St.length !== 0 ? (dt(St + Ht), this.text = "") : Ht.length !== 0 && dt(Ht); } Fe = Qt; break e; } case Ie: this.state = oe, this.entityReturnState = ge, dt !== void 0 && (this.text += Be.slice(me, this.prevI)), Fe = Qt; break e; case Pt: switch (Fe) { case Qt: Fe = Xr; break; case Xr: Fe = Fr; break; case Fr: break; default: throw new Error("impossible state"); } break; case pt: Fe === Fr && this.fail('the string "]]>" is disallowed in char data.'), Fe = Qt; break; case E: dt !== void 0 && (this.text += "".concat(Be.slice(me, this.prevI), ` `)), me = this.i, Fe = Qt; break; case C: dt !== void 0 && (this.text += Be.slice(me)); break e; default: Fe = Qt; } this.forbiddenState = Fe; } }, { key: "handleTextOutsideRoot", value: function() { var me = this.i, Fe = this.chunk, Be = this.textHandler, dt = !1; e: for (; ; ) { var St = this.getCode(); switch (St) { case wt: { if (this.state = J, Be !== void 0) { var Ht = this.text, lr = Fe.slice(me, this.prevI); Ht.length !== 0 ? (Be(Ht + lr), this.text = "") : lr.length !== 0 && Be(lr); } break e; } case Ie: this.state = oe, this.entityReturnState = ge, Be !== void 0 && (this.text += Fe.slice(me, this.prevI)), dt = !0; break e; case E: Be !== void 0 && (this.text += "".concat(Fe.slice(me, this.prevI), ` `)), me = this.i; break; case C: Be !== void 0 && (this.text += Fe.slice(me)); break e; default: r(St) || (dt = !0); } } dt && (!this.sawRoot && !this.reportedTextBeforeRoot && (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0)); } }, { key: "pushAttribNS", value: function(me, Fe) { var Be, dt = this.qname(me), St = dt.prefix, Ht = dt.local, lr = { name: me, prefix: St, local: Ht, value: Fe }; if (this.attribList.push(lr), (Be = this.attributeHandler) === null || Be === void 0 || Be.call(this, lr), St === "xmlns") { var gr = Fe.trim(); this.currentXMLVersion === "1.0" && gr === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[Ht] = gr, Or(this, Ht, gr); } else if (me === "xmlns") { var rn = Fe.trim(); this.topNS[""] = rn, Or(this, "", rn); } } }, { key: "pushAttribPlain", value: function(me, Fe) { var Be, dt = { name: me, value: Fe }; this.attribList.push(dt), (Be = this.attributeHandler) === null || Be === void 0 || Be.call(this, dt); } /** * End parsing. This performs final well-formedness checks and resets the * parser to a clean state. * * @returns this */ }, { key: "end", value: function() { var me, Fe; this.sawRoot || this.fail("document must contain a root element."); for (var Be = this.tags; Be.length > 0; ) { var dt = Be.pop(); this.fail("unclosed tag: ".concat(dt.name)); } this.state !== A && this.state !== ge && this.fail("unexpected end."); var St = this.text; return St.length !== 0 && ((me = this.textHandler) === null || me === void 0 || me.call(this, St), this.text = ""), this._closed = !0, (Fe = this.endHandler) === null || Fe === void 0 || Fe.call(this), this._init(), this; } /** * Resolve a namespace prefix. * * @param prefix The prefix to resolve. * * @returns The namespace URI or ``undefined`` if the prefix is not defined. */ }, { key: "resolve", value: function(me) { var Fe, Be, dt = this.topNS[me]; if (dt !== void 0) return dt; for (var St = this.tags, Ht = St.length - 1; Ht >= 0; Ht--) if (dt = St[Ht].ns[me], dt !== void 0) return dt; return dt = this.ns[me], dt !== void 0 ? dt : (Be = (Fe = this.opt).resolvePrefix) === null || Be === void 0 ? void 0 : Be.call(Fe, me); } /** * Parse a qname into its prefix and local name parts. * * @param name The name to parse * * @returns */ }, { key: "qname", value: function(me) { var Fe = me.indexOf(":"); if (Fe === -1) return { prefix: "", local: me }; var Be = me.slice(Fe + 1), dt = me.slice(0, Fe); return (dt === "" || Be === "" || Be.includes(":")) && this.fail("malformed name: ".concat(me, ".")), { prefix: dt, local: Be }; } }, { key: "processAttribsNS", value: function() { var me, Fe = this.attribList, Be = this.tag; { var dt = this.qname(Be.name), St = dt.prefix, Ht = dt.local; Be.prefix = St, Be.local = Ht; var lr = Be.uri = (me = this.resolve(St)) !== null && me !== void 0 ? me : ""; St !== "" && (St === "xmlns" && this.fail('tags may not have "xmlns" as prefix.'), lr === "" && (this.fail("unbound namespace prefix: ".concat(JSON.stringify(St), ".")), Be.uri = St)); } if (Fe.length !== 0) { var gr = Be.attributes, rn = /* @__PURE__ */ new Set(), zr = u(Fe), pi; try { for (zr.s(); !(pi = zr.n()).done; ) { var $r = pi.value, Dn = $r.name, cn = $r.prefix, yi = $r.local, hn = void 0, dn = void 0; cn === "" ? (hn = Dn === "xmlns" ? M : "", dn = Dn) : (hn = this.resolve(cn), hn === void 0 && (this.fail("unbound namespace prefix: ".concat(JSON.stringify(cn), ".")), hn = cn), dn = "{".concat(hn, "}").concat(yi)), rn.has(dn) && this.fail("duplicate attribute: ".concat(dn, ".")), rn.add(dn), $r.uri = hn, gr[Dn] = $r; } } catch (Nn) { zr.e(Nn); } finally { zr.f(); } this.attribList = []; } } }, { key: "processAttribsPlain", value: function() { var me = this.attribList, Fe = this.tag.attributes, Be = u(me), dt; try { for (Be.s(); !(dt = Be.n()).done; ) { var St = dt.value, Ht = St.name, lr = St.value; Fe[Ht] !== void 0 && this.fail("duplicate attribute: ".concat(Ht, ".")), Fe[Ht] = lr; } } catch (gr) { Be.e(gr); } finally { Be.f(); } this.attribList = []; } /** * Handle a complete open tag. This parser code calls this once it has seen * the whole tag. This method checks for well-formeness and then emits * ``onopentag``. */ }, { key: "openTag", value: function() { var me; this.processAttribs(); var Fe = this.tags, Be = this.tag; Be.isSelfClosing = !1, (me = this.openTagHandler) === null || me === void 0 || me.call(this, Be), Fe.push(Be), this.state = ge, this.name = ""; } /** * Handle a complete self-closing tag. This parser code calls this once it has * seen the whole tag. This method checks for well-formeness and then emits * ``onopentag`` and ``onclosetag``. */ }, { key: "openSelfClosingTag", value: function() { var me, Fe, Be; this.processAttribs(); var dt = this.tags, St = this.tag; St.isSelfClosing = !0, (me = this.openTagHandler) === null || me === void 0 || me.call(this, St), (Fe = this.closeTagHandler) === null || Fe === void 0 || Fe.call(this, St); var Ht = this.tag = (Be = dt[dt.length - 1]) !== null && Be !== void 0 ? Be : null; Ht === null && (this.closedRoot = !0), this.state = ge, this.name = ""; } /** * Handle a complete close tag. This parser code calls this once it has seen * the whole tag. This method checks for well-formeness and then emits * ``onclosetag``. */ }, { key: "closeTag", value: function() { var me = this.tags, Fe = this.name; if (this.state = ge, this.name = "", Fe === "") { this.fail("weird empty close tag."), this.text += ""; return; } for (var Be = this.closeTagHandler, dt = me.length; dt-- > 0; ) { var St = this.tag = me.pop(); if (this.topNS = St.ns, Be == null || Be(St), St.name === Fe) break; this.fail("unexpected close tag."); } dt === 0 ? this.closedRoot = !0 : dt < 0 && (this.fail("unmatched closing tag: ".concat(Fe, ".")), this.text += "")); } /** * Resolves an entity. Makes any necessary well-formedness checks. * * @param entity The entity to resolve. * * @returns The parsed entity. */ }, { key: "parseEntity", value: function(me) { if (me[0] !== "#") { var Fe = this.ENTITIES[me]; return Fe !== void 0 ? Fe : (this.fail(this.isName(me) ? "undefined entity." : "disallowed character in entity name."), "&".concat(me, ";")); } var Be = NaN; return me[1] === "x" && /^#x[0-9a-f]+$/i.test(me) ? Be = parseInt(me.slice(2), 16) : /^#[0-9]+$/.test(me) && (Be = parseInt(me.slice(1), 10)), this.isChar(Be) ? String.fromCodePoint(Be) : (this.fail("malformed character entity."), "&".concat(me, ";")); } }, { key: "closed", get: function() { return this._closed; } }, { key: "position", get: function() { return this.chunkPosition + this.i; } /** * The column number of the next character to be read by the parser. * * This field is zero-based. (The first column in a line is 0.) * * This field reports the index at which the next character would be in the * line if the line were represented as a JavaScript string. Note that this * *can* be different to a count based on the number of *Unicode characters* * due to how JavaScript handles astral plane characters. * * See [[column]] for a number that corresponds to a count of Unicode * characters. */ }, { key: "columnIndex", get: function() { return this.position - this.positionAtNewLine; } }]), vt; }(); _.SaxesParser = Ur; }, { "xmlchars/xml/1.0/ed5": 541, "xmlchars/xml/1.1/ed2": 542, "xmlchars/xmlns/1.0/ed3": 543 }], 497: [function(e, x, _) { (function(u) { x.exports = typeof u == "function" ? u : function() { var g = [].slice.apply(arguments); g.splice(1, 0, 0), setTimeout.apply(null, g); }; }).call(this, e("timers").setImmediate); }, { timers: 521 }], 498: [function(e, x, _) { var u = e("safe-buffer").Buffer; function m(g, b) { this._block = u.alloc(g), this._finalSize = b, this._blockSize = g, this._len = 0; } m.prototype.update = function(g, b) { typeof g == "string" && (b = b || "utf8", g = u.from(g, b)); for (var w = this._block, f = this._blockSize, y = g.length, h = this._len, l = 0; l < y; ) { for (var d = h % f, s = Math.min(y - l, f - d), v = 0; v < s; v++) w[d + v] = g[l + v]; h += s, l += s, h % f === 0 && this._update(w); } return this._len += y, this; }, m.prototype.digest = function(g) { var b = this._len % this._blockSize; this._block[b] = 128, this._block.fill(0, b + 1), b >= this._finalSize && (this._update(this._block), this._block.fill(0)); var w = this._len * 8; if (w <= 4294967295) this._block.writeUInt32BE(w, this._blockSize - 4); else { var f = (w & 4294967295) >>> 0, y = (w - f) / 4294967296; this._block.writeUInt32BE(y, this._blockSize - 8), this._block.writeUInt32BE(f, this._blockSize - 4); } this._update(this._block); var h = this._hash(); return g ? h.toString(g) : h; }, m.prototype._update = function() { throw new Error("_update must be implemented by subclass"); }, x.exports = m; }, { "safe-buffer": 494 }], 499: [function(e, x, _) { var u = x.exports = function(g) { g = g.toLowerCase(); var b = u[g]; if (!b) throw new Error(g + " is not supported (we accept pull requests)"); return new b(); }; u.sha = e("./sha"), u.sha1 = e("./sha1"), u.sha224 = e("./sha224"), u.sha256 = e("./sha256"), u.sha384 = e("./sha384"), u.sha512 = e("./sha512"); }, { "./sha": 500, "./sha1": 501, "./sha224": 502, "./sha256": 503, "./sha384": 504, "./sha512": 505 }], 500: [function(e, x, _) { var u = e("inherits"), m = e("./hash"), g = e("safe-buffer").Buffer, b = [1518500249, 1859775393, -1894007588, -899497514], w = new Array(80); function f() { this.init(), this._w = w, m.call(this, 64, 56); } u(f, m), f.prototype.init = function() { return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this; }; function y(d) { return d << 5 | d >>> 27; } function h(d) { return d << 30 | d >>> 2; } function l(d, s, v, c) { return d === 0 ? s & v | ~s & c : d === 2 ? s & v | s & c | v & c : s ^ v ^ c; } f.prototype._update = function(d) { for (var s = this._w, v = this._a | 0, c = this._b | 0, a = this._c | 0, r = this._d | 0, t = this._e | 0, i = 0; i < 16; ++i) s[i] = d.readInt32BE(i * 4); for (; i < 80; ++i) s[i] = s[i - 3] ^ s[i - 8] ^ s[i - 14] ^ s[i - 16]; for (var n = 0; n < 80; ++n) { var o = ~~(n / 20), p = y(v) + l(o, c, a, r) + t + s[n] + b[o] | 0; t = r, r = a, a = h(c), c = v, v = p; } this._a = v + this._a | 0, this._b = c + this._b | 0, this._c = a + this._c | 0, this._d = r + this._d | 0, this._e = t + this._e | 0; }, f.prototype._hash = function() { var d = g.allocUnsafe(20); return d.writeInt32BE(this._a | 0, 0), d.writeInt32BE(this._b | 0, 4), d.writeInt32BE(this._c | 0, 8), d.writeInt32BE(this._d | 0, 12), d.writeInt32BE(this._e | 0, 16), d; }, x.exports = f; }, { "./hash": 498, inherits: 387, "safe-buffer": 494 }], 501: [function(e, x, _) { var u = e("inherits"), m = e("./hash"), g = e("safe-buffer").Buffer, b = [1518500249, 1859775393, -1894007588, -899497514], w = new Array(80); function f() { this.init(), this._w = w, m.call(this, 64, 56); } u(f, m), f.prototype.init = function() { return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this; }; function y(s) { return s << 1 | s >>> 31; } function h(s) { return s << 5 | s >>> 27; } function l(s) { return s << 30 | s >>> 2; } function d(s, v, c, a) { return s === 0 ? v & c | ~v & a : s === 2 ? v & c | v & a | c & a : v ^ c ^ a; } f.prototype._update = function(s) { for (var v = this._w, c = this._a | 0, a = this._b | 0, r = this._c | 0, t = this._d | 0, i = this._e | 0, n = 0; n < 16; ++n) v[n] = s.readInt32BE(n * 4); for (; n < 80; ++n) v[n] = y(v[n - 3] ^ v[n - 8] ^ v[n - 14] ^ v[n - 16]); for (var o = 0; o < 80; ++o) { var p = ~~(o / 20), O = h(c) + d(p, a, r, t) + i + v[o] + b[p] | 0; i = t, t = r, r = l(a), a = c, c = O; } this._a = c + this._a | 0, this._b = a + this._b | 0, this._c = r + this._c | 0, this._d = t + this._d | 0, this._e = i + this._e | 0; }, f.prototype._hash = function() { var s = g.allocUnsafe(20); return s.writeInt32BE(this._a | 0, 0), s.writeInt32BE(this._b | 0, 4), s.writeInt32BE(this._c | 0, 8), s.writeInt32BE(this._d | 0, 12), s.writeInt32BE(this._e | 0, 16), s; }, x.exports = f; }, { "./hash": 498, inherits: 387, "safe-buffer": 494 }], 502: [function(e, x, _) { var u = e("inherits"), m = e("./sha256"), g = e("./hash"), b = e("safe-buffer").Buffer, w = new Array(64); function f() { this.init(), this._w = w, g.call(this, 64, 56); } u(f, m), f.prototype.init = function() { return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this; }, f.prototype._hash = function() { var y = b.allocUnsafe(28); return y.writeInt32BE(this._a, 0), y.writeInt32BE(this._b, 4), y.writeInt32BE(this._c, 8), y.writeInt32BE(this._d, 12), y.writeInt32BE(this._e, 16), y.writeInt32BE(this._f, 20), y.writeInt32BE(this._g, 24), y; }, x.exports = f; }, { "./hash": 498, "./sha256": 503, inherits: 387, "safe-buffer": 494 }], 503: [function(e, x, _) { var u = e("inherits"), m = e("./hash"), g = e("safe-buffer").Buffer, b = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], w = new Array(64); function f() { this.init(), this._w = w, m.call(this, 64, 56); } u(f, m), f.prototype.init = function() { return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this; }; function y(c, a, r) { return r ^ c & (a ^ r); } function h(c, a, r) { return c & a | r & (c | a); } function l(c) { return (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10); } function d(c) { return (c >>> 6 | c << 26) ^ (c >>> 11 | c << 21) ^ (c >>> 25 | c << 7); } function s(c) { return (c >>> 7 | c << 25) ^ (c >>> 18 | c << 14) ^ c >>> 3; } function v(c) { return (c >>> 17 | c << 15) ^ (c >>> 19 | c << 13) ^ c >>> 10; } f.prototype._update = function(c) { for (var a = this._w, r = this._a | 0, t = this._b | 0, i = this._c | 0, n = this._d | 0, o = this._e | 0, p = this._f | 0, O = this._g | 0, P = this._h | 0, F = 0; F < 16; ++F) a[F] = c.readInt32BE(F * 4); for (; F < 64; ++F) a[F] = v(a[F - 2]) + a[F - 7] + s(a[F - 15]) + a[F - 16] | 0; for (var z = 0; z < 64; ++z) { var N = P + d(o) + y(o, p, O) + b[z] + a[z] | 0, M = l(r) + h(r, t, i) | 0; P = O, O = p, p = o, o = n + N | 0, n = i, i = t, t = r, r = N + M | 0; } this._a = r + this._a | 0, this._b = t + this._b | 0, this._c = i + this._c | 0, this._d = n + this._d | 0, this._e = o + this._e | 0, this._f = p + this._f | 0, this._g = O + this._g | 0, this._h = P + this._h | 0; }, f.prototype._hash = function() { var c = g.allocUnsafe(32); return c.writeInt32BE(this._a, 0), c.writeInt32BE(this._b, 4), c.writeInt32BE(this._c, 8), c.writeInt32BE(this._d, 12), c.writeInt32BE(this._e, 16), c.writeInt32BE(this._f, 20), c.writeInt32BE(this._g, 24), c.writeInt32BE(this._h, 28), c; }, x.exports = f; }, { "./hash": 498, inherits: 387, "safe-buffer": 494 }], 504: [function(e, x, _) { var u = e("inherits"), m = e("./sha512"), g = e("./hash"), b = e("safe-buffer").Buffer, w = new Array(160); function f() { this.init(), this._w = w, g.call(this, 128, 112); } u(f, m), f.prototype.init = function() { return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this; }, f.prototype._hash = function() { var y = b.allocUnsafe(48); function h(l, d, s) { y.writeInt32BE(l, s), y.writeInt32BE(d, s + 4); } return h(this._ah, this._al, 0), h(this._bh, this._bl, 8), h(this._ch, this._cl, 16), h(this._dh, this._dl, 24), h(this._eh, this._el, 32), h(this._fh, this._fl, 40), y; }, x.exports = f; }, { "./hash": 498, "./sha512": 505, inherits: 387, "safe-buffer": 494 }], 505: [function(e, x, _) { var u = e("inherits"), m = e("./hash"), g = e("safe-buffer").Buffer, b = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591], w = new Array(160); function f() { this.init(), this._w = w, m.call(this, 128, 112); } u(f, m), f.prototype.init = function() { return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this; }; function y(t, i, n) { return n ^ t & (i ^ n); } function h(t, i, n) { return t & i | n & (t | i); } function l(t, i) { return (t >>> 28 | i << 4) ^ (i >>> 2 | t << 30) ^ (i >>> 7 | t << 25); } function d(t, i) { return (t >>> 14 | i << 18) ^ (t >>> 18 | i << 14) ^ (i >>> 9 | t << 23); } function s(t, i) { return (t >>> 1 | i << 31) ^ (t >>> 8 | i << 24) ^ t >>> 7; } function v(t, i) { return (t >>> 1 | i << 31) ^ (t >>> 8 | i << 24) ^ (t >>> 7 | i << 25); } function c(t, i) { return (t >>> 19 | i << 13) ^ (i >>> 29 | t << 3) ^ t >>> 6; } function a(t, i) { return (t >>> 19 | i << 13) ^ (i >>> 29 | t << 3) ^ (t >>> 6 | i << 26); } function r(t, i) { return t >>> 0 < i >>> 0 ? 1 : 0; } f.prototype._update = function(t) { for (var i = this._w, n = this._ah | 0, o = this._bh | 0, p = this._ch | 0, O = this._dh | 0, P = this._eh | 0, F = this._fh | 0, z = this._gh | 0, N = this._hh | 0, M = this._al | 0, I = this._bl | 0, R = this._cl | 0, C = this._dl | 0, E = this._el | 0, A = this._fl | 0, L = this._gl | 0, $ = this._hl | 0, W = 0; W < 32; W += 2) i[W] = t.readInt32BE(W * 4), i[W + 1] = t.readInt32BE(W * 4 + 4); for (; W < 160; W += 2) { var U = i[W - 30], D = i[W - 15 * 2 + 1], B = s(U, D), j = v(D, U); U = i[W - 2 * 2], D = i[W - 2 * 2 + 1]; var V = c(U, D), re = a(D, U), ee = i[W - 7 * 2], ce = i[W - 7 * 2 + 1], ve = i[W - 16 * 2], ge = i[W - 16 * 2 + 1], oe = j + ce | 0, J = B + ee + r(oe, j) | 0; oe = oe + re | 0, J = J + V + r(oe, re) | 0, oe = oe + ge | 0, J = J + ve + r(oe, ge) | 0, i[W] = J, i[W + 1] = oe; } for (var Q = 0; Q < 160; Q += 2) { J = i[Q], oe = i[Q + 1]; var he = h(n, o, p), ke = h(M, I, R), ne = l(n, M), se = l(M, n), Ce = d(P, E), q = d(E, P), G = b[Q], Y = b[Q + 1], fe = y(P, F, z), we = y(E, A, L), _e = $ + q | 0, je = N + Ce + r(_e, $) | 0; _e = _e + we | 0, je = je + fe + r(_e, we) | 0, _e = _e + Y | 0, je = je + G + r(_e, Y) | 0, _e = _e + oe | 0, je = je + J + r(_e, oe) | 0; var Ye = se + ke | 0, nt = ne + he + r(Ye, se) | 0; N = z, $ = L, z = F, L = A, F = P, A = E, E = C + _e | 0, P = O + je + r(E, C) | 0, O = p, C = R, p = o, R = I, o = n, I = M, M = _e + Ye | 0, n = je + nt + r(M, _e) | 0; } this._al = this._al + M | 0, this._bl = this._bl + I | 0, this._cl = this._cl + R | 0, this._dl = this._dl + C | 0, this._el = this._el + E | 0, this._fl = this._fl + A | 0, this._gl = this._gl + L | 0, this._hl = this._hl + $ | 0, this._ah = this._ah + n + r(this._al, M) | 0, this._bh = this._bh + o + r(this._bl, I) | 0, this._ch = this._ch + p + r(this._cl, R) | 0, this._dh = this._dh + O + r(this._dl, C) | 0, this._eh = this._eh + P + r(this._el, E) | 0, this._fh = this._fh + F + r(this._fl, A) | 0, this._gh = this._gh + z + r(this._gl, L) | 0, this._hh = this._hh + N + r(this._hl, $) | 0; }, f.prototype._hash = function() { var t = g.allocUnsafe(64); function i(n, o, p) { t.writeInt32BE(n, p), t.writeInt32BE(o, p + 4); } return i(this._ah, this._al, 0), i(this._bh, this._bl, 8), i(this._ch, this._cl, 16), i(this._dh, this._dl, 24), i(this._eh, this._el, 32), i(this._fh, this._fl, 40), i(this._gh, this._gl, 48), i(this._hh, this._hl, 56), t; }, x.exports = f; }, { "./hash": 498, inherits: 387, "safe-buffer": 494 }], 506: [function(e, x, _) { x.exports = g; var u = e("events").EventEmitter, m = e("inherits"); m(g, u), g.Readable = e("readable-stream/readable.js"), g.Writable = e("readable-stream/writable.js"), g.Duplex = e("readable-stream/duplex.js"), g.Transform = e("readable-stream/transform.js"), g.PassThrough = e("readable-stream/passthrough.js"), g.Stream = g; function g() { u.call(this); } g.prototype.pipe = function(b, w) { var f = this; function y(a) { b.writable && b.write(a) === !1 && f.pause && f.pause(); } f.on("data", y); function h() { f.readable && f.resume && f.resume(); } b.on("drain", h), !b._isStdio && (!w || w.end !== !1) && (f.on("end", d), f.on("close", s)); var l = !1; function d() { l || (l = !0, b.end()); } function s() { l || (l = !0, typeof b.destroy == "function" && b.destroy()); } function v(a) { if (c(), u.listenerCount(this, "error") === 0) throw a; } f.on("error", v), b.on("error", v); function c() { f.removeListener("data", y), b.removeListener("drain", h), f.removeListener("end", d), f.removeListener("close", s), f.removeListener("error", v), b.removeListener("error", v), f.removeListener("end", c), f.removeListener("close", c), b.removeListener("close", c); } return f.on("end", c), f.on("close", c), b.on("close", c), b.emit("pipe", f), b; }; }, { events: 367, inherits: 387, "readable-stream/duplex.js": 507, "readable-stream/passthrough.js": 516, "readable-stream/readable.js": 517, "readable-stream/transform.js": 518, "readable-stream/writable.js": 519 }], 507: [function(e, x, _) { x.exports = e("./lib/_stream_duplex.js"); }, { "./lib/_stream_duplex.js": 508 }], 508: [function(e, x, _) { var u = e("process-nextick-args"), m = Object.keys || function(v) { var c = []; for (var a in v) c.push(a); return c; }; x.exports = l; var g = Object.create(e("core-util-is")); g.inherits = e("inherits"); var b = e("./_stream_readable"), w = e("./_stream_writable"); g.inherits(l, b); for (var f = m(w.prototype), y = 0; y < f.length; y++) { var h = f[y]; l.prototype[h] || (l.prototype[h] = w.prototype[h]); } function l(v) { if (!(this instanceof l)) return new l(v); b.call(this, v), w.call(this, v), v && v.readable === !1 && (this.readable = !1), v && v.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, v && v.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", d); } Object.defineProperty(l.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.highWaterMark; } }); function d() { this.allowHalfOpen || this._writableState.ended || u.nextTick(s, this); } function s(v) { v.end(); } Object.defineProperty(l.prototype, "destroyed", { get: function() { return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed; }, set: function(c) { this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = c, this._writableState.destroyed = c); } }), l.prototype._destroy = function(v, c) { this.push(null), this.end(), u.nextTick(c, v); }; }, { "./_stream_readable": 510, "./_stream_writable": 512, "core-util-is": 328, inherits: 387, "process-nextick-args": 466 }], 509: [function(e, x, _) { x.exports = g; var u = e("./_stream_transform"), m = Object.create(e("core-util-is")); m.inherits = e("inherits"), m.inherits(g, u); function g(b) { if (!(this instanceof g)) return new g(b); u.call(this, b); } g.prototype._transform = function(b, w, f) { f(null, b); }; }, { "./_stream_transform": 511, "core-util-is": 328, inherits: 387 }], 510: [function(e, x, _) { (function(u, m) { var g = e("process-nextick-args"); x.exports = O; var b = e("isarray"), w; O.ReadableState = p, e("events").EventEmitter; var f = function(Q, he) { return Q.listeners(he).length; }, y = e("./internal/streams/stream"), h = e("safe-buffer").Buffer, l = m.Uint8Array || function() { }; function d(J) { return h.from(J); } function s(J) { return h.isBuffer(J) || J instanceof l; } var v = Object.create(e("core-util-is")); v.inherits = e("inherits"); var c = e("util"), a = void 0; c && c.debuglog ? a = c.debuglog("stream") : a = function() { }; var r = e("./internal/streams/BufferList"), t = e("./internal/streams/destroy"), i; v.inherits(O, y); var n = ["error", "close", "destroy", "pause", "resume"]; function o(J, Q, he) { if (typeof J.prependListener == "function") return J.prependListener(Q, he); !J._events || !J._events[Q] ? J.on(Q, he) : b(J._events[Q]) ? J._events[Q].unshift(he) : J._events[Q] = [he, J._events[Q]]; } function p(J, Q) { w = w || e("./_stream_duplex"), J = J || {}; var he = Q instanceof w; this.objectMode = !!J.objectMode, he && (this.objectMode = this.objectMode || !!J.readableObjectMode); var ke = J.highWaterMark, ne = J.readableHighWaterMark, se = this.objectMode ? 16 : 16 * 1024; ke || ke === 0 ? this.highWaterMark = ke : he && (ne || ne === 0) ? this.highWaterMark = ne : this.highWaterMark = se, this.highWaterMark = Math.floor(this.highWaterMark), this.buffer = new r(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = J.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, J.encoding && (i || (i = e("string_decoder/").StringDecoder), this.decoder = new i(J.encoding), this.encoding = J.encoding); } function O(J) { if (w = w || e("./_stream_duplex"), !(this instanceof O)) return new O(J); this._readableState = new p(J, this), this.readable = !0, J && (typeof J.read == "function" && (this._read = J.read), typeof J.destroy == "function" && (this._destroy = J.destroy)), y.call(this); } Object.defineProperty(O.prototype, "destroyed", { get: function() { return this._readableState === void 0 ? !1 : this._readableState.destroyed; }, set: function(Q) { this._readableState && (this._readableState.destroyed = Q); } }), O.prototype.destroy = t.destroy, O.prototype._undestroy = t.undestroy, O.prototype._destroy = function(J, Q) { this.push(null), Q(J); }, O.prototype.push = function(J, Q) { var he = this._readableState, ke; return he.objectMode ? ke = !0 : typeof J == "string" && (Q = Q || he.defaultEncoding, Q !== he.encoding && (J = h.from(J, Q), Q = ""), ke = !0), P(this, J, Q, !1, ke); }, O.prototype.unshift = function(J) { return P(this, J, null, !0, !1); }; function P(J, Q, he, ke, ne) { var se = J._readableState; if (Q === null) se.reading = !1, C(J, se); else { var Ce; ne || (Ce = z(se, Q)), Ce ? J.emit("error", Ce) : se.objectMode || Q && Q.length > 0 ? (typeof Q != "string" && !se.objectMode && Object.getPrototypeOf(Q) !== h.prototype && (Q = d(Q)), ke ? se.endEmitted ? J.emit("error", new Error("stream.unshift() after end event")) : F(J, se, Q, !0) : se.ended ? J.emit("error", new Error("stream.push() after EOF")) : (se.reading = !1, se.decoder && !he ? (Q = se.decoder.write(Q), se.objectMode || Q.length !== 0 ? F(J, se, Q, !1) : L(J, se)) : F(J, se, Q, !1))) : ke || (se.reading = !1); } return N(se); } function F(J, Q, he, ke) { Q.flowing && Q.length === 0 && !Q.sync ? (J.emit("data", he), J.read(0)) : (Q.length += Q.objectMode ? 1 : he.length, ke ? Q.buffer.unshift(he) : Q.buffer.push(he), Q.needReadable && E(J)), L(J, Q); } function z(J, Q) { var he; return !s(Q) && typeof Q != "string" && Q !== void 0 && !J.objectMode && (he = new TypeError("Invalid non-string/buffer chunk")), he; } function N(J) { return !J.ended && (J.needReadable || J.length < J.highWaterMark || J.length === 0); } O.prototype.isPaused = function() { return this._readableState.flowing === !1; }, O.prototype.setEncoding = function(J) { return i || (i = e("string_decoder/").StringDecoder), this._readableState.decoder = new i(J), this._readableState.encoding = J, this; }; var M = 8388608; function I(J) { return J >= M ? J = M : (J--, J |= J >>> 1, J |= J >>> 2, J |= J >>> 4, J |= J >>> 8, J |= J >>> 16, J++), J; } function R(J, Q) { return J <= 0 || Q.length === 0 && Q.ended ? 0 : Q.objectMode ? 1 : J !== J ? Q.flowing && Q.length ? Q.buffer.head.data.length : Q.length : (J > Q.highWaterMark && (Q.highWaterMark = I(J)), J <= Q.length ? J : Q.ended ? Q.length : (Q.needReadable = !0, 0)); } O.prototype.read = function(J) { a("read", J), J = parseInt(J, 10); var Q = this._readableState, he = J; if (J !== 0 && (Q.emittedReadable = !1), J === 0 && Q.needReadable && (Q.length >= Q.highWaterMark || Q.ended)) return a("read: emitReadable", Q.length, Q.ended), Q.length === 0 && Q.ended ? ve(this) : E(this), null; if (J = R(J, Q), J === 0 && Q.ended) return Q.length === 0 && ve(this), null; var ke = Q.needReadable; a("need readable", ke), (Q.length === 0 || Q.length - J < Q.highWaterMark) && (ke = !0, a("length less than watermark", ke)), Q.ended || Q.reading ? (ke = !1, a("reading or ended", ke)) : ke && (a("do read"), Q.reading = !0, Q.sync = !0, Q.length === 0 && (Q.needReadable = !0), this._read(Q.highWaterMark), Q.sync = !1, Q.reading || (J = R(he, Q))); var ne; return J > 0 ? ne = V(J, Q) : ne = null, ne === null ? (Q.needReadable = !0, J = 0) : Q.length -= J, Q.length === 0 && (Q.ended || (Q.needReadable = !0), he !== J && Q.ended && ve(this)), ne !== null && this.emit("data", ne), ne; }; function C(J, Q) { if (!Q.ended) { if (Q.decoder) { var he = Q.decoder.end(); he && he.length && (Q.buffer.push(he), Q.length += Q.objectMode ? 1 : he.length); } Q.ended = !0, E(J); } } function E(J) { var Q = J._readableState; Q.needReadable = !1, Q.emittedReadable || (a("emitReadable", Q.flowing), Q.emittedReadable = !0, Q.sync ? g.nextTick(A, J) : A(J)); } function A(J) { a("emit readable"), J.emit("readable"), j(J); } function L(J, Q) { Q.readingMore || (Q.readingMore = !0, g.nextTick($, J, Q)); } function $(J, Q) { for (var he = Q.length; !Q.reading && !Q.flowing && !Q.ended && Q.length < Q.highWaterMark && (a("maybeReadMore read 0"), J.read(0), he !== Q.length); ) he = Q.length; Q.readingMore = !1; } O.prototype._read = function(J) { this.emit("error", new Error("_read() is not implemented")); }, O.prototype.pipe = function(J, Q) { var he = this, ke = this._readableState; switch (ke.pipesCount) { case 0: ke.pipes = J; break; case 1: ke.pipes = [ke.pipes, J]; break; default: ke.pipes.push(J); break; } ke.pipesCount += 1, a("pipe count=%d opts=%j", ke.pipesCount, Q); var ne = (!Q || Q.end !== !1) && J !== u.stdout && J !== u.stderr, se = ne ? q : ut; ke.endEmitted ? g.nextTick(se) : he.once("end", se), J.on("unpipe", Ce); function Ce(ot, Ue) { a("onunpipe"), ot === he && Ue && Ue.hasUnpiped === !1 && (Ue.hasUnpiped = !0, fe()); } function q() { a("onend"), J.end(); } var G = W(he); J.on("drain", G); var Y = !1; function fe() { a("cleanup"), J.removeListener("close", Ye), J.removeListener("finish", nt), J.removeListener("drain", G), J.removeListener("error", je), J.removeListener("unpipe", Ce), he.removeListener("end", q), he.removeListener("end", ut), he.removeListener("data", _e), Y = !0, ke.awaitDrain && (!J._writableState || J._writableState.needDrain) && G(); } var we = !1; he.on("data", _e); function _e(ot) { a("ondata"), we = !1; var Ue = J.write(ot); Ue === !1 && !we && ((ke.pipesCount === 1 && ke.pipes === J || ke.pipesCount > 1 && oe(ke.pipes, J) !== -1) && !Y && (a("false write response, pause", he._readableState.awaitDrain), he._readableState.awaitDrain++, we = !0), he.pause()); } function je(ot) { a("onerror", ot), ut(), J.removeListener("error", je), f(J, "error") === 0 && J.emit("error", ot); } o(J, "error", je); function Ye() { J.removeListener("finish", nt), ut(); } J.once("close", Ye); function nt() { a("onfinish"), J.removeListener("close", Ye), ut(); } J.once("finish", nt); function ut() { a("unpipe"), he.unpipe(J); } return J.emit("pipe", he), ke.flowing || (a("pipe resume"), he.resume()), J; }; function W(J) { return function() { var Q = J._readableState; a("pipeOnDrain", Q.awaitDrain), Q.awaitDrain && Q.awaitDrain--, Q.awaitDrain === 0 && f(J, "data") && (Q.flowing = !0, j(J)); }; } O.prototype.unpipe = function(J) { var Q = this._readableState, he = { hasUnpiped: !1 }; if (Q.pipesCount === 0) return this; if (Q.pipesCount === 1) return J && J !== Q.pipes ? this : (J || (J = Q.pipes), Q.pipes = null, Q.pipesCount = 0, Q.flowing = !1, J && J.emit("unpipe", this, he), this); if (!J) { var ke = Q.pipes, ne = Q.pipesCount; Q.pipes = null, Q.pipesCount = 0, Q.flowing = !1; for (var se = 0; se < ne; se++) ke[se].emit("unpipe", this, he); return this; } var Ce = oe(Q.pipes, J); return Ce === -1 ? this : (Q.pipes.splice(Ce, 1), Q.pipesCount -= 1, Q.pipesCount === 1 && (Q.pipes = Q.pipes[0]), J.emit("unpipe", this, he), this); }, O.prototype.on = function(J, Q) { var he = y.prototype.on.call(this, J, Q); if (J === "data") this._readableState.flowing !== !1 && this.resume(); else if (J === "readable") { var ke = this._readableState; !ke.endEmitted && !ke.readableListening && (ke.readableListening = ke.needReadable = !0, ke.emittedReadable = !1, ke.reading ? ke.length && E(this) : g.nextTick(U, this)); } return he; }, O.prototype.addListener = O.prototype.on; function U(J) { a("readable nexttick read 0"), J.read(0); } O.prototype.resume = function() { var J = this._readableState; return J.flowing || (a("resume"), J.flowing = !0, D(this, J)), this; }; function D(J, Q) { Q.resumeScheduled || (Q.resumeScheduled = !0, g.nextTick(B, J, Q)); } function B(J, Q) { Q.reading || (a("resume read 0"), J.read(0)), Q.resumeScheduled = !1, Q.awaitDrain = 0, J.emit("resume"), j(J), Q.flowing && !Q.reading && J.read(0); } O.prototype.pause = function() { return a("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (a("pause"), this._readableState.flowing = !1, this.emit("pause")), this; }; function j(J) { var Q = J._readableState; for (a("flow", Q.flowing); Q.flowing && J.read() !== null; ) ; } O.prototype.wrap = function(J) { var Q = this, he = this._readableState, ke = !1; J.on("end", function() { if (a("wrapped end"), he.decoder && !he.ended) { var Ce = he.decoder.end(); Ce && Ce.length && Q.push(Ce); } Q.push(null); }), J.on("data", function(Ce) { if (a("wrapped data"), he.decoder && (Ce = he.decoder.write(Ce)), !(he.objectMode && Ce == null) && !(!he.objectMode && (!Ce || !Ce.length))) { var q = Q.push(Ce); q || (ke = !0, J.pause()); } }); for (var ne in J) this[ne] === void 0 && typeof J[ne] == "function" && (this[ne] = function(Ce) { return function() { return J[Ce].apply(J, arguments); }; }(ne)); for (var se = 0; se < n.length; se++) J.on(n[se], this.emit.bind(this, n[se])); return this._read = function(Ce) { a("wrapped _read", Ce), ke && (ke = !1, J.resume()); }, this; }, Object.defineProperty(O.prototype, "readableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._readableState.highWaterMark; } }), O._fromList = V; function V(J, Q) { if (Q.length === 0) return null; var he; return Q.objectMode ? he = Q.buffer.shift() : !J || J >= Q.length ? (Q.decoder ? he = Q.buffer.join("") : Q.buffer.length === 1 ? he = Q.buffer.head.data : he = Q.buffer.concat(Q.length), Q.buffer.clear()) : he = re(J, Q.buffer, Q.decoder), he; } function re(J, Q, he) { var ke; return J < Q.head.data.length ? (ke = Q.head.data.slice(0, J), Q.head.data = Q.head.data.slice(J)) : J === Q.head.data.length ? ke = Q.shift() : ke = he ? ee(J, Q) : ce(J, Q), ke; } function ee(J, Q) { var he = Q.head, ke = 1, ne = he.data; for (J -= ne.length; he = he.next; ) { var se = he.data, Ce = J > se.length ? se.length : J; if (Ce === se.length ? ne += se : ne += se.slice(0, J), J -= Ce, J === 0) { Ce === se.length ? (++ke, he.next ? Q.head = he.next : Q.head = Q.tail = null) : (Q.head = he, he.data = se.slice(Ce)); break; } ++ke; } return Q.length -= ke, ne; } function ce(J, Q) { var he = h.allocUnsafe(J), ke = Q.head, ne = 1; for (ke.data.copy(he), J -= ke.data.length; ke = ke.next; ) { var se = ke.data, Ce = J > se.length ? se.length : J; if (se.copy(he, he.length - J, 0, Ce), J -= Ce, J === 0) { Ce === se.length ? (++ne, ke.next ? Q.head = ke.next : Q.head = Q.tail = null) : (Q.head = ke, ke.data = se.slice(Ce)); break; } ++ne; } return Q.length -= ne, he; } function ve(J) { var Q = J._readableState; if (Q.length > 0) throw new Error('"endReadable()" called on non-empty stream'); Q.endEmitted || (Q.ended = !0, g.nextTick(ge, Q, J)); } function ge(J, Q) { !J.endEmitted && J.length === 0 && (J.endEmitted = !0, Q.readable = !1, Q.emit("end")); } function oe(J, Q) { for (var he = 0, ke = J.length; he < ke; he++) if (J[he] === Q) return he; return -1; } }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { "./_stream_duplex": 508, "./internal/streams/BufferList": 513, "./internal/streams/destroy": 514, "./internal/streams/stream": 515, _process: 467, "core-util-is": 328, events: 367, inherits: 387, isarray: 389, "process-nextick-args": 466, "safe-buffer": 494, "string_decoder/": 520, util: 185 }], 511: [function(e, x, _) { x.exports = b; var u = e("./_stream_duplex"), m = Object.create(e("core-util-is")); m.inherits = e("inherits"), m.inherits(b, u); function g(y, h) { var l = this._transformState; l.transforming = !1; var d = l.writecb; if (!d) return this.emit("error", new Error("write callback called multiple times")); l.writechunk = null, l.writecb = null, h != null && this.push(h), d(y); var s = this._readableState; s.reading = !1, (s.needReadable || s.length < s.highWaterMark) && this._read(s.highWaterMark); } function b(y) { if (!(this instanceof b)) return new b(y); u.call(this, y), this._transformState = { afterTransform: g.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, y && (typeof y.transform == "function" && (this._transform = y.transform), typeof y.flush == "function" && (this._flush = y.flush)), this.on("prefinish", w); } function w() { var y = this; typeof this._flush == "function" ? this._flush(function(h, l) { f(y, h, l); }) : f(this, null, null); } b.prototype.push = function(y, h) { return this._transformState.needTransform = !1, u.prototype.push.call(this, y, h); }, b.prototype._transform = function(y, h, l) { throw new Error("_transform() is not implemented"); }, b.prototype._write = function(y, h, l) { var d = this._transformState; if (d.writecb = l, d.writechunk = y, d.writeencoding = h, !d.transforming) { var s = this._readableState; (d.needTransform || s.needReadable || s.length < s.highWaterMark) && this._read(s.highWaterMark); } }, b.prototype._read = function(y) { var h = this._transformState; h.writechunk !== null && h.writecb && !h.transforming ? (h.transforming = !0, this._transform(h.writechunk, h.writeencoding, h.afterTransform)) : h.needTransform = !0; }, b.prototype._destroy = function(y, h) { var l = this; u.prototype._destroy.call(this, y, function(d) { h(d), l.emit("close"); }); }; function f(y, h, l) { if (h) return y.emit("error", h); if (l != null && y.push(l), y._writableState.length) throw new Error("Calling transform done when ws.length != 0"); if (y._transformState.transforming) throw new Error("Calling transform done when still transforming"); return y.push(null); } }, { "./_stream_duplex": 508, "core-util-is": 328, inherits: 387 }], 512: [function(e, x, _) { (function(u, m, g) { var b = e("process-nextick-args"); x.exports = o; function w(B) { var j = this; this.next = null, this.entry = null, this.finish = function() { D(j, B); }; } var f = !u.browser && ["v0.10", "v0.9."].indexOf(u.version.slice(0, 5)) > -1 ? g : b.nextTick, y; o.WritableState = i; var h = Object.create(e("core-util-is")); h.inherits = e("inherits"); var l = { deprecate: e("util-deprecate") }, d = e("./internal/streams/stream"), s = e("safe-buffer").Buffer, v = m.Uint8Array || function() { }; function c(B) { return s.from(B); } function a(B) { return s.isBuffer(B) || B instanceof v; } var r = e("./internal/streams/destroy"); h.inherits(o, d); function t() { } function i(B, j) { y = y || e("./_stream_duplex"), B = B || {}; var V = j instanceof y; this.objectMode = !!B.objectMode, V && (this.objectMode = this.objectMode || !!B.writableObjectMode); var re = B.highWaterMark, ee = B.writableHighWaterMark, ce = this.objectMode ? 16 : 16 * 1024; re || re === 0 ? this.highWaterMark = re : V && (ee || ee === 0) ? this.highWaterMark = ee : this.highWaterMark = ce, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; var ve = B.decodeStrings === !1; this.decodeStrings = !ve, this.defaultEncoding = B.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(ge) { I(j, ge); }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new w(this); } i.prototype.getBuffer = function() { for (var j = this.bufferedRequest, V = []; j; ) V.push(j), j = j.next; return V; }, function() { try { Object.defineProperty(i.prototype, "buffer", { get: l.deprecate(function() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (B) { } }(); var n; typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (n = Function.prototype[Symbol.hasInstance], Object.defineProperty(o, Symbol.hasInstance, { value: function(j) { return n.call(this, j) ? !0 : this !== o ? !1 : j && j._writableState instanceof i; } })) : n = function(j) { return j instanceof this; }; function o(B) { if (y = y || e("./_stream_duplex"), !n.call(o, this) && !(this instanceof y)) return new o(B); this._writableState = new i(B, this), this.writable = !0, B && (typeof B.write == "function" && (this._write = B.write), typeof B.writev == "function" && (this._writev = B.writev), typeof B.destroy == "function" && (this._destroy = B.destroy), typeof B.final == "function" && (this._final = B.final)), d.call(this); } o.prototype.pipe = function() { this.emit("error", new Error("Cannot pipe, not readable")); }; function p(B, j) { var V = new Error("write after end"); B.emit("error", V), b.nextTick(j, V); } function O(B, j, V, re) { var ee = !0, ce = !1; return V === null ? ce = new TypeError("May not write null values to stream") : typeof V != "string" && V !== void 0 && !j.objectMode && (ce = new TypeError("Invalid non-string/buffer chunk")), ce && (B.emit("error", ce), b.nextTick(re, ce), ee = !1), ee; } o.prototype.write = function(B, j, V) { var re = this._writableState, ee = !1, ce = !re.objectMode && a(B); return ce && !s.isBuffer(B) && (B = c(B)), typeof j == "function" && (V = j, j = null), ce ? j = "buffer" : j || (j = re.defaultEncoding), typeof V != "function" && (V = t), re.ended ? p(this, V) : (ce || O(this, re, B, V)) && (re.pendingcb++, ee = F(this, re, ce, B, j, V)), ee; }, o.prototype.cork = function() { var B = this._writableState; B.corked++; }, o.prototype.uncork = function() { var B = this._writableState; B.corked && (B.corked--, !B.writing && !B.corked && !B.finished && !B.bufferProcessing && B.bufferedRequest && E(this, B)); }, o.prototype.setDefaultEncoding = function(j) { if (typeof j == "string" && (j = j.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((j + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + j); return this._writableState.defaultEncoding = j, this; }; function P(B, j, V) { return !B.objectMode && B.decodeStrings !== !1 && typeof j == "string" && (j = s.from(j, V)), j; } Object.defineProperty(o.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: !1, get: function() { return this._writableState.highWaterMark; } }); function F(B, j, V, re, ee, ce) { if (!V) { var ve = P(j, re, ee); re !== ve && (V = !0, ee = "buffer", re = ve); } var ge = j.objectMode ? 1 : re.length; j.length += ge; var oe = j.length < j.highWaterMark; if (oe || (j.needDrain = !0), j.writing || j.corked) { var J = j.lastBufferedRequest; j.lastBufferedRequest = { chunk: re, encoding: ee, isBuf: V, callback: ce, next: null }, J ? J.next = j.lastBufferedRequest : j.bufferedRequest = j.lastBufferedRequest, j.bufferedRequestCount += 1; } else z(B, j, !1, ge, re, ee, ce); return oe; } function z(B, j, V, re, ee, ce, ve) { j.writelen = re, j.writecb = ve, j.writing = !0, j.sync = !0, V ? B._writev(ee, j.onwrite) : B._write(ee, ce, j.onwrite), j.sync = !1; } function N(B, j, V, re, ee) { --j.pendingcb, V ? (b.nextTick(ee, re), b.nextTick(W, B, j), B._writableState.errorEmitted = !0, B.emit("error", re)) : (ee(re), B._writableState.errorEmitted = !0, B.emit("error", re), W(B, j)); } function M(B) { B.writing = !1, B.writecb = null, B.length -= B.writelen, B.writelen = 0; } function I(B, j) { var V = B._writableState, re = V.sync, ee = V.writecb; if (M(V), j) N(B, V, re, j, ee); else { var ce = A(V); !ce && !V.corked && !V.bufferProcessing && V.bufferedRequest && E(B, V), re ? f(R, B, V, ce, ee) : R(B, V, ce, ee); } } function R(B, j, V, re) { V || C(B, j), j.pendingcb--, re(), W(B, j); } function C(B, j) { j.length === 0 && j.needDrain && (j.needDrain = !1, B.emit("drain")); } function E(B, j) { j.bufferProcessing = !0; var V = j.bufferedRequest; if (B._writev && V && V.next) { var re = j.bufferedRequestCount, ee = new Array(re), ce = j.corkedRequestsFree; ce.entry = V; for (var ve = 0, ge = !0; V; ) ee[ve] = V, V.isBuf || (ge = !1), V = V.next, ve += 1; ee.allBuffers = ge, z(B, j, !0, j.length, ee, "", ce.finish), j.pendingcb++, j.lastBufferedRequest = null, ce.next ? (j.corkedRequestsFree = ce.next, ce.next = null) : j.corkedRequestsFree = new w(j), j.bufferedRequestCount = 0; } else { for (; V; ) { var oe = V.chunk, J = V.encoding, Q = V.callback, he = j.objectMode ? 1 : oe.length; if (z(B, j, !1, he, oe, J, Q), V = V.next, j.bufferedRequestCount--, j.writing) break; } V === null && (j.lastBufferedRequest = null); } j.bufferedRequest = V, j.bufferProcessing = !1; } o.prototype._write = function(B, j, V) { V(new Error("_write() is not implemented")); }, o.prototype._writev = null, o.prototype.end = function(B, j, V) { var re = this._writableState; typeof B == "function" ? (V = B, B = null, j = null) : typeof j == "function" && (V = j, j = null), B != null && this.write(B, j), re.corked && (re.corked = 1, this.uncork()), !re.ending && !re.finished && U(this, re, V); }; function A(B) { return B.ending && B.length === 0 && B.bufferedRequest === null && !B.finished && !B.writing; } function L(B, j) { B._final(function(V) { j.pendingcb--, V && B.emit("error", V), j.prefinished = !0, B.emit("prefinish"), W(B, j); }); } function $(B, j) { !j.prefinished && !j.finalCalled && (typeof B._final == "function" ? (j.pendingcb++, j.finalCalled = !0, b.nextTick(L, B, j)) : (j.prefinished = !0, B.emit("prefinish"))); } function W(B, j) { var V = A(j); return V && ($(B, j), j.pendingcb === 0 && (j.finished = !0, B.emit("finish"))), V; } function U(B, j, V) { j.ending = !0, W(B, j), V && (j.finished ? b.nextTick(V) : B.once("finish", V)), j.ended = !0, B.writable = !1; } function D(B, j, V) { var re = B.entry; for (B.entry = null; re; ) { var ee = re.callback; j.pendingcb--, ee(V), re = re.next; } j.corkedRequestsFree ? j.corkedRequestsFree.next = B : j.corkedRequestsFree = B; } Object.defineProperty(o.prototype, "destroyed", { get: function() { return this._writableState === void 0 ? !1 : this._writableState.destroyed; }, set: function(j) { this._writableState && (this._writableState.destroyed = j); } }), o.prototype.destroy = r.destroy, o.prototype._undestroy = r.undestroy, o.prototype._destroy = function(B, j) { this.end(), j(B); }; }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}, e("timers").setImmediate); }, { "./_stream_duplex": 508, "./internal/streams/destroy": 514, "./internal/streams/stream": 515, _process: 467, "core-util-is": 328, inherits: 387, "process-nextick-args": 466, "safe-buffer": 494, timers: 521, "util-deprecate": 522 }], 513: [function(e, x, _) { function u(w, f) { if (!(w instanceof f)) throw new TypeError("Cannot call a class as a function"); } var m = e("safe-buffer").Buffer, g = e("util"); function b(w, f, y) { w.copy(f, y); } x.exports = function() { function w() { u(this, w), this.head = null, this.tail = null, this.length = 0; } return w.prototype.push = function(y) { var h = { data: y, next: null }; this.length > 0 ? this.tail.next = h : this.head = h, this.tail = h, ++this.length; }, w.prototype.unshift = function(y) { var h = { data: y, next: this.head }; this.length === 0 && (this.tail = h), this.head = h, ++this.length; }, w.prototype.shift = function() { if (this.length !== 0) { var y = this.head.data; return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, y; } }, w.prototype.clear = function() { this.head = this.tail = null, this.length = 0; }, w.prototype.join = function(y) { if (this.length === 0) return ""; for (var h = this.head, l = "" + h.data; h = h.next; ) l += y + h.data; return l; }, w.prototype.concat = function(y) { if (this.length === 0) return m.alloc(0); if (this.length === 1) return this.head.data; for (var h = m.allocUnsafe(y >>> 0), l = this.head, d = 0; l; ) b(l.data, h, d), d += l.data.length, l = l.next; return h; }, w; }(), g && g.inspect && g.inspect.custom && (x.exports.prototype[g.inspect.custom] = function() { var w = g.inspect({ length: this.length }); return this.constructor.name + " " + w; }); }, { "safe-buffer": 494, util: 185 }], 514: [function(e, x, _) { var u = e("process-nextick-args"); function m(w, f) { var y = this, h = this._readableState && this._readableState.destroyed, l = this._writableState && this._writableState.destroyed; return h || l ? (f ? f(w) : w && (!this._writableState || !this._writableState.errorEmitted) && u.nextTick(b, this, w), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(w || null, function(d) { !f && d ? (u.nextTick(b, y, d), y._writableState && (y._writableState.errorEmitted = !0)) : f && f(d); }), this); } function g() { this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1); } function b(w, f) { w.emit("error", f); } x.exports = { destroy: m, undestroy: g }; }, { "process-nextick-args": 466 }], 515: [function(e, x, _) { arguments[4][490][0].apply(_, arguments); }, { dup: 490, events: 367 }], 516: [function(e, x, _) { x.exports = e("./readable").PassThrough; }, { "./readable": 517 }], 517: [function(e, x, _) { _ = x.exports = e("./lib/_stream_readable.js"), _.Stream = _, _.Readable = _, _.Writable = e("./lib/_stream_writable.js"), _.Duplex = e("./lib/_stream_duplex.js"), _.Transform = e("./lib/_stream_transform.js"), _.PassThrough = e("./lib/_stream_passthrough.js"); }, { "./lib/_stream_duplex.js": 508, "./lib/_stream_passthrough.js": 509, "./lib/_stream_readable.js": 510, "./lib/_stream_transform.js": 511, "./lib/_stream_writable.js": 512 }], 518: [function(e, x, _) { x.exports = e("./readable").Transform; }, { "./readable": 517 }], 519: [function(e, x, _) { x.exports = e("./lib/_stream_writable.js"); }, { "./lib/_stream_writable.js": 512 }], 520: [function(e, x, _) { var u = e("safe-buffer").Buffer, m = u.isEncoding || function(n) { switch (n = "" + n, n && n.toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": case "raw": return !0; default: return !1; } }; function g(n) { if (!n) return "utf8"; for (var o; ; ) switch (n) { case "utf8": case "utf-8": return "utf8"; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return "utf16le"; case "latin1": case "binary": return "latin1"; case "base64": case "ascii": case "hex": return n; default: if (o) return; n = ("" + n).toLowerCase(), o = !0; } } function b(n) { var o = g(n); if (typeof o != "string" && (u.isEncoding === m || !m(n))) throw new Error("Unknown encoding: " + n); return o || n; } _.StringDecoder = w; function w(n) { this.encoding = b(n); var o; switch (this.encoding) { case "utf16le": this.text = v, this.end = c, o = 4; break; case "utf8": this.fillLast = l, o = 4; break; case "base64": this.text = a, this.end = r, o = 3; break; default: this.write = t, this.end = i; return; } this.lastNeed = 0, this.lastTotal = 0, this.lastChar = u.allocUnsafe(o); } w.prototype.write = function(n) { if (n.length === 0) return ""; var o, p; if (this.lastNeed) { if (o = this.fillLast(n), o === void 0) return ""; p = this.lastNeed, this.lastNeed = 0; } else p = 0; return p < n.length ? o ? o + this.text(n, p) : this.text(n, p) : o || ""; }, w.prototype.end = s, w.prototype.text = d, w.prototype.fillLast = function(n) { if (this.lastNeed <= n.length) return n.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); n.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, n.length), this.lastNeed -= n.length; }; function f(n) { return n <= 127 ? 0 : n >> 5 === 6 ? 2 : n >> 4 === 14 ? 3 : n >> 3 === 30 ? 4 : n >> 6 === 2 ? -1 : -2; } function y(n, o, p) { var O = o.length - 1; if (O < p) return 0; var P = f(o[O]); return P >= 0 ? (P > 0 && (n.lastNeed = P - 1), P) : --O < p || P === -2 ? 0 : (P = f(o[O]), P >= 0 ? (P > 0 && (n.lastNeed = P - 2), P) : --O < p || P === -2 ? 0 : (P = f(o[O]), P >= 0 ? (P > 0 && (P === 2 ? P = 0 : n.lastNeed = P - 3), P) : 0)); } function h(n, o, p) { if ((o[0] & 192) !== 128) return n.lastNeed = 0, "�"; if (n.lastNeed > 1 && o.length > 1) { if ((o[1] & 192) !== 128) return n.lastNeed = 1, "�"; if (n.lastNeed > 2 && o.length > 2 && (o[2] & 192) !== 128) return n.lastNeed = 2, "�"; } } function l(n) { var o = this.lastTotal - this.lastNeed, p = h(this, n); if (p !== void 0) return p; if (this.lastNeed <= n.length) return n.copy(this.lastChar, o, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); n.copy(this.lastChar, o, 0, n.length), this.lastNeed -= n.length; } function d(n, o) { var p = y(this, n, o); if (!this.lastNeed) return n.toString("utf8", o); this.lastTotal = p; var O = n.length - (p - this.lastNeed); return n.copy(this.lastChar, 0, O), n.toString("utf8", o, O); } function s(n) { var o = n && n.length ? this.write(n) : ""; return this.lastNeed ? o + "�" : o; } function v(n, o) { if ((n.length - o) % 2 === 0) { var p = n.toString("utf16le", o); if (p) { var O = p.charCodeAt(p.length - 1); if (O >= 55296 && O <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = n[n.length - 2], this.lastChar[1] = n[n.length - 1], p.slice(0, -1); } return p; } return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = n[n.length - 1], n.toString("utf16le", o, n.length - 1); } function c(n) { var o = n && n.length ? this.write(n) : ""; if (this.lastNeed) { var p = this.lastTotal - this.lastNeed; return o + this.lastChar.toString("utf16le", 0, p); } return o; } function a(n, o) { var p = (n.length - o) % 3; return p === 0 ? n.toString("base64", o) : (this.lastNeed = 3 - p, this.lastTotal = 3, p === 1 ? this.lastChar[0] = n[n.length - 1] : (this.lastChar[0] = n[n.length - 2], this.lastChar[1] = n[n.length - 1]), n.toString("base64", o, n.length - p)); } function r(n) { var o = n && n.length ? this.write(n) : ""; return this.lastNeed ? o + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : o; } function t(n) { return n.toString(this.encoding); } function i(n) { return n && n.length ? this.write(n) : ""; } }, { "safe-buffer": 494 }], 521: [function(e, x, _) { (function(u, m) { var g = e("process/browser.js").nextTick, b = Function.prototype.apply, w = Array.prototype.slice, f = {}, y = 0; _.setTimeout = function() { return new h(b.call(setTimeout, window, arguments), clearTimeout); }, _.setInterval = function() { return new h(b.call(setInterval, window, arguments), clearInterval); }, _.clearTimeout = _.clearInterval = function(l) { l.close(); }; function h(l, d) { this._id = l, this._clearFn = d; } h.prototype.unref = h.prototype.ref = function() { }, h.prototype.close = function() { this._clearFn.call(window, this._id); }, _.enroll = function(l, d) { clearTimeout(l._idleTimeoutId), l._idleTimeout = d; }, _.unenroll = function(l) { clearTimeout(l._idleTimeoutId), l._idleTimeout = -1; }, _._unrefActive = _.active = function(l) { clearTimeout(l._idleTimeoutId); var d = l._idleTimeout; d >= 0 && (l._idleTimeoutId = setTimeout(function() { l._onTimeout && l._onTimeout(); }, d)); }, _.setImmediate = typeof u == "function" ? u : function(l) { var d = y++, s = arguments.length < 2 ? !1 : w.call(arguments, 1); return f[d] = !0, g(function() { f[d] && (s ? l.apply(null, s) : l.call(null), _.clearImmediate(d)); }), d; }, _.clearImmediate = typeof m == "function" ? m : function(l) { delete f[l]; }; }).call(this, e("timers").setImmediate, e("timers").clearImmediate); }, { "process/browser.js": 467, timers: 521 }], 522: [function(e, x, _) { (function(u) { x.exports = m; function m(b, w) { if (g("noDeprecation")) return b; var f = !1; function y() { if (!f) { if (g("throwDeprecation")) throw new Error(w); g("traceDeprecation") ? console.trace(w) : console.warn(w), f = !0; } return b.apply(this, arguments); } return y; } function g(b) { try { if (!u.localStorage) return !1; } catch (f) { return !1; } var w = u.localStorage[b]; return w == null ? !1 : String(w).toLowerCase() === "true"; } }).call(this, typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, {}], 523: [function(e, x, _) { typeof Object.create == "function" ? x.exports = function(m, g) { m.super_ = g, m.prototype = Object.create(g.prototype, { constructor: { value: m, enumerable: !1, writable: !0, configurable: !0 } }); } : x.exports = function(m, g) { m.super_ = g; var b = function() { }; b.prototype = g.prototype, m.prototype = new b(), m.prototype.constructor = m; }; }, {}], 524: [function(e, x, _) { function u(m) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? u = function(b) { return typeof b; } : u = function(b) { return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b; }, u(m); } x.exports = function(g) { return g && u(g) === "object" && typeof g.copy == "function" && typeof g.fill == "function" && typeof g.readUInt8 == "function"; }; }, {}], 525: [function(e, x, _) { (function(u, m) { function g(D) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? g = function(j) { return typeof j; } : g = function(j) { return j && typeof Symbol == "function" && j.constructor === Symbol && j !== Symbol.prototype ? "symbol" : typeof j; }, g(D); } var b = /%[sdj%]/g; _.format = function(D) { if (!P(D)) { for (var B = [], j = 0; j < arguments.length; j++) B.push(y(arguments[j])); return B.join(" "); } for (var j = 1, V = arguments, re = V.length, ee = String(D).replace(b, function(ve) { if (ve === "%%") return "%"; if (j >= re) return ve; switch (ve) { case "%s": return String(V[j++]); case "%d": return Number(V[j++]); case "%j": try { return JSON.stringify(V[j++]); } catch (ge) { return "[Circular]"; } default: return ve; } }), ce = V[j]; j < re; ce = V[++j]) o(ce) || !M(ce) ? ee += " " + ce : ee += " " + y(ce); return ee; }, _.deprecate = function(D, B) { if (z(m.process)) return function() { return _.deprecate(D, B).apply(this, arguments); }; if (u.noDeprecation === !0) return D; var j = !1; function V() { if (!j) { if (u.throwDeprecation) throw new Error(B); u.traceDeprecation ? console.trace(B) : console.error(B), j = !0; } return D.apply(this, arguments); } return V; }; var w = {}, f; _.debuglog = function(D) { if (z(f) && (f = u.env.NODE_DEBUG || ""), D = D.toUpperCase(), !w[D]) if (new RegExp("\\b" + D + "\\b", "i").test(f)) { var B = u.pid; w[D] = function() { var j = _.format.apply(_, arguments); console.error("%s %d: %s", D, B, j); }; } else w[D] = function() { }; return w[D]; }; function y(D, B) { var j = { seen: [], stylize: l }; return arguments.length >= 3 && (j.depth = arguments[2]), arguments.length >= 4 && (j.colors = arguments[3]), n(B) ? j.showHidden = B : B && _._extend(j, B), z(j.showHidden) && (j.showHidden = !1), z(j.depth) && (j.depth = 2), z(j.colors) && (j.colors = !1), z(j.customInspect) && (j.customInspect = !0), j.colors && (j.stylize = h), s(j, D, j.depth); } _.inspect = y, y.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, y.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", // "name": intentionally not styling regexp: "red" }; function h(D, B) { var j = y.styles[B]; return j ? "\x1B[" + y.colors[j][0] + "m" + D + "\x1B[" + y.colors[j][1] + "m" : D; } function l(D, B) { return D; } function d(D) { var B = {}; return D.forEach(function(j, V) { B[j] = !0; }), B; } function s(D, B, j) { if (D.customInspect && B && C(B.inspect) && // Filter out the util module, it's inspect function is special B.inspect !== _.inspect && // Also filter out any prototype objects using the circular check. !(B.constructor && B.constructor.prototype === B)) { var V = B.inspect(j, D); return P(V) || (V = s(D, V, j)), V; } var re = v(D, B); if (re) return re; var ee = Object.keys(B), ce = d(ee); if (D.showHidden && (ee = Object.getOwnPropertyNames(B)), R(B) && (ee.indexOf("message") >= 0 || ee.indexOf("description") >= 0)) return c(B); if (ee.length === 0) { if (C(B)) { var ve = B.name ? ": " + B.name : ""; return D.stylize("[Function" + ve + "]", "special"); } if (N(B)) return D.stylize(RegExp.prototype.toString.call(B), "regexp"); if (I(B)) return D.stylize(Date.prototype.toString.call(B), "date"); if (R(B)) return c(B); } var ge = "", oe = !1, J = ["{", "}"]; if (i(B) && (oe = !0, J = ["[", "]"]), C(B)) { var Q = B.name ? ": " + B.name : ""; ge = " [Function" + Q + "]"; } if (N(B) && (ge = " " + RegExp.prototype.toString.call(B)), I(B) && (ge = " " + Date.prototype.toUTCString.call(B)), R(B) && (ge = " " + c(B)), ee.length === 0 && (!oe || B.length == 0)) return J[0] + ge + J[1]; if (j < 0) return N(B) ? D.stylize(RegExp.prototype.toString.call(B), "regexp") : D.stylize("[Object]", "special"); D.seen.push(B); var he; return oe ? he = a(D, B, j, ce, ee) : he = ee.map(function(ke) { return r(D, B, j, ce, ke, oe); }), D.seen.pop(), t(he, ge, J); } function v(D, B) { if (z(B)) return D.stylize("undefined", "undefined"); if (P(B)) { var j = "'" + JSON.stringify(B).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; return D.stylize(j, "string"); } if (O(B)) return D.stylize("" + B, "number"); if (n(B)) return D.stylize("" + B, "boolean"); if (o(B)) return D.stylize("null", "null"); } function c(D) { return "[" + Error.prototype.toString.call(D) + "]"; } function a(D, B, j, V, re) { for (var ee = [], ce = 0, ve = B.length; ce < ve; ++ce) U(B, String(ce)) ? ee.push(r(D, B, j, V, String(ce), !0)) : ee.push(""); return re.forEach(function(ge) { ge.match(/^\d+$/) || ee.push(r(D, B, j, V, ge, !0)); }), ee; } function r(D, B, j, V, re, ee) { var ce, ve, ge; if (ge = Object.getOwnPropertyDescriptor(B, re) || { value: B[re] }, ge.get ? ge.set ? ve = D.stylize("[Getter/Setter]", "special") : ve = D.stylize("[Getter]", "special") : ge.set && (ve = D.stylize("[Setter]", "special")), U(V, re) || (ce = "[" + re + "]"), ve || (D.seen.indexOf(ge.value) < 0 ? (o(j) ? ve = s(D, ge.value, null) : ve = s(D, ge.value, j - 1), ve.indexOf(` `) > -1 && (ee ? ve = ve.split(` `).map(function(oe) { return " " + oe; }).join(` `).substr(2) : ve = ` ` + ve.split(` `).map(function(oe) { return " " + oe; }).join(` `))) : ve = D.stylize("[Circular]", "special")), z(ce)) { if (ee && re.match(/^\d+$/)) return ve; ce = JSON.stringify("" + re), ce.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (ce = ce.substr(1, ce.length - 2), ce = D.stylize(ce, "name")) : (ce = ce.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), ce = D.stylize(ce, "string")); } return ce + ": " + ve; } function t(D, B, j) { var V = D.reduce(function(re, ee) { return ee.indexOf(` `) >= 0, re + ee.replace(/\u001b\[\d\d?m/g, "").length + 1; }, 0); return V > 60 ? j[0] + (B === "" ? "" : B + ` `) + " " + D.join(`, `) + " " + j[1] : j[0] + B + " " + D.join(", ") + " " + j[1]; } function i(D) { return Array.isArray(D); } _.isArray = i; function n(D) { return typeof D == "boolean"; } _.isBoolean = n; function o(D) { return D === null; } _.isNull = o; function p(D) { return D == null; } _.isNullOrUndefined = p; function O(D) { return typeof D == "number"; } _.isNumber = O; function P(D) { return typeof D == "string"; } _.isString = P; function F(D) { return g(D) === "symbol"; } _.isSymbol = F; function z(D) { return D === void 0; } _.isUndefined = z; function N(D) { return M(D) && A(D) === "[object RegExp]"; } _.isRegExp = N; function M(D) { return g(D) === "object" && D !== null; } _.isObject = M; function I(D) { return M(D) && A(D) === "[object Date]"; } _.isDate = I; function R(D) { return M(D) && (A(D) === "[object Error]" || D instanceof Error); } _.isError = R; function C(D) { return typeof D == "function"; } _.isFunction = C; function E(D) { return D === null || typeof D == "boolean" || typeof D == "number" || typeof D == "string" || g(D) === "symbol" || // ES6 symbol typeof D == "undefined"; } _.isPrimitive = E, _.isBuffer = e("./support/isBuffer"); function A(D) { return Object.prototype.toString.call(D); } function L(D) { return D < 10 ? "0" + D.toString(10) : D.toString(10); } var $ = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; function W() { var D = /* @__PURE__ */ new Date(), B = [L(D.getHours()), L(D.getMinutes()), L(D.getSeconds())].join(":"); return [D.getDate(), $[D.getMonth()], B].join(" "); } _.log = function() { console.log("%s - %s", W(), _.format.apply(_, arguments)); }, _.inherits = e("inherits"), _._extend = function(D, B) { if (!B || !M(B)) return D; for (var j = Object.keys(B), V = j.length; V--; ) D[j[V]] = B[j[V]]; return D; }; function U(D, B) { return Object.prototype.hasOwnProperty.call(D, B); } }).call(this, e("_process"), typeof Wt != "undefined" ? Wt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {}); }, { "./support/isBuffer": 524, _process: 467, inherits: 523 }], 526: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), Object.defineProperty(_, "v1", { enumerable: !0, get: function() { return u.default; } }), Object.defineProperty(_, "v3", { enumerable: !0, get: function() { return m.default; } }), Object.defineProperty(_, "v4", { enumerable: !0, get: function() { return g.default; } }), Object.defineProperty(_, "v5", { enumerable: !0, get: function() { return b.default; } }), Object.defineProperty(_, "NIL", { enumerable: !0, get: function() { return w.default; } }), Object.defineProperty(_, "version", { enumerable: !0, get: function() { return f.default; } }), Object.defineProperty(_, "validate", { enumerable: !0, get: function() { return y.default; } }), Object.defineProperty(_, "stringify", { enumerable: !0, get: function() { return h.default; } }), Object.defineProperty(_, "parse", { enumerable: !0, get: function() { return l.default; } }); var u = d(e("./v1.js")), m = d(e("./v3.js")), g = d(e("./v4.js")), b = d(e("./v5.js")), w = d(e("./nil.js")), f = d(e("./version.js")), y = d(e("./validate.js")), h = d(e("./stringify.js")), l = d(e("./parse.js")); function d(s) { return s && s.__esModule ? s : { default: s }; } }, { "./nil.js": 528, "./parse.js": 529, "./stringify.js": 533, "./v1.js": 534, "./v3.js": 535, "./v4.js": 537, "./v5.js": 538, "./validate.js": 539, "./version.js": 540 }], 527: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; function u(a) { if (typeof a == "string") { var r = unescape(encodeURIComponent(a)); a = new Uint8Array(r.length); for (var t = 0; t < r.length; ++t) a[t] = r.charCodeAt(t); } return m(b(w(a), a.length * 8)); } function m(a) { for (var r = [], t = a.length * 32, i = "0123456789abcdef", n = 0; n < t; n += 8) { var o = a[n >> 5] >>> n % 32 & 255, p = parseInt(i.charAt(o >>> 4 & 15) + i.charAt(o & 15), 16); r.push(p); } return r; } function g(a) { return (a + 64 >>> 9 << 4) + 14 + 1; } function b(a, r) { a[r >> 5] |= 128 << r % 32, a[g(r) - 1] = r; for (var t = 1732584193, i = -271733879, n = -1732584194, o = 271733878, p = 0; p < a.length; p += 16) { var O = t, P = i, F = n, z = o; t = l(t, i, n, o, a[p], 7, -680876936), o = l(o, t, i, n, a[p + 1], 12, -389564586), n = l(n, o, t, i, a[p + 2], 17, 606105819), i = l(i, n, o, t, a[p + 3], 22, -1044525330), t = l(t, i, n, o, a[p + 4], 7, -176418897), o = l(o, t, i, n, a[p + 5], 12, 1200080426), n = l(n, o, t, i, a[p + 6], 17, -1473231341), i = l(i, n, o, t, a[p + 7], 22, -45705983), t = l(t, i, n, o, a[p + 8], 7, 1770035416), o = l(o, t, i, n, a[p + 9], 12, -1958414417), n = l(n, o, t, i, a[p + 10], 17, -42063), i = l(i, n, o, t, a[p + 11], 22, -1990404162), t = l(t, i, n, o, a[p + 12], 7, 1804603682), o = l(o, t, i, n, a[p + 13], 12, -40341101), n = l(n, o, t, i, a[p + 14], 17, -1502002290), i = l(i, n, o, t, a[p + 15], 22, 1236535329), t = d(t, i, n, o, a[p + 1], 5, -165796510), o = d(o, t, i, n, a[p + 6], 9, -1069501632), n = d(n, o, t, i, a[p + 11], 14, 643717713), i = d(i, n, o, t, a[p], 20, -373897302), t = d(t, i, n, o, a[p + 5], 5, -701558691), o = d(o, t, i, n, a[p + 10], 9, 38016083), n = d(n, o, t, i, a[p + 15], 14, -660478335), i = d(i, n, o, t, a[p + 4], 20, -405537848), t = d(t, i, n, o, a[p + 9], 5, 568446438), o = d(o, t, i, n, a[p + 14], 9, -1019803690), n = d(n, o, t, i, a[p + 3], 14, -187363961), i = d(i, n, o, t, a[p + 8], 20, 1163531501), t = d(t, i, n, o, a[p + 13], 5, -1444681467), o = d(o, t, i, n, a[p + 2], 9, -51403784), n = d(n, o, t, i, a[p + 7], 14, 1735328473), i = d(i, n, o, t, a[p + 12], 20, -1926607734), t = s(t, i, n, o, a[p + 5], 4, -378558), o = s(o, t, i, n, a[p + 8], 11, -2022574463), n = s(n, o, t, i, a[p + 11], 16, 1839030562), i = s(i, n, o, t, a[p + 14], 23, -35309556), t = s(t, i, n, o, a[p + 1], 4, -1530992060), o = s(o, t, i, n, a[p + 4], 11, 1272893353), n = s(n, o, t, i, a[p + 7], 16, -155497632), i = s(i, n, o, t, a[p + 10], 23, -1094730640), t = s(t, i, n, o, a[p + 13], 4, 681279174), o = s(o, t, i, n, a[p], 11, -358537222), n = s(n, o, t, i, a[p + 3], 16, -722521979), i = s(i, n, o, t, a[p + 6], 23, 76029189), t = s(t, i, n, o, a[p + 9], 4, -640364487), o = s(o, t, i, n, a[p + 12], 11, -421815835), n = s(n, o, t, i, a[p + 15], 16, 530742520), i = s(i, n, o, t, a[p + 2], 23, -995338651), t = v(t, i, n, o, a[p], 6, -198630844), o = v(o, t, i, n, a[p + 7], 10, 1126891415), n = v(n, o, t, i, a[p + 14], 15, -1416354905), i = v(i, n, o, t, a[p + 5], 21, -57434055), t = v(t, i, n, o, a[p + 12], 6, 1700485571), o = v(o, t, i, n, a[p + 3], 10, -1894986606), n = v(n, o, t, i, a[p + 10], 15, -1051523), i = v(i, n, o, t, a[p + 1], 21, -2054922799), t = v(t, i, n, o, a[p + 8], 6, 1873313359), o = v(o, t, i, n, a[p + 15], 10, -30611744), n = v(n, o, t, i, a[p + 6], 15, -1560198380), i = v(i, n, o, t, a[p + 13], 21, 1309151649), t = v(t, i, n, o, a[p + 4], 6, -145523070), o = v(o, t, i, n, a[p + 11], 10, -1120210379), n = v(n, o, t, i, a[p + 2], 15, 718787259), i = v(i, n, o, t, a[p + 9], 21, -343485551), t = f(t, O), i = f(i, P), n = f(n, F), o = f(o, z); } return [t, i, n, o]; } function w(a) { if (a.length === 0) return []; for (var r = a.length * 8, t = new Uint32Array(g(r)), i = 0; i < r; i += 8) t[i >> 5] |= (a[i / 8] & 255) << i % 32; return t; } function f(a, r) { var t = (a & 65535) + (r & 65535), i = (a >> 16) + (r >> 16) + (t >> 16); return i << 16 | t & 65535; } function y(a, r) { return a << r | a >>> 32 - r; } function h(a, r, t, i, n, o) { return f(y(f(f(r, a), f(i, o)), n), t); } function l(a, r, t, i, n, o, p) { return h(r & t | ~r & i, a, r, n, o, p); } function d(a, r, t, i, n, o, p) { return h(r & i | t & ~i, a, r, n, o, p); } function s(a, r, t, i, n, o, p) { return h(r ^ t ^ i, a, r, n, o, p); } function v(a, r, t, i, n, o, p) { return h(t ^ (r | ~i), a, r, n, o, p); } var c = u; _.default = c; }, {}], 528: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = "00000000-0000-0000-0000-000000000000"; _.default = u; }, {}], 529: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = m(e("./validate.js")); function m(w) { return w && w.__esModule ? w : { default: w }; } function g(w) { if (!(0, u.default)(w)) throw TypeError("Invalid UUID"); var f, y = new Uint8Array(16); return y[0] = (f = parseInt(w.slice(0, 8), 16)) >>> 24, y[1] = f >>> 16 & 255, y[2] = f >>> 8 & 255, y[3] = f & 255, y[4] = (f = parseInt(w.slice(9, 13), 16)) >>> 8, y[5] = f & 255, y[6] = (f = parseInt(w.slice(14, 18), 16)) >>> 8, y[7] = f & 255, y[8] = (f = parseInt(w.slice(19, 23), 16)) >>> 8, y[9] = f & 255, y[10] = (f = parseInt(w.slice(24, 36), 16)) / 1099511627776 & 255, y[11] = f / 4294967296 & 255, y[12] = f >>> 24 & 255, y[13] = f >>> 16 & 255, y[14] = f >>> 8 & 255, y[15] = f & 255, y; } var b = g; _.default = b; }, { "./validate.js": 539 }], 530: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; _.default = u; }, {}], 531: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = g; var u = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), m = new Uint8Array(16); function g() { if (!u) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); return u(m); } }, {}], 532: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; function u(w, f, y, h) { switch (w) { case 0: return f & y ^ ~f & h; case 1: return f ^ y ^ h; case 2: return f & y ^ f & h ^ y & h; case 3: return f ^ y ^ h; } } function m(w, f) { return w << f | w >>> 32 - f; } function g(w) { var f = [1518500249, 1859775393, 2400959708, 3395469782], y = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; if (typeof w == "string") { var h = unescape(encodeURIComponent(w)); w = []; for (var l = 0; l < h.length; ++l) w.push(h.charCodeAt(l)); } else Array.isArray(w) || (w = Array.prototype.slice.call(w)); w.push(128); for (var d = w.length / 4 + 2, s = Math.ceil(d / 16), v = new Array(s), c = 0; c < s; ++c) { for (var a = new Uint32Array(16), r = 0; r < 16; ++r) a[r] = w[c * 64 + r * 4] << 24 | w[c * 64 + r * 4 + 1] << 16 | w[c * 64 + r * 4 + 2] << 8 | w[c * 64 + r * 4 + 3]; v[c] = a; } v[s - 1][14] = (w.length - 1) * 8 / Math.pow(2, 32), v[s - 1][14] = Math.floor(v[s - 1][14]), v[s - 1][15] = (w.length - 1) * 8 & 4294967295; for (var t = 0; t < s; ++t) { for (var i = new Uint32Array(80), n = 0; n < 16; ++n) i[n] = v[t][n]; for (var o = 16; o < 80; ++o) i[o] = m(i[o - 3] ^ i[o - 8] ^ i[o - 14] ^ i[o - 16], 1); for (var p = y[0], O = y[1], P = y[2], F = y[3], z = y[4], N = 0; N < 80; ++N) { var M = Math.floor(N / 20), I = m(p, 5) + u(M, O, P, F) + z + f[M] + i[N] >>> 0; z = F, F = P, P = m(O, 30) >>> 0, O = p, p = I; } y[0] = y[0] + p >>> 0, y[1] = y[1] + O >>> 0, y[2] = y[2] + P >>> 0, y[3] = y[3] + F >>> 0, y[4] = y[4] + z >>> 0; } return [y[0] >> 24 & 255, y[0] >> 16 & 255, y[0] >> 8 & 255, y[0] & 255, y[1] >> 24 & 255, y[1] >> 16 & 255, y[1] >> 8 & 255, y[1] & 255, y[2] >> 24 & 255, y[2] >> 16 & 255, y[2] >> 8 & 255, y[2] & 255, y[3] >> 24 & 255, y[3] >> 16 & 255, y[3] >> 8 & 255, y[3] & 255, y[4] >> 24 & 255, y[4] >> 16 & 255, y[4] >> 8 & 255, y[4] & 255]; } var b = g; _.default = b; }, {}], 533: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = m(e("./validate.js")); function m(y) { return y && y.__esModule ? y : { default: y }; } for (var g = [], b = 0; b < 256; ++b) g.push((b + 256).toString(16).substr(1)); function w(y) { var h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, l = (g[y[h + 0]] + g[y[h + 1]] + g[y[h + 2]] + g[y[h + 3]] + "-" + g[y[h + 4]] + g[y[h + 5]] + "-" + g[y[h + 6]] + g[y[h + 7]] + "-" + g[y[h + 8]] + g[y[h + 9]] + "-" + g[y[h + 10]] + g[y[h + 11]] + g[y[h + 12]] + g[y[h + 13]] + g[y[h + 14]] + g[y[h + 15]]).toLowerCase(); if (!(0, u.default)(l)) throw TypeError("Stringified UUID is invalid"); return l; } var f = w; _.default = f; }, { "./validate.js": 539 }], 534: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = g(e("./rng.js")), m = g(e("./stringify.js")); function g(d) { return d && d.__esModule ? d : { default: d }; } var b, w, f = 0, y = 0; function h(d, s, v) { var c = s && v || 0, a = s || new Array(16); d = d || {}; var r = d.node || b, t = d.clockseq !== void 0 ? d.clockseq : w; if (r == null || t == null) { var i = d.random || (d.rng || u.default)(); r == null && (r = b = [i[0] | 1, i[1], i[2], i[3], i[4], i[5]]), t == null && (t = w = (i[6] << 8 | i[7]) & 16383); } var n = d.msecs !== void 0 ? d.msecs : Date.now(), o = d.nsecs !== void 0 ? d.nsecs : y + 1, p = n - f + (o - y) / 1e4; if (p < 0 && d.clockseq === void 0 && (t = t + 1 & 16383), (p < 0 || n > f) && d.nsecs === void 0 && (o = 0), o >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); f = n, y = o, w = t, n += 122192928e5; var O = ((n & 268435455) * 1e4 + o) % 4294967296; a[c++] = O >>> 24 & 255, a[c++] = O >>> 16 & 255, a[c++] = O >>> 8 & 255, a[c++] = O & 255; var P = n / 4294967296 * 1e4 & 268435455; a[c++] = P >>> 8 & 255, a[c++] = P & 255, a[c++] = P >>> 24 & 15 | 16, a[c++] = P >>> 16 & 255, a[c++] = t >>> 8 | 128, a[c++] = t & 255; for (var F = 0; F < 6; ++F) a[c + F] = r[F]; return s || (0, m.default)(a); } var l = h; _.default = l; }, { "./rng.js": 531, "./stringify.js": 533 }], 535: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = g(e("./v35.js")), m = g(e("./md5.js")); function g(f) { return f && f.__esModule ? f : { default: f }; } var b = (0, u.default)("v3", 48, m.default), w = b; _.default = w; }, { "./md5.js": 527, "./v35.js": 536 }], 536: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = y, _.URL = _.DNS = void 0; var u = g(e("./stringify.js")), m = g(e("./parse.js")); function g(h) { return h && h.__esModule ? h : { default: h }; } function b(h) { h = unescape(encodeURIComponent(h)); for (var l = [], d = 0; d < h.length; ++d) l.push(h.charCodeAt(d)); return l; } var w = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; _.DNS = w; var f = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; _.URL = f; function y(h, l, d) { function s(v, c, a, r) { if (typeof v == "string" && (v = b(v)), typeof c == "string" && (c = (0, m.default)(c)), c.length !== 16) throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); var t = new Uint8Array(16 + v.length); if (t.set(c), t.set(v, c.length), t = d(t), t[6] = t[6] & 15 | l, t[8] = t[8] & 63 | 128, a) { r = r || 0; for (var i = 0; i < 16; ++i) a[r + i] = t[i]; return a; } return (0, u.default)(t); } try { s.name = h; } catch (v) { } return s.DNS = w, s.URL = f, s; } }, { "./parse.js": 529, "./stringify.js": 533 }], 537: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = g(e("./rng.js")), m = g(e("./stringify.js")); function g(f) { return f && f.__esModule ? f : { default: f }; } function b(f, y, h) { f = f || {}; var l = f.random || (f.rng || u.default)(); if (l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, y) { h = h || 0; for (var d = 0; d < 16; ++d) y[h + d] = l[d]; return y; } return (0, m.default)(l); } var w = b; _.default = w; }, { "./rng.js": 531, "./stringify.js": 533 }], 538: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = g(e("./v35.js")), m = g(e("./sha1.js")); function g(f) { return f && f.__esModule ? f : { default: f }; } var b = (0, u.default)("v5", 80, m.default), w = b; _.default = w; }, { "./sha1.js": 532, "./v35.js": 536 }], 539: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = m(e("./regex.js")); function m(w) { return w && w.__esModule ? w : { default: w }; } function g(w) { return typeof w == "string" && u.default.test(w); } var b = g; _.default = b; }, { "./regex.js": 530 }], 540: [function(e, x, _) { Object.defineProperty(_, "__esModule", { value: !0 }), _.default = void 0; var u = m(e("./validate.js")); function m(w) { return w && w.__esModule ? w : { default: w }; } function g(w) { if (!(0, u.default)(w)) throw TypeError("Invalid UUID"); return parseInt(w.substr(14, 1), 16); } var b = g; _.default = b; }, { "./validate.js": 539 }], 541: [function(e, x, _) { /** * Character classes and associated utilities for the 5th edition of XML 1.0. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */ Object.defineProperty(_, "__esModule", { value: !0 }), _.CHAR = ` \r -퟿-�𐀀-􏿿`, _.S = ` \r `, _.NAME_START_CHAR = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", _.NAME_CHAR = "-" + _.NAME_START_CHAR + ".0-9·̀-ͯ‿-⁀", _.CHAR_RE = new RegExp("^[" + _.CHAR + "]$", "u"), _.S_RE = new RegExp("^[" + _.S + "]+$", "u"), _.NAME_START_CHAR_RE = new RegExp("^[" + _.NAME_START_CHAR + "]$", "u"), _.NAME_CHAR_RE = new RegExp("^[" + _.NAME_CHAR + "]$", "u"), _.NAME_RE = new RegExp("^[" + _.NAME_START_CHAR + "][" + _.NAME_CHAR + "]*$", "u"), _.NMTOKEN_RE = new RegExp("^[" + _.NAME_CHAR + "]+$", "u"); var u = 9, m = 10, g = 13, b = 32; _.S_LIST = [b, m, g, u]; function w(l) { return l >= b && l <= 55295 || l === m || l === g || l === u || l >= 57344 && l <= 65533 || l >= 65536 && l <= 1114111; } _.isChar = w; function f(l) { return l === b || l === m || l === g || l === u; } _.isS = f; function y(l) { return l >= 65 && l <= 90 || l >= 97 && l <= 122 || l === 58 || l === 95 || l === 8204 || l === 8205 || l >= 192 && l <= 214 || l >= 216 && l <= 246 || l >= 248 && l <= 767 || l >= 880 && l <= 893 || l >= 895 && l <= 8191 || l >= 8304 && l <= 8591 || l >= 11264 && l <= 12271 || l >= 12289 && l <= 55295 || l >= 63744 && l <= 64975 || l >= 65008 && l <= 65533 || l >= 65536 && l <= 983039; } _.isNameStartChar = y; function h(l) { return y(l) || l >= 48 && l <= 57 || l === 45 || l === 46 || l === 183 || l >= 768 && l <= 879 || l >= 8255 && l <= 8256; } _.isNameChar = h; }, {}], 542: [function(e, x, _) { /** * Character classes and associated utilities for the 2nd edition of XML 1.1. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */ Object.defineProperty(_, "__esModule", { value: !0 }), _.CHAR = "-퟿-�𐀀-􏿿", _.RESTRICTED_CHAR = "-\b\v\f--„†-Ÿ", _.S = ` \r `, _.NAME_START_CHAR = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", _.NAME_CHAR = "-" + _.NAME_START_CHAR + ".0-9·̀-ͯ‿-⁀", _.CHAR_RE = new RegExp("^[" + _.CHAR + "]$", "u"), _.RESTRICTED_CHAR_RE = new RegExp("^[" + _.RESTRICTED_CHAR + "]$", "u"), _.S_RE = new RegExp("^[" + _.S + "]+$", "u"), _.NAME_START_CHAR_RE = new RegExp("^[" + _.NAME_START_CHAR + "]$", "u"), _.NAME_CHAR_RE = new RegExp("^[" + _.NAME_CHAR + "]$", "u"), _.NAME_RE = new RegExp("^[" + _.NAME_START_CHAR + "][" + _.NAME_CHAR + "]*$", "u"), _.NMTOKEN_RE = new RegExp("^[" + _.NAME_CHAR + "]+$", "u"); var u = 9, m = 10, g = 13, b = 32; _.S_LIST = [b, m, g, u]; function w(s) { return s >= 1 && s <= 55295 || s >= 57344 && s <= 65533 || s >= 65536 && s <= 1114111; } _.isChar = w; function f(s) { return s >= 1 && s <= 8 || s === 11 || s === 12 || s >= 14 && s <= 31 || s >= 127 && s <= 132 || s >= 134 && s <= 159; } _.isRestrictedChar = f; function y(s) { return s === 9 || s === 10 || s === 13 || s > 31 && s < 127 || s === 133 || s > 159 && s <= 55295 || s >= 57344 && s <= 65533 || s >= 65536 && s <= 1114111; } _.isCharAndNotRestricted = y; function h(s) { return s === b || s === m || s === g || s === u; } _.isS = h; function l(s) { return s >= 65 && s <= 90 || s >= 97 && s <= 122 || s === 58 || s === 95 || s === 8204 || s === 8205 || s >= 192 && s <= 214 || s >= 216 && s <= 246 || s >= 248 && s <= 767 || s >= 880 && s <= 893 || s >= 895 && s <= 8191 || s >= 8304 && s <= 8591 || s >= 11264 && s <= 12271 || s >= 12289 && s <= 55295 || s >= 63744 && s <= 64975 || s >= 65008 && s <= 65533 || s >= 65536 && s <= 983039; } _.isNameStartChar = l; function d(s) { return l(s) || s >= 48 && s <= 57 || s === 45 || s === 46 || s === 183 || s >= 768 && s <= 879 || s >= 8255 && s <= 8256; } _.isNameChar = d; }, {}], 543: [function(e, x, _) { /** * Character class utilities for XML NS 1.0 edition 3. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */ Object.defineProperty(_, "__esModule", { value: !0 }), _.NC_NAME_START_CHAR = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", _.NC_NAME_CHAR = "-" + _.NC_NAME_START_CHAR + ".0-9·̀-ͯ‿-⁀", _.NC_NAME_START_CHAR_RE = new RegExp("^[" + _.NC_NAME_START_CHAR + "]$", "u"), _.NC_NAME_CHAR_RE = new RegExp("^[" + _.NC_NAME_CHAR + "]$", "u"), _.NC_NAME_RE = new RegExp("^[" + _.NC_NAME_START_CHAR + "][" + _.NC_NAME_CHAR + "]*$", "u"); function u(g) { return g >= 65 && g <= 90 || g === 95 || g >= 97 && g <= 122 || g >= 192 && g <= 214 || g >= 216 && g <= 246 || g >= 248 && g <= 767 || g >= 880 && g <= 893 || g >= 895 && g <= 8191 || g >= 8204 && g <= 8205 || g >= 8304 && g <= 8591 || g >= 11264 && g <= 12271 || g >= 12289 && g <= 55295 || g >= 63744 && g <= 64975 || g >= 65008 && g <= 65533 || g >= 65536 && g <= 983039; } _.isNCNameStartChar = u; function m(g) { return u(g) || g === 45 || g === 46 || g >= 48 && g <= 57 || g === 183 || g >= 768 && g <= 879 || g >= 8255 && g <= 8256; } _.isNCNameChar = m; }, {}] }, {}, [15])(15); }); })(Ug); function $g(H) { return typeof H == "string" ? H : H instanceof Blob ? URL.createObjectURL(H) : H instanceof ArrayBuffer ? URL.createObjectURL(new Blob([H])) : H instanceof Response ? URL.createObjectURL(H.blob()) : H; } function qo(H) { return qo = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(k) { return typeof k; } : function(k) { return k && typeof Symbol == "function" && k.constructor === Symbol && k !== Symbol.prototype ? "symbol" : typeof k; }, qo(H); } var Wg = /^\s+/, Vg = /\s+$/; function Rt(H, k) { if (H = H || "", k = k || {}, H instanceof Rt) return H; if (!(this instanceof Rt)) return new Rt(H, k); var e = Kg(H); this._originalInput = H, this._r = e.r, this._g = e.g, this._b = e.b, this._a = e.a, this._roundA = Math.round(100 * this._a) / 100, this._format = k.format || e.format, this._gradientType = k.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = e.ok; } Rt.prototype = { isDark: function() { return this.getBrightness() < 128; }, isLight: function() { return !this.isDark(); }, isValid: function() { return this._ok; }, getOriginalInput: function() { return this._originalInput; }, getFormat: function() { return this._format; }, getAlpha: function() { return this._a; }, getBrightness: function() { var k = this.toRgb(); return (k.r * 299 + k.g * 587 + k.b * 114) / 1e3; }, getLuminance: function() { var k = this.toRgb(), e, x, _, u, m, g; return e = k.r / 255, x = k.g / 255, _ = k.b / 255, e <= 0.03928 ? u = e / 12.92 : u = Math.pow((e + 0.055) / 1.055, 2.4), x <= 0.03928 ? m = x / 12.92 : m = Math.pow((x + 0.055) / 1.055, 2.4), _ <= 0.03928 ? g = _ / 12.92 : g = Math.pow((_ + 0.055) / 1.055, 2.4), 0.2126 * u + 0.7152 * m + 0.0722 * g; }, setAlpha: function(k) { return this._a = Mc(k), this._roundA = Math.round(100 * this._a) / 100, this; }, toHsv: function() { var k = ic(this._r, this._g, this._b); return { h: k.h * 360, s: k.s, v: k.v, a: this._a }; }, toHsvString: function() { var k = ic(this._r, this._g, this._b), e = Math.round(k.h * 360), x = Math.round(k.s * 100), _ = Math.round(k.v * 100); return this._a == 1 ? "hsv(" + e + ", " + x + "%, " + _ + "%)" : "hsva(" + e + ", " + x + "%, " + _ + "%, " + this._roundA + ")"; }, toHsl: function() { var k = nc(this._r, this._g, this._b); return { h: k.h * 360, s: k.s, l: k.l, a: this._a }; }, toHslString: function() { var k = nc(this._r, this._g, this._b), e = Math.round(k.h * 360), x = Math.round(k.s * 100), _ = Math.round(k.l * 100); return this._a == 1 ? "hsl(" + e + ", " + x + "%, " + _ + "%)" : "hsla(" + e + ", " + x + "%, " + _ + "%, " + this._roundA + ")"; }, toHex: function(k) { return ac(this._r, this._g, this._b, k); }, toHexString: function(k) { return "#" + this.toHex(k); }, toHex8: function(k) { return Jg(this._r, this._g, this._b, this._a, k); }, toHex8String: function(k) { return "#" + this.toHex8(k); }, toRgb: function() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), a: this._a }; }, toRgbString: function() { return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; }, toPercentageRgb: function() { return { r: Math.round(yr(this._r, 255) * 100) + "%", g: Math.round(yr(this._g, 255) * 100) + "%", b: Math.round(yr(this._b, 255) * 100) + "%", a: this._a }; }, toPercentageRgbString: function() { return this._a == 1 ? "rgb(" + Math.round(yr(this._r, 255) * 100) + "%, " + Math.round(yr(this._g, 255) * 100) + "%, " + Math.round(yr(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(yr(this._r, 255) * 100) + "%, " + Math.round(yr(this._g, 255) * 100) + "%, " + Math.round(yr(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, toName: function() { return this._a === 0 ? "transparent" : this._a < 1 ? !1 : u1[ac(this._r, this._g, this._b, !0)] || !1; }, toFilter: function(k) { var e = "#" + oc(this._r, this._g, this._b, this._a), x = e, _ = this._gradientType ? "GradientType = 1, " : ""; if (k) { var u = Rt(k); x = "#" + oc(u._r, u._g, u._b, u._a); } return "progid:DXImageTransform.Microsoft.gradient(" + _ + "startColorstr=" + e + ",endColorstr=" + x + ")"; }, toString: function(k) { var e = !!k; k = k || this._format; var x = !1, _ = this._a < 1 && this._a >= 0, u = !e && _ && (k === "hex" || k === "hex6" || k === "hex3" || k === "hex4" || k === "hex8" || k === "name"); return u ? k === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (k === "rgb" && (x = this.toRgbString()), k === "prgb" && (x = this.toPercentageRgbString()), (k === "hex" || k === "hex6") && (x = this.toHexString()), k === "hex3" && (x = this.toHexString(!0)), k === "hex4" && (x = this.toHex8String(!0)), k === "hex8" && (x = this.toHex8String()), k === "name" && (x = this.toName()), k === "hsl" && (x = this.toHslString()), k === "hsv" && (x = this.toHsvString()), x || this.toHexString()); }, clone: function() { return Rt(this.toString()); }, _applyModification: function(k, e) { var x = k.apply(null, [this].concat([].slice.call(e))); return this._r = x._r, this._g = x._g, this._b = x._b, this.setAlpha(x._a), this; }, lighten: function() { return this._applyModification(t1, arguments); }, brighten: function() { return this._applyModification(r1, arguments); }, darken: function() { return this._applyModification(n1, arguments); }, desaturate: function() { return this._applyModification(Qg, arguments); }, saturate: function() { return this._applyModification(qg, arguments); }, greyscale: function() { return this._applyModification(e1, arguments); }, spin: function() { return this._applyModification(i1, arguments); }, _applyCombination: function(k, e) { return k.apply(null, [this].concat([].slice.call(e))); }, analogous: function() { return this._applyCombination(s1, arguments); }, complement: function() { return this._applyCombination(a1, arguments); }, monochromatic: function() { return this._applyCombination(f1, arguments); }, splitcomplement: function() { return this._applyCombination(o1, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { // return this._applyCombination(polyad, [number]); // }, triad: function() { return this._applyCombination(sc, [3]); }, tetrad: function() { return this._applyCombination(sc, [4]); } }; Rt.fromRatio = function(H, k) { if (qo(H) == "object") { var e = {}; for (var x in H) H.hasOwnProperty(x) && (x === "a" ? e[x] = H[x] : e[x] = Wa(H[x])); H = e; } return Rt(H, k); }; function Kg(H) { var k = { r: 0, g: 0, b: 0 }, e = 1, x = null, _ = null, u = null, m = !1, g = !1; return typeof H == "string" && (H = d1(H)), qo(H) == "object" && (ci(H.r) && ci(H.g) && ci(H.b) ? (k = Gg(H.r, H.g, H.b), m = !0, g = String(H.r).substr(-1) === "%" ? "prgb" : "rgb") : ci(H.h) && ci(H.s) && ci(H.v) ? (x = Wa(H.s), _ = Wa(H.v), k = Zg(H.h, x, _), m = !0, g = "hsv") : ci(H.h) && ci(H.s) && ci(H.l) && (x = Wa(H.s), u = Wa(H.l), k = Yg(H.h, x, u), m = !0, g = "hsl"), H.hasOwnProperty("a") && (e = H.a)), e = Mc(e), { ok: m, format: H.format || g, r: Math.min(255, Math.max(k.r, 0)), g: Math.min(255, Math.max(k.g, 0)), b: Math.min(255, Math.max(k.b, 0)), a: e }; } function Gg(H, k, e) { return { r: yr(H, 255) * 255, g: yr(k, 255) * 255, b: yr(e, 255) * 255 }; } function nc(H, k, e) { H = yr(H, 255), k = yr(k, 255), e = yr(e, 255); var x = Math.max(H, k, e), _ = Math.min(H, k, e), u, m, g = (x + _) / 2; if (x == _) u = m = 0; else { var b = x - _; switch (m = g > 0.5 ? b / (2 - x - _) : b / (x + _), x) { case H: u = (k - e) / b + (k < e ? 6 : 0); break; case k: u = (e - H) / b + 2; break; case e: u = (H - k) / b + 4; break; } u /= 6; } return { h: u, s: m, l: g }; } function Yg(H, k, e) { var x, _, u; H = yr(H, 360), k = yr(k, 100), e = yr(e, 100); function m(w, f, y) { return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? w + (f - w) * 6 * y : y < 1 / 2 ? f : y < 2 / 3 ? w + (f - w) * (2 / 3 - y) * 6 : w; } if (k === 0) x = _ = u = e; else { var g = e < 0.5 ? e * (1 + k) : e + k - e * k, b = 2 * e - g; x = m(b, g, H + 1 / 3), _ = m(b, g, H), u = m(b, g, H - 1 / 3); } return { r: x * 255, g: _ * 255, b: u * 255 }; } function ic(H, k, e) { H = yr(H, 255), k = yr(k, 255), e = yr(e, 255); var x = Math.max(H, k, e), _ = Math.min(H, k, e), u, m, g = x, b = x - _; if (m = x === 0 ? 0 : b / x, x == _) u = 0; else { switch (x) { case H: u = (k - e) / b + (k < e ? 6 : 0); break; case k: u = (e - H) / b + 2; break; case e: u = (H - k) / b + 4; break; } u /= 6; } return { h: u, s: m, v: g }; } function Zg(H, k, e) { H = yr(H, 360) * 6, k = yr(k, 100), e = yr(e, 100); var x = Math.floor(H), _ = H - x, u = e * (1 - k), m = e * (1 - _ * k), g = e * (1 - (1 - _) * k), b = x % 6, w = [e, m, u, u, g, e][b], f = [g, e, e, m, u, u][b], y = [u, u, g, e, e, m][b]; return { r: w * 255, g: f * 255, b: y * 255 }; } function ac(H, k, e, x) { var _ = [Wn(Math.round(H).toString(16)), Wn(Math.round(k).toString(16)), Wn(Math.round(e).toString(16))]; return x && _[0].charAt(0) == _[0].charAt(1) && _[1].charAt(0) == _[1].charAt(1) && _[2].charAt(0) == _[2].charAt(1) ? _[0].charAt(0) + _[1].charAt(0) + _[2].charAt(0) : _.join(""); } function Jg(H, k, e, x, _) { var u = [Wn(Math.round(H).toString(16)), Wn(Math.round(k).toString(16)), Wn(Math.round(e).toString(16)), Wn(Ic(x))]; return _ && u[0].charAt(0) == u[0].charAt(1) && u[1].charAt(0) == u[1].charAt(1) && u[2].charAt(0) == u[2].charAt(1) && u[3].charAt(0) == u[3].charAt(1) ? u[0].charAt(0) + u[1].charAt(0) + u[2].charAt(0) + u[3].charAt(0) : u.join(""); } function oc(H, k, e, x) { var _ = [Wn(Ic(x)), Wn(Math.round(H).toString(16)), Wn(Math.round(k).toString(16)), Wn(Math.round(e).toString(16))]; return _.join(""); } Rt.equals = function(H, k) { return !H || !k ? !1 : Rt(H).toRgbString() == Rt(k).toRgbString(); }; Rt.random = function() { return Rt.fromRatio({ r: Math.random(), g: Math.random(), b: Math.random() }); }; function Qg(H, k) { k = k === 0 ? 0 : k || 10; var e = Rt(H).toHsl(); return e.s -= k / 100, e.s = ts(e.s), Rt(e); } function qg(H, k) { k = k === 0 ? 0 : k || 10; var e = Rt(H).toHsl(); return e.s += k / 100, e.s = ts(e.s), Rt(e); } function e1(H) { return Rt(H).desaturate(100); } function t1(H, k) { k = k === 0 ? 0 : k || 10; var e = Rt(H).toHsl(); return e.l += k / 100, e.l = ts(e.l), Rt(e); } function r1(H, k) { k = k === 0 ? 0 : k || 10; var e = Rt(H).toRgb(); return e.r = Math.max(0, Math.min(255, e.r - Math.round(255 * -(k / 100)))), e.g = Math.max(0, Math.min(255, e.g - Math.round(255 * -(k / 100)))), e.b = Math.max(0, Math.min(255, e.b - Math.round(255 * -(k / 100)))), Rt(e); } function n1(H, k) { k = k === 0 ? 0 : k || 10; var e = Rt(H).toHsl(); return e.l -= k / 100, e.l = ts(e.l), Rt(e); } function i1(H, k) { var e = Rt(H).toHsl(), x = (e.h + k) % 360; return e.h = x < 0 ? 360 + x : x, Rt(e); } function a1(H) { var k = Rt(H).toHsl(); return k.h = (k.h + 180) % 360, Rt(k); } function sc(H, k) { if (isNaN(k) || k <= 0) throw new Error("Argument to polyad must be a positive number"); for (var e = Rt(H).toHsl(), x = [Rt(H)], _ = 360 / k, u = 1; u < k; u++) x.push(Rt({ h: (e.h + u * _) % 360, s: e.s, l: e.l })); return x; } function o1(H) { var k = Rt(H).toHsl(), e = k.h; return [Rt(H), Rt({ h: (e + 72) % 360, s: k.s, l: k.l }), Rt({ h: (e + 216) % 360, s: k.s, l: k.l })]; } function s1(H, k, e) { k = k || 6, e = e || 30; var x = Rt(H).toHsl(), _ = 360 / e, u = [Rt(H)]; for (x.h = (x.h - (_ * k >> 1) + 720) % 360; --k; ) x.h = (x.h + _) % 360, u.push(Rt(x)); return u; } function f1(H, k) { k = k || 6; for (var e = Rt(H).toHsv(), x = e.h, _ = e.s, u = e.v, m = [], g = 1 / k; k--; ) m.push(Rt({ h: x, s: _, v: u })), u = (u + g) % 1; return m; } Rt.mix = function(H, k, e) { e = e === 0 ? 0 : e || 50; var x = Rt(H).toRgb(), _ = Rt(k).toRgb(), u = e / 100, m = { r: (_.r - x.r) * u + x.r, g: (_.g - x.g) * u + x.g, b: (_.b - x.b) * u + x.b, a: (_.a - x.a) * u + x.a }; return Rt(m); }; Rt.readability = function(H, k) { var e = Rt(H), x = Rt(k); return (Math.max(e.getLuminance(), x.getLuminance()) + 0.05) / (Math.min(e.getLuminance(), x.getLuminance()) + 0.05); }; Rt.isReadable = function(H, k, e) { var x = Rt.readability(H, k), _, u; switch (u = !1, _ = p1(e), _.level + _.size) { case "AAsmall": case "AAAlarge": u = x >= 4.5; break; case "AAlarge": u = x >= 3; break; case "AAAsmall": u = x >= 7; break; } return u; }; Rt.mostReadable = function(H, k, e) { var x = null, _ = 0, u, m, g, b; e = e || {}, m = e.includeFallbackColors, g = e.level, b = e.size; for (var w = 0; w < k.length; w++) u = Rt.readability(H, k[w]), u > _ && (_ = u, x = Rt(k[w])); return Rt.isReadable(H, x, { level: g, size: b }) || !m ? x : (e.includeFallbackColors = !1, Rt.mostReadable(H, ["#fff", "#000"], e)); }; var _f = Rt.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }, u1 = Rt.hexNames = l1(_f); function l1(H) { var k = {}; for (var e in H) H.hasOwnProperty(e) && (k[H[e]] = e); return k; } function Mc(H) { return H = parseFloat(H), (isNaN(H) || H < 0 || H > 1) && (H = 1), H; } function yr(H, k) { c1(H) && (H = "100%"); var e = h1(H); return H = Math.min(k, Math.max(0, parseFloat(H))), e && (H = parseInt(H * k, 10) / 100), Math.abs(H - k) < 1e-6 ? 1 : H % k / parseFloat(k); } function ts(H) { return Math.min(1, Math.max(0, H)); } function wn(H) { return parseInt(H, 16); } function c1(H) { return typeof H == "string" && H.indexOf(".") != -1 && parseFloat(H) === 1; } function h1(H) { return typeof H == "string" && H.indexOf("%") != -1; } function Wn(H) { return H.length == 1 ? "0" + H : "" + H; } function Wa(H) { return H <= 1 && (H = H * 100 + "%"), H; } function Ic(H) { return Math.round(parseFloat(H) * 255).toString(16); } function fc(H) { return wn(H) / 255; } var $n = function() { var H = "[-\\+]?\\d+%?", k = "[-\\+]?\\d*\\.\\d+%?", e = "(?:" + k + ")|(?:" + H + ")", x = "[\\s|\\(]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")\\s*\\)?", _ = "[\\s|\\(]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(e), rgb: new RegExp("rgb" + x), rgba: new RegExp("rgba" + _), hsl: new RegExp("hsl" + x), hsla: new RegExp("hsla" + _), hsv: new RegExp("hsv" + x), hsva: new RegExp("hsva" + _), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; }(); function ci(H) { return !!$n.CSS_UNIT.exec(H); } function d1(H) { H = H.replace(Wg, "").replace(Vg, "").toLowerCase(); var k = !1; if (_f[H]) H = _f[H], k = !0; else if (H == "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var e; return (e = $n.rgb.exec(H)) ? { r: e[1], g: e[2], b: e[3] } : (e = $n.rgba.exec(H)) ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = $n.hsl.exec(H)) ? { h: e[1], s: e[2], l: e[3] } : (e = $n.hsla.exec(H)) ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = $n.hsv.exec(H)) ? { h: e[1], s: e[2], v: e[3] } : (e = $n.hsva.exec(H)) ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = $n.hex8.exec(H)) ? { r: wn(e[1]), g: wn(e[2]), b: wn(e[3]), a: fc(e[4]), format: k ? "name" : "hex8" } : (e = $n.hex6.exec(H)) ? { r: wn(e[1]), g: wn(e[2]), b: wn(e[3]), format: k ? "name" : "hex" } : (e = $n.hex4.exec(H)) ? { r: wn(e[1] + "" + e[1]), g: wn(e[2] + "" + e[2]), b: wn(e[3] + "" + e[3]), a: fc(e[4] + "" + e[4]), format: k ? "name" : "hex8" } : (e = $n.hex3.exec(H)) ? { r: wn(e[1] + "" + e[1]), g: wn(e[2] + "" + e[2]), b: wn(e[3] + "" + e[3]), format: k ? "name" : "hex" } : !1; } function p1(H) { var k, e; return H = H || { level: "AA", size: "small" }, k = (H.level || "AA").toUpperCase(), e = (H.size || "small").toLowerCase(), k !== "AA" && k !== "AAA" && (k = "AA"), e !== "small" && e !== "large" && (e = "small"), { level: k, size: e }; } var ga = {}, y1 = { get exports() { return ga; }, set exports(H) { ga = H; } }; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ (function(H, k) { (function() { var e, x = "4.17.21", _ = 200, u = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", m = "Expected a function", g = "Invalid `variable` option passed into `_.template`", b = "__lodash_hash_undefined__", w = 500, f = "__lodash_placeholder__", y = 1, h = 2, l = 4, d = 1, s = 2, v = 1, c = 2, a = 4, r = 8, t = 16, i = 32, n = 64, o = 128, p = 256, O = 512, P = 30, F = "...", z = 800, N = 16, M = 1, I = 2, R = 3, C = 1 / 0, E = 9007199254740991, A = 17976931348623157e292, L = 0 / 0, $ = 4294967295, W = $ - 1, U = $ >>> 1, D = [ ["ary", o], ["bind", v], ["bindKey", c], ["curry", r], ["curryRight", t], ["flip", O], ["partial", i], ["partialRight", n], ["rearg", p] ], B = "[object Arguments]", j = "[object Array]", V = "[object AsyncFunction]", re = "[object Boolean]", ee = "[object Date]", ce = "[object DOMException]", ve = "[object Error]", ge = "[object Function]", oe = "[object GeneratorFunction]", J = "[object Map]", Q = "[object Number]", he = "[object Null]", ke = "[object Object]", ne = "[object Promise]", se = "[object Proxy]", Ce = "[object RegExp]", q = "[object Set]", G = "[object String]", Y = "[object Symbol]", fe = "[object Undefined]", we = "[object WeakMap]", _e = "[object WeakSet]", je = "[object ArrayBuffer]", Ye = "[object DataView]", nt = "[object Float32Array]", ut = "[object Float64Array]", ot = "[object Int8Array]", Ue = "[object Int16Array]", Ve = "[object Int32Array]", Qe = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", ae = "[object Uint16Array]", Re = "[object Uint32Array]", be = /\b__p \+= '';/g, Ee = /\b(__p \+=) '' \+/g, pe = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Pe = /&(?:amp|lt|gt|quot|#39);/g, te = /[&<>"']/g, He = RegExp(Pe.source), it = RegExp(te.source), K = /<%-([\s\S]+?)%>/g, Me = /<%([\s\S]+?)%>/g, Le = /<%=([\s\S]+?)%>/g, ue = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Se = /^\w*$/, Ie = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, st = /[\\^$.*+?()[\]{}|]/g, Ge = RegExp(st.source), rt = /^\s+/, _t = /\s/, wt = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ot = /\{\n\/\* \[wrapped with (.+)\] \*/, pt = /,? & /, ct = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, At = /[()=,{}\[\]\/\s]/, Pt = /\\(\\)?/g, bt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Kt = /\w*$/, Ct = /^[-+]0x[0-9a-f]+$/i, xt = /^0b[01]+$/i, Ft = /^\[object .+?Constructor\]$/, Lt = /^0o[0-7]+$/i, Et = /^(?:0|[1-9]\d*)$/, Dr = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Or = /($^)/, Gr = /['\n\r\u2028\u2029\\]/g, Nr = "\\ud800-\\udfff", Yr = "\\u0300-\\u036f", Qt = "\\ufe20-\\ufe2f", Xr = "\\u20d0-\\u20ff", Fr = Yr + Qt + Xr, Lr = "\\u2700-\\u27bf", Ur = "a-z\\xdf-\\xf6\\xf8-\\xff", vt = "\\xac\\xb1\\xd7\\xf7", Ke = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", me = "\\u2000-\\u206f", Fe = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Be = "A-Z\\xc0-\\xd6\\xd8-\\xde", dt = "\\ufe0e\\ufe0f", St = vt + Ke + me + Fe, Ht = "['’]", lr = "[" + Nr + "]", gr = "[" + St + "]", rn = "[" + Fr + "]", zr = "\\d+", pi = "[" + Lr + "]", $r = "[" + Ur + "]", Dn = "[^" + Nr + St + zr + Lr + Ur + Be + "]", cn = "\\ud83c[\\udffb-\\udfff]", yi = "(?:" + rn + "|" + cn + ")", hn = "[^" + Nr + "]", dn = "(?:\\ud83c[\\udde6-\\uddff]){2}", Nn = "[\\ud800-\\udbff][\\udc00-\\udfff]", Fn = "[" + Be + "]", Xi = "\\u200d", Ui = "(?:" + $r + "|" + Dn + ")", $i = "(?:" + Fn + "|" + Dn + ")", ei = "(?:" + Ht + "(?:d|ll|m|re|s|t|ve))?", Bn = "(?:" + Ht + "(?:D|LL|M|RE|S|T|VE))?", Wi = yi + "?", Vi = "[" + dt + "]?", xn = "(?:" + Xi + "(?:" + [hn, dn, Nn].join("|") + ")" + Vi + Wi + ")*", wa = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ki = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Gi = Vi + Wi + xn, xa = "(?:" + [pi, dn, Nn].join("|") + ")" + Gi, Sa = "(?:" + [hn + rn + "?", rn, dn, Nn, lr].join("|") + ")", Sn = RegExp(Ht, "g"), Yi = RegExp(rn, "g"), Ri = RegExp(cn + "(?=" + cn + ")|" + Sa + Gi, "g"), jn = RegExp([ Fn + "?" + $r + "+" + ei + "(?=" + [gr, Fn, "$"].join("|") + ")", $i + "+" + Bn + "(?=" + [gr, Fn + Ui, "$"].join("|") + ")", Fn + "?" + Ui + "+" + ei, Fn + "+" + Bn, Ki, wa, zr, xa ].join("|"), "g"), ka = RegExp("[" + Xi + Nr + Fr + dt + "]"), kn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, On = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ], Zi = -1, rr = {}; rr[nt] = rr[ut] = rr[ot] = rr[Ue] = rr[Ve] = rr[Qe] = rr[tt] = rr[ae] = rr[Re] = !0, rr[B] = rr[j] = rr[je] = rr[re] = rr[Ye] = rr[ee] = rr[ve] = rr[ge] = rr[J] = rr[Q] = rr[ke] = rr[Ce] = rr[q] = rr[G] = rr[we] = !1; var er = {}; er[B] = er[j] = er[je] = er[Ye] = er[re] = er[ee] = er[nt] = er[ut] = er[ot] = er[Ue] = er[Ve] = er[J] = er[Q] = er[ke] = er[Ce] = er[q] = er[G] = er[Y] = er[Qe] = er[tt] = er[ae] = er[Re] = !0, er[ve] = er[ge] = er[we] = !1; var ti = { // Latin-1 Supplement block. À: "A", Á: "A", Â: "A", Ã: "A", Ä: "A", Å: "A", à: "a", á: "a", â: "a", ã: "a", ä: "a", å: "a", Ç: "C", ç: "c", Ð: "D", ð: "d", È: "E", É: "E", Ê: "E", Ë: "E", è: "e", é: "e", ê: "e", ë: "e", Ì: "I", Í: "I", Î: "I", Ï: "I", ì: "i", í: "i", î: "i", ï: "i", Ñ: "N", ñ: "n", Ò: "O", Ó: "O", Ô: "O", Õ: "O", Ö: "O", Ø: "O", ò: "o", ó: "o", ô: "o", õ: "o", ö: "o", ø: "o", Ù: "U", Ú: "U", Û: "U", Ü: "U", ù: "u", ú: "u", û: "u", ü: "u", Ý: "Y", ý: "y", ÿ: "y", Æ: "Ae", æ: "ae", Þ: "Th", þ: "th", ß: "ss", // Latin Extended-A block. Ā: "A", Ă: "A", Ą: "A", ā: "a", ă: "a", ą: "a", Ć: "C", Ĉ: "C", Ċ: "C", Č: "C", ć: "c", ĉ: "c", ċ: "c", č: "c", Ď: "D", Đ: "D", ď: "d", đ: "d", Ē: "E", Ĕ: "E", Ė: "E", Ę: "E", Ě: "E", ē: "e", ĕ: "e", ė: "e", ę: "e", ě: "e", Ĝ: "G", Ğ: "G", Ġ: "G", Ģ: "G", ĝ: "g", ğ: "g", ġ: "g", ģ: "g", Ĥ: "H", Ħ: "H", ĥ: "h", ħ: "h", Ĩ: "I", Ī: "I", Ĭ: "I", Į: "I", İ: "I", ĩ: "i", ī: "i", ĭ: "i", į: "i", ı: "i", Ĵ: "J", ĵ: "j", Ķ: "K", ķ: "k", ĸ: "k", Ĺ: "L", Ļ: "L", Ľ: "L", Ŀ: "L", Ł: "L", ĺ: "l", ļ: "l", ľ: "l", ŀ: "l", ł: "l", Ń: "N", Ņ: "N", Ň: "N", Ŋ: "N", ń: "n", ņ: "n", ň: "n", ŋ: "n", Ō: "O", Ŏ: "O", Ő: "O", ō: "o", ŏ: "o", ő: "o", Ŕ: "R", Ŗ: "R", Ř: "R", ŕ: "r", ŗ: "r", ř: "r", Ś: "S", Ŝ: "S", Ş: "S", Š: "S", ś: "s", ŝ: "s", ş: "s", š: "s", Ţ: "T", Ť: "T", Ŧ: "T", ţ: "t", ť: "t", ŧ: "t", Ũ: "U", Ū: "U", Ŭ: "U", Ů: "U", Ű: "U", Ų: "U", ũ: "u", ū: "u", ŭ: "u", ů: "u", ű: "u", ų: "u", Ŵ: "W", ŵ: "w", Ŷ: "Y", ŷ: "y", Ÿ: "Y", Ź: "Z", Ż: "Z", Ž: "Z", ź: "z", ż: "z", ž: "z", IJ: "IJ", ij: "ij", Œ: "Oe", œ: "oe", ʼn: "'n", ſ: "s" }, Ji = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Oa = { "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }, Qi = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, qi = parseFloat, xe = parseInt, De = typeof Wt == "object" && Wt && Wt.Object === Object && Wt, Je = typeof self == "object" && self && self.Object === Object && self, ht = De || Je || Function("return this")(), Yt = k && !k.nodeType && k, Mt = Yt && !0 && H && !H.nodeType && H, fr = Mt && Mt.exports === Yt, nr = fr && De.process, tr = function() { try { var Ne = Mt && Mt.require && Mt.require("util").types; return Ne || nr && nr.binding && nr.binding("util"); } catch (Ze) { } }(), ur = tr && tr.isArrayBuffer, Pr = tr && tr.isDate, Br = tr && tr.isMap, dr = tr && tr.isRegExp, Er = tr && tr.isSet, Ar = tr && tr.isTypedArray; function pr(Ne, Ze, We) { switch (We.length) { case 0: return Ne.call(Ze); case 1: return Ne.call(Ze, We[0]); case 2: return Ne.call(Ze, We[0], We[1]); case 3: return Ne.call(Ze, We[0], We[1], We[2]); } return Ne.apply(Ze, We); } function pn(Ne, Ze, We, gt) { for (var Bt = -1, ar = Ne == null ? 0 : Ne.length; ++Bt < ar; ) { var Mr = Ne[Bt]; Ze(gt, Mr, We(Mr), Ne); } return gt; } function mr(Ne, Ze) { for (var We = -1, gt = Ne == null ? 0 : Ne.length; ++We < gt && Ze(Ne[We], We, Ne) !== !1; ) ; return Ne; } function ea(Ne, Ze) { for (var We = Ne == null ? 0 : Ne.length; We-- && Ze(Ne[We], We, Ne) !== !1; ) ; return Ne; } function En(Ne, Ze) { for (var We = -1, gt = Ne == null ? 0 : Ne.length; ++We < gt; ) if (!Ze(Ne[We], We, Ne)) return !1; return !0; } function Zr(Ne, Ze) { for (var We = -1, gt = Ne == null ? 0 : Ne.length, Bt = 0, ar = []; ++We < gt; ) { var Mr = Ne[We]; Ze(Mr, We, Ne) && (ar[Bt++] = Mr); } return ar; } function ta(Ne, Ze) { var We = Ne == null ? 0 : Ne.length; return !!We && wr(Ne, Ze, 0) > -1; } function le(Ne, Ze, We) { for (var gt = -1, Bt = Ne == null ? 0 : Ne.length; ++gt < Bt; ) if (We(Ze, Ne[gt])) return !0; return !1; } function Oe(Ne, Ze) { for (var We = -1, gt = Ne == null ? 0 : Ne.length, Bt = Array(gt); ++We < gt; ) Bt[We] = Ze(Ne[We], We, Ne); return Bt; } function Xe(Ne, Ze) { for (var We = -1, gt = Ze.length, Bt = Ne.length; ++We < gt; ) Ne[Bt + We] = Ze[We]; return Ne; } function ft(Ne, Ze, We, gt) { var Bt = -1, ar = Ne == null ? 0 : Ne.length; for (gt && ar && (We = Ne[++Bt]); ++Bt < ar; ) We = Ze(We, Ne[Bt], Bt, Ne); return We; } function Tt(Ne, Ze, We, gt) { var Bt = Ne == null ? 0 : Ne.length; for (gt && Bt && (We = Ne[--Bt]); Bt--; ) We = Ze(We, Ne[Bt], Bt, Ne); return We; } function mt(Ne, Ze) { for (var We = -1, gt = Ne == null ? 0 : Ne.length; ++We < gt; ) if (Ze(Ne[We], We, Ne)) return !0; return !1; } var Xt = Tn("length"); function ir(Ne) { return Ne.split(""); } function hr(Ne) { return Ne.match(ct) || []; } function _r(Ne, Ze, We) { var gt; return We(Ne, function(Bt, ar, Mr) { if (Ze(Bt, ar, Mr)) return gt = ar, !1; }), gt; } function Tr(Ne, Ze, We, gt) { for (var Bt = Ne.length, ar = We + (gt ? 1 : -1); gt ? ar-- : ++ar < Bt; ) if (Ze(Ne[ar], ar, Ne)) return ar; return -1; } function wr(Ne, Ze, We) { return Ze === Ze ? Wc(Ne, Ze, We) : Tr(Ne, Jr, We); } function Rr(Ne, Ze, We, gt) { for (var Bt = We - 1, ar = Ne.length; ++Bt < ar; ) if (gt(Ne[Bt], Ze)) return Bt; return -1; } function Jr(Ne) { return Ne !== Ne; } function Qr(Ne, Ze) { var We = Ne == null ? 0 : Ne.length; return We ? vi(Ne, Ze) / We : L; } function Tn(Ne) { return function(Ze) { return Ze == null ? e : Ze[Ne]; }; } function yn(Ne) { return function(Ze) { return Ne == null ? e : Ne[Ze]; }; } function Vn(Ne, Ze, We, gt, Bt) { return Bt(Ne, function(ar, Mr, cr) { We = gt ? (gt = !1, ar) : Ze(We, ar, Mr, cr); }), We; } function Ya(Ne, Ze) { var We = Ne.length; for (Ne.sort(Ze); We--; ) Ne[We] = Ne[We].value; return Ne; } function vi(Ne, Ze) { for (var We, gt = -1, Bt = Ne.length; ++gt < Bt; ) { var ar = Ze(Ne[gt]); ar !== e && (We = We === e ? ar : We + ar); } return We; } function mi(Ne, Ze) { for (var We = -1, gt = Array(Ne); ++We < Ne; ) gt[We] = Ze(We); return gt; } function Fc(Ne, Ze) { return Oe(Ze, function(We) { return [We, Ne[We]]; }); } function Mf(Ne) { return Ne && Ne.slice(0, Ff(Ne) + 1).replace(rt, ""); } function vn(Ne) { return function(Ze) { return Ne(Ze); }; } function rs(Ne, Ze) { return Oe(Ze, function(We) { return Ne[We]; }); } function Ea(Ne, Ze) { return Ne.has(Ze); } function If(Ne, Ze) { for (var We = -1, gt = Ne.length; ++We < gt && wr(Ze, Ne[We], 0) > -1; ) ; return We; } function Df(Ne, Ze) { for (var We = Ne.length; We-- && wr(Ze, Ne[We], 0) > -1; ) ; return We; } function Bc(Ne, Ze) { for (var We = Ne.length, gt = 0; We--; ) Ne[We] === Ze && ++gt; return gt; } var jc = yn(ti), Lc = yn(Ji); function zc(Ne) { return "\\" + Qi[Ne]; } function Hc(Ne, Ze) { return Ne == null ? e : Ne[Ze]; } function ra(Ne) { return ka.test(Ne); } function Xc(Ne) { return kn.test(Ne); } function Uc(Ne) { for (var Ze, We = []; !(Ze = Ne.next()).done; ) We.push(Ze.value); return We; } function ns(Ne) { var Ze = -1, We = Array(Ne.size); return Ne.forEach(function(gt, Bt) { We[++Ze] = [Bt, gt]; }), We; } function Nf(Ne, Ze) { return function(We) { return Ne(Ze(We)); }; } function bi(Ne, Ze) { for (var We = -1, gt = Ne.length, Bt = 0, ar = []; ++We < gt; ) { var Mr = Ne[We]; (Mr === Ze || Mr === f) && (Ne[We] = f, ar[Bt++] = We); } return ar; } function Za(Ne) { var Ze = -1, We = Array(Ne.size); return Ne.forEach(function(gt) { We[++Ze] = gt; }), We; } function $c(Ne) { var Ze = -1, We = Array(Ne.size); return Ne.forEach(function(gt) { We[++Ze] = [gt, gt]; }), We; } function Wc(Ne, Ze, We) { for (var gt = We - 1, Bt = Ne.length; ++gt < Bt; ) if (Ne[gt] === Ze) return gt; return -1; } function Vc(Ne, Ze, We) { for (var gt = We + 1; gt--; ) if (Ne[gt] === Ze) return gt; return gt; } function na(Ne) { return ra(Ne) ? Gc(Ne) : Xt(Ne); } function Ln(Ne) { return ra(Ne) ? Yc(Ne) : ir(Ne); } function Ff(Ne) { for (var Ze = Ne.length; Ze-- && _t.test(Ne.charAt(Ze)); ) ; return Ze; } var Kc = yn(Oa); function Gc(Ne) { for (var Ze = Ri.lastIndex = 0; Ri.test(Ne); ) ++Ze; return Ze; } function Yc(Ne) { return Ne.match(Ri) || []; } function Zc(Ne) { return Ne.match(jn) || []; } var Jc = function Ne(Ze) { Ze = Ze == null ? ht : ia.defaults(ht.Object(), Ze, ia.pick(ht, On)); var We = Ze.Array, gt = Ze.Date, Bt = Ze.Error, ar = Ze.Function, Mr = Ze.Math, cr = Ze.Object, is = Ze.RegExp, Qc = Ze.String, Rn = Ze.TypeError, Ja = We.prototype, qc = ar.prototype, aa = cr.prototype, Qa = Ze["__core-js_shared__"], qa = qc.toString, sr = aa.hasOwnProperty, eh = 0, Bf = function() { var S = /[^.]+$/.exec(Qa && Qa.keys && Qa.keys.IE_PROTO || ""); return S ? "Symbol(src)_1." + S : ""; }(), eo = aa.toString, th = qa.call(cr), rh = ht._, nh = is( "^" + qa.call(sr).replace(st, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ), to = fr ? Ze.Buffer : e, gi = Ze.Symbol, ro = Ze.Uint8Array, jf = to ? to.allocUnsafe : e, no = Nf(cr.getPrototypeOf, cr), Lf = cr.create, zf = aa.propertyIsEnumerable, io = Ja.splice, Hf = gi ? gi.isConcatSpreadable : e, Ta = gi ? gi.iterator : e, Ci = gi ? gi.toStringTag : e, ao = function() { try { var S = Di(cr, "defineProperty"); return S({}, "", {}), S; } catch (T) { } }(), ih = Ze.clearTimeout !== ht.clearTimeout && Ze.clearTimeout, ah = gt && gt.now !== ht.Date.now && gt.now, oh = Ze.setTimeout !== ht.setTimeout && Ze.setTimeout, oo = Mr.ceil, so = Mr.floor, as = cr.getOwnPropertySymbols, sh = to ? to.isBuffer : e, Xf = Ze.isFinite, fh = Ja.join, uh = Nf(cr.keys, cr), Ir = Mr.max, Wr = Mr.min, lh = gt.now, ch = Ze.parseInt, Uf = Mr.random, hh = Ja.reverse, os = Di(Ze, "DataView"), Ra = Di(Ze, "Map"), ss = Di(Ze, "Promise"), oa = Di(Ze, "Set"), Ca = Di(Ze, "WeakMap"), Pa = Di(cr, "create"), fo = Ca && new Ca(), sa = {}, dh = Ni(os), ph = Ni(Ra), yh = Ni(ss), vh = Ni(oa), mh = Ni(Ca), uo = gi ? gi.prototype : e, Aa = uo ? uo.valueOf : e, $f = uo ? uo.toString : e; function de(S) { if (br(S) && !jt(S) && !(S instanceof Zt)) { if (S instanceof Cn) return S; if (sr.call(S, "__wrapped__")) return Wu(S); } return new Cn(S); } var fa = function() { function S() { } return function(T) { if (!vr(T)) return {}; if (Lf) return Lf(T); S.prototype = T; var X = new S(); return S.prototype = e, X; }; }(); function lo() { } function Cn(S, T) { this.__wrapped__ = S, this.__actions__ = [], this.__chain__ = !!T, this.__index__ = 0, this.__values__ = e; } de.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ escape: K, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ evaluate: Me, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ interpolate: Le, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ variable: "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ imports: { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ _: de } }, de.prototype = lo.prototype, de.prototype.constructor = de, Cn.prototype = fa(lo.prototype), Cn.prototype.constructor = Cn; function Zt(S) { this.__wrapped__ = S, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = $, this.__views__ = []; } function bh() { var S = new Zt(this.__wrapped__); return S.__actions__ = nn(this.__actions__), S.__dir__ = this.__dir__, S.__filtered__ = this.__filtered__, S.__iteratees__ = nn(this.__iteratees__), S.__takeCount__ = this.__takeCount__, S.__views__ = nn(this.__views__), S; } function gh() { if (this.__filtered__) { var S = new Zt(this); S.__dir__ = -1, S.__filtered__ = !0; } else S = this.clone(), S.__dir__ *= -1; return S; } function _h() { var S = this.__wrapped__.value(), T = this.__dir__, X = jt(S), Z = T < 0, ie = X ? S.length : 0, ye = Md(0, ie, this.__views__), Te = ye.start, Ae = ye.end, ze = Ae - Te, qe = Z ? Ae : Te - 1, et = this.__iteratees__, at = et.length, yt = 0, kt = Wr(ze, this.__takeCount__); if (!X || !Z && ie == ze && kt == ze) return pu(S, this.__actions__); var Dt = []; e: for (; ze-- && yt < kt; ) { qe += T; for (var $t = -1, Nt = S[qe]; ++$t < at; ) { var Gt = et[$t], qt = Gt.iteratee, gn = Gt.type, tn = qt(Nt); if (gn == I) Nt = tn; else if (!tn) { if (gn == M) continue e; break e; } } Dt[yt++] = Nt; } return Dt; } Zt.prototype = fa(lo.prototype), Zt.prototype.constructor = Zt; function Pi(S) { var T = -1, X = S == null ? 0 : S.length; for (this.clear(); ++T < X; ) { var Z = S[T]; this.set(Z[0], Z[1]); } } function wh() { this.__data__ = Pa ? Pa(null) : {}, this.size = 0; } function xh(S) { var T = this.has(S) && delete this.__data__[S]; return this.size -= T ? 1 : 0, T; } function Sh(S) { var T = this.__data__; if (Pa) { var X = T[S]; return X === b ? e : X; } return sr.call(T, S) ? T[S] : e; } function kh(S) { var T = this.__data__; return Pa ? T[S] !== e : sr.call(T, S); } function Oh(S, T) { var X = this.__data__; return this.size += this.has(S) ? 0 : 1, X[S] = Pa && T === e ? b : T, this; } Pi.prototype.clear = wh, Pi.prototype.delete = xh, Pi.prototype.get = Sh, Pi.prototype.has = kh, Pi.prototype.set = Oh; function ri(S) { var T = -1, X = S == null ? 0 : S.length; for (this.clear(); ++T < X; ) { var Z = S[T]; this.set(Z[0], Z[1]); } } function Eh() { this.__data__ = [], this.size = 0; } function Th(S) { var T = this.__data__, X = co(T, S); if (X < 0) return !1; var Z = T.length - 1; return X == Z ? T.pop() : io.call(T, X, 1), --this.size, !0; } function Rh(S) { var T = this.__data__, X = co(T, S); return X < 0 ? e : T[X][1]; } function Ch(S) { return co(this.__data__, S) > -1; } function Ph(S, T) { var X = this.__data__, Z = co(X, S); return Z < 0 ? (++this.size, X.push([S, T])) : X[Z][1] = T, this; } ri.prototype.clear = Eh, ri.prototype.delete = Th, ri.prototype.get = Rh, ri.prototype.has = Ch, ri.prototype.set = Ph; function ni(S) { var T = -1, X = S == null ? 0 : S.length; for (this.clear(); ++T < X; ) { var Z = S[T]; this.set(Z[0], Z[1]); } } function Ah() { this.size = 0, this.__data__ = { hash: new Pi(), map: new (Ra || ri)(), string: new Pi() }; } function Mh(S) { var T = ko(this, S).delete(S); return this.size -= T ? 1 : 0, T; } function Ih(S) { return ko(this, S).get(S); } function Dh(S) { return ko(this, S).has(S); } function Nh(S, T) { var X = ko(this, S), Z = X.size; return X.set(S, T), this.size += X.size == Z ? 0 : 1, this; } ni.prototype.clear = Ah, ni.prototype.delete = Mh, ni.prototype.get = Ih, ni.prototype.has = Dh, ni.prototype.set = Nh; function Ai(S) { var T = -1, X = S == null ? 0 : S.length; for (this.__data__ = new ni(); ++T < X; ) this.add(S[T]); } function Fh(S) { return this.__data__.set(S, b), this; } function Bh(S) { return this.__data__.has(S); } Ai.prototype.add = Ai.prototype.push = Fh, Ai.prototype.has = Bh; function zn(S) { var T = this.__data__ = new ri(S); this.size = T.size; } function jh() { this.__data__ = new ri(), this.size = 0; } function Lh(S) { var T = this.__data__, X = T.delete(S); return this.size = T.size, X; } function zh(S) { return this.__data__.get(S); } function Hh(S) { return this.__data__.has(S); } function Xh(S, T) { var X = this.__data__; if (X instanceof ri) { var Z = X.__data__; if (!Ra || Z.length < _ - 1) return Z.push([S, T]), this.size = ++X.size, this; X = this.__data__ = new ni(Z); } return X.set(S, T), this.size = X.size, this; } zn.prototype.clear = jh, zn.prototype.delete = Lh, zn.prototype.get = zh, zn.prototype.has = Hh, zn.prototype.set = Xh; function Wf(S, T) { var X = jt(S), Z = !X && Fi(S), ie = !X && !Z && ki(S), ye = !X && !Z && !ie && ha(S), Te = X || Z || ie || ye, Ae = Te ? mi(S.length, Qc) : [], ze = Ae.length; for (var qe in S) (T || sr.call(S, qe)) && !(Te && // Safari 9 has enumerable `arguments.length` in strict mode. (qe == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. ie && (qe == "offset" || qe == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. ye && (qe == "buffer" || qe == "byteLength" || qe == "byteOffset") || // Skip index properties. si(qe, ze))) && Ae.push(qe); return Ae; } function Vf(S) { var T = S.length; return T ? S[bs(0, T - 1)] : e; } function Uh(S, T) { return Oo(nn(S), Mi(T, 0, S.length)); } function $h(S) { return Oo(nn(S)); } function fs(S, T, X) { (X !== e && !Hn(S[T], X) || X === e && !(T in S)) && ii(S, T, X); } function Ma(S, T, X) { var Z = S[T]; (!(sr.call(S, T) && Hn(Z, X)) || X === e && !(T in S)) && ii(S, T, X); } function co(S, T) { for (var X = S.length; X--; ) if (Hn(S[X][0], T)) return X; return -1; } function Wh(S, T, X, Z) { return _i(S, function(ie, ye, Te) { T(Z, ie, X(ie), Te); }), Z; } function Kf(S, T) { return S && Gn(T, jr(T), S); } function Vh(S, T) { return S && Gn(T, on(T), S); } function ii(S, T, X) { T == "__proto__" && ao ? ao(S, T, { configurable: !0, enumerable: !0, value: X, writable: !0 }) : S[T] = X; } function us(S, T) { for (var X = -1, Z = T.length, ie = We(Z), ye = S == null; ++X < Z; ) ie[X] = ye ? e : Us(S, T[X]); return ie; } function Mi(S, T, X) { return S === S && (X !== e && (S = S <= X ? S : X), T !== e && (S = S >= T ? S : T)), S; } function Pn(S, T, X, Z, ie, ye) { var Te, Ae = T & y, ze = T & h, qe = T & l; if (X && (Te = ie ? X(S, Z, ie, ye) : X(S)), Te !== e) return Te; if (!vr(S)) return S; var et = jt(S); if (et) { if (Te = Dd(S), !Ae) return nn(S, Te); } else { var at = Vr(S), yt = at == ge || at == oe; if (ki(S)) return mu(S, Ae); if (at == ke || at == B || yt && !ie) { if (Te = ze || yt ? {} : Fu(S), !Ae) return ze ? Sd(S, Vh(Te, S)) : xd(S, Kf(Te, S)); } else { if (!er[at]) return ie ? S : {}; Te = Nd(S, at, Ae); } } ye || (ye = new zn()); var kt = ye.get(S); if (kt) return kt; ye.set(S, Te), cl(S) ? S.forEach(function(Nt) { Te.add(Pn(Nt, T, X, Nt, S, ye)); }) : ul(S) && S.forEach(function(Nt, Gt) { Te.set(Gt, Pn(Nt, T, X, Gt, S, ye)); }); var Dt = qe ? ze ? Cs : Rs : ze ? on : jr, $t = et ? e : Dt(S); return mr($t || S, function(Nt, Gt) { $t && (Gt = Nt, Nt = S[Gt]), Ma(Te, Gt, Pn(Nt, T, X, Gt, S, ye)); }), Te; } function Kh(S) { var T = jr(S); return function(X) { return Gf(X, S, T); }; } function Gf(S, T, X) { var Z = X.length; if (S == null) return !Z; for (S = cr(S); Z--; ) { var ie = X[Z], ye = T[ie], Te = S[ie]; if (Te === e && !(ie in S) || !ye(Te)) return !1; } return !0; } function Yf(S, T, X) { if (typeof S != "function") throw new Rn(m); return La(function() { S.apply(e, X); }, T); } function Ia(S, T, X, Z) { var ie = -1, ye = ta, Te = !0, Ae = S.length, ze = [], qe = T.length; if (!Ae) return ze; X && (T = Oe(T, vn(X))), Z ? (ye = le, Te = !1) : T.length >= _ && (ye = Ea, Te = !1, T = new Ai(T)); e: for (; ++ie < Ae; ) { var et = S[ie], at = X == null ? et : X(et); if (et = Z || et !== 0 ? et : 0, Te && at === at) { for (var yt = qe; yt--; ) if (T[yt] === at) continue e; ze.push(et); } else ye(T, at, Z) || ze.push(et); } return ze; } var _i = xu(Kn), Zf = xu(cs, !0); function Gh(S, T) { var X = !0; return _i(S, function(Z, ie, ye) { return X = !!T(Z, ie, ye), X; }), X; } function ho(S, T, X) { for (var Z = -1, ie = S.length; ++Z < ie; ) { var ye = S[Z], Te = T(ye); if (Te != null && (Ae === e ? Te === Te && !bn(Te) : X(Te, Ae))) var Ae = Te, ze = ye; } return ze; } function Yh(S, T, X, Z) { var ie = S.length; for (X = Ut(X), X < 0 && (X = -X > ie ? 0 : ie + X), Z = Z === e || Z > ie ? ie : Ut(Z), Z < 0 && (Z += ie), Z = X > Z ? 0 : dl(Z); X < Z; ) S[X++] = T; return S; } function Jf(S, T) { var X = []; return _i(S, function(Z, ie, ye) { T(Z, ie, ye) && X.push(Z); }), X; } function Hr(S, T, X, Z, ie) { var ye = -1, Te = S.length; for (X || (X = Bd), ie || (ie = []); ++ye < Te; ) { var Ae = S[ye]; T > 0 && X(Ae) ? T > 1 ? Hr(Ae, T - 1, X, Z, ie) : Xe(ie, Ae) : Z || (ie[ie.length] = Ae); } return ie; } var ls = Su(), Qf = Su(!0); function Kn(S, T) { return S && ls(S, T, jr); } function cs(S, T) { return S && Qf(S, T, jr); } function po(S, T) { return Zr(T, function(X) { return fi(S[X]); }); } function Ii(S, T) { T = xi(T, S); for (var X = 0, Z = T.length; S != null && X < Z; ) S = S[Yn(T[X++])]; return X && X == Z ? S : e; } function qf(S, T, X) { var Z = T(S); return jt(S) ? Z : Xe(Z, X(S)); } function qr(S) { return S == null ? S === e ? fe : he : Ci && Ci in cr(S) ? Ad(S) : $d(S); } function hs(S, T) { return S > T; } function Zh(S, T) { return S != null && sr.call(S, T); } function Jh(S, T) { return S != null && T in cr(S); } function Qh(S, T, X) { return S >= Wr(T, X) && S < Ir(T, X); } function ds(S, T, X) { for (var Z = X ? le : ta, ie = S[0].length, ye = S.length, Te = ye, Ae = We(ye), ze = 1 / 0, qe = []; Te--; ) { var et = S[Te]; Te && T && (et = Oe(et, vn(T))), ze = Wr(et.length, ze), Ae[Te] = !X && (T || ie >= 120 && et.length >= 120) ? new Ai(Te && et) : e; } et = S[0]; var at = -1, yt = Ae[0]; e: for (; ++at < ie && qe.length < ze; ) { var kt = et[at], Dt = T ? T(kt) : kt; if (kt = X || kt !== 0 ? kt : 0, !(yt ? Ea(yt, Dt) : Z(qe, Dt, X))) { for (Te = ye; --Te; ) { var $t = Ae[Te]; if (!($t ? Ea($t, Dt) : Z(S[Te], Dt, X))) continue e; } yt && yt.push(Dt), qe.push(kt); } } return qe; } function qh(S, T, X, Z) { return Kn(S, function(ie, ye, Te) { T(Z, X(ie), ye, Te); }), Z; } function Da(S, T, X) { T = xi(T, S), S = zu(S, T); var Z = S == null ? S : S[Yn(Mn(T))]; return Z == null ? e : pr(Z, S, X); } function eu(S) { return br(S) && qr(S) == B; } function ed(S) { return br(S) && qr(S) == je; } function td(S) { return br(S) && qr(S) == ee; } function Na(S, T, X, Z, ie) { return S === T ? !0 : S == null || T == null || !br(S) && !br(T) ? S !== S && T !== T : rd(S, T, X, Z, Na, ie); } function rd(S, T, X, Z, ie, ye) { var Te = jt(S), Ae = jt(T), ze = Te ? j : Vr(S), qe = Ae ? j : Vr(T); ze = ze == B ? ke : ze, qe = qe == B ? ke : qe; var et = ze == ke, at = qe == ke, yt = ze == qe; if (yt && ki(S)) { if (!ki(T)) return !1; Te = !0, et = !1; } if (yt && !et) return ye || (ye = new zn()), Te || ha(S) ? Iu(S, T, X, Z, ie, ye) : Cd(S, T, ze, X, Z, ie, ye); if (!(X & d)) { var kt = et && sr.call(S, "__wrapped__"), Dt = at && sr.call(T, "__wrapped__"); if (kt || Dt) { var $t = kt ? S.value() : S, Nt = Dt ? T.value() : T; return ye || (ye = new zn()), ie($t, Nt, X, Z, ye); } } return yt ? (ye || (ye = new zn()), Pd(S, T, X, Z, ie, ye)) : !1; } function nd(S) { return br(S) && Vr(S) == J; } function ps(S, T, X, Z) { var ie = X.length, ye = ie, Te = !Z; if (S == null) return !ye; for (S = cr(S); ie--; ) { var Ae = X[ie]; if (Te && Ae[2] ? Ae[1] !== S[Ae[0]] : !(Ae[0] in S)) return !1; } for (; ++ie < ye; ) { Ae = X[ie]; var ze = Ae[0], qe = S[ze], et = Ae[1]; if (Te && Ae[2]) { if (qe === e && !(ze in S)) return !1; } else { var at = new zn(); if (Z) var yt = Z(qe, et, ze, S, T, at); if (!(yt === e ? Na(et, qe, d | s, Z, at) : yt)) return !1; } } return !0; } function tu(S) { if (!vr(S) || Ld(S)) return !1; var T = fi(S) ? nh : Ft; return T.test(Ni(S)); } function id(S) { return br(S) && qr(S) == Ce; } function ad(S) { return br(S) && Vr(S) == q; } function od(S) { return br(S) && Ao(S.length) && !!rr[qr(S)]; } function ru(S) { return typeof S == "function" ? S : S == null ? sn : typeof S == "object" ? jt(S) ? au(S[0], S[1]) : iu(S) : kl(S); } function ys(S) { if (!ja(S)) return uh(S); var T = []; for (var X in cr(S)) sr.call(S, X) && X != "constructor" && T.push(X); return T; } function sd(S) { if (!vr(S)) return Ud(S); var T = ja(S), X = []; for (var Z in S) Z == "constructor" && (T || !sr.call(S, Z)) || X.push(Z); return X; } function vs(S, T) { return S < T; } function nu(S, T) { var X = -1, Z = an(S) ? We(S.length) : []; return _i(S, function(ie, ye, Te) { Z[++X] = T(ie, ye, Te); }), Z; } function iu(S) { var T = As(S); return T.length == 1 && T[0][2] ? ju(T[0][0], T[0][1]) : function(X) { return X === S || ps(X, S, T); }; } function au(S, T) { return Is(S) && Bu(T) ? ju(Yn(S), T) : function(X) { var Z = Us(X, S); return Z === e && Z === T ? $s(X, S) : Na(T, Z, d | s); }; } function yo(S, T, X, Z, ie) { S !== T && ls(T, function(ye, Te) { if (ie || (ie = new zn()), vr(ye)) fd(S, T, Te, X, yo, Z, ie); else { var Ae = Z ? Z(Ns(S, Te), ye, Te + "", S, T, ie) : e; Ae === e && (Ae = ye), fs(S, Te, Ae); } }, on); } function fd(S, T, X, Z, ie, ye, Te) { var Ae = Ns(S, X), ze = Ns(T, X), qe = Te.get(ze); if (qe) { fs(S, X, qe); return; } var et = ye ? ye(Ae, ze, X + "", S, T, Te) : e, at = et === e; if (at) { var yt = jt(ze), kt = !yt && ki(ze), Dt = !yt && !kt && ha(ze); et = ze, yt || kt || Dt ? jt(Ae) ? et = Ae : xr(Ae) ? et = nn(Ae) : kt ? (at = !1, et = mu(ze, !0)) : Dt ? (at = !1, et = bu(ze, !0)) : et = [] : za(ze) || Fi(ze) ? (et = Ae, Fi(Ae) ? et = pl(Ae) : (!vr(Ae) || fi(Ae)) && (et = Fu(ze))) : at = !1; } at && (Te.set(ze, et), ie(et, ze, Z, ye, Te), Te.delete(ze)), fs(S, X, et); } function ou(S, T) { var X = S.length; if (X) return T += T < 0 ? X : 0, si(T, X) ? S[T] : e; } function su(S, T, X) { T.length ? T = Oe(T, function(ye) { return jt(ye) ? function(Te) { return Ii(Te, ye.length === 1 ? ye[0] : ye); } : ye; }) : T = [sn]; var Z = -1; T = Oe(T, vn(It())); var ie = nu(S, function(ye, Te, Ae) { var ze = Oe(T, function(qe) { return qe(ye); }); return { criteria: ze, index: ++Z, value: ye }; }); return Ya(ie, function(ye, Te) { return wd(ye, Te, X); }); } function ud(S, T) { return fu(S, T, function(X, Z) { return $s(S, Z); }); } function fu(S, T, X) { for (var Z = -1, ie = T.length, ye = {}; ++Z < ie; ) { var Te = T[Z], Ae = Ii(S, Te); X(Ae, Te) && Fa(ye, xi(Te, S), Ae); } return ye; } function ld(S) { return function(T) { return Ii(T, S); }; } function ms(S, T, X, Z) { var ie = Z ? Rr : wr, ye = -1, Te = T.length, Ae = S; for (S === T && (T = nn(T)), X && (Ae = Oe(S, vn(X))); ++ye < Te; ) for (var ze = 0, qe = T[ye], et = X ? X(qe) : qe; (ze = ie(Ae, et, ze, Z)) > -1; ) Ae !== S && io.call(Ae, ze, 1), io.call(S, ze, 1); return S; } function uu(S, T) { for (var X = S ? T.length : 0, Z = X - 1; X--; ) { var ie = T[X]; if (X == Z || ie !== ye) { var ye = ie; si(ie) ? io.call(S, ie, 1) : ws(S, ie); } } return S; } function bs(S, T) { return S + so(Uf() * (T - S + 1)); } function cd(S, T, X, Z) { for (var ie = -1, ye = Ir(oo((T - S) / (X || 1)), 0), Te = We(ye); ye--; ) Te[Z ? ye : ++ie] = S, S += X; return Te; } function gs(S, T) { var X = ""; if (!S || T < 1 || T > E) return X; do T % 2 && (X += S), T = so(T / 2), T && (S += S); while (T); return X; } function Vt(S, T) { return Fs(Lu(S, T, sn), S + ""); } function hd(S) { return Vf(da(S)); } function dd(S, T) { var X = da(S); return Oo(X, Mi(T, 0, X.length)); } function Fa(S, T, X, Z) { if (!vr(S)) return S; T = xi(T, S); for (var ie = -1, ye = T.length, Te = ye - 1, Ae = S; Ae != null && ++ie < ye; ) { var ze = Yn(T[ie]), qe = X; if (ze === "__proto__" || ze === "constructor" || ze === "prototype") return S; if (ie != Te) { var et = Ae[ze]; qe = Z ? Z(et, ze, Ae) : e, qe === e && (qe = vr(et) ? et : si(T[ie + 1]) ? [] : {}); } Ma(Ae, ze, qe), Ae = Ae[ze]; } return S; } var lu = fo ? function(S, T) { return fo.set(S, T), S; } : sn, pd = ao ? function(S, T) { return ao(S, "toString", { configurable: !0, enumerable: !1, value: Vs(T), writable: !0 }); } : sn; function yd(S) { return Oo(da(S)); } function An(S, T, X) { var Z = -1, ie = S.length; T < 0 && (T = -T > ie ? 0 : ie + T), X = X > ie ? ie : X, X < 0 && (X += ie), ie = T > X ? 0 : X - T >>> 0, T >>>= 0; for (var ye = We(ie); ++Z < ie; ) ye[Z] = S[Z + T]; return ye; } function vd(S, T) { var X; return _i(S, function(Z, ie, ye) { return X = T(Z, ie, ye), !X; }), !!X; } function vo(S, T, X) { var Z = 0, ie = S == null ? Z : S.length; if (typeof T == "number" && T === T && ie <= U) { for (; Z < ie; ) { var ye = Z + ie >>> 1, Te = S[ye]; Te !== null && !bn(Te) && (X ? Te <= T : Te < T) ? Z = ye + 1 : ie = ye; } return ie; } return _s(S, T, sn, X); } function _s(S, T, X, Z) { var ie = 0, ye = S == null ? 0 : S.length; if (ye === 0) return 0; T = X(T); for (var Te = T !== T, Ae = T === null, ze = bn(T), qe = T === e; ie < ye; ) { var et = so((ie + ye) / 2), at = X(S[et]), yt = at !== e, kt = at === null, Dt = at === at, $t = bn(at); if (Te) var Nt = Z || Dt; else qe ? Nt = Dt && (Z || yt) : Ae ? Nt = Dt && yt && (Z || !kt) : ze ? Nt = Dt && yt && !kt && (Z || !$t) : kt || $t ? Nt = !1 : Nt = Z ? at <= T : at < T; Nt ? ie = et + 1 : ye = et; } return Wr(ye, W); } function cu(S, T) { for (var X = -1, Z = S.length, ie = 0, ye = []; ++X < Z; ) { var Te = S[X], Ae = T ? T(Te) : Te; if (!X || !Hn(Ae, ze)) { var ze = Ae; ye[ie++] = Te === 0 ? 0 : Te; } } return ye; } function hu(S) { return typeof S == "number" ? S : bn(S) ? L : +S; } function mn(S) { if (typeof S == "string") return S; if (jt(S)) return Oe(S, mn) + ""; if (bn(S)) return $f ? $f.call(S) : ""; var T = S + ""; return T == "0" && 1 / S == -C ? "-0" : T; } function wi(S, T, X) { var Z = -1, ie = ta, ye = S.length, Te = !0, Ae = [], ze = Ae; if (X) Te = !1, ie = le; else if (ye >= _) { var qe = T ? null : Td(S); if (qe) return Za(qe); Te = !1, ie = Ea, ze = new Ai(); } else ze = T ? [] : Ae; e: for (; ++Z < ye; ) { var et = S[Z], at = T ? T(et) : et; if (et = X || et !== 0 ? et : 0, Te && at === at) { for (var yt = ze.length; yt--; ) if (ze[yt] === at) continue e; T && ze.push(at), Ae.push(et); } else ie(ze, at, X) || (ze !== Ae && ze.push(at), Ae.push(et)); } return Ae; } function ws(S, T) { return T = xi(T, S), S = zu(S, T), S == null || delete S[Yn(Mn(T))]; } function du(S, T, X, Z) { return Fa(S, T, X(Ii(S, T)), Z); } function mo(S, T, X, Z) { for (var ie = S.length, ye = Z ? ie : -1; (Z ? ye-- : ++ye < ie) && T(S[ye], ye, S); ) ; return X ? An(S, Z ? 0 : ye, Z ? ye + 1 : ie) : An(S, Z ? ye + 1 : 0, Z ? ie : ye); } function pu(S, T) { var X = S; return X instanceof Zt && (X = X.value()), ft(T, function(Z, ie) { return ie.func.apply(ie.thisArg, Xe([Z], ie.args)); }, X); } function xs(S, T, X) { var Z = S.length; if (Z < 2) return Z ? wi(S[0]) : []; for (var ie = -1, ye = We(Z); ++ie < Z; ) for (var Te = S[ie], Ae = -1; ++Ae < Z; ) Ae != ie && (ye[ie] = Ia(ye[ie] || Te, S[Ae], T, X)); return wi(Hr(ye, 1), T, X); } function yu(S, T, X) { for (var Z = -1, ie = S.length, ye = T.length, Te = {}; ++Z < ie; ) { var Ae = Z < ye ? T[Z] : e; X(Te, S[Z], Ae); } return Te; } function Ss(S) { return xr(S) ? S : []; } function ks(S) { return typeof S == "function" ? S : sn; } function xi(S, T) { return jt(S) ? S : Is(S, T) ? [S] : $u(or(S)); } var md = Vt; function Si(S, T, X) { var Z = S.length; return X = X === e ? Z : X, !T && X >= Z ? S : An(S, T, X); } var vu = ih || function(S) { return ht.clearTimeout(S); }; function mu(S, T) { if (T) return S.slice(); var X = S.length, Z = jf ? jf(X) : new S.constructor(X); return S.copy(Z), Z; } function Os(S) { var T = new S.constructor(S.byteLength); return new ro(T).set(new ro(S)), T; } function bd(S, T) { var X = T ? Os(S.buffer) : S.buffer; return new S.constructor(X, S.byteOffset, S.byteLength); } function gd(S) { var T = new S.constructor(S.source, Kt.exec(S)); return T.lastIndex = S.lastIndex, T; } function _d(S) { return Aa ? cr(Aa.call(S)) : {}; } function bu(S, T) { var X = T ? Os(S.buffer) : S.buffer; return new S.constructor(X, S.byteOffset, S.length); } function gu(S, T) { if (S !== T) { var X = S !== e, Z = S === null, ie = S === S, ye = bn(S), Te = T !== e, Ae = T === null, ze = T === T, qe = bn(T); if (!Ae && !qe && !ye && S > T || ye && Te && ze && !Ae && !qe || Z && Te && ze || !X && ze || !ie) return 1; if (!Z && !ye && !qe && S < T || qe && X && ie && !Z && !ye || Ae && X && ie || !Te && ie || !ze) return -1; } return 0; } function wd(S, T, X) { for (var Z = -1, ie = S.criteria, ye = T.criteria, Te = ie.length, Ae = X.length; ++Z < Te; ) { var ze = gu(ie[Z], ye[Z]); if (ze) { if (Z >= Ae) return ze; var qe = X[Z]; return ze * (qe == "desc" ? -1 : 1); } } return S.index - T.index; } function _u(S, T, X, Z) { for (var ie = -1, ye = S.length, Te = X.length, Ae = -1, ze = T.length, qe = Ir(ye - Te, 0), et = We(ze + qe), at = !Z; ++Ae < ze; ) et[Ae] = T[Ae]; for (; ++ie < Te; ) (at || ie < ye) && (et[X[ie]] = S[ie]); for (; qe--; ) et[Ae++] = S[ie++]; return et; } function wu(S, T, X, Z) { for (var ie = -1, ye = S.length, Te = -1, Ae = X.length, ze = -1, qe = T.length, et = Ir(ye - Ae, 0), at = We(et + qe), yt = !Z; ++ie < et; ) at[ie] = S[ie]; for (var kt = ie; ++ze < qe; ) at[kt + ze] = T[ze]; for (; ++Te < Ae; ) (yt || ie < ye) && (at[kt + X[Te]] = S[ie++]); return at; } function nn(S, T) { var X = -1, Z = S.length; for (T || (T = We(Z)); ++X < Z; ) T[X] = S[X]; return T; } function Gn(S, T, X, Z) { var ie = !X; X || (X = {}); for (var ye = -1, Te = T.length; ++ye < Te; ) { var Ae = T[ye], ze = Z ? Z(X[Ae], S[Ae], Ae, X, S) : e; ze === e && (ze = S[Ae]), ie ? ii(X, Ae, ze) : Ma(X, Ae, ze); } return X; } function xd(S, T) { return Gn(S, Ms(S), T); } function Sd(S, T) { return Gn(S, Du(S), T); } function bo(S, T) { return function(X, Z) { var ie = jt(X) ? pn : Wh, ye = T ? T() : {}; return ie(X, S, It(Z, 2), ye); }; } function ua(S) { return Vt(function(T, X) { var Z = -1, ie = X.length, ye = ie > 1 ? X[ie - 1] : e, Te = ie > 2 ? X[2] : e; for (ye = S.length > 3 && typeof ye == "function" ? (ie--, ye) : e, Te && en(X[0], X[1], Te) && (ye = ie < 3 ? e : ye, ie = 1), T = cr(T); ++Z < ie; ) { var Ae = X[Z]; Ae && S(T, Ae, Z, ye); } return T; }); } function xu(S, T) { return function(X, Z) { if (X == null) return X; if (!an(X)) return S(X, Z); for (var ie = X.length, ye = T ? ie : -1, Te = cr(X); (T ? ye-- : ++ye < ie) && Z(Te[ye], ye, Te) !== !1; ) ; return X; }; } function Su(S) { return function(T, X, Z) { for (var ie = -1, ye = cr(T), Te = Z(T), Ae = Te.length; Ae--; ) { var ze = Te[S ? Ae : ++ie]; if (X(ye[ze], ze, ye) === !1) break; } return T; }; } function kd(S, T, X) { var Z = T & v, ie = Ba(S); function ye() { var Te = this && this !== ht && this instanceof ye ? ie : S; return Te.apply(Z ? X : this, arguments); } return ye; } function ku(S) { return function(T) { T = or(T); var X = ra(T) ? Ln(T) : e, Z = X ? X[0] : T.charAt(0), ie = X ? Si(X, 1).join("") : T.slice(1); return Z[S]() + ie; }; } function la(S) { return function(T) { return ft(xl(wl(T).replace(Sn, "")), S, ""); }; } function Ba(S) { return function() { var T = arguments; switch (T.length) { case 0: return new S(); case 1: return new S(T[0]); case 2: return new S(T[0], T[1]); case 3: return new S(T[0], T[1], T[2]); case 4: return new S(T[0], T[1], T[2], T[3]); case 5: return new S(T[0], T[1], T[2], T[3], T[4]); case 6: return new S(T[0], T[1], T[2], T[3], T[4], T[5]); case 7: return new S(T[0], T[1], T[2], T[3], T[4], T[5], T[6]); } var X = fa(S.prototype), Z = S.apply(X, T); return vr(Z) ? Z : X; }; } function Od(S, T, X) { var Z = Ba(S); function ie() { for (var ye = arguments.length, Te = We(ye), Ae = ye, ze = ca(ie); Ae--; ) Te[Ae] = arguments[Ae]; var qe = ye < 3 && Te[0] !== ze && Te[ye - 1] !== ze ? [] : bi(Te, ze); if (ye -= qe.length, ye < X) return Cu( S, T, go, ie.placeholder, e, Te, qe, e, e, X - ye ); var et = this && this !== ht && this instanceof ie ? Z : S; return pr(et, this, Te); } return ie; } function Ou(S) { return function(T, X, Z) { var ie = cr(T); if (!an(T)) { var ye = It(X, 3); T = jr(T), X = function(Ae) { return ye(ie[Ae], Ae, ie); }; } var Te = S(T, X, Z); return Te > -1 ? ie[ye ? T[Te] : Te] : e; }; } function Eu(S) { return oi(function(T) { var X = T.length, Z = X, ie = Cn.prototype.thru; for (S && T.reverse(); Z--; ) { var ye = T[Z]; if (typeof ye != "function") throw new Rn(m); if (ie && !Te && So(ye) == "wrapper") var Te = new Cn([], !0); } for (Z = Te ? Z : X; ++Z < X; ) { ye = T[Z]; var Ae = So(ye), ze = Ae == "wrapper" ? Ps(ye) : e; ze && Ds(ze[0]) && ze[1] == (o | r | i | p) && !ze[4].length && ze[9] == 1 ? Te = Te[So(ze[0])].apply(Te, ze[3]) : Te = ye.length == 1 && Ds(ye) ? Te[Ae]() : Te.thru(ye); } return function() { var qe = arguments, et = qe[0]; if (Te && qe.length == 1 && jt(et)) return Te.plant(et).value(); for (var at = 0, yt = X ? T[at].apply(this, qe) : et; ++at < X; ) yt = T[at].call(this, yt); return yt; }; }); } function go(S, T, X, Z, ie, ye, Te, Ae, ze, qe) { var et = T & o, at = T & v, yt = T & c, kt = T & (r | t), Dt = T & O, $t = yt ? e : Ba(S); function Nt() { for (var Gt = arguments.length, qt = We(Gt), gn = Gt; gn--; ) qt[gn] = arguments[gn]; if (kt) var tn = ca(Nt), _n = Bc(qt, tn); if (Z && (qt = _u(qt, Z, ie, kt)), ye && (qt = wu(qt, ye, Te, kt)), Gt -= _n, kt && Gt < qe) { var Sr = bi(qt, tn); return Cu( S, T, go, Nt.placeholder, X, qt, Sr, Ae, ze, qe - Gt ); } var Xn = at ? X : this, li = yt ? Xn[S] : S; return Gt = qt.length, Ae ? qt = Wd(qt, Ae) : Dt && Gt > 1 && qt.reverse(), et && ze < Gt && (qt.length = ze), this && this !== ht && this instanceof Nt && (li = $t || Ba(li)), li.apply(Xn, qt); } return Nt; } function Tu(S, T) { return function(X, Z) { return qh(X, S, T(Z), {}); }; } function _o(S, T) { return function(X, Z) { var ie; if (X === e && Z === e) return T; if (X !== e && (ie = X), Z !== e) { if (ie === e) return Z; typeof X == "string" || typeof Z == "string" ? (X = mn(X), Z = mn(Z)) : (X = hu(X), Z = hu(Z)), ie = S(X, Z); } return ie; }; } function Es(S) { return oi(function(T) { return T = Oe(T, vn(It())), Vt(function(X) { var Z = this; return S(T, function(ie) { return pr(ie, Z, X); }); }); }); } function wo(S, T) { T = T === e ? " " : mn(T); var X = T.length; if (X < 2) return X ? gs(T, S) : T; var Z = gs(T, oo(S / na(T))); return ra(T) ? Si(Ln(Z), 0, S).join("") : Z.slice(0, S); } function Ed(S, T, X, Z) { var ie = T & v, ye = Ba(S); function Te() { for (var Ae = -1, ze = arguments.length, qe = -1, et = Z.length, at = We(et + ze), yt = this && this !== ht && this instanceof Te ? ye : S; ++qe < et; ) at[qe] = Z[qe]; for (; ze--; ) at[qe++] = arguments[++Ae]; return pr(yt, ie ? X : this, at); } return Te; } function Ru(S) { return function(T, X, Z) { return Z && typeof Z != "number" && en(T, X, Z) && (X = Z = e), T = ui(T), X === e ? (X = T, T = 0) : X = ui(X), Z = Z === e ? T < X ? 1 : -1 : ui(Z), cd(T, X, Z, S); }; } function xo(S) { return function(T, X) { return typeof T == "string" && typeof X == "string" || (T = In(T), X = In(X)), S(T, X); }; } function Cu(S, T, X, Z, ie, ye, Te, Ae, ze, qe) { var et = T & r, at = et ? Te : e, yt = et ? e : Te, kt = et ? ye : e, Dt = et ? e : ye; T |= et ? i : n, T &= ~(et ? n : i), T & a || (T &= ~(v | c)); var $t = [ S, T, ie, kt, at, Dt, yt, Ae, ze, qe ], Nt = X.apply(e, $t); return Ds(S) && Hu(Nt, $t), Nt.placeholder = Z, Xu(Nt, S, T); } function Ts(S) { var T = Mr[S]; return function(X, Z) { if (X = In(X), Z = Z == null ? 0 : Wr(Ut(Z), 292), Z && Xf(X)) { var ie = (or(X) + "e").split("e"), ye = T(ie[0] + "e" + (+ie[1] + Z)); return ie = (or(ye) + "e").split("e"), +(ie[0] + "e" + (+ie[1] - Z)); } return T(X); }; } var Td = oa && 1 / Za(new oa([, -0]))[1] == C ? function(S) { return new oa(S); } : Ys; function Pu(S) { return function(T) { var X = Vr(T); return X == J ? ns(T) : X == q ? $c(T) : Fc(T, S(T)); }; } function ai(S, T, X, Z, ie, ye, Te, Ae) { var ze = T & c; if (!ze && typeof S != "function") throw new Rn(m); var qe = Z ? Z.length : 0; if (qe || (T &= ~(i | n), Z = ie = e), Te = Te === e ? Te : Ir(Ut(Te), 0), Ae = Ae === e ? Ae : Ut(Ae), qe -= ie ? ie.length : 0, T & n) { var et = Z, at = ie; Z = ie = e; } var yt = ze ? e : Ps(S), kt = [ S, T, X, Z, ie, et, at, ye, Te, Ae ]; if (yt && Xd(kt, yt), S = kt[0], T = kt[1], X = kt[2], Z = kt[3], ie = kt[4], Ae = kt[9] = kt[9] === e ? ze ? 0 : S.length : Ir(kt[9] - qe, 0), !Ae && T & (r | t) && (T &= ~(r | t)), !T || T == v) var Dt = kd(S, T, X); else T == r || T == t ? Dt = Od(S, T, Ae) : (T == i || T == (v | i)) && !ie.length ? Dt = Ed(S, T, X, Z) : Dt = go.apply(e, kt); var $t = yt ? lu : Hu; return Xu($t(Dt, kt), S, T); } function Au(S, T, X, Z) { return S === e || Hn(S, aa[X]) && !sr.call(Z, X) ? T : S; } function Mu(S, T, X, Z, ie, ye) { return vr(S) && vr(T) && (ye.set(T, S), yo(S, T, e, Mu, ye), ye.delete(T)), S; } function Rd(S) { return za(S) ? e : S; } function Iu(S, T, X, Z, ie, ye) { var Te = X & d, Ae = S.length, ze = T.length; if (Ae != ze && !(Te && ze > Ae)) return !1; var qe = ye.get(S), et = ye.get(T); if (qe && et) return qe == T && et == S; var at = -1, yt = !0, kt = X & s ? new Ai() : e; for (ye.set(S, T), ye.set(T, S); ++at < Ae; ) { var Dt = S[at], $t = T[at]; if (Z) var Nt = Te ? Z($t, Dt, at, T, S, ye) : Z(Dt, $t, at, S, T, ye); if (Nt !== e) { if (Nt) continue; yt = !1; break; } if (kt) { if (!mt(T, function(Gt, qt) { if (!Ea(kt, qt) && (Dt === Gt || ie(Dt, Gt, X, Z, ye))) return kt.push(qt); })) { yt = !1; break; } } else if (!(Dt === $t || ie(Dt, $t, X, Z, ye))) { yt = !1; break; } } return ye.delete(S), ye.delete(T), yt; } function Cd(S, T, X, Z, ie, ye, Te) { switch (X) { case Ye: if (S.byteLength != T.byteLength || S.byteOffset != T.byteOffset) return !1; S = S.buffer, T = T.buffer; case je: return !(S.byteLength != T.byteLength || !ye(new ro(S), new ro(T))); case re: case ee: case Q: return Hn(+S, +T); case ve: return S.name == T.name && S.message == T.message; case Ce: case G: return S == T + ""; case J: var Ae = ns; case q: var ze = Z & d; if (Ae || (Ae = Za), S.size != T.size && !ze) return !1; var qe = Te.get(S); if (qe) return qe == T; Z |= s, Te.set(S, T); var et = Iu(Ae(S), Ae(T), Z, ie, ye, Te); return Te.delete(S), et; case Y: if (Aa) return Aa.call(S) == Aa.call(T); } return !1; } function Pd(S, T, X, Z, ie, ye) { var Te = X & d, Ae = Rs(S), ze = Ae.length, qe = Rs(T), et = qe.length; if (ze != et && !Te) return !1; for (var at = ze; at--; ) { var yt = Ae[at]; if (!(Te ? yt in T : sr.call(T, yt))) return !1; } var kt = ye.get(S), Dt = ye.get(T); if (kt && Dt) return kt == T && Dt == S; var $t = !0; ye.set(S, T), ye.set(T, S); for (var Nt = Te; ++at < ze; ) { yt = Ae[at]; var Gt = S[yt], qt = T[yt]; if (Z) var gn = Te ? Z(qt, Gt, yt, T, S, ye) : Z(Gt, qt, yt, S, T, ye); if (!(gn === e ? Gt === qt || ie(Gt, qt, X, Z, ye) : gn)) { $t = !1; break; } Nt || (Nt = yt == "constructor"); } if ($t && !Nt) { var tn = S.constructor, _n = T.constructor; tn != _n && "constructor" in S && "constructor" in T && !(typeof tn == "function" && tn instanceof tn && typeof _n == "function" && _n instanceof _n) && ($t = !1); } return ye.delete(S), ye.delete(T), $t; } function oi(S) { return Fs(Lu(S, e, Gu), S + ""); } function Rs(S) { return qf(S, jr, Ms); } function Cs(S) { return qf(S, on, Du); } var Ps = fo ? function(S) { return fo.get(S); } : Ys; function So(S) { for (var T = S.name + "", X = sa[T], Z = sr.call(sa, T) ? X.length : 0; Z--; ) { var ie = X[Z], ye = ie.func; if (ye == null || ye == S) return ie.name; } return T; } function ca(S) { var T = sr.call(de, "placeholder") ? de : S; return T.placeholder; } function It() { var S = de.iteratee || Ks; return S = S === Ks ? ru : S, arguments.length ? S(arguments[0], arguments[1]) : S; } function ko(S, T) { var X = S.__data__; return jd(T) ? X[typeof T == "string" ? "string" : "hash"] : X.map; } function As(S) { for (var T = jr(S), X = T.length; X--; ) { var Z = T[X], ie = S[Z]; T[X] = [Z, ie, Bu(ie)]; } return T; } function Di(S, T) { var X = Hc(S, T); return tu(X) ? X : e; } function Ad(S) { var T = sr.call(S, Ci), X = S[Ci]; try { S[Ci] = e; var Z = !0; } catch (ye) { } var ie = eo.call(S); return Z && (T ? S[Ci] = X : delete S[Ci]), ie; } var Ms = as ? function(S) { return S == null ? [] : (S = cr(S), Zr(as(S), function(T) { return zf.call(S, T); })); } : Zs, Du = as ? function(S) { for (var T = []; S; ) Xe(T, Ms(S)), S = no(S); return T; } : Zs, Vr = qr; (os && Vr(new os(new ArrayBuffer(1))) != Ye || Ra && Vr(new Ra()) != J || ss && Vr(ss.resolve()) != ne || oa && Vr(new oa()) != q || Ca && Vr(new Ca()) != we) && (Vr = function(S) { var T = qr(S), X = T == ke ? S.constructor : e, Z = X ? Ni(X) : ""; if (Z) switch (Z) { case dh: return Ye; case ph: return J; case yh: return ne; case vh: return q; case mh: return we; } return T; }); function Md(S, T, X) { for (var Z = -1, ie = X.length; ++Z < ie; ) { var ye = X[Z], Te = ye.size; switch (ye.type) { case "drop": S += Te; break; case "dropRight": T -= Te; break; case "take": T = Wr(T, S + Te); break; case "takeRight": S = Ir(S, T - Te); break; } } return { start: S, end: T }; } function Id(S) { var T = S.match(Ot); return T ? T[1].split(pt) : []; } function Nu(S, T, X) { T = xi(T, S); for (var Z = -1, ie = T.length, ye = !1; ++Z < ie; ) { var Te = Yn(T[Z]); if (!(ye = S != null && X(S, Te))) break; S = S[Te]; } return ye || ++Z != ie ? ye : (ie = S == null ? 0 : S.length, !!ie && Ao(ie) && si(Te, ie) && (jt(S) || Fi(S))); } function Dd(S) { var T = S.length, X = new S.constructor(T); return T && typeof S[0] == "string" && sr.call(S, "index") && (X.index = S.index, X.input = S.input), X; } function Fu(S) { return typeof S.constructor == "function" && !ja(S) ? fa(no(S)) : {}; } function Nd(S, T, X) { var Z = S.constructor; switch (T) { case je: return Os(S); case re: case ee: return new Z(+S); case Ye: return bd(S, X); case nt: case ut: case ot: case Ue: case Ve: case Qe: case tt: case ae: case Re: return bu(S, X); case J: return new Z(); case Q: case G: return new Z(S); case Ce: return gd(S); case q: return new Z(); case Y: return _d(S); } } function Fd(S, T) { var X = T.length; if (!X) return S; var Z = X - 1; return T[Z] = (X > 1 ? "& " : "") + T[Z], T = T.join(X > 2 ? ", " : " "), S.replace(wt, `{ /* [wrapped with ` + T + `] */ `); } function Bd(S) { return jt(S) || Fi(S) || !!(Hf && S && S[Hf]); } function si(S, T) { var X = typeof S; return T = T == null ? E : T, !!T && (X == "number" || X != "symbol" && Et.test(S)) && S > -1 && S % 1 == 0 && S < T; } function en(S, T, X) { if (!vr(X)) return !1; var Z = typeof T; return (Z == "number" ? an(X) && si(T, X.length) : Z == "string" && T in X) ? Hn(X[T], S) : !1; } function Is(S, T) { if (jt(S)) return !1; var X = typeof S; return X == "number" || X == "symbol" || X == "boolean" || S == null || bn(S) ? !0 : Se.test(S) || !ue.test(S) || T != null && S in cr(T); } function jd(S) { var T = typeof S; return T == "string" || T == "number" || T == "symbol" || T == "boolean" ? S !== "__proto__" : S === null; } function Ds(S) { var T = So(S), X = de[T]; if (typeof X != "function" || !(T in Zt.prototype)) return !1; if (S === X) return !0; var Z = Ps(X); return !!Z && S === Z[0]; } function Ld(S) { return !!Bf && Bf in S; } var zd = Qa ? fi : Js; function ja(S) { var T = S && S.constructor, X = typeof T == "function" && T.prototype || aa; return S === X; } function Bu(S) { return S === S && !vr(S); } function ju(S, T) { return function(X) { return X == null ? !1 : X[S] === T && (T !== e || S in cr(X)); }; } function Hd(S) { var T = Co(S, function(Z) { return X.size === w && X.clear(), Z; }), X = T.cache; return T; } function Xd(S, T) { var X = S[1], Z = T[1], ie = X | Z, ye = ie < (v | c | o), Te = Z == o && X == r || Z == o && X == p && S[7].length <= T[8] || Z == (o | p) && T[7].length <= T[8] && X == r; if (!(ye || Te)) return S; Z & v && (S[2] = T[2], ie |= X & v ? 0 : a); var Ae = T[3]; if (Ae) { var ze = S[3]; S[3] = ze ? _u(ze, Ae, T[4]) : Ae, S[4] = ze ? bi(S[3], f) : T[4]; } return Ae = T[5], Ae && (ze = S[5], S[5] = ze ? wu(ze, Ae, T[6]) : Ae, S[6] = ze ? bi(S[5], f) : T[6]), Ae = T[7], Ae && (S[7] = Ae), Z & o && (S[8] = S[8] == null ? T[8] : Wr(S[8], T[8])), S[9] == null && (S[9] = T[9]), S[0] = T[0], S[1] = ie, S; } function Ud(S) { var T = []; if (S != null) for (var X in cr(S)) T.push(X); return T; } function $d(S) { return eo.call(S); } function Lu(S, T, X) { return T = Ir(T === e ? S.length - 1 : T, 0), function() { for (var Z = arguments, ie = -1, ye = Ir(Z.length - T, 0), Te = We(ye); ++ie < ye; ) Te[ie] = Z[T + ie]; ie = -1; for (var Ae = We(T + 1); ++ie < T; ) Ae[ie] = Z[ie]; return Ae[T] = X(Te), pr(S, this, Ae); }; } function zu(S, T) { return T.length < 2 ? S : Ii(S, An(T, 0, -1)); } function Wd(S, T) { for (var X = S.length, Z = Wr(T.length, X), ie = nn(S); Z--; ) { var ye = T[Z]; S[Z] = si(ye, X) ? ie[ye] : e; } return S; } function Ns(S, T) { if (!(T === "constructor" && typeof S[T] == "function") && T != "__proto__") return S[T]; } var Hu = Uu(lu), La = oh || function(S, T) { return ht.setTimeout(S, T); }, Fs = Uu(pd); function Xu(S, T, X) { var Z = T + ""; return Fs(S, Fd(Z, Vd(Id(Z), X))); } function Uu(S) { var T = 0, X = 0; return function() { var Z = lh(), ie = N - (Z - X); if (X = Z, ie > 0) { if (++T >= z) return arguments[0]; } else T = 0; return S.apply(e, arguments); }; } function Oo(S, T) { var X = -1, Z = S.length, ie = Z - 1; for (T = T === e ? Z : T; ++X < T; ) { var ye = bs(X, ie), Te = S[ye]; S[ye] = S[X], S[X] = Te; } return S.length = T, S; } var $u = Hd(function(S) { var T = []; return S.charCodeAt(0) === 46 && T.push(""), S.replace(Ie, function(X, Z, ie, ye) { T.push(ie ? ye.replace(Pt, "$1") : Z || X); }), T; }); function Yn(S) { if (typeof S == "string" || bn(S)) return S; var T = S + ""; return T == "0" && 1 / S == -C ? "-0" : T; } function Ni(S) { if (S != null) { try { return qa.call(S); } catch (T) { } try { return S + ""; } catch (T) { } } return ""; } function Vd(S, T) { return mr(D, function(X) { var Z = "_." + X[0]; T & X[1] && !ta(S, Z) && S.push(Z); }), S.sort(); } function Wu(S) { if (S instanceof Zt) return S.clone(); var T = new Cn(S.__wrapped__, S.__chain__); return T.__actions__ = nn(S.__actions__), T.__index__ = S.__index__, T.__values__ = S.__values__, T; } function Kd(S, T, X) { (X ? en(S, T, X) : T === e) ? T = 1 : T = Ir(Ut(T), 0); var Z = S == null ? 0 : S.length; if (!Z || T < 1) return []; for (var ie = 0, ye = 0, Te = We(oo(Z / T)); ie < Z; ) Te[ye++] = An(S, ie, ie += T); return Te; } function Gd(S) { for (var T = -1, X = S == null ? 0 : S.length, Z = 0, ie = []; ++T < X; ) { var ye = S[T]; ye && (ie[Z++] = ye); } return ie; } function Yd() { var S = arguments.length; if (!S) return []; for (var T = We(S - 1), X = arguments[0], Z = S; Z--; ) T[Z - 1] = arguments[Z]; return Xe(jt(X) ? nn(X) : [X], Hr(T, 1)); } var Zd = Vt(function(S, T) { return xr(S) ? Ia(S, Hr(T, 1, xr, !0)) : []; }), Jd = Vt(function(S, T) { var X = Mn(T); return xr(X) && (X = e), xr(S) ? Ia(S, Hr(T, 1, xr, !0), It(X, 2)) : []; }), Qd = Vt(function(S, T) { var X = Mn(T); return xr(X) && (X = e), xr(S) ? Ia(S, Hr(T, 1, xr, !0), e, X) : []; }); function qd(S, T, X) { var Z = S == null ? 0 : S.length; return Z ? (T = X || T === e ? 1 : Ut(T), An(S, T < 0 ? 0 : T, Z)) : []; } function ep(S, T, X) { var Z = S == null ? 0 : S.length; return Z ? (T = X || T === e ? 1 : Ut(T), T = Z - T, An(S, 0, T < 0 ? 0 : T)) : []; } function tp(S, T) { return S && S.length ? mo(S, It(T, 3), !0, !0) : []; } function rp(S, T) { return S && S.length ? mo(S, It(T, 3), !0) : []; } function np(S, T, X, Z) { var ie = S == null ? 0 : S.length; return ie ? (X && typeof X != "number" && en(S, T, X) && (X = 0, Z = ie), Yh(S, T, X, Z)) : []; } function Vu(S, T, X) { var Z = S == null ? 0 : S.length; if (!Z) return -1; var ie = X == null ? 0 : Ut(X); return ie < 0 && (ie = Ir(Z + ie, 0)), Tr(S, It(T, 3), ie); } function Ku(S, T, X) { var Z = S == null ? 0 : S.length; if (!Z) return -1; var ie = Z - 1; return X !== e && (ie = Ut(X), ie = X < 0 ? Ir(Z + ie, 0) : Wr(ie, Z - 1)), Tr(S, It(T, 3), ie, !0); } function Gu(S) { var T = S == null ? 0 : S.length; return T ? Hr(S, 1) : []; } function ip(S) { var T = S == null ? 0 : S.length; return T ? Hr(S, C) : []; } function ap(S, T) { var X = S == null ? 0 : S.length; return X ? (T = T === e ? 1 : Ut(T), Hr(S, T)) : []; } function op(S) { for (var T = -1, X = S == null ? 0 : S.length, Z = {}; ++T < X; ) { var ie = S[T]; Z[ie[0]] = ie[1]; } return Z; } function Yu(S) { return S && S.length ? S[0] : e; } function sp(S, T, X) { var Z = S == null ? 0 : S.length; if (!Z) return -1; var ie = X == null ? 0 : Ut(X); return ie < 0 && (ie = Ir(Z + ie, 0)), wr(S, T, ie); } function fp(S) { var T = S == null ? 0 : S.length; return T ? An(S, 0, -1) : []; } var up = Vt(function(S) { var T = Oe(S, Ss); return T.length && T[0] === S[0] ? ds(T) : []; }), lp = Vt(function(S) { var T = Mn(S), X = Oe(S, Ss); return T === Mn(X) ? T = e : X.pop(), X.length && X[0] === S[0] ? ds(X, It(T, 2)) : []; }), cp = Vt(function(S) { var T = Mn(S), X = Oe(S, Ss); return T = typeof T == "function" ? T : e, T && X.pop(), X.length && X[0] === S[0] ? ds(X, e, T) : []; }); function hp(S, T) { return S == null ? "" : fh.call(S, T); } function Mn(S) { var T = S == null ? 0 : S.length; return T ? S[T - 1] : e; } function dp(S, T, X) { var Z = S == null ? 0 : S.length; if (!Z) return -1; var ie = Z; return X !== e && (ie = Ut(X), ie = ie < 0 ? Ir(Z + ie, 0) : Wr(ie, Z - 1)), T === T ? Vc(S, T, ie) : Tr(S, Jr, ie, !0); } function pp(S, T) { return S && S.length ? ou(S, Ut(T)) : e; } var yp = Vt(Zu); function Zu(S, T) { return S && S.length && T && T.length ? ms(S, T) : S; } function vp(S, T, X) { return S && S.length && T && T.length ? ms(S, T, It(X, 2)) : S; } function mp(S, T, X) { return S && S.length && T && T.length ? ms(S, T, e, X) : S; } var bp = oi(function(S, T) { var X = S == null ? 0 : S.length, Z = us(S, T); return uu(S, Oe(T, function(ie) { return si(ie, X) ? +ie : ie; }).sort(gu)), Z; }); function gp(S, T) { var X = []; if (!(S && S.length)) return X; var Z = -1, ie = [], ye = S.length; for (T = It(T, 3); ++Z < ye; ) { var Te = S[Z]; T(Te, Z, S) && (X.push(Te), ie.push(Z)); } return uu(S, ie), X; } function Bs(S) { return S == null ? S : hh.call(S); } function _p(S, T, X) { var Z = S == null ? 0 : S.length; return Z ? (X && typeof X != "number" && en(S, T, X) ? (T = 0, X = Z) : (T = T == null ? 0 : Ut(T), X = X === e ? Z : Ut(X)), An(S, T, X)) : []; } function wp(S, T) { return vo(S, T); } function xp(S, T, X) { return _s(S, T, It(X, 2)); } function Sp(S, T) { var X = S == null ? 0 : S.length; if (X) { var Z = vo(S, T); if (Z < X && Hn(S[Z], T)) return Z; } return -1; } function kp(S, T) { return vo(S, T, !0); } function Op(S, T, X) { return _s(S, T, It(X, 2), !0); } function Ep(S, T) { var X = S == null ? 0 : S.length; if (X) { var Z = vo(S, T, !0) - 1; if (Hn(S[Z], T)) return Z; } return -1; } function Tp(S) { return S && S.length ? cu(S) : []; } function Rp(S, T) { return S && S.length ? cu(S, It(T, 2)) : []; } function Cp(S) { var T = S == null ? 0 : S.length; return T ? An(S, 1, T) : []; } function Pp(S, T, X) { return S && S.length ? (T = X || T === e ? 1 : Ut(T), An(S, 0, T < 0 ? 0 : T)) : []; } function Ap(S, T, X) { var Z = S == null ? 0 : S.length; return Z ? (T = X || T === e ? 1 : Ut(T), T = Z - T, An(S, T < 0 ? 0 : T, Z)) : []; } function Mp(S, T) { return S && S.length ? mo(S, It(T, 3), !1, !0) : []; } function Ip(S, T) { return S && S.length ? mo(S, It(T, 3)) : []; } var Dp = Vt(function(S) { return wi(Hr(S, 1, xr, !0)); }), Np = Vt(function(S) { var T = Mn(S); return xr(T) && (T = e), wi(Hr(S, 1, xr, !0), It(T, 2)); }), Fp = Vt(function(S) { var T = Mn(S); return T = typeof T == "function" ? T : e, wi(Hr(S, 1, xr, !0), e, T); }); function Bp(S) { return S && S.length ? wi(S) : []; } function jp(S, T) { return S && S.length ? wi(S, It(T, 2)) : []; } function Lp(S, T) { return T = typeof T == "function" ? T : e, S && S.length ? wi(S, e, T) : []; } function js(S) { if (!(S && S.length)) return []; var T = 0; return S = Zr(S, function(X) { if (xr(X)) return T = Ir(X.length, T), !0; }), mi(T, function(X) { return Oe(S, Tn(X)); }); } function Ju(S, T) { if (!(S && S.length)) return []; var X = js(S); return T == null ? X : Oe(X, function(Z) { return pr(T, e, Z); }); } var zp = Vt(function(S, T) { return xr(S) ? Ia(S, T) : []; }), Hp = Vt(function(S) { return xs(Zr(S, xr)); }), Xp = Vt(function(S) { var T = Mn(S); return xr(T) && (T = e), xs(Zr(S, xr), It(T, 2)); }), Up = Vt(function(S) { var T = Mn(S); return T = typeof T == "function" ? T : e, xs(Zr(S, xr), e, T); }), $p = Vt(js); function Wp(S, T) { return yu(S || [], T || [], Ma); } function Vp(S, T) { return yu(S || [], T || [], Fa); } var Kp = Vt(function(S) { var T = S.length, X = T > 1 ? S[T - 1] : e; return X = typeof X == "function" ? (S.pop(), X) : e, Ju(S, X); }); function Qu(S) { var T = de(S); return T.__chain__ = !0, T; } function Gp(S, T) { return T(S), S; } function Eo(S, T) { return T(S); } var Yp = oi(function(S) { var T = S.length, X = T ? S[0] : 0, Z = this.__wrapped__, ie = function(ye) { return us(ye, S); }; return T > 1 || this.__actions__.length || !(Z instanceof Zt) || !si(X) ? this.thru(ie) : (Z = Z.slice(X, +X + (T ? 1 : 0)), Z.__actions__.push({ func: Eo, args: [ie], thisArg: e }), new Cn(Z, this.__chain__).thru(function(ye) { return T && !ye.length && ye.push(e), ye; })); }); function Zp() { return Qu(this); } function Jp() { return new Cn(this.value(), this.__chain__); } function Qp() { this.__values__ === e && (this.__values__ = hl(this.value())); var S = this.__index__ >= this.__values__.length, T = S ? e : this.__values__[this.__index__++]; return { done: S, value: T }; } function qp() { return this; } function e0(S) { for (var T, X = this; X instanceof lo; ) { var Z = Wu(X); Z.__index__ = 0, Z.__values__ = e, T ? ie.__wrapped__ = Z : T = Z; var ie = Z; X = X.__wrapped__; } return ie.__wrapped__ = S, T; } function t0() { var S = this.__wrapped__; if (S instanceof Zt) { var T = S; return this.__actions__.length && (T = new Zt(this)), T = T.reverse(), T.__actions__.push({ func: Eo, args: [Bs], thisArg: e }), new Cn(T, this.__chain__); } return this.thru(Bs); } function r0() { return pu(this.__wrapped__, this.__actions__); } var n0 = bo(function(S, T, X) { sr.call(S, X) ? ++S[X] : ii(S, X, 1); }); function i0(S, T, X) { var Z = jt(S) ? En : Gh; return X && en(S, T, X) && (T = e), Z(S, It(T, 3)); } function a0(S, T) { var X = jt(S) ? Zr : Jf; return X(S, It(T, 3)); } var o0 = Ou(Vu), s0 = Ou(Ku); function f0(S, T) { return Hr(To(S, T), 1); } function u0(S, T) { return Hr(To(S, T), C); } function l0(S, T, X) { return X = X === e ? 1 : Ut(X), Hr(To(S, T), X); } function qu(S, T) { var X = jt(S) ? mr : _i; return X(S, It(T, 3)); } function el(S, T) { var X = jt(S) ? ea : Zf; return X(S, It(T, 3)); } var c0 = bo(function(S, T, X) { sr.call(S, X) ? S[X].push(T) : ii(S, X, [T]); }); function h0(S, T, X, Z) { S = an(S) ? S : da(S), X = X && !Z ? Ut(X) : 0; var ie = S.length; return X < 0 && (X = Ir(ie + X, 0)), Mo(S) ? X <= ie && S.indexOf(T, X) > -1 : !!ie && wr(S, T, X) > -1; } var d0 = Vt(function(S, T, X) { var Z = -1, ie = typeof T == "function", ye = an(S) ? We(S.length) : []; return _i(S, function(Te) { ye[++Z] = ie ? pr(T, Te, X) : Da(Te, T, X); }), ye; }), p0 = bo(function(S, T, X) { ii(S, X, T); }); function To(S, T) { var X = jt(S) ? Oe : nu; return X(S, It(T, 3)); } function y0(S, T, X, Z) { return S == null ? [] : (jt(T) || (T = T == null ? [] : [T]), X = Z ? e : X, jt(X) || (X = X == null ? [] : [X]), su(S, T, X)); } var v0 = bo(function(S, T, X) { S[X ? 0 : 1].push(T); }, function() { return [[], []]; }); function m0(S, T, X) { var Z = jt(S) ? ft : Vn, ie = arguments.length < 3; return Z(S, It(T, 4), X, ie, _i); } function b0(S, T, X) { var Z = jt(S) ? Tt : Vn, ie = arguments.length < 3; return Z(S, It(T, 4), X, ie, Zf); } function g0(S, T) { var X = jt(S) ? Zr : Jf; return X(S, Po(It(T, 3))); } function _0(S) { var T = jt(S) ? Vf : hd; return T(S); } function w0(S, T, X) { (X ? en(S, T, X) : T === e) ? T = 1 : T = Ut(T); var Z = jt(S) ? Uh : dd; return Z(S, T); } function x0(S) { var T = jt(S) ? $h : yd; return T(S); } function S0(S) { if (S == null) return 0; if (an(S)) return Mo(S) ? na(S) : S.length; var T = Vr(S); return T == J || T == q ? S.size : ys(S).length; } function k0(S, T, X) { var Z = jt(S) ? mt : vd; return X && en(S, T, X) && (T = e), Z(S, It(T, 3)); } var O0 = Vt(function(S, T) { if (S == null) return []; var X = T.length; return X > 1 && en(S, T[0], T[1]) ? T = [] : X > 2 && en(T[0], T[1], T[2]) && (T = [T[0]]), su(S, Hr(T, 1), []); }), Ro = ah || function() { return ht.Date.now(); }; function E0(S, T) { if (typeof T != "function") throw new Rn(m); return S = Ut(S), function() { if (--S < 1) return T.apply(this, arguments); }; } function tl(S, T, X) { return T = X ? e : T, T = S && T == null ? S.length : T, ai(S, o, e, e, e, e, T); } function rl(S, T) { var X; if (typeof T != "function") throw new Rn(m); return S = Ut(S), function() { return --S > 0 && (X = T.apply(this, arguments)), S <= 1 && (T = e), X; }; } var Ls = Vt(function(S, T, X) { var Z = v; if (X.length) { var ie = bi(X, ca(Ls)); Z |= i; } return ai(S, Z, T, X, ie); }), nl = Vt(function(S, T, X) { var Z = v | c; if (X.length) { var ie = bi(X, ca(nl)); Z |= i; } return ai(T, Z, S, X, ie); }); function il(S, T, X) { T = X ? e : T; var Z = ai(S, r, e, e, e, e, e, T); return Z.placeholder = il.placeholder, Z; } function al(S, T, X) { T = X ? e : T; var Z = ai(S, t, e, e, e, e, e, T); return Z.placeholder = al.placeholder, Z; } function ol(S, T, X) { var Z, ie, ye, Te, Ae, ze, qe = 0, et = !1, at = !1, yt = !0; if (typeof S != "function") throw new Rn(m); T = In(T) || 0, vr(X) && (et = !!X.leading, at = "maxWait" in X, ye = at ? Ir(In(X.maxWait) || 0, T) : ye, yt = "trailing" in X ? !!X.trailing : yt); function kt(Sr) { var Xn = Z, li = ie; return Z = ie = e, qe = Sr, Te = S.apply(li, Xn), Te; } function Dt(Sr) { return qe = Sr, Ae = La(Gt, T), et ? kt(Sr) : Te; } function $t(Sr) { var Xn = Sr - ze, li = Sr - qe, Ol = T - Xn; return at ? Wr(Ol, ye - li) : Ol; } function Nt(Sr) { var Xn = Sr - ze, li = Sr - qe; return ze === e || Xn >= T || Xn < 0 || at && li >= ye; } function Gt() { var Sr = Ro(); if (Nt(Sr)) return qt(Sr); Ae = La(Gt, $t(Sr)); } function qt(Sr) { return Ae = e, yt && Z ? kt(Sr) : (Z = ie = e, Te); } function gn() { Ae !== e && vu(Ae), qe = 0, Z = ze = ie = Ae = e; } function tn() { return Ae === e ? Te : qt(Ro()); } function _n() { var Sr = Ro(), Xn = Nt(Sr); if (Z = arguments, ie = this, ze = Sr, Xn) { if (Ae === e) return Dt(ze); if (at) return vu(Ae), Ae = La(Gt, T), kt(ze); } return Ae === e && (Ae = La(Gt, T)), Te; } return _n.cancel = gn, _n.flush = tn, _n; } var T0 = Vt(function(S, T) { return Yf(S, 1, T); }), R0 = Vt(function(S, T, X) { return Yf(S, In(T) || 0, X); }); function C0(S) { return ai(S, O); } function Co(S, T) { if (typeof S != "function" || T != null && typeof T != "function") throw new Rn(m); var X = function() { var Z = arguments, ie = T ? T.apply(this, Z) : Z[0], ye = X.cache; if (ye.has(ie)) return ye.get(ie); var Te = S.apply(this, Z); return X.cache = ye.set(ie, Te) || ye, Te; }; return X.cache = new (Co.Cache || ni)(), X; } Co.Cache = ni; function Po(S) { if (typeof S != "function") throw new Rn(m); return function() { var T = arguments; switch (T.length) { case 0: return !S.call(this); case 1: return !S.call(this, T[0]); case 2: return !S.call(this, T[0], T[1]); case 3: return !S.call(this, T[0], T[1], T[2]); } return !S.apply(this, T); }; } function P0(S) { return rl(2, S); } var A0 = md(function(S, T) { T = T.length == 1 && jt(T[0]) ? Oe(T[0], vn(It())) : Oe(Hr(T, 1), vn(It())); var X = T.length; return Vt(function(Z) { for (var ie = -1, ye = Wr(Z.length, X); ++ie < ye; ) Z[ie] = T[ie].call(this, Z[ie]); return pr(S, this, Z); }); }), zs = Vt(function(S, T) { var X = bi(T, ca(zs)); return ai(S, i, e, T, X); }), sl = Vt(function(S, T) { var X = bi(T, ca(sl)); return ai(S, n, e, T, X); }), M0 = oi(function(S, T) { return ai(S, p, e, e, e, T); }); function I0(S, T) { if (typeof S != "function") throw new Rn(m); return T = T === e ? T : Ut(T), Vt(S, T); } function D0(S, T) { if (typeof S != "function") throw new Rn(m); return T = T == null ? 0 : Ir(Ut(T), 0), Vt(function(X) { var Z = X[T], ie = Si(X, 0, T); return Z && Xe(ie, Z), pr(S, this, ie); }); } function N0(S, T, X) { var Z = !0, ie = !0; if (typeof S != "function") throw new Rn(m); return vr(X) && (Z = "leading" in X ? !!X.leading : Z, ie = "trailing" in X ? !!X.trailing : ie), ol(S, T, { leading: Z, maxWait: T, trailing: ie }); } function F0(S) { return tl(S, 1); } function B0(S, T) { return zs(ks(T), S); } function j0() { if (!arguments.length) return []; var S = arguments[0]; return jt(S) ? S : [S]; } function L0(S) { return Pn(S, l); } function z0(S, T) { return T = typeof T == "function" ? T : e, Pn(S, l, T); } function H0(S) { return Pn(S, y | l); } function X0(S, T) { return T = typeof T == "function" ? T : e, Pn(S, y | l, T); } function U0(S, T) { return T == null || Gf(S, T, jr(T)); } function Hn(S, T) { return S === T || S !== S && T !== T; } var $0 = xo(hs), W0 = xo(function(S, T) { return S >= T; }), Fi = eu(function() { return arguments; }()) ? eu : function(S) { return br(S) && sr.call(S, "callee") && !zf.call(S, "callee"); }, jt = We.isArray, V0 = ur ? vn(ur) : ed; function an(S) { return S != null && Ao(S.length) && !fi(S); } function xr(S) { return br(S) && an(S); } function K0(S) { return S === !0 || S === !1 || br(S) && qr(S) == re; } var ki = sh || Js, G0 = Pr ? vn(Pr) : td; function Y0(S) { return br(S) && S.nodeType === 1 && !za(S); } function Z0(S) { if (S == null) return !0; if (an(S) && (jt(S) || typeof S == "string" || typeof S.splice == "function" || ki(S) || ha(S) || Fi(S))) return !S.length; var T = Vr(S); if (T == J || T == q) return !S.size; if (ja(S)) return !ys(S).length; for (var X in S) if (sr.call(S, X)) return !1; return !0; } function J0(S, T) { return Na(S, T); } function Q0(S, T, X) { X = typeof X == "function" ? X : e; var Z = X ? X(S, T) : e; return Z === e ? Na(S, T, e, X) : !!Z; } function Hs(S) { if (!br(S)) return !1; var T = qr(S); return T == ve || T == ce || typeof S.message == "string" && typeof S.name == "string" && !za(S); } function q0(S) { return typeof S == "number" && Xf(S); } function fi(S) { if (!vr(S)) return !1; var T = qr(S); return T == ge || T == oe || T == V || T == se; } function fl(S) { return typeof S == "number" && S == Ut(S); } function Ao(S) { return typeof S == "number" && S > -1 && S % 1 == 0 && S <= E; } function vr(S) { var T = typeof S; return S != null && (T == "object" || T == "function"); } function br(S) { return S != null && typeof S == "object"; } var ul = Br ? vn(Br) : nd; function ey(S, T) { return S === T || ps(S, T, As(T)); } function ty(S, T, X) { return X = typeof X == "function" ? X : e, ps(S, T, As(T), X); } function ry(S) { return ll(S) && S != +S; } function ny(S) { if (zd(S)) throw new Bt(u); return tu(S); } function iy(S) { return S === null; } function ay(S) { return S == null; } function ll(S) { return typeof S == "number" || br(S) && qr(S) == Q; } function za(S) { if (!br(S) || qr(S) != ke) return !1; var T = no(S); if (T === null) return !0; var X = sr.call(T, "constructor") && T.constructor; return typeof X == "function" && X instanceof X && qa.call(X) == th; } var Xs = dr ? vn(dr) : id; function oy(S) { return fl(S) && S >= -E && S <= E; } var cl = Er ? vn(Er) : ad; function Mo(S) { return typeof S == "string" || !jt(S) && br(S) && qr(S) == G; } function bn(S) { return typeof S == "symbol" || br(S) && qr(S) == Y; } var ha = Ar ? vn(Ar) : od; function sy(S) { return S === e; } function fy(S) { return br(S) && Vr(S) == we; } function uy(S) { return br(S) && qr(S) == _e; } var ly = xo(vs), cy = xo(function(S, T) { return S <= T; }); function hl(S) { if (!S) return []; if (an(S)) return Mo(S) ? Ln(S) : nn(S); if (Ta && S[Ta]) return Uc(S[Ta]()); var T = Vr(S), X = T == J ? ns : T == q ? Za : da; return X(S); } function ui(S) { if (!S) return S === 0 ? S : 0; if (S = In(S), S === C || S === -C) { var T = S < 0 ? -1 : 1; return T * A; } return S === S ? S : 0; } function Ut(S) { var T = ui(S), X = T % 1; return T === T ? X ? T - X : T : 0; } function dl(S) { return S ? Mi(Ut(S), 0, $) : 0; } function In(S) { if (typeof S == "number") return S; if (bn(S)) return L; if (vr(S)) { var T = typeof S.valueOf == "function" ? S.valueOf() : S; S = vr(T) ? T + "" : T; } if (typeof S != "string") return S === 0 ? S : +S; S = Mf(S); var X = xt.test(S); return X || Lt.test(S) ? xe(S.slice(2), X ? 2 : 8) : Ct.test(S) ? L : +S; } function pl(S) { return Gn(S, on(S)); } function hy(S) { return S ? Mi(Ut(S), -E, E) : S === 0 ? S : 0; } function or(S) { return S == null ? "" : mn(S); } var dy = ua(function(S, T) { if (ja(T) || an(T)) { Gn(T, jr(T), S); return; } for (var X in T) sr.call(T, X) && Ma(S, X, T[X]); }), yl = ua(function(S, T) { Gn(T, on(T), S); }), Io = ua(function(S, T, X, Z) { Gn(T, on(T), S, Z); }), py = ua(function(S, T, X, Z) { Gn(T, jr(T), S, Z); }), yy = oi(us); function vy(S, T) { var X = fa(S); return T == null ? X : Kf(X, T); } var my = Vt(function(S, T) { S = cr(S); var X = -1, Z = T.length, ie = Z > 2 ? T[2] : e; for (ie && en(T[0], T[1], ie) && (Z = 1); ++X < Z; ) for (var ye = T[X], Te = on(ye), Ae = -1, ze = Te.length; ++Ae < ze; ) { var qe = Te[Ae], et = S[qe]; (et === e || Hn(et, aa[qe]) && !sr.call(S, qe)) && (S[qe] = ye[qe]); } return S; }), by = Vt(function(S) { return S.push(e, Mu), pr(vl, e, S); }); function gy(S, T) { return _r(S, It(T, 3), Kn); } function _y(S, T) { return _r(S, It(T, 3), cs); } function wy(S, T) { return S == null ? S : ls(S, It(T, 3), on); } function xy(S, T) { return S == null ? S : Qf(S, It(T, 3), on); } function Sy(S, T) { return S && Kn(S, It(T, 3)); } function ky(S, T) { return S && cs(S, It(T, 3)); } function Oy(S) { return S == null ? [] : po(S, jr(S)); } function Ey(S) { return S == null ? [] : po(S, on(S)); } function Us(S, T, X) { var Z = S == null ? e : Ii(S, T); return Z === e ? X : Z; } function Ty(S, T) { return S != null && Nu(S, T, Zh); } function $s(S, T) { return S != null && Nu(S, T, Jh); } var Ry = Tu(function(S, T, X) { T != null && typeof T.toString != "function" && (T = eo.call(T)), S[T] = X; }, Vs(sn)), Cy = Tu(function(S, T, X) { T != null && typeof T.toString != "function" && (T = eo.call(T)), sr.call(S, T) ? S[T].push(X) : S[T] = [X]; }, It), Py = Vt(Da); function jr(S) { return an(S) ? Wf(S) : ys(S); } function on(S) { return an(S) ? Wf(S, !0) : sd(S); } function Ay(S, T) { var X = {}; return T = It(T, 3), Kn(S, function(Z, ie, ye) { ii(X, T(Z, ie, ye), Z); }), X; } function My(S, T) { var X = {}; return T = It(T, 3), Kn(S, function(Z, ie, ye) { ii(X, ie, T(Z, ie, ye)); }), X; } var Iy = ua(function(S, T, X) { yo(S, T, X); }), vl = ua(function(S, T, X, Z) { yo(S, T, X, Z); }), Dy = oi(function(S, T) { var X = {}; if (S == null) return X; var Z = !1; T = Oe(T, function(ye) { return ye = xi(ye, S), Z || (Z = ye.length > 1), ye; }), Gn(S, Cs(S), X), Z && (X = Pn(X, y | h | l, Rd)); for (var ie = T.length; ie--; ) ws(X, T[ie]); return X; }); function Ny(S, T) { return ml(S, Po(It(T))); } var Fy = oi(function(S, T) { return S == null ? {} : ud(S, T); }); function ml(S, T) { if (S == null) return {}; var X = Oe(Cs(S), function(Z) { return [Z]; }); return T = It(T), fu(S, X, function(Z, ie) { return T(Z, ie[0]); }); } function By(S, T, X) { T = xi(T, S); var Z = -1, ie = T.length; for (ie || (ie = 1, S = e); ++Z < ie; ) { var ye = S == null ? e : S[Yn(T[Z])]; ye === e && (Z = ie, ye = X), S = fi(ye) ? ye.call(S) : ye; } return S; } function jy(S, T, X) { return S == null ? S : Fa(S, T, X); } function Ly(S, T, X, Z) { return Z = typeof Z == "function" ? Z : e, S == null ? S : Fa(S, T, X, Z); } var bl = Pu(jr), gl = Pu(on); function zy(S, T, X) { var Z = jt(S), ie = Z || ki(S) || ha(S); if (T = It(T, 4), X == null) { var ye = S && S.constructor; ie ? X = Z ? new ye() : [] : vr(S) ? X = fi(ye) ? fa(no(S)) : {} : X = {}; } return (ie ? mr : Kn)(S, function(Te, Ae, ze) { return T(X, Te, Ae, ze); }), X; } function Hy(S, T) { return S == null ? !0 : ws(S, T); } function Xy(S, T, X) { return S == null ? S : du(S, T, ks(X)); } function Uy(S, T, X, Z) { return Z = typeof Z == "function" ? Z : e, S == null ? S : du(S, T, ks(X), Z); } function da(S) { return S == null ? [] : rs(S, jr(S)); } function $y(S) { return S == null ? [] : rs(S, on(S)); } function Wy(S, T, X) { return X === e && (X = T, T = e), X !== e && (X = In(X), X = X === X ? X : 0), T !== e && (T = In(T), T = T === T ? T : 0), Mi(In(S), T, X); } function Vy(S, T, X) { return T = ui(T), X === e ? (X = T, T = 0) : X = ui(X), S = In(S), Qh(S, T, X); } function Ky(S, T, X) { if (X && typeof X != "boolean" && en(S, T, X) && (T = X = e), X === e && (typeof T == "boolean" ? (X = T, T = e) : typeof S == "boolean" && (X = S, S = e)), S === e && T === e ? (S = 0, T = 1) : (S = ui(S), T === e ? (T = S, S = 0) : T = ui(T)), S > T) { var Z = S; S = T, T = Z; } if (X || S % 1 || T % 1) { var ie = Uf(); return Wr(S + ie * (T - S + qi("1e-" + ((ie + "").length - 1))), T); } return bs(S, T); } var Gy = la(function(S, T, X) { return T = T.toLowerCase(), S + (X ? _l(T) : T); }); function _l(S) { return Ws(or(S).toLowerCase()); } function wl(S) { return S = or(S), S && S.replace(Dr, jc).replace(Yi, ""); } function Yy(S, T, X) { S = or(S), T = mn(T); var Z = S.length; X = X === e ? Z : Mi(Ut(X), 0, Z); var ie = X; return X -= T.length, X >= 0 && S.slice(X, ie) == T; } function Zy(S) { return S = or(S), S && it.test(S) ? S.replace(te, Lc) : S; } function Jy(S) { return S = or(S), S && Ge.test(S) ? S.replace(st, "\\$&") : S; } var Qy = la(function(S, T, X) { return S + (X ? "-" : "") + T.toLowerCase(); }), qy = la(function(S, T, X) { return S + (X ? " " : "") + T.toLowerCase(); }), ev = ku("toLowerCase"); function tv(S, T, X) { S = or(S), T = Ut(T); var Z = T ? na(S) : 0; if (!T || Z >= T) return S; var ie = (T - Z) / 2; return wo(so(ie), X) + S + wo(oo(ie), X); } function rv(S, T, X) { S = or(S), T = Ut(T); var Z = T ? na(S) : 0; return T && Z < T ? S + wo(T - Z, X) : S; } function nv(S, T, X) { S = or(S), T = Ut(T); var Z = T ? na(S) : 0; return T && Z < T ? wo(T - Z, X) + S : S; } function iv(S, T, X) { return X || T == null ? T = 0 : T && (T = +T), ch(or(S).replace(rt, ""), T || 0); } function av(S, T, X) { return (X ? en(S, T, X) : T === e) ? T = 1 : T = Ut(T), gs(or(S), T); } function ov() { var S = arguments, T = or(S[0]); return S.length < 3 ? T : T.replace(S[1], S[2]); } var sv = la(function(S, T, X) { return S + (X ? "_" : "") + T.toLowerCase(); }); function fv(S, T, X) { return X && typeof X != "number" && en(S, T, X) && (T = X = e), X = X === e ? $ : X >>> 0, X ? (S = or(S), S && (typeof T == "string" || T != null && !Xs(T)) && (T = mn(T), !T && ra(S)) ? Si(Ln(S), 0, X) : S.split(T, X)) : []; } var uv = la(function(S, T, X) { return S + (X ? " " : "") + Ws(T); }); function lv(S, T, X) { return S = or(S), X = X == null ? 0 : Mi(Ut(X), 0, S.length), T = mn(T), S.slice(X, X + T.length) == T; } function cv(S, T, X) { var Z = de.templateSettings; X && en(S, T, X) && (T = e), S = or(S), T = Io({}, T, Z, Au); var ie = Io({}, T.imports, Z.imports, Au), ye = jr(ie), Te = rs(ie, ye), Ae, ze, qe = 0, et = T.interpolate || Or, at = "__p += '", yt = is( (T.escape || Or).source + "|" + et.source + "|" + (et === Le ? bt : Or).source + "|" + (T.evaluate || Or).source + "|$", "g" ), kt = "//# sourceURL=" + (sr.call(T, "sourceURL") ? (T.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Zi + "]") + ` `; S.replace(yt, function(Nt, Gt, qt, gn, tn, _n) { return qt || (qt = gn), at += S.slice(qe, _n).replace(Gr, zc), Gt && (Ae = !0, at += `' + __e(` + Gt + `) + '`), tn && (ze = !0, at += `'; ` + tn + `; __p += '`), qt && (at += `' + ((__t = (` + qt + `)) == null ? '' : __t) + '`), qe = _n + Nt.length, Nt; }), at += `'; `; var Dt = sr.call(T, "variable") && T.variable; if (!Dt) at = `with (obj) { ` + at + ` } `; else if (At.test(Dt)) throw new Bt(g); at = (ze ? at.replace(be, "") : at).replace(Ee, "$1").replace(pe, "$1;"), at = "function(" + (Dt || "obj") + `) { ` + (Dt ? "" : `obj || (obj = {}); `) + "var __t, __p = ''" + (Ae ? ", __e = _.escape" : "") + (ze ? `, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } ` : `; `) + at + `return __p }`; var $t = Sl(function() { return ar(ye, kt + "return " + at).apply(e, Te); }); if ($t.source = at, Hs($t)) throw $t; return $t; } function hv(S) { return or(S).toLowerCase(); } function dv(S) { return or(S).toUpperCase(); } function pv(S, T, X) { if (S = or(S), S && (X || T === e)) return Mf(S); if (!S || !(T = mn(T))) return S; var Z = Ln(S), ie = Ln(T), ye = If(Z, ie), Te = Df(Z, ie) + 1; return Si(Z, ye, Te).join(""); } function yv(S, T, X) { if (S = or(S), S && (X || T === e)) return S.slice(0, Ff(S) + 1); if (!S || !(T = mn(T))) return S; var Z = Ln(S), ie = Df(Z, Ln(T)) + 1; return Si(Z, 0, ie).join(""); } function vv(S, T, X) { if (S = or(S), S && (X || T === e)) return S.replace(rt, ""); if (!S || !(T = mn(T))) return S; var Z = Ln(S), ie = If(Z, Ln(T)); return Si(Z, ie).join(""); } function mv(S, T) { var X = P, Z = F; if (vr(T)) { var ie = "separator" in T ? T.separator : ie; X = "length" in T ? Ut(T.length) : X, Z = "omission" in T ? mn(T.omission) : Z; } S = or(S); var ye = S.length; if (ra(S)) { var Te = Ln(S); ye = Te.length; } if (X >= ye) return S; var Ae = X - na(Z); if (Ae < 1) return Z; var ze = Te ? Si(Te, 0, Ae).join("") : S.slice(0, Ae); if (ie === e) return ze + Z; if (Te && (Ae += ze.length - Ae), Xs(ie)) { if (S.slice(Ae).search(ie)) { var qe, et = ze; for (ie.global || (ie = is(ie.source, or(Kt.exec(ie)) + "g")), ie.lastIndex = 0; qe = ie.exec(et); ) var at = qe.index; ze = ze.slice(0, at === e ? Ae : at); } } else if (S.indexOf(mn(ie), Ae) != Ae) { var yt = ze.lastIndexOf(ie); yt > -1 && (ze = ze.slice(0, yt)); } return ze + Z; } function bv(S) { return S = or(S), S && He.test(S) ? S.replace(Pe, Kc) : S; } var gv = la(function(S, T, X) { return S + (X ? " " : "") + T.toUpperCase(); }), Ws = ku("toUpperCase"); function xl(S, T, X) { return S = or(S), T = X ? e : T, T === e ? Xc(S) ? Zc(S) : hr(S) : S.match(T) || []; } var Sl = Vt(function(S, T) { try { return pr(S, e, T); } catch (X) { return Hs(X) ? X : new Bt(X); } }), _v = oi(function(S, T) { return mr(T, function(X) { X = Yn(X), ii(S, X, Ls(S[X], S)); }), S; }); function wv(S) { var T = S == null ? 0 : S.length, X = It(); return S = T ? Oe(S, function(Z) { if (typeof Z[1] != "function") throw new Rn(m); return [X(Z[0]), Z[1]]; }) : [], Vt(function(Z) { for (var ie = -1; ++ie < T; ) { var ye = S[ie]; if (pr(ye[0], this, Z)) return pr(ye[1], this, Z); } }); } function xv(S) { return Kh(Pn(S, y)); } function Vs(S) { return function() { return S; }; } function Sv(S, T) { return S == null || S !== S ? T : S; } var kv = Eu(), Ov = Eu(!0); function sn(S) { return S; } function Ks(S) { return ru(typeof S == "function" ? S : Pn(S, y)); } function Ev(S) { return iu(Pn(S, y)); } function Tv(S, T) { return au(S, Pn(T, y)); } var Rv = Vt(function(S, T) { return function(X) { return Da(X, S, T); }; }), Cv = Vt(function(S, T) { return function(X) { return Da(S, X, T); }; }); function Gs(S, T, X) { var Z = jr(T), ie = po(T, Z); X == null && !(vr(T) && (ie.length || !Z.length)) && (X = T, T = S, S = this, ie = po(T, jr(T))); var ye = !(vr(X) && "chain" in X) || !!X.chain, Te = fi(S); return mr(ie, function(Ae) { var ze = T[Ae]; S[Ae] = ze, Te && (S.prototype[Ae] = function() { var qe = this.__chain__; if (ye || qe) { var et = S(this.__wrapped__), at = et.__actions__ = nn(this.__actions__); return at.push({ func: ze, args: arguments, thisArg: S }), et.__chain__ = qe, et; } return ze.apply(S, Xe([this.value()], arguments)); }); }), S; } function Pv() { return ht._ === this && (ht._ = rh), this; } function Ys() { } function Av(S) { return S = Ut(S), Vt(function(T) { return ou(T, S); }); } var Mv = Es(Oe), Iv = Es(En), Dv = Es(mt); function kl(S) { return Is(S) ? Tn(Yn(S)) : ld(S); } function Nv(S) { return function(T) { return S == null ? e : Ii(S, T); }; } var Fv = Ru(), Bv = Ru(!0); function Zs() { return []; } function Js() { return !1; } function jv() { return {}; } function Lv() { return ""; } function zv() { return !0; } function Hv(S, T) { if (S = Ut(S), S < 1 || S > E) return []; var X = $, Z = Wr(S, $); T = It(T), S -= $; for (var ie = mi(Z, T); ++X < S; ) T(X); return ie; } function Xv(S) { return jt(S) ? Oe(S, Yn) : bn(S) ? [S] : nn($u(or(S))); } function Uv(S) { var T = ++eh; return or(S) + T; } var $v = _o(function(S, T) { return S + T; }, 0), Wv = Ts("ceil"), Vv = _o(function(S, T) { return S / T; }, 1), Kv = Ts("floor"); function Gv(S) { return S && S.length ? ho(S, sn, hs) : e; } function Yv(S, T) { return S && S.length ? ho(S, It(T, 2), hs) : e; } function Zv(S) { return Qr(S, sn); } function Jv(S, T) { return Qr(S, It(T, 2)); } function Qv(S) { return S && S.length ? ho(S, sn, vs) : e; } function qv(S, T) { return S && S.length ? ho(S, It(T, 2), vs) : e; } var em = _o(function(S, T) { return S * T; }, 1), tm = Ts("round"), rm = _o(function(S, T) { return S - T; }, 0); function nm(S) { return S && S.length ? vi(S, sn) : 0; } function im(S, T) { return S && S.length ? vi(S, It(T, 2)) : 0; } return de.after = E0, de.ary = tl, de.assign = dy, de.assignIn = yl, de.assignInWith = Io, de.assignWith = py, de.at = yy, de.before = rl, de.bind = Ls, de.bindAll = _v, de.bindKey = nl, de.castArray = j0, de.chain = Qu, de.chunk = Kd, de.compact = Gd, de.concat = Yd, de.cond = wv, de.conforms = xv, de.constant = Vs, de.countBy = n0, de.create = vy, de.curry = il, de.curryRight = al, de.debounce = ol, de.defaults = my, de.defaultsDeep = by, de.defer = T0, de.delay = R0, de.difference = Zd, de.differenceBy = Jd, de.differenceWith = Qd, de.drop = qd, de.dropRight = ep, de.dropRightWhile = tp, de.dropWhile = rp, de.fill = np, de.filter = a0, de.flatMap = f0, de.flatMapDeep = u0, de.flatMapDepth = l0, de.flatten = Gu, de.flattenDeep = ip, de.flattenDepth = ap, de.flip = C0, de.flow = kv, de.flowRight = Ov, de.fromPairs = op, de.functions = Oy, de.functionsIn = Ey, de.groupBy = c0, de.initial = fp, de.intersection = up, de.intersectionBy = lp, de.intersectionWith = cp, de.invert = Ry, de.invertBy = Cy, de.invokeMap = d0, de.iteratee = Ks, de.keyBy = p0, de.keys = jr, de.keysIn = on, de.map = To, de.mapKeys = Ay, de.mapValues = My, de.matches = Ev, de.matchesProperty = Tv, de.memoize = Co, de.merge = Iy, de.mergeWith = vl, de.method = Rv, de.methodOf = Cv, de.mixin = Gs, de.negate = Po, de.nthArg = Av, de.omit = Dy, de.omitBy = Ny, de.once = P0, de.orderBy = y0, de.over = Mv, de.overArgs = A0, de.overEvery = Iv, de.overSome = Dv, de.partial = zs, de.partialRight = sl, de.partition = v0, de.pick = Fy, de.pickBy = ml, de.property = kl, de.propertyOf = Nv, de.pull = yp, de.pullAll = Zu, de.pullAllBy = vp, de.pullAllWith = mp, de.pullAt = bp, de.range = Fv, de.rangeRight = Bv, de.rearg = M0, de.reject = g0, de.remove = gp, de.rest = I0, de.reverse = Bs, de.sampleSize = w0, de.set = jy, de.setWith = Ly, de.shuffle = x0, de.slice = _p, de.sortBy = O0, de.sortedUniq = Tp, de.sortedUniqBy = Rp, de.split = fv, de.spread = D0, de.tail = Cp, de.take = Pp, de.takeRight = Ap, de.takeRightWhile = Mp, de.takeWhile = Ip, de.tap = Gp, de.throttle = N0, de.thru = Eo, de.toArray = hl, de.toPairs = bl, de.toPairsIn = gl, de.toPath = Xv, de.toPlainObject = pl, de.transform = zy, de.unary = F0, de.union = Dp, de.unionBy = Np, de.unionWith = Fp, de.uniq = Bp, de.uniqBy = jp, de.uniqWith = Lp, de.unset = Hy, de.unzip = js, de.unzipWith = Ju, de.update = Xy, de.updateWith = Uy, de.values = da, de.valuesIn = $y, de.without = zp, de.words = xl, de.wrap = B0, de.xor = Hp, de.xorBy = Xp, de.xorWith = Up, de.zip = $p, de.zipObject = Wp, de.zipObjectDeep = Vp, de.zipWith = Kp, de.entries = bl, de.entriesIn = gl, de.extend = yl, de.extendWith = Io, Gs(de, de), de.add = $v, de.attempt = Sl, de.camelCase = Gy, de.capitalize = _l, de.ceil = Wv, de.clamp = Wy, de.clone = L0, de.cloneDeep = H0, de.cloneDeepWith = X0, de.cloneWith = z0, de.conformsTo = U0, de.deburr = wl, de.defaultTo = Sv, de.divide = Vv, de.endsWith = Yy, de.eq = Hn, de.escape = Zy, de.escapeRegExp = Jy, de.every = i0, de.find = o0, de.findIndex = Vu, de.findKey = gy, de.findLast = s0, de.findLastIndex = Ku, de.findLastKey = _y, de.floor = Kv, de.forEach = qu, de.forEachRight = el, de.forIn = wy, de.forInRight = xy, de.forOwn = Sy, de.forOwnRight = ky, de.get = Us, de.gt = $0, de.gte = W0, de.has = Ty, de.hasIn = $s, de.head = Yu, de.identity = sn, de.includes = h0, de.indexOf = sp, de.inRange = Vy, de.invoke = Py, de.isArguments = Fi, de.isArray = jt, de.isArrayBuffer = V0, de.isArrayLike = an, de.isArrayLikeObject = xr, de.isBoolean = K0, de.isBuffer = ki, de.isDate = G0, de.isElement = Y0, de.isEmpty = Z0, de.isEqual = J0, de.isEqualWith = Q0, de.isError = Hs, de.isFinite = q0, de.isFunction = fi, de.isInteger = fl, de.isLength = Ao, de.isMap = ul, de.isMatch = ey, de.isMatchWith = ty, de.isNaN = ry, de.isNative = ny, de.isNil = ay, de.isNull = iy, de.isNumber = ll, de.isObject = vr, de.isObjectLike = br, de.isPlainObject = za, de.isRegExp = Xs, de.isSafeInteger = oy, de.isSet = cl, de.isString = Mo, de.isSymbol = bn, de.isTypedArray = ha, de.isUndefined = sy, de.isWeakMap = fy, de.isWeakSet = uy, de.join = hp, de.kebabCase = Qy, de.last = Mn, de.lastIndexOf = dp, de.lowerCase = qy, de.lowerFirst = ev, de.lt = ly, de.lte = cy, de.max = Gv, de.maxBy = Yv, de.mean = Zv, de.meanBy = Jv, de.min = Qv, de.minBy = qv, de.stubArray = Zs, de.stubFalse = Js, de.stubObject = jv, de.stubString = Lv, de.stubTrue = zv, de.multiply = em, de.nth = pp, de.noConflict = Pv, de.noop = Ys, de.now = Ro, de.pad = tv, de.padEnd = rv, de.padStart = nv, de.parseInt = iv, de.random = Ky, de.reduce = m0, de.reduceRight = b0, de.repeat = av, de.replace = ov, de.result = By, de.round = tm, de.runInContext = Ne, de.sample = _0, de.size = S0, de.snakeCase = sv, de.some = k0, de.sortedIndex = wp, de.sortedIndexBy = xp, de.sortedIndexOf = Sp, de.sortedLastIndex = kp, de.sortedLastIndexBy = Op, de.sortedLastIndexOf = Ep, de.startCase = uv, de.startsWith = lv, de.subtract = rm, de.sum = nm, de.sumBy = im, de.template = cv, de.times = Hv, de.toFinite = ui, de.toInteger = Ut, de.toLength = dl, de.toLower = hv, de.toNumber = In, de.toSafeInteger = hy, de.toString = or, de.toUpper = dv, de.trim = pv, de.trimEnd = yv, de.trimStart = vv, de.truncate = mv, de.unescape = bv, de.uniqueId = Uv, de.upperCase = gv, de.upperFirst = Ws, de.each = qu, de.eachRight = el, de.first = Yu, Gs(de, function() { var S = {}; return Kn(de, function(T, X) { sr.call(de.prototype, X) || (S[X] = T); }), S; }(), { chain: !1 }), de.VERSION = x, mr(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(S) { de[S].placeholder = de; }), mr(["drop", "take"], function(S, T) { Zt.prototype[S] = function(X) { X = X === e ? 1 : Ir(Ut(X), 0); var Z = this.__filtered__ && !T ? new Zt(this) : this.clone(); return Z.__filtered__ ? Z.__takeCount__ = Wr(X, Z.__takeCount__) : Z.__views__.push({ size: Wr(X, $), type: S + (Z.__dir__ < 0 ? "Right" : "") }), Z; }, Zt.prototype[S + "Right"] = function(X) { return this.reverse()[S](X).reverse(); }; }), mr(["filter", "map", "takeWhile"], function(S, T) { var X = T + 1, Z = X == M || X == R; Zt.prototype[S] = function(ie) { var ye = this.clone(); return ye.__iteratees__.push({ iteratee: It(ie, 3), type: X }), ye.__filtered__ = ye.__filtered__ || Z, ye; }; }), mr(["head", "last"], function(S, T) { var X = "take" + (T ? "Right" : ""); Zt.prototype[S] = function() { return this[X](1).value()[0]; }; }), mr(["initial", "tail"], function(S, T) { var X = "drop" + (T ? "" : "Right"); Zt.prototype[S] = function() { return this.__filtered__ ? new Zt(this) : this[X](1); }; }), Zt.prototype.compact = function() { return this.filter(sn); }, Zt.prototype.find = function(S) { return this.filter(S).head(); }, Zt.prototype.findLast = function(S) { return this.reverse().find(S); }, Zt.prototype.invokeMap = Vt(function(S, T) { return typeof S == "function" ? new Zt(this) : this.map(function(X) { return Da(X, S, T); }); }), Zt.prototype.reject = function(S) { return this.filter(Po(It(S))); }, Zt.prototype.slice = function(S, T) { S = Ut(S); var X = this; return X.__filtered__ && (S > 0 || T < 0) ? new Zt(X) : (S < 0 ? X = X.takeRight(-S) : S && (X = X.drop(S)), T !== e && (T = Ut(T), X = T < 0 ? X.dropRight(-T) : X.take(T - S)), X); }, Zt.prototype.takeRightWhile = function(S) { return this.reverse().takeWhile(S).reverse(); }, Zt.prototype.toArray = function() { return this.take($); }, Kn(Zt.prototype, function(S, T) { var X = /^(?:filter|find|map|reject)|While$/.test(T), Z = /^(?:head|last)$/.test(T), ie = de[Z ? "take" + (T == "last" ? "Right" : "") : T], ye = Z || /^find/.test(T); ie && (de.prototype[T] = function() { var Te = this.__wrapped__, Ae = Z ? [1] : arguments, ze = Te instanceof Zt, qe = Ae[0], et = ze || jt(Te), at = function(Gt) { var qt = ie.apply(de, Xe([Gt], Ae)); return Z && yt ? qt[0] : qt; }; et && X && typeof qe == "function" && qe.length != 1 && (ze = et = !1); var yt = this.__chain__, kt = !!this.__actions__.length, Dt = ye && !yt, $t = ze && !kt; if (!ye && et) { Te = $t ? Te : new Zt(this); var Nt = S.apply(Te, Ae); return Nt.__actions__.push({ func: Eo, args: [at], thisArg: e }), new Cn(Nt, yt); } return Dt && $t ? S.apply(this, Ae) : (Nt = this.thru(at), Dt ? Z ? Nt.value()[0] : Nt.value() : Nt); }); }), mr(["pop", "push", "shift", "sort", "splice", "unshift"], function(S) { var T = Ja[S], X = /^(?:push|sort|unshift)$/.test(S) ? "tap" : "thru", Z = /^(?:pop|shift)$/.test(S); de.prototype[S] = function() { var ie = arguments; if (Z && !this.__chain__) { var ye = this.value(); return T.apply(jt(ye) ? ye : [], ie); } return this[X](function(Te) { return T.apply(jt(Te) ? Te : [], ie); }); }; }), Kn(Zt.prototype, function(S, T) { var X = de[T]; if (X) { var Z = X.name + ""; sr.call(sa, Z) || (sa[Z] = []), sa[Z].push({ name: T, func: X }); } }), sa[go(e, c).name] = [{ name: "wrapper", func: e }], Zt.prototype.clone = bh, Zt.prototype.reverse = gh, Zt.prototype.value = _h, de.prototype.at = Yp, de.prototype.chain = Zp, de.prototype.commit = Jp, de.prototype.next = Qp, de.prototype.plant = e0, de.prototype.reverse = t0, de.prototype.toJSON = de.prototype.valueOf = de.prototype.value = r0, de.prototype.first = de.prototype.head, Ta && (de.prototype[Ta] = qp), de; }, ia = Jc(); Mt ? ((Mt.exports = ia)._ = ia, Yt._ = ia) : ht._ = ia; }).call(Wt); })(y1, ga); const v1 = ga; function Dc(H) { H = H.replace("#", ""); for (var k = H.match(/../g), e = 0; e < 3; e++) k[e] = parseInt(k[e], 16); return k; } function Nc(H, k, e) { for (var x = [H.toString(16), k.toString(16), e.toString(16)], _ = 0; _ < 3; _++) x[_].length == 1 && (x[_] = "0" + x[_]); return "#" + x.join(""); } function m1(H, k) { for (var e = Dc(H), x = 0; x < 3; x++) e[x] = Math.floor(e[x] * (1 - k)); return Nc(e[0], e[1], e[2]); } function b1(H, k) { for (var e = Dc(H), x = 0; x < 3; x++) e[x] = Math.floor((255 - e[x]) * k + e[x]); return Nc(e[0], e[1], e[2]); } var wf = {}, g1 = { get exports() { return wf; }, set exports(H) { wf = H; } }; (function(H, k) { (function(e, x) { H.exports = x(); })(Wt, function() { var e = 1e3, x = 6e4, _ = 36e5, u = "millisecond", m = "second", g = "minute", b = "hour", w = "day", f = "week", y = "month", h = "quarter", l = "year", d = "date", s = "Invalid Date", v = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, c = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, a = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(N) { var M = ["th", "st", "nd", "rd"], I = N % 100; return "[" + N + (M[(I - 20) % 10] || M[I] || M[0]) + "]"; } }, r = function(N, M, I) { var R = String(N); return !R || R.length >= M ? N : "" + Array(M + 1 - R.length).join(I) + N; }, t = { s: r, z: function(N) { var M = -N.utcOffset(), I = Math.abs(M), R = Math.floor(I / 60), C = I % 60; return (M <= 0 ? "+" : "-") + r(R, 2, "0") + ":" + r(C, 2, "0"); }, m: function N(M, I) { if (M.date() < I.date()) return -N(I, M); var R = 12 * (I.year() - M.year()) + (I.month() - M.month()), C = M.clone().add(R, y), E = I - C < 0, A = M.clone().add(R + (E ? -1 : 1), y); return +(-(R + (I - C) / (E ? C - A : A - C)) || 0); }, a: function(N) { return N < 0 ? Math.ceil(N) || 0 : Math.floor(N); }, p: function(N) { return { M: y, y: l, w: f, d: w, D: d, h: b, m: g, s: m, ms: u, Q: h }[N] || String(N || "").toLowerCase().replace(/s$/, ""); }, u: function(N) { return N === void 0; } }, i = "en", n = {}; n[i] = a; var o = function(N) { return N instanceof F; }, p = function N(M, I, R) { var C; if (!M) return i; if (typeof M == "string") { var E = M.toLowerCase(); n[E] && (C = E), I && (n[E] = I, C = E); var A = M.split("-"); if (!C && A.length > 1) return N(A[0]); } else { var L = M.name; n[L] = M, C = L; } return !R && C && (i = C), C || !R && i; }, O = function(N, M) { if (o(N)) return N.clone(); var I = typeof M == "object" ? M : {}; return I.date = N, I.args = arguments, new F(I); }, P = t; P.l = p, P.i = o, P.w = function(N, M) { return O(N, { locale: M.$L, utc: M.$u, x: M.$x, $offset: M.$offset }); }; var F = function() { function N(I) { this.$L = p(I.locale, null, !0), this.parse(I); } var M = N.prototype; return M.parse = function(I) { this.$d = function(R) { var C = R.date, E = R.utc; if (C === null) return /* @__PURE__ */ new Date(NaN); if (P.u(C)) return /* @__PURE__ */ new Date(); if (C instanceof Date) return new Date(C); if (typeof C == "string" && !/Z$/i.test(C)) { var A = C.match(v); if (A) { var L = A[2] - 1 || 0, $ = (A[7] || "0").substring(0, 3); return E ? new Date(Date.UTC(A[1], L, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, $)) : new Date(A[1], L, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, $); } } return new Date(C); }(I), this.$x = I.x || {}, this.init(); }, M.init = function() { var I = this.$d; this.$y = I.getFullYear(), this.$M = I.getMonth(), this.$D = I.getDate(), this.$W = I.getDay(), this.$H = I.getHours(), this.$m = I.getMinutes(), this.$s = I.getSeconds(), this.$ms = I.getMilliseconds(); }, M.$utils = function() { return P; }, M.isValid = function() { return this.$d.toString() !== s; }, M.isSame = function(I, R) { var C = O(I); return this.startOf(R) <= C && C <= this.endOf(R); }, M.isAfter = function(I, R) { return O(I) < this.startOf(R); }, M.isBefore = function(I, R) { return this.endOf(R) < O(I); }, M.$g = function(I, R, C) { return P.u(I) ? this[R] : this.set(C, I); }, M.unix = function() { return Math.floor(this.valueOf() / 1e3); }, M.valueOf = function() { return this.$d.getTime(); }, M.startOf = function(I, R) { var C = this, E = !!P.u(R) || R, A = P.p(I), L = function(re, ee) { var ce = P.w(C.$u ? Date.UTC(C.$y, ee, re) : new Date(C.$y, ee, re), C); return E ? ce : ce.endOf(w); }, $ = function(re, ee) { return P.w(C.toDate()[re].apply(C.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ee)), C); }, W = this.$W, U = this.$M, D = this.$D, B = "set" + (this.$u ? "UTC" : ""); switch (A) { case l: return E ? L(1, 0) : L(31, 11); case y: return E ? L(1, U) : L(0, U + 1); case f: var j = this.$locale().weekStart || 0, V = (W < j ? W + 7 : W) - j; return L(E ? D - V : D + (6 - V), U); case w: case d: return $(B + "Hours", 0); case b: return $(B + "Minutes", 1); case g: return $(B + "Seconds", 2); case m: return $(B + "Milliseconds", 3); default: return this.clone(); } }, M.endOf = function(I) { return this.startOf(I, !1); }, M.$set = function(I, R) { var C, E = P.p(I), A = "set" + (this.$u ? "UTC" : ""), L = (C = {}, C[w] = A + "Date", C[d] = A + "Date", C[y] = A + "Month", C[l] = A + "FullYear", C[b] = A + "Hours", C[g] = A + "Minutes", C[m] = A + "Seconds", C[u] = A + "Milliseconds", C)[E], $ = E === w ? this.$D + (R - this.$W) : R; if (E === y || E === l) { var W = this.clone().set(d, 1); W.$d[L]($), W.init(), this.$d = W.set(d, Math.min(this.$D, W.daysInMonth())).$d; } else L && this.$d[L]($); return this.init(), this; }, M.set = function(I, R) { return this.clone().$set(I, R); }, M.get = function(I) { return this[P.p(I)](); }, M.add = function(I, R) { var C, E = this; I = Number(I); var A = P.p(R), L = function(U) { var D = O(E); return P.w(D.date(D.date() + Math.round(U * I)), E); }; if (A === y) return this.set(y, this.$M + I); if (A === l) return this.set(l, this.$y + I); if (A === w) return L(1); if (A === f) return L(7); var $ = (C = {}, C[g] = x, C[b] = _, C[m] = e, C)[A] || 1, W = this.$d.getTime() + I * $; return P.w(W, this); }, M.subtract = function(I, R) { return this.add(-1 * I, R); }, M.format = function(I) { var R = this, C = this.$locale(); if (!this.isValid()) return C.invalidDate || s; var E = I || "YYYY-MM-DDTHH:mm:ssZ", A = P.z(this), L = this.$H, $ = this.$m, W = this.$M, U = C.weekdays, D = C.months, B = function(ee, ce, ve, ge) { return ee && (ee[ce] || ee(R, E)) || ve[ce].slice(0, ge); }, j = function(ee) { return P.s(L % 12 || 12, ee, "0"); }, V = C.meridiem || function(ee, ce, ve) { var ge = ee < 12 ? "AM" : "PM"; return ve ? ge.toLowerCase() : ge; }, re = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: W + 1, MM: P.s(W + 1, 2, "0"), MMM: B(C.monthsShort, W, D, 3), MMMM: B(D, W), D: this.$D, DD: P.s(this.$D, 2, "0"), d: String(this.$W), dd: B(C.weekdaysMin, this.$W, U, 2), ddd: B(C.weekdaysShort, this.$W, U, 3), dddd: U[this.$W], H: String(L), HH: P.s(L, 2, "0"), h: j(1), hh: j(2), a: V(L, $, !0), A: V(L, $, !1), m: String($), mm: P.s($, 2, "0"), s: String(this.$s), ss: P.s(this.$s, 2, "0"), SSS: P.s(this.$ms, 3, "0"), Z: A }; return E.replace(c, function(ee, ce) { return ce || re[ee] || A.replace(":", ""); }); }, M.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, M.diff = function(I, R, C) { var E, A = P.p(R), L = O(I), $ = (L.utcOffset() - this.utcOffset()) * x, W = this - L, U = P.m(this, L); return U = (E = {}, E[l] = U / 12, E[y] = U, E[h] = U / 3, E[f] = (W - $) / 6048e5, E[w] = (W - $) / 864e5, E[b] = W / _, E[g] = W / x, E[m] = W / e, E)[A] || W, C ? U : P.a(U); }, M.daysInMonth = function() { return this.endOf(y).$D; }, M.$locale = function() { return n[this.$L]; }, M.locale = function(I, R) { if (!I) return this.$L; var C = this.clone(), E = p(I, R, !0); return E && (C.$L = E), C; }, M.clone = function() { return P.w(this.$d, this); }, M.toDate = function() { return new Date(this.valueOf()); }, M.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, M.toISOString = function() { return this.$d.toISOString(); }, M.toString = function() { return this.$d.toUTCString(); }, N; }(), z = F.prototype; return O.prototype = z, [["$ms", u], ["$s", m], ["$m", g], ["$H", b], ["$W", w], ["$M", y], ["$y", l], ["$D", d]].forEach(function(N) { z[N[1]] = function(M) { return this.$g(M, N[0], N[1]); }; }), O.extend = function(N, M) { return N.$i || (N(M, F, O), N.$i = !0), O; }, O.locale = p, O.isDayjs = o, O.unix = function(N) { return O(1e3 * N); }, O.en = n[i], O.Ls = n, O.p = {}, O; }); })(g1); const Bi = wf, af = [ "#FFFFFF", "#000000", "#BFBFBF", "#323232", "#4472C4", "#ED7D31", "#A5A5A5", "#FFC000", "#5B9BD5", "#71AD47" ]; let _1 = 80; function uc(H, k = {}) { return w1($g(H), k); } function w1(H, k) { return new Promise(function(e, x) { const _ = new XMLHttpRequest(); _.open(k.method || "GET", H, !0), _.responseType = k.responseType || "arraybuffer", _.onload = function() { _.status === 200 ? e(_.response) : x(_.status); }, _.onerror = function() { x(_.status); }, _.withCredentials = k.withCredentials || !1, k.headers && Object.keys(k.headers).forEach(function(u) { _.setRequestHeader(u, k.headers[u]); }), _.send(k.body); }); } function x1(H) { try { return new gf.Workbook().xlsx.load(H); } catch (k) { return console.warn(k), Promise.reject(k); } } function S1(H, k, e) { for (let x = 0; x < (H.columns || []).length; x++) k.cols[x.toString()] = {}, H.columns[x].width ? k.cols[x.toString()].width = H.columns[x].width * 6 : k.cols[x.toString()].width = _1; k.cols.len = Math.max(Object.keys(k.cols).length, e.minColLength || 0); } function k1(H) { const { numFmt: k, value: e, type: x } = H; switch (x) { case 2: return e + ""; case 3: return e; case 4: switch (k) { case "yyyy-mm-dd;@": return Bi(e).format("YYYY-MM-DD"); case "mm-dd-yy": return Bi(e).format("YYYY/MM/DD"); case "[$-F800]dddd, mmmm dd, yyyy": return Bi(e).format("YYYY年M月D日 ddd"); case 'm"月"d"日";@': return Bi(e).format("M月D日"); case "yyyy/m/d h:mm;@": case 'm/d/yy "h":mm': return Bi(e).subtract(8, "hour").format("YYYY/M/DD HH:mm"); case "h:mm;@": return Bi(e).format("HH:mm"); default: return Bi(e).format("YYYY-MM-DD"); } case 6: return H.result; case 8: return H.text; default: return e; } } function of(H) { if (typeof H == "object") return "#000000"; if (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(H)) return H.startsWith("#") ? H : "#" + H; H = H.trim().toLowerCase(); let k = {}; try { let e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(H); return k.r = parseInt(e[2], 16), k.g = parseInt(e[3], 16), k.b = parseInt(e[4], 16), k.a = parseInt(e[1], 16) / 255, Rt(`rgba(${k.r}, ${k.g}, ${k.b}, ${k.a})`).toHexString(); } catch (e) { console.warn(e); } } function sf(H, k) { return H > 9 ? "#C7C9CC" : typeof k == "undefined" ? af[H] : k > 0 ? b1(af[H], k) : m1(af[H], Math.abs(k)); } function O1(H) { H.style = ga.cloneDeep(H.style); let k = null; H.style.fill && H.style.fill.fgColor && (H.style.fill.fgColor.argb ? k = of(H.style.fill.fgColor.argb) : H.style.fill.fgColor.hasOwnProperty("theme") ? k = sf(H.style.fill.fgColor.theme, H.style.fill.fgColor.tint) : k = "#C7C9CC"), k && (H.style.bgcolor = k); let e = null; if (H.style.font && H.style.font.color && (H.style.font.color.argb ? e = of(H.style.font.color.argb) : H.style.font.color.hasOwnProperty("theme") ? e = sf(H.style.font.color.theme, H.style.font.color.tint) : e = "#000000"), e && (H.style.color = e), H.style.alignment && (H.style.alignment.horizontal && (H.style.align = H.style.alignment.horizontal), H.style.alignment.vertical && (H.style.valign = H.style.alignment.vertical)), H.style.alignment && H.style.alignment.wrapText && (H.style.textwrap = !0), H.style.border) { let x = {}; Object.keys(H.style.border).forEach((_) => { let u = H.style.border[_], m = "#000000"; typeof u.color == "string" ? m = u.color : u.color && (u.color.argb ? m = of(u.color.argb) : u.color.hasOwnProperty("theme") && (m = sf(u.color.theme, u.color.tint))), x[_] = [u.style || "thin", m]; }), H.style.border2 = Qs({}, H.style.border), H.style.border = x; } return H.style; } function E1(H, k) { let e = []; return H.eachSheet((x) => { let _ = { name: x.name, styles: [], rows: {}, cols: {}, merges: [], media: [] }, u = []; for (let m in x._merges) { _.merges.push(x._merges[m].shortRange); let g = {}; g.startAddress = x._merges[m].tl, g.endAddress = x._merges[m].br, g.YRange = x._merges[m].model.bottom - x._merges[m].model.top, g.XRange = x._merges[m].model.right - x._merges[m].model.left, u.push(g); } S1(x, _, k), (x._rows || []).forEach((m, g) => { _.rows[g] = { cells: {} }, m.height && (_.rows[g].height = m.height), (m._cells || []).forEach((b, w) => { _.rows[g].cells[w] = {}; let f = v1.find(u, function(y) { return y.startAddress == b._address; }); f && b.master.address != f.startAddress || (f && (_.rows[g].cells[w].merge = [f.YRange, f.XRange]), _.rows[g].cells[w].text = k1(b), _.styles.push(O1(b)), _.rows[g].cells[w].style = _.styles.length - 1); }); }), _._media && (_.media = _._media), _.rows.len = Math.max(Object.keys(_.rows).length, 100), e.push(_); }), { workbookData: e, workbookSource: H, medias: H.media || [] }; } let $o = []; function Ho(H, k, e, x) { e && e._media.length && e._media.forEach((_) => { let { imageId: u, range: m, type: g } = _; if (g === "image") { let b = T1(e, m, x); R1(H, u, k[u], b); } }); } let Wo = 60, Vo = 25, ff = 80, uf = 24, Jn = window.devicePixelRatio; function T1(H, k, e) { var r, t, i, n, o, p, O, P, F, z, N, M, I, R; let { tl: x = {}, br: _ = {} } = k, { nativeCol: u, nativeColOff: m, nativeRow: g, nativeRowOff: b } = x, w = Wo, f = Vo; for (let C = 0; C < u; C++) w += ((t = (r = H == null ? void 0 : H._columns) == null ? void 0 : r[C]) == null ? void 0 : t.width) * 6 || ff; for (let C = 0; C < g; C++) f += ((n = (i = H == null ? void 0 : H._rows) == null ? void 0 : i[C]) == null ? void 0 : n.height) || uf; let y = w + m / 12700, h = f + b / 12700, { nativeCol: l, nativeColOff: d, nativeRow: s, nativeRowOff: v } = _, c; if (u === l) c = (d - m) / 12700; else { c = (((p = (o = H == null ? void 0 : H._columns) == null ? void 0 : o[u]) == null ? void 0 : p.width) * 6 || ff) - m / 12700; for (let C = u + 1; C < l; C++) c += ((P = (O = H == null ? void 0 : H._columns) == null ? void 0 : O[C]) == null ? void 0 : P.width) * 6 || ff; c += d / 12700; } let a; if (g === s) a = (v - b) / 12700; else { a = (((z = (F = H == null ? void 0 : H._rows) == null ? void 0 : F[g]) == null ? void 0 : z.height) || uf) - b / 12700; for (let C = g + 1; C < s; C++) a += ((M = (N = H == null ? void 0 : H._rows) == null ? void 0 : N[C]) == null ? void 0 : M.height) || uf; a += v / 12700; } return { x: (y - (((I = e == null ? void 0 : e.scroll) == null ? void 0 : I.x) || 0)) * Jn, y: (h - (((R = e == null ? void 0 : e.scroll) == null ? void 0 : R.y) || 0)) * Jn, width: c * Jn, height: a * Jn }; } function lc() { $o = []; } function R1(H, k, e, x) { C1(k, e).then((_) => { let u = 0, m = 0, g = _.width, b = _.height, w = x.x, f = x.y, y = x.width, h = x.height, l = y / g, d = h / b; if (w < Wo * Jn) { let s = Wo * Jn - w; w = Wo * Jn, y -= s, g -= s / l, u += s / l; } if (f < Vo * Jn) { let s = Vo * Jn - f; f = Vo * Jn, h -= s, b -= s / d, m += s / d; } H.drawImage(_, u, m, g, b, w, f, y, h); }).catch((_) => { }); } function C1(H, k) { return new Promise((e, x) => { if ($o[H]) return e($o[H]); const { buffer: _, extension: u } = k.buffer; let m = new Blob([_], { type: "image/" + u }), g = URL.createObjectURL(m), b = new Image(); b.src = g, b.onload = function() { e(b), $o[H] = b; }, b.onerror = function(w) { x(w); }; }); } function P1(H) { let k = H.value; if (k) { let e = k.querySelectorAll("input"); for (let x of e) x && !x.readOnly && (x.readOnly = !0); document.activeElement && document.activeElement.blur(); } } const A1 = (H, k) => { const e = H.__vccOpts || H; for (const [x, _] of k) e[x] = _; return e; }, M1 = fm({ name: "VueOfficeExcel", props: { src: [String, ArrayBuffer, Blob], requestOptions: { type: Object, default: () => ({}) }, options: { type: Object, default: () => ({ minColLength: 20 }) } }, emits: ["rendered", "error"], setup(H, { emit: k }) { const e = Cl(null), x = Cl(null); let _ = { _worksheets: [] }, u = [], m = 1, g = null, b = null, w = null; function f(d) { x1(d).then((s) => { if (!s._worksheets || s._worksheets.length === 0) throw new Error("未获取到数据,可能文件格式不正确或文件已损坏"); const { workbookData: v, medias: c, workbookSource: a } = E1(s, H.options); u = c, _ = a, w = null, m = 1, lc(), b.loadData(v), Ho(g, u, _._worksheets[m], w), k("rendered"); }).catch((s) => { console.warn(s), u = [], _ = { _worksheets: [] }, lc(), b.loadData({}), k("error", s); }); } const y = ga.debounce(P1, 200).bind(this, x), h = new MutationObserver(y), l = { attributes: !0, childList: !0, subtree: !0 }; return um(() => { lm(() => { h.observe(x.value, l), y(x), window.xs = b = new Ac(x.value, { mode: "read", showToolbar: !1, showContextmenu: H.options.showContextmenu || !1, view: { height: () => e.value && e.value.clientHeight || 300, width: () => e.value && e.value.clientWidth || 300 }, row: { height: 24, len: 100 }, col: { len: 26, width: 80, indexWidth: 60, minWidth: 60 }, autoFocus: !1 }).loadData({}); let d = b.bottombar.swapFunc; b.bottombar.swapFunc = function(a) { d.call(b.bottombar, a), m = a + 1, setTimeout(() => { b.reRender(), Ho(g, u, _._worksheets[m], w); }); }; let s = b.sheet.editor.clear; b.sheet.editor.clear = function(...a) { s.apply(b.sheet.editor, a), setTimeout(() => { Ho(g, u, _._worksheets[m], w); }); }; let v = b.sheet.editor.setOffset; b.sheet.editor.setOffset = function(...a) { v.apply(b.sheet.editor, a), w = a[0], Ho(g, u, _._worksheets[m], w); }, g = x.value.querySelector("canvas").getContext("2d"), H.src && uc(H.src, H.requestOptions).then(f).catch((a) => { b.loadData({}), k("error", a); }); }); }), cm(() => { h.disconnect(), b = null; }), hm(() => H.src, () => { H.src ? uc(H.src, H.requestOptions).then(f).catch((d) => { b.loadData({}), k("error", d); }) : b.loadData({}); }), { wrapperRef: e, rootRef: x }; } }), I1 = { class: "vue-office-excel", ref: "wrapperRef" }, D1 = { class: "vue-office-excel-main", ref: "rootRef" }; function N1(H, k, e, x, _, u) { return dm(), pm("div", I1, [ ym("div", D1, null, 512) ], 512); } const lf = /* @__PURE__ */ A1(M1, [["render", N1]]); lf.install = function(H) { H.component(lf.name, lf); }; export { lf as default };