@simten/embed 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/CircuitEmbed.js.map +1 -1
- package/dist/CircuitViewer.js.map +1 -1
- package/dist/canvas/index.js.map +1 -1
- package/dist/components/ErrorBoundary.js.map +1 -1
- package/dist/components/ErrorDisplay.js.map +1 -1
- package/dist/components/LoadingSkeleton.js.map +1 -1
- package/dist/components/nodes/index.js.map +1 -1
- package/dist/hooks/useCircuitSimulator.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/share-context.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types.js.map +1 -1
- package/dist/webcomponent/WebComponentEmbed.js.map +1 -1
- package/dist/webcomponent/index.js.map +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ Embeddable interactive hardware circuits. Drop live, cycle-accurate simulations
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @simten/embed @simten/core
|
|
8
|
+
npm install @simten/embed @simten/core react react-dom
|
|
9
|
+
npm install -D @types/react @types/react-dom # if you're using TypeScript
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## Usage
|
|
@@ -164,4 +165,4 @@ Components are skipped on the server and render only on the client. The layout e
|
|
|
164
165
|
|
|
165
166
|
## License
|
|
166
167
|
|
|
167
|
-
|
|
168
|
+
Apache-2.0
|
package/dist/CircuitEmbed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircuitEmbed.js","sourceRoot":"","sources":["../src/CircuitEmbed.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAA4D,MAAM,OAAO,CAAC;AACvG,OAAO,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uitEmbed — embeddable circuit viewer with optional info bar.\n *\n * Thin wrapper around CircuitViewer that adds:\n * - Auto-harness (wraps bare circuits with Switch/Led nodes)\n * - Info bar (title, subtitle, description, link)\n *\n * For React users: pass a BuiltCircuit object.\n * For web component users: <circuit-embed code=\"...\"> goes through the\n * web component bridge which sandboxes compilation via an iframe.\n */\n\nimport { forwardRef, useState, type CSSProperties, type ForwardedRef, type ReactElement } from \"react\";\nimport { CircuitViewer, type CircuitViewerHandle, type HarnessedLayout } from \"./CircuitViewer\";\nimport { circuitToSource, type BuiltCircuit } from \"@simten/core/circuit\";\nimport type { FlatPortValueMap } from \"@simten/core/simulator\";\nimport { encodeSourceForUrl } from \"@simten/ui/share\";\nimport { useShareCircuit } from \"./share-context\";\n\n/**\n * Where Fork links open. simten.dev for everything except local dev of the\n * embed itself (where the embed is mounted at localhost). Detected at runtime\n * because the embed runs on third-party origins we don't control at build time.\n */\nfunction simtenHost(): string {\n if (typeof window === \"undefined\") return \"https://simten.dev\";\n return window.location.hostname === \"localhost\"\n ? window.location.origin\n : \"https://simten.dev\";\n}\n\nexport interface CircuitEmbedProps<C extends BuiltCircuit = BuiltCircuit> {\n /** The circuit to display (result of circuit()) */\n circuit: C;\n /**\n * Container height. Optional — when omitted, the embed sizes itself\n * width-responsively using `aspectRatio` (or one inferred from `layout`)\n * with sensible mobile-friendly min/max clamps.\n */\n height?: number | string;\n /**\n * Width-to-height ratio of the embed. Used only when `height` is not set.\n * If omitted and `layout` is passed, the ratio is computed from the\n * layout's bounding box. Otherwise defaults to 1.5 (3:2).\n */\n aspectRatio?: number;\n /** Show clock controls for sequential circuits */\n showControls?: boolean;\n /**\n * Pre-computed node positions. Keys are constrained to the circuit's\n * input names, output names, and node labels at compile time.\n * Pass to bypass the runtime layout engine.\n */\n layout?: HarnessedLayout<C>;\n /** Theme */\n theme?: \"light\" | \"dark\";\n /** Title shown in bottom bar */\n title?: string;\n /** Subtitle shown next to title */\n subtitle?: string;\n /** Description shown below title */\n description?: string;\n /**\n * Custom URL for the card's right-side link. When omitted (the common case),\n * a Fork button is rendered that opens the circuit in the simten.dev editor\n * via `/circuit/<lz-encoded-source>`. Pass `href` only to override.\n */\n href?: string;\n /**\n * Optional raw TypeScript source for the Fork button. When provided, the\n * Fork button encodes this verbatim instead of running the BuiltCircuit\n * through the IR-to-source serializer (which drops comments and helpers).\n * The web-component path passes the user's original `code` here.\n */\n forkSource?: string;\n /** Focus on specific node(s) */\n focus?: string | string[];\n /** Show port labels on nodes */\n showPortLabels?: boolean;\n /** Callback when a port is clicked */\n onPortClick?: (nodeLabel: string, portName: string, portType: \"input\" | \"output\") => void;\n /** Highlight unconnected ports */\n glowUnconnected?: boolean;\n /** Auto-run speed (ms between ticks) */\n autoRunSpeed?: number;\n /** Initial values for input ports (set on harness Switch/Input nodes) */\n initialInputs?: Record<string, number | boolean>;\n /**\n * Called when the embed's internal simulator settles on a new set of\n * port values — once on first settle, then on every subsequent settled\n * change (e.g. when the user toggles a switch on the canvas). Forwarded\n * verbatim to CircuitViewer; see its docs for full firing semantics.\n *\n * Use this to drive sibling UI (truth-table highlights, external value\n * readouts) without giving up the embed's chrome. The callback is\n * ref-stabilized inside the embed, so inline functions are safe.\n */\n onPortValuesChange?: (portValues: FlatPortValueMap) => void;\n}\n\nexport type CircuitEmbedHandle = CircuitViewerHandle;\n\n// Approximate node footprint used when inferring aspect ratio from a layout.\n// Layout coords are top-left of each node, so we add ~one node's width/height\n// to the bounding box so the rightmost / bottommost nodes aren't clipped.\nconst NODE_W = 160;\nconst NODE_H = 90;\n\nfunction inferAspectFromLayout(layout: Record<string, { x: number; y: number }> | undefined): number {\n if (!layout) return 1.5; // default 3:2 — sane for auto-laid-out circuits\n const positions = Object.values(layout);\n if (positions.length === 0) return 1.5;\n const w = Math.max(...positions.map(p => p.x)) + NODE_W;\n const h = Math.max(...positions.map(p => p.y)) + NODE_H;\n if (w <= 0 || h <= 0) return 1.5;\n return w / h;\n}\n\nconst CircuitEmbedImpl = forwardRef<CircuitEmbedHandle, CircuitEmbedProps>(\n function CircuitEmbed({\n circuit,\n height,\n aspectRatio,\n showControls = true,\n layout,\n theme,\n title,\n subtitle,\n description,\n href,\n focus,\n showPortLabels,\n onPortClick,\n glowUnconnected,\n autoRunSpeed = 500,\n initialInputs,\n forkSource,\n onPortValuesChange,\n }, ref) {\n const hasInfoBar = title || description;\n const [forkError, setForkError] = useState<string | null>(null);\n const [forkPending, setForkPending] = useState(false);\n const shareCircuit = useShareCircuit();\n\n const onFork = async () => {\n if (forkPending) return;\n try {\n const source = forkSource ?? circuitToSource(circuit);\n // Use the KV shortener when available (simten.dev). Outside simten.dev\n // — embeds on third-party pages — fall back to the inline-encoded URL.\n if (shareCircuit) {\n setForkPending(true);\n const { hash } = await shareCircuit(source);\n window.open(`${simtenHost()}/circuit/s/${hash}`, \"_blank\", \"noopener\");\n } else {\n const encoded = encodeSourceForUrl(source);\n window.open(`${simtenHost()}/circuit/${encoded}`, \"_blank\", \"noopener\");\n }\n } catch (err) {\n setForkError(err instanceof Error ? err.message : \"Couldn't fork this circuit\");\n setTimeout(() => setForkError(null), 3000);\n } finally {\n setForkPending(false);\n }\n };\n\n // Sizing strategy: if `height` is set, use it (backwards compat).\n // Otherwise size width-responsively via aspect-ratio with mobile clamps.\n const useResponsive = height === undefined;\n const aspect = aspectRatio ?? inferAspectFromLayout(layout as Record<string, { x: number; y: number }> | undefined);\n const responsiveStyle: CSSProperties = {\n width: '100%',\n aspectRatio: String(aspect),\n minHeight: 240,\n maxHeight: '70vh',\n };\n\n const outerStyle: CSSProperties | undefined = hasInfoBar\n ? undefined\n : useResponsive\n ? responsiveStyle\n : { height };\n const canvasStyle: CSSProperties = hasInfoBar\n ? useResponsive\n ? responsiveStyle\n : { height }\n : { height: '100%' };\n\n return (\n <div style={outerStyle} className={`relative flex flex-col ${hasInfoBar ? 'rounded-xl border border-[var(--embed-border)] overflow-hidden bg-[var(--embed-bg-secondary)]' : ''}`}>\n {!hasInfoBar && !href && (\n <button\n type=\"button\"\n onClick={onFork}\n title={forkError ?? \"Open and modify this circuit in the Simten editor\"}\n className=\"absolute top-2 right-2 z-10 hidden md:flex items-center px-2.5 py-1 rounded border border-[var(--embed-border)] bg-[var(--embed-bg-secondary)] text-[11px] text-[var(--embed-text-primary)] hover:opacity-80 transition-colors shadow-sm\"\n >\n {forkError ? \"Fork failed\" : \"Fork →\"}\n </button>\n )}\n <div style={canvasStyle} className=\"min-h-0\">\n <CircuitViewer\n ref={ref}\n circuit={circuit}\n height=\"100%\"\n showControls={showControls}\n autoHarness\n initialInputs={initialInputs}\n layout={layout}\n theme={theme}\n focus={focus}\n showPortLabels={showPortLabels}\n onPortClick={onPortClick}\n glowUnconnected={glowUnconnected}\n autoRunSpeed={autoRunSpeed}\n onPortValuesChange={onPortValuesChange}\n />\n </div>\n {hasInfoBar && (\n <div className=\"border-t border-[var(--embed-border)] px-4 py-3 flex items-end justify-between gap-4\">\n <div>\n <div className=\"text-base font-semibold text-[var(--embed-text-primary)]\">{title}</div>\n {subtitle && <div className=\"text-xs text-[var(--embed-text-muted)] font-mono mt-0.5\">{subtitle}</div>}\n {description && <div className=\"text-sm text-[var(--embed-text-secondary)] mt-1.5 leading-relaxed\">{description}</div>}\n </div>\n {href ? (\n <a href={href} className=\"shrink-0 px-3 py-1.5 rounded border border-[var(--embed-border)] text-xs text-[var(--embed-text-primary)] hover:opacity-80 transition-colors\">\n Open →\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={onFork}\n title={forkError ?? \"Open and modify this circuit in the Simten editor\"}\n className=\"hidden md:flex items-center shrink-0 px-3 py-1.5 rounded border border-[var(--embed-border)] text-xs text-[var(--embed-text-primary)] hover:opacity-80 transition-colors\"\n >\n {forkError ? `Can't fork: ${forkError.slice(0, 40)}` : \"Fork →\"}\n </button>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\n/**\n * CircuitEmbed component with generic inference over the circuit type.\n * Cast preserves the generic so `layout` keys are constrained at compile time.\n */\nexport const CircuitEmbed = CircuitEmbedImpl as <C extends BuiltCircuit>(\n props: CircuitEmbedProps<C> & { ref?: ForwardedRef<CircuitEmbedHandle> },\n) => ReactElement;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircuitViewer.js","sourceRoot":"","sources":["../src/CircuitViewer.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAwC,MAAM,OAAO,CAAC;AAC9H,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA4FjF,MAAM,iBAAiB,GAAG,UAAU,CAClC,SAAS,aAAa,CAAC,EACrB,OAAO,EACP,MAAM,GAAG,GAAG,EACZ,YAAY,GAAG,IAAI,EACnB,WAAW,GAAG,KAAK,EACnB,aAAa,EACb,MAAM,EACN,KAAK,EACL,KAAK,EACL,cAAc,EACd,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,GACnB,EAAE,GAAG;IACJ,MAAM,GAAG,GAAG,mBAAmB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;IACzE,MAAM,aAAa,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,KAAK,IAAI,aAAa,CAAC;IAE7C,oEAAoE;IACpE,mEAAmE;IACnE,mEAAmE;IACnE,kEAAkE;IAClE,oEAAoE;IACpE,MAAM,qBAAqB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACzD,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC,OAAO,GAAG,kBAAkB,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,sEAAsE;IACtE,sEAAsE;IACtE,oEAAoE;IACpE,oEAAoE;IACpE,6CAA6C;IAC7C,SAA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C,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,KAAK,EACzC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,EAChC,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,EAChC,aAAa,EAAE,GAAG,EAAE;oBAClB,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;wBACtB,GAAG,CAAC,WAAW,EAAE,CAAC;oBACpB,CAAC;yBAAM,CAAC;wBACN,UAAU,EAAE,CAAC;oBACf,CAAC;gBACH,CAAC,EACD,KAAK,EAAE,CAAC,GACR,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,iBAEZ,CAAC","sourcesContent":["/**\n * CircuitViewer — the single \"render an interactive circuit\" component.\n *\n * Takes a BuiltCircuit, wires up simulation, and renders CircuitCanvas + ClockControls.\n * Pure props — no stores. Everything else (CircuitEmbed, EditorWorkspace, <circuit-embed>)\n * is a thin wrapper around this.\n */\n\nimport { useCallback, useEffect, useRef, forwardRef, useImperativeHandle, type ForwardedRef, type ReactElement } from \"react\";\nimport { useCircuitSimulator } from \"./hooks/useCircuitSimulator\";\nimport type { BuiltCircuit } from \"@simten/core/circuit\";\nimport { CircuitCanvas, ClockControls, useDetectTheme } from \"@simten/ui/canvas\";\nimport type { CircuitLayout } from \"@simten/ui/canvas\";\nimport type { FlatPortValueMap } from \"@simten/core/simulator\";\n\n/**\n * Type-level model of what `autoHarness` produces at runtime: it wraps the\n * original circuit `C` as a single `dut` node and adds one Switch per input\n * and one Led per output. The placeable nodes therefore become the input\n * names ∪ output names ∪ `'dut'`. CircuitLayout<HarnessedCircuit<C>>\n * resolves to exactly that key set.\n */\nexport type HarnessedCircuit<C extends BuiltCircuit> =\n C extends BuiltCircuit<infer Ins, infer Outs, any>\n ? BuiltCircuit<\n Ins,\n Outs,\n & { [K in keyof Ins]: BuiltCircuit }\n & { [K in keyof Outs]: BuiltCircuit }\n & { dut: C }\n >\n : never;\n\n/** Strictly-keyed layout for an autoHarness-wrapped circuit. */\nexport type HarnessedLayout<C extends BuiltCircuit> = CircuitLayout<HarnessedCircuit<C>>;\n\nexport interface CircuitViewerProps<C extends BuiltCircuit = BuiltCircuit> {\n /** The circuit to display (result of circuit()) */\n circuit: C;\n /** Container height */\n height?: number | string;\n /** Show clock controls for sequential circuits */\n showControls?: boolean;\n /** Auto-wrap with Switch/Led nodes for bare circuits */\n autoHarness?: boolean;\n /** Initial values for auto-harnessed input nodes */\n initialInputs?: Record<string, number | boolean>;\n /**\n * Pre-computed node positions. Keys are constrained at compile time.\n * Accepts either the raw circuit's layout shape (when autoHarness is\n * off) or the harnessed layout shape (when autoHarness is on, with\n * keys = input names ∪ output names ∪ 'dut').\n */\n layout?: CircuitLayout<C> | HarnessedLayout<C>;\n /** Theme */\n theme?: \"light\" | \"dark\";\n /** Focus on specific node(s) */\n focus?: string | string[];\n /** Show port labels on nodes */\n showPortLabels?: boolean;\n /** Callback when a port is clicked */\n onPortClick?: (nodeLabel: string, portName: string, portType: \"input\" | \"output\") => void;\n /** Highlight unconnected ports */\n glowUnconnected?: boolean;\n /** Auto-run speed (ms between ticks) */\n autoRunSpeed?: number;\n /** Render custom content when no circuit is compiled */\n renderEmptyState?: () => React.ReactNode;\n /** Render custom overlay on top of the canvas */\n renderOverlay?: () => React.ReactNode;\n /**\n * Called when the simulator's port values settle. Fires once on first\n * settled state (after the circuit compiles and propagates) and on every\n * subsequent settled change (e.g. when the user toggles a switch). Use\n * this to drive sibling UI that needs to react to live simulator state\n * — a truth-table highlight, an external value readout, etc.\n *\n * Firing semantics:\n * - Does NOT fire before `ready` or while `portValues` is empty.\n * - Fires only on settled (post-propagation) states; the simulator\n * never exposes intermediate propagation states.\n * - The map reference is NOT guaranteed stable across no-op ticks\n * (sequential auto-run loops can produce new Map instances with\n * unchanged contents). Memoize derived state if perf matters.\n *\n * The callback is captured in a ref internally so inline functions\n * (e.g. `onPortValuesChange={(pv) => setX(pv)}`) don't cause spurious\n * re-fires — pass whatever shape is convenient for the caller.\n */\n onPortValuesChange?: (portValues: FlatPortValueMap) => void;\n}\n\nexport interface CircuitViewerHandle {\n tick: () => void;\n reset: () => void;\n setNodeValue: (nodeId: string, value: number | boolean | Map<number, number>) => void;\n /** Start the simulator's internal auto-run loop. Equivalent to clicking the\n * in-canvas play button — the play/pause control will stop it normally. */\n startAutoRun: (ticksPerSecond: number) => void;\n /** Stop the simulator's internal auto-run loop. */\n stopAutoRun: () => void;\n}\n\nconst CircuitViewerImpl = forwardRef<CircuitViewerHandle, CircuitViewerProps>(\n function CircuitViewer({\n circuit,\n height = 300,\n showControls = true,\n autoHarness = false,\n initialInputs,\n layout,\n theme,\n focus,\n showPortLabels,\n onPortClick,\n glowUnconnected,\n renderEmptyState,\n renderOverlay,\n onPortValuesChange,\n }, ref) {\n const sim = useCircuitSimulator(circuit, { autoHarness, initialInputs });\n const detectedTheme = useDetectTheme();\n const resolvedTheme = theme ?? detectedTheme;\n\n // Capture the callback in a ref so inline functions don't cause the\n // firing effect below to re-run on every parent render. The effect\n // depends only on [sim.ready, sim.portValues], not on the callback\n // identity, so passing `onPortValuesChange={(pv) => setX(pv)}` is\n // safe even though it creates a new function reference each render.\n const onPortValuesChangeRef = useRef(onPortValuesChange);\n useEffect(() => {\n onPortValuesChangeRef.current = onPortValuesChange;\n });\n\n // Fire once the sim is ready and port values have first settled; then\n // fire on every subsequent settled change. The empty-map guard avoids\n // a spurious fire during the initial compile-but-not-yet-propagated\n // window. The hook only exposes settled states, so no debouncing is\n // needed for intermediate propagation steps.\n useEffect(() => {\n if (!sim.ready || !sim.portValues || sim.portValues.size === 0) return;\n onPortValuesChangeRef.current?.(sim.portValues);\n }, [sim.ready, sim.portValues]);\n\n const handleTick = useCallback(() => {\n sim.tick();\n }, [sim.tick]);\n\n const handleReset = useCallback(() => {\n sim.reset();\n }, [sim.reset]);\n\n useImperativeHandle(ref, () => ({\n tick: handleTick,\n reset: handleReset,\n setNodeValue: sim.setNodeValue,\n startAutoRun: sim.startAutoRun,\n stopAutoRun: sim.stopAutoRun,\n }), [handleTick, handleReset, sim.setNodeValue, sim.startAutoRun, sim.stopAutoRun]);\n\n if (sim.error) {\n return (\n <div style={{ height }} className=\"flex items-center justify-center p-4\">\n <div className=\"text-sm text-red-400 bg-red-500/10 rounded p-3 border border-red-500/20\">\n <div className=\"font-medium mb-1\">Compilation Error</div>\n <div className=\"font-mono text-xs\">{sim.error}</div>\n </div>\n </div>\n );\n }\n\n if (!sim.ready) {\n return (\n <div style={{ height }} className=\"flex items-center justify-center text-muted-foreground/60 text-sm\">\n Compiling...\n </div>\n );\n }\n\n const controlHeight = sim.isSequential && showControls ? 40 : 0;\n const canvasHeight = typeof height === \"number\" ? height - controlHeight : height;\n\n return (\n <div style={{ height }} className=\"flex flex-col\" data-embed-theme={resolvedTheme}>\n <div className=\"flex-1 min-h-0\">\n <CircuitCanvas\n circuit={sim.circuit}\n componentLibrary={sim.componentLibrary ?? undefined}\n portValues={sim.portValues}\n sequentialState={sim.sequentialState}\n onToggleNode={sim.toggleNode}\n onSetNodeValue={sim.setNodeValue}\n onLoadMemory={(nodeId, memData) => {\n const engine = sim.getSimulator();\n if (engine) {\n engine.setNode(nodeId, memData);\n sim.runCombinational();\n }\n }}\n height={canvasHeight}\n focus={focus}\n showPortLabels={showPortLabels}\n onPortClick={onPortClick}\n glowUnconnected={glowUnconnected}\n renderEmptyState={renderEmptyState}\n renderOverlay={renderOverlay}\n {...(layout ? { layout } : {})}\n {...(theme ? { theme } : {})}\n />\n </div>\n {sim.isSequential && showControls && (\n <ClockControls\n cycle={sim.cycleCount}\n historyLength={sim.history?.length ?? 0}\n historyIndex={sim.historyIndex ?? -1}\n isRunning={sim.isRunning}\n isViewingPast={sim.isViewingPast ?? false}\n onStep={handleTick}\n onRun={() => sim.startAutoRun(5)}\n onPause={() => sim.stopAutoRun()}\n onReset={handleReset}\n onStepBack={() => sim.stepBack()}\n onStepForward={() => {\n if (sim.isViewingPast) {\n sim.stepForward();\n } else {\n handleTick();\n }\n }}\n speed={5}\n />\n )}\n </div>\n );\n }\n);\n\n/**\n * CircuitViewer with generic inference over the circuit type.\n * Cast preserves the generic so `layout` keys are constrained at compile time.\n */\nexport const CircuitViewer = CircuitViewerImpl as <C extends BuiltCircuit>(\n props: CircuitViewerProps<C> & { ref?: ForwardedRef<CircuitViewerHandle> },\n) => ReactElement;\n"]}
|
package/dist/canvas/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/canvas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/canvas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Re-export from @simten/ui/canvas.\n */\nexport { CircuitCanvas } from \"@simten/ui/canvas\";\nexport type { CircuitCanvasProps } from \"@simten/ui/canvas\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAa9C;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACxF,YAAY,KAAyB;QACnC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC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Props {\n children: ReactNode;\n fallback?: ReactNode | ((error: Error) => ReactNode);\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n title?: string;\n}\n\ninterface ErrorBoundaryState {\n error: Error | null;\n}\n\n/**\n * React error boundary for circuit embed components.\n * Catches render errors and displays a styled fallback instead of crashing.\n */\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { error: null };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n this.props.onError?.(error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ error: null });\n };\n\n render() {\n if (this.state.error) {\n if (this.props.fallback) {\n return typeof this.props.fallback === \"function\"\n ? this.props.fallback(this.state.error)\n : this.props.fallback;\n }\n return (\n <ErrorDisplay\n error={this.state.error.message}\n title={this.props.title ?? \"Render Error\"}\n onRetry={this.handleRetry}\n />\n );\n }\n return this.props.children;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":";AAcA,SAAS,WAAW,CAAC,KAAiD;IACpE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9C,4DAA4D;IAC5D,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,SAAkB,EAAE,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,SAAS,EA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,GACF,EACN,eAAK,SAAS,EAAC,gBAAgB,aAC7B,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAM,EAC/D,cAAK,SAAS,EAAC,kBAAkB,YAC9B,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAAa,SAAS,EAAC,wBAAwB,aAC7C,eAAM,SAAS,EAAC,2FAA2F,YACxG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,GAChC,EACP,gBAAM,SAAS,EAAC,6CAA6C,aAC1D,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,CACzB,gBAAM,SAAS,EAAC,sBAAsB,uBAC7B,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,SAC5D,CACR,IACI,KAXC,CAAC,CAYL,CACP,CAAC,GACE,EACL,OAAO,IAAI,CACV,iBACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,gHAAgH,sBAGnH,CACV,IACG,IACF,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["\nexport interface SimulatorError {\n message: string;\n line?: number;\n column?: number;\n stage: \"parse\" | \"compile\" | \"elaborate\" | \"simulate\";\n}\n\ninterface ErrorDisplayProps {\n error: string | SimulatorError | SimulatorError[];\n title?: string;\n onRetry?: () => void;\n}\n\nfunction parseErrors(error: string | SimulatorError | SimulatorError[]): SimulatorError[] {\n if (Array.isArray(error)) return error;\n if (typeof error === \"object\") return [error];\n // Legacy: semicolon-joined strings from older hook versions\n return error.split(\"; \").map((msg) => ({ message: msg, stage: \"compile\" as const }));\n}\n\nconst STAGE_LABELS: Record<string, string> = {\n parse: \"Parse\",\n compile: \"Compile\",\n elaborate: \"Elaborate\",\n simulate: \"Simulate\",\n};\n\n/**\n * Styled error display for circuit embed components.\n * Renders structured error messages with optional line/column info.\n */\nexport function ErrorDisplay({ error, title = \"Circuit Error\", onRetry }: ErrorDisplayProps) {\n const errors = parseErrors(error);\n\n return (\n <div\n className=\"rounded-xl border border-red-800/40 bg-red-950/20 p-4 overflow-hidden\"\n role=\"alert\"\n aria-live=\"assertive\"\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"shrink-0 mt-0.5\">\n <svg className=\"w-5 h-5 text-red-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\" />\n </svg>\n </div>\n <div className=\"flex-1 min-w-0\">\n <h4 className=\"text-sm font-semibold text-red-300\">{title}</h4>\n <div className=\"mt-2 space-y-1.5\">\n {errors.map((err, i) => (\n <div key={i} className=\"flex items-start gap-2\">\n <span className=\"text-[10px] font-mono text-red-400/60 bg-red-900/30 px-1.5 py-0.5 rounded shrink-0 mt-0.5\">\n {STAGE_LABELS[err.stage] || err.stage}\n </span>\n <span className=\"text-xs font-mono text-red-300/80 break-all\">\n {err.message}\n {err.line !== undefined && (\n <span className=\"text-red-400/50 ml-1\">\n (line {err.line}{err.column !== undefined ? `:${err.column}` : \"\"})\n </span>\n )}\n </span>\n </div>\n ))}\n </div>\n {onRetry && (\n <button\n onClick={onRetry}\n className=\"mt-3 px-3 py-1 text-xs font-medium rounded-md bg-red-900/30 hover:bg-red-900/50 text-red-300 transition-colors\"\n >\n Retry\n </button>\n )}\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSkeleton.js","sourceRoot":"","sources":["../../src/components/LoadingSkeleton.tsx"],"names":[],"mappings":";AAOA;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,GAAG,GAAG,EAAwB;IACpE,OA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EAAC,qEAAqE,GAAG,EACvF,cAAK,SAAS,EAAC,qEAAqE,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,IACvH,EAGN,eAAK,SAAS,EAAC,kCAAkC,aAC/C,cAAK,SAAS,EAAC,sDAAsD,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,EAC5G,cAAK,SAAS,EAAC,sDAAsD,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,IACxG,EAGN,cAAK,SAAS,EAAC,qEAAqE,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,EAG3H,cAAK,SAAS,EAAC,sDAAsD,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,EAG5G,cAAK,SAAS,EAAC,qEAAqE,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,GAAI,IACvH,EAGN,eAAM,SAAS,EAAC,SAAS,oDAA2C,IAChE,CACP,CAAC;AACJ,CAAC","sourcesContent":["\nimport React from \"react\";\n\ninterface LoadingSkeletonProps {\n height?: number | string;\n}\n\n/**\n * Loading skeleton for circuit embeds.\n * Shows fake node placeholders with connecting lines, matching the dark theme.\n * Respects height to prevent layout shift.\n */\nexport function LoadingSkeleton({ height = 300 }: LoadingSkeletonProps) {\n return (\n <div\n className=\"rounded-xl border border-[var(--embed-border)] bg-[var(--embed-bg-primary)] overflow-hidden flex items-center justify-center\"\n style={{ height }}\n role=\"status\"\n aria-label=\"Loading circuit\"\n >\n <div className=\"flex items-center gap-8\">\n {/* Input nodes */}\n <div className=\"flex flex-col gap-4\">\n <div className=\"w-20 h-14 rounded-lg bg-[var(--embed-bg-tertiary)]/60 animate-pulse\" />\n <div className=\"w-20 h-14 rounded-lg bg-[var(--embed-bg-tertiary)]/60 animate-pulse\" style={{ animationDelay: \"150ms\" }} />\n </div>\n\n {/* Connecting lines */}\n <div className=\"flex flex-col gap-6 items-center\">\n <div className=\"w-12 h-0.5 bg-[var(--embed-border)]/40 animate-pulse\" style={{ animationDelay: \"300ms\" }} />\n <div className=\"w-12 h-0.5 bg-[var(--embed-border)]/40 animate-pulse\" style={{ animationDelay: \"350ms\" }} />\n </div>\n\n {/* Logic node */}\n <div className=\"w-24 h-20 rounded-lg bg-[var(--embed-bg-tertiary)]/60 animate-pulse\" style={{ animationDelay: \"200ms\" }} />\n\n {/* Connecting line */}\n <div className=\"w-12 h-0.5 bg-[var(--embed-border)]/40 animate-pulse\" style={{ animationDelay: \"400ms\" }} />\n\n {/* Output node */}\n <div className=\"w-20 h-14 rounded-lg bg-[var(--embed-bg-tertiary)]/60 animate-pulse\" style={{ animationDelay: \"250ms\" }} />\n </div>\n\n {/* Screen reader text */}\n <span className=\"sr-only\">Compiling and laying out circuit...</span>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/nodes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,QAAQ,EAGR,SAAS,EACT,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,cAAc,GAEf,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/nodes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,QAAQ,EAGR,SAAS,EACT,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,cAAc,GAEf,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * Re-export canonical node components from @simten/ui/nodes.\n * This allows external consumers to import from @simten/embed/nodes\n * while the source of truth lives in the ui package.\n */\nexport {\n BaseNode,\n type PortConfig,\n type BaseNodeProps,\n InputNode,\n OutputNode,\n LogicGateNode,\n EmbedConsoleNode,\n EmbedScreenNode,\n CompositeBadge,\n type NodeData,\n} from \"@simten/ui/nodes\";\n"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C,EAC7G,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,OAAO;QACP,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,KAAK;QACL,KAAK,EAAE,IAAI;QACX,YAAY;QACZ,OAAO,EAAE,gBAAgB;QACzB,UAAU,EAAE,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI;QACnD,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,YAAY;QACrB,YAAY;QACZ,aAAa,EAAE,YAAY,IAAI,CAAC,IAAI,YAAY,GAAG,UAAU,GAAG,CAAC;QACjE,SAAS;QACT,KAAK;QAEL,UAAU;QACV,OAAO;QACP,WAAW;QACX,UAAU;QACV,YAAY;QACZ,IAAI;QACJ,KAAK;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,WAAW;QACX,IAAI;QACJ,YAAY;QACZ,WAAW;QACX,QAAQ;QACR,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,6CAA6C;QACzE,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,0CAA0C;KACrE,CAAC;AACJ,CAAC","sourcesContent":["/**\n * useCircuitSimulator — the public circuit-simulation hook.\n *\n * Composes the sandbox bridge (`useSandbox` in @simten/ui) with circuit-level\n * concerns: auto-harness, time-travel history, auto-run, snapshot/restore.\n * This is what every embed/blog/editor consumer calls.\n *\n * Runtime topology (browser path):\n * useCircuitSimulator (here)\n * → useSandbox — packages/ui/src/sandbox/useSandbox.ts (postMessage bridge)\n * → apps/sandbox/main.ts — runs inside the cross-origin iframe\n * → core/simulator — pure simulator engine\n *\n * For non-browser callers (vitest, CI), skip this hook entirely and use\n * `@simten/core/sim` directly — no iframe, no React, just the engine.\n *\n * See: apps/web/content/docs/architecture.mdx → \"Runtime topology\".\n */\n\nimport { useState, useEffect, useCallback, useRef, useMemo } from \"react\";\nimport {\n type SimulatorEngine,\n type CircuitLibrary,\n type FlatPortValueMap,\n type FlatSequentialState,\n} from \"@simten/core/simulator\";\nimport type { Circuit, BitValue, BusValue } from \"@simten/core\";\nimport type { BuiltCircuit } from \"@simten/core/circuit\";\nimport { getCircuitEval, autoHarness, isSequentialCircuit } from \"@simten/core/circuit\";\nimport { Switch, Button, Led, Input, Output, HexDisplay } from \"@simten/core/std\";\nimport { useSandboxContext, type EvalSource } from \"@simten/ui/sandbox\";\n\nconst TOP_LEVEL_NODE = \"__top__\";\n\nexport interface SimulatorState {\n outputs: Record<string, boolean | number>;\n inputs: Record<string, boolean | number>;\n cycleCount: number;\n ready: boolean;\n error: string | null;\n isSequential: boolean;\n circuit: Circuit | null;\n portValues: FlatPortValueMap | null;\n sequentialState: FlatSequentialState | null;\n componentLibrary: CircuitLibrary | null;\n history: readonly { engineSnapshot: unknown; metadata?: unknown }[];\n historyIndex: number;\n isViewingPast: boolean;\n isRunning: boolean;\n speed: number;\n}\n\nexport interface SimulatorActions {\n setNode: (name: string, value: boolean | number) => void;\n toggleInput: (name: string) => void;\n toggleNode: (nodeId: string) => void;\n /**\n * Set a node's value. Returns the resulting port-value Map (so scan-style\n * callers can read debug outputs without waiting for a React re-render),\n * or null if the sandbox isn't ready / errored.\n */\n setNodeValue: (nodeId: string, value: number | boolean | Map<number, number>) => Promise<ReadonlyMap<string, boolean | number> | null>;\n tick: () => void;\n /** Advance N ticks in a single sandbox round-trip; one React update. */\n tickN: (n: number) => Promise<void>;\n /**\n * Combinationally scan a debug-address node across 0..count-1, sampling\n * a value port after each setting. Single round-trip; clock not advanced.\n * Returns the `number[]` of length `count`, or null on error.\n */\n scanPort: (addrNodeId: string, valuePortKey: string, count: number) => Promise<number[] | null>;\n reset: () => void;\n stepBack: () => void;\n stepForward: () => void;\n seek: (index: number) => void;\n startAutoRun: (ticksPerSecond: number, options?: { displayRate?: number; onBeforeTick?: () => void }) => void;\n stopAutoRun: () => void;\n setSpeed: (ticksPerSecond: number) => void;\n runCombinational: () => void;\n getSimulator: () => SimulatorEngine | null;\n}\n\nexport interface UseCircuitSimulatorOptions {\n /** Wrap the circuit with auto-generated Switch/Led nodes */\n autoHarness?: boolean;\n /** Initial values for input ports (only used when autoHarness is true) */\n initialInputs?: Record<string, number | boolean>;\n}\n\n/**\n * Extract eval function sources from a BuiltCircuit and its dependencies.\n * These are serialized and sent to the sandbox, which reconstructs them with new Function().\n * Returns empty object if the circuit's evals aren't registered in this frame\n * (e.g. editor case where evals live only in the sandbox from prior compile).\n */\nfunction extractEvalSources(circuit: BuiltCircuit): Record<string, EvalSource> {\n const sources: Record<string, EvalSource> = {};\n const visited = new Set<string>();\n\n function collect(c: BuiltCircuit) {\n const name = c.circuit.name;\n if (visited.has(name)) return;\n visited.add(name);\n\n const entry = getCircuitEval(name);\n if (entry) {\n sources[name] = {\n evalSource: entry.evalFn.toString(),\n onTickSource: entry.onTickFn?.toString(),\n inputNames: entry.inputNames,\n outputNames: entry.outputNames,\n stateKeys: entry.stateKeys,\n };\n }\n for (const [, dep] of c._dependencies) {\n if (dep) collect(dep);\n }\n }\n\n collect(circuit);\n return sources;\n}\n\n/**\n * Build a minimal BuiltCircuit-like object from a Circuit IR and its dependencies.\n * Used by the editor to adapt sandbox compile results into the shape useCircuitSimulator expects.\n * The resulting object has no live eval functions (empty registry lookups) — the sandbox\n * is expected to already have the evals registered from a prior sandbox.compile(source).\n */\nexport function builtFromIR(circuit: Circuit, dependencies: Circuit[]): BuiltCircuit {\n const depMap = new Map<string, BuiltCircuit>();\n for (const dep of dependencies) {\n depMap.set(dep.name, {\n circuit: dep,\n _dependencies: new Map(),\n } as unknown as BuiltCircuit);\n }\n return {\n circuit,\n _dependencies: depMap,\n } as unknown as BuiltCircuit;\n}\n\n/**\n * Circuit simulator hook — runs simulation in the sandbox iframe.\n *\n * Takes a BuiltCircuit and returns reactive simulation state + actions.\n * All simulation happens inside the sandbox for security (CSP-isolated,\n * cross-origin) — no user code runs in the main frame at simulation time.\n */\nexport function useCircuitSimulator(\n circuit: BuiltCircuit | null,\n options?: UseCircuitSimulatorOptions,\n): SimulatorState & SimulatorActions {\n const sandbox = useSandboxContext();\n const slotId = useMemo(() =>\n `embed-${typeof crypto !== 'undefined' && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2)}`,\n [],\n );\n\n // ── Build library + resolve circuit IR ──\n const { rawCircuit, componentLibrary } = useMemo(() => {\n const circuitMap = new Map<string, Circuit>();\n const lib: CircuitLibrary & { addCircuit(c: Circuit): void } = {\n resolveCircuit: (name) => circuitMap.get(name),\n getAllPrimitiveNames: () => [...circuitMap.entries()].filter(([, c]) => c.implementation.kind === 'primitive').map(([n]) => n),\n addCircuit: (c) => { circuitMap.set(c.name, c); },\n };\n for (const c of [Switch(), Button(), Led, Input(), Output, HexDisplay]) {\n lib.addCircuit(c.circuit);\n }\n if (circuit) {\n lib.addCircuit(circuit.circuit);\n if (circuit._dependencies) {\n for (const [, dep] of circuit._dependencies) {\n if (dep?.circuit) lib.addCircuit(dep.circuit);\n }\n }\n }\n return { rawCircuit: circuit?.circuit ?? null, componentLibrary: lib };\n }, [circuit]);\n\n // ── Auto-harness (wrap with Switches/LEDs if enabled) ──\n const harnessedCircuit = useMemo(() => {\n if (!rawCircuit) return null;\n if (!options?.autoHarness) return rawCircuit;\n return autoHarness(rawCircuit, componentLibrary, options.initialInputs);\n }, [rawCircuit, componentLibrary, options?.autoHarness, options?.initialInputs]);\n\n // ── Detect sequential (recursively) using shared core util ──\n const isSequential = useMemo(\n () => isSequentialCircuit(harnessedCircuit, componentLibrary.resolveCircuit),\n [harnessedCircuit, componentLibrary],\n );\n\n // ── Sandbox simulation state ──\n const [portValues, setPortValues] = useState<FlatPortValueMap>(new Map());\n // Peripheral-bus state exposed by the sandbox — only includes nodes on a\n // peripheral's bus (displays, consoles, etc.). Consumers read it through\n // the `sequentialState` shape below so rendering code doesn't need to know\n // it's narrower than a full FlatSequentialState.\n const [peripheralState, setPeripheralState] = useState<Record<string, unknown>>({});\n const [cycle, setCycle] = useState(0);\n const [ready, setReady] = useState(false);\n const [isRunning, setIsRunning] = useState(false);\n const [speed, setSpeedState] = useState(5);\n const autoRunRef = useRef<ReturnType<typeof setInterval> | null>(null);\n\n // ── Time-travel history ──\n // Each entry stores:\n // - snapshotId: opaque handle to a simulator snapshot held in the sandbox\n // - cycle: clock cycle at that snapshot (for the UI counter)\n // - inputs: user-visible input values at that moment. The simulator's\n // snapshot only covers *simulation* state (flip-flops, memory). User\n // inputs (switch positions, etc.) are \"environmental state\" that lives\n // in React — see packages/core/src/simulator/environmental-state.ts.\n // On rewind we restore both so the UI is fully consistent with the\n // cycle being viewed (not just the logic outputs).\n //\n // historyIndex points at the snapshot currently reflected in portValues.\n // At the \"head\" (live state) historyIndex === historyRef.current.length - 1.\n // When the user steps back, historyIndex moves left without shrinking history.\n // If they then make a state-mutating action (tick, setNode), we branch:\n // history is truncated at historyIndex + 1, orphaned sandbox snapshots leak\n // (GC'd by slot disposal or the next cap prune — acceptable for demo sizes).\n type HistoryEntry = {\n snapshotId: number;\n cycle: number;\n inputs: Record<string, boolean | number>;\n };\n const historyRef = useRef<HistoryEntry[]>([]);\n const [historyIndex, setHistoryIndex] = useState(-1);\n const [historyLen, setHistoryLen] = useState(0); // duplicate of historyRef.length for re-renders\n const HISTORY_CAP = 200;\n\n // Default inputs from the harnessed circuit's top-level inputs\n const defaultInputs = useMemo(() => {\n const result: Record<string, boolean | number> = {};\n if (!harnessedCircuit) return result;\n for (const input of harnessedCircuit.inputs) {\n result[input.name] = input.portType.kind === 'bit' ? false : 0;\n }\n return result;\n }, [harnessedCircuit]);\n\n const [outputs, setOutputs] = useState<Record<string, boolean | number>>({});\n const [inputs, setInputs] = useState<Record<string, boolean | number>>(defaultInputs);\n // Mirror of inputs in a ref so tick/tickN can snapshot the latest value\n // synchronously without waiting for setState → re-render.\n const inputsRef = useRef(inputs);\n useEffect(() => { inputsRef.current = inputs; }, [inputs]);\n\n // ── Compile to sandbox on mount / circuit change ──\n useEffect(() => {\n if (!circuit || !harnessedCircuit) {\n setReady(false);\n setPortValues(new Map());\n return;\n }\n\n let cancelled = false;\n\n async function initSandbox() {\n if (!circuit || !harnessedCircuit) return;\n // Extract eval sources from the BuiltCircuit and its dependencies\n const evalSources = extractEvalSources(circuit);\n\n // Collect all library circuits (stdlib + user).\n // The harnessed circuit references the raw circuit as \"dut\" by name, so we\n // need to include it + all its dependencies + harness components.\n const libCircuits: Circuit[] = [];\n const seen = new Set<string>();\n const addCircuit = (c: Circuit) => {\n if (seen.has(c.name)) return;\n seen.add(c.name);\n libCircuits.push(c);\n };\n\n // The raw circuit (referenced as \"dut\" by the harness)\n addCircuit(circuit.circuit);\n // Its transitive dependencies\n for (const [, dep] of circuit._dependencies) {\n if (dep?.circuit) addCircuit(dep.circuit);\n }\n // Harness components (Switch, Led, etc.)\n for (const c of [Switch(), Button(), Led, Input(), Output, HexDisplay]) {\n addCircuit(c.circuit);\n }\n // Anything else in the library\n const primNames = componentLibrary.getAllPrimitiveNames();\n for (const name of primNames) {\n const c = componentLibrary.resolveCircuit(name);\n if (c) addCircuit(c);\n }\n\n // Only bother snapshotting if the circuit is sequential — combinational\n // circuits don't have state worth rewinding to.\n const result = await sandbox.compileIR(harnessedCircuit, libCircuits, slotId, {\n evalSources,\n snapshot: isSequential,\n });\n if (cancelled) return;\n\n if ('error' in result) {\n console.error('[useCircuitSimulator] compileIR failed:', result.error);\n setReady(false);\n return;\n }\n\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) {\n pvMap.set(k, v);\n }\n setPortValues(pvMap);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n setCycle(0);\n\n // Seed history with the initial snapshot (if any). Fresh compile means\n // the previous history (if any) is invalid anyway — sandbox already\n // cleared its own snapshots on the recompile.\n historyRef.current = result.snapshotId !== undefined\n ? [{ snapshotId: result.snapshotId, cycle: 0, inputs: { ...defaultInputs } }]\n : [];\n setHistoryIndex(result.snapshotId !== undefined ? 0 : -1);\n setHistoryLen(historyRef.current.length);\n\n setReady(true);\n // isSequential is computed synchronously via useMemo above — no need to set async\n }\n\n initSandbox();\n\n return () => {\n cancelled = true;\n sandbox.dispose(slotId).catch(() => {});\n };\n }, [circuit, harnessedCircuit, componentLibrary, sandbox, slotId, isSequential]);\n\n // Sync inputs when underlying circuit changes\n useEffect(() => {\n setInputs(defaultInputs);\n }, [defaultInputs]);\n\n // Extract outputs from portValues\n useEffect(() => {\n if (!ready || portValues.size === 0 || !harnessedCircuit) return;\n const newOutputs: Record<string, boolean | number> = {};\n for (const output of harnessedCircuit.outputs) {\n const key = `${TOP_LEVEL_NODE}.${output.name}`;\n const value = portValues.get(key);\n if (value !== undefined) {\n newOutputs[output.name] = typeof value === 'number' ? value : Boolean(value);\n }\n }\n setOutputs(newOutputs);\n }, [ready, portValues, harnessedCircuit]);\n\n // ── History bookkeeping helper ──\n //\n // Called after any state-mutating sandbox operation that returns a snapshot.\n // Handles branch-on-past-edit (truncates future), enforces the 200-entry cap,\n // and updates React state so the UI re-renders with fresh ◀▶ counts.\n //\n // The `inputsSnapshot` is what the user-visible inputs (switches, buttons,\n // etc.) looked like at this moment — used on rewind so the UI restores not\n // just the simulator state but the user inputs too.\n const recordSnapshot = useCallback((\n snapshotId: number | undefined,\n newCycle: number,\n inputsSnapshot: Record<string, boolean | number>,\n ) => {\n if (snapshotId === undefined) return; // combinational circuit — nothing to record\n\n const hist = historyRef.current;\n const currentIdx = historyIndexRef.current;\n\n // If the user was viewing the past and just made a mutating action,\n // we branch: discard everything after their current position, then\n // append the new snapshot as the new head. The orphaned sandbox\n // snapshots leak until the next cap-prune or slot disposal.\n if (currentIdx >= 0 && currentIdx < hist.length - 1) {\n hist.length = currentIdx + 1;\n }\n\n hist.push({ snapshotId, cycle: newCycle, inputs: { ...inputsSnapshot } });\n\n // Cap at HISTORY_CAP: drop oldest entries and tell the sandbox to\n // free their snapshots. `keepAfterId` is the highest snapshotId we\n // DO NOT want to keep — anything <= that gets freed in the sandbox.\n if (hist.length > HISTORY_CAP) {\n const drop = hist.length - HISTORY_CAP;\n const keepAfterId = hist[drop - 1].snapshotId;\n hist.splice(0, drop);\n sandbox.pruneSnapshots(keepAfterId, slotId).catch(() => {});\n }\n\n historyIndexRef.current = hist.length - 1;\n setHistoryIndex(hist.length - 1);\n setHistoryLen(hist.length);\n }, [sandbox, slotId]);\n\n // Mirror historyIndex in a ref so the helper above can see its live value\n // without recompiling on every change (avoids rebuilding every callback).\n const historyIndexRef = useRef(-1);\n useEffect(() => { historyIndexRef.current = historyIndex; }, [historyIndex]);\n\n // ── Actions ──\n\n const setNode = useCallback(async (name: string, value: boolean | number) => {\n // Input changes (switch toggles, button presses) don't create a new\n // history entry — history tracks CYCLES (post-tick states), not every\n // input edit. The current cycle's \"inputs\" stay live: the next tick\n // will snapshot them as part of its history entry. If the user is\n // viewing the past when they toggle, the next tick branches from there.\n const newInputs = { ...inputsRef.current, [name]: value };\n inputsRef.current = newInputs;\n setInputs(newInputs);\n if (!ready) return;\n const result = await sandbox.setNode(name, value, slotId);\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n }, [ready, sandbox, slotId]);\n\n const toggleInput = useCallback((name: string) => {\n const current = inputs[name];\n const newValue = typeof current === 'boolean' ? !current : (current === 0 ? 1 : 0);\n setNode(name, newValue);\n }, [inputs, setNode]);\n\n const toggleNode = useCallback(async (nodeId: string) => {\n if (!ready) return;\n const outKey = `${nodeId}.out`;\n const current = portValues.get(outKey);\n const newValue = typeof current === 'boolean' ? !current : (current === 1 ? 0 : 1);\n // Same reasoning as setNode: no new history entry on input edit.\n const result = await sandbox.setNode(nodeId, newValue, slotId);\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n }, [ready, portValues, sandbox, slotId]);\n\n const setNodeValue = useCallback(async (nodeId: string, value: number | boolean | Map<number, number>) => {\n if (!ready) return null;\n // Map values (for ROM/RAM loading) are supported via structured clone in postMessage.\n // Same reasoning as setNode: no history entry on this path.\n const result = await sandbox.setNode(nodeId, value as any, slotId);\n if ('error' in result) return null;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n return pvMap as ReadonlyMap<string, boolean | number>;\n }, [ready, sandbox, slotId]);\n\n const tick = useCallback(async () => {\n if (!ready) return;\n const result = await sandbox.tick(undefined, slotId, { snapshot: isSequential });\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n setCycle(result.cycle);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n // tick() doesn't modify user inputs — the switch position at tick time\n // is what goes into history.\n recordSnapshot(result.snapshotId, result.cycle, inputsRef.current);\n }, [ready, sandbox, slotId, isSequential, recordSnapshot]);\n\n // Batched tick — advances N cycles in one round-trip; one React update.\n // Only snapshots the final state (not every intermediate cycle) — time-travel\n // through a batched tick jumps straight to pre-batch.\n const tickN = useCallback(async (n: number) => {\n if (!ready || n <= 0) return;\n const result = await sandbox.tickN(n, undefined, slotId, { snapshot: isSequential });\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n setCycle(result.cycle);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n recordSnapshot(result.snapshotId, result.cycle, inputsRef.current);\n }, [ready, sandbox, slotId, isSequential, recordSnapshot]);\n\n const scanPort = useCallback(async (addrNodeId: string, valuePortKey: string, count: number): Promise<number[] | null> => {\n if (!ready || count <= 0) return null;\n const result = await sandbox.scanPort(addrNodeId, valuePortKey, count, slotId);\n if ('error' in result) return null;\n return result.values;\n }, [ready, sandbox, slotId]);\n\n const reset = useCallback(async () => {\n const result = await sandbox.reset(slotId);\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n setCycle(0);\n setInputs(defaultInputs);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n else setPeripheralState({});\n\n // Sandbox reset already cleared its own snapshots. Clear ours too,\n // then seed a fresh initial snapshot for the post-reset state so\n // time-travel starts over from here.\n historyRef.current = [];\n if (isSequential) {\n const snap = await sandbox.snapshot(slotId);\n if (!('error' in snap) && snap.snapshotId !== undefined) {\n historyRef.current = [{ snapshotId: snap.snapshotId, cycle: 0, inputs: { ...defaultInputs } }];\n }\n }\n historyIndexRef.current = historyRef.current.length > 0 ? 0 : -1;\n setHistoryIndex(historyRef.current.length > 0 ? 0 : -1);\n setHistoryLen(historyRef.current.length);\n }, [sandbox, slotId, defaultInputs, isSequential]);\n\n // ── Time-travel actions ──\n\n // Shared restore helper — applies a history entry to both the simulator\n // and the host-side input state. We restore inputs because the UI \"rewind\"\n // promise is a full restoration of user-visible state: switch positions,\n // input values, circuit state. Omitting inputs would leave the UI showing\n // a stale switch while the circuit actually runs with the restored value —\n // see environmental-state.ts in packages/core for the same distinction.\n const applyHistoryEntry = useCallback(async (entry: HistoryEntry, targetIndex: number) => {\n const result = await sandbox.restore(entry.snapshotId, slotId);\n if ('error' in result) return;\n const pvMap = new Map<string, BitValue | BusValue>();\n for (const [k, v] of Object.entries(result.portValues)) pvMap.set(k, v);\n setPortValues(pvMap);\n setCycle(result.cycle);\n if (result.peripheralState) setPeripheralState(result.peripheralState);\n else setPeripheralState({});\n // Restore user inputs too. Keep inputsRef in lockstep so that any\n // immediately-following setNode sees the restored values as its base.\n const restoredInputs = { ...entry.inputs };\n inputsRef.current = restoredInputs;\n setInputs(restoredInputs);\n historyIndexRef.current = targetIndex;\n setHistoryIndex(targetIndex);\n }, [sandbox, slotId]);\n\n const stepBack = useCallback(async () => {\n if (!ready) return;\n const hist = historyRef.current;\n const idx = historyIndexRef.current;\n if (idx <= 0) return; // already at or before the start\n await applyHistoryEntry(hist[idx - 1], idx - 1);\n }, [ready, applyHistoryEntry]);\n\n const stepForward = useCallback(async () => {\n if (!ready) return;\n const hist = historyRef.current;\n const idx = historyIndexRef.current;\n // Already at the live head — nothing to step into yet.\n // (Clicking ▶ at the head is a no-op, not a tick. Users run the clock\n // explicitly via Tick/autorun to add new history.)\n if (idx >= hist.length - 1) return;\n await applyHistoryEntry(hist[idx + 1], idx + 1);\n }, [ready, applyHistoryEntry]);\n\n const seek = useCallback(async (index: number) => {\n if (!ready) return;\n const hist = historyRef.current;\n if (index < 0 || index >= hist.length) return;\n await applyHistoryEntry(hist[index], index);\n }, [ready, applyHistoryEntry]);\n\n // Stable indirection so setInterval always calls the latest tick(). Without\n // this, an auto-run started before `ready` flips true would capture the\n // bail-early version of tick and never recover, even after the sandbox\n // becomes ready — the interval would fire forever calling a stale closure.\n const tickRef = useRef(tick);\n useEffect(() => { tickRef.current = tick; }, [tick]);\n\n const startAutoRun = useCallback((ticksPerSecond: number, _opts?: { displayRate?: number; onBeforeTick?: () => void }) => {\n if (autoRunRef.current) clearInterval(autoRunRef.current);\n setSpeedState(ticksPerSecond);\n setIsRunning(true);\n const interval = Math.max(1, Math.floor(1000 / ticksPerSecond));\n autoRunRef.current = setInterval(() => { tickRef.current(); }, interval);\n }, []);\n\n const stopAutoRun = useCallback(() => {\n if (autoRunRef.current) {\n clearInterval(autoRunRef.current);\n autoRunRef.current = null;\n }\n setIsRunning(false);\n }, []);\n\n const setSpeed = useCallback((ticksPerSecond: number) => {\n setSpeedState(ticksPerSecond);\n if (autoRunRef.current) {\n // Restart with new speed\n clearInterval(autoRunRef.current);\n const interval = Math.max(1, Math.floor(1000 / ticksPerSecond));\n autoRunRef.current = setInterval(() => { tickRef.current(); }, interval);\n }\n }, []);\n\n useEffect(() => {\n return () => {\n if (autoRunRef.current) clearInterval(autoRunRef.current);\n };\n }, []);\n\n // Expose peripheral-bus state as a FlatSequentialState-compatible shape so\n // projection code (which was written against in-process simulation) doesn't\n // need to learn about the sandbox boundary. Only nodes on a peripheral's\n // bus appear here — internal logic state stays sandbox-internal.\n const sequentialState = useMemo<FlatSequentialState | null>(() => {\n const entries = Object.entries(peripheralState);\n if (entries.length === 0) return null;\n const currentState = new Map<string, any>();\n for (const [k, v] of entries) currentState.set(k, v);\n return {\n currentState,\n nextState: new Map(),\n clocks: new Map(),\n cycleCount: cycle,\n };\n }, [peripheralState, cycle]);\n\n // Shadow-typed history for the UI: the consumer only needs a length for\n // showing the `N/M` counter and the ◀ ▶ enable logic. historyLen drives\n // re-renders; the array identity is intentionally stable per-slot.\n const historyForUi = useMemo(\n () => historyRef.current.slice(0, historyLen).map(h => ({ engineSnapshot: h.snapshotId, metadata: h.cycle })),\n [historyLen],\n );\n\n return {\n // State\n outputs,\n inputs,\n cycleCount: cycle,\n ready,\n error: null,\n isSequential,\n circuit: harnessedCircuit,\n portValues: portValues.size > 0 ? portValues : null,\n sequentialState,\n componentLibrary,\n history: historyForUi,\n historyIndex,\n isViewingPast: historyIndex >= 0 && historyIndex < historyLen - 1,\n isRunning,\n speed,\n\n // Actions\n setNode,\n toggleInput,\n toggleNode,\n setNodeValue,\n tick,\n tickN,\n scanPort,\n reset,\n stepBack,\n stepForward,\n seek,\n startAutoRun,\n stopAutoRun,\n setSpeed,\n runCombinational: () => {}, // sandbox.setNode already runs combinational\n getSimulator: () => null, // no local engine when running in sandbox\n };\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { CircuitEmbedProps, CircuitEmbedHandle } from './CircuitEmbed';
|
|
|
5
5
|
export { useCircuitSimulator, builtFromIR } from './hooks/useCircuitSimulator';
|
|
6
6
|
export type { SimulatorState, SimulatorActions, UseCircuitSimulatorOptions } from './hooks/useCircuitSimulator';
|
|
7
7
|
export { CircuitCanvas } from '@simten/ui/canvas';
|
|
8
|
-
export type { CircuitCanvasProps } from '@simten/ui/canvas';
|
|
8
|
+
export type { CircuitCanvasProps, CircuitLayout } from '@simten/ui/canvas';
|
|
9
9
|
export { ErrorBoundary } from './components/ErrorBoundary';
|
|
10
10
|
export { ErrorDisplay } from './components/ErrorDisplay';
|
|
11
11
|
export type { SimulatorError } from './components/ErrorDisplay';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAuB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAuB,MAAM,iBAAiB,CAAC","sourcesContent":["export { CircuitViewer } from './CircuitViewer';\nexport type { CircuitViewerProps, CircuitViewerHandle } from './CircuitViewer';\nexport { CircuitEmbed } from './CircuitEmbed';\nexport type { CircuitEmbedProps, CircuitEmbedHandle } from './CircuitEmbed';\nexport { useCircuitSimulator, builtFromIR } from './hooks/useCircuitSimulator';\nexport type { SimulatorState, SimulatorActions, UseCircuitSimulatorOptions } from './hooks/useCircuitSimulator';\nexport { CircuitCanvas } from '@simten/ui/canvas';\nexport type { CircuitCanvasProps, CircuitLayout } from '@simten/ui/canvas';\nexport { ErrorBoundary } from './components/ErrorBoundary';\nexport { ErrorDisplay } from './components/ErrorDisplay';\nexport type { SimulatorError } from './components/ErrorDisplay';\nexport { ShareCircuitProvider, useShareCircuit, type ShareCircuitFn } from './share-context';\n"]}
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-context.js","sourceRoot":"","sources":["../src/share-context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAYlE,MAAM,mBAAmB,GAAG,aAAa,CAAwB,IAAI,CAAC,CAAC;AAEvE,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,GAIT;IACC,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACvC,QAAQ,GACoB,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"share-context.js","sourceRoot":"","sources":["../src/share-context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAYlE,MAAM,mBAAmB,GAAG,aAAa,CAAwB,IAAI,CAAC,CAAC;AAEvE,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,GAIT;IACC,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACvC,QAAQ,GACoB,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import { createContext, useContext, type ReactNode } from \"react\";\n\n/**\n * Function that persists a circuit source to KV and returns a content-addressed\n * hash. The hash plugs into the `/circuit/s/<hash>` route. Provided by the host\n * app (apps/web wires this to its TanStack Start `shareCircuit` server fn);\n * when unset, Fork buttons fall back to the legacy inline `/circuit/<encoded>`\n * URL. The fallback exists for embeds outside simten.dev — the simten.dev site\n * always supplies the provider.\n */\nexport type ShareCircuitFn = (source: string) => Promise<{ hash: string }>;\n\nconst ShareCircuitContext = createContext<ShareCircuitFn | null>(null);\n\nexport function ShareCircuitProvider({\n value,\n children,\n}: {\n value: ShareCircuitFn;\n children: ReactNode;\n}) {\n return (\n <ShareCircuitContext.Provider value={value}>\n {children}\n </ShareCircuitContext.Provider>\n );\n}\n\nexport function useShareCircuit(): ShareCircuitFn | null {\n return useContext(ShareCircuitContext);\n}\n"]}
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-border:var(--border,#37374180)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-1{inset:calc(var(--spacing) * 1)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-\[80vh\]{height:80vh}.h-auto{height:auto}.h-full{height:100%}.max-h-24{max-height:calc(var(--spacing) * 24)}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-\[380px\]{width:380px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[120px\]{max-width:120px}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[40px\]{min-width:40px}.min-w-\[55px\]{min-width:55px}.min-w-\[60px\]{min-width:60px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-\[280px\]{min-width:280px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[1\.875rem\]{--tw-translate-x:1.875rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[ping_2s_cubic-bezier\(0\,0\,0\.2\,1\)_infinite\]{animation:2s cubic-bezier(0,0,.2,1) infinite ping}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-wait{cursor:wait}.resize-y{resize:vertical}.appearance-none{appearance:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--embed-border\)\]{border-color:var(--embed-border)}.border-\[var\(--embed-border-node\)\]{border-color:var(--embed-border-node)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-border{border-color:var(--border,#37374180)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-600{border-color:var(--color-gray-600)}.border-gray-700{border-color:var(--color-gray-700)}.border-green-200{border-color:var(--color-green-200)}.border-green-400{border-color:var(--color-green-400)}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500) 50%,transparent)}}.border-green-600{border-color:var(--color-green-600)}.border-input{border-color:var(--input,#37374180)}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-800\/40{border-color:#9f071266}@supports (color:color-mix(in lab,red,red)){.border-red-800\/40{border-color:color-mix(in oklab,var(--color-red-800) 40%,transparent)}}.border-transparent{border-color:#0000}.bg-\[var\(--embed-bg-code\)\]{background-color:var(--embed-bg-code)}.bg-\[var\(--embed-bg-primary\)\]{background-color:var(--embed-bg-primary)}.bg-\[var\(--embed-bg-secondary\)\]{background-color:var(--embed-bg-secondary)}.bg-\[var\(--embed-bg-tertiary\)\],.bg-\[var\(--embed-bg-tertiary\)\]\/60{background-color:var(--embed-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--embed-bg-tertiary\)\]\/60{background-color:color-mix(in oklab,var(--embed-bg-tertiary) 60%,transparent)}}.bg-\[var\(--embed-border\)\]\/40{background-color:var(--embed-border)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--embed-border\)\]\/40{background-color:color-mix(in oklab,var(--embed-border) 40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background,#141418)}.bg-black{background-color:var(--color-black)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400\/30{background-color:#54a2ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/30{background-color:color-mix(in oklab,var(--color-blue-400) 30%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-card\/95{background-color:var(--card,#1a1a1e)}@supports (color:color-mix(in lab,red,red)){.bg-card\/95{background-color:color-mix(in oklab,var(--card,#1a1a1e) 95%,transparent)}}.bg-foreground{background-color:var(--foreground,#e5e5e5)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-100\/50{background-color:#f3f4f680}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/50{background-color:color-mix(in oklab,var(--color-gray-100) 50%,transparent)}}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900) 30%,transparent)}}.bg-red-950\/20{background-color:#46080933}@supports (color:color-mix(in lab,red,red)){.bg-red-950\/20{background-color:color-mix(in oklab,var(--color-red-950) 20%,transparent)}}.bg-violet-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.bg-violet-500\/30{background-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/30{background-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-300{--tw-gradient-from:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-300{--tw-gradient-from:var(--color-green-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-400{--tw-gradient-to:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-green-500{--tw-gradient-to:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-foreground{fill:var(--foreground,#e5e5e5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--embed-text-muted\)\]{color:var(--embed-text-muted)}.text-\[var\(--embed-text-primary\)\]{color:var(--embed-text-primary)}.text-\[var\(--embed-text-secondary\)\]{color:var(--embed-text-secondary)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-background{color:var(--background,#141418)}.text-blue-400{color:var(--color-blue-400)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-600{color:var(--color-emerald-600)}.text-foreground{color:var(--foreground,#e5e5e5)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-900{color:var(--color-green-900)}.text-muted-foreground,.text-muted-foreground\/60{color:var(--muted-foreground,#71717a)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground,#71717a) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground,#71717a)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground,#71717a) 70%,transparent)}}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/50{color:#ff656880}@supports (color:color-mix(in lab,red,red)){.text-red-400\/50{color:color-mix(in oklab,var(--color-red-400) 50%,transparent)}}.text-red-400\/60{color:#ff656899}@supports (color:color-mix(in lab,red,red)){.text-red-400\/60{color:color-mix(in oklab,var(--color-red-400) 60%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-violet-300{color:var(--color-violet-300)}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.accent-blue-600{accent-color:var(--color-blue-600)}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500\/30{--tw-shadow-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.shadow-blue-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-blue-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-green-500\/50{--tw-shadow-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-green-500) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background,#141418)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:bg-blue-400:is(:where(.group):hover *){background-color:var(--color-blue-400)}.hover\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:border-blue-500:hover{border-color:var(--color-blue-500)}.hover\:border-green-500:hover{border-color:var(--color-green-500)}.hover\:bg-\[var\(--embed-bg-tertiary\)\]\/80:hover{background-color:var(--embed-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--embed-bg-tertiary\)\]\/80:hover{background-color:color-mix(in oklab,var(--embed-bg-tertiary) 80%,transparent)}}.hover\:bg-accent:hover{background-color:var(--accent,#2a2a2e)}.hover\:bg-blue-300:hover{background-color:var(--color-blue-300)}.hover\:bg-blue-500\/5:hover{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/5:hover{background-color:color-mix(in oklab,var(--color-blue-500) 5%,transparent)}}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-green-300:hover{background-color:var(--color-green-300)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-red-900\/50:hover{background-color:#82181a80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-900\/50:hover{background-color:color-mix(in oklab,var(--color-red-900) 50%,transparent)}}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-violet-500\/10:hover{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-violet-500\/10:hover{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.hover\:text-\[var\(--embed-text-primary\)\]:hover{color:var(--embed-text-primary)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground,#e5e5e5)}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-300:hover{color:var(--color-gray-300)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-violet-400:hover{color:var(--color-violet-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring,#555)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-blue-400:focus-visible{--tw-ring-color:var(--color-blue-400)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring,#555)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-gray-900:focus-visible{--tw-ring-offset-color:var(--color-gray-900)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(min-width:40rem){.sm\:max-w-sm{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:flex{display:flex}}@media(prefers-color-scheme:dark){.dark\:border-blue-400{border-color:var(--color-blue-400)}.dark\:border-gray-600{border-color:var(--color-gray-600)}.dark\:bg-\[\#2a2a2e\]{background-color:#2a2a2e}.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:bg-gray-900{background-color:var(--color-gray-900)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-gray-100{color:var(--color-gray-100)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}@media(hover:hover){.dark\:hover\:bg-gray-700:hover{background-color:var(--color-gray-700)}}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-3\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}[data-embed-theme=dark],.dark{--embed-bg-primary:#141418;--embed-bg-secondary:#1a1a1e;--embed-bg-tertiary:#2a2a2e;--embed-bg-surface:#111114e6;--embed-bg-surface-80:#111114cc;--embed-bg-code:#0d1117;--embed-border:#37374180;--embed-border-node:#3a3a3e;--embed-text-primary:#e5e5e5;--embed-text-secondary:#a1a1aa;--embed-text-muted:#71717a;--embed-dot-color:#2a2a2e}[data-embed-theme=dark]{--background:#141418;--foreground:#e5e5e5;--card:#1a1a1e;--card-foreground:#e5e5e5;--muted:#2a2a2e;--muted-foreground:#71717a;--accent:#2a2a2e;--accent-foreground:#e5e5e5;--border:#37374180;--input:#37374180;--ring:#555;--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}[data-embed-theme] *,[data-embed-theme] :before,[data-embed-theme] :after{border-color:var(--color-border,#37374180)}[data-embed-theme=light],html.light{--embed-bg-primary:#f8f9fb;--embed-bg-secondary:#f3f4f6;--embed-bg-tertiary:#eef0f3;--embed-bg-surface:#f8f9fbf2;--embed-bg-surface-80:#f8f9fbe6;--embed-bg-code:#f3f4f6;--embed-border:#00000014;--embed-border-node:#0000001a;--embed-text-primary:#1a1a2e;--embed-text-secondary:#4b5563;--embed-text-muted:#9ca3af;--embed-dot-color:#e5e7eb}[data-embed-theme=light]{--background:#f8f9fb;--foreground:#1a1a2e;--card:#fff;--card-foreground:#1a1a2e;--muted:#eef0f3;--muted-foreground:#9ca3af;--accent:#eef0f3;--accent-foreground:#1a1a2e;--border:#00000014;--input:#00000014;--ring:#aaa;--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-border:var(--border,#37374180)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-1{inset:calc(var(--spacing) * 1)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-\[80vh\]{height:80vh}.h-auto{height:auto}.h-full{height:100%}.max-h-24{max-height:calc(var(--spacing) * 24)}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-\[380px\]{width:380px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[120px\]{max-width:120px}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[40px\]{min-width:40px}.min-w-\[55px\]{min-width:55px}.min-w-\[60px\]{min-width:60px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-\[280px\]{min-width:280px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[1\.875rem\]{--tw-translate-x:1.875rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[ping_2s_cubic-bezier\(0\,0\,0\.2\,1\)_infinite\]{animation:2s cubic-bezier(0,0,.2,1) infinite ping}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-wait{cursor:wait}.resize-y{resize:vertical}.appearance-none{appearance:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--embed-border\)\]{border-color:var(--embed-border)}.border-\[var\(--embed-border-node\)\]{border-color:var(--embed-border-node)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-border{border-color:var(--border,#37374180)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-600{border-color:var(--color-gray-600)}.border-gray-700{border-color:var(--color-gray-700)}.border-green-200{border-color:var(--color-green-200)}.border-green-400{border-color:var(--color-green-400)}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500) 50%,transparent)}}.border-green-600{border-color:var(--color-green-600)}.border-input{border-color:var(--input,#37374180)}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-800\/40{border-color:#9f071266}@supports (color:color-mix(in lab,red,red)){.border-red-800\/40{border-color:color-mix(in oklab,var(--color-red-800) 40%,transparent)}}.border-transparent{border-color:#0000}.bg-\[var\(--embed-bg-code\)\]{background-color:var(--embed-bg-code)}.bg-\[var\(--embed-bg-primary\)\]{background-color:var(--embed-bg-primary)}.bg-\[var\(--embed-bg-secondary\)\]{background-color:var(--embed-bg-secondary)}.bg-\[var\(--embed-bg-tertiary\)\],.bg-\[var\(--embed-bg-tertiary\)\]\/60{background-color:var(--embed-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--embed-bg-tertiary\)\]\/60{background-color:color-mix(in oklab,var(--embed-bg-tertiary) 60%,transparent)}}.bg-\[var\(--embed-border\)\]\/40{background-color:var(--embed-border)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--embed-border\)\]\/40{background-color:color-mix(in oklab,var(--embed-border) 40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background,#141418)}.bg-black{background-color:var(--color-black)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400\/30{background-color:#54a2ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/30{background-color:color-mix(in oklab,var(--color-blue-400) 30%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-card\/95{background-color:var(--card,#1a1a1e)}@supports (color:color-mix(in lab,red,red)){.bg-card\/95{background-color:color-mix(in oklab,var(--card,#1a1a1e) 95%,transparent)}}.bg-foreground{background-color:var(--foreground,#e5e5e5)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-100\/50{background-color:#f3f4f680}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/50{background-color:color-mix(in oklab,var(--color-gray-100) 50%,transparent)}}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900) 30%,transparent)}}.bg-red-950\/20{background-color:#46080933}@supports (color:color-mix(in lab,red,red)){.bg-red-950\/20{background-color:color-mix(in oklab,var(--color-red-950) 20%,transparent)}}.bg-violet-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.bg-violet-500\/30{background-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/30{background-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-300{--tw-gradient-from:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-300{--tw-gradient-from:var(--color-green-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-400{--tw-gradient-to:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-green-500{--tw-gradient-to:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-foreground{fill:var(--foreground,#e5e5e5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--embed-text-muted\)\]{color:var(--embed-text-muted)}.text-\[var\(--embed-text-primary\)\]{color:var(--embed-text-primary)}.text-\[var\(--embed-text-secondary\)\]{color:var(--embed-text-secondary)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-background{color:var(--background,#141418)}.text-blue-400{color:var(--color-blue-400)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-600{color:var(--color-emerald-600)}.text-foreground{color:var(--foreground,#e5e5e5)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-900{color:var(--color-green-900)}.text-muted-foreground,.text-muted-foreground\/60{color:var(--muted-foreground,#71717a)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground,#71717a) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground,#71717a)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground,#71717a) 70%,transparent)}}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/50{color:#ff656880}@supports (color:color-mix(in lab,red,red)){.text-red-400\/50{color:color-mix(in oklab,var(--color-red-400) 50%,transparent)}}.text-red-400\/60{color:#ff656899}@supports (color:color-mix(in lab,red,red)){.text-red-400\/60{color:color-mix(in oklab,var(--color-red-400) 60%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-violet-300{color:var(--color-violet-300)}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.accent-blue-600{accent-color:var(--color-blue-600)}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500\/30{--tw-shadow-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.shadow-blue-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-blue-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-green-500\/50{--tw-shadow-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-green-500) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background,#141418)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:bg-blue-400:is(:where(.group):hover *){background-color:var(--color-blue-400)}.hover\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:border-blue-500:hover{border-color:var(--color-blue-500)}.hover\:border-green-500:hover{border-color:var(--color-green-500)}.hover\:bg-\[var\(--embed-bg-tertiary\)\]\/80:hover{background-color:var(--embed-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--embed-bg-tertiary\)\]\/80:hover{background-color:color-mix(in oklab,var(--embed-bg-tertiary) 80%,transparent)}}.hover\:bg-accent:hover{background-color:var(--accent,#2a2a2e)}.hover\:bg-blue-300:hover{background-color:var(--color-blue-300)}.hover\:bg-blue-500\/5:hover{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/5:hover{background-color:color-mix(in oklab,var(--color-blue-500) 5%,transparent)}}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-green-300:hover{background-color:var(--color-green-300)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-red-900\/50:hover{background-color:#82181a80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-900\/50:hover{background-color:color-mix(in oklab,var(--color-red-900) 50%,transparent)}}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-violet-500\/10:hover{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-violet-500\/10:hover{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.hover\:text-\[var\(--embed-text-primary\)\]:hover{color:var(--embed-text-primary)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground,#e5e5e5)}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-300:hover{color:var(--color-gray-300)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-violet-400:hover{color:var(--color-violet-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring,#555)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-blue-400:focus-visible{--tw-ring-color:var(--color-blue-400)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring,#555)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-gray-900:focus-visible{--tw-ring-offset-color:var(--color-gray-900)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(min-width:40rem){.sm\:max-w-sm{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:flex{display:flex}}@media(prefers-color-scheme:dark){.dark\:border-blue-400{border-color:var(--color-blue-400)}.dark\:border-gray-600{border-color:var(--color-gray-600)}.dark\:bg-\[\#2a2a2e\]{background-color:#2a2a2e}.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:bg-gray-900{background-color:var(--color-gray-900)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-gray-100{color:var(--color-gray-100)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}@media(hover:hover){.dark\:hover\:bg-gray-700:hover{background-color:var(--color-gray-700)}}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-3\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}[data-embed-theme=dark],.dark{--embed-bg-primary:#141418;--embed-bg-secondary:#1a1a1e;--embed-bg-tertiary:#2a2a2e;--embed-bg-surface:#111114e6;--embed-bg-surface-80:#111114cc;--embed-bg-code:#0d1117;--embed-border:#37374180;--embed-border-node:#3a3a3e;--embed-text-primary:#e5e5e5;--embed-text-secondary:#a1a1aa;--embed-text-muted:#71717a;--embed-dot-color:#2a2a2e}[data-embed-theme=dark]{--background:#141418;--foreground:#e5e5e5;--card:#1a1a1e;--card-foreground:#e5e5e5;--muted:#2a2a2e;--muted-foreground:#71717a;--accent:#2a2a2e;--accent-foreground:#e5e5e5;--border:#37374180;--input:#37374180;--ring:#555;--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}[data-embed-theme] *,[data-embed-theme] :before,[data-embed-theme] :after{border-color:var(--color-border,#37374180)}[data-embed-theme=light],html.light{--embed-bg-primary:#f8f9fb;--embed-bg-secondary:#f3f4f6;--embed-bg-tertiary:#eef0f3;--embed-bg-surface:#f8f9fbf2;--embed-bg-surface-80:#f8f9fbe6;--embed-bg-code:#f3f4f6;--embed-border:#00000014;--embed-border-node:#0000001a;--embed-text-primary:#1a1a2e;--embed-text-secondary:#4b5563;--embed-text-muted:#9ca3af;--embed-dot-color:#e5e7eb}[data-embed-theme=light]{--background:#f8f9fb;--foreground:#1a1a2e;--card:#fff;--card-foreground:#1a1a2e;--muted:#eef0f3;--muted-foreground:#9ca3af;--accent:#eef0f3;--accent-foreground:#1a1a2e;--border:#00000014;--input:#00000014;--ring:#aaa;--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * Types for the embed package.\n * Defines layout metadata types and re-exports simulator types from core.\n */\n\n// Re-export simulator types from core so embed consumers don't need to install core separately\nexport type {\n FlatCircuit,\n FlatPortValueMap,\n FlatSequentialState,\n} from \"@simten/core/simulator\";\n\nexport type { Circuit } from \"@simten/core\";\n\n// --- Layout metadata types (extracted from packages/ui/src/editor/types/visual.ts) ---\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface ComponentMetadata {\n id: string;\n position: Position;\n dimensions?: Dimensions;\n selected?: boolean;\n zIndex?: number;\n}\n\nexport interface ConnectionMetadata {\n id: string;\n selected?: boolean;\n}\n\nexport interface MetadataState {\n components: Record<string, ComponentMetadata>;\n connections: Record<string, ConnectionMetadata>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebComponentEmbed.js","sourceRoot":"","sources":["../../src/webcomponent/WebComponentEmbed.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAcvE,SAAS,sBAAsB,CAAC,EAC9B,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,GACkB;IACvB,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,eAAe,CAAC,IAAI,CAAC,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,CAAC;YACf,OAAO;QACT,CAAC;QAED,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACpC,IAAI,SAAS;gBAAE,O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,sBAAY,EAC7C,cAAK,SAAS,EAAC,uCAAuC,YAAE,KAAK,GAAO,IAChE,GACF,CACP,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAC,wDAAwD,6BAEpF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,kCAAuB,KAAK,IAAI,MAAM,YACpC,KAAC,YAAY,IACX,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,IAAI,EAChB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACZ,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,CACL,KAAC,eAAe,cACd,KAAC,sBAAsB,OAAK,KAAK,GAAI,GACrB,CACnB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * WebComponentEmbed — bridge between code strings and CircuitEmbed.\n *\n * Internal to the web component registration. Not a public API.\n * Takes a `code` string (from the <circuit-embed> HTML attribute),\n * compiles it via the sandbox (isolated iframe, separate origin),\n * and passes the resulting BuiltCircuit to CircuitEmbed.\n *\n * Security: code executes only inside the sandbox iframe — never in\n * the main frame. Only plain Circuit IR (JSON) crosses the boundary.\n */\n\nimport { useState, useEffect } from \"react\";\nimport { SandboxProvider, useSandboxContext } from \"@simten/ui/sandbox\";\nimport { buildFromIR } from \"@simten/core/circuit\";\nimport type { BuiltCircuit } from \"@simten/core/circuit\";\nimport { CircuitEmbed, type CircuitEmbedProps } from \"../CircuitEmbed\";\n\nexport interface WebComponentEmbedProps {\n code?: string;\n height?: number;\n showControls?: boolean;\n title?: string;\n subtitle?: string;\n description?: string;\n href?: string;\n autoRunSpeed?: number;\n theme?: \"light\" | \"dark\";\n}\n\nfunction WebComponentEmbedInner({\n code,\n height,\n showControls,\n title,\n subtitle,\n description,\n href,\n autoRunSpeed,\n theme,\n}: WebComponentEmbedProps) {\n const sandbox = useSandboxContext();\n const [builtCircuit, setBuiltCircuit] = useState<BuiltCircuit | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n if (!code) {\n setBuiltCircuit(null);\n setError(null);\n return;\n }\n\n let cancelled = false;\n\n sandbox.compile(code).then((result) => {\n if (cancelled) return;\n\n if ('error' in result) {\n setError(result.error);\n setBuiltCircuit(null);\n return;\n }\n\n const circuit = result.circuits[result.circuits.length - 1];\n if (!circuit) {\n setError('No circuit found in code');\n setBuiltCircuit(null);\n return;\n }\n\n setError(null);\n setBuiltCircuit(buildFromIR(circuit, result.libraryCircuits));\n });\n\n return () => { cancelled = true; };\n }, [code, sandbox]);\n\n if (!code) {\n return (\n <div style={{ height }} className=\"flex items-center justify-center text-sm text-gray-500\">\n No circuit code provided\n </div>\n );\n }\n\n if (error) {\n return (\n <div style={{ height }} className=\"flex items-center justify-center p-4\">\n <div className=\"text-sm text-red-400 bg-red-500/10 rounded p-3 border border-red-500/20\">\n <div className=\"font-medium mb-1\">Error</div>\n <div className=\"font-mono text-xs whitespace-pre-wrap\">{error}</div>\n </div>\n </div>\n );\n }\n\n if (!builtCircuit) {\n return (\n <div style={{ height }} className=\"flex items-center justify-center text-sm text-gray-500\">\n Compiling...\n </div>\n );\n }\n\n return (\n <div data-embed-theme={theme ?? \"dark\"}>\n <CircuitEmbed\n circuit={builtCircuit}\n height={height}\n showControls={showControls}\n title={title}\n subtitle={subtitle}\n description={description}\n href={href}\n forkSource={code}\n autoRunSpeed={autoRunSpeed}\n theme={theme}\n />\n </div>\n );\n}\n\nexport function WebComponentEmbed(props: WebComponentEmbedProps) {\n return (\n <SandboxProvider>\n <WebComponentEmbedInner {...props} />\n </SandboxProvider>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webcomponent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,IAAI,MAAM,8BAA8B,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,0BAA0B;AAE1B,MAAM,cAAc,GAAG,IAAI,CAAyB,iBAAiB,EAAE;IACrE,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,QAAQ;QACtB,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC,CAAC;AAEH,mBAAmB;AAEnB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;IACzC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webcomponent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,IAAI,MAAM,8BAA8B,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,0BAA0B;AAE1B,MAAM,cAAc,GAAG,IAAI,CAAyB,iBAAiB,EAAE;IACrE,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,QAAQ;QACtB,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC,CAAC;AAEH,mBAAmB;AAEnB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;IACzC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["/**\n * Web component registration for Simten embeds.\n *\n * Registers a custom element:\n * <circuit-embed> — interactive circuit viewer\n *\n * Usage:\n * <link rel=\"stylesheet\" href=\"https://unpkg.com/@simten/embed/dist/styles.css\">\n * <script src=\"https://unpkg.com/@simten/embed/dist/circuit-embed.js\"></script>\n *\n * <circuit-embed code=\"const Demo = circuit('Demo', { ... })\" height=\"300\"></circuit-embed>\n *\n * Light DOM (no Shadow DOM) — ReactFlow requires direct DOM access.\n * Style isolation via class prefix.\n */\n\nimport \"../styles/embed.css\";\nimport r2wc from \"@r2wc/react-to-web-component\";\nimport { WebComponentEmbed, type WebComponentEmbedProps } from \"./WebComponentEmbed\";\n\n// --- <circuit-embed> ---\n\nconst CircuitEmbedWC = r2wc<WebComponentEmbedProps>(WebComponentEmbed, {\n props: {\n code: \"string\",\n height: \"number\",\n showControls: \"boolean\",\n title: \"string\",\n subtitle: \"string\",\n description: \"string\",\n href: \"string\",\n autoRunSpeed: \"number\",\n theme: \"string\",\n },\n});\n\n// --- Register ---\n\nif (!customElements.get(\"circuit-embed\")) {\n customElements.define(\"circuit-embed\", CircuitEmbedWC);\n}\n\nexport { CircuitEmbedWC };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simten/embed",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Embeddable interactive hardware circuits. Drop live, cycle-accurate simulations into any React app or HTML page.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Charles Harris",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"./styles.css": "./dist/styles.css",
|
|
40
40
|
"./webcomponent": {
|
|
41
41
|
"default": "./dist/circuit-embed.js"
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
|
+
"./package.json": "./package.json"
|
|
43
44
|
},
|
|
44
45
|
"publishConfig": {
|
|
45
46
|
"access": "public"
|
|
@@ -53,8 +54,8 @@
|
|
|
53
54
|
"clsx": "^2.1.1",
|
|
54
55
|
"elkjs": "^0.9.3",
|
|
55
56
|
"tailwind-merge": "^3.0.0",
|
|
56
|
-
"@simten/core": "0.2.
|
|
57
|
-
"@simten/ui": "0.1.
|
|
57
|
+
"@simten/core": "0.2.3",
|
|
58
|
+
"@simten/ui": "0.1.4"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"react": "^18 || ^19",
|
|
@@ -73,6 +74,9 @@
|
|
|
73
74
|
"typescript": "^5",
|
|
74
75
|
"vite": "^7.1.7"
|
|
75
76
|
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=20"
|
|
79
|
+
},
|
|
76
80
|
"scripts": {
|
|
77
81
|
"build": "rm -rf dist *.tsbuildinfo && tsc -b && vite build",
|
|
78
82
|
"analyze": "ANALYZE=true vite build",
|