UNPKG

@qq447665722/klinecharts-pro

Version:

Financial chart built out of the box based on KLineChart.

1,665 lines 218 kB
var g5 = Object.defineProperty; var y5 = (e, t, n) => t in e ? g5(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var h1 = (e, t, n) => (y5(e, typeof t != "symbol" ? t + "" : t, n), n); import { utils as N, init as h5, FormatDateType as F1, DomPosition as j0, ActionType as m5, dispose as d5, TooltipIconPosition as j1, registerOverlay as p5 } from "klinecharts"; function D1(e, t, n) { const r = (e.x - t.x) * Math.cos(n) - (e.y - t.y) * Math.sin(n) + t.x, a = (e.x - t.x) * Math.sin(n) + (e.y - t.y) * Math.cos(n) + t.y; return { x: r, y: a }; } function h0(e, t) { if (e.length > 1) { let n; return e[0].x === e[1].x && e[0].y !== e[1].y ? e[0].y < e[1].y ? n = { x: e[0].x, y: t.height } : n = { x: e[0].x, y: 0 } : e[0].x > e[1].x ? n = { x: 0, y: N.getLinearYFromCoordinates(e[0], e[1], { x: 0, y: e[0].y }) } : n = { x: t.width, y: N.getLinearYFromCoordinates(e[0], e[1], { x: t.width, y: e[0].y }) }, { coordinates: [e[0], n] }; } return []; } function w9(e, t) { const n = Math.abs(e.x - t.x), r = Math.abs(e.y - t.y); return Math.sqrt(n * n + r * r); } const v5 = { name: "arrow", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { if (e.length > 1) { const t = e[1].x > e[0].x ? 0 : 1, n = N.getLinearSlopeIntercept(e[0], e[1]); let r; n ? r = Math.atan(n[0]) + Math.PI * t : e[1].y > e[0].y ? r = Math.PI / 2 : r = Math.PI / 2 * 3; const a = D1({ x: e[1].x - 8, y: e[1].y + 4 }, e[1], r), s = D1({ x: e[1].x - 8, y: e[1].y - 4 }, e[1], r); return [ { type: "line", attrs: { coordinates: e } }, { type: "line", ignoreEvent: !0, attrs: { coordinates: [a, e[1], s] } } ]; } return []; } }, _5 = { name: "circle", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { circle: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e }) => { if (e.length > 1) { const t = w9(e[0], e[1]); return { type: "circle", attrs: { ...e[0], r: t }, styles: { style: "stroke_fill" } }; } return []; } }, L5 = { name: "rect", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { polygon: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e }) => e.length > 1 ? [ { type: "polygon", attrs: { coordinates: [ e[0], { x: e[1].x, y: e[0].y }, e[1], { x: e[0].x, y: e[1].y } ] }, styles: { style: "stroke_fill" } } ] : [] }, b5 = { name: "parallelogram", totalStep: 4, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { polygon: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e }) => { if (e.length === 2) return [ { type: "line", ignoreEvent: !0, attrs: { coordinates: e } } ]; if (e.length === 3) { const t = { x: e[0].x + (e[2].x - e[1].x), y: e[2].y }; return [ { type: "polygon", attrs: { coordinates: [e[0], e[1], e[2], t] }, styles: { style: "stroke_fill" } } ]; } return []; }, performEventPressedMove: ({ points: e, performPointIndex: t, performPoint: n }) => { t < 2 && (e[0].price = n.price, e[1].price = n.price); }, performEventMoveForDrawing: ({ currentStep: e, points: t, performPoint: n }) => { e === 2 && (t[0].price = n.price); } }, $5 = { name: "triangle", totalStep: 4, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { polygon: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e }) => [ { type: "polygon", attrs: { coordinates: e }, styles: { style: "stroke_fill" } } ] }, x5 = { name: "fibonacciCircle", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { if (e.length > 1) { const t = Math.abs(e[0].x - e[1].x), n = Math.abs(e[0].y - e[1].y), r = Math.sqrt(t * t + n * n), a = [0.236, 0.382, 0.5, 0.618, 0.786, 1], s = [], o = []; return a.forEach((i) => { const l = r * i; s.push( { ...e[0], r: l } ), o.push({ x: e[0].x, y: e[0].y + l + 6, text: `${(i * 100).toFixed(1)}%` }); }), [ { type: "circle", attrs: s, styles: { style: "stroke" } }, { type: "text", ignoreEvent: !0, attrs: o } ]; } return []; } }, k5 = { name: "fibonacciSegment", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e, overlay: t, precision: n }) => { const r = [], a = []; if (e.length > 1) { const s = e[1].x > e[0].x ? e[0].x : e[1].x, o = [1, 0.786, 0.618, 0.5, 0.382, 0.236, 0], i = e[0].y - e[1].y, l = t.points, C = l[0].value - l[1].value; o.forEach((f) => { const c = e[1].y + i * f, _ = (l[1].value + C * f).toFixed(n.price); r.push({ coordinates: [{ x: e[0].x, y: c }, { x: e[1].x, y: c }] }), a.push({ x: s, y: c, text: `${_} (${(f * 100).toFixed(1)}%)`, baseline: "bottom" }); }); } return [ { type: "line", attrs: r }, { type: "text", ignoreEvent: !0, attrs: a } ]; } }, A5 = { name: "fibonacciSpiral", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e, bounding: t }) => { if (e.length > 1) { const n = w9(e[0], e[1]) / Math.sqrt(24), r = e[1].x > e[0].x ? 0 : 1, a = N.getLinearSlopeIntercept(e[0], e[1]); let s; a ? s = Math.atan(a[0]) + Math.PI * r : e[1].y > e[0].y ? s = Math.PI / 2 : s = Math.PI / 2 * 3; const o = D1( { x: e[0].x - n, y: e[0].y }, e[0], s ), i = D1( { x: e[0].x - n, y: e[0].y - n }, e[0], s ), l = [{ ...o, r: n, startAngle: s, endAngle: s + Math.PI / 2 }, { ...i, r: n * 2, startAngle: s + Math.PI / 2, endAngle: s + Math.PI }]; let C = e[0].x - n, f = e[0].y - n; for (let c = 2; c < 9; c++) { const _ = l[c - 2].r + l[c - 1].r; let b = 0; switch (c % 4) { case 0: { b = s, C -= l[c - 2].r; break; } case 1: { b = s + Math.PI / 2, f -= l[c - 2].r; break; } case 2: { b = s + Math.PI, C += l[c - 2].r; break; } case 3: { b = s + Math.PI / 2 * 3, f += l[c - 2].r; break; } } const A = b + Math.PI / 2, K = D1({ x: C, y: f }, e[0], s); l.push({ ...K, r: _, startAngle: b, endAngle: A }); } return [ { type: "arc", attrs: l }, { type: "line", attrs: h0(e, t) } ]; } return []; } }, w5 = { name: "fibonacciSpeedResistanceFan", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e, bounding: t }) => { const n = []; let r = []; const a = []; if (e.length > 1) { const s = e[1].x > e[0].x ? -38 : 4, o = e[1].y > e[0].y ? -2 : 20, i = e[1].x - e[0].x, l = e[1].y - e[0].y; [1, 0.75, 0.618, 0.5, 0.382, 0.25, 0].forEach((f) => { const c = e[1].x - i * f, _ = e[1].y - l * f; n.push({ coordinates: [{ x: c, y: e[0].y }, { x: c, y: e[1].y }] }), n.push({ coordinates: [{ x: e[0].x, y: _ }, { x: e[1].x, y: _ }] }), r = r.concat(h0([e[0], { x: c, y: e[1].y }], t)), r = r.concat(h0([e[0], { x: e[1].x, y: _ }], t)), a.unshift({ x: e[0].x + s, y: _ + 10, text: `${f.toFixed(3)}` }), a.unshift({ x: c - 18, y: e[0].y + o, text: `${f.toFixed(3)}` }); }); } return [ { type: "line", attrs: n }, { type: "line", attrs: r }, { type: "text", ignoreEvent: !0, attrs: a } ]; } }, M5 = { name: "fibonacciExtension", totalStep: 4, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e, overlay: t, precision: n }) => { const r = [], a = []; if (e.length > 2) { const s = t.points, o = s[1].value - s[0].value, i = e[1].y - e[0].y, l = [0, 0.236, 0.382, 0.5, 0.618, 0.786, 1], C = e[2].x > e[1].x ? e[1].x : e[2].x; l.forEach((f) => { const c = e[2].y + i * f, _ = (s[2].value + o * f).toFixed(n.price); r.push({ coordinates: [{ x: e[1].x, y: c }, { x: e[2].x, y: c }] }), a.push({ x: C, y: c, text: `${_} (${(f * 100).toFixed(1)}%)`, baseline: "bottom" }); }); } return [ { type: "line", attrs: { coordinates: e }, styles: { style: "dashed" } }, { type: "line", attrs: r }, { type: "text", ignoreEvent: !0, attrs: a } ]; } }, S5 = { name: "gannBox", totalStep: 3, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { polygon: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e }) => { if (e.length > 1) { const t = (e[1].y - e[0].y) / 4, n = e[1].x - e[0].x, r = [ { coordinates: [e[0], { x: e[1].x, y: e[1].y - t }] }, { coordinates: [e[0], { x: e[1].x, y: e[1].y - t * 2 }] }, { coordinates: [{ x: e[0].x, y: e[1].y }, { x: e[1].x, y: e[0].y + t }] }, { coordinates: [{ x: e[0].x, y: e[1].y }, { x: e[1].x, y: e[0].y + t * 2 }] }, { coordinates: [{ ...e[0] }, { x: e[0].x + n * 0.236, y: e[1].y }] }, { coordinates: [{ ...e[0] }, { x: e[0].x + n * 0.5, y: e[1].y }] }, { coordinates: [{ x: e[0].x, y: e[1].y }, { x: e[0].x + n * 0.236, y: e[0].y }] }, { coordinates: [{ x: e[0].x, y: e[1].y }, { x: e[0].x + n * 0.5, y: e[0].y }] } ], a = [ { coordinates: [e[0], e[1]] }, { coordinates: [{ x: e[0].x, y: e[1].y }, { x: e[1].x, y: e[0].y }] } ]; return [ { type: "line", attrs: [ { coordinates: [e[0], { x: e[1].x, y: e[0].y }] }, { coordinates: [{ x: e[1].x, y: e[0].y }, e[1]] }, { coordinates: [e[1], { x: e[0].x, y: e[1].y }] }, { coordinates: [{ x: e[0].x, y: e[1].y }, e[0]] } ] }, { type: "polygon", ignoreEvent: !0, attrs: { coordinates: [ e[0], { x: e[1].x, y: e[0].y }, e[1], { x: e[0].x, y: e[1].y } ] }, styles: { style: "fill" } }, { type: "line", attrs: r, styles: { style: "dashed" } }, { type: "line", attrs: a } ]; } return []; } }, T5 = { name: "threeWaves", totalStep: 5, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { const t = e.map((n, r) => ({ ...n, text: `(${r})`, baseline: "bottom" })); return [ { type: "line", attrs: { coordinates: e } }, { type: "text", ignoreEvent: !0, attrs: t } ]; } }, I5 = { name: "fiveWaves", totalStep: 7, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { const t = e.map((n, r) => ({ ...n, text: `(${r})`, baseline: "bottom" })); return [ { type: "line", attrs: { coordinates: e } }, { type: "text", ignoreEvent: !0, attrs: t } ]; } }, D5 = { name: "eightWaves", totalStep: 10, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { const t = e.map((n, r) => ({ ...n, text: `(${r})`, baseline: "bottom" })); return [ { type: "line", attrs: { coordinates: e } }, { type: "text", ignoreEvent: !0, attrs: t } ]; } }, P5 = { name: "anyWaves", totalStep: Number.MAX_SAFE_INTEGER, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { const t = e.map((n, r) => ({ ...n, text: `(${r})`, baseline: "bottom" })); return [ { type: "line", attrs: { coordinates: e } }, { type: "text", ignoreEvent: !0, attrs: t } ]; } }, B5 = { name: "abcd", totalStep: 5, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, createPointFigures: ({ coordinates: e }) => { let t = [], n = []; const r = ["A", "B", "C", "D"], a = e.map((s, o) => ({ ...s, baseline: "bottom", text: `(${r[o]})` })); return e.length > 2 && (t = [e[0], e[2]], e.length > 3 && (n = [e[1], e[3]])), [ { type: "line", attrs: { coordinates: e } }, { type: "line", attrs: [{ coordinates: t }, { coordinates: n }], styles: { style: "dashed" } }, { type: "text", ignoreEvent: !0, attrs: a } ]; } }, O5 = { name: "xabcd", totalStep: 6, needDefaultPointFigure: !0, needDefaultXAxisFigure: !0, needDefaultYAxisFigure: !0, styles: { polygon: { color: "rgba(22, 119, 255, 0.15)" } }, createPointFigures: ({ coordinates: e, overlay: t }) => { const n = [], r = [], a = ["X", "A", "B", "C", "D"], s = e.map((o, i) => ({ ...o, baseline: "bottom", text: `(${a[i]})` })); return e.length > 2 && (n.push({ coordinates: [e[0], e[2]] }), r.push({ coordinates: [e[0], e[1], e[2]] }), e.length > 3 && (n.push({ coordinates: [e[1], e[3]] }), e.length > 4 && (n.push({ coordinates: [e[2], e[4]] }), r.push({ coordinates: [e[2], e[3], e[4]] })))), [ { type: "line", attrs: { coordinates: e } }, { type: "line", attrs: n, styles: { style: "dashed" } }, { type: "polygon", ignoreEvent: !0, attrs: r }, { type: "text", ignoreEvent: !0, attrs: s } ]; } }, E5 = [ v5, _5, L5, $5, b5, x5, k5, A5, w5, M5, S5, T5, I5, D5, P5, B5, O5 ]; class vu { constructor(t) { h1(this, "_apiKey"); h1(this, "_prevSymbolMarket"); h1(this, "_ws"); this._apiKey = t; } async searchSymbols(t) { return await ((await (await fetch(`https://api.polygon.io/v3/reference/tickers?apiKey=${this._apiKey}&active=true&search=${t ?? ""}`)).json()).results || []).map((a) => ({ ticker: a.ticker, name: a.name, shortName: a.ticker, market: a.market, exchange: a.primary_exchange, priceCurrency: a.currency_name, type: a.type, logo: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAA66SURBVHic7Z17cFTVGcB/527Ai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gdJKlM5fflQs4GACBuZycJJpE3Aj/YQYJJ4nZ2mviYEQMAEHfQRJIJ5JcDL2kkyQRxh7nKbsbLxMtaBpJkFZJRpr99XCPYbK/5RhN3jM0AKcQs9mAxjjDnGUaPOizGmVY+eDADpLD9BA8CLlJ58qTxEFX8NJejXnd43ilEVnMz8Bj5uwNdDgJ3uvXwOcWXVjH2BdIr9PSy9OZooIAr3fj2dTG+B+gMcSvbiFGRjydwgGABMf1bPffD+YysYQKSxeTDyzJpQjBTJ5jDBL7MAOmIKuqRjAYegKOVKo5jDgMPIBntt/IhgBkgHfkkw0jwaOTyDkwhWEmMuX5N952LEALkE1yKZH4k0tBMIHgHwb3iNv4avCghQtYwHcl9hD0r2T0bEMwTVeFxkoXKAFLIhUzE4q5QF6nQQVBHkkfEHN4MWpRMQmkAKexyNbcguAkZsRb3gj12vaWnMsuyhIlQG0AKuYwY+6hEcgMqBO3koGXqgv1AHYLnGMDqzIJMYSQSBpCOXEZvWhmPYBqSy4CRAYu0BcHrSFZQzJr0IoxRIHIGkImsZSAJxiK4BMl5wBjAqz7y7cAmu8HGOmKs9eKGzk8ibwCZ2LeQZVgMR1KOpAwYBJQAxUB/lIEUIr5smBEHOlAKbgNagRZgF4ImBI0k2UoVTV7dygXF/wF+fTz59Jc5ygAAAABJRU5ErkJggg==" })); } async getHistoryKLineData(t, n, r, a) { return await ((await (await fetch(`https://api.polygon.io/v2/aggs/ticker/${t.ticker}/range/${n.multiplier}/${n.timespan}/${r}/${a}?apiKey=${this._apiKey}`)).json()).results || []).map((i) => ({ timestamp: i.t, open: i.o, high: i.h, low: i.l, close: i.c, volume: i.v, turnover: i.vw })); } subscribe(t, n, r) { var a, s; this._prevSymbolMarket !== t.market ? ((a = this._ws) == null || a.close(), this._ws = new WebSocket(`wss://delayed.polygon.io/${t.market}`), this._ws.onopen = () => { var o; (o = this._ws) == null || o.send(JSON.stringify({ action: "auth", params: this._apiKey })); }, this._ws.onmessage = (o) => { var l; const i = JSON.parse(o.data); i[0].ev === "status" ? i[0].status === "auth_success" && ((l = this._ws) == null || l.send(JSON.stringify({ action: "subscribe", params: `T.${t.ticker}` }))) : "sym" in i && r({ timestamp: i.s, open: i.o, high: i.h, low: i.l, close: i.c, volume: i.v, turnover: i.vw }); }) : (s = this._ws) == null || s.send(JSON.stringify({ action: "subscribe", params: `T.${t.ticker}` })), this._prevSymbolMarket = t.market; } unsubscribe(t, n) { } } const N5 = !1, K5 = (e, t) => e === t, m0 = Symbol("solid-proxy"), F5 = typeof Proxy == "function", j5 = Symbol("solid-track"), Y1 = { equals: K5 }; let M9 = P9; const s1 = 1, V1 = 2, S9 = { owned: null, cleanups: null, context: null, owner: null }, u0 = {}; var Z = null; let C0 = null, Z5 = null, E = null, U = null, i1 = null, t0 = 0; function z1(e, t) { const n = E, r = Z, a = e.length === 0, s = t === void 0 ? r : t, o = a ? S9 : { owned: null, cleanups: null, context: s ? s.context : null, owner: s }, i = a ? e : () => e(() => e1(() => P1(o))); Z = o, E = null; try { return u1(i, !0); } finally { E = n, Z = r; } } function L(e, t) { t = t ? Object.assign({}, Y1, t) : Y1; const n = { value: e, observers: null, observerSlots: null, comparator: t.equals || void 0 }, r = (a) => (typeof a == "function" && (a = a(n.value)), D9(n, a)); return [I9.bind(n), r]; } function Z0(e, t, n) { const r = n0(e, t, !0, s1); d1(r); } function R(e, t, n) { const r = n0(e, t, !1, s1); d1(r); } function a1(e, t, n) { M9 = H5; const r = n0(e, t, !1, s1); (!n || !n.render) && (r.user = !0), i1 ? i1.push(r) : d1(r); } function F(e, t, n) { n = n ? Object.assign({}, Y1, n) : Y1; const r = n0(e, t, !0, 0); return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, d1(r), I9.bind(r); } function Q5(e) { return e && typeof e == "object" && "then" in e; } function R5(e, t, n) { let r, a, s; typeof t == "function" ? (r = e, a = t, s = n || {}) : (r = !0, a = e, s = t || {}); let o = null, i = u0, l = !1, C = "initialValue" in s, f = typeof r == "function" && F(r); const c = /* @__PURE__ */ new Set(), [_, b] = (s.storage || L)(s.initialValue), [A, K] = L(void 0), [j, w] = L(void 0, { equals: !1 }), [Q, M] = L(C ? "ready" : "unresolved"); function x(P, S, T, X) { return o === P && (o = null, X !== void 0 && (C = !0), (P === i || S === i) && s.onHydrated && queueMicrotask( () => s.onHydrated(X, { value: S }) ), i = u0, $(S, T)), S; } function $(P, S) { u1(() => { S === void 0 && b(() => P), M(S !== void 0 ? "errored" : C ? "ready" : "unresolved"), K(S); for (const T of c.keys()) T.decrement(); c.clear(); }, !1); } function D() { const P = U5, S = _(), T = A(); if (T !== void 0 && !o) throw T; return E && !E.user && P && Z0(() => { j(), o && (P.resolved || c.has(P) || (P.increment(), c.add(P))); }), S; } function Y(P = !0) { if (P !== !1 && l) return; l = !1; const S = f ? f() : r; if (S == null || S === !1) { x(o, e1(_)); return; } const T = i !== u0 ? i : e1( () => a(S, { value: _(), refetching: P }) ); return Q5(T) ? (o = T, "value" in T ? (T.status === "success" ? x(o, T.value, void 0, S) : x(o, void 0, d0(T.value), S), T) : (l = !0, queueMicrotask(() => l = !1), u1(() => { M(C ? "refreshing" : "pending"), w(); }, !1), T.then( (X) => x(T, X, void 0, S), (X) => x(T, void 0, d0(X), S) ))) : (x(o, T, void 0, S), T); } return Object.defineProperties(D, { state: { get: () => Q() }, error: { get: () => A() }, loading: { get() { const P = Q(); return P === "pending" || P === "refreshing"; } }, latest: { get() { if (!C) return D(); const P = A(); if (P && !o) throw P; return _(); } } }), f ? Z0(() => Y(!1)) : Y(!1), [ D, { refetch: Y, mutate: b } ]; } function e1(e) { if (E === null) return e(); const t = E; E = null; try { return e(); } finally { E = t; } } function T9(e) { a1(() => e1(e)); } function k0(e) { return Z === null || (Z.cleanups === null ? Z.cleanups = [e] : Z.cleanups.push(e)), e; } function z5(e) { const t = E, n = Z; return Promise.resolve().then(() => { E = t, Z = n; let r; return u1(e, !1), E = Z = null, r ? r.done : void 0; }); } let U5; function I9() { if (this.sources && this.state) if (this.state === s1) d1(this); else { const e = U; U = null, u1(() => G1(this), !1), U = e; } if (E) { const e = this.observers ? this.observers.length : 0; E.sources ? (E.sources.push(this), E.sourceSlots.push(e)) : (E.sources = [this], E.sourceSlots = [e]), this.observers ? (this.observers.push(E), this.observerSlots.push(E.sources.length - 1)) : (this.observers = [E], this.observerSlots = [E.sources.length - 1]); } return this.value; } function D9(e, t, n) { let r = e.value; return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && u1(() => { for (let a = 0; a < e.observers.length; a += 1) { const s = e.observers[a], o = C0 && C0.running; o && C0.disposed.has(s), (o ? !s.tState : !s.state) && (s.pure ? U.push(s) : i1.push(s), s.observers && B9(s)), o || (s.state = s1); } if (U.length > 1e6) throw U = [], new Error(); }, !1)), t; } function d1(e) { if (!e.fn) return; P1(e); const t = t0; Y5( e, e.value, t ); } function Y5(e, t, n) { let r; const a = Z, s = E; E = Z = e; try { r = e.fn(t); } catch (o) { return e.pure && (e.state = s1, e.owned && e.owned.forEach(P1), e.owned = null), e.updatedAt = n + 1, O9(o); } finally { E = s, Z = a; } (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? D9(e, r) : e.value = r, e.updatedAt = n); } function n0(e, t, n, r = s1, a) { const s = { fn: e, state: r, updatedAt: null, owned: null, sources: null, sourceSlots: null, cleanups: null, value: t, owner: Z, context: Z ? Z.context : null, pure: n }; return Z === null || Z !== S9 && (Z.owned ? Z.owned.push(s) : Z.owned = [s]), s; } function H1(e) { if (e.state === 0) return; if (e.state === V1) return G1(e); if (e.suspense && e1(e.suspense.inFallback)) return e.suspense.effects.push(e); const t = [e]; for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < t0); ) e.state && t.push(e); for (let n = t.length - 1; n >= 0; n--) if (e = t[n], e.state === s1) d1(e); else if (e.state === V1) { const r = U; U = null, u1(() => G1(e, t[0]), !1), U = r; } } function u1(e, t) { if (U) return e(); let n = !1; t || (U = []), i1 ? n = !0 : i1 = [], t0++; try { const r = e(); return V5(n), r; } catch (r) { n || (i1 = null), U = null, O9(r); } } function V5(e) { if (U && (P9(U), U = null), e) return; const t = i1; i1 = null, t.length && u1(() => M9(t), !1); } function P9(e) { for (let t = 0; t < e.length; t++) H1(e[t]); } function H5(e) { let t, n = 0; for (t = 0; t < e.length; t++) { const r = e[t]; r.user ? e[n++] = r : H1(r); } for (t = 0; t < n; t++) H1(e[t]); } function G1(e, t) { e.state = 0; for (let n = 0; n < e.sources.length; n += 1) { const r = e.sources[n]; if (r.sources) { const a = r.state; a === s1 ? r !== t && (!r.updatedAt || r.updatedAt < t0) && H1(r) : a === V1 && G1(r, t); } } } function B9(e) { for (let t = 0; t < e.observers.length; t += 1) { const n = e.observers[t]; n.state || (n.state = V1, n.pure ? U.push(n) : i1.push(n), n.observers && B9(n)); } } function P1(e) { let t; if (e.sources) for (; e.sources.length; ) { const n = e.sources.pop(), r = e.sourceSlots.pop(), a = n.observers; if (a && a.length) { const s = a.pop(), o = n.observerSlots.pop(); r < a.length && (s.sourceSlots[o] = r, a[r] = s, n.observerSlots[r] = o); } } if (e.tOwned) { for (t = e.tOwned.length - 1; t >= 0; t--) P1(e.tOwned[t]); delete e.tOwned; } if (e.owned) { for (t = e.owned.length - 1; t >= 0; t--) P1(e.owned[t]); e.owned = null; } if (e.cleanups) { for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t](); e.cleanups = null; } e.state = 0; } function d0(e) { return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", { cause: e }); } function O9(e, t = Z) { throw d0(e); } const G5 = Symbol("fallback"); function Q0(e) { for (let t = 0; t < e.length; t++) e[t](); } function X5(e, t, n = {}) { let r = [], a = [], s = [], o = 0, i = t.length > 1 ? [] : null; return k0(() => Q0(s)), () => { let l = e() || [], C = l.length, f, c; return l[j5], e1(() => { let b, A, K, j, w, Q, M, x, $; if (C === 0) o !== 0 && (Q0(s), s = [], r = [], a = [], o = 0, i && (i = [])), n.fallback && (r = [G5], a[0] = z1((D) => (s[0] = D, n.fallback())), o = 1); else if (o === 0) { for (a = new Array(C), c = 0; c < C; c++) r[c] = l[c], a[c] = z1(_); o = C; } else { for (K = new Array(C), j = new Array(C), i && (w = new Array(C)), Q = 0, M = Math.min(o, C); Q < M && r[Q] === l[Q]; Q++) ; for (M = o - 1, x = C - 1; M >= Q && x >= Q && r[M] === l[x]; M--, x--) K[x] = a[M], j[x] = s[M], i && (w[x] = i[M]); for (b = /* @__PURE__ */ new Map(), A = new Array(x + 1), c = x; c >= Q; c--) $ = l[c], f = b.get($), A[c] = f === void 0 ? -1 : f, b.set($, c); for (f = Q; f <= M; f++) $ = r[f], c = b.get($), c !== void 0 && c !== -1 ? (K[c] = a[f], j[c] = s[f], i && (w[c] = i[f]), c = A[c], b.set($, c)) : s[f](); for (c = Q; c < C; c++) c in K ? (a[c] = K[c], s[c] = j[c], i && (i[c] = w[c], i[c](c))) : a[c] = z1(_); a = a.slice(0, o = C), r = l.slice(0); } return a; }); function _(b) { if (s[c] = b, i) { const [A, K] = L(c); return i[c] = K, t(l[c], A); } return t(l[c]); } }; } function m(e, t) { return e1(() => e(t || {})); } function Z1() { return !0; } const J5 = { get(e, t, n) { return t === m0 ? n : e.get(t); }, has(e, t) { return t === m0 ? !0 : e.has(t); }, set: Z1, deleteProperty: Z1, getOwnPropertyDescriptor(e, t) { return { configurable: !0, enumerable: !0, get() { return e.get(t); }, set: Z1, deleteProperty: Z1 }; }, ownKeys(e) { return e.keys(); } }; function f0(e) { return (e = typeof e == "function" ? e() : e) ? e : {}; } function W5() { for (let e = 0, t = this.length; e < t; ++e) { const n = this[e](); if (n !== void 0) return n; } } function E9(...e) { let t = !1; for (let o = 0; o < e.length; o++) { const i = e[o]; t = t || !!i && m0 in i, e[o] = typeof i == "function" ? (t = !0, F(i)) : i; } if (F5 && t) return new Proxy( { get(o) { for (let i = e.length - 1; i >= 0; i--) { const l = f0(e[i])[o]; if (l !== void 0) return l; } }, has(o) { for (let i = e.length - 1; i >= 0; i--) if (o in f0(e[i])) return !0; return !1; }, keys() { const o = []; for (let i = 0; i < e.length; i++) o.push(...Object.keys(f0(e[i]))); return [...new Set(o)]; } }, J5 ); const n = {}, r = /* @__PURE__ */ Object.create(null); for (let o = e.length - 1; o >= 0; o--) { const i = e[o]; if (!i) continue; const l = Object.getOwnPropertyNames(i); for (let C = l.length - 1; C >= 0; C--) { const f = l[C]; if (f === "__proto__" || f === "constructor") continue; const c = Object.getOwnPropertyDescriptor(i, f); if (!r[f]) r[f] = c.get ? { enumerable: !0, configurable: !0, get: W5.bind(n[f] = [c.get.bind(i)]) } : c.value !== void 0 ? c : void 0; else { const _ = n[f]; _ && (c.get ? _.push(c.get.bind(i)) : c.value !== void 0 && _.push(() => c.value)); } } } const a = {}, s = Object.keys(r); for (let o = s.length - 1; o >= 0; o--) { const i = s[o], l = r[i]; l && l.get ? Object.defineProperty(a, i, l) : a[i] = l ? l.value : void 0; } return a; } const q5 = (e) => `Stale read from <${e}>.`; function e6(e) { const t = "fallback" in e && { fallback: () => e.fallback }; return F(X5(() => e.each, e.children, t || void 0)); } function z(e) { const t = e.keyed, n = F(() => e.when, void 0, void 0), r = t ? n : F(n, void 0, { equals: (a, s) => !a == !s }); return F( () => { const a = r(); if (a) { const s = e.children; return typeof s == "function" && s.length > 0 ? e1( () => s( t ? a : () => { if (!e1(r)) throw q5("Show"); return n(); } ) ) : s; } return e.fallback; }, void 0, void 0 ); } function t6(e, t, n) { let r = n.length, a = t.length, s = r, o = 0, i = 0, l = t[a - 1].nextSibling, C = null; for (; o < a || i < s; ) { if (t[o] === n[i]) { o++, i++; continue; } for (; t[a - 1] === n[s - 1]; ) a--, s--; if (a === o) { const f = s < r ? i ? n[i - 1].nextSibling : n[s - i] : l; for (; i < s; ) e.insertBefore(n[i++], f); } else if (s === i) for (; o < a; ) (!C || !C.has(t[o])) && t[o].remove(), o++; else if (t[o] === n[s - 1] && n[i] === t[a - 1]) { const f = t[--a].nextSibling; e.insertBefore(n[i++], t[o++].nextSibling), e.insertBefore(n[--s], f), t[a] = n[s]; } else { if (!C) { C = /* @__PURE__ */ new Map(); let c = i; for (; c < s; ) C.set(n[c], c++); } const f = C.get(t[o]); if (f != null) if (i < f && f < s) { let c = o, _ = 1, b; for (; ++c < a && c < s && !((b = C.get(t[c])) == null || b !== f + _); ) _++; if (_ > f - i) { const A = t[o]; for (; i < f; ) e.insertBefore(n[i++], A); } else e.replaceChild(n[i++], t[o++]); } else o++; else t[o++].remove(); } } } const R0 = "_$DX_DELEGATE"; function n6(e, t, n, r = {}) { let a; return z1((s) => { a = s, t === document ? e() : d(t, e(), t.firstChild ? null : void 0, n); }, r.owner), () => { a(), t.textContent = ""; }; } function y(e, t, n, r) { let a; const s = () => { const i = r ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template"); return i.innerHTML = e, n ? i.content.firstChild.firstChild : r ? i.firstChild : i.content.firstChild; }, o = t ? () => e1(() => document.importNode(a || (a = s()), !0)) : () => (a || (a = s())).cloneNode(!0); return o.cloneNode = o, o; } function n1(e, t = window.document) { const n = t[R0] || (t[R0] = /* @__PURE__ */ new Set()); for (let r = 0, a = e.length; r < a; r++) { const s = e[r]; n.has(s) || (n.add(s), t.addEventListener(s, r6)); } } function H(e, t, n) { n == null ? e.removeAttribute(t) : e.setAttribute(t, n); } function g1(e, t) { t == null ? e.removeAttribute("class") : e.className = t; } function c1(e, t, n, r) { if (r) Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n; else if (Array.isArray(n)) { const a = n[0]; e.addEventListener(t, n[0] = (s) => a.call(e, n[1], s)); } else e.addEventListener(t, n, typeof n != "function" && n); } function p1(e, t, n) { if (!t) return n ? H(e, "style") : t; const r = e.style; if (typeof t == "string") return r.cssText = t; typeof n == "string" && (r.cssText = n = void 0), n || (n = {}), t || (t = {}); let a, s; for (s in n) t[s] == null && r.removeProperty(s), delete n[s]; for (s in t) a = t[s], a !== n[s] && (r.setProperty(s, a), n[s] = a); return n; } function A0(e, t, n) { return e1(() => e(t, n)); } function d(e, t, n, r) { if (n !== void 0 && !r && (r = []), typeof t != "function") return X1(e, t, r, n); R((a) => X1(e, t(), a, n), r); } function r6(e) { let t = e.target; const n = `$$${e.type}`, r = e.target, a = e.currentTarget, s = (l) => Object.defineProperty(e, "target", { configurable: !0, value: l }), o = () => { const l = t[n]; if (l && !t.disabled) { const C = t[`${n}Data`]; if (C !== void 0 ? l.call(t, C, e) : l.call(t, e), e.cancelBubble) return; } return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && s(t.host), !0; }, i = () => { for (; o() && (t = t._$host || t.parentNode || t.host); ) ; }; if (Object.defineProperty(e, "currentTarget", { configurable: !0, get() { return t || document; } }), e.composedPath) { const l = e.composedPath(); s(l[0]); for (let C = 0; C < l.length - 2 && (t = l[C], !!o()); C++) { if (t._$host) { t = t._$host, i(); break; } if (t.parentNode === a) break; } } else i(); s(r); } function X1(e, t, n, r, a) { for (; typeof n == "function"; ) n = n(); if (t === n) return n; const s = typeof t, o = r !== void 0; if (e = o && n[0] && n[0].parentNode || e, s === "string" || s === "number") { if (s === "number" && (t = t.toString(), t === n)) return n; if (o) { let i = n[0]; i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = m1(e, n, r, i); } else n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t; } else if (t == null || s === "boolean") n = m1(e, n, r); else { if (s === "function") return R(() => { let i = t(); for (; typeof i == "function"; ) i = i(); n = X1(e, i, n, r); }), () => n; if (Array.isArray(t)) { const i = [], l = n && Array.isArray(n); if (p0(i, t, n, a)) return R(() => n = X1(e, i, n, r, !0)), () => n; if (i.length === 0) { if (n = m1(e, n, r), o) return n; } else l ? n.length === 0 ? z0(e, i, r) : t6(e, n, i) : (n && m1(e), z0(e, i)); n = i; } else if (t.nodeType) { if (Array.isArray(n)) { if (o) return n = m1(e, n, r, t); m1(e, n, null, t); } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild); n = t; } } return n; } function p0(e, t, n, r) { let a = !1; for (let s = 0, o = t.length; s < o; s++) { let i = t[s], l = n && n[e.length], C; if (!(i == null || i === !0 || i === !1)) if ((C = typeof i) == "object" && i.nodeType) e.push(i); else if (Array.isArray(i)) a = p0(e, i, l) || a; else if (C === "function") if (r) { for (; typeof i == "function"; ) i = i(); a = p0( e, Array.isArray(i) ? i : [i], Array.isArray(l) ? l : [l] ) || a; } else e.push(i), a = !0; else { const f = String(i); l && l.nodeType === 3 && l.data === f ? e.push(l) : e.push(document.createTextNode(f)); } } return a; } function z0(e, t, n = null) { for (let r = 0, a = t.length; r < a; r++) e.insertBefore(t[r], n); } function m1(e, t, n, r) { if (n === void 0) return e.textContent = ""; const a = r || document.createTextNode(""); if (t.length) { let s = !1; for (let o = t.length - 1; o >= 0; o--) { const i = t[o]; if (a !== i) { const l = i.parentNode === e; !s && !o ? l ? e.replaceChild(a, i) : e.insertBefore(a, n) : l && i.remove(); } else s = !0; } } else e.insertBefore(a, n); return [a]; } var Q1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function N9(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var a6 = typeof Q1 == "object" && Q1 && Q1.Object === Object && Q1, K9 = a6, i6 = K9, s6 = typeof self == "object" && self && self.Object === Object && self, o6 = i6 || s6 || Function("return this")(), r1 = o6, l6 = r1, c6 = l6.Symbol, r0 = c6, U0 = r0, F9 = Object.prototype, u6 = F9.hasOwnProperty, C6 = F9.toString, I1 = U0 ? U0.toStringTag : void 0; function f6(e) { var t = u6.call(e, I1), n = e[I1]; try { e[I1] = void 0; var r = !0; } catch { } var a = C6.call(e); return r && (t ? e[I1] = n : delete e[I1]), a; } var g6 = f6, y6 = Object.prototype, h6 = y6.toString; function m6(e) { return h6.call(e); } var d6 = m6, Y0 = r0, p6 = g6, v6 = d6, _6 = "[object Null]", L6 = "[object Undefined]", V0 = Y0 ? Y0.toStringTag : void 0; function b6(e) { return e == null ? e === void 0 ? L6 : _6 : V0 && V0 in Object(e) ? p6(e) : v6(e); } var B1 = b6; function $6(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var v1 = $6, x6 = B1, k6 = v1, A6 = "[object AsyncFunction]", w6 = "[object Function]", M6 = "[object GeneratorFunction]", S6 = "[object Proxy]"; function T6(e) { if (!k6(e)) return !1; var t = x6(e); return t == w6 || t == M6 || t == A6 || t == S6; } var j9 = T6, I6 = r1, D6 = I6["__core-js_shared__"], P6 = D6, g0 = P6, H0 = function() { var e = /[^.]+$/.exec(g0 && g0.keys && g0.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function B6(e) { return !!H0 && H0 in e; } var O6 = B6, E6 = Function.prototype, N6 = E6.toString; function K6(e) { if (e != null) { try { return N6.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Z9 = K6, F6 = j9, j6 = O6, Z6 = v1, Q6 = Z9, R6 = /[\\^$.*+?()[\]{}|]/g, z6 = /^\[object .+?Constructor\]$/, U6 = Function.prototype, Y6 = Object.prototype, V6 = U6.toString, H6 = Y6.hasOwnProperty, G6 = RegExp( "^" + V6.call(H6).replace(R6, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function X6(e) { if (!Z6(e) || j6(e)) return !1; var t = F6(e) ? G6 : z6; return t.test(Q6(e)); } var J6 = X6; function W6(e, t) { return e == null ? void 0 : e[t]; } var q6 = W6, ee = J6, te = q6; function ne(e, t) { var n = te(e, t); return ee(n) ? n : void 0; } var y1 = ne, re = y1, ae = function() { try { var e = re(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), ie = ae, G0 = ie; function se(e, t, n) { t == "__proto__" && G0 ? G0(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var Q9 = se; function oe(e, t) { return e === t || e !== e && t !== t; } var R9 = oe, le = Q9, ce = R9, ue = Object.prototype, Ce = ue.hasOwnProperty; function fe(e, t, n) { var r = e[t]; (!(Ce.call(e, t) && ce(r, n)) || n === void 0 && !(t in e)) && le(e, t, n); } var w0 = fe, ge = Array.isArray, _1 = ge; function ye(e) { return e != null && typeof e == "object"; } var L1 = ye, he = B1, me = L1, de = "[object Symbol]"; function pe(e) { return typeof e == "symbol" || me(e) && he(e) == de; } var M0 = pe, ve = _1, _e = M0, Le = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, be = /^\w*$/; function $e(e, t) { if (ve(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || _e(e) ? !0 : be.test(e) || !Le.test(e) || t != null && e in Object(t); } var xe = $e, ke = y1, Ae = ke(Object, "create"), a0 = Ae, X0 = a0; function we() { this.__data__ = X0 ? X0(null) : {}, this.size = 0; } var Me = we; function Se(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Te = Se, Ie = a0, De = "__lodash_hash_undefined__", Pe = Object.prototype, Be = Pe.hasOwnProperty; function Oe(e) { var t = this.__data__; if (Ie) { var n = t[e]; return n === De ? void 0 : n; } return Be.call(t, e) ? t[e] : void 0; } var Ee = Oe, Ne = a0, Ke = Object.prototype, Fe = Ke.hasOwnProperty; function je(e) { var t = this.__data__; return Ne ? t[e] !== void 0 : Fe.call(t, e); } var Ze = je, Qe = a0, Re = "__lodash_hash_undefined__"; function ze(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Qe && t === void 0 ? Re : t, this; } var Ue = ze, Ye = Me, Ve = Te, He = Ee, Ge = Ze, Xe = Ue; function b1(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } b1.prototype.clear = Ye; b1.prototype.delete = Ve; b1.prototype.get = He; b1.prototype.has = Ge; b1.prototype.set = Xe; var Je = b1; function We() { this.__data__ = [], this.size = 0; } var qe = We, e2 = R9; function t2(e, t) { for (var n = e.length; n--; ) if (e2(e[n][0], t)) return n; return -1; } var i0 = t2, n2 = i0, r2 = Array.prototype, a2 = r2.splice; function i2(e) { var t = this.__data__, n = n2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : a2.call(t, n, 1), --this.size, !0; } var s2 = i2, o2 = i0; function l2(e) { var t = this.__data__, n = o2(t, e); return n < 0 ? void 0 : t[n][1]; } var c2 = l2, u2 = i0; function C2(e) { return u2(this.__data__, e) > -1; } var f2 = C2, g2 = i0; function y2(e, t) { var n = this.__data__, r = g2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var h2 = y2, m2 = qe, d2 = s2, p2 = c2, v2 = f2, _2 = h2; function $1(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } $1.prototype.clear = m2; $1.prototype.delete = d2; $1.prototype.get = p2; $1.prototype.has = v2; $1.prototype.set = _2; var s0 = $1, L2 = y1, b2 = r1, $2 = L2(b2, "Map"), S0 = $2, J0 = Je, x2 = s0, k2 = S0; function A2() { this.size = 0, this.__data__ = { hash: new J0(), map: new (k2 || x2)(), string: new J0() }; } var w2 = A2; function M2(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var S2 = M2, T2 = S2; function I2(e, t) { var n = e.__data__; return T2(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var o0 = I2, D2 = o0; function P2(e) { var t = D2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var B2 = P2, O2 = o0; function E2(e) { return O2(this, e).get(e); } var N2 = E2, K2 = o0; function F2(e) { return K2(this, e).has(e); } var j2 = F2, Z2 = o0; function Q2(e, t) { var n = Z2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var R2 = Q2, z2 = w2, U2 = B2, Y2 = N2, V2 = j2, H2 = R2; function x1(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } x1.prototype.clear