{"version":3,"names":["dynamic","createMemo","createSignal","Show","untrack","useCspNonce","useDirection","useBaseUiId","composeRefs","userRef","useCompositeListItem","ownerWindow","useFieldRootContext","isHydrating","useAriaLabelledBy","useLabelableId","mergePropsN","mergeRootProps","resolveClassStyle","clamp","getMidpoint","getSliderValue","getDecimalPrecision","roundValueToStep","useIsoLayoutEffect","valueToPercent","VISUALLY_HIDDEN_STYLE","useSliderRootContext","sliderDataAttrs","sliderPrehydrationScript","ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","HOME","END","PAGE_UP","PAGE_DOWN","HANDLED_KEYS","Set","COMPOSITE_KEYS","formatNumber","value","locale","format","String","Intl","NumberFormat","getDefaultAriaValueText","values","index","undefined","length","getNewValue","thumbValue","increment","direction","min","max","next","precision","Math","Number","toFixed","SliderThumb","props","context","field","nonce","id","disabled","range","defaultInputId","labelableInputId","inputId","metadata","ref","listItemRef","compositeIndex","i","thumbValuePercent","ariaLabel","getAriaLabel","raw","externalAriaLabelledBy","v","composedLabelledBy","thumbRef","current","inputRef","thumbElement","setThumbElement","ownedWrite","positionPercent","setPositionPercent","isLastThumb","getInsetPosition","control","controlRef","thumb","thumbRect","getBoundingClientRect","controlRect","vertical","orientation","side","controlSize","thumbOffsetFromControlEdge","nextPositionPercent","nextInsetPosition","isFinite","setIndicatorPosition","prev","inset","el","queueMicrotask","thumbEl","controlEl","win","ROConstructor","ResizeObserver","observer","observe","disconnect","handleKeyDown","event","has","key","stopPropagation","input","currentTarget","newValue","step","largeStep","minSteps","minStepsBetweenValues","rtl","sliderValues","roundedValue","shiftKey","neighbor","handleInputChange","preventDefault","focus","preventScroll","valueAsNumber","handlePointerDown","pressedThumbIndexRef","midpoint","offset","clientY","y","clientX","x","pressedThumbCenterOffsetRef","pressedInputRef","getThumbStyle","startEdge","crossOffsetProperty","percent","activeIndex","active","isRange","last","lastUsedThumbIndex","isInset","zIndex","position","translate","pos","renderBH","renderBeforeHydration","visibility","onInputFocus","setActive","setFocused","onFocus","onInputBlur","setTouched","validationMode","commitValidation","onBlur","forwardedProps","out","Object","keys","desc","getOwnPropertyDescriptor","defineProperty","cssWritingMode","renderHiddenInput","inputStyle","width","height","inputRefCallback","validation","externalDescribedBy","valueTextAccessor","gt","getAriaValueText","formatOptions","labelledBy","validationInputProps","getInputValidationProps","onValidationInput","onInput","handleInput","composedDescribedBy","ariaInvalid","form","name","tabIndex","localRef","internalSlot","data-index","style","onPointerDown","children","showScript","userClassStyle","state","merged","Tag","as"],"sources":["slider-thumb.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\nimport { dynamic } from \"@solidjs/web\";\nimport { createMemo, createSignal, Show, untrack } from \"solid-js\";\nimport { useCspNonce } from \"../../csp-provider/csp-context.ts\";\nimport { useDirection } from \"../../direction-provider/direction-provider-context.ts\";\nimport { useBaseUiId } from \"../../internals/base-ui-id\";\nimport { composeRefs, userRef } from \"../../internals/compose-refs\";\nimport { useCompositeListItem } from \"../../internals/composite/composite-list.tsx\";\nimport { ownerWindow } from \"../../internals/dom/owner-window.ts\";\nimport { useFieldRootContext } from \"../../internals/field-context\";\nimport { isHydrating } from \"../../internals/is-hydrating.ts\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/use-aria-labelled-by.ts\";\nimport { useLabelableId } from \"../../internals/labelable-provider/use-labelable-id.ts\";\nimport { mergePropsN } from \"../../internals/merge-props-n.ts\";\nimport { mergeRootProps } from \"../../internals/merge-root-props\";\nimport { resolveClassStyle } from \"../../internals/resolve-class-style\";\nimport { clamp } from \"../../internals/slider-utils/clamp.ts\";\nimport { getMidpoint } from \"../../internals/slider-utils/get-midpoint.ts\";\nimport { getSliderValue } from \"../../internals/slider-utils/get-slider-value.ts\";\nimport {\n\tgetDecimalPrecision,\n\troundValueToStep,\n} from \"../../internals/slider-utils/round-value-to-step.ts\";\nimport type { BaseUIComponentProps } from \"../../internals/types\";\nimport { useIsoLayoutEffect } from \"../../internals/use-iso-layout-effect.ts\";\nimport { valueToPercent } from \"../../internals/value-to-percent\";\nimport { VISUALLY_HIDDEN_STYLE } from \"../../internals/visually-hidden-style\";\nimport {\n\ttype SliderRootState,\n\ttype ThumbMetadata,\n\tuseSliderRootContext,\n} from \"../slider-root-context.ts\";\nimport { sliderDataAttrs } from \"../utils/state-attrs.ts\";\nimport { sliderPrehydrationScript } from \"./prehydration-script.ts\";\n\nconst ARROW_UP = \"ArrowUp\";\nconst ARROW_DOWN = \"ArrowDown\";\nconst ARROW_LEFT = \"ArrowLeft\";\nconst ARROW_RIGHT = \"ArrowRight\";\nconst HOME = \"Home\";\nconst END = \"End\";\nconst PAGE_UP = \"PageUp\";\nconst PAGE_DOWN = \"PageDown\";\n\nconst HANDLED_KEYS = new Set<string>([\n\tARROW_UP,\n\tARROW_DOWN,\n\tARROW_LEFT,\n\tARROW_RIGHT,\n\tHOME,\n\tEND,\n\tPAGE_UP,\n\tPAGE_DOWN,\n]);\n\n// Keys that Base UI's composite primitives also consume (arrows / Home / End).\n// React stops propagation for these so a parent `Menu`/`Listbox`/composite\n// doesn't double-handle a slider's own keyboard event. Mirrors\n// `@base-ui/react`'s `COMPOSITE_KEYS` constant.\nconst COMPOSITE_KEYS = new Set<string>([\n\tARROW_UP,\n\tARROW_DOWN,\n\tARROW_LEFT,\n\tARROW_RIGHT,\n\tHOME,\n\tEND,\n]);\n\nexport interface SliderThumbState extends SliderRootState {}\n\nexport interface SliderThumbProps\n\textends Omit<\n\t\tBaseUIComponentProps<\"div\", SliderThumbState>,\n\t\t\"onBlur\" | \"onFocus\"\n\t> {\n\t/** Tag/component to render. Defaults to `\"div\"`. */\n\tas?: ValidComponent;\n\tdisabled?: boolean | undefined;\n\tgetAriaLabel?: ((index: number) => string) | null | undefined;\n\tgetAriaValueText?:\n\t\t| ((formattedValue: string, value: number, index: number) => string)\n\t\t| null\n\t\t| undefined;\n\t/** Explicit index override for range sliders. */\n\tindex?: number | undefined;\n\tinputRef?: ((element: HTMLInputElement | null) => void) | undefined;\n\tonBlur?: ((event: FocusEvent) => void) | undefined;\n\tonFocus?: ((event: FocusEvent) => void) | undefined;\n\ttabIndex?: number | undefined;\n}\n\nfunction formatNumber(\n\tvalue: number,\n\tlocale: Intl.LocalesArgument | undefined,\n\tformat: Intl.NumberFormatOptions | undefined,\n): string {\n\tif (!format) return String(value);\n\ttry {\n\t\treturn new Intl.NumberFormat(locale, format).format(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n\nfunction getDefaultAriaValueText(\n\tvalues: readonly number[],\n\tindex: number,\n\tformat: Intl.NumberFormatOptions | undefined,\n\tlocale: Intl.LocalesArgument | undefined,\n): string | undefined {\n\tif (index < 0) return undefined;\n\tif (values.length === 2) {\n\t\tif (index === 0) {\n\t\t\treturn `${formatNumber(values[index] ?? 0, locale, format)} start range`;\n\t\t}\n\t\treturn `${formatNumber(values[index] ?? 0, locale, format)} end range`;\n\t}\n\treturn format ? formatNumber(values[index] ?? 0, locale, format) : undefined;\n}\n\nfunction getNewValue(\n\tthumbValue: number,\n\tincrement: number,\n\tdirection: 1 | -1,\n\tmin: number,\n\tmax: number,\n): number {\n\tconst next =\n\t\tdirection === 1 ? thumbValue + increment : thumbValue - increment;\n\tconst precision = Math.max(\n\t\tgetDecimalPrecision(thumbValue),\n\t\tgetDecimalPrecision(increment),\n\t\tgetDecimalPrecision(min),\n\t);\n\treturn clamp(Number(next.toFixed(precision)), min, max);\n}\n\n/**\n * The draggable part of the slider at the tip of the indicator. Renders a\n * `<div>` with a nested `<input type=\"range\">` for form participation and\n * keyboard navigation.\n *\n * Keyboard contract (matches React Base UI):\n *\n *   - Arrow keys: ±step (or ±largeStep with Shift). Horizontal arrows honor\n *     RTL via the direction context.\n *   - Page Up / Page Down: ±largeStep.\n *   - Home / End: jumps to the range edge (or the adjacent thumb's value +/-\n *     `step * minStepsBetweenValues` in range mode).\n *\n * Solid 2 notes:\n *\n *   - `index` is resolved through `useCompositeListItem` when the consumer\n *     doesn't pass `index` explicitly — matches React's \"auto-index\" branch.\n *   - `aria-labelledby` is seeded with `\"\"` so Solid 2's DOM spread keeps the\n *     key in `ownKeys` (see `test/internals/merge-props-undefined-attr.test.tsx`).\n *   - The input ref is exposed through `props.inputRef` — consumers compose\n *     with Solid's native array refs on the outer thumb via `ref`.\n */\nexport function SliderThumb(props: SliderThumbProps): JSX.Element {\n\tconst context = useSliderRootContext();\n\tconst field = useFieldRootContext();\n\tconst direction = useDirection();\n\tconst nonce = useCspNonce();\n\n\tconst id = useBaseUiId(\n\t\tuntrack(() => (typeof props.id === \"string\" ? props.id : undefined)),\n\t);\n\n\tconst disabled = (): boolean => context.disabled() || props.disabled === true;\n\tconst range = (): boolean => context.values().length > 1;\n\n\tconst defaultInputId = useBaseUiId();\n\tconst { id: labelableInputId } = useLabelableId();\n\tconst inputId = (): string => (range() ? defaultInputId : labelableInputId);\n\n\tconst metadata = createMemo<ThumbMetadata>(() => ({\n\t\tinputId: inputId(),\n\t}));\n\n\t// `useCompositeListItem` reads its metadata input once at body time to\n\t// register with the parent list — wrap in `untrack` so the snapshot\n\t// read of `metadata()` (and the cascading `inputId()` / `range()` /\n\t// `context.values()` reads behind it) doesn't trip Solid 2's component\n\t// strict-read shell. Reactivity flows through the registry callbacks.\n\tconst { ref: listItemRef, index: compositeIndex } = untrack(() =>\n\t\tuseCompositeListItem<ThumbMetadata>({\n\t\t\tmetadata: metadata(),\n\t\t}),\n\t);\n\n\tconst index = (): number => {\n\t\tif (!range()) return 0;\n\t\tif (typeof props.index === \"number\") return props.index;\n\t\treturn compositeIndex();\n\t};\n\n\tconst thumbValue = (): number => {\n\t\tconst values = context.values();\n\t\tconst i = index();\n\t\treturn values[i] ?? 0;\n\t};\n\n\tconst thumbValuePercent = (): number =>\n\t\tvalueToPercent(thumbValue(), context.min(), context.max());\n\n\t// The composed `aria-labelledby` for the hidden input. Prefers an explicit\n\t// `aria-label` on the thumb, falling back to ids registered via the\n\t// labelable provider above.\n\tconst ariaLabel = (): string | undefined => {\n\t\tconst getAriaLabel = props.getAriaLabel;\n\t\tif (typeof getAriaLabel === \"function\") return getAriaLabel(index());\n\t\tconst raw = (props as { \"aria-label\"?: string | undefined })[\"aria-label\"];\n\t\treturn typeof raw === \"string\" ? raw : undefined;\n\t};\n\n\tconst externalAriaLabelledBy = (): string | undefined => {\n\t\tconst v = (props as { \"aria-labelledby\"?: string | undefined })[\n\t\t\t\"aria-labelledby\"\n\t\t];\n\t\treturn typeof v === \"string\" && v.length > 0 ? v : undefined;\n\t};\n\n\t// Hook seeds its initial state from the argument at body time; wrap\n\t// in `untrack` to keep that snapshot out of the strict-read shell.\n\tconst composedLabelledBy = untrack(() =>\n\t\tuseAriaLabelledBy(externalAriaLabelledBy),\n\t);\n\n\tconst thumbRef: { current: HTMLElement | null } = { current: null };\n\tconst inputRef: { current: HTMLInputElement | null } = { current: null };\n\t// Element-valued signal driving the ResizeObserver effect below. The\n\t// render ref callback mirrors into both `thumbRef.current` (for\n\t// synchronous reads in handlers) and this signal (for effect re-runs).\n\tconst [thumbElement, setThumbElement] = createSignal<HTMLElement | null>(\n\t\tnull,\n\t\t{ ownedWrite: true },\n\t);\n\n\t// Edge-alignment geometry (React `SliderThumb.tsx:196-223`). Written by\n\t// the ResizeObserver callback and consumed by the thumb's style getter;\n\t// `undefined` until the first measurement lands or when `inset` is off.\n\t// This signal lives outside Solid's reactive graph on the measurement\n\t// side — the ResizeObserver callback is the only writer — so we expose\n\t// only the accessor to consumers.\n\tconst [positionPercent, setPositionPercent] = createSignal<\n\t\tnumber | undefined\n\t>(undefined, { ownedWrite: true });\n\n\tconst isLastThumb = (): boolean => index() === context.values().length - 1;\n\n\tfunction getInsetPosition(): void {\n\t\t// `untrack` so reads of `context.orientation()` / `thumbValuePercent()`\n\t\t// / `index()` / `isLastThumb()` don't trip `[STRICT_READ_UNTRACKED]`\n\t\t// when this is called from inside an effect's apply callback. The\n\t\t// reads here are snapshots driving DOM math + setIndicatorPosition;\n\t\t// re-runs are scheduled by the effects that own this function and by\n\t\t// the ResizeObserver wired up below.\n\t\tuntrack(() => {\n\t\t\tconst control = context.controlRef.current;\n\t\t\tconst thumb = thumbRef.current;\n\t\t\tif (!control || !thumb) return;\n\n\t\t\tconst thumbRect = thumb.getBoundingClientRect();\n\t\t\tconst controlRect = control.getBoundingClientRect();\n\t\t\tconst vertical = context.orientation() === \"vertical\";\n\t\t\tconst side = vertical ? \"height\" : \"width\";\n\n\t\t\t// Usable travel = control side minus one thumb side (thumb is\n\t\t\t// inset by half its size at each endpoint, so its *edge* lands on\n\t\t\t// the control edge at min/max).\n\t\t\tconst controlSize = controlRect[side] - thumbRect[side];\n\t\t\tconst thumbOffsetFromControlEdge =\n\t\t\t\tthumbRect[side] / 2 + (controlSize * thumbValuePercent()) / 100;\n\t\t\tconst nextPositionPercent =\n\t\t\t\t(thumbOffsetFromControlEdge / controlRect[side]) * 100;\n\t\t\tconst nextInsetPosition = Number.isFinite(nextPositionPercent)\n\t\t\t\t? nextPositionPercent\n\t\t\t\t: undefined;\n\n\t\t\tsetPositionPercent(nextInsetPosition);\n\n\t\t\tconst i = index();\n\t\t\tif (i === 0) {\n\t\t\t\tcontext.setIndicatorPosition((prev) => [nextInsetPosition, prev[1]]);\n\t\t\t}\n\t\t\tif (isLastThumb()) {\n\t\t\t\tcontext.setIndicatorPosition((prev) => [prev[0], nextInsetPosition]);\n\t\t\t}\n\t\t});\n\t}\n\n\t// Initial measurement on mount. Queueing via microtask matches React's\n\t// `queueMicrotask` — lets the thumb + control settle in the DOM before\n\t// we read their rects.\n\tuseIsoLayoutEffect(\n\t\t() => [context.inset(), thumbElement()] as const,\n\t\t([inset, el]) => {\n\t\t\tif (!inset || !el) return undefined;\n\t\t\tqueueMicrotask(getInsetPosition);\n\t\t\treturn undefined;\n\t\t},\n\t);\n\n\t// Re-measure whenever the thumb's value percent changes. Size is\n\t// stable but its target position isn't.\n\tuseIsoLayoutEffect(\n\t\t() => [context.inset(), thumbValuePercent(), thumbElement()] as const,\n\t\t([inset, , el]) => {\n\t\t\tif (!inset || !el) return undefined;\n\t\t\tgetInsetPosition();\n\t\t\treturn undefined;\n\t\t},\n\t);\n\n\t// Two ResizeObservers (thumb + control) re-run the geometry whenever\n\t// either element resizes. Matches React's `SliderThumb.tsx:237-257`.\n\t// `ownerWindow` grabs the correct ResizeObserver constructor for\n\t// shadow-DOM / iframe hosts — don't reach for the global directly.\n\tuseIsoLayoutEffect(\n\t\t() => [context.inset(), thumbElement()] as const,\n\t\t([inset, thumbEl]) => {\n\t\t\tconst controlEl = context.controlRef.current;\n\t\t\tif (!inset || !thumbEl || !controlEl) return undefined;\n\n\t\t\tconst win = ownerWindow(thumbEl) as Window & {\n\t\t\t\tResizeObserver?: typeof ResizeObserver;\n\t\t\t};\n\t\t\tconst ROConstructor = win.ResizeObserver;\n\t\t\tif (typeof ROConstructor !== \"function\") return undefined;\n\n\t\t\tconst observer = new ROConstructor(() => {\n\t\t\t\tgetInsetPosition();\n\t\t\t});\n\t\t\tobserver.observe(thumbEl);\n\t\t\tobserver.observe(controlEl);\n\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t},\n\t);\n\n\tfunction handleKeyDown(event: KeyboardEvent): void {\n\t\tif (!HANDLED_KEYS.has(event.key)) return;\n\t\t// Matches React `SliderThumb.tsx:383-385`: stop the event from bubbling\n\t\t// to a surrounding `Menu`/composite so the same arrow key doesn't also\n\t\t// drive the outer focus ring.\n\t\tif (COMPOSITE_KEYS.has(event.key)) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\n\t\tconst input = event.currentTarget as HTMLInputElement;\n\t\tlet newValue: number | null = null;\n\t\tconst min = context.min();\n\t\tconst max = context.max();\n\t\tconst step = context.step();\n\t\tconst largeStep = context.largeStep();\n\t\tconst minSteps = context.minStepsBetweenValues();\n\t\tconst rtl = direction() === \"rtl\";\n\t\tconst i = index();\n\t\tconst sliderValues = context.values();\n\t\tconst roundedValue = roundValueToStep(thumbValue(), step, min);\n\t\tconst increment = event.shiftKey ? largeStep : step;\n\n\t\tswitch (event.key) {\n\t\t\tcase ARROW_UP:\n\t\t\t\tnewValue = getNewValue(roundedValue, increment, 1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase ARROW_RIGHT:\n\t\t\t\tnewValue = getNewValue(roundedValue, increment, rtl ? -1 : 1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase ARROW_DOWN:\n\t\t\t\tnewValue = getNewValue(roundedValue, increment, -1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase ARROW_LEFT:\n\t\t\t\tnewValue = getNewValue(roundedValue, increment, rtl ? 1 : -1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase PAGE_UP:\n\t\t\t\tnewValue = getNewValue(roundedValue, largeStep, 1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase PAGE_DOWN:\n\t\t\t\tnewValue = getNewValue(roundedValue, largeStep, -1, min, max);\n\t\t\t\tbreak;\n\t\t\tcase END: {\n\t\t\t\tconst neighbor = sliderValues[i + 1];\n\t\t\t\tnewValue =\n\t\t\t\t\trange() && Number.isFinite(neighbor)\n\t\t\t\t\t\t? (neighbor as number) - step * minSteps\n\t\t\t\t\t\t: max;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HOME: {\n\t\t\t\tconst neighbor = sliderValues[i - 1];\n\t\t\t\tnewValue =\n\t\t\t\t\trange() && Number.isFinite(neighbor)\n\t\t\t\t\t\t? (neighbor as number) + step * minSteps\n\t\t\t\t\t\t: min;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (newValue !== null) {\n\t\t\tcontext.handleInputChange(newValue, i, event);\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tinput.focus({ preventScroll: true });\n\t}\n\n\tfunction handleInputChange(\n\t\tevent: Event & { currentTarget: HTMLInputElement },\n\t): void {\n\t\tcontext.handleInputChange(\n\t\t\tevent.currentTarget.valueAsNumber,\n\t\t\tindex(),\n\t\t\tevent,\n\t\t);\n\t}\n\n\tfunction handlePointerDown(event: PointerEvent): void {\n\t\tconst i = index();\n\t\tcontext.pressedThumbIndexRef.current = i;\n\n\t\tconst thumbEl = thumbRef.current;\n\t\tif (thumbEl != null) {\n\t\t\tconst vertical = context.orientation() === \"vertical\";\n\t\t\tconst midpoint = getMidpoint(thumbEl as HTMLElement);\n\t\t\tconst offset = vertical\n\t\t\t\t? event.clientY - midpoint.y\n\t\t\t\t: event.clientX - midpoint.x;\n\t\t\tcontext.pressedThumbCenterOffsetRef.current = offset;\n\t\t}\n\n\t\tif (\n\t\t\tinputRef.current != null &&\n\t\t\tcontext.pressedInputRef.current !== inputRef.current\n\t\t) {\n\t\t\tcontext.pressedInputRef.current = inputRef.current;\n\t\t}\n\t}\n\n\tfunction getThumbStyle(): JSX.CSSProperties {\n\t\tconst vertical = context.orientation() === \"vertical\";\n\t\tconst rtl = direction() === \"rtl\";\n\t\tconst startEdge = vertical ? \"bottom\" : \"inset-inline-start\";\n\t\tconst crossOffsetProperty = vertical ? \"left\" : \"top\";\n\t\tconst percent = thumbValuePercent();\n\t\tconst activeIndex = context.active();\n\t\tconst i = index();\n\t\tconst isRange = range();\n\t\tconst last = context.lastUsedThumbIndex();\n\t\tconst isInset = context.inset();\n\n\t\tlet zIndex: number | undefined;\n\t\tif (isRange) {\n\t\t\tif (activeIndex === i) zIndex = 2;\n\t\t\telse if (last === i) zIndex = 1;\n\t\t} else if (activeIndex === i) {\n\t\t\tzIndex = 1;\n\t\t}\n\n\t\tif (!isInset) {\n\t\t\tif (!Number.isFinite(percent)) {\n\t\t\t\treturn { ...VISUALLY_HIDDEN_STYLE } as JSX.CSSProperties;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tposition: \"absolute\",\n\t\t\t\t[startEdge]: `${percent}%`,\n\t\t\t\t[crossOffsetProperty]: \"50%\",\n\t\t\t\ttranslate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,\n\t\t\t\t\"z-index\": zIndex,\n\t\t\t};\n\t\t}\n\n\t\t// Edge mode: position the thumb from the measured `positionPercent`\n\t\t// via a CSS custom property so the prehydration script (see SSR\n\t\t// deferral below) can overwrite it before hydration without\n\t\t// touching inline styles directly. Hide the thumb until the first\n\t\t// measurement lands or until hydration completes — prevents a\n\t\t// one-frame flash at a wrong position.\n\t\tconst pos = positionPercent();\n\t\tconst renderBH = context.renderBeforeHydration();\n\t\treturn {\n\t\t\t\"--position\": `${pos ?? 0}%`,\n\t\t\tvisibility:\n\t\t\t\t(renderBH && isHydrating()) || pos === undefined ? \"hidden\" : undefined,\n\t\t\tposition: \"absolute\",\n\t\t\t[startEdge]: \"var(--position)\",\n\t\t\t[crossOffsetProperty]: \"50%\",\n\t\t\ttranslate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,\n\t\t\t\"z-index\": zIndex,\n\t\t};\n\t}\n\n\tconst onInputFocus = (event: FocusEvent): void => {\n\t\tcontext.setActive(index());\n\t\tfield.setFocused(true);\n\t\tprops.onFocus?.(event);\n\t};\n\n\tconst onInputBlur = (event: FocusEvent): void => {\n\t\tif (thumbRef.current == null) return;\n\t\tcontext.setActive(-1);\n\t\t// Matches React `SliderThumb.tsx:371-378`: on blur, flip the field\n\t\t// `touched` + `focused` latches and, when validationMode is \"onBlur\",\n\t\t// commit the thumb's current value into the validation pipeline.\n\t\tfield.setTouched(true);\n\t\tfield.setFocused(false);\n\t\tif (field.validationMode() === \"onBlur\") {\n\t\t\tconst i = index();\n\t\t\tvoid context.commitValidation(\n\t\t\t\tgetSliderValue(\n\t\t\t\t\tthumbValue(),\n\t\t\t\t\ti,\n\t\t\t\t\tcontext.min(),\n\t\t\t\t\tcontext.max(),\n\t\t\t\t\trange(),\n\t\t\t\t\tcontext.values(),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tprops.onBlur?.(event);\n\t};\n\n\tconst forwardedProps = (): Record<string, unknown> => {\n\t\t// Strip the props we redirect onto the <input>. Keep `id` off the\n\t\t// forwarded set — we emit it explicitly on the root wrapper.\n\t\tconst out: Record<string, unknown> = {};\n\t\tfor (const key of Object.keys(props)) {\n\t\t\tif (\n\t\t\t\tkey === \"as\" ||\n\t\t\t\tkey === \"disabled\" ||\n\t\t\t\tkey === \"getAriaLabel\" ||\n\t\t\t\tkey === \"getAriaValueText\" ||\n\t\t\t\tkey === \"index\" ||\n\t\t\t\tkey === \"inputRef\" ||\n\t\t\t\tkey === \"tabIndex\" ||\n\t\t\t\tkey === \"onBlur\" ||\n\t\t\t\tkey === \"onFocus\" ||\n\t\t\t\tkey === \"id\" ||\n\t\t\t\tkey === \"class\" ||\n\t\t\t\tkey === \"style\" ||\n\t\t\t\tkey === \"attrs\" ||\n\t\t\t\tkey === \"aria-label\" ||\n\t\t\t\tkey === \"aria-labelledby\" ||\n\t\t\t\tkey === \"aria-describedby\"\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(props, key);\n\t\t\tif (desc) Object.defineProperty(out, key, desc);\n\t\t}\n\t\treturn out;\n\t};\n\n\tconst cssWritingMode = (): JSX.CSSProperties[\"writing-mode\"] => {\n\t\tif (context.orientation() !== \"vertical\") return undefined;\n\t\treturn direction() === \"rtl\" ? \"vertical-rl\" : \"vertical-lr\";\n\t};\n\n\tfunction renderHiddenInput(): JSX.Element {\n\t\tconst inputStyle = (): JSX.CSSProperties => ({\n\t\t\t...(VISUALLY_HIDDEN_STYLE as JSX.CSSProperties),\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\t\"writing-mode\": cssWritingMode(),\n\t\t});\n\t\tconst inputRefCallback = (el: HTMLInputElement | null): void => {\n\t\t\tinputRef.current = el;\n\t\t\t// Bridge to the field validation inputRef so native validation\n\t\t\t// (e.g. `element.validity`) flows through `useFieldValidation`.\n\t\t\tfield.validation.inputRef.current = el;\n\t\t\tprops.inputRef?.(el);\n\t\t};\n\t\tconst externalDescribedBy = (\n\t\t\tprops as {\n\t\t\t\t\"aria-describedby\"?: string | undefined;\n\t\t\t}\n\t\t)[\"aria-describedby\"];\n\t\tconst valueTextAccessor = (): string | undefined => {\n\t\t\tconst gt = props.getAriaValueText;\n\t\t\tif (typeof gt === \"function\") {\n\t\t\t\treturn gt(\n\t\t\t\t\tformatNumber(thumbValue(), context.locale(), context.formatOptions()),\n\t\t\t\t\tthumbValue(),\n\t\t\t\t\tindex(),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn getDefaultAriaValueText(\n\t\t\t\tcontext.values(),\n\t\t\t\tindex(),\n\t\t\t\tcontext.formatOptions(),\n\t\t\t\tcontext.locale(),\n\t\t\t);\n\t\t};\n\t\tconst labelledBy = (): string =>\n\t\t\tariaLabel() != null ? \"\" : (composedLabelledBy() ?? \"\");\n\n\t\t// Pull the field's input-validation props and surface them on the\n\t\t// rendered `<input>`. The shape includes `onInput` (native validation\n\t\t// commit bridge), plus `aria-invalid` / `aria-describedby` carried\n\t\t// over from `getValidationProps`. Matches React `SliderThumb.tsx:472`.\n\t\tconst validationInputProps = mergePropsN([\n\t\t\tfield.validation.getInputValidationProps() as Record<string, unknown>,\n\t\t]);\n\t\tconst onValidationInput = validationInputProps.onInput as\n\t\t\t| ((event: InputEvent) => void)\n\t\t\t| undefined;\n\t\tfunction handleInput(\n\t\t\tevent: InputEvent & { currentTarget: HTMLInputElement },\n\t\t): void {\n\t\t\t// Bridge to the field validation pipeline. Chain order matches\n\t\t\t// React's merged props — validation runs on every native `input`,\n\t\t\t// and our slider value update continues to fire via `onChange`.\n\t\t\tonValidationInput?.(event);\n\t\t}\n\n\t\t// Compose `aria-describedby`: caller's explicit describedBy takes\n\t\t// precedence; otherwise fall back to whatever validation supplies.\n\t\tconst composedDescribedBy = (): string | undefined =>\n\t\t\texternalDescribedBy ??\n\t\t\t(validationInputProps[\"aria-describedby\"] as string | undefined);\n\t\tconst ariaInvalid = ():\n\t\t\t| \"grammar\"\n\t\t\t| \"spelling\"\n\t\t\t| \"true\"\n\t\t\t| \"false\"\n\t\t\t| undefined => {\n\t\t\t// `getValidationProps` emits literal strings (`\"true\"` / `\"false\"`)\n\t\t\t// or `undefined`; normalize any stray boolean values from external\n\t\t\t// sources.\n\t\t\tconst v = validationInputProps[\"aria-invalid\"];\n\t\t\tif (v === undefined) return undefined;\n\t\t\tif (v === true || v === \"true\") return \"true\";\n\t\t\tif (v === false || v === \"false\") return \"false\";\n\t\t\tif (v === \"grammar\" || v === \"spelling\") return v;\n\t\t\treturn undefined;\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\tref={inputRefCallback}\n\t\t\t\ttype=\"range\"\n\t\t\t\taria-label={ariaLabel()}\n\t\t\t\taria-labelledby={labelledBy()}\n\t\t\t\taria-describedby={composedDescribedBy()}\n\t\t\t\taria-invalid={ariaInvalid()}\n\t\t\t\taria-orientation={context.orientation()}\n\t\t\t\taria-valuenow={thumbValue()}\n\t\t\t\taria-valuetext={valueTextAccessor()}\n\t\t\t\tdisabled={disabled()}\n\t\t\t\tform={context.form()}\n\t\t\t\tid={inputId()}\n\t\t\t\tmax={context.max()}\n\t\t\t\tmin={context.min()}\n\t\t\t\tname={context.name()}\n\t\t\t\tstep={context.step()}\n\t\t\t\ttabindex={props.tabIndex}\n\t\t\t\tvalue={thumbValue()}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\tonInput={handleInput}\n\t\t\t\tonChange={handleInputChange}\n\t\t\t\tonFocus={onInputFocus}\n\t\t\t\tonBlur={onInputBlur}\n\t\t\t\tstyle={inputStyle()}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst localRef = (el: HTMLElement | null): void => {\n\t\tthumbRef.current = el;\n\t\tsetThumbElement(el);\n\t\tlistItemRef(el);\n\t};\n\n\tconst internalSlot = {\n\t\tid,\n\t\tget \"data-index\"() {\n\t\t\treturn String(index());\n\t\t},\n\t\tget style() {\n\t\t\treturn getThumbStyle();\n\t\t},\n\t\tonPointerDown: handlePointerDown,\n\t\tget children() {\n\t\t\t// SSR prehydration slot (mirrors React `SliderThumb.tsx:487-499`):\n\t\t\t// emit the inline `<script>` that sets the thumb/indicator CSS\n\t\t\t// position vars before hydration, gated on\n\t\t\t// `inset && isHydrating && renderBeforeHydration && isLastThumb`.\n\t\t\t// It must render with the LAST thumb so every preceding thumb is\n\t\t\t// already in the DOM when `document.querySelectorAll` runs. The\n\t\t\t// `<script>` is bound as a plain element (not a spread of an inline\n\t\t\t// call) so Solid's SSR compiler doesn't thunk it.\n\t\t\tconst showScript = (): boolean =>\n\t\t\t\tcontext.inset() &&\n\t\t\t\tisHydrating() &&\n\t\t\t\tcontext.renderBeforeHydration() &&\n\t\t\t\tisLastThumb();\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{props.children}\n\t\t\t\t\t{renderHiddenInput()}\n\t\t\t\t\t<Show when={showScript()}>\n\t\t\t\t\t\t<script nonce={nonce()} innerHTML={sliderPrehydrationScript} />\n\t\t\t\t\t</Show>\n\t\t\t\t</>\n\t\t\t);\n\t\t},\n\t};\n\n\t// Resolve `class`/`style` here so function values (stateful styling) are\n\t// invoked with the slider state instead of being spread to the DOM raw.\n\t// The internal `style` (the thumb position) is merged first below, so a\n\t// user-supplied style composes with it rather than replacing it.\n\tconst userClassStyle = resolveClassStyle(props, () => context.state());\n\n\tlet merged: Record<string, unknown> = mergeRootProps(\n\t\tinternalSlot,\n\t\tsliderDataAttrs(context.state),\n\t);\n\tmerged = mergeRootProps(merged, userClassStyle);\n\tmerged = mergeRootProps(merged, forwardedProps() as Record<string, unknown>);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\treturn <Tag {...merged} ref={composeRefs(localRef, userRef(props))} />;\n}\n\nexport namespace SliderThumb {\n\texport type State = SliderThumbState;\n\texport type Props = SliderThumbProps;\n}\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,cAAc;AACtC,SAASC,UAAU,EAAEC,YAAY,EAAEC,IAAI,EAAEC,OAAO,QAAQ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