From 35596e5eec4db3ffb974cc6e5109504061a6caaa Mon Sep 17 00:00:00 2001 From: John Zhou Date: Mon, 22 Dec 2025 09:22:31 -0800 Subject: [PATCH] more ui tweaks and q.o.l changes --- backend_py/src/services/cameras/ehd.py | 2 +- .../components/dwe/app/command-palette.tsx | 6 +- .../dwe/cameras/camera-controls.tsx | 116 +- .../dwe/cameras/controls/boolean-control.tsx | 8 +- .../dwe/cameras/controls/integer-control.tsx | 118 +- .../components/dwe/wireless/wifi-dropdown.tsx | 22 +- frontend/src/components/ui/accordion.tsx | 4 +- frontend/src/components/ui/button.tsx | 2 +- frontend/src/components/ui/command.tsx | 56 +- frontend/src/components/ui/dialog.tsx | 2 +- frontend/src/components/ui/dropdown-menu.tsx | 70 +- frontend/src/components/ui/input.tsx | 2 +- frontend/src/components/ui/radio-group.tsx | 2 +- frontend/src/components/ui/select.tsx | 4 +- frontend/src/components/ui/switch.tsx | 4 +- frontend/src/components/ui/toggle.tsx | 29 + frontend/src/index.css | 10 + node_modules/.package-lock.json | 175 + node_modules/@radix-ui/primitive/LICENSE | 21 + node_modules/@radix-ui/primitive/README.md | 3 + node_modules/@radix-ui/primitive/package.json | 47 + .../@radix-ui/react-compose-refs/README.md | 13 + .../@radix-ui/react-compose-refs/package.json | 75 + .../@radix-ui/react-primitive/LICENSE | 21 + .../@radix-ui/react-primitive/README.md | 3 + .../@radix-ui/react-primitive/package.json | 68 + node_modules/@radix-ui/react-slot/LICENSE | 21 + node_modules/@radix-ui/react-slot/README.md | 3 + .../@radix-ui/react-slot/package.json | 63 + node_modules/@radix-ui/react-toggle/LICENSE | 21 + node_modules/@radix-ui/react-toggle/README.md | 3 + .../@radix-ui/react-toggle/package.json | 70 + .../react-use-controllable-state/LICENSE | 21 + .../react-use-controllable-state/README.md | 3 + .../react-use-controllable-state/package.json | 64 + .../@radix-ui/react-use-effect-event/LICENSE | 21 + .../react-use-effect-event/README.md | 5 + .../react-use-effect-event/package.json | 65 + .../react-use-effect-event/src/index.ts | 1 + .../src/use-effect-event.tsx | 36 + .../react-use-layout-effect/README.md | 13 + .../react-use-layout-effect/package.json | 75 + node_modules/react-dom/LICENSE | 21 + node_modules/react-dom/README.md | 60 + .../cjs/react-dom-client.development.js | 28121 +++++++++++++++ .../cjs/react-dom-client.production.js | 16049 +++++++++ .../cjs/react-dom-profiling.development.js | 28503 ++++++++++++++++ .../cjs/react-dom-profiling.profiling.js | 18068 ++++++++++ ...t-dom-server-legacy.browser.development.js | 9877 ++++++ ...ct-dom-server-legacy.browser.production.js | 6603 ++++ ...eact-dom-server-legacy.node.development.js | 9877 ++++++ ...react-dom-server-legacy.node.production.js | 6692 ++++ .../react-dom-server.browser.development.js | 10601 ++++++ .../react-dom-server.browser.production.js | 7410 ++++ .../cjs/react-dom-server.bun.development.js | 9605 ++++++ .../cjs/react-dom-server.bun.production.js | 6745 ++++ .../cjs/react-dom-server.edge.development.js | 10620 ++++++ .../cjs/react-dom-server.edge.production.js | 7512 ++++ .../cjs/react-dom-server.node.development.js | 10802 ++++++ .../cjs/react-dom-server.node.production.js | 7707 +++++ .../cjs/react-dom-test-utils.development.js | 24 + .../cjs/react-dom-test-utils.production.js | 21 + .../react-dom/cjs/react-dom.development.js | 424 + .../react-dom/cjs/react-dom.production.js | 210 + .../cjs/react-dom.react-server.development.js | 340 + .../cjs/react-dom.react-server.production.js | 152 + node_modules/react-dom/client.js | 38 + node_modules/react-dom/client.react-server.js | 5 + node_modules/react-dom/index.js | 38 + node_modules/react-dom/package.json | 117 + node_modules/react-dom/profiling.js | 38 + .../react-dom/profiling.react-server.js | 5 + .../react-dom/react-dom.react-server.js | 7 + node_modules/react-dom/server.browser.js | 16 + node_modules/react-dom/server.bun.js | 17 + node_modules/react-dom/server.edge.js | 17 + node_modules/react-dom/server.js | 3 + node_modules/react-dom/server.node.js | 18 + node_modules/react-dom/server.react-server.js | 5 + node_modules/react-dom/static.browser.js | 12 + node_modules/react-dom/static.edge.js | 12 + node_modules/react-dom/static.js | 3 + node_modules/react-dom/static.node.js | 14 + node_modules/react-dom/static.react-server.js | 5 + node_modules/react-dom/test-utils.js | 7 + node_modules/react/LICENSE | 21 + node_modules/react/README.md | 37 + .../cjs/react-compiler-runtime.development.js | 24 + .../cjs/react-compiler-runtime.production.js | 16 + .../cjs/react-compiler-runtime.profiling.js | 16 + .../cjs/react-jsx-dev-runtime.development.js | 338 + .../cjs/react-jsx-dev-runtime.production.js | 14 + .../cjs/react-jsx-dev-runtime.profiling.js | 14 + ...sx-dev-runtime.react-server.development.js | 370 + ...jsx-dev-runtime.react-server.production.js | 40 + .../cjs/react-jsx-runtime.development.js | 352 + .../react/cjs/react-jsx-runtime.production.js | 34 + .../react/cjs/react-jsx-runtime.profiling.js | 34 + ...ct-jsx-runtime.react-server.development.js | 370 + ...act-jsx-runtime.react-server.production.js | 40 + node_modules/react/cjs/react.development.js | 1284 + node_modules/react/cjs/react.production.js | 542 + .../cjs/react.react-server.development.js | 848 + .../cjs/react.react-server.production.js | 423 + node_modules/react/compiler-runtime.js | 14 + node_modules/react/index.js | 7 + node_modules/react/jsx-dev-runtime.js | 7 + .../react/jsx-dev-runtime.react-server.js | 7 + node_modules/react/jsx-runtime.js | 7 + .../react/jsx-runtime.react-server.js | 7 + node_modules/react/package.json | 51 + node_modules/react/react.react-server.js | 7 + node_modules/scheduler/LICENSE | 21 + node_modules/scheduler/README.md | 9 + .../scheduler-unstable_mock.development.js | 414 + .../cjs/scheduler-unstable_mock.production.js | 406 + ...cheduler-unstable_post_task.development.js | 150 + ...scheduler-unstable_post_task.production.js | 140 + .../scheduler/cjs/scheduler.development.js | 364 + .../cjs/scheduler.native.development.js | 350 + .../cjs/scheduler.native.production.js | 330 + .../scheduler/cjs/scheduler.production.js | 340 + node_modules/scheduler/index.js | 7 + node_modules/scheduler/index.native.js | 7 + node_modules/scheduler/package.json | 27 + node_modules/scheduler/unstable_mock.js | 7 + node_modules/scheduler/unstable_post_task.js | 7 + package-lock.json | 180 + package.json | 5 + 129 files changed, 205333 insertions(+), 144 deletions(-) create mode 100644 frontend/src/components/ui/toggle.tsx create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@radix-ui/primitive/LICENSE create mode 100644 node_modules/@radix-ui/primitive/README.md create mode 100644 node_modules/@radix-ui/primitive/package.json create mode 100644 node_modules/@radix-ui/react-compose-refs/README.md create mode 100644 node_modules/@radix-ui/react-compose-refs/package.json create mode 100644 node_modules/@radix-ui/react-primitive/LICENSE create mode 100644 node_modules/@radix-ui/react-primitive/README.md create mode 100644 node_modules/@radix-ui/react-primitive/package.json create mode 100644 node_modules/@radix-ui/react-slot/LICENSE create mode 100644 node_modules/@radix-ui/react-slot/README.md create mode 100644 node_modules/@radix-ui/react-slot/package.json create mode 100644 node_modules/@radix-ui/react-toggle/LICENSE create mode 100644 node_modules/@radix-ui/react-toggle/README.md create mode 100644 node_modules/@radix-ui/react-toggle/package.json create mode 100644 node_modules/@radix-ui/react-use-controllable-state/LICENSE create mode 100644 node_modules/@radix-ui/react-use-controllable-state/README.md create mode 100644 node_modules/@radix-ui/react-use-controllable-state/package.json create mode 100644 node_modules/@radix-ui/react-use-effect-event/LICENSE create mode 100644 node_modules/@radix-ui/react-use-effect-event/README.md create mode 100644 node_modules/@radix-ui/react-use-effect-event/package.json create mode 100644 node_modules/@radix-ui/react-use-effect-event/src/index.ts create mode 100644 node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx create mode 100644 node_modules/@radix-ui/react-use-layout-effect/README.md create mode 100644 node_modules/@radix-ui/react-use-layout-effect/package.json create mode 100644 node_modules/react-dom/LICENSE create mode 100644 node_modules/react-dom/README.md create mode 100644 node_modules/react-dom/cjs/react-dom-client.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-client.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-profiling.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-profiling.profiling.js create mode 100644 node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.browser.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.browser.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.bun.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.bun.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.edge.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.edge.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.node.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-server.node.production.js create mode 100644 node_modules/react-dom/cjs/react-dom-test-utils.development.js create mode 100644 node_modules/react-dom/cjs/react-dom-test-utils.production.js create mode 100644 node_modules/react-dom/cjs/react-dom.development.js create mode 100644 node_modules/react-dom/cjs/react-dom.production.js create mode 100644 node_modules/react-dom/cjs/react-dom.react-server.development.js create mode 100644 node_modules/react-dom/cjs/react-dom.react-server.production.js create mode 100644 node_modules/react-dom/client.js create mode 100644 node_modules/react-dom/client.react-server.js create mode 100644 node_modules/react-dom/index.js create mode 100644 node_modules/react-dom/package.json create mode 100644 node_modules/react-dom/profiling.js create mode 100644 node_modules/react-dom/profiling.react-server.js create mode 100644 node_modules/react-dom/react-dom.react-server.js create mode 100644 node_modules/react-dom/server.browser.js create mode 100644 node_modules/react-dom/server.bun.js create mode 100644 node_modules/react-dom/server.edge.js create mode 100644 node_modules/react-dom/server.js create mode 100644 node_modules/react-dom/server.node.js create mode 100644 node_modules/react-dom/server.react-server.js create mode 100644 node_modules/react-dom/static.browser.js create mode 100644 node_modules/react-dom/static.edge.js create mode 100644 node_modules/react-dom/static.js create mode 100644 node_modules/react-dom/static.node.js create mode 100644 node_modules/react-dom/static.react-server.js create mode 100644 node_modules/react-dom/test-utils.js create mode 100644 node_modules/react/LICENSE create mode 100644 node_modules/react/README.md create mode 100644 node_modules/react/cjs/react-compiler-runtime.development.js create mode 100644 node_modules/react/cjs/react-compiler-runtime.production.js create mode 100644 node_modules/react/cjs/react-compiler-runtime.profiling.js create mode 100644 node_modules/react/cjs/react-jsx-dev-runtime.development.js create mode 100644 node_modules/react/cjs/react-jsx-dev-runtime.production.js create mode 100644 node_modules/react/cjs/react-jsx-dev-runtime.profiling.js create mode 100644 node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js create mode 100644 node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js create mode 100644 node_modules/react/cjs/react-jsx-runtime.development.js create mode 100644 node_modules/react/cjs/react-jsx-runtime.production.js create mode 100644 node_modules/react/cjs/react-jsx-runtime.profiling.js create mode 100644 node_modules/react/cjs/react-jsx-runtime.react-server.development.js create mode 100644 node_modules/react/cjs/react-jsx-runtime.react-server.production.js create mode 100644 node_modules/react/cjs/react.development.js create mode 100644 node_modules/react/cjs/react.production.js create mode 100644 node_modules/react/cjs/react.react-server.development.js create mode 100644 node_modules/react/cjs/react.react-server.production.js create mode 100644 node_modules/react/compiler-runtime.js create mode 100644 node_modules/react/index.js create mode 100644 node_modules/react/jsx-dev-runtime.js create mode 100644 node_modules/react/jsx-dev-runtime.react-server.js create mode 100644 node_modules/react/jsx-runtime.js create mode 100644 node_modules/react/jsx-runtime.react-server.js create mode 100644 node_modules/react/package.json create mode 100644 node_modules/react/react.react-server.js create mode 100644 node_modules/scheduler/LICENSE create mode 100644 node_modules/scheduler/README.md create mode 100644 node_modules/scheduler/cjs/scheduler-unstable_mock.development.js create mode 100644 node_modules/scheduler/cjs/scheduler-unstable_mock.production.js create mode 100644 node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js create mode 100644 node_modules/scheduler/cjs/scheduler-unstable_post_task.production.js create mode 100644 node_modules/scheduler/cjs/scheduler.development.js create mode 100644 node_modules/scheduler/cjs/scheduler.native.development.js create mode 100644 node_modules/scheduler/cjs/scheduler.native.production.js create mode 100644 node_modules/scheduler/cjs/scheduler.production.js create mode 100644 node_modules/scheduler/index.js create mode 100644 node_modules/scheduler/index.native.js create mode 100644 node_modules/scheduler/package.json create mode 100644 node_modules/scheduler/unstable_mock.js create mode 100644 node_modules/scheduler/unstable_post_task.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/backend_py/src/services/cameras/ehd.py b/backend_py/src/services/cameras/ehd.py index 73e3ec42..fde7b389 100644 --- a/backend_py/src/services/cameras/ehd.py +++ b/backend_py/src/services/cameras/ehd.py @@ -38,7 +38,7 @@ def _get_options(self) -> Dict[str, Option]: # Standard integer options options['bitrate'] = Option( self.cameras[2], '>I', xu.Unit.USR_ID, xu.Selector.USR_H264_CTRL, xu.Command.H264_BITRATE_CTRL, 'Bitrate', - lambda bitrate: int(bitrate * 1000000), # convert to bps from mpbs + lambda bitrate: int(round(bitrate * 1000000)), # convert to bps from mpbs (round for float imprecision) lambda bitrate: bitrate / 1000000 # convert to mpbs from bps ) diff --git a/frontend/src/components/dwe/app/command-palette.tsx b/frontend/src/components/dwe/app/command-palette.tsx index f3c9e54c..2c47da03 100644 --- a/frontend/src/components/dwe/app/command-palette.tsx +++ b/frontend/src/components/dwe/app/command-palette.tsx @@ -56,11 +56,13 @@ export function CommandPalette() { Cameras runCommand(() => navigate("/videos"))} + onSelect={() => runCommand(() => navigate("/recordings"))} > Recordings - runCommand(() => navigate("/log-viewer"))}> + runCommand(() => navigate("/log-viewer"))} + > Logs c.name.includes(dependencyName)) + : null; + + const dependencySnap = dependencyControl + ? useSnapshot(dependencyControl) + : null; + + let isDisabled = false; + if (dependencySnap) { + if (control.name.includes("Exposure Time, Absolute")) { + isDisabled = dependencySnap.value !== 1; + } else { + isDisabled = !!dependencySnap.value; + } + } + useEffect(() => { const unsub = subscribe(control, () => { setUVCControl(bus_info, control.value, control.control_id); @@ -79,7 +106,9 @@ const ControlWrapper = ({ switch (control.flags.control_type) { case "INTEGER": - return ; + return ( + + ); case "BOOLEAN": return ; case "MENU": @@ -118,6 +147,17 @@ export const CameraControls = () => { return "Miscellaneous"; }; + const getTypeRank = (a: ControlModel, b: ControlModel, order: string[]) => { + const typeRankA = order.indexOf(a.flags.control_type); + const typeRankB = order.indexOf(b.flags.control_type); + + if (typeRankA !== typeRankB) { + return typeRankA - typeRankB; + } + + return a.name.localeCompare(b.name); + }; + const groupedControls = supportedControls.reduce( (acc, control) => { const groupName = getGroupName(control.name); @@ -131,8 +171,9 @@ export const CameraControls = () => { }, {} ); + const typeOrder = ["INTEGER", "MENU"]; - const order = [ + const groupOrder = [ "Exposure Controls", "Image Controls", "System Controls", @@ -146,7 +187,7 @@ export const CameraControls = () => { - + Camera Controls @@ -158,27 +199,52 @@ export const CameraControls = () => { {supportedControls.length > 0 ? (
{Object.keys(groupedControls) - .sort((a, b) => order.indexOf(a) - order.indexOf(b)) - .map((groupName) => ( - - - - {groupName} - - -
- {groupedControls[groupName].map((control, index) => ( - - ))} -
-
-
-
- ))} + .sort((a, b) => groupOrder.indexOf(a) - groupOrder.indexOf(b)) + .map((groupName) => { + const booleans = groupedControls[groupName].filter( + (c) => c.flags.control_type === "BOOLEAN" + ); + const others = groupedControls[groupName].filter( + (c) => c.flags.control_type !== "BOOLEAN" + ); + return ( + + + + {groupName} + + + {others && ( +
+ {others + .sort((a, b) => { + return getTypeRank(a, b, typeOrder); + }) + .map((control, index) => ( + + ))} +
+ )} + {booleans && ( +
+ {booleans.map((control, index) => ( + + ))} +
+ )} +
+
+
+ ); + })}
) : (

diff --git a/frontend/src/components/dwe/cameras/controls/boolean-control.tsx b/frontend/src/components/dwe/cameras/controls/boolean-control.tsx index aeb4afdf..aa1ced8b 100644 --- a/frontend/src/components/dwe/cameras/controls/boolean-control.tsx +++ b/frontend/src/components/dwe/cameras/controls/boolean-control.tsx @@ -1,4 +1,4 @@ -import { Switch } from "@/components/ui/switch"; +import { Toggle } from "@/components/ui/toggle"; import { components } from "@/schemas/dwe_os_2"; import { useState } from "react"; import { subscribe } from "valtio"; @@ -32,8 +32,10 @@ const BooleanControl = ({ return (

- {control.name} - + + +
{control.name}
+
); }; diff --git a/frontend/src/components/dwe/cameras/controls/integer-control.tsx b/frontend/src/components/dwe/cameras/controls/integer-control.tsx index d772b654..e94d47b5 100644 --- a/frontend/src/components/dwe/cameras/controls/integer-control.tsx +++ b/frontend/src/components/dwe/cameras/controls/integer-control.tsx @@ -5,29 +5,43 @@ import { Input } from "@/components/ui/input"; import { components } from "@/schemas/dwe_os_2"; import { useState, useEffect, useCallback, useRef } from "react"; import { subscribe } from "valtio"; +import { cn } from "@/lib/utils"; +import { Button } from "@/components/ui/button"; +import { CirclePlus, CircleMinus } from "lucide-react"; const IntegerControl = ({ control, + isDisabled = false, }: { control: components["schemas"]["ControlModel"]; + isDisabled?: boolean; }) => { + const { min_value, max_value, step } = control.flags; + const controlId = `control-${control.control_id}-${control.name}`; + const safeStep = step && step > 0 ? step : 1; + + const precision = + safeStep < 1 ? step.toString().split(".")[1]?.length || 0 : 0; + const [currentValue, setCurrentValue] = useState(control.value); - const [inputValue, setInputValue] = useState(control.value.toString()); + const [inputValue, setInputValue] = useState( + control.value.toFixed(precision).toString() + ); const containerRef = useRef(null); + const inputRef = useRef(null); + const dragState = useRef<{ startX: number; startValue: number; containerWidth: number; } | null>(null); - const { min_value, max_value, step } = control.flags; - const controlId = `control-${control.control_id}-${control.name}`; useEffect(() => { const unsubscribe = subscribe(control, () => { if (control.value !== currentValue) { setCurrentValue(control.value); - setInputValue(control.value.toString()); + setInputValue(control.value.toFixed(precision).toString()); } }); return () => unsubscribe(); @@ -41,7 +55,7 @@ const IntegerControl = ({ const snapToStep = useCallback( (val: number): number => { if (!step || step <= 0) return val; - return Math.round((val - min_value) / step) * step + min_value; + return Math.round((val - min_value) / safeStep) * safeStep + min_value; }, [min_value, step] ); @@ -54,7 +68,7 @@ const IntegerControl = ({ validatedValue = snapToStep(validatedValue); setCurrentValue(validatedValue); - setInputValue(validatedValue.toString()); + setInputValue(validatedValue.toFixed(precision).toString()); if (control.value !== validatedValue) { control.value = validatedValue; @@ -90,7 +104,7 @@ const IntegerControl = ({ let newValue = clamp(startValue + valueDelta); setCurrentValue(newValue); - setInputValue(Math.round(newValue).toString()); + setInputValue(newValue.toFixed(precision).toString()); }; const handlePointerUp = (e: React.PointerEvent) => { @@ -107,7 +121,7 @@ const IntegerControl = ({ }; const handleInputBlur = () => { - const parsedValue = parseInt(inputValue, 10); + const parsedValue = parseFloat(inputValue); if (!isNaN(parsedValue)) { commitValue(parsedValue); } else { @@ -117,7 +131,7 @@ const IntegerControl = ({ const handleInputKeyDown = (event: React.KeyboardEvent) => { if (event.key === "Enter") { - const parsedValue = parseInt(inputValue, 10); + const parsedValue = parseFloat(inputValue); if (!isNaN(parsedValue)) { commitValue(parsedValue); event.currentTarget.blur(); @@ -130,6 +144,26 @@ const IntegerControl = ({ } }; + const handleInputStep = (step: string) => { + if (isDisabled || !inputRef.current) return; + + try { + if (step === "up") { + inputRef.current.stepUp(); + } else { + inputRef.current.stepDown(); + } + } catch (e) { + return; + } + + // stepUp and stepDown don't call on change like the arrow keys do, so we need to update react from the dom + const newValue = inputRef.current.value; + setInputValue(newValue); + setCurrentValue(parseFloat(newValue)); + + inputRef.current.focus(); + }; // // Handle slider live updates // const handleSliderChange = (value: number[]) => { // // We allow the "raw" value (step 1) to flow through here for smooth UI @@ -145,9 +179,14 @@ const IntegerControl = ({ // }; return ( -
+
-
+
{control.name}
- (e.target as HTMLInputElement).blur()} - /> +
+ (e.target as HTMLInputElement).blur()} + disabled={isDisabled} + ref={inputRef} + /> +
+ + +
+
); diff --git a/frontend/src/components/dwe/wireless/wifi-dropdown.tsx b/frontend/src/components/dwe/wireless/wifi-dropdown.tsx index 9bbb2bcd..3659aa4a 100644 --- a/frontend/src/components/dwe/wireless/wifi-dropdown.tsx +++ b/frontend/src/components/dwe/wireless/wifi-dropdown.tsx @@ -1,5 +1,5 @@ import { useContext, useEffect, useState } from "react"; -import { Wifi, WifiOff, Check, Lock } from "lucide-react"; +import { Wifi, WifiOff, Dot, Lock } from "lucide-react"; import { DropdownMenu, DropdownMenuContent, @@ -24,6 +24,7 @@ import { import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { useToast } from "@/hooks/use-toast"; +import { Switch } from "@/components/ui/switch"; export function WifiDropdown() { const { toast } = useToast(); @@ -72,7 +73,7 @@ export function WifiDropdown() { }; } - return () => { }; + return () => {}; }, [connected]); const toggleWifi = async () => { @@ -123,8 +124,6 @@ export function WifiDropdown() { setPasswordDialogOpen(false); }; - - const handlePasswordSubmit = (e: React.FormEvent) => { e.preventDefault(); if (!selectedNetwork) return; @@ -152,14 +151,10 @@ export function WifiDropdown() { > WiFi - + toggleWifi()} + /> @@ -196,7 +191,7 @@ export function WifiDropdown() { )}
{wifiStatus?.connection?.id == network.ssid && ( - +
)} ))} @@ -267,7 +262,6 @@ interface SignalStrengthProps { function SignalStrength({ strength }: SignalStrengthProps) { const thresholds = [20, 50, 70]; - return (
{thresholds.map((threshold, index) => ( diff --git a/frontend/src/components/ui/accordion.tsx b/frontend/src/components/ui/accordion.tsx index 301a5608..9e10f417 100644 --- a/frontend/src/components/ui/accordion.tsx +++ b/frontend/src/components/ui/accordion.tsx @@ -13,7 +13,7 @@ const AccordionItem = React.forwardRef< {children} - + )); diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsx index 45d50a56..e79137b0 100644 --- a/frontend/src/components/ui/button.tsx +++ b/frontend/src/components/ui/button.tsx @@ -17,7 +17,7 @@ const buttonVariants = cva( "border bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-background", + ghost: "hover:bg-accent/20", link: "text-primary underline-offset-4 hover:underline", svg: "hover:text-accent", }, diff --git a/frontend/src/components/ui/command.tsx b/frontend/src/components/ui/command.tsx index 0db642a6..340f3808 100644 --- a/frontend/src/components/ui/command.tsx +++ b/frontend/src/components/ui/command.tsx @@ -1,10 +1,10 @@ -import * as React from "react" -import { type DialogProps } from "@radix-ui/react-dialog" -import { Command as CommandPrimitive } from "cmdk" -import { Search } from "lucide-react" +import * as React from "react"; +import { type DialogProps } from "@radix-ui/react-dialog"; +import { Command as CommandPrimitive } from "cmdk"; +import { Search } from "lucide-react"; -import { cn } from "@/lib/utils" -import { Dialog, DialogContent } from "@/components/ui/dialog" +import { cn } from "@/lib/utils"; +import { Dialog, DialogContent } from "@/components/ui/dialog"; const Command = React.forwardRef< React.ElementRef, @@ -13,13 +13,13 @@ const Command = React.forwardRef< -)) -Command.displayName = CommandPrimitive.displayName +)); +Command.displayName = CommandPrimitive.displayName; const CommandDialog = ({ children, ...props }: DialogProps) => { return ( @@ -30,8 +30,8 @@ const CommandDialog = ({ children, ...props }: DialogProps) => { - ) -} + ); +}; const CommandInput = React.forwardRef< React.ElementRef, @@ -48,9 +48,9 @@ const CommandInput = React.forwardRef< {...props} />
-)) +)); -CommandInput.displayName = CommandPrimitive.Input.displayName +CommandInput.displayName = CommandPrimitive.Input.displayName; const CommandList = React.forwardRef< React.ElementRef, @@ -61,9 +61,9 @@ const CommandList = React.forwardRef< className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} {...props} /> -)) +)); -CommandList.displayName = CommandPrimitive.List.displayName +CommandList.displayName = CommandPrimitive.List.displayName; const CommandEmpty = React.forwardRef< React.ElementRef, @@ -74,9 +74,9 @@ const CommandEmpty = React.forwardRef< className="py-6 text-center text-sm" {...props} /> -)) +)); -CommandEmpty.displayName = CommandPrimitive.Empty.displayName +CommandEmpty.displayName = CommandPrimitive.Empty.displayName; const CommandGroup = React.forwardRef< React.ElementRef, @@ -90,9 +90,9 @@ const CommandGroup = React.forwardRef< )} {...props} /> -)) +)); -CommandGroup.displayName = CommandPrimitive.Group.displayName +CommandGroup.displayName = CommandPrimitive.Group.displayName; const CommandSeparator = React.forwardRef< React.ElementRef, @@ -103,8 +103,8 @@ const CommandSeparator = React.forwardRef< className={cn("-mx-1 h-px bg-border", className)} {...props} /> -)) -CommandSeparator.displayName = CommandPrimitive.Separator.displayName +)); +CommandSeparator.displayName = CommandPrimitive.Separator.displayName; const CommandItem = React.forwardRef< React.ElementRef, @@ -113,14 +113,14 @@ const CommandItem = React.forwardRef< -)) +)); -CommandItem.displayName = CommandPrimitive.Item.displayName +CommandItem.displayName = CommandPrimitive.Item.displayName; const CommandShortcut = ({ className, @@ -134,9 +134,9 @@ const CommandShortcut = ({ )} {...props} /> - ) -} -CommandShortcut.displayName = "CommandShortcut" + ); +}; +CommandShortcut.displayName = "CommandShortcut"; export { Command, @@ -148,4 +148,4 @@ export { CommandItem, CommandShortcut, CommandSeparator, -} +}; diff --git a/frontend/src/components/ui/dialog.tsx b/frontend/src/components/ui/dialog.tsx index da3aedbc..764b8cc9 100644 --- a/frontend/src/components/ui/dialog.tsx +++ b/frontend/src/components/ui/dialog.tsx @@ -38,7 +38,7 @@ const DialogContent = React.forwardRef< , React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( -)) +)); DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName + DropdownMenuPrimitive.SubTrigger.displayName; const DropdownMenuSubContent = React.forwardRef< React.ElementRef, @@ -50,9 +50,9 @@ const DropdownMenuSubContent = React.forwardRef< )} {...props} /> -)) +)); DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName + DropdownMenuPrimitive.SubContent.displayName; const DropdownMenuContent = React.forwardRef< React.ElementRef, @@ -63,20 +63,20 @@ const DropdownMenuContent = React.forwardRef< ref={ref} sideOffset={sideOffset} className={cn( - "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", + "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover/30 backdrop-blur p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className )} {...props} /> -)) -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const DropdownMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; const DropdownMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -111,9 +111,9 @@ const DropdownMenuCheckboxItem = React.forwardRef< {children} -)) +)); DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName + DropdownMenuPrimitive.CheckboxItem.displayName; const DropdownMenuRadioItem = React.forwardRef< React.ElementRef, @@ -134,13 +134,13 @@ const DropdownMenuRadioItem = React.forwardRef< {children} -)) -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName +)); +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; const DropdownMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName +)); +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; const DropdownMenuSeparator = React.forwardRef< React.ElementRef, @@ -161,11 +161,11 @@ const DropdownMenuSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; const DropdownMenuShortcut = ({ className, @@ -176,9 +176,9 @@ const DropdownMenuShortcut = ({ className={cn("ml-auto text-xs tracking-widest opacity-60", className)} {...props} /> - ) -} -DropdownMenuShortcut.displayName = "DropdownMenuShortcut" + ); +}; +DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; export { DropdownMenu, @@ -196,4 +196,4 @@ export { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, -} +}; diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx index 89800e2b..e4e43a98 100644 --- a/frontend/src/components/ui/input.tsx +++ b/frontend/src/components/ui/input.tsx @@ -8,7 +8,7 @@ const Input = React.forwardRef>( - +
); diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsx index 20d36bdb..3e68d5cb 100644 --- a/frontend/src/components/ui/select.tsx +++ b/frontend/src/components/ui/select.tsx @@ -17,7 +17,7 @@ const SelectTrigger = React.forwardRef< span]:line-clamp-1", + "flex h-9 w-full items-center justify-between whitespace-nowrap hover:bg-accent rounded-md border border-muted bg-background/30 px-3 py-2 text-sm shadow-md ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className )} {...props} @@ -73,7 +73,7 @@ const SelectContent = React.forwardRef< (({ className, ...props }, ref) => ( diff --git a/frontend/src/components/ui/toggle.tsx b/frontend/src/components/ui/toggle.tsx new file mode 100644 index 00000000..46461c12 --- /dev/null +++ b/frontend/src/components/ui/toggle.tsx @@ -0,0 +1,29 @@ +import * as React from "react"; +import * as TogglePrimitive from "@radix-ui/react-toggle"; + +import { cn } from "@/lib/utils"; + +const Toggle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + {children} + + +)); + +Toggle.displayName = TogglePrimitive.Root.displayName; + +export { Toggle }; diff --git a/frontend/src/index.css b/frontend/src/index.css index d4250234..78fc6559 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -104,9 +104,19 @@ @apply bg-muted-foreground/40; } + input[type="number"]::-webkit-outer-spin-button, + input[type="number"]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + /* Firefox */ * { scrollbar-width: thin; scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent; } + + input[type="number"] { + -moz-appearance: textfield; + } } diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..38b7c2bf --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,175 @@ +{ + "name": "DWE_OS", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@radix-ui/primitive": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz", + "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toggle": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.10.tgz", + "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", + "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", + "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", + "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.3" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + } + } +} diff --git a/node_modules/@radix-ui/primitive/LICENSE b/node_modules/@radix-ui/primitive/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/primitive/README.md b/node_modules/@radix-ui/primitive/README.md new file mode 100644 index 00000000..79d1eef2 --- /dev/null +++ b/node_modules/@radix-ui/primitive/README.md @@ -0,0 +1,3 @@ +# `primitive` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/primitive/package.json b/node_modules/@radix-ui/primitive/package.json new file mode 100644 index 00000000..eac44683 --- /dev/null +++ b/node_modules/@radix-ui/primitive/package.json @@ -0,0 +1,47 @@ +{ + "name": "@radix-ui/primitive", + "version": "1.1.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "devDependencies": { + "eslint": "^9.18.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-compose-refs/README.md b/node_modules/@radix-ui/react-compose-refs/README.md new file mode 100644 index 00000000..d8a61360 --- /dev/null +++ b/node_modules/@radix-ui/react-compose-refs/README.md @@ -0,0 +1,13 @@ +# `react-compose-refs` + +## Installation + +```sh +$ yarn add @radix-ui/react-compose-refs +# or +$ npm install @radix-ui/react-compose-refs +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/react-compose-refs/package.json b/node_modules/@radix-ui/react-compose-refs/package.json new file mode 100644 index 00000000..e048b8ba --- /dev/null +++ b/node_modules/@radix-ui/react-compose-refs/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-compose-refs", + "version": "1.1.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-primitive/LICENSE b/node_modules/@radix-ui/react-primitive/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/react-primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/react-primitive/README.md b/node_modules/@radix-ui/react-primitive/README.md new file mode 100644 index 00000000..832c37cd --- /dev/null +++ b/node_modules/@radix-ui/react-primitive/README.md @@ -0,0 +1,3 @@ +# `react-primitive` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/react-primitive/package.json b/node_modules/@radix-ui/react-primitive/package.json new file mode 100644 index 00000000..95971268 --- /dev/null +++ b/node_modules/@radix-ui/react-primitive/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-primitive", + "version": "2.1.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-slot/LICENSE b/node_modules/@radix-ui/react-slot/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/react-slot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/react-slot/README.md b/node_modules/@radix-ui/react-slot/README.md new file mode 100644 index 00000000..55ccbd80 --- /dev/null +++ b/node_modules/@radix-ui/react-slot/README.md @@ -0,0 +1,3 @@ +# `react-slot` + +View docs [here](https://radix-ui.com/primitives/docs/utilities/slot). diff --git a/node_modules/@radix-ui/react-slot/package.json b/node_modules/@radix-ui/react-slot/package.json new file mode 100644 index 00000000..52aa5154 --- /dev/null +++ b/node_modules/@radix-ui/react-slot/package.json @@ -0,0 +1,63 @@ +{ + "name": "@radix-ui/react-slot", + "version": "1.2.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-toggle/LICENSE b/node_modules/@radix-ui/react-toggle/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/react-toggle/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/react-toggle/README.md b/node_modules/@radix-ui/react-toggle/README.md new file mode 100644 index 00000000..9bb49c33 --- /dev/null +++ b/node_modules/@radix-ui/react-toggle/README.md @@ -0,0 +1,3 @@ +# `react-toggle` + +View docs [here](https://radix-ui.com/primitives/docs/components/toggle). diff --git a/node_modules/@radix-ui/react-toggle/package.json b/node_modules/@radix-ui/react-toggle/package.json new file mode 100644 index 00000000..03c1385c --- /dev/null +++ b/node_modules/@radix-ui/react-toggle/package.json @@ -0,0 +1,70 @@ +{ + "name": "@radix-ui/react-toggle", + "version": "1.1.10", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/primitive": "1.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-use-controllable-state/LICENSE b/node_modules/@radix-ui/react-use-controllable-state/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/react-use-controllable-state/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/react-use-controllable-state/README.md b/node_modules/@radix-ui/react-use-controllable-state/README.md new file mode 100644 index 00000000..c6197cdd --- /dev/null +++ b/node_modules/@radix-ui/react-use-controllable-state/README.md @@ -0,0 +1,3 @@ +# `react-use-controllable-state` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/react-use-controllable-state/package.json b/node_modules/@radix-ui/react-use-controllable-state/package.json new file mode 100644 index 00000000..db01eeb9 --- /dev/null +++ b/node_modules/@radix-ui/react-use-controllable-state/package.json @@ -0,0 +1,64 @@ +{ + "name": "@radix-ui/react-use-controllable-state", + "version": "1.2.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-use-effect-event/LICENSE b/node_modules/@radix-ui/react-use-effect-event/LICENSE new file mode 100644 index 00000000..a18858fb --- /dev/null +++ b/node_modules/@radix-ui/react-use-effect-event/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@radix-ui/react-use-effect-event/README.md b/node_modules/@radix-ui/react-use-effect-event/README.md new file mode 100644 index 00000000..31124b60 --- /dev/null +++ b/node_modules/@radix-ui/react-use-effect-event/README.md @@ -0,0 +1,5 @@ +# `react-use-is-hydrated` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/react-use-effect-event/package.json b/node_modules/@radix-ui/react-use-effect-event/package.json new file mode 100644 index 00000000..f8122f9b --- /dev/null +++ b/node_modules/@radix-ui/react-use-effect-event/package.json @@ -0,0 +1,65 @@ +{ + "name": "@radix-ui/react-use-effect-event", + "version": "0.0.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "src", + "dist", + "README.md" + ], + "sideEffects": false, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "@types/use-sync-external-store": "^0.0.6", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/@radix-ui/react-use-effect-event/src/index.ts b/node_modules/@radix-ui/react-use-effect-event/src/index.ts new file mode 100644 index 00000000..1a34bd02 --- /dev/null +++ b/node_modules/@radix-ui/react-use-effect-event/src/index.ts @@ -0,0 +1 @@ +export { useEffectEvent } from './use-effect-event'; diff --git a/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx b/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx new file mode 100644 index 00000000..24409222 --- /dev/null +++ b/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx @@ -0,0 +1,36 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import { useLayoutEffect } from '@radix-ui/react-use-layout-effect'; +import * as React from 'react'; + +type AnyFunction = (...args: any[]) => any; + +// See https://github.com/webpack/webpack/issues/14814 +const useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()]; +const useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()]; + +/** + * Designed to approximate the behavior on `experimental_useEffectEvent` as best + * as possible until its stable release, and back-fill it as a shim as needed. + */ +export function useEffectEvent(callback?: T): T { + if (typeof useReactEffectEvent === 'function') { + return useReactEffectEvent(callback); + } + + const ref = React.useRef(() => { + throw new Error('Cannot call an event handler while rendering.'); + }); + // See https://github.com/webpack/webpack/issues/14814 + if (typeof useReactInsertionEffect === 'function') { + useReactInsertionEffect(() => { + ref.current = callback; + }); + } else { + useLayoutEffect(() => { + ref.current = callback; + }); + } + + // https://github.com/facebook/react/issues/19240 + return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []); +} diff --git a/node_modules/@radix-ui/react-use-layout-effect/README.md b/node_modules/@radix-ui/react-use-layout-effect/README.md new file mode 100644 index 00000000..6dc82d79 --- /dev/null +++ b/node_modules/@radix-ui/react-use-layout-effect/README.md @@ -0,0 +1,13 @@ +# `react-use-layout-effect` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-layout-effect +# or +$ npm install @radix-ui/react-use-layout-effect +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/@radix-ui/react-use-layout-effect/package.json b/node_modules/@radix-ui/react-use-layout-effect/package.json new file mode 100644 index 00000000..2e706b21 --- /dev/null +++ b/node_modules/@radix-ui/react-use-layout-effect/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-use-layout-effect", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/react-dom/LICENSE b/node_modules/react-dom/LICENSE new file mode 100644 index 00000000..b93be905 --- /dev/null +++ b/node_modules/react-dom/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Meta Platforms, Inc. and affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/react-dom/README.md b/node_modules/react-dom/README.md new file mode 100644 index 00000000..b078f194 --- /dev/null +++ b/node_modules/react-dom/README.md @@ -0,0 +1,60 @@ +# `react-dom` + +This package serves as the entry point to the DOM and server renderers for React. It is intended to be paired with the generic React package, which is shipped as `react` to npm. + +## Installation + +```sh +npm install react react-dom +``` + +## Usage + +### In the browser + +```js +import { createRoot } from 'react-dom/client'; + +function App() { + return
Hello World
; +} + +const root = createRoot(document.getElementById('root')); +root.render(); +``` + +### On the server + +```js +import { renderToPipeableStream } from 'react-dom/server'; + +function App() { + return
Hello World
; +} + +function handleRequest(res) { + // ... in your server handler ... + const stream = renderToPipeableStream(, { + onShellReady() { + res.statusCode = 200; + res.setHeader('Content-type', 'text/html'); + stream.pipe(res); + }, + // ... + }); +} +``` + +## API + +### `react-dom` + +See https://react.dev/reference/react-dom + +### `react-dom/client` + +See https://react.dev/reference/react-dom/client + +### `react-dom/server` + +See https://react.dev/reference/react-dom/server diff --git a/node_modules/react-dom/cjs/react-dom-client.development.js b/node_modules/react-dom/cjs/react-dom-client.development.js new file mode 100644 index 00000000..771ecad2 --- /dev/null +++ b/node_modules/react-dom/cjs/react-dom-client.development.js @@ -0,0 +1,28121 @@ +/** + * @license React + * react-dom-client.development.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/* + Modernizr 3.0.0pre (Custom Build) | MIT +*/ +"use strict"; +"production" !== process.env.NODE_ENV && + (function () { + function findHook(fiber, id) { + for (fiber = fiber.memoizedState; null !== fiber && 0 < id; ) + (fiber = fiber.next), id--; + return fiber; + } + function copyWithSetImpl(obj, path, index, value) { + if (index >= path.length) return value; + var key = path[index], + updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); + return updated; + } + function copyWithRename(obj, oldPath, newPath) { + if (oldPath.length !== newPath.length) + console.warn("copyWithRename() expects paths of the same length"); + else { + for (var i = 0; i < newPath.length - 1; i++) + if (oldPath[i] !== newPath[i]) { + console.warn( + "copyWithRename() expects paths to be the same except for the deepest key" + ); + return; + } + return copyWithRenameImpl(obj, oldPath, newPath, 0); + } + } + function copyWithRenameImpl(obj, oldPath, newPath, index) { + var oldKey = oldPath[index], + updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + index + 1 === oldPath.length + ? ((updated[newPath[index]] = updated[oldKey]), + isArrayImpl(updated) + ? updated.splice(oldKey, 1) + : delete updated[oldKey]) + : (updated[oldKey] = copyWithRenameImpl( + obj[oldKey], + oldPath, + newPath, + index + 1 + )); + return updated; + } + function copyWithDeleteImpl(obj, path, index) { + var key = path[index], + updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + if (index + 1 === path.length) + return ( + isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], + updated + ); + updated[key] = copyWithDeleteImpl(obj[key], path, index + 1); + return updated; + } + function shouldSuspendImpl() { + return !1; + } + function shouldErrorImpl() { + return null; + } + function warnInvalidHookAccess() { + console.error( + "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" + ); + } + function warnInvalidContextAccess() { + console.error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + } + function noop() {} + function warnForMissingKey() {} + function setToSortedString(set) { + var array = []; + set.forEach(function (value) { + array.push(value); + }); + return array.sort().join(", "); + } + function createFiber(tag, pendingProps, key, mode) { + return new FiberNode(tag, pendingProps, key, mode); + } + function scheduleRoot(root, element) { + root.context === emptyContextObject && + (updateContainerImpl(root.current, 2, element, root, null, null), + flushSyncWork$1()); + } + function scheduleRefresh(root, update) { + if (null !== resolveFamily) { + var staleFamilies = update.staleFamilies; + update = update.updatedFamilies; + flushPendingEffects(); + scheduleFibersWithFamiliesRecursively( + root.current, + update, + staleFamilies + ); + flushSyncWork$1(); + } + } + function setRefreshHandler(handler) { + resolveFamily = handler; + } + function isValidContainer(node) { + return !( + !node || + (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType) + ); + } + function getNearestMountedFiber(fiber) { + var node = fiber, + nearestMounted = fiber; + if (fiber.alternate) for (; node.return; ) node = node.return; + else { + fiber = node; + do + (node = fiber), + 0 !== (node.flags & 4098) && (nearestMounted = node.return), + (fiber = node.return); + while (fiber); + } + return 3 === node.tag ? nearestMounted : null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (13 === fiber.tag) { + var suspenseState = fiber.memoizedState; + null === suspenseState && + ((fiber = fiber.alternate), + null !== fiber && (suspenseState = fiber.memoizedState)); + if (null !== suspenseState) return suspenseState.dehydrated; + } + return null; + } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } + function assertIsMounted(fiber) { + if (getNearestMountedFiber(fiber) !== fiber) + throw Error("Unable to find node on an unmounted component."); + } + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + if (!alternate) { + alternate = getNearestMountedFiber(fiber); + if (null === alternate) + throw Error("Unable to find node on an unmounted component."); + return alternate !== fiber ? null : fiber; + } + for (var a = fiber, b = alternate; ; ) { + var parentA = a.return; + if (null === parentA) break; + var parentB = parentA.alternate; + if (null === parentB) { + b = parentA.return; + if (null !== b) { + a = b; + continue; + } + break; + } + if (parentA.child === parentB.child) { + for (parentB = parentA.child; parentB; ) { + if (parentB === a) return assertIsMounted(parentA), fiber; + if (parentB === b) return assertIsMounted(parentA), alternate; + parentB = parentB.sibling; + } + throw Error("Unable to find node on an unmounted component."); + } + if (a.return !== b.return) (a = parentA), (b = parentB); + else { + for (var didFindChild = !1, _child = parentA.child; _child; ) { + if (_child === a) { + didFindChild = !0; + a = parentA; + b = parentB; + break; + } + if (_child === b) { + didFindChild = !0; + b = parentA; + a = parentB; + break; + } + _child = _child.sibling; + } + if (!didFindChild) { + for (_child = parentB.child; _child; ) { + if (_child === a) { + didFindChild = !0; + a = parentB; + b = parentA; + break; + } + if (_child === b) { + didFindChild = !0; + b = parentB; + a = parentA; + break; + } + _child = _child.sibling; + } + if (!didFindChild) + throw Error( + "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." + ); + } + } + if (a.alternate !== b) + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." + ); + } + if (3 !== a.tag) + throw Error("Unable to find node on an unmounted component."); + return a.stateNode.current === a ? fiber : alternate; + } + function findCurrentHostFiberImpl(node) { + var tag = node.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; + for (node = node.child; null !== node; ) { + tag = findCurrentHostFiberImpl(node); + if (null !== tag) return tag; + node = node.sibling; + } + return null; + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getComponentNameFromOwner(owner) { + return "number" === typeof owner.tag + ? getComponentNameFromFiber(owner) + : "string" === typeof owner.name + ? owner.name + : null; + } + function getComponentNameFromFiber(fiber) { + var type = fiber.type; + switch (fiber.tag) { + case 31: + return "Activity"; + case 24: + return "Cache"; + case 9: + return (type._context.displayName || "Context") + ".Consumer"; + case 10: + return type.displayName || "Context"; + case 18: + return "DehydratedFragment"; + case 11: + return ( + (fiber = type.render), + (fiber = fiber.displayName || fiber.name || ""), + type.displayName || + ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef") + ); + case 7: + return "Fragment"; + case 26: + case 27: + case 5: + return type; + case 4: + return "Portal"; + case 3: + return "Root"; + case 6: + return "Text"; + case 16: + return getComponentNameFromType(type); + case 8: + return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode"; + case 22: + return "Offscreen"; + case 12: + return "Profiler"; + case 21: + return "Scope"; + case 13: + return "Suspense"; + case 19: + return "SuspenseList"; + case 25: + return "TracingMarker"; + case 1: + case 0: + case 14: + case 15: + if ("function" === typeof type) + return type.displayName || type.name || null; + if ("string" === typeof type) return type; + break; + case 29: + type = fiber._debugInfo; + if (null != type) + for (var i = type.length - 1; 0 <= i; i--) + if ("string" === typeof type[i].name) return type[i].name; + if (null !== fiber.return) + return getComponentNameFromFiber(fiber.return); + } + return null; + } + function createCursor(defaultValue) { + return { current: defaultValue }; + } + function pop(cursor, fiber) { + 0 > index$jscomp$0 + ? console.error("Unexpected pop.") + : (fiber !== fiberStack[index$jscomp$0] && + console.error("Unexpected Fiber popped."), + (cursor.current = valueStack[index$jscomp$0]), + (valueStack[index$jscomp$0] = null), + (fiberStack[index$jscomp$0] = null), + index$jscomp$0--); + } + function push(cursor, value, fiber) { + index$jscomp$0++; + valueStack[index$jscomp$0] = cursor.current; + fiberStack[index$jscomp$0] = fiber; + cursor.current = value; + } + function requiredContext(c) { + null === c && + console.error( + "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." + ); + return c; + } + function pushHostContainer(fiber, nextRootInstance) { + push(rootInstanceStackCursor, nextRootInstance, fiber); + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor, null, fiber); + var nextRootContext = nextRootInstance.nodeType; + switch (nextRootContext) { + case 9: + case 11: + nextRootContext = 9 === nextRootContext ? "#document" : "#fragment"; + nextRootInstance = (nextRootInstance = + nextRootInstance.documentElement) + ? (nextRootInstance = nextRootInstance.namespaceURI) + ? getOwnHostContext(nextRootInstance) + : HostContextNamespaceNone + : HostContextNamespaceNone; + break; + default: + if ( + ((nextRootContext = nextRootInstance.tagName), + (nextRootInstance = nextRootInstance.namespaceURI)) + ) + (nextRootInstance = getOwnHostContext(nextRootInstance)), + (nextRootInstance = getChildHostContextProd( + nextRootInstance, + nextRootContext + )); + else + switch (nextRootContext) { + case "svg": + nextRootInstance = HostContextNamespaceSvg; + break; + case "math": + nextRootInstance = HostContextNamespaceMath; + break; + default: + nextRootInstance = HostContextNamespaceNone; + } + } + nextRootContext = nextRootContext.toLowerCase(); + nextRootContext = updatedAncestorInfoDev(null, nextRootContext); + nextRootContext = { + context: nextRootInstance, + ancestorInfo: nextRootContext + }; + pop(contextStackCursor, fiber); + push(contextStackCursor, nextRootContext, fiber); + } + function popHostContainer(fiber) { + pop(contextStackCursor, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + function getHostContext() { + return requiredContext(contextStackCursor.current); + } + function pushHostContext(fiber) { + null !== fiber.memoizedState && + push(hostTransitionProviderCursor, fiber, fiber); + var context = requiredContext(contextStackCursor.current); + var type = fiber.type; + var nextContext = getChildHostContextProd(context.context, type); + type = updatedAncestorInfoDev(context.ancestorInfo, type); + nextContext = { context: nextContext, ancestorInfo: type }; + context !== nextContext && + (push(contextFiberStackCursor, fiber, fiber), + push(contextStackCursor, nextContext, fiber)); + } + function popHostContext(fiber) { + contextFiberStackCursor.current === fiber && + (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber)); + hostTransitionProviderCursor.current === fiber && + (pop(hostTransitionProviderCursor, fiber), + (HostTransitionContext._currentValue = NotPendingTransition)); + } + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); + } + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); + } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + for ( + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); + } + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; + } + function describeFiber(fiber, childFiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return fiber.child !== childFiber && null !== childFiber + ? describeBuiltInComponentFrame("Suspense Fallback") + : describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = "", + previous = null; + do { + info += describeFiber(workInProgress, previous); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info; + a: { + var name = entry.name, + env = entry.env, + location = entry.debugLocation; + if (null != location) { + var childStack = formatOwnerStack(location), + idx = childStack.lastIndexOf("\n"), + lastLine = + -1 === idx ? childStack : childStack.slice(idx + 1); + if (-1 !== lastLine.indexOf(name)) { + var JSCompiler_inline_result = "\n" + lastLine; + break a; + } + } + JSCompiler_inline_result = describeBuiltInComponentFrame( + name + (env ? " [" + env + "]" : "") + ); + } + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + previous = workInProgress; + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + if (workInProgress && debugStack) { + var formattedStack = formatOwnerStack(debugStack); + "" !== formattedStack && (info += "\n" + formattedStack); + } + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result; + } + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); + try { + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); + } finally { + setCurrentFiber(previousFiber); + } + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); + } + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; + } + function typeName(value) { + return ( + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object" + ); + } + function willCoercionThrow(value) { + try { + return testStringCoercion(value), !1; + } catch (e) { + return !0; + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), + testStringCoercion(value) + ); + } + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), + testStringCoercion(value) + ); + } + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return ( + console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), + testStringCoercion(value) + ); + } + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return !0; + if (!hook.supportsFiber) + return ( + console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), + !0 + ); + try { + (rendererID = hook.inject(internals)), (injectedHook = hook); + } catch (err) { + console.error("React instrumentation encountered an error: %o.", err); + } + return hook.checkDCE ? !0 : !1; + } + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %o", + err + )); + } + } + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; + } + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + return lanes & 261888; + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 3932160; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); + } + } + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; + } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); + } + } + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; + } + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; + } + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); + } + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; + + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) + for ( + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 261930); + } + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; + + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; + if ( + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) + ) + for ( + targetNode = getParentHydrationBoundary(targetNode); + null !== targetNode; + + ) { + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentHydrationBoundary(targetNode); + } + return targetInst; + } + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + return null; + } + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 31 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; + } + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; + } + } + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; + } + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } + } + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } + } + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); + } + } + function getToStringValue(value) { + switch (typeof value) { + case "bigint": + case "boolean": + case "number": + case "string": + case "undefined": + return value; + case "object": + return checkFormFieldValueStringCoercion(value), value; + default: + return ""; + } + } + function isCheckable(elem) { + var type = elem.type; + return ( + (elem = elem.nodeName) && + "input" === elem.toLowerCase() && + ("checkbox" === type || "radio" === type) + ); + } + function trackValueOnNode(node, valueField, currentValue) { + var descriptor = Object.getOwnPropertyDescriptor( + node.constructor.prototype, + valueField + ); + if ( + !node.hasOwnProperty(valueField) && + "undefined" !== typeof descriptor && + "function" === typeof descriptor.get && + "function" === typeof descriptor.set + ) { + var get = descriptor.get, + set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: !0, + get: function () { + return get.call(this); + }, + set: function (value) { + checkFormFieldValueStringCoercion(value); + currentValue = "" + value; + set.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + return { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + checkFormFieldValueStringCoercion(value); + currentValue = "" + value; + }, + stopTracking: function () { + node._valueTracker = null; + delete node[valueField]; + } + }; + } + } + function track(node) { + if (!node._valueTracker) { + var valueField = isCheckable(node) ? "checked" : "value"; + node._valueTracker = trackValueOnNode( + node, + valueField, + "" + node[valueField] + ); + } + } + function updateValueIfChanged(node) { + if (!node) return !1; + var tracker = node._valueTracker; + if (!tracker) return !0; + var lastValue = tracker.getValue(); + var value = ""; + node && + (value = isCheckable(node) + ? node.checked + ? "true" + : "false" + : node.value); + node = value; + return node !== lastValue ? (tracker.setValue(node), !0) : !1; + } + function getActiveElement(doc) { + doc = doc || ("undefined" !== typeof document ? document : void 0); + if ("undefined" === typeof doc) return null; + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + function escapeSelectorAttributeValueInsideDoubleQuotes(value) { + return value.replace( + escapeSelectorAttributeValueInsideDoubleQuotesRegex, + function (ch) { + return "\\" + ch.charCodeAt(0).toString(16) + " "; + } + ); + } + function validateInputProps(element, props) { + void 0 === props.checked || + void 0 === props.defaultChecked || + didWarnCheckedDefaultChecked || + (console.error( + "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", + getCurrentFiberOwnerNameInDevOrNull() || "A component", + props.type + ), + (didWarnCheckedDefaultChecked = !0)); + void 0 === props.value || + void 0 === props.defaultValue || + didWarnValueDefaultValue$1 || + (console.error( + "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", + getCurrentFiberOwnerNameInDevOrNull() || "A component", + props.type + ), + (didWarnValueDefaultValue$1 = !0)); + } + function updateInput( + element, + value, + defaultValue, + lastDefaultValue, + checked, + defaultChecked, + type, + name + ) { + element.name = ""; + null != type && + "function" !== typeof type && + "symbol" !== typeof type && + "boolean" !== typeof type + ? (checkAttributeStringCoercion(type, "type"), (element.type = type)) + : element.removeAttribute("type"); + if (null != value) + if ("number" === type) { + if ((0 === value && "" === element.value) || element.value != value) + element.value = "" + getToStringValue(value); + } else + element.value !== "" + getToStringValue(value) && + (element.value = "" + getToStringValue(value)); + else + ("submit" !== type && "reset" !== type) || + element.removeAttribute("value"); + null != value + ? setDefaultValue(element, type, getToStringValue(value)) + : null != defaultValue + ? setDefaultValue(element, type, getToStringValue(defaultValue)) + : null != lastDefaultValue && element.removeAttribute("value"); + null == checked && + null != defaultChecked && + (element.defaultChecked = !!defaultChecked); + null != checked && + (element.checked = + checked && + "function" !== typeof checked && + "symbol" !== typeof checked); + null != name && + "function" !== typeof name && + "symbol" !== typeof name && + "boolean" !== typeof name + ? (checkAttributeStringCoercion(name, "name"), + (element.name = "" + getToStringValue(name))) + : element.removeAttribute("name"); + } + function initInput( + element, + value, + defaultValue, + checked, + defaultChecked, + type, + name, + isHydrating + ) { + null != type && + "function" !== typeof type && + "symbol" !== typeof type && + "boolean" !== typeof type && + (checkAttributeStringCoercion(type, "type"), (element.type = type)); + if (null != value || null != defaultValue) { + if ( + !( + ("submit" !== type && "reset" !== type) || + (void 0 !== value && null !== value) + ) + ) { + track(element); + return; + } + defaultValue = + null != defaultValue ? "" + getToStringValue(defaultValue) : ""; + value = null != value ? "" + getToStringValue(value) : defaultValue; + isHydrating || value === element.value || (element.value = value); + element.defaultValue = value; + } + checked = null != checked ? checked : defaultChecked; + checked = + "function" !== typeof checked && + "symbol" !== typeof checked && + !!checked; + element.checked = isHydrating ? element.checked : !!checked; + element.defaultChecked = !!checked; + null != name && + "function" !== typeof name && + "symbol" !== typeof name && + "boolean" !== typeof name && + (checkAttributeStringCoercion(name, "name"), (element.name = name)); + track(element); + } + function setDefaultValue(node, type, value) { + ("number" === type && getActiveElement(node.ownerDocument) === node) || + node.defaultValue === "" + value || + (node.defaultValue = "" + value); + } + function validateOptionProps(element, props) { + null == props.value && + ("object" === typeof props.children && null !== props.children + ? React.Children.forEach(props.children, function (child) { + null == child || + "string" === typeof child || + "number" === typeof child || + "bigint" === typeof child || + didWarnInvalidChild || + ((didWarnInvalidChild = !0), + console.error( + "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to