UNPKG

@gcpreston/slippi-viewer

Version:

View Slippi replays and streams in the browser

1,613 lines (1,607 loc) 420 kB
"use strict"; (() => { var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // node_modules/picocolors/picocolors.browser.js var require_picocolors_browser = __commonJS({ "node_modules/picocolors/picocolors.browser.js"(exports, module) { var x = String; var create = function() { return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x }; }; module.exports = create(); module.exports.createColors = create; } }); // node_modules/tailwindcss/lib/util/log.js var require_log = __commonJS({ "node_modules/tailwindcss/lib/util/log.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { dim: function() { return dim; }, default: function() { return _default; } }); var _picocolors = /* @__PURE__ */ _interop_require_default(require_picocolors_browser()); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var alreadyShown = /* @__PURE__ */ new Set(); function log(type, messages, key) { if (typeof process !== "undefined" && process.env.JEST_WORKER_ID) return; if (key && alreadyShown.has(key)) return; if (key) alreadyShown.add(key); console.warn(""); messages.forEach((message) => console.warn(type, "-", message)); } function dim(input) { return _picocolors.default.dim(input); } var _default = { info(key, messages) { log(_picocolors.default.bold(_picocolors.default.cyan("info")), ...Array.isArray(key) ? [ key ] : [ messages, key ]); }, warn(key, messages) { log(_picocolors.default.bold(_picocolors.default.yellow("warn")), ...Array.isArray(key) ? [ key ] : [ messages, key ]); }, risk(key, messages) { log(_picocolors.default.bold(_picocolors.default.magenta("risk")), ...Array.isArray(key) ? [ key ] : [ messages, key ]); } }; } }); // node_modules/tailwindcss/lib/public/colors.js var require_colors = __commonJS({ "node_modules/tailwindcss/lib/public/colors.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); var _log = /* @__PURE__ */ _interop_require_default(require_log()); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function warn({ version, from, to }) { _log.default.warn(`${from}-color-renamed`, [ `As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`, "Update your configuration file to silence this warning." ]); } var _default = { inherit: "inherit", current: "currentColor", transparent: "transparent", black: "#000", white: "#fff", slate: { 50: "#f8fafc", 100: "#f1f5f9", 200: "#e2e8f0", 300: "#cbd5e1", 400: "#94a3b8", 500: "#64748b", 600: "#475569", 700: "#334155", 800: "#1e293b", 900: "#0f172a", 950: "#020617" }, gray: { 50: "#f9fafb", 100: "#f3f4f6", 200: "#e5e7eb", 300: "#d1d5db", 400: "#9ca3af", 500: "#6b7280", 600: "#4b5563", 700: "#374151", 800: "#1f2937", 900: "#111827", 950: "#030712" }, zinc: { 50: "#fafafa", 100: "#f4f4f5", 200: "#e4e4e7", 300: "#d4d4d8", 400: "#a1a1aa", 500: "#71717a", 600: "#52525b", 700: "#3f3f46", 800: "#27272a", 900: "#18181b", 950: "#09090b" }, neutral: { 50: "#fafafa", 100: "#f5f5f5", 200: "#e5e5e5", 300: "#d4d4d4", 400: "#a3a3a3", 500: "#737373", 600: "#525252", 700: "#404040", 800: "#262626", 900: "#171717", 950: "#0a0a0a" }, stone: { 50: "#fafaf9", 100: "#f5f5f4", 200: "#e7e5e4", 300: "#d6d3d1", 400: "#a8a29e", 500: "#78716c", 600: "#57534e", 700: "#44403c", 800: "#292524", 900: "#1c1917", 950: "#0c0a09" }, red: { 50: "#fef2f2", 100: "#fee2e2", 200: "#fecaca", 300: "#fca5a5", 400: "#f87171", 500: "#ef4444", 600: "#dc2626", 700: "#b91c1c", 800: "#991b1b", 900: "#7f1d1d", 950: "#450a0a" }, orange: { 50: "#fff7ed", 100: "#ffedd5", 200: "#fed7aa", 300: "#fdba74", 400: "#fb923c", 500: "#f97316", 600: "#ea580c", 700: "#c2410c", 800: "#9a3412", 900: "#7c2d12", 950: "#431407" }, amber: { 50: "#fffbeb", 100: "#fef3c7", 200: "#fde68a", 300: "#fcd34d", 400: "#fbbf24", 500: "#f59e0b", 600: "#d97706", 700: "#b45309", 800: "#92400e", 900: "#78350f", 950: "#451a03" }, yellow: { 50: "#fefce8", 100: "#fef9c3", 200: "#fef08a", 300: "#fde047", 400: "#facc15", 500: "#eab308", 600: "#ca8a04", 700: "#a16207", 800: "#854d0e", 900: "#713f12", 950: "#422006" }, lime: { 50: "#f7fee7", 100: "#ecfccb", 200: "#d9f99d", 300: "#bef264", 400: "#a3e635", 500: "#84cc16", 600: "#65a30d", 700: "#4d7c0f", 800: "#3f6212", 900: "#365314", 950: "#1a2e05" }, green: { 50: "#f0fdf4", 100: "#dcfce7", 200: "#bbf7d0", 300: "#86efac", 400: "#4ade80", 500: "#22c55e", 600: "#16a34a", 700: "#15803d", 800: "#166534", 900: "#14532d", 950: "#052e16" }, emerald: { 50: "#ecfdf5", 100: "#d1fae5", 200: "#a7f3d0", 300: "#6ee7b7", 400: "#34d399", 500: "#10b981", 600: "#059669", 700: "#047857", 800: "#065f46", 900: "#064e3b", 950: "#022c22" }, teal: { 50: "#f0fdfa", 100: "#ccfbf1", 200: "#99f6e4", 300: "#5eead4", 400: "#2dd4bf", 500: "#14b8a6", 600: "#0d9488", 700: "#0f766e", 800: "#115e59", 900: "#134e4a", 950: "#042f2e" }, cyan: { 50: "#ecfeff", 100: "#cffafe", 200: "#a5f3fc", 300: "#67e8f9", 400: "#22d3ee", 500: "#06b6d4", 600: "#0891b2", 700: "#0e7490", 800: "#155e75", 900: "#164e63", 950: "#083344" }, sky: { 50: "#f0f9ff", 100: "#e0f2fe", 200: "#bae6fd", 300: "#7dd3fc", 400: "#38bdf8", 500: "#0ea5e9", 600: "#0284c7", 700: "#0369a1", 800: "#075985", 900: "#0c4a6e", 950: "#082f49" }, blue: { 50: "#eff6ff", 100: "#dbeafe", 200: "#bfdbfe", 300: "#93c5fd", 400: "#60a5fa", 500: "#3b82f6", 600: "#2563eb", 700: "#1d4ed8", 800: "#1e40af", 900: "#1e3a8a", 950: "#172554" }, indigo: { 50: "#eef2ff", 100: "#e0e7ff", 200: "#c7d2fe", 300: "#a5b4fc", 400: "#818cf8", 500: "#6366f1", 600: "#4f46e5", 700: "#4338ca", 800: "#3730a3", 900: "#312e81", 950: "#1e1b4b" }, violet: { 50: "#f5f3ff", 100: "#ede9fe", 200: "#ddd6fe", 300: "#c4b5fd", 400: "#a78bfa", 500: "#8b5cf6", 600: "#7c3aed", 700: "#6d28d9", 800: "#5b21b6", 900: "#4c1d95", 950: "#2e1065" }, purple: { 50: "#faf5ff", 100: "#f3e8ff", 200: "#e9d5ff", 300: "#d8b4fe", 400: "#c084fc", 500: "#a855f7", 600: "#9333ea", 700: "#7e22ce", 800: "#6b21a8", 900: "#581c87", 950: "#3b0764" }, fuchsia: { 50: "#fdf4ff", 100: "#fae8ff", 200: "#f5d0fe", 300: "#f0abfc", 400: "#e879f9", 500: "#d946ef", 600: "#c026d3", 700: "#a21caf", 800: "#86198f", 900: "#701a75", 950: "#4a044e" }, pink: { 50: "#fdf2f8", 100: "#fce7f3", 200: "#fbcfe8", 300: "#f9a8d4", 400: "#f472b6", 500: "#ec4899", 600: "#db2777", 700: "#be185d", 800: "#9d174d", 900: "#831843", 950: "#500724" }, rose: { 50: "#fff1f2", 100: "#ffe4e6", 200: "#fecdd3", 300: "#fda4af", 400: "#fb7185", 500: "#f43f5e", 600: "#e11d48", 700: "#be123c", 800: "#9f1239", 900: "#881337", 950: "#4c0519" }, get lightBlue() { warn({ version: "v2.2", from: "lightBlue", to: "sky" }); return this.sky; }, get warmGray() { warn({ version: "v3.0", from: "warmGray", to: "stone" }); return this.stone; }, get trueGray() { warn({ version: "v3.0", from: "trueGray", to: "neutral" }); return this.neutral; }, get coolGray() { warn({ version: "v3.0", from: "coolGray", to: "gray" }); return this.gray; }, get blueGray() { warn({ version: "v3.0", from: "blueGray", to: "slate" }); return this.slate; } }; } }); // node_modules/tailwindcss/colors.js var require_colors2 = __commonJS({ "node_modules/tailwindcss/colors.js"(exports, module) { var colors3 = require_colors(); module.exports = (colors3.__esModule ? colors3 : { default: colors3 }).default; } }); // node_modules/solid-js/dist/solid.js var sharedConfig = { context: void 0, registry: void 0, effects: void 0, done: false, getContextId() { return getContextId(this.context.count); }, getNextContextId() { return getContextId(this.context.count++); } }; function getContextId(count) { const num = String(count), len = num.length - 1; return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num; } function setHydrateContext(context) { sharedConfig.context = context; } function nextHydrateContext() { return { ...sharedConfig.context, id: sharedConfig.getNextContextId(), count: 0 }; } var IS_DEV = false; var equalFn = (a, b) => a === b; var $PROXY = Symbol("solid-proxy"); var $TRACK = Symbol("solid-track"); var $DEVCOMP = Symbol("solid-dev-component"); var signalOptions = { equals: equalFn }; var ERROR = null; var runEffects = runQueue; var STALE = 1; var PENDING = 2; var UNOWNED = { owned: null, cleanups: null, context: null, owner: null }; var NO_INIT = {}; var Owner = null; var Transition = null; var Scheduler = null; var ExternalSourceConfig = null; var Listener = null; var Updates = null; var Effects = null; var ExecCount = 0; function createRoot(fn, detachedOwner) { const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root = unowned ? UNOWNED : { owned: null, cleanups: null, context: current ? current.context : null, owner: current }, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root))); Owner = root; Listener = null; try { return runUpdates(updateFn, true); } finally { Listener = listener; Owner = owner; } } function createSignal(value, options) { options = options ? Object.assign({}, signalOptions, options) : signalOptions; const s2 = { value, observers: null, observerSlots: null, comparator: options.equals || void 0 }; const setter = (value2) => { if (typeof value2 === "function") { if (Transition && Transition.running && Transition.sources.has(s2)) value2 = value2(s2.tValue); else value2 = value2(s2.value); } return writeSignal(s2, value2); }; return [readSignal.bind(s2), setter]; } function createComputed(fn, value, options) { const c = createComputation(fn, value, true, STALE); if (Scheduler && Transition && Transition.running) Updates.push(c); else updateComputation(c); } function createRenderEffect(fn, value, options) { const c = createComputation(fn, value, false, STALE); if (Scheduler && Transition && Transition.running) Updates.push(c); else updateComputation(c); } function createEffect(fn, value, options) { runEffects = runUserEffects; const c = createComputation(fn, value, false, STALE), s2 = SuspenseContext && useContext(SuspenseContext); if (s2) c.suspense = s2; if (!options || !options.render) c.user = true; Effects ? Effects.push(c) : updateComputation(c); } function createMemo(fn, value, options) { options = options ? Object.assign({}, signalOptions, options) : signalOptions; const c = createComputation(fn, value, true, 0); c.observers = null; c.observerSlots = null; c.comparator = options.equals || void 0; if (Scheduler && Transition && Transition.running) { c.tState = STALE; Updates.push(c); } else updateComputation(c); return readSignal.bind(c); } function isPromise(v) { return v && typeof v === "object" && "then" in v; } function createResource(pSource, pFetcher, pOptions) { let source; let fetcher; let options; if (typeof pFetcher === "function") { source = pSource; fetcher = pFetcher; options = pOptions || {}; } else { source = true; fetcher = pSource; options = pFetcher || {}; } let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source); const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, { equals: false }), [state, setState] = createSignal(resolved ? "ready" : "unresolved"); if (sharedConfig.context) { id = sharedConfig.getNextContextId(); if (options.ssrLoadFrom === "initial") initP = options.initialValue; else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id); } function loadEnd(p, v, error2, key) { if (pr === p) { pr = null; key !== void 0 && (resolved = true); if ((p === initP || v === initP) && options.onHydrated) queueMicrotask( () => options.onHydrated(key, { value: v }) ); initP = NO_INIT; if (Transition && p && loadedUnderTransition) { Transition.promises.delete(p); loadedUnderTransition = false; runUpdates(() => { Transition.running = true; completeLoad(v, error2); }, false); } else completeLoad(v, error2); } return v; } function completeLoad(v, err2) { runUpdates(() => { if (err2 === void 0) setValue(() => v); setState(err2 !== void 0 ? "errored" : resolved ? "ready" : "unresolved"); setError(err2); for (const c of contexts.keys()) c.decrement(); contexts.clear(); }, false); } function read() { const c = SuspenseContext && useContext(SuspenseContext), v = value(), err2 = error(); if (err2 !== void 0 && !pr) throw err2; if (Listener && !Listener.user && c) { createComputed(() => { track(); if (pr) { if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr); else if (!contexts.has(c)) { c.increment(); contexts.add(c); } } }); } return v; } function load2(refetching = true) { if (refetching !== false && scheduled) return; scheduled = false; const lookup = dynamic ? dynamic() : source; loadedUnderTransition = Transition && Transition.running; if (lookup == null || lookup === false) { loadEnd(pr, untrack(value)); return; } if (Transition && pr) Transition.promises.delete(pr); const p = initP !== NO_INIT ? initP : untrack( () => fetcher(lookup, { value: value(), refetching }) ); if (!isPromise(p)) { loadEnd(pr, p, void 0, lookup); return p; } pr = p; if ("value" in p) { if (p.status === "success") loadEnd(pr, p.value, void 0, lookup); else loadEnd(pr, void 0, castError(p.value), lookup); return p; } scheduled = true; queueMicrotask(() => scheduled = false); runUpdates(() => { setState(resolved ? "refreshing" : "pending"); trigger(); }, false); return p.then( (v) => loadEnd(p, v, void 0, lookup), (e) => loadEnd(p, void 0, castError(e), lookup) ); } Object.defineProperties(read, { state: { get: () => state() }, error: { get: () => error() }, loading: { get() { const s2 = state(); return s2 === "pending" || s2 === "refreshing"; } }, latest: { get() { if (!resolved) return read(); const err2 = error(); if (err2 && !pr) throw err2; return value(); } } }); if (dynamic) createComputed(() => load2(false)); else load2(false); return [ read, { refetch: load2, mutate: setValue } ]; } function batch(fn) { return runUpdates(fn, false); } function untrack(fn) { if (!ExternalSourceConfig && Listener === null) return fn(); const listener = Listener; Listener = null; try { if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn); return fn(); } finally { Listener = listener; } } function onMount(fn) { createEffect(() => untrack(fn)); } function onCleanup(fn) { if (Owner === null) ; else if (Owner.cleanups === null) Owner.cleanups = [fn]; else Owner.cleanups.push(fn); return fn; } function getListener() { return Listener; } function startTransition(fn) { if (Transition && Transition.running) { fn(); return Transition.done; } const l = Listener; const o = Owner; return Promise.resolve().then(() => { Listener = l; Owner = o; let t; if (Scheduler || SuspenseContext) { t = Transition || (Transition = { sources: /* @__PURE__ */ new Set(), effects: [], promises: /* @__PURE__ */ new Set(), disposed: /* @__PURE__ */ new Set(), queue: /* @__PURE__ */ new Set(), running: true }); t.done || (t.done = new Promise((res) => t.resolve = res)); t.running = true; } runUpdates(fn, false); Listener = Owner = null; return t ? t.done : void 0; }); } var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false); function useContext(context) { let value; return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue; } function children(fn) { const children2 = createMemo(fn); const memo = createMemo(() => resolveChildren(children2())); memo.toArray = () => { const c = memo(); return Array.isArray(c) ? c : c != null ? [c] : []; }; return memo; } var SuspenseContext; function readSignal() { const runningTransition = Transition && Transition.running; if (this.sources && (runningTransition ? this.tState : this.state)) { if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this); else { const updates = Updates; Updates = null; runUpdates(() => lookUpstream(this), false); Updates = updates; } } if (Listener) { const sSlot = this.observers ? this.observers.length : 0; if (!Listener.sources) { Listener.sources = [this]; Listener.sourceSlots = [sSlot]; } else { Listener.sources.push(this); Listener.sourceSlots.push(sSlot); } if (!this.observers) { this.observers = [Listener]; this.observerSlots = [Listener.sources.length - 1]; } else { this.observers.push(Listener); this.observerSlots.push(Listener.sources.length - 1); } } if (runningTransition && Transition.sources.has(this)) return this.tValue; return this.value; } function writeSignal(node, value, isComp) { let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value; if (!node.comparator || !node.comparator(current, value)) { if (Transition) { const TransitionRunning = Transition.running; if (TransitionRunning || !isComp && Transition.sources.has(node)) { Transition.sources.add(node); node.tValue = value; } if (!TransitionRunning) node.value = value; } else node.value = value; if (node.observers && node.observers.length) { runUpdates(() => { for (let i = 0; i < node.observers.length; i += 1) { const o = node.observers[i]; const TransitionRunning = Transition && Transition.running; if (TransitionRunning && Transition.disposed.has(o)) continue; if (TransitionRunning ? !o.tState : !o.state) { if (o.pure) Updates.push(o); else Effects.push(o); if (o.observers) markDownstream(o); } if (!TransitionRunning) o.state = STALE; else o.tState = STALE; } if (Updates.length > 1e6) { Updates = []; if (IS_DEV) ; throw new Error(); } }, false); } } return value; } function updateComputation(node) { if (!node.fn) return; cleanNode(node); const time = ExecCount; runComputation( node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time ); if (Transition && !Transition.running && Transition.sources.has(node)) { queueMicrotask(() => { runUpdates(() => { Transition && (Transition.running = true); Listener = Owner = node; runComputation(node, node.tValue, time); Listener = Owner = null; }, false); }); } } function runComputation(node, value, time) { let nextValue; const owner = Owner, listener = Listener; Listener = Owner = node; try { nextValue = node.fn(value); } catch (err2) { if (node.pure) { if (Transition && Transition.running) { node.tState = STALE; node.tOwned && node.tOwned.forEach(cleanNode); node.tOwned = void 0; } else { node.state = STALE; node.owned && node.owned.forEach(cleanNode); node.owned = null; } } node.updatedAt = time + 1; return handleError(err2); } finally { Listener = listener; Owner = owner; } if (!node.updatedAt || node.updatedAt <= time) { if (node.updatedAt != null && "observers" in node) { writeSignal(node, nextValue, true); } else if (Transition && Transition.running && node.pure) { Transition.sources.add(node); node.tValue = nextValue; } else node.value = nextValue; node.updatedAt = time; } } function createComputation(fn, init, pure, state = STALE, options) { const c = { fn, state, updatedAt: null, owned: null, sources: null, sourceSlots: null, cleanups: null, value: init, owner: Owner, context: Owner ? Owner.context : null, pure }; if (Transition && Transition.running) { c.state = 0; c.tState = state; } if (Owner === null) ; else if (Owner !== UNOWNED) { if (Transition && Transition.running && Owner.pure) { if (!Owner.tOwned) Owner.tOwned = [c]; else Owner.tOwned.push(c); } else { if (!Owner.owned) Owner.owned = [c]; else Owner.owned.push(c); } } if (ExternalSourceConfig && c.fn) { const [track, trigger] = createSignal(void 0, { equals: false }); const ordinary = ExternalSourceConfig.factory(c.fn, trigger); onCleanup(() => ordinary.dispose()); const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose()); const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition); c.fn = (x) => { track(); return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x); }; } return c; } function runTop(node) { const runningTransition = Transition && Transition.running; if ((runningTransition ? node.tState : node.state) === 0) return; if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node); if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node); const ancestors = [node]; while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) { if (runningTransition && Transition.disposed.has(node)) return; if (runningTransition ? node.tState : node.state) ancestors.push(node); } for (let i = ancestors.length - 1; i >= 0; i--) { node = ancestors[i]; if (runningTransition) { let top = node, prev = ancestors[i + 1]; while ((top = top.owner) && top !== prev) { if (Transition.disposed.has(top)) return; } } if ((runningTransition ? node.tState : node.state) === STALE) { updateComputation(node); } else if ((runningTransition ? node.tState : node.state) === PENDING) { const updates = Updates; Updates = null; runUpdates(() => lookUpstream(node, ancestors[0]), false); Updates = updates; } } } function runUpdates(fn, init) { if (Updates) return fn(); let wait = false; if (!init) Updates = []; if (Effects) wait = true; else Effects = []; ExecCount++; try { const res = fn(); completeUpdates(wait); return res; } catch (err2) { if (!wait) Effects = null; Updates = null; handleError(err2); } } function completeUpdates(wait) { if (Updates) { if (Scheduler && Transition && Transition.running) scheduleQueue(Updates); else runQueue(Updates); Updates = null; } if (wait) return; let res; if (Transition) { if (!Transition.promises.size && !Transition.queue.size) { const sources = Transition.sources; const disposed = Transition.disposed; Effects.push.apply(Effects, Transition.effects); res = Transition.resolve; for (const e2 of Effects) { "tState" in e2 && (e2.state = e2.tState); delete e2.tState; } Transition = null; runUpdates(() => { for (const d of disposed) cleanNode(d); for (const v of sources) { v.value = v.tValue; if (v.owned) { for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]); } if (v.tOwned) v.owned = v.tOwned; delete v.tValue; delete v.tOwned; v.tState = 0; } setTransPending(false); }, false); } else if (Transition.running) { Transition.running = false; Transition.effects.push.apply(Transition.effects, Effects); Effects = null; setTransPending(true); return; } } const e = Effects; Effects = null; if (e.length) runUpdates(() => runEffects(e), false); if (res) res(); } function runQueue(queue) { for (let i = 0; i < queue.length; i++) runTop(queue[i]); } function scheduleQueue(queue) { for (let i = 0; i < queue.length; i++) { const item = queue[i]; const tasks = Transition.queue; if (!tasks.has(item)) { tasks.add(item); Scheduler(() => { tasks.delete(item); runUpdates(() => { Transition.running = true; runTop(item); }, false); Transition && (Transition.running = false); }); } } } function runUserEffects(queue) { let i, userLength = 0; for (i = 0; i < queue.length; i++) { const e = queue[i]; if (!e.user) runTop(e); else queue[userLength++] = e; } if (sharedConfig.context) { if (sharedConfig.count) { sharedConfig.effects || (sharedConfig.effects = []); sharedConfig.effects.push(...queue.slice(0, userLength)); return; } setHydrateContext(); } if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) { queue = [...sharedConfig.effects, ...queue]; userLength += sharedConfig.effects.length; delete sharedConfig.effects; } for (i = 0; i < userLength; i++) runTop(queue[i]); } function lookUpstream(node, ignore) { const runningTransition = Transition && Transition.running; if (runningTransition) node.tState = 0; else node.state = 0; for (let i = 0; i < node.sources.length; i += 1) { const source = node.sources[i]; if (source.sources) { const state = runningTransition ? source.tState : source.state; if (state === STALE) { if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source); } else if (state === PENDING) lookUpstream(source, ignore); } } } function markDownstream(node) { const runningTransition = Transition && Transition.running; for (let i = 0; i < node.observers.length; i += 1) { const o = node.observers[i]; if (runningTransition ? !o.tState : !o.state) { if (runningTransition) o.tState = PENDING; else o.state = PENDING; if (o.pure) Updates.push(o); else Effects.push(o); o.observers && markDownstream(o); } } } function cleanNode(node) { let i; if (node.sources) { while (node.sources.length) { const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers; if (obs && obs.length) { const n = obs.pop(), s2 = source.observerSlots.pop(); if (index < obs.length) { n.sourceSlots[s2] = index; obs[index] = n; source.observerSlots[index] = s2; } } } } if (node.tOwned) { for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]); delete node.tOwned; } if (Transition && Transition.running && node.pure) { reset(node, true); } else if (node.owned) { for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]); node.owned = null; } if (node.cleanups) { for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i](); node.cleanups = null; } if (Transition && Transition.running) node.tState = 0; else node.state = 0; } function reset(node, top) { if (!top) { node.tState = 0; Transition.disposed.add(node); } if (node.owned) { for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]); } } function castError(err2) { if (err2 instanceof Error) return err2; return new Error(typeof err2 === "string" ? err2 : "Unknown error", { cause: err2 }); } function runErrors(err2, fns, owner) { try { for (const f of fns) f(err2); } catch (e) { handleError(e, owner && owner.owner || null); } } function handleError(err2, owner = Owner) { const fns = ERROR && owner && owner.context && owner.context[ERROR]; const error = castError(err2); if (!fns) throw error; if (Effects) Effects.push({ fn() { runErrors(error, fns, owner); }, state: STALE }); else runErrors(error, fns, owner); } function resolveChildren(children2) { if (typeof children2 === "function" && !children2.length) return resolveChildren(children2()); if (Array.isArray(children2)) { const results = []; for (let i = 0; i < children2.length; i++) { const result = resolveChildren(children2[i]); Array.isArray(result) ? results.push.apply(results, result) : results.push(result); } return results; } return children2; } var FALLBACK = Symbol("fallback"); function dispose(d) { for (let i = 0; i < d.length; i++) d[i](); } function mapArray(list, mapFn, options = {}) { let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null; onCleanup(() => dispose(disposers)); return () => { let newItems = list() || [], newLen = newItems.length, i, j; newItems[$TRACK]; return untrack(() => { let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start3, end, newEnd, item; if (newLen === 0) { if (len !== 0) { dispose(disposers); disposers = []; items = []; mapped = []; len = 0; indexes && (indexes = []); } if (options.fallback) { items = [FALLBACK]; mapped[0] = createRoot((disposer) => { disposers[0] = disposer; return options.fallback(); }); len = 1; } } else if (len === 0) { mapped = new Array(newLen); for (j = 0; j < newLen; j++) { items[j] = newItems[j]; mapped[j] = createRoot(mapper); } len = newLen; } else { temp = new Array(newLen); tempdisposers = new Array(newLen); indexes && (tempIndexes = new Array(newLen)); for (start3 = 0, end = Math.min(len, newLen); start3 < end && items[start3] === newItems[start3]; start3++) ; for (end = len - 1, newEnd = newLen - 1; end >= start3 && newEnd >= start3 && items[end] === newItems[newEnd]; end--, newEnd--) { temp[newEnd] = mapped[end]; tempdisposers[newEnd] = disposers[end]; indexes && (tempIndexes[newEnd] = indexes[end]); } newIndices = /* @__PURE__ */ new Map(); newIndicesNext = new Array(newEnd + 1); for (j = newEnd; j >= start3; j--) { item = newItems[j]; i = newIndices.get(item); newIndicesNext[j] = i === void 0 ? -1 : i; newIndices.set(item, j); } for (i = start3; i <= end; i++) { item = items[i]; j = newIndices.get(item); if (j !== void 0 && j !== -1) { temp[j] = mapped[i]; tempdisposers[j] = disposers[i]; indexes && (tempIndexes[j] = indexes[i]); j = newIndicesNext[j]; newIndices.set(item, j); } else disposers[i](); } for (j = start3; j < newLen; j++) { if (j in temp) { mapped[j] = temp[j]; disposers[j] = tempdisposers[j]; if (indexes) { indexes[j] = tempIndexes[j]; indexes[j](j); } } else mapped[j] = createRoot(mapper); } mapped = mapped.slice(0, len = newLen); items = newItems.slice(0); } return mapped; }); function mapper(disposer) { disposers[j] = disposer; if (indexes) { const [s2, set] = createSignal(j); indexes[j] = set; return mapFn(newItems[j], s2); } return mapFn(newItems[j]); } }; } var hydrationEnabled = false; function createComponent(Comp, props) { if (hydrationEnabled) { if (sharedConfig.context) { const c = sharedConfig.context; setHydrateContext(nextHydrateContext()); const r2 = untrack(() => Comp(props || {})); setHydrateContext(c); return r2; } } return untrack(() => Comp(props || {})); } var narrowedError = (name) => `Stale read from <${name}>.`; function For(props) { const fallback = "fallback" in props && { fallback: () => props.fallback }; return createMemo(mapArray(() => props.each, props.children, fallback || void 0)); } function Show(props) { const keyed = props.keyed; const conditionValue = createMemo(() => props.when, void 0, void 0); const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, { equals: (a, b) => !a === !b }); return createMemo( () => { const c = condition(); if (c) { const child = props.children; const fn = typeof child === "function" && child.length > 0; return fn ? untrack( () => child( keyed ? c : () => { if (!untrack(condition)) throw narrowedError("Show"); return conditionValue(); } ) ) : child; } return props.fallback; }, void 0, void 0 ); } function Switch(props) { const chs = children(() => props.children); const switchFunc = createMemo(() => { const ch = chs(); const mps = Array.isArray(ch) ? ch : [ch]; let func = () => void 0; for (let i = 0; i < mps.length; i++) { const index = i; const mp = mps[i]; const prevFunc = func; const conditionValue = createMemo( () => prevFunc() ? void 0 : mp.when, void 0, void 0 ); const condition = mp.keyed ? conditionValue : createMemo(conditionValue, void 0, { equals: (a, b) => !a === !b }); func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : void 0); } return func; }); return createMemo( () => { const sel = switchFunc()(); if (!sel) return props.fallback; const [index, conditionValue, mp] = sel; const child = mp.children; const fn = typeof child === "function" && child.length > 0; return fn ? untrack( () => child( mp.keyed ? conditionValue() : () => { if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match"); return conditionValue(); } ) ) : child; }, void 0, void 0 ); } function Match(props) { return props; } // node_modules/solid-js/web/dist/web.js var booleans = [ "allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected" ]; var Properties = /* @__PURE__ */ new Set([ "className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans ]); var ChildProperties = /* @__PURE__ */ new Set([ "innerHTML", "textContent", "innerText", "children" ]); var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), { className: "class", htmlFor: "for" }); var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), { class: "className", formnovalidate: { $: "formNoValidate", BUTTON: 1, INPUT: 1 }, ismap: { $: "isMap", IMG: 1 }, nomodule: { $: "noModule", SCRIPT: 1 }, playsinline: { $: "playsInline", VIDEO: 1 }, readonly: { $: "readOnly", INPUT: 1, TEXTAREA: 1 } }); function getPropAlias(prop, tagName) { const a = PropAliases[prop]; return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a; } var DelegatedEvents = /* @__PURE__ */ new Set([ "beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart" ]); var SVGNamespace = { xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace" }; function reconcileArrays(parentNode, a, b) { let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null; while (aStart < aEnd || bStart < bEnd) { if (a[aStart] === b[bStart]) { aStart++; bStart++; continue; } while (a[aEnd - 1] === b[bEnd - 1]) { aEnd--; bEnd--; } if (aEnd === aStart) { const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after; while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node); } else if (bEnd === bStart) { while (aStart < aEnd) { if (!map || !map.has(a[aStart])) a[aStart].remove(); aStart++; } } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) { const node = a[--aEnd].nextSibling; parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling); parentNode.insertBefore(b[--bEnd], node); a[aEnd] = b[bEnd]; } else { if (!map) { map = /* @__PURE__ */ new Map(); let i = bStart; while (i < bEnd) map.set(b[i], i++); } const index = map.get(a[aStart]); if (index != null) { if (bStart < index && index < bEnd) { let i = aStart, sequence = 1, t; while (++i < aEnd && i < bEnd) { if ((t = map.get(a[i])) == null || t !== index + sequence) break; sequence++; } if (sequence > index - bStart) { const node = a[aStart]; while (bStart < index) parentNode.insertBefore(b[bStart++], node); } else parentNode.replaceChild(b[bStart++], a[aStart++]); } else aStart++; } else a[aStart++].remove(); } } } var $$EVENTS = "_$DX_DELEGATE"; function template(html, isImportNode, isSVG, isMathML) { let node; const create = () => { const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template"); t.innerHTML = html; return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild; }; const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true); fn.cloneNode = fn; return fn; } function delegateEvents(eventNames, document2 = window.document) { const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set()); for (let i = 0, l = eventNames.length; i < l; i++) { const name = eventNames[i]; if (!e.has(name)) { e.add(name); document2.addEventListener(name, eventHandler); } } } function setAttribute(node, name, value) { if (isHydrating(node)) return; if (value == null) node.removeAttribute(name); else node.setAttribute(name, value); } function setAttributeNS(node, namespace, name, value) { if (isHydrating(node)) return; if (value == null) node.removeAttributeNS(namespace, name); else node.setAttributeNS(namespace, name, value); } function setBoolAttribute(node, name, value) { if (isHydrating(node)) return; value ? node.setAttribute(name, "") : node.removeAttribute(name); } function className(node, value) { if (isHydrating(node)) return; if (value == null) node.removeAttribute("class"); else node.className = value; } function addEventListener(node, name, handler, delegate) { if (delegate) { if (Array.isArray(handler)) { node[`$$${name}`] = handler[0]; node[`$$${name}Data`] = handler[1]; } else node[`$$${name}`] = handler; } else if (Array.isArray(handler)) { const handlerFn = handler[0]; node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e)); } else node.addEventListener(name, handler, typeof handler !== "function" && handler); } function classList(node, value, prev = {}) { const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev); let i, len; for (i = 0, len = prevKeys.length; i < len; i++) { const key = prevKeys[i]; if (!key || key === "undefined" || value[key]) continue; toggleClassKey(node, key, false); delete prev[key]; } for (i = 0, len = classKeys.length; i < len; i++) { const key = classKeys[i], classValue = !!value[key]; if (!key || key === "undefined" || prev[key] === classValue || !cl