async function createFirmwareUpdate(){ //GEt device data var item = serialResultsDiv.innerHTML; x = Array.from(new Set(item.split(";"))).toString(); if (x.indexOf("SN=") > 0){ var a = x.indexOf("SN="); var b = a + 3; var c = b + 8; serial = x.substring(b,c); if (x.indexOf("HW=") > 0){ var a = x.indexOf("HW="); var b = a + 3; var c = b + 8; var d = x.substring(b,c); var e = d.slice(-1); if (e.toLowerCase() !== e.toUpperCase()){ var f = d.slice(d.length - 3) hw = 'R'+f; } else { var f = d.slice(d.length - 2) hw = 'R'+f; } hex_fw = firmwarelocation.split("/firmware/").pop(); console.log(upgraded_version); var testdetails2 = { "HW" : hw, "HEX_FW" : upgraded_version } var testdetails = JSON.stringify(testdetails2); var data = document.getElementById("servicetoken").innerHTML; // Build JSON var serialnumber = serial; var action = '/v0/application/createHistory'; var url = link+action; var bearer = 'Bearer ' + data; const response = await fetch(url, { method: 'POST', withCredentials: true, credentials: 'include', headers: { 'Authorization': bearer, 'Content-Type': 'application/json' }, body: JSON.stringify({ sn: serial, type: 'firmware', sn_service:'Portal', testdetails: testdetails }) }); } } else{ console.log('No Serialnumber'); } } async function logCommunication(data, direction) { // Only log if debug mode is enabled if (typeof DEBUG === 'undefined' || !DEBUG) { return; } try { // Get service token for API authentication const serviceToken = document.getElementById("servicetoken")?.innerHTML || ''; // Get serial number if available let serialNumber = ''; if (typeof serial !== 'undefined' && serial) { serialNumber = serial; } const logData = { data: data, direction: direction, // 'sent', 'received', 'connected', 'disconnected', 'handshake', 'upload', 'verify' timestamp: new Date().toISOString(), serial_number: serialNumber, maintenance_run: 0 // Not applicable for upload, set to 0 }; // Get base URL for API calls (assuming 'link' variable is defined globally) const url = link + '/v2/com_log/log'; const bearer = 'Bearer ' + serviceToken; const response = await fetch(url, { method: 'POST', withCredentials: true, credentials: 'include', headers: { 'Authorization': bearer, 'Content-Type': 'application/json' }, body: JSON.stringify(logData) }); if (!response.ok) { console.warn('Failed to log communication:', response.status); } } catch (error) { console.warn('Error logging communication:', error); } } (() => { var e = { 184: (e, t, r) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.Serial = void 0; const n = r(90); class i { async close() { if (this.reader) { const e = this.reader; this.reader = void 0, await e.reader.cancel() } if (this.writer) { const e = this.writer; this.writer = void 0, await e.close() } if (this.port) { const e = this.port; this.port = void 0, await e.close() } } async connectWithPaired(e) { const [t] = await navigator.serial.getPorts(); if (!t) throw new Error("no paired"); return this._connect(e, t) } async connect(e) { const filters = [{ usbVendorId: 1027, usbProductId: 24597 }]; const t = await navigator.serial.requestPort({filters}); return this._connect(e, t) } async _connect(e, t) { e = { baudRate: 9600, dataBits: 8, stopBits: 1, parity: "none", bufferSize: 255, rtscts: !1, xon: !1, xoff: !1, ...e }, this.port && await this.close(), this.port = t, await this.port.open(e), this.reader = new n.ReadableWebToNodeStream(this.port.readable), this.writer = this.port.writable.getWriter(); const r = this.reader; return r.write = (e, t) => (this.writer.write(e).then((() => t(null)), t), !0), r } } t.Serial = i; const o = new i; t.default = o }, 590: function(e, t, r) { "use strict"; var n = r(764).Buffer, i = this && this.__createBinding || (Object.create ? function(e, t, r, n) { void 0 === n && (n = r), Object.defineProperty(e, n, { enumerable: !0, get: function() { return t[r] } }) } : function(e, t, r, n) { void 0 === n && (n = r), e[n] = t[r] }), o = this && this.__setModuleDefault || (Object.create ? function(e, t) { Object.defineProperty(e, "default", { enumerable: !0, value: t }) } : function(e, t) { e.default = t }), a = this && this.__importStar || function(e) { if (e && e.__esModule) return e; var t = {}; if (null != e) for (var r in e) "default" !== r && Object.prototype.hasOwnProperty.call(e, r) && i(t, e, r); return o(t, e), t }, u = this && this.__importDefault || function(e) { return e && e.__esModule ? e : { default: e } }; Object.defineProperty(t, "__esModule", { value: !0 }), t.upload = t.boards = void 0; const s = u(r(184)), f = u(r(664)), l = a(r(620)), c = u(r(107)); t.boards = { emergencyPlug: { signature: n.from([30, 149, 15]), pageSize: 128, timeout: 1000, baudRate: 57600 }, EMP2: { signature: n.from([30, 149, 15]), pageSize: 128, timeout: 1000, baudRate: 115200 } }; const h = e => e(); async function p(e, t, r, n = !1) { try { const i = await fetch(t).then((e => e.text())).then((e => l.parse(e).data)), o = await s.default.connect({ baudRate: e.baudRate }); r(0); await logCommunication('Starting firmware upload process', 'upload'); const a = new c.default; let u = 0, p = i.length / e.pageSize; n && (p *= 2), a.log = e => { if ("page done" === e || "verify done" === e) { u += 1; const e = Math.round(100 * u / p); r(e) } }, await f.default.series([a.sync.bind(a, o, 3, e.timeout), a.sync.bind(a, o, 3, e.timeout), a.sync.bind(a, o, 3, e.timeout), a.verifySignature.bind(a, o, e.signature, e.timeout), a.setOptions.bind(a, o, {}, e.timeout), a.enterProgrammingMode.bind(a, o, e.timeout), a.upload.bind(a, o, i, e.pageSize, e.timeout), n ? a.verify.bind(a, o, i, e.pageSize, e.timeout) : h, a.exitProgrammingMode.bind(a, o, e.timeout)]) await logCommunication('Firmware upload process completed', 'upload'); } finally { s.default.close() } } t.upload = p, t.default = p }, 204: (e, t, r) => { "use strict"; const n = r(590); document.addEventListener("DOMContentLoaded", (() => { document.querySelectorAll("[emergencyPlug-update]").forEach((e => { e.addEventListener("click", (async () => { if (!navigator.serial) return alert("Your browser does not support this functionality. Please use latest Chrome or Edge browser"); const t = firmwarelocation, r = e.getAttribute("board"), i = e.hasAttribute("verify"), o = e.querySelector(".upload-progress"), a = e => { o.innerHTML = e + "%" readBar.style.background = '#FF8A33'; readBar.innerHTML = 'Firmware update in progress ('+ e + "%)" + 'Keep this page active and do not disconnect the USB cable'; }; try { await n.upload(n.boards[r], t, a, i) } catch (e) { throw o.innerHTML = "Error!", alert(e), e } o.innerHTML = "Done!"; document.getElementById("action_firmware").checked = true; createFirmwareUpdate(); readBar.innerHTML = 'Firmware update completed'; readBar.style.background = '#04AA6D'; })) })) })) }, 664: (e, t, r) => { "use strict"; r.r(t), r.d(t, { default: () => yt, apply: () => i, applyEach: () => x, applyEachSeries: () => j, asyncify: () => c, auto: () => B, autoInject: () => W, cargo: () => H, cargoQueue: () => V, compose: () => X, concat: () => Z, concatLimit: () => J, concatSeries: () => ee, constant: () => te, detect: () => ne, detectLimit: () => ie, detectSeries: () => oe, dir: () => ue, doUntil: () => fe, doWhilst: () => se, each: () => ce, eachLimit: () => he, eachOf: () => L, eachOfLimit: () => T, eachOfSeries: () => M, eachSeries: () => pe, ensureAsync: () => de, every: () => ye, everyLimit: () => ge, everySeries: () => ve, filter: () => _e, filterLimit: () => Se, filterSeries: () => Ee, forever: () => Re, groupBy: () => Ae, groupByLimit: () => Te, groupBySeries: () => ke, log: () => Le, map: () => O, mapLimit: () => $, mapSeries: () => C, mapValues: () => xe, mapValuesLimit: () => Oe, mapValuesSeries: () => Me, memoize: () => Ce, nextTick: () => je, parallel: () => Ie, parallelLimit: () => Be, priorityQueue: () => Fe, queue: () => Ne, race: () => We, reduce: () => Y, reduceRight: () => ze, reflect: () => Ke, reflectAll: () => Ge, reject: () => Ve, rejectLimit: () => Ye, rejectSeries: () => Qe, retry: () => $e, retryable: () => Ze, seq: () => Q, series: () => et, setImmediate: () => l, some: () => tt, someLimit: () => rt, someSeries: () => nt, sortBy: () => it, timeout: () => ot, times: () => ut, timesLimit: () => at, timesSeries: () => st, transform: () => ft, tryEach: () => lt, unmemoize: () => ct, until: () => pt, waterfall: () => dt, whilst: () => ht, all: () => ye, allLimit: () => ge, allSeries: () => ve, any: () => tt, anyLimit: () => rt, anySeries: () => nt, find: () => ne, findLimit: () => ie, findSeries: () => oe, flatMap: () => Z, flatMapLimit: () => J, flatMapSeries: () => ee, forEach: () => ce, forEachSeries: () => pe, forEachLimit: () => he, forEachOf: () => L, forEachOfSeries: () => M, forEachOfLimit: () => T, inject: () => Y, foldl: () => Y, foldr: () => ze, select: () => _e, selectLimit: () => Se, selectSeries: () => Ee, wrapSync: () => c, during: () => ht, doDuring: () => se }); var n = r(155); function i(e, ...t) { return (...r) => e(...t, ...r) } function o(e) { return function(...t) { var r = t.pop(); return e.call(this, t, r) } } var a = "function" == typeof setImmediate && setImmediate, u = "object" == typeof n && "function" == typeof n.nextTick; function s(e) { setTimeout(e, 0) } function f(e) { return (t, ...r) => e((() => t(...r))) } var l = f(a ? setImmediate : u ? n.nextTick : s); function c(e) { return d(e) ? function(...t) { const r = t.pop(); return h(e.apply(this, t), r) } : o((function(t, r) { var n; try { n = e.apply(this, t) } catch (e) { return r(e) } if (n && "function" == typeof n.then) return h(n, r); r(null, n) })) } function h(e, t) { return e.then((e => { p(t, null, e) }), (e => { p(t, e && e.message ? e : new Error(e)) })) } function p(e, t, r) { try { e(t, r) } catch (e) { l((e => { throw e }), e) } } function d(e) { return "AsyncFunction" === e[Symbol.toStringTag] } function y(e) { if ("function" != typeof e) throw new Error("expected a function"); return d(e) ? c(e) : e } function g(e, t = e.length) { if (!t) throw new Error("arity is undefined"); return function(...r) { return "function" == typeof r[t - 1] ? e.apply(this, r) : new Promise(((n, i) => { r[t - 1] = (e, ...t) => { if (e) return i(e); n(t.length > 1 ? t : t[0]) }, e.apply(this, r) })) } } function v(e) { return function(t, ...r) { return g((function(n) { var i = this; return e(t, ((e, t) => { y(e).apply(i, r.concat(t)) }), n) })) } } function m(e, t, r, n) { t = t || []; var i = [], o = 0, a = y(r); return e(t, ((e, t, r) => { var n = o++; a(e, ((e, t) => { i[n] = t, r(e) })) }), (e => { n(e, i) })) } function b(e) { return e && "number" == typeof e.length && e.length >= 0 && e.length % 1 == 0 } const w = {}; function _(e) { function t(...t) { if (null !== e) { var r = e; e = null, r.apply(this, t) } } return Object.assign(t, e), t } function S(e) { return function(...t) { if (null === e) throw new Error("Callback was already called."); var r = e; e = null, r.apply(this, t) } } function E(e, t, r, n) { let i = !1, o = !1, a = !1, u = 0, s = 0; function f() { u >= t || a || i || (a = !0, e.next().then((({ value: e, done: t }) => { if (!o && !i) { if (a = !1, t) return i = !0, void(u <= 0 && n(null)); u++, r(e, s, l), s++, f() } })).catch(c)) } function l(e, t) { if (u -= 1, !o) return e ? c(e) : !1 === e ? (i = !0, void(o = !0)) : t === w || i && u <= 0 ? (i = !0, n(null)) : void f() } function c(e) { o || (a = !1, i = !0, n(e)) } f() } var R = e => (t, r, n) => { if (n = _(n), e <= 0) throw new RangeError("concurrency limit cannot be less than 1"); if (!t) return n(null); if ("AsyncGenerator" === t[Symbol.toStringTag]) return E(t, e, r, n); if (function(e) { return "function" == typeof e[Symbol.asyncIterator] }(t)) return E(t[Symbol.asyncIterator](), e, r, n); var i = function(e) { if (b(e)) return function(e) { var t = -1, r = e.length; return function() { return ++t < r ? { value: e[t], key: t } : null } }(e); var t, r, n, i, o = function(e) { return e[Symbol.iterator] && e[Symbol.iterator]() }(e); return o ? function(e) { var t = -1; return function() { var r = e.next(); return r.done ? null : (t++, { value: r.value, key: t }) } }(o) : (r = (t = e) ? Object.keys(t) : [], n = -1, i = r.length, function() { var e = r[++n]; return n < i ? { value: t[e], key: e } : null }) }(t), o = !1, a = !1, u = 0, s = !1; function f(e, t) { if (!a) if (u -= 1, e) o = !0, n(e); else if (!1 === e) o = !0, a = !0; else { if (t === w || o && u <= 0) return o = !0, n(null); s || l() } } function l() { for (s = !0; u < e && !o;) { var t = i(); if (null === t) return o = !0, void(u <= 0 && n(null)); u += 1, r(t.value, t.key, S(f)) } s = !1 } l() }, T = g((function(e, t, r, n) { return R(t)(e, y(r), n) }), 4); function A(e, t, r) { r = _(r); var n = 0, i = 0, { length: o } = e, a = !1; function u(e, t) { !1 === e && (a = !0), !0 !== a && (e ? r(e) : ++i !== o && t !== w || r(null)) } for (0 === o && r(null); n < o; n++) t(e[n], n, S(u)) } function k(e, t, r) { return T(e, 1 / 0, t, r) } var L = g((function(e, t, r) { return (b(e) ? A : k)(e, y(t), r) }), 3), O = g((function(e, t, r) { return m(L, e, t, r) }), 3), x = v(O), M = g((function(e, t, r) { return T(e, 1, t, r) }), 3), C = g((function(e, t, r) { return m(M, e, t, r) }), 3), j = v(C); const P = Symbol("promiseCallback"); function I() { let e, t; function r(r, ...n) { if (r) return t(r); e(n.length > 1 ? n : n[0]) } return r[P] = new Promise(((r, n) => { e = r, t = n })), r } function B(e, t, r) { "number" != typeof t && (r = t, t = null), r = _(r || I()); var n = Object.keys(e).length; if (!n) return r(null); t || (t = n); var i = {}, o = 0, a = !1, u = !1, s = Object.create(null), f = [], l = [], c = {}; function h(e, t) { f.push((() => function(e, t) { if (!u) { var n = S(((t, ...n) => { if (o--, !1 !== t) if (n.length < 2 && ([n] = n), t) { var f = {}; if (Object.keys(i).forEach((e => { f[e] = i[e] })), f[e] = n, u = !0, s = Object.create(null), a) return; r(t, f) } else i[e] = n, (s[e] || []).forEach((e => e())), p(); else a = !0 })); o++; var f = y(t[t.length - 1]); t.length > 1 ? f(i, n) : f(n) } }(e, t))) } function p() { if (!a) { if (0 === f.length && 0 === o) return r(null, i); for (; f.length && o < t;) f.shift()() } } function d(t) { var r = []; return Object.keys(e).forEach((n => { const i = e[n]; Array.isArray(i) && i.indexOf(t) >= 0 && r.push(n) })), r } return Object.keys(e).forEach((t => { var r = e[t]; if (!Array.isArray(r)) return h(t, [r]), void l.push(t); var n = r.slice(0, r.length - 1), i = n.length; if (0 === i) return h(t, r), void l.push(t); c[t] = i, n.forEach((o => { if (!e[o]) throw new Error("async.auto task `" + t + "` has a non-existent dependency `" + o + "` in " + n.join(", ")); var a, u; (u = s[a = o]) || (u = s[a] = []), u.push((() => { 0 == --i && h(t, r) })) })) })), function() { for (var e = 0; l.length;) e++, d(l.pop()).forEach((e => { 0 == --c[e] && l.push(e) })); if (e !== n) throw new Error("async.auto cannot execute tasks due to a recursive dependency") }(), p(), r[P] } var N = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/, D = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/, U = /,/, q = /(=.+)?(\s*)$/, F = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm; function W(e, t) { var r = {}; return Object.keys(e).forEach((t => { var n, i = e[t], o = d(i), a = !o && 1 === i.length || o && 0 === i.length; if (Array.isArray(i)) n = [...i], i = n.pop(), r[t] = n.concat(n.length > 0 ? u : i); else if (a) r[t] = i; else { if (n = function(e) { const t = e.toString().replace(F, ""); let r = t.match(N); if (r || (r = t.match(D)), !r) throw new Error("could not parse args in autoInject\nSource:\n" + t); let [, n] = r; return n.replace(/\s/g, "").split(U).map((e => e.replace(q, "").trim())) }(i), 0 === i.length && !o && 0 === n.length) throw new Error("autoInject task functions require explicit parameters."); o || n.pop(), r[t] = n.concat(u) } function u(e, t) { var r = n.map((t => e[t])); r.push(t), y(i)(...r) } })), B(r, t) } class z { constructor() { this.head = this.tail = null, this.length = 0 } removeLink(e) { return e.prev ? e.prev.next = e.next : this.head = e.next, e.next ? e.next.prev = e.prev : this.tail = e.prev, e.prev = e.next = null, this.length -= 1, e } empty() { for (; this.head;) this.shift(); return this } insertAfter(e, t) { t.prev = e, t.next = e.next, e.next ? e.next.prev = t : this.tail = t, e.next = t, this.length += 1 } insertBefore(e, t) { t.prev = e.prev, t.next = e, e.prev ? e.prev.next = t : this.head = t, e.prev = t, this.length += 1 } unshift(e) { this.head ? this.insertBefore(this.head, e) : K(this, e) } push(e) { this.tail ? this.insertAfter(this.tail, e) : K(this, e) } shift() { return this.head && this.removeLink(this.head) } pop() { return this.tail && this.removeLink(this.tail) } toArray() { return [...this] }*[Symbol.iterator]() { for (var e = this.head; e;) yield e.data, e = e.next } remove(e) { for (var t = this.head; t;) { var { next: r } = t; e(t) && this.removeLink(t), t = r } return this } } function K(e, t) { e.length = 1, e.head = e.tail = t } function G(e, t, r) { if (null == t) t = 1; else if (0 === t) throw new RangeError("Concurrency must not be zero"); var n = y(e), i = 0, o = []; const a = { error: [], drain: [], saturated: [], unsaturated: [], empty: [] }; function u(e, t) { return e ? t ? void(a[e] = a[e].filter((e => e !== t))) : a[e] = [] : Object.keys(a).forEach((e => a[e] = [])) } function s(e, ...t) { a[e].forEach((e => e(...t))) } var f = !1; function c(e, t, r, n) { if (null != n && "function" != typeof n) throw new Error("task callback must be a function"); var i, o; function a(e, ...t) { return e ? r ? o(e) : i() : t.length <= 1 ? i(t[0]) : void i(t) } v.started = !0; var u = { data: e, callback: r ? a : n || a }; if (t ? v._tasks.unshift(u) : v._tasks.push(u), f || (f = !0, l((() => { f = !1, v.process() }))), r || !n) return new Promise(((e, t) => { i = e, o = t })) } function h(e) { return function(t, ...r) { i -= 1; for (var n = 0, a = e.length; n < a; n++) { var u = e[n], f = o.indexOf(u); 0 === f ? o.shift() : f > 0 && o.splice(f, 1), u.callback(t, ...r), null != t && s("error", t, u.data) } i <= v.concurrency - v.buffer && s("unsaturated"), v.idle() && s("drain"), v.process() } } function p(e) { return !(0 !== e.length || !v.idle() || (l((() => s("drain"))), 0)) } const d = e => t => { if (!t) return new Promise(((t, r) => { ! function(e, n) { const i = (...n) => { u(e, i), ((e, n) => { if (e) return r(e); t(n) })(...n) }; a[e].push(i) }(e) })); u(e), function(e, t) { a[e].push(t) }(e, t) }; var g = !1, v = { _tasks: new z, *[Symbol.iterator]() { yield* v._tasks[Symbol.iterator]() }, concurrency: t, payload: r, buffer: t / 4, started: !1, paused: !1, push(e, t) { if (Array.isArray(e)) { if (p(e)) return; return e.map((e => c(e, !1, !1, t))) } return c(e, !1, !1, t) }, pushAsync(e, t) { if (Array.isArray(e)) { if (p(e)) return; return e.map((e => c(e, !1, !0, t))) } return c(e, !1, !0, t) }, kill() { u(), v._tasks.empty() }, unshift(e, t) { if (Array.isArray(e)) { if (p(e)) return; return e.map((e => c(e, !0, !1, t))) } return c(e, !0, !1, t) }, unshiftAsync(e, t) { if (Array.isArray(e)) { if (p(e)) return; return e.map((e => c(e, !0, !0, t))) } return c(e, !0, !0, t) }, remove(e) { v._tasks.remove(e) }, process() { if (!g) { for (g = !0; !v.paused && i < v.concurrency && v._tasks.length;) { var e = [], t = [], r = v._tasks.length; v.payload && (r = Math.min(r, v.payload)); for (var a = 0; a < r; a++) { var u = v._tasks.shift(); e.push(u), o.push(u), t.push(u.data) } i += 1, 0 === v._tasks.length && s("empty"), i === v.concurrency && s("saturated"); var f = S(h(e)); n(t, f) } g = !1 } }, length: () => v._tasks.length, running: () => i, workersList: () => o, idle: () => v._tasks.length + i === 0, pause() { v.paused = !0 }, resume() { !1 !== v.paused && (v.paused = !1, l(v.process)) } }; return Object.defineProperties(v, { saturated: { writable: !1, value: d("saturated") }, unsaturated: { writable: !1, value: d("unsaturated") }, empty: { writable: !1, value: d("empty") }, drain: { writable: !1, value: d("drain") }, error: { writable: !1, value: d("error") } }), v } function H(e, t) { return G(e, 1, t) } function V(e, t, r) { return G(e, t, r) } var Y = g((function(e, t, r, n) { n = _(n); var i = y(r); return M(e, ((e, r, n) => { i(t, e, ((e, r) => { t = r, n(e) })) }), (e => n(e, t))) }), 4); function Q(...e) { var t = e.map(y); return function(...e) { var r = this, n = e[e.length - 1]; return "function" == typeof n ? e.pop() : n = I(), Y(t, e, ((e, t, n) => { t.apply(r, e.concat(((e, ...t) => { n(e, t) }))) }), ((e, t) => n(e, ...t))), n[P] } } function X(...e) { return Q(...e.reverse()) } var $ = g((function(e, t, r, n) { return m(R(t), e, r, n) }), 4), J = g((function(e, t, r, n) { var i = y(r); return $(e, t, ((e, t) => { i(e, ((e, ...r) => e ? t(e) : t(e, r))) }), ((e, t) => { for (var r = [], i = 0; i < t.length; i++) t[i] && (r = r.concat(...t[i])); return n(e, r) })) }), 4), Z = g((function(e, t, r) { return J(e, 1 / 0, t, r) }), 3), ee = g((function(e, t, r) { return J(e, 1, t, r) }), 3); function te(...e) { return function(...t) { return t.pop()(null, ...e) } } function re(e, t) { return (r, n, i, o) => { var a, u = !1; const s = y(i); r(n, ((r, n, i) => { s(r, ((n, o) => n || !1 === n ? i(n) : e(o) && !a ? (u = !0, a = t(!0, r), i(null, w)) : void i())) }), (e => { if (e) return o(e); o(null, u ? a : t(!1)) })) } } var ne = g((function(e, t, r) { return re((e => e), ((e, t) => t))(L, e, t, r) }), 3), ie = g((function(e, t, r, n) { return re((e => e), ((e, t) => t))(R(t), e, r, n) }), 4), oe = g((function(e, t, r) { return re((e => e), ((e, t) => t))(R(1), e, t, r) }), 3); function ae(e) { return (t, ...r) => y(t)(...r, ((t, ...r) => { "object" == typeof console && (t ? console.error && console.error(t) : console[e] && r.forEach((t => console[e](t)))) })) } var ue = ae("dir"), se = g((function(e, t, r) { r = S(r); var n, i = y(e), o = y(t); function a(e, ...t) { if (e) return r(e); !1 !== e && (n = t, o(...t, u)) } function u(e, t) { return e ? r(e) : !1 !== e ? t ? void i(a) : r(null, ...n) : void 0 } return u(null, !0) }), 3); function fe(e, t, r) { const n = y(t); return se(e, ((...e) => { const t = e.pop(); n(...e, ((e, r) => t(e, !r))) }), r) } function le(e) { return (t, r, n) => e(t, n) } var ce = g((function(e, t, r) { return L(e, le(y(t)), r) }), 3), he = g((function(e, t, r, n) { return R(t)(e, le(y(r)), n) }), 4), pe = g((function(e, t, r) { return he(e, 1, t, r) }), 3); function de(e) { return d(e) ? e : function(...t) { var r = t.pop(), n = !0; t.push(((...e) => { n ? l((() => r(...e))) : r(...e) })), e.apply(this, t), n = !1 } } var ye = g((function(e, t, r) { return re((e => !e), (e => !e))(L, e, t, r) }), 3), ge = g((function(e, t, r, n) { return re((e => !e), (e => !e))(R(t), e, r, n) }), 4), ve = g((function(e, t, r) { return re((e => !e), (e => !e))(M, e, t, r) }), 3); function me(e, t, r, n) { var i = new Array(t.length); e(t, ((e, t, n) => { r(e, ((e, r) => { i[t] = !!r, n(e) })) }), (e => { if (e) return n(e); for (var r = [], o = 0; o < t.length; o++) i[o] && r.push(t[o]); n(null, r) })) } function be(e, t, r, n) { var i = []; e(t, ((e, t, n) => { r(e, ((r, o) => { if (r) return n(r); o && i.push({ index: t, value: e }), n(r) })) }), (e => { if (e) return n(e); n(null, i.sort(((e, t) => e.index - t.index)).map((e => e.value))) })) } function we(e, t, r, n) { return (b(t) ? me : be)(e, t, y(r), n) } var _e = g((function(e, t, r) { return we(L, e, t, r) }), 3), Se = g((function(e, t, r, n) { return we(R(t), e, r, n) }), 4), Ee = g((function(e, t, r) { return we(M, e, t, r) }), 3), Re = g((function(e, t) { var r = S(t), n = y(de(e)); return function e(t) { if (t) return r(t); !1 !== t && n(e) }() }), 2), Te = g((function(e, t, r, n) { var i = y(r); return $(e, t, ((e, t) => { i(e, ((r, n) => r ? t(r) : t(r, { key: n, val: e }))) }), ((e, t) => { for (var r = {}, { hasOwnProperty: i } = Object.prototype, o = 0; o < t.length; o++) if (t[o]) { var { key: a } = t[o], { val: u } = t[o]; i.call(r, a) ? r[a].push(u) : r[a] = [u] } return n(e, r) })) }), 4); function Ae(e, t, r) { return Te(e, 1 / 0, t, r) } function ke(e, t, r) { return Te(e, 1, t, r) } var Le = ae("log"), Oe = g((function(e, t, r, n) { n = _(n); var i = {}, o = y(r); return R(t)(e, ((e, t, r) => { o(e, t, ((e, n) => { if (e) return r(e); i[t] = n, r(e) })) }), (e => n(e, i))) }), 4); function xe(e, t, r) { return Oe(e, 1 / 0, t, r) } function Me(e, t, r) { return Oe(e, 1, t, r) } function Ce(e, t = (e => e)) { var r = Object.create(null), n = Object.create(null), i = y(e), a = o(((e, o) => { var a = t(...e); a in r ? l((() => o(null, ...r[a]))) : a in n ? n[a].push(o) : (n[a] = [o], i(...e, ((e, ...t) => { e || (r[a] = t); var i = n[a]; delete n[a]; for (var o = 0, u = i.length; o < u; o++) i[o](e, ...t) }))) })); return a.memo = r, a.unmemoized = e, a } var je = f(u ? n.nextTick : a ? setImmediate : s), Pe = g(((e, t, r) => { var n = b(t) ? [] : {}; e(t, ((e, t, r) => { y(e)(((e, ...i) => { i.length < 2 && ([i] = i), n[t] = i, r(e) })) }), (e => r(e, n))) }), 3); function Ie(e, t) { return Pe(L, e, t) } function Be(e, t, r) { return Pe(R(t), e, r) } function Ne(e, t) { var r = y(e); return G(((e, t) => { r(e[0], t) }), t, 1) } class De { constructor() { this.heap = [], this.pushCount = Number.MIN_SAFE_INTEGER } get length() { return this.heap.length } empty() { return this.heap = [], this } percUp(e) { let t; for (; e > 0 && qe(this.heap[e], this.heap[t = Ue(e)]);) { let r = this.heap[e]; this.heap[e] = this.heap[t], this.heap[t] = r, e = t } } percDown(e) { let t; for (; (t = 1 + (e << 1)) < this.heap.length && (t + 1 < this.heap.length && qe(this.heap[t + 1], this.heap[t]) && (t += 1), !qe(this.heap[e], this.heap[t]));) { let r = this.heap[e]; this.heap[e] = this.heap[t], this.heap[t] = r, e = t } } push(e) { e.pushCount = ++this.pushCount, this.heap.push(e), this.percUp(this.heap.length - 1) } unshift(e) { return this.heap.push(e) } shift() { let [e] = this.heap; return this.heap[0] = this.heap[this.heap.length - 1], this.heap.pop(), this.percDown(0), e } toArray() { return [...this] }*[Symbol.iterator]() { for (let e = 0; e < this.heap.length; e++) yield this.heap[e].data } remove(e) { let t = 0; for (let r = 0; r < this.heap.length; r++) e(this.heap[r]) || (this.heap[t] = this.heap[r], t++); this.heap.splice(t); for (let e = Ue(this.heap.length - 1); e >= 0; e--) this.percDown(e); return this } } function Ue(e) { return (e + 1 >> 1) - 1 } function qe(e, t) { return e.priority !== t.priority ? e.priority < t.priority : e.pushCount < t.pushCount } function Fe(e, t) { var r = Ne(e, t); return r._tasks = new De, r.push = function(e, t = 0, n = (() => {})) { if ("function" != typeof n) throw new Error("task callback must be a function"); if (r.started = !0, Array.isArray(e) || (e = [e]), 0 === e.length && r.idle()) return l((() => r.drain())); for (var i = 0, o = e.length; i < o; i++) { var a = { data: e[i], priority: t, callback: n }; r._tasks.push(a) } l(r.process) }, delete r.unshift, r } var We = g((function(e, t) { if (t = _(t), !Array.isArray(e)) return t(new TypeError("First argument to race must be an array of functions")); if (!e.length) return t(); for (var r = 0, n = e.length; r < n; r++) y(e[r])(t) }), 2); function ze(e, t, r, n) { var i = [...e].reverse(); return Y(i, t, r, n) } function Ke(e) { var t = y(e); return o((function(e, r) { return e.push(((e, ...t) => { let n = {}; if (e && (n.error = e), t.length > 0) { var i = t; t.length <= 1 && ([i] = t), n.value = i } r(null, n) })), t.apply(this, e) })) } function Ge(e) { var t; return Array.isArray(e) ? t = e.map(Ke) : (t = {}, Object.keys(e).forEach((r => { t[r] = Ke.call(this, e[r]) }))), t } function He(e, t, r, n) { const i = y(r); return we(e, t, ((e, t) => { i(e, ((e, r) => { t(e, !r) })) }), n) } var Ve = g((function(e, t, r) { return He(L, e, t, r) }), 3), Ye = g((function(e, t, r, n) { return He(R(t), e, r, n) }), 4), Qe = g((function(e, t, r) { return He(M, e, t, r) }), 3); function Xe(e) { return function() { return e } } function $e(e, t, r) { var n = { times: 5, intervalFunc: Xe(0) }; if (arguments.length < 3 && "function" == typeof e ? (r = t || I(), t = e) : (Je(n, e), r = r || I()), "function" != typeof t) throw new Error("Invalid arguments for async.retry"); var i = y(t), o = 1; function a() { i(((e, ...t) => { !1 !== e && (e && o++ < n.times && ("function" != typeof n.errorFilter || n.errorFilter(e)) ? setTimeout(a, n.intervalFunc(o - 1)) : r(e, ...t)) })) } return a(), r[P] } function Je(e, t) { if ("object" == typeof t) e.times = +t.times || 5, e.intervalFunc = "function" == typeof t.interval ? t.interval : Xe(+t.interval || 0), e.errorFilter = t.errorFilter; else { if ("number" != typeof t && "string" != typeof t) throw new Error("Invalid arguments for async.retry"); e.times = +t || 5 } } function Ze(e, t) { t || (t = e, e = null); let r = e && e.arity || t.length; d(t) && (r += 1); var n = y(t); return o(((t, i) => { function o(e) { n(...t, e) } return (t.length < r - 1 || null == i) && (t.push(i), i = I()), e ? $e(e, o, i) : $e(o, i), i[P] })) } function et(e, t) { return Pe(M, e, t) } var tt = g((function(e, t, r) { return re(Boolean, (e => e))(L, e, t, r) }), 3), rt = g((function(e, t, r, n) { return re(Boolean, (e => e))(R(t), e, r, n) }), 4), nt = g((function(e, t, r) { return re(Boolean, (e => e))(M, e, t, r) }), 3), it = g((function(e, t, r) { var n = y(t); return O(e, ((e, t) => { n(e, ((r, n) => { if (r) return t(r); t(r, { value: e, criteria: n }) })) }), ((e, t) => { if (e) return r(e); r(null, t.sort(i).map((e => e.value))) })); function i(e, t) { var r = e.criteria, n = t.criteria; return r < n ? -1 : r > n ? 1 : 0 } }), 3); function ot(e, t, r) { var n = y(e); return o(((i, o) => { var a, u = !1; i.push(((...e) => { u || (o(...e), clearTimeout(a)) })), a = setTimeout((function() { var t = e.name || "anonymous", n = new Error('Callback function "' + t + '" timed out.'); n.code = "ETIMEDOUT", r && (n.info = r), u = !0, o(n) }), t), n(...i) })) } function at(e, t, r, n) { var i = y(r); return $(function(e) { for (var t = Array(e); e--;) t[e] = e; return t }(e), t, i, n) } function ut(e, t, r) { return at(e, 1 / 0, t, r) } function st(e, t, r) { return at(e, 1, t, r) } function ft(e, t, r, n) { arguments.length <= 3 && "function" == typeof t && (n = r, r = t, t = Array.isArray(e) ? [] : {}), n = _(n || I()); var i = y(r); return L(e, ((e, r, n) => { i(t, e, r, n) }), (e => n(e, t))), n[P] } var lt = g((function(e, t) { var r, n = null; return pe(e, ((e, t) => { y(e)(((e, ...i) => { if (!1 === e) return t(e); i.length < 2 ? [r] = i : r = i, n = e, t(e ? null : {}) })) }), (() => t(n, r))) })); function ct(e) { return (...t) => (e.unmemoized || e)(...t) } var ht = g((function(e, t, r) { r = S(r); var n = y(t), i = y(e), o = []; function a(e, ...t) { if (e) return r(e); o = t, !1 !== e && i(u) } function u(e, t) { return e ? r(e) : !1 !== e ? t ? void n(a) : r(null, ...o) : void 0 } return i(u) }), 3); function pt(e, t, r) { const n = y(e); return ht((e => n(((t, r) => e(t, !r)))), t, r) } var dt = g((function(e, t) { if (t = _(t), !Array.isArray(e)) return t(new Error("First argument to waterfall must be an array of functions")); if (!e.length) return t(); var r = 0; function n(t) { y(e[r++])(...t, S(i)) } function i(i, ...o) { if (!1 !== i) return i || r === e.length ? t(i, ...o) : void n(o) } n([]) })); const yt = { apply: i, applyEach: x, applyEachSeries: j, asyncify: c, auto: B, autoInject: W, cargo: H, cargoQueue: V, compose: X, concat: Z, concatLimit: J, concatSeries: ee, constant: te, detect: ne, detectLimit: ie, detectSeries: oe, dir: ue, doUntil: fe, doWhilst: se, each: ce, eachLimit: he, eachOf: L, eachOfLimit: T, eachOfSeries: M, eachSeries: pe, ensureAsync: de, every: ye, everyLimit: ge, everySeries: ve, filter: _e, filterLimit: Se, filterSeries: Ee, forever: Re, groupBy: Ae, groupByLimit: Te, groupBySeries: ke, log: Le, map: O, mapLimit: $, mapSeries: C, mapValues: xe, mapValuesLimit: Oe, mapValuesSeries: Me, memoize: Ce, nextTick: je, parallel: Ie, parallelLimit: Be, priorityQueue: Fe, queue: Ne, race: We, reduce: Y, reduceRight: ze, reflect: Ke, reflectAll: Ge, reject: Ve, rejectLimit: Ye, rejectSeries: Qe, retry: $e, retryable: Ze, seq: Q, series: et, setImmediate: l, some: tt, someLimit: rt, someSeries: nt, sortBy: it, timeout: ot, times: ut, timesLimit: at, timesSeries: st, transform: ft, tryEach: lt, unmemoize: ct, until: pt, waterfall: dt, whilst: ht, all: ye, allLimit: ge, allSeries: ve, any: tt, anyLimit: rt, anySeries: nt, find: ne, findLimit: ie, findSeries: oe, flatMap: Z, flatMapLimit: J, flatMapSeries: ee, forEach: ce, forEachSeries: pe, forEachLimit: he, forEachOf: L, forEachOfSeries: M, forEachOfLimit: T, inject: Y, foldl: Y, foldr: ze, select: _e, selectLimit: Se, selectSeries: Ee, wrapSync: c, during: ht, doDuring: se } }, 742: (e, t) => { "use strict"; t.byteLength = function(e) { var t = s(e), r = t[0], n = t[1]; return 3 * (r + n) / 4 - n }, t.toByteArray = function(e) { var t, r, o = s(e), a = o[0], u = o[1], f = new i(function(e, t, r) { return 3 * (t + r) / 4 - r }(0, a, u)), l = 0, c = u > 0 ? a - 4 : a; for (r = 0; r < c; r += 4) t = n[e.charCodeAt(r)] << 18 | n[e.charCodeAt(r + 1)] << 12 | n[e.charCodeAt(r + 2)] << 6 | n[e.charCodeAt(r + 3)], f[l++] = t >> 16 & 255, f[l++] = t >> 8 & 255, f[l++] = 255 & t; return 2 === u && (t = n[e.charCodeAt(r)] << 2 | n[e.charCodeAt(r + 1)] >> 4, f[l++] = 255 & t), 1 === u && (t = n[e.charCodeAt(r)] << 10 | n[e.charCodeAt(r + 1)] << 4 | n[e.charCodeAt(r + 2)] >> 2, f[l++] = t >> 8 & 255, f[l++] = 255 & t), f }, t.fromByteArray = function(e) { for (var t, n = e.length, i = n % 3, o = [], a = 16383, u = 0, s = n - i; u < s; u += a) o.push(f(e, u, u + a > s ? s : u + a)); return 1 === i ? (t = e[n - 1], o.push(r[t >> 2] + r[t << 4 & 63] + "==")) : 2 === i && (t = (e[n - 2] << 8) + e[n - 1], o.push(r[t >> 10] + r[t >> 4 & 63] + r[t << 2 & 63] + "=")), o.join("") }; for (var r = [], n = [], i = "undefined" != typeof Uint8Array ? Uint8Array : Array, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, u = o.length; a < u; ++a) r[a] = o[a], n[o.charCodeAt(a)] = a; function s(e) { var t = e.length; if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); var r = e.indexOf("="); return -1 === r && (r = t), [r, r === t ? 0 : 4 - r % 4] } function f(e, t, n) { for (var i, o, a = [], u = t; u < n; u += 3) i = (e[u] << 16 & 16711680) + (e[u + 1] << 8 & 65280) + (255 & e[u + 2]), a.push(r[(o = i) >> 18 & 63] + r[o >> 12 & 63] + r[o >> 6 & 63] + r[63 & o]); return a.join("") } n["-".charCodeAt(0)] = 62, n["_".charCodeAt(0)] = 63 }, 764: (e, t, r) => { "use strict"; var n = r(742), i = r(645), o = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null; t.Buffer = s, t.SlowBuffer = function(e) { return +e != e && (e = 0), s.alloc(+e) }, t.INSPECT_MAX_BYTES = 50; var a = 2147483647; function u(e) { if (e > a) throw new RangeError('The value "' + e + '" is invalid for option "size"'); var t = new Uint8Array(e); return Object.setPrototypeOf(t, s.prototype), t } function s(e, t, r) { if ("number" == typeof e) { if ("string" == typeof t) throw new TypeError('The "string" argument must be of type string. Received type number'); return c(e) } return f(e, t, r) } function f(e, t, r) { if ("string" == typeof e) return function(e, t) { if ("string" == typeof t && "" !== t || (t = "utf8"), !s.isEncoding(t)) throw new TypeError("Unknown encoding: " + t); var r = 0 | y(e, t), n = u(r), i = n.write(e, t); return i !== r && (n = n.slice(0, i)), n }(e, t); if (ArrayBuffer.isView(e)) return h(e); if (null == e) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e); if (W(e, ArrayBuffer) || e && W(e.buffer, ArrayBuffer)) return p(e, t, r); if ("undefined" != typeof SharedArrayBuffer && (W(e, SharedArrayBuffer) || e && W(e.buffer, SharedArrayBuffer))) return p(e, t, r); if ("number" == typeof e) throw new TypeError('The "value" argument must not be of type number. Received type number'); var n = e.valueOf && e.valueOf(); if (null != n && n !== e) return s.from(n, t, r); var i = function(e) { if (s.isBuffer(e)) { var t = 0 | d(e.length), r = u(t); return 0 === r.length || e.copy(r, 0, 0, t), r } return void 0 !== e.length ? "number" != typeof e.length || z(e.length) ? u(0) : h(e) : "Buffer" === e.type && Array.isArray(e.data) ? h(e.data) : void 0 }(e); if (i) return i; if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) return s.from(e[Symbol.toPrimitive]("string"), t, r); throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e) } function l(e) { if ("number" != typeof e) throw new TypeError('"size" argument must be of type number'); if (e < 0) throw new RangeError('The value "' + e + '" is invalid for option "size"') } function c(e) { return l(e), u(e < 0 ? 0 : 0 | d(e)) } function h(e) { for (var t = e.length < 0 ? 0 : 0 | d(e.length), r = u(t), n = 0; n < t; n += 1) r[n] = 255 & e[n]; return r } function p(e, t, r) { if (t < 0 || e.byteLength < t) throw new RangeError('"offset" is outside of buffer bounds'); if (e.byteLength < t + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); var n; return n = void 0 === t && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, t) : new Uint8Array(e, t, r), Object.setPrototypeOf(n, s.prototype), n } function d(e) { if (e >= a) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes"); return 0 | e } function y(e, t) { if (s.isBuffer(e)) return e.length; if (ArrayBuffer.isView(e) || W(e, ArrayBuffer)) return e.byteLength; if ("string" != typeof e) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e); var r = e.length, n = arguments.length > 2 && !0 === arguments[2]; if (!n && 0 === r) return 0; for (var i = !1;;) switch (t) { case "ascii": case "latin1": case "binary": return r; case "utf8": case "utf-8": return U(e).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return 2 * r; case "hex": return r >>> 1; case "base64": return q(e).length; default: if (i) return n ? -1 : U(e).length; t = ("" + t).toLowerCase(), i = !0 } } function g(e, t, r) { var n = !1; if ((void 0 === t || t < 0) && (t = 0), t > this.length) return ""; if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return ""; if ((r >>>= 0) <= (t >>>= 0)) return ""; for (e || (e = "utf8");;) switch (e) { case "hex": return M(this, t, r); case "utf8": case "utf-8": return k(this, t, r); case "ascii": return O(this, t, r); case "latin1": case "binary": return x(this, t, r); case "base64": return A(this, t, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return C(this, t, r); default: if (n) throw new TypeError("Unknown encoding: " + e); e = (e + "").toLowerCase(), n = !0 } } function v(e, t, r) { var n = e[t]; e[t] = e[r], e[r] = n } function m(e, t, r, n, i) { if (0 === e.length) return -1; if ("string" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), z(r = +r) && (r = i ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) { if (i) return -1; r = e.length - 1 } else if (r < 0) { if (!i) return -1; r = 0 } if ("string" == typeof t && (t = s.from(t, n)), s.isBuffer(t)) return 0 === t.length ? -1 : b(e, t, r, n, i); if ("number" == typeof t) return t &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : b(e, [t], r, n, i); throw new TypeError("val must be string, number or Buffer") } function b(e, t, r, n, i) { var o, a = 1, u = e.length, s = t.length; if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) { if (e.length < 2 || t.length < 2) return -1; a = 2, u /= 2, s /= 2, r /= 2 } function f(e, t) { return 1 === a ? e[t] : e.readUInt16BE(t * a) } if (i) { var l = -1; for (o = r; o < u; o++) if (f(e, o) === f(t, -1 === l ? 0 : o - l)) { if (-1 === l && (l = o), o - l + 1 === s) return l * a } else - 1 !== l && (o -= o - l), l = -1 } else for (r + s > u && (r = u - s), o = r; o >= 0; o--) { for (var c = !0, h = 0; h < s; h++) if (f(e, o + h) !== f(t, h)) { c = !1; break } if (c) return o } return -1 } function w(e, t, r, n) { r = Number(r) || 0; var i = e.length - r; n ? (n = Number(n)) > i && (n = i) : n = i; var o = t.length; n > o / 2 && (n = o / 2); for (var a = 0; a < n; ++a) { var u = parseInt(t.substr(2 * a, 2), 16); if (z(u)) return a; e[r + a] = u } return a } function _(e, t, r, n) { return F(U(t, e.length - r), e, r, n) } function S(e, t, r, n) { return F(function(e) { for (var t = [], r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r)); return t }(t), e, r, n) } function E(e, t, r, n) { return S(e, t, r, n) } function R(e, t, r, n) { return F(q(t), e, r, n) } function T(e, t, r, n) { return F(function(e, t) { for (var r, n, i, o = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) n = (r = e.charCodeAt(a)) >> 8, i = r % 256, o.push(i), o.push(n); return o }(t, e.length - r), e, r, n) } function A(e, t, r) { return 0 === t && r === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, r)) } function k(e, t, r) { r = Math.min(e.length, r); for (var n = [], i = t; i < r;) { var o, a, u, s, f = e[i], l = null, c = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1; if (i + c <= r) switch (c) { case 1: f < 128 && (l = f); break; case 2: 128 == (192 & (o = e[i + 1])) && (s = (31 & f) << 6 | 63 & o) > 127 && (l = s); break; case 3: o = e[i + 1], a = e[i + 2], 128 == (192 & o) && 128 == (192 & a) && (s = (15 & f) << 12 | (63 & o) << 6 | 63 & a) > 2047 && (s < 55296 || s > 57343) && (l = s); break; case 4: o = e[i + 1], a = e[i + 2], u = e[i + 3], 128 == (192 & o) && 128 == (192 & a) && 128 == (192 & u) && (s = (15 & f) << 18 | (63 & o) << 12 | (63 & a) << 6 | 63 & u) > 65535 && s < 1114112 && (l = s) } null === l ? (l = 65533, c = 1) : l > 65535 && (l -= 65536, n.push(l >>> 10 & 1023 | 55296), l = 56320 | 1023 & l), n.push(l), i += c } return function(e) { var t = e.length; if (t <= L) return String.fromCharCode.apply(String, e); for (var r = "", n = 0; n < t;) r += String.fromCharCode.apply(String, e.slice(n, n += L)); return r }(n) } t.kMaxLength = a, s.TYPED_ARRAY_SUPPORT = function() { try { var e = new Uint8Array(1), t = { foo: function() { return 42 } }; return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), 42 === e.foo() } catch (e) { return !1 } }(), s.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || 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."), Object.defineProperty(s.prototype, "parent", { enumerable: !0, get: function() { if (s.isBuffer(this)) return this.buffer } }), Object.defineProperty(s.prototype, "offset", { enumerable: !0, get: function() { if (s.isBuffer(this)) return this.byteOffset } }), s.poolSize = 8192, s.from = function(e, t, r) { return f(e, t, r) }, Object.setPrototypeOf(s.prototype, Uint8Array.prototype), Object.setPrototypeOf(s, Uint8Array), s.alloc = function(e, t, r) { return function(e, t, r) { return l(e), e <= 0 ? u(e) : void 0 !== t ? "string" == typeof r ? u(e).fill(t, r) : u(e).fill(t) : u(e) }(e, t, r) }, s.allocUnsafe = function(e) { return c(e) }, s.allocUnsafeSlow = function(e) { return c(e) }, s.isBuffer = function(e) { return null != e && !0 === e._isBuffer && e !== s.prototype }, s.compare = function(e, t) { if (W(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), W(t, Uint8Array) && (t = s.from(t, t.offset, t.byteLength)), !s.isBuffer(e) || !s.isBuffer(t)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (e === t) return 0; for (var r = e.length, n = t.length, i = 0, o = Math.min(r, n); i < o; ++i) if (e[i] !== t[i]) { r = e[i], n = t[i]; break } return r < n ? -1 : n < r ? 1 : 0 }, s.isEncoding = function(e) { switch (String(e).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 } }, s.concat = function(e, t) { if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers'); if (0 === e.length) return s.alloc(0); var r; if (void 0 === t) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length; var n = s.allocUnsafe(t), i = 0; for (r = 0; r < e.length; ++r) { var o = e[r]; if (W(o, Uint8Array) && (o = s.from(o)), !s.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers'); o.copy(n, i), i += o.length } return n }, s.byteLength = y, s.prototype._isBuffer = !0, s.prototype.swap16 = function() { var e = this.length; if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var t = 0; t < e; t += 2) v(this, t, t + 1); return this }, s.prototype.swap32 = function() { var e = this.length; if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var t = 0; t < e; t += 4) v(this, t, t + 3), v(this, t + 1, t + 2); return this }, s.prototype.swap64 = function() { var e = this.length; if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var t = 0; t < e; t += 8) v(this, t, t + 7), v(this, t + 1, t + 6), v(this, t + 2, t + 5), v(this, t + 3, t + 4); return this }, s.prototype.toString = function() { var e = this.length; return 0 === e ? "" : 0 === arguments.length ? k(this, 0, e) : g.apply(this, arguments) }, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(e) { if (!s.isBuffer(e)) throw new TypeError("Argument must be a Buffer"); return this === e || 0 === s.compare(this, e) }, s.prototype.inspect = function() { var e = "", r = t.INSPECT_MAX_BYTES; return e = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (e += " ... "), "" }, o && (s.prototype[o] = s.prototype.inspect), s.prototype.compare = function(e, t, r, n, i) { if (W(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), !s.isBuffer(e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); if (void 0 === t && (t = 0), void 0 === r && (r = e ? e.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), t < 0 || r > e.length || n < 0 || i > this.length) throw new RangeError("out of range index"); if (n >= i && t >= r) return 0; if (n >= i) return -1; if (t >= r) return 1; if (this === e) return 0; for (var o = (i >>>= 0) - (n >>>= 0), a = (r >>>= 0) - (t >>>= 0), u = Math.min(o, a), f = this.slice(n, i), l = e.slice(t, r), c = 0; c < u; ++c) if (f[c] !== l[c]) { o = f[c], a = l[c]; break } return o < a ? -1 : a < o ? 1 : 0 }, s.prototype.includes = function(e, t, r) { return -1 !== this.indexOf(e, t, r) }, s.prototype.indexOf = function(e, t, r) { return m(this, e, t, r, !0) }, s.prototype.lastIndexOf = function(e, t, r) { return m(this, e, t, r, !1) }, s.prototype.write = function(e, t, r, n) { if (void 0 === t) n = "utf8", r = this.length, t = 0; else if (void 0 === r && "string" == typeof t) n = t, r = this.length, t = 0; else { if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0) } var i = this.length - t; if ((void 0 === r || r > i) && (r = i), e.length > 0 && (r < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds"); n || (n = "utf8"); for (var o = !1;;) switch (n) { case "hex": return w(this, e, t, r); case "utf8": case "utf-8": return _(this, e, t, r); case "ascii": return S(this, e, t, r); case "latin1": case "binary": return E(this, e, t, r); case "base64": return R(this, e, t, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return T(this, e, t, r); default: if (o) throw new TypeError("Unknown encoding: " + n); n = ("" + n).toLowerCase(), o = !0 } }, s.prototype.toJSON = function() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) } }; var L = 4096; function O(e, t, r) { var n = ""; r = Math.min(e.length, r); for (var i = t; i < r; ++i) n += String.fromCharCode(127 & e[i]); return n } function x(e, t, r) { var n = ""; r = Math.min(e.length, r); for (var i = t; i < r; ++i) n += String.fromCharCode(e[i]); return n } function M(e, t, r) { var n = e.length; (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n); for (var i = "", o = t; o < r; ++o) i += K[e[o]]; return i } function C(e, t, r) { for (var n = e.slice(t, r), i = "", o = 0; o < n.length; o += 2) i += String.fromCharCode(n[o] + 256 * n[o + 1]); return i } function j(e, t, r) { if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint"); if (e + t > r) throw new RangeError("Trying to access beyond buffer length") } function P(e, t, r, n, i, o) { if (!s.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (t > i || t < o) throw new RangeError('"value" argument is out of bounds'); if (r + n > e.length) throw new RangeError("Index out of range") } function I(e, t, r, n, i, o) { if (r + n > e.length) throw new RangeError("Index out of range"); if (r < 0) throw new RangeError("Index out of range") } function B(e, t, r, n, o) { return t = +t, r >>>= 0, o || I(e, 0, r, 4), i.write(e, t, r, n, 23, 4), r + 4 } function N(e, t, r, n, o) { return t = +t, r >>>= 0, o || I(e, 0, r, 8), i.write(e, t, r, n, 52, 8), r + 8 } s.prototype.slice = function(e, t) { var r = this.length; (e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), (t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e); var n = this.subarray(e, t); return Object.setPrototypeOf(n, s.prototype), n }, s.prototype.readUIntLE = function(e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);) n += this[e + o] * i; return n }, s.prototype.readUIntBE = function(e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e + --t], i = 1; t > 0 && (i *= 256);) n += this[e + --t] * i; return n }, s.prototype.readUInt8 = function(e, t) { return e >>>= 0, t || j(e, 1, this.length), this[e] }, s.prototype.readUInt16LE = function(e, t) { return e >>>= 0, t || j(e, 2, this.length), this[e] | this[e + 1] << 8 }, s.prototype.readUInt16BE = function(e, t) { return e >>>= 0, t || j(e, 2, this.length), this[e] << 8 | this[e + 1] }, s.prototype.readUInt32LE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3] }, s.prototype.readUInt32BE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]) }, s.prototype.readIntLE = function(e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);) n += this[e + o] * i; return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n }, s.prototype.readIntBE = function(e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = t, i = 1, o = this[e + --n]; n > 0 && (i *= 256);) o += this[e + --n] * i; return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)), o }, s.prototype.readInt8 = function(e, t) { return e >>>= 0, t || j(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] }, s.prototype.readInt16LE = function(e, t) { e >>>= 0, t || j(e, 2, this.length); var r = this[e] | this[e + 1] << 8; return 32768 & r ? 4294901760 | r : r }, s.prototype.readInt16BE = function(e, t) { e >>>= 0, t || j(e, 2, this.length); var r = this[e + 1] | this[e] << 8; return 32768 & r ? 4294901760 | r : r }, s.prototype.readInt32LE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24 }, s.prototype.readInt32BE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3] }, s.prototype.readFloatLE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), i.read(this, e, !0, 23, 4) }, s.prototype.readFloatBE = function(e, t) { return e >>>= 0, t || j(e, 4, this.length), i.read(this, e, !1, 23, 4) }, s.prototype.readDoubleLE = function(e, t) { return e >>>= 0, t || j(e, 8, this.length), i.read(this, e, !0, 52, 8) }, s.prototype.readDoubleBE = function(e, t) { return e >>>= 0, t || j(e, 8, this.length), i.read(this, e, !1, 52, 8) }, s.prototype.writeUIntLE = function(e, t, r, n) { e = +e, t >>>= 0, r >>>= 0, n || P(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); var i = 1, o = 0; for (this[t] = 255 & e; ++o < r && (i *= 256);) this[t + o] = e / i & 255; return t + r }, s.prototype.writeUIntBE = function(e, t, r, n) { e = +e, t >>>= 0, r >>>= 0, n || P(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); var i = r - 1, o = 1; for (this[t + i] = 255 & e; --i >= 0 && (o *= 256);) this[t + i] = e / o & 255; return t + r }, s.prototype.writeUInt8 = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1 }, s.prototype.writeUInt16LE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2 }, s.prototype.writeUInt16BE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2 }, s.prototype.writeUInt32LE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4 }, s.prototype.writeUInt32BE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4 }, s.prototype.writeIntLE = function(e, t, r, n) { if (e = +e, t >>>= 0, !n) { var i = Math.pow(2, 8 * r - 1); P(this, e, t, r, i - 1, -i) } var o = 0, a = 1, u = 0; for (this[t] = 255 & e; ++o < r && (a *= 256);) e < 0 && 0 === u && 0 !== this[t + o - 1] && (u = 1), this[t + o] = (e / a >> 0) - u & 255; return t + r }, s.prototype.writeIntBE = function(e, t, r, n) { if (e = +e, t >>>= 0, !n) { var i = Math.pow(2, 8 * r - 1); P(this, e, t, r, i - 1, -i) } var o = r - 1, a = 1, u = 0; for (this[t + o] = 255 & e; --o >= 0 && (a *= 256);) e < 0 && 0 === u && 0 !== this[t + o + 1] && (u = 1), this[t + o] = (e / a >> 0) - u & 255; return t + r }, s.prototype.writeInt8 = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1 }, s.prototype.writeInt16LE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2 }, s.prototype.writeInt16BE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2 }, s.prototype.writeInt32LE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4 }, s.prototype.writeInt32BE = function(e, t, r) { return e = +e, t >>>= 0, r || P(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4 }, s.prototype.writeFloatLE = function(e, t, r) { return B(this, e, t, !0, r) }, s.prototype.writeFloatBE = function(e, t, r) { return B(this, e, t, !1, r) }, s.prototype.writeDoubleLE = function(e, t, r) { return N(this, e, t, !0, r) }, s.prototype.writeDoubleBE = function(e, t, r) { return N(this, e, t, !1, r) }, s.prototype.copy = function(e, t, r, n) { if (!s.isBuffer(e)) throw new TypeError("argument should be a Buffer"); if (r || (r = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < r && (n = r), n === r) return 0; if (0 === e.length || 0 === this.length) return 0; if (t < 0) throw new RangeError("targetStart out of bounds"); if (r < 0 || r >= this.length) throw new RangeError("Index out of range"); if (n < 0) throw new RangeError("sourceEnd out of bounds"); n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r); var i = n - r; if (this === e && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(t, r, n); else if (this === e && r < t && t < n) for (var o = i - 1; o >= 0; --o) e[o + t] = this[o + r]; else Uint8Array.prototype.set.call(e, this.subarray(r, n), t); return i }, s.prototype.fill = function(e, t, r, n) { if ("string" == typeof e) { if ("string" == typeof t ? (n = t, t = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string"); if ("string" == typeof n && !s.isEncoding(n)) throw new TypeError("Unknown encoding: " + n); if (1 === e.length) { var i = e.charCodeAt(0); ("utf8" === n && i < 128 || "latin1" === n) && (e = i) } } else "number" == typeof e ? e &= 255 : "boolean" == typeof e && (e = Number(e)); if (t < 0 || this.length < t || this.length < r) throw new RangeError("Out of range index"); if (r <= t) return this; var o; if (t >>>= 0, r = void 0 === r ? this.length : r >>> 0, e || (e = 0), "number" == typeof e) for (o = t; o < r; ++o) this[o] = e; else { var a = s.isBuffer(e) ? e : s.from(e, n), u = a.length; if (0 === u) throw new TypeError('The value "' + e + '" is invalid for argument "value"'); for (o = 0; o < r - t; ++o) this[o + t] = a[o % u] } return this }; var D = /[^+/0-9A-Za-z-_]/g; function U(e, t) { var r; t = t || 1 / 0; for (var n = e.length, i = null, o = [], a = 0; a < n; ++a) { if ((r = e.charCodeAt(a)) > 55295 && r < 57344) { if (!i) { if (r > 56319) { (t -= 3) > -1 && o.push(239, 191, 189); continue } if (a + 1 === n) { (t -= 3) > -1 && o.push(239, 191, 189); continue } i = r; continue } if (r < 56320) { (t -= 3) > -1 && o.push(239, 191, 189), i = r; continue } r = 65536 + (i - 55296 << 10 | r - 56320) } else i && (t -= 3) > -1 && o.push(239, 191, 189); if (i = null, r < 128) { if ((t -= 1) < 0) break; o.push(r) } else if (r < 2048) { if ((t -= 2) < 0) break; o.push(r >> 6 | 192, 63 & r | 128) } else if (r < 65536) { if ((t -= 3) < 0) break; o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128) } else { if (!(r < 1114112)) throw new Error("Invalid code point"); if ((t -= 4) < 0) break; o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128) } } return o } function q(e) { return n.toByteArray(function(e) { if ((e = (e = e.split("=")[0]).trim().replace(D, "")).length < 2) return ""; for (; e.length % 4 != 0;) e += "="; return e }(e)) } function F(e, t, r, n) { for (var i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i]; return i } function W(e, t) { return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name } function z(e) { return e != e } var K = function() { for (var e = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r) for (var n = 16 * r, i = 0; i < 16; ++i) t[n + i] = e[r] + e[i]; return t }() }, 187: e => { "use strict"; var t, r = "object" == typeof Reflect ? Reflect : null, n = r && "function" == typeof r.apply ? r.apply : function(e, t, r) { return Function.prototype.apply.call(e, t, r) }; t = r && "function" == typeof r.ownKeys ? r.ownKeys : Object.getOwnPropertySymbols ? function(e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)) } : function(e) { return Object.getOwnPropertyNames(e) }; var i = Number.isNaN || function(e) { return e != e }; function o() { o.init.call(this) } e.exports = o, e.exports.once = function(e, t) { return new Promise((function(r, n) { function i() { void 0 !== o && e.removeListener("error", o), r([].slice.call(arguments)) } var o; "error" !== t && (o = function(r) { e.removeListener(t, i), n(r) }, e.once("error", o)), e.once(t, i) })) }, o.EventEmitter = o, o.prototype._events = void 0, o.prototype._eventsCount = 0, o.prototype._maxListeners = void 0; var a = 10; function u(e) { if ("function" != typeof e) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e) } function s(e) { return void 0 === e._maxListeners ? o.defaultMaxListeners : e._maxListeners } function f(e, t, r, n) { var i, o, a, f; if (u(r), void 0 === (o = e._events) ? (o = e._events = Object.create(null), e._eventsCount = 0) : (void 0 !== o.newListener && (e.emit("newListener", t, r.listener ? r.listener : r), o = e._events), a = o[t]), void 0 === a) a = o[t] = r, ++e._eventsCount; else if ("function" == typeof a ? a = o[t] = n ? [r, a] : [a, r] : n ? a.unshift(r) : a.push(r), (i = s(e)) > 0 && a.length > i && !a.warned) { a.warned = !0; var l = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit"); l.name = "MaxListenersExceededWarning", l.emitter = e, l.type = t, l.count = a.length, f = l, console && console.warn && console.warn(f) } return e } function l() { if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) } function c(e, t, r) { var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = l.bind(n); return i.listener = r, n.wrapFn = i, i } function h(e, t, r) { var n = e._events; if (void 0 === n) return []; var i = n[t]; return void 0 === i ? [] : "function" == typeof i ? r ? [i.listener || i] : [i] : r ? function(e) { for (var t = new Array(e.length), r = 0; r < t.length; ++r) t[r] = e[r].listener || e[r]; return t }(i) : d(i, i.length) } function p(e) { var t = this._events; if (void 0 !== t) { var r = t[e]; if ("function" == typeof r) return 1; if (void 0 !== r) return r.length } return 0 } function d(e, t) { for (var r = new Array(t), n = 0; n < t; ++n) r[n] = e[n]; return r } Object.defineProperty(o, "defaultMaxListeners", { enumerable: !0, get: function() { return a }, set: function(e) { if ("number" != typeof e || e < 0 || i(e)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + "."); a = e } }), o.init = function() { void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0 }, o.prototype.setMaxListeners = function(e) { if ("number" != typeof e || e < 0 || i(e)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + "."); return this._maxListeners = e, this }, o.prototype.getMaxListeners = function() { return s(this) }, o.prototype.emit = function(e) { for (var t = [], r = 1; r < arguments.length; r++) t.push(arguments[r]); var i = "error" === e, o = this._events; if (void 0 !== o) i = i && void 0 === o.error; else if (!i) return !1; if (i) { var a; if (t.length > 0 && (a = t[0]), a instanceof Error) throw a; var u = new Error("Unhandled error." + (a ? " (" + a.message + ")" : "")); throw u.context = a, u } var s = o[e]; if (void 0 === s) return !1; if ("function" == typeof s) n(s, this, t); else { var f = s.length, l = d(s, f); for (r = 0; r < f; ++r) n(l[r], this, t) } return !0 }, o.prototype.addListener = function(e, t) { return f(this, e, t, !1) }, o.prototype.on = o.prototype.addListener, o.prototype.prependListener = function(e, t) { return f(this, e, t, !0) }, o.prototype.once = function(e, t) { return u(t), this.on(e, c(this, e, t)), this }, o.prototype.prependOnceListener = function(e, t) { return u(t), this.prependListener(e, c(this, e, t)), this }, o.prototype.removeListener = function(e, t) { var r, n, i, o, a; if (u(t), void 0 === (n = this._events)) return this; if (void 0 === (r = n[e])) return this; if (r === t || r.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete n[e], n.removeListener && this.emit("removeListener", e, r.listener || t)); else if ("function" != typeof r) { for (i = -1, o = r.length - 1; o >= 0; o--) if (r[o] === t || r[o].listener === t) { a = r[o].listener, i = o; break } if (i < 0) return this; 0 === i ? r.shift() : function(e, t) { for (; t + 1 < e.length; t++) e[t] = e[t + 1]; e.pop() }(r, i), 1 === r.length && (n[e] = r[0]), void 0 !== n.removeListener && this.emit("removeListener", e, a || t) } return this }, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function(e) { var t, r, n; if (void 0 === (r = this._events)) return this; if (void 0 === r.removeListener) return 0 === arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== r[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete r[e]), this; if (0 === arguments.length) { var i, o = Object.keys(r); for (n = 0; n < o.length; ++n) "removeListener" !== (i = o[n]) && this.removeAllListeners(i); return this.removeAllListeners("removeListener"), this._events = Object.create(null), this._eventsCount = 0, this } if ("function" == typeof(t = r[e])) this.removeListener(e, t); else if (void 0 !== t) for (n = t.length - 1; n >= 0; n--) this.removeListener(e, t[n]); return this }, o.prototype.listeners = function(e) { return h(this, e, !0) }, o.prototype.rawListeners = function(e) { return h(this, e, !1) }, o.listenerCount = function(e, t) { return "function" == typeof e.listenerCount ? e.listenerCount(t) : p.call(e, t) }, o.prototype.listenerCount = p, o.prototype.eventNames = function() { return this._eventsCount > 0 ? t(this._events) : [] } }, 645: (e, t) => { t.read = function(e, t, r, n, i) { var o, a, u = 8 * i - n - 1, s = (1 << u) - 1, f = s >> 1, l = -7, c = r ? i - 1 : 0, h = r ? -1 : 1, p = e[t + c]; for (c += h, o = p & (1 << -l) - 1, p >>= -l, l += u; l > 0; o = 256 * o + e[t + c], c += h, l -= 8); for (a = o & (1 << -l) - 1, o >>= -l, l += n; l > 0; a = 256 * a + e[t + c], c += h, l -= 8); if (0 === o) o = 1 - f; else { if (o === s) return a ? NaN : 1 / 0 * (p ? -1 : 1); a += Math.pow(2, n), o -= f } return (p ? -1 : 1) * a * Math.pow(2, o - n) }, t.write = function(e, t, r, n, i, o) { var a, u, s, f = 8 * o - i - 1, l = (1 << f) - 1, c = l >> 1, h = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, d = n ? 1 : -1, y = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, a = l) : (a = Math.floor(Math.log(t) / Math.LN2), t * (s = Math.pow(2, -a)) < 1 && (a--, s *= 2), (t += a + c >= 1 ? h / s : h * Math.pow(2, 1 - c)) * s >= 2 && (a++, s /= 2), a + c >= l ? (u = 0, a = l) : a + c >= 1 ? (u = (t * s - 1) * Math.pow(2, i), a += c) : (u = t * Math.pow(2, c - 1) * Math.pow(2, i), a = 0)); i >= 8; e[r + p] = 255 & u, p += d, u /= 256, i -= 8); for (a = a << i | u, f += i; f > 0; e[r + p] = 255 & a, p += d, a /= 256, f -= 8); e[r + p - d] |= 128 * y } }, 717: e => { "function" == typeof Object.create ? e.exports = function(e, t) { t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })) } : e.exports = function(e, t) { if (t) { e.super_ = t; var r = function() {}; r.prototype = t.prototype, e.prototype = new r, e.prototype.constructor = e } } }, 620: (e, t, r) => { var n = r(764).Buffer; t.parse = function(e, t) { e instanceof n && (e = e.toString("ascii")); for (var r = n.alloc(t || 8192), i = 0, o = 0, a = null, u = null, s = 0, f = 0; f + 11 <= e.length;) { if (":" != e.charAt(f++)) throw new Error("Line " + (s + 1) + " does not start with a colon (:)."); s++; var l = parseInt(e.substr(f, 2), 16); f += 2; var c = parseInt(e.substr(f, 4), 16); f += 4; var h = parseInt(e.substr(f, 2), 16); f += 2; var p = e.substr(f, 2 * l), d = n.from(p, "hex"); f += 2 * l; var y = parseInt(e.substr(f, 2), 16); f += 2; for (var g = l + (c >> 8) + c + h & 255, v = 0; v < l; v++) g = g + d[v] & 255; if (y != (g = 256 - g & 255)) throw new Error("Invalid checksum on line " + s + ": got " + y + ", but expected " + g); switch (h) { case 0: var m = o + c; if (m + l >= r.length) { var b = n.alloc(2 * (m + l)); r.copy(b, 0, 0, i), r = b } m > i && r.fill(255, i, m), d.copy(r, m), i = Math.max(i, m + l); break; case 1: if (0 != l) throw new Error("Invalid EOF record on line " + s + "."); return { data: r.slice(0, i), startSegmentAddress: a, startLinearAddress: u }; case 2: if (2 != l || 0 != c) throw new Error("Invalid extended segment address record on line " + s + "."); o = parseInt(p, 16) << 4; break; case 3: if (4 != l || 0 != c) throw new Error("Invalid start segment address record on line " + s + "."); a = parseInt(p, 16); break; case 4: if (2 != l || 0 != c) throw new Error("Invalid extended linear address record on line " + s + "."); o = parseInt(p, 16) << 16; break; case 5: if (4 != l || 0 != c) throw new Error("Invalid start linear address record on line " + s + "."); u = parseInt(p, 16); break; default: throw new Error("Invalid record type (" + h + ") on line " + s) } "\r" == e.charAt(f) && f++, "\n" == e.charAt(f) && f++ } throw new Error("Unexpected end of input: missing or invalid EOF record.") } }, 155: e => { var t, r, n = e.exports = {}; function i() { throw new Error("setTimeout has not been defined") } function o() { throw new Error("clearTimeout has not been defined") } function a(e) { if (t === setTimeout) return setTimeout(e, 0); if ((t === i || !t) && setTimeout) return t = setTimeout, setTimeout(e, 0); try { return t(e, 0) } catch (r) { try { return t.call(null, e, 0) } catch (r) { return t.call(this, e, 0) } } }! function() { try { t = "function" == typeof setTimeout ? setTimeout : i } catch (e) { t = i } try { r = "function" == typeof clearTimeout ? clearTimeout : o } catch (e) { r = o } }(); var u, s = [], f = !1, l = -1; function c() { f && u && (f = !1, u.length ? s = u.concat(s) : l = -1, s.length && h()) } function h() { if (!f) { var e = a(c); f = !0; for (var t = s.length; t;) { for (u = s, s = []; ++l < t;) u && u[l].run(); l = -1, t = s.length } u = null, f = !1, function(e) { if (r === clearTimeout) return clearTimeout(e); if ((r === o || !r) && clearTimeout) return r = clearTimeout, clearTimeout(e); try { r(e) } catch (t) { try { return r.call(null, e) } catch (t) { return r.call(this, e) } } }(e) } } function p(e, t) { this.fun = e, this.array = t } function d() {} n.nextTick = function(e) { var t = new Array(arguments.length - 1); if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r]; s.push(new p(e, t)), 1 !== s.length || f || a(h) }, p.prototype.run = function() { this.fun.apply(null, this.array) }, n.title = "browser", n.browser = !0, n.env = {}, n.argv = [], n.version = "", n.versions = {}, n.on = d, n.addListener = d, n.once = d, n.off = d, n.removeListener = d, n.removeAllListeners = d, n.emit = d, n.prependListener = d, n.prependOnceListener = d, n.listeners = function(e) { return [] }, n.binding = function(e) { throw new Error("process.binding is not supported") }, n.cwd = function() { return "/" }, n.chdir = function(e) { throw new Error("process.chdir is not supported") }, n.umask = function() { return 0 } }, 281: e => { "use strict"; var t = {}; function r(e, r, n) { n || (n = Error); var i = function(e) { var t, n; function i(t, n, i) { return e.call(this, function(e, t, n) { return "string" == typeof r ? r : r(e, t, n) }(t, n, i)) || this } return n = e, (t = i).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n, i }(n); i.prototype.name = n.name, i.prototype.code = e, t[e] = i } function n(e, t) { if (Array.isArray(e)) { var r = e.length; return e = e.map((function(e) { return String(e) })), r > 2 ? "one of ".concat(t, " ").concat(e.slice(0, r - 1).join(", "), ", or ") + e[r - 1] : 2 === r ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of ".concat(t, " ").concat(e[0]) } return "of ".concat(t, " ").concat(String(e)) } r("ERR_INVALID_OPT_VALUE", (function(e, t) { return 'The value "' + t + '" is invalid for option "' + e + '"' }), TypeError), r("ERR_INVALID_ARG_TYPE", (function(e, t, r) { var i, o, a, u, s; if ("string" == typeof t && (o = "not ", t.substr(0, o.length) === o) ? (i = "must not be", t = t.replace(/^not /, "")) : i = "must be", function(e, t, r) { return (void 0 === r || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t }(e, " argument")) a = "The ".concat(e, " ").concat(i, " ").concat(n(t, "type")); else { var f = ("number" != typeof s && (s = 0), s + ".".length > (u = e).length || -1 === u.indexOf(".", s) ? "argument" : "property"); a = 'The "'.concat(e, '" ').concat(f, " ").concat(i, " ").concat(n(t, "type")) } return a + ". Received type ".concat(typeof r) }), TypeError), r("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), r("ERR_METHOD_NOT_IMPLEMENTED", (function(e) { return "The " + e + " method is not implemented" })), r("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), r("ERR_STREAM_DESTROYED", (function(e) { return "Cannot call " + e + " after a stream was destroyed" })), r("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), r("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), r("ERR_STREAM_WRITE_AFTER_END", "write after end"), r("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), r("ERR_UNKNOWN_ENCODING", (function(e) { return "Unknown encoding: " + e }), TypeError), r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), e.exports.q = t }, 753: (e, t, r) => { "use strict"; var n = r(155), i = Object.keys || function(e) { var t = []; for (var r in e) t.push(r); return t }; e.exports = l; var o = r(481), a = r(229); r(717)(l, o); for (var u = i(a.prototype), s = 0; s < u.length; s++) { var f = u[s]; l.prototype[f] || (l.prototype[f] = a.prototype[f]) } function l(e) { if (!(this instanceof l)) return new l(e); o.call(this, e), a.call(this, e), this.allowHalfOpen = !0, e && (!1 === e.readable && (this.readable = !1), !1 === e.writable && (this.writable = !1), !1 === e.allowHalfOpen && (this.allowHalfOpen = !1, this.once("end", c))) } function c() { this._writableState.ended || n.nextTick(h, this) } function h(e) { e.end() } Object.defineProperty(l.prototype, "writableHighWaterMark", { enumerable: !1, get: function() { return this._writableState.highWaterMark } }), Object.defineProperty(l.prototype, "writableBuffer", { enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer() } }), Object.defineProperty(l.prototype, "writableLength", { enumerable: !1, get: function() { return this._writableState.length } }), Object.defineProperty(l.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed }, set: function(e) { void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e) } }) }, 725: (e, t, r) => { "use strict"; e.exports = i; var n = r(605); function i(e) { if (!(this instanceof i)) return new i(e); n.call(this, e) } r(717)(i, n), i.prototype._transform = function(e, t, r) { r(null, e) } }, 481: (e, t, r) => { "use strict"; var n, i = r(155); e.exports = T, T.ReadableState = R, r(187).EventEmitter; var o, a = function(e, t) { return e.listeners(t).length }, u = r(503), s = r(764).Buffer, f = r.g.Uint8Array || function() {}, l = r(758); o = l && l.debuglog ? l.debuglog("stream") : function() {}; var c, h, p, d = r(327), y = r(195), g = r(457).getHighWaterMark, v = r(281).q, m = v.ERR_INVALID_ARG_TYPE, b = v.ERR_STREAM_PUSH_AFTER_EOF, w = v.ERR_METHOD_NOT_IMPLEMENTED, _ = v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; r(717)(T, u); var S = y.errorOrDestroy, E = ["error", "close", "destroy", "pause", "resume"]; function R(e, t, i) { n = n || r(753), e = e || {}, "boolean" != typeof i && (i = t instanceof n), this.objectMode = !!e.objectMode, i && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = g(this, e, "readableHighWaterMark", i), this.buffer = new d, 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 = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (c || (c = r(553).s), this.decoder = new c(e.encoding), this.encoding = e.encoding) } function T(e) { if (n = n || r(753), !(this instanceof T)) return new T(e); var t = this instanceof n; this._readableState = new R(e, this, t), this.readable = !0, e && ("function" == typeof e.read && (this._read = e.read), "function" == typeof e.destroy && (this._destroy = e.destroy)), u.call(this) } function A(e, t, r, n, i) { o("readableAddChunk", t); var a, u = e._readableState; if (null === t) u.reading = !1, function(e, t) { if (o("onEofChunk"), !t.ended) { if (t.decoder) { var r = t.decoder.end(); r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length) } t.ended = !0, t.sync ? x(e) : (t.needReadable = !1, t.emittedReadable || (t.emittedReadable = !0, M(e))) } }(e, u); else if (i || (a = function(e, t) { var r, n; return n = t, s.isBuffer(n) || n instanceof f || "string" == typeof t || void 0 === t || e.objectMode || (r = new m("chunk", ["string", "Buffer", "Uint8Array"], t)), r }(u, t)), a) S(e, a); else if (u.objectMode || t && t.length > 0) if ("string" == typeof t || u.objectMode || Object.getPrototypeOf(t) === s.prototype || (t = function(e) { return s.from(e) }(t)), n) u.endEmitted ? S(e, new _) : k(e, u, t, !0); else if (u.ended) S(e, new b); else { if (u.destroyed) return !1; u.reading = !1, u.decoder && !r ? (t = u.decoder.write(t), u.objectMode || 0 !== t.length ? k(e, u, t, !1) : C(e, u)) : k(e, u, t, !1) } else n || (u.reading = !1, C(e, u)); return !u.ended && (u.length < u.highWaterMark || 0 === u.length) } function k(e, t, r, n) { t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0, e.emit("data", r)) : (t.length += t.objectMode ? 1 : r.length, n ? t.buffer.unshift(r) : t.buffer.push(r), t.needReadable && x(e)), C(e, t) } Object.defineProperty(T.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._readableState && this._readableState.destroyed }, set: function(e) { this._readableState && (this._readableState.destroyed = e) } }), T.prototype.destroy = y.destroy, T.prototype._undestroy = y.undestroy, T.prototype._destroy = function(e, t) { t(e) }, T.prototype.push = function(e, t) { var r, n = this._readableState; return n.objectMode ? r = !0 : "string" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = s.from(e, t), t = ""), r = !0), A(this, e, t, !1, r) }, T.prototype.unshift = function(e) { return A(this, e, null, !0, !1) }, T.prototype.isPaused = function() { return !1 === this._readableState.flowing }, T.prototype.setEncoding = function(e) { c || (c = r(553).s); var t = new c(e); this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding; for (var n = this._readableState.buffer.head, i = ""; null !== n;) i += t.write(n.data), n = n.next; return this._readableState.buffer.clear(), "" !== i && this._readableState.buffer.push(i), this._readableState.length = i.length, this }; var L = 1073741824; function O(e, t) { return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e != e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = function(e) { return e >= L ? e = L : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e }(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0)) } function x(e) { var t = e._readableState; o("emitReadable", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (o("emitReadable", t.flowing), t.emittedReadable = !0, i.nextTick(M, e)) } function M(e) { var t = e._readableState; o("emitReadable_", t.destroyed, t.length, t.ended), t.destroyed || !t.length && !t.ended || (e.emit("readable"), t.emittedReadable = !1), t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, N(e) } function C(e, t) { t.readingMore || (t.readingMore = !0, i.nextTick(j, e, t)) } function j(e, t) { for (; !t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && 0 === t.length);) { var r = t.length; if (o("maybeReadMore read 0"), e.read(0), r === t.length) break } t.readingMore = !1 } function P(e) { var t = e._readableState; t.readableListening = e.listenerCount("readable") > 0, t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount("data") > 0 && e.resume() } function I(e) { o("readable nexttick read 0"), e.read(0) } function B(e, t) { o("resume", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit("resume"), N(e), t.flowing && !t.reading && e.read(0) } function N(e) { var t = e._readableState; for (o("flow", t.flowing); t.flowing && null !== e.read();); } function D(e, t) { return 0 === t.length ? null : (t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (r = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.first() : t.buffer.concat(t.length), t.buffer.clear()) : r = t.buffer.consume(e, t.decoder), r); var r } function U(e) { var t = e._readableState; o("endReadable", t.endEmitted), t.endEmitted || (t.ended = !0, i.nextTick(q, t, e)) } function q(e, t) { if (o("endReadableNT", e.endEmitted, e.length), !e.endEmitted && 0 === e.length && (e.endEmitted = !0, t.readable = !1, t.emit("end"), e.autoDestroy)) { var r = t._writableState; (!r || r.autoDestroy && r.finished) && t.destroy() } } function F(e, t) { for (var r = 0, n = e.length; r < n; r++) if (e[r] === t) return r; return -1 } T.prototype.read = function(e) { o("read", e), e = parseInt(e, 10); var t = this._readableState, r = e; if (0 !== e && (t.emittedReadable = !1), 0 === e && t.needReadable && ((0 !== t.highWaterMark ? t.length >= t.highWaterMark : t.length > 0) || t.ended)) return o("read: emitReadable", t.length, t.ended), 0 === t.length && t.ended ? U(this) : x(this), null; if (0 === (e = O(e, t)) && t.ended) return 0 === t.length && U(this), null; var n, i = t.needReadable; return o("need readable", i), (0 === t.length || t.length - e < t.highWaterMark) && o("length less than watermark", i = !0), t.ended || t.reading ? o("reading or ended", i = !1) : i && (o("do read"), t.reading = !0, t.sync = !0, 0 === t.length && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = O(r, t))), null === (n = e > 0 ? D(e, t) : null) ? (t.needReadable = t.length <= t.highWaterMark, e = 0) : (t.length -= e, t.awaitDrain = 0), 0 === t.length && (t.ended || (t.needReadable = !0), r !== e && t.ended && U(this)), null !== n && this.emit("data", n), n }, T.prototype._read = function(e) { S(this, new w("_read()")) }, T.prototype.pipe = function(e, t) { var r = this, n = this._readableState; switch (n.pipesCount) { case 0: n.pipes = e; break; case 1: n.pipes = [n.pipes, e]; break; default: n.pipes.push(e) } n.pipesCount += 1, o("pipe count=%d opts=%j", n.pipesCount, t); var u = t && !1 === t.end || e === i.stdout || e === i.stderr ? y : s; function s() { o("onend"), e.end() } n.endEmitted ? i.nextTick(u) : r.once("end", u), e.on("unpipe", (function t(i, a) { o("onunpipe"), i === r && a && !1 === a.hasUnpiped && (a.hasUnpiped = !0, o("cleanup"), e.removeListener("close", p), e.removeListener("finish", d), e.removeListener("drain", f), e.removeListener("error", h), e.removeListener("unpipe", t), r.removeListener("end", s), r.removeListener("end", y), r.removeListener("data", c), l = !0, !n.awaitDrain || e._writableState && !e._writableState.needDrain || f()) })); var f = function(e) { return function() { var t = e._readableState; o("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, 0 === t.awaitDrain && a(e, "data") && (t.flowing = !0, N(e)) } }(r); e.on("drain", f); var l = !1; function c(t) { o("ondata"); var i = e.write(t); o("dest.write", i), !1 === i && ((1 === n.pipesCount && n.pipes === e || n.pipesCount > 1 && -1 !== F(n.pipes, e)) && !l && (o("false write response, pause", n.awaitDrain), n.awaitDrain++), r.pause()) } function h(t) { o("onerror", t), y(), e.removeListener("error", h), 0 === a(e, "error") && S(e, t) } function p() { e.removeListener("finish", d), y() } function d() { o("onfinish"), e.removeListener("close", p), y() } function y() { o("unpipe"), r.unpipe(e) } return r.on("data", c), function(e, t, r) { if ("function" == typeof e.prependListener) return e.prependListener(t, r); e._events && e._events.error ? Array.isArray(e._events.error) ? e._events.error.unshift(r) : e._events.error = [r, e._events.error] : e.on(t, r) }(e, "error", h), e.once("close", p), e.once("finish", d), e.emit("pipe", r), n.flowing || (o("pipe resume"), r.resume()), e }, T.prototype.unpipe = function(e) { var t = this._readableState, r = { hasUnpiped: !1 }; if (0 === t.pipesCount) return this; if (1 === t.pipesCount) return e && e !== t.pipes || (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r)), this; if (!e) { var n = t.pipes, i = t.pipesCount; t.pipes = null, t.pipesCount = 0, t.flowing = !1; for (var o = 0; o < i; o++) n[o].emit("unpipe", this, { hasUnpiped: !1 }); return this } var a = F(t.pipes, e); return -1 === a || (t.pipes.splice(a, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r)), this }, T.prototype.on = function(e, t) { var r = u.prototype.on.call(this, e, t), n = this._readableState; return "data" === e ? (n.readableListening = this.listenerCount("readable") > 0, !1 !== n.flowing && this.resume()) : "readable" === e && (n.endEmitted || n.readableListening || (n.readableListening = n.needReadable = !0, n.flowing = !1, n.emittedReadable = !1, o("on readable", n.length, n.reading), n.length ? x(this) : n.reading || i.nextTick(I, this))), r }, T.prototype.addListener = T.prototype.on, T.prototype.removeListener = function(e, t) { var r = u.prototype.removeListener.call(this, e, t); return "readable" === e && i.nextTick(P, this), r }, T.prototype.removeAllListeners = function(e) { var t = u.prototype.removeAllListeners.apply(this, arguments); return "readable" !== e && void 0 !== e || i.nextTick(P, this), t }, T.prototype.resume = function() { var e = this._readableState; return e.flowing || (o("resume"), e.flowing = !e.readableListening, function(e, t) { t.resumeScheduled || (t.resumeScheduled = !0, i.nextTick(B, e, t)) }(this, e)), e.paused = !1, this }, T.prototype.pause = function() { return o("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (o("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this }, T.prototype.wrap = function(e) { var t = this, r = this._readableState, n = !1; for (var i in e.on("end", (function() { if (o("wrapped end"), r.decoder && !r.ended) { var e = r.decoder.end(); e && e.length && t.push(e) } t.push(null) })), e.on("data", (function(i) { o("wrapped data"), r.decoder && (i = r.decoder.write(i)), r.objectMode && null == i || (r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause())) })), e) void 0 === this[i] && "function" == typeof e[i] && (this[i] = function(t) { return function() { return e[t].apply(e, arguments) } }(i)); for (var a = 0; a < E.length; a++) e.on(E[a], this.emit.bind(this, E[a])); return this._read = function(t) { o("wrapped _read", t), n && (n = !1, e.resume()) }, this }, "function" == typeof Symbol && (T.prototype[Symbol.asyncIterator] = function() { return void 0 === h && (h = r(850)), h(this) }), Object.defineProperty(T.prototype, "readableHighWaterMark", { enumerable: !1, get: function() { return this._readableState.highWaterMark } }), Object.defineProperty(T.prototype, "readableBuffer", { enumerable: !1, get: function() { return this._readableState && this._readableState.buffer } }), Object.defineProperty(T.prototype, "readableFlowing", { enumerable: !1, get: function() { return this._readableState.flowing }, set: function(e) { this._readableState && (this._readableState.flowing = e) } }), T._fromList = D, Object.defineProperty(T.prototype, "readableLength", { enumerable: !1, get: function() { return this._readableState.length } }), "function" == typeof Symbol && (T.from = function(e, t) { return void 0 === p && (p = r(167)), p(T, e, t) }) }, 605: (e, t, r) => { "use strict"; e.exports = l; var n = r(281).q, i = n.ERR_METHOD_NOT_IMPLEMENTED, o = n.ERR_MULTIPLE_CALLBACK, a = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, u = n.ERR_TRANSFORM_WITH_LENGTH_0, s = r(753); function f(e, t) { var r = this._transformState; r.transforming = !1; var n = r.writecb; if (null === n) return this.emit("error", new o); r.writechunk = null, r.writecb = null, null != t && this.push(t), n(e); var i = this._readableState; i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark) } function l(e) { if (!(this instanceof l)) return new l(e); s.call(this, e), this._transformState = { afterTransform: f.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && ("function" == typeof e.transform && (this._transform = e.transform), "function" == typeof e.flush && (this._flush = e.flush)), this.on("prefinish", c) } function c() { var e = this; "function" != typeof this._flush || this._readableState.destroyed ? h(this, null, null) : this._flush((function(t, r) { h(e, t, r) })) } function h(e, t, r) { if (t) return e.emit("error", t); if (null != r && e.push(r), e._writableState.length) throw new u; if (e._transformState.transforming) throw new a; return e.push(null) } r(717)(l, s), l.prototype.push = function(e, t) { return this._transformState.needTransform = !1, s.prototype.push.call(this, e, t) }, l.prototype._transform = function(e, t, r) { r(new i("_transform()")) }, l.prototype._write = function(e, t, r) { var n = this._transformState; if (n.writecb = r, n.writechunk = e, n.writeencoding = t, !n.transforming) { var i = this._readableState; (n.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark) } }, l.prototype._read = function(e) { var t = this._transformState; null === t.writechunk || t.transforming ? t.needTransform = !0 : (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) }, l.prototype._destroy = function(e, t) { s.prototype._destroy.call(this, e, (function(e) { t(e) })) } }, 229: (e, t, r) => { "use strict"; var n, i = r(155); function o(e) { var t = this; this.next = null, this.entry = null, this.finish = function() { ! function(e, t, r) { var n = e.entry; for (e.entry = null; n;) { var i = n.callback; t.pendingcb--, i(undefined), n = n.next } t.corkedRequestsFree.next = e }(t, e) } } e.exports = T, T.WritableState = R; var a, u = { deprecate: r(927) }, s = r(503), f = r(764).Buffer, l = r.g.Uint8Array || function() {}, c = r(195), h = r(457).getHighWaterMark, p = r(281).q, d = p.ERR_INVALID_ARG_TYPE, y = p.ERR_METHOD_NOT_IMPLEMENTED, g = p.ERR_MULTIPLE_CALLBACK, v = p.ERR_STREAM_CANNOT_PIPE, m = p.ERR_STREAM_DESTROYED, b = p.ERR_STREAM_NULL_VALUES, w = p.ERR_STREAM_WRITE_AFTER_END, _ = p.ERR_UNKNOWN_ENCODING, S = c.errorOrDestroy; function E() {} function R(e, t, a) { n = n || r(753), e = e || {}, "boolean" != typeof a && (a = t instanceof n), this.objectMode = !!e.objectMode, a && (this.objectMode = this.objectMode || !!e.writableObjectMode), this.highWaterMark = h(this, e, "writableHighWaterMark", a), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; var u = !1 === e.decodeStrings; this.decodeStrings = !u, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e) { ! function(e, t) { var r = e._writableState, n = r.sync, o = r.writecb; if ("function" != typeof o) throw new g; if (function(e) { e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0 }(r), t) ! function(e, t, r, n, o) { --t.pendingcb, r ? (i.nextTick(o, n), i.nextTick(M, e, t), e._writableState.errorEmitted = !0, S(e, n)) : (o(n), e._writableState.errorEmitted = !0, S(e, n), M(e, t)) }(e, r, n, t, o); else { var a = O(r) || e.destroyed; a || r.corked || r.bufferProcessing || !r.bufferedRequest || L(e, r), n ? i.nextTick(k, e, r, a, o) : k(e, r, a, o) } }(t, e) }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new o(this) } function T(e) { var t = this instanceof(n = n || r(753)); if (!t && !a.call(T, this)) return new T(e); this._writableState = new R(e, this, t), this.writable = !0, e && ("function" == typeof e.write && (this._write = e.write), "function" == typeof e.writev && (this._writev = e.writev), "function" == typeof e.destroy && (this._destroy = e.destroy), "function" == typeof e.final && (this._final = e.final)), s.call(this) } function A(e, t, r, n, i, o, a) { t.writelen = n, t.writecb = a, t.writing = !0, t.sync = !0, t.destroyed ? t.onwrite(new m("write")) : r ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite), t.sync = !1 } function k(e, t, r, n) { r || function(e, t) { 0 === t.length && t.needDrain && (t.needDrain = !1, e.emit("drain")) }(e, t), t.pendingcb--, n(), M(e, t) } function L(e, t) { t.bufferProcessing = !0; var r = t.bufferedRequest; if (e._writev && r && r.next) { var n = t.bufferedRequestCount, i = new Array(n), a = t.corkedRequestsFree; a.entry = r; for (var u = 0, s = !0; r;) i[u] = r, r.isBuf || (s = !1), r = r.next, u += 1; i.allBuffers = s, A(e, t, !0, t.length, i, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree = a.next, a.next = null) : t.corkedRequestsFree = new o(t), t.bufferedRequestCount = 0 } else { for (; r;) { var f = r.chunk, l = r.encoding, c = r.callback; if (A(e, t, !1, t.objectMode ? 1 : f.length, f, l, c), r = r.next, t.bufferedRequestCount--, t.writing) break } null === r && (t.lastBufferedRequest = null) } t.bufferedRequest = r, t.bufferProcessing = !1 } function O(e) { return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing } function x(e, t) { e._final((function(r) { t.pendingcb--, r && S(e, r), t.prefinished = !0, e.emit("prefinish"), M(e, t) })) } function M(e, t) { var r = O(t); if (r && (function(e, t) { t.prefinished || t.finalCalled || ("function" != typeof e._final || t.destroyed ? (t.prefinished = !0, e.emit("prefinish")) : (t.pendingcb++, t.finalCalled = !0, i.nextTick(x, e, t))) }(e, t), 0 === t.pendingcb && (t.finished = !0, e.emit("finish"), t.autoDestroy))) { var n = e._readableState; (!n || n.autoDestroy && n.endEmitted) && e.destroy() } return r } r(717)(T, s), R.prototype.getBuffer = function() { for (var e = this.bufferedRequest, t = []; e;) t.push(e), e = e.next; return t }, function() { try { Object.defineProperty(R.prototype, "buffer", { get: u.deprecate((function() { return this.getBuffer() }), "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }) } catch (e) {} }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (a = Function.prototype[Symbol.hasInstance], Object.defineProperty(T, Symbol.hasInstance, { value: function(e) { return !!a.call(this, e) || this === T && e && e._writableState instanceof R } })) : a = function(e) { return e instanceof this }, T.prototype.pipe = function() { S(this, new v) }, T.prototype.write = function(e, t, r) { var n, o = this._writableState, a = !1, u = !o.objectMode && (n = e, f.isBuffer(n) || n instanceof l); return u && !f.isBuffer(e) && (e = function(e) { return f.from(e) }(e)), "function" == typeof t && (r = t, t = null), u ? t = "buffer" : t || (t = o.defaultEncoding), "function" != typeof r && (r = E), o.ending ? function(e, t) { var r = new w; S(e, r), i.nextTick(t, r) }(this, r) : (u || function(e, t, r, n) { var o; return null === r ? o = new b : "string" == typeof r || t.objectMode || (o = new d("chunk", ["string", "Buffer"], r)), !o || (S(e, o), i.nextTick(n, o), !1) }(this, o, e, r)) && (o.pendingcb++, a = function(e, t, r, n, i, o) { if (!r) { var a = function(e, t, r) { return e.objectMode || !1 === e.decodeStrings || "string" != typeof t || (t = f.from(t, r)), t }(t, n, i); n !== a && (r = !0, i = "buffer", n = a) } var u = t.objectMode ? 1 : n.length; t.length += u; var s = t.length < t.highWaterMark; if (s || (t.needDrain = !0), t.writing || t.corked) { var l = t.lastBufferedRequest; t.lastBufferedRequest = { chunk: n, encoding: i, isBuf: r, callback: o, next: null }, l ? l.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1 } else A(e, t, !1, u, n, i, o); return s }(this, o, u, e, t, r)), a }, T.prototype.cork = function() { this._writableState.corked++ }, T.prototype.uncork = function() { var e = this._writableState; e.corked && (e.corked--, e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest || L(this, e)) }, T.prototype.setDefaultEncoding = function(e) { if ("string" == typeof e && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new _(e); return this._writableState.defaultEncoding = e, this }, Object.defineProperty(T.prototype, "writableBuffer", { enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer() } }), Object.defineProperty(T.prototype, "writableHighWaterMark", { enumerable: !1, get: function() { return this._writableState.highWaterMark } }), T.prototype._write = function(e, t, r) { r(new y("_write()")) }, T.prototype._writev = null, T.prototype.end = function(e, t, r) { var n = this._writableState; return "function" == typeof e ? (r = e, e = null, t = null) : "function" == typeof t && (r = t, t = null), null != e && this.write(e, t), n.corked && (n.corked = 1, this.uncork()), n.ending || function(e, t, r) { t.ending = !0, M(e, t), r && (t.finished ? i.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1 }(this, n, r), this }, Object.defineProperty(T.prototype, "writableLength", { enumerable: !1, get: function() { return this._writableState.length } }), Object.defineProperty(T.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._writableState && this._writableState.destroyed }, set: function(e) { this._writableState && (this._writableState.destroyed = e) } }), T.prototype.destroy = c.destroy, T.prototype._undestroy = c.undestroy, T.prototype._destroy = function(e, t) { t(e) } }, 850: (e, t, r) => { "use strict"; var n, i = r(155); function o(e, t, r) { return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e } var a = r(610), u = Symbol("lastResolve"), s = Symbol("lastReject"), f = Symbol("error"), l = Symbol("ended"), c = Symbol("lastPromise"), h = Symbol("handlePromise"), p = Symbol("stream"); function d(e, t) { return { value: e, done: t } } function y(e) { var t = e[u]; if (null !== t) { var r = e[p].read(); null !== r && (e[c] = null, e[u] = null, e[s] = null, t(d(r, !1))) } } function g(e) { i.nextTick(y, e) } var v = Object.getPrototypeOf((function() {})), m = Object.setPrototypeOf((o(n = { get stream() { return this[p] }, next: function() { var e = this, t = this[f]; if (null !== t) return Promise.reject(t); if (this[l]) return Promise.resolve(d(void 0, !0)); if (this[p].destroyed) return new Promise((function(t, r) { i.nextTick((function() { e[f] ? r(e[f]) : t(d(void 0, !0)) })) })); var r, n = this[c]; if (n) r = new Promise(function(e, t) { return function(r, n) { e.then((function() { t[l] ? r(d(void 0, !0)) : t[h](r, n) }), n) } }(n, this)); else { var o = this[p].read(); if (null !== o) return Promise.resolve(d(o, !1)); r = new Promise(this[h]) } return this[c] = r, r } }, Symbol.asyncIterator, (function() { return this })), o(n, "return", (function() { var e = this; return new Promise((function(t, r) { e[p].destroy(null, (function(e) { e ? r(e) : t(d(void 0, !0)) })) })) })), n), v); e.exports = function(e) { var t, r = Object.create(m, (o(t = {}, p, { value: e, writable: !0 }), o(t, u, { value: null, writable: !0 }), o(t, s, { value: null, writable: !0 }), o(t, f, { value: null, writable: !0 }), o(t, l, { value: e._readableState.endEmitted, writable: !0 }), o(t, h, { value: function(e, t) { var n = r[p].read(); n ? (r[c] = null, r[u] = null, r[s] = null, e(d(n, !1))) : (r[u] = e, r[s] = t) }, writable: !0 }), t)); return r[c] = null, a(e, (function(e) { if (e && "ERR_STREAM_PREMATURE_CLOSE" !== e.code) { var t = r[s]; return null !== t && (r[c] = null, r[u] = null, r[s] = null, t(e)), void(r[f] = e) } var n = r[u]; null !== n && (r[c] = null, r[u] = null, r[s] = null, n(d(void 0, !0))), r[l] = !0 })), e.on("readable", g.bind(null, r)), r } }, 327: (e, t, r) => { "use strict"; function n(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), r.push.apply(r, n) } return r } function i(e, t, r) { return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e } function o(e, t) { for (var r = 0; r < t.length; r++) { var n = t[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } var a = r(764).Buffer, u = r(758).inspect, s = u && u.custom || "inspect"; e.exports = function() { function e() { ! function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.head = null, this.tail = null, this.length = 0 } var t, r; return t = e, (r = [{ key: "push", value: function(e) { var t = { data: e, next: null }; this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length } }, { key: "unshift", value: function(e) { var t = { data: e, next: this.head }; 0 === this.length && (this.tail = t), this.head = t, ++this.length } }, { key: "shift", value: function() { if (0 !== this.length) { var e = this.head.data; return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e } } }, { key: "clear", value: function() { this.head = this.tail = null, this.length = 0 } }, { key: "join", value: function(e) { if (0 === this.length) return ""; for (var t = this.head, r = "" + t.data; t = t.next;) r += e + t.data; return r } }, { key: "concat", value: function(e) { if (0 === this.length) return a.alloc(0); for (var t, r, n, i = a.allocUnsafe(e >>> 0), o = this.head, u = 0; o;) t = o.data, r = i, n = u, a.prototype.copy.call(t, r, n), u += o.data.length, o = o.next; return i } }, { key: "consume", value: function(e, t) { var r; return e < this.head.data.length ? (r = this.head.data.slice(0, e), this.head.data = this.head.data.slice(e)) : r = e === this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e), r } }, { key: "first", value: function() { return this.head.data } }, { key: "_getString", value: function(e) { var t = this.head, r = 1, n = t.data; for (e -= n.length; t = t.next;) { var i = t.data, o = e > i.length ? i.length : e; if (o === i.length ? n += i : n += i.slice(0, e), 0 == (e -= o)) { o === i.length ? (++r, t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t, t.data = i.slice(o)); break }++r } return this.length -= r, n } }, { key: "_getBuffer", value: function(e) { var t = a.allocUnsafe(e), r = this.head, n = 1; for (r.data.copy(t), e -= r.data.length; r = r.next;) { var i = r.data, o = e > i.length ? i.length : e; if (i.copy(t, t.length - e, 0, o), 0 == (e -= o)) { o === i.length ? (++n, r.next ? this.head = r.next : this.head = this.tail = null) : (this.head = r, r.data = i.slice(o)); break }++n } return this.length -= n, t } }, { key: s, value: function(e, t) { return u(this, function(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? n(Object(r), !0).forEach((function(t) { i(e, t, r[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : n(Object(r)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)) })) } return e }({}, t, { depth: 0, customInspect: !1 })) } }]) && o(t.prototype, r), e }() }, 195: (e, t, r) => { "use strict"; var n = r(155); function i(e, t) { a(e, t), o(e) } function o(e) { e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close") } function a(e, t) { e.emit("error", t) } e.exports = { destroy: function(e, t) { var r = this, u = this._readableState && this._readableState.destroyed, s = this._writableState && this._writableState.destroyed; return u || s ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, n.nextTick(a, this, e)) : n.nextTick(a, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, (function(e) { !t && e ? r._writableState ? r._writableState.errorEmitted ? n.nextTick(o, r) : (r._writableState.errorEmitted = !0, n.nextTick(i, r, e)) : n.nextTick(i, r, e) : t ? (n.nextTick(o, r), t(e)) : n.nextTick(o, r) })), this) }, undestroy: function() { 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) }, errorOrDestroy: function(e, t) { var r = e._readableState, n = e._writableState; r && r.autoDestroy || n && n.autoDestroy ? e.destroy(t) : e.emit("error", t) } } }, 610: (e, t, r) => { "use strict"; var n = r(281).q.ERR_STREAM_PREMATURE_CLOSE; function i() {} e.exports = function e(t, r, o) { if ("function" == typeof r) return e(t, null, r); r || (r = {}), o = function(e) { var t = !1; return function() { if (!t) { t = !0; for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i]; e.apply(this, n) } } }(o || i); var a = r.readable || !1 !== r.readable && t.readable, u = r.writable || !1 !== r.writable && t.writable, s = function() { t.writable || l() }, f = t._writableState && t._writableState.finished, l = function() { u = !1, f = !0, a || o.call(t) }, c = t._readableState && t._readableState.endEmitted, h = function() { a = !1, c = !0, u || o.call(t) }, p = function(e) { o.call(t, e) }, d = function() { var e; return a && !c ? (t._readableState && t._readableState.ended || (e = new n), o.call(t, e)) : u && !f ? (t._writableState && t._writableState.ended || (e = new n), o.call(t, e)) : void 0 }, y = function() { t.req.on("finish", l) }; return function(e) { return e.setHeader && "function" == typeof e.abort }(t) ? (t.on("complete", l), t.on("abort", d), t.req ? y() : t.on("request", y)) : u && !t._writableState && (t.on("end", s), t.on("close", s)), t.on("end", h), t.on("finish", l), !1 !== r.error && t.on("error", p), t.on("close", d), function() { t.removeListener("complete", l), t.removeListener("abort", d), t.removeListener("request", y), t.req && t.req.removeListener("finish", l), t.removeListener("end", s), t.removeListener("close", s), t.removeListener("finish", l), t.removeListener("end", h), t.removeListener("error", p), t.removeListener("close", d) } } }, 167: e => { e.exports = function() { throw new Error("Readable.from is not available in the browser") } }, 946: (e, t, r) => { "use strict"; var n, i = r(281).q, o = i.ERR_MISSING_ARGS, a = i.ERR_STREAM_DESTROYED; function u(e) { if (e) throw e } function s(e, t, i, o) { o = function(e) { var t = !1; return function() { t || (t = !0, e.apply(void 0, arguments)) } }(o); var u = !1; e.on("close", (function() { u = !0 })), void 0 === n && (n = r(610)), n(e, { readable: t, writable: i }, (function(e) { if (e) return o(e); u = !0, o() })); var s = !1; return function(t) { if (!u && !s) return s = !0, function(e) { return e.setHeader && "function" == typeof e.abort }(e) ? e.abort() : "function" == typeof e.destroy ? e.destroy() : void o(t || new a("pipe")) } } function f(e) { e() } function l(e, t) { return e.pipe(t) } function c(e) { return e.length ? "function" != typeof e[e.length - 1] ? u : e.pop() : u } e.exports = function() { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; var n, i = c(t); if (Array.isArray(t[0]) && (t = t[0]), t.length < 2) throw new o("streams"); var a = t.map((function(e, r) { var o = r < t.length - 1; return s(e, o, r > 0, (function(e) { n || (n = e), e && a.forEach(f), o || (a.forEach(f), i(n)) })) })); return t.reduce(l) } }, 457: (e, t, r) => { "use strict"; var n = r(281).q.ERR_INVALID_OPT_VALUE; e.exports = { getHighWaterMark: function(e, t, r, i) { var o = function(e, t, r) { return null != e.highWaterMark ? e.highWaterMark : t ? e[r] : null }(t, i, r); if (null != o) { if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new n(i ? r : "highWaterMark", o); return Math.floor(o) } return e.objectMode ? 16 : 16384 } } }, 503: (e, t, r) => { e.exports = r(187).EventEmitter }, 90: (e, t, r) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); const n = r(830); class i extends n.Readable { constructor(e) { super(), this.bytesRead = 0, this.released = !1, this.reader = e.getReader() } async _read() { if (this.released) return void this.push(null); this.pendingRead = this.reader.read(); const e = await this.pendingRead; delete this.pendingRead, e.done || this.released ? this.push(null) : (this.bytesRead += e.value.length, this.push(e.value)) } async waitForReadToComplete() { this.pendingRead && await this.pendingRead } async close() { await this.syncAndRelease() } async syncAndRelease() { this.released = !0, await this.waitForReadToComplete(), await this.reader.releaseLock() } } t.ReadableWebToNodeStream = i }, 509: (e, t, r) => { var n = r(764), i = n.Buffer; function o(e, t) { for (var r in e) t[r] = e[r] } function a(e, t, r) { return i(e, t, r) } i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? e.exports = n : (o(n, t), t.Buffer = a), a.prototype = Object.create(i.prototype), o(i, a), a.from = function(e, t, r) { if ("number" == typeof e) throw new TypeError("Argument must not be a number"); return i(e, t, r) }, a.alloc = function(e, t, r) { if ("number" != typeof e) throw new TypeError("Argument must be a number"); var n = i(e); return void 0 !== t ? "string" == typeof r ? n.fill(t, r) : n.fill(t) : n.fill(0), n }, a.allocUnsafe = function(e) { if ("number" != typeof e) throw new TypeError("Argument must be a number"); return i(e) }, a.allocUnsafeSlow = function(e) { if ("number" != typeof e) throw new TypeError("Argument must be a number"); return n.SlowBuffer(e) } }, 107: (e, t, r) => { var n = r(764).Buffer, i = r(668), o = r(375), a = r(270), u = function(e) { this.opts = e || {}, this.quiet = this.opts.quiet || !1, this.quiet ? this.log = function() {} : window ? this.log = console.log.bind(window) : this.log = console.log }; u.prototype.sync = function(e, t, r, n) { this.log("sync"); var i = this, u = 1, s = { cmd: [o.Cmnd_STK_GET_SYNC], responseData: o.OK_RESPONSE, timeout: r }; ! function r() { u += 1, a(e, s, (function(e, o) { if (e && u <= t) return e && i.log(e), i.log("failed attempt again", u), r(); i.log("sync complete", e, o, u), n(e, o) })) }() }, u.prototype.verifySignature = function(e, t, r, i) { this.log("verify signature"); var u = this; match = n.concat([n.from([o.Resp_STK_INSYNC]), t, n.from([o.Resp_STK_OK])]); var s = { cmd: [o.Cmnd_STK_READ_SIGN], responseLength: match.length, timeout: r }; a(e, s, (function(e, t) { t ? u.log("confirm signature", e, t, t.toString("hex")) : u.log("confirm signature", e, "no data"), i(e, t) })) }, u.prototype.getSignature = function(e, t, r) { this.log("get signature"); var n = { cmd: [o.Cmnd_STK_READ_SIGN], responseLength: 5, timeout: t }; a(e, n, (function(e, t) { this.log("getSignature", e, t), r(e, t) })) }, u.prototype.setOptions = function(e, t, r, n) { this.log("set device"); var i = this, u = { cmd: [o.Cmnd_STK_SET_DEVICE, t.devicecode || 0, t.revision || 0, t.progtype || 0, t.parmode || 0, t.polling || 0, t.selftimed || 0, t.lockbytes || 0, t.fusebytes || 0, t.flashpollval1 || 0, t.flashpollval2 || 0, t.eeprompollval1 || 0, t.eeprompollval2 || 0, t.pagesizehigh || 0, t.pagesizelow || 0, t.eepromsizehigh || 0, t.eepromsizelow || 0, t.flashsize4 || 0, t.flashsize3 || 0, t.flashsize2 || 0, t.flashsize1 || 0], responseData: o.OK_RESPONSE, timeout: r }; a(e, u, (function(e, t) { if (i.log("setOptions", e, t), e) return n(e); n() })) }, u.prototype.enterProgrammingMode = function(e, t, r) { this.log("send enter programming mode"); var n = this, i = { cmd: [o.Cmnd_STK_ENTER_PROGMODE], responseData: o.OK_RESPONSE, timeout: t }; a(e, i, (function(e, t) { n.log("sent enter programming mode", e, t), r(e, t) })) }, u.prototype.loadAddress = function(e, t, r, n) { this.log("load address"); var i = this, u = 255 & t, s = t >> 8 & 255, f = { cmd: [o.Cmnd_STK_LOAD_ADDRESS, u, s], responseData: o.OK_RESPONSE, timeout: r }; a(e, f, (function(e, t) { i.log("loaded address", e, t), n(e, t) })) }, u.prototype.loadPage = function(e, t, r, i) { this.log("load page"); var u = this, s = 255 & t.length, f = t.length >> 8, l = { cmd: n.concat([n.from([o.Cmnd_STK_PROG_PAGE, f, s, 70]), t, n.from([o.Sync_CRC_EOP])]), responseData: o.OK_RESPONSE, timeout: r }; a(e, l, (function(e, t) { u.log("loaded page", e, t), i(e, t) })) }, u.prototype.upload = function(e, t, r, n, o) { this.log("program"); var a, u, s = 0, f = this; i.whilst((function() { return s < t.length }), (function(o) { f.log("program page"), i.series([function(e) { u = s >> 1, e() }, function(t) { f.loadAddress(e, u, n, t) }, function(e) { a = t.slice(s, t.length > r ? s + r : t.length - 1), e() }, function(t) { f.loadPage(e, a, n, t) }, function(e) { f.log("programmed page"), s += a.length, setTimeout(e, 4) }], (function(e) { f.log("page done"), o(e) })) }), (function(e) { f.log("upload done"), o(e) })) }, u.prototype.exitProgrammingMode = function(e, t, r) { this.log("send leave programming mode"); var n = this, i = { cmd: [o.Cmnd_STK_LEAVE_PROGMODE], responseData: o.OK_RESPONSE, timeout: t }; a(e, i, (function(e, t) { n.log("sent leave programming mode", e, t), r(e, t) })) }, u.prototype.verify = function(e, t, r, n, o) { this.log("verify"); var a, u, s = 0, f = this; i.whilst((function() { return s < t.length }), (function(o) { f.log("verify page"), i.series([function(e) { u = s >> 1, e() }, function(t) { f.loadAddress(e, u, n, t) }, function(e) { a = t.slice(s, t.length > r ? s + r : t.length - 1), e() }, function(t) { f.verifyPage(e, a, r, n, t) }, function(e) { f.log("verified page"), s += a.length, setTimeout(e, 4) }], (function(e) { f.log("verify done"), o(e) })) }), (function(e) { f.log("verify done"), o(e) })) }, u.prototype.verifyPage = function(e, t, r, i, u) { this.log("verify page"); var s = this; match = n.concat([n.from([o.Resp_STK_INSYNC]), t, n.from([o.Resp_STK_OK])]); var f = t.length >= r ? r : t.length, l = { cmd: [o.Cmnd_STK_READ_PAGE, f >> 8 & 255, 255 & f, 70], responseLength: match.length, timeout: i }; a(e, l, (function(e, t) { s.log("confirm page", e, t, t.toString("hex")), u(e, t) })) }, u.prototype.bootload = function(e, t, r, n) { var o = { pagesizehigh: r.pagesizehigh << 8 & 255, pagesizelow: 255 & r.pagesizelow }; i.series([this.sync.bind(this, e, 3, r.timeout), this.sync.bind(this, e, 3, r.timeout), this.sync.bind(this, e, 3, r.timeout), this.verifySignature.bind(this, e, r.signature, r.timeout), this.setOptions.bind(this, e, o, r.timeout), this.enterProgrammingMode.bind(this, e, r.timeout), this.upload.bind(this, e, t, r.pageSize, r.timeout), this.verify.bind(this, e, t, r.pageSize, r.timeout), this.exitProgrammingMode.bind(this, e, r.timeout)], (function(e) { return n(e) })) }, e.exports = u }, 310: (e, t, r) => { var n = r(764).Buffer, i = [r(375).Resp_STK_INSYNC]; e.exports = function(e, t, r, o) { var a = n.alloc(0), u = !1, s = null, f = function(e) { for (var t = 0; !u && t < e.length;) { var o = e[t]; - 1 !== i.indexOf(o) && (e = e.slice(t, e.length - t), u = !0), t++ } if (u && (a = n.concat([a, e])), a.length > r) return l(new Error("buffer overflow " + a.length + " > " + r)); a.length == r && l() }, l = function(t) { s && clearTimeout(s), e.removeListener("data", f), o(t, a) }; t && t > 0 && (s = setTimeout((function() { s = null, l(new Error("receiveData timeout after " + t + "ms")) }), t)), e.on("data", f) } }, 270: (e, t, r) => { var n = r(764).Buffer, i = r(310), o = r(375); e.exports = function(e, t, r) { var a, u = t.timeout || 0, s = (o.Resp_STK_INSYNC, o.Resp_STK_NOSYNC, null), f = 0; t.responseData && t.responseData.length > 0 && (s = t.responseData), s && (f = s.length), t.responseLength && (f = t.responseLength); var l = t.cmd; l instanceof Array && (l = n.from(l.concat(o.Sync_CRC_EOP))), e.write(l, (function(t) { if (t) return a = new Error("Sending " + l.toString("hex") + ": " + t.message), r(a); i(e, u, f, (function(e, t) { return e ? (a = new Error("Sending " + l.toString("hex") + ": " + e.message), r(a)) : s && !t.equals(s) ? (a = new Error(l + " response mismatch: " + t.toString("hex") + ", " + s.toString("hex")), r(a)) : void r(null, t) })) })) } }, 375: (e, t, r) => { var n = r(764).Buffer; e.exports = { Cmnd_STK_GET_SYNC: 48, Cmnd_STK_SET_DEVICE: 66, Cmnd_STK_ENTER_PROGMODE: 80, Cmnd_STK_LOAD_ADDRESS: 85, Cmnd_STK_PROG_PAGE: 100, Cmnd_STK_LEAVE_PROGMODE: 81, Cmnd_STK_READ_SIGN: 117, Sync_CRC_EOP: 32, Resp_STK_OK: 16, Resp_STK_INSYNC: 20, Resp_STK_NOSYNC: 21, Cmnd_STK_READ_PAGE: 116, OK_RESPONSE: n.from([20, 16]) } }, 668: (e, t, r) => { var n, i = r(155); ! function() { var r, o, a = {}; function u(e) { var t = !1; return function() { if (t) throw new Error("Callback was already called."); t = !0, e.apply(r, arguments) } } null != (r = this) && (o = r.async), a.noConflict = function() { return r.async = o, a }; var s = Object.prototype.toString, f = Array.isArray || function(e) { return "[object Array]" === s.call(e) }, l = function(e, t) { for (var r = 0; r < e.length; r += 1) t(e[r], r, e) }, c = function(e, t) { if (e.map) return e.map(t); var r = []; return l(e, (function(e, n, i) { r.push(t(e, n, i)) })), r }, h = function(e) { if (Object.keys) return Object.keys(e); var t = []; for (var r in e) e.hasOwnProperty(r) && t.push(r); return t }; void 0 !== i && i.nextTick ? (a.nextTick = i.nextTick, "undefined" != typeof setImmediate ? a.setImmediate = function(e) { setImmediate(e) } : a.setImmediate = a.nextTick) : "function" == typeof setImmediate ? (a.nextTick = function(e) { setImmediate(e) }, a.setImmediate = a.nextTick) : (a.nextTick = function(e) { setTimeout(e, 0) }, a.setImmediate = a.nextTick), a.each = function(e, t, r) { if (r = r || function() {}, !e.length) return r(); var n = 0; function i(t) { t ? (r(t), r = function() {}) : (n += 1) >= e.length && r() } l(e, (function(e) { t(e, u(i)) })) }, a.forEach = a.each, a.eachSeries = function(e, t, r) { if (r = r || function() {}, !e.length) return r(); var n = 0, i = function() { t(e[n], (function(t) { t ? (r(t), r = function() {}) : (n += 1) >= e.length ? r() : i() })) }; i() }, a.forEachSeries = a.eachSeries, a.eachLimit = function(e, t, r, n) { p(t).apply(null, [e, r, n]) }, a.forEachLimit = a.eachLimit; var p = function(e) { return function(t, r, n) { if (n = n || function() {}, !t.length || e <= 0) return n(); var i = 0, o = 0, a = 0; ! function u() { if (i >= t.length) return n(); for (; a < e && o < t.length;) a += 1, r(t[(o += 1) - 1], (function(e) { e ? (n(e), n = function() {}) : (a -= 1, (i += 1) >= t.length ? n() : u()) })) }() } }, d = function(e) { return function() { var t = Array.prototype.slice.call(arguments); return e.apply(null, [a.each].concat(t)) } }, y = function(e) { return function() { var t = Array.prototype.slice.call(arguments); return e.apply(null, [a.eachSeries].concat(t)) } }, g = function(e, t, r, n) { if (t = c(t, (function(e, t) { return { index: t, value: e } })), n) { var i = []; e(t, (function(e, t) { r(e.value, (function(r, n) { i[e.index] = n, t(r) })) }), (function(e) { n(e, i) })) } else e(t, (function(e, t) { r(e.value, (function(e) { t(e) })) })) }; a.map = d(g), a.mapSeries = y(g), a.mapLimit = function(e, t, r, n) { return v(t)(e, r, n) }; var v = function(e) { return function(e, t) { return function() { var r = Array.prototype.slice.call(arguments); return t.apply(null, [p(e)].concat(r)) } }(e, g) }; a.reduce = function(e, t, r, n) { a.eachSeries(e, (function(e, n) { r(t, e, (function(e, r) { t = r, n(e) })) }), (function(e) { n(e, t) })) }, a.inject = a.reduce, a.foldl = a.reduce, a.reduceRight = function(e, t, r, n) { var i = c(e, (function(e) { return e })).reverse(); a.reduce(i, t, r, n) }, a.foldr = a.reduceRight; var m = function(e, t, r, n) { var i = []; e(t = c(t, (function(e, t) { return { index: t, value: e } })), (function(e, t) { r(e.value, (function(r) { r && i.push(e), t() })) }), (function(e) { n(c(i.sort((function(e, t) { return e.index - t.index })), (function(e) { return e.value }))) })) }; a.filter = d(m), a.filterSeries = y(m), a.select = a.filter, a.selectSeries = a.filterSeries; var b = function(e, t, r, n) { var i = []; e(t = c(t, (function(e, t) { return { index: t, value: e } })), (function(e, t) { r(e.value, (function(r) { r || i.push(e), t() })) }), (function(e) { n(c(i.sort((function(e, t) { return e.index - t.index })), (function(e) { return e.value }))) })) }; a.reject = d(b), a.rejectSeries = y(b); var w = function(e, t, r, n) { e(t, (function(e, t) { r(e, (function(r) { r ? (n(e), n = function() {}) : t() })) }), (function(e) { n() })) }; a.detect = d(w), a.detectSeries = y(w), a.some = function(e, t, r) { a.each(e, (function(e, n) { t(e, (function(e) { e && (r(!0), r = function() {}), n() })) }), (function(e) { r(!1) })) }, a.any = a.some, a.every = function(e, t, r) { a.each(e, (function(e, n) { t(e, (function(e) { e || (r(!1), r = function() {}), n() })) }), (function(e) { r(!0) })) }, a.all = a.every, a.sortBy = function(e, t, r) { a.map(e, (function(e, r) { t(e, (function(t, n) { t ? r(t) : r(null, { value: e, criteria: n }) })) }), (function(e, t) { if (e) return r(e); r(null, c(t.sort((function(e, t) { var r = e.criteria, n = t.criteria; return r < n ? -1 : r > n ? 1 : 0 })), (function(e) { return e.value }))) })) }, a.auto = function(e, t) { t = t || function() {}; var r = h(e), n = r.length; if (!n) return t(); var i = {}, o = [], u = function(e) { o.unshift(e) }, s = function() { n--, l(o.slice(0), (function(e) { e() })) }; u((function() { if (!n) { var e = t; t = function() {}, e(null, i) } })), l(r, (function(r) { var n = f(e[r]) ? e[r] : [e[r]], c = function(e) { var n = Array.prototype.slice.call(arguments, 1); if (n.length <= 1 && (n = n[0]), e) { var o = {}; l(h(i), (function(e) { o[e] = i[e] })), o[r] = n, t(e, o), t = function() {} } else i[r] = n, a.setImmediate(s) }, p = n.slice(0, Math.abs(n.length - 1)) || [], d = function() { return t = function(e, t) { return e && i.hasOwnProperty(t) }, n = !0, ((e = p).reduce ? e.reduce(t, n) : (l(e, (function(e, r, i) { n = t(n, e) })), n)) && !i.hasOwnProperty(r); var e, t, n }; if (d()) n[n.length - 1](c, i); else { var y = function() { d() && (function(e) { for (var t = 0; t < o.length; t += 1) if (o[t] === e) return void o.splice(t, 1) }(y), n[n.length - 1](c, i)) }; u(y) } })) }, a.retry = function(e, t, r) { var n = []; "function" == typeof e && (r = t, t = e, e = 5), e = parseInt(e, 10) || 5; var i = function(i, o) { for (var u = function(e, t) { return function(r) { e((function(e, n) { r(!e || t, { err: e, result: n }) }), o) } }; e;) n.push(u(t, !(e -= 1))); a.series(n, (function(e, t) { t = t[t.length - 1], (i || r)(t.err, t.result) })) }; return r ? i() : i }, a.waterfall = function(e, t) { if (t = t || function() {}, !f(e)) { var r = new Error("First argument to waterfall must be an array of functions"); return t(r) } if (!e.length) return t(); var n = function(e) { return function(r) { if (r) t.apply(null, arguments), t = function() {}; else { var i = Array.prototype.slice.call(arguments, 1), o = e.next(); o ? i.push(n(o)) : i.push(t), a.setImmediate((function() { e.apply(null, i) })) } } }; n(a.iterator(e))() }; var _ = function(e, t, r) { if (r = r || function() {}, f(t)) e.map(t, (function(e, t) { e && e((function(e) { var r = Array.prototype.slice.call(arguments, 1); r.length <= 1 && (r = r[0]), t.call(null, e, r) })) }), r); else { var n = {}; e.each(h(t), (function(e, r) { t[e]((function(t) { var i = Array.prototype.slice.call(arguments, 1); i.length <= 1 && (i = i[0]), n[e] = i, r(t) })) }), (function(e) { r(e, n) })) } }; a.parallel = function(e, t) { _({ map: a.map, each: a.each }, e, t) }, a.parallelLimit = function(e, t, r) { _({ map: v(t), each: p(t) }, e, r) }, a.series = function(e, t) { if (t = t || function() {}, f(e)) a.mapSeries(e, (function(e, t) { e && e((function(e) { var r = Array.prototype.slice.call(arguments, 1); r.length <= 1 && (r = r[0]), t.call(null, e, r) })) }), t); else { var r = {}; a.eachSeries(h(e), (function(t, n) { e[t]((function(e) { var i = Array.prototype.slice.call(arguments, 1); i.length <= 1 && (i = i[0]), r[t] = i, n(e) })) }), (function(e) { t(e, r) })) } }, a.iterator = function(e) { var t = function(r) { var n = function() { return e.length && e[r].apply(null, arguments), n.next() }; return n.next = function() { return r < e.length - 1 ? t(r + 1) : null }, n }; return t(0) }, a.apply = function(e) { var t = Array.prototype.slice.call(arguments, 1); return function() { return e.apply(null, t.concat(Array.prototype.slice.call(arguments))) } }; var S = function(e, t, r, n) { var i = []; e(t, (function(e, t) { r(e, (function(e, r) { i = i.concat(r || []), t(e) })) }), (function(e) { n(e, i) })) }; a.concat = d(S), a.concatSeries = y(S), a.whilst = function(e, t, r) { e() ? t((function(n) { if (n) return r(n); a.whilst(e, t, r) })) : r() }, a.doWhilst = function(e, t, r) { e((function(n) { if (n) return r(n); var i = Array.prototype.slice.call(arguments, 1); t.apply(null, i) ? a.doWhilst(e, t, r) : r() })) }, a.until = function(e, t, r) { e() ? r() : t((function(n) { if (n) return r(n); a.until(e, t, r) })) }, a.doUntil = function(e, t, r) { e((function(n) { if (n) return r(n); var i = Array.prototype.slice.call(arguments, 1); t.apply(null, i) ? r() : a.doUntil(e, t, r) })) }, a.queue = function(e, t) { function r(e, t, r, n) { if (e.started || (e.started = !0), f(t) || (t = [t]), 0 == t.length) return a.setImmediate((function() { e.drain && e.drain() })); l(t, (function(t) { var i = { data: t, callback: "function" == typeof n ? n : null }; r ? e.tasks.unshift(i) : e.tasks.push(i), e.saturated && e.tasks.length === e.concurrency && e.saturated(), a.setImmediate(e.process) })) } void 0 === t && (t = 1); var n = 0, i = { tasks: [], concurrency: t, saturated: null, empty: null, drain: null, started: !1, paused: !1, push: function(e, t) { r(i, e, !1, t) }, kill: function() { i.drain = null, i.tasks = [] }, unshift: function(e, t) { r(i, e, !0, t) }, process: function() { if (!i.paused && n < i.concurrency && i.tasks.length) { var t = i.tasks.shift(); i.empty && 0 === i.tasks.length && i.empty(), n += 1; var r = u((function() { n -= 1, t.callback && t.callback.apply(t, arguments), i.drain && i.tasks.length + n === 0 && i.drain(), i.process() })); e(t.data, r) } }, length: function() { return i.tasks.length }, running: function() { return n }, idle: function() { return i.tasks.length + n === 0 }, pause: function() { !0 !== i.paused && (i.paused = !0) }, resume: function() { if (!1 !== i.paused) { i.paused = !1; for (var e = 1; e <= i.concurrency; e++) a.setImmediate(i.process) } } }; return i }, a.priorityQueue = function(e, t) { function r(e, t) { return e.priority - t.priority } var n = a.queue(e, t); return n.push = function(e, t, i) { ! function(e, t, n, i) { if (e.started || (e.started = !0), f(t) || (t = [t]), 0 == t.length) return a.setImmediate((function() { e.drain && e.drain() })); l(t, (function(t) { var o = { data: t, priority: n, callback: "function" == typeof i ? i : null }; e.tasks.splice(function(e, t, r) { for (var n = -1, i = e.length - 1; n < i;) { var o = n + (i - n + 1 >>> 1); r(t, e[o]) >= 0 ? n = o : i = o - 1 } return n }(e.tasks, o, r) + 1, 0, o), e.saturated && e.tasks.length === e.concurrency && e.saturated(), a.setImmediate(e.process) })) }(n, e, t, i) }, delete n.unshift, n }, a.cargo = function(e, t) { var r = !1, n = [], i = { tasks: n, payload: t, saturated: null, empty: null, drain: null, drained: !0, push: function(e, r) { f(e) || (e = [e]), l(e, (function(e) { n.push({ data: e, callback: "function" == typeof r ? r : null }), i.drained = !1, i.saturated && n.length === t && i.saturated() })), a.setImmediate(i.process) }, process: function o() { if (!r) { if (0 === n.length) return i.drain && !i.drained && i.drain(), void(i.drained = !0); var a = "number" == typeof t ? n.splice(0, t) : n.splice(0, n.length), u = c(a, (function(e) { return e.data })); i.empty && i.empty(), r = !0, e(u, (function() { r = !1; var e = arguments; l(a, (function(t) { t.callback && t.callback.apply(null, e) })), o() })) } }, length: function() { return n.length }, running: function() { return r } }; return i }; var E = function(e) { return function(t) { var r = Array.prototype.slice.call(arguments, 1); t.apply(null, r.concat([function(t) { var r = Array.prototype.slice.call(arguments, 1); "undefined" != typeof console && (t ? console.error && console.error(t) : console[e] && l(r, (function(t) { console[e](t) }))) }])) } }; a.log = E("log"), a.dir = E("dir"), a.memoize = function(e, t) { var r = {}, n = {}; t = t || function(e) { return e }; var i = function() { var i = Array.prototype.slice.call(arguments), o = i.pop(), u = t.apply(null, i); u in r ? a.nextTick((function() { o.apply(null, r[u]) })) : u in n ? n[u].push(o) : (n[u] = [o], e.apply(null, i.concat([function() { r[u] = arguments; var e = n[u]; delete n[u]; for (var t = 0, i = e.length; t < i; t++) e[t].apply(null, arguments) }]))) }; return i.memo = r, i.unmemoized = e, i }, a.unmemoize = function(e) { return function() { return (e.unmemoized || e).apply(null, arguments) } }, a.times = function(e, t, r) { for (var n = [], i = 0; i < e; i++) n.push(i); return a.map(n, t, r) }, a.timesSeries = function(e, t, r) { for (var n = [], i = 0; i < e; i++) n.push(i); return a.mapSeries(n, t, r) }, a.seq = function() { var e = arguments; return function() { var t = this, r = Array.prototype.slice.call(arguments), n = r.pop(); a.reduce(e, r, (function(e, r, n) { r.apply(t, e.concat([function() { var e = arguments[0], t = Array.prototype.slice.call(arguments, 1); n(e, t) }])) }), (function(e, r) { n.apply(t, [e].concat(r)) })) } }, a.compose = function() { return a.seq.apply(null, Array.prototype.reverse.call(arguments)) }; var R = function(e, t) { var r = function() { var r = this, n = Array.prototype.slice.call(arguments), i = n.pop(); return e(t, (function(e, t) { e.apply(r, n.concat([t])) }), i) }; if (arguments.length > 2) { var n = Array.prototype.slice.call(arguments, 2); return r.apply(this, n) } return r }; a.applyEach = d(R), a.applyEachSeries = y(R), a.forever = function(e, t) { ! function r(n) { if (n) { if (t) return t(n); throw n } e(r) }() }, e.exports ? e.exports = a : void 0 === (n = function() { return a }.apply(t, [])) || (e.exports = n) }() }, 830: (e, t, r) => { e.exports = i; var n = r(187).EventEmitter; function i() { n.call(this) } r(717)(i, n), i.Readable = r(481), i.Writable = r(229), i.Duplex = r(753), i.Transform = r(605), i.PassThrough = r(725), i.finished = r(610), i.pipeline = r(946), i.Stream = i, i.prototype.pipe = function(e, t) { var r = this; function i(t) { e.writable && !1 === e.write(t) && r.pause && r.pause() } function o() { r.readable && r.resume && r.resume() } r.on("data", i), e.on("drain", o), e._isStdio || t && !1 === t.end || (r.on("end", u), r.on("close", s)); var a = !1; function u() { a || (a = !0, e.end()) } function s() { a || (a = !0, "function" == typeof e.destroy && e.destroy()) } function f(e) { if (l(), 0 === n.listenerCount(this, "error")) throw e } function l() { r.removeListener("data", i), e.removeListener("drain", o), r.removeListener("end", u), r.removeListener("close", s), r.removeListener("error", f), e.removeListener("error", f), r.removeListener("end", l), r.removeListener("close", l), e.removeListener("close", l) } return r.on("error", f), e.on("error", f), r.on("end", l), r.on("close", l), e.on("close", l), e.emit("pipe", r), e } }, 553: (e, t, r) => { "use strict"; var n = r(509).Buffer, i = n.isEncoding || function(e) { switch ((e = "" + e) && e.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 o(e) { var t; switch (this.encoding = function(e) { var t = function(e) { if (!e) return "utf8"; for (var t;;) switch (e) { 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 e; default: if (t) return; e = ("" + e).toLowerCase(), t = !0 } }(e); if ("string" != typeof t && (n.isEncoding === i || !i(e))) throw new Error("Unknown encoding: " + e); return t || e }(e), this.encoding) { case "utf16le": this.text = s, this.end = f, t = 4; break; case "utf8": this.fillLast = u, t = 4; break; case "base64": this.text = l, this.end = c, t = 3; break; default: return this.write = h, void(this.end = p) } this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(t) } function a(e) { return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2 } function u(e) { var t = this.lastTotal - this.lastNeed, r = function(e, t, r) { if (128 != (192 & t[0])) return e.lastNeed = 0, "�"; if (e.lastNeed > 1 && t.length > 1) { if (128 != (192 & t[1])) return e.lastNeed = 1, "�"; if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) return e.lastNeed = 2, "�" } }(this, e); return void 0 !== r ? r : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (e.copy(this.lastChar, t, 0, e.length), void(this.lastNeed -= e.length)) } function s(e, t) { if ((e.length - t) % 2 == 0) { var r = e.toString("utf16le", t); if (r) { var n = r.charCodeAt(r.length - 1); if (n >= 55296 && n <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], r.slice(0, -1) } return r } return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1) } function f(e) { var t = e && e.length ? this.write(e) : ""; if (this.lastNeed) { var r = this.lastTotal - this.lastNeed; return t + this.lastChar.toString("utf16le", 0, r) } return t } function l(e, t) { var r = (e.length - t) % 3; return 0 === r ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, 1 === r ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r)) } function c(e) { var t = e && e.length ? this.write(e) : ""; return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t } function h(e) { return e.toString(this.encoding) } function p(e) { return e && e.length ? this.write(e) : "" } t.s = o, o.prototype.write = function(e) { if (0 === e.length) return ""; var t, r; if (this.lastNeed) { if (void 0 === (t = this.fillLast(e))) return ""; r = this.lastNeed, this.lastNeed = 0 } else r = 0; return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "" }, o.prototype.end = function(e) { var t = e && e.length ? this.write(e) : ""; return this.lastNeed ? t + "�" : t }, o.prototype.text = function(e, t) { var r = function(e, t, r) { var n = t.length - 1; if (n < r) return 0; var i = a(t[n]); return i >= 0 ? (i > 0 && (e.lastNeed = i - 1), i) : --n < r || -2 === i ? 0 : (i = a(t[n])) >= 0 ? (i > 0 && (e.lastNeed = i - 2), i) : --n < r || -2 === i ? 0 : (i = a(t[n])) >= 0 ? (i > 0 && (2 === i ? i = 0 : e.lastNeed = i - 3), i) : 0 }(this, e, t); if (!this.lastNeed) return e.toString("utf8", t); this.lastTotal = r; var n = e.length - (r - this.lastNeed); return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n) }, o.prototype.fillLast = function(e) { if (this.lastNeed <= e.length) return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length } }, 927: (e, t, r) => { function n(e) { try { if (!r.g.localStorage) return !1 } catch (e) { return !1 } var t = r.g.localStorage[e]; return null != t && "true" === String(t).toLowerCase() } e.exports = function(e, t) { if (n("noDeprecation")) return e; var r = !1; return function() { if (!r) { if (n("throwDeprecation")) throw new Error(t); n("traceDeprecation") ? console.trace(t) : console.warn(t), r = !0 } return e.apply(this, arguments) } } }, 758: () => {} }, t = {}; function r(n) { if (t[n]) return t[n].exports; var i = t[n] = { exports: {} }; return e[n].call(i.exports, i, i.exports, r), i.exports } r.d = (e, t) => { for (var n in t) r.o(t, n) && !r.o(e, n) && Object.defineProperty(e, n, { enumerable: !0, get: t[n] }) }, r.g = function() { if ("object" == typeof globalThis) return globalThis; try { return this || new Function("return this")() } catch (e) { if ("object" == typeof window) return window } }(), r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), r.r = e => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, r(204) })();