@hewel/zgui-cli 0.0.0-stage → 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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.mjs","names":["createRoot","merge","append","flush","flush","effect","createSignal","createMemo","createEffect","effect","createRenderEffect","createMemo","createComponent","counter","effect","memo","flush","createComponent","solidFlush","solidFlush","sheet","SIZE_CLASSES","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","sheet","partSheet","groupSheet","sheet","partSheet","sheet","sheet","sheet","sheet","sheet","sheet","menuSheet","menubarSheet","sheet","sheet","sheet","treeSheet","<ThemeProvider scheme=\"dark\">\n <box class={styles.shell} testId=\"inspector-shell\">\n <box class={styles.toolbar} testId=\"inspector-toolbar\">\n <box class={styles.toolbarGroup}>\n <text class={styles.title} testId=\"inspector-title\">\n zgui-js Inspector\n </text>\n <Badge variant={pickerActive() ? \"default\" : \"secondary\"} testId=\"inspector-status\">\n {status()}\n </Badge>\n </box>\n <box class={styles.toolbarGroup}>\n <Button\n size=\"sm\"\n variant={pickerActive() ? \"default\" : \"outline\"}\n testId=\"inspector-pick-toggle\"\n onClick={togglePicker}\n >\n {pickerActive() ? \"Cancel Pick\" : \"Pick Element\"}\n </Button>\n <Button\n size=\"sm\"\n variant=\"secondary\"\n testId=\"inspector-refresh\"\n disabled={busy()}\n onClick={() => refreshSnapshot()}\n >\n Refresh\n </Button>\n </box>\n </box>\n\n <Show when={errorMessage()}>\n {message => (\n <box class={styles.errorBanner} testId=\"inspector-error\">\n <text>{message()}</text>\n </box>\n )}\n </Show>\n\n <SplitPane class={styles.workspace} direction=\"horizontal\" defaultSizes={[44, 56]}>\n <SplitPanePanel minSize={24}>\n <box class={styles.pane} testId=\"inspector-tree-pane\">\n <box class={styles.paneHeader}>\n <text class={styles.sectionTitle}>NATIVE TREE</text>\n <text class={styles.muted} testId=\"inspector-node-count\">\n {`${treeModel().byId.size} nodes`}\n </text>\n </box>\n <scroll class={styles.scrollArea}>\n <TreeView\n testId=\"inspector-tree\"\n items={treeModel().items}\n selectedId={selectedId()}\n expandedIds={expandedIds()}\n onExpandedChange={ids => setExpandedIds(ids)}\n onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}\n emptyText=\"No surfaces captured\"\n />\n </scroll>\n </box>\n </SplitPanePanel>\n\n <SplitPaneHandle testId=\"inspector-divider\" withHandle />\n\n <SplitPanePanel minSize={30}>\n <scroll class={styles.scrollArea}>\n <box class={styles.pane} testId=\"inspector-details-pane\">\n <text class={styles.sectionTitle}>SELECTED NODE</text>\n <Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>\n\n <Separator />\n\n <text class={styles.sectionTitle}>FRAME TIMINGS &amp; RESOURCES</text>\n <box class={styles.card} testId=\"inspector-profiler-card\">\n <Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>\n <box class={styles.row}>\n <text class={styles.muted}>Generation / Live nodes</text>\n <text class={styles.mono} testId=\"inspector-session-stats\">\n {`gen ${snapshot()?.session?.generation ?? 0} | ${snapshot()?.session?.resources?.nodes ?? 0} nodes`}\n </text>\n </box>\n </box>\n </box>\n </scroll>\n </SplitPanePanel>\n </SplitPane>\n </box>\n </ThemeProvider>","scheme=\"dark\"","testId=\"inspector-shell\"","testId=\"inspector-toolbar\"","testId=\"inspector-title\"","testId=\"inspector-status\"","size=\"sm\"","testId=\"inspector-pick-toggle\"","onClick={togglePicker}","variant=\"secondary\"","testId=\"inspector-refresh\"","onClick={() => refreshSnapshot()}","<Button\n size=\"sm\"\n variant=\"secondary\"\n testId=\"inspector-refresh\"\n disabled={busy()}\n onClick={() => refreshSnapshot()}\n >\n Refresh\n </Button>","<Show when={errorMessage()}>\n {message => (\n <box class={styles.errorBanner} testId=\"inspector-error\">\n <text>{message()}</text>\n </box>\n )}\n </Show>","testId=\"inspector-error\"","direction=\"horizontal\"","defaultSizes={[44, 56]}","<SplitPanePanel minSize={24}>\n <box class={styles.pane} testId=\"inspector-tree-pane\">\n <box class={styles.paneHeader}>\n <text class={styles.sectionTitle}>NATIVE TREE</text>\n <text class={styles.muted} testId=\"inspector-node-count\">\n {`${treeModel().byId.size} nodes`}\n </text>\n </box>\n <scroll class={styles.scrollArea}>\n <TreeView\n testId=\"inspector-tree\"\n items={treeModel().items}\n selectedId={selectedId()}\n expandedIds={expandedIds()}\n onExpandedChange={ids => setExpandedIds(ids)}\n onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}\n emptyText=\"No surfaces captured\"\n />\n </scroll>\n </box>\n </SplitPanePanel>","minSize={24}","testId=\"inspector-tree-pane\"","testId=\"inspector-node-count\"","testId=\"inspector-tree\"","onExpandedChange={ids => setExpandedIds(ids)}","onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}","emptyText=\"No surfaces captured\"","class={styles.paneHeader}","class={styles.sectionTitle}","class={styles.muted}","class={styles.scrollArea}","<box class={styles.pane} testId=\"inspector-tree-pane\">\n <box class={styles.paneHeader}>\n <text class={styles.sectionTitle}>NATIVE TREE</text>\n <text class={styles.muted} testId=\"inspector-node-count\">\n {`${treeModel().byId.size} nodes`}\n </text>\n </box>\n <scroll class={styles.scrollArea}>\n <TreeView\n testId=\"inspector-tree\"\n items={treeModel().items}\n selectedId={selectedId()}\n expandedIds={expandedIds()}\n onExpandedChange={ids => setExpandedIds(ids)}\n onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}\n emptyText=\"No surfaces captured\"\n />\n </scroll>\n </box>","<SplitPaneHandle testId=\"inspector-divider\" withHandle />","testId=\"inspector-divider\"","<SplitPanePanel minSize={30}>\n <scroll class={styles.scrollArea}>\n <box class={styles.pane} testId=\"inspector-details-pane\">\n <text class={styles.sectionTitle}>SELECTED NODE</text>\n <Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>\n\n <Separator />\n\n <text class={styles.sectionTitle}>FRAME TIMINGS &amp; RESOURCES</text>\n <box class={styles.card} testId=\"inspector-profiler-card\">\n <Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>\n <box class={styles.row}>\n <text class={styles.muted}>Generation / Live nodes</text>\n <text class={styles.mono} testId=\"inspector-session-stats\">\n {`gen ${snapshot()?.session?.generation ?? 0} | ${snapshot()?.session?.resources?.nodes ?? 0} nodes`}\n </text>\n </box>\n </box>\n </box>\n </scroll>\n </SplitPanePanel>","minSize={30}","testId=\"inspector-details-pane\"","testId=\"inspector-profiler-card\"","testId=\"inspector-session-stats\"","<box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>","<Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>","testId=\"inspector-node-card\"","testId=\"inspector-node-kind\"","<Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>","<Badge variant=\"secondary\">{role()}</Badge>","<Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>","testId=\"inspector-node-source\"","class={styles.source}","testId=\"inspector-node-classes\"","class={styles.mono}","<box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>","testId=\"inspector-node-redacted\"","<text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>","<Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>","testId=\"inspector-box-model\"","class={styles.row}","<Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>","testId=\"inspector-computed-style\"","<box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>","<Separator />","<text class={styles.muted}>No frame phase timings recorded.</text>","<Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>","testId=\"inspector-frame-phases\"","testId=\"inspector-frame-total\"","class={styles.pane}","class={styles.card}","<scroll class={styles.scrollArea}>\n <box class={styles.pane} testId=\"inspector-details-pane\">\n <text class={styles.sectionTitle}>SELECTED NODE</text>\n <Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>\n\n <Separator />\n\n <text class={styles.sectionTitle}>FRAME TIMINGS &amp; RESOURCES</text>\n <box class={styles.card} testId=\"inspector-profiler-card\">\n <Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>\n <box class={styles.row}>\n <text class={styles.muted}>Generation / Live nodes</text>\n <text class={styles.mono} testId=\"inspector-session-stats\">\n {`gen ${snapshot()?.session?.generation ?? 0} | ${snapshot()?.session?.resources?.nodes ?? 0} nodes`}\n </text>\n </box>\n </box>\n </box>\n </scroll>","class={styles.toolbar}","class={styles.toolbarGroup}","class={styles.title}","<box class={styles.shell} testId=\"inspector-shell\">\n <box class={styles.toolbar} testId=\"inspector-toolbar\">\n <box class={styles.toolbarGroup}>\n <text class={styles.title} testId=\"inspector-title\">\n zgui-js Inspector\n </text>\n <Badge variant={pickerActive() ? \"default\" : \"secondary\"} testId=\"inspector-status\">\n {status()}\n </Badge>\n </box>\n <box class={styles.toolbarGroup}>\n <Button\n size=\"sm\"\n variant={pickerActive() ? \"default\" : \"outline\"}\n testId=\"inspector-pick-toggle\"\n onClick={togglePicker}\n >\n {pickerActive() ? \"Cancel Pick\" : \"Pick Element\"}\n </Button>\n <Button\n size=\"sm\"\n variant=\"secondary\"\n testId=\"inspector-refresh\"\n disabled={busy()}\n onClick={() => refreshSnapshot()}\n >\n Refresh\n </Button>\n </box>\n </box>\n\n <Show when={errorMessage()}>\n {message => (\n <box class={styles.errorBanner} testId=\"inspector-error\">\n <text>{message()}</text>\n </box>\n )}\n </Show>\n\n <SplitPane class={styles.workspace} direction=\"horizontal\" defaultSizes={[44, 56]}>\n <SplitPanePanel minSize={24}>\n <box class={styles.pane} testId=\"inspector-tree-pane\">\n <box class={styles.paneHeader}>\n <text class={styles.sectionTitle}>NATIVE TREE</text>\n <text class={styles.muted} testId=\"inspector-node-count\">\n {`${treeModel().byId.size} nodes`}\n </text>\n </box>\n <scroll class={styles.scrollArea}>\n <TreeView\n testId=\"inspector-tree\"\n items={treeModel().items}\n selectedId={selectedId()}\n expandedIds={expandedIds()}\n onExpandedChange={ids => setExpandedIds(ids)}\n onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}\n emptyText=\"No surfaces captured\"\n />\n </scroll>\n </box>\n </SplitPanePanel>\n\n <SplitPaneHandle testId=\"inspector-divider\" withHandle />\n\n <SplitPanePanel minSize={30}>\n <scroll class={styles.scrollArea}>\n <box class={styles.pane} testId=\"inspector-details-pane\">\n <text class={styles.sectionTitle}>SELECTED NODE</text>\n <Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>\n\n <Separator />\n\n <text class={styles.sectionTitle}>FRAME TIMINGS &amp; RESOURCES</text>\n <box class={styles.card} testId=\"inspector-profiler-card\">\n <Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>\n <box class={styles.row}>\n <text class={styles.muted}>Generation / Live nodes</text>\n <text class={styles.mono} testId=\"inspector-session-stats\">\n {`gen ${snapshot()?.session?.generation ?? 0} | ${snapshot()?.session?.resources?.nodes ?? 0} nodes`}\n </text>\n </box>\n </box>\n </box>\n </scroll>\n </SplitPanePanel>\n </SplitPane>\n </box>","<InspectorApp />","_$createComponent","_$createElement","_$insertNode","_$createTextNode","_$insert","_$effect","styles","_$setProp"],"sources":["packages/@solidjs/signals/dist/prod/core/error.js","packages/@solidjs/signals/dist/prod/core/constants.js","packages/@solidjs/signals/dist/prod/core/owner.js","packages/@solidjs/signals/dist/prod/core/scheduler.js","packages/@solidjs/signals/dist/prod/core/heap.js","packages/@solidjs/signals/dist/prod/core/graph.js","packages/@solidjs/signals/dist/prod/core/async.js","packages/@solidjs/signals/dist/prod/core/core.js","packages/@solidjs/signals/dist/prod/core/identities.js","packages/@solidjs/signals/dist/prod/core/context.js","packages/@solidjs/signals/dist/prod/core/effect.js","packages/@solidjs/signals/dist/prod/store/types.js","packages/@solidjs/signals/dist/prod/signals.js","packages/@solidjs/signals/dist/prod/map.js","packages/@solidjs/signals/dist/prod/flatten.js","packages/@solidjs/signals/dist/prod/store/utils.js","packages/solid-js/dist/solid.js","packages/@solidjs/universal/dist/universal.js","packages/@hewel/zgui/dist/host.js","packages/@hewel/zgui/dist/tree-order.js","packages/@hewel/zgui/dist/renderer/index.js","packages/@hewel/zgui/dist/render-app.js","packages/@hewel/zgui/dist/theme-sync.js","packages/@hewel/zgui/dist/nodes.js","packages/@hewel/zgui/dist/spring.js","packages/@hewel/zgui/dist/components/shared.js","packages/@hewel/zgui/dist/virtual-list.js","packages/@hewel/zgui/dist/components/generated/themes.js","packages/@hewel/zgui/dist/components/theme.js","packages/@hewel/zgui/dist/components/generated/IconStyle.js","packages/@hewel/zgui/dist/components/generated/icons.js","packages/@hewel/zgui/dist/components/icons.js","packages/@hewel/zgui/dist/components/generated/ButtonStyle.js","packages/@hewel/zgui/dist/components/button.js","packages/@hewel/zgui/dist/components/generated/BadgeStyle.js","packages/@hewel/zgui/dist/components/badge.js","packages/@hewel/zgui/dist/components/generated/CardStyle.js","packages/@hewel/zgui/dist/components/card.js","packages/@hewel/zgui/dist/components/generated/SeparatorStyle.js","packages/@hewel/zgui/dist/components/separator.js","packages/@hewel/zgui/dist/components/generated/KbdStyle.js","packages/@hewel/zgui/dist/components/kbd.js","packages/@hewel/zgui/dist/components/generated/ButtonGroupStyle.js","packages/@hewel/zgui/dist/components/button-group.js","packages/@hewel/zgui/dist/components/state.js","packages/@hewel/zgui/dist/components/generated/AlertStyle.js","packages/@hewel/zgui/dist/components/alert.js","packages/@hewel/zgui/dist/components/generated/AvatarStyle.js","packages/@hewel/zgui/dist/components/avatar.js","packages/@hewel/zgui/dist/components/generated/EmptyStyle.js","packages/@hewel/zgui/dist/components/empty.js","packages/@hewel/zgui/dist/components/generated/ItemPartStyle.js","packages/@hewel/zgui/dist/components/generated/ItemGroupStyle.js","packages/@hewel/zgui/dist/components/item.js","packages/@hewel/zgui/dist/components/generated/InputGroupPartStyle.js","packages/@hewel/zgui/dist/components/input-group.js","packages/@hewel/zgui/dist/primitives/radio.js","packages/@hewel/zgui/dist/components/groups.js","packages/@hewel/zgui/dist/components/tabs.js","packages/@hewel/zgui/dist/components/collapsible.js","packages/@hewel/zgui/dist/components/accordion.js","packages/@hewel/zgui/dist/primitives/overlay.js","packages/@hewel/zgui/dist/components/overlay.js","packages/@hewel/zgui/dist/components/generated/DialogStyle.js","packages/@hewel/zgui/dist/components/dialog.js","packages/@hewel/zgui/dist/components/generated/PopoverStyle.js","packages/@hewel/zgui/dist/components/popover.js","packages/@hewel/zgui/dist/components/hover.js","packages/@hewel/zgui/dist/components/tooltip.js","packages/@hewel/zgui/dist/components/generated/MenuStyle.js","packages/@hewel/zgui/dist/primitives/menu.js","packages/@hewel/zgui/dist/components/generated/MenubarStyle.js","packages/@hewel/zgui/dist/components/menu-core.js","packages/@hewel/zgui/dist/components/menubar.js","packages/@hewel/zgui/dist/components/generated/ResizableStyle.js","packages/@hewel/zgui/dist/components/split-pane.js","packages/@hewel/zgui/dist/components/toast.js","packages/@hewel/zgui/dist/components/generated/TreeViewStyle.js","packages/@hewel/zgui/dist/components/tree-view.js","packages/@hewel/zgui/dist/components/command-palette.js","packages/@hewel/zgui-services/dist/index.js","app/src/Inspector.module.css","app/src/main.tsx"],"sourcesContent":["/**\n * Thrown by a tracked read whose value is currently pending (an async memo /\n * `createSignal(asyncFn)` / projection / store derivation that hasn't settled\n * yet). Surfacing through the reactive graph is what suspends the consumer\n * scope — the nearest enclosing `<Loading>` boundary catches the throw and\n * renders its fallback until the source resolves.\n *\n * App code rarely catches this directly; `<Loading>` is the canonical\n * handler. The error type is exposed for advanced cases — e.g. interop layers\n * that bridge Solid's pending-throw protocol to a different async strategy,\n * or tests that want to assert on the suspension shape.\n *\n * @example\n * ```ts\n * // Advanced: distinguish \"not ready yet\" from a real error in custom\n * // boundary plumbing. App code should rely on `<Loading>` / `<Errored>`.\n * try {\n * const value = readReactiveSource();\n * } catch (err) {\n * if (err instanceof NotReadyError) throw err; // re-throw to suspend\n * reportError(err);\n * }\n * ```\n */\nclass NotReadyError extends Error {\n constructor(r) {\n // Control-flow throw: it happens on every read of a pending source, so in\n // production skip V8's eager stack capture (proportional to stack depth —\n // real cost under SSR) by zeroing the V8-specific stackTraceLimit around\n // super(). Dev keeps the stack for debuggability; non-V8 engines (no\n // stackTraceLimit) take the plain path.\n const o = Error;\n const t = o.stackTraceLimit;\n if (t) o.stackTraceLimit = 0;\n super();\n if (t) o.stackTraceLimit = t;\n this.source = r;\n }\n}\n\nclass StatusError extends Error {\n constructor(r, o) {\n // Best-effort message: formatting must never replace the original (#4112).\n try {\n var t = String(o instanceof Error ? o.message : o);\n } catch {}\n super(t, {\n cause: o\n });\n this.source = r;\n }\n}\n\n/** Return the user's error from an internal status wrapper. */ function unwrapStatusError(r) {\n return r instanceof StatusError ? r.cause : r;\n}\n\n/**\n * Rejection value of `until(fn, { timeout })` when the predicate does not turn\n * truthy within the window. Inside an `action()`, the rejection is thrown back\n * in at the `yield` point — catchable there, or the action fails and its\n * optimistic state reverts.\n */ class TimeoutError extends Error {\n constructor(r = \"Timed out waiting for condition\") {\n super(r);\n this.name = \"TimeoutError\";\n }\n}\n\nclass NoOwnerError extends Error {\n constructor() {\n super(\"\");\n }\n}\n\nclass ContextNotFoundError extends Error {\n constructor() {\n super(\"\");\n }\n}\n\nexport { ContextNotFoundError, NoOwnerError, NotReadyError, StatusError, TimeoutError, unwrapStatusError };","const REACTIVE_NONE = 0;\n\nconst REACTIVE_CHECK = 1 << 0;\n\nconst REACTIVE_DIRTY = 1 << 1;\n\nconst REACTIVE_RECOMPUTING_DEPS = 1 << 2;\n\nconst REACTIVE_IN_HEAP = 1 << 3;\n\nconst REACTIVE_IN_HEAP_HEIGHT = 1 << 4;\n\n/** L2 — the node sits on its owner's parked frame (`_x._pendingFirstChild`):\n * it is the displayed frame until the owner's commit disposes it. Set by\n * `markDisposal` over the parked subtree; carried through every per-pass\n * flag wipe (#3543). Scheduling reads it once, at the heap pop: a zombie's\n * recompute is deferred past the seam (`deferZombie`). */ const REACTIVE_ZOMBIE = 1 << 5;\n\nconst REACTIVE_DISPOSED = 1 << 6;\n\n/** L2 — this pass read the future (a tracked read of a CONFIG_HELD node).\n * Lives for the pass only: set by `read`, consumed by `recompute`'s publish\n * (a first pass that read the future is born held, F-7), wiped with the\n * pass's other per-pass bits. */ const REACTIVE_JOINED = 1 << 7;\n\nconst REACTIVE_SNAPSHOT_STALE = 1 << 8;\n\nconst REACTIVE_LAZY = 1 << 9;\n\nconst REACTIVE_MANUAL_WRITE = 1 << 10;\n\n/** L2, rule 3 — the node's LAST pass was a render effect's read of the\n * future as committed (`frameRead`): the frame shows the committed world\n * beside a future it also derives from, and re-derives at the landing.\n * Survives its own pass's wipe; the next pass's wipe clears it (a pass that\n * re-derived the frame — in the future, or without the held read — owes the\n * landing nothing). The landing consumes it (the transaction's `_reruns`). */ const REACTIVE_FRAME_READ = 1 << 11;\n\n/**\n * A dependency write landed while this subscriber was mid-recompute — a\n * nested pull committed beneath one of its reads (#3037). The heap refuses\n * RECOMPUTING nodes, so recompute's tail consumes this latch and reschedules:\n * values the pass read before the nested commit are stale. Only set for\n * links validated this pass (gen-current): a write to an untouched link is\n * either re-read later in the pass (fresh) or trimmed with it (not a dep).\n */ const REACTIVE_MISSED_WAKE = 1 << 12;\n\n/** A `refresh()` asked this node to re-ask its question (F-9, D-23):\n * consumed by the next pass, which — going pending — classifies its flight\n * quiet (`_x._reask`). */ const REACTIVE_REASK = 1 << 13;\n\n/** The pass was served a node's ambient staging — written this flush, not\n * held. If the flush parks, the pass is the frame's with it (the same sync\n * frame as the async): a verdict read cannot break it out. Per pass. */ const REACTIVE_STAGED_READ = 1 << 14;\n\n/** The pass entered a verdict window (`isPending`/`latest`). Per pass: a\n * pass that did not keeps CONFIG_VERDICT no longer — the frame-reader\n * posture lasts exactly as long as the probing does. */ const REACTIVE_PROBED = 1 << 15;\n\n/** Lanes — the node (a lane's member) was dirtied by the lane's own\n * re-staging (a re-guess, lane work re-derived): its next pass is the\n * lane's from the start (`recompute`), not a stale reader's re-run by an\n * unrelated write (#3460). Consumed by the pass. */ const REACTIVE_LANE_DIRTY = 1 << 16;\n\n/** Lanes — the pass read a lane's value as lane work (`enterLane`): a\n * tracked derivation's read of displayed optimism, a verdict read routed\n * into the holder's verdict lane. A pass in a lane's seat that read none of\n * its world has left the lane (`recompute`'s tail). Per pass. */ const REACTIVE_LANE_READ = 1 << 17;\n\n/** Lanes — a render effect in the frame's seat was served the screen\n * for a lane's node (`laneRead`: a stale reader of a lane that has not\n * shown). Its pass computing exactly what it last applied has nothing to\n * run — an effect has no comparator, and the guess's notification is not a\n * change it can see. Per pass. */ const REACTIVE_SCREEN_READ = 1 << 18;\n\n/** A verdict reader whose probe was answered before the flush had a\n * transaction (verdict.ts `watchVerdict`): the seam re-runs it even if a\n * later read of the same pass routed it into a verdict lane — that was not\n * the probe's answer (lanes.ts). Per pass. */ const REACTIVE_PROBE_UNANSWERED = 1 << 19;\n\n/** The pass opened a verdict window of its own (`isPending`/`latest`) — not\n * only read a verdict memo (F-6, core.ts `read`). An async memo whose pass\n * did not is D-25's hold work while its flight is up (verdict.ts\n * `holdWork`). Per pass. */ const REACTIVE_WINDOW = 1 << 21;\n\n/** #4544: a render effect born into a hold read a settled verdict reader's\n * value this pass (core.ts `read`). Per pass: `recompute`'s tail keeps it as\n * CONFIG_AHEAD. */ const REACTIVE_AHEAD = 1 << 20;\n\n/** An observation-lifecycle node found unobserved by a settle (#2934) while\n * a pass of it was already queued — a source's landing re-enqueued the\n * `_blocked` reader it walks (`settlePendingSource`). The release waits for\n * that pass: a memo nobody read has still produced what the flushes it\n * missed gave it (D-22, #4474), so the queued pass runs, then `recompute`'s\n * tail releases the node. Survives the head wipe; the tail consumes it. */ const REACTIVE_RELEASE_AFTER = 1 << 22;\n\n/** A computed its own owner reads (a memo reading the memo it created): the\n * owner sits below it (heights put owners first), so a wake of it wakes the\n * owner too — the owner's pass re-creates it and is what its readers see. */ const REACTIVE_OWNER_READS = 1 << 23;\n\n/** The windows the pass opened, by kind, from this bit up (`window <<\n * WINDOW_KINDS`): 1 `isPending`, 2 `latest`. Per pass (bits 24 and 25;\n * nothing sits above them). #4966: a first plain read that only the pass's\n * own `isPending` window gates is not a mount (core.ts `stagedScreen`). */ const WINDOW_KINDS = 24;\n\n// Static configuration bits packed into Owner/Computed/Signal _config.\nconst CONFIG_OWNED_WRITE = 1 << 0;\n\nconst CONFIG_NO_SNAPSHOT = 1 << 1;\n\nconst CONFIG_TRANSPARENT = 1 << 2;\n\nconst CONFIG_IN_SNAPSHOT_SCOPE = 1 << 3;\n\nconst CONFIG_CHILDREN_FORBIDDEN = 1 << 4;\n\nconst CONFIG_AUTO_DISPOSE = 1 << 5;\n\nconst CONFIG_SYNC = 1 << 6;\n\n// CARVE 3: REACTIVE_ZOMBIE, CONFIG_AUTHORITATIVE_READ, CONFIG_DIRECT_COMMIT,\n// CONFIG_HELD_CHILDREN, CONFIG_INPUTS_PUBLISHED and CONFIG_ADOPTED_UNFLUSHED\n// (transaction holds, zombies, until()'s authoritative view) went with the\n// transactions.\n// L2 (step 2): four bits, all maintained by the node's commit.\n/** The node has a pass awaiting commit: its live children (and `_disposal`)\n * are that pass's and were never shown — a re-pass tears them down on the\n * spot, while the frame parked on `_x._pendingFirstChild` keeps waiting for\n * the commit. Set by `recompute` when it queues the node. */ const CONFIG_STAGED = 1 << 7;\n\n/** The node's staged state is in the future: the flush that staged it\n * parked. A write to it, a tracked read of it by a derivation, or a pass\n * over a derivation holding it joins the future (the flush parks). Render\n * effects are the frame, not derivations (rule 3): reading it outside a\n * parking flush they see the committed value and hold nothing, and are\n * re-derived at the landing. Set at the park seam on every staged node. */ const CONFIG_HELD = 1 << 8;\n\n/** A member of the uncommitted frame a held pass built (ruling A): set at\n * the park seam on every computed under a staged node (`holdFrame`). Never\n * shown, it has no screen: its reads are its transaction's, whichever flush\n * runs it (`bornInto`, #4010). Cleared by its commit. */ const CONFIG_HELD_FRAME = 1 << 20;\n\n/** F-1 (#3305): a commit published this flight's inputs\n * beneath it — the node was pending, nothing staged, when it committed — so\n * its committed value is torn against the visible frame. A render effect\n * revealing it cannot be a stale reader: it observes the flight (pends,\n * holds) instead of showing the pre-flight value. Outlives the flight that\n * earned it for as long as the node stays pending, and no longer: the\n * commit that lands a value clears it. */ const CONFIG_INPUTS_PUBLISHED = 1 << 10;\n\n/** Lanes — the node has a lane's value (`_x._lane`): a written guess\n * (CONFIG_GUESS) or a lane pass's derivation of one. Its lane is\n * `_x._transaction`. The gate to the lane arm of `read`; `_value` stays the\n * committed truth and `_pendingValue` a transaction's staging throughout —\n * a value's world is where it lives, never a bit. */ const CONFIG_OVERRIDE = 1 << 11;\n\n/** A store slot node (`slotSignal`): a leaf, presence, container or deep\n * witness of a store target. One literal, no `_x` at birth; the last-one-out\n * sweep dispatches it to the store's shared release hook (graph.ts) instead\n * of a per-node `_unobserved` closure. */ const CONFIG_SLOT_NODE = 1 << 12;\n\n/** A store slot node whose staging is a USER setter's proposal, not its\n * derive's derivation (D-8's discriminator for derived stores — the\n * leaf twin of REACTIVE_MANUAL_WRITE). Set by the user setter, cleared by\n * the derive's own write to the key. */ const CONFIG_MANUAL_WRITE = 1 << 18;\n\n/** D-41: the staged value in `_pendingValue` is an error — an\n * answer of the held frame, published at its landing like a value. */ const CONFIG_STAGED_ERROR = 1 << 21;\n\n/** Lanes — the node carries a written guess (`optimisticWrite`): its own\n * source recomputing it, or a plain write landing on it, is the truth\n * (`supersede`). A lane's derived staging is not. */ const CONFIG_GUESS = 1 << 13;\n\n/** The node's pass read a verdict (`isPending`/`latest`): a dependency going\n * pending is a question for its next pass — the verdict changed — so the\n * propagation re-derives it instead of marking it pending (as a kept-tail\n * link does, D-10). Set at the window, never cleared: a reader that stopped\n * asking re-derives once and goes pending through its own read. The same\n * bit as REACTIVE_PROBED: a pass's probe (or a read of a verdict memo,\n * core.ts `read`) carries into the config at its end without a shift. */ const CONFIG_VERDICT = 1 << 15;\n\n/** A dependency's status is a question for this node's pass, not a fact\n * about its current one: the propagation re-derives it instead of marking\n * it, for errors as for pending (as CONFIG_VERDICT). A boundary's output\n * (show the content, or the fallback) and its `on` node (boundaries.ts); a\n * promise over an expression (`resolve`/`until`, signals.ts: the pass reads\n * the error and rejects, or re-asks a pending source). */ const CONFIG_REDERIVE = 1 << 14;\n\n/** An answered `createDeferred` node (deferred.ts): held because a\n * downstream hold staged its landing, its re-pass is a lagging question,\n * not an answer, and joins no transaction (D-40). */ const CONFIG_LAGS = 1 << 19;\n\n/** The reader wants the truth, not the lane's guess (`until`, signals.ts):\n * a read of displayed optimism serves the base the guess covers, makes the\n * pass no lane's, and the truth landing wakes it even when it confirms the\n * guess (the one case ordinary subscribers are not told, F-11). */ const CONFIG_AUTHORITATIVE = 1 << 17;\n\n// Presence bits (stage-3 hot-path monomorphism, DESIGN-PATCH-CHANNEL §11b):\n// optional per-node slots (_overrideValue, _pendingSignal/_latestValueComputed,\n// _snapshotValue, _optimisticLane) are NOT part of every node's hidden class —\n// reading a missing property defeats V8's inline caches on the hottest write/\n// notify loops. These bits live on the always-present `_config` so hot paths\n// pay one monomorphic masked read and only touch the optional field when its\n// installer flagged it. Bits are STICKY (\"may be set\") — the guarded field\n// read remains authoritative.\nconst CONFIG_HAS_SNAPSHOT = 1 << 9;\n\n/** Fresh-pull reader (awaitable `refresh()`'s waiter effect): a read of a\n * dirty source recomputes it inline even when the height gate defers to the\n * flush. Closes the same-flush ordering race where a waiter created\n * alongside a refresh() mark read the PRE-re-ask value as settled and\n * delivered stale; with the pull, the waiter either parks on the re-ask's\n * pending window (async — woken by the settle walk, which runs on every\n * landing including equal-value ones) or serves its sync answer. resolve()\n * deliberately keeps that race — its contract is \"first settled value\"\n * (#2930), not \"next quiescent state\". */ const CONFIG_FRESH_READ = 1 << 16;\n\n/** F-10: the node was written inside a recompute that ran OUTSIDE a flush\n * (a creation-time compute — boundary machinery, a mapArray's first run). Such\n * a write is promoted at that recompute's end: readers in the same block see\n * it. Cleared when the next flush begins; set only on that rare path. */ const CONFIG_PROMOTED = 1 << 22;\n\n/** The frame (rule 3, D-3): a render effect (set at creation, as\n * `EFFECT_RENDER << 23` — keep the two in step), and a boundary's tree and\n * output (boundaries.ts) — structure between the content and the render\n * effect that shows it, not a user derivation of the content. Outside a\n * hold's own flush it reads that hold's values as committed and is\n * re-derived at its landing, and a re-pass of it publishes mainline: it\n * joins nothing, so two mounts under one boundary made in separate flushes\n * keep their holds apart (D-4, S-5 rows 1′–3′, #4283). */ const CONFIG_FRAME = 1 << 23;\n\n/** A render effect created by a pass that probed (`isPending`/`latest`) —\n * the mount a display-ahead `Show` opens (S-46, D-25). Stamped at its first\n * pass; its first read of a hold's staging or flight is born held, not a\n * D-3 leaf of the screen, and the verdict lane that opened it reveals with\n * the landing (lanes.ts `mountPending`). */ const CONFIG_MOUNT_AHEAD = 1 << 24;\n\n/** The node's last answering pass registered a flight: an async memo. Kept\n * by the verdict engine alone (verdict.ts `holdWork`), which reads it. */ const CONFIG_ASYNC = 1 << 29;\n\n/** #4544: the node's last pass opened a verdict window of its own\n * (`isPending`/`latest`) — REACTIVE_WINDOW, kept by `recompute`'s tail\n * beside CONFIG_VERDICT and renewed by every pass. One whose posture is only\n * inherited (it read a verdict memo) is the hold's work where it reads the\n * hold's own write (verdict.ts `holdStaging`). */ const CONFIG_OWN_PROBE = REACTIVE_WINDOW << 9;\n\n/** #4544 (F-6): the effect's last pass read a display-ahead value\n * (REACTIVE_AHEAD): what it went pending on does not hold its hold\n * (scheduler.ts `blockedBy`). The sign bit: tested by `&` only. */ const CONFIG_AHEAD = REACTIVE_AHEAD << 11;\n\nconst STATUS_NONE = 0;\n\nconst STATUS_PENDING = 1 << 0;\n\nconst STATUS_ERROR = 1 << 1;\n\nconst STATUS_UNINITIALIZED = 1 << 2;\n\n/** An error that answered a node's first read (no value has ever landed):\n * the error, not UNINITIALIZED, is its status while shown, but a re-ask\n * makes it uninitialized-pending again — it still has no value (#4244). */ const STATUS_NO_VALUE = 1 << 3;\n\n/** `catchHook`'s answer when the catcher is a boundary re-armed by\n * `on` (truthy, as any catch): what it collects is its own, not the hold's. */ const CAUGHT_REARMED = 2;\n\nconst EFFECT_RENDER = 1;\n\nconst EFFECT_USER = 2;\n\nconst EFFECT_TRACKED = 3;\n\nconst NOT_PENDING = {};\n\nconst NO_SNAPSHOT = {};\n\nconst SUPPORTS_PROXY = typeof Proxy === \"function\";\n\nconst defaultContext = {};\n\n/**\n * Brand symbol used by `Refreshable<T>` values (projection stores, async\n * memos) to expose their underlying computation to `refresh()`. Not part of\n * the user-facing API.\n *\n * @internal\n */ const $REFRESH = Symbol(\"refresh\");\n\nconst NewSet = Set;\n\n/** Dev: the strict-read label compiled dev DOM output reads an event handler expression under (#1742). */ const EVENT_HANDLER_READ = \"an event handler expression\";\n\nexport { $REFRESH, CAUGHT_REARMED, CONFIG_AHEAD, CONFIG_ASYNC, CONFIG_AUTHORITATIVE, CONFIG_AUTO_DISPOSE, CONFIG_CHILDREN_FORBIDDEN, CONFIG_FRAME, CONFIG_FRESH_READ, CONFIG_GUESS, CONFIG_HAS_SNAPSHOT, CONFIG_HELD, CONFIG_HELD_FRAME, CONFIG_INPUTS_PUBLISHED, CONFIG_IN_SNAPSHOT_SCOPE, CONFIG_LAGS, CONFIG_MANUAL_WRITE, CONFIG_MOUNT_AHEAD, CONFIG_NO_SNAPSHOT, CONFIG_OVERRIDE, CONFIG_OWNED_WRITE, CONFIG_OWN_PROBE, CONFIG_PROMOTED, CONFIG_REDERIVE, CONFIG_SLOT_NODE, CONFIG_STAGED, CONFIG_STAGED_ERROR, CONFIG_SYNC, CONFIG_TRANSPARENT, CONFIG_VERDICT, EFFECT_RENDER, EFFECT_TRACKED, EFFECT_USER, EVENT_HANDLER_READ, NOT_PENDING, NO_SNAPSHOT, NewSet, REACTIVE_AHEAD, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_DISPOSED, REACTIVE_FRAME_READ, REACTIVE_IN_HEAP, REACTIVE_IN_HEAP_HEIGHT, REACTIVE_JOINED, REACTIVE_LANE_DIRTY, REACTIVE_LANE_READ, REACTIVE_LAZY, REACTIVE_MANUAL_WRITE, REACTIVE_MISSED_WAKE, REACTIVE_NONE, REACTIVE_OWNER_READS, REACTIVE_PROBED, REACTIVE_PROBE_UNANSWERED, REACTIVE_REASK, REACTIVE_RECOMPUTING_DEPS, REACTIVE_RELEASE_AFTER, REACTIVE_SCREEN_READ, REACTIVE_SNAPSHOT_STALE, REACTIVE_STAGED_READ, REACTIVE_WINDOW, REACTIVE_ZOMBIE, STATUS_ERROR, STATUS_NONE, STATUS_NO_VALUE, STATUS_PENDING, STATUS_UNINITIALIZED, SUPPORTS_PROXY, WINDOW_KINDS, defaultContext };","import { defaultContext, CONFIG_TRANSPARENT, REACTIVE_NONE, REACTIVE_DISPOSED, CONFIG_AUTO_DISPOSE, STATUS_PENDING, REACTIVE_FRAME_READ, REACTIVE_ZOMBIE } from \"./constants.js\";\n\nimport { context, runWithOwner, tracking } from \"./core.js\";\n\nimport { clearInFlight } from \"./async.js\";\n\nimport { unobserved, clearDeps } from \"./graph.js\";\n\nimport { deleteFromHeap } from \"./heap.js\";\n\nimport { globalQueue, pendingNodes, schedule, dirtyQueue } from \"./scheduler.js\";\n\n// L2 (step 2): the parked frame. A pass parks the previous frame's children\n// and `_disposal` list on `_x._pendingFirstChild` / `_x._pendingDisposal`\n// (`parkChildren`, core.ts); they keep reacting until the node's commit\n// disposes them (`zombie` walk below) or the owner dies. `markDisposal` flags\n// the parked subtree REACTIVE_ZOMBIE: the splice guard and the reawaken path\n// key off it, and the heap defers a zombie's recompute past the seam (no\n// second heap — the deferral list in scheduler.ts).\nfunction markDisposal(e) {\n let n = e.pe;\n while (n) {\n n.R |= REACTIVE_ZOMBIE;\n markDisposal(n);\n n = n.Ge;\n }\n}\n\nfunction dispose(e) {\n // Direct disposal is death, not dormancy: strip the observation lifecycle\n // so a later read freezes at the last committed value instead of\n // reawakening the node (#3024). The teardown itself (heap removal — a node\n // left queued would be recomputed and resurrected by the next flush (#2983)\n // — dep unlinking, child disposal) is exactly unobserved()'s body; only\n // this flag distinguishes death from dormancy.\n e.l &= ~CONFIG_AUTO_DISPOSE;\n unobserved(e);\n}\n\n// The first error a cleanup threw, boxed so a thrown `undefined` still\n// counts. A throwing cleanup stops neither its siblings nor the rest of the\n// tree: every cleanup runs. The error is rethrown once the teardown is over:\n// by a root's dispose call outside a flush (`disposeRootSelf`), otherwise when\n// the flush ends (`flush`; `runCleanup` schedules one), so a flush is never\n// left half-applied. A halt drops it: the error that halted is the one\n// reported, and a stale one must not surface from a later, unrelated dispose.\nlet cleanupError;\n\n/** Runs a cleanup or `unobserved` hook; a throw is collected, not raised. @internal */ function runCleanup(e) {\n try {\n e();\n } catch (e) {\n cleanupError ||= [ e ];\n schedule();\n }\n}\n\n/** Rethrows the error `runCleanup` collected, once; `drop` discards it. @internal */ function rethrowCleanupError(e) {\n const n = cleanupError;\n cleanupError = undefined;\n if (n && !e) throw n[0];\n}\n\nfunction disposeChildren(e, n = false, r) {\n const t = e.R;\n if (t & REACTIVE_DISPOSED) return;\n // A parked frame dies with its owner (#3024): the commit that would retire\n // it never comes once the node is DISPOSED, so it drains here or its\n // cleanups never run and it stays subscribed, rerunning in a torn-down\n // tree (#3561). Death only (`self`): a re-pass leaves the frame reacting\n // until the commit.\n if (n) {\n if (!r && e.T !== null && (e.T.me !== null || e.T.Le !== null)) disposeChildren(e, false, true);\n e.R = t | REACTIVE_DISPOSED;\n if (e.X) {\n clearInFlight(e);\n // A death that can unblock the future (L2, `futureBlocked`): a held\n // flight's — a transaction's or a lane's (its `_x._transaction`) — or a\n // stale reader's (REACTIVE_FRAME_READ — a frame that derived from one).\n // An idle pending queue would also pin it until an unrelated flush.\n // Nothing else re-examines a dead node, so make sure a seam comes.\n if (e.m & STATUS_PENDING && e.T?.Re != null || t & REACTIVE_FRAME_READ || pendingNodes.length) schedule();\n }\n }\n // Typed as a computed so the loop needs no cast alias (the minifier keeps one).\n let l = r ? e.T.me : e.pe;\n if (r) e.T.me = null; else e.pe = null;\n while (l) {\n // Owner teardown is death regardless of the child's own lifecycle\n // (#3024): strip AUTO_DISPOSE so a post-disposal read freezes at the\n // last committed value instead of reawakening in a torn-down tree.\n // Runs before the recursion so already-dormant children (whose\n // disposeChildren call early-returns on REACTIVE_DISPOSED) die too.\n // Only unobserved()'s own node keeps its dormancy — it is never in\n // this loop; its children are rebuilt fresh on reawaken.\n l.l &= ~CONFIG_AUTO_DISPOSE;\n // Heap removal must not be gated on `_deps`: a dependency-free\n // computation queued by refresh() has a null dep list but still sits in\n // the dirty heap, and left there the post-disposal flush recomputes it —\n // recompute() rewriting `_flags` clears REACTIVE_DISPOSED and the node\n // comes back to life (post-unmount runs, leaked cleanups, #2983).\n // deleteFromHeap self-guards on the in-heap flags (and tolerates plain\n // Owners, whose _flags is undefined), so no gate here.\n deleteFromHeap(l, dirtyQueue);\n clearDeps(l);\n // The chain is detached above so a node a cleanup links mid-drain lands\n // on the fresh head and survives. Pointing each drained child's prev at\n // itself routes its later splice onto the detached chain, never the head,\n // and keeps the dev owner-chain-head invariant honest for those children.\n l.Me = l;\n disposeChildren(l, true);\n // Read after, not before: a sibling this disposal made dormant spliced\n // itself out of the detached chain, and a cleanup may then have linked\n // it at the fresh head, which rewrote the `_nextSibling` a pre-read\n // would still be holding.\n l = l.Ge;\n }\n if (!r) e.be = 0;\n // O(1) splice out of parent's chain on individual dispose. Skipped during\n // batch dispose (parent already disposed) and for a zombie (it sits on the\n // parent's parked frame, drained whole by the commit). We leave\n // node._nextSibling intact so outer walks that already advanced past us\n // still reach later siblings.\n if (n && !r && !(t & REACTIVE_ZOMBIE) && e._parent !== null && !(e._parent.R & REACTIVE_DISPOSED)) {\n const n = e.Me;\n const r = e.Ge;\n if (n !== null) n.Ge = r; else e._parent.pe = r;\n if (r !== null) r.Me = n;\n e.Me = null;\n }\n runDisposal(e, r);\n // Final effect-returned cleanup fires at true disposal, after `_disposal`\n // to mirror rerun ordering (compute-phase teardown first, cleanup last).\n if (n && e.ze) {\n const n = e.ze;\n e.ze = undefined;\n runCleanup(n);\n }\n}\n\nfunction linkChild(e, n) {\n const r = e.pe;\n n.Me = null;\n n.Ge = r;\n if (r !== null) r.Me = n;\n e.pe = n;\n}\n\nfunction runDisposal(e, n) {\n // Detach the list BEFORE running it (#3601), as `_cleanup` is (#2813). A\n // cleanup that disposes an ancestor re-enters this node through the death\n // walk while the loop is still running; with the list still attached, that\n // walk ran every entry a second time. Detached, the re-entrant drain finds\n // nothing. The same shape latched a throwing cleanup: the list survived the\n // throw and every later drain re-ran and re-threw it.\n const r = n ? e.T.Le : e.ke;\n if (!r) return;\n if (n) e.T.Le = null; else e.ke = null;\n if (Array.isArray(r)) {\n // Unwind order (#3572, restores 1.x #1562): later registrations run\n // before earlier ones. Children have already been disposed by the caller,\n // so with LIFO a body that registers cleanup before creating its children\n // tears down after them — the same order a per-component owner gives.\n for (let e = r.length - 1; e >= 0; e--) {\n runCleanup(r[e]);\n }\n } else {\n runCleanup(r);\n }\n}\n\nfunction childId(e, n) {\n while (e.l & CONFIG_TRANSPARENT && e._parent) e = e._parent;\n if (e.id != null) return formatId(e.id, n ? e.be++ : e.be);\n throw new Error;\n}\n\n/**\n * Allocates and returns the next stable child id for `owner`. Used by\n * hydration plumbing and `createUniqueId`. Not part of the user-facing API.\n *\n * @internal\n */ function getNextChildId(e) {\n return childId(e, true);\n}\n\n/**\n * The id a freshly-created node inherits: an explicit `options.id` wins;\n * transparent nodes share their parent's id; otherwise the parent's next\n * child id is consumed (or `undefined` outside an id-carrying tree).\n */ function inheritId(e, n, r) {\n return e?.id ?? (n ? r?.id : r?.id != null ? getNextChildId(r) : undefined);\n}\n\n/**\n * Returns the *next* child id for `owner` without consuming it. Used by\n * hydration plumbing to peek at the id a future child will receive.\n *\n * @internal\n */ function peekNextChildId(e) {\n return childId(e, false);\n}\n\nfunction formatId(e, n) {\n const r = n.toString(36), t = r.length - 1;\n return e + (t ? String.fromCharCode(64 + t) : \"\") + r;\n}\n\n/**\n * Returns the currently-tracking observer (the computation that subscribes to\n * reactive reads at this point), or `null` if reads here would be untracked.\n * Used by reactive primitives that need to know whether they're inside a\n * tracking scope. App code rarely needs this — see `getOwner()` for the\n * lifecycle owner instead.\n *\n * @example\n * ```ts\n * // Library predicate: only register a hot-path subscription when the\n * // caller is inside a tracking scope (memo / effect compute / JSX).\n * function trackIfTracked(source: () => unknown) {\n * if (getObserver()) source();\n * }\n * ```\n */ function getObserver() {\n return tracking ? context : null;\n}\n\n/**\n * Returns the current reactive **owner** — the lifecycle node that the next\n * `cleanup()` / `onCleanup()` / `createSignal()` etc. will be attached to.\n *\n * Returns `null` if called outside any owner. Capture the owner with\n * `getOwner()` and re-enter it later with `runWithOwner(owner, fn)` to attach\n * disposables created from a callback (event handler, async resolution, etc.)\n * back to a component's lifecycle.\n *\n * @example\n * ```ts\n * function defer<T>(fn: () => T) {\n * const owner = getOwner();\n * queueMicrotask(() => runWithOwner(owner, fn));\n * }\n * ```\n */ function getOwner() {\n return context;\n}\n\n/**\n * Low-level: registers `fn` as a disposal callback on the current owner.\n * Most code should use `onCleanup()` from `solid-js`, which adds dev-mode\n * checks. `cleanup()` is the unchecked primitive used by internals; `owner`\n * (internal) targets a specific owner's disposal list instead of the ambient\n * one.\n */ function cleanup(e, n = context) {\n if (!n) return e;\n if (!n.ke) n.ke = e; else if (Array.isArray(n.ke)) n.ke.push(e); else n.ke = [ n.ke, e ];\n return e;\n}\n\n/**\n * Returns `true` if the owner has been disposed. Pair with a captured owner\n * to bail out of late callbacks whose surrounding component already\n * unmounted.\n *\n * @example\n * ```ts\n * function onSettleSafe(fn: () => void) {\n * const owner = getOwner();\n * queueMicrotask(() => {\n * if (owner && isDisposed(owner)) return; // component unmounted; skip\n * runWithOwner(owner, fn);\n * });\n * }\n * ```\n */ function isDisposed(e) {\n return !!(e.R & REACTIVE_DISPOSED);\n}\n\nfunction disposeRootSelf(e = true) {\n disposeChildren(this, e);\n // Outside a flush the dispose call rethrows; inside one, the flush does.\n // Kept out of `disposeChildren`, whose hot path it slows.\n if (cleanupError && !globalQueue.Y) rethrowCleanupError();\n}\n\n/**\n * Creates a fresh owner attached as a child of the current owner (or as a\n * detached root if there is none). Used by framework internals to group\n * cleanups; app code should use `createRoot()` (host a reactive scope outside\n * a component) or `runWithOwner()` (re-enter a captured owner).\n *\n * @internal\n */ function createOwner(e) {\n const n = context;\n const r = e?.transparent ?? false;\n // Prod and observe boilerplates (see core.ts computed()). The observe\n // literal carries the `_name` and `_loc` slots the rendering layer fills\n // with the component label and JSX site (`owner._name = \"<App>\"`,\n // `owner._loc = \"src/App.tsx:3:5\"`) — slots, so labelling a root is a\n // plain store rather than a shape fork between labelled and plain roots.\n const t = {\n id: inheritId(e, r, n),\n l: r ? CONFIG_TRANSPARENT : 0,\n // Present from birth: disposeChildren marks death here on roots too, and\n // a first store of a missing property is a shape transition plus a\n // properties-store allocation per root — on a 100×4 table teardown that\n // was 12 KB and most of disposal's time.\n R: REACTIVE_NONE,\n Qe: true,\n Ke: n?.Qe ? n.Ke : n,\n pe: null,\n Ge: null,\n Me: null,\n ke: null,\n A: n?.A || defaultContext,\n be: 0,\n T: null,\n _parent: n,\n dispose: disposeRootSelf\n };\n if (n) linkChild(n, t);\n return t;\n}\n\n/**\n * Creates a reactive root — an owner scope with its own `dispose()`. A root\n * created inside an existing owner is owned by it and is disposed when the\n * parent is disposed; call `dispose()` to tear it down earlier. To create a\n * root that outlives its creator, detach explicitly:\n * `runWithOwner(null, () => createRoot(...))`. Pass `id` to seed hydration\n * ids for the tree it owns.\n *\n * `dispose()` tears down every signal, memo, effect, and `onCleanup`\n * registered inside the root.\n *\n * Use this to host long-lived reactive scopes outside of a component (custom\n * controllers, app bootstrapping, tests). Inside a component, prefer\n * letting Solid's component lifecycle own things.\n *\n * @example\n * ```ts\n * // At module level there is no owner, so this root lives until disposed.\n * const dispose = createRoot(dispose => {\n * const [n, setN] = createSignal(0);\n * createEffect(() => n(), value => console.log(value));\n * setInterval(() => setN(x => x + 1), 1000);\n * return dispose;\n * });\n *\n * // Later, to tear everything down:\n * dispose();\n *\n * // Inside an owner (component, effect, another root), detach explicitly\n * // if the root must outlive its creator:\n * const detached = runWithOwner(null, () => createRoot(d => d));\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/advanced/owner-introspection/create-root\n */ function createRoot(e, n) {\n const r = createOwner(n);\n // A bound function, not an arrow: an arrow would share this scope, which\n // holds `init`, so keeping `dispose` would keep `init` and all it closes\n // over alive (#4095).\n return runWithOwner(r, () => e(disposeRootSelf.bind(r, true)));\n}\n\nexport { cleanup, createOwner, createRoot, dispose, disposeChildren, getNextChildId, getObserver, getOwner, inheritId, isDisposed, linkChild, markDisposal, peekNextChildId, rethrowCleanupError, runCleanup };","import { EFFECT_RENDER, EFFECT_USER, CONFIG_HELD, CONFIG_OVERRIDE, NOT_PENDING, STATUS_UNINITIALIZED, STATUS_PENDING, CONFIG_STAGED, REACTIVE_DISPOSED, REACTIVE_ZOMBIE, CONFIG_VERDICT, CONFIG_HAS_SNAPSHOT, REACTIVE_RECOMPUTING_DEPS, REACTIVE_MISSED_WAKE, CONFIG_IN_SNAPSHOT_SCOPE, REACTIVE_SNAPSHOT_STALE, REACTIVE_OWNER_READS, CONFIG_HELD_FRAME, CONFIG_SLOT_NODE, NewSet, REACTIVE_LANE_DIRTY, CONFIG_STAGED_ERROR, CONFIG_INPUTS_PUBLISHED, STATUS_ERROR, EFFECT_TRACKED, REACTIVE_MANUAL_WRITE, CONFIG_GUESS, CONFIG_AHEAD, REACTIVE_FRAME_READ, CONFIG_REDERIVE, CONFIG_FRAME, REACTIVE_CHECK } from \"./constants.js\";\n\nimport { attrHooks } from \"./attribution-hooks.js\";\n\nimport { notifyStatus } from \"./async.js\";\n\nimport { resyncUnflushedCompanions, isSame, recompute, adopter, markUnflushedStaged, ext } from \"./core.js\";\n\nimport { DEV } from \"./dev.js\";\n\nimport { sweepDormant, trimStaleDeps } from \"./graph.js\";\n\nimport { runHeap, enqueueSub, markNode, deleteFromHeap } from \"./heap.js\";\n\nimport { devCheckQuiescent } from \"./invariants.js\";\n\nimport { rethrowCleanupError } from \"./owner.js\";\n\n// Optional-module hooks: module bindings, not `GlobalQueue` statics, so a\n// bundle that never imports the installing module never assigns them — its\n// minifier folds every guarded call site (and the branch behind it) away.\n// Each module installs its own set at evaluation (pay-for-use).\n// Lanes (lanes.ts; installed when `createOptimistic` — or verdict.ts — is\n// imported; every call site is behind a bit or a `passLane` nothing else sets).\nlet laneReadHook = null;\n\nlet laneStageHook = null;\n\nlet laneOutcomeHook = null;\n\nlet laneWriteHook = null;\n\nlet applyGuessesHook = null;\n\nlet laneSeamsHook = null;\n\nlet laneCorrectionsHook = null;\n\nlet endLanesHook = null;\n\nlet lanesBlockedHook = null;\n\n/** R5 (verdict.ts: the seam parks a frame flight of a reader that reads\n * ahead): the landing's re-derive of the reader adopts the flight instead\n * (`adoptParked`; true: adopted, nothing to queue). */ let laneAdoptHook = null;\n\n/** R5 at the seam (verdict.ts `r5`): a reader whose probe is unanswered, a\n * hold's parked flight still up (`r` null), the seam's end (both null). */ let r5Hook = null;\n\n/** core.ts `frameRead` served lane work or a verdict reader a held node's\n * committed value (lanes.ts `laneServed`). */ let laneServedHook = null;\n\n/** A guess was written (guesses.ts `optimisticWrite`): the arms only a guess\n * reaches (CONFIG_GUESS) — a build without `createOptimistic` or\n * `createOptimisticStore` never sets it, and its bundler folds them. */ let guessing = false;\n\nfunction armGuessing() {\n guessing = true;\n}\n\nfunction installLaneHooks(e, o, n, t, l, s, u) {\n laneReadHook = e;\n laneStageHook = o;\n laneWriteHook = n;\n laneSeamsHook = t;\n endLanesHook = l;\n // The transaction being judged (`judge`): a lane consulted on its behalf\n // judges for it. Only this hook nests one `blocked` in another, so the\n // bookkeeping lives here and a build without lanes folds `judge` away.\n lanesBlockedHook = e => {\n const o = judge;\n judge ??= e;\n const n = s(e);\n judge = o;\n return n;\n };\n laneServedHook = u;\n}\n\n// The guess layer (guesses.ts; installed when `createOptimistic` or\n// `createOptimisticStore` is imported): a written guess's own pass judged\n// (`laneOutcome`, core.ts `recompute`), the seam's guesses opening their\n// lanes (`applyGuessesAt`), the body-end corrections (`laneCorrections`).\n// Null without it: every site tolerates it.\nfunction installGuessHooks(e, o, n) {\n laneOutcomeHook = e;\n applyGuessesHook = o;\n laneCorrectionsHook = n;\n}\n\n// Boundaries (boundaries.ts): the display consumers between an observer\n// and the root. `catch` — status from a frame reader, nearest boundary\n// first (true: caught, the root never hears of it; a clear — flags 0 —\n// settles the reader there); `fresh` — a pass that read a hold (true: a\n// first pass a loading boundary that has not shown content caught,\n// `joinPass`; `held`: the flush's hold owns it, nothing catches it);\n// `hidden` — a frame reader behind a fallback (the boundary showing it)\n// is not on screen and holds nothing; `boundarySeam` — the seam's sweep (readers\n// gone or settled without a pass reveal; an `on` re-arm resolves);\n// `heldRun` — a queued run under a fallback-showing boundary waits for\n// the reveal (true: held; the boundary re-queues it by type). The\n// synchronous first render on creation builds the subtree, attached or\n// not; its updates and the user effects wait.\nlet catchHook = null;\n\nlet freshHook = null;\n\nlet hiddenHook = null;\n\nlet boundarySeamHook = null;\n\nlet heldRunHook = null;\n\nfunction installBoundaryHooks(e, o, n, t, l) {\n catchHook = e;\n freshHook = o;\n hiddenHook = n;\n boundarySeamHook = t;\n heldRunHook = l;\n}\n\n/** `@solidjs/web`'s head registry: told when a boundary swaps between its\n * fallback and its content, and asks whether a registration's node is\n * behind a fallback — content there is not on screen (F-3), nor are its\n * head tags (#4873). Never set without the registry. */ let swapHook = null;\n\nfunction setSwapHook(e) {\n swapHook = e;\n}\n\nfunction isHidden(e) {\n return !!hiddenHook?.(e);\n}\n\n/** Store (store/store.ts): `park` — the flush parked into `t`: the store\n * materializes and holds the container node of every staging that had none\n * (a staging needs the node as its home only when something can read the\n * frame through it; a hold can); `commit` — fold the pending backings whose\n * container nodes this flush committed (the owned-raw model's one mutation\n * point). */ let storeParkHook = null;\n\nlet storeCommitHook = null;\n\nfunction installStoreHooks(e, o) {\n storeParkHook = e;\n storeCommitHook = o;\n}\n\n/** `affects()` marks (affects.ts): the releases at a landing and at the seam\n * (ambient marks). */ let releaseMarksHook = null;\n\nlet releaseAmbientMarksHook = null;\n\nfunction installMarkHooks(e, o) {\n releaseMarksHook = e;\n releaseAmbientMarksHook = o;\n}\n\n/** Verdicts (verdict.ts). */ let observeFlightHook = null;\n\n/** D-25's hold work (verdict.ts `holdWork`): on `source` going pending,\n * whether verdict reader `n` waits on it instead of re-deriving. */ let holdWorkHook = null;\n\n/** D-41's staged-error mark (verdict.ts `stageMark`): the settle walk's\n * reached node `n` carries staged error source `el`'s staging. */ let stageMarkHook = null;\n\n/** #4417 (verdict.ts `keepReaders`); a landing's held re-derivation run (verdict.ts `attachWaits`). */ let keepReadersHook = null;\n\nlet attachHook = null;\n\n/** #4544 (verdict.ts). Null without the verdict engine. */ let holdStagingHook = null;\n\n/** D-8 (verdict engine), at the flush: the readers a tick netting to its\n * starting value woke are let go (verdict.ts `revert`). */ let revertHook = null;\n\n/** Verdict engine, a pass's head (D-22, D-41: the held error `latest` keeps\n * showing) and, with `tail`, its end\n * (A19 exc. 2: whether it asked the committed question again). */ let passHook = null;\n\nfunction installVerdictHooks(e, o, n, t, l, s, u, r, a, i) {\n revertHook = a;\n passHook = i;\n observeFlightHook = e;\n holdWorkHook = o;\n stageMarkHook = n;\n keepReadersHook = t;\n attachHook = l;\n holdStagingHook = s;\n laneAdoptHook = u;\n r5Hook = r;\n}\n\n/** External-source bridge (wired by enableExternalSource(); undefined while\n * no config is active — including after _resetExternalSourceConfig()). */ let wireExternalSourceHook = undefined;\n\nlet externalUntrackHook = undefined;\n\nfunction setExternalHooks(e, o) {\n wireExternalSourceHook = e;\n externalUntrackHook = o;\n}\n\n/** Live transactions — opened, unmerged, not landed. Scanned at every seam\n * while non-empty; nothing on the plain path. */ const transactions = [];\n\n/** Observe tier: this flush parked its transaction (`holdStart` fired). */ let holding = false;\n\n/** A transaction (listed here) or a lane (lanes.ts lists its own). */ function newTransaction(e, o = null) {\n const n = {\n ln: [],\n rn: [ [], [] ],\n fn: [],\n eo: null,\n _parent: o,\n P: e,\n Pe: null,\n tt: 0,\n nt: false,\n nn: null,\n Ue: false,\n un: false,\n I: null\n };\n if (!e) transactions.push(n);\n return n;\n}\n\n// Lanes (plan sec. 28, 2026-10-02; lanes.ts). A lane is \"a new base of a transition\":\n// the sub-frame an optimistic write opens in the transition of the frame it\n// is made in. It sees the screen plus its own guesses (plan sec. 19), breaks out of\n// the parent's hold — its effects run now — and holds itself if its own\n// derivations hit async. It ends when the parent lands: a guess reverts to\n// the truth it covered, or lands as the truth that superseded it. A frame\n// that does not park has nothing to be optimistic over: the write is void.\n\n// The seat of a pass is its node's: a node carrying a lane's value runs as\n// the lane's whoever dirtied it; a derivation's tracked read of a lane's\n// value moves its pass into the lane; a leaf's never does (it reads the\n// screen). Lane work's values go to the lane slot, its runs to the lane's\n// queues; the rest of the frame is the flush's.\n/** The lane the running pass is work of; set at `recompute`'s head from the\n * node, moved by a derivation's lane read, saved and restored around the\n * pass. */ let passLane = null;\n\nfunction setPassLane(e) {\n passLane = e;\n}\n\n/** The transaction this flush parks into: set by the first join, merged\n * with every further one. Consumed at the seam. A join outside a flush (a\n * mount's pending observer, a write to a held node, an action opening)\n * schedules the seam that consumes it: membership is the tick's — the same\n * synchronous frame — and the next tick's writes are not this one's. */ let flushTransaction = null;\n\n/** The transaction the passes running OUTSIDE a flush this tick derive from\n * (a mainline mount, a mainline re-pass): the passes' own (A29, creation-\n * time form — \"the entry is the pass's alone\"): their results are staged\n * into it, and nothing else in the tick is — a write made after the mount\n * is a mainline write, a render effect mounted beside it a stale reader.\n * Inside a flush, or in a tick that already has its transaction (an\n * action's body), the frame joins instead (`flushTransaction`) — except a\n * first pass a loading boundary that has not shown content catches (`own`,\n * A29's boundary exemption, #3540): it is the boundary's, not the tick's,\n * and a flush that has joined nothing keeps it pass-scoped as outside one.\n * Cleared by the flush the join schedules, and at the end of a flush that\n * set it. */ let passTx = null;\n\nfunction joinPassTx(e, o) {\n if (globalQueue.Y && !o || flushTransaction !== null) return joinFuture(e);\n if (passTx === null) passTx = resolveTx(e); else merge(resolveTx(e), passTx);\n schedule();\n}\n\n/** The transaction holding a node (CONFIG_HELD set), resolved through\n * merges; the path is compressed. */ function txOf(e) {\n return e.T.Re = resolveTx(e.T.Re);\n}\n\n/** `t` resolved through merges while it is still parked or open; null once\n * it has landed. */ function liveTx(e) {\n e = resolveTx(e);\n return transactions.indexOf(e) !== -1 ? e : null;\n}\n\nfunction resolveTx(e) {\n while (e.eo !== null) e = e.eo;\n return e;\n}\n\n/** The flush joins transaction `t` — or needs one of its own (`null`: a pass\n * went pending with nothing held). Joining a second one merges it into the\n * flush's: the work that touched both entangles them (A15). */\n/** #4777: the flush gives back the hold a pass's plain read adopted\n * (`joinPass`) before that pass starts over (verdict.ts `markVerdictReader`),\n * and every hold the pass's later plain reads merged into it (`merge`, in\n * reverse): each is its own again, as before the pass. */ function dropFlushTx() {\n for (let e = adopted.length - 2; e >= 0; e -= 2) {\n const o = adopted[e], n = o.eo;\n o.eo = null;\n n.tt -= o.tt;\n n.nt = adopted[e + 1];\n unappend(n.ln, o.ln);\n unappend(n.rn[0], o.rn[0]);\n unappend(n.rn[1], o.rn[1]);\n unappend(n.fn, o.fn);\n unappend(n.I, o.I);\n transactions.push(o);\n }\n adopted.length = 0;\n flushTransaction = null;\n}\n\nfunction unappend(e, o) {\n if (o) for (let n = o.length; n--; ) e.splice(e.lastIndexOf(o[n]) >>> 0, 1);\n}\n\nfunction joinFuture(e) {\n // A lane is never the flush's transaction (D-37, #4440).\n if (laneStageHook && e?.P) return;\n const o = flushTransaction;\n if (o === null) {\n flushTransaction = e === null ? newTransaction(false) : resolveTx(e);\n } else if (e !== null) merge(resolveTx(e), o);\n if (!globalQueue.Y) schedule();\n}\n\n/** `t` merges into `f`: the work that touched both entangles them (A15).\n * A lane never merges: it is a sub-frame, not a peer — its work is routed\n * per pass (`passLane`). */\n/** #4777: the merges made since a pass adopted the flush's hold (core.ts\n * `adopter`), as [t, f._acted before]: a restart gives them back too. */ const adopted = [];\n\nfunction merge(e, o) {\n // Both ends resolved: a stale pointer to a transaction already merged\n // into the other would close a cycle `resolveTx` never leaves.\n e = resolveTx(e);\n o = resolveTx(o);\n if (e === o || e.P || o.P) return;\n if (observeFlightHook && adopter) adopted.push(e, o.nt);\n e.eo = o;\n o.tt += e.tt;\n o.nt ||= e.nt;\n append(o.ln, e.ln);\n append(o.rn[0], e.rn[0]);\n append(o.rn[1], e.rn[1]);\n append(o.fn, e.fn);\n if (e.I !== null) append(o.I ??= [], e.I);\n transactions.splice(transactions.indexOf(e), 1);\n}\n\n/** A15: a hold is a property of the async node — observed pending by a\n * render reader. A transaction is blocked while a node it holds, in flight,\n * has one: a pending render effect (the frame itself), or a pending held\n * node a render effect reads. A stale reader served the committed value\n * never went pending, but derives from the flight all the same (#3494) and\n * is still linked to it; a memo between them is pending, and held, too — so\n * one hop of `_subs` is the chain. Reads of the reader's LAST pass only (the\n * link's generation is the pass's): a tail kept for A30 — the committed\n * frame's dependency, awaiting the run that retires it — is not a read of\n * the flight, and a reader that stopped reading releases it (O3, #3494).\n * An errored pass (NotReady included) did not stop: it never got there, and\n * its full list stands (A30) — the reads it did not reach still observe. A\n * flight nobody renders holds nothing (A29). Only the nodes `t` still owns\n * count: one a lane took over since is the lane's to wait on. A guess whose\n * own truth is in flight blocks the lane's parent, not the lane — it stands\n * in for the flight (A17: \"visible until its own fetch settles\"). */ function blocked(e) {\n // An action still running in it holds it open (action.ts). Its lanes\n // (lanes.ts): a lane under `t` blocks it while blocked itself.\n return e.tt !== 0 || blockedBy(e.ln, e) || !!lanesBlockedHook?.(e);\n}\n\n/** The transaction being judged — the outermost `blocked` of a nest (a lane\n * consulted on its behalf judges for it): a zombie whose removal it stages\n * is moot for it alone (`onScreen`). Set around the lanes' hook\n * (`installLaneHooks`), the only path that nests; null otherwise, where the\n * transaction judged is `blockedBy`'s own `owner`. */ let judge = null;\n\n/** `t`'s own flights only — not its lanes': a flight the frame asked for\n * (a refetch, a plain load) is authoritative; a lane's derivation flight is\n * not (lanes.ts, the body-end corollary). A pending reader counts only if\n * one of the sources it waits on is `t`'s (a render effect marked pending\n * by a lane flight, never re-run, is the lane's wait, not the frame's). */ function ownFlights(e) {\n return blockedBy(e.ln, e, ownSource);\n}\n\n/** A source the pending node waits on that is `t`'s (held by it, or by no\n * one) — not another transaction's or lane's work. Itself, when it is the\n * source. */ function ownSource(e, o) {\n const n = e.T?.se;\n if (n === undefined) return true;\n for (const e of n) {\n const n = e.T?.Re;\n if (n == null || resolveTx(n) === o) return true;\n }\n return false;\n}\n\n/** `own`: the pending node's filter (`ownFlights` passes `ownSource`) — a\n * parameter, not a flag, so a build without lanes or guesses (the only\n * callers of `ownFlights`) does not retain `ownSource`. */ function blockedBy(e, o, n) {\n for (let t = 0; t < e.length; t++) {\n const l = e[t];\n if (!(l.m & STATUS_PENDING) || l.R & REACTIVE_DISPOSED || l.l & CONFIG_GUESS || l.T.Re !== null && txOf(l) !== o || n && !n(l, o) || \n // A guess lane's member waiting on re-asks only (`reasks`) keeps what\n // it shows, and a `refresh()` holds nothing new (D-34 ¶3): it does not\n // keep the lane's other work off the screen (#4834: a memo over the\n // shown guess and a fresh answer stayed on its stale committed value).\n guessing && o.P && l.T.se && reasks(l)) continue;\n // The frame's own pending observer (off screen: this one holds nothing;\n // the next listed node may).\n if (l.i === EFFECT_RENDER) {\n // #4544 (F-6): a frame born into the hold that is pending on what a\n // settled verdict reader's display-ahead value asked for (`read`,\n // CONFIG_AHEAD) does not hold it; the reader re-derives at the\n // landing, and the frame with it. A lane's reveal still waits (S-29).\n if (!(observeFlightHook && l.l & CONFIG_AHEAD && !o.P) && onScreen(l, judge ?? o)) return true;\n continue;\n }\n for (let e = l.o; e !== null; e = e.t) {\n const n = e.u;\n // A frame reader: a render effect, or a stale reader of the flight\n // (REACTIVE_FRAME_READ — a verdict reader, `observeFlight`; lane work,\n // `frameRead`): served committed instead of going pending, it derives\n // from the flight all the same and is re-derived at the landing — the\n // frame's observation survives its reader becoming a lane's (a guess\n // over a held window, V5/A17). A probe alone does not hold. A\n // boundary showing content forwards the pending (its output pending,\n // CONFIG_REDERIVE): transparent, its readers hold through it (A33; the\n // lane-membership ruling, 2026-10-05). An output that never committed\n // shows nothing — a mount the frame has not revealed — and holds\n // nothing.\n if ((n.i === EFFECT_RENDER && n.m & STATUS_PENDING && !(observeFlightHook && n.l & CONFIG_AHEAD && !o.P) || n.R & REACTIVE_FRAME_READ || n.l & CONFIG_REDERIVE && n.m === STATUS_PENDING) && (e.Ne === n.de || n.T?.U != null) && !(n.R & REACTIVE_DISPOSED) && onScreen(n, judge ?? o)) return true;\n }\n }\n return false;\n}\n\n/** A frame reader whose say counts for `t`'s hold — `t` the transaction\n * being judged: not a zombie whose removal `t` stages (A15 #3463: a re-ask\n * in the unmount frame lands its pending on the zombie it unmounts — the\n * compiled <Show> of #3372; a zombie blocks every other judgment while it\n * is visible, a lane's reveal included: only the commit that disposes it\n * makes its say moot), and not behind a fallback (A33: a boundary showing its fallback is the display of\n * everything under it, so a reader there is not on screen and holds\n * nothing — boundaries.ts). */ function onScreen(e, o) {\n return !hiddenHook?.(e) && !(e.R & REACTIVE_ZOMBIE && removalStagedBy(e, o));\n}\n\n/** A15 (#3463): a reader whose removal is staged — a zombie, parked by a\n * pass awaiting its commit — is still on screen and live for every hold,\n * except the transaction staging its removal: for that one its say is moot\n * (done, and the commit disposes it; not done, and it stays parked). The\n * staging transaction is the one holding the pass that parked the frame:\n * the nearest non-zombie ancestor. */ function removalStagedBy(e, o) {\n while (e?.R & REACTIVE_ZOMBIE) e = e._parent;\n return e?.l & CONFIG_HELD && e.T?.Re != null && txOf(e) === resolveTx(o);\n}\n\n/** Unchanged passes this flush whose stale dependency tail awaits the\n * flush's verdict (A30, #3469): trimmed when the flush commits, kept when\n * it parks — the committed frame still derives from the previous pass's\n * dependencies, and a write to one of them must reach the node until a\n * committing pass replaces it. */ const heldTrims = [];\n\nfunction heldTrim(e) {\n heldTrims.push(e);\n}\n\n/** Zombies popped from the dirty heap this flush (`deferZombie`). The seam\n * decides their fate: a park cancels them (the writes that dirtied them are\n * held with it); a commit runs the survivors — the ones whose owner is still\n * awaiting its commit — in height order, after the commits that would have\n * disposed them (#3546). No second heap: the list is the deferral. */ const deferredZombies = [];\n\nfunction deferZombie(e) {\n deleteFromHeap(e, dirtyQueue);\n e.R &= -4;\n deferredZombies.push(e);\n}\n\n/** Put a staged node in a transaction: flagged, stamped, on its landing\n * list. */ function holdNode(e, o) {\n e.l |= CONFIG_HELD;\n list(e, o);\n}\n\n/** Put a node on a transaction's list, once: a node's `_transaction` is the\n * transaction whose `_nodes` it is on (every site that sets one does the\n * other), so a re-pass, a re-landing or a re-staging adds nothing. */ function list(e, o) {\n const n = ext(e);\n if (n.Re === o) return;\n n.Re = o;\n o.ln.push(e);\n}\n\n/** Hold the (uncommitted) frame under a held pass: every computed in the\n * live child chain, recursively. Plain owners are walked through, not held\n * — nothing reads or re-passes them. Once per park, over the parked frames\n * only; recomputes pay nothing for it. A lane's node in the frame (listed on\n * a lane: a verdict reader broken out of this very hold — display-ahead — or\n * a derivation of a guess, CONFIG_OVERRIDE; a lane pass's effect) is the\n * lane's, as the seam's own loop has it: \"lane work never makes its node\n * transaction work\" (A15, #3698). Re-listed here it would carry the lane's\n * value on the transaction's list, where the landing nulls its transaction\n * and `dissolveLane` no longer finds it — a lane node with no lane, which the\n * next read of it trips over (`laneRead` → `txOf`). Its frame is the lane's\n * too (ruling A: a lane pass's children are the lane's), revealed and\n * retired at the lane's seam. */ function holdFrame(e, o) {\n for (let n = e.pe; n !== null; n = n.Ge) {\n if (n.T?.Re?.P) continue;\n if (n.X !== undefined) {\n if (!(n.l & CONFIG_HELD)) holdNode(n, o);\n n.l |= CONFIG_HELD_FRAME;\n }\n holdFrame(n, o);\n }\n}\n\n/** The nodes under `owner` a transaction other than `t` holds (boundaries.ts:\n * what an earlier hold staged under a re-armed boundary). */ function heldUnder(e, o, n) {\n for (let t = e.pe; t !== null; t = t.Ge) {\n if ((t.l & (CONFIG_HELD | CONFIG_OVERRIDE)) === CONFIG_HELD && txOf(t) !== o) n(t);\n heldUnder(t, o, n);\n }\n}\n\n/** `n` leaves the hold it was staged in: its next pass publishes mainline. */ function unhold(e) {\n e.T.Re = null;\n e.l &= ~CONFIG_HELD;\n}\n\nconst dirtyQueue = {\n et: new Array(2e3).fill(undefined),\n p: false,\n Fe: 0,\n Et: 0\n};\n\nlet clock = 0;\n\nlet scheduled = false;\n\nlet halted = false;\n\nlet haltNotified = false;\n\nlet syncDepth = 0;\n\n/**\n * Toggles the dev-mode \"must be inside a `<Loading>` boundary\" enforcement\n * window. Only `render()` calls this — wrapping the initial mount so that a\n * top-level uncaught async read surfaces the diagnostic. Not part of the\n * user-facing API.\n *\n * @internal\n */ function enforceLoadingBoundary(e) {}\n\n// Dev-only marker for the effect half of createEffect/createRenderEffect, so\n// flush() can report the no-op instead of failing silently (React parity).\n/** @internal Action bodies on the stack (action.ts): `flush()` is refused\n * inside one — the body's writes are its transaction's and commit when it\n * settles; a drain mid-step cannot reveal them, and dev says so. Read live\n * by `@solidjs/web`'s server function transport: a call made while it is\n * nonzero is the action's mutation (#4913). */ let actionDepth = 0;\n\nfunction enterAction() {\n actionDepth++;\n}\n\nfunction exitAction() {\n actionDepth--;\n}\n\n/** Provenance (A18, #3331): the question being asked — an action's\n * sequence while a slice of its body and the flush that carries it run, 0\n * otherwise. A guess is stamped with it (lanes.ts; a mainline guess takes a\n * fresh sequence: the newest intent), a flight with the question that\n * started it (async.ts; mainline is always the current question). An\n * answer from an older question than the guess it lands on is stale: held\n * silently, it does not move the graph. */ let question = 0;\n\nlet questions = 0;\n\nfunction setQuestion(e) {\n question = e;\n}\n\nfunction nextQuestion() {\n return ++questions;\n}\n\nconst MAINLINE_QUESTION = 2147483647;\n\nlet inEffectCallback = false;\n\n/** Dev-only: matches no event, so a window or phase holding it applies\n * whatever event is current (see `strictReadEvent`, core.ts). */ const ANY_EVENT = {};\n\n/** Dev-only: the DOM event current when the effect phase was entered. A\n * handler dispatched synchronously from that phase (`el.focus()`) runs under\n * a different event and is not in it (#4235). */ let effectCallbackEvent = ANY_EVENT;\n\n/** Dev-only: the context a callback scope runs in — null for an effect\n * callback, the creating pass's for a ref callback (`runRefCallback`, #4761).\n * A primitive created in that context is created in the callback; one\n * created by a computation the callback pulls is that computation's. */ let effectCallbackOwner = null;\n\nfunction setEffectCallback(e, o = ANY_EVENT, n = null) {}\n\nfunction schedule() {\n if (halted) {\n notifyHalted();\n return;\n }\n if (scheduled) return;\n scheduled = true;\n if (!syncDepth && !globalQueue.Y) {\n queueMicrotask(flush);\n }\n}\n\n/**\n * Permanently halts the reactive system. Called when a user error escapes\n * every boundary — app state is undefined at that point, so scheduling stops\n * entirely rather than limping along with a half-applied update.\n */\n/**\n * The key a root owner carries its client error hook under (`render`'s\n * `onError`) — registered, so a runtime writes it with no import of the hook\n * module (core/error-hooks.ts) and no property mangling in the way. Defined\n * HERE, not there: a runtime that only writes the key must not retain the\n * hook machinery (pay-for-use).\n */ const ROOT_ERROR_HOOK = Symbol.for(\"solid-js/root-error-hook\");\n\nconst HALTED = \"[REACTIVITY_HALTED]\";\n\nfunction haltReactivity(e) {\n if (halted) return;\n halted = true;\n // A cleanup error collected before the halt is dropped (owner.ts).\n rethrowCleanupError(true);\n let o = HALTED;\n // Surface the cause here too: callers rethrow it, but a creation-time throw\n // unwinds through ancestor recomputes that convert it to status instead of\n // surfacing it (#2884), so the rethrow alone cannot guarantee visibility.\n // Where the platform has one, hand the cause to its uncaught-error channel\n // (`reportError` → `error` event → window.onerror / error monitoring): a\n // halt that only reaches console.error leaves a page that LOOKS alive with\n // nothing an app or its telemetry can act on (#3338 — an uncaught throw\n // during the hydration render). The rethrow may reach the top as well in\n // the non-swallowed cases; a duplicate report beats a silent one.\n const n = e !== undefined && globalThis.reportError;\n n || e === undefined ? console.error(o) : console.error(o, e);\n n && n(e);\n}\n\n/**\n * Dev: `haltReactivity`, located at `subject` — the computation the uncaught\n * error escaped from — for the REACTIVITY_HALTED message's owner path. Call\n * sites pick it in dev builds only (`haltReactivity(e)` in production), so\n * production keeps the one-argument halt and its bytes unchanged.\n */ function haltReactivityAt(e, o) {\n haltReactivity(e);\n}\n\n// Logs on the first write after a halt so a frozen interaction is traceable.\nfunction notifyHalted() {\n if (haltNotified) return;\n haltNotified = true;\n console.error(HALTED);\n}\n\n/** @internal Test/dev-reload hook. Revives scheduling after a halt. */ function resetErrorHalt() {\n halted = false;\n haltNotified = false;\n // A throw out of the pure phase skips the `scheduled` recompute; re-arm it.\n if (scheduled) {\n scheduled = false;\n schedule();\n }\n}\n\nclass GlobalQueue {\n rn=[ [], [] ];\n Y=false;\n flush() {\n if (this.Y) return;\n this.Y = true;\n // A28: companions of nodes written since the last flush mirror the\n // flushed world — re-synced inside the running window (the write is\n // \"flushed\" from here on).\n resyncUnflushedCompanions();\n passLane = null;\n passTx = null;\n try {\n // Sweep before the heap: unobserved() pulls swept nodes out of it, so\n // a dormant memo dirtied in the same tick is reclaimed instead of\n // recomputed; late subscribers (an effect reading a swept memo this\n // flush) revive it, which is the pay-for-use contract.\n sweepDormant();\n if (revertHook) revertHook();\n runHeap(dirtyQueue, GlobalQueue._e);\n this.settle();\n clock++;\n // A write the commit sweep staged with no subscriber to dirty is work\n // too — the next round commits it.\n scheduled = dirtyQueue.Et >= dirtyQueue.Fe || pendingNodes.length !== 0;\n this.run(EFFECT_RENDER);\n this.run(EFFECT_USER);\n if (false && holding) ;\n if (false && !scheduled) ;\n if (false) ;\n } finally {\n this.Y = false;\n passTx = null;\n }\n }\n /** L2 — the seam: end of the pure phase. Commit this flush's staged nodes,\n * or park them with the transaction the flush joined; then land every\n * transaction no frame is waiting on. The landing flush is an ordinary\n * flush: the settle walk (async.ts) re-ran the parked readers in its pure\n * phase, and here no flight the transaction holds has a frame deriving\n * from it (`blocked`). */ settle() {\n // Lanes: an ended action body judges its guesses now that their passes\n // have run (lanes.ts); a correction's re-derivations run in one more\n // pure round — the parent's flights before the parent is judged below.\n if (laneCorrectionsHook?.()) runHeap(dirtyQueue, GlobalQueue._e);\n const e = flushTransaction;\n flushTransaction = null;\n // The frame's verdict is in: the guesses written since the last seam\n // open their lane under the frame's transaction, or are dropped — the\n // frame commits, and there is nothing to be optimistic over. (A lane is\n // never the flush's transaction, D-37: lanes do not nest.) Their passes run next round;\n // a parent landing at this very seam ends the lane before they do.\n applyGuessesHook?.(e);\n // A lane's own flush (its flight landing, its reveal) parks nothing: the\n // lane's work reached it per pass; the frame's plain writes commit.\n // (Resolved: a guess over another transaction's guess merged them.)\n const o = e !== null && !e.P ? resolveTx(e) : null;\n if (o !== null) {\n // `t._nodes` grows under the walk (holdFrame pushes); the bound is\n // this flush's list, which does not.\n const e = pendingNodes.length;\n for (let n = 0; n < e; n++) {\n const e = pendingNodes[n];\n // Already held: the pass that re-staged it joined its transaction,\n // which is `t` (or merged into it). Lane work is the lane's (a\n // pending mark propagated onto it queued it here too).\n if (!(e.l & (CONFIG_HELD | CONFIG_OVERRIDE)) && (e.T === null || e.T.Re === null || !e.T.Re.P)) {\n // A loading source — pending with nothing staged and no committed\n // value (A16, A19 exc. 1: uninitialized is loading, not pending)\n // that is not an observer — is nobody's frame: not held. Its\n // first landing is commit #0, not a resumption of this frame, and\n // a write that reaches it later overlaps nothing (#2937: the\n // stale stamp was the bridge that entangled unrelated updates\n // with a never-resolving flight). Its observers are held and\n // wait on its flight (`blocked`).\n if (e.ue === NOT_PENDING && e.m & STATUS_UNINITIALIZED && e.i !== EFFECT_RENDER) continue;\n // A34 (2): a tick whose writes net to the committed value made no\n // proposal (`setShow(false); setShow(true)` on a committed true) —\n // not staged, not held, pends nothing; a later write to it is\n // plain mainline. (A node already held stays held when written\n // back: A34 (1).)\n if (e.ue !== NOT_PENDING && !(e.m & (STATUS_PENDING | STATUS_UNINITIALIZED)) && e.T?.me == null && e.T?.Le == null && \n // A recovery to the last good value is a change of answer\n // (D-41): the error it replaces stays the display until it\n // commits, so it is held, not netted.\n !e.T?.Te && \n // The comparator last: a pass that created children (an object\n // owning a fresh async memo, #4111) must not have it read them.\n // A NotReady read there is a change (`isSame`).\n isSame(e, e.le, e.ue)) {\n e.ue = NOT_PENDING;\n e.l &= ~CONFIG_STAGED;\n continue;\n }\n holdNode(e, o);\n }\n // A held pass's frame is held with it (ruling A, O2): the children it\n // created are the transaction's — they compute, and a pass over them\n // or a write that reaches them joins; they effect at the landing.\n if (e.l & CONFIG_STAGED) holdFrame(e, o);\n }\n pendingNodes.length = 0;\n storeParkHook?.(o);\n // (This flush's runs are stashed with `t` below — after the landings,\n // so a `t` that lands at this very seam runs them first, ahead of\n // the runs it held from earlier flushes.)\n // The batch joins: the writes that dirtied these are held with it — a\n // zombie never displays that world. A verdict reader among them does\n // (#3444: `latest()` inside a branch a held Show is removing peers\n // through like the same read outside): it re-runs now, as the\n // holder's verdict lane's work — before the lane seams, which reveal\n // it (nothing commits this seam that could dispose it).\n // (Verdict readers exist only with the verdict engine installed.)\n const n = deferredZombies.splice(0);\n if (observeFlightHook) {\n n.sort((e, o) => e.he - o.he);\n for (let e = 0; e < n.length; e++) if ((n[e].R & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE)) === REACTIVE_ZOMBIE && n[e].l & CONFIG_VERDICT) recompute(n[e]);\n }\n // The unchanged passes' tails stay linked (A30, #3469): their inputs\n // are held, and the committed frame still derives from them — no trim.\n } else {\n commitPendingNodes();\n // The flush committed: an unchanged pass's stale tail goes now. Not\n // after a later pass this flush that threw (NotReady included — it\n // keeps its full list, `_depsTail` marking where it stopped) or that\n // left an effect owing a run (`runEffect` trims when the run applies):\n // `recompute`'s own gates.\n for (let e = 0; e < heldTrims.length; e++) {\n const o = heldTrims[e];\n if (o.T?.U == null && !o.Ae) trimStaleDeps(o);\n }\n }\n // The list is the flush's either way. Reset only when there is something\n // to reset (`stagedReaders` below likewise): `length = 0` is a runtime\n // call even on an empty array, and the plain flush — no unchanged pass,\n // no lane work — has nothing in either.\n if (heldTrims.length) heldTrims.length = 0;\n // Lanes: a blocked one parks its frame (its own flight is up); an\n // unblocked one reveals this round's work. Then land every transaction\n // no frame is waiting on — its lanes end with it. Backwards: a landing\n // removes its entry.\n // This flush's own runs, the lanes' reveals, and the landings' held runs\n // are collected apart and ordered below.\n const n = this.rn;\n let t = null;\n // The passes that read this frame's stagings as the screen read held\n // writes if it parked: the lane seam re-derives them on the committed\n // world (a lane's runs wait this round).\n if (laneSeamsHook) {\n this.rn = t = [ [], [] ];\n laneSeamsHook(o);\n if (stagedReaders.length) stagedReaders.length = 0;\n }\n this.rn = [ [], [] ];\n for (let e = transactions.length - 1; e >= 0; e--) {\n const o = transactions[e];\n if (blocked(o)) continue;\n transactions.splice(e, 1);\n endLanesHook?.(o);\n land(o);\n // A landing's commits can dispose a zombie a transaction judged above\n // was blocked on (#3463: live \"until the commit that disposes it\") —\n // judge them again.\n e = transactions.length;\n }\n // The store folds the pending backings whose container nodes committed\n // — this flush's, or a landing's (store/store.ts installs it).\n storeCommitHook?.();\n // Marks declared outside a transaction: the flush that carried them\n // parked (something async below) — the window is the frame's, the marks\n // are its transaction's; else they release at the seam, verdict-only,\n // nothing to show (affects.ts).\n const l = o && liveTx(o);\n releaseAmbientMarksHook?.(l);\n // The effect phase: lane work first (displayed ahead of the frame), then\n // this flush's runs, then the runs the landings held from earlier\n // flushes — as one pass would have queued them (#3540: a shell\n // re-derived at the landing before a boundary swap held since the\n // write; #3528: a display-ahead swap before the count it is shown\n // beside). A parked frame's runs wait with its transaction instead: the\n // effect phase applies a committed frame.\n const s = l !== null;\n for (let e = 0; e < 2; e++) {\n if (s) append(l.rn[e], n[e]);\n // The plain flush — no reveal, no landing, not parked — has nothing to\n // order around its own runs: they are the queue as they stand (the\n // same array, not a copy; `run` takes it whole). Every other seam\n // builds the ordered queue above.\n this.rn[e] = s || t?.[e].length || this.rn[e].length ? (t ? t[e] : []).concat(s ? [] : n[e], this.rn[e]) : n[e];\n }\n if (deferredZombies.length !== 0) {\n // Survivors are the displayed frame of a held pass: they rerun for the\n // live write, parents before children.\n const e = deferredZombies.splice(0).sort((e, o) => e.he - o.he);\n for (let o = 0; o < e.length; o++) {\n if (!(e[o].R & REACTIVE_DISPOSED)) recompute(e[o]);\n }\n }\n // Boundaries: readers that settled, landed or died this flush are\n // dropped; a fallback with none left reveals next round.\n boundarySeamHook?.();\n }\n run(e) {\n const o = this.rn[e - 1];\n if (o.length) {\n this.rn[e - 1] = [];\n runQueue(o, e);\n }\n }\n enqueue(e, o, n = passLane) {\n // Lane work's runs are the lane's: they run at its reveal, not with\n // the frame (which may park). A lane pass that read the frame's own\n // staging is the frame's (`recompute` passes null): its run waits with\n // the frame. So is a run given a transaction that is not a lane (a\n // first run born held, `effect()`).\n if (e) (n?.P ? n : this).rn[e - 1].push(o);\n schedule();\n }\n /** Status reaching the root: pending is absorbed (the root mount defers —\n * dev records it for the ASYNC_OUTSIDE_LOADING_BOUNDARY FYI); an error is\n * unhandled (`false` → the caller halts).\n *\n * L2: this is where a transaction is registered. Pending that reaches an\n * observer (a render effect: the frame) is a frame that cannot show — the\n * flush parks, and the transaction waits on the flight while a frame\n * derives from it (`blocked`). Pending nobody observes holds nothing: a\n * memo in flight that no frame reads is not a frame waiting. (Base: the\n * queue's `_asyncReporters`, INV-3's one registration site.)\n *\n * A boundary between the observer and the root (boundaries.ts) is asked\n * first: a fallback catches what is not ready under it, and the root\n * never hears of it. */ notify(e, o, n, t) {\n if (catchHook?.(e, n & o, t)) return true;\n if (o & STATUS_PENDING) {\n if (n & STATUS_PENDING) {\n // A pass that went pending holds its frame: the async's own\n // synchronous frame is not ready (A15 reveal corollary: a reveal\n // that discovers a flight whose inputs are visible holds and joins\n // it; one whose inputs are held is a stale reader and never gets\n // here — `read` serves it the committed value). The frame's, not the\n // observer's: a render effect belongs to whoever dirtied its pass\n // (A15 shared-hole, #3407) — one held by T1 and re-run by T2's write\n // pends for T2's flight, and the two stay parallel; a frame that is\n // T1's already joined T1 through the write or the memo that made it\n // so. Outside a flush — root setup, a mount — the frame is the\n // mount's: its pending observers are one transaction, and a flight\n // started in it resumes it when it lands (maintainer, #3461: \"part\n // of the same one\"); what the mount published synchronously stays\n // published. Lane work going pending holds the lane, not the frame:\n // `blocked(lane)` finds it in the lane's staging (\"if further async\n // downstream is hit it holds like its own transition\").\n if (passLane === null) joinFuture(null);\n }\n return true;\n }\n return false;\n }\n}\n\n/** A15's stale readers: a frame whose LAST pass read a held node as\n * committed re-derives on the landed world — next round, after the commits.\n * One re-derived since (any later pass cleared the bit: in the transaction,\n * or without the held read) owes nothing. A run this transaction stashed\n * for it is void (#3322: an effect has one value slot, and the stale pass\n * overwrote the value that run was for) — the re-derivation's run replaces\n * it. Truthy when an effect re-derives (`land`). */ function reruns(e) {\n let o;\n for (let n = 0; n < e.fn.length; n++) {\n const t = e.fn[n];\n // An errored reader's display is its error (D-39): the landing gives it\n // nothing to re-derive, and a re-run would be a read that retries the\n // errored source (#3945) — unless that source is errored no longer: the\n // reader was served a shown error the landing replaces (`throwShown`).\n // Nor is the reader's own error: its pass threw over the committed value\n // of what the landing carries, served as the screen (A10; a lane's node\n // reading its parent's hold, or a pass with no value yet reading a\n // staging, `stagedScreen`) — the landing is the new answer, and the\n // reader re-derives on it (A15; D-39). A first load read so has no other\n // run: its error would stay the screen (async-gen 91501 #1158, #119).\n // A boundary's structure (its tree, its output: CONFIG_FRAME, no effect\n // type) re-derives all the same: what it read as the screen is the\n // content the landing replaces, and only its pass links the new content\n // whose recovery must reach it (D-3, D-39, #4405).\n const l = t.T?.U?.source;\n if (t.R & REACTIVE_DISPOSED || t.m & STATUS_ERROR && (t.i || !(t.l & CONFIG_FRAME)) && l !== t && (l?.m ?? STATUS_ERROR) & STATUS_ERROR) continue;\n if (t.R & REACTIVE_FRAME_READ || observeFlightHook && t.l & CONFIG_VERDICT) {\n // A memo re-deriving its own error holds the release as an effect\n // does (`land`): run first, the held runs showed that error beside a\n // frame about to replace it (#4407; #4284: the grouping never changes\n // the screen). So does a memo the landing holds (CONFIG_HELD: its\n // staged value is in this frame): the held runs read it, so shown\n // first they showed the stale pass the re-derivation replaces — one\n // frame reveals the change (F-1, A15; #4648). And any other: a memo\n // that asks, or one over it (D-25: a memo over a verdict memo is a\n // verdict reader), was served the screen and asked the screen's\n // question (F-6, S-51); it asks the landed world's now — the held\n // runs park with that flight, never shown beside the answer it\n // replaces.\n o = 1;\n // A lane's reveal leaves the mark to the transaction: a reader that\n // also read a held node as committed (`staleReader`) still observes\n // that flight until it re-runs — cleared here, the transaction landed\n // at this seam with the flight up and voided the reveal's run (#4397).\n if (!e.P) t.R &= ~REACTIVE_FRAME_READ;\n t.Ae = false;\n // Its frame is replaced by the re-derivation: a run one of its\n // children queued this flush (re-run by the same landing) is for the\n // frame being replaced — void too (#3404).\n for (let e = t.pe; e !== null; e = e.Ge) if (e.i) e.Ae = false;\n // A frame flight the seam parked (verdict.ts `r5`, R5) asked the\n // question this landing would: adopted, it is asked once (F-9).\n laneAdoptHook?.(t);\n enqueueSub(t);\n }\n }\n e.fn.length = 0;\n return o;\n}\n\n/** The landing: the held frame becomes the frame. */ function land(e) {\n const o = reruns(e);\n if (releaseMarksHook && e.I !== null) releaseMarksHook(e.I);\n // Old children die in the commits (cleanups first), then the stashed\n // effects run ahead of this flush's own. A node a lane took over since\n // (a guess written over the staged truth) is the lane's to land.\n for (let o = 0; o < e.ln.length; o++) {\n const n = e.ln[o];\n if (n.T.Re === null || txOf(n) !== e) continue;\n n.T.Re = null;\n commitPendingNode(n);\n }\n // A cleanup those commits ran that wrote a node `u` still held joined\n // `u`, which has left `transactions`: the write is this landing's, and\n // the next flush must not park in it (#4089).\n if (flushTransaction === e) flushTransaction = null;\n // An effect re-derives next round (`reruns`): the held runs wait for it\n // (D-9, the A15 reveal corollary, #4071). Its re-derivation can discover a\n // flight — a stale reader whose mainline pass stopped reading it, now\n // reading the landed world — and a landing that showed its runs first\n // would reveal the held write beside a frame that can only show its old\n // value. Queued last in this effect phase, the release hands them to the\n // next round's own runs, ahead of the re-derivation's: they show with it,\n // or park with it in the hold its pending opens. The commits stand.\n if (o) globalQueue.rn[1].push(() => releaseQueues(e)); else releaseQueues(e);\n}\n\n/** The held runs join this flush's effect phase after its own runs (the\n * landing's re-passes, in height order): the frame's effects run as one\n * pass would have queued them — a shell re-derived at the landing before a\n * boundary swap held since the write (#3540's log order). */ function releaseQueues(e) {\n for (let o = 0; o < 2; o++) {\n append(globalQueue.rn[o], e.rn[o]);\n e.rn[o] = [];\n }\n}\n\n/** `a.push(...b)` without the argument-count limit. */ function append(e, o) {\n for (let n = 0; n < o.length; n++) e.push(o[n]);\n}\n\n/** Nodes staged this flush (`_pendingValue` set), committed at its end. */ const pendingNodes = [];\n\n/** Held slots rewritten since the last flush, with the verdict engine (D-8: `revertHook`). */ const heldRewrites = [];\n\n/** Passes that read a staging of this flush as the screen — lane work\n * (core.ts `stagedRead`), a verdict reader before the frame's verdict\n * (verdict.ts): if the frame parks they read a held write — re-derived next\n * round (lanes.ts; a lane's runs wait that round). */ const stagedReaders = [];\n\n/** A15's stale reader: `c` was served the committed value of a node `t`\n * holds (a render effect, a verdict reader, lane work) and is re-derived\n * after `t`'s landing (`_reruns`). Called per read of a held node, so `t`'s\n * list holds one entry per such read, not one per pass: `reruns` re-runs the\n * reader at its first entry and skips the rest by the cleared flag. (A dedupe\n * here costs ~17-30 B minified in every client bundle, which the 10 KB\n * compiled floor cannot take; the repeats are inert and short-lived — the\n * list empties at the landing.) */ function staleReader(e, o) {\n // On each hold the pass reads committed from: one pass can read two (a memo\n // the flush's hold stages, a row another action's hold keeps), and each\n // landing re-runs it. Guarded by the flag alone, the reader was listed on\n // the first hold only and missed the second's landing (#4932).\n o.fn.push(e);\n e.R |= REACTIVE_FRAME_READ;\n}\n\nfunction queuePendingNode(e) {\n pendingNodes.push(e);\n if (!globalQueue.Y) markUnflushedStaged();\n // A28\n}\n\n/** §12d: bumped by every recompute and every new subscriber edge. A node's\n * staged-rewrite skip is sound only while NOTHING recomputed or linked since\n * its last notify — a mid-batch pull can clean a marked subscriber, and a\n * skipped re-write would leave it stale. */ let notifyEpoch = 0;\n\nfunction bumpNotifyEpoch() {\n notifyEpoch++;\n}\n\nfunction insertSubs(e) {\n // §12d: stamp before walking — setSignal's staged-rewrite fast path skips\n // the next walk for this node while the epoch holds (marking is idempotent).\n e.we = notifyEpoch;\n // Presence bits gate the optional-slot probes (see constants.ts): one\n // masked read of the always-present _config instead of missing-property\n // lookups in the hottest notify loop.\n const o = e.l;\n const n = (o & CONFIG_HAS_SNAPSHOT) !== 0 && e.T?.De !== undefined;\n for (let o = e.o; o !== null; o = o.t) {\n const t = o.u;\n // Missed-wake latch (#3037): this write is landing while the subscriber\n // is mid-recompute (a nested pull committing beneath its reads), and the\n // heap refuses RECOMPUTING nodes. A gen-current link means the pass\n // already validated this dep — the value it read is now stale — so latch\n // for recompute's tail to reschedule. Untouched links need no latch (the\n // pass either re-reads them fresh or trims them), and neither does the\n // tail link: it is the read IN FLIGHT — read() links before it pulls, so\n // this very commit is what that read returns.\n // A signal's read returned before any write to it — the pass's own\n // owned write to what it just read is a missed wake too (F-10).\n if (t.R & REACTIVE_RECOMPUTING_DEPS && o.Ne === t.de && (o !== t._ || !e.X)) t.R |= REACTIVE_MISSED_WAKE;\n if (n && t.l & CONFIG_IN_SNAPSHOT_SCOPE) {\n t.R |= REACTIVE_SNAPSHOT_STALE;\n continue;\n }\n enqueueSub(t);\n if (t.R & REACTIVE_OWNER_READS) markNode(t._parent, REACTIVE_CHECK);\n }\n}\n\n/** Every flight `c` waits on is a `refresh()` re-ask (`_reask`): its own,\n * with no sources, or each source's, through a source that waits on\n * another's flight (a projection over the re-asked memo, #4824). The\n * propagated copies can form a cycle: two keyed projections whose derives\n * each read a row lent from the other's store are each pending on the\n * other's derive (D-1, D-9: a read of a pending leaf is pending on it), and\n * both on the real flight (#4969). A source already walked adds no flight of\n * its own; the flights at the ends of the walk decide. */ function reasks(e, o = new NewSet) {\n return [ ...e.T.se ?? [ e ] ].every(n => n === e ? n.T.Ve : o.has(n) || (o.add(n), \n reasks(n, o)));\n}\n\n/** Lane work re-staged (lanes.ts; `recompute`): the node's subscribers are\n * notified (`insertSubs`), and the lane's members among them re-derive as\n * the lane's work (REACTIVE_LANE_DIRTY), their runs held with it — not as\n * stale readers republishing the committed view (#3460). `l` is a lane, so\n * it has a parent. A render effect on no lane is marked too: inert for its\n * pass (`recompute` seats a lane only from its own `_x`), it is a live\n * write if the effect becomes a zombie later this flush — an\n * on-screen reader whose removal an adopted write stages follows the lane\n * (the lane-membership ruling, 2026-10-05; `_update`).\n *\n * A render effect re-run by a verdict memo's change (`createMemo(() =>\n * latest(x))`, CONFIG_VERDICT) is the verdict reader the same read inline\n * makes it, for that pass (F-6; D-26 `[s(), L()]`, #4284): a frame reader\n * of its other reads — a staging's screen, a flight's committed value. One\n * an earlier propagation this flush seated in another lane leaves that\n * seat: its pass starts from the frame's, as the inline effect's does, and\n * `laneRead` re-derives it on the screen if that lane holds (`entered`). */ function laneDirty(e, o) {\n insertSubs(e);\n // A store's guess carrier: the readers of the keys it changed read their\n // leaves — dirtied as the lane's work too (store/optimistic.ts).\n if (e.l & CONFIG_SLOT_NODE) GlobalQueue.lo?.(e, o);\n for (let n = e.o; n !== null; n = n.t) {\n const t = n.u;\n let l = t.T?.Re, s = t.i === EFFECT_RENDER, u;\n // A reader a hold has pending on its re-ask (a correction's\n // re-derivation waiting on a refresh) re-derives from the guess as the\n // lane's work, seated there before its pass: lane work reads the\n // hold's flight as the screen (D-26, D-37), whether it reads the\n // flight before the guess or after (D-28), and whether it reads the\n // guess itself or a derivation of it — this walk runs at every lane\n // node's change. Seated at the guess read, the earlier read threw the\n // pass back into the hold (#4629). The hold is the lane's parent's (the\n // same slot, D-33), or any hold whose flights the reader waits on are all\n // `refresh()` re-asks (`_reask`; with none, its own flight): a re-ask\n // asks no new question and holds nothing new (D-34 ¶3), so a guess into\n // another log shows beside it at once (F-11, #4666). A reader pending on\n // another hold's new question stays with that hold (#4577: seated, it\n // would ask its question over the screen's input). One seated in another\n // lane this flush moves; its pass reads that lane's guess and links the\n // two (`enterLane`, A15), and `dissolveLane` skips a node it lost.\n if ((t.m & (STATUS_PENDING | STATUS_UNINITIALIZED)) === STATUS_PENDING && (\n // A render effect pending on another hold's re-asks, held by it or\n // by none, the same (#4824): its first read of the re-asked rows threw\n // it back out of the lane, and the guess beside a reader that showed\n // it waited on the refresh (F-1, F-11).\n l ? (t.l & (CONFIG_HELD | CONFIG_OVERRIDE)) === CONFIG_HELD : s) && (u = !!l && resolveTx(l) === resolveTx(o._parent), \n t.i ? s && !u && reasks(t) : u || reasks(t))) list(t, l = o);\n if (s && e.l & CONFIG_VERDICT) t.l |= CONFIG_VERDICT, t.R &= ~REACTIVE_LANE_DIRTY;\n if (l?.P ? sameLane(l, o) : t.i) t.R |= REACTIVE_LANE_DIRTY;\n }\n}\n\n/** An effect owes a run: marked, and its bound runner queued in its phase. */ function queueEffectRun(e) {\n e.Ae = true;\n globalQueue.enqueue(e.i, e.W ??= GlobalQueue.q.bind(null, e));\n}\n\n/** One lane, or two of one link group (#3335): one reveal unit. */ function sameLane(e, o) {\n return e === o || e.nn !== null && e.nn === o.nn;\n}\n\n/** A staged value becomes the node's value: truthy when one was staged. */ function applyStaged(e) {\n return e.ue !== NOT_PENDING && (e.le = e.ue, e.ue = NOT_PENDING);\n}\n\nfunction superseded(e) {\n return !(e.m & STATUS_UNINITIALIZED) && !!e.T?.Ee && !e.T.Ve && (e.ue = NOT_PENDING, \n true);\n}\n\nfunction commitPendingNode(e) {\n // L2: the commit is where a pass, held or not, stops being uncommitted —\n // unless it has no answer yet. A pass still in flight (pending, nothing\n // staged) stays uncommitted: a re-pass disposes its children on the spot,\n // and the frame it parked stays the frame until a pass of this node\n // commits a value.\n if (!e.X) {\n e.l &= -385;\n applyStaged(e);\n return;\n }\n // Computeds only from here (`_statusFlags` is not a signal field). A\n // commit beneath a flight publishes its inputs (A15 reveal corollary,\n // #3305): a reveal of it must observe, not show the pre-flight value.\n // A staged answer to a question a later pass of this hold replaced, its\n // own flight up for the new one, is not the frame's: the hold lands on the\n // answer to its own question (F-2, 2026-11-12) — the node stays in flight\n // on the committed value, and the stale staging goes.\n // (A cold helper: inline, the arm cost the commit loop its inlining.)\n const o = (e.m & STATUS_PENDING) !== 0 && (e.ue === NOT_PENDING || superseded(e));\n const n = e.l & CONFIG_STAGED_ERROR;\n // An answer commits: the error it replaces leaves the display (D-41).\n if (!o && e.T) e.T.Te = null;\n e.l = o ? e.l & -1048833 | CONFIG_INPUTS_PUBLISHED : e.l & -3147137;\n // D-41: the staged answer is an error — published now, when a value would\n // show, through the ordinary error path (`stageError`). Its readers first\n // see it in the cycle after this seam: a tracked re-read there is not a\n // retry (`read`), or a boundary re-derived by it would retry it forever.\n if (n) {\n const o = e.ue;\n e.ue = NOT_PENDING;\n e.ie = clock + 1;\n notifyStatus(e, STATUS_ERROR, o);\n } else if (applyStaged(e)) {\n // A node born staged (recompute) initializes at this commit.\n e.m &= ~STATUS_UNINITIALIZED;\n // A quiet re-ask's classification survives its landing and dies with\n // the landed value's commit (A19 exc. 2, #3178): verdict-quiet through\n // the reveal. (The sweep of a node still in flight is not a landing.)\n // The A28 stash goes with it.\n if (e.T != null) e.T.Ve = false, e.T.je = NOT_PENDING;\n // An effect with a staged value was born held (L2): its first run is\n // this commit's, not its creation's (A29) — queue it now.\n if (e.i && e.i !== EFFECT_TRACKED) queueEffectRun(e);\n }\n // The committed value is the first observable answer for a loading-window\n // node — the window closes here, not at compute time (#2990). Unconditional\n // store to an always-present computed slot.\n e.Ie = false;\n e.R &= ~REACTIVE_MANUAL_WRITE;\n // The dependencies of the pass that produced the value are the frame's now:\n // the previous frame's tail goes (A30, #3410; `recompute` left it for a\n // staged pass). Only after a clean pass: `_error` is cleared by a clean\n // pass or by the node's own landing (whose pass was clean), so a set\n // `_error` means the last pass threw, kept its full list, and `_depsTail`\n // marks where it stopped.\n if (e.T?.U == null) trimStaleDeps(e);\n if (!(e.m & STATUS_PENDING)) e.m &= ~STATUS_UNINITIALIZED;\n // L2: the children this commit publishes are the frame's now — the frame\n // they replace, parked by the pass (`recompute`), goes.\n if (!o && e.T != null && (e.T.me !== null || e.T.Le !== null)) GlobalQueue.Ce(e, false, true);\n}\n\nfunction commitPendingNodes() {\n for (let e = 0; e < pendingNodes.length; e++) {\n const o = pendingNodes[e];\n // A node a lane pass re-staged this round is the lane's to reveal; one\n // a transaction holds (born held by a mainline pass, `passTx`) is that\n // transaction's to commit, at its landing.\n if (!(o.l & (CONFIG_OVERRIDE | CONFIG_HELD))) commitPendingNode(o);\n }\n pendingNodes.length = 0;\n}\n\nconst globalQueue = new GlobalQueue;\n\nfunction flush(e) {\n if (actionDepth > 0) {\n return e ? e() : undefined;\n }\n if (e) {\n syncDepth++;\n try {\n return e();\n } finally {\n // Decrement even if the drain throws (a throwing effect): a leaked\n // syncDepth would stop `schedule()` from ever queuing a microtask again.\n try {\n flush();\n } finally {\n syncDepth--;\n }\n }\n }\n if (globalQueue.Y) {\n return;\n }\n if (halted) return;\n while (scheduled) {\n globalQueue.flush();\n }\n // A cleanup that threw during the drain, now that the drain is complete\n // (owner.ts).\n rethrowCleanupError();\n}\n\nfunction runQueue(e, o) {\n for (let n = 0; n < e.length; n++) e[n](o);\n}\n\nexport { ANY_EVENT, GlobalQueue, MAINLINE_QUESTION, ROOT_ERROR_HOOK, actionDepth, adopted, applyGuessesHook, applyStaged, armGuessing, attachHook, blocked, boundarySeamHook, bumpNotifyEpoch, catchHook, clock, commitPendingNode, deferZombie, dirtyQueue, dropFlushTx, effectCallbackEvent, effectCallbackOwner, endLanesHook, enforceLoadingBoundary, enterAction, exitAction, externalUntrackHook, flush, flushTransaction, freshHook, globalQueue, guessing, haltReactivity, haltReactivityAt, heldRewrites, heldRunHook, heldTrim, heldUnder, hiddenHook, holdNode, holdStagingHook, holdWorkHook, inEffectCallback, insertSubs, installBoundaryHooks, installGuessHooks, installLaneHooks, installMarkHooks, installStoreHooks, installVerdictHooks, isHidden, joinFuture, joinPassTx, keepReadersHook, laneAdoptHook, laneCorrectionsHook, laneDirty, laneOutcomeHook, laneReadHook, laneSeamsHook, laneServedHook, laneStageHook, laneWriteHook, lanesBlockedHook, list, liveTx, merge, newTransaction, nextQuestion, notifyEpoch, observeFlightHook, ownFlights, passHook, passLane, passTx, pendingNodes, question, queueEffectRun, queuePendingNode, r5Hook, reasks, releaseAmbientMarksHook, releaseMarksHook, releaseQueues, reruns, resetErrorHalt, resolveTx, revertHook, sameLane, schedule, setEffectCallback, setExternalHooks, setPassLane, setQuestion, setSwapHook, stageMarkHook, stagedReaders, staleReader, storeCommitHook, storeParkHook, swapHook, transactions, txOf, unhold, wireExternalSourceHook };","import \"./core.js\";\n\nimport { REACTIVE_IN_HEAP, REACTIVE_RECOMPUTING_DEPS, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_IN_HEAP_HEIGHT } from \"./constants.js\";\n\nimport { dirtyQueue } from \"./scheduler.js\";\n\n/**\n * Schedule one subscriber to re-run on the next flush: inserted into the\n * dirty heap with the `_min` cursor pulled down. Tracked effects ride the\n * heap too — the heap visit is their (empty) compute phase, which hands the\n * callback to the user queue once the pass has committed (see\n * GlobalQueue._update, #3291).\n */ function enqueueSub(e) {\n if (dirtyQueue.Fe > e.he) dirtyQueue.Fe = e.he;\n insertIntoHeap(e, dirtyQueue);\n}\n\nfunction actualInsertIntoHeap(e, t) {\n const E = (e._parent?.Qe ? e._parent.Ke?.he : e._parent?.he) ?? -1;\n if (E >= e.he) e.he = E + 1;\n const n = e.he;\n const I = t.et[n];\n if (I === undefined) t.et[n] = e; else {\n const t = I.We;\n t.ve = e;\n e.We = t;\n I.We = e;\n }\n if (n > t.Et) t.Et = n;\n}\n\nfunction insertIntoHeap(e, t) {\n let E = e.R;\n // RECOMPUTING refusals are not always losses: a genuinely missed wake (a\n // write to a link this pass already validated) is latched link-side in\n // insertSubs as REACTIVE_MISSED_WAKE for recompute's tail (#3037).\n if (E & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;\n if (E & REACTIVE_CHECK) {\n e.R = E & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;\n } else {\n e.R = E | REACTIVE_IN_HEAP;\n // An unmarked node entering an already-marked heap is marked on the\n // spot, keeping the markHeap memo valid. `_marked` is only reset by\n // runHeap, so a write between two mid-tick pulls (read-time markHeap +\n // updateIfNecessary) would otherwise leave this node unmarked and every\n // downstream pull stale until the next flush (#2922: the second\n // `latest()` returned the first write's value). Invalidating the memo\n // instead re-walked the WHOLE heap on the next pull — with N effects\n // parked in the heap for a synchronous mount (each row writing a ref\n // signal its effect subscribes to), mounting N rows was O(N²) (#3350).\n // markNode's own guard skips an already-DIRTY node.\n if (t.p) markNode(e);\n }\n if (!(E & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(e, t);\n}\n\nfunction insertIntoHeapHeight(e, t) {\n let E = e.R;\n if (E & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;\n e.R = E | REACTIVE_IN_HEAP_HEIGHT;\n actualInsertIntoHeap(e, t);\n}\n\nfunction deleteFromHeap(e, t) {\n const E = e.R;\n if (!(E & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;\n e.R = E & -25;\n const n = e.he;\n if (e.We === e) t.et[n] = undefined; else {\n const E = e.ve;\n const I = t.et[n];\n const i = E ?? I;\n if (e === I) t.et[n] = E; else e.We.ve = E;\n i.We = e.We;\n }\n e.We = e;\n e.ve = undefined;\n}\n\nfunction markHeap(e) {\n if (e.p) return;\n e.p = true;\n for (let t = 0; t <= e.Et; t++) {\n for (let E = e.et[t]; E !== undefined; E = E.ve) {\n if (E.R & REACTIVE_IN_HEAP) markNode(E);\n }\n }\n}\n\nfunction markNode(e, t = REACTIVE_DIRTY) {\n const E = e.R;\n if ((E & (REACTIVE_CHECK | REACTIVE_DIRTY)) >= t) return;\n e.R = E & -4 | t;\n for (let t = e.o; t !== null; t = t.t) {\n markNode(t.u, REACTIVE_CHECK);\n }\n}\n\nfunction runHeap(e, t) {\n e.p = false;\n for (e.Fe = 0; e.Fe <= e.Et; e.Fe++) {\n let E = e.et[e.Fe];\n while (E !== undefined) {\n if (E.R & REACTIVE_IN_HEAP) t(E); else adjustHeight(E, e);\n E = e.et[e.Fe];\n }\n }\n e.Et = 0;\n}\n\nfunction adjustHeight(e, t) {\n deleteFromHeap(e, t);\n let E = e.he;\n for (let t = e.C; t; t = t.G) {\n const e = t.S;\n if (e.X && e.he >= E) E = e.he + 1;\n }\n if (e.he !== E) {\n e.he = E;\n liftOwned(e, E);\n // (Not an owner reading it: it sits below its child by construction,\n // REACTIVE_OWNER_READS, and a seat below the cursor is never visited.)\n for (let E = e.o; E !== null; E = E.t) if (E.u !== e._parent) insertIntoHeapHeight(E.u, t);\n }\n}\n\n/**\n * A raised node's owned computations (through roots) move above it (#4848).\n * The heap places a node above its direct owner only, at insert, so an owner\n * raised after its children's birth left a grandchild at or below it, to run\n * before the owner whose run disposes it. Paid when a height changes, never\n * per insert. A child waiting in the heap keeps its seat this pass (its next\n * insert lifts it above its owner); what it owns moves either way.\n */ function liftOwned(e, t) {\n for (let E = e.pe; E; E = E.Ge) if (E.Qe) liftOwned(E, t); else if (E.he <= t) {\n // A child waiting in the heap moves with it: left at its seat it runs\n // before the owner whose run disposes it.\n const e = E.R & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);\n deleteFromHeap(E, dirtyQueue);\n E.he = t + 1;\n if (e) (e & REACTIVE_IN_HEAP ? insertIntoHeap : insertIntoHeapHeight)(E, dirtyQueue);\n liftOwned(E, t + 1);\n }\n}\n\nexport { deleteFromHeap, enqueueSub, insertIntoHeap, insertIntoHeapHeight, liftOwned, markHeap, markNode, runHeap };","import { NewSet, REACTIVE_RECOMPUTING_DEPS, CONFIG_AUTO_DISPOSE, STATUS_PENDING, REACTIVE_DISPOSED, REACTIVE_ZOMBIE, CONFIG_SLOT_NODE } from \"./constants.js\";\n\nimport { deleteFromHeap } from \"./heap.js\";\n\nimport { disposeChildren, runCleanup } from \"./owner.js\";\n\nimport { bumpNotifyEpoch, dirtyQueue } from \"./scheduler.js\";\n\n/** The store's shared slot-node release handler (store/store.ts installs it\n * once) — a live binding read directly by the sweep site: no wrapper frame,\n * no null check (a CONFIG_SLOT_NODE node existing implies the store module\n * loaded and registered it). */ let slotUnobservedHook;\n\nfunction setSlotUnobserved(e) {\n slotUnobservedHook = e;\n}\n\n// https://github.com/stackblitz/alien-signals/blob/v2.0.3/src/system.ts#L100\nfunction unlinkSubs(e) {\n const n = e.S;\n const l = e.G;\n const o = e.t;\n const s = e.en;\n if (o !== null) o.en = s; else n.Ze = s;\n if (s !== null) s.t = o; else {\n n.o = o;\n if (o === null) {\n // Store slot nodes dispatch to the ONE shared hook — no per-node\n // unobserved closure, no NodeExtension to hold it.\n // A user hook that throws is collected like a cleanup (owner.ts): the\n // unlink and the teardown around it carry on.\n if (n.l & CONFIG_SLOT_NODE) slotUnobservedHook(n); else if (n.T?.Ye) runCleanup(n.T.Ye);\n // No more subscribers; only tear down if CONFIG_AUTO_DISPOSE is set.\n // A pending node is exempt: its in-flight async work is an observer —\n // tearing down would orphan the work and re-execute it on the next\n // read. The settle path runs this same last-one-out check when that\n // observer releases (the untracked-read dormancy sweep guards on\n // pending identically).\n // During a pass's teardown of its unfinished frame, the release waits\n // for the pass to end (`deferredReleases`, #4142).\n // (No cast alias for `dep`: the minifier keeps one.)\n n.X && n.l & CONFIG_AUTO_DISPOSE && !(n.R & REACTIVE_ZOMBIE) && !(n.m & STATUS_PENDING) && (deferredReleases ? deferredReleases.push(n) : unobserved(n));\n }\n }\n return l;\n}\n\nfunction trimStaleDeps(e) {\n const n = e._;\n let l = n !== null ? n.G : e.C;\n if (l !== null) {\n do {\n l = unlinkSubs(l);\n } while (l !== null);\n if (n !== null) n.G = null; else e.C = null;\n }\n}\n\n// Shared by unobserved() and the disposeChildren child loop. The truthy guard\n// (not `!== null`) matters: plain Owners in a child chain have no _deps field,\n// and skipping early also avoids adding one (hidden-class churn) via the\n// null-out below. With `_depsTail` cleared, `trimStaleDeps` unlinks the whole\n// list and nulls `_deps`.\nfunction clearDeps(e) {\n if (e.C) {\n e._ = null;\n trimStaleDeps(e);\n }\n}\n\n/**\n * Last-one-out releases held back while a pass tears down the frame of an\n * earlier pass that never committed (#4142). The pass is about to rebuild\n * the same children, which read the same lazy nodes again. Released on the\n * spot, a lazy async memo whose only reader was the old frame's child memo\n * was torn down, re-ran on the new child's read, went pending, and the cycle\n * repeated forever. `recompute` collects them around that teardown and\n * releases what is still unobserved when the pass ends.\n */ let deferredReleases = null;\n\nconst deferReleases = e => deferredReleases = e;\n\nfunction unobserved(e) {\n deleteFromHeap(e, dirtyQueue);\n clearDeps(e);\n disposeChildren(e, true);\n}\n\n/**\n * Deferred dormancy for never-observed auto-dispose computeds (#3078).\n *\n * An untracked top-level read of a subscriber-less observation-lifecycle memo\n * used to call unobserved() inline at the end of read(). That kept the leak\n * closed (the compute links the memo into its deps' sub lists — without a\n * teardown point a never-observed memo is retained by its sources forever;\n * upstream alien-signals has exactly this retention), but it made reads\n * destructive: each read disposed the node, the next read revived it with a\n * full recompute in whatever ambient transition/lane context happened to be\n * current, so consecutive reads could return different answers with no write\n * in between.\n *\n * Instead, reads queue the node here and the scheduler sweeps at the top of\n * the next flush (before runHeap, so a same-tick dirtying is reclaimed\n * instead of recomputed). Reads become idempotent within a tick (the node\n * stays alive and serves its cache, uniform with observed memos) while\n * reclamation still happens within one microtask — the enqueue site arms\n * schedule(), so a flush is guaranteed even when no other work is queued.\n */ const dormantNodes = new NewSet;\n\nfunction sweepDormant() {\n if (dormantNodes.size === 0) return;\n for (const e of dormantNodes) {\n // Re-validate at sweep time: the node may have gained a subscriber (its\n // lifecycle is the unlinkSubs cascade now), gone pending (in-flight async\n // is an observer; the settle path re-runs last-one-out), lost its\n // AUTO_DISPOSE bit (owner teardown strips it, #3024), or already been\n // torn down.\n if (!e.o && e.l & CONFIG_AUTO_DISPOSE && !(e.m & STATUS_PENDING) && !(e.R & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE))) {\n unobserved(e);\n }\n }\n dormantNodes.clear();\n}\n\n// https://github.com/stackblitz/alien-signals/blob/v2.0.3/src/system.ts#L52\n/** Truthy when it reuses the link `sub`'s last pass made: a re-read. */ function link(e, n) {\n const l = n._;\n if (l !== null && l.S === e) return;\n let o = null;\n const s = n.R & REACTIVE_RECOMPUTING_DEPS;\n if (s) {\n o = l !== null ? l.G : n.C;\n if (o !== null && o.S === e) {\n o.Ne = n.de;\n return n._ = o;\n }\n }\n // A link stamped with the current pass generation was created or reused\n // in-order during this recompute, i.e. it already sits in the validated\n // [deps.._depsTail] prefix — the O(1) equivalent of scanning the dep list\n // (the old alien-signals `isValidLink` walk, O(n²) when a computation\n // re-reads earlier deps non-consecutively, e.g. store leaf reads).\n const r = e.Ze;\n if (r !== null && r.u === n && (!s || r.Ne === n.de)) return;\n const t = n._ = e.Ze = {\n S: e,\n u: n,\n G: o,\n en: r,\n t: null,\n Ne: n.de\n };\n if (l !== null) l.G = t; else n.C = t;\n if (r !== null) r.t = t; else e.o = t;\n // New subscriber edge: staged-rewrite skips (§12d) must not miss it.\n bumpNotifyEpoch();\n}\n\nexport { clearDeps, deferReleases, deferredReleases, dormantNodes, link, setSlotUnobserved, slotUnobservedHook, sweepDormant, trimStaleDeps, unlinkSubs, unobserved };","import { STATUS_ERROR, STATUS_PENDING, STATUS_UNINITIALIZED, STATUS_NO_VALUE, CONFIG_GUESS, REACTIVE_REASK, REACTIVE_RECOMPUTING_DEPS, CONFIG_ASYNC, CONFIG_HELD, REACTIVE_STAGED_READ, CONFIG_STAGED, CONFIG_STAGED_ERROR, REACTIVE_DISPOSED, CONFIG_AUTO_DISPOSE, REACTIVE_ZOMBIE, REACTIVE_IN_HEAP, REACTIVE_RELEASE_AFTER, NewSet, CONFIG_INPUTS_PUBLISHED, REACTIVE_DIRTY, NOT_PENDING, CONFIG_REDERIVE, CONFIG_VERDICT, CONFIG_OVERRIDE } from \"./constants.js\";\n\nimport { ext, statusNotifierOf, context, untrack, setSignal } from \"./core.js\";\n\nimport { StatusError, NotReadyError } from \"./error.js\";\n\nimport { unobserved, trimStaleDeps } from \"./graph.js\";\n\nimport { enqueueSub } from \"./heap.js\";\n\nimport { disposeChildren, cleanup } from \"./owner.js\";\n\nimport { guessing, passLane, joinFuture, txOf, holdWorkHook, question, MAINLINE_QUESTION, globalQueue, schedule, clock, flush, pendingNodes, freshHook, laneStageHook, queuePendingNode, reasks, unhold, stageMarkHook, storeParkHook } from \"./scheduler.js\";\n\n// One Set, created lazily, holds every pending source: a single slot\n// promoted to a Set had dual state that stranded pending entries (#2893).\nfunction addPendingSource(e, n) {\n if (e.T?.se?.has(n)) return false;\n (ext(e).se ??= new NewSet).add(n);\n return true;\n}\n\nfunction removePendingSource(e, n) {\n const t = e.T?.se;\n if (!t?.delete(n)) return false;\n if (!t.size) e.T.se = undefined;\n return true;\n}\n\nfunction clearInFlight(e) {\n if (e.T !== null) e.T.Ee = null;\n}\n\nfunction clearPendingSources(e) {\n // Node-owned and never shared: dropping the reference is the clear.\n if (e.T !== null) e.T.se = undefined;\n}\n\n// A rejection-pending clears only through the settle walk over the source's\n// subscribers, so it can retry only when a live dep is the source or carries\n// it. A disposed dep is unlinked and holds nothing (F-3, #5003).\nfunction retryReaches(e, n) {\n for (let t = e.C; t; t = t.G) {\n const e = t.S;\n if (!(e.R & REACTIVE_DISPOSED) && (e === n || e.T?.se?.has(n))) return true;\n }\n return false;\n}\n\n/** Park a loading-window node on an unready source: registered for the\n * source's settle, with no visible pending and no propagation. */ function parkLoadingWindow(e, n) {\n ext(e).fe = true;\n if (n.source) addPendingSource(e, n.source);\n // A settled error stays the answer: overwriting it here would leak a\n // NotReadyError from an invisible park (#2989).\n if (!(e.m & STATUS_ERROR)) setPendingError(e, n.source, n);\n}\n\nfunction setPendingError(e, n, t) {\n if (!n) {\n if (e.T !== null) e.T.U = null;\n return;\n }\n const r = t instanceof NotReadyError && t.source === n ? t : e.T?.U;\n ext(e).U = r instanceof NotReadyError && r.source === n ? r : new NotReadyError(n);\n}\n\nfunction forEachDependent(e, n) {\n for (let t = e.o; t !== null; t = t.t) n(t.u, t);\n}\n\n/** Depth first. `fn` sees every arrival (`seen` on a diamond's second);\n * returning false leaves the node unmarked so a later branch may walk it. */ function walkDependents(e, n) {\n const t = new NewSet;\n const visit = e => {\n const r = t.has(e);\n if (n(e, r) !== false && !r) {\n t.add(e);\n forEachDependent(e, visit);\n }\n };\n forEachDependent(e, visit);\n}\n\n// A lazy node left with no subscribers while pending is kept alive by its\n// flight, so whatever clears that pending must release it (#2934). A node\n// already queued releases at its pass's tail, or it would miss the landing\n// it was queued for (D-22, #4474).\nfunction releaseIfSettledUnobserved(e) {\n if (e.X && e.l & CONFIG_AUTO_DISPOSE && !e.o && !(e.R & REACTIVE_ZOMBIE) && !(e.m & STATUS_PENDING)) e.R & REACTIVE_IN_HEAP ? e.R |= REACTIVE_RELEASE_AFTER : unobserved(e);\n}\n\n// After an error propagates, release stranded lazy nodes. Collect first so\n// `unobserved()` never unlinks under the walk.\nfunction releaseSettledDependents(e) {\n let n;\n walkDependents(e, (e, t) => {\n if (!t && !e.o && e.l & CONFIG_AUTO_DISPOSE) (n ??= []).push(e);\n });\n if (n) for (const e of n) releaseIfSettledUnobserved(e);\n}\n\n/** An error a held node's pass found is an answer of that frame, staged like\n * a value and published at the commit (D-41). Not for a lane pass, nor a\n * node born held. Returns whether it was staged. */ function stageError(e, n, t) {\n // Staged even before the flush joins a hold: the seam decides, as for a\n // value (#4109, S-38). Not a projection's derive: its family never sees the\n // commit's publish (#4189).\n if (!(e.l & CONFIG_HELD || t && e.R & REACTIVE_STAGED_READ && globalQueue.Y && !e.rr) || passLane) return false;\n // An error ends the wait (D-41); a shown error stays until the commit.\n clearPendingSources(e);\n if (e.T) e.T.fe = false;\n if (!((e.m &= STATUS_ERROR | STATUS_UNINITIALIZED) & STATUS_ERROR)) setPendingError(e);\n e.ue = n instanceof StatusError ? n : new StatusError(e, n);\n e.l |= CONFIG_STAGED | CONFIG_STAGED_ERROR;\n // Readers derive from the staging; verdict readers the walk wakes need a flush (#4106).\n settlePendingSource(e);\n schedule();\n return true;\n}\n\nfunction settleErroredDependents(e, n) {\n let t = false;\n walkDependents(e, (e, r) => {\n if (!r && e.T?.U === n) {\n enqueueSub(e);\n t = true;\n }\n });\n if (t) schedule();\n}\n\n// Retire `source` from pending along the dependents of `el`. With a distinct\n// `source`, `el` recovered without it, so dependents with another path to it\n// stay pending.\nfunction settlePendingSource(e, n = e) {\n // A superseded re-park may keep an abandoned self entry; retire it with its copies.\n removePendingSource(e, n);\n let t = false;\n let r;\n walkDependents(e, (o, s) => {\n if (s || \n // Another dependency may still carry the source. Not marked visited: that\n // dependency may be a later branch of this walk.\n n !== e && retryReaches(o, n) || !removePendingSource(o, n)) \n // A verdict reader holds no pending of its own: the source settling is its\n // verdict changing, so it re-runs (F-9). A derivation of a staged error\n // carries it (D-41).\n return holdWorkHook && (o.l & CONFIG_VERDICT ? enqueueSub(o) : stageMarkHook(o, e)), \n false;\n o.ie = clock;\n const i = o.T?.se?.values().next().value;\n // An errored loading-window park keeps its error through the settle (#2989).\n const f = o.m & STATUS_ERROR;\n if (i) {\n if (!f) setPendingError(o, i);\n } else {\n o.m &= ~STATUS_PENDING;\n if (!f) setPendingError(o);\n // A held reader's re-pass over the landing is its hold's work (D-1); never a\n // lane's (#4440).\n if (o.l & CONFIG_HELD) joinFuture(txOf(o));\n if (o.T?.fe) {\n enqueueSub(o);\n t = true;\n }\n // A derived store's readers wait on the derive itself, so they settle with it (F-9).\n else if (storeParkHook) o.rr?.st();\n if (o.T !== null) o.T.fe = false;\n // Settled with no subscribers: released after the walk (#2934).\n if (!o.o && o.l & CONFIG_AUTO_DISPOSE) (r ??= []).push(o);\n // A chain's single arrival marks what a diamond's second does: graph shape\n // is not observable (D-41, #4562).\n stageMarkHook?.(o, e);\n }\n });\n // Queued nodes release at their pass's tail (#4474).\n if (r) for (const e of r) releaseIfSettledUnobserved(e);\n if (t) schedule();\n}\n\nfunction isThenable(e) {\n return e != null && typeof e === \"object\" && typeof e.then === \"function\";\n}\n\nfunction releaseFlightTeardown(e) {\n const n = e.T?.Se;\n if (n != null) {\n e.T.Se = null;\n n();\n }\n}\n\n/** Internal: run `fn` when the current pass's flight is superseded, with the\n * iterator close, rather than when the replacing pass commits. A no-op\n * outside a computed's own pass. */ function onSupersede(e) {\n const n = context;\n if (n === null || n.X === undefined || !(n.R & REACTIVE_RECOMPUTING_DEPS)) return;\n const t = n.T === null;\n const r = ext(n);\n // Allocating `_x` mid-run turns `_inFlight` from undefined to null, which\n // `recompute` would read as a flight this body registered.\n if (t) r.Ee = undefined;\n const o = r.Se;\n r.Se = o === null ? e : () => {\n try {\n o();\n } finally {\n e();\n }\n };\n}\n\n/** A flight's landing through a setter (bound by store/projection.ts). A throw\n * from `commit` is the flight's error (`fail`, false returned). */ function landBySetter(e, n, t, r, o) {\n try {\n t(n);\n } catch (e) {\n o(e);\n return false;\n }\n // Unheld, a store derive's landing clears the shown error and published-inputs\n // mark now (#4269); held, at the commit.\n if (!(e.l & CONFIG_HELD)) {\n e.T.Te = null;\n e.l &= ~CONFIG_INPUTS_PUBLISHED;\n }\n if (r) landStatus(e, true);\n return true;\n}\n\nfunction handleAsync(e, n, \n// A store derive's landing (`landBySetter`); a callback, so a build\n// without stores retains none of the arm (bundle size).\nt, \n// `pending`: a NotReady rejection, not an error. A projection tells its leaves' readers.\nr) {\n let o = false;\n let s = false;\n if (typeof n === \"object\" && n !== null) {\n untrack(() => {\n o = n[Symbol.asyncIterator];\n s = !o && isThenable(n);\n });\n }\n if (!s && !o) {\n if (e.T !== null) {\n e.T.Ee = null;\n if (holdWorkHook) e.l &= ~CONFIG_ASYNC;\n }\n e.Ie = false;\n return n;\n }\n // Iterator teardown already ran in `recompute`'s supersede release (#3122).\n // A registration path outside `recompute` must release it here.\n ext(e).Ee = n;\n // Upkept only with the verdict engine (`holdWorkHook`); see `holdWork` (D-25).\n if (holdWorkHook) e.l |= CONFIG_ASYNC;\n // Provenance (D-34): the question this flight answers.\n e.T.ce = question || MAINLINE_QUESTION;\n // The asking pass read every input, so earlier propagated pending does not\n // describe this answer; left, it would hold the node past it (#3373).\n e.T.se = undefined;\n let i;\n const handleError = t => {\n if (e.T?.Ee !== n) return;\n let o = t instanceof NotReadyError;\n if (o && e.Ie) {\n // Loading window: keep serving commit #0; release the flight so the error\n // retry can ask again.\n clearInFlight(e);\n parkLoadingWindow(e, t);\n e.ie = clock;\n return;\n }\n // A held node's error is staged (D-41), a derived store's derive's too (#4489).\n if (o || !stageError(e, t)) {\n notifyStatus(e, o ? STATUS_PENDING : STATUS_ERROR, t);\n // Published now, the error replaces the shown frame as a value's commit would.\n if (!o) disposeChildren(e, false, true);\n }\n // A NotReady rejection lands into another pending source: hand over the self entry.\n if (o) settlePendingSource(e);\n e.ie = clock;\n // Release lazy dependents the error settled (#2934).\n if (!o) releaseSettledDependents(e);\n r?.(t, o);\n };\n const asyncWrite = (r, o) => {\n if (e.T?.Ee !== n) return;\n // A newer write re-runs the node. A first answer is still a produced value:\n // it lands before the re-ask (D-22, F-9). Only the verdict engine can tell.\n if (e.R & REACTIVE_DIRTY && !(holdWorkHook && e.m & STATUS_UNINITIALIZED)) return;\n // A write's flush is queued: it carries this landing (#4495).\n const s = holdWorkHook && pendingNodes.some(e => e.ue !== NOT_PENDING);\n const i = e.m & STATUS_UNINITIALIZED;\n landStatus(e);\n if (t) {\n // False: the derive's commit threw, taken as the flight's error.\n if (!t(r, i, handleError)) return;\n } else {\n // A held node stages the answer into its hold (`setSignal`).\n setSignal(e, () => r);\n }\n // The loading window closes when the answer is observable: at the commit if\n // staged, so no one-frame pulse leaks (#2990).\n if (e.ue === NOT_PENDING) {\n e.Ie = false;\n // Trim the old dependency tail once published; a staging trims at its commit (#3410).\n trimStaleDeps(e);\n }\n settlePendingSource(e);\n schedule();\n // A write's flush already queued carries this landing with the others ahead\n // of it (F-10, D-22). Flushing now would re-ask before their reactions ran (#4495).\n if (o || !s) flush();\n o?.();\n };\n // A pending node's flight counts as an observer, so settling runs the\n // last-one-out check. Returns whether it released, so a stream stops (#2935).\n const settleAutodispose = () => {\n if (e.l & CONFIG_AUTO_DISPOSE && !e.o && !(e.m & STATUS_PENDING)) {\n unobserved(e);\n return true;\n }\n return false;\n };\n // Consume an AsyncIterable as this flight's values. Live (called inside the\n // read): a sync first yield is stashed for the caller. Deferred (a thenable\n // resolved to an iterable later): every step writes through `asyncWrite`\n // and close registers on `owner`. Returns whether a sync answer landed.\n const consumeIterator = (t, r) => {\n const o = t[Symbol.asyncIterator]();\n let s = false;\n let f = false;\n let u = !r;\n const close = () => {\n if (f) return;\n f = true;\n try {\n const e = o.return?.();\n if (isThenable(e)) e.then(undefined, () => {});\n } catch {}\n };\n cleanup(close, r);\n // Supersede stops the stream at once (#3122). Assigned, not chained, for bytes:\n // it replaces an earlier `onSupersede` teardown, which falls back to owner cleanup.\n ext(e).Se = close;\n // Release before each pull, or an unobserved stream pumps forever (#2935).\n // A protocol throw settles as this flight's error, not a rejection (#4112).\n const iterateOrRelease = () => {\n try {\n if (!settleAutodispose()) iterate();\n } catch (e) {\n handleError(e);\n }\n };\n const iterate = () => {\n let t, r, l = false, a = false, S = true;\n // Like `for await`, accept a bare IteratorResult as a settled step.\n const E = o.next();\n const c = isThenable(E) ? E : {\n then: e => void e(E)\n };\n c.then(r => {\n // Only the initial drain has a caller for the stash; later sync steps write\n // through, or the value is dropped.\n if (S && u) {\n t = r;\n l = true;\n if (r.done) f = true;\n } else if (e.T?.Ee !== n) {\n return;\n } else if (!r.done) {\n s = true;\n asyncWrite(r.value, iterateOrRelease);\n } else {\n f = true;\n if (s) {\n schedule();\n flush();\n } else {\n asyncWrite(undefined);\n }\n settleAutodispose();\n }\n }, t => {\n if (S && u) {\n r = t;\n a = true;\n } else if (e.T?.Ee === n) {\n f = true;\n handleError(t);\n settleAutodispose();\n }\n });\n S = false;\n if (a) {\n f = true;\n handleError(r);\n if (u) throw r;\n return true;\n }\n if (l && !t.done) {\n i = t.value;\n s = true;\n return iterate();\n }\n return l && t.done;\n };\n const l = iterate();\n // Later calls run from `asyncWrite`, where a rethrow would be unhandled.\n u = false;\n return s || l;\n };\n // Whether a live drain landed synchronously; null when none ran.\n let f = null;\n // A thenable that resolves to an AsyncIterable is consumed as the stream.\n // One level: A+ `then` already collapses nested thenables.\n const flattenIfIterable = (e, n) => {\n let t = false;\n if (typeof e === \"object\" && e !== null) {\n untrack(() => {\n t = e[Symbol.asyncIterator];\n });\n }\n if (!t) return false;\n i = undefined;\n const r = consumeIterator(e, n);\n if (!n) f = r;\n return true;\n };\n if (s) {\n let t = false, r = false, o, s = true;\n n.then(r => {\n if (s) {\n i = r;\n t = true;\n } else {\n // The first yield clears pending as a resolution would. A disposed node never\n // starts a pump. The ambient owner is gone, so close registers on `el`; a\n // protocol throw settles as this flight's error (#4112).\n try {\n if (e.T?.Ee === n && !(e.R & REACTIVE_DISPOSED) && flattenIfIterable(r, e)) return;\n asyncWrite(r);\n } catch (e) {\n handleError(e);\n }\n settleAutodispose();\n }\n }, e => {\n if (s) {\n o = e;\n r = true;\n } else {\n handleError(e);\n settleAutodispose();\n }\n });\n s = false;\n if (r) {\n // Settle as a rejection does, then unwind so the read is not `undefined`.\n handleError(o);\n throw o;\n } else if (!t) {\n // Not landed: the tail suspends, or a loading window serves commit #0.\n f = false;\n } else if (!flattenIfIterable(i)) {\n e.Ie = false;\n }\n }\n if (o) flattenIfIterable(n);\n if (f !== null) {\n if (!f) {\n if (e.Ie) return e.le;\n throw new NotReadyError(context);\n }\n e.Ie = false;\n }\n return i;\n}\n\nfunction clearStatus(e, n = false) {\n if (e.T?.se) clearPendingSources(e);\n if (e.T?.fe) e.T.fe = false;\n e.m = n ? 0 : e.m & STATUS_UNINITIALIZED;\n if (e.T?.U) setPendingError(e);\n const t = statusNotifierOf(e);\n if (t) t.call(e);\n}\n\n/** A landing answers the node's own question: it retires the self entry, not\n * pending its sources propagated. With another source still pending the\n * node stays pending on it (#3373, #3376). `_blocked` clears, so an input\n * settling unchanged does not ask again; `_error` moves off self. */ function landStatus(e, n = false) {\n const t = e.T?.se;\n if (t && (t.delete(e), t.size)) {\n e.T.fe = false;\n if (n) e.m = STATUS_PENDING;\n setPendingError(e, t.values().next().value);\n } else clearStatus(e, n);\n}\n\nfunction notifyStatus(e, n, t) {\n if (n === STATUS_ERROR && !(t instanceof StatusError) && !(t instanceof NotReadyError)) t = new StatusError(e, t);\n const r = n === STATUS_PENDING && t instanceof NotReadyError && t.source;\n if (r) {\n // A re-ask of a shown error keeps it on display (D-41).\n if (e.m & STATUS_ERROR) e.T.Te = e.T.U;\n addPendingSource(e, r);\n } else clearPendingSources(e);\n // An error answering a node with no value keeps it uninitialized; a re-ask\n // is uninitialized again; a write gives it a value.\n e.m = n | (n === STATUS_ERROR ? e.m & (STATUS_UNINITIALIZED | STATUS_NO_VALUE) ? STATUS_NO_VALUE : 0 : n === STATUS_PENDING && e.m & STATUS_NO_VALUE ? STATUS_UNINITIALIZED : e.m & STATUS_UNINITIALIZED);\n // Readers park on the propagated source.\n if (r) setPendingError(e, r, t); else ext(e).U = t;\n // A guess is verdict-inert: its own flight is the hold's to wait on, not its\n // readers' (F-9, F-11). An input changed outside the guess's hold asks a\n // new question, held with that hold (D-34, #4336); a `refresh()` does not.\n if (guessing && n === STATUS_PENDING && e.l & CONFIG_GUESS) {\n if (passLane === null) joinFuture(e.R & REACTIVE_REASK ? null : txOf(e)._parent);\n return;\n }\n const o = statusNotifierOf(e);\n if (o) {\n o.call(e);\n return;\n }\n propagateStatus(e, n, t);\n}\n\n/** The dependents' half of `notifyStatus`. Also used alone for a store\n * family's leaves, which are not the derive's dependents. */ function propagateStatus(e, n, t) {\n const r = n === STATUS_PENDING && t instanceof NotReadyError && t.source;\n forEachDependent(e, (o, s) => {\n o.ie = clock;\n // Re-derive instead of marking when:\n // - a pending mark arrives on a kept-tail link: it is a question for the next\n // pass, not this one (#3494);\n // - the subscriber is a verdict reader or a boundary's output: its pass\n // decides what the change means (D-23, D-25);\n // - it carries a staged error: the source asks again (#4109).\n // Not an async memo D-25 makes the hold's work: it waits like any\n // derivation and asks once, at the landing (F-9, #4397).\n if (o.l & CONFIG_REDERIVE || holdWorkHook && (o.l & CONFIG_VERDICT || r && o.l & CONFIG_STAGED_ERROR) && !(r && holdWorkHook(o, e)) || n === STATUS_PENDING && s.Ne !== o.de) {\n // A re-derived subscriber no longer waits on a settled source: retire the\n // entry there and on its dependents, or the subscriber stays pending on a\n // source that never settles again.\n if (n !== STATUS_PENDING && removePendingSource(o, e)) settlePendingSource(o, e);\n enqueueSub(o);\n schedule();\n return;\n }\n // Already pending on this source: nothing re-notifies, but the re-asking\n // write is held with the flight the observer waits on (D-9).\n if (r && o.T?.se?.has(r)) {\n if (passLane === null && (o.l & (CONFIG_HELD | CONFIG_OVERRIDE)) === CONFIG_HELD && globalQueue.Y && !freshHook?.(o, r.ie === clock)) joinFuture(txOf(o));\n return;\n }\n if (r || n !== STATUS_PENDING && (o.T?.U !== t || o.T?.se)) {\n // Queued for the commit sweep, with the lane when the pass is lane work.\n if (laneStageHook && passLane !== null) laneStageHook(o, passLane, true, e); else {\n queuePendingNode(o);\n // Pending enters a held memo's hold without re-running it, so the write that\n // started the flight is held with it (D-9). A render effect's membership is\n // its pass's.\n if (n === STATUS_PENDING && (o.l & (CONFIG_HELD | CONFIG_OVERRIDE)) === CONFIG_HELD && !o.i) if (guessing && o.m & STATUS_PENDING && reasks(o)) \n // A hold waiting only on re-asks holds nothing new (D-34, F-9): the memo\n // leaves it and publishes with the write's frame. Only guesses can keep such a\n // hold open (#4828).\n unhold(o); else joinFuture(txOf(o));\n }\n notifyStatus(o, n, t);\n // A derived store's derive is marked, not re-run: its family walks the leaves.\n o.rr?.st(n, t);\n }\n });\n}\n\nexport { addPendingSource, clearInFlight, clearStatus, forEachDependent, handleAsync, isThenable, landBySetter, notifyStatus, onSupersede, parkLoadingWindow, propagateStatus, releaseFlightTeardown, releaseIfSettledUnobserved, releaseSettledDependents, removePendingSource, retryReaches, setPendingError, settleErroredDependents, settlePendingSource, stageError };","import { notifyStatus, releaseFlightTeardown, handleAsync, clearStatus, parkLoadingWindow, stageError, settlePendingSource, retryReaches, releaseIfSettledUnobserved, clearInFlight, settleErroredDependents } from \"./async.js\";\n\nimport { EVENT_HANDLER_READ, REACTIVE_FRAME_READ, STATUS_UNINITIALIZED, REACTIVE_LAZY, REACTIVE_NONE, defaultContext, CONFIG_TRANSPARENT, CONFIG_OWNED_WRITE, CONFIG_AUTO_DISPOSE, CONFIG_SYNC, CONFIG_NO_SNAPSHOT, CONFIG_IN_SNAPSHOT_SCOPE, NOT_PENDING, CONFIG_HELD, REACTIVE_MANUAL_WRITE, STATUS_ERROR, REACTIVE_DIRTY, CONFIG_OVERRIDE, NO_SNAPSHOT, CONFIG_HAS_SNAPSHOT, REACTIVE_DISPOSED, REACTIVE_CHECK, REACTIVE_IN_HEAP, REACTIVE_REASK, REACTIVE_SNAPSHOT_STALE, CONFIG_CHILDREN_FORBIDDEN, CONFIG_VERDICT, CONFIG_HELD_FRAME, EFFECT_RENDER, STATUS_PENDING, REACTIVE_AHEAD, CONFIG_FRAME, CONFIG_ASYNC, CONFIG_OWN_PROBE, CONFIG_STAGED, CONFIG_MOUNT_AHEAD, REACTIVE_ZOMBIE, CONFIG_STAGED_ERROR, REACTIVE_LANE_DIRTY, REACTIVE_PROBED, CONFIG_GUESS, REACTIVE_RECOMPUTING_DEPS, CONFIG_LAGS, EFFECT_TRACKED, REACTIVE_RELEASE_AFTER, REACTIVE_MISSED_WAKE, REACTIVE_JOINED, REACTIVE_STAGED_READ, REACTIVE_WINDOW, REACTIVE_LANE_READ, REACTIVE_SCREEN_READ, REACTIVE_PROBE_UNANSWERED, CAUGHT_REARMED, CONFIG_PROMOTED, CONFIG_INPUTS_PUBLISHED, WINDOW_KINDS, CONFIG_FRESH_READ, REACTIVE_OWNER_READS, REACTIVE_IN_HEAP_HEIGHT, CONFIG_SLOT_NODE, EFFECT_USER, NewSet, STATUS_NONE } from \"./constants.js\";\n\nimport { NotReadyError } from \"./error.js\";\n\nimport { link, dormantNodes, clearDeps, trimStaleDeps, deferReleases, deferredReleases } from \"./graph.js\";\n\nimport { insertIntoHeap, deleteFromHeap, insertIntoHeapHeight, enqueueSub, markNode, markHeap, liftOwned } from \"./heap.js\";\n\nimport { checkCaughtRead } from \"./dev.js\";\n\nimport { inheritId, linkChild, disposeChildren, markDisposal } from \"./owner.js\";\n\nimport \"./lanes.js\";\n\nimport { schedule, inEffectCallback, effectCallbackEvent, effectCallbackOwner, setEffectCallback, ANY_EVENT, externalUntrackHook, clock, txOf, flushTransaction, laneWriteHook, joinFuture, observeFlightHook, queuePendingNode, globalQueue, notifyEpoch, insertSubs, dirtyQueue, laneStageHook, passLane, resolveTx, laneReadHook, laneServedHook, wireExternalSourceHook, bumpNotifyEpoch, laneAdoptHook, setPassLane, joinPassTx, freshHook, passHook, holdWorkHook, GlobalQueue, laneOutcomeHook, holdNode, laneDirty, passTx, heldTrim, keepReadersHook, holdStagingHook, staleReader, laneSeamsHook, adopted, deferZombie, stagedReaders, revertHook, heldRewrites } from \"./scheduler.js\";\n\n// A tracked effect's heap visit is its empty compute phase, then the user\n// queue: routing through the heap orders the run after the commit whatever\n// phase the write came from (#3291).\nGlobalQueue._e = e => {\n if (e.i === EFFECT_TRACKED) {\n deleteFromHeap(e, dirtyQueue);\n e.Ae = true;\n globalQueue.enqueue(EFFECT_USER, e.Z);\n }\n // A zombie's fate is the seam's; it runs now only for its lane's re-staging,\n // which shows ahead of any park (#3463).\n else if (e.R & REACTIVE_ZOMBIE && !(e.R & REACTIVE_LANE_DIRTY)) deferZombie(e);\n // A lane frame member follows mainline writes only: the lane's dirty is\n // cancelled (#3698, #4137). Folded away without the lane engine.\n else if (laneStageHook && e.R & REACTIVE_ZOMBIE && laneFrameMember(e)) {\n deleteFromHeap(e, dirtyQueue);\n e.R &= -65540;\n }\n // A reader the landing re-derives whose frame flight the seam parked\n // adopts it at its turn (verdict.ts `adoptParked`, D-25, F-9).\n else if (!(laneAdoptHook && e.T?.He && laneAdoptHook(e, 1))) recompute(e);\n};\n\n/** The nearest non-zombie owner carries a lane's value or, an effect, is\n * listed in a lane. */ function laneFrameMember(e) {\n let t = e._parent;\n while (t.R & REACTIVE_ZOMBIE) t = t._parent;\n return (t.l & (CONFIG_OVERRIDE | CONFIG_GUESS)) === CONFIG_OVERRIDE || t.i && t.T?.Re?.P;\n}\n\nGlobalQueue.Ce = disposeChildren;\n\nlet tracking = false;\n\nlet context = null;\n\nlet snapshotCaptureActive = false;\n\n/** The lane at the root of the running chain of first passes, inherited by\n * every first pass under it (#4166). */ let laneRoot;\n\nlet snapshotSources = null;\n\nfunction ownerInSnapshotScope(e) {\n while (e) {\n if (e.Oe) return true;\n e = e._parent;\n }\n return false;\n}\n\nfunction setSnapshotCapture(e) {\n snapshotCaptureActive = e;\n if (e && !snapshotSources) snapshotSources = new NewSet;\n}\n\n/** Mark `owner` a snapshot scope: readers created under it serve each\n * source's value from when hydration began and replay at\n * `releaseSnapshotScope`. With `served`, `owner` is a hydrated computed and\n * `served` its server answer: it becomes the node's snapshot if it has none. */ function markSnapshotScope(e, t) {\n if (arguments.length < 2) e.Oe = true; else if (snapshotCaptureActive && e.T?.De === undefined) takeSnapshot(e, t);\n}\n\nfunction releaseSnapshotScope(e) {\n e.Oe = false;\n releaseSubtree(e);\n schedule();\n}\n\nfunction releaseSubtree(e) {\n let t = e.pe;\n while (t) {\n if (t.Oe) {\n t = t.Ge;\n continue;\n }\n if (t.X) {\n const e = t;\n e.l &= ~CONFIG_IN_SNAPSHOT_SCOPE;\n if (e.R & REACTIVE_SNAPSHOT_STALE) {\n e.R &= ~REACTIVE_SNAPSHOT_STALE;\n e.R |= REACTIVE_DIRTY;\n if (dirtyQueue.Fe > e.he) dirtyQueue.Fe = e.he;\n insertIntoHeap(e, dirtyQueue);\n }\n }\n releaseSubtree(t);\n t = t.Ge;\n }\n}\n\nfunction clearSnapshots() {\n if (snapshotSources) {\n for (const e of snapshotSources) {\n // Assign, never `delete`: deleting pushes `_x` to dictionary mode.\n const t = e.T;\n if (t != null) t.De = undefined;\n }\n snapshotSources = null;\n }\n snapshotCaptureActive = false;\n}\n\nfunction recompute(e, t = false) {\n // Any recompute can clean a marked subscriber: invalidate the skip (§12d).\n bumpNotifyEpoch();\n const n = e.i;\n let o;\n let E = NOT_PENDING;\n // Lanes: a pass is seated by its node. A node carrying a lane's value runs\n // as the lane's whoever dirtied it; a guess's own pass is its truth arriving,\n // the frame's (F-11). A first pass takes its creator's lane, except under a\n // verdict lane: a mount there is mainline (D-25, #3851). Restored at the end.\n // Folded away without the lane engine.\n const s = passLane;\n // The mount a first pass belongs to, inherited from its creator (#4166).\n const l = laneRoot;\n const r = laneStageHook && (laneRoot = t && (s || l));\n // The seam's re-derive runs with its parked flight current; a later pass\n // asks its own question (D-25, verdict.ts `reask`).\n if (laneAdoptHook && !t && e.T) {\n const t = e.T.He;\n if (t ? t !== e.T.Ee && (e.T.He = undefined, 1) : e.l & CONFIG_OVERRIDE && !(e.R & REACTIVE_LANE_DIRTY)) laneAdoptHook(e, 2);\n }\n if (laneStageHook) {\n const n = t ? creatorPass(context) : null;\n const o = n?.R | 0;\n // A first pass under a pass that probed is the mount the probe gates, and so\n // is what that pass creates (D-25, S-46, S-58, #4806).\n if (o & REACTIVE_PROBED || n && (n.l & CONFIG_MOUNT_AHEAD && n.m & STATUS_UNINITIALIZED || n.i === EFFECT_RENDER && n._ && hasDep(n, e => e.l & CONFIG_VERDICT, n._))) e.l |= CONFIG_MOUNT_AHEAD;\n setPassLane((e.R & REACTIVE_LANE_DIRTY || (e.l & (CONFIG_OVERRIDE | CONFIG_GUESS)) === CONFIG_OVERRIDE) && e.T?.Re?.P ? e.T.Re : // Loose `!=`: false with no creator lane (undefined == null).\n s?._parent.Pe != s && o & REACTIVE_RECOMPUTING_DEPS ? s : null);\n }\n // An error a pass staged, which this pass replaces.\n const a = e.l & CONFIG_STAGED_ERROR;\n let i;\n if (!t) {\n deleteFromHeap(e, dirtyQueue);\n // A pending flight is the hold's own work (#3884), and so is a held async\n // memo's re-run with no window of its own (D-25, `holdWork`): clear the\n // verdict posture before the flight is superseded, or a frame read would\n // settle it and drop the hold. Not an effect. Folded away without the lane\n // engine.\n if (laneStageHook && !n && (e.m & STATUS_PENDING || (e.l & (CONFIG_ASYNC | CONFIG_OWN_PROBE | CONFIG_HELD)) === (CONFIG_ASYNC | CONFIG_HELD))) e.l &= ~CONFIG_VERDICT;\n if (e.T !== null) {\n e.T.Ee = null;\n // Supersede kills an iterator flight (#3122).\n releaseFlightTeardown(e);\n }\n // A pass over a held derivation joins its hold (D-1); a node held with nothing\n // staged joins too. Not a render effect or boundary structure: outside its\n // hold's flush the frame publishes mainline (#4283). A frame born into the\n // hold keeps staging (#4010).\n if (e.l & CONFIG_HELD) {\n const t = txOf(e);\n // Under a blocked lane the frame joins nothing: a lane never holds a sync\n // write (#3460). An answered deferred node's re-pass lags and joins nothing\n // (D-40). A verdict reader born into the hold is its own work (D-25, D-12,\n // #4467). `EFFECT_RENDER << 23` is CONFIG_FRAME.\n if (t.P || e.l & CONFIG_LAGS) ; else if (!(e.l & (CONFIG_VERDICT | EFFECT_RENDER << 23)) || observeFlightHook && !(e.l & EFFECT_RENDER << 23) && bornInto(e, t)) joinPassTx(t, freshHook?.(e, e.m & STATUS_UNINITIALIZED)); else if (t !== flushTransaction && !(e.m & STATUS_UNINITIALIZED || e.l & CONFIG_HELD_FRAME)) {\n // Published mainline, the frame is replaced on the spot and the landing\n // re-derives a held one (#3404). Readers of the superseded staging re-derive\n // even if the value is unchanged (#4378).\n if ((E = e.ue) !== NOT_PENDING) insertSubs(e);\n e.ue = NOT_PENDING;\n e.l &= ~CONFIG_HELD;\n }\n }\n // Children of a pass still awaiting its commit were never shown and die now;\n // otherwise they are the frame and park until this pass commits.\n if (n === EFFECT_TRACKED || e.l & CONFIG_STAGED) {\n // Lazy nodes only those children read release at this pass's end unless\n // re-read (#4142). A throwing cleanup is rethrown when the flush ends.\n const t = deferredReleases;\n deferReleases(o = []);\n disposeChildren(e);\n deferReleases(t);\n } else if (e.pe !== null || e.ke !== null) parkChildren(e);\n // This pass replaces a staged error (D-41, #4109, #4145); a held one stays\n // `latest`'s answer while this pass's flight is up (D-22). `linked`: the pass\n // had sources.\n if (passHook) {\n i = e.C !== null;\n // Only a node with an error to keep pays the call.\n if (e.T !== null && (e.l & CONFIG_STAGED_ERROR || e.T.Ft !== undefined)) passHook(e);\n }\n if (e.l & CONFIG_STAGED_ERROR) {\n e.ue = NOT_PENDING;\n e.l ^= CONFIG_STAGED_ERROR;\n }\n }\n const I = e.m & STATUS_UNINITIALIZED;\n // Capture error and pending before the compute clears them: a dropped source\n // can leave blocked dependents outside its settle walk.\n const _ = e.m & STATUS_ERROR && e.T?.U;\n const N = (e.m & STATUS_PENDING) !== 0;\n const u = N && e.T?.se;\n // A node whose own flight parked dependents, superseded and settled\n // synchronously here, settles them here: its landing never will (#3181).\n const f = e.T?.se?.has(e);\n // This pass's error is staged, not published (D-41).\n let T = false;\n // A `refresh()` is quiet unless the question in flight is new (F-9), or a\n // guess's new question is still held (#4336). A held user write is not an\n // answer, so a refresh over it is a re-ask (D-34, #4887, #4888).\n let S = (e.R & REACTIVE_REASK) !== 0 && !((e.m & STATUS_PENDING || e.ue !== NOT_PENDING && !(e.R & REACTIVE_MANUAL_WRITE)) && e.T !== null && !e.T.Ve);\n const A = context;\n context = e;\n e._ = null;\n e.de++;\n // REACTIVE_ZOMBIE is position (on its owner's parked frame), so every per-pass\n // wipe keeps it (#3543). A release found while queued is this pass's tail's (#4474).\n const c = e.R & REACTIVE_RELEASE_AFTER;\n e.R = REACTIVE_RECOMPUTING_DEPS | e.R & (REACTIVE_ZOMBIE | REACTIVE_REASK);\n e.ie = clock;\n // The previous value: the staging, else the committed value.\n let R = e.ue !== NOT_PENDING ? e.ue : e.le;\n let C = e.he;\n let O = false;\n // Whether this pass read the future, or for a lane's mount, this flush's staging (#3851, #4166).\n let d = false;\n let D = tracking;\n tracking = true;\n try {\n // The sync fast arm is prod-only, so dev checks sync nodes too (D-42).\n if (!false && e.l & CONFIG_SYNC) {\n R = e.X(R);\n if (e.T !== null) e.T.Ee = null;\n e.Ie = false;\n } else {\n // A projection self-registers its flight; its undefined return is not an answer.\n const t = e.T?.Ee;\n const n = e.X(R);\n const o = typeof n === \"object\" && n !== null;\n const E = e.T?.Ee !== t;\n // Dev: a body that returned after a read threw into it caught the throw,\n // unless it returned the flight the throw became (D-42).\n if (false) ;\n R = E || !o ? n : handleAsync(e, n);\n if (!E && !o) {\n if (e.T !== null) {\n e.T.Ee = null;\n if (holdWorkHook) e.l &= ~CONFIG_ASYNC;\n }\n // A sync return is the first real answer.\n e.Ie = false;\n }\n }\n // No `_x` means no status to clear. Lane work served the committed value of a\n // flight in the air keeps its pending, so a boundary keeps its fallback\n // (F-4, #4862).\n if ((e.m !== 0 || e.T !== null) && !(laneServedHook && e.m & STATUS_PENDING && laneServedHook(e, null, true))) clearStatus(e, t);\n } catch (t) {\n const n = t instanceof NotReadyError;\n // An error or a loading window's unready read answers: no flight is its own\n // (D-25, `holdWork`). A pending pass keeps the last answer's.\n if (holdWorkHook && (!n || e.Ie)) e.l &= ~CONFIG_ASYNC;\n if (n && e.Ie) {\n // Loading window: register for the source's settle with no visible pending;\n // the loading value keeps serving and an error stays the answer.\n parkLoadingWindow(e, t);\n } else {\n // A held pass, or one that read this flush's staging, stages its error (D-41).\n if (n || !(T = stageError(e, t, true))) {\n if (n) ext(e).fe = true;\n notifyStatus(e, n ? STATUS_PENDING : STATUS_ERROR, t);\n // If no new flight re-owned self, retire the superseded flight's copies.\n if (n && f && !e.T?.Ee) settlePendingSource(e);\n }\n // A re-park drops sources this pass no longer reaches, from dependents that\n // reached them only through here; their landing walk stops at this node and\n // would never find them (#3456, #4541). Dependents with another path keep\n // the source. A still-pending source has its own walk to come.\n if ((n || T) && u) for (const t of u) if (t !== e && !(e.T?.se?.has(t) && (t.m & STATUS_PENDING || retryReaches(e, t)))) settlePendingSource(e, t);\n }\n } finally {\n tracking = D;\n if (laneStageHook) laneRoot = l;\n // Consume the missed-wake latch (#3037). The wipe below must not key off\n // DIRTY/CHECK, which `read`'s pull sets as bookkeeping.\n O = (e.R & REACTIVE_MISSED_WAKE) !== 0;\n // A mount's staged read joins it, except a nested derivation left pending: no\n // render effect reaches it, so it holds nothing (F-3, #4203, #4340).\n d = !!(e.R & (r ? s || n || !(e.m & STATUS_PENDING) ? REACTIVE_JOINED | REACTIVE_STAGED_READ : 0 : REACTIVE_JOINED));\n // A verdict reader is one only while it probes or reads a memo that does\n // (D-25). Folded away without the verdict engine.\n if (observeFlightHook) e.l = e.l & 1073709055 | e.R & REACTIVE_PROBED | (e.R & REACTIVE_WINDOW) << 9 | (e.R & REACTIVE_AHEAD) << 11;\n // REACTIVE_DISPOSED survives: the pass may have disposed its own owner (#3621).\n // REACTIVE_FRAME_READ is this pass's verdict for the landing.\n e.R = e.R & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED | REACTIVE_FRAME_READ | REACTIVE_STAGED_READ | REACTIVE_LANE_READ | REACTIVE_SCREEN_READ | REACTIVE_PROBE_UNANSWERED) | (t ? e.R & REACTIVE_SNAPSHOT_STALE : 0);\n context = A;\n if (o) for (const e of o) releaseIfSettledUnobserved(e);\n // A pending pass on a `refresh()`, or one that read only committed values,\n // is a quiet re-ask (F-9). Asked only of a pending pass: the dep walk is too dear.\n if (i && !S && e.m & STATUS_PENDING) S = !!passHook(e, 1);\n if (e.T !== null) e.T.Ve = S && (e.m & STATUS_PENDING) !== 0;\n }\n // A node that died during its own pass is void: unlink the reads made after\n // `dispose()`, retire its flight, and publish nothing (#3024, #3621).\n if (e.R & REACTIVE_DISPOSED) {\n clearDeps(e);\n clearInFlight(e);\n if (laneStageHook) setPassLane(s);\n return;\n }\n // The lane this pass is work of. A pass that read none of the lane's world\n // has left it; a guess never leaves this way.\n let p = !laneStageHook ? null : passLane;\n // False: the pass left the lane.\n const G = !!e.T?.U || T;\n if (laneStageHook && p !== null) {\n if (laneStageHook(e, p, t, G)) setPassLane(p); else p = null;\n }\n if (!G) {\n // INV-11 (#3330): compare against the slot this run publishes to.\n const o = e.ue === NOT_PENDING;\n const E = !o ? e.ue : e.le;\n // A throwing comparator is contained in `isSame` (#2837, #4111). Replacing a\n // staged error is a new answer even at the committed value (D-41, #4403); a\n // re-pass equal to a first value staged this frame changes nothing (#4540).\n const s = flushTransaction ?? passTx;\n const l = o && I && !n || !!e.T?.Te || \n // In a flush that joined a hold, a recovery to the last good value is a\n // change of answer (D-41, S-53).\n !!(_ && s) || !!a || \n // Lane work on a node a held pass created has no screen: its value is a\n // change (F-11, #3835).\n p !== null && e._parent?.l & CONFIG_HELD || !isSame(e, E, R);\n // Effects use `_equals: false`; flag and enqueue here. `!create`: `effect()`\n // runs the first pass itself.\n if (n && l && \n // A stale lane reader that computed what it last applied owes no run.\n !(e.R & REACTIVE_SCREEN_READ && !e.Ae && Object.is(e.ge, R)) && \n // A re-staging pass owes no run: the commit replays the effect (#3802).\n o) {\n e.Ae = !e.T?.U;\n // One bound runner per effect. Lane work's run is the lane's; a first pass's\n // run is `effect()`'s to queue (#4557).\n if (!t) globalQueue.enqueue(n, e.W ??= GlobalQueue.q.bind(null, e), p);\n }\n // A guess's own pass from the frame is its truth: staged under the lane's\n // parent, notifying only a correction (F-11, D-34). Hook first, so a build\n // without lanes folds it.\n if (laneOutcomeHook && !t && p === null && e.l & CONFIG_GUESS && laneOutcomeHook(e, R, G)) ; else if (G) ; else if (l) {\n // A first pass is born held (staged, committed with the hold) when the flush\n // has joined a hold and the pass read a held node, or a verdict lane's mount\n // read this flush's staging (#3851), or a held pass created it (D-1). Any\n // other first pass publishes and re-derives if the flush parks. An effect\n // with an uncommitted staging re-stages.\n if (p !== null) {\n // Lane work stages for the lane's next seam. An effect born held re-stages.\n if (n && e.ue === NOT_PENDING) e.le = R; else e.ue = R;\n // A derivation born in the lane has no committed value until the lane lands.\n // Not an effect: marked uninitialized it re-ran without end (#4871).\n if (t && !n) e.m |= STATUS_UNINITIALIZED;\n } else if (t ? !(s !== null && (d || creatorPass(A)?.R & REACTIVE_JOINED)) : n && e.ue === NOT_PENDING) {\n // A first pass or an effect publishes directly. A memo stages even in a quiet\n // world: mid-batch pulls must see the fresh value while plain reads stay\n // committed until flush (#3009).\n e.le = R;\n } else {\n e.ue = R;\n // A staged recovery keeps the error on display until it commits (D-41).\n if (_) e.T.Te = _;\n // Born held: a read of it this tick is a read of the hold's world.\n if (t) {\n holdNode(e, s);\n // No committed value until the landing (F-9).\n e.m |= STATUS_UNINITIALIZED;\n // A boundary that has not shown content catches it (#3540), unless the mount\n // is part of the hold itself: then it appears at the commit (D-12).\n freshHook?.(e, !r && flushTransaction);\n }\n }\n // Lane work notifies its members as lane work (`laneDirty`).\n if (e.o !== null) p !== null ? laneDirty(e, p) : insertSubs(e);\n } else if (e.he != C) {\n for (let t = e.o; t !== null; t = t.t) insertIntoHeapHeight(t.u, dirtyQueue);\n }\n // Silent recovery to an unchanged value: re-run dependents still holding the\n // propagated error (#2949).\n if (!l && !e.T?.U) {\n if (_) settleErroredDependents(e, _);\n // Self-registration is the #3181 sweep's below.\n if (u) for (const t of u) if (t !== e) settlePendingSource(e, t);\n }\n // A synchronous settle supersedes the old landing callback, so this pass\n // sweeps (#3181). An uninitialized node with no replacement stays parked.\n if (f && !(e.m & (STATUS_PENDING | STATUS_UNINITIALIZED))) settlePendingSource(e);\n }\n // A first pass gone pending where it would have been born held is held: its\n // answer is the hold's (D-1). Under a boundary that has not shown content it\n // is held but the hold does not wait for it (F-4, #3540); an `on` re-arm owns\n // it (D-12). A derivation left pending reaches no boundary (#4542).\n if (t && p === null && d && e.m & STATUS_PENDING) {\n const t = flushTransaction ?? passTx;\n t && !t.P && (n && freshHook?.(e) === CAUGHT_REARMED || holdNode(e, t));\n }\n // Dependencies are the committed frame's until it is replaced (D-10, #3410):\n // a staging leaves the old tail for `commitPendingNode` to trim. An errored\n // pass keeps its list. An effect trims when its run applies (#3438). An\n // unchanged pass waits on the flush's verdict (#3469). Creation passes and\n // tracked effects trim now; lane work counts as unchanged.\n if (!e.T?.U && (p !== null || e.ue === NOT_PENDING) && !(n && e.Ae)) {\n if (t || n === EFFECT_TRACKED) trimStaleDeps(e); else heldTrim(e);\n }\n // Queue for this flush's commit: a staged value, a parked frame, or status\n // to settle. A first pass only when pending or born held. Its children stay\n // CONFIG_STAGED until then.\n if (e.ue !== NOT_PENDING || e.T !== null && (e.T.me !== null || e.T.Le !== null) || (e.m & (STATUS_PENDING | STATUS_UNINITIALIZED)) !== 0 && (!t || (e.m & STATUS_PENDING) !== 0)) {\n e.l |= CONFIG_STAGED;\n // Lane work is the lane's to reveal.\n if (p === null) queuePendingNode(e);\n }\n if (laneStageHook) setPassLane(s);\n // Missed wake: values read before the nested commit are stale, so run again.\n // Equality gates keep it convergent.\n if (O) {\n enqueueSub(e);\n schedule();\n }\n // Re-derived to the staging it superseded: held readers keep their pass (#4417).\n if (keepReadersHook && E !== NOT_PENDING && Object.is(R, E)) keepReadersHook(e);\n // A release a settle deferred past this pass (#2934, #4474).\n if (c) releaseIfSettledUnobserved(e);\n}\n\nfunction updateIfNecessary(e) {\n // Never re-enter a computing node: its dep bookkeeping is live (#3037).\n // Never recompute a disposed node: it would come back alive (#2983).\n if (e.R & (REACTIVE_RECOMPUTING_DEPS | REACTIVE_DISPOSED)) return;\n if (e.R & REACTIVE_CHECK) {\n for (let t = e.C; t; t = t.G) {\n const n = t.S;\n if (n.X) {\n updateIfNecessary(n);\n }\n if (e.R & REACTIVE_DIRTY) {\n break;\n }\n }\n }\n if (e.R & REACTIVE_DIRTY || e.T?.U && e.ie < clock && !e.T?.Ee) {\n recompute(e);\n }\n // The pass may have disposed the node (#3621): carry the flag. The manual\n // write mark is state, lifted only by a re-deriving pass or the commit\n // (D-8, #3612); keep the last pass's landing verdicts too.\n e.R = e.R & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT | REACTIVE_ZOMBIE | REACTIVE_DISPOSED | REACTIVE_MANUAL_WRITE | REACTIVE_FRAME_READ | REACTIVE_STAGED_READ | REACTIVE_LANE_READ | REACTIVE_SCREEN_READ | REACTIVE_PROBE_UNANSWERED);\n}\n\nfunction computed(e, t) {\n const n = t?.transparent ?? false;\n // `in`: an explicit `loadingValue: undefined` is a real commit #0.\n const o = t !== null && typeof t === \"object\" && \"loadingValue\" in t;\n // One literal per tier, chosen at build time. Observe adds `_name`/`_loc` as\n // literal slots: a later write forces a hidden-class transition on every\n // node. Keep the two in sync; the dist artifact test pins the key sets.\n const E = {\n id: inheritId(t, n, context),\n l: (n ? CONFIG_TRANSPARENT : 0) | (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (!context || t?.lazy ? CONFIG_AUTO_DISPOSE : 0) | (t?.sync ? CONFIG_SYNC : 0) | (t?.ae ? CONFIG_NO_SNAPSHOT : 0) | (t?.xe ?? 0) | (snapshotCaptureActive && ownerInSnapshotScope(context) ? CONFIG_IN_SNAPSHOT_SCOPE : 0),\n ye: t?.equals ?? isEqual,\n ke: null,\n A: context?.A ?? defaultContext,\n be: 0,\n X: e,\n le: o ? t.loadingValue : undefined,\n he: 0,\n ve: undefined,\n We: null,\n C: null,\n _: null,\n de: 0,\n o: null,\n Ze: null,\n _parent: context,\n Ge: null,\n Me: null,\n pe: null,\n R: t?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,\n m: o ? 0 : STATUS_UNINITIALIZED,\n ie: clock,\n ue: NOT_PENDING,\n we: -1,\n Ie: o,\n // Cold fields live in `_x`: past ~39 in-object fields creation cost ~4x (§12).\n T: null\n };\n if (t?.unobserved) ext(E).Ye = t.unobserved;\n setupComputedNode(E, t);\n return E;\n}\n\n/** Lazily allocate the cold extension. Hot paths read `el._x?._field` behind\n * `_config` bits; never call `ext()` just to store a default. */ function ext(e) {\n return e.T ??= {\n Ee: null,\n Se: null,\n U: undefined,\n fe: undefined,\n se: undefined,\n Ye: undefined,\n De: undefined,\n me: null,\n Le: null,\n Re: null,\n Ve: false,\n je: NOT_PENDING,\n Be: -1,\n ce: 0,\n Ue: false,\n I: 0,\n Te: null\n };\n}\n\n/** A tracked read of a held node joins the flush to its hold (D-1), unless the\n * reader is a render effect: the frame reads the committed value outside its\n * hold's flush (D-25, `frameRead`). A node born held has no committed value,\n * so every reader joins. Under a boundary that has not shown content, a first\n * pass is the boundary's (F-4, #3540). */\n/** The pass whose plain read made this flush adopt a hold: a window it then\n * opens can give the hold back (#4777). */ let adopter = null;\n\nfunction setAdopter(e) {\n adopter = e;\n}\n\nfunction joinPass(e, t) {\n if (observeFlightHook && !flushTransaction) adopter = e, adopted.length = 0;\n e.R |= REACTIVE_JOINED;\n // A new memo's first pass is the hold's work but not the tick's: the render\n // effect reading it decides (F-3, #3540).\n if (t.m & STATUS_UNINITIALIZED || e.i !== EFFECT_RENDER) joinPassTx(txOf(t), !e.i && e.m & STATUS_UNINITIALIZED || freshHook?.(e));\n}\n\n/** `joinPass` into hold `t` (a folded guess, D-34); never a render effect. */ function joinPassAt(e, t) {\n e.R |= REACTIVE_JOINED;\n joinPassTx(t, !e.i && e.m & STATUS_UNINITIALIZED || freshHook?.(e));\n}\n\n/** A frame reader of a node another hold holds is served the committed value,\n * publishes mainline and re-derives at that landing (D-25). Not one born\n * into that hold (#4010), nor a flight whose inputs already show: that would\n * tear (F-1, #3305). Lane work is a frame reader too: a lane sees the screen\n * plus its own guesses (F-6). */ function frameRead(e, t) {\n // Frame readers: render effects, verdict readers and lane work (D-25); a\n // boundary's tree and output too (#4283). Not a mount's memo: the hold's own\n // later passes read it (D-1). Not a pass with only an inherited posture\n // reading the hold's own write (D-25, #4544).\n const n = observeFlightHook && e.l & CONFIG_VERDICT;\n const o = laneStageHook && passLane !== null;\n // A render effect a probing pass is mounting is born held on the hold's\n // staging or flight, whatever else it read (D-25, S-46, S-58). Not lane work\n // reading a held node that is not pending. Folded away without lanes.\n if (laneStageHook && e.l & CONFIG_MOUNT_AHEAD && e.m & STATUS_UNINITIALIZED && (!o || t.m & STATUS_PENDING)) {\n joinPass(e, t);\n return false;\n }\n if (!(n && holdStagingHook(e, t)) && !((!o || e.m & STATUS_UNINITIALIZED && t.m & STATUS_PENDING) && !n && (!(e.l & EFFECT_RENDER << 23) || t.l & CONFIG_INPUTS_PUBLISHED))) {\n const E = txOf(t);\n // Lane work and verdict readers are never the hold's pass, except a lane\n // re-based over this hold's answer: it reads that staging without joining\n // (F-1, F-7, D-34; #4536, #4576, #4643).\n if (o && passLane.over && resolveTx(passLane.over) === E && !n) return false;\n if (!(!o && E === flushTransaction && !n || bornInto(e, E))) {\n staleReader(e, E);\n // They no longer wait on `el`'s flight.\n if (o || n) laneServedHook(e, t);\n return true;\n }\n }\n joinPass(e, t);\n return false;\n}\n\n/** Born into `t`: held and never committed, or a member of a frame its held\n * pass built. It reads `t`'s values in any flush and keeps staging (#4010). */ function bornInto(e, t) {\n return (e.m & STATUS_UNINITIALIZED || e.l & CONFIG_HELD_FRAME) && e.l & CONFIG_HELD && txOf(e) === t;\n}\n\n/** With `tail`, this pass's reads only. */ function hasDep(e, t, n) {\n for (let o = e.C; o !== null; o = o === n ? null : o.G) if (t(o.S)) return 1;\n}\n\n/** A staging a verdict pass reads for the first time is content it opens,\n * not a value it keeps (D-25, S-46, #4806). */ let fresh;\n\nfunction readsFresh(e, t) {\n return t.ue !== NOT_PENDING && e.l & CONFIG_VERDICT && !hasDep(e, e => e === t);\n}\n\n/** The computed a creation under `owner` belongs to, or null. */ function creatorPass(e) {\n return e !== null && e.Qe ? e.Ke : e;\n}\n\n/** Whether the passes running around `p` read the future or a staging: a pass\n * they created has no screen (#4341). */ function creatorReads(e, t) {\n return (e = creatorPass(e._parent))?.R & REACTIVE_RECOMPUTING_DEPS ? creatorReads(e, t | e.R) : t & (REACTIVE_JOINED | REACTIVE_STAGED_READ);\n}\n\n/** Park the previous pass's children and disposal list until this node's\n * commit replaces them. */ function parkChildren(e) {\n markDisposal(e);\n const t = ext(e);\n t.Le = e.ke;\n t.me = e.pe;\n e.ke = null;\n e.pe = null;\n e.be = 0;\n}\n\n/** One literal with every effect field, so V8 sees the full shape at construction. */ function createEffectNode(e, t, n, o, E) {\n const s = E?.transparent ?? false;\n // See `computed()` for the observe slots.\n const l = {\n id: inheritId(E, s, context),\n l: \n // CONFIG_FRAME for a render effect.\n o << 23 | (s ? CONFIG_TRANSPARENT : 0) | (E?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (E?.sync ? CONFIG_SYNC : 0) | (E?.xe ?? 0) | (snapshotCaptureActive && ownerInSnapshotScope(context) ? CONFIG_IN_SNAPSHOT_SCOPE : 0),\n ye: false,\n ke: null,\n A: context?.A ?? defaultContext,\n be: 0,\n X: e,\n le: undefined,\n he: 0,\n ve: undefined,\n We: null,\n C: null,\n _: null,\n de: 0,\n o: null,\n Ze: null,\n _parent: context,\n Ge: null,\n Me: null,\n pe: null,\n R: REACTIVE_LAZY,\n m: STATUS_UNINITIALIZED,\n ie: clock,\n ue: NOT_PENDING,\n we: -1,\n Ie: false,\n Ae: false,\n ge: undefined,\n qe: t,\n Je: n,\n ze: undefined,\n i: o,\n T: null\n };\n // Effects share one status notifier (`statusNotifierOf`): a per-node one\n // forced an `_x` on every effect (+23% creation).\n if (E?.unobserved) ext(l).Ye = E.unobserved;\n setupComputedNode(l, lazyOptions);\n return l;\n}\n\n/** The shared effect status notifier, installed by effect.ts. */ let effectStatusNotify = null;\n\nfunction setEffectStatusNotify(e) {\n effectStatusNotify = e;\n}\n\n/** Effect nodes get the shared notifier; presence also marks a display consumer. */ function statusNotifierOf(e) {\n return e.i ? effectStatusNotify : null;\n}\n\nconst lazyOptions = {\n lazy: true\n};\n\nfunction setupComputedNode(e, t) {\n e.We = e;\n const n = context?.Qe ? context.Ke : context;\n if (context) linkChild(context, e);\n if (n) e.he = n.he + 1;\n wireExternalSourceHook?.(e);\n !t?.lazy && recompute(e, true);\n if (snapshotCaptureActive && !t?.lazy) {\n if (!(e.m & STATUS_PENDING) && !(e.l & CONFIG_NO_SNAPSHOT)) takeSnapshot(e, e.le);\n }\n}\n\nfunction signal(e, t) {\n // See `computed()`. Observe adds `_name`, `_loc` and `_owner` (for owner paths).\n const n = {\n ye: t?.equals ?? isEqual,\n l: (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (t?.ae ? CONFIG_NO_SNAPSHOT : 0),\n le: e,\n o: null,\n Ze: null,\n ie: clock,\n ue: NOT_PENDING,\n // No `_time`/`_fn`/`_statusFlags`: stores make one signal per touched leaf,\n // so signal bytes are store bytes. Missing reads falsy on shared paths (§12e).\n we: -1,\n T: null\n };\n if (t?.unobserved) ext(n).Ye = t.unobserved;\n if (snapshotCaptureActive && !(n.l & CONFIG_NO_SNAPSHOT)) takeSnapshot(n, e);\n return n;\n}\n\nfunction isEqual(e, t) {\n return e === t;\n}\n\n/** A store slot node in one literal: target and key as back-refs, the wrap\n * cache (`px`/`pxv`) and accessor verdict pre-shaped. No options, no `_x`,\n * no expandos. Observe adds label and location slots. */ function slotSignal(e, t, n, o, E) {\n const s = {\n ye: t,\n l: CONFIG_OWNED_WRITE | CONFIG_SLOT_NODE,\n le: e,\n o: null,\n Ze: null,\n ie: clock,\n ue: NOT_PENDING,\n we: -1,\n T: null,\n O: n,\n Xe: o,\n acc: E,\n px: undefined,\n pxv: undefined\n };\n return s;\n}\n\n/** Dev: when set to a component name, a reactive read outside a nested\n * tracking scope warns. Managed by `untrack(fn, strictReadLabel)`. */\n/** The verdict windows' read, set while a window is open. */ let verdict = null;\n\nfunction setVerdict(e) {\n verdict = e;\n}\n\n/** Dev-only: runs `fn` inside the strict-read window labelled `label`, tracking\n * unchanged. Compiled dev DOM output wraps event handler expressions in it\n * (#1742). Production builds just call `fn`. */ function strictReadTracked(e, t = EVENT_HANDLER_READ) {\n return e();\n}\n\n/**\n * Runs `fn` outside of any reactive tracking — reads inside `fn` will not\n * subscribe the current scope. Returns whatever `fn` returns.\n *\n * Use `untrack` inside a memo or effect when you need to read a signal once\n * without making the surrounding computation depend on its future changes.\n *\n * `untrack` stops dependency tracking, not async settlement. Reading an\n * uninitialized async source still suspends the owning computation; it runs\n * again when that source first resolves. Afterward, the untracked read is a\n * snapshot and does not subscribe the computation to later changes.\n *\n * If the first read must return immediately, give the async source a\n * `loadingValue` before reading it with `untrack`. `isPending` and `latest`\n * inspect updates to an existing value; neither supplies a missing initial\n * value.\n *\n * Pass a `strictReadLabel` string to enable a dev-mode warning: any reactive\n * read inside `fn` that isn't inside a nested tracking scope will log a\n * warning naming the label.\n *\n * @example\n * ```ts\n * createEffect(\n * () => trigger(), // tracks `trigger` only\n * () => {\n * const snapshot = untrack(() => state); // read once, untracked\n * log(snapshot);\n * }\n * );\n *\n * const color = createMemo<string>(() => fetchColor(), { loadingValue: \"gray\" });\n * const initialColor = untrack(color); // \"gray\" while the fetch is unresolved\n * ```\n */ function untrack(e, t) {\n const n = tracking;\n tracking = false;\n try {\n if (externalUntrackHook) return externalUntrackHook(e);\n return e();\n } finally {\n tracking = n;\n }\n}\n\n/** > 0 while `runRefCallback` runs: a ref born into a held node's hold may\n * read its staging (#4767, F-7). */ let refCallbackDepth = 0;\n\n/** Runs a compiled `ref()` callback untracked in the creating pass's context\n * (#4761); in dev, creating a primitive there is PRIMITIVE_IN_EFFECT_CALLBACK.\n *\n * @internal */ function runRefCallback(e) {\n refCallbackDepth++;\n try {\n if (false) ; else untrack(e);\n } finally {\n refCallbackDepth--;\n }\n}\n\n/** A bookkeeping read on behalf of no node: it records no re-run link (#3528)\n * and no transaction entry (#3540) on `context`. */ let spectating = false;\n\nfunction prepareComputed(e, t) {\n if (e.R & REACTIVE_LAZY) {\n e.R &= ~REACTIVE_LAZY;\n recompute(e, true);\n } else if (e.R & REACTIVE_DISPOSED) {\n // Two disposal lifecycles share the flag (#3024): a dormant auto-dispose node\n // wakes on read (pay-for-use); an owner-disposed one is dead and serves its\n // last committed value, since recomputing runs user code in a torn-down tree.\n if (e.l & CONFIG_AUTO_DISPOSE) {\n const t = e._parent;\n if (t !== null) {\n // A dormant node was off the chain when its owner died (#3024).\n if (t.R & REACTIVE_DISPOSED) {\n e.l &= ~CONFIG_AUTO_DISPOSE;\n return;\n }\n // A zombie never left its chain: relinking would put it on the live one too.\n if (!(e.R & REACTIVE_ZOMBIE)) linkChild(t, e);\n }\n recompute(e, true);\n }\n } else ;\n}\n\n/** Does reader `c` see a staged node's committed value? Read's fast block\n * carries the same test inline. An untracked read and a frame-only reader\n * (createTrackedEffect / onSettled, D-29) see the committed frame. */ function readerSeesCommitted(e, t) {\n return !t || e.ue === NOT_PENDING || t.l & CONFIG_CHILDREN_FORBIDDEN;\n}\n\n/** Set when a node is staged outside a flush, cleared when a flush begins:\n * one module boolean keeps the F-10 arm free inside a flush. */ let unflushedStaged = false;\n\nfunction markUnflushedStaged() {\n unflushedStaged = true;\n}\n\n/** A write is visible from the flush that carries it (F-10): outside a flush\n * a staged node serves its committed value. Promoted writes are exempt. */ function unflushedValue(e) {\n if (globalQueue.Y || e.ue === NOT_PENDING || e.l & CONFIG_PROMOTED) return NOT_PENDING;\n // A held node was flushed and parked: not unflushed unless rewritten since,\n // then the flushed staging is what the world sees until the next flush.\n if (e.l & CONFIG_HELD) return e.T.Be === clock ? e.T.je : NOT_PENDING;\n return e.le;\n}\n\n/** The value a signal had when this tick began writing it (F-10). */ function tickBase(e) {\n return e.l & CONFIG_HELD && e.T?.Be === clock ? e.T.je : e.le;\n}\n\n/** A held node rewritten outside a flush keeps the last flushed staging until\n * the flush that carries the rewrite (F-10); the clock stamps the stash. */ function stashFlushed(e) {\n const t = e.T;\n if (t.Be !== clock) {\n // D-8: the flush checks whether the rewrite nets (verdict.ts `revert`).\n // Once per node per flush: the stamp below dedupes it.\n if (revertHook) heldRewrites.push(e);\n t.je = e.ue;\n t.Be = clock;\n unflushedStaged = true;\n }\n}\n\nconst promotedWrites = [];\n\n/** A derivation served the committed value because of an unflushed write runs\n * again in the flush that carries it: it linked after the write walked (F-10, #3337). */ function markLateLinker(e) {\n // A direct enqueue here would be wiped by the pass's flag reset.\n e.R |= REACTIVE_MISSED_WAKE;\n return true;\n}\n\nfunction resyncUnflushedCompanions() {\n unflushedStaged = false;\n // Length-guarded so the common flush allocates nothing.\n if (promotedWrites.length !== 0) {\n for (const e of promotedWrites) e.l &= ~CONFIG_PROMOTED;\n promotedWrites.length = 0;\n }\n}\n\nfunction pullComputed(e, t) {\n if (e.he >= dirtyQueue.Fe || e.R & REACTIVE_CHECK) {\n markNode(t);\n markHeap(dirtyQueue);\n updateIfNecessary(e);\n }\n // A fresh-pull waiter (awaitable refresh) recomputes a dirty source inline:\n // it must park on the re-ask, never read the pre-re-ask value as settled.\n else if (t.l & CONFIG_FRESH_READ) updateIfNecessary(e);\n const n = e.he;\n // parent check is shallow, might need to be recursive\n if (e._parent === t) e.R |= REACTIVE_OWNER_READS; else if (n >= t.he) liftOwned(t, t.he = n + 1);\n}\n\n/** A first answer staged this flush and re-asked in it (D-22, F-9): a memo\n * with no value derives from that answer once, as a flush of the answer\n * alone would have let it, then waits on the re-ask. One served pass a\n * flush (`_served`), or a pass that throws anyway re-runs without end. Not a\n * render effect, lane work, a verdict lane's pass (D-25) or a held node. */ function servesStaged(e, t, n) {\n return passLane === null && e.m & n.m & STATUS_UNINITIALIZED && t.ue !== NOT_PENDING && !(t.l & (CONFIG_HELD | CONFIG_STAGED_ERROR)) && !e.i && (e.R & REACTIVE_MISSED_WAKE || e.ue === NOT_PENDING && e.T?.$e !== clock && (!(e.m & STATUS_PENDING) || e.T?.se?.delete(n.T.U.source)) && (ext(e).$e = clock, \n e.R |= REACTIVE_MISSED_WAKE));\n}\n\n/** @internal Compiler output (`@solidjs/web`): truthy while the running pass is\n * a stale reader of an open hold (D-9). A grouped stateful prop binding then\n * skips an unchanged write, so a sibling's re-run does not put the committed\n * value back over the field (#4872). */ function heldRead() {\n return context.R & REACTIVE_FRAME_READ;\n}\n\n// Typed `any` so `el` needs no cast alias: an alias the minifier keeps.\nfunction read(e) {\n let t = context;\n if (t?.Qe) t = t.Ke;\n // The verdict windows' read (verdict.ts), off this path. It wakes a lazy or\n // dormant memo outside the window (#4366).\n if (verdict !== null) {\n return verdict(e, t);\n }\n if (typeof e.X === \"function\") prepareComputed(e);\n if (!e.X && e.T?.De === undefined && !snapshotCaptureActive && (!unflushedStaged || e.ue === NOT_PENDING) && // F-10, see readNodeFast\n !(e.l & CONFIG_OVERRIDE) && // lanes: the slow path's one arm\n true) {\n if (t) {\n if (laneStageHook) fresh = tracking && readsFresh(t, e);\n if (tracking) link(e, t);\n // A pass that reads a held value joins its hold, tracked or not (D-1): a\n // mainline derivation of a held write would tear (F-1). A first pass that\n // did is born held (F-7). Frame-only readers (D-29) and frame readers\n // (`frameRead`, D-25) see the committed value instead.\n if (e.l & CONFIG_HELD && !(t.l & CONFIG_CHILDREN_FORBIDDEN)) {\n if (frameRead(t, e)) {\n return e.le;\n }\n }\n }\n if (!t || e.ue === NOT_PENDING || t.l & CONFIG_CHILDREN_FORBIDDEN) {\n return e.le;\n }\n // Writes that netted are no proposal (D-8): not a read of the future, nor a\n // stale verdict read to re-run at the landing (#4485). `Object.is` too, for\n // signed zeros; `===` keeps an accepted NaN rewrite a proposal.\n const n = e.ue === e.le && Object.is(e.ue, e.le);\n // Lane work over a folded lane, once the frame has a transaction, reads the\n // screen (D-34).\n if (n || (observeFlightHook && t.l & CONFIG_VERDICT || laneStageHook && passLane?.folded) && stagedScreen(t, e)) {\n return e.le;\n }\n stagedRead(t);\n return e.ue;\n }\n // Decided after the pull below: a pull can join (D-25).\n let n = false;\n // Only a re-read retries an errored source (F-9).\n let o;\n if (t) {\n if (laneStageHook) fresh = tracking && readsFresh(t, e);\n if (tracking) {\n o = link(e, t);\n if (e.X) {\n pullComputed(e, t);\n // A memo over a verdict reader's value reads ahead as if it probed inline\n // (F-6, #4050). Not an effect, and not the hold's own work (born in its\n // world, or over its own staged pass): there a pending read throws (D-25,\n // #4504, #3884). The posture lasts until a pass completes having read no\n // verdict reader (D-25, #4408). A render effect never committed reading a\n // settled verdict reader's value reads ahead too (F-6, #4544).\n if (observeFlightHook && (t.m & STATUS_UNINITIALIZED ? t.l & CONFIG_HELD || flushTransaction : t.l & CONFIG_HELD_FRAME)) {\n if (t.i === EFFECT_RENDER && e.l & CONFIG_VERDICT && !(e.m & (STATUS_PENDING | STATUS_UNINITIALIZED))) t.R |= REACTIVE_AHEAD;\n // A sync verdict memo is display while only the display reads it (D-25,\n // #4776). The hold's own work reading it makes it the hold's: it re-derives\n // now on the hold's writes (`holdStaging`). A memo that probes in its own\n // body stays the screen's (F-6, #4544). An async derivation's read seats\n // nothing (S-51): the lane and the mount it gates would wait on each other\n // (#4965).\n if ((e.l & (CONFIG_VERDICT | CONFIG_FRAME | CONFIG_ASYNC | CONFIG_OWN_PROBE)) === CONFIG_VERDICT && !(t.l & CONFIG_ASYNC)) {\n const n = resolveTx(t.l & CONFIG_HELD ? txOf(t) : flushTransaction), o = ext(e);\n if (o.Dt !== n) {\n o.Dt = n;\n recompute(e);\n }\n }\n }\n if (observeFlightHook && !t.i) t.R |= e.l & CONFIG_VERDICT & (e.m & STATUS_PENDING && (t.l & CONFIG_STAGED || t.m & STATUS_UNINITIALIZED) ? t.l : -1);\n }\n }\n // A node born into the future has no committed value: every reader derives\n // from the future, a render effect included (D-1, F-7).\n if (e.l & CONFIG_HELD && !(e.l & CONFIG_OVERRIDE) && !(t.l & CONFIG_CHILDREN_FORBIDDEN)) {\n if (e.m & STATUS_UNINITIALIZED) joinPass(t, e); else n = frameRead(t, e);\n }\n }\n // After the pull, so the node is current. A pending member throws as any.\n if (laneReadHook && e.l & CONFIG_OVERRIDE) {\n const n = laneReadHook(t, e);\n if (n !== NOT_PENDING) return n;\n }\n // A hydration claim is served the value the server rendered with, and\n // replays at the scope's release. An errored node still throws below.\n if (snapshotCaptureActive && t && t.l & CONFIG_IN_SNAPSHOT_SCOPE) {\n const n = e.T?.De;\n if (n !== undefined && !(e.m & STATUS_ERROR)) {\n const o = n === NO_SNAPSHOT ? undefined : n;\n const E = e.ue !== NOT_PENDING ? e.ue : e.le;\n if (E !== o) t.R |= REACTIVE_SNAPSHOT_STALE;\n return o;\n }\n }\n // A stale reader of a held flight is served the committed value and does\n // not go pending (D-9, D-25); so is lane work reading a flight not its own\n // (D-25), and a verdict reader (`[isPending(x), x()]` is `[true, stale]` in\n // either order, D-23). Not a flight committed beneath inputs on screen\n // (F-1), nor a reader born into its transaction (#4010).\n if (laneStageHook && e.m & STATUS_PENDING && !n && !(e.l & CONFIG_OVERRIDE) && !(e.m & STATUS_UNINITIALIZED)) {\n // A verdict reader first, routed or not (D-25, #4661). A reader with no\n // committed value sees the flight pending, so a boundary a lane mounts\n // shows its fallback (F-7). A mount a probing pass opened is born held\n // (S-46, S-58).\n if (t !== null && t.l & CONFIG_VERDICT && !(t.l & CONFIG_MOUNT_AHEAD && t.m & STATUS_UNINITIALIZED)) n = observeFlightHook(t, e); else if (passLane !== null && (!(t?.m & STATUS_UNINITIALIZED) || bornOfLaneRerun(t))) \n // Lane work is served the committed value unless it read this flush's\n // staging (F-2, S-57).\n n = laneServedHook(t, e, true);\n }\n if (e.m & STATUS_PENDING && !n) {\n // Untracked, an uninitialized node has nothing to serve and throws. A\n // frame-only reader sees the frame (D-29).\n if (t) {\n if (!(t.l & CONFIG_CHILDREN_FORBIDDEN) || e.m & STATUS_UNINITIALIZED) {\n // Out of line, so `read` gains a call only where a pending read throws (D-22, F-9).\n if (observeFlightHook && servesStaged(t, e, e)) {\n return e.ue;\n }\n // An untracked read of a pending node still re-runs its reader when it\n // settles, unless nobody reads (`spectating`, #3528) or it reads itself.\n if (!tracking && !spectating && e !== t) link(e, t);\n throw e.T?.U;\n }\n } else if (e.m & STATUS_UNINITIALIZED) {\n throw e.T?.U;\n }\n }\n // An errored derive throws for every reader, memo parity (D-41, #2897).\n if (e.X && e.m & STATUS_ERROR) {\n // Only a re-read retries an errored source (F-9): tracked, by a pass whose\n // last pass read it (#5002), on a later cycle, and not by a zombie, whose\n // retry livelocked the live frame's readers (S-58, #4405).\n if (o && e.ie < clock && !(e.R & REACTIVE_ZOMBIE)) {\n recompute(e);\n return read(e);\n }\n // A staged error is this flush's answer (D-41): a reader served the staging\n // throws it and stages its own; one served the screen throws the shown one\n // (#4404).\n if (!n && e.l & CONFIG_STAGED_ERROR) serve(e, t);\n throw e.T?.U;\n }\n // A reader served the screen throws the shown error (D-41).\n if (n || !t) throwShown(e);\n const E = serve(e, n ? null : t);\n if (!t && typeof e.X === \"function\" && e.l & CONFIG_AUTO_DISPOSE && !(e.m & STATUS_PENDING) && !e.o) {\n // Deferred: an inline unobserved() made consecutive untracked reads answer\n // differently with no write between (#3078). The flush sweep reclaims it.\n dormantNodes.add(e);\n schedule();\n }\n return E;\n}\n\n/** A first pass a guess lane's re-run creates stands where the memo it\n * replaces stood, so lane work's read of a parent's flight is the screen's\n * for it too (#4824). A boundary's structure (F-7, #3835) and a mount a\n * display-ahead read opens (S-58, D-25) still see the flight. */ function bornOfLaneRerun(e) {\n const t = e._parent;\n return passLane._parent?.Pe !== passLane && t?.X && !(t.m & STATUS_UNINITIALIZED | t.l & CONFIG_FRAME);\n}\n\n/** A reader served the screen reads a shown error until its replacement\n * commits (D-41). */ function throwShown(e) {\n if (e.T?.Te) {\n throw e.T.Te;\n }\n}\n\n/** The value reader `c` (null: untracked) is served from `el`; read's fast\n * block keeps its trivial ternary for speed. */ function serve(e, t) {\n // A node born staged has no committed value: an untracked, bookkeeping or\n // frame-only reader has nothing to serve and holds (F-9, D-29). A ref born\n // into this node's hold reads it as the hold's own work (D-25, #4767); one\n // mounted outside must not see it ahead of the commit (F-7).\n if (e.ue !== NOT_PENDING && e.m & STATUS_UNINITIALIZED && (!t || spectating || t.l & CONFIG_CHILDREN_FORBIDDEN)) {\n if (refCallbackDepth > 0) {\n const t = creatorPass(context);\n if (t && e.l & CONFIG_HELD && bornInto(t, txOf(e))) {\n return e.ue;\n }\n }\n throw new NotReadyError(null);\n }\n const n = t && unflushedStaged ? unflushedValue(e) : NOT_PENDING;\n if (n !== NOT_PENDING) {\n markLateLinker(t);\n return n;\n }\n if (readerSeesCommitted(e, t) || observeFlightHook && t.l & CONFIG_VERDICT && !(e.m & STATUS_UNINITIALIZED) && stagedScreen(t, e) && !throwShown(e)) {\n return e.le;\n }\n // Writes that netted are no proposal (D-8, #4452), as in read's fast block.\n stagedRead(t, e);\n if (e.l & CONFIG_STAGED_ERROR) {\n throw e.ue;\n }\n return e.ue;\n}\n\n/** A pass read a staging of this flush: the seam decides (D-25). Lane work\n * too: if the flush parks, the pass re-derives on the committed world and\n * its lane waits that round, so the held write never shows through it. A\n * folded lane only before the frame has a transaction (D-34). Not a node\n * born staged: a re-run would read the same staging every round (#3969). */ function stagedRead(e, t) {\n if (!(t?.m & STATUS_UNINITIALIZED)) {\n // Lane work that was served a flight's committed value now reads a staging:\n // it throws (#4859).\n if (laneServedHook && passLane !== null) laneServedHook(e, null);\n e.R |= REACTIVE_STAGED_READ;\n // A verdict effect's staging read is the frame's, re-derived once if the\n // flush parks (D-22, D-25). A memo is not a leaf (`frameRead`).\n if (laneSeamsHook && (passLane !== null || e.i && e.l & CONFIG_VERDICT)) stagedReaders.push(e);\n }\n}\n\n/** A verdict reader's plain read of a staged node sees the screen once the\n * frame has a transaction, and re-derives at its landing (D-25, #3322).\n * Before that the seam answers. A node born into the future (F-7), a reader\n * born into the transaction (#4010) or into the hold (D-25) has no screen. */ function stagedScreen(e, t) {\n if (flushTransaction === null || bornInto(e, flushTransaction) || (t?.l & (CONFIG_HELD | CONFIG_OVERRIDE)) === CONFIG_HELD || \n // This flush's own write read by a pass with an inherited posture is the\n // frame's derivation (D-25, #4544).\n observeFlightHook && holdStagingHook(e, t)) return false;\n // The staging is the frame's read in the frame's seat; the seam re-derives\n // only if the flush parks (D-22, F-10). Content a display-ahead gate opens\n // is a mount (#4806), but not under the pass's own `isPending` window: a\n // read's place beside the probe never changes what shows (F-6, D-23, #4966).\n if (laneStageHook && t && fresh && passLane && e.R >> WINDOW_KINDS != 1) passLane.Gt = 1;\n staleReader(e, flushTransaction);\n return true;\n}\n\n/** A write inside a recompute outside a flush is promoted at that pass's end. */ function notePromotedWrite(e) {\n if (globalQueue.Y || e.l & CONFIG_PROMOTED) return;\n e.l |= CONFIG_PROMOTED;\n promotedWrites.push(e);\n}\n\n/** The first write during snapshot capture to a plain user signal records the\n * pre-write value. Async landings reveal, and projection leaves are their\n * compute's, so neither qualifies. */ function captureWriteSnapshot(e, t) {\n if (e.l & CONFIG_NO_SNAPSHOT || e.X !== undefined || e.T?.De !== undefined) return;\n takeSnapshot(e, t);\n}\n\nfunction takeSnapshot(e, t) {\n ext(e).De = t === undefined ? NO_SNAPSHOT : t;\n e.l |= CONFIG_HAS_SNAPSHOT;\n snapshotSources.add(e);\n}\n\n/** Called before every signal or store write while set. The server-components\n * client mounts still-deferred slots before a write applies, then clears it. */ let writeHook = null;\n\n/** @internal */ function setWriteHook(e) {\n writeHook = e;\n}\n\n/** The one guarded comparator call. A comparator that read unresolved async\n * reports a change (#4111); any other throw is `el`'s error, routed to its\n * boundary and answered \"same\" (D-38, #2837).\n * @internal */ function isSame(e, t, n) {\n if (e.ye === isEqual) return t === n;\n try {\n return e.ye && e.ye(t, n);\n } catch (t) {\n if (!(t instanceof NotReadyError)) return notifyStatus(e, STATUS_ERROR, t), true;\n }\n}\n\nfunction setSignal(e, t) {\n if (writeHook !== null) writeHook(e);\n const n = e.ue === NOT_PENDING ? e.le : e.ue;\n if (typeof t === \"function\") t = t(n);\n // A write landing on a guess is its truth (F-11); one on a lane's\n // derivation is the lane's staging.\n if (laneWriteHook && e.l & CONFIG_OVERRIDE) return laneWriteHook(e, t);\n // A write to a held slot is a second proposal: the writer's tick joins the\n // hold, before the equality gate (D-8).\n if (e.l & CONFIG_HELD) joinFuture(txOf(e));\n // The first commit has no previous value: the comparator never sees\n // `undefined`. A write over a shown error is a change (D-41). `custom` is\n // taken once for the gate and the netting so the default `===` runs inline\n // (CodSpeed `propagation: avoidable`); without the engine it is `null` and\n // the netting folds away.\n const o = observeFlightHook ? e.ye !== isEqual : null;\n const E = !!(e.m & STATUS_UNINITIALIZED) || !!e.T?.Te || (o === false ? n !== t : !isSame(e, n, t));\n if (!E) return t;\n // A write during snapshot capture to a source created before capture\n // captures the pre-write value now, so claims keep the server's value and\n // replay at release. Store leaves qualify too.\n if (snapshotCaptureActive) captureWriteSnapshot(e, n);\n const s = e.ue !== NOT_PENDING;\n if (!s) queuePendingNode(e);\n // F-10: a held node rewritten outside a flush keeps its flushed staging.\n else if (e.l & CONFIG_HELD && !globalQueue.Y) stashFlushed(e);\n // A staged rewrite equal to the committed value nets to it (D-8, #4483).\n // Only the verdict engine reads the netting; under the default comparator\n // `v` already is the committed object.\n e.ue = o && s && !(e.m & STATUS_UNINITIALIZED || e.T?.Te) && isSame(e, e.le, t) ? e.le : t;\n if (context !== null) notePromotedWrite(e);\n // `_time` is computed-only: writing it on a signal forks the lean shape.\n if (e.X !== undefined) e.ie = clock;\n // A re-write whose subscribers were walked with nothing recomputed or linked\n // since re-stages and stops: the walk is idempotent.\n if (s && e.we === notifyEpoch) return t;\n insertSubs(e);\n schedule();\n return t;\n}\n\n/** User-facing setter for the memo form of `createSignal(fn)`. The write\n * stages like any other, and a later source change re-derives with it as\n * `prev` (D-8, CS-R31). REACTIVE_MANUAL_WRITE marks it a user proposal until\n * a pass re-derives it or the commit lands it. */ function setMemo(e, t) {\n // Is `el`'s staging a derivation another transaction holds? Then a setter\n // composes on the committed frame it was written against and becomes `prev`\n // for the hold's re-derivation (D-8, #3612).\n const n = e.l & CONFIG_HELD && !(e.R & REACTIVE_MANUAL_WRITE) && txOf(e) !== flushTransaction;\n if (n && typeof t === \"function\") {\n const n = t(e.le);\n t = () => n;\n }\n // A write replaces a failed derivation's outcome without re-running `_fn`,\n // so clear STATUS_ERROR here (#4110). The error shows until the write\n // commits (D-41).\n if (e.m & STATUS_ERROR) {\n e.T.Te = e.T.U;\n notifyStatus(e, STATUS_NONE);\n }\n t = setSignal(e, t);\n // A write replaces a staged error (D-41).\n e.l &= ~CONFIG_STAGED_ERROR;\n if (n) {\n // The staging it replaced came from inputs the writer never saw: the hold\n // re-derives over the write (D-8).\n e.R = e.R & ~REACTIVE_CHECK | REACTIVE_DIRTY;\n insertIntoHeap(e, dirtyQueue);\n schedule();\n } else if (e.ue !== NOT_PENDING) e.R |= REACTIVE_MANUAL_WRITE;\n return t;\n}\n\n/**\n * Executes `fn` with the given `owner` set as the current owner. Any reactive\n * primitives (`createSignal`, `createMemo`, `createEffect`, `onCleanup`,\n * `cleanup`, etc.) created inside `fn` are attached to that owner, so they\n * are disposed when the owner is disposed.\n *\n * The classic pattern: capture the current owner with `getOwner()` inside a\n * component, then re-enter it from a callback (event handler, async resolve,\n * setTimeout) so disposables created in the callback get cleaned up with the\n * component.\n *\n * @example\n * ```ts\n * function delayed<T>(ms: number, fn: () => T) {\n * const owner = getOwner();\n * setTimeout(() => runWithOwner(owner, fn), ms);\n * }\n * ```\n */ function runWithOwner(e, t) {\n const n = context;\n const o = tracking;\n context = e;\n tracking = false;\n try {\n return t();\n } finally {\n context = n;\n tracking = o;\n }\n}\n\nfunction staleValues(e, t = true) {\n try {\n return e();\n } finally {}\n}\n\n/** Core half of `refresh()` (signals.ts): marks the next recompute a quiet\n * re-ask and schedules it. */ function markRefresh(e) {\n if (typeof e.X === \"function\" && !(e.R & REACTIVE_DISPOSED)) {\n // A refresh in a manual write's frame re-asks with the write as `prev`\n // (D-8, #3026). The next pass's flight is a quiet re-ask (F-9), unless an\n // input changed this tick.\n e.R = e.R & ~REACTIVE_CHECK | REACTIVE_DIRTY | (e.R & (REACTIVE_DIRTY | REACTIVE_CHECK | REACTIVE_IN_HEAP) ? 0 : REACTIVE_REASK);\n insertIntoHeap(e, dirtyQueue);\n schedule();\n }\n}\n\nexport { adopter, bornInto, captureWriteSnapshot, clearSnapshots, computed, context, createEffectNode, creatorPass, creatorReads, effectStatusNotify, ext, heldRead, isEqual, isSame, joinPass, joinPassAt, markLateLinker, markRefresh, markSnapshotScope, markUnflushedStaged, notePromotedWrite, prepareComputed, pullComputed, read, readerSeesCommitted, recompute, releaseSnapshotScope, resyncUnflushedCompanions, runRefCallback, runWithOwner, serve, setAdopter, setEffectStatusNotify, setMemo, setSignal, setSnapshotCapture, setVerdict, setWriteHook, signal, slotSignal, snapshotCaptureActive, snapshotSources, spectating, stagedRead, stagedScreen, staleValues, stashFlushed, statusNotifierOf, strictReadTracked, tickBase, tracking, unflushedStaged, unflushedValue, untrack, verdict, writeHook };","import { CONFIG_TRANSPARENT } from \"./constants.js\";\n\nimport \"./core.js\";\n\nimport { getOwner } from \"./owner.js\";\n\n// Deferred hydration, dependency edges: plain-signal identities.\n// While on (`setSignalIdentities`; the server-components client turns it on\n// before hydrating), a plain signal created under an id-bearing owner is\n// named `<owner id>~<n>`, n counting the plain signals (and plain store\n// roots: `createStore` over an object, store/edges.ts) created under that\n// owner in its current pass (transparent owners defer to the nearest\n// id-bearing one, as child ids do). The server names the same signal the\n// same way and restarts the count on every re-run, so an edge it shipped (a\n// slot fill read it) matches the client node; the write hook receives the\n// node and looks its name up (`signalName`). The count restarts when the owner's pass\n// generation (`_depGen`, bumped by every recompute) moves on. Only the\n// frames client imports this module, so nothing here ships without it.\n// Names live in a side table, not on the node: frames reads them across the\n// package boundary, where a mangled field would not survive.\nlet counts = null;\n\nconst names = new WeakMap;\n\n/** @internal The identity of a plain signal named while identities were on. */ function signalName(n) {\n return n === undefined ? undefined : names.get(n);\n}\n\nfunction identify(n) {\n let e = getOwner();\n if (!e) return;\n while (e.l & CONFIG_TRANSPARENT && e._parent) e = e._parent;\n if (e.id == null) return;\n const t = e.de;\n let i = counts.get(e);\n if (i === undefined || i[0] !== t) counts.set(e, i = [ t, 0 ]);\n const s = e.id + \"~\" + i[1]++;\n // A store root named twice (one object made into two stores, or a store\n // handed to `createStore`) is one target under two server names: its\n // writes cannot be attributed (an empty name).\n names.set(n, names.has(n) ? \"\" : s);\n}\n\n/** @internal Name plain signals from now on (`on`), or stop. */ function setSignalIdentities(n) {\n counts = n ? counts || new WeakMap : null;\n signalHook = n ? identify : null;\n}\n\n/**\n * @internal Called with every plain signal `createSignal` makes, and every\n * plain store root `createStore` makes, while set (the namer above). Never\n * set unless `setSignalIdentities` is imported, so a bundle without it keeps\n * only a null check.\n */ let signalHook = null;\n\n/**\n * @internal Dev only: `watch` is called with every node read while set (the\n * dev hook `onRead`) — the frames client's identity-drift check watches the\n * named signals a deferred occurrence reads as it mounts. A no-op in prod.\n */ function setReadWatch(n) {}\n\nexport { setReadWatch, setSignalIdentities, signalHook, signalName };","import { ContextNotFoundError, NoOwnerError } from \"./error.js\";\n\nimport { getOwner } from \"./owner.js\";\n\n/**\n * Context provides a form of dependency injection. It is used to save from needing to pass\n * data as props through intermediate components. This function creates a new context object\n * that can be used with `getContext` and `setContext`.\n *\n * A default value can be provided here which will be used when a specific value is not provided\n * via a `setContext` call.\n */ function createContext(e, t) {\n return {\n id: Symbol(t),\n defaultValue: e\n };\n}\n\n/**\n * Low-level owner-targeted context read. The user-facing read API is\n * `useContext` (in `solid-js`), which wraps this primitive. Exposed here for\n * cross-package wiring (e.g. hydration-aware context plumbing).\n *\n * @throws `NoOwnerError` in dev if there's no owner at the time of call; production\n * reads the default instead (see below).\n * @throws `ContextNotFoundError` if a context value has not been set yet.\n *\n * @internal\n */ function getContext(e, t = getOwner()) {\n // `undefined` alone means unset — a provided `null` is a value (no `??`).\n let r;\n if (t) r = t.A[e.id];\n if (r === undefined) r = e.defaultValue;\n if (r === undefined) {\n // Dev names the context and why it has no value: no provider, or a\n // provider that passed `undefined` (the key is set, to `undefined`).\n throw new ContextNotFoundError;\n }\n return r;\n}\n\n/**\n * Low-level owner-targeted context write. The user-facing API is\n * `createContext` (in `solid-js`); its provider component wraps this\n * primitive. Exposed here for cross-package wiring.\n *\n * @throws `NoOwnerError` if there's no owner at the time of call.\n *\n * @internal\n */ function setContext(e, t, r = getOwner()) {\n if (!r) {\n throw new NoOwnerError;\n }\n // We're creating a new object to avoid child context values being exposed to parent owners. If\n // we don't do this, everything will be a singleton and all hell will break lose.\n r.A = {\n ...r.A,\n [e.id]: t === undefined ? e.defaultValue : t\n };\n}\n\nexport { createContext, getContext, setContext };","import { NOT_PENDING, EFFECT_USER, CONFIG_AUTO_DISPOSE, CONFIG_CHILDREN_FORBIDDEN, EFFECT_TRACKED, EFFECT_RENDER, REACTIVE_DISPOSED, STATUS_ERROR, CONFIG_OVERRIDE, CONFIG_HELD, STATUS_PENDING } from \"./constants.js\";\n\nimport { createEffectNode, recompute, computed, staleValues, ext, setEffectStatusNotify } from \"./core.js\";\n\nimport { unwrapStatusError, StatusError } from \"./error.js\";\n\nimport { trimStaleDeps } from \"./graph.js\";\n\nimport { enqueueSub } from \"./heap.js\";\n\nimport { applyStaged, globalQueue, schedule, heldRunHook, attachHook, txOf, haltReactivity, notifyEpoch, GlobalQueue, queueEffectRun } from \"./scheduler.js\";\n\n/**\n * Effects are the leaf nodes of our reactive graph. When their sources change, they are\n * automatically added to the queue of effects to re-execute, which will cause them to fetch their\n * sources and recompute\n */ function effect(e, t, E, f) {\n const u = !!f?.user;\n const o = createEffectNode(e, t, E, u ? EFFECT_USER : EFFECT_RENDER, f);\n recompute(o, true);\n // A first pass that read a staged value was staged itself (recompute: born\n // staged); the flush's commit replays this effect. Its first run is not this\n // creation's (F-7). A lane's node's run is the lane's: queued, not run\n // now — into its own pass's lane (its transaction: the creator's lane, or\n // the one a lane read moved the pass into, F-6/F-7) — and released at the\n // reveal (lanes.ts). Not a lane's node: the creator's (`enqueue`'s default\n // for no transaction; the frame for a transaction's).\n // `defer` skips the first run, whoever owes it. A node born staged\n // (#4543): its staged first value applies now, so the commit replays\n // nothing and the next pass gets it as `prev`, as on a plain mount (#4556;\n // D-12). A lane's node (#4557): it queues none.\n f?.defer ? applyStaged(o) : o.ue === NOT_PENDING && (o.T?.Re?.P || o.i === EFFECT_USER || f?.schedule ? globalQueue.enqueue(o.i, runEffect.bind(null, o), o.T?.Re) : // Type 0: the synchronous first render, not a queued run (D-19).\n runEffect(o, 0));\n}\n\nfunction notifyEffectStatus() {\n const e = this.m;\n const t = this.T?.U;\n if (e & STATUS_ERROR) {\n globalQueue.notify(this, STATUS_PENDING, 0);\n if (this.i === EFFECT_USER) {\n // The error handler is the error arm of the effect phase (#2840 ruling):\n // queue it like the effect function. It runs in the same imperative,\n // writable scope and throws escalate the same way. No payload is queued — the node already carries `_statusFlags`/`_error`,\n // and the runner dispatches on them, so a recovery before the effect\n // phase takes the success arm instead. (Re-read: the boundary\n // notify above can run a redraw.)\n if (this.m & STATUS_ERROR) queueEffectRun(this);\n return;\n }\n // Dev locates the halt at the node that threw: the StatusError's\n // source, upstream of this effect when a computed failed. The rethrow is\n // the user's error, not the wrapper: the wrapper's `source` is a node, and\n // a reporter that serializes the throw walks the reactive graph.\n escalate(this, unwrapStatusError(t));\n } else if (\n // A user effect's run owed for a pass a new question has since made\n // pending is for a world that will not commit (F-1, F-2): void — the\n // effect re-runs when that question settles (`settlePendingSource`). A\n // quiet re-ask keeps it: the pass still answers the question asked (F-9).\n this.i === EFFECT_USER) {\n if (e & STATUS_PENDING && this.Ae && !t?.source?.T?.Ve) ext(this).fe = !(this.Ae = false);\n } else if (this.i === EFFECT_RENDER) {\n globalQueue.notify(this, STATUS_PENDING | STATUS_ERROR, e, t);\n }\n}\n\n/** An effect's error no boundary takes halts the system (boundary-or-halt):\n * halted with `cause` and rethrown; dev locates it at `subject` (default:\n * the effect). */ function escalate(e, t, E) {\n if (!globalQueue.notify(e, STATUS_ERROR, STATUS_ERROR)) {\n haltReactivity(t);\n throw t;\n }\n}\n\nfunction runEffect(e, t) {\n if (!e.Ae || e.R & REACTIVE_DISPOSED) return;\n // A queued run behind a fallback (boundaries.ts) waits for the reveal: a\n // user effect's, which would read a DOM that is not attached, and a render\n // effect's update too (maintainer, 2026-10-02: \"we held the queue but let\n // the sync renders through… we definitely shouldn't be showing portals\n // early\") — a Portal's or head-tag's render effect writes outside the\n // hidden subtree. The synchronous first render on creation (`type` 0) is\n // not a queued run and goes through, whichever boundary above is on its\n // fallback then — an outer one about to reveal in this flush included\n // (#4343). `_modified` stays set; the boundary re-queues the run\n // (`release`).\n if (t && heldRunHook?.(e)) return;\n // An attach whose subtree holds a hole born into an open hold waits for\n // that hold (#4574, verdict.ts `attachWaits`).\n if (t && attachHook?.(e)) return;\n // Error arm (#2840), user effects only: a compute-phase error that is still\n // the node's settled state at effect time runs the bundle's error handler in\n // this same imperative, writable scope. Unwrap the StatusError used for\n // source tracking — user code gets the error it threw, as boundaries do. No\n // handler: log and keep the system alive (the run was skipped). A handler\n // (or logging) consumes the error; a handler throw falls to the shared\n // catch below and escalates boundary-or-halt like any effect-phase throw.\n // Render effects bypass: their errors route to boundaries synchronously in\n // notifyEffectStatus, and a runner queued by an earlier valueChanged in the\n // same flush must not be hijacked by a later-arriving error status.\n if (e.m & STATUS_ERROR && e.i === EFFECT_USER) {\n const t = unwrapStatusError(e.T?.U);\n e.ge = e.le;\n e.Ae = false;\n try {\n e.Je ? e.Je(t, () => {\n const t = e.ze;\n e.ze = undefined;\n t?.();\n }) : console.error(t);\n } catch (t) {\n escalate(e, t);\n }\n return;\n }\n // Captured before the callback: its own throw errors the node below, but\n // the compute pass that produced `_value` was clean, so its tail still goes.\n const E = e.T?.U == null;\n const f = e.ze;\n e.ze = undefined;\n try {\n f?.();\n const t = e.qe(e.le, e.ge);\n if (false && t !== undefined && typeof t !== \"function\") ;\n // The final cleanup is invoked by disposeChildren at true disposal.\n e.ze = t;\n } catch (t) {\n ext(e).U = new StatusError(e, t);\n e.m |= STATUS_ERROR;\n escalate(e, t);\n } finally {\n e.ge = e.le;\n e.Ae = false;\n // The run applied: this is the frame now, so the dependency tail the\n // compute pass left linked goes (D-10, #3438 — `recompute` defers an\n // effect's trim while a run is owed; the twin of `commitPendingNode`'s\n // trim for a staged pass). An errored compute kept its full list with\n // `_depsTail` marking where it stopped; leave it, as the commit does.\n if (E) trimStaleDeps(e);\n }\n}\n\nGlobalQueue.q = runEffect;\n\n/**\n * Internal tracked effect - bypasses heap, goes directly to effect queue.\n * Runs as a leaf owner: child primitives and onCleanup are forbidden (false throws).\n * Uses stale reads.\n */ function trackedEffect(e, t) {\n // A run owed at a hold's landing (#4607): `land`, made on first need, is\n // queued with the hold's stashed runs; `owed` dedups it, and a later run\n // that reads nothing held clears it.\n let E = false, f;\n const run = () => {\n // `_modified` is NOT redundant with the heap: the heap dedups within a\n // pass, but several passes in one flush each enqueue `_run` into the same\n // user queue, and this gate is what collapses them into one run.\n if (!u.Ae || u.R & REACTIVE_DISPOSED) return;\n if (heldRunHook?.(u)) return;\n const e = notifyEpoch;\n E = false;\n try {\n u.Ae = false;\n recompute(u);\n } finally {}\n // A dep this run was served the committed value of (D-29) while a\n // different value is staged commits without a notify to it: its\n // subscriber walk predates the link. Re-run where that value commits\n // (F-1). Writes that net to the committed value stage no change.\n for (let t = u.C; t !== null; t = t.G) {\n const o = t.S;\n if (o.ue !== NOT_PENDING && !(o.l & CONFIG_OVERRIDE) && (o.ue !== o.le || !Object.is(o.ue, o.le))) {\n // Held: it commits at its hold's landing, which runs the hold's\n // stashed runs — but a run during the hold, for another dep, had\n // consumed the one queued for it (#4607). Re-run there, as a\n // stale reader would be (D-9); effect-phase code holds nothing (D-29).\n if (o.l & CONFIG_HELD) {\n if (!E) {\n E = true;\n txOf(o).rn[EFFECT_USER - 1].push(f ||= () => {\n if (E) {\n u.Ae = true;\n run();\n }\n });\n }\n }\n // Staged this flush: the next round commits it. A memo is staged\n // by this run's own pull (`read` links, then pulls), whose walk\n // the recomputing run refuses (#4606); a signal written since the\n // epoch is the run's own write, never observed (#3006).\n else if (o.we <= e || o.X) {\n enqueueSub(u);\n schedule();\n // The re-run re-checks every dep, held ones included.\n break;\n }\n }\n }\n };\n const u = computed(() => {\n const t = u.ze;\n u.ze = undefined;\n t?.();\n const E = staleValues(e);\n u.ze = E;\n }, {\n ...t,\n lazy: true\n });\n u.ze = undefined;\n u.l = u.l & ~CONFIG_AUTO_DISPOSE | CONFIG_CHILDREN_FORBIDDEN;\n u.Ae = true;\n u.i = EFFECT_TRACKED;\n // Status dispatch rides the SHARED notifier (statusNotifierOf keys off\n // _type): its error arm is behavior-identical to the closure that used to\n // live here, without the per-node NodeExtension allocation.\n u.Z = run;\n // The first run rides the heap like every wake (GlobalQueue._update), so a\n // tracked effect created inside a render-effect callback runs after that\n // pass's staged writes commit, not before.\n enqueueSub(u);\n schedule();\n}\n\n// Install the shared effect status notifier (statusNotifierOf serves it to\n// every effect node) — module-scope: any bundle that creates effects\n// evaluates this module.\nsetEffectStatusNotify(notifyEffectStatus);\n\nexport { effect, trackedEffect };","/** Brand keys the proxy answers directly (never user data). */\nconst $TRACK = Symbol(0), \n/** A store target's guess carrier (optimistic.ts, S2): one per lane. */\n$PATCH = Symbol(0), $TARGET = Symbol(0), $PROXY = Symbol(0), $RECORD = Symbol(0);\n\n// ---------------------------------------------------------------------------\n// raw marking (R42 / RUL-12: a value is never both wrapped and raw)\nconst rawValues = new WeakSet;\n\nlet rawValuesUsed = false;\n\nfunction isRawValue(e) {\n return rawValuesUsed && rawValues.has(e);\n}\n\n/** Mark a value so no store ever wraps it (sticky; it reads as a leaf). */ function markRaw(e) {\n if (isWrappable(e)) {\n rawValuesUsed = true;\n rawValues.add(e);\n }\n return e;\n}\n\n/** A shallow store's ingested record: raw by contract (values served\n * verbatim, slots replaced by reference). */ function markRawOne(e) {\n if (isWrappable(e)) {\n if (e[$TARGET] !== undefined) return;\n rawValuesUsed = true;\n rawValues.add(e);\n }\n}\n\nfunction markRawIngest(e) {\n if (Array.isArray(e)) {\n for (let r = 0, a = e.length; r < a; r++) markRawOne(e[r]);\n } else {\n for (const r in e) markRawOne(e[r]);\n }\n}\n\n// ---------------------------------------------------------------------------\n// wrappability\nconst OBJECT_PROTO = Object.prototype;\n\nconst wrappableProtos = new WeakMap;\n\nfunction isWrappable(e) {\n if (e == null || typeof e !== \"object\") return false;\n const r = Object.getPrototypeOf(e);\n if (r === OBJECT_PROTO || r === null) return true;\n if (Array.isArray(e)) return true;\n let a = wrappableProtos.get(r);\n if (a === undefined) {\n a = Object.prototype.toString.call(e) === \"[object Object]\" && (typeof Node === \"undefined\" || !(e instanceof Node));\n wrappableProtos.set(r, a);\n }\n return a;\n}\n\nfunction ownEnumerableKeys(e) {\n return Reflect.ownKeys(e).filter(r => Object.prototype.propertyIsEnumerable.call(e, r));\n}\n\n// ---------------------------------------------------------------------------\n// write override: a projection's draft ops carry it (the derive is the\n// author — its writes must land outside the sync setter scope too, in a\n// continuation after an `await`/`yield`). Projections return in S3; the\n// traps already honour it.\nlet writeOverride = false;\n\nfunction setWriteOverride(e) {\n writeOverride = e;\n}\n\n/** The list driver's view of a shallow store (map.ts): the backing a read of\n * every slot serves this reader, or `undefined` when the list is no shallow\n * store or a slot read could differ from it. Installed by store.ts's top\n * level, so a `<For>` in an app without stores carries none of it; it lives\n * beside `$TRACK` so map.ts reaches no other store module. */ let shallowView = null;\n\nfunction installShallowView(e) {\n shallowView = e;\n}\n\nexport { $PATCH, $PROXY, $RECORD, $TARGET, $TRACK, installShallowView, isRawValue, isWrappable, markRaw, markRawIngest, markRawOne, ownEnumerableKeys, rawValuesUsed, setWriteOverride, shallowView, writeOverride };","import { TimeoutError, NotReadyError, unwrapStatusError } from \"./core/error.js\";\n\nimport \"./core/verdict.js\";\n\nimport { CONFIG_CHILDREN_FORBIDDEN, EFFECT_USER, $REFRESH, CONFIG_AUTO_DISPOSE, CONFIG_AUTHORITATIVE, CONFIG_REDERIVE, REACTIVE_JOINED, CONFIG_FRESH_READ, CONFIG_GUESS, STATUS_PENDING, STATUS_ERROR } from \"./core/constants.js\";\n\nimport { computed, signal, runWithOwner, setMemo, setSignal, markRefresh, read, untrack } from \"./core/core.js\";\n\nimport { schedule, flush, globalQueue, flushTransaction, dirtyQueue, GlobalQueue, resolveTx, passTx, staleReader, joinFuture } from \"./core/scheduler.js\";\n\nimport { cleanup, createRoot, getOwner, dispose } from \"./core/owner.js\";\n\nimport { signalHook } from \"./core/identities.js\";\n\nimport { effect, trackedEffect } from \"./core/effect.js\";\n\nimport { optimisticWrite } from \"./core/guesses.js\";\n\nimport { truthRead, truthConfirmed } from \"./core/truth.js\";\n\n/**\n * Low-level reactive-cleanup primitive. Registers a callback that runs when\n * the surrounding owner is disposed.\n *\n * **In 2.0 user code this is rare.** The two cases where you might reach for\n * it have better-shaped tools:\n *\n * - **Component lifecycle (mount/unmount, listeners, intervals):** use\n * {@link onSettled} and **return** a cleanup function. Setup and teardown\n * stay paired in one block. This replaces the 1.x `onMount` + `onCleanup`\n * pairing.\n * - **Cleanup tied to an effect run:** `onCleanup` does not belong in\n * `createEffect`'s apply phase. If a compute phase genuinely needs per-run\n * teardown, that's usually a sign the work should be a memo/projection\n * instead, or moved to `onSettled` if it's lifecycle-shaped.\n *\n * Where `onCleanup` is the right tool is **library / custom-primitive\n * internals** — coordinating disposal inside a `createRoot` body, or wiring\n * cleanup to a captured owner via `runWithOwner` from a custom factory.\n * Application code rarely needs to write any of those shapes directly.\n *\n * Must be called inside an owner. Calling outside an owner is a no-op (with a\n * dev-mode warning).\n *\n * Cannot be used inside `createTrackedEffect` or `onSettled` — return a\n * cleanup function from the callback body instead.\n *\n * Cleanups run in unwind order: an owner's children are disposed before its\n * own cleanups, and within one owner later registrations run before earlier\n * ones. In production a component body shares its enclosing owner, so\n * register cleanup before creating children when the order between them\n * matters.\n *\n * @example\n * ```ts\n * // Library shape: thread a resource's disposal into a *captured* owner\n * // from a factory that has no settle-phase setup of its own. `onSettled`\n * // would queue a callback we don't need; `onCleanup` is the leaner\n * // primitive when the only job is \"register disposal on this owner\".\n * function bindToOwner<T extends { dispose(): void }>(owner: Owner, resource: T): T {\n * runWithOwner(owner, () => onCleanup(() => resource.dispose()));\n * return resource;\n * }\n * ```\n */ function onCleanup(e) {\n return cleanup(e);\n}\n\nfunction accessor(e) {\n const t = read.bind(null, e);\n t[$REFRESH] = e;\n return t;\n}\n\nfunction createSignal(e, t) {\n if (typeof e === \"function\") {\n const r = computed(e, t);\n r.l &= ~CONFIG_AUTO_DISPOSE;\n return [ accessor(r), setMemo.bind(null, r) ];\n }\n const r = signal(e, t);\n if (signalHook !== null) signalHook(r);\n return [ accessor(r), setSignal.bind(null, r) ];\n}\n\nfunction createOptimistic(e, t) {\n if (typeof e === \"function\") {\n const r = computed(e, t);\n r.l &= ~CONFIG_AUTO_DISPOSE;\n return [ accessor(r), optimisticWrite.bind(null, r) ];\n }\n const r = signal(e, t);\n return [ accessor(r), optimisticWrite.bind(null, r) ];\n}\n\nfunction createMemo(e, t) {\n return accessor(computed(e, t));\n}\n\n/**\n * Creates a reactive effect with **separate compute and effect phases**.\n *\n * - `compute(prev)` runs reactively — *put all reactive reads here*. The\n * returned value is passed to `effect` and is also the new \"previous\" value\n * for the next run.\n * - `effect(next, prev?)` runs imperatively (untracked) after the queue\n * flushes. *Put DOM writes / fetch / logging / subscriptions here.* It may\n * return a cleanup function which runs before the next effect or on\n * disposal.\n *\n * Reactive reads inside `effect` will *not* re-trigger this effect — that's\n * intentional. If you need a single-phase tracked effect, use\n * `createTrackedEffect` (with the tradeoffs noted there).\n *\n * Pass an `EffectBundle` (`{ effect, error }`) instead of a plain function to\n * intercept **compute-phase** errors — errors thrown by `compute` or arriving\n * from upstream reactive sources (including async rejections), which your own\n * code has no frame to `try/catch`. The `error` handler is the error arm of\n * the effect phase: it runs on the same schedule and in the same imperative,\n * writable scope as `effect` (setting error state via signals is fine), and\n * only for *settled* errors — a transient error that recovers before the\n * effect phase runs `effect` with the recovered value instead, and a held\n * transition defers it exactly as it defers `effect`. Without an `error`\n * handler a compute-phase error is logged and the effect simply skips that\n * run — a non-render effect's reactivity failing does not crash the app.\n * Rethrowing from `error` escalates it to the nearest error boundary\n * (halting the system if none exists).\n *\n * The **effect phase is different**: it is your own imperative code, so handle\n * failures with `try/catch` where they occur. An uncaught effect-phase throw\n * is treated as an unhandled application error — caught by the nearest\n * `createErrorBoundary`/`<Errored>`, and permanently halting the reactive\n * system if there is none. It is *not* routed to the bundle's `error` handler.\n *\n * ```typescript\n * createEffect<T>(compute, effectFn | { effect, error }, options?: EffectOptions);\n * ```\n * @param compute a function that receives its previous value and returns a new value used to react on a computation\n * @param effectFn a function that receives the new value and is used to perform side effects (return a cleanup function), or an `EffectBundle` with `effect` and `error` handlers\n * @param options `EffectOptions` -- name, defer, schedule, transparent\n *\n * @example\n * ```ts\n * const [count, setCount] = createSignal(0);\n *\n * createEffect(\n * () => count(), // compute: tracks `count`\n * value => console.log(value) // effect: side effect\n * );\n *\n * setCount(1); // logs 1 after the next flush\n * ```\n *\n * @example\n * ```ts\n * createEffect(\n * () => userId(),\n * id => {\n * const ctrl = new AbortController();\n * fetch(`/users/${id}`, { signal: ctrl.signal });\n * return () => ctrl.abort(); // cleanup before next run / disposal\n * }\n * );\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/reactivity/create-effect\n */ function createEffect(e, t, r) {\n effect(e, t.effect || t, t.error, {\n user: true,\n ...r\n });\n}\n\n/**\n * Creates a reactive computation that runs during the render phase as DOM elements\n * are created and updated but not necessarily connected.\n *\n * Same compute / effect split as `createEffect`, but scheduled inside the render\n * queue rather than after it. Reach for this only when authoring renderer\n * plumbing (custom DOM bindings, JSX-generated `insert()` / `spread()` calls).\n * App code should use `createEffect`.\n *\n * ```typescript\n * createRenderEffect<T>(compute, effectFn, options?: EffectOptions);\n * ```\n * @param compute a function that receives its previous value and returns a new value used to react on a computation\n * @param effectFn a function that receives the new value and is used to perform side effects\n * @param options `EffectOptions` -- name, defer, schedule, transparent\n *\n * @example\n * ```ts\n * // Custom directive: bind an element's textContent to a reactive source.\n * function bindText(el: HTMLElement, source: () => string) {\n * createRenderEffect(\n * () => source(),\n * value => { el.textContent = value; }\n * );\n * }\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/advanced/specialized-reactivity/create-render-effect\n */ function createRenderEffect(e, t, r) {\n effect(e, t, undefined, r);\n}\n\n/**\n * Creates a tracked reactive effect where dependency tracking and side effects happen\n * in the same scope.\n *\n * @deprecated Do not use in new code. For a side effect that follows reactive\n * state, use `createEffect(compute, effect)` — it separates tracking from the\n * side effect, knows its dependencies before it runs, and participates in\n * async and transitions. For one-time DOM work after render (measuring,\n * attaching third-party widgets to a ref), use `onSettled`. Tracking from\n * inside the effect phase — the only thing this primitive adds — is retained\n * solely to ease 1.x migration: it runs beside user-effect callbacks after\n * values commit, never holds a transition, and cannot observe a write staged\n * earlier in the same flush by a signal it has not read yet.\n *\n * WARNING: Because tracking and effects happen in the same scope, this primitive\n * may run multiple times for a single change or show tearing (reading inconsistent\n * state). Use only when dynamic subscription patterns require same-scope tracking.\n *\n * The callback runs during the flush itself: writes made inside it are queued\n * into the same flush's continuation and are never visible to the callback's\n * own reads (reads return settled values, as in every effect-phase scope), and\n * `flush()` cannot be called from inside it (dev throws; production is a\n * no-op) — defer with `queueMicrotask(() => flush())` if needed.\n *\n * ```typescript\n * createTrackedEffect(compute, options?: { name?: string });\n * ```\n * @param compute a function that contains reactive reads to track and returns an optional cleanup function to run on disposal or before next execution\n * @param options -- name\n *\n * @example\n * ```ts\n * createTrackedEffect(() => {\n * const target = focusedNode();\n * if (!target) return;\n *\n * const handler = () => log(target.value());\n * target.on(\"change\", handler);\n *\n * return () => target.off(\"change\", handler);\n * });\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/advanced/specialized-reactivity/create-tracked-effect\n */ function createTrackedEffect(e, t) {\n trackedEffect(e, t);\n}\n\n/**\n * Creates a reactive computation that runs after the render phase with flexible tracking.\n *\n * ```typescript\n * const track = createReaction(effectFn, options?: EffectOptions);\n * track(() => { // reactive reads });\n * ```\n * @param effectFn a function (or `EffectBundle`) that is called when tracked function is invalidated\n * @param options `EffectOptions` -- name, defer\n *\n * @example\n * ```ts\n * const [count, setCount] = createSignal(0);\n *\n * const track = createReaction(() => {\n * console.log(\"count changed once, re-arm to listen again\");\n * track(() => count()); // re-arm\n * });\n *\n * track(() => count()); // initial arm\n *\n * setCount(1); // logs once, reaction re-armed for next change\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/advanced/specialized-reactivity/create-reaction\n */ function createReaction(e, t) {\n let r = undefined;\n cleanup(() => r?.());\n const n = getOwner();\n // The currently armed effect node. `track()` replaces the previous\n // subscription (1.x semantics): without disposing the superseded arm, its\n // sources stayed live (firing the callback for replaced dependencies), each\n // accumulated arm delivered its own fire, and un-fired arms leaked as live\n // effect nodes until the owner disposed (#2861).\n let o;\n return u => {\n if (o) {\n dispose(o);\n o = undefined;\n }\n runWithOwner(n, () => {\n effect(() => {\n const e = getOwner();\n o = e;\n u();\n return e;\n }, t => {\n o = undefined;\n r?.();\n const n = (e.effect || e)?.();\n if (false && n !== undefined && typeof n !== \"function\") ;\n r = n;\n dispose(t);\n }, e.error, {\n ...t,\n user: true,\n defer: true\n });\n });\n };\n}\n\n/** A promise over a reactive expression (`resolve`, `until`): a pass that\n * runs the expression and settles on a microtask. Not an effect — an\n * effect's run is the flush's effect phase, and a flush parked by the\n * action that is `yield`ing on this promise stashes its runs with the\n * transaction (#2930); the heap runs a pass parked or not. A pending read\n * re-runs it when the source lands (the pass is pending itself); the\n * expression throwing settles the rejection. */\n/** The promise-delivery readers' pass (`resolve`, `until`, `refresh`'s\n * waiter): delivers what it read on a microtask. By posture (#3482, #3490):\n * - the reader of the transaction it was created in (`own`: an action's\n * body, a `refresh()` called there — the waiter reads its slice's frame on\n * a later microtask) delivers that frame — the staged landing an action\n * holds (the action awaits the promise that would otherwise wait on its\n * own settle);\n * - a mainline reader whose pass read a frame another transaction holds\n * joined it (L2, born held — F-7) and delivers at that commit: the\n * committed view, never a foreign hold's unrevealed frame. */ function watch(e, t, r, n = 0, o, u = flushTransaction) {\n if (n & CONFIG_AUTHORITATIVE) {\n GlobalQueue.En = truthRead;\n GlobalQueue.tn = truthConfirmed;\n }\n // `config` is on the node for its first pass too (the pass runs inside\n // `computed()`): `until`'s predicate is authoritative from its first read,\n // or an already-displayed guess would satisfy it in a later slice. (REDERIVE\n // after: the first pass's own error is the promise's rejection.)\n computed(() => {\n let c, i = false;\n try {\n c = e();\n } catch (e) {\n if (e instanceof NotReadyError) throw e;\n c = unwrapStatusError(e);\n i = true;\n }\n const s = getOwner();\n // A truth reader waits out a `createDeferred` flight its value derives\n // from, which serves everyone else the stale answer (D-40).\n const f = n & CONFIG_AUTHORITATIVE && GlobalQueue.er?.(s);\n if (f) throw new NotReadyError(f);\n // (Outside a flush a mainline pass joins through `passTx`.)\n const a = flushTransaction ?? passTx;\n if (s.R & REACTIVE_JOINED && a !== null && (u === null || resolveTx(u) !== resolveTx(a))) {\n staleReader(s, resolveTx(a));\n return;\n }\n if (i) return void queueMicrotask(() => r(c));\n o?.(c);\n queueMicrotask(() => t(c));\n }, {\n xe: n\n }).l |= CONFIG_REDERIVE;\n}\n\n/**\n * Awaits a reactive expression and returns its first fully-settled value as a\n * `Promise`. Pending async reads (`createMemo` returning a promise, etc.) are\n * waited on; once the expression returns synchronously without `NotReadyError`\n * the promise resolves with that value. If the expression settles with an\n * error instead — including an async source that rejects — the promise\n * rejects with it.\n *\n * Must be called *outside* a tracking scope — it doesn't subscribe, it just\n * resolves the current value once.\n *\n * @example\n * ```ts\n * const user = createMemo(() => fetch(`/users/${id()}`).then(r => r.json()));\n *\n * // outside any reactive scope\n * const initial = await resolve(() => user());\n * ```\n *\n * @param fn a reactive expression to resolve\n */ function resolve(e) {\n return new Promise((t, r) => {\n createRoot(n => watch(e, e => (t(e), n()), e => (r(e), n())));\n });\n}\n\n/**\n * Invalidates one reactive source, forcing it to re-execute even if its inputs\n * haven't changed, and returns a promise for the target's NEXT QUIESCENT\n * STATE — the re-ask (and anything that supersedes it) has settled.\n *\n * Pass either a Solid-created accessor or a projected store created from\n * `createStore(fn, ...)` / `createProjection(...)`. `refresh()` is a\n * write-like invalidation operation: it does not read the target's value, and\n * refreshing a plain signal accessor is a no-op that resolves immediately.\n *\n * The returned promise is safe to ignore (fire-and-forget refresh is\n * unchanged, and a failed refetch will not surface an unhandled rejection).\n * Awaiting it gives imperative flows the settle point without a reactive\n * read:\n * - Accessor targets resolve with the settled value; store targets resolve\n * with the store node passed (reads through it are fresh after the await).\n * - A failed re-ask rejects with the error.\n * - Semantics are quiescence, not flight identity: if another refresh (or\n * any invalidation) supersedes this one mid-flight, the promise waits for\n * — and delivers — whatever finally lands.\n *\n * @example\n * ```ts\n * const user = createMemo(async () => fetch(`/users/${id()}`).then(r => r.json()));\n *\n * // Fire-and-forget re-fetch\n * <button onClick={() => refresh(user)}>Reload</button>;\n *\n * // Imperative settle point\n * const fresh = await refresh(user);\n * ```\n */ function refresh(e) {\n const t = e?.[$REFRESH];\n if (!t) {\n return Promise.resolve(undefined);\n }\n // Mark now, watch on a microtask. The waiter is resolve()'s machinery with\n // two extra reader bits, but it must NOT compute at call time (effects\n // recompute eagerly on creation): same-tick refreshes coalesce into ONE\n // re-ask only because every mark lands before anything pulls, and eager\n // per-call pulls turned three refreshes into three fetches. Deferred, the\n // waiter's first read sees the coalesced state: FRESH_READ pulls the node\n // through recompute if it is still dirty (self-deduping — a clean node\n // no-ops, so N waiters cost one pull; this also closes the race where a\n // waiter reads the PRE-re-ask value as settled and delivers stale), after\n // which the read either parks on the re-ask's pending window (async — the\n // settle walk re-runs it on every landing, equal-value included, and a\n // rejection arrives through the effect's error channel) or serves the sync\n // answer. resolve()'s own eager compute is untouched: created after a\n // refresh it still settles stale-while-revalidate (#2930) — its contract is\n // \"first settled value\", not \"next quiescent state\".\n markRefresh(t);\n // The transaction `refresh()` is called in (an action's slice): the\n // waiter, created on the microtask below, is its reader (`watch`).\n const r = flushTransaction;\n const n = new Promise((n, o) => {\n queueMicrotask(() => {\n // The root is load-bearing: an ownerless computed is auto-disposing,\n // and the settle walk releases an unobserved one instead of re-running\n // it, so the waiter would never see the refetch land (#3888). Settle\n // disposes the waiter directly; the capture runs inside the watcher's\n // own pass, where the ambient owner IS the watcher — exactly what\n // dispose() takes.\n let u = null;\n const make = () => watch(() => {\n if (u === null) u = getOwner();\n // Authoritative: the truth beneath a guess (`until`'s view). A\n // guessed node's own re-ask is not answered by it (#3895): park\n // on that flight, or reject with its error.\n const e = read(t);\n if (t.l & CONFIG_GUESS && t.m & (STATUS_PENDING | STATUS_ERROR)) throw t.T?.U;\n return e;\n }, t => {\n n(typeof e === \"function\" ? t : e);\n dispose(u);\n }, e => {\n o(e);\n dispose(u);\n }, CONFIG_FRESH_READ | CONFIG_AUTHORITATIVE, undefined, r);\n createRoot(make);\n });\n });\n // Fire-and-forget refresh must not turn a failed refetch into an unhandled\n // rejection; awaiting callers attach their own handlers to `promise`.\n n.catch(() => {});\n return n;\n}\n\n/**\n * Awaits a reactive predicate and resolves the first time it settles *truthy*,\n * with that (narrowed) value. Falsy results and pending async reads both mean\n * \"not yet\": the subscription stays live and re-evaluates as sources change.\n * If the predicate settles with an error — a throw, or an async source that\n * rejects — the promise rejects with it, as do timeout and abort.\n *\n * Where {@link resolve} answers \"what is this value\" (first settled value,\n * whatever it is), `until` answers \"when does the world confirm this\n * condition\".\n *\n * This is the acknowledgment mechanism for mutations confirmed on a live data\n * channel (sockets, subscriptions, live queries) rather than by the mutation's\n * own response: correlate by a client-generated id or version in the predicate,\n * and let truth arrive however it arrives — push, refetch, or another tab.\n *\n * Must be called *outside* a tracking scope.\n *\n * @example\n * ```ts\n * const clientId = crypto.randomUUID();\n * await socket.send({ clientId, text }); // fire-and-forget transport\n * // Wait until the live source echoes the write:\n * await until(() => messages.some(m => m.clientId === clientId), { timeout: 10_000 });\n * ```\n *\n * @param fn a reactive predicate\n * @param options optional `timeout` (ms) and abort `signal`\n */ function until(e, t) {\n return new Promise((r, n) => {\n const o = t?.signal;\n if (o?.aborted) return n(o.reason);\n // The awaiting action's transaction, if any (its body runs joined to\n // it). `until()` is a declaration of relatedness (#3164 follow-up): the\n // predicate names the condition that confirms the action, so the frame\n // whose landing flips it truthy is the confirming event by the user's\n // own definition — it reveals WITH the action's settle, not before\n // (`saving=true` beside the confirmed `version=1` is a tear no timeline\n // contains). Updates that do not flip the predicate reveal freely.\n const u = flushTransaction;\n createRoot(c => {\n let i;\n let s;\n const settle = e => {\n if (i !== undefined) clearTimeout(i);\n if (s !== undefined) o.removeEventListener(\"abort\", s);\n e();\n c();\n };\n // Authoritative: the predicate sees the truth, never the action's own\n // optimistic guess — a guess cannot satisfy the wait for its own\n // confirmation.\n watch(e, e => {\n // Falsy is \"not yet\": keep the subscription live and wait for the\n // next evaluation. Only a truthy settled value resolves.\n if (e) settle(() => r(e));\n }, e => settle(() => n(e)), CONFIG_AUTHORITATIVE, e => {\n // The flip, inside the pass of the flush carrying it: the flush\n // joins the action's transaction, and what it staged is held and\n // revealed with the action.\n if (e && u !== null && globalQueue.Y && resolveTx(u).tt !== 0) joinFuture(u);\n });\n if (t?.timeout !== undefined) i = setTimeout(() => settle(() => n(new TimeoutError)), t.timeout);\n if (o !== undefined) {\n s = () => settle(() => n(o.reason));\n o.addEventListener(\"abort\", s, {\n once: true\n });\n }\n });\n });\n}\n\n/**\n * Schedules `callback` to run **once** after the reactive graph has fully\n * settled — i.e. once every pending async read inside the current owner has\n * resolved and the queue has flushed. Each call registers a single fire; it\n * does not create an ongoing subscription.\n *\n * The canonical lifecycle primitive in 2.0. Three main usages:\n *\n * - **Component-level setup-and-teardown** *(the most common shape)*: run\n * setup after the component's first stable render and **return a cleanup\n * function** to dispose it on owner disposal. This is the replacement for\n * the 1.x `onMount` + `onCleanup` pairing — setup and teardown live in one\n * block, and `onCleanup` is no longer the right tool for component\n * bodies. (`onMount` no longer exists in 2.0.)\n * - **Post-settle \"ready\" hook:** run once after a component's first stable\n * render — analytics ping, focus, scroll-into-view, etc. No cleanup needed.\n * - **Inside an event handler:** schedule work to run after the action /\n * transition triggered by the event has completed.\n *\n * Reactive reads inside the callback are *not* tracked — to react to\n * subsequent settles, register a new `onSettled` each time.\n *\n * The callback runs during the settle flush itself, which gives it the same\n * write semantics as every other effect-phase scope (the effect half of\n * `createEffect`, event handlers):\n *\n * - **Writes** are queued into the same flush's continuation — dependent memos\n * and effects update before the flush returns — but reads inside the\n * callback keep returning the settled (pre-write) values. A callback never\n * observes its own unsettled write. Functional setters still compose:\n * `set(v => v + 1)` twice increments twice.\n * - **`flush()` cannot be called** from inside the callback — the flush is\n * already running (dev throws; production is a no-op). To force a drain\n * after this settle, defer it: `queueMicrotask(() => flush())`.\n *\n * `onCleanup` is **not** allowed inside the callback — return a cleanup\n * function instead. The returned cleanup runs on owner disposal.\n *\n * A cleanup return is only honored when `onSettled` is called from an **owned**\n * scope (e.g. a component body). When it fires out of band from an *unowned*\n * scope — an event handler, a tracked effect, or another `onSettled` — there is\n * no owner lifecycle to bind a cleanup to; returning one is a dev-mode error\n * (and is dropped in production). Use the post-settle/event-handler forms below\n * for one-shot work, and keep setup-with-teardown in an owned scope.\n *\n * @example\n * ```tsx\n * // Component-level setup + teardown — replaces onMount + onCleanup.\n * // Subscribe to an external source on mount, unsubscribe on dispose.\n * function useViewportWidth() {\n * const [width, setWidth] = createSignal(window.innerWidth);\n * onSettled(() => {\n * const onResize = () => setWidth(window.innerWidth);\n * window.addEventListener(\"resize\", onResize);\n * return () => window.removeEventListener(\"resize\", onResize);\n * });\n * return width;\n * }\n * ```\n *\n * @example\n * ```tsx\n * // Post-settle \"ready\" hook — no cleanup needed.\n * function Dashboard() {\n * const data = createMemo(async () => fetchData());\n *\n * onSettled(() => {\n * analytics.track(\"dashboard.ready\");\n * });\n *\n * return <Loading fallback={<Spinner />}><pre>{data()}</pre></Loading>;\n * }\n * ```\n *\n * @example\n * ```tsx\n * // Event-handler — runs after the action settles.\n * function SaveButton() {\n * const save = action(function* () {\n * yield api.save();\n * });\n *\n * const handleClick = () => {\n * save();\n * onSettled(() => toast(\"Saved!\"));\n * };\n *\n * return <button onClick={handleClick}>Save</button>;\n * }\n * ```\n *\n * @param callback Function to run; may return a cleanup function that fires\n * on owner disposal\n */ function onSettled(e) {\n const t = getOwner();\n t && !(t.l & CONFIG_CHILDREN_FORBIDDEN) ? trackedEffect(() => untrack(e), undefined) : globalQueue.enqueue(EFFECT_USER, function fire() {\n // Settled means derived. A settle that reverts optimism (or replays\n // gated reads) only enqueues the affected subscribers; the pass after\n // the commit re-derives them. Fired in the commit pass, the callback\n // read the optimistic source already reverted beside a sync memo of it\n // still holding the optimistic value — reads do not pull (#3411). Fall\n // to the next pass while the heap has work; `run` swapped the queue,\n // so this lands there, and `enqueue` keeps the drain alive.\n if (dirtyQueue.Et >= dirtyQueue.Fe) return globalQueue.enqueue(EFFECT_USER, fire);\n // Unowned, out-of-band fire (no owner, or a children-forbidden one this\n // one-shot must not bind to): a returned cleanup has no lifecycle to\n // attach to. Reject it in dev; in production the return is simply\n // dropped — never bound to an unrelated owner or run eagerly.\n e();\n });\n}\n\n/**\n * Schedules `callback` to run **once**, right after the pending flush\n * finishes, in the same microtask checkpoint (before the browser paints).\n * Unlike `onSettled`, it never waits on async work: if that flush is held by\n * a pending transition, the callback still runs.\n *\n * Its main use is keeping a write out of another update's hold. Writes made\n * in the same synchronous frame are applied together, so when one of them\n * starts async work (a route change, a fetch), the others are held with it\n * until it resolves. A write made in `onFlush` happens after that flush, so\n * it is its own update: it commits on its own unless something it changes\n * also derives from the held work (a memo or `createEffect` reading both),\n * in which case it joins that hold as any later write would.\n *\n * Call it from event handlers and effect callbacks (including\n * `createTrackedEffect` and `onSettled` bodies). In an owned scope such as a\n * component body or a computation it warns in dev: use `onSettled` there.\n *\n * - A write in the callback lands after any write made inline in the same\n * frame. Don't write the same signal both inside and outside it; use a\n * functional setter if the order matters.\n * - Several `onFlush` callbacks run in call order, each in its own flush:\n * async work one callback starts does not hold another's writes.\n * - `queueMicrotask` is not a substitute: called before the frame's first\n * write, it runs before that flush and its write joins it.\n *\n * @example\n * ```tsx\n * // A menu closes now even when the consumer's onSelect starts async work.\n * const select = (id: string) => {\n * onFlush(() => setOpen(false));\n * props.onSelect?.(id);\n * };\n * ```\n *\n * @param callback Function to run once after the pending flush\n */ function onFlush(e) {\n // The frame's flush is queued (or already draining) ahead of this\n // microtask, so the callback's writes start a flush of their own. Each\n // callback flushes before the next runs, so async work one starts never\n // holds another's writes.\n schedule();\n queueMicrotask(() => {\n e();\n flush();\n });\n}\n\nexport { accessor, createEffect, createMemo, createOptimistic, createReaction, createRenderEffect, createSignal, createTrackedEffect, onCleanup, onFlush, onSettled, refresh, resolve, until };","import { computed, runWithOwner, signal, setSignal } from \"./core/core.js\";\n\nimport \"./core/verdict.js\";\n\nimport { NOT_PENDING, CONFIG_AUTO_DISPOSE } from \"./core/constants.js\";\n\nimport { attrHooks } from \"./core/attribution-hooks.js\";\n\nimport \"./core/scheduler.js\";\n\nimport { createOwner, getOwner } from \"./core/owner.js\";\n\nimport \"./core/effect.js\";\n\nimport { accessor } from \"./signals.js\";\n\nimport { $TRACK, shallowView, $TARGET } from \"./store/types.js\";\n\nfunction mapArray(t, e, i) {\n const s = typeof i?.keyed === \"function\" ? i.keyed : undefined;\n const n = e.length > 1;\n const r = e;\n const o = {\n H: createOwner(),\n it: 0,\n st: t,\n ot: [],\n ft: r,\n ht: [],\n ln: [],\n Xe: s,\n ct: s || i?.keyed === false ? [] : undefined,\n lt: n && i?.keyed !== false ? [] : undefined,\n ut: i?.keyed === false,\n L: i?.fallback\n };\n const h = computed(updateKeyedMap.bind(o), undefined);\n h.l &= ~CONFIG_AUTO_DISPOSE;\n return accessor(h);\n}\n\nconst pureOptions = {\n ownedWrite: true\n};\n\nfunction trySmallMove(t, e, i, s) {\n const n = t.ot;\n const r = t.it - 1;\n const o = [];\n const h = [];\n const f = [];\n // flat triples: oldStart, newStart, length\n let c = 256;\n let a = s;\n let l = s;\n while (a <= r && l <= i - 1) {\n const t = n[a];\n const s = e[l];\n if (t === s) {\n const t = a;\n do {\n l++;\n } while (++a <= r && l < i && n[a] === e[l]);\n f.push(t, l - a + t, a - t);\n continue;\n }\n // Bounded realignment lookahead, shorter distance wins.\n let u = -1;\n let w = Math.min(32 - o.length, r - a, c);\n for (let t = 1; t <= w; t++) {\n if (n[a + t] === s) {\n u = t;\n break;\n }\n }\n c -= u === -1 ? w : u;\n let d = -1;\n w = Math.min(32 - h.length, i - 1 - l, c);\n for (let i = 1; i <= w; i++) {\n if (e[l + i] === t) {\n d = i;\n break;\n }\n }\n c -= d === -1 ? w : d;\n if (u !== -1 && (d === -1 || u <= d)) {\n while (u-- > 0) o.push(a++);\n continue;\n }\n if (d !== -1) {\n while (d-- > 0) h.push(l++);\n continue;\n }\n if (c <= 0 || o.length === 32 || h.length === 32) return false;\n o.push(a++);\n h.push(l++);\n }\n for (;a <= r; a++) {\n if (o.length === 32) return false;\n o.push(a);\n }\n for (;l <= i - 1; l++) {\n if (h.length === 32) return false;\n h.push(l);\n }\n return commitSmallMove(t, e, i, s, o, h, f);\n}\n\n/** PHASE 2 of the small-move path, in its OWN function so that a pass which\n * only SCANS and bails (a full replace: the first structural pass of a page,\n * typically) compiles nothing but the scan — V8 parses and compiles lazily\n * per function, and cold `replace` measured +0.5 ms with both phases in one\n * body. Pairs displaced sources with destinations (an unmatched destination\n * is a replacement/insertion → general path), then commits: slice() the live\n * arrays, copy shifted runs, patch displaced pairs, dispose leftovers. */ function commitSmallMove(t, e, i, s, n, r, o) {\n const h = t.ot;\n let f;\n let c;\n let a;\n if (r.length !== 0) {\n a = new Array(n.length);\n for (c = 0; c < r.length; c++) {\n let t = -1;\n for (f = 0; f < n.length; f++) {\n if (!a[f] && h[n[f]] === e[r[c]]) {\n t = f;\n break;\n }\n }\n if (t === -1) return false;\n a[t] = true;\n r[c] = r[c] << 6 | t;\n // pack pairing (found < 32)\n }\n }\n // DUPLICATES: the general path pairs equal identities by OCCURRENCE ORDER\n // (the chained index map). Displaced↔displaced pairing above is ascending\n // on both sides, so it agrees; but an aligned run was matched by POSITION,\n // and if a displaced identity also occurs inside a run the two algorithms\n // can hand different occurrences different owners (row-local state moves;\n // a shrink could dispose the wrong one). Decline that case — general path.\n // Every displaced identity is a `srcPos` item; any other one in the window sits in a run.\n for (f = 0; f < n.length; f++) {\n const t = h[n[f]];\n // `indexOf` skips holes, which the scan above read as `undefined` rows.\n if (t === undefined) return false;\n for (c = s - 1; (c = h.indexOf(t, c + 1)) !== -1; ) if (!n.includes(c)) return false;\n }\n const l = t.ht;\n const u = t.ln;\n const w = l.slice(0, i);\n const d = u.slice(0, i);\n for (let t = 0; t < o.length; t += 3) {\n const e = o[t];\n const i = o[t + 1];\n if (e !== i) {\n for (let s = 0; s < o[t + 2]; s++) {\n w[i + s] = l[e + s];\n d[i + s] = u[e + s];\n }\n }\n }\n for (c = 0; c < r.length; c++) {\n const t = r[c] >> 6;\n const e = n[r[c] & 63];\n w[t] = l[e];\n d[t] = u[e];\n }\n t.ht = w;\n t.ln = d;\n t.it = i;\n t.ot = e;\n // Dispose unmatched sources LAST (general-path ordering).\n for (f = 0; f < n.length; f++) {\n if (a === undefined || !a[f]) u[n[f]].dispose();\n }\n return true;\n}\n\n/** Stage a PURE REMOVAL without the key map: when the new window is the old\n * window with items dropped, in order (one-item removals, every-nth, the\n * table filters), a two-pointer walk lands every survivor in the window\n * stage with one key call per item and returns the leavers; a shape that is\n * not an ordered subsequence returns null with the node stage cleared, and\n * the map path below starts from scratch (it rewrites every window slot of\n * `temp` / `rows` / `indexes`, so only `tempNodes`' `!== undefined` probe\n * needs the reset). The stage arrays are scratch — nothing live is touched. */ function stageRemoval(t, e, i, s, n, r, o, h, f) {\n const c = t.Xe;\n const a = t.ot;\n const l = t.ln;\n const u = [];\n let w = i;\n for (let d = i; d <= n; w++, d++) {\n const n = c ? c(e[d]) : e[d];\n while (w <= s && (c ? c(a[w]) : a[w]) !== n) u.push(l[w++]);\n if (w > s) {\n o.fill(undefined);\n return null;\n }\n r[d] = t.ht[w];\n o[d - i] = l[w];\n if (h) h[d - i] = t.ct[w];\n if (f) f[d - i] = t.lt[w];\n }\n for (;w <= s; w++) u.push(l[w]);\n return u;\n}\n\n/** Land a staged window into the live bookkeeping arrays in place: shift the\n * suffix by `dif` (a loop walked from the side that never overwrites an\n * unread slot), take the window from the stage, write survivors' row and\n * index signals. Its own function so the general path's body stays under\n * the JIT's optimization budget — the inlined commit measured ~10% slower on\n * full-window reorders (the small-move note has the same finding). */ function commitWindow(t, e, i, s, n, r, o, h, f) {\n const c = t.ln;\n const a = t.ct;\n const l = t.lt;\n const u = t.it;\n const w = i - u;\n let d, p;\n if (w > 0) {\n // Grow first: a store past the end from the top is a third slower than\n // filling a pre-sized tail (measured on 1k refs, 2026-10-15).\n c.length = i;\n if (a) a.length = i;\n if (l) l.length = i;\n for (d = u - 1, p = i - 1; d > n; d--, p--) {\n c[p] = c[d];\n if (a) a[p] = a[d];\n if (l) l[p] = l[d];\n }\n } else if (w < 0) {\n for (d = n + 1, p = r + 1; d < u; d++, p++) {\n c[p] = c[d];\n if (a) a[p] = a[d];\n if (l) l[p] = l[d];\n }\n c.length = i;\n if (a) a.length = i;\n if (l) l.length = i;\n }\n for (p = s; p <= r; p++) {\n c[p] = o[p - s];\n if (a) writeRow(a[p] = h[p - s], e[p]);\n if (l) setSignal(l[p] = f[p - s], p);\n }\n for (p = r + 1; p < i; p++) {\n if (a) writeRow(a[p], e[p]);\n if (l && w !== 0) setSignal(l[p], p);\n }\n}\n\n// Checks the row itself, not `_items`: an aborted pass can leave a row written or staged.\nconst writeRow = (t, e) => t.le === e && t.ue === NOT_PENDING || setSignal(t, e);\n\nfunction updateKeyedMap() {\n // Untracked reads inside the internal owner resolve via _parentComputed:\n // routed through the node, a store-proxy lookup sees pending writes (not a\n // stale _value) and an async read in a row callback registers the node as\n // the flight's reader (pending tracking + post-settle retry) instead of\n // vanishing. Set per pass: the first pass runs inside `computed()`, before\n // the node exists to the caller.\n this.H.Ke = getOwner();\n let t = this.st() || [];\n t[$TRACK];\n // top level tracking (a store array's container node)\n // A shallow store array diffs its backing: its slots are raw records, and\n // a trap per slot read was most of a one-row write on a 1k-row list.\n t = shallowView?.(t[$TARGET]) ?? t;\n const e = t.length;\n runWithOwner(this.H, updateKeyedRows.bind(this, t, e));\n return this.ht;\n}\n\n// Not a per-call closure: V8 drops a dead closure's optimized code at each major GC.\nfunction updateKeyedRows(t, e) {\n // The next pass's `_items`, taken first: a store list answers each read of a slot through a trap.\n const i = t.slice(0);\n let s, n, \n // The stage slot a mapper writes its row/index signal into: `j` on the\n // create-all path, `j - start` on the general path, whose stage arrays\n // are sized to the changed WINDOW, not the list.\n r, o, h, \n // Mappers write freshly-created row/index signals into the STAGE\n // arrays (`rows`/`indexes`), never into `this._rows`/`this._indexes`.\n f = this.ct ? this.ut ? () => {\n o[r] = signal(i[n], pureOptions);\n return this.ft(accessor(o[r]), n);\n } : () => {\n o[r] = signal(i[n], pureOptions);\n h && (h[r] = signal(n, pureOptions));\n return this.ft(accessor(o[r]), h ? accessor(h[r]) : undefined);\n } : this.lt ? () => {\n const t = i[n];\n h[r] = signal(n, pureOptions);\n return this.ft(t, accessor(h[r]));\n } : () => {\n const t = i[n];\n return this.ft(t);\n };\n // fast path for empty arrays\n if (e === 0) {\n if (this.it !== 0) {\n this.H.dispose(false);\n this.ln = [];\n this.ot = [];\n this.ht = [];\n this.it = 0;\n this.ct && (this.ct = []);\n this.lt && (this.lt = []);\n }\n if (this.L && !this.ht.length) {\n // an aborted fallback attempt leaves an owner without a mapping;\n // dispose it before re-creating\n this.ln[0]?.dispose();\n this.ht[0] = runWithOwner(this.ln[0] = createOwner(), this.L);\n }\n }\n // fast path for new create\n else if (this.it === 0) {\n const t = new Array(e);\n const c = new Array(e);\n o = this.ct && new Array(e);\n h = this.lt && new Array(e);\n try {\n for (n = 0; n < e; n++) {\n r = n;\n t[n] = runWithOwner(c[n] = createOwner(), f);\n }\n } catch (t) {\n for (s = 0; s <= n; s++) c[s]?.dispose();\n throw t;\n }\n // commit\n if (this.ln[0]) this.ln[0].dispose();\n // previous fallback\n this.ht = t;\n this.ln = c;\n o && (this.ct = o);\n h && (this.lt = h);\n this.ot = i;\n this.it = e;\n } else {\n let t, c, a, l, u, w, d, p, m, O;\n // The pass's write to a per-slot signal (a row accessor in index mode,\n // an index accessor in keyed mode). The list's frame lives in these\n // writes as much as in the computed's result, so under a LANE pass they\n // are the lane's frame too (F1): a plain `setSignal` staged them into\n // the action's transaction and the row readers were served the\n // committed value until the action landed — `<For>` without `keyed`\n // showed the pre-action list for the whole action while the keyed modes\n // showed the optimistic one. The engine publishes the write as a\n // derived override on the slot (lanes stage, A17) and lands or\n // supersedes it when a plain pass later writes a slot still carrying\n // one (A18) — `landOnOverride`'s slot arm. Decided once per pass, not\n // per slot: a lane pass marks the map (`_laneSlots`: its slots may\n // carry overrides), a marked map routes every slot write through the\n // engine while any lane is live — a slot's override resolves with its\n // lane's transaction, or with the batch for an orphan lane\n // (resolveOptimisticNodes, then cleanupCompletedLanes, both before the\n // completion wakes any recompute), so a pass that finds no lane live\n // knows the slots are clean and drops the mark — and an unmarked map\n // takes `writeRow` directly. The engine is installed whenever a lane\n // is active.\n // CARVE 2: the lane-slot arm (`_landOnOverride`, F1) went with the engine.\n // skip common prefix\n for (t = 0, c = Math.min(this.it, e); t < c && (this.ot[t] === i[t] || this.ct && compare(this.Xe, this.ot[t], i[t])); t++) {\n if (this.ct) writeRow(this.ct[t], i[t]);\n }\n // skip common suffix — counted only; retained entries land in one pass\n // at commit instead of being staged and copied twice\n for (c = this.it - 1, a = e - 1; c >= t && a >= t && (this.ot[c] === i[a] || this.ct && compare(this.Xe, this.ot[c], i[a])); c--, \n a--) ;\n // no structural change (every position matched in place at equal\n // length — the common post-reconcile shape): keep the same mapped\n // array identity so downstream consumers don't re-run at all\n if (t === e && this.it === e) {\n this.ot = i;\n return;\n }\n // SMALL-MOVE FAST PATH: extracted to its own function — inlining it\n // here bloats updateKeyedMap past the JIT's optimization budget and\n // deoptimizes the GENERAL path (measured 2x on reverse). Gated to\n // LARGE trimmed windows: when the trims already shrank the window\n // (plain removals, tail edits), the general path is window-\n // proportional and cheap — the fast path would only re-walk what the\n // trims proved.\n if (e <= this.it && c - t > 64 && this.ct === undefined && this.lt === undefined) {\n // PROBE before the scan: a small move keeps a mid-window item within\n // ±32 of its old position; a REPLACE (all fresh items — the shape\n // every page's first structural pass usually is) has it nowhere.\n // ~65 compares, no allocation, and the scan function is never\n // compiled for a replace (its cold first-call compile was the cost).\n const s = t + (a - t >> 1);\n const n = i[s];\n const r = Math.min(c, s + 32);\n let o = Math.max(t, s - 32);\n while (o <= r && this.ot[o] !== n) o++;\n if (o <= r && trySmallMove(this, i, e, t)) return;\n }\n const _ = e - this.it;\n // WINDOW-SIZED STAGING, IN-PLACE COMMIT (2026-10-15). The strong-abort\n // contract (#2903) only needs the pass to touch nothing live before\n // every mapper has succeeded; it never needed four fresh newLen-sized\n // arrays. Only the changed window [start, newEnd] is staged — the\n // prefix and suffix are, by construction, the rows that did not move\n // relative to each other — and at commit the bookkeeping arrays\n // (`_nodes`, `_rows`, `_indexes`) take the window in place with the\n // suffix shifted by a plain loop (`copyWithin` is a generic\n // per-element builtin in V8 — 30× slower than the loop on 1k refs,\n // measured 2026-10-15). `_mappings` alone is\n // rebuilt: its fresh identity is the change signal downstream relies\n // on. A one-row edit on a 500-row list used to allocate ~20 KB of\n // staging plus a position-sized chain array per commit (uibench's\n // one-item tree ops at 4–6× Octane, jfb-reorder `removefirst` at\n // 2.5×); now it stages one slot.\n const y = a - t + 1;\n const A = new Array(e);\n const R = new Array(y);\n o = this.ct ? new Array(y) : undefined;\n h = this.lt ? new Array(y) : undefined;\n // A shrinking pass is tried as a pure removal first (stageRemoval: no\n // key map, one key call per item); anything else takes the map path.\n const g = _ < 0 ? stageRemoval(this, i, t, c, a, A, R, o, h) : null;\n if (g !== null) {\n // (The list-churn census below wants removals AND creations in one\n // pass; a pure removal has none, so no item ledger is kept here.)\n if (g.length !== 0) p = g;\n } else {\n // 0) prepare a map of all indices in the changed window of newItems,\n // scanning backwards so we encounter them in natural order\n w = new Map;\n d = new Array(y);\n for (n = a; n >= t; n--) {\n l = i[n];\n u = this.Xe ? this.Xe(l) : l;\n s = w.get(u);\n d[n - t] = s === undefined ? -1 : s;\n w.set(u, n);\n }\n // 1) step through the old changed window and see if items can be found\n // in the new set; if so, stage them at their new positions; if not,\n // queue them for disposal at commit\n for (s = t; s <= c; s++) {\n l = this.ot[s];\n u = this.Xe ? this.Xe(l) : l;\n n = w.get(u);\n if (n !== undefined && n !== -1) {\n A[n] = this.ht[s];\n R[n - t] = this.ln[s];\n o && (o[n - t] = this.ct[s]);\n h && (h[n - t] = this.lt[s]);\n n = d[n - t];\n w.set(u, n);\n } else {\n (p ??= []).push(this.ln[s]);\n }\n }\n // 2) create new rows into the window stage; an abort disposes only these\n try {\n for (n = t; n <= a; n++) {\n if (R[n - t] !== undefined) continue;\n (m ??= []).push(R[n - t] = createOwner());\n if (false && attrHooks !== null) ;\n r = n - t;\n A[n] = runWithOwner(R[n - t], f);\n }\n } catch (t) {\n if (m) for (s = 0; s < m.length; s++) m[s].dispose();\n throw t;\n }\n }\n // 3) commit: the retained prefix and suffix land in the fresh mapped\n // array; the bookkeeping arrays take the staged window IN PLACE (own\n // function: kept out of this body on purpose, see commitWindow); then\n // the exited rows dispose\n for (s = 0; s < t; s++) A[s] = this.ht[s];\n for (n = a + 1; n < e; n++) A[n] = this.ht[n - _];\n commitWindow(this, i, e, t, c, a, R, o, h);\n this.ht = A;\n this.it = e;\n this.ot = i;\n if (p) for (s = 0; s < p.length; s++) p[s].dispose();\n }\n}\n\n/**\n * Reactively renders a callback `count` times, reusing previously-rendered\n * entries when only the count changes. Underlying helper for `<Repeat>`.\n *\n * - `options.from` — start index (default `0`); useful for offset/windowed\n * rendering.\n * - `options.fallback` — accessor returning a value to show when count is `0`.\n *\n * @example\n * ```ts\n * const view = repeat(count, i => `Item ${i}`, { fallback: () => \"empty\" });\n * ```\n *\n * @description https://docs.solidjs.com/reference/solid-js/advanced/jsx-component-primitives/repeat\n */ function repeat(t, e, i) {\n const s = e;\n const n = {\n H: createOwner(),\n it: 0,\n wt: 0,\n dt: t,\n ft: s,\n ln: [],\n ht: [],\n Ot: i?.from,\n L: i?.fallback\n };\n const r = computed(updateRepeat.bind(n));\n r.l &= ~CONFIG_AUTO_DISPOSE;\n return accessor(r);\n}\n\n// Same staged-commit discipline as `updateKeyedMap` (#2903): the retained\n// window overlap is copied into fresh arrays, missing indexes are created\n// into them, and `this` is only touched — including disposal of rows leaving\n// the window — after every `_map` call succeeded. A NotReadyError mid-pass\n// disposes only the owners this pass created and leaves prior state intact\n// for the post-settle retry. The overlap math also subsumes the previous\n// disjoint-window/front-clear/end-clear/shift special cases.\nfunction updateRepeat() {\n // As in updateKeyedMap: the node is the row callbacks' reader, per pass.\n this.H.Ke = getOwner();\n const t = this.dt();\n const e = this.Ot?.() || 0;\n runWithOwner(this.H, updateRepeatRows.bind(this, t, e));\n return this.ht;\n}\n\n// Not a per-call closure: V8 drops a dead closure's optimized code at each major GC.\nfunction updateRepeatRows(t, e) {\n if (t === 0) {\n if (this.it !== 0) {\n this.H.dispose(false);\n this.ln = [];\n this.ht = [];\n this.it = 0;\n // Reset offset to match the cleared data (#2767, repro 2).\n this.wt = 0;\n }\n if (this.L && !this.ht.length) {\n // an aborted fallback attempt leaves an owner without a mapping;\n // dispose it before re-creating\n this.ln[0]?.dispose();\n this.ht[0] = runWithOwner(this.ln[0] = createOwner(), this.L);\n }\n return;\n }\n const i = e + t;\n const s = this.wt + this.it;\n // Retained overlap [keepStart, keepEnd) in global indexes; empty when the\n // windows are disjoint or when coming from empty/fallback.\n const n = Math.max(e, this.wt);\n const r = Math.min(i, s);\n const o = new Array(t);\n const h = new Array(t);\n for (let t = n; t < r; t++) {\n h[t - e] = this.ln[t - this.wt];\n o[t - e] = this.ht[t - this.wt];\n }\n try {\n for (let t = e; t < i; t++) {\n if (t >= n && t < r) continue;\n o[t - e] = runWithOwner(h[t - e] = createOwner(), () => this.ft(t));\n }\n } catch (t) {\n for (let t = e; t < i; t++) if ((t < n || t >= r) && h[t - e]) h[t - e].dispose();\n throw t;\n }\n // commit: dispose the previous fallback or the rows leaving the window\n if (this.it === 0) this.ln[0]?.dispose(); else for (let t = this.wt; t < s; t++) if (t < e || t >= i) this.ln[t - this.wt].dispose();\n this.ht = o;\n this.ln = h;\n this.wt = e;\n this.it = t;\n}\n\nfunction compare(t, e, i) {\n return t ? t(e) === t(i) : true;\n}\n\nexport { mapArray, repeat };","import { NotReadyError } from \"./core/error.js\";\n\nimport \"./core/verdict.js\";\n\nimport \"./core/core.js\";\n\nimport \"./core/scheduler.js\";\n\nimport \"./core/effect.js\";\n\n// CARVE 4: `flatten` lived in boundaries.ts but is the general children\n// resolver the renderers (`web`, `universal`, `solid`'s `children()`) walk\n// through — not a boundary feature. Moved verbatim so the boundary carve\n// measures boundaries alone.\n/**\n * Resolves nested accessors and arrays in a children tree to their rendered\n * values. See the `children()` helper in solid-js for the memoized form.\n */\nfunction flatten(r, t) {\n if (typeof r === \"function\" && !r.length) {\n if (t?.doNotUnwrap) return r;\n do {\n r = r();\n } while (typeof r === \"function\" && !r.length);\n }\n if (t?.skipNonRendered && (r == null || r === true || r === false || r === \"\")) return;\n if (Array.isArray(r)) {\n let e = [];\n if (flattenArray(r, e, t)) {\n return () => {\n let r = [];\n flattenArray(e, r, {\n ...t,\n doNotUnwrap: false\n });\n return r;\n };\n }\n return e;\n }\n return r;\n}\n\nfunction flattenArray(r, t = [], e) {\n let o = null;\n let f = false;\n for (let n = 0; n < r.length; n++) {\n try {\n let o = r[n];\n if (typeof o === \"function\" && !o.length) {\n if (e?.doNotUnwrap) {\n t.push(o);\n f = true;\n continue;\n }\n do {\n o = o();\n } while (typeof o === \"function\" && !o.length);\n }\n if (Array.isArray(o)) {\n // OR, don't overwrite: an accessor already pushed under doNotUnwrap\n // still needs the resolving wrapper even when a later sibling\n // fragment contains no functions (#3133).\n f = flattenArray(o, t, e) || f;\n } else if (e?.skipNonRendered && (o == null || o === true || o === false || o === \"\")) {\n // skip\n } else t.push(o);\n } catch (r) {\n if (!(r instanceof NotReadyError)) throw r;\n o = r;\n }\n }\n if (o) throw o;\n return f;\n}\n\nexport { flatten };","import { SUPPORTS_PROXY } from \"../core/constants.js\";\n\nimport { createMemo } from \"../signals.js\";\n\nimport { $PROXY, $RECORD, $TARGET, ownEnumerableKeys } from \"./types.js\";\n\nfunction trueFn() {\n return true;\n}\n\n/** @internal What a source ENTRY is, decided once when the view is built\n * (`merge()` learns it while flattening; `omit()` from its argument) and\n * carried beside the entry — `MergeView.kinds[i]`, `OmitView.kind` — so no\n * read has to ask. Asking is the cost: any brand check on a Proxy is a trap\n * (`instanceof` is a `getPrototypeOf` trap, ~20 ns on a store — as much as\n * the read itself), and a merge over a store did two per read. */ const SOURCE_PLAIN = 0;\n\n // a plain object: own keys fixed, data is data\nconst SOURCE_OMIT = 1;\n\n // an `OmitView` record (only as a merge entry)\nconst SOURCE_PROXY = 2;\n\n // a store or foreign proxy: everything is a trap\nconst SOURCE_MEMO = 3;\n\n // a function source (merge's memo): swaps objects\nconst SOURCE_MERGE = 4;\n\n // a `MergeView` record (only as an omit's source)\nconst EMPTY = Object.freeze({});\n\n// The object behind a LEAF entry (any kind but OMIT): a memo is read\n// (tracked, as merge's own reads are) and a nullish result has no keys.\nfunction leafOf(e, n) {\n return n === SOURCE_MEMO ? (e = e()) || EMPTY : e;\n}\n\n/** @internal The record behind an `omit()` proxy: `source` with `hidden`\n * keys removed. It is the proxy's TARGET, so the shared handler reads it as\n * plain fields — no per-instance closures — and it is what props consumers\n * walk directly (`merge`, `spread`, `ssrElement`): a view never materializes\n * a copy, and a consumer that knows the record never goes through its traps\n * (a `getOwnPropertyDescriptor` trap per key allocates a descriptor and a\n * getter, so enumerating a proxy costs more than the copy it was avoiding).\n * `hidden` is a key list or a predicate (`omit(props, k => k[0] === \"$\")`).\n *\n * An omit over a `merge()` holds the merge's RECORD (`MergeView`, kind\n * `SOURCE_MERGE`) — never its proxy, so no read hops through a trap — and is\n * one record however many leaves the merge has. A consumer walks it as ONE\n * filtered entry (`sourceKeys` / `sourceGet` recurse into the merge's\n * sources by function call), and a later `merge()` over it carries the\n * record as one entry instead of copying its leaves: on a component chain of\n * defaults + omit + spread (`merge(omit(merge(omit(props))))`) the layers\n * nest as records, each a few fields, where a flatten to leaf views built a\n * view and a combined key list per leaf per layer — the largest allocation\n * of a Kobalte-shaped render. A merge leaf may be merge's memo for a\n * function source; it is resolved on access. */ class OmitView {\n source;\n kind;\n hidden;\n /** see `MergeView.table` */\n table=0;\n /** see `tableOwnKeys` / `tableDescriptor` */\n keys=undefined;\n descs=undefined;\n constructor(e, \n /** of `source` — PLAIN, PROXY (a store or a foreign proxy), MEMO, or\n * MERGE (a `MergeView` record); never OMIT, a view over a view folds\n * into one. */\n n, t) {\n this.source = e;\n this.kind = n;\n this.hidden = t;\n }\n}\n\nfunction isHidden(e, n) {\n const t = e.hidden;\n return typeof t === \"function\" ? t(n) : t.includes(n);\n}\n\n// Both filters as one. Two key lists stay a key list (one `includes`, no\n// closure); a predicate on either side needs a closure. An omit over a\n// merge builds one combined list per leaf, per component layer, so the\n// copy's form matters in every tier: `concat` runs the species/spreadable\n// protocol (2–3× the cost of a copy once optimized), a hand loop is 2–4×\n// `concat` in the interpreter and baseline tiers (a bytecode per element\n// against one builtin), and a presized `new Array(n)` is holey, which takes\n// `includes` off its fast path. `slice` + `push` of the (short) second list\n// is within a third of the best form in every tier, and packed.\nfunction combineHidden(e, n) {\n if (typeof e !== \"function\" && typeof n !== \"function\") {\n const t = e.slice();\n for (let e = 0; e < n.length; e++) t.push(n[e]);\n return t;\n }\n return t => (typeof e === \"function\" ? e(t) : e.includes(t)) || (typeof n === \"function\" ? n(t) : n.includes(t));\n}\n\n// The object a view filters (see `leafOf`).\nfunction viewSource(e) {\n return leafOf(e.source, e.kind);\n}\n\n// The record behind a `$PROXY`-marked object that is one of OUR views, else\n// undefined for a store or a foreign proxy. ONE read: the view traps answer\n// `$RECORD` first thing and a store's `get` trap answers it `undefined` on\n// its symbol fast path, so the question never reaches a store's generic\n// read path (firewall gate, tracked key read), which is what an unknown\n// symbol would take — and a foreign proxy forwards it to a target that has\n// no such key. Asking `$TARGET` first and then each view kind was two to\n// four trap hops per source at every `merge()`, `omit()` and `ssrElement`.\n// Call only after `$PROXY in o` is known true.\nfunction recordOf(e) {\n return e[$RECORD];\n}\n\n/** @internal The `OmitView` behind an `omit()` proxy, or undefined. */ function omitView(e) {\n if (!e || !($PROXY in e)) return undefined;\n const n = e[$RECORD];\n return n instanceof OmitView ? n : undefined;\n}\n\n// A props SOURCE ENTRY is a plain object, a proxy (store, merge, omit — the\n// last two are normally unwrapped first: `mergeView` / `omitView`), a memo,\n// or an `OmitView` record, and travels with its kind. These three answer for\n// an entry what `Object.keys` / `in` / `[]` answer for an object, so every\n// consumer walks entries with one code path, an `OmitView` is filtered\n// rather than materialized, and nothing is asked of a proxy but the read.\n// Own keys of a leaf: a proxy answers through ONE `ownKeys` trap (a store's\n// keeps the key set tracked; `Object.keys` on a proxy would add a descriptor\n// trap per key); a plain object its enumerable string keys. What a memo\n// holds is only known once read.\nfunction leafKeys(e, n) {\n if (n === SOURCE_PLAIN) return Object.keys(e);\n if (n === SOURCE_PROXY || e[$PROXY] === e) {\n // A store's handler answers directly: the Proxy `ownKeys` invariant checks cost twice the trap.\n const n = e[$TARGET];\n return (n?.px === e ? n : Reflect).ownKeys(e);\n }\n return Object.keys(e);\n}\n\n/** @internal Own string keys of a source entry — every consumer skips\n * symbols itself. */ function sourceKeys(e, n) {\n if (n === SOURCE_OMIT) {\n if (e.kind === SOURCE_MERGE) return mergeKeysOf(e.source, false, e);\n const n = leafKeys(viewSource(e), e.kind);\n const t = [];\n for (let r = 0; r < n.length; r++) if (!isHidden(e, n[r])) t.push(n[r]);\n return t;\n }\n return leafKeys(leafOf(e, n), n);\n}\n\n/** @internal `key in entry`. */ function sourceHas(e, n, t) {\n if (n === SOURCE_OMIT) {\n if (isHidden(e, t)) return false;\n return e.kind === SOURCE_MERGE ? mergeHas(e.source, t) : t in viewSource(e);\n }\n return t in leafOf(e, n);\n}\n\n/** @internal `entry[key]` — the source's getter runs once, here. */ function sourceGet(e, n, t) {\n if (n === SOURCE_OMIT) {\n if (isHidden(e, t)) return undefined;\n return e.kind === SOURCE_MERGE ? mergeGet(e.source, t) : viewSource(e)[t];\n }\n return leafOf(e, n)[t];\n}\n\n// An entry whose own key set is fixed: a plain object, or a view over one —\n// an omit of a plain object, or of a merge whose entries all are. Not a\n// store (its key set is a tracked signal), not a merge memo source (it\n// swaps whole objects), and not any proxy that declares itself with\n// `$PROXY in s` — a frames slot proxy answers `has` for every key and lists\n// none, so only the `in` walk is right for it.\nfunction entryHasStaticKeys(e, n) {\n if (n === SOURCE_PLAIN) return true;\n if (n !== SOURCE_OMIT) return false;\n if (e.kind === SOURCE_PLAIN) return true;\n return e.kind === SOURCE_MERGE && mergeHasStaticKeys(e.source);\n}\n\nfunction mergeHasStaticKeys(e) {\n const n = e.sources, t = e.kinds;\n for (let e = 0; e < n.length; e++) if (!entryHasStaticKeys(n[e], t[e])) return false;\n return true;\n}\n\n/** @internal Whether the own key set of a props object cannot change\n * reactively: a plain object, or a merge/omit view over plain objects only.\n * A consumer may then decide from `Object.getOwnPropertyDescriptor` once —\n * \"no `children` key\" or \"a data `children`\" holds for the object's lifetime,\n * so no tracking scope is needed for it (#3388). For a store, or a view with\n * a store or memo leaf, keys can appear later and the reactive path is the\n * only correct one. */ function hasStaticKeys(e) {\n if (!($PROXY in e)) return true;\n const n = recordOf(e);\n if (n instanceof MergeView) return mergeHasStaticKeys(n);\n return n !== undefined && entryHasStaticKeys(n, SOURCE_OMIT);\n}\n\n/**\n * Whether `o[key]` can never change for the lifetime of `o`: the key is a\n * data property of a plain object, or is absent from an object whose key set\n * is fixed. A getter, a key on a store, a memo-backed `merge()` source, or\n * any key of an object whose keys can appear later (a store) is not static.\n *\n * Looks through `merge()`/`omit()` views to the leaf that owns the key. Any\n * object will do, but props are the case it exists for: the compiler encodes\n * a literal at the call site (`as=\"button\"`) as a data property and an\n * expression (`as={isLink() ? \"a\" : \"button\"}`) as a getter, so a component\n * library reads the caller's own static/dynamic classification of a prop at\n * runtime — identically on server and client, the compiler emitting the same\n * own DESCRIPTORS on both (the object behind them may differ: the server\n * builds props as a plain-prototype instance with shared getters) — and can\n * take a no-computation path for the literal:\n *\n * ```tsx\n * const Tag = dynamic(() => props.as, { static: isStatic(props, \"as\") });\n * ```\n *\n * One descriptor lookup; no read of the value, nothing tracked.\n */ function isStatic(e, n) {\n if ($PROXY in e) {\n // A store answers its descriptor trap with a value; through a view the\n // descriptor is truthful (see `sourceDescriptor`). A foreign proxy is\n // opaque: nothing about it is known to be fixed.\n if (viewOf(e) === undefined) return false;\n const t = Reflect.getOwnPropertyDescriptor(e, n);\n return t === undefined ? hasStaticKeys(e) : t.get === undefined;\n }\n const t = Reflect.getOwnPropertyDescriptor(e, n);\n return t === undefined || t.get === undefined && t.set === undefined;\n}\n\nfunction accessorDescriptor(e, n = true) {\n return {\n configurable: true,\n enumerable: n,\n get: e,\n set: trueFn\n };\n}\n\n/** The descriptor a consumer should see for `key` on an entry —\n * the view proxies answer `getOwnPropertyDescriptor` with it, so it tells the\n * truth through any depth of merge/omit layers.\n *\n * A DATA descriptor means \"nothing reactive can hide behind this value\": the\n * key is a data property of a plain-object leaf — the compiler's own\n * encoding of a static attribute. Everything else is an accessor: a getter\n * on a leaf, a key on a store proxy (its \"data\" is a signal), or a key on a\n * merge memo source (the whole object is reactive). That is what lets a\n * consumer skip a reactive node for a static prop at the bottom of a\n * component chain, and it is why the store case must NOT forward the store's\n * own descriptor, which reports a value.\n *\n * `configurable: true` always — the target has no such property, and the\n * Proxy invariants forbid reporting a non-configurable one. */\n// `present` says the caller has already established `key in s` (a trap's\n// shadowing walk did), so a store is not asked a second time.\nfunction sourceDescriptor(e, n, t, r = false) {\n if (n === SOURCE_OMIT) {\n if (isHidden(e, t)) return undefined;\n return sourceDescriptor(e.source, e.kind, t, r);\n }\n // An omit's merge record: the descriptor of the last entry that has the\n // key, as the merge proxy's own trap answers (see `mergeDescriptor`).\n if (n === SOURCE_MERGE) return mergeDescriptor(e, t);\n // A memo source (`merge(() => …)`) is reactive wholesale: whatever shape\n // the memo's current object has, the key is an accessor here.\n if (n === SOURCE_MEMO) {\n return r || t in leafOf(e, n) ? accessorDescriptor(() => leafOf(e, n)[t]) : undefined;\n }\n if (n === SOURCE_PROXY) {\n // Another view (an omit's source may be a merge proxy) already answers\n // truthfully. A store's reported \"data\" is a signal, and a foreign proxy\n // (frames slot props) has no own descriptors: for both, existence is\n // `in` and the kind is accessor — one trap, and never the store's\n // descriptor path.\n if (recordOf(e) !== undefined) return Reflect.getOwnPropertyDescriptor(e, t);\n return r || t in e ? accessorDescriptor(() => e[t]) : undefined;\n }\n const i = Reflect.getOwnPropertyDescriptor(e, t);\n if (i === undefined) return undefined;\n if (i.get !== undefined || i.set !== undefined) return accessorDescriptor(() => e[t], i.enumerable);\n // The proxy target has no such key, so the descriptor must be configurable;\n // Reflect's is a fresh object, so a configurable one is handed out as is.\n if (i.configurable) return i;\n return {\n configurable: true,\n enumerable: i.enumerable,\n writable: true,\n value: i.value\n };\n}\n\n// Own ENUMERABLE keys, symbols included, of an entry — the user-facing key\n// set (`Object.keys(merged)`), where enumerability matters (#2769).\nfunction sourceEnumerableKeys(e, n) {\n {\n if (e.kind === SOURCE_MERGE) return mergeEnumerableKeys(e.source, e);\n const n = ownEnumerableKeys(viewSource(e));\n const t = [];\n for (let r = 0; r < n.length; r++) if (!isHidden(e, n[r])) t.push(n[r]);\n return t;\n }\n}\n\n// The target of a merge() proxy: the flattened sources, read by one shared\n// handler — like OmitView, no per-instance closures. `sources` is what\n// `mergeSources` answers.\n/** @internal */ class MergeView {\n sources;\n kinds;\n /** key → the plain leaf that owns it (later sources win), built by an\n * enumeration or once the reads have paid for it (see `resolvedTable`)\n * when every leaf has static keys; `null` when one doesn't. Until then\n * the slot counts the per-key trap reads so far. One slot rather than a\n * counter field of its own: a view is built per source per component\n * layer, and each field initializer is a measurable share of a\n * constructor that small in the lower JIT tiers. */\n table=0;\n /** see `tableOwnKeys` / `tableDescriptor` */\n keys=undefined;\n descs=undefined;\n constructor(e, \n /** `kinds[i]` is what `sources[i]` is (see `SourceKind`). */\n n) {\n this.sources = e;\n this.kinds = n;\n }\n}\n\n/** @internal The `MergeView` behind a `merge()` proxy — its flattened\n * `sources` with their `kinds` — or undefined. */ function mergeView(e) {\n if (!e || !($PROXY in e)) return undefined;\n const n = e[$RECORD];\n return n instanceof MergeView ? n : undefined;\n}\n\n/** @internal The record behind a merge() or omit() proxy — a `MergeView`\n * (flattened `sources` with their `kinds`) or an `OmitView` — or undefined\n * for anything else (a plain object, a store, a foreign proxy). Two fast\n * traps on a proxy (`has`, then `$RECORD`), none on a plain object. */ function viewOf(e) {\n return e && $PROXY in e ? e[$RECORD] : undefined;\n}\n\n/** @internal The resolved key table of a merge/omit view — every own key of\n * the view mapped to the plain object that owns it, in merged order (a key\n * at the position of the last source that carries it, see `tableSet`) — or\n * undefined when it has none: a leaf is a store or a memo source, whose\n * keys can change, or the object is not a view at all.\n *\n * This is the flat object the eager copy used to build, made lazily and\n * without copying: one pass over the leaves' own keys, then every\n * `get`/`has`/descriptor is one lookup plus one read of the owning leaf, and\n * a consumer (`spread` rerunning its effect) walks the table instead of\n * re-deriving shadowing from the leaves each time. Own keys only, as the\n * copy's were: a plain source's key set is fixed once merged (keys added to\n * it later are not seen — the copy didn't see them either).\n *\n * It is built by an ENUMERATION — the `ownKeys` trap, or a consumer asking\n * for it here — or once per-key reads have paid for it (`READS_FOR_TABLE`),\n * not on the first read. A per-key read has a direct answer (a walk of the\n * sources, last to first, one `in` each) whose cost is the source count,\n * while the table's is every key of every leaf, so the walk wins until a\n * view has been read about as many times as it has keys. On the server it\n * never is: a component reads its props a few times, the element enumerates\n * them once through its own source walk, and the view is gone — building on\n * first read there cost a component chain a table per layer (profiled on\n * the Kobalte-shaped chain: a third of SSR time in the table code and its\n * garbage). On the\n * client a view read on every reactive rerun crosses the threshold in its\n * first few updates and is one lookup per read from then on, as before.\n * Once built — by a `spread`, `Object.keys`, `{...props}`, or the count —\n * every trap uses it. */ function resolvedTable(e) {\n if (!e || !($PROXY in e)) return undefined;\n const n = recordOf(e);\n if (n instanceof OmitView) return omitTable(n);\n return n === undefined ? undefined : mergeTable(n);\n}\n\nfunction mergeTable(e) {\n let n = e.table;\n if (typeof n !== \"object\") {\n // a read count: not decided yet\n const t = e.sources, r = e.kinds;\n for (let n = 0; n < t.length; n++) {\n if (!entryHasStaticKeys(t[n], r[n])) {\n e.table = null;\n return undefined;\n }\n }\n n = new Map;\n collectTable(n, e, undefined);\n e.table = n;\n }\n return n === null ? undefined : n;\n}\n\n// One pass over a merge record's leaves into `table`, through the nested\n// omit-over-merge entries — the filters enclosing the current leaf are the\n// `filters` stack — so a component chain builds ONE table at the view that\n// asked, not one per layer. A key an entry hides that an EARLIER entry owned\n// must stay: a filter applies to its own entry's contribution, not to the\n// merge, which is exactly what the stack expresses. Every entry has static\n// keys (the caller checked), so a leaf's own keys are the truth.\nfunction collectTable(e, n, t) {\n const r = n.sources, i = n.kinds;\n for (let n = 0; n < r.length; n++) {\n const f = r[n];\n if (i[n] === SOURCE_OMIT) {\n if (f.kind === SOURCE_MERGE) {\n if (t === undefined) t = [ f ]; else t.push(f);\n collectTable(e, f.source, t);\n t.pop();\n continue;\n }\n const n = f.source;\n const r = Reflect.ownKeys(n);\n for (let i = 0; i < r.length; i++) {\n const u = r[i];\n if (!isHidden(f, u) && !hiddenByAny(t, u)) tableSet(e, u, n);\n }\n } else {\n const n = Reflect.ownKeys(f);\n for (let r = 0; r < n.length; r++) {\n const i = n[r];\n if (!hiddenByAny(t, i)) tableSet(e, i, f);\n }\n }\n }\n}\n\nfunction hiddenByAny(e, n) {\n if (e !== undefined) for (let t = e.length - 1; t >= 0; t--) if (isHidden(e[t], n)) return true;\n return false;\n}\n\n// Key order is the merged one — every key at the position of the LAST source\n// that carries it — the order `ssrElement`'s array form serializes in and the\n// eager copy enumerated in, so a spread through a view and a spread over the\n// sources emit the same attribute order.\nfunction tableSet(e, n, t) {\n if (e.has(n)) e.delete(n);\n e.set(n, t);\n}\n\n// An omit view's table: its source's (a merge's table, or a plain object's\n// own keys) minus the hidden keys. Cached on the record.\nfunction omitTable(e) {\n let n = e.table;\n if (typeof n !== \"object\") {\n const t = e.source;\n if (e.kind === SOURCE_MERGE) {\n // One pass over the merge's leaves with this filter on the stack —\n // the merge record builds no table of its own for it.\n if (!mergeHasStaticKeys(t)) {\n e.table = null;\n return undefined;\n }\n n = new Map;\n collectTable(n, t, [ e ]);\n } else if (e.kind === SOURCE_PLAIN) {\n n = new Map;\n const r = Reflect.ownKeys(t);\n for (let i = 0; i < r.length; i++) {\n const f = r[i];\n if (!isHidden(e, f)) n.set(f, t);\n }\n } else {\n // a store or a memo: keys can change, no table\n e.table = null;\n return undefined;\n }\n e.table = n;\n }\n return n === null ? undefined : n;\n}\n\n// The user-facing key set of a resolved table: its keys that are enumerable\n// on the leaf that owns them (`Object.keys(merged)`, #2769). Fixed, like the\n// table, so it is built once per view: an `ownKeys` trap may hand back the\n// same array every time (the engine copies it).\nconst propertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction tableOwnKeys(e, n) {\n let t = e.keys;\n if (t === undefined) {\n t = e.keys = [];\n for (const [e, r] of n) if (propertyIsEnumerable.call(r, e)) t.push(e);\n }\n return t;\n}\n\n// The descriptor for a table key — its owning leaf's, truthful (see\n// `sourceDescriptor`) — with the shape cached per key so an enumeration\n// (`for…in`, `Object.keys`, `{...props}`: a descriptor trap per key, on\n// every pass) does not re-read the leaf's descriptor and re-allocate a\n// getter each time. An accessor reads live, so its descriptor is reused as\n// is; a data descriptor is rebuilt with the current value.\nfunction tableDescriptor(e, n, t) {\n const r = n.get(t);\n if (r === undefined) return undefined;\n let i = e.descs;\n if (i === undefined) i = e.descs = new Map;\n let f = i.get(t);\n if (f === undefined) {\n f = sourceDescriptor(r, SOURCE_PLAIN, t);\n if (f === undefined) return undefined;\n i.set(t, f);\n return f;\n }\n if (f.get !== undefined) return f;\n return {\n configurable: true,\n enumerable: f.enumerable,\n writable: f.writable,\n value: r[t]\n };\n}\n\n// Per-key trap reads a view takes before building its table, from the\n// break-even: a build is ~60 ns per key (an `ownKeys` share, a `has`, a\n// `set`), a walk ~20 ns per source (an `in`, a hidden-list check), and a\n// leaf carries about five keys — so the table has paid for itself after\n// ~15 reads. Measured on the Kobalte-shaped chain: a walk is 2× a lookup at\n// depth 1 and up to 10× for a first-source key at depth 7 (a walk through\n// seven nested layers, a hidden-list check at each), so a view read on\n// every update wants the table; a view read a handful of times (every\n// server-side view) never wants it.\nconst READS_FOR_TABLE = 16;\n\n// The table for a per-key trap: the one a view HAS (built by an enumeration\n// or an earlier read, see `resolvedTable`), or the one this read pays for,\n// or none — a walk answers. One per view type, so a trap pays no type check.\n// A settled slot is an object (the Map, or `null`); a number is the count.\nfunction mergeReadTable(e) {\n const n = e.table;\n if (typeof n === \"object\") return n === null ? undefined : n;\n if (n + 1 < READS_FOR_TABLE) {\n e.table = n + 1;\n return undefined;\n }\n return mergeTable(e);\n}\n\n// Only for an omit over a merge (`kind === SOURCE_MERGE`; the caller checks,\n// inline — a call is not free in every tier): an omit over one object reads\n// it directly — a list check and a property read, nothing a table would\n// shorten.\nfunction omitReadTable(e) {\n const n = e.table;\n if (typeof n === \"object\") return n === null ? undefined : n;\n if (n + 1 < READS_FOR_TABLE) {\n e.table = n + 1;\n return undefined;\n }\n return omitTable(e);\n}\n\n// The table a record HAS — built already by an enumeration or a trap's read\n// count — or undefined. What a nested walk asks: a record reached through an\n// outer view's entry counts no reads of its own (the outer view decides for\n// the whole tree, and its table build then builds the inner ones), so the\n// inner merges of a component chain build nothing on the server where the\n// leaves are read a few times each.\nfunction tableOf(e) {\n const n = e.table;\n return typeof n === \"object\" && n !== null ? n : undefined;\n}\n\n// \"no entry has the key\" — distinct from an entry that holds `undefined`.\nconst MISSING = Symbol();\n\n// The read: the value of the last entry that has the key, or MISSING. ONE\n// walk — a nested omit-over-merge entry answers presence and value together,\n// so a chain of layers is walked once per read, not once per layer per\n// level.\nfunction mergeLookup(e, n) {\n const t = tableOf(e);\n if (t !== undefined) {\n const e = t.get(n);\n return e === undefined ? MISSING : e[n];\n }\n const r = e.sources, i = e.kinds;\n for (let e = r.length - 1; e >= 0; e--) {\n const t = i[e];\n // The common leaf first, read in place: a component's props view is a\n // few plain objects, read once per key on the server.\n if (t === SOURCE_PLAIN) {\n const t = r[e];\n if (n in t) return t[n];\n continue;\n }\n if (t === SOURCE_OMIT) {\n const t = r[e];\n if (isHidden(t, n)) continue;\n if (t.kind === SOURCE_MERGE) {\n const e = mergeLookup(t.source, n);\n if (e !== MISSING) return e;\n continue;\n }\n const i = viewSource(t);\n if (n in i) return i[n];\n } else {\n const i = leafOf(r[e], t);\n if (n in i) return i[n];\n }\n }\n return MISSING;\n}\n\nfunction mergeGet(e, n) {\n const t = mergeLookup(e, n);\n return t === MISSING ? undefined : t;\n}\n\n// `key in merge`, on the record.\nfunction mergeHas(e, n) {\n const t = tableOf(e);\n if (t !== undefined) return t.has(n);\n const r = e.sources, i = e.kinds;\n for (let e = r.length - 1; e >= 0; e--) if (sourceHas(r[e], i[e], n)) return true;\n return false;\n}\n\n// The proxy's `getOwnPropertyDescriptor`, on the record.\nfunction mergeDescriptor(e, n) {\n const t = tableOf(e);\n if (t !== undefined) return tableDescriptor(e, t, n);\n const r = e.sources, i = e.kinds;\n for (let t = r.length - 1; t >= 0; t--) {\n if (!sourceHas(r[t], i[t], n)) continue;\n // `in` also answers for inherited keys, which have no own descriptor.\n return sourceDescriptor(r[t], i[t], n, true) ?? accessorDescriptor(() => mergeGet(e, n));\n }\n return undefined;\n}\n\n// Own keys of a merge record in merged order — every key at the position\n// of the LAST entry that carries it, the order the table keeps and\n// `ssrElement` serializes in. `enumerable` selects the user-facing set\n// (`Object.keys`, #2769) over every own string key (a consumer's walk);\n// `filter` is the omit this record is read through, applied as the keys\n// are gathered so an omit over a merge builds ONE list per layer. A list\n// with `indexOf` rather than a Set: a props object has a dozen keys, and a\n// Set's hash store was 2 KB per row on the Kobalte-shaped chain.\nfunction mergeKeysOf(e, n, t) {\n const r = [];\n collectKeys(e, t === undefined ? undefined : [ t ], n, r, null);\n return r;\n}\n\n// One pass over a merge record's leaves — through its nested omit-over-merge\n// entries, `filters` the omits enclosing the current leaf (see\n// `collectTable`) — appending each leaf's keys to `keys` in merged order\n// (a key already listed moves to the end: later wins) and, when `owners` is\n// given, the object that owns the key at the same index. A consumer that\n// reads every key once (`ssrElement`) then reads `owners[i][keys[i]]`: no\n// `in` walk per key, no table. A memo leaf is resolved once here.\nfunction collectKeys(e, n, t, r, i) {\n const f = e.sources, u = e.kinds;\n for (let e = 0; e < f.length; e++) {\n let o = f[e], c = u[e];\n let s;\n if (c === SOURCE_OMIT) {\n if (o.kind === SOURCE_MERGE) {\n if (n === undefined) n = [ o ]; else n.push(o);\n collectKeys(o.source, n, t, r, i);\n n.pop();\n continue;\n }\n s = o;\n c = o.kind;\n o = o.source;\n }\n o = leafOf(o, c);\n const d = t ? ownEnumerableKeys(o) : leafKeys(o, c);\n for (let e = 0; e < d.length; e++) {\n const t = d[e];\n if (s !== undefined && isHidden(s, t)) continue;\n if (hiddenByAny(n, t)) continue;\n addKey(r, i, t, o);\n }\n }\n}\n\n// Append `key` owned by `owner`, moving an earlier listing to the end: later\n// wins, and the position is the last owner's (the merged order).\nfunction addKey(e, n, t, r) {\n const i = e.indexOf(t);\n if (i !== -1) {\n e.splice(i, 1);\n if (n !== null) n.splice(i, 1);\n }\n e.push(t);\n if (n !== null) n.push(r);\n}\n\n/** @internal Every own string key of a props SOURCE — a plain object, a\n * store or foreign proxy, or a merge/omit view — appended to `keys` in\n * merged order with the object that owns each at the same index of\n * `owners`: a key already listed (by this source or an earlier one) moves\n * to the end, so several sources collected in turn give the order and the\n * winners a merge of them would. A consumer that reads each key once\n * (`ssrElement`) then reads `owners[i][keys[i]]` — the owner's getter runs\n * there, once — and asks nothing else of a view: no table, no `in` walk per\n * key through the merge/omit layers, no key list per leaf. One pass,\n * however deep the layers nest. Symbols are listed; the consumer skips\n * them. */ function sourceOwners(e, n, t) {\n if ($PROXY in e) {\n const r = viewOf(e);\n if (r === undefined) {\n // a store: one `ownKeys` trap, reads through `[]`\n const r = Reflect.ownKeys(e);\n for (let i = 0; i < r.length; i++) addKey(n, t, r[i], e);\n return;\n }\n if (r instanceof OmitView) {\n if (r.kind === SOURCE_MERGE) return collectKeys(r.source, [ r ], false, n, t);\n const e = viewSource(r);\n const i = leafKeys(e, r.kind);\n for (let f = 0; f < i.length; f++) if (!isHidden(r, i[f])) addKey(n, t, i[f], e);\n return;\n }\n return collectKeys(r, undefined, false, n, t);\n }\n const r = Object.keys(e);\n for (let i = 0; i < r.length; i++) addKey(n, t, r[i], e);\n}\n\n// The user-facing key set of a merge record, read through `filter` if given.\nfunction mergeEnumerableKeys(e, n) {\n const t = mergeTable(e);\n if (t === undefined) return mergeKeysOf(e, true, n);\n const r = tableOwnKeys(e, t);\n if (n === undefined) return r;\n const i = [];\n for (let e = 0; e < r.length; e++) if (!isHidden(n, r[e])) i.push(r[e]);\n return i;\n}\n\nconst mergeTraps = {\n get(e, n, t) {\n // The private keys are symbols; a string read (every prop) skips the\n // compares. `$TARGET` is answered so a store check never walks the\n // sources (a leaf that is a store would answer it).\n if (typeof n === \"symbol\") {\n if (n === $PROXY) return t;\n if (n === $RECORD) return e;\n if (n === $TARGET) return undefined;\n }\n // A trap read counts toward the table (see `mergeReadTable`); the walk\n // itself is the record's. `mergeReadTable` and the plain walk of\n // `mergeLookup` are inlined here: a trap is entered from the runtime, so\n // nothing below it is inlined for it, and a component's props view is a\n // few plain objects read once per key on the server — the walk is the\n // whole read. A leaf that is not plain hands the walk to `mergeGet`,\n // which starts over (a plain leaf walked twice is two `in` checks).\n const r = e.table;\n let i;\n if (typeof r !== \"object\") {\n if (r + 1 < READS_FOR_TABLE) {\n e.table = r + 1;\n const t = e.sources, i = e.kinds;\n for (let r = t.length - 1; r >= 0; r--) {\n if (i[r] !== SOURCE_PLAIN) return mergeGet(e, n);\n // Read first, `in` only to tell a missing key from one holding\n // undefined: the last source is the one that usually has the key.\n const f = t[r][n];\n if (f !== undefined || n in t[r]) return f;\n }\n return undefined;\n }\n i = mergeTable(e);\n if (i === undefined) return mergeGet(e, n);\n } else if (r === null) return mergeGet(e, n); else i = r;\n const f = i.get(n);\n return f === undefined ? undefined : f[n];\n },\n has(e, n) {\n if (n === $PROXY) return true;\n if (n === $TARGET || n === $RECORD) return false;\n const t = mergeReadTable(e);\n if (t !== undefined) return t.has(n);\n return mergeHas(e, n);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(e, n) {\n if (n === $PROXY || n === $TARGET || n === $RECORD) return undefined;\n const t = mergeReadTable(e);\n if (t !== undefined) return tableDescriptor(e, t, n);\n return mergeDescriptor(e, n);\n },\n ownKeys(e) {\n return mergeEnumerableKeys(e);\n }\n};\n\n// An omit view reads its source directly — a hidden-key check and one\n// property read; over a merge record, the merge's own walk by function call,\n// never a trap. Once an enumeration or the read count has built its table\n// (over a merge with plain leaves only: the merge's, filtered) every trap\n// answers from that instead.\nconst omitTraps = {\n get(e, n, t) {\n if (n === $PROXY) return t;\n // `$RECORD` is THIS view — never the underlying merge's record, which is\n // unfiltered: handing a re-merge the merge's own sources would leak the\n // omitted keys (#3014). A consumer walks the omit record as ONE filtered\n // entry (`recordOf` tells the two records apart by class).\n if (n === $RECORD) return e;\n if (n === $TARGET) return undefined;\n if (e.kind === SOURCE_MERGE) {\n const t = omitReadTable(e);\n if (t !== undefined) {\n const e = t.get(n);\n return e === undefined ? undefined : e[n];\n }\n if (isHidden(e, n)) return undefined;\n return mergeGet(e.source, n);\n }\n if (isHidden(e, n)) return undefined;\n return viewSource(e)[n];\n },\n has(e, n) {\n if (n === $PROXY) return true;\n if (n === $TARGET || n === $RECORD) return false;\n if (e.kind === SOURCE_MERGE) {\n const t = omitReadTable(e);\n if (t !== undefined) return t.has(n);\n if (isHidden(e, n)) return false;\n return mergeHas(e.source, n);\n }\n if (isHidden(e, n)) return false;\n return n in viewSource(e);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(e, n) {\n if (n === $PROXY || n === $TARGET || n === $RECORD) return undefined;\n if (e.kind === SOURCE_MERGE) {\n const t = omitReadTable(e);\n if (t !== undefined) return tableDescriptor(e, t, n);\n }\n return sourceDescriptor(e, SOURCE_OMIT, n);\n },\n ownKeys(e) {\n if (e.kind === SOURCE_MERGE) {\n const n = omitTable(e);\n if (n !== undefined) return tableOwnKeys(e, n);\n // No table (a store or memo leaf): the merge's own key set, filtered.\n return sourceEnumerableKeys(e);\n }\n const n = Reflect.ownKeys(viewSource(e));\n const t = [];\n for (let r = 0; r < n.length; r++) if (!isHidden(e, n[r])) t.push(n[r]);\n return t;\n }\n};\n\n/** @internal The flattened sources behind a `merge()` proxy, or undefined.\n * A merge's writes are no-ops, so its sources are the whole truth. A COPY of\n * a merge (`{...merged}`, a descriptor copy) is a plain object that carries\n * no sources — `ownKeys` never lists $RECORD — so what is on the copy is\n * the truth there and every consumer reads it directly (#3384). */ function mergeSources(e) {\n const n = mergeView(e);\n return n === undefined ? undefined : n.sources;\n}\n\n/**\n * Merges multiple props-like objects into a single proxy that *preserves\n * reactivity*. Reads are forwarded to the right-most source that defines the\n * property, so later sources override earlier ones (like `Object.assign`).\n *\n * Function arguments are treated as memo-backed sources — useful for passing\n * derived defaults whose computation should track reactively.\n *\n * The result is a live VIEW of its sources, never a copy: creating it costs\n * nothing per key, every read goes to the source that owns the key (a getter\n * runs there, a data property is read live), and writing to it is a no-op.\n * A single non-function source is returned as is. To own a mutable object,\n * copy it: `{ ...merged }` snapshots the current values.\n *\n * Use this in component bodies to merge defaults / overrides without losing\n * Solid's per-property tracking.\n *\n * Reading props, here and anywhere: a prop's getter is defined only for a\n * read through its own object (`props.x`, `{ ...props }`, `Reflect.get`,\n * these views). Forwarding its descriptor onto another object and reading it\n * there is not supported — the compiler's server-side props keep their state\n * on the instance, so the getter needs its object as receiver. A copy that\n * must stay live defines its own getter that reads through the source, as\n * the no-Proxy paths of merge() and omit() do.\n *\n * @example\n * ```tsx\n * function Button(_props: { label: string; type?: string; disabled?: boolean }) {\n * const props = merge({ type: \"button\", disabled: false }, _props);\n *\n * return <button type={props.type} disabled={props.disabled}>{props.label}</button>;\n * }\n * ```\n */ function merge(...e) {\n if (e.length === 1 && typeof e[0] !== \"function\") return e[0];\n // Sized to the argument count up front: a view is built per source per\n // component layer, and growing two empty arrays by `push` was a third of\n // its construction. A nested view's sources may run past the count (the\n // array grows), a falsy source leaves it short (trimmed below).\n const n = new Array(e.length);\n const t = new Array(e.length);\n let r = 0;\n // The one non-falsy source, if there is exactly one: it IS the merge.\n let i = undefined;\n let f = 0;\n for (let u = 0; u < e.length; u++) {\n const o = e[u];\n if (!o) continue;\n f++;\n i = o;\n if (typeof o === \"function\") {\n // Observe tiers name it and exempt it from UNSTABLE_MEMO_OUTPUT (see\n // CONFIG_KEY_BAG); prod passes no options.\n n[r] = createMemo(o);\n t[r++] = SOURCE_MEMO;\n continue;\n }\n if ($PROXY in o) {\n // A store (or a foreign proxy) is a leaf as it is. A merge() proxy is\n // flattened through: its writes are no-ops, so its sources are exactly\n // what it reads. An omit() proxy joins as its view record — ONE entry,\n // its filter travelling with it, whether it is over a plain object or\n // a whole merge (never the merge's own sources, which would leak the\n // omitted keys, #3014). A consumer's walk recurses into the record.\n const e = recordOf(o);\n if (e instanceof MergeView) {\n for (let i = 0; i < e.sources.length; i++) {\n n[r] = e.sources[i];\n t[r++] = e.kinds[i];\n }\n } else if (e !== undefined) {\n n[r] = e;\n t[r++] = SOURCE_OMIT;\n } else {\n n[r] = o;\n t[r++] = SOURCE_PROXY;\n }\n continue;\n }\n n[r] = o;\n t[r++] = SOURCE_PLAIN;\n }\n if (r !== n.length) {\n n.length = r;\n t.length = r;\n }\n if (SUPPORTS_PROXY) {\n if (f === 1 && typeof i !== \"function\") return i;\n // Always a view, never a copy. Building a plain object here costs a\n // descriptor read, a bound getter and a defineProperty per key per\n // layer, and component libraries stack several layers per element\n // (defaults → omit → call-site statics → …), so the copies dominated\n // their render cost while every consumer that matters — `spread`,\n // `ssrElement`, a nested merge — reads the flattened sources directly\n // anyway (#3448). The view is O(1) to create and reads through to the\n // sources, so a data property on a source is read live, like a getter.\n // Writes to the result are no-ops (a consumer that needs its own object\n // copies: `{...merged}`, which the traps answer truthfully). Copies of\n // the result never carry $RECORD (#3384): `ownKeys` answers only the\n // sources' keys.\n return new Proxy(new MergeView(n, t), mergeTraps);\n }\n // No Proxy: an eager descriptor copy, semantics as close to the view as a\n // plain object allows (getters stay live; data properties are snapshots).\n const u = Object.create(null);\n let o = false;\n let c = n.length - 1;\n for (let e = c; e >= 0; e--) {\n const t = n[e];\n if (!t) {\n e === c && c--;\n continue;\n }\n const r = Object.getOwnPropertyNames(t);\n for (let n = r.length - 1; n >= 0; n--) {\n const i = r[n];\n if (i === \"__proto__\" || i === \"constructor\") continue;\n if (!u[i]) {\n o = o || e !== c;\n const n = Object.getOwnPropertyDescriptor(t, i);\n u[i] = n.get ? {\n enumerable: true,\n configurable: true,\n get: n.get.bind(t)\n } : n;\n }\n }\n }\n if (!o) return n[c];\n const s = {};\n const d = Object.keys(u);\n for (let e = d.length - 1; e >= 0; e--) {\n const n = d[e], t = u[n];\n if (t.get) Object.defineProperty(s, n, t); else s[n] = t.value;\n }\n return s;\n}\n\nfunction omit(e, ...n) {\n let t = n.length === 1 && typeof n[0] === \"function\" ? n[0] : n;\n if (SUPPORTS_PROXY) {\n // A view over a view folds: one record, both filters, the original\n // source — so a consumer walks the real object however deep the omits go.\n // Over a merge() proxy the source is the merge's RECORD (see OmitView):\n // one record whatever the leaf count, read by function call.\n let n = e;\n let r = SOURCE_PLAIN;\n if (typeof e === \"function\") r = SOURCE_MEMO; else if ($PROXY in e) {\n r = SOURCE_PROXY;\n const i = recordOf(e);\n if (i instanceof OmitView) {\n n = i.source;\n r = i.kind;\n t = combineHidden(i.hidden, t);\n } else if (i !== undefined) {\n n = i;\n r = SOURCE_MERGE;\n }\n }\n return new Proxy(new OmitView(n, r, t), omitTraps);\n }\n const r = {};\n const i = Object.getOwnPropertyNames(e);\n const f = typeof t === \"function\" ? t : t.length > 4 && i.length > t.length ? (e => n => e.has(n))(new Set(t)) : e => t.includes(e);\n for (const n of i) {\n if (!f(n)) {\n const t = Object.getOwnPropertyDescriptor(e, n);\n if (!t.get && !t.set && t.enumerable && t.writable && t.configurable) {\n r[n] = t.value;\n } else if (t.get || t.set) {\n // An accessor is re-homed with its source as receiver, never copied\n // as-is: a props getter is only defined for a read THROUGH its own\n // object (the compiler's server props keep their state on the\n // instance, so a forwarded descriptor read on the copy throws). Same\n // rule as merge()'s copy path above.\n Object.defineProperty(r, n, {\n enumerable: t.enumerable,\n configurable: true,\n get: t.get && t.get.bind(e),\n set: t.set && t.set.bind(e)\n });\n } else Object.defineProperty(r, n, t);\n }\n }\n return r;\n}\n\nexport { MergeView, OmitView, SOURCE_MEMO, SOURCE_MERGE, SOURCE_OMIT, SOURCE_PLAIN, SOURCE_PROXY, hasStaticKeys, isStatic, merge, mergeSources, mergeView, omit, omitView, resolvedTable, sourceGet, sourceHas, sourceKeys, sourceOwners, viewOf };","import { from as from$1, createMemo as createMemo$1, flatten, getContext, setContext, peekNextChildId, getOwner, createSignal as createSignal$1, setSnapshotCapture, createRenderEffect as createRenderEffect$1, createRoot as createRoot$1, createOwner, runWithOwner, createDeferred as createDeferred$1, createEffect as createEffect$1, createErrorBoundary as createErrorBoundary$1, createLoadingBoundary as createLoadingBoundary$1, createOptimistic as createOptimistic$1, createOptimisticStore as createOptimisticStore$1, createProjection as createProjection$1, createRevealOrder as createRevealOrder$1, createStore as createStore$1, releaseSnapshotScope, markSnapshotScope, clock, forgetThrownRead, NotReadyError, getNextChildId, clearSnapshots, flush, onCleanup, isDisposed, untrack, repeat, verdict, mapArray } from '@solidjs/signals';\nexport { $PROXY, $TRACK, NotReadyError, ROOT_ERROR_HOOK, TimeoutError, action, affects, configureClientErrors, createOwner, createReaction, createTrackedEffect, deep, enableExternalSource, enforceLoadingBoundary, flatten, flush, getNextChildId, getObserver, getOwner, heldRead, isDisposed, isEqual, isHidden, isPending, isStatic, isWrappable, latest, mapArray, merge, omit, onCleanup, onFlush, onSettled, reconcile, refresh, repeat, resetErrorHalt, resolve, runRefCallback, runWithOwner, setReadWatch, setSignalIdentities, setSwapHook, setWriteHook, signalName, snapshot, storeName, strictReadTracked, until, untrack } from '@solidjs/signals';\n\nconst LIVE_SOURCE$1 = Symbol.for(\"solid.LiveSource\");\nfunction isLiveSource(source) {\n return source != null && !!source[LIVE_SOURCE$1];\n}\nfunction brandFrom(source, iterable) {\n const s = source;\n const observable = Symbol.observable;\n if (typeof s === \"function\" || typeof s?.subscribe === \"function\" || typeof s?.[\"@@observable\"] === \"function\" || observable && typeof s?.[observable] === \"function\") iterable[LIVE_SOURCE$1] = true;\n return iterable;\n}\nfunction from(source) {\n if (isLiveSource(source)) return source;\n return brandFrom(source, from$1(source));\n}\n\nconst IS_DEV = false;\nconst $DEVCOMP = Symbol(0);\nfunction createContext(defaultValue, options) {\n const id = Symbol(options && options.name || \"\");\n function provider(props) {\n const value = props.value;\n const c = createMemo$1(p => (p || setContext(provider, value), props.children), {\n lazy: true\n });\n return createMemo$1(p => (p || setContext(provider, value), flatten(c())), {\n lazy: true,\n sync: true\n });\n }\n provider.id = id;\n provider.defaultValue = defaultValue;\n return provider;\n}\nfunction useContext(context) {\n return getContext(context);\n}\nfunction children(fn) {\n const c = createMemo$1(fn, {\n lazy: true\n });\n const memo = createMemo$1(() => flatten(c()), {\n lazy: true,\n sync: true\n });\n memo.toArray = () => {\n const v = memo();\n return Array.isArray(v) ? v : v != null ? [v] : [];\n };\n return memo;\n}\n\nfunction createShadowDraft(realDraft, shallow) {\n const shadow = shallow ? Array.isArray(realDraft) ? realDraft.slice() : {\n ...realDraft\n } : JSON.parse(JSON.stringify(realDraft));\n let useShadow = true;\n return {\n proxy: new Proxy(shadow, {\n get(_, prop) {\n return useShadow ? shadow[prop] : realDraft[prop];\n },\n set(_, prop, value) {\n if (useShadow) {\n shadow[prop] = value;\n return true;\n }\n return Reflect.set(realDraft, prop, value);\n },\n deleteProperty(_, prop) {\n if (useShadow) {\n delete shadow[prop];\n return true;\n }\n return Reflect.deleteProperty(realDraft, prop);\n },\n has(_, prop) {\n return prop in (useShadow ? shadow : realDraft);\n },\n ownKeys() {\n return Reflect.ownKeys(useShadow ? shadow : realDraft);\n },\n getOwnPropertyDescriptor(_, prop) {\n return Object.getOwnPropertyDescriptor(useShadow ? shadow : realDraft, prop);\n }\n }),\n activate() {\n useShadow = false;\n }\n };\n}\nfunction quietAnswer(thenable) {\n let step = 0;\n return {\n [Symbol.asyncIterator]() {\n return {\n next() {\n if (step === 0) {\n step = 1;\n return syncThenable({\n done: false,\n value: undefined\n });\n }\n if (step === 1) {\n step = 2;\n return thenable.then(v => ({\n done: false,\n value: v\n }));\n }\n return Promise.resolve({\n done: true,\n value: undefined\n });\n }\n };\n }\n };\n}\nfunction hydrateStoreFromAsyncIterable(coreFn, fn, initialValue, options) {\n const parent = getOwner();\n const expectedId = peekNextChildId(parent);\n if (!sharedConfig.has(expectedId)) return null;\n const loaded = sharedConfig.load(expectedId);\n if (!isAsyncIterable(loaded)) return null;\n const srcIt = loaded[Symbol.asyncIterator]();\n const loading = hasLoadingWindow(options);\n let isFirst = true;\n let buffered = null;\n let terminal = false;\n const fail = e => {\n terminal = true;\n throw e;\n };\n return coreFn(draft => {\n if (terminal) return fn(draft);\n const {\n proxy\n } = createShadowDraft(draft, options?.shallow);\n subFetch(fn, proxy);\n const process = res => {\n if (res.done) {\n terminal = true;\n return {\n done: true,\n value: undefined\n };\n }\n if (isFirst) {\n isFirst = false;\n setSnapshotCapture(false);\n try {\n if (Array.isArray(res.value)) {\n for (let i = 0; i < res.value.length; i++) draft[i] = res.value[i];\n draft.length = res.value.length;\n } else {\n for (const key of Object.keys(draft)) {\n if (!(key in res.value)) delete draft[key];\n }\n Object.assign(draft, res.value);\n }\n } finally {\n setSnapshotCapture(true);\n }\n } else {\n applyPatches(draft, res.value);\n }\n return {\n done: false,\n value: undefined\n };\n };\n return {\n [Symbol.asyncIterator]() {\n return {\n next() {\n if (isFirst) {\n const r = srcIt.next();\n if (r && typeof r.then === \"function\") return {\n then(fn, rej) {\n r.then(v => {\n let out;\n try {\n out = process(v);\n } catch (e) {\n terminal = true;\n rej(e);\n return;\n }\n fn(out);\n }, e => {\n terminal = true;\n rej(e);\n });\n }\n };\n if (loading) {\n return new Promise(resolvePull => {\n onHydrationEnd(() => resolvePull(process(r)));\n });\n }\n return syncThenable(process(r));\n }\n if (buffered) {\n const b = buffered;\n buffered = null;\n return b.then(process, fail);\n }\n let r = srcIt.next();\n if (r && typeof r.then === \"function\") {\n return r.then(process, fail);\n }\n return new Promise(resolvePull => {\n onHydrationEnd(() => {\n let result = process(r);\n while (!r.done) {\n const peek = srcIt.next();\n if (peek && typeof peek.then === \"function\") {\n buffered = peek;\n break;\n }\n r = peek;\n if (!r.done) result = process(r);\n }\n resolvePull(result);\n });\n });\n },\n return(value) {\n buffered = null;\n return forwardIteratorReturn(srcIt, value);\n }\n };\n }\n };\n }, initialValue, options);\n}\nfunction wrapStoreFn(fn, options) {\n return draft => readSerializedOrCompute(() => fn(draft), draft, options);\n}\nfunction hydrateStoreLikeFn(coreFn, fn, initialValue, options, ssrSource) {\n if (ssrSource === \"client\") {\n return withHydrationGate(hydrated => coreFn(draft => {\n if (!hydrated()) return UNASKED;\n return fn(draft);\n }, initialValue, options));\n }\n if (ssrSource === \"hybrid\") {\n const id = peekNextChildId(getOwner());\n if (!sharedConfig.has(id)) return coreFn(fn, initialValue, options);\n const initP = sharedConfig.load(id);\n let takeover;\n const detect = draft => {\n const r = fn(draft);\n takeover = isAsyncIterable(r);\n return r;\n };\n const [hydrated, setHydrated] = createSignal$1(false, {\n ownedWrite: true\n });\n let live = false;\n const flip = () => {\n if (!live) setHydrated(true);\n };\n let adopted = false;\n let creating = true;\n let landedOnCreate = false;\n const result = coreFn(draft => {\n if (live) return fn(draft);\n if (takeover === false) return readSerializedOrCompute(() => fn(draft), draft, options);\n if (hydrated()) {\n live = true;\n const {\n proxy,\n activate\n } = createShadowDraft(draft, options?.shallow);\n const r = fn(proxy);\n if (isAsyncIterable(r)) return wrapFirstYield(r, activate);\n if (r != null && typeof r.then === \"function\") return quietAnswer(r);\n return r;\n }\n if (adopted) {\n live = true;\n return fn(draft);\n }\n subFetch(detect, draft);\n let answer;\n try {\n answer = readHydratedValue(initP, () => {}, options);\n } catch (e) {\n if (takeover) live = true;\n throw e;\n }\n if (!takeover) return answer;\n adopted = true;\n if (answer != null && typeof answer.then === \"function\") return adoptedAnswerStream(answer, flip, () => live = true);\n if (creating) landedOnCreate = true;else queueMicrotask(flip);\n return answer;\n }, initialValue, options);\n creating = false;\n if (landedOnCreate) flip();\n return result;\n }\n const aiResult = hydrateStoreFromAsyncIterable(coreFn, fn, initialValue, options);\n if (aiResult !== null) return aiResult;\n return coreFn(wrapStoreFn(fn, options), initialValue, options);\n}\nfunction hydrateStoreLike(coreFn, fn, initialValue, options) {\n if (noHydrationId()) return coreFn(fn, initialValue, options);\n markTopLevelSnapshotScope();\n return hydrateStoreLikeFn(coreFn, fn, initialValue, options, options?.ssrSource);\n}\n\nconst NoHydrateContext = {\n id: Symbol(\"NoHydrateContext\"),\n defaultValue: false\n};\nconst sharedConfig = {\n hydrating: false,\n registry: undefined,\n done: false\n};\nfunction hydrationGetNextContextId() {\n const o = getOwner();\n if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);\n if (getContext(NoHydrateContext)) return undefined;\n return getNextChildId(o);\n}\nconst noop = () => {};\nlet _hydrationEndCallbacks = null;\nlet _pendingBoundaries = 0;\nlet _hydrationDone = false;\nlet _snapshotRootOwner = null;\nlet _claimOwner = null;\nlet _claimRound;\nfunction isClaiming(served) {\n for (let owner = getOwner(); owner; owner = owner._parent) if (owner === _claimOwner || owner._nc && !served) return owner === _claimOwner;\n return !_claimOwner;\n}\nfunction markTopLevelSnapshotScope() {\n if (_snapshotRootOwner) return;\n let owner = getOwner();\n if (!owner) return;\n while (owner._parent) owner = owner._parent;\n markSnapshotScope(owner);\n openLiveScope(owner);\n _snapshotRootOwner = owner;\n}\nfunction isHydrationInProgress() {\n return !_hydrationDone && (sharedConfig.hydrating || _pendingBoundaries > 0);\n}\nfunction isHydrating() {\n return sharedConfig.hydrating && (!sharedConfig.isClaiming || sharedConfig.isClaiming());\n}\nfunction isHydratable() {\n return !!getOwner() && !getContext(NoHydrateContext);\n}\nfunction onHydrationEnd(callback) {\n if (_hydrationDone || !sharedConfig.hydrating && _pendingBoundaries === 0) {\n queueMicrotask(callback);\n return;\n }\n if (!_hydrationEndCallbacks) _hydrationEndCallbacks = [];\n _hydrationEndCallbacks.push(callback);\n}\nfunction drainHydrationCallbacks() {\n if (_hydrationDone) return;\n _hydrationDone = true;\n _doneValue = true;\n clearSnapshots();\n setSnapshotCapture(false);\n flush();\n const cbs = _hydrationEndCallbacks;\n _hydrationEndCallbacks = null;\n if (cbs) for (const cb of cbs) cb();\n setTimeout(() => {\n if (globalThis._$HY) globalThis._$HY.done = true;\n sharedConfig.registry?.clear();\n });\n}\nfunction checkHydrationComplete() {\n if (!_hydratingValue && _pendingBoundaries === 0) drainHydrationCallbacks();\n}\nlet _hydratingValue = false;\nlet _doneValue = false;\nlet _createMemo;\nlet _createErrorBoundary;\nlet _createEffect;\nlet _createLoadingBoundary;\nlet _hydrateSignalLike;\nlet _hydrateStoreLike;\nlet _lazyHydrationLookup;\n// it in EVERY client bundle even with zero references; the PURE-annotated\nconst MockPromise = /* @__PURE__ */(() => {\n class MockPromise {\n catch() {\n return new MockPromise();\n }\n then() {\n return new MockPromise();\n }\n finally() {\n return new MockPromise();\n }\n }\n for (const k of [\"all\", \"allSettled\", \"any\", \"race\", \"reject\", \"resolve\", \"try\"]) {\n MockPromise[k] = () => new MockPromise();\n }\n MockPromise.withResolvers = () => ({\n promise: new MockPromise(),\n resolve() {},\n reject() {}\n });\n return MockPromise;\n})();\nlet tracing = 0;\nfunction subFetch(fn, prev) {\n const ogFetch = fetch;\n const ogPromise = Promise;\n tracing++;\n try {\n window.fetch = () => new MockPromise();\n Promise = MockPromise;\n const result = fn(prev);\n if (result && typeof result.next === \"function\" && typeof result[Symbol.asyncIterator] === \"function\") {\n const it = result[Symbol.asyncIterator]();\n if (it === result) it.next();\n }\n if (result && typeof result.then === \"function\") result.then(undefined, noop);\n if (IS_DEV && result && (typeof result.then === \"function\" || typeof result[Symbol.asyncIterator] === \"function\")) ;\n return result;\n } finally {\n window.fetch = ogFetch;\n Promise = ogPromise;\n tracing--;\n }\n}\nfunction syncThenable(value) {\n return {\n then(fn) {\n fn(value);\n }\n };\n}\nconst servedPass = (write, adopt) => x => {\n flush();\n _hydratingValue = _snapshotRootOwner = !!adopt;\n _claimOwner = ~clock;\n if (adopt) markSnapshotScope(adopt);\n try {\n write(x);\n flush();\n } finally {\n _claimOwner = _hydratingValue = _snapshotRootOwner = null;\n if (adopt) releaseSnapshotScope(adopt);\n checkHydrationComplete();\n }\n};\nfunction readHydratedValue(initP, refresh, options) {\n refresh();\n if (initP != null && typeof initP === \"object\") {\n if (!hasLoadingWindow(options)) {\n if (initP.s === 2) {\n initP.then?.(undefined, noop);\n throw initP.v;\n }\n if (initP.s === 1) return initP.v;\n }\n if (typeof initP.then === \"function\") return {\n then: (a, b) => initP.then(servedPass(a), servedPass(b))\n };\n }\n return initP;\n}\nconst latchedOnce = new WeakSet();\nfunction readSerializedOrCompute(compute, prev, options, value) {\n const o = getOwner();\n const gate = nodeGate.get(o);\n if (gate && (sharedConfig.done || gate())) return takeOver(o, gate, compute, prev);\n if (sharedConfig.done) return compute(prev);\n if (!sharedConfig.has(o.id)) {\n const result = compute(prev);\n if (options?.ssrSource !== \"hybrid\" && result != null && typeof result === \"object\" && result[LIVE_SOURCE] && result[LIVE_LOCAL] !== undefined) {\n armLiveTakeover(o);\n return result[LIVE_LOCAL];\n }\n return result;\n }\n const initP = sharedConfig.load(o.id);\n if (latchedOnce.has(o)) {\n if (options?.ssrSource !== \"hybrid\" && _claimOwner !== ~clock && !(initP?.s === 2 && _claimRound === clock)) {\n let p = o;\n while (p && !p._hp) p = p._parent;\n if (!p && !(sharedConfig.hydrating && isClaiming(1))) return compute(prev);\n armLiveTakeover(o);\n }\n } else {\n latchedOnce.add(o);\n if (value && initP?.then) initP.then(v => markSnapshotScope(o, v), noop);\n }\n return readHydratedValue(initP, () => {\n const traced = subFetch(compute, prev);\n if (options?.ssrSource !== \"hybrid\" && traced != null && traced[LIVE_SOURCE]) armLiveTakeover(o, !hasLoadingWindow(options) && initP?.then && !initP.s);\n return traced;\n }, options);\n}\nfunction takeOver(o, gate, compute, prev) {\n const result = compute(prev);\n if (gate !== TAKEN) {\n nodeGate.set(o, TAKEN);\n if (result != null && typeof result === \"object\" && result[LIVE_SOURCE]) result[LIVE_RESUME_FROM] = prev;\n }\n return result;\n}\nconst UNASKED = {\n then() {}\n};\nconst LIVE_SOURCE = Symbol.for(\"solid.LiveSource\");\nconst LIVE_RESUME_FROM = Symbol.for(\"solid.LiveResumeFrom\");\nconst LIVE_LOCAL = Symbol.for(\"solid.LiveLocal\");\nconst openScopes = new Set();\nconst liveGates = new Map();\nconst nodeGate = new WeakMap();\nconst TAKEN = () => true;\nfunction liveScopeOf(o) {\n if (openScopes.size === 0) return null;\n let owner = o;\n while (owner) {\n if (openScopes.has(owner)) return owner;\n owner = owner._parent;\n }\n return null;\n}\nfunction armLiveTakeover(o, streaming) {\n let gate = nodeGate.get(o);\n if (!gate) {\n const scope = streaming ? null : liveScopeOf(o);\n let entry = liveGates.get(scope);\n if (!entry) {\n entry = createSignal$1(false);\n liveGates.set(scope, entry);\n if (scope === null) onHydrationEnd(() => {\n liveGates.delete(null);\n entry[1](true);\n });\n }\n gate = entry[0];\n nodeGate.set(o, gate);\n }\n gate();\n}\nfunction openLiveScope(scope) {\n openScopes.add(scope);\n}\nfunction releaseLiveScope(scope) {\n openScopes.delete(scope);\n const entry = liveGates.get(scope);\n if (!entry) return;\n liveGates.delete(scope);\n entry[1](true);\n}\nfunction hasLoadingWindow(options) {\n return options != null && typeof options === \"object\" && (\"loadingValue\" in options || options.seedLoadingValue === true);\n}\nfunction forwardIteratorReturn(it, value) {\n const returned = it.return?.(value);\n return returned && typeof returned.then === \"function\" ? returned : syncThenable(returned ?? {\n done: true,\n value\n });\n}\nfunction normalizeIterator(it, deferFirst) {\n let first = true;\n let buffered = null;\n return {\n next() {\n if (first) {\n first = false;\n const r = it.next();\n if (r && typeof r.then === \"function\") return r;\n return deferFirst ? Promise.resolve(r) : syncThenable(r);\n }\n if (buffered) {\n const b = buffered;\n buffered = null;\n return b;\n }\n let latest = it.next();\n if (latest && typeof latest.then === \"function\") return latest;\n let result = latest;\n while (!latest.done) {\n const peek = it.next();\n if (peek && typeof peek.then === \"function\") {\n buffered = peek;\n break;\n }\n latest = peek;\n if (!latest.done) result = latest;else if (result !== latest) buffered = Promise.resolve(latest);\n }\n return Promise.resolve(result);\n },\n return(value) {\n buffered = null;\n return forwardIteratorReturn(it, value);\n }\n };\n}\nfunction applyPatches(target, patches) {\n for (const patch of patches) {\n const path = patch[0];\n let current = target;\n for (let i = 0; i < path.length - 1; i++) current = current[path[i]];\n const key = path[path.length - 1];\n if (patch.length === 1) {\n Array.isArray(current) ? current.splice(key, 1) : delete current[key];\n } else if (patch.length === 3) {\n current.splice(key, 0, patch[1]);\n } else {\n current[key] = patch[1];\n }\n }\n}\nfunction isAsyncIterable(v) {\n return v != null && typeof v[Symbol.asyncIterator] === \"function\";\n}\nfunction noHydrationId() {\n const o = getOwner();\n return !o || o.id == null;\n}\nfunction wrapFirstYield(iterable, activate, quiet) {\n const srcIt = iterable[Symbol.asyncIterator]();\n let step = 0;\n return {\n [Symbol.asyncIterator]() {\n return {\n next() {\n if (step === 0) {\n step = 1;\n return syncThenable({\n done: false,\n value: quiet\n });\n }\n const p = srcIt.next();\n if (step === 1) {\n step = 2;\n return p.then(r => {\n activate?.();\n return r.done ? r : {\n done: false,\n value: quiet\n };\n });\n }\n return p;\n },\n return(value) {\n return forwardIteratorReturn(srcIt, value);\n }\n };\n }\n };\n}\nfunction adoptedAnswerStream(thenable, onLanded, onRejected) {\n let pulled = false;\n return {\n [Symbol.asyncIterator]() {\n return {\n next() {\n if (pulled) {\n onLanded();\n return Promise.resolve({\n done: true,\n value: undefined\n });\n }\n pulled = true;\n return {\n then(res, rej) {\n thenable.then(v => res({\n done: false,\n value: v\n }), e => {\n onRejected();\n rej(e);\n });\n }\n };\n }\n };\n }\n };\n}\nfunction hydrateSignalFromAsyncIterable(coreFn, compute, options) {\n const parent = getOwner();\n const expectedId = peekNextChildId(parent);\n if (!sharedConfig.has(expectedId)) return null;\n const loaded = sharedConfig.load(expectedId);\n if (!isAsyncIterable(loaded)) return null;\n const base = normalizeIterator(loaded[Symbol.asyncIterator](), hasLoadingWindow(options));\n let terminal = false;\n const it = {\n next() {\n const p = base.next();\n return {\n then(res, rej) {\n return p.then(r => {\n if (r.done) terminal = true;\n return res(r);\n }, e => {\n terminal = true;\n if (rej) return rej(e);\n throw e;\n });\n }\n };\n },\n return(value) {\n return base.return(value);\n }\n };\n const iterable = {\n [Symbol.asyncIterator]() {\n return it;\n }\n };\n return coreFn(prev => {\n if (terminal) return compute(prev);\n subFetch(compute, prev);\n return iterable;\n }, options);\n}\nfunction withHydrationGate(create) {\n const [hydrated, setHydrated] = createSignal$1(false, {\n ownedWrite: true\n });\n const result = create(hydrated);\n setHydrated(true);\n return result;\n}\nfunction hydrateSignalLike(coreFn, fn, options) {\n if (options?.transparent || noHydrationId()) return coreFn(fn, options);\n markTopLevelSnapshotScope();\n const ssrSource = options?.ssrSource;\n if (ssrSource === \"client\") {\n return withHydrationGate(hydrated => coreFn(prev => {\n if (!hydrated()) return UNASKED;\n return fn(prev);\n }, options));\n }\n if (ssrSource === \"hybrid\" && sharedConfig.has(peekNextChildId(getOwner()))) {\n let takeover;\n const detect = prev => {\n const r = fn(prev);\n takeover = isAsyncIterable(r);\n return r;\n };\n const [hydrated, setHydrated] = createSignal$1(false, {\n ownedWrite: true\n });\n let live = false;\n const flip = () => {\n if (!live) setHydrated(true);\n };\n let adopted = false;\n let creating = true;\n let landedOnCreate = false;\n const result = coreFn(prev => {\n if (live) return fn(prev);\n if (hydrated()) {\n live = true;\n const r = fn(prev);\n return isAsyncIterable(r) ? wrapFirstYield(r, undefined, prev) : r;\n }\n if (adopted) {\n live = true;\n return fn(prev);\n }\n let answer;\n try {\n answer = readSerializedOrCompute(detect, prev, options);\n } catch (e) {\n if (takeover) live = true;\n throw e;\n }\n if (!takeover) return answer;\n adopted = true;\n if (answer != null && typeof answer.then === \"function\") return adoptedAnswerStream(answer, flip, () => live = true);\n if (creating) landedOnCreate = true;else queueMicrotask(flip);\n return answer;\n }, options);\n creating = false;\n if (landedOnCreate) flip();\n return result;\n }\n const aiResult = hydrateSignalFromAsyncIterable(coreFn, fn, options);\n if (aiResult !== null) return aiResult;\n return coreFn(prev => readSerializedOrCompute(fn, prev, options, true), options);\n}\nfunction hydratedCreateMemo(compute, options) {\n if (!sharedConfig.hydrating) return createMemo$1(compute, options);\n return hydrateSignalLike(createMemo$1, compute, options);\n}\nfunction hydratedCreateSignal(fn, second) {\n if (typeof fn !== \"function\" || !sharedConfig.hydrating) return createSignal$1(fn, second);\n return hydrateSignalLike(createSignal$1, fn, second);\n}\nfunction hydratedCreateErrorBoundary(fn, fallback) {\n if (sharedConfig.hydrating && !noHydrationId()) {\n markTopLevelSnapshotScope();\n const expectedId = peekNextChildId(getOwner());\n let err;\n if (sharedConfig.has(expectedId) && (err = sharedConfig.load(expectedId)) !== undefined) {\n let o;\n const read = createErrorBoundary$1(\n () => _hydratingValue ? hydrateWindow(0, fn, 0, (o = getOwner(), o._parent._nc = 1, ~clock)) : fn(), (e, reset) => (o = 0, fallback(e, reset)));\n if (o) runWithOwner(o, () => createRenderEffect$1(() => {\n if (o) throw o = 0, err;\n }, noop));\n return read;\n }\n }\n return createErrorBoundary$1(fn, fallback);\n}\nfunction hydratedCreateRoot(init, options) {\n return createRoot$1(sharedConfig.hydrating ? dispose => {\n markTopLevelSnapshotScope();\n return init(dispose);\n } : init, options);\n}\nfunction hydratedEffect(coreFn, compute, effectFn, options) {\n if (!sharedConfig.hydrating || options?.transparent || noHydrationId()) return coreFn(compute, effectFn, options);\n const ssrSource = options?.ssrSource;\n if (ssrSource === \"client\") {\n let active = false;\n withHydrationGate(hydrated => coreFn(prev => {\n if (!hydrated()) return prev;\n active = true;\n return compute(prev);\n }, (next, prev) => {\n if (!active) return;\n return effectFn(next, prev);\n }, options));\n return;\n }\n markTopLevelSnapshotScope();\n coreFn(prev => readSerializedOrCompute(compute, prev), effectFn, options);\n}\nfunction hydratedCreateRenderEffect(compute, effectFn, options) {\n return hydratedEffect(createRenderEffect$1, compute, effectFn, options);\n}\nfunction hydratedCreateEffect(compute, effectFn, options) {\n return hydratedEffect(createEffect$1, compute, effectFn, options);\n}\nfunction lazyHydrationLookup(comp, moduleUrl, exportName) {\n const o = getOwner();\n const key = o && o.id != null ? peekNextChildId(o) : undefined;\n const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;\n if (cached) {\n const component = exportName ? cached[exportName] : cached.default;\n return () => component;\n }\n if (!comp && moduleUrl) {\n throw new Error(`lazy() module \"${moduleUrl}\" (hydration id \"${key}\") was not preloaded before hydration` + (\".\"));\n }\n return comp;\n}\nfunction enableHydration() {\n createRoot = hydratedCreateRoot;\n _createMemo = hydratedCreateMemo;\n createSignal = hydratedCreateSignal;\n _createErrorBoundary = hydratedCreateErrorBoundary;\n _hydrateSignalLike = hydrateSignalLike;\n _hydrateStoreLike = hydrateStoreLike;\n createRenderEffect = hydratedCreateRenderEffect;\n _createEffect = hydratedCreateEffect;\n _createLoadingBoundary = hydratedCreateLoadingBoundary;\n _lazyHydrationLookup = lazyHydrationLookup;\n sharedConfig.getNextContextId = hydrationGetNextContextId;\n sharedConfig.isHydrationInProgress = isHydrationInProgress;\n sharedConfig.onHydrationEnd = onHydrationEnd;\n sharedConfig.isClaiming = isClaiming;\n const hy = globalThis._$HY;\n if (hy && !hy.f) {\n hy.f = fragmentPolicy;\n const prevFe = hy.fe;\n hy.fe = (id, parent) => {\n prevFe && prevFe(id, parent);\n for (const sub of _revealSubs) sub(id, parent);\n };\n watchTruncation(hy);\n }\n _hydratingValue = sharedConfig.hydrating;\n _doneValue = sharedConfig.done;\n Object.defineProperty(sharedConfig, \"hydrating\", {\n get() {\n return _hydratingValue;\n },\n set(v) {\n const was = _hydratingValue;\n _hydratingValue = v;\n if (!was && v) {\n _hydrationDone = false;\n _doneValue = false;\n setSnapshotCapture(true);\n _snapshotRootOwner = null;\n } else if (was && !v) {\n if (_snapshotRootOwner) {\n releaseSnapshotScope(_snapshotRootOwner);\n releaseLiveScope(_snapshotRootOwner);\n _snapshotRootOwner = null;\n }\n checkHydrationComplete();\n }\n },\n configurable: true,\n enumerable: true\n });\n Object.defineProperty(sharedConfig, \"done\", {\n get() {\n return _doneValue;\n },\n set(v) {\n _doneValue = v;\n if (v) drainHydrationCallbacks();\n },\n configurable: true,\n enumerable: true\n });\n}\nfunction enableServerComponentHydration() {\n sharedConfig.holdBoundary = id => {\n const release = initBoundaryResume(getOwner(), id)[2];\n return () => release() && checkHydrationComplete();\n };\n sharedConfig.hydrateWindow = hydrateWindow;\n _ownedFragment = ownedFragment;\n const hy = globalThis._$HY;\n if (hy && !hy.fr) {\n hy.fr = {\n pending: anyFragmentPending,\n subscribe: subscribeFragments\n };\n }\n}\nconst createMemo = (...args) => {\n return (_createMemo || createMemo$1)(...args);\n};\nlet createSignal = createSignal$1;\nconst createErrorBoundary = (...args) => (_createErrorBoundary || createErrorBoundary$1)(...args);\nfunction createRevealOrder(fn, options) {\n return createRevealOrder$1(fn, options);\n}\nconst createOptimistic = (...args) => {\n return typeof args[0] === \"function\" && sharedConfig.hydrating ? _hydrateSignalLike(createOptimistic$1, args[0], args[1]) : createOptimistic$1(...args);\n};\nconst createDeferred = (fn, options) =>\nsharedConfig.hydrating ? _hydrateSignalLike(createDeferred$1, fn, options) : createDeferred$1(fn, options);\nconst createProjection = (...args) => {\n return sharedConfig.hydrating ? _hydrateStoreLike(createProjection$1, args[0], args[1] ?? {}, args[2]) : createProjection$1(...args);\n};\nconst createStore = (...args) => {\n return typeof args[0] === \"function\" && sharedConfig.hydrating ? _hydrateStoreLike(createStore$1, args[0], args[1] ?? {}, args[2]) : createStore$1(...args);\n};\nconst createOptimisticStore = (...args) => {\n return typeof args[0] === \"function\" && sharedConfig.hydrating ? _hydrateStoreLike(createOptimisticStore$1, args[0], args[1] ?? {}, args[2]) : createOptimisticStore$1(...args);\n};\nlet createRoot = createRoot$1;\nlet createRenderEffect = createRenderEffect$1;\nconst createEffect = (...args) => (_createEffect || createEffect$1)(...args);\nfunction createBoundaryTrigger() {\n setSnapshotCapture(false);\n const [s, set] = createSignal$1(undefined, {\n equals: false\n });\n s();\n setSnapshotCapture(true);\n return set;\n}\nfunction hydrateWindow(id, fn, scope, o = getOwner()) {\n const prevRegistry = sharedConfig.registry;\n const prevGather = sharedConfig.gather;\n const prevHydrating = _hydratingValue;\n const prevClaim = _claimOwner;\n const own = !_snapshotRootOwner && o;\n const capture = own && _hydrationDone;\n if (scope) {\n sharedConfig.registry = scope.registry;\n sharedConfig.gather = scope.gather;\n }\n try {\n if (id) sharedConfig.gather?.(id);\n _hydratingValue = true;\n _claimOwner = o;\n _claimRound = clock;\n if (own) {\n if (capture) setSnapshotCapture(true);\n markSnapshotScope(own);\n openLiveScope(own);\n _snapshotRootOwner = own;\n }\n return fn();\n } finally {\n _hydratingValue = prevHydrating;\n _claimOwner = prevClaim;\n if (scope) {\n sharedConfig.registry = prevRegistry;\n sharedConfig.gather = prevGather;\n }\n if (own) {\n _snapshotRootOwner = null;\n releaseSnapshotScope(own);\n releaseLiveScope(own);\n if (capture) clearSnapshots();\n }\n }\n}\nfunction resumeBoundaryHydration(o, id, set, release, shouldHydrate = true) {\n const scope = sharedConfig.boundaryScopes?.get(id);\n if (!release()) return;\n if (isDisposed(o)) {\n checkHydrationComplete();\n return;\n }\n _hydratingValue = false;\n shouldHydrate ?\n hydrateWindow(id, () => {\n set();\n flush();\n }, scope, o) :\n servedPass(set, shouldHydrate === 0 && o)();\n flush();\n checkHydrationComplete();\n}\nfunction initBoundaryResume(o, id) {\n _pendingBoundaries++;\n o._hp = 1;\n sharedConfig.captureBoundaryScope?.(id);\n let released = false;\n const release = () => {\n if (released) return false;\n released = true;\n _pendingBoundaries--;\n o._hp = 0;\n sharedConfig.boundaryScopes?.delete(id);\n const claim = _fragments.get(id);\n if (claim) claim.claimed = false;\n return true;\n };\n onCleanup(() => {\n if (!isDisposed(o)) return;\n sharedConfig.cleanupFragment?.(id);\n if (release()) checkHydrationComplete();\n });\n const set = createBoundaryTrigger();\n return [set, shouldHydrate => resumeBoundaryHydration(o, id, set, release, shouldHydrate), release];\n}\nconst _fragments = new Map();\nconst _truncated = new Set();\nconst _revealSubs = new Set();\nconst _truncationRejectors = new Map();\nfunction fragmentState(id) {\n let f = _fragments.get(id);\n if (!f) _fragments.set(id, f = {});\n return f;\n}\nlet _ownedFragment;\nfunction fragmentPolicy(id) {\n const f = fragmentState(id);\n if (!_hydrationDone || f.claimed || _ownedFragment !== undefined && _ownedFragment(id)) return globalThis.$dfr(id);\n f.held = true;\n return 0;\n}\nfunction ownedFragment(id) {\n const hy = globalThis._$HY;\n const pl = document.getElementById(\"pl-\" + id);\n return !!(pl && hy.fa && hy.fa(pl));\n}\nfunction replayHeldFragment(id) {\n const f = _fragments.get(id);\n if (f && f.held) {\n f.held = false;\n globalThis.$dfr(id);\n }\n}\nfunction claimFragment(id) {\n fragmentState(id).claimed = true;\n replayHeldFragment(id);\n}\nfunction fragmentPending(hy, id) {\n if (_truncated.has(id) || hy.v && hy.v[id]) return false;\n const ref = hy.r[id + \"_fr\"];\n if (!ref || typeof ref !== \"object\") return false;\n return !ref.s || fragmentParked(id);\n}\nfunction fragmentSuperseded(id) {\n const hy = globalThis._$HY;\n if (hy && hy.v && hy.v[id]) return false;\n if (document.getElementById(id)) return false;\n return !!document.getElementById(\"pl-\" + id);\n}\nfunction fragmentParked(id) {\n const hy = globalThis._$HY;\n if (hy && hy.v && hy.v[id]) return false;\n return !!document.getElementById(id) && !!document.getElementById(\"pl-\" + id);\n}\nfunction whenRevealed(id, cb) {\n if (!fragmentParked(id)) return cb();\n const unsubscribe = subscribeFragments(revealed => {\n if (revealed !== id) return;\n unsubscribe();\n queueMicrotask(cb);\n });\n}\nfunction anyFragmentPending() {\n const hy = globalThis._$HY;\n if (!hy || !hy.r) return false;\n for (const key in hy.r) {\n if (key.length > 3 && key.endsWith(\"_fr\") && fragmentPending(hy, key.slice(0, -3))) {\n return true;\n }\n }\n return false;\n}\nfunction subscribeFragments(cb) {\n _revealSubs.add(cb);\n return () => _revealSubs.delete(cb);\n}\nfunction watchTruncation(hy) {\n const sweep = () => {\n if (!hy.r) return;\n const consumed = dropTruncatedRefs(hy);\n for (const key in hy.r) {\n if (key.length <= 3 || !key.endsWith(\"_fr\")) continue;\n const ref = hy.r[key];\n if (ref && typeof ref === \"object\" && !ref.s) markTruncated(hy, key.slice(0, -3));\n }\n setTimeout(() => rejectTruncatedRefs(consumed));\n };\n if (typeof document === \"undefined\") return;\n if (document.readyState === \"loading\") document.addEventListener(\"DOMContentLoaded\", sweep, {\n once: true\n });else if (hy.s) sweep();\n}\nfunction dropTruncatedRefs(hy) {\n const consumed = [];\n const R = globalThis.$R;\n if (!R || typeof R !== \"object\") return consumed;\n let registryKeys;\n const sweep = entry => {\n if (!entry || typeof entry !== \"object\" || typeof entry.f !== \"function\" || !entry.p || typeof entry.p.then !== \"function\" || entry.p.s) return;\n if (!registryKeys) {\n registryKeys = new Map();\n for (const key in hy.r) registryKeys.set(hy.r[key], key);\n }\n const key = registryKeys.get(entry.p);\n if (key === undefined) consumed.push(entry);else if (!key.endsWith(\"_fr\")) delete hy.r[key];\n };\n for (const key in R) {\n const value = R[key];\n if (Array.isArray(value)) for (const entry of value) sweep(entry);else sweep(value);\n }\n return consumed;\n}\nfunction rejectTruncatedRefs(consumed) {\n for (const entry of consumed) {\n if (entry.p.s) continue;\n const err = new Error(\"Hydration value was truncated: the stream ended before it settled.\");\n entry.f(err);\n entry.p.s = 2;\n entry.p.v = err;\n entry.p.then(undefined, noop);\n }\n}\nfunction markTruncated(hy, id) {\n if (_truncated.has(id)) return;\n _truncated.add(id);\n const err = new Error(`Hydration fragment \"${id}\" was truncated: the stream ended before its content arrived.`);\n const ref = hy.r[id + \"_fr\"];\n if (ref && typeof ref === \"object\") {\n ref.s = 2;\n ref.v = err;\n }\n const reject = _truncationRejectors.get(id);\n if (reject) {\n _truncationRejectors.delete(id);\n reject(err);\n }\n for (const sub of _revealSubs) sub(id);\n}\nfunction fragmentAbort(id) {\n return new Promise((_, reject) => _truncationRejectors.set(id, reject));\n}\nfunction waitAndResume(p, resume, assetPromise, hydrateRejected = true, abort) {\n const data = (abort ? Promise.race([Promise.resolve(p), abort]) : Promise.resolve(p)).then(() => {\n if (p && typeof p === \"object\") p.s = 1;\n return true;\n }, err => {\n if (p && typeof p === \"object\") {\n p.s = 2;\n p.v = err;\n }\n return hydrateRejected;\n });\n if (!assetPromise) {\n data.then(shouldHydrate => resume(shouldHydrate));\n return;\n }\n const assets = assetPromise.then(() => true, err => {\n reportAssetFailure(err);\n return false;\n });\n Promise.all([data, assets]).then(([dataHydrate, assetsOk]) =>\n resume(assetsOk ? dataHydrate : false));\n}\nfunction reportAssetFailure(err) {\n console.error(\"Hydration module preload failed; rendering boundary content on the client:\", err);\n}\nfunction scheduleResumeAfterAssets(id, resume, assetPromise) {\n sharedConfig.gather?.(id);\n const doResume = () => queueMicrotask(resume);\n if (assetPromise) {\n assetPromise.then(doResume, err => {\n reportAssetFailure(err);\n queueMicrotask(() => resume(false));\n });\n return true;\n }\n doResume();\n return false;\n}\nconst createLoadingBoundary = (fn, fallback, options) => (_createLoadingBoundary || createLoadingBoundary$1)(fn, fallback, options);\nconst boundaryAssets = id => sharedConfig.loadModuleAssets?.(sharedConfig.load(id + \"_assets\"));\nfunction hydratedCreateLoadingBoundary(fn, fallback, options) {\n if (!sharedConfig.hydrating || noHydrationId()) return createLoadingBoundary$1(fn, fallback, options);\n let settledSerializationResumeQueued = false;\n return createMemo$1(() => {\n const o = getOwner();\n const id = o.id;\n const assetPromise = sharedConfig.hydrating ? boundaryAssets(id) : undefined;\n if (sharedConfig.hydrating && sharedConfig.has(id)) {\n const ref = sharedConfig.load(id);\n let p;\n if (ref) {\n if (typeof ref !== \"object\" || ref.s == null) p = ref;else if (ref.s === 1 || ref.s === 2) sharedConfig.gather?.(id);else p = ref;\n }\n if (ref && typeof ref === \"object\" && ref.s === 1 && p == null && !settledSerializationResumeQueued) {\n if (assetPromise) {\n settledSerializationResumeQueued = true;\n const [, resume] = initBoundaryResume(o, id);\n scheduleResumeAfterAssets(id, resume, assetPromise);\n return undefined;\n }\n return createLoadingBoundary$1(fn, fallback, options);\n }\n if (p) {\n const [, resume, release] = initBoundaryResume(o, id);\n if (p !== \"$$f\") {\n waitAndResume(p, resume, assetPromise);\n } else {\n const [open, setOpen] = createSignal$1();\n const afterAssets = () => {\n if (!release()) return;\n setOpen(1);\n checkHydrationComplete();\n };\n waitAndResume(1, afterAssets, assetPromise);\n return createLoadingBoundary$1(() => {\n if (!open()) throw new NotReadyError(getOwner());\n return fn();\n }, () => createRoot$1(fallback, {\n id\n }), options);\n }\n return fallback();\n }\n }\n if (sharedConfig.hydrating && sharedConfig.has(id + \"_fr\") && !settledSerializationResumeQueued) {\n const fr = sharedConfig.load(id + \"_fr\");\n replayHeldFragment(id);\n const s = fr && typeof fr === \"object\" ? fr.s === 1 && fragmentParked(id) ? 0 : fr.s : 0;\n const unclaimed = !isClaiming();\n if (s === 2 || unclaimed) fr.catch?.(noop);\n if (unclaimed || s === 1 && !assetPromise && !fragmentSuperseded(id)) {\n sharedConfig.gather?.(id);\n return createLoadingBoundary$1(fn, fallback, options);\n }\n settledSerializationResumeQueued = true;\n const [, resume] = initBoundaryResume(o, id);\n if (s === 1 && fragmentSuperseded(id)) {\n waitAndResume(1, () => resume(false), assetPromise);\n return fallback();\n }\n if (s === 1 || s === 2) {\n if (s === 2) {\n waitAndResume(1, () => resume(0), assetPromise);\n return undefined;\n }\n scheduleResumeAfterAssets(id, resume, assetPromise);\n return undefined;\n }\n claimFragment(id);\n const hy = globalThis._$HY;\n const revealed = hy.v?.[id];\n waitAndResume(fr, shouldHydrate => shouldHydrate ? whenRevealed(id, () => {\n const assets = boundaryAssets(id);\n assets ? waitAndResume(true, resume, assets) : resume(true);\n }) : (\n revealed || hy.v?.[id]?.forEach?.(n => n.remove()), resume(shouldHydrate)), assetPromise,\n 0, fragmentAbort(id));\n return revealed ? undefined : fallback();\n }\n if (assetPromise && !sharedConfig.has(id)) {\n const [, resume] = initBoundaryResume(o, id);\n assetPromise.then(() => resume(), err => {\n reportAssetFailure(err);\n resume(false);\n });\n return undefined;\n }\n return createLoadingBoundary$1(fn, fallback, options);\n });\n}\nfunction NoHydration(props) {\n const o = createOwner();\n return runWithOwner(o, () => {\n setContext(NoHydrateContext, true);\n if (isHydrating()) return undefined;\n return props.children;\n });\n}\nfunction Hydration(props) {\n return props.children;\n}\n\nfunction createComponent(Comp, props, name, loc) {\n return untrack(() => Comp(props || {}));\n}\nfunction lazy(fn, options, moduleUrl) {\n const exportName = options?.export;\n let comp;\n let p;\n const load = () => {\n if (p) return p;\n const cur = p = fn();\n if (tracing) p = undefined;\n cur.then(mod => {\n comp = () => exportName ? mod[exportName] : mod.default;\n },\n () => {\n if (p === cur) p = undefined;\n });\n return cur;\n };\n const wrap = props => {\n if (sharedConfig.hydrating) comp = _lazyHydrationLookup(comp, moduleUrl, exportName);\n let local = comp;\n if (!local) {\n load();\n local = createMemo$1(() => {\n const cur = load();\n const read = cur.then(mod => exportName ? mod[exportName] : mod.default);\n return read;\n });\n }\n let Comp;\n return createMemo$1(() => (Comp = (comp || local)()) ? createComponent(Comp, props) : \"\", {\n sync: true\n });\n };\n wrap.preload = load;\n wrap.moduleUrl = moduleUrl;\n return wrap;\n}\nfunction lazyModule(fn, moduleUrl) {\n let p;\n let mod;\n const load = () => {\n if (p) return p;\n const cur = p = fn();\n if (tracing) p = undefined;\n cur.then(m => {\n mod = m;\n }, () => {\n if (p === cur) p = undefined;\n });\n return cur;\n };\n const read = load;\n read.preload = load;\n read.peek = () => {\n if (!sharedConfig.hydrating) return mod;\n const cached = moduleUrl ? globalThis._$HY?.modules?.[moduleUrl] : undefined;\n if (cached) mod = cached;\n return cached;\n };\n read.moduleUrl = moduleUrl;\n return read;\n}\nlet counter = 0;\nfunction createUniqueId() {\n return sharedConfig.hydrating ? sharedConfig.getNextContextId() : `cl-${counter++}`;\n}\n\nconst COMPONENT_BINDING = /*#__PURE__*/Symbol.for(\"solid.component-binding\");\nconst FLIGHT = /*#__PURE__*/Symbol(\"solid.dynamic-flight\");\nfunction bindingOf(value) {\n return value?.[COMPONENT_BINDING] || undefined;\n}\nfunction dynamicCore(source, options, tagArm) {\n if (options?.static) return staticDynamic(untrack(source), tagArm);\n const sites = new Set();\n let deliveredAddress;\n let kept;\n const resolveBinding = (next, prev) => {\n const binding = bindingOf(next);\n if (!binding) return next;\n deliveredAddress = binding.address;\n const prevBinding = bindingOf(prev);\n if (prevBinding && prevBinding.component === binding.component) {\n for (const deliver of sites) deliver(binding.address);\n kept = prev;\n return prev;\n }\n return next;\n };\n const sameInstance = (prev, next) => {\n if (next === kept) {\n kept = undefined;\n if (prev === next) return true;\n }\n const held = bindingOf(prev);\n const incoming = bindingOf(next);\n if (!held || !incoming || held.component !== incoming.component) return prev === next;\n if (deliveredAddress === undefined) return held.address === incoming.address;\n if (incoming.address !== deliveredAddress) {\n deliveredAddress = incoming.address;\n for (const deliver of sites) deliver(incoming.address);\n }\n return true;\n };\n const cached = createMemo(prev => {\n const next = source();\n if (!next || typeof next.then !== \"function\") return resolveBinding(next, prev);\n return {\n [FLIGHT]: next\n };\n }, {\n lazy: true,\n equals: sameInstance\n });\n return props => {\n if (sharedConfig.hydrating) {\n try {\n untrack(cached);\n } catch {\n }\n }\n let latest = 0;\n const value = createMemo(prev => {\n const c = cached();\n if (!c || !c[FLIGHT]) return resolveBinding(c, prev);\n const next = c[FLIGHT];\n const token = ++latest;\n return {\n then: (onFulfilled, onRejected) => next.then(resolved => {\n const landed = token === latest ? resolveBinding(resolved, prev) : resolved;\n return onFulfilled ? onFulfilled(landed) : landed;\n }, onRejected)\n };\n }, {\n equals: sameInstance\n });\n return createMemo(() => {\n const component = value();\n switch (typeof component) {\n case \"function\":\n {\n const binding = bindingOf(component);\n if (binding) {\n const [address, setAddress] = createSignal(deliveredAddress ??= binding.address, {\n ownedWrite: true\n });\n sites.add(setAddress);\n onCleanup(() => sites.delete(setAddress));\n return untrack(() => binding.component(props, address));\n }\n return untrack(() => component(props));\n }\n case \"string\":\n return tagArm ? tagArm(component, props) : undefined;\n }\n });\n };\n}\nfunction staticDynamic(component, tagArm) {\n if (typeof component === \"function\") {\n const binding = bindingOf(component);\n if (binding) {\n const address = () => binding.address;\n return props => untrack(() => binding.component(props, address));\n }\n return props => untrack(() => component(props));\n }\n if (typeof component === \"string\" && tagArm) return props => tagArm(component, props);\n return () => undefined;\n}\nconst dynamicComponent = dynamicCore;\n\nconst narrowedError = name => {\n throw `Stale read from <${name}>.`;\n};\nfunction For(props) {\n const options = \"fallback\" in props ? {\n keyed: props.keyed,\n fallback: () => props.fallback\n } : {\n keyed: props.keyed\n };\n const owner = getOwner();\n let mapped;\n const create = () => runWithOwner(owner, () => mapArray(() => props.each, props.children, options));\n if (sharedConfig.hydrating) mapped = create();\n const list = () => (mapped ?? (mapped = create()))();\n return list;\n}\nfunction Repeat(props) {\n const options = \"fallback\" in props ? {\n fallback: () => props.fallback\n } : {};\n options.from = () => props.from;\n return repeat(() => props.count,\n (index, c = props.children) => typeof c === \"function\" ? c(index) : c, options);\n}\nfunction Show(props) {\n const keyed = props.keyed;\n const conditionValue = createMemo$1(() => props.when, undefined);\n const condition = keyed ? conditionValue : createMemo$1(conditionValue, {\n equals: (a, b) => !a === !b,\n sync: true\n });\n let shown;\n return createMemo$1(() => {\n const c = condition(),\n run = shown = {};\n if (c) {\n const child = props.children;\n const fn = typeof child === \"function\" && child.length > 0;\n return fn ? keyed ? untrack(() => child(c), IS_DEV) : untrack(() => child(() => {\n verdict && shown === run || condition() || narrowedError(\"Show\");\n return conditionValue();\n }), IS_DEV) : child;\n }\n return props.fallback;\n }, {\n sync: true\n });\n}\nfunction Switch(props) {\n const chs = children(() => props.children);\n const switchFunc = createMemo$1(() => {\n const mps = chs.toArray();\n let func = () => undefined;\n for (let i = 0; i < mps.length; i++) {\n const index = i;\n const mp = mps[i];\n if (mp == null) continue;\n const prevFunc = func;\n const conditionValue = createMemo$1(() => prevFunc() ? undefined : mp.when, undefined);\n const condition = mp.keyed ? conditionValue : createMemo$1(conditionValue, {\n equals: (a, b) => !a === !b,\n sync: true\n });\n func = () => {\n const prev = prevFunc();\n if (prev) return prev;\n const c = condition();\n return c ? [index, c, conditionValue, mp] : undefined;\n };\n }\n return func;\n }, {\n sync: true\n });\n let shown;\n return createMemo$1(() => {\n const sel = shown = switchFunc()();\n if (!sel) return props.fallback;\n const [index, value, conditionValue, mp] = sel;\n const child = mp.children;\n const fn = typeof child === \"function\" && child.length > 0;\n return fn ? mp.keyed ? untrack(() => child(value), IS_DEV) : untrack(() => child(() => {\n verdict && shown === sel || untrack(switchFunc)()?.[0] === index || narrowedError(\"Match\");\n return conditionValue();\n }), IS_DEV) : child;\n }, {\n sync: true\n });\n}\nfunction Match(props) {\n return props;\n}\nfunction Errored(props) {\n return createErrorBoundary(() => props.children, (err, reset) => {\n const f = props.fallback;\n return typeof f === \"function\" ? f(err, reset) : f;\n });\n}\nfunction Loading(props) {\n const onOpt = \"on\" in props ? {\n on: () => props.on\n } : undefined;\n return createLoadingBoundary(() => props.children, () => props.fallback, onOpt);\n}\nfunction Reveal(props) {\n return createRevealOrder$1(() => props.children, {\n order: () => props.order ?? \"sequential\",\n collapsed: () => !!props.collapsed\n });\n}\n\nfunction ssrHandleError() {}\nfunction ssrScope(fn) {\n return fn;\n}\nfunction runInServerComponentScope(fn, _options) {\n return fn();\n}\nfunction creationStamp() {\n return 0;\n}\nfunction beginEdgesRender() {\n return () => {};\n}\nfunction trackFillReads(fn) {\n return {\n result: fn(),\n reads: null,\n untracked: false\n };\n}\nfunction inServerComponentScope() {\n return false;\n}\nfunction inLiveServerComponentScope() {\n return false;\n}\nfunction ssrSanitizeError(value) {\n return value;\n}\nfunction reportServerError() {\n return {\n mapped: false\n };\n}\nfunction getProjectionTrace(value) {\n return undefined;\n}\nfunction shareAsyncIterable(source) {\n return source;\n}\nconst OBSERVE = undefined;\nconst DEV = undefined;\n\nexport { $DEVCOMP, DEV, Errored, For, Hydration, Loading, Match, NoHydration, OBSERVE, Repeat, Reveal, Show, Switch, UNASKED, adoptedAnswerStream, applyPatches, beginEdgesRender, children, createComponent, createContext, createDeferred, createEffect, createErrorBoundary, createLoadingBoundary, createMemo, createOptimistic, createOptimisticStore, createProjection, createRenderEffect, createRevealOrder, createRoot, createSignal, createStore, createUniqueId, creationStamp, dynamicComponent, dynamicCore, enableHydration, enableServerComponentHydration, forwardIteratorReturn, from, getProjectionTrace, hasLoadingWindow, inLiveServerComponentScope, inServerComponentScope, isAsyncIterable, isHydratable, isHydrating, lazy, lazyModule, markTopLevelSnapshotScope, noHydrationId, onHydrationEnd, readHydratedValue, readSerializedOrCompute, reportServerError, runInServerComponentScope, shareAsyncIterable, sharedConfig, ssrHandleError, ssrSanitizeError, ssrScope, subFetch, syncThenable, trackFillReads, useContext, withHydrationGate, wrapFirstYield };\n","import { createComponent, merge, createRoot, flush, flatten, untrack, runRefCallback, createMemo, createRenderEffect, $PROXY } from 'solid-js';\nimport { hasStaticKeys, viewOf, OmitView, sourceHas, SOURCE_OMIT, sourceGet, resolvedTable, SOURCE_MEMO, sourceKeys, SOURCE_PROXY, SOURCE_PLAIN } from 'solid-js/internal';\n\nconst transparentOptions = {\n transparent: true,\n sync: true\n};\nconst syncOptions = {\n sync: true\n};\nconst effect = (fn, effectFn, options) => createRenderEffect(fn, effectFn, options ? {\n sync: true,\n ...options,\n transparent: !options.scope\n} : transparentOptions);\nconst memo = fn => createMemo(() => fn(), syncOptions);\nconst named = (options, fallback) => options;\nconst INNER_OWNED = {};\nfunction createRenderer({\n createElement,\n createTextNode,\n createSentinel = () => createTextNode(\"\"),\n isTextNode,\n replaceText,\n insertNode,\n removeNode,\n cleanupNodes,\n setProperty,\n getParentNode,\n getFirstChild,\n getNextSibling\n}) {\n function insert(parent, accessor, marker, initial, options) {\n const onUpdate = options && options.onUpdate;\n let effectOptions = options;\n if (onUpdate) {\n const {\n onUpdate,\n ...rest\n } = options;\n effectOptions = rest;\n }\n effectOptions = named(effectOptions);\n const multi = marker !== undefined;\n if (multi && !initial) initial = [];\n if (typeof accessor !== \"function\") {\n accessor = normalize(accessor, multi, true);\n if (typeof accessor !== \"function\") {\n insertExpression(parent, accessor, initial, marker);\n onUpdate && onUpdate(accessor);\n return;\n }\n }\n if (multi && initial.length === 0) {\n const sentinel = createSentinel();\n insertNode(parent, sentinel, marker);\n initial = [sentinel];\n }\n let current = initial;\n effect(prev => {\n const value = normalize(accessor(), multi, true);\n if (typeof value !== \"function\") return value;\n effect(() => normalize(value, multi), inner => {\n insertExpression(parent, inner, current, marker);\n current = inner;\n onUpdate && onUpdate(current);\n }, prev !== undefined && !(options && options.schedule) ? {\n ...effectOptions,\n schedule: true\n } : effectOptions);\n return INNER_OWNED;\n }, value => {\n if (value === INNER_OWNED) return;\n insertExpression(parent, value, current, marker);\n current = value;\n onUpdate && onUpdate(current);\n }, effectOptions);\n }\n function insertExpression(parent, value, current, marker) {\n if (value === current) return;\n const t = typeof value,\n multi = marker !== undefined;\n if (t === \"string\" || t === \"number\") {\n const tc = typeof current;\n if (tc === \"string\" || tc === \"number\") {\n replaceText(getFirstChild(parent), value);\n } else {\n cleanChildren(parent, current, marker, createTextNode(value));\n }\n } else if (value == null) {\n cleanChildren(parent, current, marker);\n } else if (Array.isArray(value)) {\n if (value.length === 0) {\n cleanChildren(parent, current, marker);\n } else {\n if (Array.isArray(current)) {\n if (current.length === 0) {\n appendNodes(parent, value, marker);\n } else reconcileArrays(parent, current, value);\n } else if (current == null) {\n appendNodes(parent, value);\n } else {\n reconcileArrays(parent, multi && current || [getFirstChild(parent)], value);\n }\n }\n } else {\n if (Array.isArray(current)) {\n cleanChildren(parent, current, multi ? marker : null, value);\n } else if (current == null || !getFirstChild(parent)) {\n insertNode(parent, value);\n } else replaceNode(parent, value, getFirstChild(parent));\n }\n }\n function normalize(value, multi, doNotUnwrap) {\n value = flatten(value, {\n skipNonRendered: true,\n doNotUnwrap\n });\n if (doNotUnwrap && typeof value === \"function\") return value;\n if (multi && !Array.isArray(value)) value = [value != null ? value : \"\"];\n else if (multi && !value.length) value = [createSentinel()];\n if (Array.isArray(value)) {\n for (let i = 0, len = value.length; i < len; i++) {\n const item = value[i],\n t = typeof item;\n if (t === \"string\" || t === \"number\") value[i] = createTextNode(item);\n }\n }\n return value;\n }\n function reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = getNextSibling(a[aEnd - 1]),\n map = null;\n const isLive = n => n && getParentNode(n) === parentNode;\n while (aStart < aEnd || bStart < bEnd) {\n if (a[aStart] === b[bStart] && isLive(a[aStart])) {\n aStart++;\n bStart++;\n continue;\n }\n while (a[aEnd - 1] === b[bEnd - 1] && isLive(a[aEnd - 1])) {\n aEnd--;\n bEnd--;\n }\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? getNextSibling(b[bStart - 1]) : b[bEnd - bStart] : after;\n while (bStart < bEnd) insertNode(parentNode, b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) removeNode(parentNode, a[aStart]);\n aStart++;\n }\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const anchor = a[aStart];\n do {\n insertNode(parentNode, a[--aEnd], anchor);\n bStart++;\n if (aStart >= aEnd - 1 || bStart >= bEnd) break;\n } while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);\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) insertNode(parentNode, b[bStart++], node);\n } else replaceNode(parentNode, b[bStart++], a[aStart++]);\n } else aStart++;\n } else removeNode(parentNode, a[aStart++]);\n }\n }\n }\n function cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) {\n let removed;\n while (removed = getFirstChild(parent)) removeNode(parent, removed);\n replacement && insertNode(parent, replacement);\n return \"\";\n }\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 (replacement !== el) {\n const isParent = getParentNode(el) === parent;\n if (replacement && !inserted && !i) isParent ? replaceNode(parent, replacement, el) : insertNode(parent, replacement, marker);else isParent && removeNode(parent, el);\n } else inserted = true;\n }\n } else if (replacement) insertNode(parent, replacement, marker);\n }\n function appendNodes(parent, array, marker) {\n for (let i = 0, len = array.length; i < len; i++) insertNode(parent, array[i], marker);\n }\n function replaceNode(parent, newNode, oldNode) {\n insertNode(parent, newNode, oldNode);\n removeNode(parent, oldNode);\n }\n function collectNodes(value, nodes) {\n if (Array.isArray(value)) {\n for (let i = 0, len = value.length; i < len; i++) collectNodes(value[i], nodes);\n } else if (value != null && typeof value !== \"string\" && typeof value !== \"number\") {\n nodes.push(value);\n }\n return nodes;\n }\n function collectMounted(parent, value) {\n const nodes = collectNodes(value, []);\n if (!nodes.length && (typeof value === \"string\" || typeof value === \"number\")) {\n const node = getFirstChild(parent);\n if (node) nodes.push(node);\n }\n return nodes;\n }\n function defaultCleanupNodes(parent, nodes) {\n for (let i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n if (getParentNode(node) === parent) removeNode(parent, node);\n }\n }\n function spread(node, props, skipChildren, options) {\n const prevProps = {};\n const apply = newProps => {\n for (const prop in prevProps) {\n if (prop in newProps) continue;\n if (prop !== \"ref\") setProperty(node, prop, undefined, prevProps[prop]);\n delete prevProps[prop];\n }\n for (const prop in newProps) {\n const value = newProps[prop];\n if (value === prevProps[prop]) continue;\n if (prop === \"ref\") {\n (typeof value === \"function\" || Array.isArray(value)) && ref(() => value, node);\n } else setProperty(node, prop, value, prevProps[prop]);\n prevProps[prop] = value;\n }\n };\n const childrenOptions = () => named(options);\n if (Array.isArray(props)) {\n if (!skipChildren) insert(node, () => {\n for (let i = props.length - 1; i >= 0; i--) {\n const s = resolveSource(props[i]);\n if (s != null && entryHas(s, \"children\")) return entryGet(s, \"children\");\n }\n }, undefined, undefined, childrenOptions());\n effect(() => collectSources({}, props, undefined), apply, named(options));\n return prevProps;\n }\n if (!skipChildren) {\n if (typeof props !== \"function\" && props != null && hasStaticKeys(props)) {\n const desc = Object.getOwnPropertyDescriptor(props, \"children\");\n if (desc !== undefined) {\n if (desc.get === undefined) insert(node, desc.value, undefined, undefined, childrenOptions());else insert(node, () => props.children, undefined, undefined, childrenOptions());\n }\n } else insert(node, () => {\n const s = resolveSource(props);\n return s != null ? entryGet(s, \"children\") : undefined;\n }, undefined, undefined, childrenOptions());\n }\n effect(() => {\n const s = resolveSource(props);\n const newProps = {};\n const table = resolvedTable(s);\n if (table !== undefined) {\n for (const [prop, leaf] of table) {\n if (typeof prop !== \"string\" || prop === \"children\") continue;\n newProps[prop] = leaf[prop];\n }\n return newProps;\n }\n if (s != null) {\n const view = viewOf(s);\n if (view instanceof OmitView) collectProps(newProps, view, SOURCE_OMIT);else if (view !== undefined) collectSources(newProps, view.sources, view.kinds);else collectProps(newProps, s, $PROXY in s ? SOURCE_PROXY : SOURCE_PLAIN);\n }\n return newProps;\n }, apply, named(options));\n return prevProps;\n }\n function resolveSource(s) {\n return typeof s === \"function\" ? s() : s;\n }\n function entryHas(s, key) {\n const view = viewOf(s);\n return view instanceof OmitView ? sourceHas(view, SOURCE_OMIT, key) : key in s;\n }\n function entryGet(s, key) {\n const view = viewOf(s);\n return view instanceof OmitView ? sourceGet(view, SOURCE_OMIT, key) : s[key];\n }\n function collectSources(out, sources, kinds) {\n const resolved = [];\n const resolvedKinds = [];\n for (let i = 0; i < sources.length; i++) pushEntry(resolved, resolvedKinds, sources[i], kinds !== undefined ? kinds[i] : SOURCE_MEMO);\n for (let i = 0; i < resolved.length; i++) collectProps(out, resolved[i], resolvedKinds[i], resolved, resolvedKinds, i + 1);\n return out;\n }\n function pushEntry(resolved, kinds, s, kind) {\n if (kind !== SOURCE_MEMO) {\n resolved.push(s);\n kinds.push(kind);\n return;\n }\n s = resolveSource(s);\n if (s == null) return;\n const view = viewOf(s);\n if (view instanceof OmitView) {\n resolved.push(view);\n kinds.push(SOURCE_OMIT);\n } else if (view !== undefined) {\n const f = view.sources,\n k = view.kinds;\n for (let j = 0; j < f.length; j++) pushEntry(resolved, kinds, f[j], k[j]);\n } else {\n resolved.push(s);\n kinds.push($PROXY in s ? SOURCE_PROXY : SOURCE_PLAIN);\n }\n }\n function collectProps(out, s, kind, later, laterKinds, from) {\n const keys = sourceKeys(s, kind);\n outer: for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n if (typeof prop !== \"string\" || prop === \"children\") continue;\n if (later !== undefined) for (let j = from; j < later.length; j++) if (sourceHas(later[j], laterKinds[j], prop)) continue outer;\n out[prop] = sourceGet(s, kind, prop);\n }\n return out;\n }\n function applyRef(r, element) {\n Array.isArray(r) ? r.flat(Infinity).forEach(f => f && f(element)) : r(element);\n }\n function ref(fn, element) {\n const resolved = untrack(fn);\n runRefCallback(() => applyRef(resolved, element));\n }\n return {\n render(code, element) {\n let disposer,\n disposed = false,\n mounted = [];\n const cleanup = cleanupNodes || defaultCleanupNodes;\n try {\n createRoot(dispose => {\n disposer = dispose;\n const tree = code();\n const renderOptions = {\n schedule: true,\n onUpdate(value) {\n mounted = collectMounted(element, value);\n }\n };\n if (false) ;\n insert(element, () => tree, undefined, undefined, renderOptions);\n });\n flush();\n } catch (err) {\n if (disposer) disposer();\n cleanup(element, mounted);\n throw err;\n }\n return () => {\n if (disposed) return;\n disposed = true;\n disposer();\n cleanup(element, mounted);\n mounted = [];\n };\n },\n insert,\n spread,\n createElement,\n createTextNode,\n insertNode,\n setProp(node, name, value, prev) {\n setProperty(node, name, value, prev);\n return value;\n },\n mergeProps: merge,\n effect,\n memo,\n createComponent,\n applyRef,\n ref\n };\n}\n\nexport { createRenderer };\n","import { createContext, createMemo, createSignal, flush as solidFlush, getOwner, onCleanup, resetErrorHalt, runWithOwner, useContext, } from \"#solid\";\nconst Region = createContext(null);\nconst nodeBridges = new WeakMap();\nlet regionProviders = 0;\nconst regionPresenceListeners = new Set();\nlet callbackBridge;\nlet callbackOwner = null;\nfunction notifyRegionPresence(hasRegions) {\n for (const listener of [...regionPresenceListeners]) {\n listener(hasRegions);\n }\n}\n/** Subscribe to transitions between zero and one-or-more mounted SDK regions. */\nexport function onRegionPresenceChange(listener) {\n regionPresenceListeners.add(listener);\n return () => {\n regionPresenceListeners.delete(listener);\n };\n}\n/** Whether the current runtime is a rootless shell with zero mounted surface regions. */\nexport function isRootlessWithoutRegions() {\n return (regionProviders === 0 && globalThis.__zgui === undefined && globalThis.__zguiShell !== undefined);\n}\n/** Returns the owning bridge if `value` is a genuine branded native node handle. */\nexport function knownBridgeForNode(value) {\n if (typeof value !== \"object\" || value === null)\n return undefined;\n return nodeBridges.get(value);\n}\n/** Resolves an explicit target without consulting the current owner or ambient bridge. */\nexport function bridgeForTarget(node) {\n const bridge = nodeBridges.get(node);\n if (!bridge)\n throw new ReferenceError(\"Unknown native stylesheet target\");\n return bridge;\n}\nexport function bridgeFor(node) {\n const bridge = tryBridgeFor(node);\n if (!bridge)\n throw new ReferenceError(\"Native UI requires a mount region\");\n return bridge;\n}\n/** Returns the active region bridge when available without throwing in unscoped contexts. */\nexport function tryBridgeFor(node) {\n const known = node && nodeBridges.get(node);\n if (known)\n return known;\n if (regionProviders === 0)\n return callbackBridge ?? globalThis.__zgui;\n const owner = getOwner();\n const currentCallback = owner === callbackOwner ? callbackBridge : undefined;\n return currentCallback ?? (owner && useContext(Region)) ?? callbackBridge ?? globalThis.__zgui;\n}\n/** Stable per-session scope key shared across all surfaces in a shell or one window. */\nexport function sessionScopeKey(bridge) {\n return globalThis.__zguiShell ?? bridge ?? tryBridgeFor();\n}\nconst motionStates = new WeakMap();\nfunction flushMotion() {\n try {\n solidFlush();\n }\n catch (error) {\n resetErrorHalt();\n throw error;\n }\n}\nfunction ensureMotionState(bridge) {\n const key = sessionScopeKey(bridge);\n if (!key)\n throw new ReferenceError(\"Native UI requires a mount region or shell session\");\n let state = motionStates.get(key);\n if (!state) {\n const initial = bridge ? bridge.getReducedMotion() : false;\n const [hostValue, setHostValue] = createSignal(initial, { ownedWrite: true });\n const [override, setOverride] = createSignal(null);\n state = {\n hostValue,\n setHostValue,\n currentHostValue: initial,\n override,\n setOverride,\n currentOverride: null,\n subscribedBridges: new WeakSet(),\n };\n motionStates.set(key, state);\n }\n return state;\n}\nfunction subscribeMotionBridge(state, bridge, allowReadOnlySkip) {\n if (state.subscribedBridges.has(bridge))\n return undefined;\n const current = bridge.getReducedMotion();\n if (current !== state.currentHostValue) {\n state.currentHostValue = current;\n state.setHostValue(current);\n }\n let unsubscribe;\n if (bridge.subscribeReducedMotion) {\n try {\n unsubscribe = bridge.subscribeReducedMotion(next => {\n state.currentHostValue = next;\n state.setHostValue(next);\n flushMotion();\n });\n }\n catch (error) {\n if (allowReadOnlySkip)\n return undefined;\n throw error;\n }\n }\n state.subscribedBridges.add(bridge);\n return unsubscribe\n ? () => {\n state.subscribedBridges.delete(bridge);\n unsubscribe();\n }\n : undefined;\n}\n/** Eagerly subscribe a mounted region bridge so unscoped shell-root readers stay synchronized. */\nexport function attachReducedMotionBridge(bridge) {\n if (typeof bridge.getReducedMotion !== \"function\")\n return;\n const state = ensureMotionState(bridge);\n const dispose = subscribeMotionBridge(state, bridge, false);\n if (dispose && getOwner())\n onCleanup(dispose);\n}\n/** Reactive reduced-motion preference (runtime override when set, otherwise host/desktop preference). */\nexport function getReducedMotion() {\n const bridge = tryBridgeFor();\n const state = ensureMotionState(bridge);\n if (bridge)\n subscribeMotionBridge(state, bridge, true);\n state.override();\n state.hostValue();\n return state.currentOverride ?? state.currentHostValue;\n}\n/** Override reduced motion dynamically for this session, or pass `null` to follow the host/desktop setting. */\nexport function setReducedMotion(value) {\n if (value !== null && typeof value !== \"boolean\") {\n throw new TypeError(\"setReducedMotion requires a boolean or null\");\n }\n const bridge = tryBridgeFor();\n const state = ensureMotionState(bridge);\n if (bridge)\n subscribeMotionBridge(state, bridge, true);\n state.currentOverride = value;\n state.setOverride(value);\n}\nconst backgroundBlurStates = new WeakMap();\nfunction ensureBackgroundBlurState(bridge) {\n const key = sessionScopeKey(bridge);\n if (!key)\n throw new ReferenceError(\"Native UI requires a mount region or shell session\");\n let state = backgroundBlurStates.get(key);\n if (!state) {\n const initial = bridge?.getBackgroundBlurSupported?.() ??\n globalThis.__zguiShell?.getBackgroundBlurSupported?.() ??\n false;\n const [hostValue, setHostValue] = createSignal(initial, { ownedWrite: true });\n state = {\n hostValue,\n setHostValue,\n currentHostValue: initial,\n subscribedSources: new WeakSet(),\n };\n backgroundBlurStates.set(key, state);\n }\n return state;\n}\nfunction subscribeBackgroundBlurSource(state, source, allowReadOnlySkip) {\n if (typeof source.getBackgroundBlurSupported !== \"function\")\n return undefined;\n if (state.subscribedSources.has(source))\n return undefined;\n const current = source.getBackgroundBlurSupported();\n if (current !== state.currentHostValue) {\n state.currentHostValue = current;\n state.setHostValue(current);\n }\n let unsubscribe;\n if (source.subscribeBackgroundBlurSupported) {\n try {\n unsubscribe = source.subscribeBackgroundBlurSupported(next => {\n if (next === state.currentHostValue)\n return;\n state.currentHostValue = next;\n state.setHostValue(next);\n flushMotion();\n });\n }\n catch (error) {\n if (allowReadOnlySkip)\n return undefined;\n throw error;\n }\n }\n state.subscribedSources.add(source);\n return unsubscribe\n ? () => {\n state.subscribedSources.delete(source);\n unsubscribe();\n }\n : undefined;\n}\n/** Eagerly subscribe a mounted region bridge so background-blur readers stay synchronized. */\nexport function attachBackgroundBlurBridge(bridge) {\n if (typeof bridge.getBackgroundBlurSupported !== \"function\")\n return;\n const state = ensureBackgroundBlurState(bridge);\n const dispose = subscribeBackgroundBlurSource(state, bridge, false);\n if (dispose && getOwner())\n onCleanup(dispose);\n}\n/** Eagerly subscribe the rootless shell bridge so zero-surface shells observe live blur transitions. */\nexport function attachBackgroundBlurShell() {\n const shell = globalThis.__zguiShell;\n if (!shell || typeof shell.getBackgroundBlurSupported !== \"function\")\n return;\n const state = ensureBackgroundBlurState();\n const dispose = subscribeBackgroundBlurSource(state, shell, false);\n if (dispose && getOwner())\n onCleanup(dispose);\n}\n/** Read-only reactive compositor background-blur capability (`ext_background_effect_v1` `Capability::Blur`). */\nexport function getBackgroundBlurSupported() {\n const bridge = tryBridgeFor();\n const state = ensureBackgroundBlurState(bridge);\n if (bridge?.getBackgroundBlurSupported) {\n const dispose = subscribeBackgroundBlurSource(state, bridge, true);\n if (dispose && getOwner())\n onCleanup(dispose);\n }\n else if (globalThis.__zguiShell?.getBackgroundBlurSupported) {\n const dispose = subscribeBackgroundBlurSource(state, globalThis.__zguiShell, true);\n if (dispose && getOwner())\n onCleanup(dispose);\n }\n state.hostValue();\n return state.currentHostValue;\n}\nexport function rememberBridge(node, bridge) {\n nodeBridges.set(node, bridge);\n return node;\n}\n/**\n * Returns true iff both nodes belong to the same native document/bridge.\n * Distinct `PopupSurface` / `LayerSurface` / `WindowSurface` regions own distinct bridges,\n * whereas `Portal` shares its host document's bridge.\n */\nexport function sameDocument(first, second) {\n if (!first || !second)\n return false;\n const firstBridge = nodeBridges.get(first);\n if (!firstBridge)\n return false;\n return firstBridge === nodeBridges.get(second);\n}\nexport function provideRegion(bridge, mount) {\n const wasEmpty = regionProviders === 0;\n regionProviders += 1;\n onCleanup(() => {\n regionProviders -= 1;\n if (regionProviders === 0)\n notifyRegionPresence(false);\n });\n let owner = null;\n const children = Region({\n value: bridge,\n get children() {\n owner = getOwner();\n return null;\n },\n });\n // Evaluate the provider before mounting so native mount errors propagate directly.\n if (typeof children === \"function\")\n createMemo(children)();\n runWithOwner(owner, mount);\n if (wasEmpty && regionProviders > 0)\n notifyRegionPresence(true);\n}\nexport function withCallbackBridge(bridge, fn) {\n const previousBridge = callbackBridge;\n const previousOwner = callbackOwner;\n callbackBridge = bridge;\n callbackOwner = getOwner();\n try {\n return fn();\n }\n finally {\n callbackBridge = previousBridge;\n callbackOwner = previousOwner;\n }\n}\nexport function shellBridge() {\n const bridge = globalThis.__zguiShell;\n if (!bridge)\n throw new ReferenceError(\"Native shell operations require a session host\");\n return bridge;\n}\n","import { createSignal } from \"#solid\";\nlet observed = false;\nlet dirty = false;\nlet counter = 0;\nconst [revision, setRevision] = createSignal(0, {\n ownedWrite: true,\n unobserved() {\n observed = false;\n dirty = false;\n },\n});\nexport function trackTreeOrder() {\n observed = true;\n dirty = false;\n revision();\n}\nexport function invalidateTreeOrder() {\n if (!observed || dirty)\n return;\n dirty = true;\n counter += 1;\n setRevision(counter);\n}\n","import { createRenderer } from \"@solidjs/universal\";\nimport { $PROXY, createRoot, flush as solidFlush, resetErrorHalt } from \"#solid\";\nimport { attachBackgroundBlurBridge, attachReducedMotionBridge, bridgeFor, provideRegion, rememberBridge, tryBridgeFor, withCallbackBridge, } from \"../host.js\";\nimport { invalidateTreeOrder } from \"../tree-order.js\";\n// Upstream declarations restrict children to one NodeType and omit null navigation results.\nconst createNativeRenderer = createRenderer;\nfunction setNativeProperty(node, name, value, previous) {\n const bridge = bridgeFor(node);\n if (name.startsWith(\"on\") && typeof value === \"function\") {\n const callback = value;\n value = function (event) {\n return withCallbackBridge(bridge, () => callback.call(this, event));\n };\n }\n bridge.setProperty(node, name, value, previous);\n}\n// Resolve the bridge at invocation, so module preflight never allocates native nodes.\nconst renderer = createNativeRenderer({\n createElement: (tag, staticProps) => {\n const bridge = bridgeFor();\n const node = rememberBridge(bridge.createElement(tag), bridge);\n if (staticProps) {\n for (const key of Object.keys(staticProps)) {\n if (key !== \"children\")\n setNativeProperty(node, key, staticProps[key]);\n }\n }\n return node;\n },\n createTextNode: (text) => {\n const bridge = bridgeFor();\n return rememberBridge(bridge.createTextNode(typeof text === \"number\" ? `${text}` : text), bridge);\n },\n replaceText: (node, text) => bridgeFor(node).replaceText(node, typeof text === \"number\" ? `${text}` : text),\n isTextNode: node => bridgeFor(node).isTextNode(node),\n insertNode: (parent, node, anchor) => {\n bridgeFor(parent).insertNode(parent, node, anchor);\n invalidateTreeOrder();\n },\n removeNode: (parent, node) => {\n bridgeFor(parent).removeNode(parent, node);\n invalidateTreeOrder();\n },\n getParentNode: node => bridgeFor(node).getParentNode(node),\n getFirstChild: node => bridgeFor(node).getFirstChild(node),\n getNextSibling: node => bridgeFor(node).getNextSibling(node),\n setProperty: setNativeProperty,\n});\nexport const { effect, memo, createComponent, createElement, createTextNode, insertNode, insert, setProp, applyRef, ref, } = renderer;\nexport function spread(node, props, skipChildren) {\n if (props != null && typeof props === \"object\" && !Array.isArray(props)) {\n // QuickJS-NG drops getter descriptors from Proxy getOwnPropertyDescriptor traps.\n if ($PROXY in props) {\n if (!skipChildren) {\n renderer.spread(node, props, true);\n if (\"children\" in props) {\n renderer.insert(node, () => props.children);\n }\n return;\n }\n renderer.spread(node, props, true);\n return;\n }\n const record = props;\n const keys = Object.keys(record);\n let hasGetter = false;\n for (const key of keys) {\n if (key !== \"children\" && Object.getOwnPropertyDescriptor(record, key)?.get !== undefined) {\n hasGetter = true;\n break;\n }\n }\n if (!hasGetter) {\n for (const key of keys) {\n if (key === \"children\") {\n if (!skipChildren) {\n const desc = Object.getOwnPropertyDescriptor(record, \"children\");\n if (desc?.get !== undefined)\n renderer.insert(node, () => record.children);\n else if (desc?.value !== undefined)\n renderer.insert(node, desc.value);\n }\n continue;\n }\n const value = record[key];\n if (key === \"ref\") {\n if (typeof value === \"function\" || Array.isArray(value)) {\n renderer.ref(() => value, node);\n }\n }\n else if (value !== undefined) {\n setNativeProperty(node, key, value);\n }\n }\n return;\n }\n }\n renderer.spread(node, props, skipChildren);\n}\nexport function flush(fn) {\n try {\n return fn ? solidFlush(fn) : solidFlush();\n }\n catch (error) {\n resetErrorHalt();\n throw error;\n }\n}\n// Append a trailing channel source inside MergeView so viewOf() sees merged channels directly.\nconst mergedSources = new WeakMap();\nexport function mergeProps(...sources) {\n let inherited = null;\n let offset = 0;\n for (const source of sources) {\n const prior = mergedSources.get(source);\n if (prior) {\n inherited ??= sources.slice(0, offset);\n inherited.push(...prior);\n }\n else if (inherited) {\n inherited.push(source);\n }\n offset += 1;\n }\n const list = inherited ?? sources;\n let c0 = 0, c1 = 0, c2 = 0;\n for (const item of list) {\n if (\"__zguiClass\" in item)\n c0 += 1;\n if (\"__zguiStyle\" in item)\n c1 += 1;\n if (\"__zguiInvariantStyle\" in item)\n c2 += 1;\n }\n if (c0 <= 1 && c1 <= 1 && c2 <= 1)\n return renderer.mergeProps(...list);\n const originals = [...list];\n const channelOverrides = {};\n if (c0 > 1) {\n Object.defineProperty(channelOverrides, \"__zguiClass\", {\n enumerable: true,\n configurable: true,\n get() {\n let joined = \"\";\n for (const original of originals) {\n const value = Reflect.get(original, \"__zguiClass\");\n if (value)\n joined = joined ? `${joined} ${String(value)}` : String(value);\n }\n return joined;\n },\n });\n }\n for (const [count, key] of [\n [c1, \"__zguiStyle\"],\n [c2, \"__zguiInvariantStyle\"],\n ]) {\n if (count > 1) {\n Object.defineProperty(channelOverrides, key, {\n enumerable: true,\n configurable: true,\n get() {\n const combined = {};\n for (const original of originals) {\n const value = Reflect.get(original, key);\n if (value)\n Object.assign(combined, value);\n }\n return combined;\n },\n });\n }\n }\n const result = renderer.mergeProps(...list, channelOverrides);\n mergedSources.set(result, originals);\n return result;\n}\nexport function render(code, root) {\n const dispose = renderer.render(() => {\n const bridge = tryBridgeFor(root);\n if (bridge) {\n attachReducedMotionBridge(bridge);\n attachBackgroundBlurBridge(bridge);\n }\n return code();\n }, root);\n return () => {\n dispose();\n flush();\n };\n}\nexport function renderRegion(code, root, bridge) {\n rememberBridge(root, bridge);\n return mountOwned(() => provideRegion(bridge, () => {\n attachReducedMotionBridge(bridge);\n attachBackgroundBlurBridge(bridge);\n insert(root, code());\n }), () => bridge.clearRoot(root), \"region\");\n}\nexport function mountOwned(mount, clear, scope = \"root\") {\n let disposeRoot;\n let disposed = false;\n function dispose() {\n if (disposed)\n return;\n disposed = true;\n const errors = [];\n try {\n disposeRoot?.();\n // Region cleanup runs under the host disposal fence; leave other owners' jobs to the host.\n if (scope === \"root\")\n flush();\n }\n catch (error) {\n errors.push(error);\n }\n finally {\n resetErrorHalt();\n }\n try {\n clear?.();\n }\n catch (error) {\n errors.push(error);\n }\n if (errors.length === 1)\n throw errors[0];\n if (errors.length > 1)\n throw new AggregateError(errors, \"Application cleanup failed\");\n }\n try {\n // Own the root directly: Universal.render cannot return its disposer if mount throws.\n createRoot(dispose => {\n disposeRoot = dispose;\n mount();\n });\n flush();\n }\n catch (error) {\n try {\n dispose();\n }\n catch (cleanupError) {\n throw new AggregateError([error, cleanupError], \"Application mount and cleanup failed\");\n }\n throw error;\n }\n return dispose;\n}\n","import { createEffect } from \"#solid\";\nimport { insert, mountOwned } from \"./renderer/index.js\";\nimport { attachBackgroundBlurBridge, attachBackgroundBlurShell, attachReducedMotionBridge, bridgeFor, rememberBridge, } from \"./host.js\";\n/**\n * Mount native children into a dedicated host root. Cleanup is idempotent and\n * attempts both reactive disposal and native clear, including after mount failure.\n * Host teardown separately cancels timers, requests, and callback registrations.\n */\nexport function renderApp(code, root) {\n const bridge = bridgeFor(root);\n rememberBridge(root, bridge);\n return mountOwned(() => {\n attachReducedMotionBridge(bridge);\n attachBackgroundBlurBridge(bridge);\n insert(root, code());\n }, () => bridge.clearRoot(root));\n}\n/** Own a rootless shell's reactive graph; native content belongs inside shell surfaces. */\nexport function renderShell(code) {\n return mountOwned(() => {\n attachBackgroundBlurShell();\n const children = code();\n createEffect(() => visitShellChildren(children), () => { });\n });\n}\nfunction visitShellChildren(child) {\n if (typeof child === \"function\")\n visitShellChildren(child());\n else if (Array.isArray(child))\n for (const item of child)\n visitShellChildren(item);\n}\n","import { createContext } from \"#solid\";\n/** Reactive `:root` token stylesheet exported by an enclosing `<ThemeProvider>` for auxiliary windows. */\nexport const ThemeCssContext = createContext(null);\n","import { createEffect, getOwner, onCleanup } from \"#solid\";\nimport { flush } from \"./renderer/index.js\";\nimport { bridgeFor, bridgeForTarget, getBackgroundBlurSupported, getReducedMotion, setReducedMotion, withCallbackBridge, } from \"./host.js\";\nexport { getBackgroundBlurSupported, getReducedMotion, setReducedMotion };\nexport function focus(node, options) {\n bridgeFor(node).focus(node, options?.reveal ?? false);\n}\nexport function getWindowRect(node) {\n return bridgeFor(node).getWindowRect(node);\n}\nexport function getTextContent(node) {\n return bridgeFor(node).getTextContent(node);\n}\nexport function isAnimating(node) {\n return bridgeFor(node).isAnimating(node);\n}\nexport function precedes(first, second) {\n return bridgeFor(first).precedes(first, second);\n}\n/** Creates a retained drawing, disposed automatically under a Solid owner. */\nexport function createCanvasScene() {\n const scene = bridgeFor().createCanvasScene();\n if (getOwner())\n onCleanup(() => scene.dispose());\n return scene;\n}\nfunction bindNodeLease(target, attach) {\n let active;\n let disposed = false;\n const stop = () => {\n if (disposed)\n return;\n disposed = true;\n active?.();\n active = undefined;\n };\n createEffect(() => (disposed ? null : target()), node => {\n active?.();\n active = undefined;\n if (!node || disposed)\n return;\n const lease = attach(node);\n active = lease;\n return () => {\n lease();\n if (active === lease)\n active = undefined;\n };\n });\n if (getOwner())\n onCleanup(stop);\n return stop;\n}\nexport function observeGeometry(node, kind, callback) {\n const attach = (target) => {\n const bridge = bridgeFor(target);\n return bridge.observeGeometry(target, kind, value => withCallbackBridge(bridge, () => {\n callback(value);\n flush();\n }));\n };\n if (typeof node === \"function\")\n return bindNodeLease(node, attach);\n const dispose = attach(node);\n if (getOwner())\n onCleanup(dispose);\n return dispose;\n}\nexport function trapFocus(node, options) {\n const wrap = options?.wrap ?? true;\n const autoFocus = options?.autoFocus ?? true;\n const restore = options?.restore ?? true;\n const attach = (target) => bridgeFor(target).trapFocus(target, wrap, autoFocus, restore);\n if (typeof node === \"function\")\n return bindNodeLease(node, attach);\n const dispose = attach(node);\n if (getOwner())\n onCleanup(dispose);\n return dispose;\n}\nfunction resolveNode(target) {\n return typeof target === \"function\" ? (target() ?? null) : target;\n}\nfunction resolveScrollBehavior(behavior) {\n const requested = behavior ?? \"instant\";\n if (requested !== \"instant\" && requested !== \"smooth\") {\n throw new TypeError(`unsupported scroll behavior: ${String(requested)}`);\n }\n return requested === \"smooth\" && getReducedMotion() ? \"instant\" : requested;\n}\nfunction validateScrollOffset(value, name) {\n if (value === undefined)\n return null;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new RangeError(`scroll ${name} offset must be a finite number`);\n }\n return value;\n}\n/** Scroll a scroll container to absolute CSS pixel offsets. Downgrades `smooth` to `instant` under reduced motion. */\nexport function scrollTo(target, options = {}) {\n const node = resolveNode(target);\n if (!node)\n return;\n const left = validateScrollOffset(options.left, \"left\");\n const top = validateScrollOffset(options.top, \"top\");\n const behavior = resolveScrollBehavior(options.behavior);\n bridgeFor(node).scrollTo(node, left, top, behavior);\n}\n/** Scroll a scroll container by relative CSS pixel deltas. Downgrades `smooth` to `instant` under reduced motion. */\nexport function scrollBy(target, options = {}) {\n const node = resolveNode(target);\n if (!node)\n return;\n const left = validateScrollOffset(options.left, \"left\") ?? 0;\n const top = validateScrollOffset(options.top, \"top\") ?? 0;\n const behavior = resolveScrollBehavior(options.behavior);\n bridgeFor(node).scrollBy(node, left, top, behavior);\n}\n/** Bring a node into view inside its nearest scroll container. Downgrades `smooth` to `instant` under reduced motion. */\nexport function scrollIntoView(target, options = {}) {\n const node = resolveNode(target);\n if (!node)\n return;\n const block = options.block ?? \"nearest\";\n if (block !== \"nearest\" && block !== \"start\" && block !== \"center\" && block !== \"end\") {\n throw new TypeError(`unsupported scrollIntoView block: ${String(block)}`);\n }\n const behavior = resolveScrollBehavior(options.behavior);\n bridgeFor(node).scrollIntoView(node, block, behavior);\n}\n/** Read the current selection range in UTF-16 code units from an editable field/editor, or `null` when unset. */\nexport function getSelection(target) {\n const node = resolveNode(target);\n if (!node)\n return null;\n return bridgeFor(node).getSelection(node);\n}\n/** Set the caret or selection range in UTF-16 code units on an editable field/editor. Defaults `end` to `start`. */\nexport function setSelection(target, start, end = start) {\n const node = resolveNode(target);\n if (!node)\n return;\n if (typeof start !== \"number\" || !Number.isFinite(start)) {\n throw new RangeError(\"selection start offset must be a finite number\");\n }\n if (typeof end !== \"number\" || !Number.isFinite(end)) {\n throw new RangeError(\"selection end offset must be a finite number\");\n }\n bridgeFor(node).setSelection(node, start, end);\n}\n/** Select the entire text value of an editable field/editor. */\nexport function selectAll(target) {\n const node = resolveNode(target);\n if (!node)\n return;\n bridgeFor(node).selectAll(node);\n}\n/** Read the active opt-in read-only cross-block document selection (UTF-16 offsets), or `null`. */\nexport function getDocumentSelection(regionNode) {\n if (regionNode !== undefined) {\n const node = resolveNode(regionNode);\n if (!node)\n return null;\n return bridgeFor(node).getDocumentSelection();\n }\n return bridgeFor().getDocumentSelection();\n}\n/** Programmatically set read-only cross-block document selection inside an opt-in container (UTF-16 offsets). */\nexport function setDocumentSelection(containerTarget, anchor, focus = anchor) {\n const container = resolveNode(containerTarget);\n if (!container)\n return;\n if (typeof anchor.offset !== \"number\" || !Number.isFinite(anchor.offset)) {\n throw new RangeError(\"document selection anchor.offset must be a finite number\");\n }\n if (typeof focus.offset !== \"number\" || !Number.isFinite(focus.offset)) {\n throw new RangeError(\"document selection focus.offset must be a finite number\");\n }\n bridgeFor(container).setDocumentSelection(container, anchor.node, anchor.offset, focus.node, focus.offset);\n}\n/** Clear the active read-only cross-block document selection in the current window/region. */\nexport function clearDocumentSelection(regionNode) {\n if (regionNode !== undefined) {\n const node = resolveNode(regionNode);\n if (!node)\n return;\n bridgeFor(node).clearDocumentSelection();\n return;\n }\n bridgeFor().clearDocumentSelection();\n}\n/** Select all selectable read-only text inside an opt-in `documentSelection` container. */\nexport function selectDocumentAll(containerTarget) {\n const container = resolveNode(containerTarget);\n if (!container)\n return;\n bridgeFor(container).selectDocumentAll(container);\n}\nexport function lockScroll(node) {\n const attach = (target) => bridgeFor(target).lockScroll(target);\n if (typeof node === \"function\")\n return bindNodeLease(node, attach);\n const dispose = attach(node);\n if (getOwner())\n onCleanup(dispose);\n return dispose;\n}\nfunction dismissOptions(options = {}) {\n return {\n layer: options.layer ?? \"popover\",\n dismissOnOutsidePress: options.dismissOnOutsidePress ?? true,\n dismissOnEscape: options.dismissOnEscape ?? true,\n exclude: options.exclude ?? null,\n leaving: options.leaving ?? false,\n };\n}\nexport function registerDismissLayer(node, callback, options) {\n if (typeof node === \"function\") {\n let currentOptions = dismissOptions(options);\n let active;\n let disposed = false;\n const dispose = () => {\n if (disposed)\n return;\n disposed = true;\n active?.dispose();\n active = undefined;\n };\n createEffect(() => (disposed ? null : node()), target => {\n active?.dispose();\n active = undefined;\n if (!target || disposed)\n return;\n const bridge = bridgeFor(target);\n const lease = bridge.registerDismissLayer(target, reason => withCallbackBridge(bridge, () => callback(reason)), currentOptions);\n active = lease;\n return () => {\n lease.dispose();\n if (active === lease)\n active = undefined;\n };\n });\n if (getOwner())\n onCleanup(dispose);\n return {\n dispose,\n update(next) {\n currentOptions = dismissOptions(next);\n if (!disposed)\n active?.update(currentOptions);\n },\n };\n }\n const bridge = bridgeFor(node);\n const lease = bridge.registerDismissLayer(node, reason => withCallbackBridge(bridge, () => callback(reason)), dismissOptions(options));\n if (getOwner())\n onCleanup(lease.dispose);\n return { dispose: lease.dispose, update: options => lease.update(dismissOptions(options)) };\n}\n/** Mount a stylesheet in the current region, or in the region of a live, attached target. */\nexport function mountStylesheet(name, css, target) {\n const bridge = target === undefined ? bridgeFor() : bridgeForTarget(target);\n bridge.installStylesheet(name, css, target);\n let removed = false;\n const dispose = () => {\n if (removed)\n return;\n removed = true;\n bridge.removeStylesheet(name);\n };\n if (getOwner())\n onCleanup(dispose);\n return dispose;\n}\n","import { createEffect, createSignal, getOwner, onCleanup, untrack } from \"#solid\";\nimport { isRootlessWithoutRegions, onRegionPresenceChange, tryBridgeFor } from \"./host.js\";\nimport { getReducedMotion } from \"./nodes.js\";\nimport { flush } from \"./renderer/index.js\";\nclass SpringTicker {\n entries = new Set();\n frameId;\n frameToken = 0;\n dispatching = false;\n schedule;\n isParked;\n constructor(schedule, isParked) {\n this.schedule = schedule;\n this.isParked = isParked;\n }\n enroll(entry) {\n entry.revision += 1;\n this.entries.add(entry);\n this.arm();\n }\n unenroll(entry) {\n if (!this.entries.delete(entry))\n return;\n entry.revision += 1;\n if (this.entries.size === 0) {\n this.cancelFrame();\n }\n }\n has(entry) {\n return this.entries.has(entry);\n }\n onLastRegionDetached() {\n this.cancelFrame();\n for (const entry of this.entries) {\n entry.resetHistory();\n }\n }\n onRegionAttached() {\n if (this.entries.size > 0 && !this.dispatching && !this.isParked()) {\n this.arm();\n }\n }\n cancelFrame() {\n this.frameToken += 1;\n if (this.frameId !== undefined) {\n const id = this.frameId;\n this.frameId = undefined;\n cancelAnimationFrame(id);\n }\n }\n arm() {\n if (this.dispatching || this.frameId !== undefined || this.entries.size === 0)\n return;\n if (this.isParked())\n return;\n const token = ++this.frameToken;\n this.frameId = this.schedule(time => {\n this.onFrame(token, time);\n });\n }\n onFrame(token, time) {\n if (token !== this.frameToken)\n return;\n this.frameId = undefined;\n this.frameToken += 1;\n if (!Number.isFinite(time)) {\n if (this.entries.size > 0 && !this.isParked()) {\n this.arm();\n }\n return;\n }\n const snapshot = [];\n for (const entry of this.entries) {\n snapshot.push({ entry, revision: entry.revision });\n }\n this.dispatching = true;\n try {\n for (const item of snapshot) {\n if (!this.entries.has(item.entry) || item.entry.revision !== item.revision) {\n continue;\n }\n const stillActive = item.entry.step(time);\n if (!stillActive && item.entry.revision === item.revision) {\n this.entries.delete(item.entry);\n item.entry.revision += 1;\n }\n }\n }\n finally {\n this.dispatching = false;\n if (this.entries.size > 0 && !this.isParked()) {\n this.arm();\n }\n }\n }\n}\nconst bridgeTickers = new WeakMap();\nconst globalTicker = new SpringTicker(cb => requestAnimationFrame(cb), isRootlessWithoutRegions);\nonRegionPresenceChange(hasRegions => {\n if (hasRegions) {\n globalTicker.onRegionAttached();\n }\n else if (isRootlessWithoutRegions()) {\n globalTicker.onLastRegionDetached();\n }\n});\nfunction tickerFor(ownerBridge) {\n if (ownerBridge && typeof ownerBridge.requestAnimationFrame === \"function\") {\n let ticker = bridgeTickers.get(ownerBridge);\n if (!ticker) {\n const bridge = ownerBridge;\n ticker = new SpringTicker(cb => bridge.requestAnimationFrame(cb), () => false);\n bridgeTickers.set(ownerBridge, ticker);\n }\n return ticker;\n }\n return globalTicker;\n}\nfunction readOption(value, fallback) {\n return typeof value === \"function\" ? value() : (value ?? fallback);\n}\nfunction resolvePhysics(options) {\n const stiffness = readOption(options.stiffness, 170);\n const damping = readOption(options.damping, 26);\n const mass = readOption(options.mass, 1);\n const precision = readOption(options.precision, 0.001);\n const velocityPrecision = readOption(options.velocityPrecision, precision);\n const stiffnessPerMass = stiffness / mass;\n const dampingPerMass = damping / mass;\n if (![stiffnessPerMass, dampingPerMass, mass, precision, velocityPrecision].every(n => Number.isFinite(n) && n > 0)) {\n throw new RangeError(\"Spring options must produce finite positive rates and thresholds\");\n }\n return { stiffnessPerMass, dampingPerMass, precision, velocityPrecision };\n}\nfunction withControls(read, settled, reset, kick, reconfigure) {\n Object.defineProperty(read, \"settled\", { value: settled });\n Object.defineProperty(read, \"jump\", {\n value(value) {\n if (!Number.isFinite(value))\n throw new RangeError(\"Spring jump value must be finite\");\n reset(value);\n },\n });\n Object.defineProperty(read, \"impulse\", {\n value(velocityDelta) {\n if (!Number.isFinite(velocityDelta)) {\n throw new RangeError(\"Spring impulse must be finite\");\n }\n kick(velocityDelta);\n },\n });\n Object.defineProperty(read, \"configure\", {\n value(next) {\n reconfigure(next);\n },\n });\n return read;\n}\n/** Follow a finite numeric target; retargeting preserves velocity and owner disposal cancels motion. */\nexport function createSpring(target, options = {}) {\n // Read mount-only initial position once, untracked, and validate synchronously even under reduced motion.\n const rawInitial = untrack(() => options.initial);\n if (rawInitial !== undefined && !Number.isFinite(rawInitial)) {\n throw new RangeError(\"Spring initial value must be finite\");\n }\n const [overrideOptions, setOverrideOptions] = createSignal(undefined);\n const currentOptions = () => {\n const overrides = overrideOptions();\n if (!overrides)\n return options;\n return {\n get stiffness() {\n return overrides.stiffness !== undefined ? overrides.stiffness : options.stiffness;\n },\n get damping() {\n return overrides.damping !== undefined ? overrides.damping : options.damping;\n },\n get mass() {\n return overrides.mass !== undefined ? overrides.mass : options.mass;\n },\n get precision() {\n return overrides.precision !== undefined ? overrides.precision : options.precision;\n },\n get velocityPrecision() {\n return overrides.velocityPrecision !== undefined\n ? overrides.velocityPrecision\n : options.velocityPrecision;\n },\n };\n };\n let physics = untrack(() => resolvePhysics(currentOptions()));\n const readTarget = () => {\n const next = target();\n if (!Number.isFinite(next))\n throw new RangeError(\"Spring target must be finite\");\n return next;\n };\n const ticker = tickerFor(tryBridgeFor());\n let destination = untrack(readTarget);\n const initialReduced = untrack(getReducedMotion);\n const startFromInitial = !initialReduced && rawInitial !== undefined && rawInitial !== destination;\n let position = startFromInitial ? rawInitial : destination;\n let velocity = 0;\n let previousTime;\n let disposed = false;\n let refreshingTarget = false;\n let effectInitialized = false;\n const [value, setValue] = createSignal(position);\n let isSettled = !startFromInitial;\n const [settledSignal, setSettledSignal] = createSignal(isSettled);\n const updateSettled = (next) => {\n isSettled = next;\n setSettledSignal(next);\n };\n const atRest = () => Math.abs(destination - position) <= physics.precision &&\n Math.abs(velocity) <= physics.velocityPrecision;\n const entry = {\n revision: 0,\n resetHistory() {\n previousTime = undefined;\n },\n step(time) {\n if (disposed)\n return false;\n if (untrack(getReducedMotion)) {\n settle();\n return false;\n }\n let dt;\n if (previousTime === undefined) {\n dt = 1 / 60;\n previousTime = time;\n }\n else if (time < previousTime) {\n dt = 0;\n }\n else {\n dt = Math.min((time - previousTime) / 1000, 0.032);\n previousTime = time;\n }\n // Implicit midpoint keeps the damped oscillator stable at irregular intervals.\n const half = dt / 2;\n const divisor = 1 + half * (physics.dampingPerMass + half * physics.stiffnessPerMass);\n const midpointVelocity = (velocity + half * physics.stiffnessPerMass * (destination - position)) / divisor;\n position += dt * midpointVelocity;\n velocity = 2 * midpointVelocity - velocity;\n if (!Number.isFinite(divisor) ||\n !Number.isFinite(position) ||\n !Number.isFinite(velocity) ||\n atRest()) {\n settle();\n return false;\n }\n setValue(position);\n return true;\n },\n };\n const deactivate = () => {\n ticker.unenroll(entry);\n previousTime = undefined;\n };\n const activate = () => {\n updateSettled(false);\n if (!ticker.has(entry)) {\n previousTime = undefined;\n ticker.enroll(entry);\n }\n };\n const settle = () => {\n deactivate();\n velocity = 0;\n position = destination;\n setValue(position);\n updateSettled(true);\n };\n if (startFromInitial) {\n ticker.enroll(entry);\n }\n if (getOwner()) {\n onCleanup(() => {\n disposed = true;\n deactivate();\n velocity = 0;\n updateSettled(true);\n });\n }\n createEffect(() => resolvePhysics(currentOptions()), next => {\n physics = next;\n if (!disposed && !untrack(getReducedMotion) && !atRest()) {\n activate();\n }\n });\n createEffect(() => [readTarget(), getReducedMotion()], ([next, reduced]) => {\n const isFirstRun = !effectInitialized;\n effectInitialized = true;\n if (refreshingTarget || disposed)\n return;\n if (isFirstRun) {\n if (reduced) {\n destination = next;\n settle();\n return;\n }\n if (next === destination)\n return;\n }\n destination = next;\n if (reduced || atRest())\n settle();\n else\n activate();\n });\n const readPosition = () => {\n if (disposed)\n return position;\n if (getReducedMotion())\n return readTarget();\n value();\n return position;\n };\n const readSettled = () => {\n if (disposed)\n return true;\n if (getReducedMotion())\n return true;\n settledSignal();\n return isSettled;\n };\n const syncPendingTarget = () => {\n if (!refreshingTarget) {\n refreshingTarget = true;\n try {\n flush();\n }\n finally {\n refreshingTarget = false;\n }\n }\n if (disposed)\n return undefined;\n const nextDestination = untrack(readTarget);\n if (disposed)\n return undefined;\n return nextDestination;\n };\n return withControls(readPosition, readSettled, next => {\n if (disposed)\n return;\n const nextDestination = syncPendingTarget();\n if (nextDestination === undefined)\n return;\n deactivate();\n position = next;\n velocity = 0;\n destination = nextDestination;\n if (untrack(getReducedMotion) || atRest()) {\n settle();\n }\n else {\n setValue(position);\n activate();\n }\n }, velocityDelta => {\n if (disposed || velocityDelta === 0)\n return;\n if (untrack(getReducedMotion))\n return;\n if (!Number.isFinite(velocity + velocityDelta)) {\n throw new RangeError(\"Spring velocity must remain finite\");\n }\n const nextDestination = syncPendingTarget();\n if (nextDestination === undefined)\n return;\n if (untrack(getReducedMotion)) {\n destination = nextDestination;\n settle();\n return;\n }\n const nextVelocity = velocity + velocityDelta;\n if (!Number.isFinite(nextVelocity)) {\n throw new RangeError(\"Spring velocity must remain finite\");\n }\n destination = nextDestination;\n velocity = nextVelocity;\n if (nextVelocity === 0 && atRest()) {\n settle();\n }\n else {\n activate();\n }\n }, next => {\n if (disposed)\n return;\n const prev = untrack(overrideOptions);\n const merged = {\n stiffness: \"stiffness\" in next ? next.stiffness : prev?.stiffness,\n damping: \"damping\" in next ? next.damping : prev?.damping,\n mass: \"mass\" in next ? next.mass : prev?.mass,\n precision: \"precision\" in next ? next.precision : prev?.precision,\n velocityPrecision: \"velocityPrecision\" in next ? next.velocityPrecision : prev?.velocityPrecision,\n };\n // Validate eagerly so invalid calls fail synchronously at the call site.\n const nextPhysics = untrack(() => resolvePhysics({\n stiffness: merged.stiffness !== undefined ? merged.stiffness : options.stiffness,\n damping: merged.damping !== undefined ? merged.damping : options.damping,\n mass: merged.mass !== undefined ? merged.mass : options.mass,\n precision: merged.precision !== undefined ? merged.precision : options.precision,\n velocityPrecision: merged.velocityPrecision !== undefined\n ? merged.velocityPrecision\n : options.velocityPrecision,\n }));\n physics = nextPhysics;\n setOverrideOptions(merged);\n if (!untrack(getReducedMotion) && !atRest()) {\n activate();\n }\n });\n}\n","import { $PROXY } from \"#solid\";\nimport { createElement, effect, insert, insertNode, mergeProps, setProp, spread, } from \"../renderer/index.js\";\nimport { bridgeFor } from \"../host.js\";\nconst installedSheets = new WeakMap();\nexport function classes(...values) {\n return values.filter(Boolean).join(\" \");\n}\nexport function withDefaults(defaults, props) {\n const defaultRecord = defaults;\n const propRecord = props;\n const defaultKeys = Object.keys(defaultRecord);\n let hasOverlap = false;\n for (const key of defaultKeys) {\n if (key in propRecord) {\n hasOverlap = true;\n break;\n }\n }\n if (!hasOverlap)\n return defaults;\n const resolved = {};\n for (const key of defaultKeys) {\n if (key in propRecord) {\n Object.defineProperty(resolved, key, {\n enumerable: true,\n configurable: true,\n get() {\n const value = propRecord[key];\n return value === undefined ? defaultRecord[key] : value;\n },\n });\n }\n else {\n const desc = Object.getOwnPropertyDescriptor(defaultRecord, key);\n if (desc)\n Object.defineProperty(resolved, key, desc);\n }\n }\n return resolved;\n}\nexport function useStylesheet(sheet) {\n if (sheet.css === \"\")\n return;\n const host = bridgeFor();\n const installed = installedSheets.get(host);\n if (installed?.has(sheet.name))\n return;\n host.installStylesheet(sheet.name, `@layer zgui.components { ${sheet.css} }`);\n if (installed)\n installed.add(sheet.name);\n else\n installedSheets.set(host, new Set([sheet.name]));\n}\nexport function append(parent, child) {\n insertNode(parent, child);\n}\nexport function slot(parent, content, marker = null) {\n insert(parent, content, marker);\n}\nexport function provide(context, value, source) {\n if (typeof source === \"function\") {\n return context({\n value,\n get children() {\n return source();\n },\n });\n }\n if (!($PROXY in source)) {\n const desc = Object.getOwnPropertyDescriptor(source, \"children\");\n if (desc) {\n const next = { value };\n Object.defineProperty(next, \"children\", desc);\n return context(next);\n }\n }\n return context({\n value,\n get children() {\n return source.children;\n },\n });\n}\nexport function isStaticProps(props) {\n if ($PROXY in props)\n return false;\n for (const key of Object.keys(props)) {\n if (key !== \"children\" && Object.getOwnPropertyDescriptor(props, key)?.get !== undefined) {\n return false;\n }\n }\n return true;\n}\nexport function element(tag, props) {\n const node = createElement(tag);\n spread(node, props);\n return node;\n}\nexport function part(tag, sheet, className, defaults = {}) {\n const hasDefaults = Object.keys(defaults).length > 0;\n return (props = {}) => {\n useStylesheet(sheet);\n if (!hasDefaults && !($PROXY in props) && !(\"__zguiClass\" in props)) {\n const node = createElement(tag);\n setProp(node, \"__zguiClass\", className);\n spread(node, props);\n return node;\n }\n return element(tag, mergeProps(props, withDefaults(defaults, props), { __zguiClass: className }));\n };\n}\nexport function forbidChildren(name, props) {\n if (!($PROXY in props)) {\n if (\"children\" in props)\n throw new TypeError(`${name} does not accept children`);\n return;\n }\n effect(() => \"children\" in props, hasChildren => {\n if (hasChildren)\n throw new TypeError(`${name} does not accept children`);\n });\n}\n","import { For, createMemo, createSignal, omit } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"./renderer/index.js\";\nimport { append, slot, withDefaults } from \"./components/shared.js\";\nimport { getReducedMotion, observeGeometry, scrollTo } from \"./nodes.js\";\nfunction validatePositive(value, name) {\n if (!Number.isFinite(value) || value <= 0) {\n throw new RangeError(`${name} must be a finite positive number`);\n }\n return value;\n}\nfunction validateNonNegative(value, name) {\n if (!Number.isFinite(value) || value < 0) {\n throw new RangeError(`${name} must be a finite non-negative number`);\n }\n return value;\n}\nfunction validateOverscan(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new RangeError(\"VirtualList overscan must be a non-negative integer\");\n }\n return value;\n}\nfunction computeWindow(totalRows, rowHeight, gap, overscan, scrollTop, viewportHeight) {\n if (totalRows <= 0)\n return { start: 0, end: 0, topSpacer: 0, bottomSpacer: 0 };\n const stride = rowHeight + gap;\n const totalHeight = Math.max(0, totalRows * stride - gap);\n const maxScroll = Math.max(0, totalHeight - viewportHeight);\n const clampedScroll = Math.min(Math.max(0, scrollTop), maxScroll);\n const start = Math.max(0, Math.min(totalRows - 1, Math.floor(clampedScroll / stride) - overscan));\n const visibleRows = Math.max(1, Math.ceil(viewportHeight / stride) + 1);\n const end = Math.min(totalRows, start + visibleRows + overscan * 2);\n const topSpacer = start * stride;\n const bottomSpacer = (totalRows - end) * stride;\n return { start, end, topSpacer, bottomSpacer };\n}\nfunction computeTargetScrollTop(rowIndex, totalRows, rowHeight, gap, currentScrollTop, viewportHeight, align) {\n if (totalRows <= 0)\n return null;\n const stride = rowHeight + gap;\n const totalHeight = Math.max(0, totalRows * stride - gap);\n const maxScroll = Math.max(0, totalHeight - viewportHeight);\n const rowTop = rowIndex * stride;\n const rowBottom = rowTop + rowHeight;\n let target;\n if (align === \"start\")\n target = rowTop;\n else if (align === \"end\")\n target = rowBottom - viewportHeight;\n else if (align === \"center\")\n target = rowTop - (viewportHeight - rowHeight) / 2;\n else if (align === \"auto\") {\n if (rowTop < currentScrollTop)\n target = rowTop;\n else if (rowBottom > currentScrollTop + viewportHeight)\n target = rowBottom - viewportHeight;\n else\n return null;\n }\n else {\n throw new TypeError(`unsupported VirtualList scrollToIndex align: ${String(align)}`);\n }\n return Math.max(0, Math.min(maxScroll, target));\n}\nfunction spacer(height) {\n const node = createElement(\"box\");\n spread(node, {\n get style() {\n const h = height();\n return { height: `${h}px`, flexShrink: 0, display: h > 0 ? \"flex\" : \"none\" };\n },\n }, true);\n return node;\n}\nfunction renderMappedItems(items, startIndex, keyed, renderItem) {\n if (typeof keyed === \"function\") {\n const renderKeyed = renderItem;\n return For({\n get each() {\n return items();\n },\n keyed,\n children: (item, localIndex) => renderKeyed(item, () => startIndex() + localIndex()),\n });\n }\n const renderIdentity = renderItem;\n return For({\n get each() {\n return items();\n },\n children: (item, localIndex) => renderIdentity(item, () => startIndex() + localIndex()),\n });\n}\nexport function VirtualList(props) {\n const rest = omit(props, \"each\", \"itemHeight\", \"gap\", \"overscan\", \"initialHeight\", \"controller\", \"keyed\", \"fallback\", \"children\");\n const scroller = createElement(\"scroll\");\n spread(scroller, mergeProps(rest, withDefaults({ role: \"list\" }, rest)), true);\n const [scrollTop, setScrollTop] = createSignal(0);\n const [viewportHeight, setViewportHeight] = createSignal(validatePositive(props.initialHeight ?? 480, \"VirtualList initialHeight\"));\n observeGeometry(scroller, \"scrollPosition\", pos => {\n const nextTop = Math.max(0, pos.offset.y);\n if (nextTop !== scrollTop())\n setScrollTop(nextTop);\n if (pos.scrollport.height > 0 && pos.scrollport.height !== viewportHeight()) {\n setViewportHeight(pos.scrollport.height);\n }\n });\n const metrics = createMemo(() => {\n const itemHeight = validatePositive(props.itemHeight, \"VirtualList itemHeight\");\n const gap = validateNonNegative(props.gap ?? 0, \"VirtualList gap\");\n const overscan = validateOverscan(props.overscan ?? 3);\n const items = props.each;\n return {\n itemHeight,\n gap,\n items,\n ...computeWindow(items.length, itemHeight, gap, overscan, scrollTop(), viewportHeight()),\n };\n });\n props.controller?.({\n scrollToIndex(index, options) {\n if (!Number.isFinite(index)) {\n throw new RangeError(\"VirtualList scrollToIndex index must be a finite number\");\n }\n const { items, itemHeight, gap } = metrics();\n if (items.length === 0)\n return;\n const clamped = Math.max(0, Math.min(items.length - 1, Math.trunc(index)));\n const targetTop = computeTargetScrollTop(clamped, items.length, itemHeight, gap, scrollTop(), viewportHeight(), options?.align ?? \"auto\");\n if (targetTop === null)\n return;\n const behavior = options?.behavior ?? \"instant\";\n if (behavior === \"instant\" || getReducedMotion())\n setScrollTop(targetTop);\n scrollTo(scroller, { top: targetTop, behavior });\n },\n });\n const visibleItems = createMemo(() => {\n const { items, start, end } = metrics();\n return items.slice(start, end);\n });\n const content = createElement(\"column\");\n setProp(content, \"style\", { width: \"100%\" });\n const topBox = spacer(() => metrics().topSpacer);\n const bottomBox = spacer(() => metrics().bottomSpacer);\n const body = createElement(\"column\");\n spread(body, {\n get style() {\n const gap = metrics().gap;\n return gap > 0 ? { width: \"100%\", gap: `${gap}px` } : { width: \"100%\" };\n },\n }, true);\n slot(body, () => metrics().items.length === 0\n ? (props.fallback ?? null)\n : renderMappedItems(visibleItems, () => metrics().start, props.keyed, props.children));\n append(content, topBox);\n append(content, body);\n append(content, bottomBox);\n append(scroller, content);\n return scroller;\n}\nexport function VirtualGrid(props) {\n const rest = omit(props, \"each\", \"itemHeight\", \"columns\", \"minColumnWidth\", \"gap\", \"overscan\", \"initialWidth\", \"initialHeight\", \"controller\", \"keyed\", \"fallback\", \"children\");\n const scroller = createElement(\"scroll\");\n spread(scroller, mergeProps(rest, withDefaults({ role: \"grid\" }, rest)), true);\n const [scrollTop, setScrollTop] = createSignal(0);\n const [viewportWidth, setViewportWidth] = createSignal(validatePositive(props.initialWidth ?? 640, \"VirtualGrid initialWidth\"));\n const [viewportHeight, setViewportHeight] = createSignal(validatePositive(props.initialHeight ?? 480, \"VirtualGrid initialHeight\"));\n observeGeometry(scroller, \"scrollPosition\", pos => {\n const nextTop = Math.max(0, pos.offset.y);\n if (nextTop !== scrollTop())\n setScrollTop(nextTop);\n if (pos.scrollport.width > 0 && pos.scrollport.width !== viewportWidth()) {\n setViewportWidth(pos.scrollport.width);\n }\n if (pos.scrollport.height > 0 && pos.scrollport.height !== viewportHeight()) {\n setViewportHeight(pos.scrollport.height);\n }\n });\n const metrics = createMemo(() => {\n const itemHeight = validatePositive(props.itemHeight, \"VirtualGrid itemHeight\");\n const gap = validateNonNegative(props.gap ?? 0, \"VirtualGrid gap\");\n const overscan = validateOverscan(props.overscan ?? 2);\n let cols;\n if (props.columns !== undefined) {\n if (!Number.isInteger(props.columns) || props.columns < 1) {\n throw new RangeError(\"VirtualGrid columns must be a positive integer\");\n }\n cols = props.columns;\n }\n else {\n const minWidth = validatePositive(props.minColumnWidth ?? 140, \"VirtualGrid minColumnWidth\");\n cols = Math.max(1, Math.floor((viewportWidth() + gap) / (minWidth + gap)));\n }\n const items = props.each;\n const totalRows = Math.ceil(items.length / cols);\n return {\n itemHeight,\n gap,\n cols,\n totalRows,\n items,\n ...computeWindow(totalRows, itemHeight, gap, overscan, scrollTop(), viewportHeight()),\n };\n });\n props.controller?.({\n scrollToIndex(index, options) {\n if (!Number.isFinite(index)) {\n throw new RangeError(\"VirtualGrid scrollToIndex index must be a finite number\");\n }\n const { items, itemHeight, gap, cols, totalRows } = metrics();\n if (items.length === 0)\n return;\n const clamped = Math.max(0, Math.min(items.length - 1, Math.trunc(index)));\n const rowIndex = Math.floor(clamped / cols);\n const targetTop = computeTargetScrollTop(rowIndex, totalRows, itemHeight, gap, scrollTop(), viewportHeight(), options?.align ?? \"auto\");\n if (targetTop === null)\n return;\n const behavior = options?.behavior ?? \"instant\";\n if (behavior === \"instant\" || getReducedMotion())\n setScrollTop(targetTop);\n scrollTo(scroller, { top: targetTop, behavior });\n },\n });\n const visibleRows = createMemo(() => {\n const { items, cols, start, end } = metrics();\n const rows = [];\n for (let rowIndex = start; rowIndex < end; rowIndex += 1) {\n const rowStart = rowIndex * cols;\n const rowEnd = Math.min(items.length, rowStart + cols);\n rows.push({ rowIndex, rowStart, items: items.slice(rowStart, rowEnd) });\n }\n return rows;\n });\n const content = createElement(\"column\");\n setProp(content, \"style\", { width: \"100%\" });\n const topBox = spacer(() => metrics().topSpacer);\n const bottomBox = spacer(() => metrics().bottomSpacer);\n const body = createElement(\"column\");\n spread(body, {\n get style() {\n const gap = metrics().gap;\n return gap > 0 ? { width: \"100%\", gap: `${gap}px` } : { width: \"100%\" };\n },\n }, true);\n slot(body, () => metrics().items.length === 0\n ? (props.fallback ?? null)\n : For({\n get each() {\n return visibleRows();\n },\n keyed: row => row.rowIndex,\n children: row => {\n const rowNode = createElement(\"row\");\n spread(rowNode, {\n get style() {\n const { gap, itemHeight } = metrics();\n return {\n width: \"100%\",\n height: `${itemHeight}px`,\n flexShrink: 0,\n ...(gap > 0 ? { gap: `${gap}px` } : {}),\n };\n },\n }, true);\n slot(rowNode, () => renderMappedItems(() => row().items, () => row().rowStart, props.keyed, props.children));\n return rowNode;\n },\n }));\n append(content, topBox);\n append(content, body);\n append(content, bottomBox);\n append(scroller, content);\n return scroller;\n}\n","export const upstreamRevision = \"ee29c7dc66206eb04ba7bcf514058a278c9070ba\";\nexport const themes = { \"base\": { \"dark\": \"--zui-scale-neutral-1: #111113; --zui-scale-neutral-2: #18191b; --zui-scale-neutral-3: #212225; --zui-scale-neutral-4: #272a2d; --zui-scale-neutral-5: #2e3135; --zui-scale-neutral-6: #363a3f; --zui-scale-neutral-7: #43484e; --zui-scale-neutral-8: #5a6169; --zui-scale-neutral-9: #696e77; --zui-scale-neutral-10: #777b84; --zui-scale-neutral-11: #b0b4ba; --zui-scale-neutral-12: #edeef0; --zui-scale-accent-1: #0d1520; --zui-scale-accent-2: #111927; --zui-scale-accent-3: #0d2847; --zui-scale-accent-4: #003362; --zui-scale-accent-5: #004074; --zui-scale-accent-6: #104d87; --zui-scale-accent-7: #205d9e; --zui-scale-accent-8: #2870bd; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #3b9eff; --zui-scale-accent-11: #70b8ff; --zui-scale-accent-12: #c2e6ff; --zui-color-background: oklch(0.145 0 0); --zui-color-foreground: oklch(0.985 0 0); --zui-color-card: oklch(0.205 0 0); --zui-color-card-foreground: oklch(0.985 0 0); --zui-color-popover: oklch(0.205 0 0); --zui-color-popover-foreground: oklch(0.985 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.922 0 0); --zui-color-primary-foreground: oklch(0.205 0 0); --zui-color-secondary: oklch(0.269 0 0); --zui-color-secondary-foreground: oklch(0.985 0 0); --zui-color-muted: oklch(0.269 0 0); --zui-color-muted-foreground: oklch(0.708 0 0); --zui-color-accent: oklch(0.269 0 0); --zui-color-accent-foreground: oklch(0.985 0 0); --zui-color-destructive: oklch(0.704 0.191 22.216); --zui-color-destructive-foreground: oklch(0.58 0.22 27); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.723 0.219 149.579); --zui-color-success-foreground: oklch(0.266 0.065 152.934); --zui-color-warning: oklch(0.828 0.189 84.429); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.707 0.165 254.624); --zui-color-info-foreground: oklch(0.282 0.091 267.935); --zui-color-border: oklch(1 0 0 / 10%); --zui-color-input: oklch(1 0 0 / 15%); --zui-color-ring: oklch(0.556 0 0); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.205 0 0); --zui-color-sidebar-foreground: oklch(0.985 0 0); --zui-color-sidebar-primary: oklch(0.488 0.243 264.376); --zui-color-sidebar-primary-foreground: oklch(0.985 0 0); --zui-color-sidebar-accent: oklch(0.269 0 0); --zui-color-sidebar-accent-foreground: oklch(0.985 0 0); --zui-color-sidebar-border: oklch(1 0 0 / 10%); --zui-color-sidebar-ring: oklch(0.556 0 0); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 40%, transparent); --zui-color-control-destructive-fill: color-mix(in oklab, var(--zui-color-destructive) 60%, transparent); --zui-color-control-ghost-hover: color-mix(in oklab, var(--zui-color-accent) 50%, transparent); --zui-color-control-outline-border: var(--zui-color-input); --zui-color-control-outline-hover: color-mix(in oklab, var(--zui-color-input) 50%, transparent); --zui-color-control-switch-off: color-mix(in oklab, var(--zui-color-input) 80%, transparent); --zui-color-control-switch-thumb: var(--zui-color-foreground); --zui-color-control-switch-thumb-on: var(--zui-color-primary-foreground); --zui-color-control-tab-ink: var(--zui-color-muted-foreground); --zui-color-control-tab-fill: color-mix(in oklab, var(--zui-color-input) 30%, transparent); --zui-color-control-tab-border: var(--zui-color-input); --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 10px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 100ms; --zui-motion-duration-normal: 150ms; --zui-motion-duration-slow: 200ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.4, 0, 0.2, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\", \"light\": \"--zui-scale-neutral-1: #fcfcfd; --zui-scale-neutral-2: #f9f9fb; --zui-scale-neutral-3: #f0f0f3; --zui-scale-neutral-4: #e8e8ec; --zui-scale-neutral-5: #e0e1e6; --zui-scale-neutral-6: #d9d9e0; --zui-scale-neutral-7: #cdced6; --zui-scale-neutral-8: #b9bbc6; --zui-scale-neutral-9: #8b8d98; --zui-scale-neutral-10: #80838d; --zui-scale-neutral-11: #60646c; --zui-scale-neutral-12: #1c2024; --zui-scale-accent-1: #fbfdff; --zui-scale-accent-2: #f4faff; --zui-scale-accent-3: #e6f4fe; --zui-scale-accent-4: #d5efff; --zui-scale-accent-5: #c2e5ff; --zui-scale-accent-6: #acd8fc; --zui-scale-accent-7: #8ec8f6; --zui-scale-accent-8: #5eb1ef; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #0588f0; --zui-scale-accent-11: #0d74ce; --zui-scale-accent-12: #113264; --zui-color-background: oklch(1 0 0); --zui-color-foreground: oklch(0.145 0 0); --zui-color-card: oklch(1 0 0); --zui-color-card-foreground: oklch(0.145 0 0); --zui-color-popover: oklch(1 0 0); --zui-color-popover-foreground: oklch(0.145 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.205 0 0); --zui-color-primary-foreground: oklch(0.985 0 0); --zui-color-secondary: oklch(0.97 0 0); --zui-color-secondary-foreground: oklch(0.205 0 0); --zui-color-muted: oklch(0.97 0 0); --zui-color-muted-foreground: oklch(0.556 0 0); --zui-color-accent: oklch(0.97 0 0); --zui-color-accent-foreground: oklch(0.205 0 0); --zui-color-destructive: oklch(0.577 0.245 27.325); --zui-color-destructive-foreground: oklch(0.97 0.01 17); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.627 0.194 149.214); --zui-color-success-foreground: oklch(0.982 0.018 155.826); --zui-color-warning: oklch(0.769 0.188 70.08); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.546 0.245 262.881); --zui-color-info-foreground: oklch(0.97 0.014 254.604); --zui-color-border: oklch(0.922 0 0); --zui-color-input: oklch(0.922 0 0); --zui-color-ring: oklch(0.708 0 0); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.985 0 0); --zui-color-sidebar-foreground: oklch(0.145 0 0); --zui-color-sidebar-primary: oklch(0.205 0 0); --zui-color-sidebar-primary-foreground: oklch(0.985 0 0); --zui-color-sidebar-accent: oklch(0.97 0 0); --zui-color-sidebar-accent-foreground: oklch(0.205 0 0); --zui-color-sidebar-border: oklch(0.922 0 0); --zui-color-sidebar-ring: oklch(0.708 0 0); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 20%, transparent); --zui-color-control-destructive-fill: var(--zui-color-destructive); --zui-color-control-ghost-hover: var(--zui-color-accent); --zui-color-control-outline-border: var(--zui-color-border); --zui-color-control-outline-hover: var(--zui-color-accent); --zui-color-control-switch-off: var(--zui-color-input); --zui-color-control-switch-thumb: var(--zui-color-background); --zui-color-control-switch-thumb-on: var(--zui-color-background); --zui-color-control-tab-ink: color-mix(in oklab, var(--zui-color-foreground) 60%, transparent); --zui-color-control-tab-fill: var(--zui-color-background); --zui-color-control-tab-border: transparent; --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 10px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 100ms; --zui-motion-duration-normal: 150ms; --zui-motion-duration-slow: 200ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.4, 0, 0.2, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\" }, \"ember\": { \"dark\": \"--zui-scale-neutral-1: #111113; --zui-scale-neutral-2: #18191b; --zui-scale-neutral-3: #212225; --zui-scale-neutral-4: #272a2d; --zui-scale-neutral-5: #2e3135; --zui-scale-neutral-6: #363a3f; --zui-scale-neutral-7: #43484e; --zui-scale-neutral-8: #5a6169; --zui-scale-neutral-9: #696e77; --zui-scale-neutral-10: #777b84; --zui-scale-neutral-11: #b0b4ba; --zui-scale-neutral-12: #edeef0; --zui-scale-accent-1: #0d1520; --zui-scale-accent-2: #111927; --zui-scale-accent-3: #0d2847; --zui-scale-accent-4: #003362; --zui-scale-accent-5: #004074; --zui-scale-accent-6: #104d87; --zui-scale-accent-7: #205d9e; --zui-scale-accent-8: #2870bd; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #3b9eff; --zui-scale-accent-11: #70b8ff; --zui-scale-accent-12: #c2e6ff; --zui-color-background: oklch(0.16 0.015 50); --zui-color-foreground: oklch(0.985 0 0); --zui-color-card: oklch(0.21 0.02 50); --zui-color-card-foreground: oklch(0.985 0 0); --zui-color-popover: oklch(0.21 0.02 50); --zui-color-popover-foreground: oklch(0.985 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.70 0.18 45); --zui-color-primary-foreground: oklch(0.18 0.04 45); --zui-color-secondary: oklch(0.32 0.06 45); --zui-color-secondary-foreground: oklch(0.93 0.04 60); --zui-color-muted: oklch(0.27 0.03 50); --zui-color-muted-foreground: oklch(0.76 0.04 60); --zui-color-accent: oklch(0.32 0.06 45); --zui-color-accent-foreground: oklch(0.93 0.04 60); --zui-color-destructive: oklch(0.704 0.191 22.216); --zui-color-destructive-foreground: oklch(0.58 0.22 27); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.723 0.219 149.579); --zui-color-success-foreground: oklch(0.266 0.065 152.934); --zui-color-warning: oklch(0.828 0.189 84.429); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.707 0.165 254.624); --zui-color-info-foreground: oklch(0.282 0.091 267.935); --zui-color-border: oklch(1 0 0 / 12%); --zui-color-input: oklch(1 0 0 / 12%); --zui-color-ring: oklch(0.62 0.16 45); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.21 0.02 50); --zui-color-sidebar-foreground: oklch(0.985 0 0); --zui-color-sidebar-primary: oklch(0.70 0.18 45); --zui-color-sidebar-primary-foreground: oklch(0.18 0.04 45); --zui-color-sidebar-accent: oklch(0.32 0.06 45); --zui-color-sidebar-accent-foreground: oklch(0.93 0.04 60); --zui-color-sidebar-border: oklch(1 0 0 / 12%); --zui-color-sidebar-ring: oklch(0.62 0.16 45); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 40%, transparent); --zui-color-control-destructive-fill: color-mix(in oklab, var(--zui-color-destructive) 60%, transparent); --zui-color-control-ghost-hover: color-mix(in oklab, var(--zui-color-accent) 50%, transparent); --zui-color-control-outline-border: var(--zui-color-input); --zui-color-control-outline-hover: color-mix(in oklab, var(--zui-color-input) 50%, transparent); --zui-color-control-switch-off: color-mix(in oklab, var(--zui-color-input) 80%, transparent); --zui-color-control-switch-thumb: var(--zui-color-foreground); --zui-color-control-switch-thumb-on: var(--zui-color-primary-foreground); --zui-color-control-tab-ink: var(--zui-color-muted-foreground); --zui-color-control-tab-fill: color-mix(in oklab, var(--zui-color-input) 30%, transparent); --zui-color-control-tab-border: var(--zui-color-input); --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 4px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 60ms; --zui-motion-duration-normal: 90ms; --zui-motion-duration-slow: 130ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.2, 0, 0, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\", \"light\": \"--zui-scale-neutral-1: #fcfcfd; --zui-scale-neutral-2: #f9f9fb; --zui-scale-neutral-3: #f0f0f3; --zui-scale-neutral-4: #e8e8ec; --zui-scale-neutral-5: #e0e1e6; --zui-scale-neutral-6: #d9d9e0; --zui-scale-neutral-7: #cdced6; --zui-scale-neutral-8: #b9bbc6; --zui-scale-neutral-9: #8b8d98; --zui-scale-neutral-10: #80838d; --zui-scale-neutral-11: #60646c; --zui-scale-neutral-12: #1c2024; --zui-scale-accent-1: #fbfdff; --zui-scale-accent-2: #f4faff; --zui-scale-accent-3: #e6f4fe; --zui-scale-accent-4: #d5efff; --zui-scale-accent-5: #c2e5ff; --zui-scale-accent-6: #acd8fc; --zui-scale-accent-7: #8ec8f6; --zui-scale-accent-8: #5eb1ef; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #0588f0; --zui-scale-accent-11: #0d74ce; --zui-scale-accent-12: #113264; --zui-color-background: oklch(0.99 0.008 70); --zui-color-foreground: oklch(0.145 0 0); --zui-color-card: oklch(1 0 0); --zui-color-card-foreground: oklch(0.145 0 0); --zui-color-popover: oklch(1 0 0); --zui-color-popover-foreground: oklch(0.145 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.62 0.19 42); --zui-color-primary-foreground: oklch(0.99 0.01 42); --zui-color-secondary: oklch(0.95 0.04 60); --zui-color-secondary-foreground: oklch(0.42 0.14 42); --zui-color-muted: oklch(0.96 0.02 60); --zui-color-muted-foreground: oklch(0.52 0.05 50); --zui-color-accent: oklch(0.95 0.04 60); --zui-color-accent-foreground: oklch(0.42 0.14 42); --zui-color-destructive: oklch(0.577 0.245 27.325); --zui-color-destructive-foreground: oklch(0.97 0.01 17); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.627 0.194 149.214); --zui-color-success-foreground: oklch(0.982 0.018 155.826); --zui-color-warning: oklch(0.769 0.188 70.08); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.546 0.245 262.881); --zui-color-info-foreground: oklch(0.97 0.014 254.604); --zui-color-border: oklch(0.90 0.025 60); --zui-color-input: oklch(0.90 0.025 60); --zui-color-ring: oklch(0.68 0.17 42); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(1 0 0); --zui-color-sidebar-foreground: oklch(0.145 0 0); --zui-color-sidebar-primary: oklch(0.62 0.19 42); --zui-color-sidebar-primary-foreground: oklch(0.99 0.01 42); --zui-color-sidebar-accent: oklch(0.95 0.04 60); --zui-color-sidebar-accent-foreground: oklch(0.42 0.14 42); --zui-color-sidebar-border: oklch(0.90 0.025 60); --zui-color-sidebar-ring: oklch(0.68 0.17 42); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 20%, transparent); --zui-color-control-destructive-fill: var(--zui-color-destructive); --zui-color-control-ghost-hover: var(--zui-color-accent); --zui-color-control-outline-border: var(--zui-color-border); --zui-color-control-outline-hover: var(--zui-color-accent); --zui-color-control-switch-off: var(--zui-color-input); --zui-color-control-switch-thumb: var(--zui-color-background); --zui-color-control-switch-thumb-on: var(--zui-color-background); --zui-color-control-tab-ink: color-mix(in oklab, var(--zui-color-foreground) 60%, transparent); --zui-color-control-tab-fill: var(--zui-color-background); --zui-color-control-tab-border: transparent; --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 4px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 60ms; --zui-motion-duration-normal: 90ms; --zui-motion-duration-slow: 130ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.2, 0, 0, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\" }, \"midnight\": { \"dark\": \"--zui-scale-neutral-1: #111113; --zui-scale-neutral-2: #18191b; --zui-scale-neutral-3: #212225; --zui-scale-neutral-4: #272a2d; --zui-scale-neutral-5: #2e3135; --zui-scale-neutral-6: #363a3f; --zui-scale-neutral-7: #43484e; --zui-scale-neutral-8: #5a6169; --zui-scale-neutral-9: #696e77; --zui-scale-neutral-10: #777b84; --zui-scale-neutral-11: #b0b4ba; --zui-scale-neutral-12: #edeef0; --zui-scale-accent-1: #0d1520; --zui-scale-accent-2: #111927; --zui-scale-accent-3: #0d2847; --zui-scale-accent-4: #003362; --zui-scale-accent-5: #004074; --zui-scale-accent-6: #104d87; --zui-scale-accent-7: #205d9e; --zui-scale-accent-8: #2870bd; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #3b9eff; --zui-scale-accent-11: #70b8ff; --zui-scale-accent-12: #c2e6ff; --zui-color-background: oklch(0.15 0.025 295); --zui-color-foreground: oklch(0.985 0 0); --zui-color-card: oklch(0.20 0.03 295); --zui-color-card-foreground: oklch(0.985 0 0); --zui-color-popover: oklch(0.20 0.03 295); --zui-color-popover-foreground: oklch(0.985 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.70 0.17 295); --zui-color-primary-foreground: oklch(0.17 0.04 295); --zui-color-secondary: oklch(0.31 0.06 295); --zui-color-secondary-foreground: oklch(0.93 0.04 295); --zui-color-muted: oklch(0.26 0.04 295); --zui-color-muted-foreground: oklch(0.77 0.04 295); --zui-color-accent: oklch(0.31 0.06 295); --zui-color-accent-foreground: oklch(0.93 0.04 295); --zui-color-destructive: oklch(0.704 0.191 22.216); --zui-color-destructive-foreground: oklch(0.58 0.22 27); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.723 0.219 149.579); --zui-color-success-foreground: oklch(0.266 0.065 152.934); --zui-color-warning: oklch(0.828 0.189 84.429); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.707 0.165 254.624); --zui-color-info-foreground: oklch(0.282 0.091 267.935); --zui-color-border: oklch(1 0 0 / 12%); --zui-color-input: oklch(1 0 0 / 12%); --zui-color-ring: oklch(0.60 0.15 295); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.20 0.03 295); --zui-color-sidebar-foreground: oklch(0.985 0 0); --zui-color-sidebar-primary: oklch(0.70 0.17 295); --zui-color-sidebar-primary-foreground: oklch(0.17 0.04 295); --zui-color-sidebar-accent: oklch(0.31 0.06 295); --zui-color-sidebar-accent-foreground: oklch(0.93 0.04 295); --zui-color-sidebar-border: oklch(1 0 0 / 12%); --zui-color-sidebar-ring: oklch(0.60 0.15 295); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 40%, transparent); --zui-color-control-destructive-fill: color-mix(in oklab, var(--zui-color-destructive) 60%, transparent); --zui-color-control-ghost-hover: color-mix(in oklab, var(--zui-color-accent) 50%, transparent); --zui-color-control-outline-border: var(--zui-color-input); --zui-color-control-outline-hover: color-mix(in oklab, var(--zui-color-input) 50%, transparent); --zui-color-control-switch-off: color-mix(in oklab, var(--zui-color-input) 80%, transparent); --zui-color-control-switch-thumb: var(--zui-color-foreground); --zui-color-control-switch-thumb-on: var(--zui-color-primary-foreground); --zui-color-control-tab-ink: var(--zui-color-muted-foreground); --zui-color-control-tab-fill: color-mix(in oklab, var(--zui-color-input) 30%, transparent); --zui-color-control-tab-border: var(--zui-color-input); --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 20px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 140ms; --zui-motion-duration-normal: 240ms; --zui-motion-duration-slow: 340ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.16, 1, 0.3, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\", \"light\": \"--zui-scale-neutral-1: #fcfcfd; --zui-scale-neutral-2: #f9f9fb; --zui-scale-neutral-3: #f0f0f3; --zui-scale-neutral-4: #e8e8ec; --zui-scale-neutral-5: #e0e1e6; --zui-scale-neutral-6: #d9d9e0; --zui-scale-neutral-7: #cdced6; --zui-scale-neutral-8: #b9bbc6; --zui-scale-neutral-9: #8b8d98; --zui-scale-neutral-10: #80838d; --zui-scale-neutral-11: #60646c; --zui-scale-neutral-12: #1c2024; --zui-scale-accent-1: #fbfdff; --zui-scale-accent-2: #f4faff; --zui-scale-accent-3: #e6f4fe; --zui-scale-accent-4: #d5efff; --zui-scale-accent-5: #c2e5ff; --zui-scale-accent-6: #acd8fc; --zui-scale-accent-7: #8ec8f6; --zui-scale-accent-8: #5eb1ef; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #0588f0; --zui-scale-accent-11: #0d74ce; --zui-scale-accent-12: #113264; --zui-color-background: oklch(0.99 0.006 295); --zui-color-foreground: oklch(0.145 0 0); --zui-color-card: oklch(1 0 0); --zui-color-card-foreground: oklch(0.145 0 0); --zui-color-popover: oklch(1 0 0); --zui-color-popover-foreground: oklch(0.145 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.52 0.20 295); --zui-color-primary-foreground: oklch(0.99 0.01 295); --zui-color-secondary: oklch(0.95 0.035 295); --zui-color-secondary-foreground: oklch(0.40 0.15 295); --zui-color-muted: oklch(0.96 0.018 295); --zui-color-muted-foreground: oklch(0.52 0.05 295); --zui-color-accent: oklch(0.95 0.035 295); --zui-color-accent-foreground: oklch(0.40 0.15 295); --zui-color-destructive: oklch(0.577 0.245 27.325); --zui-color-destructive-foreground: oklch(0.97 0.01 17); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.627 0.194 149.214); --zui-color-success-foreground: oklch(0.982 0.018 155.826); --zui-color-warning: oklch(0.769 0.188 70.08); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.546 0.245 262.881); --zui-color-info-foreground: oklch(0.97 0.014 254.604); --zui-color-border: oklch(0.91 0.02 295); --zui-color-input: oklch(0.91 0.02 295); --zui-color-ring: oklch(0.60 0.17 295); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(1 0 0); --zui-color-sidebar-foreground: oklch(0.145 0 0); --zui-color-sidebar-primary: oklch(0.52 0.20 295); --zui-color-sidebar-primary-foreground: oklch(0.99 0.01 295); --zui-color-sidebar-accent: oklch(0.95 0.035 295); --zui-color-sidebar-accent-foreground: oklch(0.40 0.15 295); --zui-color-sidebar-border: oklch(0.91 0.02 295); --zui-color-sidebar-ring: oklch(0.60 0.17 295); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 20%, transparent); --zui-color-control-destructive-fill: var(--zui-color-destructive); --zui-color-control-ghost-hover: var(--zui-color-accent); --zui-color-control-outline-border: var(--zui-color-border); --zui-color-control-outline-hover: var(--zui-color-accent); --zui-color-control-switch-off: var(--zui-color-input); --zui-color-control-switch-thumb: var(--zui-color-background); --zui-color-control-switch-thumb-on: var(--zui-color-background); --zui-color-control-tab-ink: color-mix(in oklab, var(--zui-color-foreground) 60%, transparent); --zui-color-control-tab-fill: var(--zui-color-background); --zui-color-control-tab-border: transparent; --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 20px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 140ms; --zui-motion-duration-normal: 240ms; --zui-motion-duration-slow: 340ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.16, 1, 0.3, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\" }, \"ocean\": { \"dark\": \"--zui-scale-neutral-1: #111113; --zui-scale-neutral-2: #18191b; --zui-scale-neutral-3: #212225; --zui-scale-neutral-4: #272a2d; --zui-scale-neutral-5: #2e3135; --zui-scale-neutral-6: #363a3f; --zui-scale-neutral-7: #43484e; --zui-scale-neutral-8: #5a6169; --zui-scale-neutral-9: #696e77; --zui-scale-neutral-10: #777b84; --zui-scale-neutral-11: #b0b4ba; --zui-scale-neutral-12: #edeef0; --zui-scale-accent-1: #0d1520; --zui-scale-accent-2: #111927; --zui-scale-accent-3: #0d2847; --zui-scale-accent-4: #003362; --zui-scale-accent-5: #004074; --zui-scale-accent-6: #104d87; --zui-scale-accent-7: #205d9e; --zui-scale-accent-8: #2870bd; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #3b9eff; --zui-scale-accent-11: #70b8ff; --zui-scale-accent-12: #c2e6ff; --zui-color-background: oklch(0.17 0.02 245); --zui-color-foreground: oklch(0.985 0 0); --zui-color-card: oklch(0.22 0.025 245); --zui-color-card-foreground: oklch(0.985 0 0); --zui-color-popover: oklch(0.22 0.025 245); --zui-color-popover-foreground: oklch(0.985 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.68 0.15 245); --zui-color-primary-foreground: oklch(0.16 0.03 245); --zui-color-secondary: oklch(0.30 0.05 245); --zui-color-secondary-foreground: oklch(0.93 0.03 245); --zui-color-muted: oklch(0.28 0.03 245); --zui-color-muted-foreground: oklch(0.75 0.03 245); --zui-color-accent: oklch(0.30 0.05 245); --zui-color-accent-foreground: oklch(0.93 0.03 245); --zui-color-destructive: oklch(0.704 0.191 22.216); --zui-color-destructive-foreground: oklch(0.58 0.22 27); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.723 0.219 149.579); --zui-color-success-foreground: oklch(0.266 0.065 152.934); --zui-color-warning: oklch(0.828 0.189 84.429); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.707 0.165 254.624); --zui-color-info-foreground: oklch(0.282 0.091 267.935); --zui-color-border: oklch(1 0 0 / 12%); --zui-color-input: oklch(1 0 0 / 12%); --zui-color-ring: oklch(0.58 0.12 245); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.22 0.025 245); --zui-color-sidebar-foreground: oklch(0.985 0 0); --zui-color-sidebar-primary: oklch(0.68 0.15 245); --zui-color-sidebar-primary-foreground: oklch(0.16 0.03 245); --zui-color-sidebar-accent: oklch(0.30 0.05 245); --zui-color-sidebar-accent-foreground: oklch(0.93 0.03 245); --zui-color-sidebar-border: oklch(1 0 0 / 12%); --zui-color-sidebar-ring: oklch(0.58 0.12 245); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 40%, transparent); --zui-color-control-destructive-fill: color-mix(in oklab, var(--zui-color-destructive) 60%, transparent); --zui-color-control-ghost-hover: color-mix(in oklab, var(--zui-color-accent) 50%, transparent); --zui-color-control-outline-border: var(--zui-color-input); --zui-color-control-outline-hover: color-mix(in oklab, var(--zui-color-input) 50%, transparent); --zui-color-control-switch-off: color-mix(in oklab, var(--zui-color-input) 80%, transparent); --zui-color-control-switch-thumb: var(--zui-color-foreground); --zui-color-control-switch-thumb-on: var(--zui-color-primary-foreground); --zui-color-control-tab-ink: var(--zui-color-muted-foreground); --zui-color-control-tab-fill: color-mix(in oklab, var(--zui-color-input) 30%, transparent); --zui-color-control-tab-border: var(--zui-color-input); --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 14px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 120ms; --zui-motion-duration-normal: 200ms; --zui-motion-duration-slow: 280ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.33, 1, 0.68, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\", \"light\": \"--zui-scale-neutral-1: #fcfcfd; --zui-scale-neutral-2: #f9f9fb; --zui-scale-neutral-3: #f0f0f3; --zui-scale-neutral-4: #e8e8ec; --zui-scale-neutral-5: #e0e1e6; --zui-scale-neutral-6: #d9d9e0; --zui-scale-neutral-7: #cdced6; --zui-scale-neutral-8: #b9bbc6; --zui-scale-neutral-9: #8b8d98; --zui-scale-neutral-10: #80838d; --zui-scale-neutral-11: #60646c; --zui-scale-neutral-12: #1c2024; --zui-scale-accent-1: #fbfdff; --zui-scale-accent-2: #f4faff; --zui-scale-accent-3: #e6f4fe; --zui-scale-accent-4: #d5efff; --zui-scale-accent-5: #c2e5ff; --zui-scale-accent-6: #acd8fc; --zui-scale-accent-7: #8ec8f6; --zui-scale-accent-8: #5eb1ef; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #0588f0; --zui-scale-accent-11: #0d74ce; --zui-scale-accent-12: #113264; --zui-color-background: oklch(0.99 0.005 245); --zui-color-foreground: oklch(0.145 0 0); --zui-color-card: oklch(1 0 0); --zui-color-card-foreground: oklch(0.145 0 0); --zui-color-popover: oklch(1 0 0); --zui-color-popover-foreground: oklch(0.145 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.55 0.16 245); --zui-color-primary-foreground: oklch(0.99 0.01 245); --zui-color-secondary: oklch(0.95 0.03 245); --zui-color-secondary-foreground: oklch(0.38 0.12 245); --zui-color-muted: oklch(0.96 0.015 245); --zui-color-muted-foreground: oklch(0.52 0.04 245); --zui-color-accent: oklch(0.95 0.03 245); --zui-color-accent-foreground: oklch(0.38 0.12 245); --zui-color-destructive: oklch(0.577 0.245 27.325); --zui-color-destructive-foreground: oklch(0.97 0.01 17); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.627 0.194 149.214); --zui-color-success-foreground: oklch(0.982 0.018 155.826); --zui-color-warning: oklch(0.769 0.188 70.08); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.546 0.245 262.881); --zui-color-info-foreground: oklch(0.97 0.014 254.604); --zui-color-border: oklch(0.90 0.02 245); --zui-color-input: oklch(0.90 0.02 245); --zui-color-ring: oklch(0.62 0.14 245); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(1 0 0); --zui-color-sidebar-foreground: oklch(0.145 0 0); --zui-color-sidebar-primary: oklch(0.55 0.16 245); --zui-color-sidebar-primary-foreground: oklch(0.99 0.01 245); --zui-color-sidebar-accent: oklch(0.95 0.03 245); --zui-color-sidebar-accent-foreground: oklch(0.38 0.12 245); --zui-color-sidebar-border: oklch(0.90 0.02 245); --zui-color-sidebar-ring: oklch(0.62 0.14 245); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 20%, transparent); --zui-color-control-destructive-fill: var(--zui-color-destructive); --zui-color-control-ghost-hover: var(--zui-color-accent); --zui-color-control-outline-border: var(--zui-color-border); --zui-color-control-outline-hover: var(--zui-color-accent); --zui-color-control-switch-off: var(--zui-color-input); --zui-color-control-switch-thumb: var(--zui-color-background); --zui-color-control-switch-thumb-on: var(--zui-color-background); --zui-color-control-tab-ink: color-mix(in oklab, var(--zui-color-foreground) 60%, transparent); --zui-color-control-tab-fill: var(--zui-color-background); --zui-color-control-tab-border: transparent; --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 14px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 120ms; --zui-motion-duration-normal: 200ms; --zui-motion-duration-slow: 280ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: cubic-bezier(0.33, 1, 0.68, 1); --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\" }, \"terminal\": { \"dark\": \"--zui-scale-neutral-1: #111113; --zui-scale-neutral-2: #18191b; --zui-scale-neutral-3: #212225; --zui-scale-neutral-4: #272a2d; --zui-scale-neutral-5: #2e3135; --zui-scale-neutral-6: #363a3f; --zui-scale-neutral-7: #43484e; --zui-scale-neutral-8: #5a6169; --zui-scale-neutral-9: #696e77; --zui-scale-neutral-10: #777b84; --zui-scale-neutral-11: #b0b4ba; --zui-scale-neutral-12: #edeef0; --zui-scale-accent-1: #0d1520; --zui-scale-accent-2: #111927; --zui-scale-accent-3: #0d2847; --zui-scale-accent-4: #003362; --zui-scale-accent-5: #004074; --zui-scale-accent-6: #104d87; --zui-scale-accent-7: #205d9e; --zui-scale-accent-8: #2870bd; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #3b9eff; --zui-scale-accent-11: #70b8ff; --zui-scale-accent-12: #c2e6ff; --zui-color-background: oklch(0.15 0.015 150); --zui-color-foreground: oklch(0.985 0 0); --zui-color-card: oklch(0.19 0.02 150); --zui-color-card-foreground: oklch(0.985 0 0); --zui-color-popover: oklch(0.19 0.02 150); --zui-color-popover-foreground: oklch(0.985 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.72 0.17 150); --zui-color-primary-foreground: oklch(0.16 0.03 150); --zui-color-secondary: oklch(0.28 0.05 150); --zui-color-secondary-foreground: oklch(0.90 0.10 150); --zui-color-muted: oklch(0.24 0.03 150); --zui-color-muted-foreground: oklch(0.74 0.06 150); --zui-color-accent: oklch(0.28 0.05 150); --zui-color-accent-foreground: oklch(0.90 0.10 150); --zui-color-destructive: oklch(0.704 0.191 22.216); --zui-color-destructive-foreground: oklch(0.58 0.22 27); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.723 0.219 149.579); --zui-color-success-foreground: oklch(0.266 0.065 152.934); --zui-color-warning: oklch(0.828 0.189 84.429); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.707 0.165 254.624); --zui-color-info-foreground: oklch(0.282 0.091 267.935); --zui-color-border: oklch(0.72 0.17 150 / 25%); --zui-color-input: oklch(0.72 0.17 150 / 25%); --zui-color-ring: oklch(0.60 0.14 150); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(0.19 0.02 150); --zui-color-sidebar-foreground: oklch(0.985 0 0); --zui-color-sidebar-primary: oklch(0.72 0.17 150); --zui-color-sidebar-primary-foreground: oklch(0.16 0.03 150); --zui-color-sidebar-accent: oklch(0.28 0.05 150); --zui-color-sidebar-accent-foreground: oklch(0.90 0.10 150); --zui-color-sidebar-border: oklch(0.72 0.17 150 / 25%); --zui-color-sidebar-ring: oklch(0.60 0.14 150); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 40%, transparent); --zui-color-control-destructive-fill: color-mix(in oklab, var(--zui-color-destructive) 60%, transparent); --zui-color-control-ghost-hover: color-mix(in oklab, var(--zui-color-accent) 50%, transparent); --zui-color-control-outline-border: var(--zui-color-input); --zui-color-control-outline-hover: color-mix(in oklab, var(--zui-color-input) 50%, transparent); --zui-color-control-switch-off: color-mix(in oklab, var(--zui-color-input) 80%, transparent); --zui-color-control-switch-thumb: var(--zui-color-foreground); --zui-color-control-switch-thumb-on: var(--zui-color-primary-foreground); --zui-color-control-tab-ink: var(--zui-color-muted-foreground); --zui-color-control-tab-fill: color-mix(in oklab, var(--zui-color-input) 30%, transparent); --zui-color-control-tab-border: var(--zui-color-input); --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 0px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 0ms; --zui-motion-duration-normal: 0ms; --zui-motion-duration-slow: 0ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: linear; --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\", \"light\": \"--zui-scale-neutral-1: #fcfcfd; --zui-scale-neutral-2: #f9f9fb; --zui-scale-neutral-3: #f0f0f3; --zui-scale-neutral-4: #e8e8ec; --zui-scale-neutral-5: #e0e1e6; --zui-scale-neutral-6: #d9d9e0; --zui-scale-neutral-7: #cdced6; --zui-scale-neutral-8: #b9bbc6; --zui-scale-neutral-9: #8b8d98; --zui-scale-neutral-10: #80838d; --zui-scale-neutral-11: #60646c; --zui-scale-neutral-12: #1c2024; --zui-scale-accent-1: #fbfdff; --zui-scale-accent-2: #f4faff; --zui-scale-accent-3: #e6f4fe; --zui-scale-accent-4: #d5efff; --zui-scale-accent-5: #c2e5ff; --zui-scale-accent-6: #acd8fc; --zui-scale-accent-7: #8ec8f6; --zui-scale-accent-8: #5eb1ef; --zui-scale-accent-9: #0090ff; --zui-scale-accent-10: #0588f0; --zui-scale-accent-11: #0d74ce; --zui-scale-accent-12: #113264; --zui-color-background: oklch(0.98 0.008 150); --zui-color-foreground: oklch(0.145 0 0); --zui-color-card: oklch(1 0 0); --zui-color-card-foreground: oklch(0.145 0 0); --zui-color-popover: oklch(1 0 0); --zui-color-popover-foreground: oklch(0.145 0 0); --zui-color-tooltip: var(--zui-color-foreground); --zui-color-tooltip-foreground: var(--zui-color-background); --zui-color-tooltip-border: var(--zui-color-tooltip); --zui-color-primary: oklch(0.48 0.13 150); --zui-color-primary-foreground: oklch(0.99 0.01 150); --zui-color-secondary: oklch(0.93 0.05 150); --zui-color-secondary-foreground: oklch(0.34 0.10 150); --zui-color-muted: oklch(0.95 0.015 150); --zui-color-muted-foreground: oklch(0.48 0.04 150); --zui-color-accent: oklch(0.93 0.05 150); --zui-color-accent-foreground: oklch(0.34 0.10 150); --zui-color-destructive: oklch(0.577 0.245 27.325); --zui-color-destructive-foreground: oklch(0.97 0.01 17); --zui-color-danger: var(--zui-color-destructive); --zui-color-success: oklch(0.627 0.194 149.214); --zui-color-success-foreground: oklch(0.982 0.018 155.826); --zui-color-warning: oklch(0.769 0.188 70.08); --zui-color-warning-foreground: oklch(0.279 0.077 45.635); --zui-color-info: oklch(0.546 0.245 262.881); --zui-color-info-foreground: oklch(0.97 0.014 254.604); --zui-color-border: oklch(0.86 0.02 150); --zui-color-input: oklch(0.86 0.02 150); --zui-color-ring: oklch(0.55 0.12 150); --zui-color-scrim: oklch(0 0 0 / 50%); --zui-color-chart-1: oklch(0.87 0 0); --zui-color-chart-2: oklch(0.556 0 0); --zui-color-chart-3: oklch(0.439 0 0); --zui-color-chart-4: oklch(0.371 0 0); --zui-color-chart-5: oklch(0.269 0 0); --zui-color-sidebar: oklch(1 0 0); --zui-color-sidebar-foreground: oklch(0.145 0 0); --zui-color-sidebar-primary: oklch(0.48 0.13 150); --zui-color-sidebar-primary-foreground: oklch(0.99 0.01 150); --zui-color-sidebar-accent: oklch(0.93 0.05 150); --zui-color-sidebar-accent-foreground: oklch(0.34 0.10 150); --zui-color-sidebar-border: oklch(0.86 0.02 150); --zui-color-sidebar-ring: oklch(0.55 0.12 150); --zui-color-control-ring-invalid: color-mix(in oklab, var(--zui-color-destructive) 20%, transparent); --zui-color-control-destructive-fill: var(--zui-color-destructive); --zui-color-control-ghost-hover: var(--zui-color-accent); --zui-color-control-outline-border: var(--zui-color-border); --zui-color-control-outline-hover: var(--zui-color-accent); --zui-color-control-switch-off: var(--zui-color-input); --zui-color-control-switch-thumb: var(--zui-color-background); --zui-color-control-switch-thumb-on: var(--zui-color-background); --zui-color-control-tab-ink: color-mix(in oklab, var(--zui-color-foreground) 60%, transparent); --zui-color-control-tab-fill: var(--zui-color-background); --zui-color-control-tab-border: transparent; --zui-space-base: 4px; --zui-space-xs: calc(var(--zui-space-base) * 1); --zui-space-sm: calc(var(--zui-space-base) * 2); --zui-space-md: calc(var(--zui-space-base) * 3); --zui-space-lg: calc(var(--zui-space-base) * 4); --zui-space-xl: calc(var(--zui-space-base) * 6); --zui-space-2xl: calc(var(--zui-space-base) * 8); --zui-space-3xl: calc(var(--zui-space-base) * 12); --zui-radius-base: 0px; --zui-radius-none: 0px; --zui-radius-sm: calc(var(--zui-radius-base) * 0.6); --zui-radius-md: calc(var(--zui-radius-base) * 0.8); --zui-radius-lg: var(--zui-radius-base); --zui-radius-xl: calc(var(--zui-radius-base) * 1.4); --zui-radius-2xl: calc(var(--zui-radius-base) * 1.8); --zui-radius-3xl: calc(var(--zui-radius-base) * 2.2); --zui-radius-4xl: calc(var(--zui-radius-base) * 2.6); --zui-radius-full: 9999px; --zui-type-family-sans: Geist, ui-sans-serif, system-ui, sans-serif; --zui-type-family-mono: \\\"Geist Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace; --zui-type-size-xs: 12px; --zui-type-size-sm: 14px; --zui-type-size-md: 16px; --zui-type-size-lg: 18px; --zui-type-size-xl: 20px; --zui-type-size-2xl: 24px; --zui-type-size-3xl: 30px; --zui-type-leading-xs: 16px; --zui-type-leading-sm: 20px; --zui-type-leading-md: 24px; --zui-type-leading-lg: 28px; --zui-type-leading-xl: 28px; --zui-type-leading-2xl: 32px; --zui-type-leading-3xl: 36px; --zui-type-weight-normal: 400; --zui-type-weight-medium: 500; --zui-type-weight-semibold: 600; --zui-type-weight-bold: 700; --zui-type-tracking-tighter: -0.05em; --zui-type-tracking-tight: -0.025em; --zui-type-tracking-normal: 0em; --zui-type-tracking-wide: 0.025em; --zui-type-tracking-wider: 0.05em; --zui-type-tracking-widest: 0.1em; --zui-shadow-none: none; --zui-shadow-2xs: 0 1px rgb(0 0 0 / 0.05); --zui-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); --zui-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --zui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --zui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --zui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --zui-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --zui-shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --zui-motion-duration-none: 0ms; --zui-motion-duration-fast: 0ms; --zui-motion-duration-normal: 0ms; --zui-motion-duration-slow: 0ms; --zui-motion-duration-slower: 300ms; --zui-motion-duration-slowest: 500ms; --zui-motion-ease-standard: linear; --zui-motion-ease-out: cubic-bezier(0, 0, 0.2, 1); --zui-motion-ease-in: cubic-bezier(0.4, 0, 1, 1); --zui-motion-ease-linear: linear;\" } };\nexport const themeTokens = [\"--zui-scale-neutral-1\", \"--zui-scale-neutral-2\", \"--zui-scale-neutral-3\", \"--zui-scale-neutral-4\", \"--zui-scale-neutral-5\", \"--zui-scale-neutral-6\", \"--zui-scale-neutral-7\", \"--zui-scale-neutral-8\", \"--zui-scale-neutral-9\", \"--zui-scale-neutral-10\", \"--zui-scale-neutral-11\", \"--zui-scale-neutral-12\", \"--zui-scale-accent-1\", \"--zui-scale-accent-2\", \"--zui-scale-accent-3\", \"--zui-scale-accent-4\", \"--zui-scale-accent-5\", \"--zui-scale-accent-6\", \"--zui-scale-accent-7\", \"--zui-scale-accent-8\", \"--zui-scale-accent-9\", \"--zui-scale-accent-10\", \"--zui-scale-accent-11\", \"--zui-scale-accent-12\", \"--zui-color-background\", \"--zui-color-foreground\", \"--zui-color-card\", \"--zui-color-card-foreground\", \"--zui-color-popover\", \"--zui-color-popover-foreground\", \"--zui-color-tooltip\", \"--zui-color-tooltip-foreground\", \"--zui-color-tooltip-border\", \"--zui-color-primary\", \"--zui-color-primary-foreground\", \"--zui-color-secondary\", \"--zui-color-secondary-foreground\", \"--zui-color-muted\", \"--zui-color-muted-foreground\", \"--zui-color-accent\", \"--zui-color-accent-foreground\", \"--zui-color-destructive\", \"--zui-color-destructive-foreground\", \"--zui-color-danger\", \"--zui-color-success\", \"--zui-color-success-foreground\", \"--zui-color-warning\", \"--zui-color-warning-foreground\", \"--zui-color-info\", \"--zui-color-info-foreground\", \"--zui-color-border\", \"--zui-color-input\", \"--zui-color-ring\", \"--zui-color-scrim\", \"--zui-color-chart-1\", \"--zui-color-chart-2\", \"--zui-color-chart-3\", \"--zui-color-chart-4\", \"--zui-color-chart-5\", \"--zui-color-sidebar\", \"--zui-color-sidebar-foreground\", \"--zui-color-sidebar-primary\", \"--zui-color-sidebar-primary-foreground\", \"--zui-color-sidebar-accent\", \"--zui-color-sidebar-accent-foreground\", \"--zui-color-sidebar-border\", \"--zui-color-sidebar-ring\", \"--zui-color-control-ring-invalid\", \"--zui-color-control-destructive-fill\", \"--zui-color-control-ghost-hover\", \"--zui-color-control-outline-border\", \"--zui-color-control-outline-hover\", \"--zui-color-control-switch-off\", \"--zui-color-control-switch-thumb\", \"--zui-color-control-switch-thumb-on\", \"--zui-color-control-tab-ink\", \"--zui-color-control-tab-fill\", \"--zui-color-control-tab-border\", \"--zui-space-base\", \"--zui-space-xs\", \"--zui-space-sm\", \"--zui-space-md\", \"--zui-space-lg\", \"--zui-space-xl\", \"--zui-space-2xl\", \"--zui-space-3xl\", \"--zui-radius-base\", \"--zui-radius-none\", \"--zui-radius-sm\", \"--zui-radius-md\", \"--zui-radius-lg\", \"--zui-radius-xl\", \"--zui-radius-2xl\", \"--zui-radius-3xl\", \"--zui-radius-4xl\", \"--zui-radius-full\", \"--zui-type-family-sans\", \"--zui-type-family-mono\", \"--zui-type-size-xs\", \"--zui-type-size-sm\", \"--zui-type-size-md\", \"--zui-type-size-lg\", \"--zui-type-size-xl\", \"--zui-type-size-2xl\", \"--zui-type-size-3xl\", \"--zui-type-leading-xs\", \"--zui-type-leading-sm\", \"--zui-type-leading-md\", \"--zui-type-leading-lg\", \"--zui-type-leading-xl\", \"--zui-type-leading-2xl\", \"--zui-type-leading-3xl\", \"--zui-type-weight-normal\", \"--zui-type-weight-medium\", \"--zui-type-weight-semibold\", \"--zui-type-weight-bold\", \"--zui-type-tracking-tighter\", \"--zui-type-tracking-tight\", \"--zui-type-tracking-normal\", \"--zui-type-tracking-wide\", \"--zui-type-tracking-wider\", \"--zui-type-tracking-widest\", \"--zui-shadow-none\", \"--zui-shadow-2xs\", \"--zui-shadow-xs\", \"--zui-shadow-sm\", \"--zui-shadow-md\", \"--zui-shadow-lg\", \"--zui-shadow-xl\", \"--zui-shadow-2xl\", \"--zui-shadow-inset\", \"--zui-motion-duration-none\", \"--zui-motion-duration-fast\", \"--zui-motion-duration-normal\", \"--zui-motion-duration-slow\", \"--zui-motion-duration-slower\", \"--zui-motion-duration-slowest\", \"--zui-motion-ease-standard\", \"--zui-motion-ease-out\", \"--zui-motion-ease-in\", \"--zui-motion-ease-linear\"];\n","import { createContext, createMemo, createUniqueId, onCleanup, useContext } from \"#solid\";\nimport { createElement, effect, insertNode, setProp, spread } from \"../renderer/index.js\";\nimport { getReducedMotion } from \"../nodes.js\";\nimport { bridgeFor } from \"../host.js\";\nimport { ThemeCssContext } from \"../theme-sync.js\";\nimport { provide, slot } from \"./shared.js\";\nimport { themes, themeTokens } from \"./generated/themes.js\";\nconst ThemeSheet = \"zgui-ui-theme\";\nconst tokenSet = new Set(themeTokens);\nconst Internal = createContext(null);\nexport function useTheme() {\n return useContext(Internal) ?? undefined;\n}\nfunction presetDeclarations(theme, scheme) {\n const preset = theme.preset ?? \"base\";\n if (!Object.hasOwn(themes, preset))\n throw new TypeError(`Unknown theme preset: ${preset}`);\n return themes[preset][scheme];\n}\nfunction overrideDeclarations(theme) {\n if (theme.tokens === undefined)\n return \"\";\n let out = \"\";\n for (const [name, value] of Object.entries(theme.tokens)) {\n if (!tokenSet.has(name))\n throw new TypeError(`Unknown theme token: ${name}`);\n if (typeof value !== \"string\" || value === \"\") {\n throw new TypeError(`Theme token ${name} must be a nonempty string`);\n }\n if (value.includes(\";\") || value.includes(\"{\") || value.includes(\"}\") || value.includes(\"/*\")) {\n throw new TypeError(`Theme token ${name} contains unsafe characters`);\n }\n out += `${name}: ${value}; `;\n }\n return out;\n}\nfunction rule(selector, scheme, theme, reducedMotion) {\n const motion = reducedMotion\n ? themeTokens\n .filter(name => name.startsWith(\"--zui-motion-duration-\"))\n .map(name => `${name}: 0ms;`)\n .join(\" \")\n : \"\";\n const declarations = `color-scheme: ${scheme}; ${presetDeclarations(theme, scheme)} ${overrideDeclarations(theme)} ${motion}`;\n return `${selector} { ${declarations} }`;\n}\nfunction themeSheet(selector, light, dark, scheme, reducedMotion) {\n if (scheme !== \"system\" && scheme !== \"light\" && scheme !== \"dark\") {\n throw new TypeError(`Unknown color scheme: ${String(scheme)}`);\n }\n let css = \"\";\n if (scheme === \"light\" || scheme === \"system\")\n css += rule(selector, \"light\", light, reducedMotion);\n if (scheme === \"dark\" || scheme === \"system\") {\n const darkRule = rule(selector, \"dark\", dark, reducedMotion);\n css +=\n (css === \"\" ? \"\" : \"\\n\") +\n (scheme === \"system\" ? `@media (prefers-color-scheme: dark) { ${darkRule} }` : darkRule);\n }\n return css;\n}\nexport function portalThemeScope(theme, child) {\n const id = `zui-theme-${createUniqueId().replace(/[^a-zA-Z0-9_-]/g, \"-\")}`;\n const sheetName = `${ThemeSheet}-${id}`;\n const wrapper = createElement(\"box\");\n const bridge = bridgeFor(wrapper);\n setProp(wrapper, \"__zguiClass\", id);\n setProp(wrapper, \"__zguiInvariantStyle\", { display: \"contents\" });\n effect(() => [theme.light(), theme.dark(), theme.scheme(), getReducedMotion()], ([light, dark, scheme, reducedMotion]) => {\n bridge.installStylesheet(sheetName, `@layer zgui.tokens { ${themeSheet(`.${id}`, light, dark, scheme, reducedMotion)} }`);\n });\n onCleanup(() => bridge.removeStylesheet(sheetName));\n insertNode(wrapper, child);\n return wrapper;\n}\nexport function ThemeProvider(props = {}) {\n const parent = useContext(Internal);\n const id = `zui-theme-${createUniqueId().replace(/[^a-zA-Z0-9_-]/g, \"-\")}`;\n const selector = parent === null ? \":root\" : `.${id}`;\n const sheetName = `${ThemeSheet}-${id}`;\n const context = {\n scheme: () => props.scheme ?? \"system\",\n light: () => props.light ?? {},\n dark: () => props.dark ?? {},\n };\n const wrapper = createElement(\"box\");\n const bridge = bridgeFor(wrapper);\n spread(wrapper, { __zguiClass: id, __zguiInvariantStyle: { display: \"contents\" } }, true);\n const inheritedRootCss = createMemo(() => `@layer zgui.tokens { ${themeSheet(\":root\", context.light(), context.dark(), context.scheme(), getReducedMotion())} }`);\n effect(() => [context.light(), context.dark(), context.scheme(), getReducedMotion()], ([light, dark, scheme, reducedMotion]) => {\n bridge.installStylesheet(sheetName, `@layer zgui.tokens { ${themeSheet(selector, light, dark, scheme, reducedMotion)} }`);\n });\n onCleanup(() => bridge.removeStylesheet(sheetName));\n slot(wrapper, provide(Internal, context, () => provide(ThemeCssContext, inheritedRootCss, props)));\n return wrapper;\n}\n","export const sheet = { name: \"IconStyle\", className: \"zs-b3390f73\", css: \".zs-b3390f73 {\\n display: inline-block;\\n flex: none;\\n width: var(--zui-icon-size);\\n height: var(--zui-icon-size);\\n --zui-icon-size: var(--zui-icon-md, 16px);\\n }\\n.zs-b3390f73[data-size=\\\"sm\\\"] { --zui-icon-size: var(--zui-icon-sm, 12px); }\\n.zs-b3390f73[data-size=\\\"lg\\\"] { --zui-icon-size: var(--zui-icon-lg, 20px); }\\n.zs-b3390f73[data-size=\\\"xl\\\"] { --zui-icon-size: var(--zui-icon-xl, 24px); }\" };\n","export const ALERT_CIRCLE = { name: \"alert-circle\", viewBox: 24, d: \"M12 3 C16.971 3 21 7.029 21 12 C21 16.971 16.971 21 12 21 C7.029 21 3 16.971 3 12 C3 7.029 7.029 3 12 3 Z M12 5 C8.134 5 5 8.134 5 12 C5 15.866 8.134 19 12 19 C15.866 19 19 15.866 19 12 C19 8.134 15.866 5 12 5 Z M11 7 L13 7 L13 13 L11 13 Z M11 15 L13 15 L13 17 L11 17 Z\" };\nexport const ALERT_TRIANGLE = { name: \"alert-triangle\", viewBox: 24, d: \"M12 2.5 L22.5 20.5 L1.5 20.5 Z M12 6.8 L5.1 18.7 L18.9 18.7 Z M11 10 L13 10 L13 14.5 L11 14.5 Z M11 15.8 L13 15.8 L13 17.8 L11 17.8 Z\" };\nexport const ARROW_DOWN = { name: \"arrow-down\", viewBox: 24, d: \"M13 3 L11 3 L11 15.2 L6.4 10.6 L5 12 L12 19 L19 12 L17.6 10.6 L13 15.2 Z\" };\nexport const ARROW_LEFT = { name: \"arrow-left\", viewBox: 24, d: \"M21 13 L21 11 L8.8 11 L13.4 6.4 L12 5 L5 12 L12 19 L13.4 17.6 L8.8 13 Z\" };\nexport const ARROW_RIGHT = { name: \"arrow-right\", viewBox: 24, d: \"M3 13 L3 11 L15.2 11 L10.6 6.4 L12 5 L19 12 L12 19 L10.6 17.6 L15.2 13 Z\" };\nexport const ARROW_UP = { name: \"arrow-up\", viewBox: 24, d: \"M11 21 L13 21 L13 8.8 L17.6 13.4 L19 12 L12 5 L5 12 L6.4 13.4 L11 8.8 Z\" };\nexport const CHECK = { name: \"check\", viewBox: 24, d: \"M20.5 7.1 L18.9 5.5 L9.6 14.8 L5.1 10.3 L3.5 11.9 L9.6 18.0 Z\" };\nexport const CHECK_CIRCLE = { name: \"check-circle\", viewBox: 24, d: \"M12 3 C16.971 3 21 7.029 21 12 C21 16.971 16.971 21 12 21 C7.029 21 3 16.971 3 12 C3 7.029 7.029 3 12 3 Z M12 5 C8.134 5 5 8.134 5 12 C5 15.866 8.134 19 12 19 C15.866 19 19 15.866 19 12 C19 8.134 15.866 5 12 5 Z M16.42 9.45 L15.59 8.62 L10.75 13.46 L8.41 11.12 L7.58 11.95 L10.75 15.12 Z\" };\nexport const CHEVRON_DOWN = { name: \"chevron-down\", viewBox: 24, d: \"M12 15.6 L4.9 8.5 L6.3 7.1 L12 12.8 L17.7 7.1 L19.1 8.5 Z\" };\nexport const CHEVRON_LEFT = { name: \"chevron-left\", viewBox: 24, d: \"M8.4 12 L15.5 4.9 L16.9 6.3 L11.2 12 L16.9 17.7 L15.5 19.1 Z\" };\nexport const CHEVRON_RIGHT = { name: \"chevron-right\", viewBox: 24, d: \"M15.6 12 L8.5 19.1 L7.1 17.7 L12.8 12 L7.1 6.3 L8.5 4.9 Z\" };\nexport const CHEVRON_UP = { name: \"chevron-up\", viewBox: 24, d: \"M12 8.4 L19.1 15.5 L17.7 16.9 L12 11.2 L6.3 16.9 L4.9 15.5 Z\" };\nexport const CROSS = { name: \"cross\", viewBox: 24, d: \"M18.4 7.0 L17.0 5.6 L12 10.6 L7.0 5.6 L5.6 7.0 L10.6 12 L5.6 17.0 L7.0 18.4 L12 13.4 L17.0 18.4 L18.4 17.0 L13.4 12 Z\" };\nexport const CROSS_CIRCLE = { name: \"cross-circle\", viewBox: 24, d: \"M12 3 C16.971 3 21 7.029 21 12 C21 16.971 16.971 21 12 21 C7.029 21 3 16.971 3 12 C3 7.029 7.029 3 12 3 Z M12 5 C8.134 5 5 8.134 5 12 C5 15.866 8.134 19 12 19 C15.866 19 19 15.866 19 12 C19 8.134 15.866 5 12 5 Z M15.52 9.25 L14.75 8.48 L12 11.23 L9.25 8.48 L8.48 9.25 L11.23 12 L8.48 14.75 L9.25 15.52 L12 12.77 L14.75 15.52 L15.52 14.75 L12.77 12 Z\" };\nexport const DISC = { name: \"disc\", viewBox: 24, d: \"M12 6 C15.314 6 18 8.686 18 12 C18 15.314 15.314 18 12 18 C8.686 18 6 15.314 6 12 C6 8.686 8.686 6 12 6 Z\" };\nexport const DOT = { name: \"dot\", viewBox: 24, d: \"M12 8.5 C13.933 8.5 15.5 10.067 15.5 12 C15.5 13.933 13.933 15.5 12 15.5 C10.067 15.5 8.5 13.933 8.5 12 C8.5 10.067 10.067 8.5 12 8.5 Z\" };\nexport const ELLIPSIS = { name: \"ellipsis\", viewBox: 24, d: \"M5.5 10.1 C6.549 10.1 7.4 10.951 7.4 12 C7.4 13.049 6.549 13.9 5.5 13.9 C4.451 13.9 3.6 13.049 3.6 12 C3.6 10.951 4.451 10.1 5.5 10.1 Z M12 10.1 C13.049 10.1 13.9 10.951 13.9 12 C13.9 13.049 13.049 13.9 12 13.9 C10.951 13.9 10.1 13.049 10.1 12 C10.1 10.951 10.951 10.1 12 10.1 Z M18.5 10.1 C19.549 10.1 20.4 10.951 20.4 12 C20.4 13.049 19.549 13.9 18.5 13.9 C17.451 13.9 16.6 13.049 16.6 12 C16.6 10.951 17.451 10.1 18.5 10.1 Z\" };\nexport const INFO = { name: \"info\", viewBox: 24, d: \"M12 3 C16.971 3 21 7.029 21 12 C21 16.971 16.971 21 12 21 C7.029 21 3 16.971 3 12 C3 7.029 7.029 3 12 3 Z M12 5 C8.134 5 5 8.134 5 12 C5 15.866 8.134 19 12 19 C15.866 19 19 15.866 19 12 C19 8.134 15.866 5 12 5 Z M11 6.8 L13 6.8 L13 8.8 L11 8.8 Z M11 10.5 L13 10.5 L13 17 L11 17 Z\" };\nexport const MINUS = { name: \"minus\", viewBox: 24, d: \"M4 11 L20 11 L20 13 L4 13 Z\" };\nexport const PANEL_LEFT = { name: \"panel-left\", viewBox: 24, d: \"M5 3 L19 3 C20.105 3 21 3.895 21 5 L21 19 C21 20.105 20.105 21 19 21 L5 21 C3.895 21 3 20.105 3 19 L3 5 C3 3.895 3.895 3 5 3 Z M6 5 C5.448 5 5 5.448 5 6 L5 18 C5 18.552 5.448 19 6 19 L18 19 C18.552 19 19 18.552 19 18 L19 6 C19 5.448 18.552 5 18 5 Z M8 5 L10 5 L10 19 L8 19 Z\" };\nexport const PLUS = { name: \"plus\", viewBox: 24, d: \"M11 4 L13 4 L13 11 L20 11 L20 13 L13 13 L13 20 L11 20 L11 13 L4 13 L4 11 L11 11 Z\" };\nexport const SEARCH = { name: \"search\", viewBox: 24, d: \"M10.5 3.5 C14.366 3.5 17.5 6.634 17.5 10.5 C17.5 14.366 14.366 17.5 10.5 17.5 C6.634 17.5 3.5 14.366 3.5 10.5 C3.5 6.634 6.634 3.5 10.5 3.5 Z M10.5 5.5 C7.739 5.5 5.5 7.739 5.5 10.5 C5.5 13.261 7.739 15.5 10.5 15.5 C13.261 15.5 15.5 13.261 15.5 10.5 C15.5 7.739 13.261 5.5 10.5 5.5 Z M14.15 15.85 L15.85 14.15 L21.65 19.95 L19.95 21.65 Z\" };\nexport const SPINNER = { name: \"spinner\", viewBox: 24, d: \"M12 3 C16.971 3 21 7.029 21 12 C21 16.971 16.971 21 12 21 C7.029 21 3 16.971 3 12 L5 12 C5 15.866 8.134 19 12 19 C15.866 19 19 15.866 19 12 C19 8.134 15.866 5 12 5 Z\" };\n","import { $PROXY, omit } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { classes, forbidChildren, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/IconStyle.js\";\nexport { ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, CHEVRON_UP, CHEVRON_DOWN, CHEVRON_LEFT, CHEVRON_RIGHT, CHECK, MINUS, PLUS, CROSS, DISC, DOT, ALERT_CIRCLE, ALERT_TRIANGLE, INFO, CHECK_CIRCLE, CROSS_CIRCLE, SEARCH, SPINNER, ELLIPSIS, PANEL_LEFT, } from \"./generated/icons.js\";\nconst SIZE_CLASSES = {\n sm: \"zui-icon--sm\",\n md: \"\",\n lg: \"zui-icon--lg\",\n xl: \"zui-icon--xl\",\n};\nexport function Icon(props) {\n useStylesheet(sheet);\n forbidChildren(\"Icon\", props);\n if (!($PROXY in props) &&\n !(\"__zguiClass\" in props) &&\n Object.getOwnPropertyDescriptor(props, \"icon\")?.get === undefined &&\n Object.getOwnPropertyDescriptor(props, \"size\")?.get === undefined &&\n Object.getOwnPropertyDescriptor(props, \"label\")?.get === undefined) {\n const node = createElement(\"vector\");\n const size = props.size ?? \"md\";\n const side = props.icon.viewBox;\n setProp(node, \"role\", \"image\");\n setProp(node, \"ariaHidden\", (props.label ?? null) === null ? true : null);\n setProp(node, \"ariaLabel\", props.label ?? null);\n setProp(node, \"d\", props.icon.d);\n setProp(node, \"viewBox\", `0 0 ${side} ${side}`);\n setProp(node, \"data-size\", size);\n setProp(node, \"data-icon\", props.icon.name);\n setProp(node, \"__zguiClass\", classes(\"zui-icon\", SIZE_CLASSES[size], sheet.className));\n const keys = Object.keys(props);\n if (keys.length > 0) {\n let extra;\n for (const key of keys) {\n if (key === \"icon\" || key === \"size\" || key === \"label\")\n continue;\n const desc = Object.getOwnPropertyDescriptor(props, key);\n if (desc) {\n extra ??= {};\n Object.defineProperty(extra, key, desc);\n }\n }\n if (extra)\n spread(node, extra, true);\n }\n return node;\n }\n const rest = omit(props, \"icon\", \"size\", \"label\");\n const node = createElement(\"vector\");\n spread(node, mergeProps(rest, withDefaults({\n get role() {\n return \"image\";\n },\n get ariaHidden() {\n return (props.label ?? null) === null ? true : null;\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n get d() {\n return props.icon.d;\n },\n get viewBox() {\n const side = props.icon.viewBox;\n return `0 0 ${side} ${side}`;\n },\n get \"data-size\"() {\n return props.size ?? \"md\";\n },\n get \"data-icon\"() {\n return props.icon.name;\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-icon\", SIZE_CLASSES[props.size ?? \"md\"], sheet.className);\n },\n }), true);\n return node;\n}\n","export const sheet = { name: \"ButtonStyle\", className: \"zs-9123059c\", css: \".zs-9123059c {\\n display: inline-flex;\\n flex-direction: row;\\n flex-shrink: 0;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-sm);\\n height: 34px;\\n padding: 0 var(--zui-space-lg);\\n border: 1px solid transparent;\\n border-radius: var(--zui-radius-md);\\n background-color: transparent;\\n color: var(--zui-color-foreground);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-sm);\\n white-space: nowrap;\\n --zui-button-ring: 0 0 transparent;\\n --zui-button-lift: 0 0 transparent;\\n box-shadow: var(--zui-button-ring), var(--zui-button-lift);\\n transition-property: background-color, border-color, color, box-shadow;\\n transition-duration: var(--zui-motion-duration-normal);\\n transition-timing-function: var(--zui-motion-ease-standard);\\n }\\n.zs-9123059c .zui-icon { pointer-events: none; flex: none; }\\n.zs-9123059c[data-size=\\\"xs\\\"] {\\n height: 24px;\\n gap: var(--zui-space-xs);\\n padding: 0 var(--zui-space-sm);\\n font-size: var(--zui-type-size-xs);\\n line-height: var(--zui-type-leading-xs);\\n --zui-icon-md: 12px;\\n }\\n.zs-9123059c[data-size=\\\"sm\\\"] {\\n height: 30px;\\n gap: calc(var(--zui-space-base) * 1.5);\\n padding: 0 var(--zui-space-md);\\n }\\n.zs-9123059c[data-size=\\\"lg\\\"] { height: 38px; padding: 0 var(--zui-space-xl); }\\n.zs-9123059c[data-size=\\\"icon\\\"] { width: 34px; height: 34px; padding: 0; }\\n.zs-9123059c[data-size=\\\"icon-xs\\\"] {\\n width: 24px;\\n height: 24px;\\n padding: 0;\\n --zui-icon-md: 12px;\\n }\\n.zs-9123059c[data-size=\\\"icon-sm\\\"] { width: 30px; height: 30px; padding: 0; }\\n.zs-9123059c[data-size=\\\"icon-lg\\\"] { width: 38px; height: 38px; padding: 0; }\\n.zs-9123059c[data-size=\\\"md\\\"] > .zui-icon:first-child,\\n .zs-9123059c[data-size=\\\"md\\\"] > .zui-spinner:first-child {\\n margin-inline-start: calc(var(--zui-space-base) * -1);\\n }\\n.zs-9123059c[data-size=\\\"md\\\"] > .zui-icon:last-child:not(:first-child),\\n .zs-9123059c[data-size=\\\"md\\\"] > .zui-spinner:last-child:not(:first-child) {\\n margin-inline-end: calc(var(--zui-space-base) * -1);\\n }\\n.zs-9123059c[data-size=\\\"xs\\\"] > .zui-icon:first-child,\\n .zs-9123059c[data-size=\\\"xs\\\"] > .zui-spinner:first-child,\\n .zs-9123059c[data-size=\\\"sm\\\"] > .zui-icon:first-child,\\n .zs-9123059c[data-size=\\\"sm\\\"] > .zui-spinner:first-child {\\n margin-inline-start: calc(var(--zui-space-base) * -0.5);\\n }\\n.zs-9123059c[data-size=\\\"xs\\\"] > .zui-icon:last-child:not(:first-child),\\n .zs-9123059c[data-size=\\\"xs\\\"] > .zui-spinner:last-child:not(:first-child),\\n .zs-9123059c[data-size=\\\"sm\\\"] > .zui-icon:last-child:not(:first-child),\\n .zs-9123059c[data-size=\\\"sm\\\"] > .zui-spinner:last-child:not(:first-child) {\\n margin-inline-end: calc(var(--zui-space-base) * -0.5);\\n }\\n.zs-9123059c[data-size=\\\"lg\\\"] > .zui-icon:first-child,\\n .zs-9123059c[data-size=\\\"lg\\\"] > .zui-spinner:first-child {\\n margin-inline-start: calc(var(--zui-space-base) * -2);\\n }\\n.zs-9123059c[data-size=\\\"lg\\\"] > .zui-icon:last-child:not(:first-child),\\n .zs-9123059c[data-size=\\\"lg\\\"] > .zui-spinner:last-child:not(:first-child) {\\n margin-inline-end: calc(var(--zui-space-base) * -2);\\n }\\n.zs-9123059c[data-variant=\\\"default\\\"] {\\n background-color: var(--zui-color-primary);\\n color: var(--zui-color-primary-foreground);\\n }\\n.zs-9123059c[data-variant=\\\"default\\\"]:hover {\\n background-color: color-mix(in oklab, var(--zui-color-primary) 90%, transparent);\\n }\\n.zs-9123059c[data-variant=\\\"destructive\\\"] {\\n background-color: var(--zui-color-control-destructive-fill);\\n color: #ffffff;\\n }\\n.zs-9123059c[data-variant=\\\"destructive\\\"]:hover {\\n background-color: color-mix(in oklab, var(--zui-color-destructive) 90%, transparent);\\n }\\n.zs-9123059c[data-variant=\\\"destructive\\\"]:focus-visible {\\n --zui-button-ring: 0 0 0 3px\\n var(--zui-color-control-ring-invalid);\\n }\\n.zs-9123059c[data-variant=\\\"outline\\\"] {\\n border-color: var(--zui-color-control-outline-border);\\n }\\n.zs-9123059c[data-variant=\\\"outline\\\"]:hover {\\n background-color: var(--zui-color-control-outline-hover);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zs-9123059c[data-variant=\\\"secondary\\\"] {\\n background-color: var(--zui-color-secondary);\\n color: var(--zui-color-secondary-foreground);\\n }\\n.zs-9123059c[data-variant=\\\"secondary\\\"]:hover {\\n background-color: color-mix(in oklab, var(--zui-color-secondary) 80%, transparent);\\n }\\n.zs-9123059c[data-variant=\\\"ghost\\\"]:hover {\\n background-color: var(--zui-color-control-ghost-hover);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zs-9123059c[data-variant=\\\"link\\\"] {\\n color: var(--zui-color-primary);\\n \\n }\\n.zs-9123059c[data-variant=\\\"link\\\"]:hover { text-decoration-line: underline; }\\n.zs-9123059c:focus-visible {\\n border-color: var(--zui-color-ring);\\n --zui-button-ring: 0 0 0 3px color-mix(in oklab, var(--zui-color-ring) 50%, transparent);\\n }\\n.zs-9123059c:invalid {\\n border-color: var(--zui-color-destructive);\\n --zui-button-ring: 0 0 0 3px\\n var(--zui-color-control-ring-invalid);\\n }\\n.zs-9123059c:disabled { opacity: 0.5; pointer-events: none; }\" };\n","import { omit } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { classes, element, isStaticProps, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/ButtonStyle.js\";\nconst SIZE_CLASSES = {\n xs: \"zui-button--xs\",\n sm: \"zui-button--sm\",\n md: \"\",\n lg: \"zui-button--lg\",\n icon: \"zui-button--icon\",\n \"icon-xs\": \"zui-button--icon-xs\",\n \"icon-sm\": \"zui-button--icon-sm\",\n \"icon-lg\": \"zui-button--icon-lg\",\n};\nexport function Button(props = {}) {\n useStylesheet(sheet);\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const node = createElement(\"control\");\n const variant = props.variant ?? \"default\";\n const size = props.size ?? \"md\";\n setProp(node, \"tabIndex\", props.tabIndex ?? 0);\n setProp(node, \"role\", props.role ?? \"button\");\n setProp(node, \"data-variant\", props[\"data-variant\"] ?? variant);\n setProp(node, \"data-size\", props[\"data-size\"] ?? size);\n setProp(node, \"__zguiClass\", classes(sheet.className, \"zui-button\", `zui-button--${variant}`, SIZE_CLASSES[size]));\n if (\"variant\" in props || \"size\" in props) {\n const copy = {};\n for (const key of Object.keys(props)) {\n if (key === \"variant\" || key === \"size\" || key === \"children\")\n continue;\n copy[key] = props[key];\n }\n const childrenDesc = Object.getOwnPropertyDescriptor(props, \"children\");\n if (childrenDesc)\n Object.defineProperty(copy, \"children\", childrenDesc);\n spread(node, copy);\n }\n else {\n spread(node, props);\n }\n return node;\n }\n const rest = omit(props, \"variant\", \"size\");\n return element(\"control\", mergeProps(rest, withDefaults({\n tabIndex: 0,\n role: \"button\",\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n get \"data-size\"() {\n return props.size ?? \"md\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-button\", `zui-button--${props.variant ?? \"default\"}`, SIZE_CLASSES[props.size ?? \"md\"]);\n },\n }));\n}\n","export const sheet = { name: \"BadgeStyle\", className: \"zs-b5d9cdcb\", css: \".zs-b5d9cdcb {\\n display: inline-flex;\\n flex-direction: row;\\n flex-shrink: 0;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-xs);\\n width: fit-content;\\n overflow: hidden;\\n padding: 2px var(--zui-space-sm);\\n border: 1px solid transparent;\\n border-radius: var(--zui-radius-full);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-xs);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-xs);\\n white-space: nowrap;\\n transition-property: color, box-shadow;\\n transition-duration: var(--zui-motion-duration-normal);\\n transition-timing-function: var(--zui-motion-ease-standard);\\n }\\n.zs-b5d9cdcb > .zui-icon { pointer-events: none; --zui-icon-md: 12px; }\\n.zs-b5d9cdcb[data-variant=\\\"default\\\"] {\\n background-color: var(--zui-color-primary);\\n color: var(--zui-color-primary-foreground);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"secondary\\\"] {\\n background-color: var(--zui-color-secondary);\\n color: var(--zui-color-secondary-foreground);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"destructive\\\"] {\\n background-color: var(--zui-color-control-destructive-fill);\\n color: #ffffff;\\n }\\n.zs-b5d9cdcb[data-variant=\\\"success\\\"] {\\n background-color: var(--zui-color-success);\\n color: var(--zui-color-success-foreground);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"warning\\\"] {\\n background-color: var(--zui-color-warning);\\n color: var(--zui-color-warning-foreground);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"outline\\\"] {\\n border-color: var(--zui-color-border);\\n color: var(--zui-color-foreground);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"ghost\\\"] { color: var(--zui-color-foreground); }\\n.zs-b5d9cdcb[data-variant=\\\"link\\\"] {\\n color: var(--zui-color-primary);\\n \\n }\\n.zs-b5d9cdcb:focus-visible {\\n border-color: var(--zui-color-ring);\\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--zui-color-ring) 50%, transparent);\\n }\\n.zs-b5d9cdcb[data-variant=\\\"destructive\\\"]:focus-visible {\\n box-shadow: 0 0 0 3px var(--zui-color-control-ring-invalid);\\n }\\n.zs-b5d9cdcb:invalid {\\n border-color: var(--zui-color-destructive);\\n box-shadow: 0 0 0 3px var(--zui-color-control-ring-invalid);\\n }\" };\n","import { omit } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { classes, element, isStaticProps, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/BadgeStyle.js\";\nexport function Badge(props = {}) {\n useStylesheet(sheet);\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const node = createElement(\"box\");\n const variant = props.variant ?? \"default\";\n setProp(node, \"data-variant\", props[\"data-variant\"] ?? variant);\n setProp(node, \"__zguiClass\", classes(sheet.className, \"zui-badge\", `zui-badge--${variant}`));\n if (\"variant\" in props) {\n const copy = {};\n for (const key of Object.keys(props)) {\n if (key === \"variant\" || key === \"children\")\n continue;\n copy[key] = props[key];\n }\n const childrenDesc = Object.getOwnPropertyDescriptor(props, \"children\");\n if (childrenDesc)\n Object.defineProperty(copy, \"children\", childrenDesc);\n spread(node, copy);\n }\n else {\n spread(node, props);\n }\n return node;\n }\n const rest = omit(props, \"variant\");\n return element(\"box\", mergeProps(rest, withDefaults({\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-badge\", `zui-badge--${props.variant ?? \"default\"}`);\n },\n }));\n}\n","export const sheet = { name: \"CardStyle\", className: \"zs-f8a48877\", css: \".zs-f8a48877 {\\n display: flex;\\n flex-direction: column;\\n gap: var(--zui-space-xl);\\n padding-block: var(--zui-space-xl);\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-xl);\\n background-color: var(--zui-color-card);\\n color: var(--zui-color-card-foreground);\\n box-shadow: var(--zui-shadow-sm);\\n }\\n.zui-card__header {\\n display: grid;\\n grid-auto-rows: min-content;\\n grid-template-rows: auto auto;\\n align-items: start;\\n gap: var(--zui-space-sm);\\n padding-inline: var(--zui-space-xl);\\n }\\n.zui-card__header--action { grid-template-columns: 1fr auto; }\\n.zui-card__title {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-md);\\n font-weight: var(--zui-type-weight-semibold);\\n line-height: 1;\\n }\\n.zui-card__description {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-card__action {\\n grid-column-start: 2;\\n grid-row: 1 / span 2;\\n align-self: start;\\n justify-self: end;\\n }\\n.zui-card__content { padding-inline: var(--zui-space-xl); }\\n.zui-card__footer {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n padding-inline: var(--zui-space-xl);\\n }\" };\n","import { createContext, createSignal, onCleanup, omit, useContext } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { classes, element, isStaticProps, part, provide, slot, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { sheet } from \"./generated/CardStyle.js\";\nconst HeaderContext = createContext(null);\nexport function Card(props = {}) {\n useStylesheet(sheet);\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const node = createElement(\"box\");\n if (props.role === undefined)\n setProp(node, \"role\", \"group\");\n setProp(node, \"__zguiClass\", `${sheet.className} zui-card`);\n spread(node, props);\n return node;\n }\n return element(\"box\", mergeProps(props, withDefaults({ role: \"group\" }, props), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-card\");\n },\n }));\n}\nexport function CardHeader(props = {}) {\n useStylesheet(sheet);\n const [count, setCount] = createSignal(0, { ownedWrite: true });\n const state = {\n claim() {\n setCount(value => value + 1);\n onCleanup(() => setCount(value => value - 1));\n },\n };\n const rest = omit(props, \"children\");\n const header = element(\"box\", mergeProps(rest, {\n get __zguiClass() {\n return classes(\"zui-card__header\", count() > 0 && \"zui-card__header--action\");\n },\n }));\n slot(header, provide(HeaderContext, state, props));\n return header;\n}\nexport const CardTitle = part(\"label\", sheet, \"zui-card__title\");\nexport const CardDescription = part(\"box\", sheet, \"zui-card__description\");\nexport function CardAction(props = {}) {\n useStylesheet(sheet);\n useContext(HeaderContext)?.claim();\n return element(\"box\", mergeProps(props, {\n get __zguiClass() {\n return classes(\"zui-card__action\");\n },\n }));\n}\nexport const CardContent = part(\"box\", sheet, \"zui-card__content\");\nexport const CardFooter = part(\"row\", sheet, \"zui-card__footer\");\n","export const sheet = { name: \"SeparatorStyle\", className: \"zs-170da4ac\", css: \".zs-170da4ac { background-color: var(--zui-color-border); flex: none; }\\n.zs-170da4ac[data-orientation=\\\"horizontal\\\"] { height: 1px; width: 100%; }\\n.zs-170da4ac[data-orientation=\\\"vertical\\\"] { width: 1px; align-self: stretch; }\" };\n","import { omit } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { classes, forbidChildren, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/SeparatorStyle.js\";\nexport function Separator(props = {}) {\n useStylesheet(sheet);\n forbidChildren(\"Separator\", props);\n const rest = omit(props, \"orientation\", \"decorative\");\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n get role() {\n return (props.decorative ?? true)\n ? \"genericContainer\"\n : \"splitter\";\n },\n get ariaHidden() {\n return (props.decorative ?? true) || null;\n },\n get orientation() {\n return (props.decorative ?? true) ? null : (props.orientation ?? \"horizontal\");\n },\n get \"data-orientation\"() {\n return props.orientation ?? \"horizontal\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-separator\", `zui-separator--${props.orientation ?? \"horizontal\"}`);\n },\n }), true);\n return node;\n}\n","export const sheet = { name: \"KbdStyle\", className: \"zs-526e642f\", css: \".zs-526e642f {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-xs);\\n height: 20px;\\n min-width: 20px;\\n width: fit-content;\\n padding: 0 var(--zui-space-xs);\\n border-radius: var(--zui-radius-sm);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-muted-foreground);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-xs);\\n font-weight: var(--zui-type-weight-medium);\\n pointer-events: none;\\n user-select: none;\\n }\\n.zs-526e642f .zui-icon { --zui-icon-md: 12px; }\\n.zui-tooltip .zs-526e642f {\\n background-color: color-mix(in oklab, var(--zui-color-background) 20%, transparent);\\n color: var(--zui-color-background);\\n }\\n.zui-kbd-group {\\n display: inline-flex;\\n align-items: center;\\n gap: var(--zui-space-xs);\\n }\" };\n","import { part } from \"./shared.js\";\nimport { sheet } from \"./generated/KbdStyle.js\";\nexport const Kbd = part(\"box\", sheet, sheet.className);\nexport const KbdGroup = part(\"box\", sheet, \"zui-kbd-group\");\n","export const sheet = { name: \"ButtonGroupStyle\", className: \"zs-e7b4f881\", css: \".zs-e7b4f881 { display: flex; width: fit-content; align-items: stretch; }\\n.zs-e7b4f881 > .zui-button-group { margin-inline-start: var(--zui-space-sm); }\\n.zs-e7b4f881 > .zui-button-group:first-child { margin-inline-start: 0; }\\n.zs-e7b4f881 > .zui-button-group + * { margin-inline-start: var(--zui-space-sm); }\\n.zs-e7b4f881 > *:focus-visible { position: relative; z-index: 10; }\\n.zs-e7b4f881[data-orientation=\\\"horizontal\\\"] > *:not(:first-child) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-left-width: 0;\\n }\\n.zs-e7b4f881[data-orientation=\\\"horizontal\\\"] > *:not(:last-child) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n.zs-e7b4f881[data-orientation=\\\"vertical\\\"] { flex-direction: column; }\\n.zs-e7b4f881[data-orientation=\\\"vertical\\\"] > *:not(:first-child) {\\n border-top-left-radius: 0;\\n border-top-right-radius: 0;\\n border-top-width: 0;\\n }\\n.zs-e7b4f881[data-orientation=\\\"vertical\\\"] > *:not(:last-child) {\\n border-bottom-left-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n.zui-button-group__text {\\n display: flex;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n padding: 0 var(--zui-space-lg);\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-md);\\n background-color: var(--zui-color-muted);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-sm);\\n box-shadow: var(--zui-shadow-xs);\\n }\\n.zui-button-group__text .zui-icon { pointer-events: none; }\\n.zui-button-group__separator {\\n position: relative;\\n flex-shrink: 0;\\n margin: 0;\\n background-color: var(--zui-color-input);\\n align-self: stretch;\\n width: 1px;\\n }\\n.zs-e7b4f881[data-orientation=\\\"vertical\\\"] > .zui-button-group__separator {\\n width: auto;\\n height: 1px;\\n }\" };\n","import { omit } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { classes, element, forbidChildren, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/ButtonGroupStyle.js\";\nexport function ButtonGroup(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"orientation\");\n return element(\"box\", mergeProps(rest, withDefaults({\n role: \"group\",\n get \"data-orientation\"() {\n return props.orientation ?? \"horizontal\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-button-group\", (props.orientation ?? \"horizontal\") === \"vertical\" && \"zui-button-group--vertical\");\n },\n }));\n}\nexport const ButtonGroupText = part(\"box\", sheet, \"zui-button-group__text\");\nexport function ButtonGroupSeparator(props = {}) {\n useStylesheet(sheet);\n forbidChildren(\"ButtonGroupSeparator\", props);\n const node = createElement(\"box\");\n spread(node, mergeProps(props, withDefaults({ role: \"genericContainer\", ariaHidden: true }, props), {\n get __zguiClass() {\n return classes(\"zui-button-group__separator\");\n },\n }), true);\n return node;\n}\n","import { createSignal, untrack } from \"#solid\";\nexport function createControllable(options, fallback) {\n const initial = untrack(options.defaultValue);\n const [inner, setInner] = createSignal((initial === undefined ? fallback : initial));\n const read = () => {\n const value = options.value();\n return value === undefined ? inner() : value;\n };\n const write = (next) => {\n const controlled = untrack(options.value);\n const previous = controlled === undefined ? untrack(inner) : controlled;\n if (Object.is(previous, next))\n return;\n if (controlled === undefined)\n setInner(() => next);\n untrack(() => options.onChange()?.(next));\n };\n return [read, write];\n}\nexport function callHandler(event, handler) {\n if (!handler)\n return true;\n let cancelled = false;\n handler({\n ...event,\n preventDefault() {\n event.preventDefault();\n cancelled = true;\n },\n });\n return !cancelled;\n}\n","export const sheet = { name: \"AlertStyle\", className: \"zs-677d28c2\", css: \".zs-677d28c2 {\\n position: relative;\\n display: grid;\\n grid-template-columns: auto 1fr;\\n align-items: start;\\n row-gap: calc(var(--zui-space-base) * 0.5);\\n width: 100%;\\n padding: var(--zui-space-md) var(--zui-space-lg);\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-lg);\\n background-color: var(--zui-color-card);\\n color: var(--zui-color-card-foreground);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n }\\n.zs-677d28c2[data-variant=\\\"destructive\\\"] { color: var(--zui-color-destructive); }\\n.zs-677d28c2[data-variant=\\\"destructive\\\"] .zui-alert__description {\\n color: color-mix(in oklab, var(--zui-color-destructive) 90%, transparent);\\n }\\n.zs-677d28c2 > .zui-icon, .zui-alert__icon {\\n grid-column-start: 1;\\n grid-row-start: 1;\\n margin-inline-end: var(--zui-space-md);\\n transform: translateY(2px);\\n color: currentColor;\\n pointer-events: none;\\n }\\n.zui-alert__title {\\n grid-column-start: 2;\\n min-height: var(--zui-space-lg);\\n overflow: hidden;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n font-weight: var(--zui-type-weight-medium);\\n letter-spacing: var(--zui-type-tracking-tight);\\n }\\n.zui-alert__description {\\n grid-column-start: 2;\\n display: grid;\\n justify-items: start;\\n gap: var(--zui-space-xs);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-muted-foreground);\\n }\" };\n","import { omit } from \"#solid\";\nimport { memo, mergeProps } from \"../renderer/index.js\";\nimport { classes, element, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { Icon } from \"./icons.js\";\nimport { ALERT_TRIANGLE, INFO } from \"./generated/icons.js\";\nimport { sheet } from \"./generated/AlertStyle.js\";\nexport const AlertTitle = part(\"label\", sheet, \"zui-alert__title\");\nexport const AlertDescription = part(\"box\", sheet, \"zui-alert__description\");\nexport function Alert(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"variant\", \"live\", \"icon\", \"children\");\n const mark = memo(() => (props.icon ?? true)\n ? Icon({\n get icon() {\n return (props.variant ?? \"default\") === \"destructive\" ? ALERT_TRIANGLE : INFO;\n },\n class: \"zui-alert__icon\",\n })\n : null);\n const content = memo(() => props.children);\n return element(\"box\", mergeProps(rest, withDefaults({\n get role() {\n return (props.live ?? true) ? \"alert\" : \"group\";\n },\n get ariaLive() {\n return (props.live ?? true) ? \"polite\" : null;\n },\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n get \"data-icon\"() {\n return String(props.icon ?? true);\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-alert\", `zui-alert--${props.variant ?? \"default\"}`);\n },\n get children() {\n return [mark, content];\n },\n }));\n}\n","export const sheet = { name: \"AvatarStyle\", className: \"zs-80f55677\", css: \".zs-80f55677 {\\n position: relative;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n flex: none;\\n --zui-avatar-size: max(\\n calc(var(--zui-space-base) * 8),\\n calc(var(--zui-type-size-sm) * 16 / 7)\\n );\\n width: var(--zui-avatar-size);\\n height: var(--zui-avatar-size);\\n border-radius: var(--zui-radius-full);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-muted-foreground);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-sm);\\n user-select: none;\\n }\\n.zs-80f55677[data-size=\\\"sm\\\"] {\\n --zui-avatar-size: max(calc(var(--zui-space-base) * 6), calc(var(--zui-type-size-xs) * 2));\\n font-size: var(--zui-type-size-xs);\\n }\\n.zs-80f55677[data-size=\\\"lg\\\"] {\\n --zui-avatar-size: max(\\n calc(var(--zui-space-base) * 10),\\n calc(var(--zui-type-size-sm) * 20 / 7)\\n );\\n }\\n.zs-80f55677 > .zui-avatar__image {\\n position: absolute;\\n inset: 0;\\n width: 100%;\\n height: 100%;\\n aspect-ratio: 1;\\n border-radius: var(--zui-radius-full);\\n object-fit: cover;\\n }\\n.zs-80f55677 > .zui-avatar__image:state(zgui-image-broken) { display: none; }\\n.zs-80f55677 > .zui-avatar__fallback {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n width: 100%;\\n height: 100%;\\n border-radius: var(--zui-radius-full);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zs-80f55677 > .zui-avatar__badge {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n z-index: 10;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n width: 10px;\\n height: 10px;\\n border-radius: var(--zui-radius-full);\\n background-color: var(--zui-color-primary);\\n color: var(--zui-color-primary-foreground);\\n box-shadow: 0 0 0 2px var(--zui-color-background);\\n user-select: none;\\n }\\n.zs-80f55677 > .zui-avatar__badge .zui-icon { --zui-icon-md: 8px; }\\n.zs-80f55677[data-size=\\\"sm\\\"] > .zui-avatar__badge { width: 8px; height: 8px; }\\n.zs-80f55677[data-size=\\\"sm\\\"] > .zui-avatar__badge .zui-icon { display: none; }\\n.zs-80f55677[data-size=\\\"lg\\\"] > .zui-avatar__badge { width: 12px; height: 12px; }\\n.zui-avatar-group { display: flex; flex-direction: row; align-items: center; }\\n.zui-avatar-group > * { box-shadow: 0 0 0 2px var(--zui-color-background); }\\n.zui-avatar-group > *:not(:first-child) { margin-left: calc(var(--zui-space-base) * -2); }\\n.zui-avatar-group__count {\\n position: relative;\\n display: flex;\\n flex: none;\\n align-items: center;\\n justify-content: center;\\n width: max(calc(var(--zui-space-base) * 8), calc(var(--zui-type-size-sm) * 16 / 7));\\n height: max(calc(var(--zui-space-base) * 8), calc(var(--zui-type-size-sm) * 16 / 7));\\n border-radius: var(--zui-radius-full);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-muted-foreground);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n }\\n.zui-avatar-group[data-size=\\\"sm\\\"] > .zui-avatar-group__count {\\n width: max(calc(var(--zui-space-base) * 6), calc(var(--zui-type-size-xs) * 2));\\n height: max(calc(var(--zui-space-base) * 6), calc(var(--zui-type-size-xs) * 2));\\n font-size: var(--zui-type-size-xs);\\n --zui-icon-md: 12px;\\n }\\n.zui-avatar-group[data-size=\\\"lg\\\"] > .zui-avatar-group__count {\\n width: max(calc(var(--zui-space-base) * 10), calc(var(--zui-type-size-sm) * 20 / 7));\\n height: max(calc(var(--zui-space-base) * 10), calc(var(--zui-type-size-sm) * 20 / 7));\\n --zui-icon-md: 20px;\\n }\" };\n","import { omit } from \"#solid\";\nimport { memo, mergeProps } from \"../renderer/index.js\";\nimport { Image } from \"../image.js\";\nimport { classes, element, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/AvatarStyle.js\";\nexport function AvatarImage(props = {}) {\n useStylesheet(sheet);\n return Image(mergeProps(props, withDefaults({ role: \"image\", ariaHidden: true }, props), {\n get __zguiClass() {\n return classes(\"zui-avatar__image\");\n },\n }));\n}\nexport const AvatarFallback = part(\"box\", sheet, \"zui-avatar__fallback\");\nexport const AvatarGroupCount = part(\"box\", sheet, \"zui-avatar-group__count\");\nexport function AvatarBadge(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"label\");\n return element(\"box\", mergeProps(rest, withDefaults({\n get role() {\n return props.label != null ? \"image\" : \"genericContainer\";\n },\n get ariaHidden() {\n return props.label == null;\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-avatar__badge\");\n },\n }));\n}\nexport function AvatarGroup(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"size\");\n return element(\"box\", mergeProps(rest, withDefaults({\n role: \"group\",\n get \"data-size\"() {\n return props.size ?? \"md\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-avatar-group\");\n },\n }));\n}\nexport function Avatar(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"src\", \"size\", \"label\", \"children\");\n const present = memo(() => props.src != null);\n const image = memo(() => present()\n ? AvatarImage({\n get src() {\n return props.src;\n },\n })\n : null);\n const content = memo(() => props.children);\n return element(\"box\", mergeProps(rest, withDefaults({\n role: \"image\",\n get ariaLabel() {\n return props.label ?? null;\n },\n get ariaHidden() {\n return props.label == null;\n },\n get \"data-size\"() {\n return props.size ?? \"md\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-avatar\", props.size === \"sm\" && \"zui-avatar--sm\", props.size === \"lg\" && \"zui-avatar--lg\");\n },\n get children() {\n return [content, image];\n },\n }));\n}\n","export const sheet = { name: \"EmptyStyle\", className: \"zs-5b5cd5fb\", css: \".zs-5b5cd5fb {\\n display: flex;\\n flex: 1;\\n min-width: 0;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-xl);\\n padding: var(--zui-space-xl);\\n border-width: 0;\\n border-style: dashed;\\n border-color: var(--zui-color-border);\\n border-radius: var(--zui-radius-lg);\\n text-align: center;\\n }\\n@media (min-width: 768px) { .zs-5b5cd5fb { padding: 48px; } }\\n.zui-empty__header {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n max-width: 384px;\\n text-align: center;\\n }\\n.zui-empty__media {\\n display: flex;\\n flex-shrink: 0;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: var(--zui-space-sm);\\n background-color: transparent;\\n }\\n.zui-empty__media .zui-icon { pointer-events: none; flex: none; }\\n.zui-empty__media[data-variant=\\\"icon\\\"] {\\n width: 40px;\\n height: 40px;\\n border-radius: var(--zui-radius-lg);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-foreground);\\n --zui-icon-md: 24px;\\n }\\n.zui-empty__title {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-lg);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-lg);\\n letter-spacing: var(--zui-type-tracking-tight);\\n }\\n.zui-empty__description {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: 1.625;\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-empty__content {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n gap: var(--zui-space-lg);\\n width: 100%;\\n min-width: 0;\\n max-width: 384px;\\n font-size: var(--zui-type-size-sm);\\n }\" };\n","import { omit } from \"#solid\";\nimport { mergeProps } from \"../renderer/index.js\";\nimport { classes, element, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/EmptyStyle.js\";\nexport const Empty = part(\"box\", sheet, sheet.className);\nexport const EmptyHeader = part(\"box\", sheet, \"zui-empty__header\");\nexport const EmptyTitle = part(\"label\", sheet, \"zui-empty__title\");\nexport const EmptyDescription = part(\"box\", sheet, \"zui-empty__description\");\nexport const EmptyContent = part(\"box\", sheet, \"zui-empty__content\");\nexport function EmptyMedia(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"variant\");\n return element(\"box\", mergeProps(rest, withDefaults({\n role: \"genericContainer\",\n ariaHidden: true,\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-empty__media\", props.variant === \"icon\" && \"zui-empty__media--icon\");\n },\n }));\n}\n","export const sheet = { name: \"ItemPartStyle\", className: \"zs-e1ed670c\", css: \".zui-item__media {\\n display: flex;\\n flex-shrink: 0;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-sm);\\n background-color: transparent;\\n }\\n.zui-item__media .zui-icon { pointer-events: none; }\\n.zui-item--described .zui-item__media {\\n align-self: flex-start;\\n transform: translateY(2px);\\n }\\n.zui-item__media[data-variant=\\\"icon\\\"] {\\n width: 32px;\\n height: 32px;\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-sm);\\n background-color: var(--zui-color-muted);\\n }\\n.zui-item__media[data-variant=\\\"image\\\"] {\\n width: 40px;\\n height: 40px;\\n border-radius: var(--zui-radius-sm);\\n overflow: hidden;\\n }\\n.zui-item__media[data-variant=\\\"image\\\"] > * {\\n width: 100%;\\n height: 100%;\\n object-fit: cover;\\n }\\n.zui-item__content {\\n display: flex;\\n flex: 1;\\n flex-direction: column;\\n gap: var(--zui-space-xs);\\n }\\n.zui-item__content + .zui-item__content { flex: none; }\\n.zui-item__title {\\n display: flex;\\n width: fit-content;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: 1.375;\\n }\\n.zui-item__description {\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-normal);\\n line-height: 1.5;\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-item__actions { display: flex; align-items: center; gap: var(--zui-space-sm); }\\n.zui-item__header, .zui-item__footer {\\n display: flex;\\n flex-basis: 100%;\\n align-items: center;\\n justify-content: space-between;\\n gap: var(--zui-space-sm);\\n }\" };\n","export const sheet = { name: \"ItemGroupStyle\", className: \"zs-891ab6fc\", css: \".zs-891ab6fc { display: flex; flex-direction: column; }\\n.zui-item__separator {\\n flex-shrink: 0;\\n height: 1px;\\n margin: 0;\\n background-color: var(--zui-color-border);\\n }\" };\n","import { createContext, createSignal, onCleanup, omit, useContext } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { classes, element, forbidChildren, part, provide, slot, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { sheet } from \"./generated/ItemStyle.js\";\nimport { sheet as partSheet } from \"./generated/ItemPartStyle.js\";\nimport { sheet as groupSheet } from \"./generated/ItemGroupStyle.js\";\nconst ItemContext = createContext(null);\nexport const ItemContent = part(\"box\", partSheet, \"zui-item__content\");\nexport const ItemTitle = part(\"label\", partSheet, \"zui-item__title\");\nexport const ItemActions = part(\"box\", partSheet, \"zui-item__actions\");\nexport const ItemHeader = part(\"box\", partSheet, \"zui-item__header\");\nexport const ItemFooter = part(\"box\", partSheet, \"zui-item__footer\");\nexport function Item(props = {}) {\n useStylesheet(sheet);\n useStylesheet(partSheet);\n const rest = omit(props, \"variant\", \"size\");\n const [descriptions, setDescriptions] = createSignal(0, { ownedWrite: true });\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n get \"data-size\"() {\n return props.size ?? \"md\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-item\", props.variant === \"outline\" && \"zui-item--outline\", props.variant === \"muted\" && \"zui-item--muted\", props.size === \"sm\" && \"zui-item--sm\", descriptions() > 0 && \"zui-item--described\");\n },\n }), true);\n slot(node, provide(ItemContext, () => {\n setDescriptions(count => count + 1);\n onCleanup(() => setDescriptions(count => count - 1));\n }, rest));\n return node;\n}\nexport function ItemMedia(props = {}) {\n useStylesheet(partSheet);\n const rest = omit(props, \"variant\");\n return element(\"box\", mergeProps(rest, withDefaults({\n get \"data-variant\"() {\n return props.variant ?? \"default\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-item__media\", props.variant === \"icon\" && \"zui-item__media--icon\", props.variant === \"image\" && \"zui-item__media--image\");\n },\n }));\n}\nconst descriptionPart = part(\"box\", partSheet, \"zui-item__description\");\nexport function ItemDescription(props = {}) {\n useContext(ItemContext)?.();\n return descriptionPart(props);\n}\nexport const ItemGroup = part(\"box\", groupSheet, groupSheet.className, { role: \"list\" });\nexport function ItemSeparator(props = {}) {\n useStylesheet(groupSheet);\n forbidChildren(\"ItemSeparator\", props);\n return element(\"box\", mergeProps(props, withDefaults({ role: \"genericContainer\", ariaHidden: true }, props), {\n get __zguiClass() {\n return classes(\"zui-item__separator\");\n },\n }));\n}\n","export const sheet = { name: \"InputGroupPartStyle\", className: \"zs-09529e46\", css: \".zui-input-group__addon {\\n display: flex;\\n height: auto;\\n align-items: center;\\n justify-content: center;\\n gap: var(--zui-space-sm);\\n padding: 6px 0;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n font-weight: var(--zui-type-weight-medium);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-muted-foreground);\\n cursor: text;\\n user-select: none;\\n }\\n.zui-input-group__addon[data-align=\\\"inline-start\\\"] { order: -1; padding-left: 12px; }\\n.zui-input-group__addon[data-align=\\\"inline-end\\\"] { order: 1; padding-right: 12px; }\\n.zui-input-group__addon[data-align=\\\"inline-start\\\"] > .zui-button { margin-left: -7.2px; }\\n.zui-input-group__addon[data-align=\\\"inline-end\\\"] > .zui-button { margin-right: -7.2px; }\\n.zui-input-group__addon[data-align=\\\"inline-start\\\"] > .zui-kbd-group { margin-left: -5.6px; }\\n.zui-input-group__addon[data-align=\\\"inline-end\\\"] > .zui-kbd-group { margin-right: -5.6px; }\\n.zui-input-group__addon[data-align=\\\"block-start\\\"] {\\n order: -1;\\n width: 100%;\\n justify-content: flex-start;\\n padding: 12px 12px 0 12px;\\n }\\n.zui-input-group__addon[data-align=\\\"block-end\\\"] {\\n order: 1;\\n width: 100%;\\n justify-content: flex-start;\\n padding: 0 12px 12px 12px;\\n }\\n.zui-input-group__text {\\n display: flex;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-field.zui-input-group__field {\\n flex: 1 1 0%;\\n width: auto;\\n min-width: 0;\\n border: 0;\\n border-radius: 0;\\n background-color: transparent;\\n box-shadow: none;\\n outline: none;\\n }\\n.zui-field.zui-input-group__field:focus-visible { box-shadow: none; border-color: transparent; }\\n.zui-field.zui-input-group__area {\\n flex: 1 1 0%;\\n width: auto;\\n min-width: 0;\\n \\n border: 0;\\n border-radius: 0;\\n background-color: transparent;\\n box-shadow: none;\\n outline: none;\\n padding-top: 12px;\\n padding-bottom: 12px;\\n }\\n.zui-field.zui-input-group__area:focus-visible {\\n box-shadow: none;\\n border-color: transparent;\\n }\\n.zui-button.zui-input-group__button { --zui-button-lift: 0 0 transparent; }\\n.zui-button.zui-input-group__button[data-size=\\\"xs\\\"] {\\n height: 24px;\\n gap: var(--zui-space-xs);\\n padding: 0 8px;\\n border-radius: calc(var(--zui-radius-base) - 5px);\\n --zui-icon-md: 14px;\\n }\\n.zui-button.zui-input-group__button[data-size=\\\"sm\\\"] {\\n height: 30px;\\n gap: calc(var(--zui-space-base) * 1.5);\\n padding: 0 10px;\\n border-radius: var(--zui-radius-md);\\n }\\n.zui-button.zui-input-group__button[data-size=\\\"icon-xs\\\"] {\\n width: 24px;\\n height: 24px;\\n padding: 0;\\n border-radius: calc(var(--zui-radius-base) - 5px);\\n --zui-icon-md: 14px;\\n }\\n.zui-button.zui-input-group__button[data-size=\\\"icon-sm\\\"] {\\n width: 30px;\\n height: 30px;\\n padding: 0;\\n border-radius: var(--zui-radius-md);\\n }\" };\n","import { omit } from \"#solid\";\nimport { mergeProps } from \"../renderer/index.js\";\nimport { classes, element, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { Button } from \"./button.js\";\nimport { Input, Textarea } from \"./input.js\";\nimport { sheet } from \"./generated/InputGroupStyle.js\";\nimport { sheet as partSheet } from \"./generated/InputGroupPartStyle.js\";\nexport function InputGroup(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"disabled\", \"invalid\");\n return element(\"box\", mergeProps(rest, withDefaults({\n role: \"group\",\n get \"data-disabled\"() {\n return String(props.disabled ?? false);\n },\n get \"data-invalid\"() {\n return String(props.invalid ?? false);\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-input-group\");\n },\n }));\n}\nexport function InputGroupAddon(props = {}) {\n useStylesheet(partSheet);\n const rest = omit(props, \"align\");\n return element(\"box\", mergeProps(rest, withDefaults({\n get \"data-align\"() {\n return props.align ?? \"inline-start\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-input-group__addon\", props.align &&\n props.align !== \"inline-start\" &&\n `zui-input-group__addon--${props.align}`);\n },\n }));\n}\nexport const InputGroupText = part(\"box\", partSheet, \"zui-input-group__text\");\nexport function InputGroupButton(props = {}) {\n useStylesheet(partSheet);\n return Button(mergeProps(props, withDefaults({ variant: \"ghost\", size: \"xs\" }, props), {\n get __zguiClass() {\n return classes(\"zui-input-group__button\");\n },\n }));\n}\nexport function InputGroupInput(props = {}) {\n useStylesheet(partSheet);\n return Input(mergeProps(props, {\n get __zguiClass() {\n return classes(\"zui-input-group__field\");\n },\n }));\n}\nexport function InputGroupTextarea(props = {}) {\n useStylesheet(partSheet);\n return Textarea(mergeProps(props, {\n get __zguiClass() {\n return classes(\"zui-input-group__area\");\n },\n }));\n}\n","import { createContext, omit, useContext } from \"#solid\";\nimport { createElement, memo, mergeProps, spread } from \"../renderer/index.js\";\nimport { callHandler, createControllable } from \"../components/state.js\";\nimport { provide, slot, withDefaults } from \"../components/shared.js\";\nimport { createRovingFocus, groupOrientation } from \"./roving.js\";\nconst RadioPrimitiveContext = createContext(null);\nfunction validateRadioValue(value) {\n if (typeof value !== \"string\" || value.length === 0) {\n throw new TypeError(\"Group item value must be a non-empty string\");\n }\n return value;\n}\n/**\n * Unstyled headless radio group (`role=\"radioGroup\"`) with roving tabindex and zero built-in styles.\n */\nexport function RadioGroupPrimitive(props = {}) {\n const rest = omit(props, \"value\", \"defaultValue\", \"onValueChange\", \"disabled\", \"orientation\", \"children\", \"onKeyDown\");\n const [value, choose] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, \"\");\n const axis = memo(() => groupOrientation(props.orientation ?? \"vertical\"));\n const disabled = () => !!props.disabled;\n const node = createElement(\"box\");\n const roving = createRovingFocus(axis);\n spread(node, mergeProps(rest, withDefaults({\n role: \"radioGroup\",\n get disabled() {\n return disabled();\n },\n get orientation() {\n return axis() === \"horizontal\" ? \"horizontal\" : \"vertical\";\n },\n get \"data-orientation\"() {\n return axis();\n },\n }, rest), {\n get onKeyDown() {\n return (event) => {\n if (callHandler(event, props.onKeyDown) && !disabled())\n roving.onKeyDown(event);\n };\n },\n }));\n const context = { node, disabled, value, choose, roving };\n slot(node, provide(RadioPrimitiveContext, context, props));\n return node;\n}\n/**\n * Unstyled headless radio item (`role=\"radioButton\"`) accepting arbitrary children with zero built-in styles.\n */\nexport function RadioItemPrimitive(props) {\n const rest = omit(props, \"value\", \"disabled\", \"children\", \"onClick\", \"onFocus\");\n const group = useContext(RadioPrimitiveContext);\n validateRadioValue(props.value);\n const value = memo(() => validateRadioValue(props.value));\n const disabled = () => !!props.disabled || !!group?.disabled();\n const chosen = () => group?.value() === value();\n const node = createElement(\"control\");\n const item = group?.roving.register(node, disabled, chosen);\n const choose = () => {\n if (disabled())\n return;\n item?.activate();\n group?.choose(value());\n };\n spread(node, mergeProps(rest, withDefaults({\n role: \"radioButton\",\n get tabIndex() {\n return item?.tabIndex() ?? 0;\n },\n get checked() {\n return chosen();\n },\n get disabled() {\n return disabled();\n },\n ariaRadioGroup: group?.node ?? null,\n get \"data-state\"() {\n return chosen() ? \"checked\" : \"unchecked\";\n },\n get \"data-value\"() {\n return value();\n },\n }, rest), {\n get onClick() {\n return (event) => {\n if (callHandler(event, props.onClick))\n choose();\n };\n },\n get onFocus() {\n return (event) => {\n if (callHandler(event, props.onFocus) && event.target === node)\n choose();\n };\n },\n }));\n if (\"children\" in props) {\n slot(node, () => props.children);\n }\n return node;\n}\n","import { createContext, omit, useContext } from \"#solid\";\nimport { createElement, memo, mergeProps, spread } from \"../renderer/index.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { classes, forbidChildren, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nimport { createRovingFocus, groupOrientation } from \"./roving.js\";\nimport { RadioGroupPrimitive, RadioItemPrimitive } from \"../primitives/radio.js\";\nimport { Icon } from \"./icons.js\";\nimport { DISC } from \"./generated/icons.js\";\nimport { TOGGLE_SIZE_CLASSES } from \"./choices.js\";\nimport { sheet as radioGroupSheet } from \"./generated/RadioGroupStyle.js\";\nimport { sheet as radioItemSheet } from \"./generated/RadioItemStyle.js\";\nimport { sheet as toggleGroupSheet } from \"./generated/ToggleGroupStyle.js\";\nimport { sheet as toggleSheet } from \"./generated/ToggleStyle.js\";\nconst ToggleContext = createContext(null);\nfunction itemValue(value) {\n if (typeof value !== \"string\" || value.length === 0)\n throw new TypeError(\"Group item value must be a non-empty string\");\n return value;\n}\nexport function RadioGroup(props = {}) {\n useStylesheet(radioGroupSheet);\n const rest = omit(props, \"label\");\n return RadioGroupPrimitive(mergeProps(rest, withDefaults({\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(radioGroupSheet.className, \"zui-radio-group\");\n },\n }));\n}\nexport function RadioGroupItem(props) {\n useStylesheet(radioItemSheet);\n forbidChildren(\"RadioGroupItem\", props);\n const rest = omit(props, \"label\", \"children\");\n return RadioItemPrimitive(mergeProps(rest, withDefaults({\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(radioItemSheet.className, \"zui-radio-group__item\");\n },\n get children() {\n return Icon({ icon: DISC });\n },\n }));\n}\nfunction toggleValues(current) {\n if (!Array.isArray(current) || !current.every(item => typeof item === \"string\")) {\n throw new TypeError(\"ToggleGroup value must be an array of strings\");\n }\n return current;\n}\nfunction toggleSelection(value) {\n const resolved = value ?? \"single\";\n if (resolved !== \"single\" && resolved !== \"multiple\")\n throw new TypeError(\"ToggleGroup selection must be single or multiple\");\n return resolved;\n}\nfunction toggleSpacing(value) {\n const resolved = value ?? 0;\n if (!Number.isFinite(resolved) || resolved < 0)\n throw new TypeError(\"ToggleGroup spacing must be a finite non-negative number\");\n return String(resolved);\n}\nexport function ToggleGroup(props = {}) {\n useStylesheet(toggleGroupSheet);\n const rest = omit(props, \"value\", \"defaultValue\", \"onValueChange\", \"selection\", \"variant\", \"size\", \"spacing\", \"disabled\", \"orientation\", \"label\", \"children\", \"onKeyDown\");\n const [read, write] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, []);\n toggleValues(read());\n toggleSelection(props.selection);\n toggleSpacing(props.spacing);\n groupOrientation(props.orientation ?? \"horizontal\");\n const values = memo(() => toggleValues(read()));\n const selection = memo(() => toggleSelection(props.selection));\n const spacing = memo(() => toggleSpacing(props.spacing));\n const axis = memo(() => groupOrientation(props.orientation ?? \"horizontal\"));\n const disabled = () => !!props.disabled;\n const variant = () => props.variant ?? \"default\";\n const size = () => props.size ?? \"md\";\n const node = createElement(\"box\");\n const roving = createRovingFocus(axis);\n const toggle = (value) => {\n if (disabled())\n return;\n const next = new Set(values());\n if (next.has(value))\n next.delete(value);\n else {\n if (selection() === \"single\")\n next.clear();\n next.add(value);\n }\n write([...next].sort());\n };\n spread(node, mergeProps(rest, withDefaults({\n role: \"toolbar\",\n get disabled() {\n return disabled();\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n get orientation() {\n return axis() === \"vertical\" ? \"vertical\" : \"horizontal\";\n },\n get \"data-orientation\"() {\n return axis();\n },\n get \"data-variant\"() {\n return variant();\n },\n get \"data-spacing\"() {\n return spacing();\n },\n get __zguiStyle() {\n return { \"--zui-toggle-group-gap\": spacing() };\n },\n }, rest), {\n get __zguiClass() {\n return classes(toggleGroupSheet.className, \"zui-toggle-group\");\n },\n get onKeyDown() {\n return (event) => {\n if (callHandler(event, props.onKeyDown) && !disabled())\n roving.onKeyDown(event);\n };\n },\n }));\n const context = {\n disabled,\n value: values,\n toggle,\n selection,\n variant,\n size,\n roving,\n };\n slot(node, provide(ToggleContext, context, props));\n return node;\n}\nexport function ToggleGroupItem(props) {\n useStylesheet(toggleSheet);\n const rest = omit(props, \"value\", \"variant\", \"size\", \"disabled\", \"label\", \"onClick\", \"onFocus\");\n const group = useContext(ToggleContext);\n itemValue(props.value);\n const value = memo(() => itemValue(props.value));\n const disabled = () => !!props.disabled || !!group?.disabled();\n const variant = () => props.variant ?? group?.variant() ?? \"default\";\n const size = () => props.size ?? group?.size() ?? \"md\";\n const on = () => group?.value().includes(value()) ?? false;\n const node = createElement(\"control\");\n const item = group?.roving.register(node, disabled);\n spread(node, mergeProps(rest, withDefaults({\n get role() {\n return group?.selection() === \"single\" ? \"radioButton\" : \"button\";\n },\n get tabIndex() {\n return item?.tabIndex() ?? 0;\n },\n get checked() {\n return on();\n },\n get disabled() {\n return disabled();\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n get \"data-state\"() {\n return on() ? \"on\" : \"off\";\n },\n get \"data-value\"() {\n return value();\n },\n get \"data-variant\"() {\n return variant();\n },\n get \"data-size\"() {\n return size();\n },\n }, rest), {\n get __zguiClass() {\n return classes(toggleSheet.className, \"zui-toggle\", \"zui-toggle-group__item\", variant() === \"outline\" && \"zui-toggle--outline\", TOGGLE_SIZE_CLASSES[size()]);\n },\n get onClick() {\n return (event) => {\n if (callHandler(event, props.onClick) && !disabled())\n group?.toggle(value());\n };\n },\n get onFocus() {\n return (event) => {\n if (callHandler(event, props.onFocus) && event.target === node && !disabled())\n item?.activate();\n };\n },\n }));\n return node;\n}\n","import { createContext, createMemo, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, effect, mergeProps, ref as applyRefProp, setProp, spread, } from \"../renderer/index.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { classes, isStaticProps, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nimport { createRovingFocus, groupOrientation } from \"./roving.js\";\nimport { sheet } from \"./generated/TabsStyle.js\";\nfunction partValue(value) {\n if (typeof value !== \"string\" || value.length === 0)\n throw new TypeError(\"Tabs part value must be a non-empty string\");\n return value;\n}\nfunction createParts() {\n const items = [];\n const [version, setVersion] = createSignal(0, { ownedWrite: true });\n return {\n register(node, value) {\n const part = { node, value };\n items.push(part);\n setVersion(v => v + 1);\n onCleanup(() => {\n const index = items.indexOf(part);\n if (index >= 0) {\n items.splice(index, 1);\n setVersion(v => v + 1);\n }\n });\n },\n get(value) {\n version();\n return items.find(part => part.value() === value)?.node ?? null;\n },\n };\n}\nconst TabsContext = createContext(null);\nconst ListContext = createContext(null);\nexport function Tabs(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"value\", \"defaultValue\", \"onValueChange\", \"orientation\", \"activation\", \"disabled\", \"label\", \"children\");\n const [read, write] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, \"\");\n const value = createMemo(() => {\n const current = read();\n if (typeof current !== \"string\")\n throw new TypeError(\"Tabs value must be a string\");\n return current;\n });\n const orientation = createMemo(() => groupOrientation(props.orientation ?? \"horizontal\"));\n const activation = createMemo(() => {\n const current = props.activation ?? \"automatic\";\n if (current !== \"automatic\" && current !== \"manual\")\n throw new TypeError(\"Tabs activation must be automatic or manual\");\n return current;\n });\n const disabled = () => !!props.disabled;\n const context = {\n value,\n disabled,\n orientation,\n activation,\n select: value => {\n if (!disabled())\n write(value);\n },\n triggers: createParts(),\n panels: createParts(),\n };\n const node = createElement(\"column\");\n spread(node, mergeProps(rest, withDefaults({\n role: \"group\",\n get disabled() {\n return disabled();\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n get \"data-orientation\"() {\n return orientation();\n },\n get \"data-activation\"() {\n return activation();\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-tabs\");\n },\n }));\n slot(node, provide(TabsContext, context, props));\n return node;\n}\nexport function TabsList(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"variant\", \"label\", \"disabled\", \"children\", \"onKeyDown\");\n const tabs = useContext(TabsContext);\n const axis = () => tabs?.orientation() ?? \"horizontal\";\n const disabled = () => !!props.disabled || !!tabs?.disabled();\n const variant = createMemo(() => {\n const current = props.variant ?? \"default\";\n if (current !== \"default\" && current !== \"line\")\n throw new TypeError(\"TabsList variant must be default or line\");\n return current;\n });\n const roving = createRovingFocus(axis);\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n role: \"tabList\",\n get disabled() {\n return disabled();\n },\n get ariaLabel() {\n return props.label ?? null;\n },\n get orientation() {\n return axis() === \"vertical\" ? \"vertical\" : \"horizontal\";\n },\n get \"data-orientation\"() {\n return axis() === \"vertical\" ? \"vertical\" : \"horizontal\";\n },\n get \"data-variant\"() {\n return variant();\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-tabs__list\", `zui-tabs__list--${variant()}`);\n },\n onKeyDown(event) {\n if (callHandler(event, props.onKeyDown) && !disabled())\n roving.onKeyDown(event);\n },\n }));\n slot(node, provide(ListContext, { tabs, disabled, roving, variant }, props));\n return node;\n}\nexport function TabsTrigger(props) {\n useStylesheet(sheet);\n const tabs = useContext(TabsContext);\n const inherited = useContext(ListContext);\n const list = inherited?.tabs === tabs ? inherited : undefined;\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const val = partValue(props.value);\n const value = () => val;\n const disabled = () => !!props.disabled || !!tabs?.disabled() || !!list?.disabled();\n const selected = () => tabs?.value() === val;\n const node = createElement(\"control\");\n tabs?.triggers.register(node, value);\n const item = list?.roving.register(node, disabled, selected);\n const select = () => {\n if (!disabled()) {\n item?.activate();\n tabs?.select(val);\n }\n };\n const record = props;\n for (const key of Object.keys(record)) {\n if (key === \"value\" ||\n key === \"disabled\" ||\n key === \"onClick\" ||\n key === \"onFocus\" ||\n key === \"children\" ||\n key === \"ref\")\n continue;\n const v = record[key];\n if (v !== undefined)\n setProp(node, key, v);\n }\n if (typeof props.ref === \"function\" || Array.isArray(props.ref)) {\n const refProp = props.ref;\n applyRefProp(() => refProp, node);\n }\n if (props.role === undefined)\n setProp(node, \"role\", \"tab\");\n if (record[\"data-value\"] === undefined)\n setProp(node, \"data-value\", val);\n setProp(node, \"__zguiClass\", \"zui-tabs__trigger\");\n setProp(node, \"onClick\", (event) => {\n if (callHandler(event, props.onClick))\n select();\n });\n setProp(node, \"onFocus\", (event) => {\n if (!callHandler(event, props.onFocus) || event.target !== node || disabled())\n return;\n item?.activate();\n if (tabs?.activation() === \"automatic\")\n select();\n });\n const childrenDesc = Object.getOwnPropertyDescriptor(record, \"children\");\n if (childrenDesc?.get !== undefined)\n slot(node, () => props.children);\n else if (childrenDesc?.value !== undefined)\n slot(node, childrenDesc.value);\n const hasTabIndex = props.tabIndex !== undefined;\n const hasSelected = record.selected !== undefined;\n const hasAriaControls = props.ariaControls !== undefined;\n const hasDataState = record[\"data-state\"] !== undefined;\n const hasDataOrient = record[\"data-orientation\"] !== undefined;\n const hasDataVariant = record[\"data-variant\"] !== undefined;\n effect(() => [\n item?.tabIndex() ?? 0,\n disabled(),\n selected(),\n tabs?.panels.get(val) ?? null,\n tabs?.orientation() === \"vertical\" ? \"vertical\" : \"horizontal\",\n list?.variant() ?? null,\n ], ([tabIndex, isDisabled, isSelected, ariaControls, orientation, variant], prev) => {\n if (!hasTabIndex && (!prev || prev[0] !== tabIndex))\n setProp(node, \"tabIndex\", tabIndex);\n if (!prev || prev[1] !== isDisabled)\n setProp(node, \"disabled\", isDisabled);\n if (!hasSelected && (!prev || prev[2] !== isSelected))\n setProp(node, \"selected\", isSelected);\n if (!hasDataState && (!prev || prev[2] !== isSelected))\n setProp(node, \"data-state\", isSelected ? \"active\" : \"inactive\");\n if (!hasAriaControls && (!prev || prev[3] !== ariaControls))\n setProp(node, \"ariaControls\", ariaControls);\n if (!hasDataOrient && (!prev || prev[4] !== orientation))\n setProp(node, \"data-orientation\", orientation);\n if (!hasDataVariant && (!prev || prev[5] !== variant))\n setProp(node, \"data-variant\", variant);\n });\n return node;\n }\n const rest = omit(props, \"value\", \"disabled\", \"onClick\", \"onFocus\");\n const value = createMemo(() => partValue(props.value));\n const disabled = () => !!props.disabled || !!tabs?.disabled() || !!list?.disabled();\n const selected = () => tabs?.value() === value();\n const node = createElement(\"control\");\n tabs?.triggers.register(node, value);\n const item = list?.roving.register(node, disabled, selected);\n const select = () => {\n if (!disabled()) {\n item?.activate();\n tabs?.select(value());\n }\n };\n spread(node, mergeProps(rest, withDefaults({\n role: \"tab\",\n get tabIndex() {\n return item?.tabIndex() ?? 0;\n },\n get disabled() {\n return disabled();\n },\n get selected() {\n return selected();\n },\n get ariaControls() {\n return tabs?.panels.get(value()) ?? null;\n },\n get \"data-state\"() {\n return selected() ? \"active\" : \"inactive\";\n },\n get \"data-value\"() {\n return value();\n },\n get \"data-orientation\"() {\n return tabs?.orientation() === \"vertical\" ? \"vertical\" : \"horizontal\";\n },\n get \"data-variant\"() {\n return list?.variant() ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-tabs__trigger\");\n },\n onClick(event) {\n if (callHandler(event, props.onClick))\n select();\n },\n onFocus(event) {\n if (!callHandler(event, props.onFocus) || event.target !== node || disabled())\n return;\n item?.activate();\n if (tabs?.activation() === \"automatic\")\n select();\n },\n }));\n return node;\n}\nexport function TabsContent(props) {\n useStylesheet(sheet);\n const tabs = useContext(TabsContext);\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const val = partValue(props.value);\n const value = () => val;\n const selected = () => tabs?.value() === val;\n const node = createElement(\"box\");\n tabs?.panels.register(node, value);\n const record = props;\n for (const key of Object.keys(record)) {\n if (key === \"value\" || key === \"keepMounted\" || key === \"children\" || key === \"ref\")\n continue;\n const v = record[key];\n if (v !== undefined)\n setProp(node, key, v);\n }\n if (typeof props.ref === \"function\" || Array.isArray(props.ref)) {\n const refProp = props.ref;\n applyRefProp(() => refProp, node);\n }\n if (props.role === undefined)\n setProp(node, \"role\", \"tabPanel\");\n if (props.tabIndex === undefined)\n setProp(node, \"tabIndex\", 0);\n if (record[\"data-value\"] === undefined)\n setProp(node, \"data-value\", val);\n setProp(node, \"__zguiClass\", \"zui-tabs__content\");\n const hasAriaHidden = props.ariaHidden !== undefined;\n const hasAriaLabelledBy = props.ariaLabelledBy !== undefined;\n const hasDataState = record[\"data-state\"] !== undefined;\n effect(() => [selected(), tabs?.triggers.get(val) ?? null], ([isSelected, ariaLabelledBy], prev) => {\n if (!hasAriaHidden && (!prev || prev[0] !== isSelected))\n setProp(node, \"ariaHidden\", !isSelected);\n if (!hasDataState && (!prev || prev[0] !== isSelected))\n setProp(node, \"data-state\", isSelected ? \"active\" : \"inactive\");\n if (!hasAriaLabelledBy && (!prev || prev[1] !== ariaLabelledBy))\n setProp(node, \"ariaLabelledBy\", ariaLabelledBy);\n });\n const visible = createMemo(() => !!props.keepMounted || selected());\n slot(node, () => (visible() ? untrack(() => props.children) : null));\n return node;\n }\n const rest = omit(props, \"value\", \"keepMounted\", \"children\");\n const value = createMemo(() => partValue(props.value));\n const selected = () => tabs?.value() === value();\n const node = createElement(\"box\");\n tabs?.panels.register(node, value);\n spread(node, mergeProps(rest, withDefaults({\n role: \"tabPanel\",\n tabIndex: 0,\n get ariaHidden() {\n return !selected();\n },\n get ariaLabelledBy() {\n return tabs?.triggers.get(value()) ?? null;\n },\n get \"data-state\"() {\n return selected() ? \"active\" : \"inactive\";\n },\n get \"data-value\"() {\n return value();\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-tabs__content\");\n },\n }));\n const visible = createMemo(() => !!props.keepMounted || selected());\n slot(node, () => (visible() ? untrack(() => props.children) : null));\n return node;\n}\n","import { $PROXY, createContext, createMemo, createSignal, onCleanup, omit, useContext, } from \"#solid\";\nimport { createElement, effect, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { focus, observeGeometry } from \"../nodes.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { append, classes, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/CollapsibleStyle.js\";\nexport function createDisclosure(root, open, disabled, write) {\n const [trigger, setTrigger] = createSignal(null, { ownedWrite: true });\n const [content, setContent] = createSignal(null, { ownedWrite: true });\n return {\n root,\n open,\n disabled,\n content,\n trigger: () => trigger()?.node ?? null,\n setOpen(next) {\n if (!disabled())\n write(next);\n },\n restoreFocus() {\n const current = trigger();\n focus(current && !current.disabled() ? current.node : root, { reveal: true });\n },\n registerTrigger(node, disabled) {\n setTrigger({ node, disabled });\n onCleanup(() => setTrigger(current => (current?.node === node ? null : current)));\n },\n registerContent(node) {\n setContent(node);\n onCleanup(() => setContent(current => (current === node ? null : current)));\n },\n };\n}\nexport const DisclosureContext = createContext(null);\nexport function Collapsible(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"open\", \"defaultOpen\", \"onOpenChange\", \"disabled\", \"children\");\n const [read, write] = createControllable({\n value: () => props.open,\n defaultValue: () => props.defaultOpen,\n onChange: () => props.onOpenChange,\n }, false);\n const open = createMemo(() => {\n const value = read();\n if (typeof value !== \"boolean\")\n throw new TypeError(\"Collapsible open must be a boolean\");\n return value;\n });\n const node = createElement(\"column\");\n const context = createDisclosure(node, open, () => !!props.disabled, write);\n spread(node, mergeProps(rest, withDefaults({\n tabIndex: -1,\n get \"data-state\"() {\n return open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-collapsible\");\n },\n }));\n slot(node, provide(DisclosureContext, context, props));\n return node;\n}\nexport function CollapsibleTrigger(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"disabled\", \"onClick\");\n const context = useContext(DisclosureContext);\n const disabled = () => !!props.disabled || !!context?.disabled();\n const node = createElement(\"control\");\n context?.registerTrigger(node, disabled);\n spread(node, mergeProps(rest, withDefaults({\n role: \"button\",\n tabIndex: 0,\n get disabled() {\n return disabled();\n },\n get expanded() {\n return context?.open() ?? false;\n },\n get ariaControls() {\n return context?.content() ?? null;\n },\n get \"data-state\"() {\n return context?.open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-collapsible__trigger\");\n },\n onClick(event) {\n if (callHandler(event, props.onClick) && !disabled())\n context?.setOpen(!context.open());\n },\n }));\n return node;\n}\nexport function disclosureContent(props, options = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"children\", \"--zui-collapsible-height\", \"onFocus\", \"onBlur\");\n const context = useContext(DisclosureContext);\n const open = () => context?.open() ?? false;\n const [height, setHeight] = createSignal();\n const [collapsed, setCollapsed] = createSignal(false);\n const [focused, setFocused] = createSignal(false);\n const node = createElement(\"box\");\n context?.registerContent(node);\n const inner = createElement(\"box\");\n setProp(inner, \"class\", classes(\"zui-collapsible__measure\", options.measureClass));\n spread(node, mergeProps(rest, withDefaults({\n ...(options.role !== undefined ? { role: options.role } : {}),\n ...(options.ariaLabelledBy\n ? {\n get ariaLabelledBy() {\n return options.ariaLabelledBy();\n },\n }\n : {}),\n get ariaHidden() {\n return !open();\n },\n get \"data-state\"() {\n return open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-collapsible__content\", options.contentClass);\n },\n get \"data-collapsed\"() {\n return !open() && collapsed() ? \"\" : null;\n },\n get __zguiStyle() {\n const measured = height();\n return {\n \"--zui-collapsible-height\": props[\"--zui-collapsible-height\"] === undefined\n ? measured === undefined\n ? null\n : `${measured}px`\n : props[\"--zui-collapsible-height\"],\n };\n },\n onFocus(event) {\n props.onFocus?.(event);\n setFocused(true);\n },\n onBlur(event) {\n setFocused(false);\n props.onBlur?.(event);\n },\n }));\n if (!($PROXY in props) && Object.getOwnPropertyDescriptor(props, \"children\")?.get === undefined) {\n slot(inner, props.children);\n }\n else {\n slot(inner, () => props.children);\n }\n append(node, inner);\n observeGeometry(inner, \"borderSize\", size => setHeight(Math.ceil(size.height)));\n observeGeometry(node, \"scrollPosition\", value => setCollapsed(value.scrollport.height === 0));\n effect(() => !open() && focused(), shouldRestore => {\n if (shouldRestore)\n context?.restoreFocus();\n });\n return node;\n}\nexport function CollapsibleContent(props = {}) {\n return disclosureContent(props);\n}\n","import { $PROXY, createContext, createMemo, omit, useContext } from \"#solid\";\nimport { createElement, effect, mergeProps, ref as applyRefProp, setProp, spread, } from \"../renderer/index.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { append, classes, element, isStaticProps, provide, slot, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { createRovingFocus } from \"./roving.js\";\nimport { createDisclosure, DisclosureContext, disclosureContent } from \"./collapsible.js\";\nimport { Icon, CHEVRON_DOWN } from \"./icons.js\";\nimport { sheet } from \"./generated/AccordionStyle.js\";\nconst AccordionContext = createContext(null);\nconst accordionGroup = Symbol(\"AccordionGroup\");\nfunction accordionValues(value) {\n if (!Array.isArray(value) || !value.every(item => typeof item === \"string\")) {\n throw new TypeError(\"Accordion value must be an array of strings\");\n }\n return value;\n}\nfunction accordionSelection(value) {\n const resolved = value ?? \"single\";\n if (resolved !== \"single\" && resolved !== \"multiple\") {\n throw new TypeError(\"Accordion selection must be single or multiple\");\n }\n return resolved;\n}\nfunction accordionItemValue(value) {\n if (typeof value !== \"string\" || value.length === 0) {\n throw new TypeError(\"Accordion item value must be a non-empty string\");\n }\n return value;\n}\nfunction accordionHeadingLevel(level) {\n const value = level ?? 3;\n if (!Number.isInteger(value) || value < 1 || value > 0xffffffff) {\n throw new RangeError(\"Accordion heading level must be an integer between 1 and 4294967295\");\n }\n return value;\n}\nexport function Accordion(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"value\", \"defaultValue\", \"onValueChange\", \"selection\", \"collapsible\", \"disabled\", \"children\", \"onKeyDown\");\n const [read, write] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, []);\n accordionValues(read());\n accordionSelection(props.selection);\n const values = createMemo(() => accordionValues(read()));\n const selection = createMemo(() => accordionSelection(props.selection));\n const disabled = () => !!props.disabled;\n const roving = createRovingFocus(() => \"vertical\");\n const context = {\n values,\n disabled,\n roving,\n setOpen(value, open) {\n if (disabled())\n return;\n const next = new Set(values());\n if (open) {\n if (selection() === \"single\")\n next.clear();\n next.add(value);\n }\n else {\n if (selection() === \"single\" && !(props.collapsible ?? true))\n return;\n next.delete(value);\n }\n const sorted = [...next].sort();\n const previous = [...new Set(values())].sort();\n if (sorted.length !== previous.length ||\n sorted.some((value, index) => value !== previous[index]))\n write(sorted);\n },\n };\n const node = createElement(\"column\");\n spread(node, mergeProps(rest, withDefaults({ role: \"group\" }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-accordion\");\n },\n onKeyDown(event) {\n if (callHandler(event, props.onKeyDown) && !disabled())\n roving.onKeyDown(event);\n },\n }));\n slot(node, provide(AccordionContext, context, props));\n return node;\n}\nexport function AccordionItem(props) {\n useStylesheet(sheet);\n const val = accordionItemValue(props.value);\n const group = useContext(AccordionContext);\n if (isStaticProps(props) && !(\"__zguiClass\" in props)) {\n const node = createElement(\"column\");\n const disclosure = {\n ...createDisclosure(node, () => group?.values().includes(val) ?? false, () => !!props.disabled || !!group?.disabled(), next => group?.setOpen(val, next)),\n [accordionGroup]: group,\n };\n const record = props;\n for (const key of Object.keys(record)) {\n if (key === \"value\" || key === \"disabled\" || key === \"children\" || key === \"ref\")\n continue;\n const v = record[key];\n if (v !== undefined)\n setProp(node, key, v);\n }\n if (props.tabIndex === undefined)\n setProp(node, \"tabIndex\", -1);\n if (record[\"data-value\"] === undefined)\n setProp(node, \"data-value\", val);\n setProp(node, \"__zguiClass\", \"zui-accordion__item\");\n if (typeof props.ref === \"function\" || Array.isArray(props.ref)) {\n const refProp = props.ref;\n applyRefProp(() => refProp, node);\n }\n effect(() => (disclosure.open() ? \"open\" : \"closed\"), state => {\n if (record[\"data-state\"] === undefined)\n setProp(node, \"data-state\", state);\n });\n slot(node, provide(DisclosureContext, disclosure, props));\n return node;\n }\n const rest = omit(props, \"value\", \"disabled\", \"children\");\n const value = createMemo(() => accordionItemValue(props.value));\n const node = createElement(\"column\");\n const disclosure = {\n ...createDisclosure(node, () => group?.values().includes(value()) ?? false, () => !!props.disabled || !!group?.disabled(), next => group?.setOpen(value(), next)),\n [accordionGroup]: group,\n };\n spread(node, mergeProps(rest, withDefaults({\n tabIndex: -1,\n get \"data-state\"() {\n return disclosure.open() ? \"open\" : \"closed\";\n },\n get \"data-value\"() {\n return value();\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-accordion__item\");\n },\n }));\n slot(node, provide(DisclosureContext, disclosure, props));\n return node;\n}\nexport function AccordionTrigger(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"level\", \"disabled\", \"children\", \"onClick\", \"onFocus\");\n const context = useContext(DisclosureContext);\n const group = context?.[accordionGroup];\n const disabled = () => !!props.disabled || !!context?.disabled();\n const heading = !($PROXY in props) && Object.getOwnPropertyDescriptor(props, \"level\")?.get === undefined\n ? (() => {\n const box = createElement(\"box\");\n setProp(box, \"class\", \"zui-accordion__header\");\n setProp(box, \"role\", \"heading\");\n setProp(box, \"ariaLevel\", accordionHeadingLevel(props.level));\n return box;\n })()\n : (() => {\n accordionHeadingLevel(props.level);\n const level = createMemo(() => accordionHeadingLevel(props.level));\n return element(\"box\", {\n class: \"zui-accordion__header\",\n role: \"heading\",\n get ariaLevel() {\n return level();\n },\n });\n })();\n const node = createElement(\"control\");\n context?.registerTrigger(node, disabled);\n const item = group?.roving.register(node, disabled);\n const chevron = Icon({\n icon: CHEVRON_DOWN,\n class: \"zui-accordion__chevron\",\n get \"data-state\"() {\n return context?.open() ? \"open\" : \"closed\";\n },\n });\n spread(node, mergeProps(rest, withDefaults({\n role: \"button\",\n get tabIndex() {\n return item?.tabIndex() ?? 0;\n },\n get disabled() {\n return disabled();\n },\n get expanded() {\n return context?.open() ?? false;\n },\n get ariaControls() {\n return context?.content() ?? null;\n },\n get \"data-state\"() {\n return context?.open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-accordion__trigger\");\n },\n get children() {\n return [props.children, chevron];\n },\n onClick(event) {\n if (callHandler(event, props.onClick) && !disabled()) {\n item?.activate();\n context?.setOpen(!context.open());\n }\n },\n onFocus(event) {\n if (callHandler(event, props.onFocus) && event.target === node && !disabled())\n item?.activate();\n },\n }));\n append(heading, node);\n return heading;\n}\nexport function AccordionContent(props = {}) {\n useStylesheet(sheet);\n const context = useContext(DisclosureContext);\n return disclosureContent(props, {\n measureClass: \"zui-accordion__measure\",\n contentClass: \"zui-accordion__content\",\n role: \"region\",\n ariaLabelledBy: () => context?.trigger() ?? null,\n });\n}\n","import { createContext, createEffect, createMemo, createSignal, getOwner, onCleanup, untrack, } from \"#solid\";\nimport { tryBridgeFor } from \"../host.js\";\nimport { isAnimating, registerDismissLayer } from \"../nodes.js\";\nimport { createControllable } from \"../components/state.js\";\nfunction createPresenceLifecycle(present, options) {\n let isMounted = untrack(present);\n const [mountedSignal, setMountedSignal] = createSignal(isMounted);\n const setMounted = (next) => {\n isMounted = next;\n setMountedSignal(next);\n };\n const mounted = () => {\n mountedSignal();\n return isMounted;\n };\n let isJsGateArmed = false;\n const [jsGateArmedSignal, setJsGateArmedSignal] = createSignal(false);\n const setJsGateArmed = (next) => {\n isJsGateArmed = next;\n setJsGateArmedSignal(next);\n };\n const settledAccessor = options?.settled;\n let surface;\n let frame;\n let pending;\n let deadline;\n let generation = 0;\n let exiting = false;\n let cssGateSatisfied = false;\n const clearDeadline = () => {\n if (deadline !== undefined) {\n clearTimeout(deadline);\n deadline = undefined;\n }\n };\n const clearFrameAndPending = () => {\n if (frame !== undefined) {\n cancelAnimationFrame(frame);\n frame = undefined;\n }\n if (pending !== undefined) {\n clearTimeout(pending);\n pending = undefined;\n }\n };\n const cancel = () => {\n generation += 1;\n exiting = false;\n cssGateSatisfied = false;\n clearFrameAndPending();\n clearDeadline();\n if (settledAccessor)\n setJsGateArmed(false);\n };\n const completeExit = () => {\n cancel();\n setMounted(false);\n options?.onExitComplete?.();\n };\n const tryComplete = () => {\n if (!exiting || !cssGateSatisfied)\n return;\n if (untrack(present) || !isMounted)\n return;\n if (settledAccessor && (!isJsGateArmed || !untrack(settledAccessor)))\n return;\n completeExit();\n };\n const scheduleFrame = (cb) => {\n const bridge = surface ? tryBridgeFor(surface) : tryBridgeFor();\n return bridge?.requestAnimationFrame\n ? bridge.requestAnimationFrame(cb)\n : requestAnimationFrame(cb);\n };\n const checkCssGate = () => {\n if (!exiting || cssGateSatisfied)\n return;\n if (!surface || !isAnimating(surface)) {\n cssGateSatisfied = true;\n clearDeadline();\n }\n };\n if (settledAccessor) {\n createEffect(() => {\n jsGateArmedSignal();\n return isJsGateArmed ? Boolean(settledAccessor()) : false;\n }, isSettled => {\n if (isSettled)\n tryComplete();\n });\n }\n createEffect(() => present(), open => {\n cancel();\n if (open) {\n setMounted(true);\n return;\n }\n if (!isMounted)\n return;\n exiting = true;\n cssGateSatisfied = false;\n const current = generation;\n frame = scheduleFrame(() => {\n if (current !== generation)\n return;\n frame = undefined;\n pending = setTimeout(() => {\n if (current !== generation)\n return;\n pending = undefined;\n checkCssGate();\n if (settledAccessor)\n setJsGateArmed(true);\n tryComplete();\n }, 0);\n });\n deadline = setTimeout(() => {\n if (current !== generation)\n return;\n deadline = undefined;\n clearFrameAndPending();\n cssGateSatisfied = true;\n if (settledAccessor)\n setJsGateArmed(true);\n tryComplete();\n }, 1000);\n });\n onCleanup(() => {\n cancel();\n surface = undefined;\n });\n return {\n mounted,\n state: () => (present() ? \"open\" : \"closed\"),\n ref(node) {\n surface = node;\n if (getOwner()) {\n onCleanup(() => {\n if (surface === node)\n surface = undefined;\n });\n }\n },\n onEnd(event) {\n if (exiting &&\n !cssGateSatisfied &&\n frame === undefined &&\n pending === undefined &&\n event.target === surface) {\n checkCssGate();\n tryComplete();\n }\n },\n };\n}\nexport function createPresence(present) {\n return createPresenceLifecycle(present);\n}\nconst EMPTY_RETAINED = { value: undefined };\nfunction isPresentValue(value) {\n return value !== null && value !== undefined;\n}\n/**\n * Retain the last non-nullish payload while exit animations and/or a reactive JS gate (`settled`)\n * finish, then unmount and release the payload atomically.\n */\nexport function createRetainedPresence(source, options) {\n const initialRaw = untrack(source);\n let retainedValue = isPresentValue(initialRaw)\n ? initialRaw\n : undefined;\n const [retained, setRetainedSignal] = createSignal(retainedValue !== undefined ? { value: retainedValue } : EMPTY_RETAINED);\n const setRetained = (next) => {\n retainedValue = next;\n setRetainedSignal(next !== undefined ? { value: next } : EMPTY_RETAINED);\n };\n const present = createMemo(() => isPresentValue(source()));\n const lifecycle = createPresenceLifecycle(present, {\n settled: options?.settled,\n onExitComplete: () => {\n setRetained(undefined);\n },\n });\n createEffect(() => source(), next => {\n if (isPresentValue(next) && !Object.is(retainedValue, next)) {\n setRetained(next);\n }\n });\n onCleanup(() => {\n setRetained(undefined);\n });\n const value = () => {\n const current = source();\n if (isPresentValue(current))\n return current;\n retained();\n return retainedValue;\n };\n return {\n mounted: lifecycle.mounted,\n state: lifecycle.state,\n ref: lifecycle.ref,\n onEnd: lifecycle.onEnd,\n present,\n value,\n };\n}\nfunction reference() {\n const [node, setNode] = createSignal(null, { ownedWrite: true });\n return {\n node,\n ref(value) {\n setNode(value);\n onCleanup(() => setNode(current => (current === value ? null : current)));\n },\n };\n}\nexport function createOverlayState(props = {}) {\n const [read, setOpen] = createControllable({\n value: () => props.open,\n defaultValue: () => props.defaultOpen,\n onChange: () => props.onOpenChange,\n }, false);\n const open = createMemo(() => {\n const value = read();\n if (typeof value !== \"boolean\")\n throw new TypeError(\"Overlay open must be a boolean\");\n return value;\n });\n return {\n open,\n setOpen,\n trigger: reference(),\n content: reference(),\n title: reference(),\n description: reference(),\n };\n}\nexport const OverlayContext = createContext(null);\n/**\n * Owner-scoped reactive dismiss layer decoupled from Portal, Popper, and built-in stylesheets.\n * Works identically inside WindowSurface, LayerSurface, and PopupSurface.\n */\nexport function createDismissLayer(surface, onDismiss, options = {}) {\n const readOptions = typeof options === \"function\" ? options : () => options;\n const handle = registerDismissLayer(surface, onDismiss, untrack(readOptions));\n if (typeof options === \"function\") {\n createEffect(readOptions, next => {\n handle.update(next);\n });\n }\n return handle;\n}\n","import { createContext, createEffect, createRoot, getOwner, onCleanup, omit, runWithOwner, untrack, useContext, } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { sameDocument } from \"../host.js\";\nimport { lockScroll, trapFocus } from \"../nodes.js\";\nimport { allocatePortal } from \"../portal.js\";\nimport { createDismissLayer, createOverlayState, createPresence, OverlayContext, } from \"../primitives/overlay.js\";\nimport { Button } from \"./button.js\";\nimport { Popper } from \"./popper.js\";\nimport { callHandler } from \"./state.js\";\nimport { append, classes, element, provide, slot, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { portalThemeScope, useTheme } from \"./theme.js\";\nimport { sheet } from \"./generated/OverlayStyle.js\";\nexport { createOverlayState, OverlayContext };\nexport function OverlayRoot(props) {\n return provide(OverlayContext, createOverlayState(props), props);\n}\nconst ElevationContext = createContext(null);\nconst layers = [\"content\", \"popover\", \"modal\", \"toast\"];\nexport function raiseSurface(wanted) {\n const parent = useContext(ElevationContext);\n return {\n layer: parent && layers.indexOf(parent.layer) > layers.indexOf(wanted) ? parent.layer : wanted,\n depth: parent ? parent.depth + 1 : 0,\n };\n}\nexport function overlayPortal(elevation, build) {\n useStylesheet(sheet);\n const theme = useTheme();\n const body = () => {\n const box = createElement(\"box\");\n setProp(box, \"class\", \"zui-overlay-depth\");\n setProp(box, \"__zguiInvariantStyle\", { \"--zui-overlay-depth\": String(elevation.depth) });\n const built = untrack(build);\n if (Array.isArray(built)) {\n for (const item of built)\n if (item != null)\n append(box, item);\n }\n else if (built != null) {\n append(box, built);\n }\n return box;\n };\n const root = allocatePortal(elevation.layer);\n const parentOwner = getOwner();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n createEffect(() => true, () => {\n if (cancelled)\n return;\n let disposeBranch;\n runWithOwner(parentOwner, () => {\n createRoot(dispose => {\n disposeBranch = dispose;\n slot(root, provide(ElevationContext, elevation, () => {\n const content = body();\n return theme ? portalThemeScope(theme, content) : content;\n }));\n });\n });\n return () => disposeBranch?.();\n });\n return root;\n}\nfunction mountOverlay(state, props, config) {\n useStylesheet(sheet);\n const presence = createPresence(() => state?.open() ?? false);\n const elevation = raiseSurface(config.layer);\n const holder = createElement(\"box\");\n setProp(holder, \"__zguiInvariantStyle\", { display: \"none\" });\n slot(holder, () => presence.mounted()\n ? untrack(() => overlayPortal(elevation, () => {\n const rest = omit(props, \"children\", \"placement\", \"offset\", \"dismissOnOutsidePress\", \"dismissOnEscape\", \"onAnimationEnd\", \"onAnimationCancel\", \"onTransitionEnd\", \"onTransitionCancel\");\n const context = state;\n const surface = createElement(\"box\");\n context.content.ref(surface);\n presence.ref(surface);\n if (config.trap)\n trapFocus(surface);\n createDismissLayer(surface, reason => {\n if (config.onDismiss)\n config.onDismiss(reason);\n else\n context.setOpen(false);\n }, () => {\n const trigger = context.trigger.node();\n return {\n layer: elevation.layer,\n dismissOnOutsidePress: props.dismissOnOutsidePress ?? true,\n dismissOnEscape: props.dismissOnEscape ?? true,\n exclude: sameDocument(surface, trigger) ? trigger : null,\n leaving: !context.open(),\n };\n });\n if (config.lock)\n createEffect(() => context.open(), open => (open ? lockScroll(surface) : undefined));\n spread(surface, mergeProps(rest, withDefaults({\n ...(config.trap ? { tabIndex: -1 } : {}),\n role: config.role,\n ariaModal: config.trap ?? false,\n get ariaPopupFor() {\n const trigger = context.trigger.node();\n return sameDocument(surface, trigger) ? trigger : null;\n },\n get \"data-state\"() {\n return presence.state();\n },\n }, rest), {\n get __zguiClass() {\n return classes(config.surfaceClass === false ? null : \"zui-surface\", config.class);\n },\n onAnimationEnd(event) {\n props.onAnimationEnd?.(event);\n presence.onEnd(event);\n },\n onAnimationCancel(event) {\n props.onAnimationCancel?.(event);\n presence.onEnd(event);\n },\n onTransitionEnd(event) {\n props.onTransitionEnd?.(event);\n presence.onEnd(event);\n },\n onTransitionCancel(event) {\n props.onTransitionCancel?.(event);\n presence.onEnd(event);\n },\n }), true);\n if (config.children) {\n const built = config.children();\n if (built != null && typeof built === \"object\" && !Array.isArray(built)) {\n append(surface, built);\n }\n else {\n slot(surface, built);\n }\n }\n else {\n slot(surface, () => props.children);\n }\n return config.wrap(surface, presence.state);\n }))\n : null);\n return holder;\n}\nexport function modalSurface(state, props, config) {\n return mountOverlay(state, props, {\n layer: \"modal\",\n class: config.class,\n role: config.role,\n trap: true,\n lock: true,\n children: config.children,\n wrap: (surface, presenceState) => {\n const scrim = element(\"box\", {\n class: classes(sheet.className, \"zui-overlay-scrim\"),\n ariaHidden: true,\n get \"data-state\"() {\n return presenceState();\n },\n });\n return [scrim, surface];\n },\n });\n}\nexport function anchoredSurface(state, props, defaults) {\n return mountOverlay(state, props, {\n layer: \"popover\",\n ...defaults,\n wrap: surface => Popper({\n get anchor() {\n return state.trigger.node();\n },\n get placement() {\n return props.placement;\n },\n get offset() {\n return props.offset;\n },\n class: \"zui-overlay-positioner\",\n children: surface,\n }),\n });\n}\nexport function overlayTrigger(popup, props = {}) {\n const context = useContext(OverlayContext);\n const rest = omit(props, \"onClick\");\n const node = Button(mergeProps(rest, withDefaults({\n get expanded() {\n return context?.open();\n },\n get ariaHasPopup() {\n return context ? popup : null;\n },\n get ariaControls() {\n return context?.content.node() ?? null;\n },\n get \"data-state\"() {\n return context ? (context.open() ? \"open\" : \"closed\") : null;\n },\n }, rest), {\n onClick(event) {\n if (callHandler(event, props.onClick) && !props.disabled)\n context?.setOpen(!context.open());\n },\n }));\n context?.trigger.ref(node);\n return node;\n}\nexport function overlayClose(props = {}) {\n const context = useContext(OverlayContext);\n const rest = omit(props, \"onClick\");\n return Button(mergeProps(rest, withDefaults({ variant: \"ghost\" }, rest), {\n onClick(event) {\n if (callHandler(event, props.onClick) && !props.disabled)\n context?.setOpen(false);\n },\n }));\n}\nfunction overlayLabel(tag, kind, cssSheet, className, props = {}) {\n useStylesheet(cssSheet);\n const context = useContext(OverlayContext);\n const node = element(tag, mergeProps(props, {\n get __zguiClass() {\n return classes(className);\n },\n }));\n context?.[kind].ref(node);\n return node;\n}\nexport function overlayTitle(tag, cssSheet, className, props = {}) {\n return overlayLabel(tag, \"title\", cssSheet, className, props);\n}\nexport function overlayDescription(cssSheet, className, props = {}) {\n return overlayLabel(\"box\", \"description\", cssSheet, className, props);\n}\n","export const sheet = { name: \"DialogStyle\", className: \"zs-bfa40f6c\", css: \".zs-bfa40f6c {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n /* Where it sits, kept apart from how it enters, so the shared surface motion\\n composes with it instead of replacing it. */\\n --zui-surface-place: translate(-50%, -50%);\\n width: 100%;\\n max-width: 512px;\\n max-height: calc(100% - 32px);\\n gap: var(--zui-space-lg);\\n padding: var(--zui-space-xl);\\n outline: none;\\n /* Rounder, lighter and lifted further off the page than the popover the shared\\n surface paints by default. */\\n --zui-surface-radius: var(--zui-radius-lg);\\n --zui-surface-fill: var(--zui-color-background);\\n --zui-surface-ink: var(--zui-color-foreground);\\n --zui-surface-shadow: var(--zui-shadow-lg);\\n }\\n.zs-bfa40f6c {\\n --zui-surface-enter-duration: var(--zui-motion-duration-slow);\\n --zui-surface-exit-duration: var(--zui-motion-duration-slow);\\n }\\n.zui-dialog__header {\\n display: flex;\\n flex-direction: column;\\n gap: var(--zui-space-sm);\\n text-align: left;\\n }\\n.zui-dialog__title {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-lg);\\n font-weight: var(--zui-type-weight-semibold);\\n line-height: 1;\\n }\\n.zui-dialog__description {\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-dialog__footer {\\n display: flex;\\n flex-direction: row;\\n justify-content: flex-end;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n }\\n.zui-dialog__dismiss {\\n position: absolute;\\n right: var(--zui-space-lg);\\n top: var(--zui-space-lg);\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n border: none;\\n background-color: transparent;\\n border-radius: 2px;\\n color: inherit;\\n opacity: 0.7;\\n transition: opacity var(--zui-motion-duration-normal) var(--zui-motion-ease-standard);\\n }\\n.zui-dialog__dismiss:hover { opacity: 1; }\\n.zui-dialog__dismiss:focus-visible {\\n outline: 2px solid var(--zui-color-ring);\\n outline-offset: 2px;\\n }\\n.zui-dialog__dismiss:disabled { pointer-events: none; }\" };\n","import { omit, useContext } from \"#solid\";\nimport { memo, mergeProps } from \"../renderer/index.js\";\nimport { Icon, CROSS } from \"./icons.js\";\nimport { OverlayContext, OverlayRoot, modalSurface, overlayClose, overlayDescription, overlayTitle, overlayTrigger, } from \"./overlay.js\";\nimport { callHandler } from \"./state.js\";\nimport { classes, element, forbidChildren, part, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/DialogStyle.js\";\nexport function Dialog(props = {}) {\n return OverlayRoot(props);\n}\nexport function DialogTrigger(props = {}) {\n return overlayTrigger(\"dialog\", props);\n}\nexport function DialogClose(props = {}) {\n return overlayClose(props);\n}\nexport function DialogDismiss(props = {}) {\n useStylesheet(sheet);\n forbidChildren(\"DialogDismiss\", props);\n const context = useContext(OverlayContext);\n const rest = omit(props, \"onClick\");\n return element(\"control\", mergeProps(rest, withDefaults({ tabIndex: 0, role: \"button\", ariaLabel: \"Close\" }, rest), {\n get __zguiClass() {\n return classes(\"zui-dialog__dismiss\");\n },\n onClick(event) {\n if (callHandler(event, props.onClick) && !props.disabled)\n context?.setOpen(false);\n },\n get children() {\n return Icon({ icon: CROSS });\n },\n }));\n}\nexport const DialogHeader = part(\"column\", sheet, \"zui-dialog__header\");\nexport function DialogTitle(props = {}) {\n return overlayTitle(\"label\", sheet, \"zui-dialog__title\", props);\n}\nexport function DialogDescription(props = {}) {\n return overlayDescription(sheet, \"zui-dialog__description\", props);\n}\nexport function DialogFooter(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"children\", \"closeControl\");\n const content = memo(() => props.children);\n const close = memo(() => props.closeControl ? DialogClose({ variant: \"outline\", children: \"Close\" }) : null);\n return element(\"row\", mergeProps(rest, {\n get __zguiClass() {\n return classes(\"zui-dialog__footer\");\n },\n get children() {\n return [content, close];\n },\n }));\n}\nexport function DialogContent(props = {}) {\n useStylesheet(sheet);\n const context = useContext(OverlayContext);\n const rest = omit(props, \"children\", \"dismissControl\");\n return modalSurface(context, mergeProps(rest, withDefaults({\n get ariaLabelledBy() {\n return context?.title.node() ?? null;\n },\n get ariaDescribedBy() {\n return context?.description.node() ?? null;\n },\n }, rest)), {\n class: `${sheet.className} zui-dialog`,\n role: \"dialog\",\n children() {\n const content = memo(() => props.children);\n const close = memo(() => ((props.dismissControl ?? true) ? DialogDismiss() : null));\n return [content, close];\n },\n });\n}\n","export const sheet = { name: \"PopoverStyle\", className: \"zs-93241666\", css: \".zs-93241666 {\\n width: 288px;\\n max-height: var(--zui-popper-available-height, none);\\n padding: var(--zui-space-lg);\\n outline: none;\\n overflow-y: auto;\\n }\\n.zui-popover__header {\\n display: flex;\\n flex-direction: column;\\n gap: var(--zui-space-xs);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n }\\n.zui-popover__title { font-weight: var(--zui-type-weight-medium); }\\n.zui-popover__description { color: var(--zui-color-muted-foreground); }\" };\n","import { useContext } from \"#solid\";\nimport { mergeProps } from \"../renderer/index.js\";\nimport { anchoredSurface, OverlayContext, OverlayRoot, overlayClose, overlayDescription, overlayTitle, overlayTrigger, } from \"./overlay.js\";\nimport { part, useStylesheet } from \"./shared.js\";\nimport { sheet } from \"./generated/PopoverStyle.js\";\nexport function Popover(props = {}) {\n return OverlayRoot(props);\n}\nexport function PopoverTrigger(props = {}) {\n return overlayTrigger(\"dialog\", props);\n}\nexport function PopoverClose(props = {}) {\n return overlayClose(props);\n}\nexport const PopoverHeader = part(\"column\", sheet, \"zui-popover__header\");\nexport function PopoverTitle(props = {}) {\n return overlayTitle(\"box\", sheet, \"zui-popover__title\", props);\n}\nexport function PopoverDescription(props = {}) {\n return overlayDescription(sheet, \"zui-popover__description\", props);\n}\nexport function PopoverContent(props = {}) {\n useStylesheet(sheet);\n const context = useContext(OverlayContext);\n return anchoredSurface(context, mergeProps({\n get ariaLabelledBy() {\n return context?.title.node() ?? null;\n },\n get ariaDescribedBy() {\n return context?.description.node() ?? null;\n },\n }, props), { class: `${sheet.className} zui-popover`, role: \"dialog\", trap: true });\n}\n","import { createContext, createEffect, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { mergeProps } from \"../renderer/index.js\";\nimport { anchoredSurface, OverlayContext, OverlayRoot } from \"./overlay.js\";\nimport { createDelayed } from \"./delay.js\";\nimport { callHandler } from \"./state.js\";\nimport { classes, element, provide, useStylesheet, withDefaults, } from \"./shared.js\";\nexport function createHandoff() {\n let current;\n return {\n anotherShowing(me) {\n return !!current && current !== me && untrack(current.state.open);\n },\n takeOver(next) {\n const previous = current;\n current = next;\n if (previous && previous !== next) {\n previous.setInstant(true);\n previous.closeNow();\n }\n },\n clear(me) {\n if (current === me)\n current = undefined;\n },\n };\n}\nfunction createHoverIntent(state, delay, closeDelay, handoff) {\n const [instant, setInstant] = createSignal(false);\n const opening = createDelayed(), closing = createDelayed();\n let alive = true;\n const cancel = () => {\n opening.cancel();\n closing.cancel();\n };\n const closeNow = () => {\n cancel();\n if (alive)\n state.setOpen(false);\n };\n const me = { state, setInstant, closeNow };\n const show = () => {\n if (!alive)\n return;\n setInstant(false);\n handoff?.takeOver(me);\n if (alive)\n state.setOpen(true);\n };\n createEffect(() => state.open(), open => {\n if (!open)\n cancel();\n });\n onCleanup(() => {\n alive = false;\n cancel();\n handoff?.clear(me);\n });\n return {\n state,\n instant,\n closeNow,\n openNow() {\n cancel();\n show();\n },\n enter() {\n if (alive) {\n closing.cancel();\n opening.after(handoff?.anotherShowing(me) ? 0 : delay(), show);\n }\n },\n leave() {\n if (alive) {\n opening.cancel();\n closing.after(closeDelay(), () => state.setOpen(false));\n }\n },\n };\n}\nexport const HoverContext = createContext(null);\nexport function HoverRoot(props, defaults) {\n return OverlayRoot(mergeProps(props, {\n get children() {\n const state = useContext(OverlayContext);\n const intent = createHoverIntent(state, () => props.delay ?? defaults.delay(), () => props.closeDelay ?? defaults.closeDelay(), defaults.handoff);\n return provide(HoverContext, intent, props);\n },\n }));\n}\nexport function hoverTrigger(config, props = {}) {\n useStylesheet(config.sheet);\n const intent = useContext(HoverContext), state = intent?.state;\n const rest = omit(props, \"onPointerEnter\", \"onPointerLeave\", \"onFocus\", \"onBlur\", \"onKeyDown\");\n const node = element(\"box\", mergeProps(rest, withDefaults(config.attrs(state), rest), withDefaults({\n get \"data-state\"() {\n return state?.open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(config.class);\n },\n onPointerEnter(event) {\n if (callHandler(event, props.onPointerEnter))\n intent?.enter();\n },\n onPointerLeave(event) {\n if (callHandler(event, props.onPointerLeave))\n intent?.leave();\n },\n onFocus(event) {\n if (callHandler(event, props.onFocus) &&\n (config.focus === \"always\" || event.cause === \"keyboard\"))\n intent?.openNow();\n },\n onBlur(event) {\n if (callHandler(event, props.onBlur))\n intent?.closeNow();\n },\n onKeyDown(event) {\n if (callHandler(event, props.onKeyDown) &&\n event.character == null &&\n event.key === \"Escape\" &&\n state?.open()) {\n event.stopPropagation();\n intent?.closeNow();\n }\n },\n }));\n state?.trigger.ref(node);\n return node;\n}\nexport function hoverSurface(config, props = {}) {\n useStylesheet(config.sheet);\n const intent = useContext(HoverContext);\n const rest = omit(props, \"onPointerEnter\", \"onPointerLeave\");\n return anchoredSurface(intent?.state, mergeProps(rest, withDefaults({ dismissOnOutsidePress: false }, rest), withDefaults(config.attrs?.(intent) ?? {}, rest), {\n onPointerEnter(event) {\n if (callHandler(event, props.onPointerEnter))\n intent?.enter();\n },\n onPointerLeave(event) {\n if (callHandler(event, props.onPointerLeave))\n intent?.leave();\n },\n }), {\n class: `${config.sheet.className} ${config.class}`,\n role: config.role,\n onDismiss: () => intent?.closeNow(),\n });\n}\n","import { Show, createContext, omit, useContext } from \"#solid\";\nimport { memo, mergeProps } from \"../renderer/index.js\";\nimport { HoverRoot, createHandoff, hoverSurface, hoverTrigger } from \"./hover.js\";\nimport { classes, element, forbidChildren, provide, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { sheet } from \"./generated/TooltipStyle.js\";\nconst Group = createContext(null);\nconst defaultOffset = (10 * Math.SQRT2) / 2 - 1 + 4;\nexport function TooltipProvider(props = {}) {\n const value = {\n delay: () => props.delay ?? 0,\n closeDelay: () => props.closeDelay ?? 150,\n handoff: createHandoff(),\n };\n return provide(Group, value, props);\n}\nexport function Tooltip(props = {}) {\n const group = useContext(Group);\n return HoverRoot(props, {\n delay: () => group?.delay() ?? 0,\n closeDelay: () => group?.closeDelay() ?? 150,\n handoff: group?.handoff,\n });\n}\nexport function TooltipTrigger(props = {}) {\n return hoverTrigger({\n sheet,\n class: \"zui-tooltip__trigger\",\n focus: \"keyboard\",\n attrs: state => ({\n get ariaDescribedBy() {\n return state?.content.node() ?? null;\n },\n }),\n }, props);\n}\nexport function TooltipArrow(props = {}) {\n useStylesheet(sheet);\n forbidChildren(\"TooltipArrow\", props);\n return element(\"box\", mergeProps(props, withDefaults({ ariaHidden: true }, props), {\n get __zguiClass() {\n return classes(\"zui-tooltip__arrow\");\n },\n }));\n}\nexport function TooltipContent(props = {}) {\n const rest = omit(props, \"children\", \"placement\", \"offset\", \"arrow\");\n return hoverSurface({\n sheet,\n class: \"zui-tooltip\",\n role: \"tooltip\",\n attrs: intent => ({\n get \"data-instant\"() {\n return intent?.instant() ? \"\" : null;\n },\n }),\n }, mergeProps(rest, {\n get placement() {\n return props.placement ?? { side: \"top\", align: \"center\" };\n },\n get offset() {\n const offset = props.offset ?? defaultOffset;\n return (props.arrow ?? true) ? Math.max(offset, defaultOffset) : offset;\n },\n get children() {\n const content = memo(() => props.children);\n return [\n content,\n Show({\n get when() {\n return props.arrow ?? true;\n },\n get children() {\n return TooltipArrow();\n },\n }),\n ];\n },\n }));\n}\n","export const sheet = { name: \"MenuStyle\", className: \"zs-5a9bebb8\", css: \".zs-5a9bebb8 {\\n min-width: 128px;\\n max-height: var(--zui-popper-available-height, none);\\n padding: var(--zui-space-xs);\\n gap: 0;\\n overflow-x: hidden;\\n overflow-y: auto;\\n }\\n.zui-menu--sub {\\n --zui-surface-shadow: var(--zui-shadow-lg);\\n overflow-x: hidden;\\n overflow-y: auto;\\n }\\n.zui-menu__list, .zui-menu__keys { display: contents; }\\n.zui-menu__item {\\n position: relative;\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n padding: var(--zui-space-base) var(--zui-space-sm);\\n border: none;\\n border-radius: var(--zui-radius-sm);\\n background-color: transparent;\\n outline: none;\\n text-align: left;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-popover-foreground);\\n }\\n.zui-menu__item:focus, .zui-menu__item:hover {\\n background-color: var(--zui-color-accent);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zui-menu__item:disabled { opacity: 0.5; pointer-events: none; }\\n.zui-menu__item[data-state=\\\"open\\\"] {\\n background-color: var(--zui-color-accent);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zui-menu__item--inset, .zui-menu__label--inset { padding-left: var(--zui-space-2xl); }\\n.zui-menu__item--destructive { color: var(--zui-color-destructive); }\\n.zui-menu__item--destructive:focus, .zui-menu__item--destructive:hover {\\n background-color: color-mix(in oklab, var(--zui-color-destructive) 10%, transparent);\\n color: var(--zui-color-destructive);\\n }\\n.zui-menu__item--destructive .zui-icon { color: var(--zui-color-destructive); }\\n.zui-menu__item .zui-icon { color: var(--zui-color-muted-foreground); }\\n.zui-menu__item:focus .zui-icon, .zui-menu__item:hover .zui-icon { color: inherit; }\\n.zui-menu__item--check {\\n padding-left: var(--zui-space-2xl);\\n padding-right: var(--zui-space-sm);\\n }\\n.zui-menu__indicator {\\n position: absolute;\\n left: var(--zui-space-sm);\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n width: 14px;\\n height: 14px;\\n pointer-events: none;\\n }\\n.zui-menu__indicator .zui-icon { color: inherit; }\\n.zui-menu__indicator--dot .zui-icon { width: 8px; height: 8px; }\\n.zui-menu__label {\\n padding: var(--zui-space-base) var(--zui-space-sm);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n font-weight: var(--zui-type-weight-medium);\\n }\\n.zui-menu__separator {\\n height: 1px;\\n margin: var(--zui-space-xs) calc(var(--zui-space-xs) * -1);\\n background-color: var(--zui-color-border);\\n }\\n.zui-menu__shortcut {\\n margin-left: auto;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-xs);\\n letter-spacing: var(--zui-type-tracking-widest);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-menu__chevron { margin-left: auto; }\" };\n","import { $PROXY, createContext, createEffect, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, flush, memo, mergeProps, spread } from \"../renderer/index.js\";\nimport { sameDocument } from \"../host.js\";\nimport { focus, getTextContent, getWindowRect, observeGeometry } from \"../nodes.js\";\nimport { callHandler, createControllable } from \"../components/state.js\";\nimport { provide, slot, withDefaults } from \"../components/shared.js\";\nimport { createDelayed } from \"./delay.js\";\nimport { createDismissLayer, createOverlayState, OverlayContext, } from \"./overlay.js\";\nimport { createRovingFocus } from \"./roving.js\";\nexport const MenuHierarchyContext = createContext(null);\nexport const MenuSurfaceContext = createContext(null);\nexport const MenuRadioContext = createContext(null);\nconst hierarchyInternals = new WeakMap();\nlet subOpenSequence = 0;\nfunction internalHierarchy(hierarchy) {\n return hierarchy ? (hierarchyInternals.get(hierarchy) ?? null) : null;\n}\nfunction findDeepestIn(children) {\n let latest = null;\n for (const child of children) {\n if (!untrack(child.state.open))\n continue;\n if (!latest || child.order() >= latest.order()) {\n latest = child;\n }\n }\n if (!latest)\n return null;\n return latest.hierarchy.findDeepestOpenSub() ?? latest;\n}\n/** Internal helper for styled menu surfaces sharing the same Escape branch policy. */\nexport function closeDeepestMenuSub(hierarchy, reason = \"escape\") {\n return internalHierarchy(hierarchy)?.closeDeepestSub(reason) ?? false;\n}\n/** Internal helper for styled submenu surfaces honoring hover vs keyboard open focus policy. */\nexport function shouldAutoFocusMenuSub(hierarchy) {\n return internalHierarchy(hierarchy)?.sub?.shouldAutoFocus() ?? true;\n}\n/**\n * Pure hover-corridor test checking whether moving from `from` to `to` stays inside the inclusive\n * triangle pointing at `target`'s near vertical edge. All three inputs must share one coordinate frame.\n */\nexport function headingToward(from, to, target) {\n const near = from.x <= target.x ? target.x : target.x + target.width;\n const top = { x: near, y: target.y };\n const bottom = { x: near, y: target.y + target.height };\n const cross = (a, b) => (b.x - a.x) * (to.y - a.y) - (b.y - a.y) * (to.x - a.x);\n const first = cross(from, top);\n const second = cross(top, bottom);\n const third = cross(bottom, from);\n return !((first < 0 || second < 0 || third < 0) && (first > 0 || second > 0 || third > 0));\n}\nexport function createMenuTypeahead(group) {\n const reset = createDelayed();\n let buffer = \"\";\n let alive = true;\n onCleanup(() => {\n alive = false;\n reset.cancel();\n buffer = \"\";\n });\n return (event) => {\n if (!alive || !group || event.isComposing || event.character == null)\n return;\n if (event.character === \" \" && buffer === \"\")\n return;\n buffer += event.character.toLowerCase();\n reset.after(1000, () => {\n buffer = \"\";\n });\n const characters = Array.from(buffer);\n const search = characters.length > 1 && characters.every(character => character === characters[0])\n ? characters[0]\n : buffer;\n if (search &&\n group.focusNext(node => getTextContent(node)\n .replace(/^\\p{White_Space}+/u, \"\")\n .toLowerCase()\n .startsWith(search))) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n}\nexport function createMenuRow(props, options) {\n const surface = useContext(MenuSurfaceContext);\n const rest = omit(props, \"children\", \"ref\", \"onClick\", \"onPointerDown\", \"onPointerEnter\", \"onPointerLeave\", \"onFocus\", \"onBlur\");\n const node = createElement(\"control\");\n const disabled = options.disabled ?? (() => !!props.disabled);\n const emitDataHooks = options.emitDataHooks ?? true;\n const item = surface?.roving.register(node, disabled);\n const [highlighted, setHighlighted] = createSignal(false);\n let within = false;\n let alive = true;\n onCleanup(() => {\n alive = false;\n within = false;\n });\n const activate = () => {\n item?.activate();\n focus(node);\n };\n const defocus = () => {\n if (!within)\n return;\n const target = surface?.node();\n if (target)\n focus(target);\n };\n const classLayer = options.classGetter\n ? [\n {\n get __zguiClass() {\n return options.classGetter();\n },\n },\n ]\n : [];\n const dataHooksLayer = emitDataHooks\n ? [\n withDefaults({\n get \"data-highlighted\"() {\n return highlighted() && !disabled() ? \"true\" : null;\n },\n get \"data-disabled\"() {\n return disabled() ? \"true\" : null;\n },\n }, rest),\n ]\n : [];\n const extraProps = typeof options.extra === \"function\" ? options.extra(node) : options.extra;\n spread(node, mergeProps(rest, ...(extraProps ? [withDefaults(extraProps, rest)] : []), withDefaults({\n role: options.role,\n get tabIndex() {\n return item?.tabIndex() ?? (disabled() ? -1 : 0);\n },\n }, rest), ...dataHooksLayer, ...(options.overrides ? [options.overrides] : []), ...classLayer, {\n ref(value) {\n if (typeof props.ref === \"function\")\n props.ref(value);\n },\n onClick(event) {\n if (callHandler(event, props.onClick) && alive && !disabled())\n options.select();\n },\n onPointerDown(event) {\n if (callHandler(event, props.onPointerDown) &&\n alive &&\n !disabled() &&\n event.button === \"primary\" &&\n (options.activateOnPress ?? true)) {\n event.activateNow();\n }\n },\n onPointerEnter(event) {\n if (callHandler(event, props.onPointerEnter) && alive && !disabled()) {\n if (options.enter)\n options.enter(activate);\n else\n activate();\n }\n },\n onPointerLeave(event) {\n if (!callHandler(event, props.onPointerLeave) || !alive)\n return;\n if (options.leave)\n options.leave(event, defocus);\n else\n defocus();\n },\n onFocus(event) {\n within = true;\n if (emitDataHooks && alive && !disabled())\n setHighlighted(true);\n if (callHandler(event, props.onFocus) && alive && !disabled())\n item?.activate();\n },\n onBlur(event) {\n within = false;\n if (emitDataHooks)\n setHighlighted(false);\n props.onBlur?.(event);\n },\n }), true);\n return node;\n}\nexport function provideMenuHierarchyRoot(state, onDismiss, source) {\n const children = new Set();\n let alive = true;\n let closingNow = false;\n let wasOpen = untrack(state.open);\n createEffect(() => state.open(), open => {\n if (open)\n wasOpen = true;\n });\n onCleanup(() => {\n alive = false;\n children.clear();\n });\n const dismiss = () => {\n if (!alive)\n return;\n closingNow = true;\n try {\n onDismiss();\n }\n finally {\n closingNow = false;\n }\n };\n const hierarchy = { state, dismissCascade: dismiss };\n const internal = {\n ownState: state,\n parent: null,\n children,\n isClosing() {\n return !alive || closingNow || (wasOpen && !untrack(state.open));\n },\n findDeepestOpenSub() {\n return findDeepestIn(children);\n },\n closeDeepestSub(reason) {\n const deepest = findDeepestIn(children);\n if (!deepest)\n return false;\n deepest.closeSelf(reason);\n return true;\n },\n closeSiblingSubs(except) {\n for (const sibling of [...children]) {\n if (sibling !== except)\n sibling.closeSubtree();\n }\n },\n cancelSiblingOpening(except) {\n for (const sibling of children) {\n if (sibling !== except)\n sibling.cancelOpening();\n }\n },\n };\n hierarchyInternals.set(hierarchy, internal);\n return provide(MenuHierarchyContext, hierarchy, source);\n}\n/**\n * Headless menu root providing OverlayContext and MenuHierarchyContext with zero Portal,\n * Popper, or stylesheet coupling. Suitable for WindowSurface, LayerSurface, and PopupSurface.\n */\nexport function MenuRootPrimitive(props = {}) {\n const state = createOverlayState(props);\n return provide(OverlayContext, state, () => provideMenuHierarchyRoot(state, () => {\n state.setOpen(false);\n props.onDismiss?.();\n }, props));\n}\n/**\n * Headless nested submenu root providing cascading dismissal, sibling replacement,\n * open-branch tracking, and hover-intent closing timer.\n */\nexport function MenuSubPrimitive(props = {}) {\n const state = createOverlayState(props);\n const closing = createDelayed();\n const parent = useContext(MenuHierarchyContext);\n const parentInternal = internalHierarchy(parent);\n const children = new Set();\n const openings = new Set();\n let focusFirstCallback;\n let alive = true;\n let closingNow = false;\n let wasOpen = untrack(state.open);\n let openMode = \"programmatic\";\n let lastOpenOrder = untrack(state.open) ? ++subOpenSequence : 0;\n const cancelOpening = () => {\n for (const timer of openings)\n timer.cancel();\n };\n const cancelBranchClosing = () => {\n closing.cancel();\n parentInternal?.sub?.cancelBranchClosing();\n };\n const closeSubtree = () => {\n if (!alive)\n return;\n cancelOpening();\n closing.cancel();\n for (const child of [...children]) {\n child.closeSubtree();\n }\n if (untrack(state.open)) {\n closingNow = true;\n try {\n state.setOpen(false);\n }\n finally {\n closingNow = false;\n }\n }\n };\n const closeSelf = (reason) => {\n if (!alive || !untrack(state.open))\n return;\n cancelOpening();\n closing.cancel();\n const triggerBefore = untrack(state.trigger.node);\n const contentBefore = untrack(state.content.node);\n const wasSameDocument = sameDocument(triggerBefore, contentBefore);\n closingNow = true;\n try {\n state.setOpen(false);\n flush();\n }\n finally {\n closingNow = false;\n }\n if (!alive || untrack(state.open))\n return;\n if ((reason === \"keyboard\" || reason === \"escape\") &&\n wasSameDocument &&\n !(parentInternal?.isClosing() ?? false)) {\n const liveTrigger = untrack(state.trigger.node);\n if (liveTrigger && liveTrigger === triggerBefore) {\n focus(liveTrigger);\n }\n }\n };\n const internal = {\n ownState: state,\n parent: parentInternal,\n children,\n isClosing() {\n return (!alive ||\n closingNow ||\n (wasOpen && !untrack(state.open)) ||\n (parentInternal?.isClosing() ?? false));\n },\n findDeepestOpenSub() {\n return findDeepestIn(children);\n },\n closeDeepestSub(reason) {\n const deepest = findDeepestIn(children);\n if (!deepest)\n return false;\n deepest.closeSelf(reason);\n return true;\n },\n closeSiblingSubs(except) {\n for (const sibling of [...children]) {\n if (sibling !== except)\n sibling.closeSubtree();\n }\n },\n cancelSiblingOpening(except) {\n for (const sibling of children) {\n if (sibling !== except)\n sibling.cancelOpening();\n }\n },\n };\n const branch = {\n state,\n closing,\n hierarchy: internal,\n order: () => lastOpenOrder,\n openFrom(mode) {\n if (!alive)\n return;\n cancelBranchClosing();\n parentInternal?.cancelSiblingOpening(branch);\n openMode = mode;\n const wasMounted = untrack(state.content.node) !== null;\n if (untrack(state.open)) {\n lastOpenOrder = ++subOpenSequence;\n parentInternal?.closeSiblingSubs(branch);\n if (mode === \"keyboard\" && wasMounted) {\n focusFirstCallback?.();\n }\n return;\n }\n state.setOpen(true);\n if (untrack(state.open)) {\n lastOpenOrder = ++subOpenSequence;\n parentInternal?.closeSiblingSubs(branch);\n if (mode === \"keyboard\" && wasMounted) {\n focusFirstCallback?.();\n }\n }\n },\n shouldAutoFocus() {\n return openMode !== \"hover\";\n },\n cancelOpening,\n cancelBranchClosing,\n cancelSiblingOpening() {\n parentInternal?.cancelSiblingOpening(branch);\n },\n closeSelf,\n closeSubtree,\n registerOpening(timer) {\n openings.add(timer);\n },\n unregisterOpening(timer) {\n openings.delete(timer);\n },\n registerFocusFirst(callback) {\n focusFirstCallback = callback;\n },\n unregisterFocusFirst(callback) {\n if (focusFirstCallback === callback)\n focusFirstCallback = undefined;\n },\n };\n internal.sub = branch;\n parentInternal?.children.add(branch);\n createEffect(() => state.open(), open => {\n if (open) {\n wasOpen = true;\n lastOpenOrder = ++subOpenSequence;\n closing.cancel();\n parentInternal?.closeSiblingSubs(branch);\n }\n else {\n cancelOpening();\n closing.cancel();\n openMode = \"programmatic\";\n }\n });\n onCleanup(() => {\n alive = false;\n cancelOpening();\n closing.cancel();\n openings.clear();\n children.clear();\n focusFirstCallback = undefined;\n parentInternal?.children.delete(branch);\n });\n const node = {\n state: parent?.state ?? state,\n dismissCascade() {\n if (!alive)\n return;\n cancelOpening();\n closing.cancel();\n closingNow = true;\n try {\n state.setOpen(false);\n parent?.dismissCascade();\n }\n finally {\n closingNow = false;\n }\n },\n sub: { state, closing },\n };\n hierarchyInternals.set(node, internal);\n return provide(OverlayContext, state, () => provide(MenuHierarchyContext, node, props));\n}\nfunction attachPrimitiveChildren(node, props) {\n if (!($PROXY in props) && Object.getOwnPropertyDescriptor(props, \"children\")?.get === undefined) {\n if (props.children !== undefined)\n slot(node, props.children);\n return;\n }\n slot(node, memo(() => props.children));\n}\n/**\n * Headless submenu trigger (`role=\"menuItem\"`, `ariaHasPopup=\"menu\"`) opening on named\n * `ArrowRight` / `Enter` / `Space` / click or hover after 120 ms, with same-document\n * DPI-aware hover corridor and cross-`PopupSurface` 180 ms grace timer.\n */\nexport function MenuSubTriggerPrimitive(props = {}) {\n const hierarchy = useContext(MenuHierarchyContext);\n const internal = internalHierarchy(hierarchy);\n const sub = internal?.sub;\n const state = sub?.state ?? hierarchy?.sub?.state;\n const opening = createDelayed();\n const closing = sub?.closing ?? hierarchy?.sub?.closing ?? createDelayed();\n const rest = omit(props, \"children\", \"onPointerMove\", \"onKeyDown\");\n let alive = true;\n let scale = 1;\n let last = { x: 0, y: 0 };\n sub?.registerOpening(opening);\n createEffect(() => !!props.disabled, disabled => {\n if (disabled) {\n opening.cancel();\n closing.cancel();\n }\n });\n onCleanup(() => {\n alive = false;\n opening.cancel();\n sub?.unregisterOpening(opening);\n if (!sub && !hierarchy?.sub)\n closing.cancel();\n });\n const device = (point) => ({\n x: Math.fround(point.x * scale),\n y: Math.fround(point.y * scale),\n });\n const node = createMenuRow(mergeProps(rest, {\n onPointerMove(event) {\n if (callHandler(event, props.onPointerMove) && alive) {\n last = device(event.position);\n }\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown) ||\n !alive ||\n props.disabled ||\n !state ||\n event.isComposing ||\n event.character != null) {\n return;\n }\n if (event.key === \"ArrowRight\" || event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n event.stopPropagation();\n if (sub)\n sub.openFrom(\"keyboard\");\n else\n state.setOpen(true);\n }\n },\n }), {\n role: \"menuItem\",\n disabled: () => !!props.disabled,\n activateOnPress: false,\n extra: triggerNode => ({\n ariaHasPopup: \"menu\",\n get expanded() {\n return state?.open() ?? false;\n },\n get ariaControls() {\n const content = state?.content.node() ?? null;\n return sameDocument(triggerNode, content) ? content : null;\n },\n get \"data-state\"() {\n return state?.open() ? \"open\" : \"closed\";\n },\n }),\n select() {\n opening.cancel();\n closing.cancel();\n if (sub)\n sub.openFrom(\"pointer\");\n else\n state?.setOpen(true);\n },\n enter(activate) {\n if (sub) {\n sub.cancelBranchClosing();\n sub.cancelSiblingOpening();\n }\n else {\n closing.cancel();\n }\n activate();\n if (alive && state) {\n opening.after(120, () => {\n if (!alive || props.disabled)\n return;\n if (sub)\n sub.openFrom(\"hover\");\n else\n state.setOpen(true);\n });\n }\n },\n leave(event, defocus) {\n opening.cancel();\n if (!state?.open()) {\n defocus();\n return;\n }\n const surface = untrack(state.content.node);\n if (sameDocument(node, surface)) {\n const rect = surface ? getWindowRect(surface) : null;\n if (rect &&\n headingToward(last, device(event.position), {\n ...device(rect),\n width: Math.fround(rect.width * scale),\n height: Math.fround(rect.height * scale),\n })) {\n return;\n }\n }\n closing.after(180, () => state.setOpen(false));\n },\n });\n state?.trigger.ref(node);\n observeGeometry(node, \"viewport\", viewport => {\n scale = viewport.scale;\n });\n if (\"children\" in props) {\n attachPrimitiveChildren(node, props);\n }\n return node;\n}\nfunction createMenuSurfaceNode(props, options) {\n const hierarchy = useContext(MenuHierarchyContext);\n const internal = internalHierarchy(hierarchy);\n const sub = options.isSub ? internal?.sub : undefined;\n const state = (options.isSub\n ? (sub?.state ?? hierarchy?.sub?.state)\n : (hierarchy?.sub?.state ?? hierarchy?.state)) ?? useContext(OverlayContext);\n const orientation = () => props.orientation ?? \"vertical\";\n const roving = createRovingFocus(orientation, \"active\");\n const onTypeahead = createMenuTypeahead(roving);\n const rest = options.isSub\n ? omit(props, \"children\", \"ref\", \"orientation\", \"autoFocus\", \"typeahead\", \"dismissOnEscape\", \"dismissOnOutsidePress\", \"dismissLayer\", \"onDismiss\", \"label\", \"onKeyDown\", \"onPointerEnter\")\n : omit(props, \"children\", \"ref\", \"orientation\", \"autoFocus\", \"typeahead\", \"dismissOnEscape\", \"dismissOnOutsidePress\", \"dismissLayer\", \"onDismiss\", \"label\", \"onKeyDown\");\n const node = createElement(\"box\");\n state?.content.ref(node);\n let alive = true;\n if (sub) {\n const focusFirst = () => roving.focusFirst();\n sub.registerFocusFirst(focusFirst);\n onCleanup(() => {\n alive = false;\n sub.unregisterFocusFirst(focusFirst);\n });\n }\n else {\n onCleanup(() => {\n alive = false;\n });\n }\n const dismiss = (reason) => {\n if (!alive)\n return;\n if (reason === \"escape\" && internal?.closeDeepestSub(\"escape\")) {\n return;\n }\n if (props.onDismiss) {\n props.onDismiss(reason);\n return;\n }\n if (sub) {\n sub.closeSelf(reason);\n }\n else {\n hierarchy?.dismissCascade();\n }\n };\n if (props.dismissLayer) {\n const layer = props.dismissLayer;\n createDismissLayer(node, dismiss, () => {\n const trigger = state?.trigger.node() ?? null;\n return {\n layer,\n dismissOnOutsidePress: props.dismissOnOutsidePress ?? true,\n dismissOnEscape: props.dismissOnEscape ?? true,\n exclude: sameDocument(node, trigger) ? trigger : null,\n leaving: state ? !state.open() : false,\n };\n });\n }\n const defaultAutoFocus = options.isSub ? (sub?.shouldAutoFocus() ?? true) : true;\n let focused = false;\n createEffect(() => ((props.autoFocus ?? defaultAutoFocus) && !focused ? roving.firstEnabled() : undefined), first => {\n if ((props.autoFocus ?? defaultAutoFocus) && !focused && first && roving.focusFirst()) {\n focused = true;\n }\n });\n const subDefaults = options.isSub\n ? [\n withDefaults({\n get ariaPopupFor() {\n const trigger = state?.trigger.node() ?? null;\n return sameDocument(node, trigger) ? trigger : null;\n },\n }, rest),\n ]\n : [];\n const subPointerLayer = options.isSub\n ? [\n {\n onPointerEnter(event) {\n if (callHandler(event, props.onPointerEnter) && alive) {\n if (sub)\n sub.cancelBranchClosing();\n else\n hierarchy?.sub?.closing.cancel();\n }\n },\n },\n ]\n : [];\n spread(node, mergeProps(rest, ...subDefaults, withDefaults({\n role: \"menu\",\n tabIndex: -1,\n get ariaLabel() {\n return props.label ?? null;\n },\n get \"data-orientation\"() {\n return orientation();\n },\n get \"data-state\"() {\n return state ? (state.open() ? \"open\" : \"closed\") : \"open\";\n },\n }, rest), ...subPointerLayer, {\n ref(value) {\n if (typeof props.ref === \"function\")\n props.ref(value);\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown) || !alive)\n return;\n if (event.isComposing)\n return;\n if (options.isSub && event.character == null && event.key === \"ArrowLeft\") {\n event.preventDefault();\n event.stopPropagation();\n if (!internal?.closeDeepestSub(\"keyboard\")) {\n if (sub)\n sub.closeSelf(\"keyboard\");\n else\n state?.setOpen(false);\n }\n return;\n }\n if ((props.dismissOnEscape ?? true) &&\n event.character == null &&\n event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n dismiss(\"escape\");\n return;\n }\n if (callHandler(event, roving.onKeyDown) && (props.typeahead ?? true)) {\n onTypeahead(event);\n }\n },\n }), true);\n const surfaceValue = {\n node: () => node,\n roving,\n };\n slot(node, provide(MenuSurfaceContext, surfaceValue, props));\n return node;\n}\n/**\n * Headless menu list container (`role=\"menu\"`) with roving keyboard navigation, typeahead,\n * optional Escape/dismiss handling, and zero built-in styling.\n */\nexport function MenuListPrimitive(props = {}) {\n return createMenuSurfaceNode(props, { isSub: false });\n}\n/**\n * Headless submenu list container (`role=\"menu\"`) sharing the same single-node roving,\n * typeahead, hover-grace cancellation, and deepest-branch `ArrowLeft`/`Escape` policy.\n * Caller owns conditional mounting, `Portal`/`Popper`, or `PopupSurface`.\n */\nexport function MenuSubContentPrimitive(props = {}) {\n return createMenuSurfaceNode(props, { isSub: true });\n}\n/**\n * Headless menu item (`role=\"menuItem\"`) with roving focus, hover highlight,\n * `data-highlighted` / `data-disabled` styling hooks, and zero stylesheets.\n */\nexport function MenuItemPrimitive(props = {}) {\n const menu = useContext(MenuHierarchyContext);\n const rest = omit(props, \"children\", \"closeOnSelect\", \"onSelect\");\n const node = createMenuRow(rest, {\n role: \"menuItem\",\n disabled: () => !!props.disabled,\n select() {\n props.onSelect?.();\n if (props.closeOnSelect ?? true) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n attachPrimitiveChildren(node, props);\n return node;\n}\n/**\n * Headless checkbox menu item (`role=\"menuItemCheckBox\"`) exposing `checked`,\n * `data-state=\"checked\" | \"unchecked\"`, `data-highlighted`, and `data-disabled`.\n */\nexport function MenuCheckboxItemPrimitive(props = {}) {\n const menu = useContext(MenuHierarchyContext);\n const rest = omit(props, \"children\", \"checked\", \"defaultChecked\", \"onCheckedChange\", \"closeOnSelect\");\n const [read, write] = createControllable({\n value: () => props.checked,\n defaultValue: () => props.defaultChecked,\n onChange: () => props.onCheckedChange,\n }, false);\n const validate = (value) => {\n if (typeof value !== \"boolean\") {\n throw new TypeError(\"MenuCheckboxItemPrimitive checked must be a boolean\");\n }\n return value;\n };\n validate(untrack(read));\n const checked = memo(() => validate(read()));\n const node = createMenuRow(rest, {\n role: \"menuItemCheckBox\",\n disabled: () => !!props.disabled,\n overrides: {\n get checked() {\n return checked();\n },\n get \"data-state\"() {\n return checked() ? \"checked\" : \"unchecked\";\n },\n },\n select() {\n write(!checked());\n if (props.closeOnSelect ?? true) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n attachPrimitiveChildren(node, props);\n return node;\n}\n/**\n * Headless radio group (`role=\"group\"`) for `MenuRadioItemPrimitive`.\n */\nexport function MenuRadioGroupPrimitive(props = {}) {\n const rest = omit(props, \"children\", \"value\", \"defaultValue\", \"onValueChange\", \"label\");\n const [read, choose] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, \"\");\n const validate = (current) => {\n if (typeof current !== \"string\") {\n throw new TypeError(\"MenuRadioGroupPrimitive value must be a string\");\n }\n return current;\n };\n validate(untrack(read));\n const value = memo(() => validate(read()));\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n role: \"group\",\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest)), true);\n slot(node, provide(MenuRadioContext, { value, choose }, props));\n return node;\n}\n/**\n * Headless radio menu item (`role=\"menuItemRadio\"`) exposing `checked`,\n * `data-state=\"checked\" | \"unchecked\"`, `data-value`, `data-highlighted`, and `data-disabled`.\n */\nexport function MenuRadioItemPrimitive(props) {\n const menu = useContext(MenuHierarchyContext);\n const radio = useContext(MenuRadioContext);\n const rest = omit(props, \"children\", \"value\", \"closeOnSelect\");\n const validate = (current) => {\n if (typeof current !== \"string\" || !current) {\n throw new TypeError(\"MenuRadioItemPrimitive value must be a non-empty string\");\n }\n return current;\n };\n validate(props.value);\n const value = memo(() => validate(props.value));\n const checked = () => radio?.value() === value();\n const node = createMenuRow(rest, {\n role: \"menuItemRadio\",\n disabled: () => !!props.disabled,\n overrides: {\n get checked() {\n return checked();\n },\n get \"data-state\"() {\n return checked() ? \"checked\" : \"unchecked\";\n },\n get \"data-value\"() {\n return value();\n },\n },\n select() {\n radio?.choose(value());\n if (props.closeOnSelect ?? true) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n attachPrimitiveChildren(node, props);\n return node;\n}\n","export const sheet = { name: \"MenubarStyle\", className: \"zs-2e7f522b\", css: \".zs-2e7f522b {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-xs);\\n height: 34px;\\n padding: var(--zui-space-xs);\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-md);\\n background-color: var(--zui-color-background);\\n box-shadow: var(--zui-shadow-xs);\\n }\\n.zui-menubar__menu { display: inline-flex; }\\n.zui-menubar__arrows { display: contents; }\\n.zui-menubar__trigger {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n padding: var(--zui-space-xs) var(--zui-space-sm);\\n border: none;\\n border-radius: var(--zui-radius-sm);\\n background-color: transparent;\\n color: var(--zui-color-foreground);\\n outline: none;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n font-weight: var(--zui-type-weight-medium);\\n }\\n.zui-menubar__trigger:hover,\\n .zui-menubar__trigger:focus-visible,\\n .zui-menubar__trigger[data-state=\\\"open\\\"] {\\n background-color: var(--zui-color-accent);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zui-menubar__trigger:focus-visible {\\n outline: 2px solid var(--zui-color-ring);\\n outline-offset: 2px;\\n }\\n.zui-menubar__content {\\n display: flex;\\n flex-direction: column;\\n min-width: 192px;\\n padding: var(--zui-space-xs);\\n border: 1px solid var(--zui-color-border);\\n border-radius: var(--zui-radius-md);\\n background-color: var(--zui-color-popover);\\n color: var(--zui-color-popover-foreground);\\n box-shadow: var(--zui-shadow-md);\\n max-height: var(--zui-popper-available-height, none);\\n overflow-x: hidden;\\n overflow-y: auto;\\n }\\n.zui-menubar__content[data-state=\\\"open\\\"] {\\n animation: zui-menubar-in var(--zui-motion-duration-normal) ease both;\\n }\\n.zui-menubar__content[data-state=\\\"closed\\\"] {\\n pointer-events: none;\\n }\\n@keyframes zui-menubar-in {\\n from { opacity: 0; transform: translateY(-8px) scale(0.95); }\\n to { opacity: 1; transform: translateY(0px) scale(1); }\\n }\\n.zui-menubar__item {\\n position: relative;\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n padding: var(--zui-space-base) var(--zui-space-sm);\\n border: none;\\n border-radius: var(--zui-radius-sm);\\n background-color: transparent;\\n color: inherit;\\n outline: none;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n text-align: left;\\n }\\n.zui-menubar__item:hover, .zui-menubar__item:focus {\\n background-color: var(--zui-color-accent);\\n color: var(--zui-color-accent-foreground);\\n }\\n.zui-menubar__item:disabled { opacity: 0.5; pointer-events: none; }\\n.zui-menubar__item-label {\\n display: flex;\\n flex: 1 1 auto;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-sm);\\n min-width: 0;\\n }\\n.zui-menubar__item-label .zui-icon { color: var(--zui-color-muted-foreground); }\\n.zui-menubar__item:hover .zui-menubar__item-label .zui-icon,\\n .zui-menubar__item:focus .zui-menubar__item-label .zui-icon { color: inherit; }\\n.zui-menubar__item--check {\\n padding-left: var(--zui-space-2xl);\\n padding-right: var(--zui-space-sm);\\n }\\n.zui-menubar__indicator {\\n position: absolute;\\n left: var(--zui-space-sm);\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n width: 14px;\\n height: 14px;\\n pointer-events: none;\\n }\\n.zui-menubar__indicator--dot .zui-icon { width: 8px; height: 8px; }\\n.zui-menubar__shortcut {\\n margin-left: auto;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-xs);\\n letter-spacing: var(--zui-type-tracking-widest);\\n color: var(--zui-color-muted-foreground);\\n }\\n.zui-menubar__separator {\\n height: 1px;\\n margin: var(--zui-space-xs) calc(var(--zui-space-xs) * -1);\\n background-color: var(--zui-color-border);\\n }\\n.zui-menubar__label {\\n padding: var(--zui-space-base) var(--zui-space-sm);\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n font-weight: var(--zui-type-weight-medium);\\n }\" };\n","import { $PROXY, createContext, createEffect, omit, useContext } from \"#solid\";\nimport { createElement, flush, memo, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { closeDeepestMenuSub, createMenuRow, createMenuTypeahead, MenuHierarchyContext, MenuRadioContext, MenuRootPrimitive, MenuSubPrimitive, MenuSurfaceContext, provideMenuHierarchyRoot, } from \"../primitives/menu.js\";\nimport { anchoredSurface } from \"./overlay.js\";\nimport { createRovingFocus } from \"./roving.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { append, classes, element, forbidChildren, part, provide, slot, useStylesheet, withDefaults, } from \"./shared.js\";\nimport { Icon } from \"./icons.js\";\nimport { CHECK, DOT } from \"./generated/icons.js\";\nimport { sheet as menuSheet } from \"./generated/MenuStyle.js\";\nimport { sheet as menubarSheet } from \"./generated/MenubarStyle.js\";\nconst ContextMenuContext = createContext(null);\nexport const MenuShortcutPart = part(\"text\", menuSheet, \"zui-menu__shortcut\", { ariaHidden: true });\nexport const MenubarShortcutPart = part(\"text\", menubarSheet, \"zui-menubar__shortcut\", {\n ariaHidden: true,\n});\nexport const MENU_VARIANT = {\n sheet: menuSheet,\n itemBaseClass: \"zui-menu__item\",\n checkClass: \"zui-menu__item--check\",\n indicatorClass: \"zui-menu__indicator\",\n indicatorDotClass: \"zui-menu__indicator--dot\",\n wrapLabel: false,\n allowModifiers: true,\n checkboxDefaultClose: true,\n checkboxName: \"MenuCheckboxItem\",\n radioName: \"MenuRadioItem\",\n shortcut: MenuShortcutPart,\n};\nexport const MENUBAR_VARIANT = {\n sheet: menubarSheet,\n itemBaseClass: \"zui-menubar__item\",\n checkClass: \"zui-menubar__item--check\",\n indicatorClass: \"zui-menubar__indicator\",\n indicatorDotClass: \"zui-menubar__indicator--dot\",\n wrapLabel: true,\n allowModifiers: false,\n checkboxDefaultClose: false,\n checkboxName: \"MenubarCheckboxItem\",\n radioName: \"MenubarRadioItem\",\n shortcut: MenubarShortcutPart,\n};\nexport function useMenuHierarchy() {\n return useContext(MenuHierarchyContext) ?? undefined;\n}\nexport function useMenuState() {\n return useContext(MenuHierarchyContext)?.state;\n}\nexport function useMenuSub() {\n return useContext(MenuHierarchyContext)?.sub;\n}\nexport function provideContextMenu(record, source) {\n return provide(ContextMenuContext, record, source);\n}\nexport function useContextMenuRecord() {\n return useContext(ContextMenuContext) ?? undefined;\n}\nexport function provideMenuRoot(state, onDismiss, source) {\n return provideMenuHierarchyRoot(state, onDismiss, source);\n}\nexport function menuRoot(props) {\n return MenuRootPrimitive(props);\n}\nexport function provideMenuSub(props) {\n return MenuSubPrimitive(props);\n}\nexport function useMenuTypeahead() {\n return createMenuTypeahead(useContext(MenuSurfaceContext)?.roving);\n}\nexport function renderMenuSurface(state, props, options = {}) {\n if (options.extraSheet)\n useStylesheet(options.extraSheet);\n useStylesheet(menuSheet);\n const hierarchy = useContext(MenuHierarchyContext);\n const trap = options.trap ?? true;\n const rest = omit(props, \"children\");\n return anchoredSurface(state, rest, {\n class: options.class ?? `${menuSheet.className} zui-menu`,\n role: \"menu\",\n trap,\n surfaceClass: options.surfaceClass,\n onDismiss(reason) {\n if (reason === \"escape\" && closeDeepestMenuSub(hierarchy, \"escape\")) {\n return;\n }\n if (options.onDismiss)\n options.onDismiss(reason);\n else\n state?.setOpen(false);\n },\n children() {\n const roving = createRovingFocus(() => \"vertical\", \"active\");\n if (!trap) {\n let focused = false;\n createEffect(() => (focused ? undefined : roving.firstEnabled()), first => {\n if (!focused && first && roving.focusFirst())\n focused = true;\n });\n }\n const onTypeahead = createMenuTypeahead(roving);\n const keys = createElement(\"box\");\n spread(keys, {\n class: \"zui-menu__keys\",\n onKeyDown(event) {\n if (trap)\n onTypeahead(event);\n else if (callHandler(event, roving.onKeyDown))\n onTypeahead(event);\n },\n }, true);\n const surfaceContent = provide(MenuSurfaceContext, { node: state.content.node, roving }, props);\n if (options.onBarKeyDown) {\n const arrows = createElement(\"box\");\n spread(arrows, { class: \"zui-menubar__arrows\", onKeyDown: options.onBarKeyDown }, true);\n append(keys, arrows);\n slot(arrows, surfaceContent);\n return keys;\n }\n const list = createElement(\"box\");\n spread(list, { class: \"zui-menu__list\", \"data-orientation\": \"vertical\", onKeyDown: roving.onKeyDown }, true);\n append(list, keys);\n slot(keys, surfaceContent);\n return list;\n },\n });\n}\nexport function menuRow(props, options) {\n useStylesheet(options.sheet ?? menuSheet);\n return createMenuRow(props, {\n role: options.role,\n select: options.select,\n disabled: options.disabled,\n extra: options.extra,\n overrides: options.overrides,\n activateOnPress: options.activateOnPress,\n emitDataHooks: false,\n enter: options.enter,\n leave: options.leave,\n classGetter: () => classes(options.baseClass ?? \"zui-menu__item\", options.class()),\n });\n}\nfunction attachItemContent(node, variant, props) {\n let target = node;\n if (variant.wrapLabel) {\n target = createElement(\"box\");\n setProp(target, \"class\", \"zui-menubar__item-label\");\n append(node, target);\n }\n if (!($PROXY in props) && Object.getOwnPropertyDescriptor(props, \"children\")?.get === undefined) {\n slot(target, props.children);\n return;\n }\n slot(target, memo(() => props.children));\n}\nfunction menuIndicator(baseClass, dotClass, checked, dot) {\n const box = createElement(\"box\");\n spread(box, { class: classes(baseClass, dot && dotClass) }, true);\n const show = memo(checked);\n slot(box, () => (show() ? Icon({ icon: dot ? DOT : CHECK }) : null));\n return box;\n}\nexport function buildMenuItem(variant, props = {}) {\n const menu = useMenuHierarchy();\n if (!variant.allowModifiers)\n useStylesheet(menuSheet);\n const rest = omit(props, \"children\", \"destructive\", \"inset\", \"closeOnSelect\", \"onSelect\", \"shortcut\");\n const extra = variant.allowModifiers\n ? {\n get \"data-destructive\"() {\n return props.destructive ? \"true\" : null;\n },\n get \"data-inset\"() {\n return props.inset ? \"true\" : null;\n },\n get ariaKeyShortcuts() {\n return props.shortcut ?? null;\n },\n }\n : {\n get \"data-destructive\"() {\n return props.destructive ? \"true\" : null;\n },\n get ariaKeyShortcuts() {\n return props.shortcut ?? null;\n },\n };\n const node = menuRow(rest, {\n role: \"menuItem\",\n disabled: () => !!props.disabled,\n extra,\n sheet: variant.sheet,\n baseClass: variant.itemBaseClass,\n class: () => variant.allowModifiers\n ? classes(props.destructive && \"zui-menu__item--destructive\", props.inset && \"zui-menu__item--inset\")\n : classes(props.destructive && \"zui-menu__item--destructive\"),\n select() {\n props.onSelect?.();\n if (props.closeOnSelect ?? true) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n attachItemContent(node, variant, props);\n if (!($PROXY in props) && Object.getOwnPropertyDescriptor(props, \"shortcut\")?.get === undefined) {\n if (props.shortcut != null)\n append(node, variant.shortcut({ children: props.shortcut }));\n }\n else {\n const hasShortcut = memo(() => props.shortcut != null);\n slot(node, () => hasShortcut()\n ? variant.shortcut({\n get children() {\n return props.shortcut;\n },\n })\n : null);\n }\n return node;\n}\nfunction validateMenuChecked(variant, value) {\n if (typeof value !== \"boolean\")\n throw new TypeError(`${variant.checkboxName} checked must be a boolean`);\n return value;\n}\nfunction validateMenuRadioGroupValue(current) {\n if (typeof current !== \"string\")\n throw new TypeError(\"MenuRadioGroup value must be a string\");\n return current;\n}\nfunction validateMenuRadioValue(variant, current) {\n if (typeof current !== \"string\" || !current)\n throw new TypeError(`${variant.radioName} value must be a non-empty string`);\n return current;\n}\nexport function buildMenuCheckboxItem(variant, props = {}) {\n const menu = useMenuHierarchy();\n const rest = omit(props, \"children\", \"checked\", \"defaultChecked\", \"onCheckedChange\", \"closeOnSelect\");\n const [read, write] = createControllable({\n value: () => props.checked,\n defaultValue: () => props.defaultChecked,\n onChange: () => props.onCheckedChange,\n }, false);\n validateMenuChecked(variant, read());\n const checked = memo(() => validateMenuChecked(variant, read()));\n const node = menuRow(rest, {\n role: \"menuItemCheckBox\",\n disabled: () => !!props.disabled,\n overrides: {\n get checked() {\n return checked();\n },\n get \"data-state\"() {\n return checked() ? \"checked\" : \"unchecked\";\n },\n },\n sheet: variant.sheet,\n baseClass: variant.itemBaseClass,\n class: () => variant.checkClass,\n select() {\n write(!checked());\n if (props.closeOnSelect ?? variant.checkboxDefaultClose) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n append(node, menuIndicator(variant.indicatorClass, variant.indicatorDotClass, checked, false));\n attachItemContent(node, variant, props);\n return node;\n}\nexport function buildMenuRadioGroup(props = {}) {\n useStylesheet(menuSheet);\n const rest = omit(props, \"children\", \"value\", \"defaultValue\", \"onValueChange\", \"label\");\n const [read, choose] = createControllable({\n value: () => props.value,\n defaultValue: () => props.defaultValue,\n onChange: () => props.onValueChange,\n }, \"\");\n validateMenuRadioGroupValue(read());\n const value = memo(() => validateMenuRadioGroupValue(read()));\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n role: \"group\",\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-menu__group\");\n },\n }), true);\n slot(node, provide(MenuRadioContext, { value, choose }, props));\n return node;\n}\nexport function buildMenuRadioItem(variant, props) {\n const menu = useMenuHierarchy(), radio = useContext(MenuRadioContext);\n const rest = omit(props, \"children\", \"value\", \"closeOnSelect\");\n validateMenuRadioValue(variant, props.value);\n const value = memo(() => validateMenuRadioValue(variant, props.value));\n const checked = () => radio?.value() === value();\n const node = menuRow(rest, {\n role: \"menuItemRadio\",\n disabled: () => !!props.disabled,\n overrides: {\n get checked() {\n return checked();\n },\n get \"data-state\"() {\n return checked() ? \"checked\" : \"unchecked\";\n },\n get \"data-value\"() {\n return value();\n },\n },\n sheet: variant.sheet,\n baseClass: variant.itemBaseClass,\n class: () => variant.checkClass,\n select() {\n radio?.choose(value());\n if (props.closeOnSelect ?? true) {\n flush();\n menu?.dismissCascade();\n }\n },\n });\n append(node, menuIndicator(variant.indicatorClass, variant.indicatorDotClass, checked, true));\n attachItemContent(node, variant, props);\n return node;\n}\nexport function buildMenuSeparator(name, sheet, className, props = {}) {\n useStylesheet(sheet);\n forbidChildren(name, props);\n return element(\"box\", mergeProps(props, withDefaults({ ariaHidden: true }, props), {\n get __zguiClass() {\n return classes(className);\n },\n }));\n}\n","import { createContext, createMemo, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, memo, mergeProps, spread } from \"../renderer/index.js\";\nimport { focus } from \"../nodes.js\";\nimport { createOverlayState } from \"./overlay.js\";\nimport { MenuGroup, MenuRadioGroup, } from \"./menu.js\";\nimport { MENUBAR_VARIANT, MenubarShortcutPart, buildMenuCheckboxItem, buildMenuItem, buildMenuRadioItem, buildMenuSeparator, provideMenuRoot, renderMenuSurface, useMenuHierarchy, useMenuState, } from \"./menu-core.js\";\nimport { createRovingFocus } from \"./roving.js\";\nimport { callHandler } from \"./state.js\";\nimport { classes, part, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/MenubarStyle.js\";\nexport { MenuGroup as MenubarGroup, MenuRadioGroup as MenubarRadioGroup };\nconst BarContext = createContext(null);\nfunction handleBarArrows(target, event) {\n if (event.character != null)\n return;\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (!direction || !target || !target.step(direction))\n return;\n event.preventDefault();\n event.stopPropagation();\n}\nexport function Menubar(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"children\", \"label\", \"onKeyDown\");\n const [openValue, setOpenValue] = createSignal(null);\n const roving = createRovingFocus(() => \"horizontal\", \"target\");\n let alive = true;\n onCleanup(() => {\n alive = false;\n });\n const bar = {\n roving,\n anyOpen: () => openValue() !== null,\n isOpen: value => openValue() === value,\n open(value) {\n if (alive && openValue() !== value)\n setOpenValue(value);\n },\n close() {\n if (alive && openValue() !== null)\n setOpenValue(null);\n },\n };\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n role: \"menuBar\",\n orientation: \"horizontal\",\n get ariaLabel() {\n return props.label ?? null;\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-menubar\", sheet.className);\n },\n onKeyDown(event) {\n if (callHandler(event, props.onKeyDown) && alive)\n roving.onKeyDown(event);\n },\n }), true);\n slot(node, provide(BarContext, bar, props));\n return node;\n}\nfunction menubarValue(value) {\n if (typeof value !== \"string\" || !value) {\n throw new TypeError(\"MenubarMenu value must be a non-empty string\");\n }\n return value;\n}\nexport function MenubarMenu(props) {\n useStylesheet(sheet);\n const bar = useContext(BarContext);\n const rest = omit(props, \"children\", \"value\");\n menubarValue(props.value);\n const value = createMemo(() => menubarValue(props.value));\n let alive = true;\n onCleanup(() => {\n alive = false;\n if (typeof props.value === \"string\" && props.value && bar?.isOpen(props.value))\n bar.close();\n });\n const state = createOverlayState({\n get open() {\n return bar?.isOpen(value()) ?? false;\n },\n onOpenChange(next) {\n if (!alive || !bar)\n return;\n if (next)\n bar.open(value());\n else if (bar.isOpen(value()))\n bar.close();\n },\n });\n const dismiss = () => {\n state.setOpen(false);\n const trigger = untrack(state.trigger.node);\n if (trigger)\n focus(trigger);\n };\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, withDefaults({\n get \"data-state\"() {\n return state.open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-menubar__menu\");\n },\n }), true);\n slot(node, provideMenuRoot(state, dismiss, props));\n return node;\n}\nexport function MenubarTrigger(props = {}) {\n useStylesheet(sheet);\n const bar = useContext(BarContext);\n const state = useMenuState();\n const rest = omit(props, \"children\", \"ref\", \"onClick\", \"onPointerEnter\", \"onFocus\", \"onKeyDown\");\n const node = createElement(\"control\");\n const disabled = () => !!props.disabled;\n const item = bar?.roving.register(node, disabled);\n state?.trigger.ref(node);\n let alive = true;\n onCleanup(() => {\n alive = false;\n });\n spread(node, mergeProps(rest, withDefaults({\n role: \"menuItem\",\n ariaHasPopup: \"menu\",\n get expanded() {\n return state?.open() ?? false;\n },\n get ariaControls() {\n return state?.content.node() ?? null;\n },\n get tabIndex() {\n return item?.tabIndex() ?? (disabled() ? -1 : 0);\n },\n get \"data-state\"() {\n return state?.open() ? \"open\" : \"closed\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-menubar__trigger\");\n },\n onFocus(event) {\n if (!callHandler(event, props.onFocus) || !alive || disabled())\n return;\n item?.activate();\n if (bar?.anyOpen())\n state?.setOpen(true);\n },\n onPointerEnter(event) {\n if (!callHandler(event, props.onPointerEnter) || !alive || disabled())\n return;\n if (bar?.anyOpen() && !state?.open()) {\n item?.activate();\n state?.setOpen(true);\n }\n },\n onClick(event) {\n if (!callHandler(event, props.onClick) || !alive || disabled() || !state)\n return;\n item?.activate();\n state.setOpen(!state.open());\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown) || !alive || disabled() || !state)\n return;\n if (event.character == null && event.key === \"ArrowDown\") {\n item?.activate();\n state.setOpen(true);\n event.preventDefault();\n event.stopPropagation();\n }\n },\n }), true);\n if (typeof props.ref === \"function\")\n props.ref(node);\n slot(node, memo(() => props.children));\n return node;\n}\nexport function MenubarArrows(props = {}) {\n useStylesheet(sheet);\n const fallback = useContext(BarContext)?.roving;\n const rest = omit(props, \"children\", \"bar\", \"onKeyDown\");\n const node = createElement(\"box\");\n spread(node, mergeProps(rest, {\n get __zguiClass() {\n return classes(\"zui-menubar__arrows\");\n },\n onKeyDown(event) {\n if (callHandler(event, props.onKeyDown))\n handleBarArrows(props.bar ?? fallback, event);\n },\n }), true);\n slot(node, () => props.children);\n return node;\n}\nexport function MenubarContent(props = {}) {\n const menu = useMenuHierarchy();\n const bar = useContext(BarContext)?.roving;\n const rest = omit(props, \"placement\");\n return renderMenuSurface(menu?.state, mergeProps(rest, withDefaults({\n get placement() {\n return props.placement ?? { side: \"bottom\", align: \"start\" };\n },\n }, rest)), {\n extraSheet: sheet,\n class: \"zui-menubar__content\",\n trap: false,\n surfaceClass: false,\n onDismiss(reason) {\n if (reason === \"escape\")\n menu?.dismissCascade();\n else\n menu?.state.setOpen(false);\n },\n onBarKeyDown(event) {\n handleBarArrows(bar, event);\n },\n });\n}\nexport function MenubarItem(props = {}) {\n return buildMenuItem(MENUBAR_VARIANT, props);\n}\nexport function MenubarCheckboxItem(props = {}) {\n return buildMenuCheckboxItem(MENUBAR_VARIANT, props);\n}\nexport function MenubarRadioItem(props) {\n return buildMenuRadioItem(MENUBAR_VARIANT, props);\n}\nexport const MenubarLabel = part(\"label\", sheet, \"zui-menubar__label\");\nexport function MenubarSeparator(props = {}) {\n return buildMenuSeparator(\"MenubarSeparator\", sheet, \"zui-menubar__separator\", props);\n}\nexport const MenubarShortcut = MenubarShortcutPart;\n","export const sheet = { name: \"ResizableStyle\", className: \"zs-bd2daeb0\", css: \".zs-bd2daeb0 { display: flex; flex-direction: row; width: 100%; height: 100%; }\\n.zs-bd2daeb0[data-direction=\\\"vertical\\\"] { flex-direction: column; }\\n.zui-resizable__panel {\\n display: flex;\\n flex-direction: column;\\n flex: 0 0 auto;\\n overflow: hidden;\\n }\\n.zui-resizable__handle {\\n position: relative;\\n z-index: 10;\\n display: flex;\\n flex: 0 0 auto;\\n align-items: center;\\n justify-content: center;\\n width: 9px;\\n margin-left: -4px;\\n margin-right: -4px;\\n align-self: stretch;\\n border: none;\\n padding: 0;\\n background-color: transparent;\\n }\\n.zui-resizable__line {\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 4px;\\n width: 1px;\\n background-color: var(--zui-color-border);\\n }\\n.zs-bd2daeb0[data-direction=\\\"vertical\\\"] > .zui-resizable__handle {\\n width: auto;\\n height: 9px;\\n margin: -4px 0;\\n }\\n.zs-bd2daeb0[data-direction=\\\"vertical\\\"] > .zui-resizable__handle > .zui-resizable__line {\\n top: 4px;\\n bottom: auto;\\n left: 0;\\n right: 0;\\n width: auto;\\n height: 1px;\\n }\\n.zui-resizable__handle:focus-visible { outline: none; }\\n.zui-resizable__handle:focus-visible > .zui-resizable__line {\\n outline: 1px solid var(--zui-color-ring);\\n outline-offset: 1px;\\n }\\n.zui-resizable__grip {\\n --zui-icon-md: calc(var(--zui-space-base) * 2.5);\\n position: relative;\\n z-index: 1;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n width: var(--zui-space-md);\\n height: var(--zui-space-lg);\\n border: 1px solid var(--zui-color-border);\\n border-radius: calc(var(--zui-radius-base) * 0.2);\\n background-color: var(--zui-color-border);\\n color: var(--zui-color-foreground);\\n }\\n.zui-resizable__grip .zui-icon { transform: rotate(90deg); }\\n.zs-bd2daeb0[data-direction=\\\"vertical\\\"] .zui-resizable__grip { transform: rotate(90deg); }\" };\n","import { createContext, createEffect, createMemo, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { focus, getWindowRect, precedes } from \"../nodes.js\";\nimport { ELLIPSIS, Icon } from \"./icons.js\";\nimport { callHandler } from \"./state.js\";\nimport { append, classes, element, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nimport { sheet } from \"./generated/ResizableStyle.js\";\nconst SplitPaneContext = createContext(null);\nfunction clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\nfunction roundPct(value) {\n return Math.round(value * 1000) / 1000;\n}\nfunction sortByTree(items) {\n if (items.length <= 1)\n return [...items];\n return [...items].sort((a, b) => {\n if (a.node === b.node)\n return 0;\n try {\n if (precedes(a.node, b.node))\n return -1;\n if (precedes(b.node, a.node))\n return 1;\n return 0;\n }\n catch {\n return 0;\n }\n });\n}\nfunction computeInitialSizes(panels, explicit) {\n const count = panels.length;\n if (count === 0)\n return [];\n if (explicit && explicit.length === count) {\n const total = explicit.reduce((acc, n) => acc + (Number.isFinite(n) && n >= 0 ? n : 0), 0);\n if (total > 0)\n return explicit.map(n => roundPct((Math.max(0, n) / total) * 100));\n }\n const resolved = panels.map(panel => {\n const controlled = panel.controlledCollapsed();\n const collapsed = controlled ?? panel.defaultCollapsed();\n if (panel.collapsible() && collapsed)\n return clamp(panel.collapsedSize(), 0, 100);\n const def = panel.defaultSize();\n return def !== undefined && Number.isFinite(def) ? clamp(def, 0, 100) : undefined;\n });\n let assigned = 0;\n let missing = 0;\n for (const val of resolved) {\n if (val === undefined)\n missing += 1;\n else\n assigned += val;\n }\n const share = missing > 0 ? Math.max(0, 100 - assigned) / missing : 0;\n const raw = resolved.map(val => (val === undefined ? share : val));\n const sum = raw.reduce((acc, n) => acc + n, 0);\n if (sum <= 0) {\n const even = roundPct(100 / count);\n return raw.map(() => even);\n }\n return raw.map(val => roundPct((val / sum) * 100));\n}\nfunction panelLimits(panel) {\n const min = clamp(Number.isFinite(panel.minSize()) ? panel.minSize() : 5, 0, 100);\n const max = clamp(Number.isFinite(panel.maxSize()) ? panel.maxSize() : 100, min, 100);\n const collapsible = panel.collapsible();\n const collapsed = clamp(Number.isFinite(panel.collapsedSize()) ? panel.collapsedSize() : 0, 0, min);\n return { min, max, collapsed, collapsible };\n}\nfunction computePair(leftPanel, rightPanel, pairTotal, rawLeft) {\n const l = panelLimits(leftPanel);\n const r = panelLimits(rightPanel);\n if (l.collapsible && rawLeft <= (l.collapsed + l.min) / 2) {\n const left = l.collapsed;\n const right = clamp(pairTotal - left, r.collapsible ? r.collapsed : r.min, r.max);\n return {\n left: roundPct(pairTotal - right),\n right: roundPct(right),\n leftCollapsed: true,\n rightCollapsed: false,\n };\n }\n const rawRight = pairTotal - rawLeft;\n if (r.collapsible && rawRight <= (r.collapsed + r.min) / 2) {\n const right = r.collapsed;\n const left = clamp(pairTotal - right, l.collapsible ? l.collapsed : l.min, l.max);\n return {\n left: roundPct(left),\n right: roundPct(pairTotal - left),\n leftCollapsed: false,\n rightCollapsed: true,\n };\n }\n const minLeft = Math.max(l.min, pairTotal - r.max);\n const maxLeft = Math.min(l.max, pairTotal - r.min);\n const left = minLeft <= maxLeft ? clamp(rawLeft, minLeft, maxLeft) : clamp(rawLeft, 0, pairTotal);\n const right = Math.max(0, pairTotal - left);\n return {\n left: roundPct(left),\n right: roundPct(right),\n leftCollapsed: l.collapsible && left <= l.collapsed + 0.01,\n rightCollapsed: r.collapsible && right <= r.collapsed + 0.01,\n };\n}\nexport function SplitPane(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"direction\", \"sizes\", \"defaultSizes\", \"onSizesChange\", \"keyboardStep\", \"label\", \"children\");\n const direction = createMemo(() => {\n const dir = props.direction ?? \"horizontal\";\n if (dir !== \"horizontal\" && dir !== \"vertical\") {\n throw new TypeError(`SplitPane direction must be \"horizontal\" or \"vertical\"`);\n }\n return dir;\n });\n const keyboardStep = () => {\n const value = props.keyboardStep ?? 2;\n return Number.isFinite(value) && value > 0 ? value : 2;\n };\n const [panels, setPanels] = createSignal([], { ownedWrite: true });\n const [handles, setHandles] = createSignal([], { ownedWrite: true });\n const [innerSizes, setInnerSizes] = createSignal([], { ownedWrite: true });\n const [container, setContainer] = createSignal(null, { ownedWrite: true });\n const resolvedSizes = createMemo(() => {\n const list = panels();\n if (list.length === 0)\n return [];\n const controlled = props.sizes;\n if (controlled && controlled.length === list.length) {\n return controlled;\n }\n const inner = innerSizes();\n if (inner.length === list.length)\n return inner;\n return computeInitialSizes(list, props.defaultSizes);\n });\n const commitSizes = (next) => {\n const list = panels();\n const prev = untrack(resolvedSizes);\n const same = prev.length === next.length && prev.every((v, i) => Math.abs(v - next[i]) < 0.001);\n if (same)\n return;\n if (untrack(() => props.sizes) === undefined) {\n setInnerSizes(next);\n }\n for (let i = 0; i < list.length; i++) {\n const panel = list[i];\n const limits = panelLimits(panel);\n const size = next[i] ?? 0;\n const collapsedNow = limits.collapsible && size <= limits.collapsed + 0.01;\n if (!collapsedNow && size >= limits.min) {\n panel.lastExpanded = size;\n }\n if (collapsedNow !== panel.collapsedState) {\n panel.collapsedState = collapsedNow;\n untrack(() => panel.notifyCollapse(collapsedNow));\n }\n }\n untrack(() => props.onSizesChange?.(next));\n };\n createEffect(() => panels().length, count => {\n if (count === 0)\n return;\n const list = untrack(panels);\n const current = untrack(innerSizes);\n if (current.length !== count) {\n const init = computeInitialSizes(list, untrack(() => props.sizes ?? props.defaultSizes));\n setInnerSizes(init);\n for (let i = 0; i < list.length; i++) {\n const panel = list[i];\n const limits = panelLimits(panel);\n const sz = init[i] ?? 0;\n panel.collapsedState = limits.collapsible && sz <= limits.collapsed + 0.01;\n if (!panel.collapsedState)\n panel.lastExpanded = Math.max(limits.min, sz);\n }\n }\n });\n const registerPanel = (entry) => {\n setPanels(prev => sortByTree([...prev, entry]));\n return () => setPanels(prev => prev.filter(item => item !== entry));\n };\n const registerHandle = (entry) => {\n setHandles(prev => sortByTree([...prev, entry]));\n return () => setHandles(prev => prev.filter(item => item !== entry));\n };\n const applyPairTarget = (handleIdx, baseSizes, rawLeft) => {\n const list = untrack(panels);\n if (handleIdx < 0 || handleIdx + 1 >= list.length)\n return;\n if (baseSizes.length !== list.length)\n return;\n const leftPanel = list[handleIdx];\n const rightPanel = list[handleIdx + 1];\n const pairTotal = baseSizes[handleIdx] + baseSizes[handleIdx + 1];\n const { left, right } = computePair(leftPanel, rightPanel, pairTotal, rawLeft);\n const next = [...baseSizes];\n next[handleIdx] = left;\n next[handleIdx + 1] = right;\n commitSizes(next);\n };\n const context = {\n direction,\n container,\n keyboardStep,\n registerPanel,\n registerHandle,\n panelIndex: entry => panels().indexOf(entry),\n handleIndex: entry => handles().indexOf(entry),\n sizeFor(entry) {\n const idx = panels().indexOf(entry);\n if (idx < 0)\n return 0;\n return resolvedSizes()[idx] ?? 0;\n },\n isCollapsed(entry) {\n const controlled = entry.controlledCollapsed();\n if (controlled !== undefined)\n return controlled;\n const limits = panelLimits(entry);\n return limits.collapsible && context.sizeFor(entry) <= limits.collapsed + 0.01;\n },\n pairBounds(handleIdx) {\n const list = panels();\n const sizes = resolvedSizes();\n if (handleIdx < 0 || handleIdx + 1 >= list.length || sizes.length !== list.length)\n return null;\n const l = panelLimits(list[handleIdx]);\n const r = panelLimits(list[handleIdx + 1]);\n const pairTotal = sizes[handleIdx] + sizes[handleIdx + 1];\n const min = l.collapsible ? l.collapsed : Math.max(l.min, pairTotal - r.max);\n const max = Math.min(l.max, pairTotal - (r.collapsible ? r.collapsed : r.min));\n return {\n min: Math.round(min),\n max: Math.round(Math.max(min, max)),\n now: Math.round(sizes[handleIdx]),\n };\n },\n snapshotSizes: () => [...untrack(resolvedSizes)],\n applyPairDelta(handleIdx, baseSizes, deltaPct) {\n if (handleIdx < 0 || handleIdx + 1 >= baseSizes.length)\n return;\n applyPairTarget(handleIdx, baseSizes, baseSizes[handleIdx] + deltaPct);\n },\n nudgeHandle(handleIdx, deltaPct) {\n const base = [...untrack(resolvedSizes)];\n if (handleIdx < 0 || handleIdx + 1 >= base.length)\n return;\n const list = untrack(panels);\n const leftPanel = list[handleIdx];\n const l = panelLimits(leftPanel);\n let target = base[handleIdx] + deltaPct;\n if (l.collapsible && deltaPct > 0 && base[handleIdx] <= l.collapsed + 0.01) {\n target = Math.max(l.min, target);\n }\n applyPairTarget(handleIdx, base, target);\n },\n snapHandleEdge(handleIdx, edge) {\n const base = [...untrack(resolvedSizes)];\n const list = untrack(panels);\n if (handleIdx < 0 || handleIdx + 1 >= list.length || base.length !== list.length)\n return;\n const l = panelLimits(list[handleIdx]);\n const r = panelLimits(list[handleIdx + 1]);\n const pairTotal = base[handleIdx] + base[handleIdx + 1];\n const target = edge === \"min\"\n ? l.collapsible\n ? l.collapsed\n : l.min\n : Math.min(l.max, pairTotal - (r.collapsible ? r.collapsed : r.min));\n applyPairTarget(handleIdx, base, target);\n },\n toggleCollapseAt(handleIdx) {\n const base = [...untrack(resolvedSizes)];\n const list = untrack(panels);\n if (handleIdx < 0 || handleIdx + 1 >= list.length || base.length !== list.length)\n return;\n const leftPanel = list[handleIdx];\n const rightPanel = list[handleIdx + 1];\n const l = panelLimits(leftPanel);\n const r = panelLimits(rightPanel);\n const pairTotal = base[handleIdx] + base[handleIdx + 1];\n if (l.collapsible) {\n const isCollapsedNow = base[handleIdx] <= l.collapsed + 0.01;\n const target = isCollapsedNow\n ? Math.max(l.min, leftPanel.lastExpanded || l.min)\n : l.collapsed;\n applyPairTarget(handleIdx, base, target);\n return;\n }\n if (r.collapsible) {\n const isCollapsedNow = base[handleIdx + 1] <= r.collapsed + 0.01;\n const desiredRight = isCollapsedNow\n ? Math.max(r.min, rightPanel.lastExpanded || r.min)\n : r.collapsed;\n applyPairTarget(handleIdx, base, pairTotal - desiredRight);\n }\n },\n };\n const root = createElement(\"box\");\n setContainer(root);\n spread(root, mergeProps(rest, withDefaults({\n role: \"group\",\n get ariaLabel() {\n return props.label ?? null;\n },\n get \"data-direction\"() {\n return direction();\n },\n }, rest), {\n get __zguiClass() {\n return classes(sheet.className, \"zui-split-pane\");\n },\n }), true);\n slot(root, provide(SplitPaneContext, context, props));\n return root;\n}\nexport function SplitPanePanel(props = {}) {\n useStylesheet(sheet);\n const context = useContext(SplitPaneContext);\n const rest = omit(props, \"defaultSize\", \"minSize\", \"maxSize\", \"collapsible\", \"collapsedSize\", \"collapsed\", \"defaultCollapsed\", \"onCollapseChange\", \"children\");\n const node = createElement(\"box\");\n const entry = {\n node,\n defaultSize: () => props.defaultSize,\n minSize: () => props.minSize ?? 5,\n maxSize: () => props.maxSize ?? 100,\n collapsible: () => !!props.collapsible,\n collapsedSize: () => props.collapsedSize ?? 0,\n controlledCollapsed: () => props.collapsed,\n defaultCollapsed: () => !!props.defaultCollapsed,\n notifyCollapse: collapsed => props.onCollapseChange?.(collapsed),\n lastExpanded: props.defaultSize ?? Math.max(props.minSize ?? 5, 25),\n collapsedState: !!props.defaultCollapsed,\n };\n if (context) {\n const unregister = context.registerPanel(entry);\n onCleanup(unregister);\n }\n spread(node, mergeProps(rest, withDefaults({\n get \"data-collapsed\"() {\n return context?.isCollapsed(entry) ? \"true\" : \"false\";\n },\n get __zguiStyle() {\n if (!context)\n return {};\n const size = context.sizeFor(entry);\n const horizontal = context.direction() === \"horizontal\";\n return {\n flexBasis: `${size}%`,\n width: horizontal ? `${size}%` : \"100%\",\n height: horizontal ? \"100%\" : `${size}%`,\n minWidth: \"0px\",\n minHeight: \"0px\",\n };\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-resizable__panel\");\n },\n }), true);\n slot(node, () => props.children);\n return node;\n}\nexport function SplitPaneHandle(props = {}) {\n useStylesheet(sheet);\n const context = useContext(SplitPaneContext);\n const rest = omit(props, \"children\", \"withHandle\", \"disabled\", \"step\", \"label\", \"onKeyDown\", \"onPointerDown\", \"onPointerMove\", \"onPointerUp\", \"onPointerCancel\");\n const root = createElement(\"control\");\n const entry = { node: root };\n if (context) {\n const unregister = context.registerHandle(entry);\n onCleanup(unregister);\n }\n const [dragging, setDragging] = createSignal(false, { ownedWrite: true });\n let captured;\n let startCoord = 0;\n let startSpan = 0;\n let startSizes = [];\n const disabled = () => !!props.disabled;\n onCleanup(() => {\n captured = undefined;\n });\n const endDrag = (event) => {\n captured = undefined;\n setDragging(false);\n event.releasePointer();\n };\n const bounds = createMemo(() => {\n if (!context)\n return null;\n return context.pairBounds(context.handleIndex(entry));\n });\n spread(root, mergeProps(rest, withDefaults({\n role: \"splitter\",\n tabIndex: 0,\n get disabled() {\n return disabled();\n },\n get orientation() {\n return context?.direction() === \"vertical\"\n ? \"horizontal\"\n : \"vertical\";\n },\n get ariaLabel() {\n return props.label ?? \"Resize panels\";\n },\n get ariaValueMin() {\n return bounds()?.min ?? 0;\n },\n get ariaValueMax() {\n return bounds()?.max ?? 100;\n },\n get ariaValueNow() {\n return bounds()?.now ?? 50;\n },\n get \"data-direction\"() {\n return context?.direction() ?? \"horizontal\";\n },\n get \"data-dragging\"() {\n return dragging() ? \"true\" : \"false\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-resizable__handle\");\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown) || disabled() || !context)\n return;\n const idx = context.handleIndex(entry);\n if (idx < 0)\n return;\n const horizontal = context.direction() === \"horizontal\";\n const baseStep = props.step !== undefined && Number.isFinite(props.step) && props.step > 0\n ? props.step\n : context.keyboardStep();\n const step = event.modifiers.shift ? baseStep * 5 : baseStep;\n if ((horizontal && event.key === \"ArrowLeft\") ||\n (!horizontal && event.key === \"ArrowUp\")) {\n context.nudgeHandle(idx, -step);\n event.preventDefault();\n event.stopPropagation();\n }\n else if ((horizontal && event.key === \"ArrowRight\") ||\n (!horizontal && event.key === \"ArrowDown\")) {\n context.nudgeHandle(idx, step);\n event.preventDefault();\n event.stopPropagation();\n }\n else if (event.key === \"Home\") {\n context.snapHandleEdge(idx, \"min\");\n event.preventDefault();\n event.stopPropagation();\n }\n else if (event.key === \"End\") {\n context.snapHandleEdge(idx, \"max\");\n event.preventDefault();\n event.stopPropagation();\n }\n else if (event.key === \"Enter\" || event.key === \"Space\" || event.key === \" \") {\n context.toggleCollapseAt(idx);\n event.preventDefault();\n event.stopPropagation();\n }\n },\n onPointerDown(event) {\n if (!callHandler(event, props.onPointerDown) || disabled() || !context || !event.primary)\n return;\n if (!(event.button === \"primary\" ||\n (event.button === null && event.pointerKind !== \"mouse\")))\n return;\n const containerNode = context.container();\n const rect = containerNode ? getWindowRect(containerNode) : null;\n if (!rect)\n return;\n const horizontal = context.direction() === \"horizontal\";\n const span = horizontal ? rect.width : rect.height;\n if (span <= 0)\n return;\n captured = event.pointerId;\n startCoord = horizontal ? event.position.x : event.position.y;\n startSpan = span;\n startSizes = context.snapshotSizes();\n setDragging(true);\n event.capturePointer();\n focus(root);\n event.preventDefault();\n },\n onPointerMove(event) {\n const allowed = callHandler(event, props.onPointerMove);\n if (event.pointerId !== captured)\n return;\n if (!dragging() || disabled() || !context) {\n endDrag(event);\n return;\n }\n if (!allowed || startSpan <= 0)\n return;\n const horizontal = context.direction() === \"horizontal\";\n const coord = horizontal ? event.position.x : event.position.y;\n const deltaPct = ((coord - startCoord) / startSpan) * 100;\n context.applyPairDelta(context.handleIndex(entry), startSizes, deltaPct);\n },\n onPointerUp(event) {\n const allowed = callHandler(event, props.onPointerUp);\n if (event.pointerId !== captured)\n return;\n if (allowed && dragging() && !disabled() && context && startSpan > 0) {\n const horizontal = context.direction() === \"horizontal\";\n const coord = horizontal ? event.position.x : event.position.y;\n const deltaPct = ((coord - startCoord) / startSpan) * 100;\n context.applyPairDelta(context.handleIndex(entry), startSizes, deltaPct);\n }\n endDrag(event);\n },\n onPointerCancel(event) {\n callHandler(event, props.onPointerCancel);\n if (event.pointerId === captured)\n endDrag(event);\n },\n }), true);\n append(root, element(\"box\", { class: \"zui-resizable__line\", ariaHidden: true }));\n slot(root, () => {\n if (\"children\" in props)\n return props.children;\n if (!props.withHandle)\n return null;\n const grip = element(\"box\", { class: \"zui-resizable__grip\", ariaHidden: true });\n append(grip, Icon({ icon: ELLIPSIS, size: \"sm\" }));\n return grip;\n });\n return root;\n}\n","import { For, createContext, createEffect, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, mergeProps, setProp, spread } from \"../renderer/index.js\";\nimport { tryBridgeFor } from \"../host.js\";\nimport { getReducedMotion, observeGeometry } from \"../nodes.js\";\nimport { createDelay } from \"../timers.js\";\nimport { ALERT_TRIANGLE, CHECK_CIRCLE, CROSS, CROSS_CIRCLE, INFO, Icon, SPINNER, } from \"./icons.js\";\nimport { overlayPortal } from \"./overlay.js\";\nimport { append, classes, element, provide, slot, useStylesheet } from \"./shared.js\";\nimport { sheet } from \"./generated/ToastStyle.js\";\nconst DEFAULT_DURATION_MS = 4000;\nconst DEFAULT_MAX_VISIBLE = 5;\nconst DEFAULT_TOAST_HEIGHT = 60;\nconst DEFAULT_TOAST_GAP = 14;\nconst ToastContext = createContext(null);\nconst controllersByBridge = new WeakMap();\nlet fallbackController = null;\nlet toastSequence = 0;\nfunction nextToastId() {\n toastSequence += 1;\n return `zui-toast-${toastSequence}`;\n}\nfunction normalizeOptions(titleOrOptions, extra, forcedKind) {\n if (typeof titleOrOptions === \"string\") {\n return { ...extra, title: titleOrOptions, kind: forcedKind ?? extra?.kind };\n }\n return { ...titleOrOptions, kind: forcedKind ?? titleOrOptions.kind };\n}\nfunction resolveController() {\n const bridge = tryBridgeFor();\n if (bridge) {\n const bound = controllersByBridge.get(bridge);\n if (bound)\n return bound;\n }\n return fallbackController;\n}\nfunction iconForKind(kind) {\n switch (kind) {\n case \"success\":\n return CHECK_CIRCLE;\n case \"info\":\n return INFO;\n case \"warning\":\n return ALERT_TRIANGLE;\n case \"error\":\n return CROSS_CIRCLE;\n case \"loading\":\n return SPINNER;\n default:\n return null;\n }\n}\nexport const toast = {\n show(titleOrOptions, options) {\n const active = resolveController();\n if (!active)\n return \"\";\n return active.show(titleOrOptions, options);\n },\n success(title, options) {\n const active = resolveController();\n if (!active)\n return \"\";\n return active.success(title, options);\n },\n error(title, options) {\n const active = resolveController();\n if (!active)\n return \"\";\n return active.error(title, options);\n },\n info(title, options) {\n const active = resolveController();\n if (!active)\n return \"\";\n return active.info(title, options);\n },\n warning(title, options) {\n const active = resolveController();\n if (!active)\n return \"\";\n return active.warning(title, options);\n },\n dismiss(id) {\n resolveController()?.dismiss(id);\n },\n promise(work, messages) {\n const active = resolveController();\n if (!active)\n return typeof work === \"function\" ? work() : work;\n return active.promise(work, messages);\n },\n};\nexport function useToast() {\n const ctx = useContext(ToastContext) ?? resolveController();\n if (!ctx) {\n throw new Error(\"useToast() must be called inside a <ToastProvider>\");\n }\n return ctx;\n}\nfunction nowMs() {\n const perf = globalThis.performance;\n return typeof perf?.now === \"function\" ? perf.now() : Date.now();\n}\nfunction ToastRow(props) {\n const timer = createDelay();\n let remainingMs = props.record.duration;\n let startedAt = 0;\n const armTimer = () => {\n timer.cancel();\n if (!Number.isFinite(remainingMs) || remainingMs <= 0)\n return;\n startedAt = nowMs();\n timer.schedule(remainingMs, () => props.dismiss(props.record.id));\n };\n createEffect(() => ({ duration: props.record.duration, kind: props.record.kind }), ({ duration }) => {\n remainingMs = duration;\n if (!untrack(props.paused))\n armTimer();\n });\n createEffect(props.paused, isPaused => {\n if (!Number.isFinite(remainingMs) || remainingMs <= 0) {\n timer.cancel();\n return;\n }\n if (isPaused) {\n if (startedAt > 0) {\n remainingMs = Math.max(0, remainingMs - (nowMs() - startedAt));\n startedAt = 0;\n }\n timer.cancel();\n }\n else {\n armTimer();\n }\n });\n const slotNode = createElement(\"box\");\n spread(slotNode, {\n __zguiClass: \"zui-toast__slot\",\n get \"data-front\"() {\n return props.index() === 0 ? \"true\" : \"false\";\n },\n get __zguiStyle() {\n const idx = props.index();\n return {\n \"--zui-toast-offset\": `${props.offsetFor(props.record.id)}px`,\n \"--zui-toast-depth\": String(idx),\n \"--zui-toast-layer\": String(100 - idx),\n };\n },\n }, true);\n const card = createElement(\"box\");\n const isUrgent = props.record.kind === \"error\" || props.record.kind === \"warning\";\n spread(card, {\n role: isUrgent ? \"alert\" : \"status\",\n ariaLive: isUrgent ? \"assertive\" : \"polite\",\n testId: `toast-item-${props.record.id}`,\n \"data-kind\": props.record.kind,\n \"data-state\": \"open\",\n __zguiClass: \"zui-toast\",\n }, true);\n observeGeometry(card, \"contentSize\", size => {\n if (size.height > 0)\n props.reportHeight(props.record.id, size.height);\n });\n const icon = iconForKind(props.record.kind);\n if (icon) {\n const iconBox = element(\"box\", { class: \"zui-toast__icon\", ariaHidden: true });\n append(iconBox, Icon({ icon, size: \"sm\" }));\n append(card, iconBox);\n }\n const textBox = element(\"box\", { class: \"zui-toast__text\" });\n append(textBox, element(\"label\", { class: \"zui-toast__title\", children: props.record.title }));\n if (props.record.description) {\n append(textBox, element(\"label\", { class: \"zui-toast__description\", children: props.record.description }));\n }\n append(card, textBox);\n if (props.record.cancel) {\n const cancelSpec = props.record.cancel;\n const cancelBtn = element(\"control\", {\n role: \"button\",\n tabIndex: 0,\n class: \"zui-toast__cancel\",\n children: cancelSpec.label,\n onClick() {\n cancelSpec.onClick();\n if (cancelSpec.dismiss !== false)\n props.dismiss(props.record.id);\n },\n });\n append(card, cancelBtn);\n }\n if (props.record.action) {\n const actionSpec = props.record.action;\n const actionBtn = element(\"control\", {\n role: \"button\",\n tabIndex: 0,\n class: \"zui-toast__action\",\n \"data-tone\": actionSpec.tone ?? \"default\",\n testId: `toast-action-${props.record.id}`,\n children: actionSpec.label,\n onClick() {\n actionSpec.onClick();\n if (actionSpec.dismiss !== false)\n props.dismiss(props.record.id);\n },\n });\n append(card, actionBtn);\n }\n if (props.record.dismissible) {\n const closeBtn = element(\"control\", {\n role: \"button\",\n tabIndex: 0,\n ariaLabel: \"Dismiss notification\",\n class: \"zui-toast__close\",\n testId: `toast-close-${props.record.id}`,\n onClick() {\n props.dismiss(props.record.id);\n },\n });\n append(closeBtn, Icon({ icon: CROSS, size: \"sm\" }));\n append(card, closeBtn);\n }\n append(slotNode, card);\n return slotNode;\n}\nexport function ToastProvider(props = {}) {\n useStylesheet(sheet);\n const rest = omit(props, \"children\", \"corner\", \"maxVisible\", \"defaultDuration\", \"gap\", \"regionTestId\");\n const [items, setItems] = createSignal([], { ownedWrite: true });\n const [paused, setPaused] = createSignal(false, { ownedWrite: true });\n const [heights, setHeights] = createSignal({}, { ownedWrite: true });\n const maxVisible = () => {\n const n = props.maxVisible ?? DEFAULT_MAX_VISIBLE;\n return Number.isInteger(n) && n > 0 ? n : DEFAULT_MAX_VISIBLE;\n };\n const defaultDuration = () => {\n const ms = props.defaultDuration ?? DEFAULT_DURATION_MS;\n return Number.isFinite(ms) && ms >= 0 ? ms : DEFAULT_DURATION_MS;\n };\n const gapPx = () => {\n const g = props.gap ?? DEFAULT_TOAST_GAP;\n return Number.isFinite(g) && g >= 0 ? g : DEFAULT_TOAST_GAP;\n };\n const dismiss = (id) => {\n if (id === undefined) {\n const removed = untrack(items);\n setItems([]);\n setHeights({});\n for (const item of removed)\n item.onDismiss?.();\n return;\n }\n let dismissedItem;\n setItems(prev => prev.filter(item => {\n if (item.id === id) {\n dismissedItem = item;\n return false;\n }\n return true;\n }));\n if (dismissedItem) {\n setHeights(prev => {\n if (!(id in prev))\n return prev;\n const next = { ...prev };\n delete next[id];\n return next;\n });\n dismissedItem.onDismiss?.();\n }\n };\n const upsert = (opts) => {\n const id = opts.id ?? nextToastId();\n const kind = opts.kind ?? \"default\";\n const rawDuration = opts.duration;\n const duration = rawDuration !== undefined\n ? rawDuration === 0\n ? Infinity\n : rawDuration\n : kind === \"loading\"\n ? Infinity\n : defaultDuration();\n const record = {\n id,\n title: opts.title,\n description: opts.description,\n kind,\n duration,\n dismissible: opts.dismissible ?? true,\n action: opts.action,\n cancel: opts.cancel,\n onDismiss: opts.onDismiss,\n };\n const evicted = [];\n setItems(prev => {\n const existing = prev.findIndex(item => item.id === id);\n if (existing >= 0) {\n const next = [...prev];\n next[existing] = record;\n return next;\n }\n const combined = [record, ...prev];\n const limit = maxVisible();\n if (combined.length > limit) {\n evicted.push(...combined.slice(limit));\n return combined.slice(0, limit);\n }\n return combined;\n });\n for (const item of evicted)\n item.onDismiss?.();\n return id;\n };\n const controller = {\n show: (titleOrOptions, options) => upsert(normalizeOptions(titleOrOptions, options)),\n success: (title, options) => upsert(normalizeOptions(title, options, \"success\")),\n error: (title, options) => upsert(normalizeOptions(title, options, \"error\")),\n info: (title, options) => upsert(normalizeOptions(title, options, \"info\")),\n warning: (title, options) => upsert(normalizeOptions(title, options, \"warning\")),\n dismiss,\n async promise(work, messages) {\n const id = upsert({ title: messages.loading, kind: \"loading\", duration: Infinity });\n try {\n const result = await (typeof work === \"function\" ? work() : work);\n const resolved = typeof messages.success === \"function\" ? messages.success(result) : messages.success;\n upsert({ ...normalizeOptions(resolved, undefined, \"success\"), id });\n return result;\n }\n catch (err) {\n const resolved = typeof messages.error === \"function\" ? messages.error(err) : messages.error;\n upsert({ ...normalizeOptions(resolved, undefined, \"error\"), id });\n throw err;\n }\n },\n items,\n };\n const hostBridge = tryBridgeFor();\n if (hostBridge)\n controllersByBridge.set(hostBridge, controller);\n fallbackController = controller;\n onCleanup(() => {\n if (hostBridge && controllersByBridge.get(hostBridge) === controller) {\n controllersByBridge.delete(hostBridge);\n }\n if (fallbackController === controller)\n fallbackController = null;\n setItems([]);\n });\n const reportHeight = (id, height) => {\n setHeights(prev => (prev[id] === height ? prev : { ...prev, [id]: height }));\n };\n const offsetFor = (id) => {\n const list = items();\n const map = heights();\n const gap = gapPx();\n let offset = 0;\n for (const item of list) {\n if (item.id === id)\n return offset;\n offset += (map[item.id] ?? DEFAULT_TOAST_HEIGHT) + gap;\n }\n return offset;\n };\n const totalExtent = () => {\n const list = items();\n if (list.length === 0)\n return 0;\n const map = heights();\n const gap = gapPx();\n let sum = 0;\n for (let i = 0; i < list.length; i++) {\n sum += map[list[i].id] ?? DEFAULT_TOAST_HEIGHT;\n if (i > 0)\n sum += gap;\n }\n return sum;\n };\n const mountRegion = () => overlayPortal({ layer: \"toast\", depth: 0 }, () => {\n const region = createElement(\"box\");\n spread(region, mergeProps(rest, {\n role: \"group\",\n ariaLabel: \"Notifications\",\n get testId() {\n return props.regionTestId ?? \"toast-region\";\n },\n get \"data-corner\"() {\n return props.corner ?? \"bottom-right\";\n },\n \"data-expanded\": \"true\",\n get \"data-paused\"() {\n return paused() ? \"true\" : \"false\";\n },\n get __zguiClass() {\n return classes(sheet.className, \"zui-toast__region\");\n },\n get __zguiStyle() {\n return {\n \"--zui-toast-extent\": `${totalExtent()}px`,\n \"--zui-toast-gap\": `${gapPx()}px`,\n ...(getReducedMotion() ? { \"--zui-toast-move\": \"0ms\" } : {}),\n };\n },\n onPointerEnter() {\n setPaused(true);\n },\n onPointerLeave() {\n setPaused(false);\n },\n }), true);\n slot(region, For({\n get each() {\n return items();\n },\n children(record, index) {\n return ToastRow({\n record,\n index,\n paused,\n offsetFor,\n reportHeight,\n dismiss,\n });\n },\n }));\n return region;\n });\n const holder = createElement(\"box\");\n setProp(holder, \"__zguiInvariantStyle\", { display: \"none\" });\n slot(holder, () => (items().length > 0 ? untrack(mountRegion) : null));\n onCleanup(() => {\n setItems([]);\n });\n if (!(\"children\" in props))\n return holder;\n return [provide(ToastContext, controller, props), holder];\n}\n","export const sheet = { name: \"TreeViewStyle\", className: \"zui-tree\", css: \".zui-tree {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n outline: none;\\n font-family: var(--zui-type-family-sans);\\n font-size: var(--zui-type-size-sm);\\n line-height: var(--zui-type-leading-sm);\\n color: var(--zui-color-foreground);\\n}\\n.zui-tree[data-virtualized=\\\"true\\\"] {\\n height: 100%;\\n min-height: 0;\\n overflow: hidden;\\n}\\n.zui-tree__row {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: var(--zui-space-xs);\\n width: 100%;\\n min-height: 28px;\\n padding: 4px 8px;\\n padding-left: calc(8px + var(--zui-tree-depth, 0) * 16px);\\n border-radius: var(--zui-radius-sm);\\n background-color: transparent;\\n color: var(--zui-color-foreground);\\n outline: none;\\n user-select: none;\\n box-sizing: border-box;\\n}\\n.zui-tree__row:hover {\\n background-color: var(--zui-color-accent);\\n color: var(--zui-color-accent-foreground);\\n}\\n.zui-tree__row[data-selected=\\\"true\\\"] {\\n background-color: color-mix(in oklab, var(--zui-color-primary) 16%, transparent);\\n color: var(--zui-color-foreground);\\n font-weight: var(--zui-type-weight-medium);\\n}\\n.zui-tree__row[data-focused=\\\"true\\\"] {\\n box-shadow: inset 0 0 0 1px var(--zui-color-ring);\\n}\\n.zui-tree__row[data-disabled=\\\"true\\\"] {\\n opacity: 0.5;\\n pointer-events: none;\\n}\\n.zui-tree__chevron {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n width: 16px;\\n height: 16px;\\n flex: none;\\n border-radius: var(--zui-radius-sm);\\n color: var(--zui-color-muted-foreground);\\n}\\n.zui-tree__chevron:hover {\\n background-color: color-mix(in oklab, var(--zui-color-foreground) 10%, transparent);\\n color: var(--zui-color-foreground);\\n}\\n.zui-tree__spacer {\\n display: inline-flex;\\n width: 16px;\\n height: 16px;\\n flex: none;\\n}\\n.zui-tree__icon {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n flex: none;\\n color: var(--zui-color-muted-foreground);\\n}\\n.zui-tree__label {\\n flex: 1 1 auto;\\n min-width: 0;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.zui-tree__badge {\\n flex: none;\\n padding: 0 6px;\\n border-radius: var(--zui-radius-sm);\\n background-color: var(--zui-color-muted);\\n color: var(--zui-color-muted-foreground);\\n font-size: var(--zui-type-size-xs);\\n}\\n.zui-tree__children {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n}\\n.zui-tree__empty {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: var(--zui-space-md);\\n color: var(--zui-color-muted-foreground);\\n font-size: var(--zui-type-size-sm);\\n}\" };\n","import { For, createContext, createEffect, createMemo, createSignal, onCleanup, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { focus, precedes, scrollIntoView } from \"../nodes.js\";\nimport { VirtualList } from \"../virtual-list.js\";\nimport { CHEVRON_DOWN, CHEVRON_RIGHT, Icon } from \"./icons.js\";\nimport { sheet as treeSheet } from \"./generated/TreeViewStyle.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { append, classes, element, provide, slot, useStylesheet, withDefaults } from \"./shared.js\";\nconst TreeContext = createContext(null);\nconst TreeBranchContext = createContext({\n depth: 0,\n parentId: null,\n});\nfunction flattenTree(nodes, expandedSet, depth = 0, parentId = null, out = []) {\n for (const node of nodes) {\n const hasChildren = (node.children?.length ?? 0) > 0;\n const expanded = hasChildren && expandedSet.has(node.id);\n out.push({ id: node.id, node, depth, parentId, hasChildren, expanded });\n if (expanded && node.children) {\n flattenTree(node.children, expandedSet, depth + 1, node.id, out);\n }\n }\n return out;\n}\nfunction findNodeById(nodes, id) {\n for (const node of nodes) {\n if (node.id === id)\n return node;\n if (node.children) {\n const found = findNodeById(node.children, id);\n if (found)\n return found;\n }\n }\n return undefined;\n}\nfunction sortEntries(items) {\n if (items.length <= 1)\n return [...items];\n return [...items].sort((a, b) => {\n if (a.node === b.node)\n return 0;\n try {\n if (precedes(a.node, b.node))\n return -1;\n if (precedes(b.node, a.node))\n return 1;\n return 0;\n }\n catch {\n return 0;\n }\n });\n}\nexport function TreeView(props = {}) {\n useStylesheet(treeSheet);\n const rest = omit(props, \"items\", \"children\", \"selectedId\", \"defaultSelectedId\", \"onSelect\", \"onActivate\", \"expandedIds\", \"defaultExpandedIds\", \"onExpandedChange\", \"renderItem\", \"virtualize\", \"emptyText\", \"label\", \"onKeyDown\");\n const [selectedId, setSelectedId] = createControllable({\n value: () => props.selectedId,\n defaultValue: () => props.defaultSelectedId ?? null,\n onChange: () => next => {\n if (next !== null) {\n const node = props.items ? findNodeById(props.items, next) : undefined;\n props.onSelect?.(next, node);\n }\n },\n }, null);\n const [expandedIds, setExpandedIds] = createControllable({\n value: () => props.expandedIds,\n defaultValue: () => props.defaultExpandedIds ?? [],\n onChange: () => props.onExpandedChange,\n }, []);\n const expandedSet = createMemo(() => new Set(expandedIds()));\n const [focusedId, setFocusedId] = createSignal(untrack(selectedId), {\n ownedWrite: true,\n });\n const [declarativeItems, setDeclarativeItems] = createSignal([], { ownedWrite: true });\n const rowNodes = new Map();\n let virtualController = null;\n let pendingFocusId = null;\n const flatData = createMemo(() => {\n if (!props.items)\n return [];\n return flattenTree(props.items, expandedSet());\n });\n const visibleEntries = createMemo(() => {\n if (props.items) {\n return flatData().map(item => ({\n id: item.id,\n parentId: item.parentId,\n hasChildren: item.hasChildren,\n disabled: !!item.node.disabled,\n node: item.node,\n }));\n }\n return declarativeItems().map(item => ({\n id: item.id,\n parentId: item.parentId,\n hasChildren: item.hasChildren(),\n disabled: item.disabled(),\n }));\n });\n const isExpanded = (id) => expandedSet().has(id);\n const setExpandedState = (id, nextOpen) => {\n const current = untrack(expandedIds);\n const has = current.includes(id);\n if (nextOpen && !has)\n setExpandedIds([...current, id]);\n else if (!nextOpen && has)\n setExpandedIds(current.filter(item => item !== id));\n };\n const toggleExpand = (id) => {\n setExpandedState(id, !isExpanded(id));\n };\n const revealById = (id) => {\n const list = untrack(visibleEntries);\n const idx = list.findIndex(item => item.id === id);\n if (idx < 0)\n return;\n if (props.virtualize && virtualController) {\n virtualController.scrollToIndex(idx, { align: \"auto\" });\n }\n const target = rowNodes.get(id);\n if (target) {\n pendingFocusId = null;\n scrollIntoView(target, { block: \"nearest\", behavior: \"instant\" });\n focus(target);\n }\n else {\n pendingFocusId = id;\n }\n };\n const moveFocusTo = (id) => {\n setFocusedId(id);\n revealById(id);\n };\n const selectId = (id) => {\n setFocusedId(id);\n setSelectedId(id);\n };\n const activateId = (id) => {\n setFocusedId(id);\n setSelectedId(id);\n const node = props.items ? findNodeById(props.items, id) : undefined;\n props.onActivate?.(id, node);\n };\n const findNextEnabled = (startIdx, delta) => {\n const list = untrack(visibleEntries);\n for (let i = startIdx + delta; i >= 0 && i < list.length; i += delta) {\n if (!list[i].disabled)\n return list[i].id;\n }\n return null;\n };\n const handleKeyDown = (event) => {\n const list = untrack(visibleEntries);\n if (list.length === 0)\n return;\n const currentId = untrack(focusedId) ?? untrack(selectedId);\n let currentIdx = currentId ? list.findIndex(item => item.id === currentId) : -1;\n if (currentIdx < 0) {\n currentIdx = list.findIndex(item => !item.disabled);\n if (currentIdx < 0)\n return;\n }\n const current = list[currentIdx];\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n event.stopPropagation();\n const next = findNextEnabled(currentIdx, 1);\n if (next)\n moveFocusTo(next);\n return;\n }\n if (event.key === \"ArrowUp\") {\n event.preventDefault();\n event.stopPropagation();\n const prev = findNextEnabled(currentIdx, -1);\n if (prev)\n moveFocusTo(prev);\n return;\n }\n if (event.key === \"Home\") {\n event.preventDefault();\n event.stopPropagation();\n const first = list.find(item => !item.disabled);\n if (first)\n moveFocusTo(first.id);\n return;\n }\n if (event.key === \"End\") {\n event.preventDefault();\n event.stopPropagation();\n for (let i = list.length - 1; i >= 0; i--) {\n if (!list[i].disabled) {\n moveFocusTo(list[i].id);\n break;\n }\n }\n return;\n }\n if (event.key === \"ArrowRight\") {\n event.preventDefault();\n event.stopPropagation();\n if (!current.hasChildren)\n return;\n if (!isExpanded(current.id)) {\n setExpandedState(current.id, true);\n }\n else {\n const next = findNextEnabled(currentIdx, 1);\n if (next)\n moveFocusTo(next);\n }\n return;\n }\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n event.stopPropagation();\n if (current.hasChildren && isExpanded(current.id)) {\n setExpandedState(current.id, false);\n }\n else if (current.parentId) {\n moveFocusTo(current.parentId);\n }\n return;\n }\n if (event.key === \"Enter\") {\n event.preventDefault();\n event.stopPropagation();\n if (!current.disabled)\n activateId(current.id);\n return;\n }\n if (event.key === \"Space\" || event.key === \" \") {\n event.preventDefault();\n event.stopPropagation();\n if (!current.disabled)\n selectId(current.id);\n }\n };\n createEffect(selectedId, sel => {\n if (sel && untrack(focusedId) === null)\n setFocusedId(sel);\n });\n const registerDeclarative = (entry) => {\n rowNodes.set(entry.id, entry.node);\n setDeclarativeItems(prev => sortEntries([...prev, entry]));\n return () => {\n if (rowNodes.get(entry.id) === entry.node)\n rowNodes.delete(entry.id);\n setDeclarativeItems(prev => prev.filter(item => item !== entry));\n };\n };\n const context = {\n selectedId,\n focusedId,\n isExpanded,\n toggleExpand,\n selectId,\n activateId,\n focusId: setFocusedId,\n registerDeclarative,\n handleKeyDown,\n };\n const renderDataRow = (entryAccessor) => {\n const initial = untrack(entryAccessor);\n const itemId = initial.id;\n const row = createElement(\"control\");\n rowNodes.set(itemId, row);\n onCleanup(() => {\n if (rowNodes.get(itemId) === row)\n rowNodes.delete(itemId);\n });\n const isSelected = () => selectedId() === itemId;\n const isFocused = () => focusedId() === itemId;\n const isOpen = () => isExpanded(itemId);\n spread(row, {\n role: \"listItem\",\n tabIndex: 0,\n get ariaLevel() {\n return entryAccessor().depth + 1;\n },\n testId: `tree-item-${itemId}`,\n get disabled() {\n return !!entryAccessor().node.disabled;\n },\n get selected() {\n return isSelected();\n },\n get expanded() {\n return entryAccessor().hasChildren ? isOpen() : null;\n },\n get \"data-selected\"() {\n return isSelected() ? \"true\" : \"false\";\n },\n get \"data-focused\"() {\n return isFocused() ? \"true\" : \"false\";\n },\n get \"data-expanded\"() {\n return entryAccessor().hasChildren ? (isOpen() ? \"true\" : \"false\") : null;\n },\n get \"data-disabled\"() {\n return entryAccessor().node.disabled ? \"true\" : \"false\";\n },\n \"data-item-id\": itemId,\n __zguiClass: \"zui-tree__row\",\n get __zguiStyle() {\n return { \"--zui-tree-depth\": String(entryAccessor().depth) };\n },\n onFocus() {\n setFocusedId(itemId);\n },\n onKeyDown: handleKeyDown,\n onClick() {\n const cur = untrack(entryAccessor);\n if (cur.node.disabled)\n return;\n focus(row);\n if (cur.hasChildren)\n toggleExpand(itemId);\n activateId(itemId);\n },\n }, true);\n slot(row, () => {\n const cur = entryAccessor();\n if (!cur.hasChildren) {\n return element(\"box\", { class: \"zui-tree__spacer\", ariaHidden: true });\n }\n const chevron = element(\"control\", {\n role: \"button\",\n tabIndex: -1,\n get ariaLabel() {\n return isOpen()\n ? `Collapse ${entryAccessor().node.label}`\n : `Expand ${entryAccessor().node.label}`;\n },\n testId: `tree-toggle-${itemId}`,\n class: \"zui-tree__chevron\",\n onClick(event) {\n event.stopPropagation();\n toggleExpand(itemId);\n },\n });\n slot(chevron, () => Icon({ icon: isOpen() ? CHEVRON_DOWN : CHEVRON_RIGHT, size: \"sm\" }));\n return chevron;\n });\n if (props.renderItem) {\n const custom = props.renderItem(initial.node, {\n get depth() {\n return entryAccessor().depth;\n },\n get expanded() {\n return isOpen();\n },\n get selected() {\n return isSelected();\n },\n get focused() {\n return isFocused();\n },\n get hasChildren() {\n return entryAccessor().hasChildren;\n },\n get disabled() {\n return !!entryAccessor().node.disabled;\n },\n toggleExpand: () => toggleExpand(itemId),\n });\n slot(row, custom);\n }\n else {\n slot(row, () => {\n const iconData = entryAccessor().node.icon;\n if (!iconData)\n return null;\n const iconWrap = element(\"box\", { class: \"zui-tree__icon\", ariaHidden: true });\n append(iconWrap, Icon({ icon: iconData, size: \"sm\" }));\n return iconWrap;\n });\n append(row, element(\"label\", {\n class: \"zui-tree__label\",\n get children() {\n return entryAccessor().node.label;\n },\n }));\n slot(row, () => {\n const badgeText = entryAccessor().node.badge;\n return badgeText\n ? element(\"label\", { class: \"zui-tree__badge\", children: badgeText })\n : null;\n });\n }\n if (pendingFocusId === itemId) {\n createEffect(() => true, () => {\n if (pendingFocusId === itemId) {\n pendingFocusId = null;\n focus(row);\n }\n });\n }\n return row;\n };\n const root = createElement(\"box\");\n spread(root, mergeProps(rest, withDefaults({\n role: \"list\",\n tabIndex: 0,\n get ariaLabel() {\n return props.label ?? null;\n },\n get \"data-virtualized\"() {\n return props.virtualize ? \"true\" : \"false\";\n },\n }, rest), {\n get __zguiClass() {\n return classes(treeSheet.className);\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown))\n return;\n handleKeyDown(event);\n },\n }), true);\n if (props.items !== undefined) {\n const emptyFallback = () => element(\"box\", {\n class: \"zui-tree__empty\",\n role: \"status\",\n get children() {\n return props.emptyText ?? \"No items\";\n },\n });\n if (props.virtualize) {\n const opts = typeof props.virtualize === \"object\" ? props.virtualize : {};\n append(root, VirtualList({\n get each() {\n return flatData();\n },\n keyed: entry => entry.id,\n itemHeight: opts.itemHeight ?? 28,\n overscan: opts.overscan ?? 4,\n initialHeight: opts.initialHeight ?? 320,\n gap: opts.gap ?? 0,\n style: { flexGrow: 1, height: \"100%\", minHeight: \"0px\" },\n controller: handle => {\n virtualController = handle;\n },\n get fallback() {\n return emptyFallback();\n },\n children: entry => renderDataRow(entry),\n }));\n }\n else {\n slot(root, For({\n get each() {\n return flatData();\n },\n keyed: entry => entry.id,\n get fallback() {\n return emptyFallback();\n },\n children: entry => renderDataRow(entry),\n }));\n }\n }\n else {\n slot(root, provide(TreeContext, context, () => provide(TreeBranchContext, { depth: 0, parentId: null }, props)));\n }\n return root;\n}\nexport function TreeItem(props) {\n useStylesheet(treeSheet);\n const context = useContext(TreeContext);\n const branch = useContext(TreeBranchContext);\n const rest = omit(props, \"itemId\", \"label\", \"children\", \"icon\", \"badge\", \"disabled\", \"expandable\", \"onClick\", \"onKeyDown\");\n const hasChildren = () => props.expandable ?? \"children\" in props;\n const isExpanded = () => context?.isExpanded(props.itemId) ?? false;\n const isSelected = () => context?.selectedId() === props.itemId;\n const isFocused = () => context?.focusedId() === props.itemId;\n const container = element(\"box\", { class: \"zui-tree__children\" });\n const row = createElement(\"control\");\n if (context) {\n const unregister = context.registerDeclarative({\n id: props.itemId,\n parentId: branch.parentId,\n depth: branch.depth,\n node: row,\n hasChildren,\n disabled: () => !!props.disabled,\n });\n onCleanup(unregister);\n }\n spread(row, mergeProps(rest, withDefaults({\n role: \"listItem\",\n tabIndex: 0,\n ariaLevel: branch.depth + 1,\n get disabled() {\n return !!props.disabled;\n },\n get selected() {\n return isSelected();\n },\n get expanded() {\n return hasChildren() ? isExpanded() : null;\n },\n get \"data-selected\"() {\n return isSelected() ? \"true\" : \"false\";\n },\n get \"data-focused\"() {\n return isFocused() ? \"true\" : \"false\";\n },\n get \"data-expanded\"() {\n return hasChildren() ? (isExpanded() ? \"true\" : \"false\") : null;\n },\n get \"data-disabled\"() {\n return props.disabled ? \"true\" : \"false\";\n },\n get \"data-item-id\"() {\n return props.itemId;\n },\n __zguiStyle: { \"--zui-tree-depth\": String(branch.depth) },\n }, rest), {\n get __zguiClass() {\n return classes(\"zui-tree__row\");\n },\n onFocus() {\n context?.focusId(props.itemId);\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown))\n return;\n context?.handleKeyDown(event);\n },\n onClick(event) {\n if (!callHandler(event, props.onClick) || props.disabled)\n return;\n focus(row);\n if (hasChildren())\n context?.toggleExpand(props.itemId);\n context?.activateId(props.itemId);\n },\n }), true);\n slot(row, () => {\n if (!hasChildren())\n return element(\"box\", { class: \"zui-tree__spacer\", ariaHidden: true });\n const chevron = element(\"control\", {\n role: \"button\",\n tabIndex: -1,\n ariaLabel: isExpanded() ? `Collapse ${props.label}` : `Expand ${props.label}`,\n class: \"zui-tree__chevron\",\n onClick(event) {\n event.stopPropagation();\n context?.toggleExpand(props.itemId);\n },\n });\n slot(chevron, () => Icon({ icon: isExpanded() ? CHEVRON_DOWN : CHEVRON_RIGHT, size: \"sm\" }));\n return chevron;\n });\n if (props.icon) {\n const iconWrap = element(\"box\", { class: \"zui-tree__icon\", ariaHidden: true });\n append(iconWrap, Icon({ icon: props.icon, size: \"sm\" }));\n append(row, iconWrap);\n }\n append(row, element(\"label\", { class: \"zui-tree__label\", children: props.label }));\n if (props.badge) {\n append(row, element(\"label\", { class: \"zui-tree__badge\", children: props.badge }));\n }\n append(container, row);\n slot(container, () => {\n if (!hasChildren() || !isExpanded())\n return null;\n return provide(TreeBranchContext, { depth: branch.depth + 1, parentId: props.itemId }, () => untrack(() => props.children));\n });\n return container;\n}\n","import { createContext, createEffect, createMemo, createSignal, omit, untrack, useContext, } from \"#solid\";\nimport { createElement, mergeProps, spread } from \"../renderer/index.js\";\nimport { focus } from \"../nodes.js\";\nimport { createVirtualFocus } from \"../primitives/virtual-focus.js\";\nimport { VirtualList } from \"../virtual-list.js\";\nimport { Dialog, DialogContent, DialogTitle } from \"./dialog.js\";\nimport { Icon, SEARCH } from \"./icons.js\";\nimport { Input } from \"./input.js\";\nimport { Kbd, KbdGroup } from \"./kbd.js\";\nimport { callHandler, createControllable } from \"./state.js\";\nimport { append, classes, element, provide, slot, useStylesheet } from \"./shared.js\";\nimport { sheet as commandSheet } from \"./generated/CommandStyle.js\";\nimport { sheet as selectSheet } from \"./generated/SelectStyle.js\";\nimport { sheet as menuSheet } from \"./generated/MenuStyle.js\";\nconst DEFAULT_ITEM_HEIGHT = 36;\nconst DEFAULT_LIST_HEIGHT = 300;\nconst DEFAULT_OVERSCAN = 4;\nconst CommandPaletteContext = createContext(null);\nfunction isWordBoundary(text, index) {\n if (index <= 0)\n return true;\n const prev = text.charCodeAt(index - 1);\n return prev === 32 || prev === 45 || prev === 95 || prev === 47 || prev === 46 || prev === 58;\n}\nfunction fuzzySubsequenceScore(haystack, needle) {\n if (needle.length === 0)\n return 0;\n if (needle.length > haystack.length)\n return null;\n let score = 0;\n let hayIndex = 0;\n let prevMatch = -2;\n for (let i = 0; i < needle.length; i++) {\n const ch = needle.charCodeAt(i);\n let found = -1;\n for (let j = hayIndex; j < haystack.length; j++) {\n if (haystack.charCodeAt(j) === ch) {\n found = j;\n break;\n }\n }\n if (found < 0)\n return null;\n score += 10;\n if (found === prevMatch + 1) {\n score += 15;\n }\n else if (prevMatch >= 0) {\n score -= Math.min(8, found - prevMatch - 1);\n }\n if (isWordBoundary(haystack, found)) {\n score += 12;\n }\n prevMatch = found;\n hayIndex = found + 1;\n }\n return score;\n}\nfunction scoreSingleToken(command, token) {\n const label = command.label.toLowerCase();\n if (label === token)\n return 1000;\n if (label.startsWith(token))\n return 800 - Math.min(100, label.length - token.length);\n const labelIndex = label.indexOf(token);\n if (labelIndex >= 0) {\n return 600 - Math.min(100, labelIndex) + (isWordBoundary(label, labelIndex) ? 40 : 0);\n }\n const secondaryParts = [];\n if (command.keywords && command.keywords.length > 0)\n secondaryParts.push(command.keywords.join(\" \"));\n if (command.group)\n secondaryParts.push(command.group);\n if (command.description)\n secondaryParts.push(command.description);\n const secondary = secondaryParts.join(\" \").toLowerCase();\n if (secondary.length > 0) {\n const secondaryIndex = secondary.indexOf(token);\n if (secondaryIndex >= 0) {\n return 400 - Math.min(100, secondaryIndex);\n }\n }\n const labelFuzzy = fuzzySubsequenceScore(label, token);\n if (labelFuzzy !== null)\n return 200 + labelFuzzy;\n if (secondary.length > 0) {\n const combined = `${label} ${secondary}`;\n const combinedFuzzy = fuzzySubsequenceScore(combined, token);\n if (combinedFuzzy !== null)\n return 100 + combinedFuzzy;\n }\n return null;\n}\n/**\n * Default fuzzy + substring matcher for `CommandPalette`.\n * Returns a numeric relevance score (higher is better), or `null` when the command does not match.\n */\nexport function scoreCommandMatch(command, rawQuery) {\n const normalized = rawQuery.trim().toLowerCase();\n if (normalized.length === 0)\n return 0;\n const tokens = normalized.split(/\\s+/);\n let total = 0;\n for (const token of tokens) {\n const score = scoreSingleToken(command, token);\n if (score === null)\n return null;\n total += score;\n }\n return total;\n}\nfunction mergeCommands(...sources) {\n const byId = new Map();\n const order = [];\n for (const source of sources) {\n if (!source)\n continue;\n for (const item of source) {\n if (!byId.has(item.id))\n order.push(item.id);\n byId.set(item.id, item);\n }\n }\n const result = [];\n for (const id of order) {\n const item = byId.get(id);\n if (item)\n result.push(item);\n }\n return result;\n}\nfunction parseShortcutTokens(shortcut) {\n if (!shortcut)\n return [];\n if (Array.isArray(shortcut)) {\n return shortcut.filter((part) => typeof part === \"string\" && part.length > 0);\n }\n const text = shortcut.trim();\n if (text.length === 0)\n return [];\n if (text === \"+\")\n return [\"+\"];\n if (!text.includes(\"+\"))\n return [text];\n const tokens = [];\n let start = 0;\n for (let i = 0; i < text.length; i++) {\n if (text[i] === \"+\") {\n const part = text.slice(start, i).trim();\n if (part.length > 0)\n tokens.push(part);\n else if (i === text.length - 1 || text[i + 1] === \"+\") {\n tokens.push(\"+\");\n if (text[i + 1] === \"+\")\n i += 1;\n }\n start = i + 1;\n }\n }\n const tail = text.slice(start).trim();\n if (tail.length > 0)\n tokens.push(tail);\n return tokens;\n}\nfunction renderShortcut(shortcut) {\n const tokens = parseShortcutTokens(shortcut);\n if (tokens.length === 0)\n return null;\n if (tokens.length === 1) {\n return Kbd({\n style: { marginLeft: \"auto\", flexShrink: 0 },\n children: tokens[0],\n });\n }\n const group = KbdGroup({\n style: { marginLeft: \"auto\", flexShrink: 0 },\n });\n for (const token of tokens) {\n append(group, Kbd({ children: token }));\n }\n return group;\n}\nexport function CommandPaletteProvider(props = {}) {\n const [open, setOpen] = createControllable({\n value: () => props.open,\n defaultValue: () => props.defaultOpen,\n onChange: () => props.onOpenChange,\n }, false);\n const [query, setQuery] = createControllable({\n value: () => props.query,\n defaultValue: () => props.defaultQuery,\n onChange: () => props.onQueryChange,\n }, \"\");\n const [batches, setBatches] = createSignal([], { ownedWrite: true });\n const registerCommands = (commands) => {\n const token = Symbol(\"command-batch\");\n const snapshot = [...commands];\n setBatches(current => [...current, { token, commands: snapshot }]);\n let active = true;\n return () => {\n if (!active)\n return;\n active = false;\n setBatches(current => current.filter(entry => entry.token !== token));\n };\n };\n const registerCommand = (command) => registerCommands([command]);\n const commands = createMemo(() => {\n const lists = [props.commands];\n for (const batch of batches())\n lists.push(batch.commands);\n return mergeCommands(...lists);\n });\n const value = {\n open,\n setOpen,\n toggle() {\n setOpen(!untrack(open));\n },\n query,\n setQuery,\n commands,\n registerCommand,\n registerCommands,\n };\n return provide(CommandPaletteContext, value, props);\n}\nexport function useCommandPalette() {\n const ctx = useContext(CommandPaletteContext);\n if (!ctx) {\n throw new Error(\"useCommandPalette must be used inside a CommandPaletteProvider\");\n }\n return ctx;\n}\nfunction buildFilteredModel(commands, query, filter) {\n const hasQuery = query.trim().length > 0;\n const matcher = filter ?? scoreCommandMatch;\n const groups = new Map();\n let order = 0;\n for (const command of commands) {\n const raw = matcher(command, query);\n let score;\n if (raw === false || raw === null || raw === undefined) {\n score = null;\n }\n else if (raw === true) {\n score = 1;\n }\n else if (typeof raw === \"number\" && Number.isFinite(raw)) {\n score = raw;\n }\n else {\n score = null;\n }\n if (score === null)\n continue;\n const groupName = command.group ?? \"\";\n let bucket = groups.get(groupName);\n if (!bucket) {\n bucket = { name: groupName, order: groups.size, items: [], bestScore: score };\n groups.set(groupName, bucket);\n }\n else if (score > bucket.bestScore) {\n bucket.bestScore = score;\n }\n bucket.items.push({ command, score, order: order++ });\n }\n const orderedGroups = [...groups.values()];\n if (hasQuery) {\n orderedGroups.sort((a, b) => b.bestScore - a.bestScore || a.order - b.order);\n for (const bucket of orderedGroups) {\n bucket.items.sort((a, b) => b.score - a.score || a.order - b.order);\n }\n }\n const rows = [];\n const items = [];\n const rowIndexById = new Map();\n for (const bucket of orderedGroups) {\n if (bucket.name.length > 0) {\n rows.push({ kind: \"group\", key: `group:${bucket.name}`, label: bucket.name });\n }\n for (const entry of bucket.items) {\n const cmd = entry.command;\n const rowIndex = rows.length;\n rows.push({ kind: \"item\", key: `item:${cmd.id}`, command: cmd });\n items.push(cmd);\n rowIndexById.set(cmd.id, rowIndex);\n }\n }\n return { rows, items, rowIndexById };\n}\nexport function CommandPalette(props = {}) {\n useStylesheet(commandSheet);\n useStylesheet(selectSheet);\n useStylesheet(menuSheet);\n const provider = useContext(CommandPaletteContext);\n const rest = omit(props, \"commands\", \"open\", \"defaultOpen\", \"onOpenChange\", \"query\", \"defaultQuery\", \"onQueryChange\", \"onSelect\", \"onActiveIdChange\", \"filter\", \"placeholder\", \"emptyText\", \"title\", \"label\", \"itemHeight\", \"listHeight\", \"overscan\", \"closeOnSelect\", \"resetQueryOnClose\", \"dismissOnOutsidePress\", \"dismissOnEscape\", \"dismissControl\", \"inputTestId\", \"listTestId\", \"emptyTestId\", \"class\", \"onKeyDown\");\n const useProviderOpen = provider !== null && props.open === undefined && props.defaultOpen === undefined;\n const [localOpen, setLocalOpen] = createControllable({\n value: () => props.open,\n defaultValue: () => props.defaultOpen,\n onChange: () => props.onOpenChange,\n }, false);\n const open = useProviderOpen ? () => provider.open() : localOpen;\n const setOpen = (next) => {\n if (useProviderOpen) {\n provider.setOpen(next);\n props.onOpenChange?.(next);\n }\n else {\n setLocalOpen(next);\n }\n };\n const useProviderQuery = provider !== null && props.query === undefined && props.defaultQuery === undefined;\n const [localQuery, setLocalQuery] = createControllable({\n value: () => props.query,\n defaultValue: () => props.defaultQuery,\n onChange: () => props.onQueryChange,\n }, \"\");\n const query = useProviderQuery ? () => provider.query() : localQuery;\n const setQuery = (next) => {\n if (useProviderQuery) {\n provider.setQuery(next);\n props.onQueryChange?.(next);\n }\n else {\n setLocalQuery(next);\n }\n };\n const allCommands = createMemo(() => {\n if (provider && props.commands)\n return mergeCommands(provider.commands(), props.commands);\n if (provider)\n return provider.commands();\n return props.commands ? mergeCommands(props.commands) : [];\n });\n const model = createMemo(() => buildFilteredModel(allCommands(), query(), props.filter));\n let listController = null;\n let invokedInOpenCycle = false;\n let wasOpen = untrack(open);\n const scrollActiveIntoView = (commandId, revealTopHeader = false) => {\n if (!commandId || !listController)\n return;\n const currentModel = untrack(model);\n const rowIndex = currentModel.rowIndexById.get(commandId);\n if (rowIndex === undefined)\n return;\n const targetRow = revealTopHeader && rowIndex === 1 && currentModel.rows[0]?.kind === \"group\" ? 0 : rowIndex;\n listController.scrollToIndex(targetRow, { align: \"auto\", behavior: \"instant\" });\n };\n const executeCommand = (command) => {\n if (command.disabled)\n return;\n const closeOnSelect = props.closeOnSelect ?? true;\n if (closeOnSelect && invokedInOpenCycle)\n return;\n if (closeOnSelect) {\n invokedInOpenCycle = true;\n setOpen(false);\n }\n command.onSelect?.();\n props.onSelect?.(command);\n };\n const virtualFocus = createVirtualFocus({\n items: () => model().items,\n getId: item => item.id,\n isDisabled: item => !!item.disabled,\n columns: 1,\n wrap: true,\n textValue: query,\n onReveal(commandId, itemIndex) {\n scrollActiveIntoView(commandId, itemIndex === 0);\n },\n onActivate(command) {\n executeCommand(command);\n },\n });\n createEffect(() => open(), isOpen => {\n if (isOpen && !wasOpen) {\n invokedInOpenCycle = false;\n }\n else if (!isOpen && wasOpen) {\n if (props.resetQueryOnClose ?? true) {\n setQuery(\"\");\n }\n listController = null;\n }\n wasOpen = isOpen;\n });\n // Reveal the active item when opening or when filtering changes the result set.\n let lastRevealedModel = null;\n createEffect(() => ({ isOpen: open(), current: model(), id: virtualFocus.activeId() }), ({ isOpen, current, id }) => {\n if (!isOpen) {\n lastRevealedModel = null;\n return;\n }\n if (lastRevealedModel !== current) {\n lastRevealedModel = current;\n if (id !== null) {\n const rowIndex = current.rowIndexById.get(id);\n scrollActiveIntoView(id, rowIndex === 1);\n }\n }\n });\n createEffect(() => ({ isOpen: open(), id: virtualFocus.activeId() }), ({ isOpen, id }) => {\n props.onActiveIdChange?.(isOpen ? id : null);\n });\n const buildBody = () => {\n const itemHeight = props.itemHeight ?? DEFAULT_ITEM_HEIGHT;\n const listHeight = props.listHeight ?? DEFAULT_LIST_HEIGHT;\n const root = element(\"column\", {\n __zguiClass: classes(commandSheet.className, \"zui-command\"),\n });\n const fieldRow = element(\"row\", {\n __zguiClass: \"zui-command__field\",\n });\n const inputNode = Input({\n role: \"comboBox\",\n ariaHasPopup: \"listbox\",\n expanded: true,\n get ariaActiveDescendant() {\n return virtualFocus.activeNode();\n },\n class: \"zui-command__input\",\n get testId() {\n return props.inputTestId ?? null;\n },\n get value() {\n return query();\n },\n get placeholder() {\n return props.placeholder ?? \"Type a command or search...\";\n },\n get label() {\n return props.label ?? props.title ?? \"Command Palette\";\n },\n onValueChange(nextValue) {\n setQuery(nextValue);\n },\n onKeyDown(event) {\n if (!callHandler(event, props.onKeyDown))\n return;\n virtualFocus.onKeyDown(event);\n },\n });\n createEffect(() => open(), isOpen => {\n if (isOpen)\n focus(inputNode);\n });\n append(fieldRow, Icon({ icon: SEARCH, size: \"sm\" }));\n append(fieldRow, inputNode);\n append(root, fieldRow);\n const listNode = VirtualList({\n get each() {\n return model().rows;\n },\n keyed: row => row.key,\n itemHeight,\n initialHeight: listHeight,\n get overscan() {\n return props.overscan ?? DEFAULT_OVERSCAN;\n },\n role: \"listBox\",\n get testId() {\n return props.listTestId ?? null;\n },\n class: \"zui-command__list\",\n style: { maxHeight: `${listHeight}px` },\n controller(ctrl) {\n listController = ctrl;\n },\n get fallback() {\n return element(\"box\", {\n __zguiClass: \"zui-combobox__empty\",\n role: \"status\",\n get testId() {\n return props.emptyTestId ?? null;\n },\n get children() {\n return props.emptyText ?? \"No commands found.\";\n },\n });\n },\n children(rowAccessor) {\n const initial = untrack(rowAccessor);\n if (initial.kind === \"group\") {\n const groupNode = element(\"box\", {\n role: \"group\",\n __zguiClass: \"zui-command__group\",\n __zguiStyle: {\n height: `${itemHeight}px`,\n flexShrink: 0,\n justifyContent: \"center\",\n paddingTop: \"0px\",\n paddingBottom: \"0px\",\n },\n });\n append(groupNode, element(\"label\", {\n __zguiClass: \"zui-menu__label\",\n __zguiStyle: { paddingTop: \"0px\", paddingBottom: \"0px\" },\n get children() {\n const r = rowAccessor();\n return r.kind === \"group\" ? r.label : \"\";\n },\n }));\n return groupNode;\n }\n const command = () => {\n const r = rowAccessor();\n return r.kind === \"item\" ? r.command : initial.command;\n };\n const itemNode = createElement(\"control\");\n virtualFocus.register(initial.command.id, itemNode);\n spread(itemNode, {\n role: \"listBoxOption\",\n tabIndex: -1,\n __zguiClass: classes(\"zui-select__item\", \"zui-command__item\"),\n __zguiStyle: {\n height: `${itemHeight}px`,\n flexShrink: 0,\n boxSizing: \"border-box\",\n },\n get disabled() {\n return !!command().disabled;\n },\n get selected() {\n return virtualFocus.activeId() === command().id;\n },\n get \"data-active\"() {\n return virtualFocus.activeId() === command().id ? \"true\" : \"false\";\n },\n get \"data-disabled\"() {\n return command().disabled ? \"true\" : \"false\";\n },\n get \"data-command-id\"() {\n return command().id;\n },\n onPointerEnter() {\n const cmd = command();\n if (!cmd.disabled)\n virtualFocus.setActive(cmd.id);\n },\n onPointerDown(event) {\n // Keep keyboard focus and IME composition inside the search input field.\n event.preventDefault();\n },\n onClick() {\n executeCommand(command());\n },\n }, true);\n slot(itemNode, () => {\n const iconData = command().icon;\n return iconData ? Icon({ icon: iconData, size: \"sm\" }) : null;\n });\n const textWrap = element(\"row\", {\n __zguiStyle: {\n alignItems: \"center\",\n gap: \"var(--zui-space-sm)\",\n flexGrow: 1,\n minWidth: \"0px\",\n overflow: \"hidden\",\n },\n });\n append(textWrap, element(\"label\", {\n __zguiStyle: { whiteSpace: \"nowrap\" },\n get children() {\n return command().label;\n },\n }));\n slot(textWrap, () => {\n const desc = command().description;\n if (!desc)\n return null;\n return element(\"label\", {\n __zguiClass: \"zui-select__placeholder\",\n __zguiStyle: {\n fontSize: \"var(--zui-type-size-xs)\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n },\n children: desc,\n });\n });\n append(itemNode, textWrap);\n slot(itemNode, () => renderShortcut(command().shortcut));\n return itemNode;\n },\n });\n append(root, listNode);\n return root;\n };\n return Dialog({\n get open() {\n return open();\n },\n onOpenChange: setOpen,\n get children() {\n return DialogContent(mergeProps(rest, {\n get class() {\n return classes(\"zui-command__dialog\", props.class);\n },\n get dismissControl() {\n return props.dismissControl ?? false;\n },\n get dismissOnOutsidePress() {\n return props.dismissOnOutsidePress ?? true;\n },\n get dismissOnEscape() {\n return props.dismissOnEscape ?? true;\n },\n get children() {\n return [\n DialogTitle({\n get children() {\n return props.title ?? \"Command Palette\";\n },\n }),\n buildBody(),\n ];\n },\n }));\n },\n });\n}\n","import { getOwner, onCleanup } from \"#solid\";\n/** Return fresh copies of the session's resolved path declarations. */\nexport function getResolvedCapabilities() {\n return globalThis.__zguiServices.getResolvedCapabilities();\n}\n/** Return a declared endpoint, or null if unbound. Undeclared names throw E_CAPABILITY. */\nexport function getAuthorizedEndpoint(name) {\n return globalThis.__zguiServices.getAuthorizedEndpoint(name);\n}\n/**\n * Read a manifest-declared UTF-8 asset relative to the active application package.\n * Invalid arguments, non-canonical paths and undeclared assets throw synchronously.\n * I/O, UTF-8 and size failures reject promise with an Error carrying a string code.\n * Call during mount, a lifecycle callback or an event, never module evaluation.\n */\nexport function readTextAsset(path) {\n return globalThis.__zguiServices.readTextAsset(path);\n}\n/**\n * Read a declared UTF-8 asset inside a Solid owner scope, cancelling the host\n * request automatically on owner cleanup without triggering strict rejection faults.\n */\nexport function loadTextAsset(path) {\n const request = readTextAsset(path);\n let cancelled = false;\n if (getOwner()) {\n onCleanup(() => {\n cancelled = true;\n request.cancel();\n });\n }\n return request.promise.catch((reason) => {\n if (cancelled && reason instanceof Error && \"code\" in reason && reason.code === \"Cancelled\") {\n return \"\";\n }\n throw reason;\n });\n}\n/**\n * Register the verified bytes of a manifest-declared asset as an image handle.\n * Call during mount, a lifecycle callback or an event. Release the handle explicitly.\n */\nexport function registerImageAsset(path) {\n return globalThis.__zguiServices.registerImageAsset(path);\n}\nfunction releaseWithOwner(handle) {\n if (getOwner())\n onCleanup(() => handle.release());\n return handle;\n}\n/** Register an image asset, releasing it automatically if called inside a Solid owner. */\nexport function loadImageAsset(path) {\n return releaseWithOwner(registerImageAsset(path));\n}\n/** Copy encoded image bytes into the session. Release the returned handle explicitly. */\nexport function registerImageBytes(bytes) {\n return globalThis.__zguiServices.registerImageBytes(bytes);\n}\n/** Register image bytes, releasing the handle automatically inside a Solid owner. */\nexport function loadImageBytes(bytes) {\n return releaseWithOwner(registerImageBytes(bytes));\n}\n/** Connect to a manifest-allowed Unix socket; a Solid owner closes it on cleanup. */\nexport function connectUnixSocket(path, options) {\n const socket = globalThis.__zguiServices.connectUnixSocket(path, options);\n if (getOwner()) {\n onCleanup(() => socket.close());\n }\n return socket;\n}\nexport function spawnCommand(program, args, options) {\n const command = globalThis.__zguiServices.spawnCommand(program, args, options);\n if (getOwner()) {\n onCleanup(() => {\n // Observe owner cancellation without replacing the caller's promise or handling it early.\n if (\"promise\" in command)\n void command.promise.catch(() => { });\n command.cancel();\n });\n }\n return command;\n}\n/** Subscribe to control messages; returns an unsubscribe function and registers owner cleanup. */\nexport function onControlMessage(handler) {\n const unsubscribe = globalThis.__zguiServices.onControlMessage(handler);\n if (getOwner()) {\n onCleanup(unsubscribe);\n }\n return unsubscribe;\n}\n/**\n * Read plain UTF-8 text from the system clipboard.\n * Requires either `capabilities.clipboard.read` in the sealed manifest or an active\n * user interaction gesture turn; otherwise throws `HostServiceError` (`E_CAPABILITY`).\n * Resolves to `null` when the clipboard is empty or holds no text representation.\n */\nexport function readClipboardText() {\n return globalThis.__zguiServices.readClipboardText();\n}\n/**\n * Read clipboard text inside a Solid owner scope, cancelling the pending host request\n * automatically on owner cleanup without triggering strict unhandled-rejection faults.\n */\nexport function clipboardReadText() {\n const request = readClipboardText();\n let cancelled = false;\n if (getOwner()) {\n onCleanup(() => {\n cancelled = true;\n request.cancel();\n });\n }\n return request.promise.catch((reason) => {\n if (cancelled && reason instanceof Error && \"code\" in reason && reason.code === \"Cancelled\") {\n return null;\n }\n throw reason;\n });\n}\n/** Write plain UTF-8 text to the system clipboard. Allowed without extra read capability. */\nexport function writeClipboardText(text, options) {\n return globalThis.__zguiServices.writeClipboardText(text, options);\n}\n/**\n * Read a PNG image from the system clipboard as a host-owned `ImageHandle`.\n * Requires either `capabilities.clipboard.read` or an active user interaction gesture.\n * Release the returned handle explicitly when finished.\n */\nexport function readClipboardImage() {\n return globalThis.__zguiServices.readClipboardImage();\n}\n/**\n * Read a clipboard PNG image inside a Solid owner scope, automatically cancelling pending\n * reads and releasing any resolved `ImageHandle` on owner cleanup.\n */\nexport function clipboardReadImage() {\n const request = readClipboardImage();\n let disposed = false;\n let resolvedHandle = null;\n if (getOwner()) {\n onCleanup(() => {\n disposed = true;\n request.cancel();\n if (resolvedHandle) {\n resolvedHandle.release();\n resolvedHandle = null;\n }\n });\n }\n return request.promise.then(handle => {\n if (disposed) {\n handle?.release();\n return null;\n }\n resolvedHandle = handle;\n return handle;\n }, (reason) => {\n if (disposed && reason instanceof Error && \"code\" in reason && reason.code === \"Cancelled\") {\n return null;\n }\n throw reason;\n });\n}\n/** Write PNG image bytes or a live `ImageHandle` to the system clipboard. */\nexport function writeClipboardImage(source, options) {\n return globalThis.__zguiServices.writeClipboardImage(source, options);\n}\nexport { openDatabase, openKvStore } from \"./sqlite.js\";\nexport { listBookmarks, openAuthorizedDirectory, openDirectoryDialog, openFileDialog, persistHandle, restoreBookmark, revokeBookmark, saveFileDialog, watchDirectory, } from \"./files.js\";\nexport { connectWebSocket, createScopedFetch, httpRequest, openEventStream } from \"./network.js\";\nexport { spawnWorker } from \"./worker.js\";\nexport { createKvState } from \"./kv-state.js\";\nexport { createHostQuery } from \"./host-query.js\";\n",".shell {\n width: 100%;\n height: 100vh;\n display: flex;\n flex-direction: column;\n background: #0f172a;\n color: #e2e8f0;\n}\n\n.toolbar {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 12px;\n background: #111827;\n border-bottom: 1px solid #1f2937;\n}\n\n.toolbarGroup {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n.title {\n font-size: 14px;\n font-weight: 600;\n color: #f8fafc;\n}\n\n.workspace {\n flex: 1;\n min-height: 0;\n}\n\n.pane {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 10px;\n gap: 8px;\n background: #0f172a;\n}\n\n.paneHeader {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n}\n\n.sectionTitle {\n font-size: 11px;\n font-weight: 600;\n color: #94a3b8;\n}\n\n.scrollArea {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 10px;\n border-radius: 8px;\n background: #1e293b;\n border: 1px solid #334155;\n}\n\n.row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.mono {\n font-family: monospace;\n font-size: 12px;\n color: #e2e8f0;\n}\n\n.muted {\n color: #94a3b8;\n font-size: 12px;\n}\n\n.source {\n font-family: monospace;\n font-size: 12px;\n color: #38bdf8;\n}\n\n.redacted {\n color: #fbbf24;\n font-size: 12px;\n font-weight: 600;\n}\n\n.errorBanner {\n padding: 8px 12px;\n background: #450a0a;\n border-bottom: 1px solid #b91c1c;\n color: #fecaca;\n font-size: 12px;\n}\n\n.boxDiagram {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px;\n border-radius: 6px;\n background: #0f172a;\n border: 1px solid #334155;\n}\n","import {\n Show,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n renderApp,\n type NativeNode,\n} from \"@hewel/zgui\";\nimport {\n Badge,\n Button,\n Separator,\n SplitPane,\n SplitPaneHandle,\n SplitPanePanel,\n ThemeProvider,\n TreeView,\n type TreeNodeData,\n} from \"@hewel/zgui/components\";\nimport {\n connectUnixSocket,\n getAuthorizedEndpoint,\n getResolvedCapabilities,\n type UnixSocket,\n} from \"@hewel/zgui-services\";\nimport styles from \"./Inspector.module.css\";\n\ninterface Bounds {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n}\n\ninterface BoxEdges {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\ninterface BoxModel {\n readonly borderBox: Bounds;\n readonly contentBox: Bounds;\n readonly padding: BoxEdges;\n readonly border: BoxEdges;\n readonly margin: BoxEdges;\n}\n\ninterface ComputedStyleSummary {\n readonly display: string;\n readonly position: string;\n readonly visibility: string;\n readonly opacity: number;\n readonly fontSize: number;\n}\n\ninterface InspectorNode {\n readonly token: string;\n readonly parent?: string | null;\n readonly kind: string;\n readonly testId?: string | null;\n readonly classes?: readonly string[];\n readonly source?: string | null;\n readonly role?: string | null;\n readonly text?: string;\n readonly redacted?: boolean;\n readonly boundsLogical?: Bounds | null;\n readonly boxModel?: BoxModel | null;\n readonly computedStyle?: ComputedStyleSummary | null;\n}\n\ninterface FramePhases {\n readonly styleUs: number;\n readonly layoutUs: number;\n readonly paintUs: number;\n readonly totalUs: number;\n}\n\ninterface InspectorSurface {\n readonly surface: string;\n readonly coherent?: boolean;\n readonly coherenceStatus?: string;\n readonly excluded?: boolean;\n readonly reason?: string;\n readonly frame?: {\n readonly frameOrdinal?: number | null;\n readonly phases?: FramePhases;\n };\n readonly nodes?: readonly InspectorNode[];\n}\n\ninterface PickerTarget {\n readonly surface: string;\n readonly token: string;\n readonly source?: string | null;\n}\n\ninterface PickerSnapshot {\n readonly active?: boolean;\n readonly forbidden?: boolean;\n readonly reason?: string;\n readonly hovered?: PickerTarget | null;\n readonly selected?: PickerTarget | null;\n}\n\ninterface InspectorSnapshot {\n readonly readOnly?: boolean;\n readonly error?: string;\n readonly picker?: PickerSnapshot;\n readonly surfaces?: readonly InspectorSurface[];\n readonly session?: {\n readonly generation?: number;\n readonly resources?: {\n readonly nodes?: number;\n readonly callbacks?: number;\n readonly timers?: number;\n readonly unixSockets?: number;\n };\n };\n readonly profiler?: {\n readonly frameCount?: number;\n readonly frames?: readonly {\n readonly ordinal?: number;\n readonly styleUs?: number;\n readonly layoutUs?: number;\n readonly paintUs?: number;\n readonly totalUs?: number;\n }[];\n };\n}\n\ninterface FlatSelection {\n readonly surface: string;\n readonly node: InspectorNode;\n}\n\nfunction formatEdges(edges: BoxEdges): string {\n return `${Math.round(edges.top)} ${Math.round(edges.right)} ${Math.round(edges.bottom)} ${Math.round(edges.left)}`;\n}\n\nfunction formatBounds(bounds: Bounds): string {\n return `${Math.round(bounds.x)}, ${Math.round(bounds.y)} (${Math.round(bounds.width)}x${Math.round(bounds.height)})`;\n}\n\nfunction buildSurfaceTree(surfaces: readonly InspectorSurface[]): {\n readonly items: readonly TreeNodeData<FlatSelection>[];\n readonly byId: ReadonlyMap<string, FlatSelection>;\n readonly defaultExpanded: readonly string[];\n} {\n const byId = new Map<string, FlatSelection>();\n const defaultExpanded: string[] = [];\n const items: TreeNodeData<FlatSelection>[] = [];\n\n for (const surface of surfaces) {\n const surfaceId = `surface:${surface.surface}`;\n defaultExpanded.push(surfaceId);\n const nodes = surface.nodes ?? [];\n const childrenByParent = new Map<string, InspectorNode[]>();\n const roots: InspectorNode[] = [];\n const knownTokens = new Set(nodes.map(n => n.token));\n\n for (const node of nodes) {\n const id = `${surface.surface}:${node.token}`;\n byId.set(id, { surface: surface.surface, node });\n if (node.parent && knownTokens.has(node.parent)) {\n const list = childrenByParent.get(node.parent) ?? [];\n list.push(node);\n childrenByParent.set(node.parent, list);\n } else {\n roots.push(node);\n }\n }\n\n const toTreeNode = (node: InspectorNode): TreeNodeData<FlatSelection> => {\n const id = `${surface.surface}:${node.token}`;\n const childNodes = childrenByParent.get(node.token) ?? [];\n if (childNodes.length > 0) defaultExpanded.push(id);\n const suffix = node.testId\n ? ` #${node.testId}`\n : node.classes && node.classes.length > 0\n ? ` .${node.classes[0]}`\n : \"\";\n return {\n id,\n label: `<${node.kind}>${suffix}`,\n badge: node.redacted ? \"redacted\" : node.source ? \"src\" : undefined,\n meta: { surface: surface.surface, node },\n children: childNodes.length > 0 ? childNodes.map(toTreeNode) : undefined,\n };\n };\n\n items.push({\n id: surfaceId,\n label: surface.excluded\n ? `${surface.surface} (locked)`\n : `${surface.surface} (${nodes.length})`,\n badge: surface.coherenceStatus,\n children: roots.map(toTreeNode),\n });\n }\n\n return { items, byId, defaultExpanded };\n}\n\nfunction InspectorApp() {\n const [socketPath, setSocketPath] = createSignal<string | null>(null);\n const [snapshot, setSnapshot] = createSignal<InspectorSnapshot | null>(null);\n const [selectedId, setSelectedId] = createSignal<string | null>(null);\n const [expandedIds, setExpandedIds] = createSignal<readonly string[]>([]);\n const [status, setStatus] = createSignal(\"Initializing...\");\n const [errorMessage, setErrorMessage] = createSignal<string | null>(null);\n const [busy, setBusy] = createSignal(false);\n\n const openSockets = new Set<UnixSocket>();\n onCleanup(() => {\n for (const sock of openSockets) {\n sock.close();\n }\n openSockets.clear();\n });\n\n const resolveSocket = (): string | null => {\n const named = getAuthorizedEndpoint(\"devInspect\");\n if (named) return named;\n const caps = getResolvedCapabilities();\n return caps.unixSockets[0] ?? null;\n };\n\n const requestInspector = (\n payload: Record<string, unknown>,\n onReply: (reply: InspectorSnapshot) => void,\n overridePath?: string,\n ): void => {\n const path = overridePath ?? socketPath();\n if (!path) {\n setErrorMessage(\"No --dev-inspect socket bound (pass --socket to zgui-js inspect --ui).\");\n setStatus(\"Disconnected\");\n return;\n }\n setBusy(true);\n setErrorMessage(null);\n let settled = false;\n const sock = connectUnixSocket(path, {\n framing: \"line\",\n onMessage(message) {\n if (settled) return;\n settled = true;\n sock.close();\n openSockets.delete(sock);\n setBusy(false);\n try {\n const parsed = JSON.parse(message) as InspectorSnapshot;\n if (parsed.error) {\n setErrorMessage(parsed.error);\n }\n onReply(parsed);\n } catch (error) {\n setErrorMessage(error instanceof Error ? error.message : String(error));\n }\n },\n onClose(err) {\n openSockets.delete(sock);\n if (!settled) {\n settled = true;\n setBusy(false);\n if (err) {\n setErrorMessage(`${err.code}: ${err.message}`);\n setStatus(\"Error\");\n }\n }\n },\n });\n openSockets.add(sock);\n sock.send(JSON.stringify(payload));\n };\n\n const refreshSnapshot = (overridePath?: string): void => {\n setStatus(\"Refreshing...\");\n requestInspector(\n { op: \"snapshot\" },\n data => {\n setSnapshot(data);\n const surfaces = data.surfaces ?? [];\n const built = buildSurfaceTree(surfaces);\n if (expandedIds().length === 0 && built.defaultExpanded.length > 0) {\n setExpandedIds(built.defaultExpanded);\n }\n const picked = data.picker?.selected;\n if (picked) {\n const pickedId = `${picked.surface}:${picked.token}`;\n if (built.byId.has(pickedId)) {\n setSelectedId(pickedId);\n }\n } else if (!selectedId()) {\n const first = built.byId.keys().next().value;\n if (first) setSelectedId(first);\n }\n setStatus(\"Connected\");\n },\n overridePath,\n );\n };\n\n const togglePicker = (): void => {\n requestInspector({ op: \"pick\", action: \"toggle\" }, data => {\n setSnapshot(prev => (prev ? { ...prev, picker: data.picker } : data));\n setStatus(data.picker?.active ? \"Picker active\" : \"Connected\");\n });\n };\n\n const selectRemoteNode = (selection: FlatSelection): void => {\n requestInspector(\n {\n op: \"pick\",\n action: \"select\",\n surface: selection.surface,\n token: selection.node.token,\n },\n data => {\n setSnapshot(prev => (prev ? { ...prev, picker: data.picker } : data));\n },\n );\n };\n\n createEffect(\n () => null,\n () => {\n const resolved = resolveSocket();\n setSocketPath(resolved);\n if (resolved) {\n refreshSnapshot(resolved);\n } else {\n setStatus(\"No socket bound\");\n setErrorMessage(\n \"Start target app with --dev-inspect <socket> and launch zgui-js inspect --ui --socket <socket>.\",\n );\n }\n },\n );\n\n const treeModel = createMemo(() => buildSurfaceTree(snapshot()?.surfaces ?? []));\n\n const selected = createMemo<FlatSelection | null>(() => {\n const id = selectedId();\n if (!id) return null;\n return treeModel().byId.get(id) ?? null;\n });\n\n const latestFrame = createMemo(() => {\n const frames = snapshot()?.profiler?.frames;\n if (frames && frames.length > 0) {\n const last = frames[frames.length - 1];\n if (last) {\n return {\n styleUs: last.styleUs ?? 0,\n layoutUs: last.layoutUs ?? 0,\n paintUs: last.paintUs ?? 0,\n totalUs: last.totalUs ?? 0,\n };\n }\n }\n const firstSurface = snapshot()?.surfaces?.[0];\n return firstSurface?.frame?.phases ?? null;\n });\n\n const pickerActive = () => Boolean(snapshot()?.picker?.active);\n\n return (\n <ThemeProvider scheme=\"dark\">\n <box class={styles.shell} testId=\"inspector-shell\">\n <box class={styles.toolbar} testId=\"inspector-toolbar\">\n <box class={styles.toolbarGroup}>\n <text class={styles.title} testId=\"inspector-title\">\n zgui-js Inspector\n </text>\n <Badge variant={pickerActive() ? \"default\" : \"secondary\"} testId=\"inspector-status\">\n {status()}\n </Badge>\n </box>\n <box class={styles.toolbarGroup}>\n <Button\n size=\"sm\"\n variant={pickerActive() ? \"default\" : \"outline\"}\n testId=\"inspector-pick-toggle\"\n onClick={togglePicker}\n >\n {pickerActive() ? \"Cancel Pick\" : \"Pick Element\"}\n </Button>\n <Button\n size=\"sm\"\n variant=\"secondary\"\n testId=\"inspector-refresh\"\n disabled={busy()}\n onClick={() => refreshSnapshot()}\n >\n Refresh\n </Button>\n </box>\n </box>\n\n <Show when={errorMessage()}>\n {message => (\n <box class={styles.errorBanner} testId=\"inspector-error\">\n <text>{message()}</text>\n </box>\n )}\n </Show>\n\n <SplitPane class={styles.workspace} direction=\"horizontal\" defaultSizes={[44, 56]}>\n <SplitPanePanel minSize={24}>\n <box class={styles.pane} testId=\"inspector-tree-pane\">\n <box class={styles.paneHeader}>\n <text class={styles.sectionTitle}>NATIVE TREE</text>\n <text class={styles.muted} testId=\"inspector-node-count\">\n {`${treeModel().byId.size} nodes`}\n </text>\n </box>\n <scroll class={styles.scrollArea}>\n <TreeView\n testId=\"inspector-tree\"\n items={treeModel().items}\n selectedId={selectedId()}\n expandedIds={expandedIds()}\n onExpandedChange={ids => setExpandedIds(ids)}\n onSelect={(id, item) => {\n setSelectedId(id);\n if (item?.meta) {\n selectRemoteNode(item.meta);\n }\n }}\n emptyText=\"No surfaces captured\"\n />\n </scroll>\n </box>\n </SplitPanePanel>\n\n <SplitPaneHandle testId=\"inspector-divider\" withHandle />\n\n <SplitPanePanel minSize={30}>\n <scroll class={styles.scrollArea}>\n <box class={styles.pane} testId=\"inspector-details-pane\">\n <text class={styles.sectionTitle}>SELECTED NODE</text>\n <Show\n when={selected()}\n fallback={\n <box class={styles.card}>\n <text class={styles.muted}>\n Select a node from the tree or use Pick Element.\n </text>\n </box>\n }\n >\n {sel => {\n const node = () => sel().node;\n const boxModel = () => node().boxModel ?? null;\n const computed = () => node().computedStyle ?? null;\n return (\n <box class={styles.card} testId=\"inspector-node-card\">\n <box class={styles.row}>\n <text class={styles.mono} testId=\"inspector-node-kind\">\n {`<${node().kind}> (${node().token})`}\n </text>\n <Show when={node().role}>\n {role => <Badge variant=\"secondary\">{role()}</Badge>}\n </Show>\n </box>\n\n <Show when={node().source}>\n {src => (\n <box class={styles.row}>\n <text class={styles.muted}>Source</text>\n <text class={styles.source} testId=\"inspector-node-source\">\n {src()}\n </text>\n </box>\n )}\n </Show>\n\n <Show when={(node().classes?.length ?? 0) > 0}>\n <box class={styles.row}>\n <text class={styles.muted}>Classes</text>\n <text class={styles.mono} testId=\"inspector-node-classes\">\n {(node().classes ?? []).map(c => `.${c}`).join(\" \")}\n </text>\n </box>\n </Show>\n\n <Show when={node().redacted}>\n <text class={styles.redacted} testId=\"inspector-node-redacted\">\n [REDACTED — secure field text hidden]\n </text>\n </Show>\n\n <Show when={boxModel()}>\n {bm => (\n <box class={styles.boxDiagram} testId=\"inspector-box-model\">\n <text class={styles.sectionTitle}>BOX MODEL (CSS PX)</text>\n <box class={styles.row}>\n <text class={styles.muted}>Border box</text>\n <text class={styles.mono}>{formatBounds(bm().borderBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Content box</text>\n <text class={styles.mono}>{formatBounds(bm().contentBox)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Padding</text>\n <text class={styles.mono}>{formatEdges(bm().padding)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Border</text>\n <text class={styles.mono}>{formatEdges(bm().border)}</text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Margin</text>\n <text class={styles.mono}>{formatEdges(bm().margin)}</text>\n </box>\n </box>\n )}\n </Show>\n\n <Show when={computed()}>\n {style => (\n <box class={styles.boxDiagram} testId=\"inspector-computed-style\">\n <text class={styles.sectionTitle}>COMPUTED STYLE</text>\n <box class={styles.row}>\n <text class={styles.muted}>display / position</text>\n <text class={styles.mono}>\n {`${style().display} / ${style().position}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>visibility / opacity</text>\n <text class={styles.mono}>\n {`${style().visibility} / ${style().opacity}`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>font-size</text>\n <text\n class={styles.mono}\n >{`${Math.round(style().fontSize)}px`}</text>\n </box>\n </box>\n )}\n </Show>\n </box>\n );\n }}\n </Show>\n\n <Separator />\n\n <text class={styles.sectionTitle}>FRAME TIMINGS &amp; RESOURCES</text>\n <box class={styles.card} testId=\"inspector-profiler-card\">\n <Show\n when={latestFrame()}\n fallback={<text class={styles.muted}>No frame phase timings recorded.</text>}\n >\n {frame => (\n <box>\n <box class={styles.row}>\n <text class={styles.muted}>Style / Layout / Paint</text>\n <text class={styles.mono} testId=\"inspector-frame-phases\">\n {`${frame().styleUs}us / ${frame().layoutUs}us / ${frame().paintUs}us`}\n </text>\n </box>\n <box class={styles.row}>\n <text class={styles.muted}>Frame total</text>\n <text class={styles.mono} testId=\"inspector-frame-total\">\n {`${frame().totalUs}us`}\n </text>\n </box>\n </box>\n )}\n </Show>\n <box class={styles.row}>\n <text class={styles.muted}>Generation / Live nodes</text>\n <text class={styles.mono} testId=\"inspector-session-stats\">\n {`gen ${snapshot()?.session?.generation ?? 0} | ${snapshot()?.session?.resources?.nodes ?? 0} nodes`}\n </text>\n </box>\n </box>\n </box>\n </scroll>\n </SplitPanePanel>\n </SplitPane>\n </box>\n </ThemeProvider>\n );\n}\n\nexport const hostApiVersion = 1;\n\nexport function mount(root: NativeNode): () => void {\n return renderApp(() => <InspectorApp />, root);\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,gBAAN,cAA4B,MAAM;CAC9B,YAAY,GAAG;EAMX,MAAM,IAAI;EACV,MAAM,IAAI,EAAE;EACZ,IAAI,GAAG,EAAE,kBAAkB;EAC3B,MAAM;EACN,IAAI,GAAG,EAAE,kBAAkB;EAC3B,KAAK,SAAS;CAClB;AACJ;AAEA,IAAM,cAAN,cAA0B,MAAM;CAC5B,YAAY,GAAG,GAAG;EAEd,IAAI;GACA,IAAI,IAAI,OAAO,aAAa,QAAQ,EAAE,UAAU,CAAC;EACrD,QAAQ,CAAC;EACT,MAAM,GAAG,EACL,OAAO,EACX,CAAC;EACD,KAAK,SAAS;CAClB;AACJ;gEAEgE,SAAS,kBAAkB,GAAG;CAC1F,OAAO,aAAa,cAAc,EAAE,QAAQ;AAChD;AAcA,IAAM,eAAN,cAA2B,MAAM;CAC7B,cAAc;EACV,MAAM,EAAE;CACZ;AACJ;AAEA,IAAM,uBAAN,cAAmC,MAAM;CACrC,cAAc;EACV,MAAM,EAAE;CACZ;AACJ;;AClDA,MAAM,wBAAwB;;;;;;8E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