@moq/publish 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 +100 -0
- package/audio/capture-worklet.d.ts +2 -0
- package/audio/capture-worklet.d.ts.map +1 -0
- package/audio/capture.d.ts +6 -0
- package/audio/capture.d.ts.map +1 -0
- package/audio/encoder.d.ts +31 -0
- package/audio/encoder.d.ts.map +1 -0
- package/audio/index.d.ts +3 -0
- package/audio/index.d.ts.map +1 -0
- package/audio/types.d.ts +18 -0
- package/audio/types.d.ts.map +1 -0
- package/broadcast.d.ts +36 -0
- package/broadcast.d.ts.map +1 -0
- package/chat/index.d.ts +19 -0
- package/chat/index.d.ts.map +1 -0
- package/chat/message.d.ts +19 -0
- package/chat/message.d.ts.map +1 -0
- package/chat/typing.d.ts +19 -0
- package/chat/typing.d.ts.map +1 -0
- package/element.d.ts +32 -0
- package/element.d.ts.map +1 -0
- package/element.js +141 -0
- package/element.js.map +1 -0
- package/index.d.ts +9 -0
- package/index.d.ts.map +1 -0
- package/index.js +24 -0
- package/index.js.map +1 -0
- package/libav-opus-af-BlMWboA7.js +368 -0
- package/libav-opus-af-BlMWboA7.js.map +1 -0
- package/location/index.d.ts +33 -0
- package/location/index.d.ts.map +1 -0
- package/location/peers.d.ts +26 -0
- package/location/peers.d.ts.map +1 -0
- package/location/window.d.ts +35 -0
- package/location/window.d.ts.map +1 -0
- package/main-DGBFe0O7.js +2301 -0
- package/main-DGBFe0O7.js.map +1 -0
- package/package.json +41 -0
- package/preview.d.ts +21 -0
- package/preview.d.ts.map +1 -0
- package/screen-BCioRZHS.js +6579 -0
- package/screen-BCioRZHS.js.map +1 -0
- package/source/camera.d.ts +19 -0
- package/source/camera.d.ts.map +1 -0
- package/source/device.d.ts +19 -0
- package/source/device.d.ts.map +1 -0
- package/source/file.d.ts +20 -0
- package/source/file.d.ts.map +1 -0
- package/source/index.d.ts +6 -0
- package/source/index.d.ts.map +1 -0
- package/source/microphone.d.ts +19 -0
- package/source/microphone.d.ts.map +1 -0
- package/source/screen.d.ts +22 -0
- package/source/screen.d.ts.map +1 -0
- package/support/element.d.ts +22 -0
- package/support/element.d.ts.map +1 -0
- package/support/element.js +184 -0
- package/support/element.js.map +1 -0
- package/support/index.d.ts +29 -0
- package/support/index.d.ts.map +1 -0
- package/support/index.js +63 -0
- package/support/index.js.map +1 -0
- package/ui/components/CameraSourceButton.d.ts +2 -0
- package/ui/components/CameraSourceButton.d.ts.map +1 -0
- package/ui/components/FileSourceButton.d.ts +2 -0
- package/ui/components/FileSourceButton.d.ts.map +1 -0
- package/ui/components/MediaSourceSelector.d.ts +8 -0
- package/ui/components/MediaSourceSelector.d.ts.map +1 -0
- package/ui/components/MicrophoneSourceButton.d.ts +2 -0
- package/ui/components/MicrophoneSourceButton.d.ts.map +1 -0
- package/ui/components/NothingSourceButton.d.ts +2 -0
- package/ui/components/NothingSourceButton.d.ts.map +1 -0
- package/ui/components/PublishControls.d.ts +2 -0
- package/ui/components/PublishControls.d.ts.map +1 -0
- package/ui/components/PublishStatusIndicator.d.ts +2 -0
- package/ui/components/PublishStatusIndicator.d.ts.map +1 -0
- package/ui/components/ScreenSourceButton.d.ts +2 -0
- package/ui/components/ScreenSourceButton.d.ts.map +1 -0
- package/ui/context.d.ts +25 -0
- package/ui/context.d.ts.map +1 -0
- package/ui/element.d.ts +5 -0
- package/ui/element.d.ts.map +1 -0
- package/ui/hooks/use-publish-ui.d.ts +15 -0
- package/ui/hooks/use-publish-ui.d.ts.map +1 -0
- package/ui/index.d.ts +7 -0
- package/ui/index.d.ts.map +1 -0
- package/ui/index.js +974 -0
- package/ui/index.js.map +1 -0
- package/user.d.ts +25 -0
- package/user.d.ts.map +1 -0
- package/video/encoder.d.ts +31 -0
- package/video/encoder.d.ts.map +1 -0
- package/video/index.d.ts +85 -0
- package/video/index.d.ts.map +1 -0
- package/video/polyfill.d.ts +3 -0
- package/video/polyfill.d.ts.map +1 -0
- package/video/types.d.ts +20 -0
- package/video/types.d.ts.map +1 -0
package/ui/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","../../../../node_modules/.bun/component-register@0.8.8/node_modules/component-register/dist/component-register.js","../../../../node_modules/.bun/solid-element@1.9.1+2e1854f049906f04/node_modules/solid-element/dist/index.js","../../src/ui/context.tsx","../../src/ui/hooks/use-publish-ui.ts","../../src/ui/components/MediaSourceSelector.tsx","../../src/ui/components/CameraSourceButton.tsx","../../src/ui/components/FileSourceButton.tsx","../../src/ui/components/MicrophoneSourceButton.tsx","../../src/ui/components/NothingSourceButton.tsx","../../src/ui/components/PublishStatusIndicator.tsx","../../src/ui/components/ScreenSourceButton.tsx","../../src/ui/components/PublishControls.tsx","../../src/ui/element.tsx","../../src/ui/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","function cloneProps(props) {\n const propKeys = Object.keys(props);\n return propKeys.reduce((memo, k) => {\n const prop = props[k];\n memo[k] = Object.assign({}, prop);\n if (isObject(prop.value) && !isFunction(prop.value) && !Array.isArray(prop.value)) memo[k].value = Object.assign({}, prop.value);\n if (Array.isArray(prop.value)) memo[k].value = prop.value.slice(0);\n return memo;\n }, {});\n}\nfunction normalizePropDefs(props) {\n if (!props) return {};\n const propKeys = Object.keys(props);\n return propKeys.reduce((memo, k) => {\n const v = props[k];\n memo[k] = !(isObject(v) && \"value\" in v) ? {\n value: v\n } : v;\n memo[k].attribute || (memo[k].attribute = toAttribute(k));\n memo[k].parse = \"parse\" in memo[k] ? memo[k].parse : typeof memo[k].value !== \"string\";\n return memo;\n }, {});\n}\nfunction propValues(props) {\n const propKeys = Object.keys(props);\n return propKeys.reduce((memo, k) => {\n memo[k] = props[k].value;\n return memo;\n }, {});\n}\nfunction initializeProps(element, propDefinition) {\n const props = cloneProps(propDefinition),\n propKeys = Object.keys(propDefinition);\n propKeys.forEach(key => {\n const prop = props[key],\n attr = element.getAttribute(prop.attribute),\n value = element[key];\n if (attr != null) prop.value = prop.parse ? parseAttributeValue(attr) : attr;\n if (value != null) prop.value = Array.isArray(value) ? value.slice(0) : value;\n prop.reflect && reflect(element, prop.attribute, prop.value, !!prop.parse);\n Object.defineProperty(element, key, {\n get() {\n return prop.value;\n },\n set(val) {\n const oldValue = prop.value;\n prop.value = val;\n prop.reflect && reflect(this, prop.attribute, prop.value, !!prop.parse);\n for (let i = 0, l = this.__propertyChangedCallbacks.length; i < l; i++) {\n this.__propertyChangedCallbacks[i](key, val, oldValue);\n }\n },\n enumerable: true,\n configurable: true\n });\n });\n return props;\n}\nfunction parseAttributeValue(value) {\n if (!value) return;\n try {\n return JSON.parse(value);\n } catch (err) {\n return value;\n }\n}\nfunction reflect(node, attribute, value, parse) {\n if (value == null || value === false) return node.removeAttribute(attribute);\n let reflect = parse ? JSON.stringify(value) : value;\n node.__updating[attribute] = true;\n if (reflect === \"true\") reflect = \"\";\n node.setAttribute(attribute, reflect);\n Promise.resolve().then(() => delete node.__updating[attribute]);\n}\nfunction toAttribute(propName) {\n return propName.replace(/\\.?([A-Z]+)/g, (x, y) => \"-\" + y.toLowerCase()).replace(\"_\", \"-\").replace(/^-/, \"\");\n}\nfunction toProperty(attr) {\n return attr.toLowerCase().replace(/(-)([a-z])/g, test => test.toUpperCase().replace(\"-\", \"\"));\n}\nfunction isObject(obj) {\n return obj != null && (typeof obj === \"object\" || typeof obj === \"function\");\n}\nfunction isFunction(val) {\n return Object.prototype.toString.call(val) === \"[object Function]\";\n}\nfunction isConstructor(f) {\n return typeof f === \"function\" && f.toString().indexOf(\"class\") === 0;\n}\nfunction reloadElement(node) {\n let callback = null;\n while (callback = node.__releaseCallbacks.pop()) callback(node);\n delete node.__initialized;\n node.renderRoot.textContent = \"\";\n node.connectedCallback();\n}\n\nlet currentElement;\nfunction getCurrentElement() {\n return currentElement;\n}\nfunction noShadowDOM() {\n Object.defineProperty(currentElement, \"renderRoot\", {\n value: currentElement\n });\n}\nfunction createElementType(BaseElement, propDefinition) {\n const propKeys = Object.keys(propDefinition);\n return class CustomElement extends BaseElement {\n static get observedAttributes() {\n return propKeys.map(k => propDefinition[k].attribute);\n }\n constructor() {\n super();\n this.__initialized = false;\n this.__released = false;\n this.__releaseCallbacks = [];\n this.__propertyChangedCallbacks = [];\n this.__updating = {};\n this.props = {};\n for (let propKey of propKeys) {\n this[propKey] = undefined;\n }\n }\n connectedCallback() {\n if (this.__initialized) return;\n this.__releaseCallbacks = [];\n this.__propertyChangedCallbacks = [];\n this.__updating = {};\n this.props = initializeProps(this, propDefinition);\n const props = propValues(this.props),\n ComponentType = this.Component,\n outerElement = currentElement;\n try {\n currentElement = this;\n this.__initialized = true;\n if (isConstructor(ComponentType)) new ComponentType(props, {\n element: this\n });else ComponentType(props, {\n element: this\n });\n } finally {\n currentElement = outerElement;\n }\n }\n async disconnectedCallback() {\n // prevent premature releasing when element is only temporarely removed from DOM\n await Promise.resolve();\n if (this.isConnected) return;\n this.__propertyChangedCallbacks.length = 0;\n let callback = null;\n while (callback = this.__releaseCallbacks.pop()) callback(this);\n delete this.__initialized;\n this.__released = true;\n }\n attributeChangedCallback(name, oldVal, newVal) {\n if (!this.__initialized) return;\n if (this.__updating[name]) return;\n name = this.lookupProp(name);\n if (name in propDefinition) {\n if (newVal == null && !this[name]) return;\n this[name] = propDefinition[name].parse ? parseAttributeValue(newVal) : newVal;\n }\n }\n lookupProp(attrName) {\n if (!propDefinition) return;\n return propKeys.find(k => attrName === k || attrName === propDefinition[k].attribute);\n }\n get renderRoot() {\n return this.shadowRoot || this.attachShadow({\n mode: \"open\"\n });\n }\n addReleaseCallback(fn) {\n this.__releaseCallbacks.push(fn);\n }\n addPropertyChangedCallback(fn) {\n this.__propertyChangedCallbacks.push(fn);\n }\n };\n}\n\nfunction createMixin(mixinFn) {\n return ComponentType => (props, options) => {\n options = mixinFn(options);\n if (isConstructor(ComponentType)) return new ComponentType(props, options);\n return ComponentType(props, options);\n };\n}\nfunction compose(...fns) {\n if (fns.length === 0) return i => i;\n if (fns.length === 1) return fns[0];\n return fns.reduce((a, b) => (...args) => a(b(...args)));\n}\n\nconst EC = Symbol('element-context');\nfunction lookupContext(element, context) {\n return element[EC] && element[EC][context.id] || (element.host || element.parentNode) && lookupContext(element.host || element.parentNode, context);\n}\nfunction createContext(initFn) {\n return {\n id: Symbol('context'),\n initFn\n };\n}\n\n// Direct\nfunction provide(context, value, element = getCurrentElement()) {\n element[EC] || (element[EC] = {});\n return element[EC][context.id] = context.initFn ? context.initFn(value) : value;\n}\nfunction consume(context, element = getCurrentElement()) {\n return lookupContext(element, context);\n}\n\n// HOCs\nfunction withProvider(context, value) {\n return createMixin(options => {\n const {\n element\n } = options;\n provide(context, value, element);\n return options;\n });\n}\nfunction withConsumer(context, key) {\n return createMixin(options => {\n const {\n element\n } = options;\n options = Object.assign({}, options, {\n [key]: lookupContext(element, context)\n });\n return options;\n });\n}\n\nfunction walk(root, call) {\n call(root);\n if (root.shadowRoot) walk(root.shadowRoot, call);\n let child = root.firstChild;\n while (child) {\n child.nodeType === 1 && walk(child, call);\n child = child.nextSibling;\n }\n}\nfunction hot(module, tagName) {\n if (module.hot) {\n function update(possibleError) {\n if (possibleError && possibleError instanceof Error) {\n console.error(possibleError);\n return;\n }\n walk(document.body, node => node.localName === tagName && setTimeout(() => reloadElement(node), 0));\n }\n\n // handle both Parcel and Webpack style\n module.hot.accept(update);\n if (module.hot.status && module.hot.status() === 'apply') {\n update();\n }\n }\n}\n\nfunction register(tag, props = {}, options = {}) {\n const {\n BaseElement = HTMLElement,\n extension,\n customElements = window.customElements\n } = options;\n return ComponentType => {\n if (!tag) throw new Error(\"tag is required to register a Component\");\n let ElementType = customElements.get(tag);\n if (ElementType) {\n // Consider disabling this in a production mode\n ElementType.prototype.Component = ComponentType;\n return ElementType;\n }\n ElementType = createElementType(BaseElement, normalizePropDefs(props));\n ElementType.prototype.Component = ComponentType;\n ElementType.prototype.registeredTag = tag;\n customElements.define(tag, ElementType, extension);\n return ElementType;\n };\n}\n\nexport { compose, consume, createContext, createMixin, getCurrentElement, hot, isConstructor, isFunction, isObject, noShadowDOM, provide, register, reloadElement, toAttribute, toProperty, withConsumer, withProvider };\n","import { register } from \"component-register\";\nexport { hot, getCurrentElement, noShadowDOM } from \"component-register\";\nimport { createRoot, createSignal } from \"solid-js\";\nimport { insert } from \"solid-js/web\";\nfunction createProps(raw) {\n const keys = Object.keys(raw);\n const props = {};\n for (let i = 0; i < keys.length; i++) {\n const [get, set] = createSignal(raw[keys[i]]);\n Object.defineProperty(props, keys[i], {\n get,\n set(v) {\n set(() => v);\n }\n });\n }\n return props;\n}\nfunction lookupContext(el) {\n if (el.assignedSlot && el.assignedSlot._$owner) return el.assignedSlot._$owner;\n let next = el.parentNode;\n while (next && !next._$owner && !(next.assignedSlot && next.assignedSlot._$owner))\n next = next.parentNode;\n return next && next.assignedSlot ? next.assignedSlot._$owner : el._$owner;\n}\nfunction withSolid(ComponentType) {\n return (rawProps, options) => {\n const { element } = options;\n return createRoot(dispose => {\n const props = createProps(rawProps);\n element.addPropertyChangedCallback((key, val) => (props[key] = val));\n element.addReleaseCallback(() => {\n element.renderRoot.textContent = \"\";\n dispose();\n });\n const comp = ComponentType(props, options);\n return insert(element.renderRoot, comp);\n }, lookupContext(element));\n };\n}\nfunction customElement(tag, props, ComponentType) {\n if (arguments.length === 2) {\n ComponentType = props;\n props = {};\n }\n return register(tag, props)(withSolid(ComponentType));\n}\nexport { withSolid, customElement };\n","import type { JSX } from \"solid-js\";\nimport { createContext, createEffect, createSignal } from \"solid-js\";\nimport type MoqPublish from \"../element\";\n\nexport type PublishStatus =\n\t| \"no-url\"\n\t| \"disconnected\"\n\t| \"connecting\"\n\t| \"live\"\n\t| \"audio-only\"\n\t| \"video-only\"\n\t| \"select-source\";\n\ntype PublishUIContextValue = {\n\tmoqPublish: MoqPublish;\n\tcameraDevices: () => MediaDeviceInfo[];\n\tmicrophoneDevices: () => MediaDeviceInfo[];\n\tpublishStatus: () => PublishStatus;\n\tmicrophoneActive: () => boolean;\n\tcameraActive: () => boolean;\n\tscreenActive: () => boolean;\n\tfileActive: () => boolean;\n\tnothingActive: () => boolean;\n\tselectedCameraSource?: () => MediaDeviceInfo[\"deviceId\"] | undefined;\n\tselectedMicrophoneSource?: () => MediaDeviceInfo[\"deviceId\"] | undefined;\n\tsetFile: (file: File) => void;\n};\n\ntype PublishUIContextProviderProps = {\n\tmoqPublish: MoqPublish;\n\tchildren: JSX.Element;\n};\n\nexport const PublishUIContext = createContext<PublishUIContextValue>();\n\nexport default function PublishUIContextProvider(props: PublishUIContextProviderProps) {\n\tconst [cameraDevices, setCameraMediaDevices] = createSignal<MediaDeviceInfo[]>([]);\n\tconst [selectedCameraSource, setSelectedCameraSource] = createSignal<MediaDeviceInfo[\"deviceId\"] | undefined>();\n\tconst [microphoneDevices, setMicrophoneMediaDevices] = createSignal<MediaDeviceInfo[]>([]);\n\tconst [selectedMicrophoneSource, setSelectedMicrophoneSource] = createSignal<\n\t\tMediaDeviceInfo[\"deviceId\"] | undefined\n\t>();\n\tconst [cameraActive, setCameraActive] = createSignal<boolean>(false);\n\tconst [screenActive, setScreenActive] = createSignal<boolean>(false);\n\tconst [microphoneActive, setMicrophoneActive] = createSignal<boolean>(false);\n\tconst [fileActive, setFileActive] = createSignal<boolean>(false);\n\tconst [nothingActive, setNothingActive] = createSignal<boolean>(false);\n\tconst [publishStatus, setPublishStatus] = createSignal<PublishStatus>(\"no-url\");\n\n\tconst setFile = (file: File) => {\n\t\tprops.moqPublish.source.set(file);\n\t\tprops.moqPublish.invisible.set(false);\n\t\tprops.moqPublish.muted.set(true);\n\t};\n\n\tconst value: PublishUIContextValue = {\n\t\tmoqPublish: props.moqPublish,\n\t\tcameraDevices,\n\t\tmicrophoneDevices,\n\t\tpublishStatus,\n\t\tcameraActive,\n\t\tscreenActive,\n\t\tmicrophoneActive,\n\t\tfileActive,\n\t\tsetFile,\n\t\tnothingActive,\n\t\tselectedCameraSource,\n\t\tselectedMicrophoneSource,\n\t};\n\n\tcreateEffect(() => {\n\t\tconst publish = props.moqPublish;\n\n\t\t// Initialize with \"nothing\" active on page load\n\t\tpublish.muted.set(true);\n\t\tpublish.invisible.set(true);\n\t\tpublish.source.set(undefined);\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst clearCameraDevices = () => setCameraMediaDevices([]);\n\t\t\tconst video = effect.get(publish.video);\n\n\t\t\tif (!video || !(\"device\" in video)) {\n\t\t\t\tclearCameraDevices();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst devices = effect.get(video.device.available);\n\t\t\tif (!devices || devices.length < 2) {\n\t\t\t\tclearCameraDevices();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetCameraMediaDevices(devices);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst clearMicrophoneDevices = () => setMicrophoneMediaDevices([]);\n\t\t\tconst audio = effect.get(publish.audio);\n\n\t\t\tif (!audio || !(\"device\" in audio)) {\n\t\t\t\tclearMicrophoneDevices();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst enabled = effect.get(publish.broadcast.audio.enabled);\n\t\t\tif (!enabled) {\n\t\t\t\tclearMicrophoneDevices();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst devices = effect.get(audio.device.available);\n\t\t\tif (!devices || devices.length < 2) {\n\t\t\t\tclearMicrophoneDevices();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetMicrophoneMediaDevices(devices);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst source = effect.get(publish.source);\n\t\t\tconst muted = effect.get(publish.muted);\n\t\t\tconst invisible = effect.get(publish.invisible);\n\n\t\t\tsetNothingActive(source === undefined && muted && invisible);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst audioActive = !effect.get(publish.muted);\n\t\t\tsetMicrophoneActive(audioActive);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst videoSource = effect.get(publish.source);\n\t\t\tconst videoActive = effect.get(publish.video);\n\n\t\t\tif (videoActive && videoSource === \"camera\") {\n\t\t\t\tsetCameraActive(true);\n\t\t\t\tsetScreenActive(false);\n\t\t\t} else if (videoActive && videoSource === \"screen\") {\n\t\t\t\tsetScreenActive(true);\n\t\t\t\tsetCameraActive(false);\n\t\t\t} else {\n\t\t\t\tsetCameraActive(false);\n\t\t\t\tsetScreenActive(false);\n\t\t\t}\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst video = effect.get(publish.video);\n\n\t\t\tif (!video || !(\"device\" in video)) return;\n\n\t\t\tconst requested = effect.get(video.device.requested);\n\t\t\tsetSelectedCameraSource(requested);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst audio = effect.get(publish.audio);\n\n\t\t\tif (!audio || !(\"device\" in audio)) return;\n\n\t\t\tconst requested = effect.get(audio.device.requested);\n\t\t\tsetSelectedMicrophoneSource(requested);\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst url = effect.get(publish.connection.url);\n\t\t\tconst status = effect.get(publish.connection.status);\n\t\t\tconst audioSource = effect.get(publish.broadcast.audio.source);\n\t\t\tconst videoSource = effect.get(publish.broadcast.video.source);\n\t\t\tconst muted = effect.get(publish.muted);\n\t\t\tconst invisible = effect.get(publish.invisible);\n\n\t\t\tconst audio = audioSource && !muted;\n\t\t\tconst video = videoSource && !invisible;\n\n\t\t\tif (!url) {\n\t\t\t\tsetPublishStatus(\"no-url\");\n\t\t\t} else if (status === \"disconnected\") {\n\t\t\t\tsetPublishStatus(\"disconnected\");\n\t\t\t} else if (status === \"connecting\") {\n\t\t\t\tsetPublishStatus(\"connecting\");\n\t\t\t} else if (!audio && !video) {\n\t\t\t\tsetPublishStatus(\"select-source\");\n\t\t\t} else if (!audio && video) {\n\t\t\t\tsetPublishStatus(\"video-only\");\n\t\t\t} else if (audio && !video) {\n\t\t\t\tsetPublishStatus(\"audio-only\");\n\t\t\t} else if (audio && video) {\n\t\t\t\tsetPublishStatus(\"live\");\n\t\t\t}\n\t\t});\n\n\t\tpublish.signals.effect((effect) => {\n\t\t\tconst selectedSource = effect.get(publish.source);\n\t\t\tsetFileActive(selectedSource instanceof File);\n\t\t});\n\t});\n\n\treturn <PublishUIContext.Provider value={value}>{props.children}</PublishUIContext.Provider>;\n}\n","import { useContext } from \"solid-js\";\nimport { PublishUIContext } from \"../context\";\n\nexport default function usePublishUIContext() {\n\tconst context = useContext(PublishUIContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"usePublishUIContext must be used within a PublishUIContextProvider\");\n\t}\n\n\treturn context;\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport { createSignal, For, Show } from \"solid-js\";\n\ntype MediaSourceSelectorProps = {\n\tsources?: MediaDeviceInfo[];\n\tselectedSource?: MediaDeviceInfo[\"deviceId\"];\n\tonSelected?: (sourceId: MediaDeviceInfo[\"deviceId\"]) => void;\n};\n\nexport default function MediaSourceSelector(props: MediaSourceSelectorProps) {\n\tconst [sourcesVisible, setSourcesVisible] = createSignal(false);\n\n\tconst toggleSourcesVisible = () => setSourcesVisible((visible) => !visible);\n\n\treturn (\n\t\t<div class=\"publish-ui__media-selector-wrapper flex--center\">\n\t\t\t<Button\n\t\t\t\tonClick={toggleSourcesVisible}\n\t\t\t\tclass=\"publish-ui__media-selector-toggle button\"\n\t\t\t\ttitle={sourcesVisible() ? \"Hide Sources\" : \"Show Sources\"}\n\t\t\t>\n\t\t\t\t<Show when={sourcesVisible()} fallback={<Icon.ArrowDown />}>\n\t\t\t\t\t<Icon.ArrowUp />\n\t\t\t\t</Show>\n\t\t\t</Button>\n\t\t\t<Show when={sourcesVisible()}>\n\t\t\t\t<select\n\t\t\t\t\tvalue={props.selectedSource}\n\t\t\t\t\tclass=\"publish-ui__media-selector-dropdown\"\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tprops.onSelected?.(e.currentTarget.value as MediaDeviceInfo[\"deviceId\"]);\n\t\t\t\t\t\tsetSourcesVisible(false);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<For each={props.sources}>\n\t\t\t\t\t\t{(source) => <option value={source.deviceId}>{source.label}</option>}\n\t\t\t\t\t</For>\n\t\t\t\t</select>\n\t\t\t</Show>\n\t\t</div>\n\t);\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport { Show } from \"solid-js\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\nimport MediaSourceSourceSelector from \"./MediaSourceSelector\";\n\nexport default function CameraSourceButton() {\n\tconst context = usePublishUIContext();\n\tconst onClick = () => {\n\t\tif (context.moqPublish.source.peek() === \"camera\") {\n\t\t\t// Camera already selected, toggle video.\n\t\t\tcontext.moqPublish.invisible.update((invisible) => !invisible);\n\t\t} else {\n\t\t\tcontext.moqPublish.source.set(\"camera\");\n\t\t\tcontext.moqPublish.invisible.set(false);\n\t\t}\n\t};\n\n\tconst onSourceSelected = (sourceId: MediaDeviceInfo[\"deviceId\"]) => {\n\t\tconst video = context.moqPublish.video.peek();\n\t\tif (!video || !(\"device\" in video)) return;\n\n\t\tvideo.device.preferred.set(sourceId);\n\t};\n\n\treturn (\n\t\t<div class=\"publish-ui__source-button-wrapper flex--center\">\n\t\t\t<Button\n\t\t\t\ttitle=\"Camera\"\n\t\t\t\tclass={`publish-ui__source-button flex--center ${context.cameraActive() ? \"publish-ui__source-button--active\" : \"\"}`}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t<Icon.Camera />\n\t\t\t</Button>\n\t\t\t<Show when={context.cameraActive() && context.cameraDevices().length}>\n\t\t\t\t<MediaSourceSourceSelector\n\t\t\t\t\tsources={context.cameraDevices()}\n\t\t\t\t\tselectedSource={context.selectedCameraSource?.()}\n\t\t\t\t\tonSelected={onSourceSelected}\n\t\t\t\t/>\n\t\t\t</Show>\n\t\t</div>\n\t);\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport { createSignal } from \"solid-js\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\n\nexport default function FileSourceButton() {\n\tconst [fileInputRef, setFileInputRef] = createSignal<HTMLInputElement | undefined>();\n\tconst context = usePublishUIContext();\n\tconst onClick = () => fileInputRef()?.click();\n\tconst onChange = (event: Event) => {\n\t\tconst castedInputEl = event.target as HTMLInputElement;\n\t\tconst file = castedInputEl.files?.[0];\n\n\t\tif (file) {\n\t\t\tcontext.setFile(file);\n\t\t\tcastedInputEl.value = \"\";\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<input\n\t\t\t\tref={setFileInputRef}\n\t\t\t\tonChange={onChange}\n\t\t\t\ttype=\"file\"\n\t\t\t\tstyle=\"display: none;\"\n\t\t\t\taccept=\"video/*,audio/*,image/*\"\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ttitle=\"Upload File\"\n\t\t\t\tclass={`publish-ui__source-button flex--center ${context.fileActive() ? \"publish-ui__source-button--active\" : \"\"}`}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t<Icon.File />\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport { Show } from \"solid-js\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\nimport MediaSourceSourceSelector from \"./MediaSourceSelector\";\n\nexport default function MicrophoneSourceButton() {\n\tconst context = usePublishUIContext();\n\tconst onClick = () => {\n\t\tif (context.moqPublish.source.peek() === \"camera\") {\n\t\t\t// Camera already selected, toggle audio.\n\t\t\tcontext.moqPublish.muted.update((muted) => !muted);\n\t\t} else {\n\t\t\tcontext.moqPublish.source.set(\"camera\");\n\t\t\tcontext.moqPublish.muted.set(false);\n\t\t}\n\t};\n\n\tconst onSourceSelected = (sourceId: MediaDeviceInfo[\"deviceId\"]) => {\n\t\tconst audio = context.moqPublish.audio.peek();\n\t\tif (!audio || !(\"device\" in audio)) return;\n\n\t\taudio.device.preferred.set(sourceId);\n\t};\n\n\treturn (\n\t\t<div class=\"publish-ui__source-button-wrapper flex--center\">\n\t\t\t<Button\n\t\t\t\ttitle=\"Microphone\"\n\t\t\t\tclass={`publish-ui__source-button flex--center ${context.microphoneActive() ? \"publish-ui__source-button--active\" : \"\"}`}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t<Icon.Microphone />\n\t\t\t</Button>\n\t\t\t<Show when={context.microphoneActive() && context.microphoneDevices().length}>\n\t\t\t\t<MediaSourceSourceSelector\n\t\t\t\t\tsources={context.microphoneDevices()}\n\t\t\t\t\tselectedSource={context.selectedMicrophoneSource?.()}\n\t\t\t\t\tonSelected={onSourceSelected}\n\t\t\t\t/>\n\t\t\t</Show>\n\t\t</div>\n\t);\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\n\nexport default function NothingSourceButton() {\n\tconst context = usePublishUIContext();\n\tconst onClick = () => {\n\t\tcontext.moqPublish.source.set(undefined);\n\t\tcontext.moqPublish.muted.set(true);\n\t\tcontext.moqPublish.invisible.set(true);\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\ttitle=\"No Source\"\n\t\t\tclass={`publish-ui__source-button flex--center publish-ui__source-button--no-source ${context.nothingActive() ? \"publish-ui__source-button--no-source-active\" : \"\"}`}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Icon.Ban />\n\t\t</Button>\n\t);\n}\n","import type { PublishStatus } from \"../context\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\n\ntype StatusIndicatorConfig = { variant: string; text: string };\n\nconst STATUS_MAP: Record<PublishStatus, StatusIndicatorConfig> = {\n\t\"no-url\": { variant: \"error\", text: \"No URL\" },\n\tdisconnected: { variant: \"error\", text: \"Disconnected\" },\n\tconnecting: { variant: \"connecting\", text: \"Connecting...\" },\n\t\"select-source\": { variant: \"warning\", text: \"Select Source\" },\n\t\"video-only\": { variant: \"video-only\", text: \"Video Only\" },\n\t\"audio-only\": { variant: \"audio-only\", text: \"Audio Only\" },\n\tlive: { variant: \"live\", text: \"Live\" },\n};\n\nconst unknownStatus: StatusIndicatorConfig = { variant: \"error\", text: \"Unknown\" };\n\nexport default function PublishStatusIndicator() {\n\tconst context = usePublishUIContext();\n\n\tconst statusConfig = (): StatusIndicatorConfig => {\n\t\tconst status: PublishStatus = context.publishStatus();\n\t\treturn STATUS_MAP[status] || unknownStatus;\n\t};\n\n\treturn (\n\t\t<div class=\"publish-ui__status-indicator flex--center\">\n\t\t\t<span\n\t\t\t\tclass={`publish-ui__status-indicator-dot publish-ui__status-indicator-dot--${statusConfig().variant}`}\n\t\t\t/>\n\t\t\t<span\n\t\t\t\tclass={`publish-ui__status-indicator-text publish-ui__status-indicator-text--${statusConfig().variant}`}\n\t\t\t>\n\t\t\t\t{statusConfig().text}\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n","import { Button, Icon } from \"@moq/ui-core\";\nimport usePublishUIContext from \"../hooks/use-publish-ui\";\n\nexport default function ScreenSourceButton() {\n\tconst context = usePublishUIContext();\n\tconst onClick = () => {\n\t\tcontext.moqPublish.source.set(\"screen\");\n\t\tcontext.moqPublish.invisible.set(false);\n\t\tcontext.moqPublish.muted.set(true);\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\ttitle=\"Screen\"\n\t\t\tclass={`publish-ui__source-button flex--center ${context.screenActive() ? \"publish-ui__source-button--active\" : \"\"}`}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Icon.Screen />\n\t\t</Button>\n\t);\n}\n","import CameraSourceButton from \"./CameraSourceButton\";\nimport FileSourceButton from \"./FileSourceButton\";\nimport MicrophoneSourceButton from \"./MicrophoneSourceButton\";\nimport NothingSourceButton from \"./NothingSourceButton\";\nimport PublishStatusIndicator from \"./PublishStatusIndicator\";\nimport ScreenSourceButton from \"./ScreenSourceButton\";\n\nexport default function PublishControls() {\n\treturn (\n\t\t<div class=\"publish-ui__controls flex--center flex--space-between\">\n\t\t\t<div class=\"publish-ui__source-selector flex--center\">\n\t\t\t\t<span class=\"publish-ui__source-label\">Source:</span>\n\t\t\t\t<MicrophoneSourceButton />\n\t\t\t\t<CameraSourceButton />\n\t\t\t\t<ScreenSourceButton />\n\t\t\t\t<FileSourceButton />\n\t\t\t\t<NothingSourceButton />\n\t\t\t</div>\n\t\t\t<PublishStatusIndicator />\n\t\t</div>\n\t);\n}\n","import type MoqPublish from \"../element\";\nimport PublishControls from \"./components/PublishControls\";\nimport PublishControlsContextProvider from \"./context\";\nimport styles from \"./styles/index.css?inline\";\n\nexport function PublishUI(props: { publish: MoqPublish }) {\n\treturn (\n\t\t<>\n\t\t\t<style>{styles}</style>\n\t\t\t<slot></slot>\n\t\t\t<PublishControlsContextProvider moqPublish={props.publish}>\n\t\t\t\t<PublishControls />\n\t\t\t</PublishControlsContextProvider>\n\t\t</>\n\t);\n}\n","import { customElement } from \"solid-element\";\nimport { createSignal, onMount } from \"solid-js\";\nimport { Show } from \"solid-js/web\";\nimport type MoqPublish from \"../element\";\nimport { PublishUI } from \"./element.tsx\";\n\ncustomElement(\"moq-publish-ui\", (_, { element }) => {\n\tconst [nested, setNested] = createSignal<MoqPublish | undefined>();\n\n\tonMount(async () => {\n\t\tawait customElements.whenDefined(\"moq-publish\");\n\t\tconst publishEl = element.querySelector(\"moq-publish\");\n\t\tsetNested(publishEl ? (publishEl as MoqPublish) : undefined);\n\t});\n\n\treturn (\n\t\t<Show when={nested()} keyed>\n\t\t\t{(publish: MoqPublish) => <PublishUI publish={publish} />}\n\t\t</Show>\n\t);\n});\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t\"moq-publish-ui\": HTMLElement;\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","onMount","onCleanup","getOwner","createContext","defaultValue","id","createProvider","useContext","context","children","memo","resolveChildren","updates","lookUpstream","sSlot","node","isComp","i","o","TransitionRunning","markDownstream","time","runComputation","nextValue","err","handleError","init","pure","state","runTop","ancestors","wait","res","completeUpdates","e","queue","userLength","ignore","source","index","obs","n","castError","results","result","props","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","narrowedError","name","For","fallback","Show","keyed","conditionValue","condition","child","reconcileArrays","parentNode","bLength","aEnd","bEnd","aStart","bStart","after","map","sequence","t","template","html","isImportNode","isSVG","isMathML","create","className","use","element","arg","insert","parent","accessor","marker","initial","insertExpression","unwrapArray","multi","cleanChildren","v","array","currentArray","normalizeIncomingArray","appendNodes","normalized","unwrap","dynamic","prev","replacement","inserted","el","isParent","cloneProps","k","prop","isObject","isFunction","normalizePropDefs","toAttribute","propValues","initializeProps","propDefinition","key","attr","parseAttributeValue","reflect","val","oldValue","l","attribute","parse","propName","x","y","obj","isConstructor","f","currentElement","createElementType","BaseElement","propKeys","propKey","ComponentType","outerElement","callback","oldVal","newVal","attrName","register","tag","extension","customElements","ElementType","createProps","raw","keys","get","lookupContext","next","withSolid","rawProps","comp","customElement","PublishUIContext","PublishUIContextProvider","cameraDevices","setCameraMediaDevices","selectedCameraSource","setSelectedCameraSource","microphoneDevices","setMicrophoneMediaDevices","selectedMicrophoneSource","setSelectedMicrophoneSource","cameraActive","setCameraActive","screenActive","setScreenActive","microphoneActive","setMicrophoneActive","fileActive","setFileActive","nothingActive","setNothingActive","publishStatus","setPublishStatus","setFile","file","moqPublish","invisible","muted","publish","undefined","signals","effect","clearCameraDevices","video","devices","device","available","length","clearMicrophoneDevices","audio","broadcast","enabled","audioActive","videoSource","videoActive","requested","url","connection","status","audioSource","selectedSource","File","_$createComponent","Provider","usePublishUIContext","MediaSourceSelector","sourcesVisible","setSourcesVisible","toggleSourcesVisible","visible","_el$","_tmpl$2","_$insert","Button","onClick","title","when","Icon","ArrowDown","ArrowUp","_el$2","_tmpl$","addEventListener","onSelected","currentTarget","each","sources","_el$3","_tmpl$3","label","_$effect","deviceId","CameraSourceButton","peek","update","onSourceSelected","sourceId","preferred","Camera","_$memo","MediaSourceSourceSelector","FileSourceButton","fileInputRef","setFileInputRef","click","onChange","event","castedInputEl","target","files","_$use","MicrophoneSourceButton","Microphone","NothingSourceButton","Ban","STATUS_MAP","variant","text","disconnected","connecting","live","unknownStatus","PublishStatusIndicator","statusConfig","firstChild","nextSibling","_p$","_v$","_v$2","_$className","ScreenSourceButton","Screen","PublishControls","PublishUI","styles","_$owner","_$getOwner","PublishControlsContextProvider","_","nested","setNested","whenDefined","publishEl","querySelector"],"mappings":";AAiJA,MAAMA,KAAS,IACTC,KAAU,CAACC,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UAAAC,GAAAA,GAAAxD;AAAAA,EAAA,GAAA,GAAAlB,EAEb2E,IAA8B;AAAA,IAAA,IAACtG,aAAU;AAAA,aAAE5J,EAAM+J;AAAAA,IAAO;AAAA,IAAA,IAAAnM,WAAA;AAAA,aAAA2N,EACvDsE,IAAe,EAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAIpB;ACTA1H,GAAc,kBAAkB,CAACgI,GAAG;AAAA,EAAE1M,SAAAA;AAAQ,MAAM;AACnD,QAAM,CAAC2M,GAAQC,CAAS,IAAIhU,EAAAA;AAE5Bc,SAAAA,GAAQ,YAAY;AACnB,UAAMqK,eAAe8I,YAAY,aAAa;AAC9C,UAAMC,IAAY9M,EAAQ+M,cAAc,aAAa;AACrDH,IAAAA,EAAUE,KAAwCvG,MAAS;AAAA,EAC5D,CAAC,GAEDuB,EACEtJ,GAAI;AAAA,IAAA,IAACoK,OAAI;AAAA,aAAE+D,EAAAA;AAAAA,IAAQ;AAAA,IAAElO,OAAK;AAAA,IAAAtE,UACzBA,CAACmM,MAAmBwB,EAAMuE,IAAS;AAAA,MAAC/F,SAAAA;AAAAA,IAAAA,CAAgB;AAAA,EAAA,CAAI;AAG5D,CAAC;","x_google_ignoreList":[0,1,2,3]}
|
package/user.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Effect, Signal } from "@moq/signals";
|
|
2
|
+
export type Props = {
|
|
3
|
+
enabled?: boolean | Signal<boolean>;
|
|
4
|
+
id?: string | Signal<string | undefined>;
|
|
5
|
+
name?: string | Signal<string | undefined>;
|
|
6
|
+
avatar?: string | Signal<string | undefined>;
|
|
7
|
+
color?: string | Signal<string | undefined>;
|
|
8
|
+
};
|
|
9
|
+
export declare class Info {
|
|
10
|
+
enabled: Signal<boolean>;
|
|
11
|
+
id: Signal<string | undefined>;
|
|
12
|
+
name: Signal<string | undefined>;
|
|
13
|
+
avatar: Signal<string | undefined>;
|
|
14
|
+
color: Signal<string | undefined>;
|
|
15
|
+
catalog: Signal<{
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
avatar?: string | undefined;
|
|
19
|
+
color?: string | undefined;
|
|
20
|
+
} | undefined>;
|
|
21
|
+
signals: Effect;
|
|
22
|
+
constructor(props?: Props);
|
|
23
|
+
close(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=user.d.ts.map
|
package/user.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,KAAK,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC5C,CAAC;AAEF,qBAAa,IAAI;IAChB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAEzB,EAAE,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAElC,OAAO;;;;;mBAAmD;IAE1D,OAAO,SAAgB;gBAEX,KAAK,CAAC,EAAE,KAAK;IAmBzB,KAAK;CAGL"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Catalog from "@moq/hang/catalog";
|
|
2
|
+
import type * as Moq from "@moq/lite";
|
|
3
|
+
import { Time } from "@moq/lite";
|
|
4
|
+
import { Effect, type Getter, Signal } from "@moq/signals";
|
|
5
|
+
import type { Source } from "./types";
|
|
6
|
+
export interface EncoderProps {
|
|
7
|
+
enabled?: boolean | Signal<boolean>;
|
|
8
|
+
config?: EncoderConfig | Signal<EncoderConfig | undefined>;
|
|
9
|
+
container?: Catalog.Container;
|
|
10
|
+
}
|
|
11
|
+
export interface EncoderConfig {
|
|
12
|
+
codec?: string;
|
|
13
|
+
maxPixels?: number;
|
|
14
|
+
keyframeInterval?: Time.Milli;
|
|
15
|
+
maxBitrate?: number;
|
|
16
|
+
bitrateScale?: number;
|
|
17
|
+
frameRate?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class Encoder {
|
|
20
|
+
#private;
|
|
21
|
+
enabled: Signal<boolean>;
|
|
22
|
+
source: Signal<Source | undefined>;
|
|
23
|
+
frame: Getter<VideoFrame | undefined>;
|
|
24
|
+
readonly catalog: Getter<Catalog.VideoConfig | undefined>;
|
|
25
|
+
config: Signal<EncoderConfig | undefined>;
|
|
26
|
+
active: Moq.Signals.Signal<boolean>;
|
|
27
|
+
constructor(frame: Getter<VideoFrame | undefined>, source: Signal<Source | undefined>, props?: EncoderProps);
|
|
28
|
+
serve(track: Moq.Track, effect: Effect): void;
|
|
29
|
+
close(): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../src/video/encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAG7C,OAAO,KAAK,KAAK,GAAG,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,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oR7C,KAAK;CAGL"}
|
package/video/index.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Effect, Signal } from "@moq/signals";
|
|
2
|
+
import { Encoder, type EncoderProps } from "./encoder";
|
|
3
|
+
import type { Source } from "./types";
|
|
4
|
+
export * from "./encoder";
|
|
5
|
+
export * from "./types";
|
|
6
|
+
export type Props = {
|
|
7
|
+
source?: Source | Signal<Source | undefined>;
|
|
8
|
+
hd?: EncoderProps;
|
|
9
|
+
sd?: EncoderProps;
|
|
10
|
+
flip?: boolean | Signal<boolean>;
|
|
11
|
+
};
|
|
12
|
+
export declare class Root {
|
|
13
|
+
#private;
|
|
14
|
+
static readonly TRACK_HD = "video/hd";
|
|
15
|
+
static readonly TRACK_SD = "video/sd";
|
|
16
|
+
static readonly PRIORITY: 60;
|
|
17
|
+
source: Signal<Source | undefined>;
|
|
18
|
+
hd: Encoder;
|
|
19
|
+
sd: Encoder;
|
|
20
|
+
frame: Signal<VideoFrame | undefined>;
|
|
21
|
+
catalog: Signal<{
|
|
22
|
+
renditions: {
|
|
23
|
+
[k: string]: {
|
|
24
|
+
codec: string;
|
|
25
|
+
container: {
|
|
26
|
+
kind: "legacy";
|
|
27
|
+
} | {
|
|
28
|
+
kind: "cmaf";
|
|
29
|
+
timescale: number & import("zod").$brand<"u53">;
|
|
30
|
+
trackId: number & import("zod").$brand<"u53">;
|
|
31
|
+
};
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
codedWidth?: (number & import("zod").$brand<"u53">) | undefined;
|
|
34
|
+
codedHeight?: (number & import("zod").$brand<"u53">) | undefined;
|
|
35
|
+
displayAspectWidth?: (number & import("zod").$brand<"u53">) | undefined;
|
|
36
|
+
displayAspectHeight?: (number & import("zod").$brand<"u53">) | undefined;
|
|
37
|
+
framerate?: number | undefined;
|
|
38
|
+
bitrate?: (number & import("zod").$brand<"u53">) | undefined;
|
|
39
|
+
optimizeForLatency?: boolean | undefined;
|
|
40
|
+
jitter?: (number & import("zod").$brand<"u53">) | undefined;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
display: {
|
|
44
|
+
width: number & import("zod").$brand<"u53">;
|
|
45
|
+
height: number & import("zod").$brand<"u53">;
|
|
46
|
+
} | undefined;
|
|
47
|
+
rotation: undefined;
|
|
48
|
+
flip: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
renditions: Record<string, {
|
|
51
|
+
codec: string;
|
|
52
|
+
container: {
|
|
53
|
+
kind: "legacy";
|
|
54
|
+
} | {
|
|
55
|
+
kind: "cmaf";
|
|
56
|
+
timescale: number & import("zod").$brand<"u53">;
|
|
57
|
+
trackId: number & import("zod").$brand<"u53">;
|
|
58
|
+
};
|
|
59
|
+
description?: string | undefined;
|
|
60
|
+
codedWidth?: (number & import("zod").$brand<"u53">) | undefined;
|
|
61
|
+
codedHeight?: (number & import("zod").$brand<"u53">) | undefined;
|
|
62
|
+
displayAspectWidth?: (number & import("zod").$brand<"u53">) | undefined;
|
|
63
|
+
displayAspectHeight?: (number & import("zod").$brand<"u53">) | undefined;
|
|
64
|
+
framerate?: number | undefined;
|
|
65
|
+
bitrate?: (number & import("zod").$brand<"u53">) | undefined;
|
|
66
|
+
optimizeForLatency?: boolean | undefined;
|
|
67
|
+
jitter?: (number & import("zod").$brand<"u53">) | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
display?: {
|
|
70
|
+
width: number & import("zod").$brand<"u53">;
|
|
71
|
+
height: number & import("zod").$brand<"u53">;
|
|
72
|
+
} | undefined;
|
|
73
|
+
rotation?: number | undefined;
|
|
74
|
+
flip?: boolean | undefined;
|
|
75
|
+
} | undefined>;
|
|
76
|
+
display: Signal<{
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
} | undefined>;
|
|
80
|
+
flip: Signal<boolean>;
|
|
81
|
+
signals: Effect;
|
|
82
|
+
constructor(props?: Props);
|
|
83
|
+
close(): void;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/video/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,qBAAa,IAAI;;IAChB,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAAc;IACtC,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAAc;IACtC,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAA0B;IAElD,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IAEZ,KAAK,iCAAiD;IAEtD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAoD;IAC3D,OAAO;eAAuB,MAAM;gBAAU,MAAM;mBAA2B;IAC/E,IAAI,kBAA8B;IAElC,OAAO,SAAgB;gBAEX,KAAK,CAAC,EAAE,KAAK;IAsEzB,KAAK;CAUL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../src/video/polyfill.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,CA2D7E"}
|
package/video/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Source = StreamTrack;
|
|
2
|
+
export interface StreamTrack extends MediaStreamTrack {
|
|
3
|
+
kind: "video";
|
|
4
|
+
clone(): StreamTrack;
|
|
5
|
+
getSettings(): TrackSettings;
|
|
6
|
+
}
|
|
7
|
+
export interface TrackSettings {
|
|
8
|
+
deviceId: string;
|
|
9
|
+
groupId: string;
|
|
10
|
+
aspectRatio: number;
|
|
11
|
+
facingMode: "user" | "environment" | "left" | "right";
|
|
12
|
+
frameRate?: number;
|
|
13
|
+
height: number;
|
|
14
|
+
resizeMode: "none" | "crop-and-scale";
|
|
15
|
+
width: number;
|
|
16
|
+
}
|
|
17
|
+
export type Constraints = Omit<MediaTrackConstraints, "autoGainControl" | "channelCount" | "echoCancellation" | "noiseSuppression" | "sampleRate" | "sampleSize"> & {
|
|
18
|
+
resizeMode?: "none" | "crop-and-scale";
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/video/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAGjC,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACpD,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,IAAI,WAAW,CAAC;IACrB,WAAW,IAAI,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAC7B,qBAAqB,EACrB,iBAAiB,GAAG,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,YAAY,GAAG,YAAY,CAC1G,GAAG;IAEH,UAAU,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACvC,CAAC"}
|