{"version":3,"names":["getParentNode","isElement","isNode","Portal","createContext","createEffect","createSignal","useContext","useCspNonce","createChangeEventDetails","FocusGuard","useIsoLayoutEffect","createAttribute","disableFocusInside","enableFocusInside","getNextTabbable","getPreviousTabbable","isOutsideEvent","FloatingPortalContext","usePortalContext","useFloatingPortalNode","ctx","portalNode","PORTAL_ATTR","portalAncestry","WeakMap","nearestPortalAncestryNode","start","el","node","get","parent","isInsideNestedPortal","target","ownElement","own","targetNode","autoRootRegistry","Map","isShadowRoot","value","ShadowRoot","resolveTarget","inner","document","found","querySelector","current","FloatingPortal","props","parentPortal","nonce","portalNodeRef","portalNodeSignal","setPortalNodeSignal","equals","setPortalNode","focusManagerState","setFocusManagerState","ownedWrite","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusInsideDisabledRef","resolveMount","explicit","root","container","resolved","body","undefined","autoCreatedId","id","existing","getElementById","has","registryEntry","refCount","div","createElement","nonceValue","setAttribute","appendChild","set","element","ownerDocument","entry","parentNode","removeChild","delete","ancestryNode","attachWrapper","modal","onFocus","event","relatedTarget","type","addEventListener","removeEventListener","open","shouldRenderGuards","renderGuards","state","contextValue","hiddenStyle","border","clip","height","margin","overflow","padding","position","width","focus","domReference","prevTabbable","wrapperProps","children","nextTabbable","closeOnFocusOut","onOpenChange"],"sources":["floating-portal.tsx"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\n/**\n * Stage 5 step 1 — Solid port of Base UI React's `FloatingPortal`\n * (`packages/react/src/floating-ui-react/components/FloatingPortal.tsx`).\n *\n * Responsibilities:\n *\n *  - Renders its `children` into a target element (by default `document.body`),\n *    via `@solidjs/web`'s `Portal`. The Solid wrap means we inherit\n *    framework-maintained Portal semantics (owner-tree scoping, hydration\n *    boundary, `<Portal>` unmount tear-down) for free.\n *\n *  - Exposes `FloatingPortalContext` (the React source calls the same context\n *    `PortalContext`) with `portalNode`, `setFocusManagerState`, and four\n *    sentinel refs (`beforeOutside`, `afterOutside`, `beforeInside`,\n *    `afterInside`). The `FloatingFocusManager` port (Stage 5 step 2) reads\n *    these to route tab traversal across the portal boundary.\n *\n *  - CSP-nonce aware. When a `<CSPProvider>` is present, the portal wrapper\n *    `<div data-quoin-portal>` and any injected sentinel `<span>`s carry\n *    the same `nonce=` attribute so strict-CSP consumers don't trip the\n *    browser's inline-element gate.\n *\n *  - Extended target resolution. The React source accepts an element, a ref,\n *    `null`, or nothing (→ `document.body`). The Solid port widens this to\n *    also accept a CSS selector string and a zero-argument function returning\n *    an element, matching the public `@floating-ui/react` `FloatingPortal`\n *    ergonomics.\n *\n *  - Optional auto-created shared root. When `id` is supplied and no element\n *    with that id already exists under the resolved container, the portal\n *    creates a `<div id=\"...\">` inside `document.body`. A module-level\n *    ref-count keeps the auto-created root alive while any `FloatingPortal`\n *    with the same `id` is mounted, and tears it down on last unmount.\n *    External nodes that already live in the DOM are never removed.\n *\n * Port notes / deviations from React:\n *\n *  - React's `useFloatingPortalNode` returns `{ portalNode, portalSubtree }`\n *    so the caller can render the subtree in its JSX tree. The Solid port\n *    collapses that into a single `<Portal>` + inner wrapper div — Solid's\n *    Portal mounts its children into the target DOM subtree already, so the\n *    two-hop dance (React portals the wrapper, then portals the children\n *    into the wrapper) isn't needed.\n *  - `useFloatingPortalNode` is exposed as a hook that returns an accessor\n *    for the current portal node. It reads from `FloatingPortalContext`, so\n *    it's only meaningful inside a mounted `FloatingPortal`.\n *  - The FocusGuard helper's Safari `role=\"button\"` dance is dropped — the\n *    Solid port doesn't ship `isSafari` under `detect-browser.ts` and the\n *    guards here are structurally `tabindex=0` visually-hidden spans. AT\n *    parity with Safari's VoiceOver can be restored when a shared Solid\n *    `FocusGuard` lands.\n *  - `focusInsideDisabledRef` / `enableFocusInside` / `disableFocusInside`\n *    wiring from the React source is preserved so focus traps can dock\n *    against the portal boundary.\n */\n\nimport { getParentNode, isElement, isNode } from \"@floating-ui/utils/dom\";\nimport { Portal } from \"@solidjs/web\";\nimport {\n\tcreateContext,\n\tcreateEffect,\n\tcreateSignal,\n\tuseContext,\n} from \"solid-js\";\nimport { useCspNonce } from \"../../../csp-provider/csp-context\";\nimport { createChangeEventDetails } from \"../../change-event-details\";\nimport { FocusGuard } from \"../../popups/focus-guard\";\nimport { useIsoLayoutEffect } from \"../../use-iso-layout-effect\";\nimport type { MutableRef } from \"../types\";\nimport { createAttribute } from \"../utils/create-attribute\";\nimport {\n\tdisableFocusInside,\n\tenableFocusInside,\n\tgetNextTabbable,\n\tgetPreviousTabbable,\n\tisOutsideEvent,\n} from \"../utils/tabbable\";\n\n/**\n * Upward-flowing state written by a `FloatingFocusManager` that is mounted\n * as a descendant of the portal. The portal uses this to decide whether to\n * render tab-guard sentinels and where to bounce focus on guard activation.\n */\nexport interface FloatingFocusManagerState {\n\tmodal: boolean;\n\topen: boolean;\n\tonOpenChange(\n\t\topen: boolean,\n\t\tdetails: {\n\t\t\treason?: string | undefined;\n\t\t\tevent?: Event | undefined;\n\t\t},\n\t): void;\n\tdomReference: Element | null;\n\tcloseOnFocusOut: boolean;\n}\n\n/**\n * Context value shared with descendants of `<FloatingPortal>`.\n */\nexport interface FloatingPortalContextValue {\n\t/**\n\t * The resolved portal wrapper `<div>`. `null` until the portal mounts.\n\t */\n\tportalNode: HTMLElement | null;\n\t/**\n\t * Setter for focus-manager state — called by the focus-trap descendant\n\t * to advertise its modal/open state up to the portal so guards can be\n\t * rendered appropriately.\n\t */\n\tsetFocusManagerState(state: FloatingFocusManagerState | null): void;\n\t/**\n\t * Ref to the outer-boundary `before` sentinel (the guard that sits\n\t * before the portal subtree in DOM order).\n\t */\n\tbeforeOutsideRef: MutableRef<HTMLSpanElement | null>;\n\t/**\n\t * Ref to the outer-boundary `after` sentinel (the guard that sits\n\t * after the portal subtree in DOM order).\n\t */\n\tafterOutsideRef: MutableRef<HTMLSpanElement | null>;\n\t/**\n\t * Ref to the inner-boundary `before` sentinel — focus-trap wires the\n\t * first tabbable of the floating element after this.\n\t */\n\tbeforeInsideRef: MutableRef<HTMLSpanElement | null>;\n\t/**\n\t * Ref to the inner-boundary `after` sentinel — focus-trap wires the\n\t * last tabbable of the floating element before this.\n\t */\n\tafterInsideRef: MutableRef<HTMLSpanElement | null>;\n\t/**\n\t * This portal's node in the logical portal ancestry chain (see\n\t * `isInsideNestedPortal`). Nested portals link to it as their parent.\n\t */\n\tancestryNode: PortalAncestryNode;\n}\n\nconst FloatingPortalContext = createContext<FloatingPortalContextValue | null>(\n\tnull,\n);\n\n/**\n * Read the nearest `FloatingPortalContext`. Returns `null` when used\n * outside a mounted `<FloatingPortal>`.\n */\nexport function usePortalContext(): FloatingPortalContextValue | null {\n\treturn useContext(FloatingPortalContext);\n}\n\n/**\n * Returns the resolved portal node (the wrapper `<div>`) of the nearest\n * `<FloatingPortal>`. Returns `null` when used outside a mounted portal or\n * before the portal has committed.\n */\nexport function useFloatingPortalNode(): () => HTMLElement | null {\n\tconst ctx = usePortalContext();\n\treturn () => ctx?.portalNode ?? null;\n}\n\nconst PORTAL_ATTR = createAttribute(\"portal\");\n\n/**\n * Logical portal ancestry — the Solid analogue of Base UI React's\n * `insideReactTree` latch. React marks presses via synthetic capture\n * handlers on the popup (`onClickCapture` etc. in `useDismiss`'s floating\n * bag), and those fire even for presses inside PORTALED descendants\n * because React portals propagate synthetic events through the component\n * tree. Solid events follow the DOM tree, so a press inside a nested\n * portaled popup (a Select popup inside a Dialog, say) never reaches the\n * dialog popup's handlers and would read as an outside press, dismissing\n * the ancestor overlay.\n *\n * Instead, every `<FloatingPortal>` records its logical parent portal —\n * the nearest portal in the COMPONENT tree, which context preserves even\n * across DOM portals — and stamps its wrapper element with that chain.\n * Dismissal hooks then ask \"is the press target inside a portal that is a\n * logical DESCENDANT of my own portal?\" (`isInsideNestedPortal`),\n * recovering the logical-tree walk Base UI gets from React for free.\n */\nexport interface PortalAncestryNode {\n\tparent: PortalAncestryNode | null;\n}\n\nconst portalAncestry = new WeakMap<Element, PortalAncestryNode>();\n\n/**\n * Walk up from `start` (crossing shadow boundaries) to the nearest\n * `<FloatingPortal>` wrapper and return its ancestry node, or `null` when\n * the element is not inside any quoin portal.\n */\nfunction nearestPortalAncestryNode(\n\tstart: Element | null,\n): PortalAncestryNode | null {\n\tlet el: Element | null = start;\n\twhile (el) {\n\t\tconst node = portalAncestry.get(el);\n\t\tif (node) {\n\t\t\treturn node;\n\t\t}\n\t\tconst parent = getParentNode(el);\n\t\tif (parent === el || !isElement(parent)) {\n\t\t\treturn null;\n\t\t}\n\t\tel = parent as Element;\n\t}\n\treturn null;\n}\n\n/**\n * Whether `target` sits inside a portal that is a logical (component-tree)\n * descendant of the portal hosting `ownElement`. Strict descendants only:\n * a press inside our own portal wrapper but not in a nested portal (e.g.\n * on the dialog's internal backdrop or viewport) is still an outside\n * press for the popup itself.\n */\nexport function isInsideNestedPortal(\n\ttarget: EventTarget | null,\n\townElement: Element | null,\n): boolean {\n\tif (!ownElement || !isElement(target)) {\n\t\treturn false;\n\t}\n\tconst own = nearestPortalAncestryNode(ownElement);\n\tif (!own) {\n\t\treturn false;\n\t}\n\tconst targetNode = nearestPortalAncestryNode(target as Element);\n\tif (!targetNode || targetNode === own) {\n\t\treturn false;\n\t}\n\tfor (let node = targetNode.parent; node; node = node.parent) {\n\t\tif (node === own) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Target the user can supply. Ports the React source's `container` shape\n * (element / ref / null / undefined) and adds:\n *\n *   - a CSS selector string (resolved via `document.querySelector`);\n *   - a zero-arg function returning any of the above.\n */\nexport type FloatingPortalTarget =\n\t| HTMLElement\n\t| ShadowRoot\n\t| string\n\t| MutableRef<HTMLElement | ShadowRoot | null>\n\t| (() => HTMLElement | ShadowRoot | string | null | undefined)\n\t| null\n\t| undefined;\n\n// Module-level ref-count for auto-created `id` roots. Keyed by id; value is\n// the count of `FloatingPortal` instances currently mounted that are using\n// an auto-created root with that id. The fourth tuple entry is the element\n// itself so we can tear it down when the count drops to zero.\nconst autoRootRegistry = new Map<\n\tstring,\n\t{ element: HTMLElement; refCount: number; ownerDocument: Document }\n>();\n\nfunction isShadowRoot(value: unknown): value is ShadowRoot {\n\treturn typeof ShadowRoot !== \"undefined\" && value instanceof ShadowRoot;\n}\n\nfunction resolveTarget(\n\ttarget: FloatingPortalTarget,\n): HTMLElement | ShadowRoot | null {\n\tif (target == null) {\n\t\treturn null;\n\t}\n\n\t// Function form — unwrap once, then re-resolve.\n\tif (typeof target === \"function\") {\n\t\tconst inner = target();\n\t\treturn resolveTarget(inner);\n\t}\n\n\tif (typeof target === \"string\") {\n\t\tif (typeof document === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst found = document.querySelector(target);\n\t\treturn (found as HTMLElement | null) ?? null;\n\t}\n\n\tif (isNode(target) || isShadowRoot(target)) {\n\t\treturn target as HTMLElement | ShadowRoot;\n\t}\n\n\t// Ref-like object with `current`.\n\tif (\"current\" in target) {\n\t\tconst current = target.current;\n\t\tif (current == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn current;\n\t}\n\n\treturn null;\n}\n\nexport interface FloatingPortalProps {\n\t/**\n\t * Portal children. Mounted into the resolved target element (by default\n\t * `document.body`).\n\t */\n\tchildren?: JSX.Element;\n\t/**\n\t * Parent element (or selector, ref, or thunk) to render the portal\n\t * wrapper into. Defaults to `document.body`. React's `container` name is\n\t * honored below as an alias.\n\t */\n\troot?: FloatingPortalTarget;\n\t/**\n\t * Alias for `root`, matching the Base UI React source's prop name.\n\t * If both are supplied, `root` takes precedence.\n\t */\n\tcontainer?: FloatingPortalTarget;\n\t/**\n\t * Optional id. If supplied, the portal wrapper is attached inside an\n\t * element with this id under the resolved root. If no such element\n\t * exists, one is auto-created (and ref-counted across instances — the\n\t * last unmount removes the auto-created root).\n\t */\n\tid?: string | undefined;\n\t/**\n\t * Override the automatic guard-rendering heuristic. When unset, guards\n\t * render whenever a non-modal focus-manager is mounted and open.\n\t */\n\trenderGuards?: boolean | undefined;\n\t/**\n\t * Extra attributes / style forwarded onto the portal wrapper `<div>`.\n\t */\n\twrapperProps?: JSX.HTMLAttributes<HTMLDivElement> | undefined;\n}\n\n/**\n * Portals the floating element into the body (or a supplied target),\n * carrying CSP nonce and focus-guard plumbing for strict-CSP consumers and\n * `FloatingFocusManager` tab traversal.\n *\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nexport function FloatingPortal(props: FloatingPortalProps): JSX.Element {\n\tconst parentPortal = usePortalContext();\n\tconst nonce = useCspNonce();\n\n\t// Mutable mirror of the portal node — reads in the context getter return\n\t// the latest value even before Solid 2's signal flush lands (same pattern\n\t// as the toast store). The signal exists to wake reactive\n\t// consumers (effects, memos) when the mount completes.\n\tconst portalNodeRef: MutableRef<HTMLElement | null> = { current: null };\n\tconst [portalNodeSignal, setPortalNodeSignal] =\n\t\tcreateSignal<HTMLElement | null>(null, { equals: false });\n\tconst setPortalNode = (node: HTMLElement | null) => {\n\t\tportalNodeRef.current = node;\n\t\tsetPortalNodeSignal(node);\n\t};\n\tconst portalNode = () => portalNodeSignal();\n\n\t// `ownedWrite: true` — `setFocusManagerState` is invoked from a descendant\n\t// `<FloatingFocusManager>`'s `useIsoLayoutEffect` (a `createRenderEffect`\n\t// apply function), which is owned scope. Under Solid 2's bundled runtime,\n\t// writing to a signal from owned scope during the initial insert of the\n\t// surrounding `<Portal>`'s children aborts the pending `insert()` — the\n\t// wrapper `<div>`'s ref callback fires but the rest of the subtree never\n\t// attaches to `document.body`. This is the root cause of an issue where\n\t// the portal looks like it's mounting (trigger flips\n\t// `data-popup-open`, `mounted()` is true, `<Show>` is true, FloatingPortal\n\t// body runs) but the portal subtree never materializes. Opting into\n\t// `ownedWrite` lets the descendant-effect write land without disturbing\n\t// the ongoing insert.\n\tconst [focusManagerState, setFocusManagerState] =\n\t\tcreateSignal<FloatingFocusManagerState | null>(null, { ownedWrite: true });\n\n\t// Sentinel refs — mutable slots so the focus-manager descendant can\n\t// read them without a reactive dependency.\n\tconst beforeOutsideRef: MutableRef<HTMLSpanElement | null> = {\n\t\tcurrent: null,\n\t};\n\tconst afterOutsideRef: MutableRef<HTMLSpanElement | null> = {\n\t\tcurrent: null,\n\t};\n\tconst beforeInsideRef: MutableRef<HTMLSpanElement | null> = {\n\t\tcurrent: null,\n\t};\n\tconst afterInsideRef: MutableRef<HTMLSpanElement | null> = {\n\t\tcurrent: null,\n\t};\n\n\tconst focusInsideDisabledRef: MutableRef<boolean> = { current: false };\n\n\t// Resolve mount target reactively — string selectors / thunks re-run on\n\t// each access, so if the prop value flips between renders we see it.\n\tconst resolveMount = (): Element | undefined => {\n\t\tconst explicit = props.root ?? props.container;\n\t\t// Walk up to the parent portal node if nothing explicit and a parent\n\t\t// portal is mounted — matches React's `parentPortalNode ?? body`.\n\t\tconst resolved =\n\t\t\tresolveTarget(explicit) ??\n\t\t\tparentPortal?.portalNode ??\n\t\t\t(typeof document !== \"undefined\" ? document.body : null);\n\n\t\tif (!resolved) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Solid's `<Portal>` accepts `Element`; when a ShadowRoot is handed\n\t\t// in we coerce via `.host`-less `as Element` cast because happy-dom\n\t\t// treats ShadowRoot as Element-alike.\n\t\treturn resolved as Element;\n\t};\n\n\t// If an `id` is supplied, find-or-create the shared root under the\n\t// resolved target, ref-counted so the last-unmount tears down the\n\t// auto-created node. Handled in a layout effect so the DOM work runs\n\t// before children mount into the wrapper.\n\tlet autoCreatedId: string | null = null;\n\tuseIsoLayoutEffect(\n\t\t() => undefined,\n\t\t() => {\n\t\t\tconst id = props.id;\n\t\t\tif (!id || typeof document === \"undefined\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst existing = document.getElementById(id);\n\t\t\tif (existing && !autoRootRegistry.has(id)) {\n\t\t\t\t// External node (not one we've auto-created). Leave it alone\n\t\t\t\t// on cleanup — first-creator-wins.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst registryEntry = autoRootRegistry.get(id);\n\t\t\tif (registryEntry) {\n\t\t\t\tregistryEntry.refCount += 1;\n\t\t\t\tautoCreatedId = id;\n\t\t\t} else {\n\t\t\t\tconst target = resolveMount();\n\t\t\t\tconst parent = (target as HTMLElement | undefined) ?? document.body;\n\t\t\t\tconst div = document.createElement(\"div\");\n\t\t\t\tdiv.id = id;\n\t\t\t\tconst nonceValue = nonce();\n\t\t\t\tif (nonceValue) {\n\t\t\t\t\tdiv.setAttribute(\"nonce\", nonceValue);\n\t\t\t\t}\n\t\t\t\tparent.appendChild(div);\n\t\t\t\tautoRootRegistry.set(id, {\n\t\t\t\t\telement: div,\n\t\t\t\t\trefCount: 1,\n\t\t\t\t\townerDocument: document,\n\t\t\t\t});\n\t\t\t\tautoCreatedId = id;\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tif (!autoCreatedId) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst entry = autoRootRegistry.get(autoCreatedId);\n\t\t\t\tif (!entry) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tentry.refCount -= 1;\n\t\t\t\tif (entry.refCount <= 0) {\n\t\t\t\t\tentry.element.parentNode?.removeChild(entry.element);\n\t\t\t\t\tautoRootRegistry.delete(autoCreatedId);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t);\n\n\t// Logical parent link for nested-portal dismissal checks. The parent is\n\t// resolved through context, so the chain follows the component tree even\n\t// though the wrapper DOM lands wherever `resolveMount()` points.\n\tconst ancestryNode: PortalAncestryNode = {\n\t\tparent: parentPortal?.ancestryNode ?? null,\n\t};\n\n\t// Ref callback for the portal wrapper `<div>`. Fires once the element\n\t// is attached to the DOM subtree inside the Solid `<Portal>`.\n\tconst attachWrapper = (element: HTMLDivElement) => {\n\t\tportalAncestry.set(element, ancestryNode);\n\t\tsetPortalNode(element);\n\t};\n\n\t// React's focusin/focusout capture — disable focus inside the portal\n\t// until it's actually entered via tabbing/mouse.\n\tcreateEffect(\n\t\t() => ({ node: portalNode(), modal: focusManagerState()?.modal }),\n\t\t({ node, modal }) => {\n\t\t\tif (!node || modal) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onFocus(event: FocusEvent) {\n\t\t\t\tif (node && event.relatedTarget && isOutsideEvent(event)) {\n\t\t\t\t\tif (event.type === \"focusin\") {\n\t\t\t\t\t\tif (focusInsideDisabledRef.current) {\n\t\t\t\t\t\t\tenableFocusInside(node);\n\t\t\t\t\t\t\tfocusInsideDisabledRef.current = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisableFocusInside(node);\n\t\t\t\t\t\tfocusInsideDisabledRef.current = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener(\"focusin\", onFocus, true);\n\t\t\tnode.addEventListener(\"focusout\", onFocus, true);\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener(\"focusin\", onFocus, true);\n\t\t\t\tnode.removeEventListener(\"focusout\", onFocus, true);\n\t\t\t};\n\t\t},\n\t);\n\n\t// Mirror React's `open === false` path: re-enable focus when the\n\t// managed surface closes.\n\tcreateEffect(\n\t\t() => ({ node: portalNode(), open: focusManagerState()?.open }),\n\t\t({ node, open }) => {\n\t\t\tif (!node || open !== false) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tenableFocusInside(node);\n\t\t\tfocusInsideDisabledRef.current = false;\n\t\t},\n\t);\n\n\tconst shouldRenderGuards = (): boolean => {\n\t\tif (typeof props.renderGuards === \"boolean\") {\n\t\t\treturn props.renderGuards;\n\t\t}\n\t\tconst state = focusManagerState();\n\t\treturn !!state && !state.modal && state.open && portalNode() !== null;\n\t};\n\n\tconst contextValue: FloatingPortalContextValue = {\n\t\t// Read through the mutable mirror so downstream consumers that peek\n\t\t// synchronously (e.g. `useFloatingPortalNode` called from a probe)\n\t\t// see the value as soon as the ref callback has fired, without\n\t\t// waiting for Solid 2's signal flush.\n\t\tget portalNode() {\n\t\t\treturn portalNodeRef.current;\n\t\t},\n\t\tsetFocusManagerState: (state) => setFocusManagerState(state),\n\t\tbeforeOutsideRef,\n\t\tafterOutsideRef,\n\t\tbeforeInsideRef,\n\t\tafterInsideRef,\n\t\tancestryNode,\n\t};\n\n\t// Apply nonce to injected visually-hidden sentinel spans. Kept as an\n\t// inline style literal (Solid spreads JSX.CSSProperties) — matches\n\t// React's `ownerVisuallyHidden` import. The focus-guard sentinels\n\t// themselves now come from the shared `FocusGuard` module (which\n\t// uses `VISUALLY_HIDDEN_STYLE` internally); only the non-guard\n\t// `aria-owns` span below uses this inline literal.\n\tconst hiddenStyle: JSX.CSSProperties = {\n\t\tborder: 0,\n\t\tclip: \"rect(0 0 0 0)\",\n\t\theight: \"1px\",\n\t\tmargin: \"-1px\",\n\t\toverflow: \"hidden\",\n\t\tpadding: 0,\n\t\tposition: \"absolute\",\n\t\t\"white-space\": \"nowrap\",\n\t\twidth: \"1px\",\n\t};\n\n\treturn (\n\t\t<Portal mount={resolveMount()}>\n\t\t\t<FloatingPortalContext value={contextValue}>\n\t\t\t\t{shouldRenderGuards() ? (\n\t\t\t\t\t<FocusGuard\n\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\tbeforeOutsideRef.current = el;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdata-type=\"outside\"\n\t\t\t\t\t\tnonce={nonce()}\n\t\t\t\t\t\tonFocus={(event) => {\n\t\t\t\t\t\t\tconst node = portalNode();\n\t\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isOutsideEvent(event, node)) {\n\t\t\t\t\t\t\t\tbeforeInsideRef.current?.focus();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst state = focusManagerState();\n\t\t\t\t\t\t\t\tconst domReference = state ? state.domReference : null;\n\t\t\t\t\t\t\t\tconst prevTabbable = getPreviousTabbable(domReference);\n\t\t\t\t\t\t\t\tprevTabbable?.focus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t{shouldRenderGuards() && portalNode() ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-owns={portalNode()?.id}\n\t\t\t\t\t\tstyle={hiddenStyle}\n\t\t\t\t\t\tnonce={nonce()}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tref={attachWrapper}\n\t\t\t\t\tid={props.id}\n\t\t\t\t\t{...{ [PORTAL_ATTR]: \"\" }}\n\t\t\t\t\tnonce={nonce()}\n\t\t\t\t\t{...(props.wrapperProps ?? {})}\n\t\t\t\t>\n\t\t\t\t\t{props.children}\n\t\t\t\t</div>\n\t\t\t\t{shouldRenderGuards() ? (\n\t\t\t\t\t<FocusGuard\n\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\tafterOutsideRef.current = el;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdata-type=\"outside\"\n\t\t\t\t\t\tnonce={nonce()}\n\t\t\t\t\t\tonFocus={(event) => {\n\t\t\t\t\t\t\tconst node = portalNode();\n\t\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isOutsideEvent(event, node)) {\n\t\t\t\t\t\t\t\tafterInsideRef.current?.focus();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst state = focusManagerState();\n\t\t\t\t\t\t\t\tconst domReference = state ? state.domReference : null;\n\t\t\t\t\t\t\t\tconst nextTabbable = getNextTabbable(domReference);\n\t\t\t\t\t\t\t\tnextTabbable?.focus();\n\n\t\t\t\t\t\t\t\tif (state?.closeOnFocusOut) {\n\t\t\t\t\t\t\t\t\tstate.onOpenChange(\n\t\t\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\t\t\tcreateChangeEventDetails(\"focus-out\", event),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</FloatingPortalContext>\n\t\t</Portal>\n\t);\n}\n\nexport { FloatingPortalContext };\n"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,MAAM,QAAQ,wBAAwB;AACzE,SAASC,MAAM,QAAQ,cAAc;AACrC,SACCC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,UAAU,QACJ,UAAU;AACjB,SAASC,WAAW,QAAQ,mCAAmC;AAC/D,SAASC,wBAAwB,QAAQ,4BAA4B;AACrE,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SACCC,kBAAkB,EAClBC,iBAAiB,EACjBC,eAAe,EACfC,mBAAmB,EACnBC,cAAc,QACR,mBAAmB;;AAE1B;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;;AAuCA,MAAMC,qBAAqB,GAAGd,aAAa,CAC1C,IACD,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASe,gBAAgBA,CAAA,EAAsC;EACrE,OAAOZ,UAAU,CAACW,qBAAqB,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,qBAAqBA,CAAA,EAA6B;EACjE,MAAMC,GAAG,GAAGF,gBAAgB,CAAC,CAAC;EAC9B,OAAO,MAAME,GAAG,EAAEC,UAAU,IAAI,IAAI;AACrC;AAEA,MAAMC,WAAW,GAAGX,eAAe,CAAC,Q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