tmex-cli 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime/server.js +18 -0
- package/package.json +1 -1
- package/resources/fe-dist/assets/{DevicePage-n4JoyDed.js → DevicePage-CKaPUo7L.js} +2 -2
- package/resources/fe-dist/assets/{DevicePage-n4JoyDed.js.map → DevicePage-CKaPUo7L.js.map} +1 -1
- package/resources/fe-dist/assets/DevicesPage-FqU-Dxhu.js +17 -0
- package/resources/fe-dist/assets/{DevicesPage-BwLKaiUR.js.map → DevicesPage-FqU-Dxhu.js.map} +1 -1
- package/resources/fe-dist/assets/{SettingsPage-hS99lHcp.js → SettingsPage-BfkOW0fc.js} +2 -2
- package/resources/fe-dist/assets/{SettingsPage-hS99lHcp.js.map → SettingsPage-BfkOW0fc.js.map} +1 -1
- package/resources/fe-dist/assets/{index-CJyFlAt8.js → index-EgHfq93I.js} +6 -6
- package/resources/fe-dist/assets/index-EgHfq93I.js.map +1 -0
- package/resources/fe-dist/assets/index-Ytlj3p_q.css +1 -0
- package/resources/fe-dist/assets/{select-DGBwxGiK.js → select-CNlE6MiW.js} +3 -3
- package/resources/fe-dist/assets/{select-DGBwxGiK.js.map → select-CNlE6MiW.js.map} +1 -1
- package/resources/fe-dist/assets/{switch-CWUBjs7N.js → switch-CxkzOIL6.js} +2 -2
- package/resources/fe-dist/assets/{switch-CWUBjs7N.js.map → switch-CxkzOIL6.js.map} +1 -1
- package/resources/fe-dist/assets/{useValueChanged-DwJ_SDCu.js → useValueChanged-CO2U5MoL.js} +2 -2
- package/resources/fe-dist/assets/{useValueChanged-DwJ_SDCu.js.map → useValueChanged-CO2U5MoL.js.map} +1 -1
- package/resources/fe-dist/index.html +2 -2
- package/resources/fe-dist/assets/DevicesPage-BwLKaiUR.js +0 -17
- package/resources/fe-dist/assets/index-CJaX5rlK.css +0 -1
- package/resources/fe-dist/assets/index-CJyFlAt8.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,r as d,ac as re,v as oe,w as ce,b6 as le,a5 as ue,q as fe,s as he,x as T,C as w,Z as pe,bm as me,bn as ke,E as be,b7 as ve,j as K,k as xe}from"./index-
|
|
1
|
+
import{c as F,r as d,ac as re,v as oe,w as ce,b6 as le,a5 as ue,q as fe,s as he,x as T,C as w,Z as pe,bm as me,bn as ke,E as be,b7 as ve,j as K,k as xe}from"./index-EgHfq93I.js";import{l as ge,m as ye,u as q,i as we,j as Ce,k as Ee,n as Ne}from"./useValueChanged-CO2U5MoL.js";/**
|
|
2
2
|
* @license lucide-react v0.564.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -9,4 +9,4 @@ import{c as F,r as d,ac as re,v as oe,w as ce,b6 as le,a5 as ue,q as fe,s as he,
|
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/const ze=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Be=F("send",ze),C=d.createContext(void 0);C.displayName="SwitchRootContext";function Pe(){const e=d.useContext(C);if(e===void 0)throw new Error("Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");return e}let L=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const _={...ge,checked(e){return e?{[L.checked]:""}:{[L.unchecked]:""}}},U=d.forwardRef(function(i,c){const{checked:E,className:H,defaultChecked:m,id:k,inputRef:b,name:v,nativeButton:x=!1,onCheckedChange:J,readOnly:f=!1,required:l=!1,disabled:Y=!1,render:Ie,uncheckedValue:N,value:g,...Z}=i,{clearErrors:$}=ye(),{state:R,setTouched:G,setDirty:Q,validityData:W,setFilled:y,setFocused:z,shouldValidateOnChange:X,validationMode:D,disabled:A,name:ee,validation:s}=q(),{labelId:ae}=we(),n=A||Y,r=ee??v,h=re(J),o=d.useRef(null),P=oe(o,b,s.inputRef),p=d.useRef(null),I=ce(),S=Ce({id:k,implicit:!1,controlRef:p}),j=x?void 0:S,[t,V]=le({controlled:E,default:!!m,name:"Switch",state:"checked"});Ee({id:I,commit:s.commit,value:t,controlRef:p,name:r,getValue:()=>t}),ue(()=>{o.current&&y(o.current.checked)},[o,y]),Ne(t,()=>{$(r),Q(t!==W.initialValue),y(t),X()?s.commit(t):s.commit(t,!0)});const{getButtonProps:te,buttonRef:se}=fe({disabled:n,native:x}),ne={id:x?S:I,role:"switch","aria-checked":t,"aria-readonly":f||void 0,"aria-required":l||void 0,"aria-labelledby":ae,onFocus(){n||z(!0)},onBlur(){const a=o.current;!a||n||(G(!0),z(!1),D==="onBlur"&&s.commit(a.checked))},onClick(a){var u;f||n||(a.preventDefault(),(u=o.current)==null||u.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey})))}},de=d.useMemo(()=>he({checked:t,disabled:n,id:j,name:r,required:l,style:r?me:ke,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:P,onChange(a){if(a.nativeEvent.defaultPrevented)return;const u=a.target.checked,M=be(ve,a.nativeEvent);h==null||h(u,M),!M.isCanceled&&V(u)},onFocus(){var a;(a=p.current)==null||a.focus()}},s.getInputValidationProps,g!==void 0?{value:g}:pe),[t,n,P,j,r,h,l,V,s,g]),B=d.useMemo(()=>({...R,checked:t,disabled:n,readOnly:f,required:l}),[R,t,n,f,l]),ie=T("span",i,{state:B,ref:[c,p,se],props:[ne,s.getValidationProps,Z,te],stateAttributesMapping:_});return w.jsxs(C.Provider,{value:B,children:[ie,!t&&r&&N!==void 0&&w.jsx("input",{type:"hidden",name:r,value:N}),w.jsx("input",{...de})]})});U.displayName="SwitchRoot";const O=d.forwardRef(function(i,c){const{render:E,className:H,...m}=i,{state:k}=q(),b=Pe(),v={...k,...b};return T("span",i,{state:v,ref:c,stateAttributesMapping:_,props:m})});O.displayName="SwitchThumb";function Me({className:e,size:i="default",...c}){return K.jsxDEV(U,{"data-slot":"switch","data-size":i,className:xe("data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...c,children:K.jsxDEV(O,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/switch.tsx",lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/switch.tsx",lineNumber:13,columnNumber:5},this)}export{Ve as L,Me as S,Be as a};
|
|
12
|
-
//# sourceMappingURL=switch-
|
|
12
|
+
//# sourceMappingURL=switch-CxkzOIL6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-CWUBjs7N.js","sources":["../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/send.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRootContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRootDataAttributes.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/stateAttributesMapping.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRoot.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/thumb/SwitchThumb.js","../../src/components/ui/switch.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]];\nconst LoaderCircle = createLucideIcon(\"loader-circle\", __iconNode);\n\nexport { __iconNode, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\"\n }\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }]\n];\nconst Send = createLucideIcon(\"send\", __iconNode);\n\nexport { __iconNode, Send as default };\n//# sourceMappingURL=send.js.map\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SwitchRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SwitchRootContext.displayName = \"SwitchRootContext\";\nexport function useSwitchRootContext() {\n const context = React.useContext(SwitchRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.' : _formatErrorMessage(63));\n }\n return context;\n}","export let SwitchRootDataAttributes = /*#__PURE__*/function (SwitchRootDataAttributes) {\n /**\n * Present when the switch is checked.\n */\n SwitchRootDataAttributes[\"checked\"] = \"data-checked\";\n /**\n * Present when the switch is not checked.\n */\n SwitchRootDataAttributes[\"unchecked\"] = \"data-unchecked\";\n /**\n * Present when the switch is disabled.\n */\n SwitchRootDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the switch is readonly.\n */\n SwitchRootDataAttributes[\"readonly\"] = \"data-readonly\";\n /**\n * Present when the switch is required.\n */\n SwitchRootDataAttributes[\"required\"] = \"data-required\";\n /**\n * Present when the switch is in valid state (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the switch is in invalid state (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the switch has been touched (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the switch's value has changed (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the switch is active (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the switch is focused (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"focused\"] = \"data-focused\";\n return SwitchRootDataAttributes;\n}({});","import { fieldValidityMapping } from \"../field/utils/constants.js\";\nimport { SwitchRootDataAttributes } from \"./root/SwitchRootDataAttributes.js\";\nexport const stateAttributesMapping = {\n ...fieldValidityMapping,\n checked(value) {\n if (value) {\n return {\n [SwitchRootDataAttributes.checked]: ''\n };\n }\n return {\n [SwitchRootDataAttributes.unchecked]: ''\n };\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { mergeProps } from \"../../merge-props/index.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { SwitchRootContext } from \"./SwitchRootContext.js\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.js\";\nimport { useField } from \"../../field/useField.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { useFormContext } from \"../../form/FormContext.js\";\nimport { useLabelableContext } from \"../../labelable-provider/LabelableContext.js\";\nimport { useLabelableId } from \"../../labelable-provider/useLabelableId.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useValueChanged } from \"../../utils/useValueChanged.js\";\n\n/**\n * Represents the switch itself.\n * Renders a `<span>` element and a hidden `<input>` beside.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(componentProps, forwardedRef) {\n const {\n checked: checkedProp,\n className,\n defaultChecked,\n id: idProp,\n inputRef: externalInputRef,\n name: nameProp,\n nativeButton = false,\n onCheckedChange: onCheckedChangeProp,\n readOnly = false,\n required = false,\n disabled: disabledProp = false,\n render,\n uncheckedValue,\n value,\n ...elementProps\n } = componentProps;\n const {\n clearErrors\n } = useFormContext();\n const {\n state: fieldState,\n setTouched,\n setDirty,\n validityData,\n setFilled,\n setFocused,\n shouldValidateOnChange,\n validationMode,\n disabled: fieldDisabled,\n name: fieldName,\n validation\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const onCheckedChange = useStableCallback(onCheckedChangeProp);\n const inputRef = React.useRef(null);\n const handleInputRef = useMergedRefs(inputRef, externalInputRef, validation.inputRef);\n const switchRef = React.useRef(null);\n const id = useBaseUiId();\n const controlId = useLabelableId({\n id: idProp,\n implicit: false,\n controlRef: switchRef\n });\n const hiddenInputId = nativeButton ? undefined : controlId;\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'Switch',\n state: 'checked'\n });\n useField({\n id,\n commit: validation.commit,\n value: checked,\n controlRef: switchRef,\n name,\n getValue: () => checked\n });\n useIsoLayoutEffect(() => {\n if (inputRef.current) {\n setFilled(inputRef.current.checked);\n }\n }, [inputRef, setFilled]);\n useValueChanged(checked, () => {\n clearErrors(name);\n setDirty(checked !== validityData.initialValue);\n setFilled(checked);\n if (shouldValidateOnChange()) {\n validation.commit(checked);\n } else {\n validation.commit(checked, true);\n }\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const rootProps = {\n id: nativeButton ? controlId : id,\n role: 'switch',\n 'aria-checked': checked,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n 'aria-labelledby': labelId,\n onFocus() {\n if (!disabled) {\n setFocused(true);\n }\n },\n onBlur() {\n const element = inputRef.current;\n if (!element || disabled) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(element.checked);\n }\n },\n onClick(event) {\n if (readOnly || disabled) {\n return;\n }\n event.preventDefault();\n inputRef.current?.dispatchEvent(new PointerEvent('click', {\n bubbles: true,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n altKey: event.altKey,\n metaKey: event.metaKey\n }));\n }\n };\n const inputProps = React.useMemo(() => mergeProps({\n checked,\n disabled,\n id: hiddenInputId,\n name,\n required,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n type: 'checkbox',\n 'aria-hidden': true,\n ref: handleInputRef,\n onChange(event) {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n const nextChecked = event.target.checked;\n const eventDetails = createChangeEventDetails(REASONS.none, event.nativeEvent);\n onCheckedChange?.(nextChecked, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setCheckedState(nextChecked);\n },\n onFocus() {\n switchRef.current?.focus();\n }\n }, validation.getInputValidationProps,\n // React <19 sets an empty value if `undefined` is passed explicitly\n // To avoid this, we only set the value if it's defined\n value !== undefined ? {\n value\n } : EMPTY_OBJECT), [checked, disabled, handleInputRef, hiddenInputId, name, onCheckedChange, required, setCheckedState, validation, value]);\n const state = React.useMemo(() => ({\n ...fieldState,\n checked,\n disabled,\n readOnly,\n required\n }), [fieldState, checked, disabled, readOnly, required]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, switchRef, buttonRef],\n props: [rootProps, validation.getValidationProps, elementProps, getButtonProps],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsxs(SwitchRootContext.Provider, {\n value: state,\n children: [element, !checked && name && uncheckedValue !== undefined && /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n name: name,\n value: uncheckedValue\n }), /*#__PURE__*/_jsx(\"input\", {\n ...inputProps\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchRoot.displayName = \"SwitchRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useSwitchRootContext } from \"../root/SwitchRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.js\";\n\n/**\n * The movable part of the switch that indicates whether the switch is on or off.\n * Renders a `<span>`.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nexport const SwitchThumb = /*#__PURE__*/React.forwardRef(function SwitchThumb(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState\n } = useFieldRootContext();\n const state = useSwitchRootContext();\n const extendedState = {\n ...fieldState,\n ...state\n };\n return useRenderElement('span', componentProps, {\n state: extendedState,\n ref: forwardedRef,\n stateAttributesMapping,\n props: elementProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchThumb.displayName = \"SwitchThumb\";","import { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: SwitchPrimitive.Root.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n"],"names":["__iconNode","LoaderCircle","createLucideIcon","Send","SwitchRootContext","React.createContext","useSwitchRootContext","context","React.useContext","SwitchRootDataAttributes","stateAttributesMapping","fieldValidityMapping","value","SwitchRoot","React.forwardRef","componentProps","forwardedRef","checkedProp","className","defaultChecked","idProp","externalInputRef","nameProp","nativeButton","onCheckedChangeProp","readOnly","required","disabledProp","render","uncheckedValue","elementProps","clearErrors","useFormContext","fieldState","setTouched","setDirty","validityData","setFilled","setFocused","shouldValidateOnChange","validationMode","fieldDisabled","fieldName","validation","useFieldRootContext","labelId","useLabelableContext","disabled","name","onCheckedChange","useStableCallback","inputRef","React.useRef","handleInputRef","useMergedRefs","switchRef","id","useBaseUiId","controlId","useLabelableId","hiddenInputId","checked","setCheckedState","useControlled","useField","useIsoLayoutEffect","useValueChanged","getButtonProps","buttonRef","useButton","rootProps","element","event","_a","inputProps","React.useMemo","mergeProps","visuallyHiddenInput","visuallyHidden","nextChecked","eventDetails","createChangeEventDetails","REASONS.none","EMPTY_OBJECT","state","useRenderElement","_jsxs","_jsx","SwitchThumb","extendedState","Switch","size","props","jsxDEV","SwitchPrimitive.Root","cn","SwitchPrimitive.Thumb"],"mappings":"oRAAA;AAAA;AAAA;AAAA;AAAA;AAAA,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A,GAAA,CAAA,SAAA,sEAAA,WAAA,GAAA,aAAA,CAAA,EAAA,IAAA,CAeJ","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
|
1
|
+
{"version":3,"file":"switch-CxkzOIL6.js","sources":["../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/send.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRootContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRootDataAttributes.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/stateAttributesMapping.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/root/SwitchRoot.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/switch/thumb/SwitchThumb.js","../../src/components/ui/switch.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]];\nconst LoaderCircle = createLucideIcon(\"loader-circle\", __iconNode);\n\nexport { __iconNode, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\"\n }\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }]\n];\nconst Send = createLucideIcon(\"send\", __iconNode);\n\nexport { __iconNode, Send as default };\n//# sourceMappingURL=send.js.map\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SwitchRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SwitchRootContext.displayName = \"SwitchRootContext\";\nexport function useSwitchRootContext() {\n const context = React.useContext(SwitchRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.' : _formatErrorMessage(63));\n }\n return context;\n}","export let SwitchRootDataAttributes = /*#__PURE__*/function (SwitchRootDataAttributes) {\n /**\n * Present when the switch is checked.\n */\n SwitchRootDataAttributes[\"checked\"] = \"data-checked\";\n /**\n * Present when the switch is not checked.\n */\n SwitchRootDataAttributes[\"unchecked\"] = \"data-unchecked\";\n /**\n * Present when the switch is disabled.\n */\n SwitchRootDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the switch is readonly.\n */\n SwitchRootDataAttributes[\"readonly\"] = \"data-readonly\";\n /**\n * Present when the switch is required.\n */\n SwitchRootDataAttributes[\"required\"] = \"data-required\";\n /**\n * Present when the switch is in valid state (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the switch is in invalid state (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the switch has been touched (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the switch's value has changed (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the switch is active (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the switch is focused (when wrapped in Field.Root).\n */\n SwitchRootDataAttributes[\"focused\"] = \"data-focused\";\n return SwitchRootDataAttributes;\n}({});","import { fieldValidityMapping } from \"../field/utils/constants.js\";\nimport { SwitchRootDataAttributes } from \"./root/SwitchRootDataAttributes.js\";\nexport const stateAttributesMapping = {\n ...fieldValidityMapping,\n checked(value) {\n if (value) {\n return {\n [SwitchRootDataAttributes.checked]: ''\n };\n }\n return {\n [SwitchRootDataAttributes.unchecked]: ''\n };\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { mergeProps } from \"../../merge-props/index.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { SwitchRootContext } from \"./SwitchRootContext.js\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.js\";\nimport { useField } from \"../../field/useField.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { useFormContext } from \"../../form/FormContext.js\";\nimport { useLabelableContext } from \"../../labelable-provider/LabelableContext.js\";\nimport { useLabelableId } from \"../../labelable-provider/useLabelableId.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useValueChanged } from \"../../utils/useValueChanged.js\";\n\n/**\n * Represents the switch itself.\n * Renders a `<span>` element and a hidden `<input>` beside.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(componentProps, forwardedRef) {\n const {\n checked: checkedProp,\n className,\n defaultChecked,\n id: idProp,\n inputRef: externalInputRef,\n name: nameProp,\n nativeButton = false,\n onCheckedChange: onCheckedChangeProp,\n readOnly = false,\n required = false,\n disabled: disabledProp = false,\n render,\n uncheckedValue,\n value,\n ...elementProps\n } = componentProps;\n const {\n clearErrors\n } = useFormContext();\n const {\n state: fieldState,\n setTouched,\n setDirty,\n validityData,\n setFilled,\n setFocused,\n shouldValidateOnChange,\n validationMode,\n disabled: fieldDisabled,\n name: fieldName,\n validation\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const onCheckedChange = useStableCallback(onCheckedChangeProp);\n const inputRef = React.useRef(null);\n const handleInputRef = useMergedRefs(inputRef, externalInputRef, validation.inputRef);\n const switchRef = React.useRef(null);\n const id = useBaseUiId();\n const controlId = useLabelableId({\n id: idProp,\n implicit: false,\n controlRef: switchRef\n });\n const hiddenInputId = nativeButton ? undefined : controlId;\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'Switch',\n state: 'checked'\n });\n useField({\n id,\n commit: validation.commit,\n value: checked,\n controlRef: switchRef,\n name,\n getValue: () => checked\n });\n useIsoLayoutEffect(() => {\n if (inputRef.current) {\n setFilled(inputRef.current.checked);\n }\n }, [inputRef, setFilled]);\n useValueChanged(checked, () => {\n clearErrors(name);\n setDirty(checked !== validityData.initialValue);\n setFilled(checked);\n if (shouldValidateOnChange()) {\n validation.commit(checked);\n } else {\n validation.commit(checked, true);\n }\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const rootProps = {\n id: nativeButton ? controlId : id,\n role: 'switch',\n 'aria-checked': checked,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n 'aria-labelledby': labelId,\n onFocus() {\n if (!disabled) {\n setFocused(true);\n }\n },\n onBlur() {\n const element = inputRef.current;\n if (!element || disabled) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(element.checked);\n }\n },\n onClick(event) {\n if (readOnly || disabled) {\n return;\n }\n event.preventDefault();\n inputRef.current?.dispatchEvent(new PointerEvent('click', {\n bubbles: true,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n altKey: event.altKey,\n metaKey: event.metaKey\n }));\n }\n };\n const inputProps = React.useMemo(() => mergeProps({\n checked,\n disabled,\n id: hiddenInputId,\n name,\n required,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n type: 'checkbox',\n 'aria-hidden': true,\n ref: handleInputRef,\n onChange(event) {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n const nextChecked = event.target.checked;\n const eventDetails = createChangeEventDetails(REASONS.none, event.nativeEvent);\n onCheckedChange?.(nextChecked, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setCheckedState(nextChecked);\n },\n onFocus() {\n switchRef.current?.focus();\n }\n }, validation.getInputValidationProps,\n // React <19 sets an empty value if `undefined` is passed explicitly\n // To avoid this, we only set the value if it's defined\n value !== undefined ? {\n value\n } : EMPTY_OBJECT), [checked, disabled, handleInputRef, hiddenInputId, name, onCheckedChange, required, setCheckedState, validation, value]);\n const state = React.useMemo(() => ({\n ...fieldState,\n checked,\n disabled,\n readOnly,\n required\n }), [fieldState, checked, disabled, readOnly, required]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, switchRef, buttonRef],\n props: [rootProps, validation.getValidationProps, elementProps, getButtonProps],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsxs(SwitchRootContext.Provider, {\n value: state,\n children: [element, !checked && name && uncheckedValue !== undefined && /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n name: name,\n value: uncheckedValue\n }), /*#__PURE__*/_jsx(\"input\", {\n ...inputProps\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchRoot.displayName = \"SwitchRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useSwitchRootContext } from \"../root/SwitchRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.js\";\n\n/**\n * The movable part of the switch that indicates whether the switch is on or off.\n * Renders a `<span>`.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nexport const SwitchThumb = /*#__PURE__*/React.forwardRef(function SwitchThumb(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState\n } = useFieldRootContext();\n const state = useSwitchRootContext();\n const extendedState = {\n ...fieldState,\n ...state\n };\n return useRenderElement('span', componentProps, {\n state: extendedState,\n ref: forwardedRef,\n stateAttributesMapping,\n props: elementProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchThumb.displayName = \"SwitchThumb\";","import { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: SwitchPrimitive.Root.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n"],"names":["__iconNode","LoaderCircle","createLucideIcon","Send","SwitchRootContext","React.createContext","useSwitchRootContext","context","React.useContext","SwitchRootDataAttributes","stateAttributesMapping","fieldValidityMapping","value","SwitchRoot","React.forwardRef","componentProps","forwardedRef","checkedProp","className","defaultChecked","idProp","externalInputRef","nameProp","nativeButton","onCheckedChangeProp","readOnly","required","disabledProp","render","uncheckedValue","elementProps","clearErrors","useFormContext","fieldState","setTouched","setDirty","validityData","setFilled","setFocused","shouldValidateOnChange","validationMode","fieldDisabled","fieldName","validation","useFieldRootContext","labelId","useLabelableContext","disabled","name","onCheckedChange","useStableCallback","inputRef","React.useRef","handleInputRef","useMergedRefs","switchRef","id","useBaseUiId","controlId","useLabelableId","hiddenInputId","checked","setCheckedState","useControlled","useField","useIsoLayoutEffect","useValueChanged","getButtonProps","buttonRef","useButton","rootProps","element","event","_a","inputProps","React.useMemo","mergeProps","visuallyHiddenInput","visuallyHidden","nextChecked","eventDetails","createChangeEventDetails","REASONS.none","EMPTY_OBJECT","state","useRenderElement","_jsxs","_jsx","SwitchThumb","extendedState","Switch","size","props","jsxDEV","SwitchPrimitive.Root","cn","Sw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A,sEAAA,WAAA,GAAA,aAAA,CAAA,EAAA,IAAA,CAGA,EAZF,OAAA,GAAA,CAAA,SAAA,sEAAA,WAAA,GAAA,aAAA,CAAA,EAAA,IAAA,CAeJ","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
package/resources/fe-dist/assets/{useValueChanged-DwJ_SDCu.js → useValueChanged-CO2U5MoL.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{c as R,r as c,bC as i,Z as C,w as L,Y as y,ac as N,a5 as v,bD as j,aE as w,bE as z,bF as U,C as M,bG as P,bH as T,j as l,g as A,k as p,l as F,m as O,h as S,B as V,n as _,o as B}from"./index-
|
|
1
|
+
import{c as R,r as c,bC as i,Z as C,w as L,Y as y,ac as N,a5 as v,bD as j,aE as w,bE as z,bF as U,C as M,bG as P,bH as T,j as l,g as A,k as p,l as F,m as O,h as S,B as V,n as _,o as B}from"./index-EgHfq93I.js";/**
|
|
2
2
|
* @license lucide-react v0.564.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/const H=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$=R("trash-2",H);let D=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Y={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ee={valid(e){return e===null?null:e?{[D.valid]:""}:{[D.invalid]:""}}},k=c.createContext({invalid:void 0,name:void 0,validityData:{state:Y,errors:[],error:"",value:"",initialValue:null},setValidityData:i,disabled:void 0,touched:!1,setTouched:i,dirty:!1,setDirty:i,filled:!1,setFilled:i,focused:!1,setFocused:i,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=C)=>e,getInputValidationProps:(e=C)=>e,inputRef:{current:null},commit:async()=>{}}});k.displayName="FieldRootContext";function G(e=!0){const t=c.useContext(k);if(t.setValidityData===i&&!e)throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");return t}const E=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:i,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});E.displayName="FormContext";function J(){return c.useContext(E)}const I=c.createContext({controlId:void 0,registerControlId:i,labelId:void 0,setLabelId:i,messageIds:[],setMessageIds:i,getDescriptionProps:e=>e});I.displayName="LabelableContext";function W(){return c.useContext(I)}function Z(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function te(e={}){const{id:t,implicit:o=!1,controlRef:s}=e,{controlId:h,registerControlId:f}=W(),m=L(t),d=o?h:void 0,g=y(()=>Symbol("labelable-control")),x=c.useRef(!1),n=c.useRef(t!=null),u=N(()=>{!x.current||f===i||(x.current=!1,f(g.current,void 0))});return v(()=>{if(f===i)return;let a;if(o){const r=s==null?void 0:s.current;j(r)&&r.closest("label")!=null?a=t??null:a=d??m}else if(t!=null)n.current=!0,a=t;else if(n.current)a=m;else{u();return}if(a===void 0){u();return}x.current=!0,f(g.current,a)},[t,s,d,f,o,m,g,u]),c.useEffect(()=>u,[u]),h??m}function ae(e){const{enabled:t=!0,value:o,id:s,name:h,controlRef:f,commit:m}=e,{formRef:d}=J(),{invalid:g,markedDirtyRef:x,validityData:n,setValidityData:u}=G(),a=N(e.getValue);v(()=>{if(!t)return;let r=o;r===void 0&&(r=a()),n.initialValue===null&&r!==null&&u(b=>({...b,initialValue:r}))},[t,u,o,n.initialValue,a]),v(()=>{!t||!s||d.current.fields.set(s,{getValue:a,name:h,controlRef:f,validityData:Z(n,g),validate(r=!0){let b=o;b===void 0&&(b=a()),x.current=!0,r?w.flushSync(()=>m(b)):m(b)}})},[m,f,t,d,a,s,g,x,h,n,o]),v(()=>{const r=d.current.fields;return()=>{s&&r.delete(s)}},[d,s])}function q(e){const{children:t,open:o,defaultOpen:s=!1,onOpenChange:h,onOpenChangeComplete:f,actionsRef:m,handle:d,triggerId:g,defaultTriggerId:x=null}=e,n=z(),u=!!n,a=y(()=>(d==null?void 0:d.store)??new T({open:s,openProp:o,activeTriggerId:x,triggerIdProp:g,modal:!0,disablePointerDismissal:!0,nested:u,role:"alertdialog"})).current;a.useControlledProp("openProp",o),a.useControlledProp("triggerIdProp",g),a.useSyncedValue("nested",u),a.useContextCallback("onOpenChange",h),a.useContextCallback("onOpenChangeComplete",f);const r=a.useState("payload");U({store:a,actionsRef:m,parentContext:n==null?void 0:n.store.context});const b=c.useMemo(()=>({store:a}),[a]);return M.jsx(P.Provider,{value:b,children:typeof t=="function"?t({payload:r}):t})}function oe({...e}){return l.jsxDEV(q,{"data-slot":"alert-dialog",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:10,columnNumber:10},this)}function K({...e}){return l.jsxDEV(_,{"data-slot":"alert-dialog-portal",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:21,columnNumber:5},this)}function Q({className:e,...t}){return l.jsxDEV(B,{"data-slot":"alert-dialog-overlay",className:p("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:30,columnNumber:5},this)}function se({className:e,size:t="default",...o}){return l.jsxDEV(K,{children:[l.jsxDEV(Q,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:50,columnNumber:7},this),l.jsxDEV(A,{"data-slot":"alert-dialog-content","data-size":t,className:p("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...o},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:51,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:49,columnNumber:5},this)}function le({className:e,...t}){return l.jsxDEV("div",{"data-slot":"alert-dialog-header",className:p("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:69,columnNumber:5},this)}function re({className:e,...t}){return l.jsxDEV("div",{"data-slot":"alert-dialog-footer",className:p("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:82,columnNumber:5},this)}function ne({className:e,...t}){return l.jsxDEV("div",{"data-slot":"alert-dialog-media",className:p("bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:98,columnNumber:5},this)}function ie({className:e,...t}){return l.jsxDEV(F,{"data-slot":"alert-dialog-title",className:p("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:111,columnNumber:5},this)}function de({className:e,...t}){return l.jsxDEV(O,{"data-slot":"alert-dialog-description",className:p("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:124,columnNumber:5},this)}function ue({className:e,...t}){return l.jsxDEV(V,{"data-slot":"alert-dialog-action",className:p(e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:137,columnNumber:5},this)}function ce({className:e,variant:t="outline",size:o="default",...s}){return l.jsxDEV(S,{"data-slot":"alert-dialog-cancel",className:p(e),render:l.jsxDEV(V,{variant:t,size:o},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:156,columnNumber:15},this),...s},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/alert-dialog.tsx",lineNumber:153,columnNumber:5},this)}function fe(e,t){const o=c.useRef(e),s=N(t);v(()=>{o.current!==e&&s(o.current)},[e,s]),v(()=>{o.current=e},[e])}export{oe as A,$ as T,se as a,le as b,ie as c,de as d,re as e,ce as f,ue as g,ne as h,W as i,te as j,ae as k,ee as l,J as m,fe as n,G as u};
|
|
7
|
-
//# sourceMappingURL=useValueChanged-
|
|
7
|
+
//# sourceMappingURL=useValueChanged-CO2U5MoL.js.map
|
package/resources/fe-dist/assets/{useValueChanged-DwJ_SDCu.js.map → useValueChanged-CO2U5MoL.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValueChanged-DwJ_SDCu.js","sources":["../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/trash-2.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/utils/constants.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/form/FormContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/useField.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js","../../src/components/ui/alert-dialog.tsx","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/utils/useValueChanged.js"],"sourcesContent":["/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M10 11v6\", key: \"nco0om\" }],\n [\"path\", { d: \"M14 11v6\", key: \"outv1u\" }],\n [\"path\", { d: \"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\", key: \"miytrc\" }],\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\", key: \"e791ji\" }]\n];\nconst Trash2 = createLucideIcon(\"trash-2\", __iconNode);\n\nexport { __iconNode, Trash2 as default };\n//# sourceMappingURL=trash-2.js.map\n","export let FieldControlDataAttributes = /*#__PURE__*/function (FieldControlDataAttributes) {\n /**\n * Present when the field is disabled.\n */\n FieldControlDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the field is in valid state.\n */\n FieldControlDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the field is in invalid state.\n */\n FieldControlDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the field has been touched.\n */\n FieldControlDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the field's value has changed.\n */\n FieldControlDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the field is filled.\n */\n FieldControlDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the field control is focused.\n */\n FieldControlDataAttributes[\"focused\"] = \"data-focused\";\n return FieldControlDataAttributes;\n}({});","import { FieldControlDataAttributes } from \"../control/FieldControlDataAttributes.js\";\nexport const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n [FieldControlDataAttributes.valid]: ''\n };\n }\n return {\n [FieldControlDataAttributes.invalid]: ''\n };\n }\n};","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { NOOP } from \"../../utils/noop.js\";\nimport { DEFAULT_VALIDITY_STATE } from \"../utils/constants.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nexport const FieldRootContext = /*#__PURE__*/React.createContext({\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n touched: false,\n setTouched: NOOP,\n dirty: false,\n setDirty: NOOP,\n filled: false,\n setFilled: NOOP,\n focused: false,\n setFocused: NOOP,\n validate: () => null,\n validationMode: 'onSubmit',\n validationDebounceTime: 0,\n shouldValidateOnChange: () => false,\n state: {\n disabled: false,\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n },\n markedDirtyRef: {\n current: false\n },\n validation: {\n getValidationProps: (props = EMPTY_OBJECT) => props,\n getInputValidationProps: (props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n commit: async () => {}\n }\n});\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n formRef: {\n current: {\n fields: new Map()\n }\n },\n errors: {},\n clearErrors: NOOP,\n validationMode: 'onSubmit',\n submitAttemptedRef: {\n current: false\n }\n});\nif (process.env.NODE_ENV !== \"production\") FormContext.displayName = \"FormContext\";\nexport function useFormContext() {\n return React.useContext(FormContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}","/**\n * Combines the field's client-side, stateful validity data with the external invalid state to\n * determine the field's true validity.\n */\nexport function getCombinedFieldValidityData(validityData, invalid) {\n return {\n ...validityData,\n state: {\n ...validityData.state,\n valid: !invalid && validityData.state.valid\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { NOOP } from \"../utils/noop.js\";\nimport { useBaseUiId } from \"../utils/useBaseUiId.js\";\nimport { useLabelableContext } from \"./LabelableContext.js\";\nexport function useLabelableId(params = {}) {\n const {\n id,\n implicit = false,\n controlRef\n } = params;\n const {\n controlId,\n registerControlId\n } = useLabelableContext();\n const defaultId = useBaseUiId(id);\n const controlIdForEffect = implicit ? controlId : undefined;\n const controlSourceRef = useRefWithInit(() => Symbol('labelable-control'));\n const hasRegisteredRef = React.useRef(false);\n const hadExplicitIdRef = React.useRef(id != null);\n const unregisterControlId = useStableCallback(() => {\n if (!hasRegisteredRef.current || registerControlId === NOOP) {\n return;\n }\n hasRegisteredRef.current = false;\n registerControlId(controlSourceRef.current, undefined);\n });\n useIsoLayoutEffect(() => {\n if (registerControlId === NOOP) {\n return undefined;\n }\n let nextId;\n if (implicit) {\n const elem = controlRef?.current;\n if (isElement(elem) && elem.closest('label') != null) {\n nextId = id ?? null;\n } else {\n nextId = controlIdForEffect ?? defaultId;\n }\n } else if (id != null) {\n hadExplicitIdRef.current = true;\n nextId = id;\n } else if (hadExplicitIdRef.current) {\n nextId = defaultId;\n } else {\n unregisterControlId();\n return undefined;\n }\n if (nextId === undefined) {\n unregisterControlId();\n return undefined;\n }\n hasRegisteredRef.current = true;\n registerControlId(controlSourceRef.current, nextId);\n return undefined;\n }, [id, controlRef, controlIdForEffect, registerControlId, implicit, defaultId, controlSourceRef, unregisterControlId]);\n React.useEffect(() => {\n return unregisterControlId;\n }, [unregisterControlId]);\n return controlId ?? defaultId;\n}","'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { getCombinedFieldValidityData } from \"./utils/getCombinedFieldValidityData.js\";\nimport { useFormContext } from \"../form/FormContext.js\";\nimport { useFieldRootContext } from \"./root/FieldRootContext.js\";\nexport function useField(params) {\n const {\n enabled = true,\n value,\n id,\n name,\n controlRef,\n commit\n } = params;\n const {\n formRef\n } = useFormContext();\n const {\n invalid,\n markedDirtyRef,\n validityData,\n setValidityData\n } = useFieldRootContext();\n const getValue = useStableCallback(params.getValue);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n let initialValue = value;\n if (initialValue === undefined) {\n initialValue = getValue();\n }\n if (validityData.initialValue === null && initialValue !== null) {\n setValidityData(prev => ({\n ...prev,\n initialValue\n }));\n }\n }, [enabled, setValidityData, value, validityData.initialValue, getValue]);\n useIsoLayoutEffect(() => {\n if (!enabled || !id) {\n return;\n }\n formRef.current.fields.set(id, {\n getValue,\n name,\n controlRef,\n validityData: getCombinedFieldValidityData(validityData, invalid),\n validate(flushSync = true) {\n let nextValue = value;\n if (nextValue === undefined) {\n nextValue = getValue();\n }\n markedDirtyRef.current = true;\n if (!flushSync) {\n commit(nextValue);\n } else {\n // Synchronously update the validity state so the submit event can be prevented.\n ReactDOM.flushSync(() => commit(nextValue));\n }\n }\n });\n }, [commit, controlRef, enabled, formRef, getValue, id, invalid, markedDirtyRef, name, validityData, value]);\n useIsoLayoutEffect(() => {\n const fields = formRef.current.fields;\n return () => {\n if (id) {\n fields.delete(id);\n }\n };\n }, [formRef, id]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useDialogRoot } from \"../../dialog/root/useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"../../dialog/root/DialogRootContext.js\";\nimport { DialogStore } from \"../../dialog/store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the alert dialog.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)\n */\nexport function AlertDialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext();\n const nested = Boolean(parentDialogRootContext);\n const store = useRefWithInit(() => {\n return handle?.store ?? new DialogStore({\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n modal: true,\n disablePointerDismissal: true,\n nested,\n role: 'alertdialog'\n });\n }).current;\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useSyncedValue('nested', nested);\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n });\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\"bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nexport function useValueChanged(value, onChange) {\n const valueRef = React.useRef(value);\n const onChangeCallback = useStableCallback(onChange);\n useIsoLayoutEffect(() => {\n if (valueRef.current === value) {\n return;\n }\n onChangeCallback(valueRef.current);\n }, [value, onChangeCallback]);\n useIsoLayoutEffect(() => {\n valueRef.current = value;\n }, [value]);\n}"],"names":["__iconNode","Trash2","createLucideIcon","FieldControlDataAttributes","DEFAULT_VALIDITY_STATE","fieldValidityMapping","value","FieldRootContext","NOOP","props","EMPTY_OBJECT","useFieldRootContext","optional","context","React.useContext","FormContext","useFormContext","LabelableContext","externalProps","useLabelableContext","getCombinedFieldValidityData","validityData","invalid","useLabelableId","params","id","implicit","controlRef","controlId","registerControlId","defaultId","useBaseUiId","controlIdForEffect","controlSourceRef","useRefWithInit","hasRegisteredRef","React.useRef","hadExplicitIdRef","unregisterControlId","useStableCallback","useIsoLayoutEffect","nextId","elem","isElement","React.useEffect","useField","enabled","name","commit","formRef","markedDirtyRef","setValidityData","getValue","initialValue","prev","flushSync","nextValue","ReactDOM.flushSync","fields","AlertDialogRoot","children","openProp","defaultOpen","onOpenChange","onOpenChangeComplete","actionsRef","handle","triggerIdProp","defaultTriggerIdProp","parentDialogRootContext","useDialogRootContext","nested","store","DialogStore","payload","useDialogRoot","contextValue","React.useMemo","_jsx","DialogRootContext","AlertDialog","AlertDialogPrimitive.Root","AlertDialogPortal","AlertDialogPrimitive.Portal","AlertDialogOverlay","className","jsxDEV","AlertDialogPrimitive.Backdrop","cn","AlertDialogContent","size","AlertDialogPrimitive.Popup","AlertDialogHeader","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogPrimitive.Title","AlertDialogDescription","AlertDialogPrimitive.Description","AlertDialogAction","Button","AlertDialogCancel","variant","AlertDialogPrimitive.Close","useValueChanged","onChange","valueRef","onChangeCallback"],"mappings":"kNAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,2CAA4C,IAAK,QAAQ,CAAE,EACzE,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,OAAQ,CAAE,EAAG,yCAA0C,IAAK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WAAA,IAAA,aAAA,CAAA,EAAA,IAAA,CAMJ,CAEA,SAAS0F,GAAkB,CACzB,UAAAd,EACA,GAAG5E,CACL,EAAwC,CACtC,OACE6E,EAAAA,OAACc,EAAA,CACC,YAAU,sBACV,UAAWZ,EAAGH,CAAS,EACtB,GAAG5E,CAAA,EAHN,OAAA,GAAA,CAAA,SAAA,4EAAA,WAAA,IAAA,aAAA,CAAA,EAAA,IAAA,CAMJ,CAEA,SAAS4F,GAAkB,CACzB,UAAAhB,EACA,QAAAiB,EAAU,UACV,KAAAZ,EAAO,UACP,GAAGjF,CACL,EACiE,CAC/D,OACE6E,EAAAA,OAACiB,EAAA,CACC,YAAU,sBACV,UAAWf,EAAGH,CAAS,EACvB,OAAQC,EAAAA,OAACc,EAAA,CAAO,QAAAE,EAAkB,KAAAZ,CAAA,EAA1B,OAAA,GAAA,CAAA,SAAA,4EAAA,WAAA,IAAA,aAAA,EAAA,EAAA,IAAsC,EAC7C,GAAGjF,CAAA,EAJN,OAAA,GAAA,CAAA,SAAA,4EAAA,WAAA,IAAA,aAAA,CAAA,EAAA,IAAA,CAOJ,CC1JO,SAAS+F,GAAgBlG,EAAOmG,EAAU,CAC/C,MAAMC,EAAWtE,EAAAA,OAAa9B,CAAK,EAC7BqG,EAAmBpE,EAAkBkE,CAAQ,EACnDjE,EAAmB,IAAM,CACnBkE,EAAS,UAAYpG,GAGzBqG,EAAiBD,EAAS,OAAO,CACnC,EAAG,CAACpG,EAAOqG,CAAgB,CAAC,EAC5BnE,EAAmB,IAAM,CACvBkE,EAAS,QAAUpG,CACrB,EAAG,CAACA,CAAK,CAAC,CACZ","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,11]}
|
|
1
|
+
{"version":3,"file":"useValueChanged-CO2U5MoL.js","sources":["../../../../node_modules/.bun/lucide-react@0.564.0+b1ab299f0a400331/node_modules/lucide-react/dist/esm/icons/trash-2.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/utils/constants.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/form/FormContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/field/useField.js","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js","../../src/components/ui/alert-dialog.tsx","../../../../node_modules/.bun/@base-ui+react@1.2.0+ca9c98c9db1b76d1/node_modules/@base-ui/react/esm/utils/useValueChanged.js"],"sourcesContent":["/**\n * @license lucide-react v0.564.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M10 11v6\", key: \"nco0om\" }],\n [\"path\", { d: \"M14 11v6\", key: \"outv1u\" }],\n [\"path\", { d: \"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\", key: \"miytrc\" }],\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\", key: \"e791ji\" }]\n];\nconst Trash2 = createLucideIcon(\"trash-2\", __iconNode);\n\nexport { __iconNode, Trash2 as default };\n//# sourceMappingURL=trash-2.js.map\n","export let FieldControlDataAttributes = /*#__PURE__*/function (FieldControlDataAttributes) {\n /**\n * Present when the field is disabled.\n */\n FieldControlDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the field is in valid state.\n */\n FieldControlDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the field is in invalid state.\n */\n FieldControlDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the field has been touched.\n */\n FieldControlDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the field's value has changed.\n */\n FieldControlDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the field is filled.\n */\n FieldControlDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the field control is focused.\n */\n FieldControlDataAttributes[\"focused\"] = \"data-focused\";\n return FieldControlDataAttributes;\n}({});","import { FieldControlDataAttributes } from \"../control/FieldControlDataAttributes.js\";\nexport const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n [FieldControlDataAttributes.valid]: ''\n };\n }\n return {\n [FieldControlDataAttributes.invalid]: ''\n };\n }\n};","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { NOOP } from \"../../utils/noop.js\";\nimport { DEFAULT_VALIDITY_STATE } from \"../utils/constants.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nexport const FieldRootContext = /*#__PURE__*/React.createContext({\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n touched: false,\n setTouched: NOOP,\n dirty: false,\n setDirty: NOOP,\n filled: false,\n setFilled: NOOP,\n focused: false,\n setFocused: NOOP,\n validate: () => null,\n validationMode: 'onSubmit',\n validationDebounceTime: 0,\n shouldValidateOnChange: () => false,\n state: {\n disabled: false,\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n },\n markedDirtyRef: {\n current: false\n },\n validation: {\n getValidationProps: (props = EMPTY_OBJECT) => props,\n getInputValidationProps: (props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n commit: async () => {}\n }\n});\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n formRef: {\n current: {\n fields: new Map()\n }\n },\n errors: {},\n clearErrors: NOOP,\n validationMode: 'onSubmit',\n submitAttemptedRef: {\n current: false\n }\n});\nif (process.env.NODE_ENV !== \"production\") FormContext.displayName = \"FormContext\";\nexport function useFormContext() {\n return React.useContext(FormContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}","/**\n * Combines the field's client-side, stateful validity data with the external invalid state to\n * determine the field's true validity.\n */\nexport function getCombinedFieldValidityData(validityData, invalid) {\n return {\n ...validityData,\n state: {\n ...validityData.state,\n valid: !invalid && validityData.state.valid\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { NOOP } from \"../utils/noop.js\";\nimport { useBaseUiId } from \"../utils/useBaseUiId.js\";\nimport { useLabelableContext } from \"./LabelableContext.js\";\nexport function useLabelableId(params = {}) {\n const {\n id,\n implicit = false,\n controlRef\n } = params;\n const {\n controlId,\n registerControlId\n } = useLabelableContext();\n const defaultId = useBaseUiId(id);\n const controlIdForEffect = implicit ? controlId : undefined;\n const controlSourceRef = useRefWithInit(() => Symbol('labelable-control'));\n const hasRegisteredRef = React.useRef(false);\n const hadExplicitIdRef = React.useRef(id != null);\n const unregisterControlId = useStableCallback(() => {\n if (!hasRegisteredRef.current || registerControlId === NOOP) {\n return;\n }\n hasRegisteredRef.current = false;\n registerControlId(controlSourceRef.current, undefined);\n });\n useIsoLayoutEffect(() => {\n if (registerControlId === NOOP) {\n return undefined;\n }\n let nextId;\n if (implicit) {\n const elem = controlRef?.current;\n if (isElement(elem) && elem.closest('label') != null) {\n nextId = id ?? null;\n } else {\n nextId = controlIdForEffect ?? defaultId;\n }\n } else if (id != null) {\n hadExplicitIdRef.current = true;\n nextId = id;\n } else if (hadExplicitIdRef.current) {\n nextId = defaultId;\n } else {\n unregisterControlId();\n return undefined;\n }\n if (nextId === undefined) {\n unregisterControlId();\n return undefined;\n }\n hasRegisteredRef.current = true;\n registerControlId(controlSourceRef.current, nextId);\n return undefined;\n }, [id, controlRef, controlIdForEffect, registerControlId, implicit, defaultId, controlSourceRef, unregisterControlId]);\n React.useEffect(() => {\n return unregisterControlId;\n }, [unregisterControlId]);\n return controlId ?? defaultId;\n}","'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { getCombinedFieldValidityData } from \"./utils/getCombinedFieldValidityData.js\";\nimport { useFormContext } from \"../form/FormContext.js\";\nimport { useFieldRootContext } from \"./root/FieldRootContext.js\";\nexport function useField(params) {\n const {\n enabled = true,\n value,\n id,\n name,\n controlRef,\n commit\n } = params;\n const {\n formRef\n } = useFormContext();\n const {\n invalid,\n markedDirtyRef,\n validityData,\n setValidityData\n } = useFieldRootContext();\n const getValue = useStableCallback(params.getValue);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n let initialValue = value;\n if (initialValue === undefined) {\n initialValue = getValue();\n }\n if (validityData.initialValue === null && initialValue !== null) {\n setValidityData(prev => ({\n ...prev,\n initialValue\n }));\n }\n }, [enabled, setValidityData, value, validityData.initialValue, getValue]);\n useIsoLayoutEffect(() => {\n if (!enabled || !id) {\n return;\n }\n formRef.current.fields.set(id, {\n getValue,\n name,\n controlRef,\n validityData: getCombinedFieldValidityData(validityData, invalid),\n validate(flushSync = true) {\n let nextValue = value;\n if (nextValue === undefined) {\n nextValue = getValue();\n }\n markedDirtyRef.current = true;\n if (!flushSync) {\n commit(nextValue);\n } else {\n // Synchronously update the validity state so the submit event can be prevented.\n ReactDOM.flushSync(() => commit(nextValue));\n }\n }\n });\n }, [commit, controlRef, enabled, formRef, getValue, id, invalid, markedDirtyRef, name, validityData, value]);\n useIsoLayoutEffect(() => {\n const fields = formRef.current.fields;\n return () => {\n if (id) {\n fields.delete(id);\n }\n };\n }, [formRef, id]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useDialogRoot } from \"../../dialog/root/useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"../../dialog/root/DialogRootContext.js\";\nimport { DialogStore } from \"../../dialog/store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the alert dialog.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)\n */\nexport function AlertDialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext();\n const nested = Boolean(parentDialogRootContext);\n const store = useRefWithInit(() => {\n return handle?.store ?? new DialogStore({\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n modal: true,\n disablePointerDismissal: true,\n nested,\n role: 'alertdialog'\n });\n }).current;\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useSyncedValue('nested', nested);\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n });\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\"bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nexport function useValueChanged(value, onChange) {\n const valueRef = React.useRef(value);\n const onChangeCallback = useStableCallback(onChange);\n useIsoLayoutEffect(() => {\n if (valueRef.current === value) {\n return;\n }\n onChangeCallback(valueRef.current);\n }, [value, onChangeCallback]);\n useIsoLayoutEffect(() => {\n valueRef.current = value;\n }, [value]);\n}"],"names":["__iconNode","Trash2","createLucideIcon","FieldControlDataAttributes","DEFAULT_VALIDITY_STATE","fieldValidityMapping","value","FieldRootContext","NOOP","props","EMPTY_OBJECT","useFieldRootContext","optional","context","React.useContext","FormContext","useFormContext","LabelableContext","externalProps","useLabelableContext","getCombinedFieldValidityData","validityData","invalid","useLabelableId","params","id","implicit","controlRef","controlId","registerControlId","defaultId","useBaseUiId","controlIdForEffect","controlSourceRef","useRefWithInit","hasRegisteredRef","React.useRef","hadExplicitIdRef","unregisterControlId","useStableCallback","useIsoLayoutEffect","nextId","elem","isElement","React.useEffect","useField","enabled","name","commit","formRef","markedDirtyRef","setValidityData","getValue","initialValue","prev","flushSync","nextValue","ReactDOM.flushSync","fields","AlertDialogRoot","children","openProp","defaultOpen","onOpenChange","onOpenChangeComplete","actionsRef","handle","triggerIdProp","defaultTriggerIdProp","parentDialogRootContext","useDialogRootContext","nested","store","DialogStore","payload","useDialogRoot","contextValue","React.useMemo","_jsx","DialogRootContext","AlertDialog","AlertDialogPrimitive.Root","AlertDialogPortal","AlertDialogPrimitive.Portal","AlertDialogOverlay","className","jsxDEV","AlertDialogPrimitive.Backdrop","cn","AlertDialogContent","size","AlertDialogPrimitive.Popup","AlertDialogHeader","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogPrimitive.Title","AlertDialogDescription","AlertDialogPrimitive.Description","AlertDialogAction","Button","AlertDialogCancel","variant","AlertDialogPrimitive.Close","useValueChanged","onChange","valueRef","onChangeCallback"],"mappings":"kNAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,2CAA4C,IAAK,QAAQ,CAAE,EACzE,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,OAAQ,CAAE,EAAG,yCAA0C,IAAK,QAAQ,CAAE,CACzE,EACMC,EAASC,EAAiB,UAAWF,CAAU,EChB9C,IAAIG,GAA0C,SAAUA,EAA4B,CAIzF,OAAAA,EAA2B,SAAc,gBAIzCA,EAA2B,MAAW,aAItCA,EAA2B,QAAa,eAIxCA,EAA2B,QAAa,eAIxCA,EAA2B,MAAW,aAItCA,EAA2B,OAAY,cAIvCA,EAA2B,QAAa,eACjCA,CACT,GAAE,EAAE,EC7BG,MAAMC,EAAyB,CACpC,SAAU,GACV,YAAa,GACb,gBAAiB,GACjB,cAAe,GACf,eAAgB,GAChB,aAAc,GACd,QAAS,GACT,SAAU,GACV,aAAc,GACd,MAAO,KACP,aAAc,EAChB,EACaC,GAAuB,CAClC,MAAMC,EAAO,CACX,OAAIA,IAAU,KACL,KAELA,EACK,CACL,CAACH,EAA2B,KAAK,EAAG,EAC5C,EAEW,CACL,CAACA,EAA2B,OAAO,EAAG,EAC5C,CACE,CACF,ECrBaI,kB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AC7C,GAAGjF,CAAA,EAJN,OAAA,GAAA,CAAA,SAAA,4EAAA,WAAA,IAAA,aAAA,CAAA,EAAA,IAAA,CAOJ,CC1JO,SAAS+F,GAAgBlG,EAAOmG,EAAU,CAC/C,MAAMC,EAAWtE,EAAAA,OAAa9B,CAAK,EAC7BqG,EAAmBpE,EAAkBkE,CAAQ,EACnDjE,EAAmB,IAAM,CACnBkE,EAAS,UAAYpG,GAGzBqG,EAAiBD,EAAS,OAAO,CACnC,EAAG,CAACpG,EAAOqG,CAAgB,CAAC,EAC5BnE,EAAmB,IAAM,CACvBkE,EAAS,QAAUpG,CACrB,EAAG,CAACA,CAAK,CAAC,CACZ","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,11]}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<link rel="apple-touch-icon" href="/assets/tmex-DcyZpuP8.png" />
|
|
13
13
|
<meta name="description" content="tmex - Web 接入多设备 tmux 的终端控制平台" />
|
|
14
14
|
<title>tmex</title>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-EgHfq93I.js"></script>
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Ytlj3p_q.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="root"></div>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var Ws=Object.defineProperty;var Xs=(e,t,r)=>t in e?Ws(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ss=(e,t,r)=>Xs(e,typeof t!="symbol"?t+"":t,r);import{c as $e,j as s,D as Zs,g as et,h as ps,X as st,B as pe,k as Z,l as tt,m as ot,n as at,o as nt,r as a,p as fs,q as gs,s as Se,v as hs,w as xs,x as Ne,y as rt,z as it,A as lt,C as $,F as ct,E as me,G as ut,H as vs,J as dt,K as Ns,L as mt,M as pt,P as ft,N as gt,O as ke,Q as ht,R as xt,S as vt,T as Ce,U as Nt,V as bt,W as Dt,Y as Ct,Z as Ue,_ as bs,$ as yt,a0 as F,a1 as Pt,a2 as Et,a3 as Ds,a4 as Cs,a5 as Oe,a6 as kt,a7 as wt,a8 as Lt,a9 as Ut,aa as we,ab as jt,ac as ye,ad as ts,ae as Mt,af as Rt,ag as Fe,ah as It,ai as Vt,aj as Tt,ak as St,al as Ot,am as Ft,an as Ae,ao as At,ap as ys,aq as Ht,ar as Ps,as as Kt,at as $t,au as Bt,av as He,aw as zt,ax as _t,ay as qt,az as Ve,aA as Gt,aB as Yt,aC as Qt,aD as Jt,aE as os,aF as Wt,aG as Xt,aH as Zt,aI as eo,aJ as as,aK as ns,aL as so,aM as to,u as be,a as Es,e as oo,aN as ks,aO as ws,aP as ao,f as ce,aQ as rs,aR as Ke,aS as no,aT as ro}from"./index-CJyFlAt8.js";import{h as Ls,i as io,j as lo,k as co,l as uo,m as mo,n as po,u as Le,C as Pe,c as Ee,a as fo,b as go,o as ho,I as le,S as is,d as ls,e as cs,f as us,g as xe}from"./select-DGBwxGiK.js";import{A as xo,a as vo,b as No,h as bo,T as Us,c as Do,d as Co,e as yo,f as Po,g as Eo}from"./useValueChanged-DwJ_SDCu.js";/**
|
|
2
|
-
* @license lucide-react v0.564.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ko=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],wo=$e("ellipsis",ko);/**
|
|
7
|
-
* @license lucide-react v0.564.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Lo=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Uo=$e("pencil",Lo);/**
|
|
12
|
-
* @license lucide-react v0.564.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const jo=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Mo=$e("zap",jo);function Ro({...e}){return s.jsxDEV(Zs,{"data-slot":"dialog",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:11,columnNumber:10},this)}function Io({...e}){return s.jsxDEV(at,{"data-slot":"dialog-portal",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:19,columnNumber:10},this)}function Vo({className:e,...t}){return s.jsxDEV(nt,{"data-slot":"dialog-overlay",className:Z("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:31,columnNumber:5},this)}function To({className:e,children:t,showCloseButton:r=!0,...o}){return s.jsxDEV(Io,{children:[s.jsxDEV(Vo,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:49,columnNumber:7},this),s.jsxDEV(et,{"data-slot":"dialog-content",className:Z("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...o,children:[t,r&&s.jsxDEV(ps,{"data-slot":"dialog-close",render:s.jsxDEV(pe,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:63,columnNumber:15},this),children:[s.jsxDEV(st,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:70,columnNumber:13},this),s.jsxDEV("span",{className:"sr-only",children:"Close"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:72,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:60,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:50,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:48,columnNumber:5},this)}function So({className:e,...t}){return s.jsxDEV("div",{"data-slot":"dialog-header",className:Z("gap-2 flex flex-col",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:82,columnNumber:5},this)}function Oo({className:e,showCloseButton:t=!1,children:r,...o}){return s.jsxDEV("div",{"data-slot":"dialog-footer",className:Z("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[r,t&&s.jsxDEV(ps,{render:s.jsxDEV(pe,{variant:"outline"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:109,columnNumber:40},this),children:"Close"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:109,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:99,columnNumber:5},this)}function Fo({className:e,...t}){return s.jsxDEV(tt,{"data-slot":"dialog-title",className:Z("text-base leading-none font-medium",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:119,columnNumber:5},this)}function Ao({className:e,...t}){return s.jsxDEV(ot,{"data-slot":"dialog-description",className:Z("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dialog.tsx",lineNumber:132,columnNumber:5},this)}const Be=a.createContext(void 0);Be.displayName="MenuPositionerContext";function js(e){const t=a.useContext(Be);if(t===void 0&&!e)throw new Error("Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");return t}const ze=a.createContext(void 0);ze.displayName="MenuRootContext";function fe(e){const t=a.useContext(ze);if(t===void 0&&!e)throw new Error("Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");return t}const Ms=a.createContext(void 0);Ms.displayName="ContextMenuRootContext";function je(e=!0){const t=a.useContext(Ms);if(t===void 0&&!e)throw new Error("Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");return t}function Ho(e){const{closeOnClick:t,highlighted:r,id:o,nodeId:m,store:i,itemRef:p,itemMetadata:l}=e,{events:v}=i.useState("floatingTreeRoot"),b=je(!0),D=b!==void 0;return a.useMemo(()=>({id:o,role:"menuitem",tabIndex:r?0:-1,onMouseMove(N){m&&v.emit("itemhover",{nodeId:m,target:N.currentTarget})},onClick(N){t&&v.emit("close",{domEvent:N,reason:fs})},onMouseUp(N){if(b){const E=b.initialCursorPointRef.current;if(b.initialCursorPointRef.current=null,D&&E&&Math.abs(N.clientX-E.x)<=1&&Math.abs(N.clientY-E.y)<=1)return}p.current&&i.context.allowMouseUpTriggerRef.current&&(!D||N.button===2)&&(!l||l.type==="regular-item")&&p.current.click()}}),[t,r,o,v,m,i,p,b,D,l])}const Ko={type:"regular-item"};function $o(e){const{closeOnClick:t,disabled:r=!1,highlighted:o,id:m,store:i,nativeButton:p,itemMetadata:l,nodeId:v}=e,b=a.useRef(null),{getButtonProps:D,buttonRef:N}=gs({disabled:r,focusableWhenDisabled:!0,native:p}),E=Ho({closeOnClick:t,highlighted:o,id:m,nodeId:v,store:i,itemRef:b,itemMetadata:l}),x=a.useCallback(g=>Se(E,{onMouseEnter(){l.type==="submenu-trigger"&&l.setActive()},onKeyUp(w){w.key===" "&&i.context.typingRef.current&&w.preventBaseUIHandler()}},g,D),[E,D,i,l]),U=hs(b,N);return a.useMemo(()=>({getItemProps:x,itemRef:U}),[x,U])}const Rs=a.forwardRef(function(t,r){const{render:o,className:m,id:i,label:p,nativeButton:l=!1,disabled:v=!1,closeOnClick:b=!0,...D}=t,N=Ls({label:p}),E=js(!0),x=xs(i),{store:U}=fe(),g=U.useState("isActive",N.index),w=U.useState("itemProps"),{getItemProps:C,itemRef:d}=$o({closeOnClick:b,disabled:v,highlighted:g,id:x,store:U,nativeButton:l,nodeId:E==null?void 0:E.nodeId,itemMetadata:Ko});return Ne("div",t,{state:{disabled:v,highlighted:g},props:[w,D,C],ref:[d,r,N.ref]})});Rs.displayName="MenuItem";const Bo={...vs,...ut},Is=a.forwardRef(function(t,r){const{render:o,className:m,finalFocus:i,...p}=t,{store:l}=fe(),{side:v,align:b}=js(),D=io()!=null,N=l.useState("open"),E=l.useState("transitionStatus"),x=l.useState("popupProps"),U=l.useState("mounted"),g=l.useState("instantType"),w=l.useState("activeTriggerElement"),C=l.useState("parent"),d=l.useState("lastOpenChangeReason"),j=l.useState("rootId"),H=l.useState("floatingRootContext"),f=l.useState("floatingTreeRoot"),n=l.useState("closeDelay"),y=l.useState("activeTriggerElement"),c=C.type==="context-menu";rt({open:N,ref:l.context.popupRef,onComplete(){var I,O;N&&((O=(I=l.context).onOpenChangeComplete)==null||O.call(I,!0))}}),a.useEffect(()=>{function I(O){l.setOpen(!1,me(O.reason,O.domEvent))}return f.events.on("close",I),()=>{f.events.off("close",I)}},[f.events,l]);const u=l.useState("hoverEnabled"),R=l.useState("disabled");it(H,{enabled:u&&!R&&!c&&C.type!=="menubar",closeDelay:n});const q={transitionStatus:E,side:v,align:b,open:N,nested:C.type==="menu",instant:g},Y=Ne("div",t,{state:q,ref:[r,l.context.popupRef],stateAttributesMapping:Bo,props:[x,{onKeyDown(I){D&&dt.has(I.key)&&I.stopPropagation()}},Ns(E),p,{"data-rootownerid":j}]});let S=C.type===void 0||c;return(w||C.type==="menubar"&&d!==lt)&&(S=!0),$.jsx(ct,{context:H,modal:c,disabled:!U,returnFocus:i===void 0?S:i,initialFocus:C.type!=="menu",restoreFocus:!0,externalTree:C.type!=="menubar"?f:void 0,previousFocusableElement:y,nextFocusableElement:C.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:C.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:Y})});Is.displayName="MenuPopup";const _e=a.createContext(void 0);_e.displayName="MenuPortalContext";function zo(){const e=a.useContext(_e);if(e===void 0)throw new Error("Base UI: <Menu.Portal> is missing.");return e}const Vs=a.forwardRef(function(t,r){const{keepMounted:o=!1,...m}=t,{store:i}=fe();return i.useState("mounted")||o?$.jsx(_e.Provider,{value:o,children:$.jsx(mt,{ref:r,...m})}):null});Vs.displayName="MenuPortal";const Ts=a.forwardRef(function(t,r){var re;const{anchor:o,positionMethod:m="absolute",className:i,render:p,side:l,align:v,sideOffset:b=0,alignOffset:D=0,collisionBoundary:N="clipping-ancestors",collisionPadding:E=5,arrowPadding:x=5,sticky:U=!1,disableAnchorTracking:g=!1,collisionAvoidance:w=pt,...C}=t,{store:d}=fe(),j=zo(),H=je(!0),f=d.useState("parent"),n=d.useState("floatingRootContext"),y=d.useState("floatingTreeRoot"),c=d.useState("mounted"),u=d.useState("open"),R=d.useState("modal"),q=d.useState("activeTriggerElement"),Y=d.useState("transitionStatus"),S=d.useState("lastOpenChangeReason"),I=d.useState("floatingNodeId"),O=d.useState("floatingParentNodeId");let ue=o,k=b,K=D,ee=v,Q=w;f.type==="context-menu"&&(ue=o??((re=f.context)==null?void 0:re.anchor),ee=ee??"start",!l&&ee!=="center"&&(K=t.alignOffset??2,k=t.sideOffset??-5));let _=l,J=ee;f.type==="menu"?(_=_??"inline-end",J=J??"start",Q=t.collisionAvoidance??ft):f.type==="menubar"&&(_=_??"bottom",J=J??"start");const B=f.type==="context-menu",M=gt({anchor:ue,floatingRootContext:n,positionMethod:H?"fixed":m,mounted:c,side:_,sideOffset:k,align:J,alignOffset:K,arrowPadding:B?0:x,collisionBoundary:N,collisionPadding:E,sticky:U,nodeId:I,keepMounted:j,disableAnchorTracking:g,collisionAvoidance:Q,shiftCrossAxis:B&&!("side"in Q&&Q.side==="flip"),externalTree:y}),ae=a.useMemo(()=>{const L={};return u||(L.pointerEvents="none"),{role:"presentation",hidden:!c,style:{...M.positionerStyles,...L}}},[u,c,M.positionerStyles]);a.useEffect(()=>{function L(V){V.open&&(V.parentNodeId===I&&d.set("hoverEnabled",!1),V.nodeId!==I&&V.parentNodeId===d.select("floatingParentNodeId")&&d.setOpen(!1,me(Ce)))}return y.events.on("menuopenchange",L),()=>{y.events.off("menuopenchange",L)}},[d,y.events,I]),a.useEffect(()=>{if(d.select("floatingParentNodeId")==null)return;function L(V){if(V.open||V.nodeId!==d.select("floatingParentNodeId"))return;const he=V.reason??Ce;d.setOpen(!1,me(he))}return y.events.on("menuopenchange",L),()=>{y.events.off("menuopenchange",L)}},[y.events,d]),a.useEffect(()=>{function L(V){!u||V.nodeId!==d.select("floatingParentNodeId")||V.target&&q&&q!==V.target&&d.setOpen(!1,me(Ce))}return y.events.on("itemhover",L),()=>{y.events.off("itemhover",L)}},[y.events,u,q,d]),a.useEffect(()=>{const L={open:u,nodeId:I,parentNodeId:O,reason:d.select("lastOpenChangeReason")};y.events.emit("menuopenchange",L)},[y.events,u,d,I,O]);const ve={open:u,side:M.side,align:M.align,anchorHidden:M.anchorHidden,nested:f.type==="menu"},ge=a.useMemo(()=>({side:M.side,align:M.align,arrowRef:M.arrowRef,arrowUncentered:M.arrowUncentered,arrowStyles:M.arrowStyles,nodeId:M.context.nodeId}),[M.side,M.align,M.arrowRef,M.arrowUncentered,M.arrowStyles,M.context.nodeId]),de=Ne("div",t,{state:ve,stateAttributesMapping:vs,ref:[r,d.useStateSetter("positionerElement")],props:[ae,Ns(Y),C]}),ne=c&&f.type!=="menu"&&(f.type!=="menubar"&&R&&S!==ke||f.type==="menubar"&&f.context.modal);let W=null;return f.type==="menubar"?W=f.context.contentElement:f.type===void 0&&(W=q),$.jsxs(Be.Provider,{value:ge,children:[ne&&$.jsx(ht,{ref:f.type==="context-menu"||f.type==="nested-context-menu"?f.context.internalBackdropRef:null,inert:xt(!u),cutout:W}),$.jsx(vt,{id:I,children:$.jsx(lo,{elementsRef:d.context.itemDomElements,labelsRef:d.context.itemLabels,children:de})})]})});Ts.displayName="MenuPositioner";const Ss=a.createContext(null);Ss.displayName="MenubarContext";function Os(e){return a.useContext(Ss)}const _o={...Dt,disabled:F(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:F(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:F(e=>e.allowMouseEnter),stickIfOpen:F(e=>e.stickIfOpen),parent:F(e=>e.parent),rootId:F(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:F(e=>e.activeIndex),isActive:F((e,t)=>e.activeIndex===t),hoverEnabled:F(e=>e.hoverEnabled),instantType:F(e=>e.instantType),lastOpenChangeReason:F(e=>e.openChangeReason),floatingTreeRoot:F(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:F(e=>e.floatingNodeId),floatingParentNodeId:F(e=>e.floatingParentNodeId),itemProps:F(e=>e.itemProps),closeDelay:F(e=>e.closeDelay),keyboardEventRelay:F(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class qe extends Nt{constructor(r){super({...qo(),...r},{positionerRef:a.createRef(),popupRef:a.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:a.createRef(),beforeContentFocusGuardRef:a.createRef(),onOpenChangeComplete:void 0,triggerElements:new bt},_o);ss(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",o=>{var m;if((m=this.unsubscribeParentListener)==null||m.call(this),o.type==="menu"){this.unsubscribeParentListener=o.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef;return}o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(r,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:r,eventDetails:o})}static useStore(r,o){const m=Ct(()=>new qe(o)).current;return r??m}}function qo(){return{...yt(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new bs,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ue,keyboardEventRelay:void 0,closeDelay:0}}const Fs=a.createContext(void 0);Fs.displayName="MenuSubmenuRootContext";function Go(){return a.useContext(Fs)}const As=Pt(function(t){const{children:r,open:o,onOpenChange:m,onOpenChangeComplete:i,defaultOpen:p=!1,disabled:l=!1,modal:v,loopFocus:b=!0,orientation:D="vertical",actionsRef:N,closeParentOnEsc:E=!1,handle:x,triggerId:U,defaultTriggerId:g=null,highlightItemOnHover:w=!0}=t,C=je(!0),d=fe(!0),j=Os(!0),H=Go(),f=a.useMemo(()=>H&&d?{type:"menu",store:d.store}:j?{type:"menubar",context:j}:C&&!d?{type:"context-menu",context:C}:{type:void 0},[C,d,j,H]),n=qe.useStore(x==null?void 0:x.store,{open:p,openProp:o,activeTriggerId:g,triggerIdProp:U,parent:f});Et(()=>{o===void 0&&n.state.open===!1&&p===!0&&n.update({open:!0,activeTriggerId:g})}),n.useControlledProp("openProp",o),n.useControlledProp("triggerIdProp",U),n.useContextCallback("onOpenChangeComplete",i);const y=n.useState("floatingTreeRoot"),c=Ds(y),u=Cs();Oe(()=>{C&&!d?n.update({parent:{type:"context-menu",context:C},floatingNodeId:c,floatingParentNodeId:u}):d&&n.update({floatingNodeId:c,floatingParentNodeId:u})},[C,d,c,u,n]);const R=n.useState("open"),q=n.useState("activeTriggerElement"),Y=n.useState("positionerElement"),S=n.useState("hoverEnabled"),I=n.useState("modal"),O=n.useState("disabled"),ue=n.useState("lastOpenChangeReason"),k=n.useState("parent"),K=n.useState("activeIndex"),ee=n.useState("payload"),Q=n.useState("floatingParentNodeId"),_=a.useRef(null),J=Q!=null;let B;k.type!==void 0&&v!==void 0&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."),n.useSyncedValues({disabled:l,modal:k.type===void 0?v:void 0,rootId:kt()});const{openMethod:M,triggerProps:ae,reset:ve}=wt(R);Lt(n);const{forceUnmount:ge}=Ut(R,n,()=>{n.update({allowMouseEnter:!1,stickIfOpen:!0}),ve()}),de=a.useRef(k.type!=="context-menu"),ne=we();a.useEffect(()=>{if(R||(_.current=null),k.type==="context-menu"){if(!R){ne.clear(),de.current=!1;return}ne.start(500,()=>{de.current=!0})}},[ne,R,k.type]),jt(R&&I&&ue!==ke&&M!=="touch",Y),Oe(()=>{!R&&!S&&n.set("hoverEnabled",!0)},[R,S,n]);const W=a.useRef(!0),re=we(),L=ye((h,P)=>{var es;const z=P.reason;if(R===h&&P.trigger===q&&ue===z||(P.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},!h&&P.trigger==null&&(P.trigger=q??void 0),m==null||m(h,P),P.isCanceled))return;const Qs={open:h,nativeEvent:P.event,reason:P.reason,nested:J};B==null||B.emit("openchange",Qs);const ie=P.event;if(h===!1&&(ie==null?void 0:ie.type)==="click"&&ie.pointerType==="touch"&&!W.current)return;if(!h&&K!==null){const Ie=n.context.itemDomElements.current[K];queueMicrotask(()=>{Ie==null||Ie.setAttribute("tabindex","-1")})}h&&z===ts?(W.current=!1,re.start(300,()=>{W.current=!0})):(W.current=!0,re.clear());const Xe=(z===Mt||z===fs)&&ie.detail===0&&(ie==null?void 0:ie.isTrusted),Js=!h&&(z===Rt||z==null),Re={open:h,openChangeReason:z};_.current=P.event??null;const Ze=((es=P.trigger)==null?void 0:es.id)??null;(Ze||h)&&(Re.activeTriggerId=Ze,Re.activeTriggerElement=P.trigger??null),n.update(Re),k.type==="menubar"&&(z===ts||z===Fe||z===ke||z===It||z===Ce)?n.set("instantType","group"):Xe||Js?n.set("instantType",Xe?"click":"dismiss"):n.set("instantType",void 0)}),V=a.useCallback(h=>{const P=me(h);return P.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},P},[n]),he=a.useCallback(()=>{n.setOpen(!1,V(Vt))},[n,V]);a.useImperativeHandle(N,()=>({unmount:ge,close:he}),[ge,he]);let se;k.type==="context-menu"&&(se=k.context),a.useImperativeHandle(se==null?void 0:se.positionerRef,()=>Y,[Y]),a.useImperativeHandle(se==null?void 0:se.actionsRef,()=>({setOpen:L}),[L]);const te=Tt({popupStore:n,onOpenChange:L});B=te.context.events,a.useEffect(()=>{const h=({open:P,eventDetails:z})=>L(P,z);return B.on("setOpen",h),()=>{B==null||B.off("setOpen",h)}},[B,L]);const T=St(te,{enabled:!O,bubbles:{escapeKey:E&&k.type==="menu"},outsidePress(){var h;return k.type!=="context-menu"||((h=_.current)==null?void 0:h.type)==="contextmenu"?!0:de.current},externalTree:J?y:void 0}),A=Ot(te,{role:"menu"}),oe=Ft(),G=a.useCallback(h=>{n.select("activeIndex")!==h&&n.set("activeIndex",h)},[n]),Me=co(te,{enabled:!O,listRef:n.context.itemDomElements,activeIndex:K,nested:k.type!==void 0,loopFocus:b,orientation:D,parentOrientation:k.type==="menubar"?k.context.orientation:void 0,rtl:oe==="rtl",disabledIndices:Ae,onNavigate:G,openOnArrowKeyDown:k.type!=="context-menu",externalTree:J?y:void 0,focusItemOnHover:w}),$s=a.useCallback(h=>{n.context.typingRef.current=h},[n]),Bs=uo(te,{listRef:n.context.itemLabels,activeIndex:K,resetMs:At,onMatch:h=>{R&&h!==K&&n.set("activeIndex",h)},onTypingChange:$s}),{getReferenceProps:Ge,getFloatingProps:Ye,getItemProps:Qe,getTriggerProps:Je}=ys([T,A,Me,Bs]),zs=a.useMemo(()=>{const h=Se(Ge(),{onMouseMove(){n.set("allowMouseEnter",!0)}},ae);return delete h.role,h},[Ge,n,ae]),_s=a.useMemo(()=>{const h=Je();if(!h)return h;const P=Se(h,ae);return delete P.role,delete P["aria-controls"],P},[Je,ae]),qs=a.useMemo(()=>Ye({onMouseMove(){n.set("allowMouseEnter",!0),k.type==="menu"&&n.set("hoverEnabled",!1)},onClick(){n.select("hoverEnabled")&&n.set("hoverEnabled",!1)},onKeyDown(h){const P=n.select("keyboardEventRelay");P&&!h.isPropagationStopped()&&P(h)}}),[Ye,k.type,n]),Gs=a.useMemo(()=>Qe(),[Qe]);n.useSyncedValues({floatingRootContext:te,activeTriggerProps:zs,inactiveTriggerProps:_s,popupProps:qs,itemProps:Gs});const Ys=a.useMemo(()=>({store:n,parent:f}),[n,f]),We=$.jsx(ze.Provider,{value:Ys,children:typeof r=="function"?r({payload:ee}):r});return k.type===void 0||k.type==="context-menu"?$.jsx(Ht,{externalTree:y,children:We}):We});As.displayName="MenuRoot";function Yo(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:o}=Ps(),{ref:m,index:i}=Ls(e),p=r===i,l=a.useRef(null),v=hs(m,l);return{compositeProps:a.useMemo(()=>({tabIndex:p?0:-1,onFocus(){o(i)},onMouseMove(){const D=l.current;if(!t||!D)return;const N=D.hasAttribute("disabled")||D.ariaDisabled==="true";!p&&!N&&D.focus()}}),[p,o,i,t]),compositeRef:v,index:i}}function Qo(e){const{render:t,className:r,state:o=Ue,props:m=Ae,refs:i=Ae,metadata:p,stateAttributesMapping:l,tag:v="div",...b}=e,{compositeProps:D,compositeRef:N}=Yo({metadata:p});return Ne(v,e,{state:o,ref:[...i,N],props:[D,...m,b],stateAttributesMapping:l})}function Hs(e){if(Kt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!$t(e))return Hs(Bt(e))}function Jo(e){const{enabled:t=!0,mouseDownAction:r,open:o}=e,m=a.useRef(!1);return a.useMemo(()=>t?{onMouseDown:i=>{(r==="open"&&!o||r==="close"&&o)&&(m.current=!0,He(i.currentTarget).addEventListener("click",()=>{m.current=!1},{once:!0}))},onClick:i=>{m.current&&(m.current=!1,i.preventBaseUIHandler())}}:Ue,[t,r,o])}const De=2,Ks=zt(function(t,r){const{render:o,className:m,disabled:i=!1,nativeButton:p=!0,id:l,openOnHover:v,delay:b=100,closeDelay:D=0,handle:N,payload:E,...x}=t,U=fe(!0),g=(N==null?void 0:N.store)??(U==null?void 0:U.store);if(!g)throw new Error("Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");const w=xs(l),C=g.useState("isTriggerActive",w),d=g.useState("floatingRootContext"),j=g.useState("isOpenedByTrigger",w),H=a.useRef(null),f=Xo(),n=Ps(!0),y=_t(),c=a.useMemo(()=>y??new bs,[y]),u=Ds(c),R=Cs(),{registerTrigger:q,isMountedByThisTrigger:Y}=qt(w,H,g,{payload:E,closeDelay:D,parent:f,floatingTreeRoot:c,floatingNodeId:u,floatingParentNodeId:R,keyboardEventRelay:n==null?void 0:n.relayKeyboardEvent}),S=f.type==="menubar",I=g.useState("disabled"),O=i||I||S&&f.context.disabled,{getButtonProps:ue,buttonRef:k}=gs({disabled:O,native:p});a.useEffect(()=>{!j&&f.type===void 0&&(g.context.allowMouseUpTriggerRef.current=!1)},[g,j,f.type]);const K=a.useRef(null),ee=we(),Q=ye(T=>{if(!K.current)return;ee.clear(),g.context.allowMouseUpTriggerRef.current=!1;const A=T.target;if(Ve(K.current,A)||Ve(g.select("positionerElement"),A)||A===K.current||A!=null&&Hs(A)===g.select("rootId"))return;const oe=mo(K.current);T.clientX>=oe.left-De&&T.clientX<=oe.right+De&&T.clientY>=oe.top-De&&T.clientY<=oe.bottom+De||c.events.emit("close",{domEvent:T,reason:Gt})});a.useEffect(()=>{j&&g.select("lastOpenChangeReason")===ke&&He(K.current).addEventListener("mouseup",Q,{once:!0})},[j,Q,g]);const _=S&&f.context.hasSubmenuOpen,B=Yt(d,{enabled:(v??_)&&!O&&f.type!=="context-menu"&&(!S||_&&!Y),handleClose:Qt({blockPointerEvents:!S}),mouseOnly:!0,move:!1,restMs:f.type===void 0?b:void 0,delay:{close:D},triggerElementRef:H,externalTree:c,isActiveTrigger:C}),M=Wo(j,g.select("lastOpenChangeReason")),ae=po(d,{enabled:!O&&f.type!=="context-menu",event:j&&S?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:f.type===void 0?M:!1}),ve=Jt(d,{enabled:!O&&_}),ge=Jo({open:j,enabled:S,mouseDownAction:"open"}),de=ys([ae,ve]),ne={disabled:O,open:j},W=g.useState("triggerProps",Y),re=[K,r,k,q,H],L=[de.getReferenceProps(),B??Ue,W,{"aria-haspopup":"menu",id:w,onMouseDown:T=>{if(g.select("open"))return;ee.start(200,()=>{g.context.allowMouseUpTriggerRef.current=!0}),He(T.currentTarget).addEventListener("mouseup",Q,{once:!0})}},S?{role:"menuitem"}:{},ge,x,ue],V=a.useRef(null),he=ye(T=>{os.flushSync(()=>{g.setOpen(!1,me(Fe,T.nativeEvent,T.currentTarget))});const A=Wt(V.current);A==null||A.focus()}),se=ye(T=>{var oe;const A=g.select("positionerElement");if(A&&Xt(T,A))(oe=g.context.beforeContentFocusGuardRef.current)==null||oe.focus();else{os.flushSync(()=>{g.setOpen(!1,me(Fe,T.nativeEvent,T.currentTarget))});let G=Zt(g.context.triggerFocusTargetRef.current||H.current);for(;G!==null&&Ve(A,G);){const Me=G;if(G=eo(G),G===Me)break}G==null||G.focus()}}),te=Ne("button",t,{enabled:!S,stateAttributesMapping:as,state:ne,ref:re,props:L});return S?$.jsx(Qo,{tag:"button",render:o,className:m,state:ne,refs:re,props:L,stateAttributesMapping:as}):j?$.jsxs(a.Fragment,{children:[$.jsx(ns,{ref:V,onFocus:he},`${w}-pre-focus-guard`),$.jsx(a.Fragment,{children:te},w),$.jsx(ns,{ref:g.context.triggerFocusTargetRef,onFocus:se},`${w}-post-focus-guard`)]}):$.jsx(a.Fragment,{children:te},w)});Ks.displayName="MenuTrigger";function Wo(e,t){const r=we(),[o,m]=a.useState(!1);return Oe(()=>{e&&t==="trigger-hover"?(m(!0),r.start(so,()=>{m(!1)})):e||(r.clear(),m(!1))},[e,t,r]),o}function Xo(){const e=je(!0),t=fe(!0),r=Os();return a.useMemo(()=>r?{type:"menubar",context:r}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,r])}function Zo({...e}){return s.jsxDEV(As,{"data-slot":"dropdown-menu",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:10,columnNumber:10},this)}function ea({...e}){return s.jsxDEV(Ks,{"data-slot":"dropdown-menu-trigger",...e},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:18,columnNumber:10},this)}function sa({align:e="start",alignOffset:t=0,side:r="bottom",sideOffset:o=4,className:m,...i}){return s.jsxDEV(Vs,{children:s.jsxDEV(Ts,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:r,sideOffset:o,children:s.jsxDEV(Is,{"data-slot":"dropdown-menu-content",className:Z("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden",m),...i},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:42,columnNumber:9},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:35,columnNumber:7},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:34,columnNumber:5},this)}function Te({className:e,inset:t,variant:r="default",...o}){return s.jsxDEV(Rs,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:Z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:83,columnNumber:5},this)}function ta({className:e,...t}){return s.jsxDEV(to,{"data-slot":"dropdown-menu-separator",className:Z("bg-border -mx-1 my-1 h-px",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/dropdown-menu.tsx",lineNumber:225,columnNumber:5},this)}function oa({className:e,...t}){return s.jsxDEV("textarea",{"data-slot":"textarea",className:Z("border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/components/ui/textarea.tsx",lineNumber:7,columnNumber:5},this)}function X(e){const t=e.trim();return t||void 0}function aa(e){return e?{name:e.name,type:e.type,host:e.host??"",port:e.port??22,username:e.username??"",sshConfigRef:e.sshConfigRef??"",session:e.session??"tmex",authMode:e.type==="local"?"auto":e.authMode,password:"",privateKey:"",privateKeyPassphrase:""}:{name:"",type:"local",host:"",port:22,username:"",sshConfigRef:"",session:"tmex",authMode:"auto",password:"",privateKey:"",privateKeyPassphrase:""}}function na(e){if(e.type==="local")return{name:e.name.trim(),type:"local",session:X(e.session)??"tmex",authMode:"auto"};const t={name:e.name.trim(),type:"ssh",host:X(e.host),port:e.port,username:X(e.username),sshConfigRef:X(e.sshConfigRef),session:X(e.session)??"tmex",authMode:e.authMode};return e.authMode==="password"&&(t.password=e.password),e.authMode==="key"&&(t.privateKey=e.privateKey,t.privateKeyPassphrase=e.privateKeyPassphrase||void 0),t}function ra(e){if(e.type==="local")return{name:e.name.trim(),session:X(e.session)??"tmex",authMode:"auto"};const t={name:e.name.trim(),host:X(e.host),port:e.port,username:X(e.username),sshConfigRef:X(e.sshConfigRef),session:X(e.session)??"tmex",authMode:e.authMode};return e.authMode==="password"&&e.password&&(t.password=e.password),e.authMode==="key"&&e.privateKey&&(t.privateKey=e.privateKey,t.privateKeyPassphrase=e.privateKeyPassphrase||void 0),t}async function ds(e,t){try{return(await e.json()).error??t}catch{return t}}function ma(){const{t:e}=be(),[t,r]=a.useState(!1),[o,m]=a.useState(null),[i,p]=a.useState(null),l=Es();a.useEffect(()=>{const x=()=>r(!0);return window.addEventListener("tmex:open-add-device",x),()=>window.removeEventListener("tmex:open-add-device",x)},[]);const{data:v,isLoading:b,isError:D}=oo({queryKey:["devices"],queryFn:async()=>{const x=await fetch("/api/devices");if(!x.ok)throw new Error(e("device.loadFailed"));return x.json()},throwOnError:!1}),N=Le({mutationFn:async x=>{if(!(await fetch(`/api/devices/${x}`,{method:"DELETE"})).ok)throw new Error(e("device.deleteFailed"))},onSuccess:()=>{l.invalidateQueries({queryKey:["devices"]}),ce.success(e("common.success"))},onError:x=>{ce.error(x instanceof Error?x.message:e("common.error"))}}),E=(v==null?void 0:v.devices)??[];return s.jsxDEV("div",{className:"mx-auto flex w-full max-w-6xl flex-col gap-3 p-3 pb-[calc(1rem+env(safe-area-inset-bottom))] sm:gap-4 sm:p-5","data-testid":"devices-page",children:[b?s.jsxDEV(Pe,{children:s.jsxDEV(Ee,{className:"py-16 text-center text-sm text-muted-foreground",children:e("common.loading")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:218,columnNumber:11},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:217,columnNumber:9},this):D?s.jsxDEV(Pe,{children:s.jsxDEV(Ee,{className:"py-16 text-center text-sm text-destructive",children:e("device.loadFailed")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:222,columnNumber:11},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:221,columnNumber:9},this):E.length===0?s.jsxDEV(Pe,{children:s.jsxDEV(Ee,{className:"space-y-4 py-14 text-center",children:[s.jsxDEV("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-xl border border-border bg-muted",children:s.jsxDEV(ks,{className:"h-6 w-6 text-muted-foreground"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:228,columnNumber:15},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:227,columnNumber:13},this),s.jsxDEV("div",{className:"space-y-1",children:[s.jsxDEV("h2",{className:"text-lg font-medium",children:e("device.noDevices")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:231,columnNumber:15},this),s.jsxDEV("p",{className:"text-sm text-muted-foreground",children:e("device.addDevice")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:232,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:230,columnNumber:13},this),s.jsxDEV(pe,{variant:"default","data-testid":"devices-add-empty",onClick:()=>r(!0),children:[s.jsxDEV(ws,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:235,columnNumber:15},this),e("device.addDevice")]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:234,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:226,columnNumber:11},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:225,columnNumber:9},this):s.jsxDEV("div",{className:"grid gap-3 lg:grid-cols-2",children:E.map(x=>s.jsxDEV(ia,{device:x,onEdit:()=>m(x),onDelete:()=>p(x)},x.id,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:243,columnNumber:13},this))},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:241,columnNumber:9},this),t&&s.jsxDEV(ms,{mode:"create",onClose:()=>r(!1)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:253,columnNumber:24},this),o&&s.jsxDEV(ms,{mode:"edit",device:o,onClose:()=>m(null)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:255,columnNumber:9},this),s.jsxDEV(xo,{open:i!==null,onOpenChange:x=>!x&&p(null),children:s.jsxDEV(vo,{children:[s.jsxDEV(No,{children:[s.jsxDEV(bo,{children:s.jsxDEV(Us,{className:"h-5 w-5 text-muted-foreground"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:262,columnNumber:15},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:261,columnNumber:13},this),s.jsxDEV(Do,{children:e("device.deleteConfirm")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:264,columnNumber:13},this),s.jsxDEV(Co,{children:(i==null?void 0:i.name)??""},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:265,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:260,columnNumber:11},this),s.jsxDEV(yo,{children:[s.jsxDEV(Po,{children:e("common.cancel")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:268,columnNumber:13},this),s.jsxDEV(Eo,{variant:"destructive",disabled:!i||N.isPending,onClick:()=>{i&&(N.mutate(i.id),p(null))},children:e("common.delete")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:269,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:267,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:259,columnNumber:9},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:258,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:215,columnNumber:5},this)}function ia({device:e,onEdit:t,onDelete:r}){const{t:o}=be(),m=e.type==="local"?s.jsxDEV(ks,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:297,columnNumber:31},this):s.jsxDEV(ao,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:297,columnNumber:65},this),i=e.type==="local"?o("device.typeLocal"):`${e.username??"-"}@${e.host??"-"}:${e.port??22}`,p=Le({mutationFn:async()=>{const l=await fetch(`/api/devices/${e.id}/test-connection`,{method:"POST"});let v=null;try{v=await l.json()}catch{v=null}if(!l.ok){const b=v;throw new Error((b==null?void 0:b.error)??o("common.error"))}return v},onSuccess:l=>{ce.success(l.message??o("common.success"))},onError:l=>{ce.error(l instanceof Error?l.message:o("common.error"))}});return s.jsxDEV(Pe,{"data-testid":"device-card","data-device-id":e.id,"data-device-name":e.name,className:"overflow-hidden",children:[s.jsxDEV(fo,{className:"space-y-3 pb-3",children:[s.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[s.jsxDEV("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsxDEV("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground",children:m},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:336,columnNumber:13},this),s.jsxDEV("div",{className:"min-w-0 space-y-1",children:[s.jsxDEV(go,{className:"line-clamp-1 text-base",title:e.name,children:e.name},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:340,columnNumber:15},this),s.jsxDEV(ho,{className:"line-clamp-1",children:i},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:343,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:339,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:335,columnNumber:11},this),s.jsxDEV("div",{className:"flex shrink-0 items-center gap-1",children:s.jsxDEV(Zo,{children:[s.jsxDEV(ea,{render:s.jsxDEV(pe,{variant:"ghost",size:"icon-sm","data-testid":`device-card-actions-${e.id}`,"aria-label":o("common.edit"),title:o("common.edit")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:351,columnNumber:19},this),children:s.jsxDEV(wo,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:360,columnNumber:17},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:349,columnNumber:15},this),s.jsxDEV(sa,{align:"end",children:[s.jsxDEV(Te,{"data-testid":`device-card-edit-${e.id}`,onClick:t,children:[s.jsxDEV(Uo,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:367,columnNumber:19},this),o("common.edit")]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:363,columnNumber:17},this),e.type==="ssh"&&s.jsxDEV(Te,{"data-testid":`device-card-test-${e.id}`,onClick:()=>p.mutate(),disabled:p.isPending,children:[s.jsxDEV(Mo,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:376,columnNumber:21},this),o("common.test")]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:371,columnNumber:19},this),s.jsxDEV(ta,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:380,columnNumber:17},this),s.jsxDEV(Te,{"data-testid":`device-card-delete-${e.id}`,variant:"destructive",onClick:r,children:[s.jsxDEV(Us,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:386,columnNumber:19},this),o("common.delete")]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:381,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:362,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:348,columnNumber:13},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:347,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:334,columnNumber:9},this),s.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxDEV(rs,{variant:"outline",children:e.type==="local"?o("device.typeLocal"):o("device.typeSSHBadge")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:395,columnNumber:11},this),e.session&&s.jsxDEV(rs,{variant:"outline",children:e.session},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:396,columnNumber:30},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:394,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:333,columnNumber:7},this),s.jsxDEV(Ee,{className:"pt-0",children:[s.jsxDEV(Ke,{className:"mb-3"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:401,columnNumber:9},this),s.jsxDEV("div",{className:"flex items-center justify-end",children:s.jsxDEV(no,{to:`/devices/${e.id}`,"data-testid":`device-card-connect-${e.id}`,className:ro({variant:"default",size:"sm"}),children:o("device.connect")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:403,columnNumber:11},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:402,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:400,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:332,columnNumber:5},this)}function ms({mode:e,device:t,onClose:r}){const{t:o}=be(),m=Es(),[i,p]=a.useState(aa(t)),[l,v]=a.useState(!1),b=e==="edit",D=i.type==="ssh",N=Le({mutationFn:async c=>{const u=await fetch("/api/devices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!u.ok)throw new Error(await ds(u,o("device.createFailed")));return u.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["devices"]}),ce.success(o("common.success")),r()},onError:c=>{ce.error(c instanceof Error?c.message:o("common.error"))}}),E=Le({mutationFn:async c=>{if(!t)throw new Error(o("apiError.deviceNotFound"));const u=await fetch(`/api/devices/${t.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!u.ok)throw new Error(await ds(u,o("device.updateFailed")));return u.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["devices"]}),ce.success(o("common.success")),r()},onError:c=>{ce.error(c instanceof Error?c.message:o("common.error"))}}),x=async c=>{c.preventDefault(),v(!0);try{e==="create"?await N.mutateAsync(na(i)):await E.mutateAsync(ra(i))}catch{}finally{v(!1)}},U=`${e}-device-name`,g=`${e}-device-type`,w=`${e}-device-host`,C=`${e}-device-port`,d=`${e}-device-username`,j=`${e}-device-session`,H=`${e}-device-auth-mode`,f=`${e}-device-password`,n=`${e}-device-private-key`,y=`${e}-device-private-key-passphrase`;return s.jsxDEV(Ro,{open:!0,onOpenChange:c=>!c&&r(),children:s.jsxDEV(To,{"data-testid":"device-dialog",className:"w-full max-w-2xl",children:[s.jsxDEV(So,{children:[s.jsxDEV(Fo,{children:o(b?"device.editDevice":"device.addDevice")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:515,columnNumber:11},this),s.jsxDEV(Ao,{children:o(b?"device.editDevice":"device.addDevice")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:516,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:514,columnNumber:9},this),s.jsxDEV("form",{onSubmit:x,children:[s.jsxDEV("div",{className:"max-h-[min(70vh,720px)] space-y-4 overflow-y-auto pr-1",children:[s.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2",children:[s.jsxDEV("div",{className:"space-y-1.5 sm:col-span-2",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:U,children:o("device.name")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:525,columnNumber:17},this),s.jsxDEV(le,{id:U,"data-testid":"device-name-input",type:"text",value:i.name,onChange:c=>p(u=>({...u,name:c.target.value})),placeholder:o("device.namePlaceholder"),required:!0},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:528,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:524,columnNumber:15},this),s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:g,children:o("device.type")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:540,columnNumber:17},this),s.jsxDEV(is,{value:i.type,onValueChange:c=>{if(!c)return;const u=c;p(R=>({...R,type:u,authMode:u==="local"?"auto":R.authMode==="auto"?"password":R.authMode}))},disabled:b,children:[s.jsxDEV(ls,{id:g,"data-testid":"device-type-select",className:"w-full",children:s.jsxDEV(cs,{placeholder:o("device.type")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:566,columnNumber:21},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:561,columnNumber:19},this),s.jsxDEV(us,{children:[s.jsxDEV(xe,{value:"local",children:o("device.typeLocal")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:569,columnNumber:21},this),s.jsxDEV(xe,{value:"ssh",children:["SSH ",o("device.type")]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:570,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:568,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:543,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:539,columnNumber:15},this),s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:j,children:o("device.session")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:576,columnNumber:17},this),s.jsxDEV(le,{id:j,"data-testid":"device-session-input",type:"text",value:i.session,onChange:c=>p(u=>({...u,session:c.target.value})),placeholder:o("device.sessionPlaceholder")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:579,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:575,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:523,columnNumber:13},this),D&&s.jsxDEV(s.Fragment,{children:[s.jsxDEV(Ke,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:592,columnNumber:17},this),s.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-3",children:[s.jsxDEV("div",{className:"space-y-1.5 sm:col-span-2",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:w,children:o("device.host")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:595,columnNumber:21},this),s.jsxDEV(le,{id:w,type:"text",value:i.host,onChange:c=>p(u=>({...u,host:c.target.value})),placeholder:o("device.hostPlaceholder")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:598,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:594,columnNumber:19},this),s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:C,children:o("device.port")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:608,columnNumber:21},this),s.jsxDEV(le,{id:C,type:"number",value:i.port,onChange:c=>p(u=>({...u,port:Number.parseInt(c.target.value||"22",10)})),min:1,max:65535},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:611,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:607,columnNumber:19},this),s.jsxDEV("div",{className:"space-y-1.5 sm:col-span-2",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:d,children:o("device.username")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:627,columnNumber:21},this),s.jsxDEV(le,{id:d,type:"text",value:i.username,onChange:c=>p(u=>({...u,username:c.target.value})),placeholder:o("device.usernamePlaceholder")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:630,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:626,columnNumber:19},this),s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:`${e}-device-ssh-config-ref`,children:"SSH Config"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:640,columnNumber:21},this),s.jsxDEV(le,{id:`${e}-device-ssh-config-ref`,type:"text",value:i.sshConfigRef,onChange:c=>p(u=>({...u,sshConfigRef:c.target.value})),placeholder:"~/.ssh/config"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:643,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:639,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:593,columnNumber:17},this),s.jsxDEV(Ke,{},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:653,columnNumber:17},this),s.jsxDEV("div",{className:"space-y-3",children:[s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:H,children:o("device.authMode")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:656,columnNumber:21},this),s.jsxDEV(is,{value:i.authMode,onValueChange:c=>{c&&p(u=>({...u,authMode:c}))},children:[s.jsxDEV(ls,{id:H,className:"w-full",children:s.jsxDEV(cs,{placeholder:o("device.authMode")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:670,columnNumber:25},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:669,columnNumber:23},this),s.jsxDEV(us,{children:[s.jsxDEV(xe,{value:"password",children:o("device.authPassword")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:673,columnNumber:25},this),s.jsxDEV(xe,{value:"key",children:o("device.authKey")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:674,columnNumber:25},this),s.jsxDEV(xe,{value:"agent",children:o("device.authAgent")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:675,columnNumber:25},this),s.jsxDEV(xe,{value:"configRef",children:"SSH Config"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:676,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:672,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:659,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:655,columnNumber:19},this),i.authMode==="password"&&s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:f,children:o("device.password")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:683,columnNumber:23},this),s.jsxDEV(le,{id:f,type:"password",value:i.password,onChange:c=>p(u=>({...u,password:c.target.value}))},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:686,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:682,columnNumber:21},this),i.authMode==="key"&&s.jsxDEV(s.Fragment,{children:[s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:n,children:o("device.privateKey")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:698,columnNumber:25},this),s.jsxDEV(oa,{id:n,value:i.privateKey,onChange:c=>p(u=>({...u,privateKey:c.target.value})),className:"h-28 font-mono text-xs",placeholder:o("device.privateKeyPlaceholder")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:701,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:697,columnNumber:23},this),s.jsxDEV("div",{className:"space-y-1.5",children:[s.jsxDEV("label",{className:"block text-sm font-medium",htmlFor:y,children:o("device.passphrase")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:710,columnNumber:25},this),s.jsxDEV(le,{id:y,type:"password",value:i.privateKeyPassphrase,onChange:c=>p(u=>({...u,privateKeyPassphrase:c.target.value}))},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:713,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:709,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:696,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:654,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:591,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:522,columnNumber:11},this),s.jsxDEV(Oo,{children:[s.jsxDEV(pe,{type:"button",variant:"outline",className:"flex-1",onClick:r,children:o("common.cancel")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:730,columnNumber:13},this),s.jsxDEV(pe,{type:"submit",variant:"default",className:"flex-1","data-testid":"device-dialog-save",disabled:l,children:o(l?"common.saving":"common.save")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:733,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:729,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:521,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:513,columnNumber:7},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:512,columnNumber:5},this)}function pa(){const{t:e}=be();return s.jsxDEV(s.Fragment,{children:e("sidebar.manageDevices")},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:752,columnNumber:10},this)}function fa(){const{t:e}=be(),t=()=>{window.dispatchEvent(new CustomEvent("tmex:open-add-device"))};return s.jsxDEV(pe,{variant:"ghost",size:"icon-sm","data-testid":"devices-add",onClick:t,"aria-label":e("sidebar.addDevice"),title:e("sidebar.addDevice"),children:s.jsxDEV(ws,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:772,columnNumber:7},this)},void 0,!1,{fileName:"/Users/krhougs/LocalCodes/tmex/apps/fe/src/pages/DevicesPage.tsx",lineNumber:764,columnNumber:5},this)}export{fa as PageActions,pa as PageTitle,ma as default};
|
|
17
|
-
//# sourceMappingURL=DevicesPage-BwLKaiUR.js.map
|