@moq/ui-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/button/button.d.ts +37 -0
- package/button/button.d.ts.map +1 -0
- package/icon/icon.d.ts +28 -0
- package/icon/icon.d.ts.map +1 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -0
- package/index.js +910 -0
- package/index.js.map +1 -0
- package/package.json +17 -0
- package/stats/components/StatsItem.d.ts +18 -0
- package/stats/components/StatsItem.d.ts.map +1 -0
- package/stats/components/StatsPanel.d.ts +18 -0
- package/stats/components/StatsPanel.d.ts.map +1 -0
- package/stats/index.d.ts +13 -0
- package/stats/index.d.ts.map +1 -0
- package/stats/providers/audio.d.ts +30 -0
- package/stats/providers/audio.d.ts.map +1 -0
- package/stats/providers/base.d.ts +26 -0
- package/stats/providers/base.d.ts.map +1 -0
- package/stats/providers/buffer.d.ts +12 -0
- package/stats/providers/buffer.d.ts.map +1 -0
- package/stats/providers/index.d.ts +10 -0
- package/stats/providers/index.d.ts.map +1 -0
- package/stats/providers/network.d.ts +49 -0
- package/stats/providers/network.d.ts.map +1 -0
- package/stats/providers/registry.d.ts +17 -0
- package/stats/providers/registry.d.ts.map +1 -0
- package/stats/providers/video.d.ts +33 -0
- package/stats/providers/video.d.ts.map +1 -0
- package/stats/types.d.ts +53 -0
- package/stats/types.d.ts.map +1 -0
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/.bun/solid-js@1.9.11/node_modules/solid-js/dist/solid.js","../../../node_modules/.bun/solid-js@1.9.11/node_modules/solid-js/web/dist/web.js","../src/button/button.tsx","../src/icon/arrow-down.svg?raw","../src/icon/arrow-up.svg?raw","../src/icon/audio.svg?raw","../src/icon/ban.svg?raw","../src/icon/buffer.svg?raw","../src/icon/camera.svg?raw","../src/icon/file.svg?raw","../src/icon/fullscreen-enter.svg?raw","../src/icon/fullscreen-exit.svg?raw","../src/icon/microphone.svg?raw","../src/icon/mute.svg?raw","../src/icon/network.svg?raw","../src/icon/pause.svg?raw","../src/icon/play.svg?raw","../src/icon/screen.svg?raw","../src/icon/stats.svg?raw","../src/icon/video.svg?raw","../src/icon/volume-high.svg?raw","../src/icon/volume-low.svg?raw","../src/icon/volume-medium.svg?raw","../src/icon/icon.tsx","../src/stats/providers/base.ts","../src/stats/providers/audio.ts","../src/stats/providers/buffer.ts","../src/stats/providers/network.ts","../src/stats/providers/video.ts","../src/stats/providers/registry.ts","../src/stats/components/StatsItem.tsx","../src/stats/components/StatsPanel.tsx","../src/stats/index.tsx"],"sourcesContent":["let taskIdCounter = 1,\n isCallbackScheduled = false,\n isPerformingWork = false,\n taskQueue = [],\n currentTask = null,\n shouldYieldToHost = null,\n yieldInterval = 5,\n deadline = 0,\n maxYieldInterval = 300,\n maxDeadline = 0,\n scheduleCallback = null,\n scheduledCallback = null;\nconst maxSigned31BitInt = 1073741823;\nfunction setupScheduler() {\n const channel = new MessageChannel(),\n port = channel.port2;\n scheduleCallback = () => port.postMessage(null);\n channel.port1.onmessage = () => {\n if (scheduledCallback !== null) {\n const currentTime = performance.now();\n deadline = currentTime + yieldInterval;\n maxDeadline = currentTime + maxYieldInterval;\n try {\n const hasMoreWork = scheduledCallback(currentTime);\n if (!hasMoreWork) {\n scheduledCallback = null;\n } else port.postMessage(null);\n } catch (error) {\n port.postMessage(null);\n throw error;\n }\n }\n };\n if (navigator && navigator.scheduling && navigator.scheduling.isInputPending) {\n const scheduling = navigator.scheduling;\n shouldYieldToHost = () => {\n const currentTime = performance.now();\n if (currentTime >= deadline) {\n if (scheduling.isInputPending()) {\n return true;\n }\n return currentTime >= maxDeadline;\n } else {\n return false;\n }\n };\n } else {\n shouldYieldToHost = () => performance.now() >= deadline;\n }\n}\nfunction enqueue(taskQueue, task) {\n function findIndex() {\n let m = 0;\n let n = taskQueue.length - 1;\n while (m <= n) {\n const k = n + m >> 1;\n const cmp = task.expirationTime - taskQueue[k].expirationTime;\n if (cmp > 0) m = k + 1;else if (cmp < 0) n = k - 1;else return k;\n }\n return m;\n }\n taskQueue.splice(findIndex(), 0, task);\n}\nfunction requestCallback(fn, options) {\n if (!scheduleCallback) setupScheduler();\n let startTime = performance.now(),\n timeout = maxSigned31BitInt;\n if (options && options.timeout) timeout = options.timeout;\n const newTask = {\n id: taskIdCounter++,\n fn,\n startTime,\n expirationTime: startTime + timeout\n };\n enqueue(taskQueue, newTask);\n if (!isCallbackScheduled && !isPerformingWork) {\n isCallbackScheduled = true;\n scheduledCallback = flushWork;\n scheduleCallback();\n }\n return newTask;\n}\nfunction cancelCallback(task) {\n task.fn = null;\n}\nfunction flushWork(initialTime) {\n isCallbackScheduled = false;\n isPerformingWork = true;\n try {\n return workLoop(initialTime);\n } finally {\n currentTask = null;\n isPerformingWork = false;\n }\n}\nfunction workLoop(initialTime) {\n let currentTime = initialTime;\n currentTask = taskQueue[0] || null;\n while (currentTask !== null) {\n if (currentTask.expirationTime > currentTime && shouldYieldToHost()) {\n break;\n }\n const callback = currentTask.fn;\n if (callback !== null) {\n currentTask.fn = null;\n const didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n callback(didUserCallbackTimeout);\n currentTime = performance.now();\n if (currentTask === taskQueue[0]) {\n taskQueue.shift();\n }\n } else taskQueue.shift();\n currentTask = taskQueue[0] || null;\n }\n return currentTask !== null;\n}\n\nconst sharedConfig = {\n context: undefined,\n registry: undefined,\n effects: undefined,\n done: false,\n getContextId() {\n return getContextId(this.context.count);\n },\n getNextContextId() {\n return getContextId(this.context.count++);\n }\n};\nfunction getContextId(count) {\n const num = String(count),\n len = num.length - 1;\n return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : \"\") + num;\n}\nfunction setHydrateContext(context) {\n sharedConfig.context = context;\n}\nfunction nextHydrateContext() {\n return {\n ...sharedConfig.context,\n id: sharedConfig.getNextContextId(),\n count: 0\n };\n}\n\nconst IS_DEV = false;\nconst equalFn = (a, b) => a === b;\nconst $PROXY = Symbol(\"solid-proxy\");\nconst SUPPORTS_PROXY = typeof Proxy === \"function\";\nconst $TRACK = Symbol(\"solid-track\");\nconst $DEVCOMP = Symbol(\"solid-dev-component\");\nconst signalOptions = {\n equals: equalFn\n};\nlet ERROR = null;\nlet runEffects = runQueue;\nconst STALE = 1;\nconst PENDING = 2;\nconst UNOWNED = {\n owned: null,\n cleanups: null,\n context: null,\n owner: null\n};\nconst NO_INIT = {};\nvar Owner = null;\nlet Transition = null;\nlet Scheduler = null;\nlet ExternalSourceConfig = null;\nlet Listener = null;\nlet Updates = null;\nlet Effects = null;\nlet ExecCount = 0;\nfunction createRoot(fn, detachedOwner) {\n const listener = Listener,\n owner = Owner,\n unowned = fn.length === 0,\n current = detachedOwner === undefined ? owner : detachedOwner,\n root = unowned ? UNOWNED : {\n owned: null,\n cleanups: null,\n context: current ? current.context : null,\n owner: current\n },\n updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));\n Owner = root;\n Listener = null;\n try {\n return runUpdates(updateFn, true);\n } finally {\n Listener = listener;\n Owner = owner;\n }\n}\nfunction createSignal(value, options) {\n options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n const s = {\n value,\n observers: null,\n observerSlots: null,\n comparator: options.equals || undefined\n };\n const setter = value => {\n if (typeof value === \"function\") {\n if (Transition && Transition.running && Transition.sources.has(s)) value = value(s.tValue);else value = value(s.value);\n }\n return writeSignal(s, value);\n };\n return [readSignal.bind(s), setter];\n}\nfunction createComputed(fn, value, options) {\n const c = createComputation(fn, value, true, STALE);\n if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createRenderEffect(fn, value, options) {\n const c = createComputation(fn, value, false, STALE);\n if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createEffect(fn, value, options) {\n runEffects = runUserEffects;\n const c = createComputation(fn, value, false, STALE),\n s = SuspenseContext && useContext(SuspenseContext);\n if (s) c.suspense = s;\n if (!options || !options.render) c.user = true;\n Effects ? Effects.push(c) : updateComputation(c);\n}\nfunction createReaction(onInvalidate, options) {\n let fn;\n const c = createComputation(() => {\n fn ? fn() : untrack(onInvalidate);\n fn = undefined;\n }, undefined, false, 0),\n s = SuspenseContext && useContext(SuspenseContext);\n if (s) c.suspense = s;\n c.user = true;\n return tracking => {\n fn = tracking;\n updateComputation(c);\n };\n}\nfunction createMemo(fn, value, options) {\n options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n const c = createComputation(fn, value, true, 0);\n c.observers = null;\n c.observerSlots = null;\n c.comparator = options.equals || undefined;\n if (Scheduler && Transition && Transition.running) {\n c.tState = STALE;\n Updates.push(c);\n } else updateComputation(c);\n return readSignal.bind(c);\n}\nfunction isPromise(v) {\n return v && typeof v === \"object\" && \"then\" in v;\n}\nfunction createResource(pSource, pFetcher, pOptions) {\n let source;\n let fetcher;\n let options;\n if (typeof pFetcher === \"function\") {\n source = pSource;\n fetcher = pFetcher;\n options = pOptions || {};\n } else {\n source = true;\n fetcher = pSource;\n options = pFetcher || {};\n }\n let pr = null,\n initP = NO_INIT,\n id = null,\n loadedUnderTransition = false,\n scheduled = false,\n resolved = \"initialValue\" in options,\n dynamic = typeof source === \"function\" && createMemo(source);\n const contexts = new Set(),\n [value, setValue] = (options.storage || createSignal)(options.initialValue),\n [error, setError] = createSignal(undefined),\n [track, trigger] = createSignal(undefined, {\n equals: false\n }),\n [state, setState] = createSignal(resolved ? \"ready\" : \"unresolved\");\n if (sharedConfig.context) {\n id = sharedConfig.getNextContextId();\n if (options.ssrLoadFrom === \"initial\") initP = options.initialValue;else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);\n }\n function loadEnd(p, v, error, key) {\n if (pr === p) {\n pr = null;\n key !== undefined && (resolved = true);\n if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {\n value: v\n }));\n initP = NO_INIT;\n if (Transition && p && loadedUnderTransition) {\n Transition.promises.delete(p);\n loadedUnderTransition = false;\n runUpdates(() => {\n Transition.running = true;\n completeLoad(v, error);\n }, false);\n } else completeLoad(v, error);\n }\n return v;\n }\n function completeLoad(v, err) {\n runUpdates(() => {\n if (err === undefined) setValue(() => v);\n setState(err !== undefined ? \"errored\" : resolved ? \"ready\" : \"unresolved\");\n setError(err);\n for (const c of contexts.keys()) c.decrement();\n contexts.clear();\n }, false);\n }\n function read() {\n const c = SuspenseContext && useContext(SuspenseContext),\n v = value(),\n err = error();\n if (err !== undefined && !pr) throw err;\n if (Listener && !Listener.user && c) {\n createComputed(() => {\n track();\n if (pr) {\n if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);else if (!contexts.has(c)) {\n c.increment();\n contexts.add(c);\n }\n }\n });\n }\n return v;\n }\n function load(refetching = true) {\n if (refetching !== false && scheduled) return;\n scheduled = false;\n const lookup = dynamic ? dynamic() : source;\n loadedUnderTransition = Transition && Transition.running;\n if (lookup == null || lookup === false) {\n loadEnd(pr, untrack(value));\n return;\n }\n if (Transition && pr) Transition.promises.delete(pr);\n let error;\n const p = initP !== NO_INIT ? initP : untrack(() => {\n try {\n return fetcher(lookup, {\n value: value(),\n refetching\n });\n } catch (fetcherError) {\n error = fetcherError;\n }\n });\n if (error !== undefined) {\n loadEnd(pr, undefined, castError(error), lookup);\n return;\n } else if (!isPromise(p)) {\n loadEnd(pr, p, undefined, lookup);\n return p;\n }\n pr = p;\n if (\"v\" in p) {\n if (p.s === 1) loadEnd(pr, p.v, undefined, lookup);else loadEnd(pr, undefined, castError(p.v), lookup);\n return p;\n }\n scheduled = true;\n queueMicrotask(() => scheduled = false);\n runUpdates(() => {\n setState(resolved ? \"refreshing\" : \"pending\");\n trigger();\n }, false);\n return p.then(v => loadEnd(p, v, undefined, lookup), e => loadEnd(p, undefined, castError(e), lookup));\n }\n Object.defineProperties(read, {\n state: {\n get: () => state()\n },\n error: {\n get: () => error()\n },\n loading: {\n get() {\n const s = state();\n return s === \"pending\" || s === \"refreshing\";\n }\n },\n latest: {\n get() {\n if (!resolved) return read();\n const err = error();\n if (err && !pr) throw err;\n return value();\n }\n }\n });\n let owner = Owner;\n if (dynamic) createComputed(() => (owner = Owner, load(false)));else load(false);\n return [read, {\n refetch: info => runWithOwner(owner, () => load(info)),\n mutate: setValue\n }];\n}\nfunction createDeferred(source, options) {\n let t,\n timeout = options ? options.timeoutMs : undefined;\n const node = createComputation(() => {\n if (!t || !t.fn) t = requestCallback(() => setDeferred(() => node.value), timeout !== undefined ? {\n timeout\n } : undefined);\n return source();\n }, undefined, true);\n const [deferred, setDeferred] = createSignal(Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, options);\n updateComputation(node);\n setDeferred(() => Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value);\n return deferred;\n}\nfunction createSelector(source, fn = equalFn, options) {\n const subs = new Map();\n const node = createComputation(p => {\n const v = source();\n for (const [key, val] of subs.entries()) if (fn(key, v) !== fn(key, p)) {\n for (const c of val.values()) {\n c.state = STALE;\n if (c.pure) Updates.push(c);else Effects.push(c);\n }\n }\n return v;\n }, undefined, true, STALE);\n updateComputation(node);\n return key => {\n const listener = Listener;\n if (listener) {\n let l;\n if (l = subs.get(key)) l.add(listener);else subs.set(key, l = new Set([listener]));\n onCleanup(() => {\n l.delete(listener);\n !l.size && subs.delete(key);\n });\n }\n return fn(key, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value);\n };\n}\nfunction batch(fn) {\n return runUpdates(fn, false);\n}\nfunction untrack(fn) {\n if (!ExternalSourceConfig && Listener === null) return fn();\n const listener = Listener;\n Listener = null;\n try {\n if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);\n return fn();\n } finally {\n Listener = listener;\n }\n}\nfunction on(deps, fn, options) {\n const isArray = Array.isArray(deps);\n let prevInput;\n let defer = options && options.defer;\n return prevValue => {\n let input;\n if (isArray) {\n input = Array(deps.length);\n for (let i = 0; i < deps.length; i++) input[i] = deps[i]();\n } else input = deps();\n if (defer) {\n defer = false;\n return prevValue;\n }\n const result = untrack(() => fn(input, prevInput, prevValue));\n prevInput = input;\n return result;\n };\n}\nfunction onMount(fn) {\n createEffect(() => untrack(fn));\n}\nfunction onCleanup(fn) {\n if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);\n return fn;\n}\nfunction catchError(fn, handler) {\n ERROR || (ERROR = Symbol(\"error\"));\n Owner = createComputation(undefined, undefined, true);\n Owner.context = {\n ...Owner.context,\n [ERROR]: [handler]\n };\n if (Transition && Transition.running) Transition.sources.add(Owner);\n try {\n return fn();\n } catch (err) {\n handleError(err);\n } finally {\n Owner = Owner.owner;\n }\n}\nfunction getListener() {\n return Listener;\n}\nfunction getOwner() {\n return Owner;\n}\nfunction runWithOwner(o, fn) {\n const prev = Owner;\n const prevListener = Listener;\n Owner = o;\n Listener = null;\n try {\n return runUpdates(fn, true);\n } catch (err) {\n handleError(err);\n } finally {\n Owner = prev;\n Listener = prevListener;\n }\n}\nfunction enableScheduling(scheduler = requestCallback) {\n Scheduler = scheduler;\n}\nfunction startTransition(fn) {\n if (Transition && Transition.running) {\n fn();\n return Transition.done;\n }\n const l = Listener;\n const o = Owner;\n return Promise.resolve().then(() => {\n Listener = l;\n Owner = o;\n let t;\n if (Scheduler || SuspenseContext) {\n t = Transition || (Transition = {\n sources: new Set(),\n effects: [],\n promises: new Set(),\n disposed: new Set(),\n queue: new Set(),\n running: true\n });\n t.done || (t.done = new Promise(res => t.resolve = res));\n t.running = true;\n }\n runUpdates(fn, false);\n Listener = Owner = null;\n return t ? t.done : undefined;\n });\n}\nconst [transPending, setTransPending] = /*@__PURE__*/createSignal(false);\nfunction useTransition() {\n return [transPending, startTransition];\n}\nfunction resumeEffects(e) {\n Effects.push.apply(Effects, e);\n e.length = 0;\n}\nfunction createContext(defaultValue, options) {\n const id = Symbol(\"context\");\n return {\n id,\n Provider: createProvider(id),\n defaultValue\n };\n}\nfunction useContext(context) {\n let value;\n return Owner && Owner.context && (value = Owner.context[context.id]) !== undefined ? value : context.defaultValue;\n}\nfunction children(fn) {\n const children = createMemo(fn);\n const memo = createMemo(() => resolveChildren(children()));\n memo.toArray = () => {\n const c = memo();\n return Array.isArray(c) ? c : c != null ? [c] : [];\n };\n return memo;\n}\nlet SuspenseContext;\nfunction getSuspenseContext() {\n return SuspenseContext || (SuspenseContext = createContext());\n}\nfunction enableExternalSource(factory, untrack = fn => fn()) {\n if (ExternalSourceConfig) {\n const {\n factory: oldFactory,\n untrack: oldUntrack\n } = ExternalSourceConfig;\n ExternalSourceConfig = {\n factory: (fn, trigger) => {\n const oldSource = oldFactory(fn, trigger);\n const source = factory(x => oldSource.track(x), trigger);\n return {\n track: x => source.track(x),\n dispose() {\n source.dispose();\n oldSource.dispose();\n }\n };\n },\n untrack: fn => oldUntrack(() => untrack(fn))\n };\n } else {\n ExternalSourceConfig = {\n factory,\n untrack\n };\n }\n}\nfunction readSignal() {\n const runningTransition = Transition && Transition.running;\n if (this.sources && (runningTransition ? this.tState : this.state)) {\n if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);else {\n const updates = Updates;\n Updates = null;\n runUpdates(() => lookUpstream(this), false);\n Updates = updates;\n }\n }\n if (Listener) {\n const sSlot = this.observers ? this.observers.length : 0;\n if (!Listener.sources) {\n Listener.sources = [this];\n Listener.sourceSlots = [sSlot];\n } else {\n Listener.sources.push(this);\n Listener.sourceSlots.push(sSlot);\n }\n if (!this.observers) {\n this.observers = [Listener];\n this.observerSlots = [Listener.sources.length - 1];\n } else {\n this.observers.push(Listener);\n this.observerSlots.push(Listener.sources.length - 1);\n }\n }\n if (runningTransition && Transition.sources.has(this)) return this.tValue;\n return this.value;\n}\nfunction writeSignal(node, value, isComp) {\n let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;\n if (!node.comparator || !node.comparator(current, value)) {\n if (Transition) {\n const TransitionRunning = Transition.running;\n if (TransitionRunning || !isComp && Transition.sources.has(node)) {\n Transition.sources.add(node);\n node.tValue = value;\n }\n if (!TransitionRunning) node.value = value;\n } else node.value = value;\n if (node.observers && node.observers.length) {\n runUpdates(() => {\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n const TransitionRunning = Transition && Transition.running;\n if (TransitionRunning && Transition.disposed.has(o)) continue;\n if (TransitionRunning ? !o.tState : !o.state) {\n if (o.pure) Updates.push(o);else Effects.push(o);\n if (o.observers) markDownstream(o);\n }\n if (!TransitionRunning) o.state = STALE;else o.tState = STALE;\n }\n if (Updates.length > 10e5) {\n Updates = [];\n if (IS_DEV) ;\n throw new Error();\n }\n }, false);\n }\n }\n return value;\n}\nfunction updateComputation(node) {\n if (!node.fn) return;\n cleanNode(node);\n const time = ExecCount;\n runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);\n if (Transition && !Transition.running && Transition.sources.has(node)) {\n queueMicrotask(() => {\n runUpdates(() => {\n Transition && (Transition.running = true);\n Listener = Owner = node;\n runComputation(node, node.tValue, time);\n Listener = Owner = null;\n }, false);\n });\n }\n}\nfunction runComputation(node, value, time) {\n let nextValue;\n const owner = Owner,\n listener = Listener;\n Listener = Owner = node;\n try {\n nextValue = node.fn(value);\n } catch (err) {\n if (node.pure) {\n if (Transition && Transition.running) {\n node.tState = STALE;\n node.tOwned && node.tOwned.forEach(cleanNode);\n node.tOwned = undefined;\n } else {\n node.state = STALE;\n node.owned && node.owned.forEach(cleanNode);\n node.owned = null;\n }\n }\n node.updatedAt = time + 1;\n return handleError(err);\n } finally {\n Listener = listener;\n Owner = owner;\n }\n if (!node.updatedAt || node.updatedAt <= time) {\n if (node.updatedAt != null && \"observers\" in node) {\n writeSignal(node, nextValue, true);\n } else if (Transition && Transition.running && node.pure) {\n Transition.sources.add(node);\n node.tValue = nextValue;\n } else node.value = nextValue;\n node.updatedAt = time;\n }\n}\nfunction createComputation(fn, init, pure, state = STALE, options) {\n const c = {\n fn,\n state: state,\n updatedAt: null,\n owned: null,\n sources: null,\n sourceSlots: null,\n cleanups: null,\n value: init,\n owner: Owner,\n context: Owner ? Owner.context : null,\n pure\n };\n if (Transition && Transition.running) {\n c.state = 0;\n c.tState = state;\n }\n if (Owner === null) ;else if (Owner !== UNOWNED) {\n if (Transition && Transition.running && Owner.pure) {\n if (!Owner.tOwned) Owner.tOwned = [c];else Owner.tOwned.push(c);\n } else {\n if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);\n }\n }\n if (ExternalSourceConfig && c.fn) {\n const [track, trigger] = createSignal(undefined, {\n equals: false\n });\n const ordinary = ExternalSourceConfig.factory(c.fn, trigger);\n onCleanup(() => ordinary.dispose());\n const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());\n const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);\n c.fn = x => {\n track();\n return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);\n };\n }\n return c;\n}\nfunction runTop(node) {\n const runningTransition = Transition && Transition.running;\n if ((runningTransition ? node.tState : node.state) === 0) return;\n if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);\n if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);\n const ancestors = [node];\n while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {\n if (runningTransition && Transition.disposed.has(node)) return;\n if (runningTransition ? node.tState : node.state) ancestors.push(node);\n }\n for (let i = ancestors.length - 1; i >= 0; i--) {\n node = ancestors[i];\n if (runningTransition) {\n let top = node,\n prev = ancestors[i + 1];\n while ((top = top.owner) && top !== prev) {\n if (Transition.disposed.has(top)) return;\n }\n }\n if ((runningTransition ? node.tState : node.state) === STALE) {\n updateComputation(node);\n } else if ((runningTransition ? node.tState : node.state) === PENDING) {\n const updates = Updates;\n Updates = null;\n runUpdates(() => lookUpstream(node, ancestors[0]), false);\n Updates = updates;\n }\n }\n}\nfunction runUpdates(fn, init) {\n if (Updates) return fn();\n let wait = false;\n if (!init) Updates = [];\n if (Effects) wait = true;else Effects = [];\n ExecCount++;\n try {\n const res = fn();\n completeUpdates(wait);\n return res;\n } catch (err) {\n if (!wait) Effects = null;\n Updates = null;\n handleError(err);\n }\n}\nfunction completeUpdates(wait) {\n if (Updates) {\n if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);else runQueue(Updates);\n Updates = null;\n }\n if (wait) return;\n let res;\n if (Transition) {\n if (!Transition.promises.size && !Transition.queue.size) {\n const sources = Transition.sources;\n const disposed = Transition.disposed;\n Effects.push.apply(Effects, Transition.effects);\n res = Transition.resolve;\n for (const e of Effects) {\n \"tState\" in e && (e.state = e.tState);\n delete e.tState;\n }\n Transition = null;\n runUpdates(() => {\n for (const d of disposed) cleanNode(d);\n for (const v of sources) {\n v.value = v.tValue;\n if (v.owned) {\n for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);\n }\n if (v.tOwned) v.owned = v.tOwned;\n delete v.tValue;\n delete v.tOwned;\n v.tState = 0;\n }\n setTransPending(false);\n }, false);\n } else if (Transition.running) {\n Transition.running = false;\n Transition.effects.push.apply(Transition.effects, Effects);\n Effects = null;\n setTransPending(true);\n return;\n }\n }\n const e = Effects;\n Effects = null;\n if (e.length) runUpdates(() => runEffects(e), false);\n if (res) res();\n}\nfunction runQueue(queue) {\n for (let i = 0; i < queue.length; i++) runTop(queue[i]);\n}\nfunction scheduleQueue(queue) {\n for (let i = 0; i < queue.length; i++) {\n const item = queue[i];\n const tasks = Transition.queue;\n if (!tasks.has(item)) {\n tasks.add(item);\n Scheduler(() => {\n tasks.delete(item);\n runUpdates(() => {\n Transition.running = true;\n runTop(item);\n }, false);\n Transition && (Transition.running = false);\n });\n }\n }\n}\nfunction runUserEffects(queue) {\n let i,\n userLength = 0;\n for (i = 0; i < queue.length; i++) {\n const e = queue[i];\n if (!e.user) runTop(e);else queue[userLength++] = e;\n }\n if (sharedConfig.context) {\n if (sharedConfig.count) {\n sharedConfig.effects || (sharedConfig.effects = []);\n sharedConfig.effects.push(...queue.slice(0, userLength));\n return;\n }\n setHydrateContext();\n }\n if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {\n queue = [...sharedConfig.effects, ...queue];\n userLength += sharedConfig.effects.length;\n delete sharedConfig.effects;\n }\n for (i = 0; i < userLength; i++) runTop(queue[i]);\n}\nfunction lookUpstream(node, ignore) {\n const runningTransition = Transition && Transition.running;\n if (runningTransition) node.tState = 0;else node.state = 0;\n for (let i = 0; i < node.sources.length; i += 1) {\n const source = node.sources[i];\n if (source.sources) {\n const state = runningTransition ? source.tState : source.state;\n if (state === STALE) {\n if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);\n } else if (state === PENDING) lookUpstream(source, ignore);\n }\n }\n}\nfunction markDownstream(node) {\n const runningTransition = Transition && Transition.running;\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n if (runningTransition ? !o.tState : !o.state) {\n if (runningTransition) o.tState = PENDING;else o.state = PENDING;\n if (o.pure) Updates.push(o);else Effects.push(o);\n o.observers && markDownstream(o);\n }\n }\n}\nfunction cleanNode(node) {\n let i;\n if (node.sources) {\n while (node.sources.length) {\n const source = node.sources.pop(),\n index = node.sourceSlots.pop(),\n obs = source.observers;\n if (obs && obs.length) {\n const n = obs.pop(),\n s = source.observerSlots.pop();\n if (index < obs.length) {\n n.sourceSlots[s] = index;\n obs[index] = n;\n source.observerSlots[index] = s;\n }\n }\n }\n }\n if (node.tOwned) {\n for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);\n delete node.tOwned;\n }\n if (Transition && Transition.running && node.pure) {\n reset(node, true);\n } else if (node.owned) {\n for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);\n node.owned = null;\n }\n if (node.cleanups) {\n for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();\n node.cleanups = null;\n }\n if (Transition && Transition.running) node.tState = 0;else node.state = 0;\n}\nfunction reset(node, top) {\n if (!top) {\n node.tState = 0;\n Transition.disposed.add(node);\n }\n if (node.owned) {\n for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);\n }\n}\nfunction castError(err) {\n if (err instanceof Error) return err;\n return new Error(typeof err === \"string\" ? err : \"Unknown error\", {\n cause: err\n });\n}\nfunction runErrors(err, fns, owner) {\n try {\n for (const f of fns) f(err);\n } catch (e) {\n handleError(e, owner && owner.owner || null);\n }\n}\nfunction handleError(err, owner = Owner) {\n const fns = ERROR && owner && owner.context && owner.context[ERROR];\n const error = castError(err);\n if (!fns) throw error;\n if (Effects) Effects.push({\n fn() {\n runErrors(error, fns, owner);\n },\n state: STALE\n });else runErrors(error, fns, owner);\n}\nfunction resolveChildren(children) {\n if (typeof children === \"function\" && !children.length) return resolveChildren(children());\n if (Array.isArray(children)) {\n const results = [];\n for (let i = 0; i < children.length; i++) {\n const result = resolveChildren(children[i]);\n Array.isArray(result) ? results.push.apply(results, result) : results.push(result);\n }\n return results;\n }\n return children;\n}\nfunction createProvider(id, options) {\n return function provider(props) {\n let res;\n createRenderEffect(() => res = untrack(() => {\n Owner.context = {\n ...Owner.context,\n [id]: props.value\n };\n return children(() => props.children);\n }), undefined);\n return res;\n };\n}\nfunction onError(fn) {\n ERROR || (ERROR = Symbol(\"error\"));\n if (Owner === null) ;else if (Owner.context === null || !Owner.context[ERROR]) {\n Owner.context = {\n ...Owner.context,\n [ERROR]: [fn]\n };\n mutateContext(Owner, ERROR, [fn]);\n } else Owner.context[ERROR].push(fn);\n}\nfunction mutateContext(o, key, value) {\n if (o.owned) {\n for (let i = 0; i < o.owned.length; i++) {\n if (o.owned[i].context === o.context) mutateContext(o.owned[i], key, value);\n if (!o.owned[i].context) {\n o.owned[i].context = o.context;\n mutateContext(o.owned[i], key, value);\n } else if (!o.owned[i].context[key]) {\n o.owned[i].context[key] = value;\n mutateContext(o.owned[i], key, value);\n }\n }\n }\n}\n\nfunction observable(input) {\n return {\n subscribe(observer) {\n if (!(observer instanceof Object) || observer == null) {\n throw new TypeError(\"Expected the observer to be an object.\");\n }\n const handler = typeof observer === \"function\" ? observer : observer.next && observer.next.bind(observer);\n if (!handler) {\n return {\n unsubscribe() {}\n };\n }\n const dispose = createRoot(disposer => {\n createEffect(() => {\n const v = input();\n untrack(() => handler(v));\n });\n return disposer;\n });\n if (getOwner()) onCleanup(dispose);\n return {\n unsubscribe() {\n dispose();\n }\n };\n },\n [Symbol.observable || \"@@observable\"]() {\n return this;\n }\n };\n}\nfunction from(producer, initalValue = undefined) {\n const [s, set] = createSignal(initalValue, {\n equals: false\n });\n if (\"subscribe\" in producer) {\n const unsub = producer.subscribe(v => set(() => v));\n onCleanup(() => \"unsubscribe\" in unsub ? unsub.unsubscribe() : unsub());\n } else {\n const clean = producer(set);\n onCleanup(clean);\n }\n return s;\n}\n\nconst FALLBACK = Symbol(\"fallback\");\nfunction dispose(d) {\n for (let i = 0; i < d.length; i++) d[i]();\n}\nfunction mapArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n len = 0,\n indexes = mapFn.length > 1 ? [] : null;\n onCleanup(() => dispose(disposers));\n return () => {\n let newItems = list() || [],\n newLen = newItems.length,\n i,\n j;\n newItems[$TRACK];\n return untrack(() => {\n let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;\n if (newLen === 0) {\n if (len !== 0) {\n dispose(disposers);\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n indexes && (indexes = []);\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n });\n len = 1;\n }\n }\n else if (len === 0) {\n mapped = new Array(newLen);\n for (j = 0; j < newLen; j++) {\n items[j] = newItems[j];\n mapped[j] = createRoot(mapper);\n }\n len = newLen;\n } else {\n temp = new Array(newLen);\n tempdisposers = new Array(newLen);\n indexes && (tempIndexes = new Array(newLen));\n for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);\n for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {\n temp[newEnd] = mapped[end];\n tempdisposers[newEnd] = disposers[end];\n indexes && (tempIndexes[newEnd] = indexes[end]);\n }\n newIndices = new Map();\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = newItems[j];\n i = newIndices.get(item);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(item, j);\n }\n for (i = start; i <= end; i++) {\n item = items[i];\n j = newIndices.get(item);\n if (j !== undefined && j !== -1) {\n temp[j] = mapped[i];\n tempdisposers[j] = disposers[i];\n indexes && (tempIndexes[j] = indexes[i]);\n j = newIndicesNext[j];\n newIndices.set(item, j);\n } else disposers[i]();\n }\n for (j = start; j < newLen; j++) {\n if (j in temp) {\n mapped[j] = temp[j];\n disposers[j] = tempdisposers[j];\n if (indexes) {\n indexes[j] = tempIndexes[j];\n indexes[j](j);\n }\n } else mapped[j] = createRoot(mapper);\n }\n mapped = mapped.slice(0, len = newLen);\n items = newItems.slice(0);\n }\n return mapped;\n });\n function mapper(disposer) {\n disposers[j] = disposer;\n if (indexes) {\n const [s, set] = createSignal(j);\n indexes[j] = set;\n return mapFn(newItems[j], s);\n }\n return mapFn(newItems[j]);\n }\n };\n}\nfunction indexArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n signals = [],\n len = 0,\n i;\n onCleanup(() => dispose(disposers));\n return () => {\n const newItems = list() || [],\n newLen = newItems.length;\n newItems[$TRACK];\n return untrack(() => {\n if (newLen === 0) {\n if (len !== 0) {\n dispose(disposers);\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n signals = [];\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n });\n len = 1;\n }\n return mapped;\n }\n if (items[0] === FALLBACK) {\n disposers[0]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n }\n for (i = 0; i < newLen; i++) {\n if (i < items.length && items[i] !== newItems[i]) {\n signals[i](() => newItems[i]);\n } else if (i >= items.length) {\n mapped[i] = createRoot(mapper);\n }\n }\n for (; i < items.length; i++) {\n disposers[i]();\n }\n len = signals.length = disposers.length = newLen;\n items = newItems.slice(0);\n return mapped = mapped.slice(0, len);\n });\n function mapper(disposer) {\n disposers[i] = disposer;\n const [s, set] = createSignal(newItems[i]);\n signals[i] = set;\n return mapFn(s, i);\n }\n };\n}\n\nlet hydrationEnabled = false;\nfunction enableHydration() {\n hydrationEnabled = true;\n}\nfunction createComponent(Comp, props) {\n if (hydrationEnabled) {\n if (sharedConfig.context) {\n const c = sharedConfig.context;\n setHydrateContext(nextHydrateContext());\n const r = untrack(() => Comp(props || {}));\n setHydrateContext(c);\n return r;\n }\n }\n return untrack(() => Comp(props || {}));\n}\nfunction trueFn() {\n return true;\n}\nconst propTraps = {\n get(_, property, receiver) {\n if (property === $PROXY) return receiver;\n return _.get(property);\n },\n has(_, property) {\n if (property === $PROXY) return true;\n return _.has(property);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(_, property) {\n return {\n configurable: true,\n enumerable: true,\n get() {\n return _.get(property);\n },\n set: trueFn,\n deleteProperty: trueFn\n };\n },\n ownKeys(_) {\n return _.keys();\n }\n};\nfunction resolveSource(s) {\n return !(s = typeof s === \"function\" ? s() : s) ? {} : s;\n}\nfunction resolveSources() {\n for (let i = 0, length = this.length; i < length; ++i) {\n const v = this[i]();\n if (v !== undefined) return v;\n }\n}\nfunction mergeProps(...sources) {\n let proxy = false;\n for (let i = 0; i < sources.length; i++) {\n const s = sources[i];\n proxy = proxy || !!s && $PROXY in s;\n sources[i] = typeof s === \"function\" ? (proxy = true, createMemo(s)) : s;\n }\n if (SUPPORTS_PROXY && proxy) {\n return new Proxy({\n get(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n const v = resolveSource(sources[i])[property];\n if (v !== undefined) return v;\n }\n },\n has(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n if (property in resolveSource(sources[i])) return true;\n }\n return false;\n },\n keys() {\n const keys = [];\n for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));\n return [...new Set(keys)];\n }\n }, propTraps);\n }\n const sourcesMap = {};\n const defined = Object.create(null);\n for (let i = sources.length - 1; i >= 0; i--) {\n const source = sources[i];\n if (!source) continue;\n const sourceKeys = Object.getOwnPropertyNames(source);\n for (let i = sourceKeys.length - 1; i >= 0; i--) {\n const key = sourceKeys[i];\n if (key === \"__proto__\" || key === \"constructor\") continue;\n const desc = Object.getOwnPropertyDescriptor(source, key);\n if (!defined[key]) {\n defined[key] = desc.get ? {\n enumerable: true,\n configurable: true,\n get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])\n } : desc.value !== undefined ? desc : undefined;\n } else {\n const sources = sourcesMap[key];\n if (sources) {\n if (desc.get) sources.push(desc.get.bind(source));else if (desc.value !== undefined) sources.push(() => desc.value);\n }\n }\n }\n }\n const target = {};\n const definedKeys = Object.keys(defined);\n for (let i = definedKeys.length - 1; i >= 0; i--) {\n const key = definedKeys[i],\n desc = defined[key];\n if (desc && desc.get) Object.defineProperty(target, key, desc);else target[key] = desc ? desc.value : undefined;\n }\n return target;\n}\nfunction splitProps(props, ...keys) {\n const len = keys.length;\n if (SUPPORTS_PROXY && $PROXY in props) {\n const blocked = len > 1 ? keys.flat() : keys[0];\n const res = keys.map(k => {\n return new Proxy({\n get(property) {\n return k.includes(property) ? props[property] : undefined;\n },\n has(property) {\n return k.includes(property) && property in props;\n },\n keys() {\n return k.filter(property => property in props);\n }\n }, propTraps);\n });\n res.push(new Proxy({\n get(property) {\n return blocked.includes(property) ? undefined : props[property];\n },\n has(property) {\n return blocked.includes(property) ? false : property in props;\n },\n keys() {\n return Object.keys(props).filter(k => !blocked.includes(k));\n }\n }, propTraps));\n return res;\n }\n const objects = [];\n for (let i = 0; i <= len; i++) {\n objects[i] = {};\n }\n for (const propName of Object.getOwnPropertyNames(props)) {\n let keyIndex = len;\n for (let i = 0; i < keys.length; i++) {\n if (keys[i].includes(propName)) {\n keyIndex = i;\n break;\n }\n }\n const desc = Object.getOwnPropertyDescriptor(props, propName);\n const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;\n isDefaultDesc ? objects[keyIndex][propName] = desc.value : Object.defineProperty(objects[keyIndex], propName, desc);\n }\n return objects;\n}\nfunction lazy(fn) {\n let comp;\n let p;\n const wrap = props => {\n const ctx = sharedConfig.context;\n if (ctx) {\n const [s, set] = createSignal();\n sharedConfig.count || (sharedConfig.count = 0);\n sharedConfig.count++;\n (p || (p = fn())).then(mod => {\n !sharedConfig.done && setHydrateContext(ctx);\n sharedConfig.count--;\n set(() => mod.default);\n setHydrateContext();\n });\n comp = s;\n } else if (!comp) {\n const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));\n comp = s;\n }\n let Comp;\n return createMemo(() => (Comp = comp()) ? untrack(() => {\n if (IS_DEV) ;\n if (!ctx || sharedConfig.done) return Comp(props);\n const c = sharedConfig.context;\n setHydrateContext(ctx);\n const r = Comp(props);\n setHydrateContext(c);\n return r;\n }) : \"\");\n };\n wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);\n return wrap;\n}\nlet counter = 0;\nfunction createUniqueId() {\n const ctx = sharedConfig.context;\n return ctx ? sharedConfig.getNextContextId() : `cl-${counter++}`;\n}\n\nconst narrowedError = name => `Stale read from <${name}>.`;\nfunction For(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(mapArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Index(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(indexArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Show(props) {\n const keyed = props.keyed;\n const conditionValue = createMemo(() => props.when, undefined, undefined);\n const condition = keyed ? conditionValue : createMemo(conditionValue, undefined, {\n equals: (a, b) => !a === !b\n });\n return createMemo(() => {\n const c = condition();\n if (c) {\n const child = props.children;\n const fn = typeof child === \"function\" && child.length > 0;\n return fn ? untrack(() => child(keyed ? c : () => {\n if (!untrack(condition)) throw narrowedError(\"Show\");\n return conditionValue();\n })) : child;\n }\n return props.fallback;\n }, undefined, undefined);\n}\nfunction Switch(props) {\n const chs = children(() => props.children);\n const switchFunc = createMemo(() => {\n const ch = chs();\n const mps = Array.isArray(ch) ? ch : [ch];\n let func = () => undefined;\n for (let i = 0; i < mps.length; i++) {\n const index = i;\n const mp = mps[i];\n const prevFunc = func;\n const conditionValue = createMemo(() => prevFunc() ? undefined : mp.when, undefined, undefined);\n const condition = mp.keyed ? conditionValue : createMemo(conditionValue, undefined, {\n equals: (a, b) => !a === !b\n });\n func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);\n }\n return func;\n });\n return createMemo(() => {\n const sel = switchFunc()();\n if (!sel) return props.fallback;\n const [index, conditionValue, mp] = sel;\n const child = mp.children;\n const fn = typeof child === \"function\" && child.length > 0;\n return fn ? untrack(() => child(mp.keyed ? conditionValue() : () => {\n if (untrack(switchFunc)()?.[0] !== index) throw narrowedError(\"Match\");\n return conditionValue();\n })) : child;\n }, undefined, undefined);\n}\nfunction Match(props) {\n return props;\n}\nlet Errors;\nfunction resetErrorBoundaries() {\n Errors && [...Errors].forEach(fn => fn());\n}\nfunction ErrorBoundary(props) {\n let err;\n if (sharedConfig.context && sharedConfig.load) err = sharedConfig.load(sharedConfig.getContextId());\n const [errored, setErrored] = createSignal(err, undefined);\n Errors || (Errors = new Set());\n Errors.add(setErrored);\n onCleanup(() => Errors.delete(setErrored));\n return createMemo(() => {\n let e;\n if (e = errored()) {\n const f = props.fallback;\n return typeof f === \"function\" && f.length ? untrack(() => f(e, () => setErrored())) : f;\n }\n return catchError(() => props.children, setErrored);\n }, undefined, undefined);\n}\n\nconst suspenseListEquals = (a, b) => a.showContent === b.showContent && a.showFallback === b.showFallback;\nconst SuspenseListContext = /* #__PURE__ */createContext();\nfunction SuspenseList(props) {\n let [wrapper, setWrapper] = createSignal(() => ({\n inFallback: false\n })),\n show;\n const listContext = useContext(SuspenseListContext);\n const [registry, setRegistry] = createSignal([]);\n if (listContext) {\n show = listContext.register(createMemo(() => wrapper()().inFallback));\n }\n const resolved = createMemo(prev => {\n const reveal = props.revealOrder,\n tail = props.tail,\n {\n showContent = true,\n showFallback = true\n } = show ? show() : {},\n reg = registry(),\n reverse = reveal === \"backwards\";\n if (reveal === \"together\") {\n const all = reg.every(inFallback => !inFallback());\n const res = reg.map(() => ({\n showContent: all && showContent,\n showFallback\n }));\n res.inFallback = !all;\n return res;\n }\n let stop = false;\n let inFallback = prev.inFallback;\n const res = [];\n for (let i = 0, len = reg.length; i < len; i++) {\n const n = reverse ? len - i - 1 : i,\n s = reg[n]();\n if (!stop && !s) {\n res[n] = {\n showContent,\n showFallback\n };\n } else {\n const next = !stop;\n if (next) inFallback = true;\n res[n] = {\n showContent: next,\n showFallback: !tail || next && tail === \"collapsed\" ? showFallback : false\n };\n stop = true;\n }\n }\n if (!stop) inFallback = false;\n res.inFallback = inFallback;\n return res;\n }, {\n inFallback: false\n });\n setWrapper(() => resolved);\n return createComponent(SuspenseListContext.Provider, {\n value: {\n register: inFallback => {\n let index;\n setRegistry(registry => {\n index = registry.length;\n return [...registry, inFallback];\n });\n return createMemo(() => resolved()[index], undefined, {\n equals: suspenseListEquals\n });\n }\n },\n get children() {\n return props.children;\n }\n });\n}\nfunction Suspense(props) {\n let counter = 0,\n show,\n ctx,\n p,\n flicker,\n error;\n const [inFallback, setFallback] = createSignal(false),\n SuspenseContext = getSuspenseContext(),\n store = {\n increment: () => {\n if (++counter === 1) setFallback(true);\n },\n decrement: () => {\n if (--counter === 0) setFallback(false);\n },\n inFallback,\n effects: [],\n resolved: false\n },\n owner = getOwner();\n if (sharedConfig.context && sharedConfig.load) {\n const key = sharedConfig.getContextId();\n let ref = sharedConfig.load(key);\n if (ref) {\n if (typeof ref !== \"object\" || ref.s !== 1) p = ref;else sharedConfig.gather(key);\n }\n if (p && p !== \"$$f\") {\n const [s, set] = createSignal(undefined, {\n equals: false\n });\n flicker = s;\n p.then(() => {\n if (sharedConfig.done) return set();\n sharedConfig.gather(key);\n setHydrateContext(ctx);\n set();\n setHydrateContext();\n }, err => {\n error = err;\n set();\n });\n }\n }\n const listContext = useContext(SuspenseListContext);\n if (listContext) show = listContext.register(store.inFallback);\n let dispose;\n onCleanup(() => dispose && dispose());\n return createComponent(SuspenseContext.Provider, {\n value: store,\n get children() {\n return createMemo(() => {\n if (error) throw error;\n ctx = sharedConfig.context;\n if (flicker) {\n flicker();\n return flicker = undefined;\n }\n if (ctx && p === \"$$f\") setHydrateContext();\n const rendered = createMemo(() => props.children);\n return createMemo(prev => {\n const inFallback = store.inFallback(),\n {\n showContent = true,\n showFallback = true\n } = show ? show() : {};\n if ((!inFallback || p && p !== \"$$f\") && showContent) {\n store.resolved = true;\n dispose && dispose();\n dispose = ctx = p = undefined;\n resumeEffects(store.effects);\n return rendered();\n }\n if (!showFallback) return;\n if (dispose) return prev;\n return createRoot(disposer => {\n dispose = disposer;\n if (ctx) {\n setHydrateContext({\n id: ctx.id + \"F\",\n count: 0\n });\n ctx = undefined;\n }\n return props.fallback;\n }, owner);\n });\n });\n }\n });\n}\n\nconst DEV = undefined;\n\nexport { $DEVCOMP, $PROXY, $TRACK, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, cancelCallback, catchError, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };\n","import { createMemo, createRoot, createRenderEffect, untrack, sharedConfig, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps } from 'solid-js';\nexport { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';\n\nconst booleans = [\"allowfullscreen\", \"async\", \"alpha\",\n\"autofocus\",\n\"autoplay\", \"checked\", \"controls\", \"default\", \"disabled\", \"formnovalidate\", \"hidden\",\n\"indeterminate\", \"inert\",\n\"ismap\", \"loop\", \"multiple\", \"muted\", \"nomodule\", \"novalidate\", \"open\", \"playsinline\", \"readonly\", \"required\", \"reversed\", \"seamless\",\n\"selected\", \"adauctionheaders\",\n\"browsingtopics\",\n\"credentialless\",\n\"defaultchecked\", \"defaultmuted\", \"defaultselected\", \"defer\", \"disablepictureinpicture\", \"disableremoteplayback\", \"preservespitch\",\n\"shadowrootclonable\", \"shadowrootcustomelementregistry\",\n\"shadowrootdelegatesfocus\", \"shadowrootserializable\",\n\"sharedstoragewritable\"\n];\nconst Properties = /*#__PURE__*/new Set([\n\"className\", \"value\",\n\"readOnly\", \"noValidate\", \"formNoValidate\", \"isMap\", \"noModule\", \"playsInline\", \"adAuctionHeaders\",\n\"allowFullscreen\", \"browsingTopics\",\n\"defaultChecked\", \"defaultMuted\", \"defaultSelected\", \"disablePictureInPicture\", \"disableRemotePlayback\", \"preservesPitch\", \"shadowRootClonable\", \"shadowRootCustomElementRegistry\",\n\"shadowRootDelegatesFocus\", \"shadowRootSerializable\",\n\"sharedStorageWritable\",\n...booleans]);\nconst ChildProperties = /*#__PURE__*/new Set([\"innerHTML\", \"textContent\", \"innerText\", \"children\"]);\nconst Aliases = /*#__PURE__*/Object.assign(Object.create(null), {\n className: \"class\",\n htmlFor: \"for\"\n});\nconst PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {\n class: \"className\",\n novalidate: {\n $: \"noValidate\",\n FORM: 1\n },\n formnovalidate: {\n $: \"formNoValidate\",\n BUTTON: 1,\n INPUT: 1\n },\n ismap: {\n $: \"isMap\",\n IMG: 1\n },\n nomodule: {\n $: \"noModule\",\n SCRIPT: 1\n },\n playsinline: {\n $: \"playsInline\",\n VIDEO: 1\n },\n readonly: {\n $: \"readOnly\",\n INPUT: 1,\n TEXTAREA: 1\n },\n adauctionheaders: {\n $: \"adAuctionHeaders\",\n IFRAME: 1\n },\n allowfullscreen: {\n $: \"allowFullscreen\",\n IFRAME: 1\n },\n browsingtopics: {\n $: \"browsingTopics\",\n IMG: 1\n },\n defaultchecked: {\n $: \"defaultChecked\",\n INPUT: 1\n },\n defaultmuted: {\n $: \"defaultMuted\",\n AUDIO: 1,\n VIDEO: 1\n },\n defaultselected: {\n $: \"defaultSelected\",\n OPTION: 1\n },\n disablepictureinpicture: {\n $: \"disablePictureInPicture\",\n VIDEO: 1\n },\n disableremoteplayback: {\n $: \"disableRemotePlayback\",\n AUDIO: 1,\n VIDEO: 1\n },\n preservespitch: {\n $: \"preservesPitch\",\n AUDIO: 1,\n VIDEO: 1\n },\n shadowrootclonable: {\n $: \"shadowRootClonable\",\n TEMPLATE: 1\n },\n shadowrootdelegatesfocus: {\n $: \"shadowRootDelegatesFocus\",\n TEMPLATE: 1\n },\n shadowrootserializable: {\n $: \"shadowRootSerializable\",\n TEMPLATE: 1\n },\n sharedstoragewritable: {\n $: \"sharedStorageWritable\",\n IFRAME: 1,\n IMG: 1\n }\n});\nfunction getPropAlias(prop, tagName) {\n const a = PropAliases[prop];\n return typeof a === \"object\" ? a[tagName] ? a[\"$\"] : undefined : a;\n}\nconst 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\"]);\nconst SVGElements = /*#__PURE__*/new Set([\n\"altGlyph\", \"altGlyphDef\", \"altGlyphItem\", \"animate\", \"animateColor\", \"animateMotion\", \"animateTransform\", \"circle\", \"clipPath\", \"color-profile\", \"cursor\", \"defs\", \"desc\", \"ellipse\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feDropShadow\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"filter\", \"font\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignObject\", \"g\", \"glyph\", \"glyphRef\", \"hkern\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"metadata\", \"missing-glyph\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\",\n\"set\", \"stop\",\n\"svg\", \"switch\", \"symbol\", \"text\", \"textPath\",\n\"tref\", \"tspan\", \"use\", \"view\", \"vkern\"]);\nconst SVGNamespace = {\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\"\n};\nconst DOMElements = /*#__PURE__*/new Set([\"html\", \"base\", \"head\", \"link\", \"meta\", \"style\", \"title\", \"body\", \"address\", \"article\", \"aside\", \"footer\", \"header\", \"main\", \"nav\", \"section\", \"body\", \"blockquote\", \"dd\", \"div\", \"dl\", \"dt\", \"figcaption\", \"figure\", \"hr\", \"li\", \"ol\", \"p\", \"pre\", \"ul\", \"a\", \"abbr\", \"b\", \"bdi\", \"bdo\", \"br\", \"cite\", \"code\", \"data\", \"dfn\", \"em\", \"i\", \"kbd\", \"mark\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"small\", \"span\", \"strong\", \"sub\", \"sup\", \"time\", \"u\", \"var\", \"wbr\", \"area\", \"audio\", \"img\", \"map\", \"track\", \"video\", \"embed\", \"iframe\", \"object\", \"param\", \"picture\", \"portal\", \"source\", \"svg\", \"math\", \"canvas\", \"noscript\", \"script\", \"del\", \"ins\", \"caption\", \"col\", \"colgroup\", \"table\", \"tbody\", \"td\", \"tfoot\", \"th\", \"thead\", \"tr\", \"button\", \"datalist\", \"fieldset\", \"form\", \"input\", \"label\", \"legend\", \"meter\", \"optgroup\", \"option\", \"output\", \"progress\", \"select\", \"textarea\", \"details\", \"dialog\", \"menu\", \"summary\", \"details\", \"slot\", \"template\", \"acronym\", \"applet\", \"basefont\", \"bgsound\", \"big\", \"blink\", \"center\", \"content\", \"dir\", \"font\", \"frame\", \"frameset\", \"hgroup\", \"image\", \"keygen\", \"marquee\", \"menuitem\", \"nobr\", \"noembed\", \"noframes\", \"plaintext\", \"rb\", \"rtc\", \"shadow\", \"spacer\", \"strike\", \"tt\", \"xmp\", \"a\", \"abbr\", \"acronym\", \"address\", \"applet\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"base\", \"basefont\", \"bdi\", \"bdo\", \"bgsound\", \"big\", \"blink\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\", \"content\", \"data\", \"datalist\", \"dd\", \"del\", \"details\", \"dfn\", \"dialog\", \"dir\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"fieldset\", \"figcaption\", \"figure\", \"font\", \"footer\", \"form\", \"frame\", \"frameset\", \"head\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"iframe\", \"image\", \"img\", \"input\", \"ins\", \"kbd\", \"keygen\", \"label\", \"legend\", \"li\", \"link\", \"main\", \"map\", \"mark\", \"marquee\", \"menu\", \"menuitem\", \"meta\", \"meter\", \"nav\", \"nobr\", \"noembed\", \"noframes\", \"noscript\", \"object\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"param\", \"picture\", \"plaintext\", \"portal\", \"pre\", \"progress\", \"q\", \"rb\", \"rp\", \"rt\", \"rtc\", \"ruby\", \"s\", \"samp\", \"script\", \"section\", \"select\", \"shadow\", \"slot\", \"small\", \"source\", \"spacer\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"template\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"title\", \"tr\", \"track\", \"tt\", \"u\", \"ul\", \"var\", \"video\", \"wbr\", \"xmp\", \"input\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\",\n\"webview\",\n\"isindex\", \"listing\", \"multicol\", \"nextid\", \"noindex\", \"search\"]);\n\nconst memo = fn => createMemo(() => fn());\n\nfunction reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = a[aEnd - 1].nextSibling,\n map = null;\n while (aStart < aEnd || bStart < bEnd) {\n if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n continue;\n }\n while (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n }\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;\n while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) a[aStart].remove();\n aStart++;\n }\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const node = a[--aEnd].nextSibling;\n parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);\n parentNode.insertBefore(b[--bEnd], node);\n a[aEnd] = b[bEnd];\n } else {\n if (!map) {\n map = new Map();\n let i = bStart;\n while (i < bEnd) map.set(b[i], i++);\n }\n const index = map.get(a[aStart]);\n if (index != null) {\n if (bStart < index && index < bEnd) {\n let i = aStart,\n sequence = 1,\n t;\n while (++i < aEnd && i < bEnd) {\n if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n sequence++;\n }\n if (sequence > index - bStart) {\n const node = a[aStart];\n while (bStart < index) parentNode.insertBefore(b[bStart++], node);\n } else parentNode.replaceChild(b[bStart++], a[aStart++]);\n } else aStart++;\n } else a[aStart++].remove();\n }\n }\n}\n\nconst $$EVENTS = \"_$DX_DELEGATE\";\nfunction render(code, element, init, options = {}) {\n let disposer;\n createRoot(dispose => {\n disposer = dispose;\n element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);\n }, options.owner);\n return () => {\n disposer();\n element.textContent = \"\";\n };\n}\nfunction template(html, isImportNode, isSVG, isMathML) {\n let node;\n const create = () => {\n const t = isMathML ? document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"template\") : document.createElement(\"template\");\n t.innerHTML = html;\n return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;\n };\n const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);\n fn.cloneNode = fn;\n return fn;\n}\nfunction delegateEvents(eventNames, document = window.document) {\n const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());\n for (let i = 0, l = eventNames.length; i < l; i++) {\n const name = eventNames[i];\n if (!e.has(name)) {\n e.add(name);\n document.addEventListener(name, eventHandler);\n }\n }\n}\nfunction clearDelegatedEvents(document = window.document) {\n if (document[$$EVENTS]) {\n for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);\n delete document[$$EVENTS];\n }\n}\nfunction setProperty(node, name, value) {\n if (isHydrating(node)) return;\n node[name] = value;\n}\nfunction setAttribute(node, name, value) {\n if (isHydrating(node)) return;\n if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);\n}\nfunction setAttributeNS(node, namespace, name, value) {\n if (isHydrating(node)) return;\n if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);\n}\nfunction setBoolAttribute(node, name, value) {\n if (isHydrating(node)) return;\n value ? node.setAttribute(name, \"\") : node.removeAttribute(name);\n}\nfunction className(node, value) {\n if (isHydrating(node)) return;\n if (value == null) node.removeAttribute(\"class\");else node.className = value;\n}\nfunction addEventListener(node, name, handler, delegate) {\n if (delegate) {\n if (Array.isArray(handler)) {\n node[`$$${name}`] = handler[0];\n node[`$$${name}Data`] = handler[1];\n } else node[`$$${name}`] = handler;\n } else if (Array.isArray(handler)) {\n const handlerFn = handler[0];\n node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));\n } else node.addEventListener(name, handler, typeof handler !== \"function\" && handler);\n}\nfunction classList(node, value, prev = {}) {\n const classKeys = Object.keys(value || {}),\n prevKeys = Object.keys(prev);\n let i, len;\n for (i = 0, len = prevKeys.length; i < len; i++) {\n const key = prevKeys[i];\n if (!key || key === \"undefined\" || value[key]) continue;\n toggleClassKey(node, key, false);\n delete prev[key];\n }\n for (i = 0, len = classKeys.length; i < len; i++) {\n const key = classKeys[i],\n classValue = !!value[key];\n if (!key || key === \"undefined\" || prev[key] === classValue || !classValue) continue;\n toggleClassKey(node, key, true);\n prev[key] = classValue;\n }\n return prev;\n}\nfunction style(node, value, prev) {\n if (!value) return prev ? setAttribute(node, \"style\") : value;\n const nodeStyle = node.style;\n if (typeof value === \"string\") return nodeStyle.cssText = value;\n typeof prev === \"string\" && (nodeStyle.cssText = prev = undefined);\n prev || (prev = {});\n value || (value = {});\n let v, s;\n for (s in prev) {\n value[s] == null && nodeStyle.removeProperty(s);\n delete prev[s];\n }\n for (s in value) {\n v = value[s];\n if (v !== prev[s]) {\n nodeStyle.setProperty(s, v);\n prev[s] = v;\n }\n }\n return prev;\n}\nfunction setStyleProperty(node, name, value) {\n value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);\n}\nfunction spread(node, props = {}, isSVG, skipChildren) {\n const prevProps = {};\n if (!skipChildren) {\n createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n }\n createRenderEffect(() => typeof props.ref === \"function\" && use(props.ref, node));\n createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));\n return prevProps;\n}\nfunction dynamicProperty(props, key) {\n const src = props[key];\n Object.defineProperty(props, key, {\n get() {\n return src();\n },\n enumerable: true\n });\n return props;\n}\nfunction use(fn, element, arg) {\n return untrack(() => fn(element, arg));\n}\nfunction insert(parent, accessor, marker, initial) {\n if (marker !== undefined && !initial) initial = [];\n if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n}\nfunction assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {\n props || (props = {});\n for (const prop in prevProps) {\n if (!(prop in props)) {\n if (prop === \"children\") continue;\n prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);\n }\n }\n for (const prop in props) {\n if (prop === \"children\") {\n if (!skipChildren) insertExpression(node, props.children);\n continue;\n }\n const value = props[prop];\n prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);\n }\n}\nfunction hydrate$1(code, element, options = {}) {\n if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);\n sharedConfig.completed = globalThis._$HY.completed;\n sharedConfig.events = globalThis._$HY.events;\n sharedConfig.load = id => globalThis._$HY.r[id];\n sharedConfig.has = id => id in globalThis._$HY.r;\n sharedConfig.gather = root => gatherHydratable(element, root);\n sharedConfig.registry = new Map();\n sharedConfig.context = {\n id: options.renderId || \"\",\n count: 0\n };\n try {\n gatherHydratable(element, options.renderId);\n return render(code, element, [...element.childNodes], options);\n } finally {\n sharedConfig.context = null;\n }\n}\nfunction getNextElement(template) {\n let node,\n key,\n hydrating = isHydrating();\n if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {\n return template();\n }\n if (sharedConfig.completed) sharedConfig.completed.add(node);\n sharedConfig.registry.delete(key);\n return node;\n}\nfunction getNextMatch(el, nodeName) {\n while (el && el.localName !== nodeName) el = el.nextSibling;\n return el;\n}\nfunction getNextMarker(start) {\n let end = start,\n count = 0,\n current = [];\n if (isHydrating(start)) {\n while (end) {\n if (end.nodeType === 8) {\n const v = end.nodeValue;\n if (v === \"$\") count++;else if (v === \"/\") {\n if (count === 0) return [end, current];\n count--;\n }\n }\n current.push(end);\n end = end.nextSibling;\n }\n }\n return [end, current];\n}\nfunction runHydrationEvents() {\n if (sharedConfig.events && !sharedConfig.events.queued) {\n queueMicrotask(() => {\n const {\n completed,\n events\n } = sharedConfig;\n if (!events) return;\n events.queued = false;\n while (events.length) {\n const [el, e] = events[0];\n if (!completed.has(el)) return;\n events.shift();\n eventHandler(e);\n }\n if (sharedConfig.done) {\n sharedConfig.events = _$HY.events = null;\n sharedConfig.completed = _$HY.completed = null;\n }\n });\n sharedConfig.events.queued = true;\n }\n}\nfunction isHydrating(node) {\n return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);\n}\nfunction toPropertyName(name) {\n return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());\n}\nfunction toggleClassKey(node, key, value) {\n const classNames = key.trim().split(/\\s+/);\n for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);\n}\nfunction assignProp(node, prop, value, prev, isSVG, skipRef, props) {\n let isCE, isProp, isChildProp, propAlias, forceProp;\n if (prop === \"style\") return style(node, value, prev);\n if (prop === \"classList\") return classList(node, value, prev);\n if (value === prev) return prev;\n if (prop === \"ref\") {\n if (!skipRef) value(node);\n } else if (prop.slice(0, 3) === \"on:\") {\n const e = prop.slice(3);\n prev && node.removeEventListener(e, prev, typeof prev !== \"function\" && prev);\n value && node.addEventListener(e, value, typeof value !== \"function\" && value);\n } else if (prop.slice(0, 10) === \"oncapture:\") {\n const e = prop.slice(10);\n prev && node.removeEventListener(e, prev, true);\n value && node.addEventListener(e, value, true);\n } else if (prop.slice(0, 2) === \"on\") {\n const name = prop.slice(2).toLowerCase();\n const delegate = DelegatedEvents.has(name);\n if (!delegate && prev) {\n const h = Array.isArray(prev) ? prev[0] : prev;\n node.removeEventListener(name, h);\n }\n if (delegate || value) {\n addEventListener(node, name, value, delegate);\n delegate && delegateEvents([name]);\n }\n } else if (prop.slice(0, 5) === \"attr:\") {\n setAttribute(node, prop.slice(5), value);\n } else if (prop.slice(0, 5) === \"bool:\") {\n setBoolAttribute(node, prop.slice(5), value);\n } else if ((forceProp = prop.slice(0, 5) === \"prop:\") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes(\"-\") || \"is\" in props)) {\n if (forceProp) {\n prop = prop.slice(5);\n isProp = true;\n } else if (isHydrating(node)) return value;\n if (prop === \"class\" || prop === \"className\") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;\n } else {\n const ns = isSVG && prop.indexOf(\":\") > -1 && SVGNamespace[prop.split(\":\")[0]];\n if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);\n }\n return value;\n}\nfunction eventHandler(e) {\n if (sharedConfig.registry && sharedConfig.events) {\n if (sharedConfig.events.find(([el, ev]) => ev === e)) return;\n }\n let node = e.target;\n const key = `$$${e.type}`;\n const oriTarget = e.target;\n const oriCurrentTarget = e.currentTarget;\n const retarget = value => Object.defineProperty(e, \"target\", {\n configurable: true,\n value\n });\n const handleNode = () => {\n const handler = node[key];\n if (handler && !node.disabled) {\n const data = node[`${key}Data`];\n data !== undefined ? handler.call(node, data, e) : handler.call(node, e);\n if (e.cancelBubble) return;\n }\n node.host && typeof node.host !== \"string\" && !node.host._$host && node.contains(e.target) && retarget(node.host);\n return true;\n };\n const walkUpTree = () => {\n while (handleNode() && (node = node._$host || node.parentNode || node.host));\n };\n Object.defineProperty(e, \"currentTarget\", {\n configurable: true,\n get() {\n return node || document;\n }\n });\n if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;\n if (e.composedPath) {\n const path = e.composedPath();\n retarget(path[0]);\n for (let i = 0; i < path.length - 2; i++) {\n node = path[i];\n if (!handleNode()) break;\n if (node._$host) {\n node = node._$host;\n walkUpTree();\n break;\n }\n if (node.parentNode === oriCurrentTarget) {\n break;\n }\n }\n }\n else walkUpTree();\n retarget(oriTarget);\n}\nfunction insertExpression(parent, value, current, marker, unwrapArray) {\n const hydrating = isHydrating(parent);\n if (hydrating) {\n !current && (current = [...parent.childNodes]);\n let cleaned = [];\n for (let i = 0; i < current.length; i++) {\n const node = current[i];\n if (node.nodeType === 8 && node.data.slice(0, 2) === \"!$\") node.remove();else cleaned.push(node);\n }\n current = cleaned;\n }\n while (typeof current === \"function\") current = current();\n if (value === current) return current;\n const t = typeof value,\n multi = marker !== undefined;\n parent = multi && current[0] && current[0].parentNode || parent;\n if (t === \"string\" || t === \"number\") {\n if (hydrating) return current;\n if (t === \"number\") {\n value = value.toString();\n if (value === current) return current;\n }\n if (multi) {\n let node = current[0];\n if (node && node.nodeType === 3) {\n node.data !== value && (node.data = value);\n } else node = document.createTextNode(value);\n current = cleanChildren(parent, current, marker, node);\n } else {\n if (current !== \"\" && typeof current === \"string\") {\n current = parent.firstChild.data = value;\n } else current = parent.textContent = value;\n }\n } else if (value == null || t === \"boolean\") {\n if (hydrating) return current;\n current = cleanChildren(parent, current, marker);\n } else if (t === \"function\") {\n createRenderEffect(() => {\n let v = value();\n while (typeof v === \"function\") v = v();\n current = insertExpression(parent, v, current, marker);\n });\n return () => current;\n } else if (Array.isArray(value)) {\n const array = [];\n const currentArray = current && Array.isArray(current);\n if (normalizeIncomingArray(array, value, current, unwrapArray)) {\n createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n return () => current;\n }\n if (hydrating) {\n if (!array.length) return current;\n if (marker === undefined) return current = [...parent.childNodes];\n let node = array[0];\n if (node.parentNode !== parent) return current;\n const nodes = [node];\n while ((node = node.nextSibling) !== marker) nodes.push(node);\n return current = nodes;\n }\n if (array.length === 0) {\n current = cleanChildren(parent, current, marker);\n if (multi) return current;\n } else if (currentArray) {\n if (current.length === 0) {\n appendNodes(parent, array, marker);\n } else reconcileArrays(parent, current, array);\n } else {\n current && cleanChildren(parent);\n appendNodes(parent, array);\n }\n current = array;\n } else if (value.nodeType) {\n if (hydrating && value.parentNode) return current = multi ? [value] : value;\n if (Array.isArray(current)) {\n if (multi) return current = cleanChildren(parent, current, marker, value);\n cleanChildren(parent, current, null, value);\n } else if (current == null || current === \"\" || !parent.firstChild) {\n parent.appendChild(value);\n } else parent.replaceChild(value, parent.firstChild);\n current = value;\n } else ;\n return current;\n}\nfunction normalizeIncomingArray(normalized, array, current, unwrap) {\n let dynamic = false;\n for (let i = 0, len = array.length; i < len; i++) {\n let item = array[i],\n prev = current && current[normalized.length],\n t;\n if (item == null || item === true || item === false) ; else if ((t = typeof item) === \"object\" && item.nodeType) {\n normalized.push(item);\n } else if (Array.isArray(item)) {\n dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;\n } else if (t === \"function\") {\n if (unwrap) {\n while (typeof item === \"function\") item = item();\n dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;\n } else {\n normalized.push(item);\n dynamic = true;\n }\n } else {\n const value = String(item);\n if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));\n }\n }\n return dynamic;\n}\nfunction appendNodes(parent, array, marker = null) {\n for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);\n}\nfunction cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) return parent.textContent = \"\";\n const node = replacement || document.createTextNode(\"\");\n if (current.length) {\n let inserted = false;\n for (let i = current.length - 1; i >= 0; i--) {\n const el = current[i];\n if (node !== el) {\n const isParent = el.parentNode === parent;\n if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();\n } else inserted = true;\n }\n } else parent.insertBefore(node, marker);\n return [node];\n}\nfunction gatherHydratable(element, root) {\n const templates = element.querySelectorAll(`*[data-hk]`);\n for (let i = 0; i < templates.length; i++) {\n const node = templates[i];\n const key = node.getAttribute(\"data-hk\");\n if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);\n }\n}\nfunction getHydrationKey() {\n return sharedConfig.getNextContextId();\n}\nfunction NoHydration(props) {\n return sharedConfig.context ? undefined : props.children;\n}\nfunction Hydration(props) {\n return props.children;\n}\nconst voidFn = () => undefined;\nconst RequestContext = Symbol();\nfunction innerHTML(parent, content) {\n !sharedConfig.context && (parent.innerHTML = content);\n}\n\nfunction throwInBrowser(func) {\n const err = new Error(`${func.name} is not supported in the browser, returning undefined`);\n console.error(err);\n}\nfunction renderToString(fn, options) {\n throwInBrowser(renderToString);\n}\nfunction renderToStringAsync(fn, options) {\n throwInBrowser(renderToStringAsync);\n}\nfunction renderToStream(fn, options) {\n throwInBrowser(renderToStream);\n}\nfunction ssr(template, ...nodes) {}\nfunction ssrElement(name, props, children, needsId) {}\nfunction ssrClassList(value) {}\nfunction ssrStyle(value) {}\nfunction ssrAttribute(key, value) {}\nfunction ssrHydrationKey() {}\nfunction resolveSSRNode(node) {}\nfunction escape(html) {}\nfunction ssrSpread(props, isSVG, skipChildren) {}\n\nconst isServer = false;\nconst isDev = false;\nconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\nfunction createElement(tagName, isSVG = false, is = undefined) {\n return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {\n is\n });\n}\nconst hydrate = (...args) => {\n enableHydration();\n return hydrate$1(...args);\n};\nfunction Portal(props) {\n const {\n useShadow\n } = props,\n marker = document.createTextNode(\"\"),\n mount = () => props.mount || document.body,\n owner = getOwner();\n let content;\n let hydrating = !!sharedConfig.context;\n createEffect(() => {\n if (hydrating) getOwner().user = hydrating = false;\n content || (content = runWithOwner(owner, () => createMemo(() => props.children)));\n const el = mount();\n if (el instanceof HTMLHeadElement) {\n const [clean, setClean] = createSignal(false);\n const cleanup = () => setClean(true);\n createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));\n onCleanup(cleanup);\n } else {\n const container = createElement(props.isSVG ? \"g\" : \"div\", props.isSVG),\n renderRoot = useShadow && container.attachShadow ? container.attachShadow({\n mode: \"open\"\n }) : container;\n Object.defineProperty(container, \"_$host\", {\n get() {\n return marker.parentNode;\n },\n configurable: true\n });\n insert(renderRoot, content);\n el.appendChild(container);\n props.ref && props.ref(container);\n onCleanup(() => el.removeChild(container));\n }\n }, undefined, {\n render: !hydrating\n });\n return marker;\n}\nfunction createDynamic(component, props) {\n const cached = createMemo(component);\n return createMemo(() => {\n const component = cached();\n switch (typeof component) {\n case \"function\":\n return untrack(() => component(props));\n case \"string\":\n const isSvg = SVGElements.has(component);\n const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg, untrack(() => props.is));\n spread(el, props, isSvg);\n return el;\n }\n });\n}\nfunction Dynamic(props) {\n const [, others] = splitProps(props, [\"component\"]);\n return createDynamic(() => props.component, others);\n}\n\nexport { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getPropAlias, voidFn as getRequestEvent, hydrate, innerHTML, insert, isDev, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setBoolAttribute, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };\n","import type { JSX } from \"solid-js/jsx-runtime\";\n\n/**\n * Props for the shared Button component.\n *\n * @property {('button' | 'submit' | 'reset')} [type] - Button type attribute. Defaults to 'button'.\n * @property {string} [title] - Tooltip/title attribute for the button. Defaults to 'Simple button'.\n * @property {() => void} [onClick] - Click handler function.\n * @property {string} [class] - Additional CSS classes for custom styling.\n * @property {JSX.Element | string} children - Button content (JSX or string). Required.\n * @property {string} [ariaLabel] - Accessible label for screen readers. Falls back to title or children if not provided.\n * @property {boolean} [ariaDisabled] - Accessibility disabled state (for ARIA only).\n * @property {boolean} [disabled] - Disabled state (native HTML attribute).\n * @property {number} [tabIndex] - Tab index for keyboard navigation. Uses browser default (typically 0) if not set.\n */\nexport type ButtonProps = {\n\ttype?: \"button\" | \"submit\" | \"reset\";\n\ttitle?: string;\n\tonClick?: () => void;\n\tclass?: string;\n\tchildren: JSX.Element | string;\n\tariaLabel?: string;\n\tariaDisabled?: boolean;\n\tdisabled?: boolean;\n\ttabIndex?: number;\n};\n\n/**\n * Shared, accessible, and stylable Button component for SolidJS.\n *\n * - Injects a Constructable Stylesheet for style encapsulation (Shadow DOM-friendly).\n * - Supports accessibility attributes and keyboard navigation.\n * - Accepts custom content, classes, and state modifiers (e.g., active, disabled).\n *\n * @param {ButtonProps} props - Button configuration and content.\n * @returns {JSX.Element} A styled, accessible button element.\n */\nexport default function Button(props: ButtonProps) {\n\treturn (\n\t\t<button\n\t\t\ttype={props.type ?? \"button\"}\n\t\t\ttitle={props.title ?? \"Simple button\"}\n\t\t\tclass={`flex--center button ${props.class ? `${props.class}` : \"\"}`.trimEnd()}\n\t\t\tonClick={props.onClick}\n\t\t\taria-label={\n\t\t\t\tprops.ariaLabel ?? props.title ?? (typeof props.children === \"string\" ? props.children : undefined)\n\t\t\t}\n\t\t\taria-disabled={props.ariaDisabled ?? props.disabled}\n\t\t\tdisabled={props.disabled}\n\t\t\ttabIndex={props.tabIndex}\n\t\t>\n\t\t\t{props.children}\n\t\t</button>\n\t);\n}\n","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n <g transform=\\\"rotate(180 12 12)\\\">\\n <path d=\\\"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\\\" />\\n </g>\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M9 18V5l12-2v13\\\" />\\n\\t<circle cx=\\\"6\\\" cy=\\\"18\\\" r=\\\"3\\\" />\\n\\t<circle cx=\\\"18\\\" cy=\\\"16\\\" r=\\\"3\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"var(--color-red)\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M4.929 4.929 19.07 19.071\\\" />\\n\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z\\\" />\\n\\t<circle cx=\\\"12\\\" cy=\\\"13\\\" r=\\\"3\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M8 3H5a2 2 0 0 0-2 2v3\\\" />\\n\\t<path d=\\\"M21 8V5a2 2 0 0 0-2-2h-3\\\" />\\n\\t<path d=\\\"M3 16v3a2 2 0 0 0 2 2h3\\\" />\\n\\t<path d=\\\"M16 21h3a2 2 0 0 0 2-2v-3\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M8 3v3a2 2 0 0 1-2 2H3\\\" />\\n\\t<path d=\\\"M21 8h-3a2 2 0 0 1-2-2V3\\\" />\\n\\t<path d=\\\"M3 16h3a2 2 0 0 1 2 2v3\\\" />\\n\\t<path d=\\\"M16 21v-3a2 2 0 0 1 2-2h3\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M12 19v3\\\" />\\n\\t<path d=\\\"M19 10v2a7 7 0 0 1-14 0v-2\\\" />\\n\\t<rect x=\\\"9\\\" y=\\\"2\\\" width=\\\"6\\\" height=\\\"13\\\" rx=\\\"3\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M16 9a5 5 0 0 1 .95 2.293\\\" />\\n\\t<path d=\\\"M19.364 5.636a9 9 0 0 1 1.889 9.96\\\" />\\n\\t<path d=\\\"m2 2 20 20\\\" />\\n\\t<path d=\\\"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11\\\" />\\n\\t<path d=\\\"M9.828 4.172A.686.686 0 0 1 11 4.657v.686\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M16.247 7.761a6 6 0 0 1 0 8.478\\\" />\\n\\t<path d=\\\"M19.075 4.933a10 10 0 0 1 0 14.134\\\" />\\n\\t<path d=\\\"M4.925 19.067a10 10 0 0 1 0-14.134\\\" />\\n\\t<path d=\\\"M7.753 16.239a6 6 0 0 1 0-8.478\\\" />\\n\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"2\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<rect x=\\\"14\\\" y=\\\"3\\\" width=\\\"5\\\" height=\\\"18\\\" rx=\\\"1\\\" />\\n <rect x=\\\"5\\\" y=\\\"3\\\" width=\\\"5\\\" height=\\\"18\\\" rx=\\\"1\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<rect width=\\\"20\\\" height=\\\"14\\\" x=\\\"2\\\" y=\\\"3\\\" rx=\\\"2\\\" />\\n\\t<line x1=\\\"8\\\" x2=\\\"16\\\" y1=\\\"21\\\" y2=\\\"21\\\" />\\n\\t<line x1=\\\"12\\\" x2=\\\"12\\\" y1=\\\"17\\\" y2=\\\"21\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M5 21v-6\\\" />\\n\\t<path d=\\\"M12 21V3\\\" />\\n\\t<path d=\\\"M19 21V9\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\\\" />\\n\\t<rect x=\\\"2\\\" y=\\\"6\\\" width=\\\"14\\\" height=\\\"12\\\" rx=\\\"2\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\\\" />\\n\\t<path d=\\\"M16 9a5 5 0 0 1 0 6\\\" />\\n\\t<path d=\\\"M19.364 18.364a9 9 0 0 0 0-12.728\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n\\t<path d=\\\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\\\" />\\n</svg>\"","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"var(--color-white)\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\">\\n <path d=\\\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\\\" />\\n <path d=\\\"M16 9a5 5 0 0 1 0 6\\\" />\\n</svg>\"","import type { JSX } from \"solid-js\";\n\nimport arrowDown from \"./arrow-down.svg?raw\";\nimport arrowUp from \"./arrow-up.svg?raw\";\nimport audio from \"./audio.svg?raw\";\nimport ban from \"./ban.svg?raw\";\nimport buffer from \"./buffer.svg?raw\";\nimport camera from \"./camera.svg?raw\";\nimport file from \"./file.svg?raw\";\nimport fullscreenEnter from \"./fullscreen-enter.svg?raw\";\nimport fullscreenExit from \"./fullscreen-exit.svg?raw\";\nimport microphone from \"./microphone.svg?raw\";\nimport mute from \"./mute.svg?raw\";\nimport network from \"./network.svg?raw\";\nimport pause from \"./pause.svg?raw\";\nimport play from \"./play.svg?raw\";\nimport screen from \"./screen.svg?raw\";\nimport stats from \"./stats.svg?raw\";\nimport video from \"./video.svg?raw\";\nimport volumeHigh from \"./volume-high.svg?raw\";\nimport volumeLow from \"./volume-low.svg?raw\";\nimport volumeMedium from \"./volume-medium.svg?raw\";\n\n/**\n * Given the SVG source of an icon, return a JSX.Element\n *\n * @returns JSX.Element\n */\nexport function Element(src: string): JSX.Element {\n\treturn <span classList={{ \"flex--center\": true }} role=\"img\" aria-hidden={true} innerHTML={src} />;\n}\n\n// For each icon, export a function that returns a JSX.Element\nconst icon = (src: string) => () => Element(src);\n\nexport const ArrowDown = icon(arrowDown);\nexport const ArrowUp = icon(arrowUp);\nexport const Audio = icon(audio);\nexport const Ban = icon(ban);\nexport const Buffer = icon(buffer);\nexport const Camera = icon(camera);\nexport const File = icon(file);\nexport const FullscreenEnter = icon(fullscreenEnter);\nexport const FullscreenExit = icon(fullscreenExit);\nexport const Microphone = icon(microphone);\nexport const Mute = icon(mute);\nexport const Network = icon(network);\nexport const Pause = icon(pause);\nexport const Play = icon(play);\nexport const Screen = icon(screen);\nexport const Stats = icon(stats);\nexport const Video = icon(video);\nexport const VolumeHigh = icon(volumeHigh);\nexport const VolumeLow = icon(volumeLow);\nexport const VolumeMedium = icon(volumeMedium);\n","import { Effect } from \"@moq/signals\";\nimport type { ProviderContext, ProviderProps } from \"../types\";\n\n/**\n * Base class for metric providers providing common utilities\n */\nexport abstract class BaseProvider {\n\t/** Manages subscriptions lifecycle */\n\tprotected signals = new Effect();\n\t/** Stream sources provided to provider */\n\tprotected props: ProviderProps;\n\n\t/**\n\t * Initialize provider with stream sources\n\t * @param props - Audio and video stream sources\n\t */\n\tconstructor(props: ProviderProps) {\n\t\tthis.props = props;\n\t}\n\n\t/**\n\t * Initialize provider with display context\n\t * @param context - Provider context for updating display\n\t */\n\tabstract setup(context: ProviderContext): void;\n\n\t/**\n\t * Clean up subscriptions\n\t */\n\tcleanup(): void {\n\t\tthis.signals.close();\n\t}\n}\n","import type { ProviderContext } from \"../types\";\nimport { BaseProvider } from \"./base\";\n\n/**\n * Provider for audio stream metrics (channels, bitrate, codec)\n */\nexport class AudioProvider extends BaseProvider {\n\t/** Polling interval in milliseconds */\n\tprivate static readonly POLLING_INTERVAL_MS = 250;\n\t/** Display context for updating metrics */\n\tprivate context: ProviderContext | undefined;\n\t/** Polling interval ID */\n\tprivate updateInterval: number | undefined;\n\t/** Previous bytes received for bitrate calculation */\n\tprivate previousBytesReceived = 0;\n\t/** Previous timestamp for accurate elapsed time calculation */\n\tprivate previousWhen = 0;\n\n\t/**\n\t * Initialize audio provider with polling interval\n\t */\n\tsetup(context: ProviderContext): void {\n\t\tthis.context = context;\n\t\tconst audio = this.props.audio;\n\n\t\tif (!audio) {\n\t\t\tcontext.setDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateInterval = window.setInterval(this.updateDisplayData.bind(this), AudioProvider.POLLING_INTERVAL_MS);\n\n\t\tthis.previousWhen = performance.now();\n\t\tthis.updateDisplayData();\n\t}\n\n\t/**\n\t * Calculate and display current audio metrics\n\t */\n\tprivate updateDisplayData(): void {\n\t\tif (!this.context || !this.props.audio) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst track = this.props.audio.source.track.peek();\n\t\tconst config = this.props.audio.source.config.peek();\n\t\tconst stats = this.props.audio.stats.peek();\n\n\t\tif (!track || !config) {\n\t\t\tthis.context.setDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = performance.now();\n\t\tlet bitrate: string | undefined;\n\t\tif (stats && this.previousBytesReceived > 0) {\n\t\t\tconst bytesDelta = stats.bytesReceived - this.previousBytesReceived;\n\t\t\t// Only calculate bitrate if there's actual data change\n\t\t\tif (bytesDelta > 0) {\n\t\t\t\tconst elapsedMs = now - this.previousWhen;\n\t\t\t\tif (elapsedMs > 0) {\n\t\t\t\t\tconst bitsPerSecond = bytesDelta * 8 * (1000 / elapsedMs);\n\n\t\t\t\t\tif (bitsPerSecond >= 1_000_000) {\n\t\t\t\t\t\tbitrate = `${(bitsPerSecond / 1_000_000).toFixed(1)}Mbps`;\n\t\t\t\t\t} else if (bitsPerSecond >= 1_000) {\n\t\t\t\t\t\tbitrate = `${(bitsPerSecond / 1_000).toFixed(0)}kbps`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbitrate = `${bitsPerSecond.toFixed(0)}bps`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Always update previous values for next calculation, even on first call\n\t\tif (stats) {\n\t\t\tthis.previousBytesReceived = stats.bytesReceived;\n\t\t\tthis.previousWhen = now;\n\t\t}\n\n\t\tconst parts: string[] = [];\n\n\t\tif (config.sampleRate) {\n\t\t\tconst khz = (config.sampleRate / 1000).toFixed(1);\n\t\t\tparts.push(`${khz}kHz`);\n\t\t}\n\n\t\tif (config.numberOfChannels) {\n\t\t\tparts.push(`${config.numberOfChannels}ch`);\n\t\t}\n\n\t\tparts.push(bitrate ?? \"N/A\");\n\n\t\tif (config.codec) {\n\t\t\tparts.push(config.codec);\n\t\t}\n\n\t\tthis.context.setDisplayData(parts.length > 0 ? parts.join(\"\\n\") : \"N/A\");\n\t}\n\n\t/**\n\t * Clean up polling interval\n\t */\n\toverride cleanup(): void {\n\t\tif (this.updateInterval !== undefined) {\n\t\t\twindow.clearInterval(this.updateInterval);\n\t\t}\n\t\tsuper.cleanup();\n\t}\n}\n","import type { ProviderContext } from \"../types\";\nimport { BaseProvider } from \"./base\";\n\n/**\n * Provider for buffer metrics (fill percentage, latency)\n */\nexport class BufferProvider extends BaseProvider {\n\t/**\n\t * Initialize buffer provider with signal subscriptions\n\t */\n\tsetup(context: ProviderContext): void {\n\t\tconst video = this.props.video;\n\n\t\tif (!video) {\n\t\t\tcontext.setDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tcontext.setDisplayData(\"TODO\");\n\t}\n}\n","import type { ProviderContext } from \"../types\";\nimport { BaseProvider } from \"./base\";\n\n/**\n * Extended Navigator interface with connection property\n */\ninterface NavigatorWithConnection extends Navigator {\n\t/** Standard Network Information API */\n\tconnection?: NetworkInformation;\n\t/** Mozilla variant */\n\tmozConnection?: NetworkInformation;\n\t/** WebKit variant */\n\twebkitConnection?: NetworkInformation;\n}\n\n/**\n * Network information interface from navigator.connection\n */\ninterface NetworkInformation {\n\t/** Connection type (wifi, cellular, etc) */\n\ttype?: string;\n\t/** Effective connection speed category */\n\teffectiveType?: \"slow-2g\" | \"2g\" | \"3g\" | \"4g\";\n\t/** Downlink speed in Mbps */\n\tdownlink?: number;\n\t/** Round-trip time in ms */\n\trtt?: number;\n\t/** User has enabled data saver mode */\n\tsaveData?: boolean;\n\t/** Listen for connection changes */\n\taddEventListener?(type: string, listener: () => void): void;\n\t/** Stop listening for connection changes */\n\tremoveEventListener?(type: string, listener: () => void): void;\n}\n\n/**\n * Provider for network metrics (connection type, bandwidth, latency)\n */\nexport class NetworkProvider extends BaseProvider {\n\t/** Polling interval in milliseconds */\n\tprivate static readonly POLLING_INTERVAL_MS = 100;\n\t/** Display context for updating metrics */\n\tprivate context: ProviderContext | undefined;\n\t/** Network information from navigator.connection */\n\tprivate networkInfo?: NetworkInformation;\n\t/** Polling interval ID */\n\tprivate updateInterval?: number;\n\tprivate readonly boundUpdateDisplayData = this.updateDisplayData.bind(this);\n\n\t/**\n\t * Initialize network provider with connection listeners\n\t */\n\tsetup(context: ProviderContext): void {\n\t\tthis.context = context;\n\n\t\tconst nav = navigator as NavigatorWithConnection;\n\t\tthis.networkInfo = nav.connection ?? nav.mozConnection ?? nav.webkitConnection;\n\n\t\tif (!this.networkInfo) {\n\t\t\tcontext.setDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.networkInfo.addEventListener?.(\"change\", this.boundUpdateDisplayData);\n\n\t\twindow.addEventListener(\"online\", this.boundUpdateDisplayData);\n\t\twindow.addEventListener(\"offline\", this.boundUpdateDisplayData);\n\n\t\tthis.updateInterval = window.setInterval(this.boundUpdateDisplayData, NetworkProvider.POLLING_INTERVAL_MS);\n\t\tthis.updateDisplayData();\n\t}\n\n\t/**\n\t * Clean up event listeners and polling interval\n\t */\n\toverride cleanup(): void {\n\t\tif (this.networkInfo?.removeEventListener) {\n\t\t\tthis.networkInfo.removeEventListener(\"change\", this.boundUpdateDisplayData);\n\t\t}\n\t\twindow.removeEventListener(\"online\", this.boundUpdateDisplayData);\n\t\twindow.removeEventListener(\"offline\", this.boundUpdateDisplayData);\n\t\tif (this.updateInterval !== undefined) {\n\t\t\tclearInterval(this.updateInterval);\n\t\t}\n\t\tsuper.cleanup();\n\t}\n\n\t/**\n\t * Calculate and display current network metrics\n\t */\n\tprivate updateDisplayData(): void {\n\t\tif (!this.context) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst parts = [\n\t\t\tthis.getConnectionType(),\n\t\t\tthis.getEffectiveBandwidth(),\n\t\t\tthis.getLatency(),\n\t\t\tthis.getSaveDataStatus(),\n\t\t].filter((part): part is string => part !== null);\n\n\t\tthis.context.setDisplayData(parts.length > 0 ? parts.join(\"\\n\") : \"N/A\");\n\t}\n\n\t/**\n\t * Get formatted connection type\n\t * @returns Connection type or null if unavailable\n\t */\n\tprivate getConnectionType(): string | null {\n\t\tif (!navigator.onLine) {\n\t\t\treturn \"offline\";\n\t\t}\n\n\t\tif (!this.networkInfo) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst effectiveType = this.networkInfo.effectiveType;\n\t\tif (effectiveType) {\n\t\t\tconst typeMap = {\n\t\t\t\t\"slow-2g\": \"Slow-2G\",\n\t\t\t\t\"2g\": \"2G\",\n\t\t\t\t\"3g\": \"3G\",\n\t\t\t\t\"4g\": \"4G\",\n\t\t\t};\n\t\t\treturn typeMap[effectiveType];\n\t\t}\n\n\t\tconst type = this.networkInfo.type;\n\t\treturn type ? type.charAt(0).toUpperCase() + type.slice(1) : null;\n\t}\n\n\t/**\n\t * Get formatted bandwidth in Mbps or Gbps\n\t * @returns Bandwidth string or null if unavailable\n\t */\n\tprivate getEffectiveBandwidth(): string | null {\n\t\tconst downlink = this.networkInfo?.downlink;\n\t\tif (!downlink || downlink <= 0) return null;\n\n\t\tif (downlink >= 1000) {\n\t\t\treturn `${(downlink / 1000).toFixed(1)}Gbps`;\n\t\t}\n\t\tif (downlink >= 1) {\n\t\t\treturn `${downlink.toFixed(1)}Mbps`;\n\t\t}\n\t\treturn `${(downlink * 1000).toFixed(0)}Kbps`;\n\t}\n\n\t/**\n\t * Get formatted round-trip latency\n\t * @returns Latency string or null if unavailable\n\t */\n\tprivate getLatency(): string | null {\n\t\tconst rtt = this.networkInfo?.rtt;\n\t\treturn rtt && rtt > 0 ? `${rtt}ms` : null;\n\t}\n\n\t/**\n\t * Get data saver mode status\n\t * @returns Data saver indicator or null if disabled\n\t */\n\tprivate getSaveDataStatus(): string | null {\n\t\treturn this.networkInfo?.saveData ? \"Save-Data\" : null;\n\t}\n}\n","import type { ProviderContext } from \"../types\";\nimport { BaseProvider } from \"./base\";\n\n/**\n * Provider for video stream metrics (resolution, frame rate, bitrate)\n */\nexport class VideoProvider extends BaseProvider {\n\t/** Polling interval in milliseconds */\n\tprivate static readonly POLLING_INTERVAL_MS = 250;\n\t/** Display context for updating metrics */\n\tprivate context: ProviderContext | undefined;\n\t/** Polling interval ID */\n\tprivate updateInterval: number | undefined;\n\t/** Bound callback for display updates */\n\t/** Previous frame count for FPS calculation */\n\tprivate previousFrameCount = 0;\n\t/** Previous bytes received for bitrate calculation */\n\tprivate previousBytesReceived = 0;\n\t/** Previous timestamp for accurate elapsed time calculation in bitrate */\n\tprivate previousWhen = 0;\n\n\t/**\n\t * Initialize video provider with polling interval\n\t */\n\tsetup(context: ProviderContext): void {\n\t\tthis.context = context;\n\t\tconst video = this.props.video;\n\n\t\tif (!video) {\n\t\t\tcontext.setDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateInterval = window.setInterval(this.updateDisplayData.bind(this), VideoProvider.POLLING_INTERVAL_MS);\n\t\tthis.previousWhen = performance.now();\n\t\tthis.updateDisplayData();\n\t}\n\n\t/**\n\t * Calculate and display current video metrics\n\t */\n\tprivate updateDisplayData(): void {\n\t\tif (!this.context || !this.props.video) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst catalog = this.props.video.source.catalog.peek();\n\t\tconst stats = this.props.video.stats.peek();\n\t\tconst now = performance.now();\n\n\t\tconst elapsedMs = now - this.previousWhen;\n\n\t\t// Calculate FPS from frame count delta and timestamp delta\n\t\tlet fps: number | undefined;\n\t\tif (stats && this.previousFrameCount > 0) {\n\t\t\tconst frameCountDelta = stats.frameCount - this.previousFrameCount;\n\n\t\t\tif (elapsedMs > 0 && frameCountDelta > 0) {\n\t\t\t\tconst elapsedSeconds = elapsedMs / 1_000;\n\t\t\t\tfps = frameCountDelta / elapsedSeconds;\n\t\t\t}\n\t\t}\n\n\t\tlet bitrate: string | undefined;\n\t\tif (stats && this.previousBytesReceived > 0) {\n\t\t\tconst bytesDelta = stats.bytesReceived - this.previousBytesReceived;\n\t\t\t// Only calculate bitrate if there's actual data change\n\t\t\tif (bytesDelta > 0 && elapsedMs > 0) {\n\t\t\t\tconst bitsPerSecond = bytesDelta * 8 * (1000 / elapsedMs);\n\n\t\t\t\tif (bitsPerSecond >= 1_000_000) {\n\t\t\t\t\tbitrate = `${(bitsPerSecond / 1_000_000).toFixed(1)}Mbps`;\n\t\t\t\t} else if (bitsPerSecond >= 1_000) {\n\t\t\t\t\tbitrate = `${(bitsPerSecond / 1_000).toFixed(0)}kbps`;\n\t\t\t\t} else {\n\t\t\t\t\tbitrate = `${bitsPerSecond.toFixed(0)}bps`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Always update previous values for next calculation, even on first call\n\t\tif (stats) {\n\t\t\tthis.previousFrameCount = stats.frameCount;\n\t\t\tthis.previousBytesReceived = stats.bytesReceived;\n\t\t\tthis.previousWhen = now;\n\t\t}\n\n\t\tconst { width, height } = catalog?.display ?? {};\n\n\t\tconst parts = [\n\t\t\twidth && height ? `${width}x${height}` : \"N/A\",\n\t\t\tfps !== undefined ? `@${fps.toFixed(1)} fps` : \"N/A\",\n\t\t\tbitrate ?? \"N/A\",\n\t\t];\n\n\t\tthis.context.setDisplayData(parts.join(\"\\n\"));\n\t}\n\n\t/**\n\t * Clean up polling interval\n\t */\n\toverride cleanup(): void {\n\t\tif (this.updateInterval !== undefined) {\n\t\t\tclearInterval(this.updateInterval);\n\t\t}\n\t\tsuper.cleanup();\n\t}\n}\n","import type { KnownStatsProviders, ProviderProps } from \"../types\";\nimport { AudioProvider } from \"./audio\";\nimport type { BaseProvider } from \"./base\";\nimport { BufferProvider } from \"./buffer\";\nimport { NetworkProvider } from \"./network\";\nimport { VideoProvider } from \"./video\";\n\n/**\n * Constructor type for metric provider classes\n */\nexport type ProviderConstructor = new (props: ProviderProps) => BaseProvider;\n\n/**\n * Registry mapping metric types to their provider implementations\n */\nexport const providers: Record<KnownStatsProviders, ProviderConstructor> = {\n\tvideo: VideoProvider,\n\taudio: AudioProvider,\n\tbuffer: BufferProvider,\n\tnetwork: NetworkProvider,\n};\n\n/**\n * Get provider class for a metric type\n * @param statProvider - Metric type identifier\n * @returns Provider constructor or undefined if not found\n */\nexport function getStatsInformationProvider(statProvider: KnownStatsProviders): ProviderConstructor | undefined {\n\treturn providers[statProvider];\n}\n","import { createEffect, createSignal, type JSX, onCleanup } from \"solid-js\";\nimport { getStatsInformationProvider } from \"../providers/registry\";\nimport type { KnownStatsProviders, ProviderProps } from \"../types\";\n\n/**\n * Props for individual stats metric item\n */\ninterface StatsItemProps extends ProviderProps {\n\tname: string;\n\t/** Metric type identifier */\n\tstatProvider: KnownStatsProviders;\n\t/** SVG icon markup */\n\tsvg: JSX.Element;\n}\n\n/**\n * Individual metric display with provider and reactive updates\n */\nexport const StatsItem = (props: StatsItemProps) => {\n\tconst [displayData, setDisplayData] = createSignal(\"N/A\");\n\n\tcreateEffect(() => {\n\t\tconst StatsInformationProvider = getStatsInformationProvider(props.statProvider);\n\n\t\tif (!StatsInformationProvider) {\n\t\t\tsetDisplayData(\"N/A\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst provider = new StatsInformationProvider({\n\t\t\taudio: props.audio,\n\t\t\tvideo: props.video,\n\t\t});\n\n\t\tprovider.setup({ setDisplayData });\n\n\t\tonCleanup(() => {\n\t\t\tprovider.cleanup();\n\t\t});\n\t});\n\n\treturn (\n\t\t<div class={`stats__item stats__item--${props.statProvider}`}>\n\t\t\t<div class=\"stats__icon-wrapper\">{props.svg}</div>\n\t\t\t<div class=\"stats__item-detail\">\n\t\t\t\t<span class=\"stats__item-title\">{props.statProvider}</span>\n\t\t\t\t<span class=\"stats__item-data\">{displayData()}</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { For, type JSX } from \"solid-js\";\nimport * as Icon from \"../../icon/icon\";\nimport type { KnownStatsProviders, ProviderProps } from \"../types\";\nimport { StatsItem } from \"./StatsItem\";\n\n/**\n * Props for stats panel component\n */\ninterface StatsPanelProps extends ProviderProps {}\n\nexport const statsDetailItems: { name: string; statProvider: KnownStatsProviders; icon: () => JSX.Element }[] = [\n\t{\n\t\tname: \"Network\",\n\t\tstatProvider: \"network\",\n\t\ticon: () => <Icon.Network />,\n\t},\n\t{\n\t\tname: \"Video\",\n\t\tstatProvider: \"video\",\n\t\ticon: () => <Icon.Video />,\n\t},\n\t{\n\t\tname: \"Audio\",\n\t\tstatProvider: \"audio\",\n\t\ticon: () => <Icon.Audio />,\n\t},\n\t{\n\t\tname: \"Buffer\",\n\t\tstatProvider: \"buffer\",\n\t\ticon: () => <Icon.Buffer />,\n\t},\n];\n\n/**\n * Panel displaying all metrics in a grid layout\n */\nexport const StatsPanel = (props: StatsPanelProps) => {\n\treturn (\n\t\t<div class=\"stats__panel\">\n\t\t\t<For each={statsDetailItems}>\n\t\t\t\t{({ name, statProvider, icon }) => (\n\t\t\t\t\t<StatsItem\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tstatProvider={statProvider}\n\t\t\t\t\t\tsvg={icon()}\n\t\t\t\t\t\taudio={props.audio}\n\t\t\t\t\t\tvideo={props.video}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</For>\n\t\t</div>\n\t);\n};\n","import { type Context, Show, useContext } from \"solid-js\";\nimport { StatsPanel } from \"./components/StatsPanel\";\nimport type { ProviderProps } from \"./types\";\n\ninterface StatsProps<T = unknown> {\n\tcontext: Context<T>;\n\tgetElement: (ctx: T) => ProviderProps | undefined;\n}\n\n/**\n * Stats component for displaying real-time media streaming metrics\n * Accepts a generic context and a function to extract the media element\n */\nexport const Stats = <T = unknown>(props: StatsProps<T>) => {\n\tconst contextValue = useContext(props.context);\n\n\treturn (\n\t\t<Show when={props.getElement(contextValue)}>\n\t\t\t{(_element) => (\n\t\t\t\t<div class=\"stats\">\n\t\t\t\t\t<StatsPanel audio={_element().audio} video={_element().video} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Show>\n\t);\n};\n"],"names":["IS_DEV","equalFn","a","b","$TRACK","signalOptions","runEffects","runQueue","STALE","PENDING","UNOWNED","Owner","Transition","ExternalSourceConfig","Listener","Updates","Effects","ExecCount","createRoot","fn","detachedOwner","listener","owner","unowned","current","root","updateFn","untrack","cleanNode","runUpdates","createSignal","value","options","s","setter","writeSignal","readSignal","createRenderEffect","c","createComputation","updateComputation","createEffect","runUserEffects","createMemo","onCleanup","useContext","context","updates","lookUpstream","sSlot","node","isComp","TransitionRunning","markDownstream","time","runComputation","nextValue","err","handleError","init","pure","state","runTop","ancestors","i","wait","res","completeUpdates","queue","userLength","e","ignore","source","o","index","obs","n","castError","FALLBACK","dispose","d","mapArray","list","mapFn","items","mapped","disposers","len","indexes","newItems","newLen","j","newIndices","newIndicesNext","temp","tempdisposers","tempIndexes","start","end","newEnd","item","disposer","mapper","set","createComponent","Comp","props","narrowedError","name","For","fallback","Show","keyed","conditionValue","condition","child","reconcileArrays","parentNode","bLength","aEnd","bEnd","aStart","bStart","after","map","sequence","t","$$EVENTS","template","html","isImportNode","isSVG","isMathML","create","delegateEvents","eventNames","document","l","eventHandler","setAttribute","className","addEventListener","handler","delegate","insert","parent","accessor","marker","initial","insertExpression","key","oriTarget","oriCurrentTarget","retarget","handleNode","data","walkUpTree","path","unwrapArray","cleanChildren","v","array","currentArray","normalizeIncomingArray","appendNodes","normalized","unwrap","dynamic","prev","replacement","inserted","el","isParent","Button","_el$","_tmpl$","_$addEventListener","onClick","_$insert","children","_$effect","_p$","_v$","type","_v$2","title","_v$3","class","trimEnd","_v$4","ariaLabel","undefined","_v$5","ariaDisabled","disabled","_v$6","_v$7","tabIndex","_$setAttribute","_$className","_$delegateEvents","arrowDown","arrowUp","audio","ban","buffer","camera","file","fullscreenEnter","fullscreenExit","microphone","mute","network","pause","play","screen","stats","video","volumeHigh","volumeLow","volumeMedium","Element","src","innerHTML","icon","ArrowDown","ArrowUp","Audio","Ban","Buffer","Camera","File","FullscreenEnter","FullscreenExit","Microphone","Mute","Network","Pause","Play","Screen","Stats","Video","VolumeHigh","VolumeLow","VolumeMedium","BaseProvider","Effect","AudioProvider","track","config","now","bitrate","bytesDelta","elapsedMs","bitsPerSecond","parts","khz","BufferProvider","NetworkProvider","nav","part","effectiveType","downlink","rtt","VideoProvider","catalog","fps","frameCountDelta","elapsedSeconds","width","height","providers","getStatsInformationProvider","statProvider","StatsItem","displayData","setDisplayData","StatsInformationProvider","provider","setup","cleanup","_el$2","firstChild","_el$3","nextSibling","_el$4","_el$5","svg","statsDetailItems","_$createComponent","Icon","StatsPanel","each","contextValue","when","getElement","_element"],"mappings":";AAiJA,MAAMA,KAAS,IACTC,KAAU,CAACC,GAAGC,MAAMD,MAAMC,GAG1BC,KAAS,uBAAO,aAAa,GAE7BC,IAAgB;AAAA,EACpB,QAAQJ;AACV;AAEA,IAAIK,KAAaC;AACjB,MAAMC,IAAQ,GACRC,IAAU,GACVC,KAAU;AAAA,EACd,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AACT;AAEA,IAAIC,IAAQ;AACZ,IAAIC,IAAa,MAEbC,KAAuB,MACvBC,IAAW,MACXC,IAAU,MACVC,IAAU,MACVC,IAAY;AAChB,SAASC,EAAWC,GAAIC,GAAe;AACrC,QAAMC,IAAWP,GACfQ,IAAQX,GACRY,IAAUJ,EAAG,WAAW,GACxBK,IAAwCF,GACxCG,IAAOF,IAAUb,KAAU;AAAA,IACzB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAASc,IAAUA,EAAQ,UAAU;AAAA,IACrC,OAAOA;AAAA,EACb,GACIE,IAAWH,IAAUJ,IAAK,MAAMA,EAAG,MAAMQ,EAAQ,MAAMC,EAAUH,CAAI,CAAC,CAAC;AACzE,EAAAd,IAAQc,GACRX,IAAW;AACX,MAAI;AACF,WAAOe,EAAWH,GAAU,EAAI;AAAA,EAClC,UAAC;AACC,IAAAZ,IAAWO,GACXV,IAAQW;AAAA,EACV;AACF;AACA,SAASQ,GAAaC,GAAOC,GAAS;AACpC,EAAAA,IAAUA,IAAU,OAAO,OAAO,CAAA,GAAI3B,GAAe2B,CAAO,IAAI3B;AAChE,QAAM4B,IAAI;AAAA,IACR,OAAAF;AAAA,IACA,WAAW;AAAA,IACX,eAAe;AAAA,IACf,YAAYC,EAAQ,UAAU;A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,QAAK;AAAA,QAAA,IAAEc,QAAK;AAAA,iBAAE+E,IAAW/E;AAAAA,QAAK;AAAA,MAAA,CAAA,CAAA,GAAA3C;AAAAA,IAAA,GAAA;AAAA,EAAA,CAE7D;AAGJ;","x_google_ignoreList":[0,1]}
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@moq/ui-core",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Shared UI components for Media over QUIC",
|
|
6
|
+
"license": "(MIT OR Apache-2.0)",
|
|
7
|
+
"repository": "github:moq-dev/moq",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"default": "./index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@moq/signals": "^0.1.2"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { KnownStatsProviders, ProviderProps } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Props for individual stats metric item
|
|
5
|
+
*/
|
|
6
|
+
interface StatsItemProps extends ProviderProps {
|
|
7
|
+
name: string;
|
|
8
|
+
/** Metric type identifier */
|
|
9
|
+
statProvider: KnownStatsProviders;
|
|
10
|
+
/** SVG icon markup */
|
|
11
|
+
svg: JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Individual metric display with provider and reactive updates
|
|
15
|
+
*/
|
|
16
|
+
export declare const StatsItem: (props: StatsItemProps) => JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StatsItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsItem.d.ts","sourceRoot":"","sources":["../../../src/stats/components/StatsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,GAAG,EAAa,MAAM,UAAU,CAAC;AAE3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,UAAU,cAAe,SAAQ,aAAa;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,YAAY,EAAE,mBAAmB,CAAC;IAClC,sBAAsB;IACtB,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,gBAgC9C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { KnownStatsProviders, ProviderProps } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Props for stats panel component
|
|
5
|
+
*/
|
|
6
|
+
interface StatsPanelProps extends ProviderProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const statsDetailItems: {
|
|
9
|
+
name: string;
|
|
10
|
+
statProvider: KnownStatsProviders;
|
|
11
|
+
icon: () => JSX.Element;
|
|
12
|
+
}[];
|
|
13
|
+
/**
|
|
14
|
+
* Panel displaying all metrics in a grid layout
|
|
15
|
+
*/
|
|
16
|
+
export declare const StatsPanel: (props: StatsPanelProps) => JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StatsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsPanel.d.ts","sourceRoot":"","sources":["../../../src/stats/components/StatsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE;;GAEG;AACH,UAAU,eAAgB,SAAQ,aAAa;CAAG;AAElD,eAAO,MAAM,gBAAgB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,CAAC,OAAO,CAAA;CAAE,EAqB1G,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,gBAgBhD,CAAC"}
|
package/stats/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Context } from "solid-js";
|
|
2
|
+
import type { ProviderProps } from "./types";
|
|
3
|
+
interface StatsProps<T = unknown> {
|
|
4
|
+
context: Context<T>;
|
|
5
|
+
getElement: (ctx: T) => ProviderProps | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Stats component for displaying real-time media streaming metrics
|
|
9
|
+
* Accepts a generic context and a function to extract the media element
|
|
10
|
+
*/
|
|
11
|
+
export declare const Stats: <T = unknown>(props: StatsProps<T>) => import("solid-js").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stats/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAoB,MAAM,UAAU,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,UAAU,CAAC,CAAC,GAAG,OAAO;IAC/B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,aAAa,GAAG,SAAS,CAAC;CAClD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,GAAG,OAAO,EAAE,OAAO,UAAU,CAAC,CAAC,CAAC,mCAYtD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ProviderContext } from "../types";
|
|
2
|
+
import { BaseProvider } from "./base";
|
|
3
|
+
/**
|
|
4
|
+
* Provider for audio stream metrics (channels, bitrate, codec)
|
|
5
|
+
*/
|
|
6
|
+
export declare class AudioProvider extends BaseProvider {
|
|
7
|
+
/** Polling interval in milliseconds */
|
|
8
|
+
private static readonly POLLING_INTERVAL_MS;
|
|
9
|
+
/** Display context for updating metrics */
|
|
10
|
+
private context;
|
|
11
|
+
/** Polling interval ID */
|
|
12
|
+
private updateInterval;
|
|
13
|
+
/** Previous bytes received for bitrate calculation */
|
|
14
|
+
private previousBytesReceived;
|
|
15
|
+
/** Previous timestamp for accurate elapsed time calculation */
|
|
16
|
+
private previousWhen;
|
|
17
|
+
/**
|
|
18
|
+
* Initialize audio provider with polling interval
|
|
19
|
+
*/
|
|
20
|
+
setup(context: ProviderContext): void;
|
|
21
|
+
/**
|
|
22
|
+
* Calculate and display current audio metrics
|
|
23
|
+
*/
|
|
24
|
+
private updateDisplayData;
|
|
25
|
+
/**
|
|
26
|
+
* Clean up polling interval
|
|
27
|
+
*/
|
|
28
|
+
cleanup(): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=audio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../../src/stats/providers/audio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC9C,uCAAuC;IACvC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAClD,2CAA2C;IAC3C,OAAO,CAAC,OAAO,CAA8B;IAC7C,0BAA0B;IAC1B,OAAO,CAAC,cAAc,CAAqB;IAC3C,sDAAsD;IACtD,OAAO,CAAC,qBAAqB,CAAK;IAClC,+DAA+D;IAC/D,OAAO,CAAC,YAAY,CAAK;IAEzB;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAerC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6DzB;;OAEG;IACM,OAAO,IAAI,IAAI;CAMxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Effect } from "@moq/signals";
|
|
2
|
+
import type { ProviderContext, ProviderProps } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Base class for metric providers providing common utilities
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class BaseProvider {
|
|
7
|
+
/** Manages subscriptions lifecycle */
|
|
8
|
+
protected signals: Effect;
|
|
9
|
+
/** Stream sources provided to provider */
|
|
10
|
+
protected props: ProviderProps;
|
|
11
|
+
/**
|
|
12
|
+
* Initialize provider with stream sources
|
|
13
|
+
* @param props - Audio and video stream sources
|
|
14
|
+
*/
|
|
15
|
+
constructor(props: ProviderProps);
|
|
16
|
+
/**
|
|
17
|
+
* Initialize provider with display context
|
|
18
|
+
* @param context - Provider context for updating display
|
|
19
|
+
*/
|
|
20
|
+
abstract setup(context: ProviderContext): void;
|
|
21
|
+
/**
|
|
22
|
+
* Clean up subscriptions
|
|
23
|
+
*/
|
|
24
|
+
cleanup(): void;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/stats/providers/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/D;;GAEG;AACH,8BAAsB,YAAY;IACjC,sCAAsC;IACtC,SAAS,CAAC,OAAO,SAAgB;IACjC,0CAA0C;IAC1C,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC;IAE/B;;;OAGG;gBACS,KAAK,EAAE,aAAa;IAIhC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAE9C;;OAEG;IACH,OAAO,IAAI,IAAI;CAGf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ProviderContext } from "../types";
|
|
2
|
+
import { BaseProvider } from "./base";
|
|
3
|
+
/**
|
|
4
|
+
* Provider for buffer metrics (fill percentage, latency)
|
|
5
|
+
*/
|
|
6
|
+
export declare class BufferProvider extends BaseProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Initialize buffer provider with signal subscriptions
|
|
9
|
+
*/
|
|
10
|
+
setup(context: ProviderContext): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/stats/providers/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC/C;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAUrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public exports for all providers and utilities
|
|
3
|
+
*/
|
|
4
|
+
export { AudioProvider } from "./audio";
|
|
5
|
+
export { BaseProvider } from "./base";
|
|
6
|
+
export { BufferProvider } from "./buffer";
|
|
7
|
+
export { NetworkProvider } from "./network";
|
|
8
|
+
export { getStatsInformationProvider, providers } from "./registry";
|
|
9
|
+
export { VideoProvider } from "./video";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stats/providers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|