@sudobility/building_blocks 0.0.102 → 0.0.104
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/{SafeSubscriptionContext-Bttk78bU.js → SafeSubscriptionContext-yobdw2tN.js} +5689 -50
- package/dist/SafeSubscriptionContext-yobdw2tN.js.map +1 -0
- package/dist/firebase.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/SafeSubscriptionContext-Bttk78bU.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SafeSubscriptionContext-Bttk78bU.js","sources":["../node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/@radix-ui/react-use-previous/dist/index.mjs","../node_modules/@radix-ui/react-use-size/dist/index.mjs","../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-switch/dist/index.mjs","../node_modules/@radix-ui/number/dist/index.mjs","../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-collection/dist/index.mjs","../node_modules/@radix-ui/react-direction/dist/index.mjs","../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/@radix-ui/react-arrow/dist/index.mjs","../node_modules/@radix-ui/react-popper/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../node_modules/aria-hidden/dist/es2015/index.js","../node_modules/tslib/tslib.es6.mjs","../node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../node_modules/use-callback-ref/dist/es2015/assignRef.js","../node_modules/use-callback-ref/dist/es2015/useRef.js","../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../node_modules/use-sidecar/dist/es2015/medium.js","../node_modules/use-sidecar/dist/es2015/exports.js","../node_modules/react-remove-scroll/dist/es2015/medium.js","../node_modules/react-remove-scroll/dist/es2015/UI.js","../node_modules/get-nonce/dist/es2015/index.js","../node_modules/react-style-singleton/dist/es2015/singleton.js","../node_modules/react-style-singleton/dist/es2015/hook.js","../node_modules/react-style-singleton/dist/es2015/component.js","../node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../node_modules/react-remove-scroll-bar/dist/es2015/component.js","../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../node_modules/react-remove-scroll/dist/es2015/sidecar.js","../node_modules/react-remove-scroll/dist/es2015/Combination.js","../node_modules/@radix-ui/react-select/dist/index.mjs","../node_modules/@heroicons/react/20/solid/esm/CheckIcon.js","../node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js","../node_modules/@heroicons/react/20/solid/esm/ChevronUpIcon.js","../node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-label/dist/index.mjs","../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/@radix-ui/react-tabs/dist/index.mjs","../node_modules/@sudobility/components/dist/index.esm.js","../node_modules/i18next-http-backend/esm/utils.js","../node_modules/i18next-http-backend/esm/request.js","../node_modules/i18next-http-backend/esm/index.js","../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js","../src/i18n/index.ts","../src/components/app/SudobilityApp.tsx","../src/components/subscription/SafeSubscriptionContext.tsx"],"sourcesContent":["// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","// src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target\n var selection = window.getSelection();\n var anchorNode = selection && selection.anchorNode;\n var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;\n if (isTouchingSelection) {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","\"use client\";\n\n// src/select.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { VISUALLY_HIDDEN_STYLES } from \"@radix-ui/react-visually-hidden\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar OPEN_KEYS = [\" \", \"Enter\", \"ArrowUp\", \"ArrowDown\"];\nvar SELECTION_KEYS = [\" \", \"Enter\"];\nvar SELECT_NAME = \"Select\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);\nvar [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n createCollectionScope,\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);\nvar [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME);\nvar Select = (props) => {\n const {\n __scopeSelect,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n value: valueProp,\n defaultValue,\n onValueChange,\n dir,\n name,\n autoComplete,\n disabled,\n required,\n form\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const [trigger, setTrigger] = React.useState(null);\n const [valueNode, setValueNode] = React.useState(null);\n const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);\n const direction = useDirection(dir);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SELECT_NAME\n });\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n caller: SELECT_NAME\n });\n const triggerPointerDownPosRef = React.useRef(null);\n const isFormControl = trigger ? form || !!trigger.closest(\"form\") : true;\n const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set());\n const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(\";\");\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsxs(\n SelectProvider,\n {\n required,\n scope: __scopeSelect,\n trigger,\n onTriggerChange: setTrigger,\n valueNode,\n onValueNodeChange: setValueNode,\n valueNodeHasChildren,\n onValueNodeHasChildrenChange: setValueNodeHasChildren,\n contentId: useId(),\n value,\n onValueChange: setValue,\n open,\n onOpenChange: setOpen,\n dir: direction,\n triggerPointerDownPosRef,\n disabled,\n children: [\n /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(\n SelectNativeOptionsProvider,\n {\n scope: props.__scopeSelect,\n onNativeOptionAdd: React.useCallback((option) => {\n setNativeOptionsSet((prev) => new Set(prev).add(option));\n }, []),\n onNativeOptionRemove: React.useCallback((option) => {\n setNativeOptionsSet((prev) => {\n const optionsSet = new Set(prev);\n optionsSet.delete(option);\n return optionsSet;\n });\n }, []),\n children\n }\n ) }),\n isFormControl ? /* @__PURE__ */ jsxs(\n SelectBubbleInput,\n {\n \"aria-hidden\": true,\n required,\n tabIndex: -1,\n name,\n autoComplete,\n value,\n onChange: (event) => setValue(event.target.value),\n disabled,\n form,\n children: [\n value === void 0 ? /* @__PURE__ */ jsx(\"option\", { value: \"\" }) : null,\n Array.from(nativeOptionsSet)\n ]\n },\n nativeSelectKey\n ) : null\n ]\n }\n ) });\n};\nSelect.displayName = SELECT_NAME;\nvar TRIGGER_NAME = \"SelectTrigger\";\nvar SelectTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, disabled = false, ...triggerProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(TRIGGER_NAME, __scopeSelect);\n const isDisabled = context.disabled || disabled;\n const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);\n const getItems = useCollection(__scopeSelect);\n const pointerTypeRef = React.useRef(\"touch\");\n const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.value === context.value);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem !== void 0) {\n context.onValueChange(nextItem.value);\n }\n });\n const handleOpen = (pointerEvent) => {\n if (!isDisabled) {\n context.onOpenChange(true);\n resetTypeahead();\n }\n if (pointerEvent) {\n context.triggerPointerDownPosRef.current = {\n x: Math.round(pointerEvent.pageX),\n y: Math.round(pointerEvent.pageY)\n };\n }\n };\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"combobox\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open,\n \"aria-required\": context.required,\n \"aria-autocomplete\": \"none\",\n dir: context.dir,\n \"data-state\": context.open ? \"open\" : \"closed\",\n disabled: isDisabled,\n \"data-disabled\": isDisabled ? \"\" : void 0,\n \"data-placeholder\": shouldShowPlaceholder(context.value) ? \"\" : void 0,\n ...triggerProps,\n ref: composedRefs,\n onClick: composeEventHandlers(triggerProps.onClick, (event) => {\n event.currentTarget.focus();\n if (pointerTypeRef.current !== \"mouse\") {\n handleOpen(event);\n }\n }),\n onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n if (event.button === 0 && event.ctrlKey === false && event.pointerType === \"mouse\") {\n handleOpen(event);\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => {\n const isTypingAhead = searchRef.current !== \"\";\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if (isTypingAhead && event.key === \" \") return;\n if (OPEN_KEYS.includes(event.key)) {\n handleOpen();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nSelectTrigger.displayName = TRIGGER_NAME;\nvar VALUE_NAME = \"SelectValue\";\nvar SelectValue = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, className, style, children, placeholder = \"\", ...valueProps } = props;\n const context = useSelectContext(VALUE_NAME, __scopeSelect);\n const { onValueNodeHasChildrenChange } = context;\n const hasChildren = children !== void 0;\n const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);\n useLayoutEffect(() => {\n onValueNodeHasChildrenChange(hasChildren);\n }, [onValueNodeHasChildrenChange, hasChildren]);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...valueProps,\n ref: composedRefs,\n style: { pointerEvents: \"none\" },\n children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx(Fragment, { children: placeholder }) : children\n }\n );\n }\n);\nSelectValue.displayName = VALUE_NAME;\nvar ICON_NAME = \"SelectIcon\";\nvar SelectIcon = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, children, ...iconProps } = props;\n return /* @__PURE__ */ jsx(Primitive.span, { \"aria-hidden\": true, ...iconProps, ref: forwardedRef, children: children || \"\\u25BC\" });\n }\n);\nSelectIcon.displayName = ICON_NAME;\nvar PORTAL_NAME = \"SelectPortal\";\nvar SelectPortal = (props) => {\n return /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, ...props });\n};\nSelectPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"SelectContent\";\nvar SelectContent = React.forwardRef(\n (props, forwardedRef) => {\n const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);\n const [fragment, setFragment] = React.useState();\n useLayoutEffect(() => {\n setFragment(new DocumentFragment());\n }, []);\n if (!context.open) {\n const frag = fragment;\n return frag ? ReactDOM.createPortal(\n /* @__PURE__ */ jsx(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(\"div\", { children: props.children }) }) }),\n frag\n ) : null;\n }\n return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef });\n }\n);\nSelectContent.displayName = CONTENT_NAME;\nvar CONTENT_MARGIN = 10;\nvar [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);\nvar CONTENT_IMPL_NAME = \"SelectContentImpl\";\nvar Slot = createSlot(\"SelectContent.RemoveScroll\");\nvar SelectContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSelect,\n position = \"item-aligned\",\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n //\n // PopperContent props\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n //\n ...contentProps\n } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const [content, setContent] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [selectedItem, setSelectedItem] = React.useState(null);\n const [selectedItemText, setSelectedItemText] = React.useState(\n null\n );\n const getItems = useCollection(__scopeSelect);\n const [isPositioned, setIsPositioned] = React.useState(false);\n const firstValidItemFoundRef = React.useRef(false);\n React.useEffect(() => {\n if (content) return hideOthers(content);\n }, [content]);\n useFocusGuards();\n const focusFirst = React.useCallback(\n (candidates) => {\n const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);\n const [lastItem] = restItems.slice(-1);\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate?.scrollIntoView({ block: \"nearest\" });\n if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n candidate?.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n },\n [getItems, viewport]\n );\n const focusSelectedItem = React.useCallback(\n () => focusFirst([selectedItem, content]),\n [focusFirst, selectedItem, content]\n );\n React.useEffect(() => {\n if (isPositioned) {\n focusSelectedItem();\n }\n }, [isPositioned, focusSelectedItem]);\n const { onOpenChange, triggerPointerDownPosRef } = context;\n React.useEffect(() => {\n if (content) {\n let pointerMoveDelta = { x: 0, y: 0 };\n const handlePointerMove = (event) => {\n pointerMoveDelta = {\n x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),\n y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))\n };\n };\n const handlePointerUp = (event) => {\n if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n event.preventDefault();\n } else {\n if (!content.contains(event.target)) {\n onOpenChange(false);\n }\n }\n document.removeEventListener(\"pointermove\", handlePointerMove);\n triggerPointerDownPosRef.current = null;\n };\n if (triggerPointerDownPosRef.current !== null) {\n document.addEventListener(\"pointermove\", handlePointerMove);\n document.addEventListener(\"pointerup\", handlePointerUp, { capture: true, once: true });\n }\n return () => {\n document.removeEventListener(\"pointermove\", handlePointerMove);\n document.removeEventListener(\"pointerup\", handlePointerUp, { capture: true });\n };\n }\n }, [content, onOpenChange, triggerPointerDownPosRef]);\n React.useEffect(() => {\n const close = () => onOpenChange(false);\n window.addEventListener(\"blur\", close);\n window.addEventListener(\"resize\", close);\n return () => {\n window.removeEventListener(\"blur\", close);\n window.removeEventListener(\"resize\", close);\n };\n }, [onOpenChange]);\n const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem) {\n setTimeout(() => nextItem.ref.current.focus());\n }\n });\n const itemRefCallback = React.useCallback(\n (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== void 0 && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItem(node);\n if (isFirstValidItem) firstValidItemFoundRef.current = true;\n }\n },\n [context.value]\n );\n const handleItemLeave = React.useCallback(() => content?.focus(), [content]);\n const itemTextRefCallback = React.useCallback(\n (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== void 0 && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItemText(node);\n }\n },\n [context.value]\n );\n const SelectPosition = position === \"popper\" ? SelectPopperPosition : SelectItemAlignedPosition;\n const popperContentProps = SelectPosition === SelectPopperPosition ? {\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions\n } : {};\n return /* @__PURE__ */ jsx(\n SelectContentProvider,\n {\n scope: __scopeSelect,\n content,\n viewport,\n onViewportChange: setViewport,\n itemRefCallback,\n selectedItem,\n onItemLeave: handleItemLeave,\n itemTextRefCallback,\n focusSelectedItem,\n selectedItemText,\n position,\n isPositioned,\n searchRef,\n children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: context.open,\n onMountAutoFocus: (event) => {\n event.preventDefault();\n },\n onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {\n context.trigger?.focus({ preventScroll: true });\n event.preventDefault();\n }),\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: true,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: (event) => event.preventDefault(),\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n SelectPosition,\n {\n role: \"listbox\",\n id: context.contentId,\n \"data-state\": context.open ? \"open\" : \"closed\",\n dir: context.dir,\n onContextMenu: (event) => event.preventDefault(),\n ...contentProps,\n ...popperContentProps,\n onPlaced: () => setIsPositioned(true),\n ref: composedRefs,\n style: {\n // flex layout so we can place the scroll buttons properly\n display: \"flex\",\n flexDirection: \"column\",\n // reset the outline by default as the content MAY get focused\n outline: \"none\",\n ...contentProps.style\n },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if ([\"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(event.key)) {\n const items = getItems().filter((item) => !item.disabled);\n let candidateNodes = items.map((item) => item.ref.current);\n if ([\"ArrowUp\", \"End\"].includes(event.key)) {\n candidateNodes = candidateNodes.slice().reverse();\n }\n if ([\"ArrowUp\", \"ArrowDown\"].includes(event.key)) {\n const currentElement = event.target;\n const currentIndex = candidateNodes.indexOf(currentElement);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n event.preventDefault();\n }\n })\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nSelectContentImpl.displayName = CONTENT_IMPL_NAME;\nvar ITEM_ALIGNED_POSITION_NAME = \"SelectItemAlignedPosition\";\nvar SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {\n const { __scopeSelect, onPlaced, ...popperProps } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);\n const [contentWrapper, setContentWrapper] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const getItems = useCollection(__scopeSelect);\n const shouldExpandOnScrollRef = React.useRef(false);\n const shouldRepositionRef = React.useRef(true);\n const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n const position = React.useCallback(() => {\n if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {\n const triggerRect = context.trigger.getBoundingClientRect();\n const contentRect = content.getBoundingClientRect();\n const valueNodeRect = context.valueNode.getBoundingClientRect();\n const itemTextRect = selectedItemText.getBoundingClientRect();\n if (context.dir !== \"rtl\") {\n const itemTextOffset = itemTextRect.left - contentRect.left;\n const left = valueNodeRect.left - itemTextOffset;\n const leftDelta = triggerRect.left - left;\n const minContentWidth = triggerRect.width + leftDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const rightEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedLeft = clamp(left, [\n CONTENT_MARGIN,\n // Prevents the content from going off the starting edge of the\n // viewport. It may still go off the ending edge, but this can be\n // controlled by the user since they may want to manage overflow in a\n // specific way.\n // https://github.com/radix-ui/primitives/issues/2049\n Math.max(CONTENT_MARGIN, rightEdge - contentWidth)\n ]);\n contentWrapper.style.minWidth = minContentWidth + \"px\";\n contentWrapper.style.left = clampedLeft + \"px\";\n } else {\n const itemTextOffset = contentRect.right - itemTextRect.right;\n const right = window.innerWidth - valueNodeRect.right - itemTextOffset;\n const rightDelta = window.innerWidth - triggerRect.right - right;\n const minContentWidth = triggerRect.width + rightDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const leftEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedRight = clamp(right, [\n CONTENT_MARGIN,\n Math.max(CONTENT_MARGIN, leftEdge - contentWidth)\n ]);\n contentWrapper.style.minWidth = minContentWidth + \"px\";\n contentWrapper.style.right = clampedRight + \"px\";\n }\n const items = getItems();\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const itemsHeight = viewport.scrollHeight;\n const contentStyles = window.getComputedStyle(content);\n const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;\n const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n const viewportStyles = window.getComputedStyle(viewport);\n const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n if (willAlignWithoutTopOverflow) {\n const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;\n contentWrapper.style.bottom = \"0px\";\n const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n const clampedTriggerMiddleToBottomEdge = Math.max(\n triggerMiddleToBottomEdge,\n selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport\n (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth\n );\n const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n contentWrapper.style.height = height + \"px\";\n } else {\n const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current;\n contentWrapper.style.top = \"0px\";\n const clampedTopEdgeToTriggerMiddle = Math.max(\n topEdgeToTriggerMiddle,\n contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport\n (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight\n );\n const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n contentWrapper.style.height = height + \"px\";\n viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n }\n contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;\n contentWrapper.style.minHeight = minContentHeight + \"px\";\n contentWrapper.style.maxHeight = availableHeight + \"px\";\n onPlaced?.();\n requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);\n }\n }, [\n getItems,\n context.trigger,\n context.valueNode,\n contentWrapper,\n content,\n viewport,\n selectedItem,\n selectedItemText,\n context.dir,\n onPlaced\n ]);\n useLayoutEffect(() => position(), [position]);\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n const handleScrollButtonChange = React.useCallback(\n (node) => {\n if (node && shouldRepositionRef.current === true) {\n position();\n focusSelectedItem?.();\n shouldRepositionRef.current = false;\n }\n },\n [position, focusSelectedItem]\n );\n return /* @__PURE__ */ jsx(\n SelectViewportProvider,\n {\n scope: __scopeSelect,\n contentWrapper,\n shouldExpandOnScrollRef,\n onScrollButtonChange: handleScrollButtonChange,\n children: /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: setContentWrapper,\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n position: \"fixed\",\n zIndex: contentZIndex\n },\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...popperProps,\n ref: composedRefs,\n style: {\n // When we get the height of the content, it includes borders. If we were to set\n // the height without having `boxSizing: 'border-box'` it would be too big.\n boxSizing: \"border-box\",\n // We need to ensure the content doesn't get taller than the wrapper\n maxHeight: \"100%\",\n ...popperProps.style\n }\n }\n )\n }\n )\n }\n );\n});\nSelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;\nvar POPPER_POSITION_NAME = \"SelectPopperPosition\";\nvar SelectPopperPosition = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeSelect,\n align = \"start\",\n collisionPadding = CONTENT_MARGIN,\n ...popperProps\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n return /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n ...popperScope,\n ...popperProps,\n ref: forwardedRef,\n align,\n collisionPadding,\n style: {\n // Ensure border-box for floating-ui calculations\n boxSizing: \"border-box\",\n ...popperProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-select-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-select-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-select-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-select-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-select-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nSelectPopperPosition.displayName = POPPER_POSITION_NAME;\nvar [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {});\nvar VIEWPORT_NAME = \"SelectViewport\";\nvar SelectViewport = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, nonce, ...viewportProps } = props;\n const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);\n const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);\n const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);\n const prevScrollTopRef = React.useRef(0);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-select-viewport\": \"\",\n role: \"presentation\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n // we use position: 'relative' here on the `viewport` so that when we call\n // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n // (independent of the scrollUpButton).\n position: \"relative\",\n flex: 1,\n // Viewport should only be scrollable in the vertical direction.\n // This won't work in vertical writing modes, so we'll need to\n // revisit this if/when that is supported\n // https://developer.chrome.com/blog/vertical-form-controls\n overflow: \"hidden auto\",\n ...viewportProps.style\n },\n onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {\n const viewport = event.currentTarget;\n const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;\n if (shouldExpandOnScrollRef?.current && contentWrapper) {\n const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n if (scrolledBy > 0) {\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n const cssHeight = parseFloat(contentWrapper.style.height);\n const prevHeight = Math.max(cssMinHeight, cssHeight);\n if (prevHeight < availableHeight) {\n const nextHeight = prevHeight + scrolledBy;\n const clampedNextHeight = Math.min(availableHeight, nextHeight);\n const heightDiff = nextHeight - clampedNextHeight;\n contentWrapper.style.height = clampedNextHeight + \"px\";\n if (contentWrapper.style.bottom === \"0px\") {\n viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n contentWrapper.style.justifyContent = \"flex-end\";\n }\n }\n }\n }\n prevScrollTopRef.current = viewport.scrollTop;\n })\n }\n ) })\n ] });\n }\n);\nSelectViewport.displayName = VIEWPORT_NAME;\nvar GROUP_NAME = \"SelectGroup\";\nvar [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);\nvar SelectGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...groupProps } = props;\n const groupId = useId();\n return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", \"aria-labelledby\": groupId, ...groupProps, ref: forwardedRef }) });\n }\n);\nSelectGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"SelectLabel\";\nvar SelectLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...labelProps } = props;\n const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);\n return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });\n }\n);\nSelectLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"SelectItem\";\nvar [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);\nvar SelectItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSelect,\n value,\n disabled = false,\n textValue: textValueProp,\n ...itemProps\n } = props;\n const context = useSelectContext(ITEM_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);\n const isSelected = context.value === value;\n const [textValue, setTextValue] = React.useState(textValueProp ?? \"\");\n const [isFocused, setIsFocused] = React.useState(false);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => contentContext.itemRefCallback?.(node, value, disabled)\n );\n const textId = useId();\n const pointerTypeRef = React.useRef(\"touch\");\n const handleSelect = () => {\n if (!disabled) {\n context.onValueChange(value);\n context.onOpenChange(false);\n }\n };\n if (value === \"\") {\n throw new Error(\n \"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.\"\n );\n }\n return /* @__PURE__ */ jsx(\n SelectItemContextProvider,\n {\n scope: __scopeSelect,\n value,\n disabled,\n textId,\n isSelected,\n onItemTextChange: React.useCallback((node) => {\n setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? \"\").trim());\n }, []),\n children: /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeSelect,\n value,\n disabled,\n textValue,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"option\",\n \"aria-labelledby\": textId,\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-selected\": isSelected && isFocused,\n \"data-state\": isSelected ? \"checked\" : \"unchecked\",\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n tabIndex: disabled ? void 0 : -1,\n ...itemProps,\n ref: composedRefs,\n onFocus: composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)),\n onClick: composeEventHandlers(itemProps.onClick, () => {\n if (pointerTypeRef.current !== \"mouse\") handleSelect();\n }),\n onPointerUp: composeEventHandlers(itemProps.onPointerUp, () => {\n if (pointerTypeRef.current === \"mouse\") handleSelect();\n }),\n onPointerDown: composeEventHandlers(itemProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n }),\n onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {\n pointerTypeRef.current = event.pointerType;\n if (disabled) {\n contentContext.onItemLeave?.();\n } else if (pointerTypeRef.current === \"mouse\") {\n event.currentTarget.focus({ preventScroll: true });\n }\n }),\n onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {\n if (event.currentTarget === document.activeElement) {\n contentContext.onItemLeave?.();\n }\n }),\n onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef?.current !== \"\";\n if (isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) handleSelect();\n if (event.key === \" \") event.preventDefault();\n })\n }\n )\n }\n )\n }\n );\n }\n);\nSelectItem.displayName = ITEM_NAME;\nvar ITEM_TEXT_NAME = \"SelectItemText\";\nvar SelectItemText = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, className, style, ...itemTextProps } = props;\n const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);\n const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);\n const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);\n const [itemTextNode, setItemTextNode] = React.useState(null);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => setItemTextNode(node),\n itemContext.onItemTextChange,\n (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)\n );\n const textContent = itemTextNode?.textContent;\n const nativeOption = React.useMemo(\n () => /* @__PURE__ */ jsx(\"option\", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),\n [itemContext.disabled, itemContext.value, textContent]\n );\n const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;\n useLayoutEffect(() => {\n onNativeOptionAdd(nativeOption);\n return () => onNativeOptionRemove(nativeOption);\n }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),\n itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null\n ] });\n }\n);\nSelectItemText.displayName = ITEM_TEXT_NAME;\nvar ITEM_INDICATOR_NAME = \"SelectItemIndicator\";\nvar SelectItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...itemIndicatorProps } = props;\n const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);\n return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { \"aria-hidden\": true, ...itemIndicatorProps, ref: forwardedRef }) : null;\n }\n);\nSelectItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SCROLL_UP_BUTTON_NAME = \"SelectScrollUpButton\";\nvar SelectScrollUpButton = React.forwardRef((props, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const [canScrollUp, setCanScrollUp] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n let handleScroll2 = function() {\n const canScrollUp2 = viewport.scrollTop > 0;\n setCanScrollUp(canScrollUp2);\n };\n var handleScroll = handleScroll2;\n const viewport = contentContext.viewport;\n handleScroll2();\n viewport.addEventListener(\"scroll\", handleScroll2);\n return () => viewport.removeEventListener(\"scroll\", handleScroll2);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n return canScrollUp ? /* @__PURE__ */ jsx(\n SelectScrollButtonImpl,\n {\n ...props,\n ref: composedRefs,\n onAutoScroll: () => {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n }\n }\n }\n ) : null;\n});\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;\nvar SCROLL_DOWN_BUTTON_NAME = \"SelectScrollDownButton\";\nvar SelectScrollDownButton = React.forwardRef((props, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const [canScrollDown, setCanScrollDown] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n let handleScroll2 = function() {\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll;\n setCanScrollDown(canScrollDown2);\n };\n var handleScroll = handleScroll2;\n const viewport = contentContext.viewport;\n handleScroll2();\n viewport.addEventListener(\"scroll\", handleScroll2);\n return () => viewport.removeEventListener(\"scroll\", handleScroll2);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n return canScrollDown ? /* @__PURE__ */ jsx(\n SelectScrollButtonImpl,\n {\n ...props,\n ref: composedRefs,\n onAutoScroll: () => {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n }\n }\n }\n ) : null;\n});\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\nvar SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;\n const contentContext = useSelectContentContext(\"SelectScrollButton\", __scopeSelect);\n const autoScrollTimerRef = React.useRef(null);\n const getItems = useCollection(__scopeSelect);\n const clearAutoScrollTimer = React.useCallback(() => {\n if (autoScrollTimerRef.current !== null) {\n window.clearInterval(autoScrollTimerRef.current);\n autoScrollTimerRef.current = null;\n }\n }, []);\n React.useEffect(() => {\n return () => clearAutoScrollTimer();\n }, [clearAutoScrollTimer]);\n useLayoutEffect(() => {\n const activeItem = getItems().find((item) => item.ref.current === document.activeElement);\n activeItem?.ref.current?.scrollIntoView({ block: \"nearest\" });\n }, [getItems]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-hidden\": true,\n ...scrollIndicatorProps,\n ref: forwardedRef,\n style: { flexShrink: 0, ...scrollIndicatorProps.style },\n onPointerDown: composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n }),\n onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n contentContext.onItemLeave?.();\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n }),\n onPointerLeave: composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n clearAutoScrollTimer();\n })\n }\n );\n});\nvar SEPARATOR_NAME = \"SelectSeparator\";\nvar SelectSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { \"aria-hidden\": true, ...separatorProps, ref: forwardedRef });\n }\n);\nSelectSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"SelectArrow\";\nvar SelectArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(ARROW_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);\n return context.open && contentContext.position === \"popper\" ? /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;\n }\n);\nSelectArrow.displayName = ARROW_NAME;\nvar BUBBLE_INPUT_NAME = \"SelectBubbleInput\";\nvar SelectBubbleInput = React.forwardRef(\n ({ __scopeSelect, value, ...props }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const prevValue = usePrevious(value);\n React.useEffect(() => {\n const select = ref.current;\n if (!select) return;\n const selectProto = window.HTMLSelectElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n selectProto,\n \"value\"\n );\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event(\"change\", { bubbles: true });\n setValue.call(select, value);\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n return /* @__PURE__ */ jsx(\n Primitive.select,\n {\n ...props,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },\n ref: composedRefs,\n defaultValue: value\n }\n );\n }\n);\nSelectBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction shouldShowPlaceholder(value) {\n return value === \"\" || value === void 0;\n}\nfunction useTypeaheadSearch(onSearchChange) {\n const handleSearchChange = useCallbackRef(onSearchChange);\n const searchRef = React.useRef(\"\");\n const timerRef = React.useRef(0);\n const handleTypeaheadSearch = React.useCallback(\n (key) => {\n const search = searchRef.current + key;\n handleSearchChange(search);\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n },\n [handleSearchChange]\n );\n const resetTypeahead = React.useCallback(() => {\n searchRef.current = \"\";\n window.clearTimeout(timerRef.current);\n }, []);\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n return [searchRef, handleTypeaheadSearch, resetTypeahead];\n}\nfunction findNextItem(items, search, currentItem) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));\n const excludeCurrentItem = normalizedSearch.length === 1;\n if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem);\n const nextItem = wrappedItems.find(\n (item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextItem !== currentItem ? nextItem : void 0;\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root2 = Select;\nvar Trigger = SelectTrigger;\nvar Value = SelectValue;\nvar Icon = SelectIcon;\nvar Portal = SelectPortal;\nvar Content2 = SelectContent;\nvar Viewport = SelectViewport;\nvar Group = SelectGroup;\nvar Label = SelectLabel;\nvar Item = SelectItem;\nvar ItemText = SelectItemText;\nvar ItemIndicator = SelectItemIndicator;\nvar ScrollUpButton = SelectScrollUpButton;\nvar ScrollDownButton = SelectScrollDownButton;\nvar Separator = SelectSeparator;\nvar Arrow2 = SelectArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n Group,\n Icon,\n Item,\n ItemIndicator,\n ItemText,\n Label,\n Portal,\n Root2 as Root,\n ScrollDownButton,\n ScrollUpButton,\n Select,\n SelectArrow,\n SelectContent,\n SelectGroup,\n SelectIcon,\n SelectItem,\n SelectItemIndicator,\n SelectItemText,\n SelectLabel,\n SelectPortal,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n SelectViewport,\n Separator,\n Trigger,\n Value,\n Viewport,\n createSelectScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nfunction CheckIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(CheckIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronDownIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronDownIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronUpIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronUpIcon);\nexport default ForwardRef;","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { clsx as va } from \"clsx\";\nimport { twMerge as wa } from \"tailwind-merge\";\nimport { jsx as a, jsxs as p, Fragment as H } from \"react/jsx-runtime\";\nimport * as Z from \"react\";\nimport U, { useState as M, useRef as j, useEffect as R, useCallback as _, createContext as ot, useMemo as ge, useContext as st, useLayoutEffect as ka, Component as jr, memo as Ye, lazy as we, Suspense as Ke } from \"react\";\nimport { cva as Q } from \"class-variance-authority\";\nimport { createPortal as Tt } from \"react-dom\";\nimport { ExclamationCircleIcon as kt, CheckCircleIcon as it, InformationCircleIcon as Te, XCircleIcon as Lt, BellAlertIcon as Na, ExclamationTriangleIcon as Mt, MinusIcon as Vt, PlusIcon as Ht, MagnifyingGlassIcon as Ca, XMarkIcon as lt, CalendarIcon as Sa, CloudArrowUpIcon as Ea, DocumentIcon as _r, Cog6ToothIcon as qt, CurrencyDollarIcon as Aa, AdjustmentsHorizontalIcon as Ta, LinkIcon as La, FunnelIcon as Ma, ChatBubbleLeftRightIcon as Ia, ShieldCheckIcon as Pa, ArrowRightIcon as zr, ArrowTopRightOnSquareIcon as et, ChevronLeftIcon as Ra, ChevronRightIcon as It, TrashIcon as Oa, PhotoIcon as Gt, ArrowPathIcon as Da, CheckIcon as Ua, ClipboardDocumentIcon as ja, EnvelopeIcon as _a, LanguageIcon as za } from \"@heroicons/react/24/outline\";\nimport { ArrowLeftIcon as lf, ArrowRightIcon as cf, Bars3Icon as df, BellIcon as uf, BellSlashIcon as gf, ChartBarIcon as mf, CheckCircleIcon as hf, CheckIcon as ff, ChevronDownIcon as bf, ChevronLeftIcon as pf, ChevronRightIcon as yf, ChevronUpIcon as xf, ClockIcon as vf, CodeBracketIcon as wf, Cog6ToothIcon as kf, CreditCardIcon as Nf, DocumentTextIcon as Cf, EnvelopeIcon as Sf, ExclamationTriangleIcon as Ef, EyeSlashIcon as Af, GlobeAltIcon as Tf, HomeIcon as Lf, InboxIcon as Mf, InformationCircleIcon as If, KeyIcon as Pf, MegaphoneIcon as Rf, MinusIcon as Of, PaperAirplaneIcon as Df, PaperClipIcon as Uf, PlusIcon as jf, RocketLaunchIcon as _f, ShieldCheckIcon as zf, SparklesIcon as Bf, StarIcon as Ff, TrashIcon as Wf, UserGroupIcon as $f, XMarkIcon as Vf } from \"@heroicons/react/24/outline\";\nimport { XMarkIcon as Ba, MinusIcon as Fa, CheckIcon as Wa } from \"@heroicons/react/24/solid\";\nimport { CheckCircleIcon as qf, CheckIcon as Gf, ExclamationTriangleIcon as Yf, StarIcon as Kf } from \"@heroicons/react/24/solid\";\nimport { Root as Br, Thumb as $a } from \"@radix-ui/react-switch\";\nimport * as G from \"@radix-ui/react-select\";\nimport { ChevronDownIcon as Pt, ChevronUpIcon as Va, CheckIcon as Ha } from \"@heroicons/react/20/solid\";\nimport { Root as Fr } from \"@radix-ui/react-label\";\nimport { Slot as qa } from \"@radix-ui/react-slot\";\nimport { Link as Ze, useParams as ct, useNavigate as Rt, Outlet as Ga, useLocation as Ya } from \"react-router-dom\";\nimport { Root as Ka, List as Wr, Trigger as $r, Content as Vr } from \"@radix-ui/react-tabs\";\nimport { useTranslation as dt } from \"react-i18next\";\nimport { onCLS as Za, onINP as Xa, onFCP as Ja, onLCP as Qa, onTTFB as en } from \"web-vitals\";\nfunction m(...e) {\n return wa(va(e));\n}\nconst tn = ({\n children: e,\n as: t = \"div\",\n p: r,\n px: n,\n py: o,\n m: s,\n mx: i,\n my: c,\n bg: d,\n border: l = !1,\n rounded: g,\n shadow: u,\n w: b,\n h: f,\n className: h\n}) => {\n const y = {\n none: \"0\",\n xs: \"1\",\n sm: \"2\",\n md: \"4\",\n lg: \"6\",\n xl: \"8\",\n \"2xl\": \"12\",\n auto: \"auto\"\n }, x = d ? {\n transparent: \"bg-transparent\",\n white: \"bg-white dark:bg-gray-900\",\n gray: \"bg-gray-100 dark:bg-gray-800\",\n primary: \"bg-blue-50 dark:bg-blue-900/20\",\n success: \"bg-green-50 dark:bg-green-900/20\",\n warning: \"bg-yellow-50 dark:bg-yellow-900/20\",\n danger: \"bg-red-50 dark:bg-red-900/20\"\n }[d] : \"\", C = g ? {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\"\n }[g] : \"\", v = u ? {\n none: \"shadow-none\",\n sm: \"shadow-sm\",\n md: \"shadow-md\",\n lg: \"shadow-lg\",\n xl: \"shadow-xl\"\n }[u] : \"\", k = b ? {\n auto: \"w-auto\",\n full: \"w-full\",\n screen: \"w-screen\",\n min: \"w-min\",\n max: \"w-max\"\n }[b] : \"\", w = f ? {\n auto: \"h-auto\",\n full: \"h-full\",\n screen: \"h-screen\",\n min: \"h-min\",\n max: \"h-max\"\n }[f] : \"\", S = [];\n r && S.push(\"p-\" + y[r]), n && S.push(\"px-\" + y[n]), o && S.push(\"py-\" + y[o]);\n const E = [];\n return s && E.push(\"m-\" + y[s]), i && E.push(\"mx-\" + y[i]), c && E.push(\"my-\" + y[c]), /* @__PURE__ */ a(\n t,\n {\n className: m(\n ...S,\n ...E,\n x,\n l && \"border border-gray-200 dark:border-gray-700\",\n C,\n v,\n k,\n w,\n h\n ),\n children: e\n }\n );\n}, Zi = ({\n direction: e = \"row\",\n align: t,\n justify: r,\n wrap: n = \"nowrap\",\n gap: o,\n inline: s = !1,\n className: i,\n ...c\n}) => {\n const d = {\n row: \"flex-row\",\n \"row-reverse\": \"flex-row-reverse\",\n col: \"flex-col\",\n \"col-reverse\": \"flex-col-reverse\"\n }, l = t ? {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\"\n }[t] : \"\", g = r ? {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\"\n }[r] : \"\", u = {\n nowrap: \"flex-nowrap\",\n wrap: \"flex-wrap\",\n \"wrap-reverse\": \"flex-wrap-reverse\"\n }, b = o ? {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\"\n }[o] : \"\";\n return /* @__PURE__ */ a(\n tn,\n {\n ...c,\n className: m(\n s ? \"inline-flex\" : \"flex\",\n d[e],\n l,\n g,\n u[n],\n b,\n i\n )\n }\n );\n}, Xi = ({\n children: e,\n size: t = \"xl\",\n center: r = !0,\n padding: n = \"md\",\n className: o\n}) => {\n const s = {\n sm: \"max-w-screen-sm\",\n // 640px\n md: \"max-w-screen-md\",\n // 768px\n lg: \"max-w-screen-lg\",\n // 1024px\n xl: \"max-w-screen-xl\",\n // 1280px\n \"2xl\": \"max-w-screen-2xl\",\n // 1536px\n full: \"max-w-full\"\n }, i = {\n none: \"\",\n sm: \"px-4 py-2\",\n md: \"px-6 py-4\",\n lg: \"px-8 py-6\"\n };\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-full\",\n s[t],\n r && \"mx-auto\",\n i[n],\n o\n ),\n children: e\n }\n );\n}, Ji = ({\n children: e,\n cols: t = 1,\n gap: r = \"md\",\n autoFit: n,\n autoFill: o,\n alignItems: s = \"stretch\",\n justifyItems: i = \"stretch\",\n className: c\n}) => {\n const d = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\"\n }, l = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\"\n }, g = {\n start: \"justify-items-start\",\n center: \"justify-items-center\",\n end: \"justify-items-end\",\n stretch: \"justify-items-stretch\"\n }, u = () => {\n if (n || o) return \"\";\n if (typeof t == \"number\")\n return {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-2\",\n 3: \"grid-cols-3\",\n 4: \"grid-cols-4\",\n 5: \"grid-cols-5\",\n 6: \"grid-cols-6\",\n 7: \"grid-cols-7\",\n 8: \"grid-cols-8\",\n 9: \"grid-cols-9\",\n 10: \"grid-cols-10\",\n 11: \"grid-cols-11\",\n 12: \"grid-cols-12\"\n }[t] || \"grid-cols-1\";\n const f = [];\n return t.sm && f.push(\"grid-cols-\" + t.sm), t.md && f.push(\"md:grid-cols-\" + t.md), t.lg && f.push(\"lg:grid-cols-\" + t.lg), t.xl && f.push(\"xl:grid-cols-\" + t.xl), f.join(\" \");\n };\n let b;\n return n ? b = \"repeat(auto-fit, minmax(\" + n + \", 1fr))\" : o && (b = \"repeat(auto-fill, minmax(\" + o + \", 1fr))\"), /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"grid\",\n u(),\n d[r],\n l[s],\n g[i],\n c\n ),\n style: b ? { gridTemplateColumns: b } : void 0,\n children: e\n }\n );\n}, Hr = ({\n children: e,\n direction: t = \"vertical\",\n spacing: r = \"md\",\n align: n = \"stretch\",\n justify: o = \"start\",\n wrap: s = !1,\n full: i = !1,\n divider: c = !1,\n className: d\n}) => {\n const l = t === \"vertical\", g = {\n vertical: {\n none: \"\",\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-4\",\n lg: \"space-y-6\",\n xl: \"space-y-8\",\n \"2xl\": \"space-y-12\"\n },\n horizontal: {\n none: \"\",\n xs: \"space-x-1\",\n sm: \"space-x-2\",\n md: \"space-x-4\",\n lg: \"space-x-6\",\n xl: \"space-x-8\",\n \"2xl\": \"space-x-12\"\n }\n }, u = {\n vertical: {\n none: \"\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\"\n },\n horizontal: {\n none: \"\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\"\n }\n }, b = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\"\n }, f = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\"\n };\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex\",\n l ? \"flex-col\" : \"flex-row\",\n c ? u[t][r] : g[t][r],\n b[n],\n f[o],\n s && \"flex-wrap\",\n i && (l ? \"h-full\" : \"w-full\"),\n d\n ),\n children: c ? U.Children.map(e, (h, y) => /* @__PURE__ */ p(U.Fragment, { children: [\n h,\n y < U.Children.count(e) - 1 && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"bg-gray-200 dark:bg-gray-700\",\n l ? \"h-px w-full\" : \"w-px h-full\"\n )\n }\n )\n ] }, y)) : e\n }\n );\n}, Qi = (e) => /* @__PURE__ */ a(Hr, { direction: \"vertical\", ...e }), el = (e) => /* @__PURE__ */ a(Hr, { direction: \"horizontal\", ...e }), tl = ({\n children: e,\n axis: t = \"both\",\n inline: r = !1,\n className: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n r ? \"inline-flex\" : \"flex\",\n (() => {\n switch (t) {\n case \"horizontal\":\n return \"justify-center\";\n case \"vertical\":\n return \"items-center\";\n case \"both\":\n default:\n return \"justify-center items-center\";\n }\n })(),\n n\n ),\n children: e\n }\n), rl = ({\n size: e = \"md\",\n axis: t = \"vertical\",\n flex: r = !1,\n className: n\n}) => {\n const o = {\n vertical: {\n xs: \"h-1\",\n sm: \"h-2\",\n md: \"h-4\",\n lg: \"h-6\",\n xl: \"h-8\",\n \"2xl\": \"h-12\"\n },\n horizontal: {\n xs: \"w-1\",\n sm: \"w-2\",\n md: \"w-4\",\n lg: \"w-6\",\n xl: \"w-8\",\n \"2xl\": \"w-12\"\n }\n }, s = typeof e == \"number\" ? t === \"vertical\" ? { height: `${e}px` } : { width: `${e}px` } : void 0, i = typeof e == \"string\" ? o[t][e] : \"\";\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(r && \"flex-1\", !r && i, n),\n style: s,\n \"aria-hidden\": \"true\"\n }\n );\n}, rn = Q(\"\", {\n variants: {\n variant: {\n default: \"\",\n hero: \"relative overflow-hidden\",\n feature: \"bg-white dark:bg-gray-800\",\n cta: \"relative overflow-hidden\",\n testimonial: \"bg-gray-50 dark:bg-gray-900\",\n footer: \"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t\"\n },\n spacing: {\n none: \"\",\n xs: \"py-2\",\n // 8px\n sm: \"py-3\",\n // 12px\n md: \"py-4\",\n // 16px\n lg: \"py-6\",\n // 24px\n xl: \"py-8\",\n // 32px\n \"2xl\": \"py-12\",\n // 48px\n \"3xl\": \"py-16\",\n // 64px\n \"4xl\": \"py-20\",\n // 80px\n \"5xl\": \"py-24\"\n // 96px\n },\n background: {\n none: \"bg-transparent\",\n default: \"bg-gray-50 dark:bg-gray-900\",\n surface: \"bg-white dark:bg-gray-800\",\n gradient: \"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50\",\n \"gradient-primary\": \"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50\",\n \"gradient-secondary\": \"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50\",\n \"gradient-tertiary\": \"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900\",\n \"gradient-vibrant\": \"bg-gradient-to-br from-blue-800 to-purple-800 dark:from-blue-900 dark:to-purple-900\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n spacing: \"3xl\",\n background: \"none\"\n }\n}), an = {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n \"3xl\": \"max-w-3xl\",\n \"4xl\": \"max-w-4xl\",\n \"5xl\": \"max-w-5xl\",\n \"6xl\": \"max-w-6xl\",\n \"7xl\": \"max-w-7xl\",\n full: \"max-w-full\"\n}, al = ({\n children: e,\n variant: t = \"default\",\n spacing: r = \"3xl\",\n background: n = \"none\",\n maxWidth: o = \"7xl\",\n className: s,\n containerClassName: i,\n as: c = \"section\",\n id: d,\n fullWidth: l = !1\n}) => {\n const g = l ? e : /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n an[o],\n \"mx-auto px-4 sm:px-6 lg:px-8\",\n i\n ),\n children: e\n }\n );\n return U.createElement(\n c,\n {\n id: d,\n className: m(\n rn({ variant: t, spacing: r, background: n }),\n s\n )\n },\n g\n );\n}, nn = Q(\"min-h-screen flex flex-col\", {\n variants: {\n background: {\n default: \"bg-gray-50 dark:bg-gray-900\",\n surface: \"bg-white dark:bg-gray-800\",\n transparent: \"bg-transparent\",\n gradient: \"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20\"\n },\n overflow: {\n visible: \"overflow-visible\",\n hidden: \"overflow-hidden\",\n scroll: \"overflow-auto\"\n }\n },\n defaultVariants: {\n background: \"default\",\n overflow: \"visible\"\n }\n}), nl = ({\n children: e,\n background: t = \"default\",\n overflow: r = \"visible\",\n className: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(nn({ background: t, overflow: r }), n),\n children: e\n }\n), ol = ({\n children: e,\n ratio: t = \"16/9\",\n className: r\n}) => {\n const s = `${1 / (typeof t == \"string\" ? {\n \"16/9\": 1.7777777777777777,\n \"4/3\": 1.3333333333333333,\n \"1/1\": 1,\n \"21/9\": 2.3333333333333335,\n \"3/2\": 1.5\n }[t] : t) * 100}%`;\n return /* @__PURE__ */ a(\"div\", { className: m(\"relative w-full\", r), style: { paddingBottom: s }, children: /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0\", children: e }) });\n}, A = {\n // Typography scale\n typography: {\n // Font families\n family: {\n // Sans-serif fonts (default for UI)\n sans: \"font-sans\",\n // ui-monospace, Menlo, Monaco, Consolas\n // Display fonts (for headings)\n display: \"font-sans\",\n // Same as sans for consistency\n // Body text font\n body: \"font-sans\"\n // Same as sans for consistency\n },\n // Semantic font sizes for specific use cases\n semantic: {\n // Caption text\n caption: \"text-xs\",\n // 12px\n // Small body text\n small: \"text-sm\",\n // 14px\n // Regular body text\n body: \"text-base\",\n // 16px\n // Large body text\n bodyLarge: \"text-lg\",\n // 20px\n // Heading 6\n h6: \"text-base\",\n // 16px\n // Heading 5\n h5: \"text-lg\",\n // 18px\n // Heading 4\n h4: \"text-xl\",\n // 20px\n // Heading 3\n h3: \"text-2xl\",\n // 24px\n // Heading 2\n h2: \"text-3xl\",\n // 30px\n // Heading 1\n h1: \"text-4xl\",\n // 60px\n // Giant display text\n hero: \"text-8xl\"\n // 96px\n },\n // Font weights with semantic names\n weight: {\n // 500\n semibold: \"font-semibold\",\n // 600\n bold: \"font-bold\",\n // 900\n // Semantic weights\n body: \"font-normal\",\n // For body text\n emphasis: \"font-medium\",\n // For emphasized text\n strong: \"font-semibold\",\n // For strong text\n heading: \"font-bold\",\n // For headings\n display: \"font-extrabold\"\n // For display text\n },\n // Text decoration\n decoration: {\n none: \"no-underline\",\n underline: \"underline\"\n },\n // Text underline offset\n underlineOffset: {\n medium: \"underline-offset-2\"\n },\n // Line heights with semantic names\n leading: {\n // 1\n tight: \"leading-tight\",\n // 2\n // Semantic values\n heading: \"leading-tight\",\n // For headings\n body: \"leading-relaxed\",\n // For body text\n caption: \"leading-normal\",\n // For captions\n display: \"leading-none\"\n // For display text\n },\n // Letter spacing with semantic names\n tracking: {\n // 0.1em\n // Semantic values\n heading: \"tracking-tight\",\n // For headings\n body: \"tracking-normal\",\n // For body text\n caption: \"tracking-normal\",\n // For button text\n uppercase: \"tracking-wider\"\n // For uppercase text\n },\n // Text transform\n transform: {\n uppercase: \"uppercase\"\n }\n }\n}, O = {\n // =============================================================================\n // HEADINGS\n // =============================================================================\n heading: {\n // Display headings (hero sections, landing pages)\n display: {\n // Massive display text (128px)\n hero: () => `${A.typography.family.display} ${A.typography.semantic.hero} ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n // Large display text (96px)\n xl: () => `${A.typography.family.display} text-7xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n // Medium display text (72px)\n lg: () => `${A.typography.family.display} text-6xl ${A.typography.weight.bold} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n // Small display text (60px)\n md: () => `${A.typography.family.display} text-5xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n // Extra small display text (48px)\n sm: () => `${A.typography.family.display} text-4xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`\n },\n // Standard headings (H1-H6)\n h1: () => `${A.typography.family.sans} ${A.typography.semantic.h1} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h2: () => `${A.typography.family.sans} ${A.typography.semantic.h2} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h3: () => `${A.typography.family.sans} ${A.typography.semantic.h3} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h4: () => `${A.typography.family.sans} ${A.typography.semantic.h4} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h5: () => `${A.typography.family.sans} ${A.typography.semantic.h5} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h6: () => `${A.typography.family.sans} ${A.typography.semantic.h6} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n // Responsive headings that scale with screen size\n responsive: {\n h1: () => `${A.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h2: () => `${A.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n h3: () => `${A.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,\n display: () => `${A.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`\n }\n },\n // =============================================================================\n // BODY TEXT\n // =============================================================================\n body: {\n // Large body text (18px)\n xl: () => `${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,\n // Regular body text (16px) - Default\n lg: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,\n // Medium body text (16px) - Alias for lg\n md: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,\n // Small body text (14px)\n sm: () => `${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,\n // Extra small body text (12px)\n xs: () => `${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,\n // Emphasized/strong body text variants\n strong: {\n xl: () => `${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n lg: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n md: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n sm: () => `${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`\n },\n // Emphasized/medium body text variants\n emphasis: {\n xl: () => `${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n lg: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n md: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,\n sm: () => `${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`\n },\n // Muted/secondary body text variants\n muted: {\n xl: () => `${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,\n lg: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,\n md: () => `${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,\n sm: () => `${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`\n }\n },\n // =============================================================================\n // SPECIALIZED TEXT\n // =============================================================================\n // Caption and small text\n caption: {\n // Default caption (12px)\n default: () => `${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-500 dark:text-gray-500`,\n // Emphasized caption\n emphasis: () => `${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-600 dark:text-gray-400`,\n // Uppercase caption (for labels)\n uppercase: () => `${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.uppercase} ${A.typography.transform.uppercase} text-gray-500 dark:text-gray-500`\n },\n // Links\n link: {\n // Default link\n default: () => `${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,\n // Link without underline\n subtle: () => `${A.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${A.typography.decoration.underline} hover:${A.typography.underlineOffset.medium} transition-all duration-150`,\n // Muted link\n muted: () => `${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,\n // External link (with icon space)\n external: () => `${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`\n },\n // UI Labels and form text\n label: {\n // Form labels\n default: () => `${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white`,\n // Required field labels\n required: () => `${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,\n // Optional field labels\n optional: () => `${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-600 dark:text-gray-400`,\n // Helper text\n helper: () => `${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-500 dark:text-gray-500`,\n // Error text\n error: () => `${A.typography.family.body} text-sm ${A.typography.weight.body} text-red-600 dark:text-red-400`,\n // Success text\n success: () => `${A.typography.family.body} text-sm ${A.typography.weight.body} text-green-600 dark:text-green-400`\n }\n}, F = {\n // Button variants with complete styling\n button: {\n primary: {\n default: () => \"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n small: () => \"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8\",\n large: () => \"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12\",\n withIcon: () => \"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n fullWidth: () => \"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\"\n },\n secondary: {\n default: () => \"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n small: () => \"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8\",\n large: () => \"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12\",\n withIcon: () => \"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\"\n },\n outline: {\n default: () => \"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n small: () => \"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8\",\n large: () => \"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12\",\n withIcon: () => \"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\"\n },\n destructive: {\n default: () => \"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n outline: () => \"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n small: () => \"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8\"\n },\n ghost: {\n default: () => \"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n small: () => \"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8\",\n icon: () => \"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10\"\n },\n link: {\n default: () => \"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200\",\n muted: () => \"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200\"\n },\n gradient: {\n primary: () => \"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200\",\n secondary: () => \"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200\",\n success: () => \"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200\"\n },\n // Web3 specific button variants\n web3: {\n wallet: () => \"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\",\n connect: () => \"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200\",\n disconnect: () => \"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200\"\n }\n },\n // Badge variants\n badge: {\n default: () => \"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n primary: () => \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n success: () => \"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n warning: () => \"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n error: () => \"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n // Web3 specific\n ethereum: () => \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n solana: () => \"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n // Sizes\n small: (e = \"default\") => {\n const t = {\n default: \"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300\",\n primary: \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300\",\n success: \"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300\",\n warning: \"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300\",\n error: \"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300\"\n };\n return `${t[e] || t.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`;\n },\n large: (e = \"default\") => {\n const t = {\n default: \"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300\",\n primary: \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300\",\n success: \"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300\",\n warning: \"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300\",\n error: \"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300\"\n };\n return `${t[e] || t.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`;\n }\n },\n // Input variants\n input: {\n default: () => \"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\",\n search: () => \"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\",\n error: () => \"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\",\n // Sizes\n small: () => \"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\",\n large: () => \"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\",\n // Special variants\n withIcon: () => \"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2\"\n },\n // Alert variants\n alert: {\n info: () => \"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3\",\n success: () => \"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3\",\n warning: () => \"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3\",\n attention: () => \"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3\",\n error: () => \"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3\",\n // Compact variants\n compact: {\n info: () => \"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm\",\n success: () => \"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm\",\n warning: () => \"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm\",\n attention: () => \"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm\",\n error: () => \"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm\"\n }\n },\n // Navigation variants\n navigation: {\n // Tab variants\n tabs: {\n root: () => \"\",\n list: () => \"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400\",\n listUnderlined: () => \"flex border-b border-gray-200 dark:border-gray-700\",\n listPills: () => \"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1\",\n trigger: () => \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50\",\n triggerUnderlined: () => \"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors\",\n triggerPills: () => \"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all\",\n content: () => \"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400\"\n }\n },\n // Icon variants\n icon: {\n // Combined size and color variants\n variant: {\n // Default variants (most common combinations)\n default: {\n xs: () => \"h-3 w-3 text-gray-500 dark:text-gray-400\",\n sm: () => \"h-4 w-4 text-gray-500 dark:text-gray-400\",\n md: () => \"h-5 w-5 text-gray-500 dark:text-gray-400\",\n lg: () => \"h-6 w-6 text-gray-500 dark:text-gray-400\",\n xl: () => \"h-8 w-8 text-gray-500 dark:text-gray-400\"\n },\n // Success variants\n success: {\n xs: () => \"h-3 w-3 text-green-600 dark:text-green-400\",\n sm: () => \"h-4 w-4 text-green-600 dark:text-green-400\",\n md: () => \"h-5 w-5 text-green-600 dark:text-green-400\",\n lg: () => \"h-6 w-6 text-green-600 dark:text-green-400\",\n xl: () => \"h-8 w-8 text-green-600 dark:text-green-400\"\n },\n // Warning variants\n warning: {\n xs: () => \"h-3 w-3 text-amber-600 dark:text-amber-400\",\n sm: () => \"h-4 w-4 text-amber-600 dark:text-amber-400\",\n md: () => \"h-5 w-5 text-amber-600 dark:text-amber-400\",\n lg: () => \"h-6 w-6 text-amber-600 dark:text-amber-400\",\n xl: () => \"h-8 w-8 text-amber-600 dark:text-amber-400\"\n },\n // Error variants\n error: {\n xs: () => \"h-3 w-3 text-red-600 dark:text-red-400\",\n sm: () => \"h-4 w-4 text-red-600 dark:text-red-400\",\n md: () => \"h-5 w-5 text-red-600 dark:text-red-400\",\n lg: () => \"h-6 w-6 text-red-600 dark:text-red-400\",\n xl: () => \"h-8 w-8 text-red-600 dark:text-red-400\"\n },\n // Muted variants\n muted: {\n xs: () => \"h-3 w-3 text-gray-400 dark:text-gray-500\",\n sm: () => \"h-4 w-4 text-gray-400 dark:text-gray-500\",\n md: () => \"h-5 w-5 text-gray-400 dark:text-gray-500\",\n lg: () => \"h-6 w-6 text-gray-400 dark:text-gray-500\",\n xl: () => \"h-8 w-8 text-gray-400 dark:text-gray-500\"\n }\n }\n },\n // Overlays & Portals variants\n overlays: {\n // Modal/Dialog overlays\n modal: {\n backdrop: () => \"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out\",\n backdropEntering: () => \"opacity-0\",\n backdropEntered: () => \"opacity-100\",\n backdropExiting: () => \"opacity-0\",\n container: () => \"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out\",\n containerEntering: () => \"opacity-0 scale-95\",\n containerEntered: () => \"opacity-100 scale-100\",\n containerExiting: () => \"opacity-0 scale-95\",\n content: () => \"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden\",\n // Size variants\n small: () => \"max-w-sm\",\n medium: () => \"max-w-lg\",\n large: () => \"max-w-2xl\",\n extraLarge: () => \"max-w-4xl\",\n fullWidth: () => \"max-w-[95vw]\",\n // Header and content areas\n header: () => \"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700\",\n title: () => \"text-lg font-semibold text-gray-900 dark:text-gray-100\",\n closeButton: () => \"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors\",\n body: () => \"p-4 sm:p-6 overflow-y-auto\",\n footer: () => \"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50\"\n },\n // Dropdown menus\n dropdown: {\n container: () => \"relative inline-block\",\n trigger: () => \"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors\",\n triggerBordered: () => \"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors\",\n menu: () => \"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200\",\n menuSmall: () => \"w-40\",\n menuLarge: () => \"w-72\",\n menuAuto: () => \"w-auto min-w-40\",\n // Position variants\n menuTop: () => \"bottom-full mb-1\",\n menuBottom: () => \"top-full mt-1\",\n menuLeft: () => \"right-0\",\n menuRight: () => \"left-0\",\n // Animation states\n menuEntering: () => \"opacity-0 scale-95 transform origin-top\",\n menuEntered: () => \"opacity-100 scale-100 transform origin-top\",\n menuExiting: () => \"opacity-0 scale-95 transform origin-top\",\n // Menu items\n itemContainer: () => \"py-1 px-1\",\n item: () => \"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm\",\n itemActive: () => \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm\",\n itemDisabled: () => \"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600\",\n // Special item types\n divider: () => \"my-1 border-t border-gray-200 dark:border-gray-700\",\n header: () => \"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide\",\n // Icons in menu items\n itemIcon: () => \"mr-3 h-4 w-4 flex-shrink-0\",\n itemIconRight: () => \"ml-auto h-4 w-4 flex-shrink-0\"\n }\n }\n}, on = {\n success: \"bg-green-500\",\n error: \"bg-red-500\",\n warning: \"bg-orange-500\",\n attention: \"bg-amber-500\",\n info: \"bg-blue-500\",\n neutral: \"bg-gray-500\"\n};\nfunction Ee(e) {\n return on[e];\n}\nconst sn = {\n default: \"bg-white dark:bg-gray-800\",\n bordered: \"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700\",\n elevated: \"bg-white dark:bg-gray-800 shadow-md\",\n info: \"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300\",\n success: \"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300\",\n warning: \"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300\",\n attention: \"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300\",\n error: \"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300\"\n};\nfunction ln(e) {\n return sn[e];\n}\nconst cn = {\n default: {\n container: \"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm\",\n icon: \"text-blue-600\"\n },\n premium: {\n container: \"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm\",\n icon: \"text-blue-600\"\n },\n primary: {\n container: \"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm\",\n icon: \"text-blue-600\"\n },\n light: {\n container: \"bg-white/20 border border-white/30 text-white backdrop-blur-sm\",\n icon: \"text-white\"\n }\n};\nfunction dn(e) {\n return cn[e];\n}\nconst un = {\n // Border utilities\n border: {\n default: \"border-gray-200 dark:border-gray-700\"\n }\n}, sl = ({\n label: e,\n labelPosition: t = \"center\",\n orientation: r = \"horizontal\",\n spacing: n = \"md\",\n thickness: o = \"thin\",\n variant: s = \"light\",\n className: i,\n lineClassName: c\n}) => {\n const d = {\n horizontal: {\n none: \"my-0\",\n sm: \"my-2\",\n md: \"my-4\",\n lg: \"my-6\",\n xl: \"my-8\"\n },\n vertical: {\n none: \"mx-0\",\n sm: \"mx-2\",\n md: \"mx-4\",\n lg: \"mx-6\",\n xl: \"mx-8\"\n }\n }, l = {\n horizontal: {\n thin: \"border-t\",\n medium: \"border-t-2\",\n thick: \"border-t-4\"\n },\n vertical: {\n thin: \"border-l\",\n medium: \"border-l-2\",\n thick: \"border-l-4\"\n }\n }, g = {\n light: \"border-gray-200 dark:border-gray-700\",\n medium: \"border-gray-300 dark:border-gray-600\",\n dark: \"border-gray-400 dark:border-gray-500\"\n };\n if (r === \"vertical\")\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"self-stretch\",\n l.vertical[o],\n g[s],\n d.vertical[n],\n i\n ),\n role: \"separator\",\n \"aria-orientation\": \"vertical\"\n }\n );\n if (!e)\n return /* @__PURE__ */ a(\n \"hr\",\n {\n className: m(\n l.horizontal[o],\n g[s],\n d.horizontal[n],\n c,\n i\n ),\n role: \"separator\",\n \"aria-orientation\": \"horizontal\"\n }\n );\n const u = {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\"\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"flex items-center\",\n d.horizontal[n],\n u[t],\n i\n ),\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n children: [\n t !== \"left\" && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex-1\",\n l.horizontal[o],\n g[s],\n c\n )\n }\n ),\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n O.body.sm(),\n \"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap\"\n ),\n children: e\n }\n ),\n t !== \"right\" && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex-1\",\n l.horizontal[o],\n g[s],\n c\n )\n }\n )\n ]\n }\n );\n}, il = ({\n orientation: e = \"horizontal\",\n spacing: t = \"md\",\n thickness: r = \"thin\",\n className: n\n}) => {\n const o = {\n horizontal: {\n none: \"\",\n sm: \"my-1\",\n md: \"my-2\",\n lg: \"my-4\"\n },\n vertical: {\n none: \"\",\n sm: \"mx-1\",\n md: \"mx-2\",\n lg: \"mx-4\"\n }\n };\n return /* @__PURE__ */ a(\n \"div\",\n {\n role: \"separator\",\n \"aria-orientation\": e,\n className: m(\n \"bg-gray-200 dark:bg-gray-700\",\n e === \"horizontal\" ? \"w-full\" : \"h-full\",\n {\n horizontal: {\n thin: \"h-px\",\n medium: \"h-0.5\",\n thick: \"h-1\"\n },\n vertical: {\n thin: \"w-px\",\n medium: \"w-0.5\",\n thick: \"w-1\"\n }\n }[e][r],\n o[e][t],\n n\n )\n }\n );\n}, ll = ({\n children: e,\n variant: t = \"blue\",\n position: r = \"left\",\n width: n = \"thick\",\n padding: o = \"md\",\n className: s\n}) => {\n const i = {\n blue: \"border-blue-500 dark:border-blue-400\",\n green: \"border-green-500 dark:border-green-400\",\n purple: \"border-purple-500 dark:border-purple-400\",\n indigo: \"border-indigo-500 dark:border-indigo-400\",\n emerald: \"border-emerald-500 dark:border-emerald-400\",\n orange: \"border-orange-500 dark:border-orange-400\",\n red: \"border-red-500 dark:border-red-400\",\n gray: \"border-gray-400 dark:border-gray-500\"\n }, c = {\n left: \"border-l\",\n right: \"border-r\",\n top: \"border-t\",\n bottom: \"border-b\"\n }, d = {\n thin: \"2\",\n medium: \"3\",\n thick: \"4\"\n }, l = {\n left: {\n sm: \"pl-3\",\n md: \"pl-4\",\n lg: \"pl-6\"\n },\n right: {\n sm: \"pr-3\",\n md: \"pr-4\",\n lg: \"pr-6\"\n },\n top: {\n sm: \"pt-3\",\n md: \"pt-4\",\n lg: \"pt-6\"\n },\n bottom: {\n sm: \"pb-3\",\n md: \"pb-4\",\n lg: \"pb-6\"\n }\n }, g = `${c[r]}-${d[n]}`;\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n g,\n i[t],\n l[r][o],\n s\n ),\n children: e\n }\n );\n}, cl = ({\n children: e,\n title: t,\n position: r = \"bottom-right\",\n collapsible: n = !0,\n defaultCollapsed: o = !1,\n closeable: s = !1,\n onClose: i,\n className: c\n}) => {\n const [d, l] = M(o);\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"fixed z-50 w-80\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-lg shadow-2xl\",\n {\n \"bottom-right\": \"bottom-4 right-4\",\n \"bottom-left\": \"bottom-4 left-4\",\n \"top-right\": \"top-4 right-4\",\n \"top-left\": \"top-4 left-4\"\n }[r],\n c\n ),\n children: [\n (t || n || s) && /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700\", children: [\n t && /* @__PURE__ */ a(\"h3\", { className: \"font-semibold text-gray-900 dark:text-white\", children: t }),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n n && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => l(!d),\n className: \"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors\",\n \"aria-label\": d ? \"Expand\" : \"Collapse\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform\",\n d && \"rotate-180\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n }\n ),\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: i,\n className: \"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors\",\n \"aria-label\": \"Close\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-gray-600 dark:text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ] })\n ] }),\n !d && /* @__PURE__ */ a(\"div\", { className: \"p-4\", children: e })\n ]\n }\n );\n}, dl = ({\n left: e,\n right: t,\n direction: r = \"horizontal\",\n initialSplit: n = 0.5,\n split: o,\n onSplitChange: s,\n minLeftSize: i = 100,\n minRightSize: c = 100,\n dividerSize: d = 8,\n resizable: l = !0,\n className: g\n}) => {\n const [u, b] = M(n), [f, h] = M(!1), y = j(null), x = o !== void 0 ? o : u, C = (k) => {\n l && (k.preventDefault(), h(!0));\n };\n R(() => {\n if (!f) return;\n const k = (S) => {\n const E = y.current;\n if (!E) return;\n const N = E.getBoundingClientRect();\n let T;\n r === \"horizontal\" ? T = (S.clientX - N.left) / N.width : T = (S.clientY - N.top) / N.height, T = Math.max(0, Math.min(1, T));\n const L = r === \"horizontal\" ? N.width : N.height, P = typeof i == \"string\" ? parseFloat(i) / 100 * L : i, I = typeof c == \"string\" ? parseFloat(c) / 100 * L : c, D = P / L, W = 1 - I / L;\n T = Math.max(D, Math.min(W, T)), o !== void 0 && s ? s(T) : b(T);\n }, w = () => {\n h(!1);\n };\n return document.addEventListener(\"mousemove\", k), document.addEventListener(\"mouseup\", w), () => {\n document.removeEventListener(\"mousemove\", k), document.removeEventListener(\"mouseup\", w);\n };\n }, [\n f,\n r,\n i,\n c,\n o,\n s\n ]), R(() => (f ? (document.body.style.userSelect = \"none\", document.body.style.cursor = r === \"horizontal\" ? \"col-resize\" : \"row-resize\") : (document.body.style.userSelect = \"\", document.body.style.cursor = \"\"), () => {\n document.body.style.userSelect = \"\", document.body.style.cursor = \"\";\n }), [f, r]);\n const v = r === \"horizontal\";\n return /* @__PURE__ */ p(\n \"div\",\n {\n ref: y,\n className: m(\n \"w-full h-full flex\",\n v ? \"flex-row\" : \"flex-col\",\n g\n ),\n children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"overflow-auto\",\n style: {\n [v ? \"width\" : \"height\"]: `${x * 100}%`\n },\n children: e\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n onMouseDown: C,\n className: m(\n \"flex-shrink-0 group\",\n \"bg-gray-300 dark:bg-gray-700\",\n l && \"hover:bg-blue-500 dark:hover:bg-blue-400\",\n \"transition-colors\",\n f && \"bg-blue-500 dark:bg-blue-400\",\n v ? \"cursor-col-resize\" : \"cursor-row-resize\",\n !l && \"cursor-default\"\n ),\n style: {\n [v ? \"width\" : \"height\"]: `${d}px`\n },\n children: l && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center w-full h-full\",\n \"text-gray-600 dark:text-gray-400\",\n \"group-hover:text-white\",\n f && \"text-white\"\n ),\n children: v ? /* @__PURE__ */ p(\"svg\", { className: \"w-4 h-4\", fill: \"currentColor\", viewBox: \"0 0 24 24\", children: [\n /* @__PURE__ */ a(\"circle\", { cx: \"10\", cy: \"6\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"10\", cy: \"12\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"10\", cy: \"18\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"14\", cy: \"6\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"14\", cy: \"12\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"14\", cy: \"18\", r: \"1.5\" })\n ] }) : /* @__PURE__ */ p(\"svg\", { className: \"w-4 h-4\", fill: \"currentColor\", viewBox: \"0 0 24 24\", children: [\n /* @__PURE__ */ a(\"circle\", { cx: \"6\", cy: \"10\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"12\", cy: \"10\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"18\", cy: \"10\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"6\", cy: \"14\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"12\", cy: \"14\", r: \"1.5\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"18\", cy: \"14\", r: \"1.5\" })\n ] })\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"overflow-auto flex-1\",\n style: {\n [v ? \"width\" : \"height\"]: `${(1 - x) * 100}%`\n },\n children: t\n }\n )\n ]\n }\n );\n}, ul = ({\n children: e,\n defaultWidth: t = 300,\n defaultHeight: r = 200,\n minWidth: n = 100,\n minHeight: o = 100,\n maxWidth: s,\n maxHeight: i,\n directions: c = [\"right\", \"bottom\", \"bottom-right\"],\n onResize: d,\n onResizeEnd: l,\n showHandles: g = !0,\n className: u\n}) => {\n const [b, f] = M(t), [h, y] = M(r), [x, C] = M(!1), [v, k] = M(null), w = j(null), S = j({ x: 0, y: 0, width: 0, height: 0 }), E = (L) => (P) => {\n P.preventDefault(), P.stopPropagation(), C(!0), k(L), S.current = {\n x: P.clientX,\n y: P.clientY,\n width: b,\n height: h\n };\n };\n R(() => {\n if (!x || !v) return;\n const L = (I) => {\n const D = I.clientX - S.current.x, W = I.clientY - S.current.y;\n let z = S.current.width, $ = S.current.height;\n v.includes(\"right\") ? z = S.current.width + D : v.includes(\"left\") && (z = S.current.width - D), v.includes(\"bottom\") ? $ = S.current.height + W : v.includes(\"top\") && ($ = S.current.height - W), z = Math.max(n, z), $ = Math.max(o, $), s && (z = Math.min(s, z)), i && ($ = Math.min(i, $)), f(z), y($), d && d(z, $);\n }, P = () => {\n C(!1), k(null), l && l(b, h);\n };\n return document.addEventListener(\"mousemove\", L), document.addEventListener(\"mouseup\", P), () => {\n document.removeEventListener(\"mousemove\", L), document.removeEventListener(\"mouseup\", P);\n };\n }, [\n x,\n v,\n b,\n h,\n n,\n o,\n s,\n i,\n d,\n l\n ]);\n const N = _((L) => ({\n top: \"ns-resize\",\n right: \"ew-resize\",\n bottom: \"ns-resize\",\n left: \"ew-resize\",\n \"top-left\": \"nwse-resize\",\n \"top-right\": \"nesw-resize\",\n \"bottom-left\": \"nesw-resize\",\n \"bottom-right\": \"nwse-resize\"\n })[L], []);\n R(() => (x ? (document.body.style.userSelect = \"none\", document.body.style.cursor = N(v)) : (document.body.style.userSelect = \"\", document.body.style.cursor = \"\"), () => {\n document.body.style.userSelect = \"\", document.body.style.cursor = \"\";\n }), [x, v, N]);\n const T = (L) => c.includes(L) ? /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute z-10\",\n g && \"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50\",\n {\n top: \"top-0 left-0 right-0 h-1 cursor-ns-resize\",\n right: \"top-0 right-0 bottom-0 w-1 cursor-ew-resize\",\n bottom: \"bottom-0 left-0 right-0 h-1 cursor-ns-resize\",\n left: \"top-0 left-0 bottom-0 w-1 cursor-ew-resize\",\n \"top-left\": \"top-0 left-0 w-3 h-3 cursor-nwse-resize\",\n \"top-right\": \"top-0 right-0 w-3 h-3 cursor-nesw-resize\",\n \"bottom-left\": \"bottom-0 left-0 w-3 h-3 cursor-nesw-resize\",\n \"bottom-right\": \"bottom-0 right-0 w-3 h-3 cursor-nwse-resize\"\n }[L]\n ),\n onMouseDown: E(L)\n },\n L\n ) : null;\n return /* @__PURE__ */ p(\n \"div\",\n {\n ref: w,\n className: m(\"relative\", u),\n style: {\n width: `${b}px`,\n height: `${h}px`\n },\n children: [\n e,\n [\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"top-left\",\n \"top-right\",\n \"bottom-left\",\n \"bottom-right\"\n ].map(T)\n ]\n }\n );\n}, gl = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UresizableUpanels\",\n children: t || \"UresizableUpanels Component\"\n }\n), ml = ({\n children: e,\n maxHeight: t,\n hideScrollbar: r = !1,\n direction: n = \"vertical\",\n className: o\n}) => {\n const s = {\n vertical: \"overflow-y-auto overflow-x-hidden\",\n horizontal: \"overflow-x-auto overflow-y-hidden\",\n both: \"overflow-auto\"\n }, i = r ? \"scrollbar-hide\" : m(\n // Custom scrollbar styling\n \"scrollbar-thin\",\n \"scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600\",\n \"scrollbar-track-gray-100 dark:scrollbar-track-gray-800\",\n \"hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500\"\n ), c = typeof t == \"number\" ? `${t}px` : t;\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"relative\",\n s[n],\n i,\n o\n ),\n style: c ? { maxHeight: c } : void 0,\n children: e\n }\n );\n}, hl = ({\n children: e,\n columns: t = 3,\n gap: r = 16,\n breakpoints: n,\n className: o\n}) => {\n const [s, i] = M(t), c = j(null);\n R(() => {\n if (!n) return;\n const g = () => {\n const u = window.innerWidth, b = Object.keys(n).map(Number).sort((f, h) => h - f);\n for (const f of b)\n if (u >= f) {\n i(n[f]);\n return;\n }\n i(t);\n };\n return g(), window.addEventListener(\"resize\", g), () => window.removeEventListener(\"resize\", g);\n }, [n, t]);\n const d = U.Children.toArray(e), l = Array.from(\n { length: s },\n () => []\n );\n return d.forEach((g, u) => {\n l[u % s].push(g);\n }), /* @__PURE__ */ a(\n \"div\",\n {\n ref: c,\n className: m(\"flex\", o),\n style: { gap: `${r}px` },\n children: l.map((g, u) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"flex-1 flex flex-col\",\n style: { gap: `${r}px` },\n children: g\n },\n u\n ))\n }\n );\n}, Le = ({ children: e, container: t }) => {\n const [r, n] = M(!1);\n if (R(() => (n(!0), () => n(!1)), []), !r) return null;\n const o = t || document.body;\n return Tt(e, o);\n}, Ot = ({\n isOpen: e,\n onClose: t,\n children: r,\n blur: n = !1,\n opacity: o = \"medium\",\n zIndex: s = 40,\n lockScroll: i = !0,\n className: c\n}) => (U.useEffect(() => {\n if (i) {\n if (e) {\n const l = window.innerWidth - document.documentElement.clientWidth;\n document.body.style.overflow = \"hidden\", document.body.style.paddingRight = `${l}px`;\n } else\n document.body.style.overflow = \"\", document.body.style.paddingRight = \"\";\n return () => {\n document.body.style.overflow = \"\", document.body.style.paddingRight = \"\";\n };\n }\n}, [e, i]), e ? /* @__PURE__ */ a(Le, { children: /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"fixed inset-0\",\n \"transition-opacity duration-300\",\n n && \"backdrop-blur-sm\",\n {\n light: \"bg-black/20 dark:bg-black/30\",\n medium: \"bg-black/50 dark:bg-black/60\",\n dark: \"bg-black/75 dark:bg-black/85\"\n }[o],\n c\n ),\n style: { zIndex: s },\n onClick: t,\n \"aria-hidden\": \"true\",\n children: r && /* @__PURE__ */ a(\n \"div\",\n {\n className: \"relative h-full w-full\",\n onClick: (l) => l.stopPropagation(),\n children: r\n }\n )\n }\n) }) : null), gn = ({\n children: e,\n as: t = \"p\",\n size: r = \"base\",\n weight: n = \"normal\",\n color: o = \"default\",\n align: s,\n transform: i = \"none\",\n truncate: c = !1,\n lineClamp: d,\n className: l\n}) => {\n const g = {\n xs: \"text-xs\",\n sm: \"text-sm\",\n base: \"text-base\",\n lg: \"text-lg\",\n xl: \"text-xl\",\n \"2xl\": \"text-2xl\",\n \"3xl\": \"text-3xl\",\n \"4xl\": \"text-4xl\"\n }, u = {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n }, b = {\n default: \"text-gray-900 dark:text-gray-100\",\n muted: \"text-gray-600 dark:text-gray-400\",\n primary: \"text-blue-600 dark:text-blue-400\",\n success: \"text-green-600 dark:text-green-400\",\n warning: \"text-yellow-600 dark:text-yellow-400\",\n danger: \"text-red-600 dark:text-red-400\"\n }, f = s ? {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n justify: \"text-justify\"\n }[s] : \"\", h = {\n none: \"\",\n uppercase: \"uppercase\",\n lowercase: \"lowercase\",\n capitalize: \"capitalize\"\n }, y = d ? {\n display: \"-webkit-box\",\n WebkitLineClamp: d,\n WebkitBoxOrient: \"vertical\",\n overflow: \"hidden\"\n } : void 0;\n return /* @__PURE__ */ a(\n t,\n {\n className: m(\n g[r],\n u[n],\n b[o],\n f,\n h[i],\n c && \"truncate\",\n d && \"overflow-hidden\",\n l\n ),\n style: y,\n children: e\n }\n );\n}, fl = ({\n children: e,\n level: t = 2,\n size: r,\n weight: n = \"bold\",\n color: o = \"default\",\n align: s,\n className: i\n}) => {\n const d = r || {\n 1: \"4xl\",\n 2: \"3xl\",\n 3: \"2xl\",\n 4: \"xl\",\n 5: \"lg\",\n 6: \"base\"\n }[t], l = {\n \"4xl\": \"text-4xl\",\n \"3xl\": \"text-3xl\",\n \"2xl\": \"text-2xl\",\n xl: \"text-xl\",\n lg: \"text-lg\",\n base: \"text-base\"\n }, g = {\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }, u = {\n default: \"text-gray-900 dark:text-gray-100\",\n muted: \"text-gray-700 dark:text-gray-300\",\n primary: \"text-blue-600 dark:text-blue-400\"\n }, b = s ? {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n }[s] : \"\", f = `h${t}`;\n return U.createElement(\n f,\n {\n className: m(\n l[d],\n g[n],\n u[o],\n b,\n i\n )\n },\n e\n );\n}, mn = Q(\"\", {\n variants: {\n variant: {\n hero: O.heading.display.hero(),\n display: O.heading.display.lg(),\n h1: O.heading.h1(),\n h2: O.heading.h2(),\n h3: O.heading.h3()\n },\n responsive: {\n true: \"\",\n // Responsive sizing handled in variant\n false: \"\"\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n },\n color: {\n default: \"text-gray-900 dark:text-white\",\n muted: \"text-gray-600 dark:text-gray-400\",\n vibrant: \"text-white\",\n brand: \"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent\"\n }\n },\n defaultVariants: {\n variant: \"h1\",\n responsive: !0,\n align: \"left\",\n color: \"default\"\n }\n}), bl = ({\n children: e,\n variant: t = \"h1\",\n responsive: r = !0,\n align: n = \"left\",\n color: o = \"default\",\n className: s,\n as: i\n}) => /* @__PURE__ */ a(\n i || (t === \"hero\" || t === \"display\" || t === \"h1\" ? \"h1\" : t === \"h2\" ? \"h2\" : \"h3\"),\n {\n className: m(\n mn({ variant: t, responsive: r, align: n, color: o }),\n s\n ),\n children: e\n }\n), hn = Q(\"\", {\n variants: {\n variant: {\n h2: O.heading.h2(),\n h3: O.heading.h3(),\n h4: O.heading.h4(),\n h5: O.heading.h5(),\n h6: O.heading.h6()\n },\n spacing: {\n none: \"\",\n sm: \"mb-2\",\n md: \"mb-4\",\n lg: \"mb-6\",\n xl: \"mb-8\"\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n }\n },\n defaultVariants: {\n variant: \"h2\",\n spacing: \"md\",\n align: \"left\"\n }\n}), pl = ({\n children: e,\n variant: t = \"h2\",\n spacing: r = \"md\",\n align: n = \"left\",\n className: o,\n as: s\n}) => {\n const i = s || t;\n return U.createElement(\n i,\n {\n className: m(\n hn({ variant: t, spacing: r, align: n }),\n o\n )\n },\n e\n );\n}, fn = Q(\"\", {\n variants: {\n variant: {\n body: O.body.md(),\n lead: O.body.lg(),\n large: O.body.lg(),\n small: O.body.sm(),\n caption: O.body.xs()\n },\n color: {\n default: \"text-gray-700 dark:text-gray-300\",\n muted: \"text-gray-500 dark:text-gray-500\",\n primary: \"text-gray-900 dark:text-white\"\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n justify: \"text-justify\"\n }\n },\n defaultVariants: {\n variant: \"body\",\n color: \"default\",\n align: \"left\"\n }\n}), yl = ({\n children: e,\n variant: t = \"body\",\n color: r = \"default\",\n align: n = \"left\",\n className: o,\n as: s = \"p\"\n}) => U.createElement(\n s,\n { className: m(fn({ variant: t, color: r, align: n }), o) },\n e\n), bn = Q(O.link.default(), {\n variants: {\n variant: {\n default: O.link.default(),\n subtle: O.link.subtle(),\n muted: O.link.muted(),\n button: \"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors\"\n },\n external: {\n true: \"inline-flex items-center gap-1\",\n false: \"\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n external: !1\n }\n}), xl = ({\n children: e,\n href: t,\n variant: r = \"default\",\n external: n = !1,\n className: o,\n target: s,\n rel: i\n}) => /* @__PURE__ */ p(\n \"a\",\n {\n href: t,\n target: s || (n ? \"_blank\" : void 0),\n rel: i || (n ? \"noopener noreferrer\" : void 0),\n className: m(bn({ variant: r, external: n }), o),\n children: [\n e,\n n && /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\"\n }\n )\n }\n )\n ]\n }\n), vl = ({\n children: e,\n size: t = \"md\",\n variant: r = \"default\",\n className: n\n}) => {\n const o = {\n sm: \"text-xs px-1 py-0.5\",\n md: \"text-sm px-1.5 py-0.5\",\n lg: \"text-base px-2 py-1\"\n }, s = {\n default: \"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100\",\n primary: \"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300\",\n success: \"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300\",\n warning: \"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300\",\n danger: \"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300\"\n };\n return /* @__PURE__ */ a(\n \"code\",\n {\n className: m(\n \"inline-block font-mono font-medium rounded\",\n o[t],\n s[r],\n n\n ),\n children: e\n }\n );\n}, wl = ({\n children: e,\n variant: t = \"primary\",\n size: r = \"md\",\n inline: n = !1,\n align: o = \"left\",\n className: s,\n wrap: i = !1\n}) => {\n const c = {\n primary: \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30\",\n secondary: \"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30\",\n success: \"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30\",\n warning: \"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30\",\n neutral: \"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800\"\n }, d = {\n xs: {\n text: \"text-xs\",\n padding: n ? \"px-1.5 py-0.5\" : \"px-2 py-1\"\n },\n sm: {\n text: \"text-sm\",\n padding: n ? \"px-2 py-0.5\" : \"px-3 py-1.5\"\n },\n md: {\n text: \"text-base\",\n padding: n ? \"px-2.5 py-1\" : \"px-4 py-2\"\n },\n lg: {\n text: \"text-lg\",\n padding: n ? \"px-3 py-1\" : \"px-4 py-2\"\n }\n }, l = {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n }, g = d[r];\n return /* @__PURE__ */ a(\n n ? \"code\" : \"div\",\n {\n className: m(\n \"font-mono rounded-lg\",\n c[t],\n g.text,\n g.padding,\n !n && l[o],\n n ? \"inline-block\" : \"block\",\n !i && \"overflow-x-auto whitespace-nowrap\",\n i && \"break-all\",\n s\n ),\n children: e\n }\n );\n}, kl = ({\n children: e,\n size: t = \"md\",\n className: r\n}) => /* @__PURE__ */ a(\n \"kbd\",\n {\n className: m(\n \"inline-flex items-center justify-center\",\n \"font-mono font-semibold\",\n \"bg-gray-100 dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"border border-gray-300 dark:border-gray-600\",\n \"rounded shadow-sm\",\n {\n sm: \"text-xs px-1.5 py-0.5\",\n md: \"text-sm px-2 py-1\",\n lg: \"text-base px-2.5 py-1.5\"\n }[t],\n r\n ),\n children: e\n }\n), Nl = ({\n children: e,\n cite: t,\n variant: r = \"default\",\n size: n = \"md\",\n className: o\n}) => {\n const s = {\n sm: \"text-sm p-3\",\n md: \"text-base p-4\",\n lg: \"text-lg p-6\"\n }, i = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\"\n }, c = {\n default: \"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50\",\n bordered: \"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800\",\n accent: \"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20\"\n };\n return /* @__PURE__ */ p(\n \"blockquote\",\n {\n className: m(\n \"rounded-r-lg\",\n s[n],\n c[r],\n o\n ),\n children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-800 dark:text-gray-200 italic\", children: e }),\n t && /* @__PURE__ */ p(\n \"footer\",\n {\n className: m(\n \"mt-2 text-gray-600 dark:text-gray-400\",\n i[n]\n ),\n children: [\n \"— \",\n /* @__PURE__ */ a(\"cite\", { className: \"not-italic font-medium\", children: t })\n ]\n }\n )\n ]\n }\n );\n}, Cl = ({\n children: e,\n variant: t = \"default\",\n showIcon: r = !1,\n size: n = \"sm\",\n className: o\n}) => {\n const s = {\n sm: \"text-sm\",\n base: \"text-base\"\n }, i = {\n sm: \"h-4 w-4\",\n base: \"h-5 w-5\"\n }, d = {\n default: {\n text: \"text-gray-600 dark:text-gray-400\",\n icon: Te\n },\n error: {\n text: \"text-red-600 dark:text-red-400\",\n icon: kt\n },\n success: {\n text: \"text-green-600 dark:text-green-400\",\n icon: it\n },\n warning: {\n text: \"text-yellow-600 dark:text-yellow-400\",\n icon: kt\n }\n }[t], l = d.icon;\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex items-start gap-1.5\", o), children: [\n r && /* @__PURE__ */ a(\n l,\n {\n className: m(i[n], d.text, \"flex-shrink-0 mt-0.5\")\n }\n ),\n /* @__PURE__ */ a(\"p\", { className: m(s[n], d.text), children: e })\n ] });\n}, Sl = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UscreenUreaderUtext\",\n children: t || \"UscreenUreaderUtext Component\"\n }\n), El = ({\n children: e,\n maxLength: t = 50,\n position: r = \"end\",\n ellipsis: n = \"...\",\n showTooltip: o = !0,\n className: s\n}) => {\n const i = e || \"\";\n if (i.length <= t)\n return /* @__PURE__ */ a(\"span\", { className: s, children: i });\n const d = (() => {\n const l = n.length, g = t - l;\n switch (r) {\n case \"start\":\n return n + i.slice(i.length - g);\n case \"middle\": {\n const u = Math.floor(g / 2), b = i.slice(0, u), f = i.slice(i.length - (g - u));\n return b + n + f;\n }\n case \"end\":\n default:\n return i.slice(0, g) + n;\n }\n })();\n return /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\"inline-block\", s),\n title: o ? i : void 0,\n children: d\n }\n );\n}, Al = ({\n value: e,\n style: t = \"decimal\",\n currency: r = \"USD\",\n unit: n,\n minimumFractionDigits: o,\n maximumFractionDigits: s,\n locale: i = \"en-US\",\n notation: c = \"standard\",\n className: d\n}) => {\n const l = () => {\n try {\n const g = {\n style: t,\n notation: c,\n minimumFractionDigits: o,\n maximumFractionDigits: s\n };\n return t === \"currency\" && (g.currency = r), t === \"unit\" && n && (g.unit = n), new Intl.NumberFormat(i, g).format(e);\n } catch (g) {\n return console.error(\"Number formatting error:\", g), e.toLocaleString(i);\n }\n };\n return /* @__PURE__ */ a(\"span\", { className: m(d), children: l() });\n}, Tl = ({\n date: e,\n showTooltip: t = !0,\n updateInterval: r = 0,\n className: n\n}) => {\n const [, o] = U.useState(0), s = U.useMemo(() => e instanceof Date ? e : new Date(e), [e]);\n U.useEffect(() => {\n if (r === 0) return;\n const l = setInterval(() => {\n o((g) => g + 1);\n }, r * 1e3);\n return () => clearInterval(l);\n }, [r]);\n const c = (() => {\n const g = (/* @__PURE__ */ new Date()).getTime() - s.getTime(), u = Math.floor(g / 1e3), b = Math.floor(u / 60), f = Math.floor(b / 60), h = Math.floor(f / 24), y = Math.floor(h / 7), x = Math.floor(h / 30), C = Math.floor(h / 365);\n return u < 60 ? \"just now\" : b < 60 ? `${b} ${b === 1 ? \"minute\" : \"minutes\"} ago` : f < 24 ? `${f} ${f === 1 ? \"hour\" : \"hours\"} ago` : h < 7 ? `${h} ${h === 1 ? \"day\" : \"days\"} ago` : y < 4 ? `${y} ${y === 1 ? \"week\" : \"weeks\"} ago` : x < 12 ? `${x} ${x === 1 ? \"month\" : \"months\"} ago` : `${C} ${C === 1 ? \"year\" : \"years\"} ago`;\n })(), d = s.toLocaleString();\n return /* @__PURE__ */ a(\n \"time\",\n {\n dateTime: s.toISOString(),\n title: t ? d : void 0,\n className: m(n),\n children: c\n }\n );\n}, He = ({\n size: e = \"default\",\n variant: t = \"default\",\n className: r,\n ariaLabel: n = \"Loading\",\n loadingText: o = \"Loading...\"\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m((() => {\n const i = {\n small: \"w-4 h-4\",\n default: \"w-6 h-6\",\n large: \"w-8 h-8\",\n extraLarge: \"w-16 h-16 border-4\"\n }, c = {\n default: \"border-gray-300 border-t-blue-600\",\n white: \"border-white/30 border-t-white\",\n success: \"border-gray-300 border-t-green-600\",\n warning: \"border-gray-300 border-t-orange-600\",\n error: \"border-gray-300 border-t-red-600\"\n };\n return `animate-spin rounded-full border-2 ${i[e]} ${c[t]}`;\n })(), r),\n role: \"status\",\n \"aria-label\": n,\n children: /* @__PURE__ */ a(\"span\", { className: \"sr-only\", children: o })\n }\n), Ll = ({\n isLoading: e,\n message: t,\n mode: r = \"fullscreen\",\n blur: n = !1,\n spinnerSize: o = \"large\",\n className: s\n}) => e ? /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n r === \"fullscreen\" ? \"fixed\" : \"absolute\",\n \"inset-0 z-50\",\n \"flex flex-col items-center justify-center\",\n \"bg-white/80 dark:bg-gray-900/80\",\n n && \"backdrop-blur-sm\",\n s\n ),\n role: \"alert\",\n \"aria-live\": \"polite\",\n \"aria-busy\": \"true\",\n children: [\n /* @__PURE__ */ a(He, { size: o }),\n t && /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n O.body.md(),\n \"text-gray-700 dark:text-gray-300 mt-4\"\n ),\n children: t\n }\n )\n ]\n }\n) : null, Ml = ({\n size: e = \"md\",\n variant: t = \"primary\",\n color: r,\n className: n\n}) => {\n const o = {\n sm: \"w-1.5 h-1.5\",\n md: \"w-2 h-2\",\n lg: \"w-3 h-3\"\n }, s = {\n primary: \"bg-blue-600 dark:bg-blue-500\",\n secondary: \"bg-gray-600 dark:bg-gray-400\",\n white: \"bg-white\"\n }, i = m(\n \"rounded-full\",\n o[e],\n r ? \"\" : s[t]\n );\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center gap-1\", n), children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: i,\n style: {\n backgroundColor: r,\n animation: \"loading-dot-bounce 1.4s infinite ease-in-out both\",\n animationDelay: \"-0.32s\"\n }\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: i,\n style: {\n backgroundColor: r,\n animation: \"loading-dot-bounce 1.4s infinite ease-in-out both\",\n animationDelay: \"-0.16s\"\n }\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: i,\n style: {\n backgroundColor: r,\n animation: \"loading-dot-bounce 1.4s infinite ease-in-out both\"\n }\n }\n ),\n /* @__PURE__ */ a(\"style\", { children: `\n @keyframes loading-dot-bounce {\n 0%, 80%, 100% {\n transform: scale(0);\n opacity: 0.5;\n }\n 40% {\n transform: scale(1);\n opacity: 1;\n }\n }\n ` })\n ] });\n}, Il = ({\n message: e = \"Loading...\",\n size: t = \"default\",\n fullScreen: r = !1,\n variant: n = \"default\",\n className: o\n}) => {\n const i = {\n small: { spinner: \"small\", text: \"text-sm\" },\n default: { spinner: \"default\", text: \"text-base\" },\n large: { spinner: \"large\", text: \"text-lg\" }\n }[t], d = /* @__PURE__ */ p(\"div\", { className: m(r ? \"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80\" : \"flex flex-col items-center justify-center p-8\", o), children: [\n /* @__PURE__ */ a(He, { size: i.spinner, variant: n, className: \"mb-4\" }),\n e && /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n i.text,\n \"text-gray-600 dark:text-gray-400 text-center max-w-sm\"\n ),\n children: e\n }\n )\n ] });\n return r ? /* @__PURE__ */ a(\"div\", { className: \"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-center min-h-full p-4\", children: [\n /* @__PURE__ */ a(He, { size: i.spinner, variant: n, className: \"mb-4\" }),\n e && /* @__PURE__ */ a(\"p\", { className: \"text-center text-gray-600 dark:text-gray-400 max-w-sm\", children: e })\n ] }) }) : d;\n}, Pl = ({\n variant: e = \"text\",\n width: t,\n height: r,\n className: n,\n count: o,\n lines: s = 1,\n animate: i = !0,\n borderRadius: c,\n theme: d,\n spacing: l,\n gap: g = \"md\"\n}) => {\n const u = {\n text: \"h-4 rounded\",\n circle: \"rounded-full\",\n rectangle: \"rounded-lg\",\n avatar: \"w-10 h-10 rounded-full\",\n button: \"h-10 rounded-lg\"\n }, b = {\n light: \"bg-gray-200\",\n dark: \"bg-gray-700\"\n }, f = {\n sm: \"space-y-1\",\n md: \"space-y-2\",\n lg: \"space-y-3\"\n }, h = o ?? s, y = (x) => {\n const C = {};\n return t && (C.width = typeof t == \"number\" ? `${t}px` : t), r && (C.height = typeof r == \"number\" ? `${r}px` : r), c && (C.borderRadius = c), /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n i && \"animate-pulse\",\n d ? b[d] : \"bg-gray-200 dark:bg-gray-700\",\n u[e],\n n\n ),\n style: C\n },\n x\n );\n };\n if (h > 1) {\n const x = l !== void 0 ? `space-y-${l}` : f[g];\n return /* @__PURE__ */ a(\"div\", { className: m(x), children: Array.from({ length: h }).map((C, v) => y(v)) });\n }\n return y();\n}, pn = {\n info: Te,\n success: it,\n warning: Mt,\n attention: Na,\n error: Lt\n}, Rl = ({ children: e, className: t }) => /* @__PURE__ */ a(\"div\", { className: m(\"font-medium mb-1\", t), children: e }), Ol = ({ children: e, className: t }) => /* @__PURE__ */ a(\"div\", { className: m(\"text-sm break-words\", t), children: e }), Yt = ({\n variant: e = \"info\",\n title: t,\n description: r,\n icon: n,\n children: o,\n className: s\n}) => {\n const i = pn[e], c = n || /* @__PURE__ */ a(i, { className: \"h-5 w-5\" }), d = typeof F.alert[e] == \"function\" ? F.alert[e]() : \"\";\n return /* @__PURE__ */ p(\"div\", { role: \"alert\", className: m(d, s), children: [\n c && /* @__PURE__ */ a(\"div\", { className: \"flex-shrink-0\", children: c }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n t && /* @__PURE__ */ a(\"div\", { className: \"font-medium mb-1 break-words\", children: t }),\n r && /* @__PURE__ */ a(\"div\", { className: \"text-sm break-words\", children: r }),\n o\n ] })\n ] });\n}, Dl = ({\n message: e,\n variant: t = \"info\",\n dismissible: r = !1,\n onDismiss: n,\n className: o\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"p-4 border rounded-lg flex items-center justify-between\",\n {\n info: \"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700\",\n success: \"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700\",\n warning: \"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700\",\n error: \"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700\"\n }[t],\n o\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { children: e }),\n r && /* @__PURE__ */ a(\"button\", { onClick: n, className: \"ml-4 font-bold\", children: \"×\" })\n ]\n }\n), yn = {\n info: {\n container: \"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800\",\n icon: \"text-blue-600 dark:text-blue-400\",\n title: \"text-blue-800 dark:text-blue-200\",\n description: \"text-blue-700 dark:text-blue-300\",\n button: \"bg-blue-600 hover:bg-blue-700 text-white\",\n secondaryButton: \"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200\"\n },\n success: {\n container: \"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800\",\n icon: \"text-green-600 dark:text-green-400\",\n title: \"text-green-800 dark:text-green-200\",\n description: \"text-green-700 dark:text-green-300\",\n button: \"bg-green-600 hover:bg-green-700 text-white\",\n secondaryButton: \"text-green-700 dark:text-green-300 hover:text-green-800 dark:hover:text-green-200\"\n },\n warning: {\n container: \"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800\",\n icon: \"text-amber-600 dark:text-amber-400\",\n title: \"text-amber-800 dark:text-amber-200\",\n description: \"text-amber-700 dark:text-amber-300\",\n button: \"bg-amber-600 hover:bg-amber-700 text-white\",\n secondaryButton: \"text-amber-700 dark:text-amber-300 hover:text-amber-800 dark:hover:text-amber-200\"\n },\n error: {\n container: \"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800\",\n icon: \"text-red-600 dark:text-red-400\",\n title: \"text-red-800 dark:text-red-200\",\n description: \"text-red-700 dark:text-red-300\",\n button: \"bg-red-600 hover:bg-red-700 text-white\",\n secondaryButton: \"text-red-700 dark:text-red-300 hover:text-red-800 dark:hover:text-red-200\"\n }\n}, Ul = ({\n title: e,\n description: t,\n variant: r = \"info\",\n icon: n,\n action: o,\n secondaryAction: s,\n dismissible: i = !1,\n onDismiss: c,\n className: d\n}) => {\n const l = yn[r];\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\"p-4 border rounded-lg\", l.container, d),\n role: \"alert\",\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-start gap-3\", children: [\n n && /* @__PURE__ */ a(\"div\", { className: m(\"flex-shrink-0\", l.icon), children: n }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\"h4\", { className: m(\"text-sm font-semibold mb-1\", l.title), children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: m(\"text-sm mb-3\", l.description), children: t }),\n (o || s) && /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2 flex-wrap\", children: [\n o && /* @__PURE__ */ p(\n \"button\",\n {\n onClick: o.onClick,\n className: m(\n \"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md transition-colors\",\n l.button\n ),\n children: [\n o.label,\n o.icon\n ]\n }\n ),\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: s.onClick,\n className: m(\n \"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md transition-colors\",\n l.secondaryButton\n ),\n children: s.label\n }\n )\n ] })\n ] }),\n i && c && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: c,\n className: m(\n \"flex-shrink-0 p-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors\",\n l.icon\n ),\n \"aria-label\": \"Dismiss\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ] })\n }\n );\n}, jl = ({\n size: e = \"large\",\n variant: t = \"default\",\n loadingText: r = \"Loading...\",\n showText: n = !1,\n background: o = \"themed\",\n className: s\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"min-h-screen flex flex-col items-center justify-center\",\n {\n transparent: \"bg-transparent\",\n themed: \"bg-white dark:bg-gray-900\",\n blur: \"bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm\"\n }[o],\n s\n ),\n role: \"status\",\n \"aria-live\": \"polite\",\n children: [\n /* @__PURE__ */ a(\n He,\n {\n size: e,\n variant: t,\n ariaLabel: r,\n loadingText: r\n }\n ),\n n && /* @__PURE__ */ a(\"p\", { className: \"mt-4 text-sm text-gray-600 dark:text-gray-400\", children: r })\n ]\n }\n), _l = ({\n variant: e = \"chart\",\n height: t = 256,\n width: r = \"100%\",\n count: n = 5,\n columns: o = 4,\n animate: s = !0,\n className: i\n}) => {\n const c = m(\n \"bg-gray-200 dark:bg-gray-700 rounded\",\n s && \"animate-pulse\"\n ), d = typeof t == \"number\" ? `${t}px` : t, l = typeof r == \"number\" ? `${r}px` : r;\n return e === \"chart\" ? /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\"flex items-center justify-center\", i),\n style: { height: d, width: l },\n children: /* @__PURE__ */ a(\"div\", { className: m(c, \"w-full h-full\") })\n }\n ) : e === \"table\" ? /* @__PURE__ */ p(\"div\", { className: m(\"space-y-3\", i), style: { width: l }, children: [\n /* @__PURE__ */ a(\"div\", { className: \"flex gap-4\", children: Array.from({ length: o }).map((g, u) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(c, \"h-4 flex-1\")\n },\n `header-${u}`\n )) }),\n Array.from({ length: n }).map((g, u) => /* @__PURE__ */ a(\"div\", { className: \"flex gap-4\", children: Array.from({ length: o }).map((b, f) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(c, \"h-8 flex-1\")\n },\n `cell-${u}-${f}`\n )) }, `row-${u}`))\n ] }) : e === \"card\" ? /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"p-4 border border-gray-200 dark:border-gray-700 rounded-lg space-y-4\",\n i\n ),\n style: { width: l },\n children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-4 w-1/3\") }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-2\", children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-full\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-5/6\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-4/6\") })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2 pt-2\", children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-8 w-20\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-8 w-20\") })\n ] })\n ]\n }\n ) : e === \"list\" ? /* @__PURE__ */ a(\"div\", { className: m(\"space-y-3\", i), style: { width: l }, children: Array.from({ length: n }).map((g, u) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3\", children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-10 w-10 rounded-full\") }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 space-y-2\", children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-4 w-3/4\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-1/2\") })\n ] })\n ] }, u)) }) : e === \"stat\" ? /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"p-4 border border-gray-200 dark:border-gray-700 rounded-lg space-y-3\",\n i\n ),\n style: { width: l },\n children: [\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-1/2\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-8 w-2/3\") }),\n /* @__PURE__ */ a(\"div\", { className: m(c, \"h-3 w-1/3\") })\n ]\n }\n ) : null;\n}, qr = ot(null);\nfunction xn() {\n return `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n}\nfunction zl({\n children: e,\n defaultDuration: t = 5e3,\n maxToasts: r = 5\n}) {\n const [n, o] = M([]), s = _((b) => {\n o((f) => f.filter((h) => h.id !== b));\n }, []), i = _(\n (b, f, h) => {\n const y = xn(), x = {\n id: y,\n type: b,\n message: f,\n duration: h ?? t\n };\n o((C) => {\n const v = [...C, x];\n return v.length > r ? v.slice(-r) : v;\n }), x.duration && x.duration > 0 && setTimeout(() => {\n s(y);\n }, x.duration);\n },\n [t, r, s]\n ), c = _(\n (b, f) => i(\"success\", b, f),\n [i]\n ), d = _(\n (b, f) => i(\"error\", b, f),\n [i]\n ), l = _(\n (b, f) => i(\"warning\", b, f),\n [i]\n ), g = _(\n (b, f) => i(\"info\", b, f),\n [i]\n ), u = ge(\n () => ({\n toasts: n,\n addToast: i,\n removeToast: s,\n success: c,\n error: d,\n warning: l,\n info: g\n }),\n [n, i, s, c, d, l, g]\n );\n return /* @__PURE__ */ a(qr.Provider, { value: u, children: e });\n}\nconst vn = {\n success: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"h-5 w-5\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n ),\n error: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"h-5 w-5\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n ),\n warning: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"h-5 w-5\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n }\n )\n }\n ),\n info: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"h-5 w-5\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n }\n )\n }\n )\n}, wn = {\n success: {\n container: \"bg-green-50 border-green-200 dark:bg-green-900/30 dark:border-green-800\",\n icon: \"text-green-500 dark:text-green-400\",\n text: \"text-green-800 dark:text-green-200\"\n },\n error: {\n container: \"bg-red-50 border-red-200 dark:bg-red-900/30 dark:border-red-800\",\n icon: \"text-red-500 dark:text-red-400\",\n text: \"text-red-800 dark:text-red-200\"\n },\n warning: {\n container: \"bg-yellow-50 border-yellow-200 dark:bg-yellow-900/30 dark:border-yellow-800\",\n icon: \"text-yellow-500 dark:text-yellow-400\",\n text: \"text-yellow-800 dark:text-yellow-200\"\n },\n info: {\n container: \"bg-blue-50 border-blue-200 dark:bg-blue-900/30 dark:border-blue-800\",\n icon: \"text-blue-500 dark:text-blue-400\",\n text: \"text-blue-800 dark:text-blue-200\"\n }\n};\nfunction kn({\n toast: e,\n onDismiss: t\n}) {\n const [r, n] = M(!1), [o, s] = M(!1), { type: i, message: c, id: d } = e, l = wn[i];\n R(() => {\n const u = setTimeout(() => n(!0), 10);\n return () => clearTimeout(u);\n }, []);\n const g = () => {\n s(!0), setTimeout(() => {\n t(d);\n }, 200);\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: `\n flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg\n transition-all duration-200 ease-out\n ${l.container}\n ${r && !o ? \"opacity-100 translate-x-0\" : \"opacity-0 translate-x-4\"}\n `,\n role: \"alert\",\n \"aria-live\": \"polite\",\n children: [\n /* @__PURE__ */ a(\"span\", { className: l.icon, children: vn[i] }),\n /* @__PURE__ */ a(\"span\", { className: `flex-1 text-sm font-medium ${l.text}`, children: c }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: g,\n className: `\n p-1 rounded-md transition-colors\n hover:bg-black/10 dark:hover:bg-white/10\n ${l.text}\n `,\n \"aria-label\": \"Dismiss notification\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"h-4 w-4\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ]\n }\n );\n}\nconst Nn = {\n \"top-right\": \"top-4 right-4\",\n \"top-left\": \"top-4 left-4\",\n \"bottom-right\": \"bottom-4 right-4\",\n \"bottom-left\": \"bottom-4 left-4\",\n \"top-center\": \"top-4 left-1/2 -translate-x-1/2\",\n \"bottom-center\": \"bottom-4 left-1/2 -translate-x-1/2\"\n};\nfunction Bl({\n toasts: e,\n onDismiss: t,\n position: r = \"bottom-right\"\n}) {\n return e.length === 0 ? null : /* @__PURE__ */ a(\n \"div\",\n {\n className: `fixed z-50 flex flex-col gap-2 max-w-sm w-full ${Nn[r]}`,\n \"aria-label\": \"Notifications\",\n children: e.map((n) => /* @__PURE__ */ a(kn, { toast: n, onDismiss: t }, n.id))\n }\n );\n}\nfunction Fl() {\n const e = st(qr);\n if (!e)\n throw new Error(\"useToast must be used within a ToastProvider\");\n return e;\n}\nconst Wl = ({\n message: e,\n variant: t = \"info\",\n onClose: r,\n className: n\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3\",\n {\n info: \"bg-blue-500\",\n success: \"bg-green-500\",\n warning: \"bg-yellow-500\",\n error: \"bg-red-500\"\n }[t],\n n\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { children: e }),\n r && /* @__PURE__ */ a(\"button\", { onClick: r, className: \"ml-4\", children: \"×\" })\n ]\n }\n), $l = ({\n count: e,\n maxCount: t = 99,\n variant: r = \"danger\",\n className: n\n}) => {\n const o = e > t ? `${t}+` : e;\n return /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full\",\n {\n default: \"bg-gray-500\",\n primary: \"bg-blue-500\",\n danger: \"bg-red-500\"\n }[r],\n n\n ),\n children: o\n }\n );\n}, Vl = ({\n notifications: e,\n onMarkAsRead: t,\n className: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto\",\n r\n ),\n children: e.map((n) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"p-3 rounded mb-2\",\n n.read ? \"bg-transparent\" : \"bg-blue-50 dark:bg-blue-900/20\"\n ),\n onClick: () => t?.(n.id),\n children: [\n /* @__PURE__ */ a(\"h4\", { className: \"font-semibold text-gray-900 dark:text-white\", children: n.title }),\n /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: n.message }),\n /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-500\", children: n.timestamp })\n ]\n },\n n.id\n ))\n }\n), Hl = ({\n children: e,\n variant: t = \"default\",\n size: r = \"sm\",\n icon: n,\n dot: o = !1,\n pill: s = !1,\n outline: i = !1,\n onClick: c,\n dismissible: d = !1,\n onDismiss: l,\n count: g,\n maxCount: u,\n className: b\n}) => {\n const f = {\n default: \"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300\",\n primary: \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400\",\n success: \"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400\",\n warning: \"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400\",\n danger: \"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400\",\n info: \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400\",\n purple: \"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400\"\n }, h = {\n default: \"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300\",\n primary: \"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400\",\n success: \"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400\",\n warning: \"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400\",\n danger: \"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400\",\n info: \"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400\",\n purple: \"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400\"\n }, y = {\n sm: \"px-2 py-0.5 text-xs\",\n md: \"px-2.5 py-1 text-sm\",\n lg: \"px-3 py-1.5 text-base\"\n }, x = {\n sm: \"h-3 w-3\",\n md: \"h-3.5 w-3.5\",\n lg: \"h-4 w-4\"\n }, C = {\n default: \"bg-gray-600 dark:bg-gray-400\",\n primary: \"bg-blue-600 dark:bg-blue-400\",\n success: \"bg-green-600 dark:bg-green-400\",\n warning: \"bg-yellow-600 dark:bg-yellow-400\",\n danger: \"bg-red-600 dark:bg-red-400\",\n info: \"bg-blue-600 dark:bg-blue-400\",\n purple: \"bg-purple-600 dark:bg-purple-400\"\n }, v = g !== void 0 ? u !== void 0 && g > u ? `${u}+` : g.toString() : null, k = /* @__PURE__ */ p(H, { children: [\n o && /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"h-2 w-2 rounded-full mr-1.5\",\n C[t]\n )\n }\n ),\n n && /* @__PURE__ */ a(\"span\", { className: m(x[r], \"mr-1\"), children: n }),\n e,\n v && /* @__PURE__ */ a(\"span\", { className: \"ml-1\", children: v }),\n d && l && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (S) => {\n S.stopPropagation(), l();\n },\n className: \"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5\",\n \"aria-label\": \"Dismiss\",\n children: /* @__PURE__ */ a(Ba, { className: m(x[r]) })\n }\n )\n ] });\n return /* @__PURE__ */ a(\n c ? \"button\" : \"span\",\n {\n onClick: c,\n className: m(\n \"inline-flex items-center font-medium\",\n i ? h[t] : f[t],\n y[r],\n s ? \"rounded-full\" : \"rounded\",\n c && \"cursor-pointer hover:opacity-80\",\n b\n ),\n children: k\n }\n );\n}, ql = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UbadgeUdesigner\",\n children: t || \"UbadgeUdesigner Component\"\n }\n);\nvar gt = {}, B = {}, Kt;\nfunction Me() {\n if (Kt) return B;\n Kt = 1, Object.defineProperty(B, \"__esModule\", { value: !0 }), B.Currency = B.ErrorType = B.FeatureFlag = B.EmailValidationState = B.PlatformType = B.ConnectionState = B.ConnectionType = B.EmailSortCriteria = B.SortOrder = B.EmailAddressType = B.InfoType = B.NotificationType = B.RequestStatus = B.SubscriptionAction = B.EmailAction = B.MediumView = B.MobileView = B.EmailComposeType = B.FontSize = B.Theme = B.Chain = B.ChainType = B.AuthStatus = void 0;\n var e;\n (function(N) {\n N.CONNECTED = \"connected\", N.DISCONNECTED = \"disconnected\", N.VERIFIED = \"verified\";\n })(e || (B.AuthStatus = e = {}));\n var t;\n (function(N) {\n N.EVM = \"evm\", N.SOLANA = \"solana\";\n })(t || (B.ChainType = t = {}));\n var r;\n (function(N) {\n N.ETH_MAINNET = \"eth-mainnet\", N.ETH_SEPOLIA = \"eth-sepolia\", N.ETH_GOERLI = \"eth-goerli\", N.POLYGON_MAINNET = \"polygon-mainnet\", N.POLYGON_MUMBAI = \"polygon-mumbai\", N.POLYGON_AMOY = \"polygon-amoy\", N.OPTIMISM_MAINNET = \"optimism-mainnet\", N.OPTIMISM_SEPOLIA = \"optimism-sepolia\", N.OPTIMISM_GOERLI = \"optimism-goerli\", N.ARBITRUM_MAINNET = \"arbitrum-mainnet\", N.ARBITRUM_SEPOLIA = \"arbitrum-sepolia\", N.ARBITRUM_GOERLI = \"arbitrum-goerli\", N.BASE_MAINNET = \"base-mainnet\", N.BASE_SEPOLIA = \"base-sepolia\", N.BASE_GOERLI = \"base-goerli\", N.AVALANCHE_MAINNET = \"avalanche-mainnet\", N.AVALANCHE_FUJI = \"avalanche-fuji\", N.BNB_MAINNET = \"bnb-mainnet\", N.BNB_TESTNET = \"bnb-testnet\", N.GNOSIS_MAINNET = \"gnosis-mainnet\", N.GNOSIS_CHIADO = \"gnosis-chiado\", N.CELO_MAINNET = \"celo-mainnet\", N.CELO_ALFAJORES = \"celo-alfajores\", N.ZKSYNC_MAINNET = \"zksync-mainnet\", N.ZKSYNC_SEPOLIA = \"zksync-sepolia\", N.LINEA_MAINNET = \"linea-mainnet\", N.LINEA_SEPOLIA = \"linea-sepolia\", N.SCROLL_MAINNET = \"scroll-mainnet\", N.SCROLL_SEPOLIA = \"scroll-sepolia\", N.MONAD_MAINNET = \"monad-mainnet\", N.MONAD_TESTNET = \"monad-testnet\", N.STORY_MAINNET = \"story-mainnet\", N.STORY_TESTNET = \"story-testnet\", N.PLUME_MAINNET = \"plume-mainnet\", N.PLUME_TESTNET = \"plume-testnet\", N.NEXUS_MAINNET = \"nexus-mainnet\", N.NEXUS_TESTNET = \"nexus-testnet\", N.HYPEREVM_MAINNET = \"hyperevm-mainnet\", N.HYPEREVM_TESTNET = \"hyperevm-testnet\", N.SONIC_MAINNET = \"sonic-mainnet\", N.SONIC_TESTNET = \"sonic-testnet\", N.SONIC_BLAZE = \"sonic-blaze\", N.UNICHAIN_MAINNET = \"unichain-mainnet\", N.UNICHAIN_SEPOLIA = \"unichain-sepolia\", N.WORLD_MAINNET = \"world-mainnet\", N.XDC_MAINNET = \"xdc-mainnet\", N.INK_TESTNET = \"ink-testnet\", N.FETCH_MAINNET = \"fetch-mainnet\", N.FETCH_TESTNET = \"fetch-testnet\", N.GENSYN_MAINNET = \"gensyn-mainnet\", N.GENSYN_TESTNET = \"gensyn-testnet\", N.RITUAL_MAINNET = \"ritual-mainnet\", N.RITUAL_TESTNET = \"ritual-testnet\", N.SOLANA_MAINNET = \"solana-mainnet\", N.SOLANA_DEVNET = \"solana-devnet\", N.SOLANA_TESTNET = \"solana-testnet\", N.EVM_LOCAL = \"evm-local\", N.SOLANA_LOCAL = \"solana-local\";\n })(r || (B.Chain = r = {}));\n var n;\n (function(N) {\n N.LIGHT = \"light\", N.DARK = \"dark\", N.SYSTEM = \"system\";\n })(n || (B.Theme = n = {}));\n var o;\n (function(N) {\n N.SMALL = \"small\", N.MEDIUM = \"medium\", N.LARGE = \"large\";\n })(o || (B.FontSize = o = {}));\n var s;\n (function(N) {\n N.NEW = \"new\", N.REPLY = \"reply\", N.REPLY_ALL = \"replyAll\", N.FORWARD = \"forward\";\n })(s || (B.EmailComposeType = s = {}));\n var i;\n (function(N) {\n N.EMAIL_ADDRESSES = \"emailAddresses\", N.FOLDERS = \"folders\", N.EMAILS = \"emails\", N.EMAIL_BODY = \"emailBody\";\n })(i || (B.MobileView = i = {}));\n var c;\n (function(N) {\n N.LEFT = \"left\", N.RIGHT = \"right\";\n })(c || (B.MediumView = c = {}));\n var d;\n (function(N) {\n N.OPEN = \"open\", N.REPLY = \"reply\", N.FORWARD = \"forward\", N.DELETE = \"delete\", N.STAR = \"star\", N.UNSTAR = \"unstar\", N.MARK_READ = \"mark_read\", N.MARK_UNREAD = \"mark_unread\";\n })(d || (B.EmailAction = d = {}));\n var l;\n (function(N) {\n N.VIEW = \"view\", N.PURCHASE = \"purchase\", N.CANCEL = \"cancel\", N.RESTORE = \"restore\";\n })(l || (B.SubscriptionAction = l = {}));\n var g;\n (function(N) {\n N.IDLE = \"idle\", N.LOADING = \"loading\", N.SUCCESS = \"success\", N.ERROR = \"error\";\n })(g || (B.RequestStatus = g = {}));\n var u;\n (function(N) {\n N.INFO = \"info\", N.SUCCESS = \"success\", N.WARNING = \"warning\", N.ERROR = \"error\";\n })(u || (B.NotificationType = u = {}));\n var b;\n (function(N) {\n N.INFO = \"info\", N.SUCCESS = \"success\", N.WARNING = \"warning\", N.ERROR = \"error\";\n })(b || (B.InfoType = b = {}));\n var f;\n (function(N) {\n N.DIRECT = \"direct\", N.ENS = \"ens\", N.SNS = \"sns\", N.CUSTOM = \"custom\";\n })(f || (B.EmailAddressType = f = {}));\n var h;\n (function(N) {\n N.ASC = \"asc\", N.DESC = \"desc\";\n })(h || (B.SortOrder = h = {}));\n var y;\n (function(N) {\n N.DATE = \"date\", N.SUBJECT = \"subject\", N.FROM = \"from\", N.SIZE = \"size\";\n })(y || (B.EmailSortCriteria = y = {}));\n var x;\n (function(N) {\n N.UNKNOWN = \"unknown\", N.NONE = \"none\", N.WIFI = \"wifi\", N.CELLULAR_2G = \"2g\", N.CELLULAR_3G = \"3g\", N.CELLULAR_4G = \"4g\", N.CELLULAR_5G = \"5g\", N.ETHERNET = \"ethernet\";\n })(x || (B.ConnectionType = x = {}));\n var C;\n (function(N) {\n N.UNKNOWN = \"unknown\", N.DISCONNECTED = \"disconnected\", N.CONNECTING = \"connecting\", N.CONNECTED = \"connected\", N.RECONNECTING = \"reconnecting\", N.VERIFIED = \"verified\", N.LIMITED = \"limited\", N.ERROR = \"error\";\n })(C || (B.ConnectionState = C = {}));\n var v;\n (function(N) {\n N.WEB = \"web\", N.REACT_NATIVE = \"react_native\", N.DESKTOP = \"desktop\";\n })(v || (B.PlatformType = v = {}));\n var k;\n (function(N) {\n N.VALID = \"valid\", N.INVALID = \"invalid\", N.PENDING = \"pending\", N.UNKNOWN = \"unknown\";\n })(k || (B.EmailValidationState = k = {}));\n var w;\n (function(N) {\n N.AI_SEARCH = \"ai_search\", N.SMART_COMPOSE = \"smart_compose\", N.ADVANCED_FILTERS = \"advanced_filters\", N.DARK_MODE = \"dark_mode\", N.NOTIFICATIONS = \"notifications\", N.ANALYTICS = \"analytics\";\n })(w || (B.FeatureFlag = w = {}));\n var S;\n (function(N) {\n N.NETWORK = \"network\", N.AUTH = \"auth\", N.VALIDATION = \"validation\", N.PERMISSION = \"permission\", N.UNKNOWN = \"unknown\";\n })(S || (B.ErrorType = S = {}));\n var E;\n return (function(N) {\n N.USD = \"USD\", N.EUR = \"EUR\", N.GBP = \"GBP\", N.CAD = \"CAD\", N.AUD = \"AUD\";\n })(E || (B.Currency = E = {})), B;\n}\nvar mt = {}, Zt;\nfunction Cn() {\n return Zt || (Zt = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.getWalletConnectionState = e.isWalletVerified = e.isWalletConnected = void 0;\n const t = Me(), r = (s) => s != null && !!s.walletAddress;\n e.isWalletConnected = r;\n const n = (s) => (0, e.isWalletConnected)(s) && !!s.message && !!s.signature;\n e.isWalletVerified = n;\n const o = (s) => (0, e.isWalletConnected)(s) ? (0, e.isWalletVerified)(s) ? t.ConnectionState.VERIFIED : t.ConnectionState.CONNECTED : t.ConnectionState.DISCONNECTED;\n e.getWalletConnectionState = o;\n })(mt)), mt;\n}\nvar te = {}, Xt;\nfunction Gr() {\n if (Xt) return te;\n Xt = 1, Object.defineProperty(te, \"__esModule\", { value: !0 }), te.PROTOCOL_CONSTANTS = te.TransactionStatus = te.MessageType = void 0, te.isSolanaAddress = r, te.isEvmAddress = n, te.isSolanaRecipient = o, te.isEvmRecipient = s;\n var e;\n (function(i) {\n i.STANDARD = \"standard\", i.PRIORITY = \"priority\", i.PREPARED_STANDARD = \"prepared_standard\", i.PREPARED_PRIORITY = \"prepared_priority\";\n })(e || (te.MessageType = e = {}));\n var t;\n (function(i) {\n i.SUCCESS = \"success\", i.FAILED = \"failed\", i.PENDING = \"pending\";\n })(t || (te.TransactionStatus = t = {}));\n function r(i) {\n try {\n if (i.length < 32 || i.length > 44 || !/^[1-9A-HJ-NP-Za-km-z]+$/.test(i))\n return !1;\n try {\n return require(\"bs58\").decode(i).length === 32;\n } catch {\n return !0;\n }\n } catch {\n return !1;\n }\n }\n function n(i) {\n return /^0x[a-fA-F0-9]{40}$/.test(i);\n }\n function o(i) {\n return r(i);\n }\n function s(i) {\n return n(i);\n }\n return te.PROTOCOL_CONSTANTS = {\n /** Base send fee: 0.1 USDC (100,000 with 6 decimals) */\n SEND_FEE: 100000n,\n /** Claim period: 60 days in seconds */\n CLAIM_PERIOD: 1440 * 60 * 60,\n /** Revenue share percentages */\n REVENUE_SHARES: {\n SENDER: 90,\n OWNER: 10\n },\n /** USDC token decimals */\n USDC_DECIMALS: 6,\n /** Maximum message lengths */\n MAX_LENGTHS: {\n SUBJECT: 200,\n BODY: 2e3,\n MAIL_ID: 100\n }\n }, te;\n}\nvar be = {}, re = {}, Jt;\nfunction Yr() {\n if (Jt) return re;\n Jt = 1, Object.defineProperty(re, \"__esModule\", { value: !0 }), re.AddressType = void 0, re.isENSName = n, re.isSNSName = o, re.getAddressType = s, re.isValidWalletAddress = i, re.isValidSignature = c, re.parseEmailAddress = d, re.formatWalletAddress = l, re.getChainDisplayName = g;\n const e = Me(), t = Gr();\n var r;\n (function(u) {\n u.EVMAddress = \"EVMAddress\", u.SolanaAddress = \"SolanaAddress\", u.ENSName = \"ENSName\", u.SNSName = \"SNSName\";\n })(r || (re.AddressType = r = {}));\n function n(u) {\n const b = u.toLowerCase();\n if (!b.endsWith(\".eth\") && !b.endsWith(\".box\"))\n return !1;\n const f = (b.endsWith(\".eth\"), b.slice(0, -4));\n if (f.length === 0)\n return !1;\n const h = f.split(\".\"), y = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;\n for (const x of h)\n if (x.length === 0 || !y.test(x) || x.includes(\"--\"))\n return !1;\n return !0;\n }\n function o(u) {\n const b = u.toLowerCase(), h = [\n \".sol\",\n \".abc\",\n \".bonk\",\n \".poor\",\n \".gm\",\n \".dao\",\n \".defi\",\n \".web3\"\n ].find((v) => b.endsWith(v));\n if (!h)\n return !1;\n const y = b.slice(0, -h.length);\n if (y.length === 0)\n return !1;\n const x = y.split(\".\"), C = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;\n for (const v of x)\n if (v.length === 0 || !C.test(v) || v.includes(\"--\"))\n return !1;\n return !0;\n }\n function s(u, b = void 0) {\n if ((0, t.isEvmAddress)(u))\n return r.EVMAddress;\n if ((0, t.isSolanaAddress)(u))\n return r.SolanaAddress;\n if (b && u.includes(\".\")) {\n if (b === r.EVMAddress)\n return r.ENSName;\n if (b === r.SolanaAddress)\n return r.SNSName;\n }\n }\n function i(u, b) {\n if (!u || typeof u != \"string\")\n return !1;\n const f = s(u);\n switch (b) {\n case e.ChainType.EVM:\n return f === r.EVMAddress || f === r.ENSName;\n case e.ChainType.SOLANA:\n return f === r.SolanaAddress || f === r.SNSName;\n default:\n return !!f;\n }\n }\n function c(u, b) {\n if (!u || typeof u != \"string\")\n return !1;\n switch (b) {\n case e.ChainType.EVM:\n return /^0x[a-fA-F0-9]{130}$/.test(u);\n case e.ChainType.SOLANA:\n return /^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(u);\n default:\n return u.length > 50;\n }\n }\n function d(u) {\n if (!u || typeof u != \"string\")\n return;\n const b = u.split(\"@\");\n if (b.length !== 2)\n return;\n const [f, h] = b;\n if (!f || !h)\n return;\n const y = s(f);\n return {\n address: f,\n domain: h,\n type: y\n };\n }\n function l(u) {\n if (!u || u.length < 10)\n return u;\n const b = s(u);\n return (b === r.ENSName || b === r.SNSName) && u.length <= 20 ? u : `${u.slice(0, 6)}...${u.slice(-4)}`;\n }\n function g(u) {\n if (!u)\n return \"Unknown Chain\";\n switch (u) {\n case e.ChainType.EVM:\n return \"EVM Chain\";\n case e.ChainType.SOLANA:\n return \"Solana\";\n default:\n return \"Blockchain\";\n }\n }\n return re;\n}\nvar Qt;\nfunction Sn() {\n if (Qt) return be;\n Qt = 1, Object.defineProperty(be, \"__esModule\", { value: !0 }), be.validateDomain = t, be.validateMessage = r, be.validateAddress = n, be.validateAmount = o;\n const e = Yr();\n function t(s) {\n if (!s || s.length === 0)\n throw new Error(\"Domain cannot be empty\");\n if (s.length > 100)\n throw new Error(\"Domain cannot exceed 100 characters\");\n if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(s))\n throw new Error(\"Invalid domain format\");\n return !0;\n }\n function r(s, i) {\n if (!s || s.length === 0)\n throw new Error(\"Message subject cannot be empty\");\n if (s.length > 200)\n throw new Error(\"Message subject cannot exceed 200 characters\");\n if (!i || i.length === 0)\n throw new Error(\"Message body cannot be empty\");\n if (i.length > 1e4)\n throw new Error(\"Message body cannot exceed 10000 characters\");\n return !0;\n }\n function n(s, i) {\n if (!s || s.length === 0)\n throw new Error(\"Address cannot be empty\");\n if (!(0, e.isValidWalletAddress)(s, i))\n throw new Error(`Invalid ${i} address format`);\n return !0;\n }\n function o(s) {\n if (s == null || s === \"\" || typeof s == \"string\" && s.trim() === \"\")\n throw new Error(\"Invalid amount format\");\n let i;\n try {\n if (typeof s == \"string\") {\n if (!/^-?\\d+$/.test(s.trim()))\n throw new Error(\"Invalid amount format\");\n i = BigInt(s);\n } else if (typeof s == \"number\") {\n if (!Number.isFinite(s))\n throw new Error(\"Invalid amount format\");\n i = BigInt(Math.floor(s));\n } else if (typeof s == \"bigint\")\n i = s;\n else\n throw new Error(\"Invalid amount format\");\n } catch {\n throw new Error(\"Invalid amount format\");\n }\n if (i < 0n)\n throw new Error(\"Amount cannot be negative\");\n return i;\n }\n return be;\n}\nvar Pe = {}, er;\nfunction En() {\n if (er) return Pe;\n er = 1, Object.defineProperty(Pe, \"__esModule\", { value: !0 }), Pe.StorageType = void 0;\n var e;\n return (function(t) {\n t.LOCAL_STORAGE = \"localStorage\", t.SESSION_STORAGE = \"sessionStorage\", t.ASYNC_STORAGE = \"asyncStorage\", t.MEMORY = \"memory\";\n })(e || (Pe.StorageType = e = {})), Pe;\n}\nvar pe = {}, tr;\nfunction An() {\n if (tr) return pe;\n tr = 1, Object.defineProperty(pe, \"__esModule\", { value: !0 }), pe.AnalyticsEventBuilder = pe.AnalyticsEvent = void 0;\n var e;\n (function(r) {\n r.USER_LOGIN = \"user_login\", r.USER_LOGOUT = \"user_logout\", r.USER_SIGNUP = \"user_signup\", r.EMAIL_SENT = \"email_sent\", r.EMAIL_RECEIVED = \"email_received\", r.EMAIL_OPENED = \"email_opened\", r.EMAIL_REPLY = \"email_reply\", r.EMAIL_FORWARD = \"email_forward\", r.EMAIL_DELETE = \"email_delete\", r.EMAIL_STAR = \"email_star\", r.EMAIL_COMPOSE = \"email_compose\", r.EMAIL_CLICKED = \"email_clicked\", r.PAGE_VIEW = \"page_view\", r.SCREEN_VIEW = \"screen_view\", r.FOLDER_SWITCH = \"folder_switch\", r.SUBSCRIPTION_VIEW = \"subscription_view\", r.SUBSCRIPTION_PURCHASE = \"subscription_purchase\", r.SUBSCRIPTION_CANCEL = \"subscription_cancel\", r.SEARCH_PERFORMED = \"search_performed\", r.SETTINGS_CHANGED = \"settings_changed\", r.ERROR_OCCURRED = \"error_occurred\", r.AB_TEST_VIEWED = \"ab_test_viewed\", r.AB_TEST_CONVERTED = \"ab_test_converted\", r.CUSTOM_EVENT = \"custom_event\";\n })(e || (pe.AnalyticsEvent = e = {}));\n class t {\n /**\n * Build properties for email action events.\n *\n * @param action Email action performed (read, sent, archived, etc.)\n * @param emailId Unique identifier for the email\n * @param folder Email folder context (inbox, sent, trash, etc.)\n * @returns Standardized event properties object\n *\n * @ai-builder Email action properties\n * @ai-standardization Consistent email event tracking\n */\n static emailAction(n, o, s) {\n return {\n action: n,\n email_id: o,\n folder: s,\n timestamp: Date.now()\n };\n }\n /**\n * Build properties for page/screen view events.\n *\n * @param pageName Human-readable page name\n * @param pagePath URL path or screen identifier\n * @returns Standardized page view properties\n *\n * @ai-builder Navigation tracking properties\n * @ai-cross-platform Works for web pages and mobile screens\n */\n static pageView(n, o) {\n return {\n page_name: n,\n page_path: o,\n timestamp: Date.now()\n };\n }\n /**\n * Build properties for error tracking events.\n *\n * @param errorType Category of error (network, validation, runtime, etc.)\n * @param errorMessage Error message or description\n * @param pageName Page/screen where error occurred\n * @returns Standardized error event properties\n *\n * @ai-builder Error tracking properties\n * @ai-debugging Consistent error event structure\n */\n static error(n, o, s) {\n return {\n error_type: n,\n error_message: o,\n page_name: s,\n timestamp: Date.now()\n };\n }\n /**\n * Build properties for subscription/revenue events.\n *\n * @param action Subscription action (subscribe, upgrade, cancel, etc.)\n * @param planType Subscription plan type (free, premium, pro, etc.)\n * @param amount Monetary amount (for revenue tracking)\n * @param currency Currency code (USD, EUR, etc.)\n * @returns Standardized subscription event properties\n *\n * @ai-builder Revenue tracking properties\n * @ai-business-metrics Subscription and revenue analytics\n */\n static subscription(n, o, s, i) {\n return {\n action: n,\n plan_type: o,\n amount: s,\n currency: i,\n timestamp: Date.now()\n };\n }\n /**\n * Build properties for user engagement events.\n *\n * @param feature Feature name or component identifier\n * @param interaction Type of interaction (click, scroll, hover, etc.)\n * @param duration Time spent on interaction (milliseconds)\n * @returns Standardized engagement event properties\n *\n * @ai-builder User engagement properties\n * @ai-ux-analytics User experience and interaction tracking\n */\n static engagement(n, o, s) {\n return {\n feature: n,\n interaction: o,\n duration: s,\n timestamp: Date.now()\n };\n }\n /**\n * Build properties for performance monitoring events.\n *\n * @param metric Performance metric name (load_time, api_response, etc.)\n * @param value Metric value (usually in milliseconds)\n * @param context Additional context about the performance event\n * @returns Standardized performance event properties\n *\n * @ai-builder Performance monitoring properties\n * @ai-performance Application performance tracking\n */\n static performance(n, o, s) {\n return {\n metric: n,\n value: o,\n context: s,\n timestamp: Date.now()\n };\n }\n }\n return pe.AnalyticsEventBuilder = t, pe;\n}\nvar ht = {}, rr;\nfunction Tn() {\n return rr || (rr = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.ProcessedEventName = e.ContractType = e.ChainType = void 0;\n var t = Me();\n Object.defineProperty(e, \"ChainType\", { enumerable: !0, get: function() {\n return t.ChainType;\n } });\n var r;\n (function(o) {\n o.Mailer = \"Mailer\", o.MailService = \"MailService\";\n })(r || (e.ContractType = r = {}));\n var n;\n (function(o) {\n o.MailSent = \"MailSent\", o.PreparedMailSent = \"PreparedMailSent\", o.DelegationSet = \"DelegationSet\", o.DelegationCleared = \"DelegationCleared\", o.DomainRegistered = \"DomainRegistered\", o.DomainExtended = \"DomainExtended\", o.DomainReleased = \"DomainReleased\", o.FeeUpdated = \"FeeUpdated\", o.SharesRecorded = \"SharesRecorded\", o.RecipientClaimed = \"RecipientClaimed\", o.OwnerClaimed = \"OwnerClaimed\", o.ExpiredSharesClaimed = \"ExpiredSharesClaimed\";\n })(n || (e.ProcessedEventName = n = {}));\n })(ht)), ht;\n}\nvar Re = {}, ar;\nfunction Ln() {\n if (ar) return Re;\n ar = 1, Object.defineProperty(Re, \"__esModule\", { value: !0 }), Re.NetworkError = void 0;\n class e extends Error {\n constructor(r, n, o, s) {\n super(r), this.name = \"NetworkError\", this.status = n, this.statusText = o, this.response = s;\n }\n }\n return Re.NetworkError = e, Re;\n}\nvar Oe = {}, nr;\nfunction Mn() {\n if (nr) return Oe;\n nr = 1, Object.defineProperty(Oe, \"__esModule\", { value: !0 }), Oe.WalletType = void 0;\n var e;\n return (function(t) {\n t.METAMASK = \"metamask\", t.PHANTOM = \"phantom\", t.COINBASE = \"coinbase\", t.WALLETCONNECT = \"walletconnect\", t.INJECTED = \"injected\";\n })(e || (Oe.WalletType = e = {})), Oe;\n}\nvar De = {}, or;\nfunction In() {\n if (or) return De;\n or = 1, Object.defineProperty(De, \"__esModule\", { value: !0 }), De.RateLimitPeriodType = void 0;\n var e;\n return (function(t) {\n t.HOUR = \"hour\", t.DAY = \"day\", t.MONTH = \"month\";\n })(e || (De.RateLimitPeriodType = e = {})), De;\n}\nvar le = {}, sr;\nfunction Kr() {\n if (sr) return le;\n sr = 1, Object.defineProperty(le, \"__esModule\", { value: !0 }), le.InvitationStatus = le.EntityRole = le.EntityType = void 0;\n var e;\n (function(n) {\n n.PERSONAL = \"personal\", n.ORGANIZATION = \"organization\";\n })(e || (le.EntityType = e = {}));\n var t;\n (function(n) {\n n.OWNER = \"owner\", n.MANAGER = \"manager\", n.MEMBER = \"member\";\n })(t || (le.EntityRole = t = {}));\n var r;\n return (function(n) {\n n.PENDING = \"pending\", n.ACCEPTED = \"accepted\", n.DECLINED = \"declined\", n.EXPIRED = \"expired\";\n })(r || (le.InvitationStatus = r = {})), le;\n}\nvar ft = {}, ir;\nfunction Pn() {\n return ir || (ir = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.ROLE_PERMISSIONS = e.MEMBER_PERMISSIONS = e.MANAGER_PERMISSIONS = e.OWNER_PERMISSIONS = void 0, e.getPermissionsForRole = r, e.hasPermission = n;\n const t = Kr();\n e.OWNER_PERMISSIONS = {\n canViewEntity: !0,\n canEditEntity: !0,\n canDeleteEntity: !0,\n canManageMembers: !0,\n canInviteMembers: !0,\n canManageProjects: !0,\n canCreateProjects: !0,\n canViewProjects: !0,\n canManageApiKeys: !0,\n canViewApiKeys: !0\n }, e.MANAGER_PERMISSIONS = {\n canViewEntity: !0,\n canEditEntity: !0,\n canDeleteEntity: !1,\n canManageMembers: !1,\n canInviteMembers: !1,\n canManageProjects: !0,\n canCreateProjects: !0,\n canViewProjects: !0,\n canManageApiKeys: !0,\n canViewApiKeys: !0\n }, e.MEMBER_PERMISSIONS = {\n canViewEntity: !0,\n canEditEntity: !1,\n canDeleteEntity: !1,\n canManageMembers: !1,\n canInviteMembers: !1,\n canManageProjects: !1,\n canCreateProjects: !1,\n canViewProjects: !0,\n canManageApiKeys: !1,\n canViewApiKeys: !0\n }, e.ROLE_PERMISSIONS = {\n [t.EntityRole.OWNER]: e.OWNER_PERMISSIONS,\n [t.EntityRole.MANAGER]: e.MANAGER_PERMISSIONS,\n [t.EntityRole.MEMBER]: e.MEMBER_PERMISSIONS\n };\n function r(o) {\n return e.ROLE_PERMISSIONS[o];\n }\n function n(o, s) {\n return e.ROLE_PERMISSIONS[o][s];\n }\n })(ft)), ft;\n}\nvar Ue = {}, lr;\nfunction Rn() {\n if (lr) return Ue;\n lr = 1, Object.defineProperty(Ue, \"__esModule\", { value: !0 }), Ue.Web3UsernameValidator = void 0;\n const e = Me();\n class t {\n /**\n * Comprehensive address validation for API endpoint\n * Returns AddressValidationResult for valid addresses, undefined for invalid ones\n */\n static validate(n) {\n if (n) {\n if (this.EVM_REGEX.test(n))\n return {\n name: null,\n address: n.toLowerCase(),\n chainType: e.ChainType.EVM\n };\n if (!n.startsWith(\"0x\") && n.length >= 32 && n.length <= 44 && this.BASE58_REGEX.test(n))\n return {\n name: null,\n address: n,\n // Keep case for Solana\n chainType: e.ChainType.SOLANA\n };\n if ((n.toLowerCase().endsWith(\".eth\") || n.toLowerCase().endsWith(\".box\")) && n.length >= 5 && // minimum: \"a.eth\" = 5 chars\n this.ENS_REGEX.test(n))\n return {\n name: n.toLowerCase(),\n address: null,\n chainType: e.ChainType.EVM\n // ENS resolves to EVM addresses\n };\n if (n.toLowerCase().includes(\".\")) {\n const o = n.toLowerCase().split(\".\");\n if (o.length === 2) {\n const [s, i] = o;\n if (this.VALID_SNS_TLDS.includes(i) && this.SNS_NAME_REGEX.test(s) && s.length >= 1)\n return {\n name: n.toLowerCase(),\n address: null,\n chainType: e.ChainType.SOLANA\n // SNS resolves to Solana addresses\n };\n }\n }\n }\n }\n /**\n * Quick EVM address validation\n */\n static isValidEVMAddress(n) {\n return this.EVM_REGEX.test(n);\n }\n /**\n * Quick Solana address validation\n */\n static isValidSolanaAddress(n) {\n return !n.startsWith(\"0x\") && n.length >= 32 && n.length <= 44 && this.BASE58_REGEX.test(n);\n }\n /**\n * Quick ENS name validation\n */\n static isValidENSName(n) {\n return (n.toLowerCase().endsWith(\".eth\") || n.toLowerCase().endsWith(\".box\")) && n.length >= 5 && this.ENS_REGEX.test(n);\n }\n /**\n * Quick SNS name validation\n */\n static isValidSNSName(n) {\n if (!n.toLowerCase().includes(\".\"))\n return !1;\n const o = n.toLowerCase().split(\".\");\n if (o.length !== 2)\n return !1;\n const [s, i] = o;\n return this.VALID_SNS_TLDS.includes(i) && this.SNS_NAME_REGEX.test(s) && s.length >= 1;\n }\n }\n return Ue.Web3UsernameValidator = t, t.EVM_REGEX = /^0x[a-fA-F0-9]{40}$/, t.BASE58_REGEX = /^[1-9A-HJ-NP-Za-km-z]+$/, t.ENS_REGEX = /^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\\.(eth|box)$/i, t.SNS_NAME_REGEX = /^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/, t.VALID_SNS_TLDS = [\n \"sol\",\n \"abc\",\n \"backpack\",\n \"bonk\",\n \"coin\",\n \"dao\",\n \"defi\",\n \"gm\",\n \"poor\",\n \"pump\",\n \"shdw\",\n \"stepn\",\n \"web3\"\n ], Ue;\n}\nvar bt = {}, cr;\nfunction On() {\n return cr || (cr = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.parseJson = e.createAssertion = e.isUrl = e.isEmail = e.isValidDate = e.isErrorResponse = e.isSuccessResponse = e.isApiResponse = e.optional = e.validateArray = e.hasRequiredProperties = e.isNullish = e.isArray = e.isObject = e.isBoolean = e.isNumber = e.isString = e.createValidator = void 0;\n const t = (k, w) => (S) => {\n try {\n return k(S) ? { isValid: !0, data: S } : { isValid: !1, error: `Invalid ${w}`, data: null };\n } catch (E) {\n return {\n isValid: !1,\n error: `Validation error for ${w}: ${E instanceof Error ? E.message : \"Unknown error\"}`,\n data: null\n };\n }\n };\n e.createValidator = t;\n const r = (k) => typeof k == \"string\";\n e.isString = r;\n const n = (k) => typeof k == \"number\" && !isNaN(k);\n e.isNumber = n;\n const o = (k) => typeof k == \"boolean\";\n e.isBoolean = o;\n const s = (k) => typeof k == \"object\" && k !== null && !Array.isArray(k);\n e.isObject = s;\n const i = (k) => Array.isArray(k);\n e.isArray = i;\n const c = (k) => k == null;\n e.isNullish = c;\n const d = (k, w) => (0, e.isObject)(k) ? w.every((S) => S in k) : !1;\n e.hasRequiredProperties = d;\n const l = (k, w) => (0, e.isArray)(k) ? k.every(w) : !1;\n e.validateArray = l;\n const g = (k) => (w) => w === void 0 || k(w);\n e.optional = g;\n const u = (k) => (0, e.isObject)(k) && (0, e.isBoolean)(k.success);\n e.isApiResponse = u;\n const b = (k, w) => !(0, e.isApiResponse)(k) || !k.success ? !1 : w && \"data\" in k ? w(k.data) : !0;\n e.isSuccessResponse = b;\n const f = (k) => (0, e.isApiResponse)(k) && !k.success && \"error\" in k && (0, e.isString)(k.error);\n e.isErrorResponse = f;\n const h = (k) => {\n if (!(0, e.isString)(k))\n return !1;\n const w = new Date(k);\n return !isNaN(w.getTime());\n };\n e.isValidDate = h;\n const y = (k) => (0, e.isString)(k) ? /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(k) : !1;\n e.isEmail = y;\n const x = (k) => {\n if (!(0, e.isString)(k))\n return !1;\n try {\n return new URL(k), !0;\n } catch {\n return !1;\n }\n };\n e.isUrl = x;\n const C = (k, w) => (S, E = w) => {\n if (!k(S))\n throw new TypeError(`Invalid ${E}: expected ${w}`);\n };\n e.createAssertion = C;\n const v = (k, w) => {\n try {\n const S = JSON.parse(k);\n return w ? w(S) ? { isValid: !0, data: S } : {\n isValid: !1,\n error: \"Parsed JSON does not match expected type\",\n data: null\n } : { isValid: !0, data: S };\n } catch (S) {\n return {\n isValid: !1,\n error: `JSON parse error: ${S instanceof Error ? S.message : \"Unknown error\"}`,\n data: null\n };\n }\n };\n e.parseJson = v;\n })(bt)), bt;\n}\nvar ae = {}, dr;\nfunction Dn() {\n if (dr) return ae;\n dr = 1, Object.defineProperty(ae, \"__esModule\", { value: !0 }), ae.createMultiChainId = e, ae.createUserMultiChainId = t, ae.createChainStatsId = r, ae.createDelegationId = n, ae.normalizeAddress = o, ae.formatBigInt = s, ae.isZeroAddress = i, ae.isTestNet = c, ae.validateEventArgs = d;\n function e(l, g, u) {\n return `${l}-${g}-${u}`;\n }\n function t(l, g) {\n return `${l}-${g.toLowerCase()}`;\n }\n function r(l) {\n return `${l}-global`;\n }\n function n(l, g) {\n return `${l.toLowerCase()}-${g}`;\n }\n function o(l) {\n return l.toLowerCase();\n }\n function s(l, g = 18) {\n const u = BigInt(10 ** g), b = l / u, f = l % u;\n return f === 0n ? b.toString() : `${b}.${f.toString().padStart(g, \"0\").replace(/0+$/, \"\")}`;\n }\n function i(l) {\n return l.toLowerCase() === \"0x0000000000000000000000000000000000000000\";\n }\n function c(l) {\n const g = /* @__PURE__ */ new Set([\n 31337,\n // Hardhat (local development)\n 11155111,\n // Ethereum Sepolia\n 80001,\n // Polygon Mumbai (if configured)\n 80002,\n // Polygon Amoy (if configured)\n 421614,\n // Arbitrum Sepolia (if configured)\n 11155420,\n // OP Sepolia (if configured)\n 84532,\n // Base Sepolia (if configured)\n 43113\n // Avalanche Fuji (if configured)\n ]), u = /* @__PURE__ */ new Set([\n -102,\n // Solana Devnet\n -103,\n // Solana Testnet\n -104\n // Solana Localnet\n ]);\n return g.has(l) || u.has(l);\n }\n function d(l, g) {\n for (const u of g)\n if (l[u] === void 0 || l[u] === null)\n return console.error(`❌ Missing required field: ${String(u)}`), !1;\n return !0;\n }\n return ae;\n}\nvar ne = {}, ur;\nfunction Un() {\n if (ur) return ne;\n ur = 1, Object.defineProperty(ne, \"__esModule\", { value: !0 }), ne.generateAuthMessage = t, ne.isAuthExpired = r, ne.getAuthStatusText = n, ne.canAccessProtectedFeatures = o, ne.isAuthStatusConnected = s, ne.generateNonce = i, ne.extractNonceFromMessage = c, ne.isValidNonce = d;\n const e = Me();\n function t(l, g) {\n const u = g || `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n return `Authenticate with ${l}\nNonce: ${u}`;\n }\n function r(l, g = 24) {\n const u = new Date(l.getTime() + g * 60 * 60 * 1e3);\n return /* @__PURE__ */ new Date() > u;\n }\n function n(l) {\n switch (l) {\n case e.AuthStatus.DISCONNECTED:\n return \"Not connected\";\n case e.AuthStatus.CONNECTED:\n return \"Connected - Please verify\";\n case e.AuthStatus.VERIFIED:\n return \"Authenticated\";\n default:\n return \"Unknown status\";\n }\n }\n function o(l) {\n return l === e.AuthStatus.VERIFIED;\n }\n function s(l) {\n return l === e.AuthStatus.CONNECTED || l === e.AuthStatus.VERIFIED;\n }\n function i() {\n return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n function c(l) {\n const g = l.match(/Nonce:\\s*(.+)$/m);\n return g ? g[1].trim() : void 0;\n }\n function d(l) {\n if (!l || typeof l != \"string\" || l.length < 10)\n return !1;\n const g = l.split(\"-\");\n if (g.length >= 2) {\n const u = parseInt(g[0], 10);\n if (!isNaN(u)) {\n const b = Date.now() - 864e5;\n if (u < b)\n return !1;\n }\n }\n return !0;\n }\n return ne;\n}\nvar Ne = {}, gr;\nfunction jn() {\n if (gr) return Ne;\n gr = 1, Object.defineProperty(Ne, \"__esModule\", { value: !0 }), Ne.parseAdminEmails = e, Ne.isAdminEmail = t, Ne.createAdminChecker = r;\n function e(n) {\n return n ? n.split(\",\").map((o) => o.trim().toLowerCase()).filter((o) => o.length > 0 && o.includes(\"@\")) : [];\n }\n function t(n, o) {\n return n ? o.includes(n.toLowerCase()) : !1;\n }\n function r(n) {\n const o = e(n);\n return (s) => t(s, o);\n }\n return Ne;\n}\nvar pt = {}, mr;\nfunction _n() {\n return mr || (mr = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.CLAIM_PERIOD_DAYS = e.USDC_DECIMALS = void 0, e.formatUSDC = t, e.parseUSDC = r, e.USDC_DECIMALS = 6, e.CLAIM_PERIOD_DAYS = 60;\n function t(n) {\n return (n / Math.pow(10, e.USDC_DECIMALS)).toFixed(2);\n }\n function r(n) {\n return Math.floor(parseFloat(n) * Math.pow(10, e.USDC_DECIMALS));\n }\n })(pt)), pt;\n}\nvar ie = {}, hr;\nfunction zn() {\n if (hr) return ie;\n hr = 1, Object.defineProperty(ie, \"__esModule\", { value: !0 }), ie.formatEmailDate = e, ie.formatTimestamp = t, ie.formatRelativeTime = r, ie.parseDate = n, ie.isDateInRange = o, ie.addDays = s, ie.addHours = i;\n function e(c) {\n const d = typeof c == \"string\" ? new Date(c) : c;\n if (isNaN(d.getTime()))\n return \"Invalid date\";\n const l = /* @__PURE__ */ new Date(), g = l.getTime() - d.getTime(), u = Math.floor(g / (1e3 * 60 * 60 * 24));\n return u === 0 ? d.toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: !0\n }) : u === 1 ? \"Yesterday\" : u < 7 ? d.toLocaleDateString(\"en-US\", {\n weekday: \"long\"\n }) : d.getFullYear() === l.getFullYear() ? d.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\"\n }) : d.toLocaleDateString(\"en-US\", {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\"\n });\n }\n function t(c) {\n return new Date(c).toISOString();\n }\n function r(c) {\n const d = typeof c == \"string\" || typeof c == \"number\" ? new Date(c) : c;\n if (isNaN(d.getTime()))\n return \"Invalid date\";\n const g = (/* @__PURE__ */ new Date()).getTime() - d.getTime(), u = Math.floor(g / 1e3), b = Math.floor(u / 60), f = Math.floor(b / 60), h = Math.floor(f / 24), y = Math.floor(h / 7), x = Math.floor(h / 30), C = Math.floor(h / 365);\n return u < 60 ? \"just now\" : b < 60 ? b === 1 ? \"1 minute ago\" : `${b} minutes ago` : f < 24 ? f === 1 ? \"1 hour ago\" : `${f} hours ago` : h < 7 ? h === 1 ? \"1 day ago\" : `${h} days ago` : y < 4 ? y === 1 ? \"1 week ago\" : `${y} weeks ago` : x < 12 ? x === 1 ? \"1 month ago\" : `${x} months ago` : C === 1 ? \"1 year ago\" : `${C} years ago`;\n }\n function n(c) {\n try {\n const d = new Date(c);\n return isNaN(d.getTime()) ? null : d;\n } catch {\n return null;\n }\n }\n function o(c, d, l) {\n return c >= d && c <= l;\n }\n function s(c, d) {\n const l = new Date(c);\n return l.setDate(l.getDate() + d), l;\n }\n function i(c, d) {\n const l = new Date(c);\n return l.setHours(l.getHours() + d), l;\n }\n return ie;\n}\nvar Y = {}, fr;\nfunction Bn() {\n if (fr) return Y;\n fr = 1, Object.defineProperty(Y, \"__esModule\", { value: !0 }), Y.truncate = e, Y.capitalize = t, Y.toTitleCase = r, Y.toKebabCase = n, Y.toCamelCase = o, Y.toSnakeCase = s, Y.normalizeWhitespace = i, Y.isBlank = c, Y.isNotBlank = d, Y.escapeHtml = l, Y.stripHtml = g, Y.getInitials = u, Y.formatBytes = b, Y.randomString = f, Y.pluralize = h, Y.formatNumber = y;\n function e(x, C, v = \"...\") {\n return !x || x.length <= C ? x : x.slice(0, C - v.length) + v;\n }\n function t(x) {\n return x && x.charAt(0).toUpperCase() + x.slice(1);\n }\n function r(x) {\n return x && x.toLowerCase().split(\" \").map((C) => t(C)).join(\" \");\n }\n function n(x) {\n return x && x.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n function o(x) {\n return x && x.replace(/[-_\\s]+(.)?/g, (C, v) => v ? v.toUpperCase() : \"\").replace(/^./, (C) => C.toLowerCase());\n }\n function s(x) {\n return x && x.replace(/([a-z])([A-Z])/g, \"$1_$2\").replace(/[\\s-]+/g, \"_\").toLowerCase();\n }\n function i(x) {\n return x && x.replace(/\\s+/g, \" \").trim();\n }\n function c(x) {\n return !x || x.trim().length === 0;\n }\n function d(x) {\n return !c(x);\n }\n function l(x) {\n if (!x)\n return x;\n const C = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n '\"': \""\",\n \"'\": \"'\"\n };\n return x.replace(/[&<>\"']/g, (v) => C[v]);\n }\n function g(x) {\n return x && x.replace(/<[^>]*>/g, \"\");\n }\n function u(x, C = 2) {\n return x ? x.trim().split(/\\s+/).slice(0, C).map((w) => w.charAt(0).toUpperCase()).join(\"\") : \"\";\n }\n function b(x, C = 2) {\n if (x === 0)\n return \"0 Bytes\";\n const v = 1024, k = C < 0 ? 0 : C, w = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], S = Math.floor(Math.log(x) / Math.log(v));\n return parseFloat((x / Math.pow(v, S)).toFixed(k)) + \" \" + w[S];\n }\n function f(x, C = \"alphanumeric\") {\n let v;\n switch (C) {\n case \"alpha\":\n v = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n break;\n case \"numeric\":\n v = \"0123456789\";\n break;\n case \"alphanumeric\":\n v = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n break;\n case \"hex\":\n v = \"0123456789abcdef\";\n break;\n default:\n v = C;\n }\n let k = \"\";\n for (let w = 0; w < x; w++)\n k += v.charAt(Math.floor(Math.random() * v.length));\n return k;\n }\n function h(x, C, v) {\n return x === 1 ? C : v || `${C}s`;\n }\n function y(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }\n return Y;\n}\nvar V = {}, br;\nfunction Fn() {\n if (br) return V;\n br = 1, Object.defineProperty(V, \"__esModule\", { value: !0 }), V.Z_INDEX = V.ANIMATION = V.NETWORK_IDS = V.WALLET_NAMES = V.CONTACT_INFO = V.ROUTES = V.SUCCESS_MESSAGES = V.ERROR_MESSAGES = V.TIME_FORMAT = V.SUBSCRIPTION_TIERS = V.EMAIL_CONFIG = V.STORAGE_KEYS = V.CHAIN_TYPE = V.AUTH_STATUS = V.API_RETRY_DELAY = V.API_RETRY_ATTEMPTS = V.API_TIMEOUT = void 0;\n const e = 3e4;\n V.API_TIMEOUT = e;\n const t = 3;\n V.API_RETRY_ATTEMPTS = t;\n const r = 1e3;\n V.API_RETRY_DELAY = r;\n const n = {\n DISCONNECTED: \"disconnected\",\n CONNECTED: \"connected\",\n VERIFIED: \"verified\"\n };\n V.AUTH_STATUS = n;\n const o = {\n EVM: \"evm\",\n SOLANA: \"solana\",\n UNKNOWN: \"unknown\"\n };\n V.CHAIN_TYPE = o;\n const s = {\n AUTH_TOKEN: \"authToken\",\n USER_DATA: \"userData\",\n THEME: \"theme\",\n EMAIL_CACHE: \"emailCache\",\n WALLET_ADDRESS: \"walletAddress\",\n CHAIN_TYPE: \"chainType\"\n };\n V.STORAGE_KEYS = s;\n const i = {\n MAX_ATTACHMENT_SIZE: 25 * 1024 * 1024,\n // 25MB\n MAX_RECIPIENTS: 100,\n ITEMS_PER_PAGE: 50,\n REFRESH_INTERVAL: 6e4,\n // 1 minute\n NOTIFICATION_COOLDOWN: 3e5\n // 5 minutes\n };\n V.EMAIL_CONFIG = i;\n const c = {\n FREE: \"free\",\n BASIC: \"basic\",\n PRO: \"pro\",\n ENTERPRISE: \"enterprise\"\n };\n V.SUBSCRIPTION_TIERS = c;\n const d = {\n SHORT_DATE: \"MMM d\",\n FULL_DATE: \"MMM d, yyyy\",\n DATE_TIME: \"MMM d, yyyy h:mm a\",\n RELATIVE: \"relative\"\n };\n V.TIME_FORMAT = d;\n const l = {\n WALLET_NOT_CONNECTED: \"Please connect your wallet first\",\n INVALID_ADDRESS: \"Please enter a valid address\",\n NETWORK_ERROR: \"Network error. Please try again.\",\n AUTHENTICATION_FAILED: \"Authentication failed. Please sign in again.\",\n TRANSACTION_FAILED: \"Transaction failed. Please try again.\",\n INSUFFICIENT_FUNDS: \"Insufficient funds for this operation\",\n RATE_LIMITED: \"Too many requests. Please wait a moment.\",\n SESSION_EXPIRED: \"Your session has expired. Please sign in again.\",\n PERMISSION_DENIED: \"You do not have permission to perform this action\"\n };\n V.ERROR_MESSAGES = l;\n const g = {\n EMAIL_SENT: \"Email sent successfully\",\n EMAIL_DELETED: \"Email deleted successfully\",\n PREFERENCES_SAVED: \"Preferences saved successfully\",\n WALLET_CONNECTED: \"Wallet connected successfully\",\n AUTHENTICATION_SUCCESS: \"Authentication successful\",\n DELEGATION_SUCCESS: \"Delegation successful\",\n SUBSCRIPTION_ACTIVATED: \"Subscription activated successfully\"\n };\n V.SUCCESS_MESSAGES = g;\n const u = {\n HOME: \"/\",\n ABOUT: \"/about\",\n CONNECT: \"/connect\",\n MAIL: \"/mail\",\n COMPOSE: \"/mail/compose\",\n PREFERENCES: \"/preferences\",\n TERMS: \"/terms\",\n PRIVACY: \"/privacy\",\n DOCUMENTATION: \"/document\",\n WEB3_USERS: \"/web3-users\",\n WEB3_PROJECTS: \"/web3-projects\"\n };\n V.ROUTES = u;\n const b = {\n SUPPORT_EMAIL: \"support@sudobility.com\",\n CONTACT_EMAIL: \"info@sudobility.com\"\n };\n V.CONTACT_INFO = b;\n const f = {\n METAMASK: \"MetaMask\",\n WALLETCONNECT: \"WalletConnect\",\n COINBASE: \"Coinbase Wallet\",\n PHANTOM: \"Phantom\",\n SAFE: \"Safe\",\n ARGENT: \"Argent\",\n RAINBOW: \"Rainbow\",\n TRUST: \"Trust Wallet\",\n LEDGER: \"Ledger\",\n TREZOR: \"Trezor\"\n };\n V.WALLET_NAMES = f;\n const h = {\n ETHEREUM_MAINNET: 1,\n POLYGON: 137,\n ARBITRUM: 42161,\n OPTIMISM: 10,\n BASE: 8453,\n SOLANA_MAINNET: \"mainnet-beta\",\n SOLANA_DEVNET: \"devnet\"\n };\n V.NETWORK_IDS = h;\n const y = {\n FAST: 150,\n NORMAL: 300,\n SLOW: 500,\n VERY_SLOW: 1e3\n };\n V.ANIMATION = y;\n const x = {\n DROPDOWN: 10,\n OVERLAY: 20,\n MODAL: 30,\n POPOVER: 40,\n TOOLTIP: 50,\n TOAST: 60\n };\n return V.Z_INDEX = x, V;\n}\nvar je = {}, pr;\nfunction Wn() {\n return pr || (pr = 1, Object.defineProperty(je, \"__esModule\", { value: !0 }), je.STATUS_VALUES = void 0, je.STATUS_VALUES = {\n SUCCESS: \"success\",\n PENDING: \"pending\",\n FAILED: \"failed\",\n ERROR: \"error\"\n }), je;\n}\nvar X = {}, yr;\nfunction Zr() {\n if (yr) return X;\n yr = 1, Object.defineProperty(X, \"__esModule\", { value: !0 }), X.storageLogger = X.ensLogger = X.contractLogger = X.apiLogger = X.authLogger = X.logger = X.LogLevel = void 0;\n var e;\n (function(d) {\n d.ERROR = \"error\", d.WARN = \"warn\", d.INFO = \"info\", d.DEBUG = \"debug\";\n })(e || (X.LogLevel = e = {}));\n class t {\n constructor() {\n this.isDevelopment = process.env.NODE_ENV === \"development\";\n }\n formatTimestamp() {\n return (/* @__PURE__ */ new Date()).toISOString();\n }\n formatMessage(l, g, u) {\n const b = this.formatTimestamp(), f = u ? ` [${u}]` : \"\";\n return `[${b}]${f} ${g}`;\n }\n shouldLog(l) {\n return this.isDevelopment ? !0 : l === e.ERROR || l === e.WARN;\n }\n error(l, g, u) {\n this.shouldLog(e.ERROR) && (console.error(this.formatMessage(e.ERROR, l, g)), u && console.error(u));\n }\n warn(l, g, u) {\n this.shouldLog(e.WARN) && (console.warn(this.formatMessage(e.WARN, l, g)), u && console.warn(u));\n }\n info(l, g, u) {\n this.shouldLog(e.INFO) && (console.log(this.formatMessage(e.INFO, l, g)), u && console.log(u));\n }\n debug(l, g, u) {\n this.shouldLog(e.DEBUG) && (console.log(this.formatMessage(e.DEBUG, l, g)), u && console.log(u));\n }\n /**\n * Create a contextual logger that automatically includes context in all calls\n */\n withContext(l) {\n return {\n error: (g, u) => this.error(g, l, u),\n warn: (g, u) => this.warn(g, l, u),\n info: (g, u) => this.info(g, l, u),\n debug: (g, u) => this.debug(g, l, u)\n };\n }\n }\n const r = new t();\n X.logger = r;\n const n = r.withContext(\"AUTH\");\n X.authLogger = n;\n const o = r.withContext(\"API\");\n X.apiLogger = o;\n const s = r.withContext(\"CONTRACT\");\n X.contractLogger = s;\n const i = r.withContext(\"ENS\");\n X.ensLogger = i;\n const c = r.withContext(\"STORAGE\");\n return X.storageLogger = c, X;\n}\nvar ye = {}, xr;\nfunction $n() {\n if (xr) return ye;\n xr = 1, Object.defineProperty(ye, \"__esModule\", { value: !0 }), ye.createURLSearchParams = t, ye.createSearchParams = r, ye.searchParamsToString = n, ye.parseSearchParams = o;\n class e {\n constructor(i) {\n if (this.params = /* @__PURE__ */ new Map(), i)\n if (typeof i == \"string\")\n this.parseString(i);\n else if (Array.isArray(i))\n for (const [c, d] of i)\n this.append(c, d);\n else\n for (const [c, d] of Object.entries(i))\n d !== void 0 && this.append(c, d);\n }\n parseString(i) {\n const c = i.startsWith(\"?\") ? i.slice(1) : i;\n if (c)\n for (const d of c.split(\"&\")) {\n const [l, g = \"\"] = d.split(\"=\");\n l && this.append(decodeURIComponent(l), decodeURIComponent(g));\n }\n }\n append(i, c) {\n this.params.has(i) || this.params.set(i, []);\n const d = this.params.get(i);\n d && d.push(c);\n }\n delete(i) {\n this.params.delete(i);\n }\n get(i) {\n const c = this.params.get(i);\n return c && c.length > 0 ? c[0] : null;\n }\n getAll(i) {\n return this.params.get(i) || [];\n }\n has(i) {\n return this.params.has(i);\n }\n set(i, c) {\n this.params.set(i, [c]);\n }\n toString() {\n const i = [];\n return this.params.forEach((c, d) => {\n for (const l of c)\n i.push(`${encodeURIComponent(d)}=${encodeURIComponent(l)}`);\n }), i.join(\"&\");\n }\n forEach(i) {\n this.params.forEach((c, d) => {\n for (const l of c)\n i(l, d);\n });\n }\n }\n function t(s) {\n return typeof URLSearchParams < \"u\" ? new URLSearchParams(s) : new e(s);\n }\n function r(s) {\n const i = t(void 0);\n for (const [c, d] of Object.entries(s))\n d != null && i.append(c, String(d));\n return i;\n }\n function n(s) {\n return s.toString();\n }\n function o(s) {\n const i = t(s), c = {};\n return i.forEach((d, l) => {\n c[l] = d;\n }), c;\n }\n return ye;\n}\nvar J = {}, vr;\nfunction Vn() {\n if (vr) return J;\n vr = 1, Object.defineProperty(J, \"__esModule\", { value: !0 }), J.debounceAsync = J.clearExpiredCache = J.withCache = J.withTimeout = J.safeParallel = J.withLoadingState = J.safeAsync = void 0;\n const e = Zr(), t = async (g, u) => {\n try {\n return { data: await g(), success: !0 };\n } catch (b) {\n const f = b instanceof Error ? b : new Error(String(b));\n return e.logger.error(`Async operation failed: ${f.message}`, u, b), { error: f, success: !1 };\n }\n };\n J.safeAsync = t;\n const r = async (g, u, b, f) => {\n u(!0), b(null);\n try {\n return await g();\n } catch (h) {\n const y = h instanceof Error ? h.message : String(h);\n b(y), e.logger.error(`Operation failed: ${y}`, f, h);\n return;\n } finally {\n u(!1);\n }\n };\n J.withLoadingState = r;\n const n = async (g, u) => {\n try {\n return { data: await Promise.all(g.map((f) => f())), success: !0 };\n } catch (b) {\n const f = b instanceof Error ? b : new Error(String(b));\n return e.logger.error(`Parallel operations failed: ${f.message}`, u, b), { error: f, success: !1 };\n }\n };\n J.safeParallel = n;\n const o = async (g, u, b) => {\n const f = new Promise((h, y) => setTimeout(() => y(new Error(`Operation timed out after ${u}ms`)), u));\n try {\n return await Promise.race([g(), f]);\n } catch (h) {\n throw e.logger.error(\"Timeout operation failed\", b, h), h;\n }\n };\n J.withTimeout = o;\n const s = /* @__PURE__ */ new Map(), i = async (g, u, b = 300 * 1e3) => {\n const f = s.get(g), h = Date.now();\n if (f && h - f.timestamp < f.ttl)\n return f.data;\n const y = await u();\n return s.set(g, { data: y, timestamp: h, ttl: b }), y;\n };\n J.withCache = i;\n const c = () => {\n const g = Date.now();\n for (const [u, b] of s.entries())\n g - b.timestamp >= b.ttl && s.delete(u);\n };\n J.clearExpiredCache = c;\n const d = /* @__PURE__ */ new Map(), l = (g, u, b) => (...f) => new Promise((h) => {\n const y = d.get(b);\n y && clearTimeout(y);\n const x = setTimeout(async () => {\n d.delete(b);\n try {\n const C = await g(...f);\n h(C);\n } catch (C) {\n e.logger.error(\"Debounced operation failed\", b, C), h(void 0);\n }\n }, u);\n d.set(b, x);\n });\n return J.debounceAsync = l, J;\n}\nvar wr;\nfunction Hn() {\n return wr || (wr = 1, (function(e) {\n Object.defineProperty(e, \"__esModule\", { value: !0 }), e.MANAGER_PERMISSIONS = e.OWNER_PERMISSIONS = e.InvitationStatus = e.EntityRole = e.EntityType = e.RateLimitPeriodType = e.WalletType = e.NetworkError = e.ProcessedEventName = e.ContractType = e.AnalyticsEventBuilder = e.AnalyticsEvent = e.StorageType = e.validateMessage = e.validateDomain = e.validateAmount = e.validateAddress = e.isSolanaRecipient = e.isSolanaAddress = e.isEvmRecipient = e.isEvmAddress = e.TransactionStatus = e.PROTOCOL_CONSTANTS = e.MessageType = e.isWalletVerified = e.isWalletConnected = e.getWalletConnectionState = e.Theme = e.SubscriptionAction = e.SortOrder = e.RequestStatus = e.PlatformType = e.NotificationType = e.MobileView = e.MediumView = e.InfoType = e.FontSize = e.FeatureFlag = e.ErrorType = e.EmailValidationState = e.EmailSortCriteria = e.EmailComposeType = e.EmailAddressType = e.EmailAction = e.Currency = e.ConnectionType = e.ConnectionState = e.ChainType = e.Chain = e.AuthStatus = void 0, e.isAdminEmail = e.parseAdminEmails = e.isValidNonce = e.isAuthStatusConnected = e.isAuthExpired = e.getAuthStatusText = e.generateNonce = e.generateAuthMessage = e.extractNonceFromMessage = e.canAccessProtectedFeatures = e.validateEventArgs = e.normalizeAddress = e.isZeroAddress = e.isTestNet = e.formatBigInt = e.createUserMultiChainId = e.createMultiChainId = e.createDelegationId = e.createChainStatsId = e.parseEmailAddress = e.isValidWalletAddress = e.isValidSignature = e.isSNSName = e.isENSName = e.getChainDisplayName = e.getAddressType = e.formatWalletAddress = e.AddressType = e.validateArray = e.parseJson = e.optional = e.isValidDate = e.isUrl = e.isSuccessResponse = e.isString = e.isObject = e.isNumber = e.isNullish = e.isErrorResponse = e.isEmail = e.isBoolean = e.isArray = e.isApiResponse = e.hasRequiredProperties = e.createValidator = e.createAssertion = e.Web3UsernameValidator = e.hasPermission = e.getPermissionsForRole = e.MEMBER_PERMISSIONS = void 0, e.apiLogger = e.authLogger = e.logger = e.LogLevel = e.STATUS_VALUES = e.Z_INDEX = e.ANIMATION = e.NETWORK_IDS = e.WALLET_NAMES = e.CONTACT_INFO = e.ROUTES = e.SUCCESS_MESSAGES = e.ERROR_MESSAGES = e.TIME_FORMAT = e.SUBSCRIPTION_TIERS = e.EMAIL_CONFIG = e.STORAGE_KEYS = e.CHAIN_TYPE = e.AUTH_STATUS = e.API_RETRY_DELAY = e.API_RETRY_ATTEMPTS = e.API_TIMEOUT = e.truncate = e.toTitleCase = e.toSnakeCase = e.toKebabCase = e.toCamelCase = e.stripHtml = e.randomString = e.pluralize = e.normalizeWhitespace = e.isNotBlank = e.isBlank = e.getInitials = e.formatNumber = e.formatBytes = e.escapeHtml = e.capitalize = e.parseDate = e.isDateInRange = e.formatTimestamp = e.formatRelativeTime = e.formatEmailDate = e.addHours = e.addDays = e.parseUSDC = e.formatUSDC = e.USDC_DECIMALS = e.CLAIM_PERIOD_DAYS = e.createAdminChecker = void 0, e.debounceAsync = e.clearExpiredCache = e.withCache = e.withTimeout = e.safeParallel = e.withLoadingState = e.safeAsync = e.parseSearchParams = e.searchParamsToString = e.createSearchParams = e.createURLSearchParams = e.storageLogger = e.ensLogger = e.contractLogger = void 0;\n var t = Me();\n Object.defineProperty(e, \"AuthStatus\", { enumerable: !0, get: function() {\n return t.AuthStatus;\n } }), Object.defineProperty(e, \"Chain\", { enumerable: !0, get: function() {\n return t.Chain;\n } }), Object.defineProperty(e, \"ChainType\", { enumerable: !0, get: function() {\n return t.ChainType;\n } }), Object.defineProperty(e, \"ConnectionState\", { enumerable: !0, get: function() {\n return t.ConnectionState;\n } }), Object.defineProperty(e, \"ConnectionType\", { enumerable: !0, get: function() {\n return t.ConnectionType;\n } }), Object.defineProperty(e, \"Currency\", { enumerable: !0, get: function() {\n return t.Currency;\n } }), Object.defineProperty(e, \"EmailAction\", { enumerable: !0, get: function() {\n return t.EmailAction;\n } }), Object.defineProperty(e, \"EmailAddressType\", { enumerable: !0, get: function() {\n return t.EmailAddressType;\n } }), Object.defineProperty(e, \"EmailComposeType\", { enumerable: !0, get: function() {\n return t.EmailComposeType;\n } }), Object.defineProperty(e, \"EmailSortCriteria\", { enumerable: !0, get: function() {\n return t.EmailSortCriteria;\n } }), Object.defineProperty(e, \"EmailValidationState\", { enumerable: !0, get: function() {\n return t.EmailValidationState;\n } }), Object.defineProperty(e, \"ErrorType\", { enumerable: !0, get: function() {\n return t.ErrorType;\n } }), Object.defineProperty(e, \"FeatureFlag\", { enumerable: !0, get: function() {\n return t.FeatureFlag;\n } }), Object.defineProperty(e, \"FontSize\", { enumerable: !0, get: function() {\n return t.FontSize;\n } }), Object.defineProperty(e, \"InfoType\", { enumerable: !0, get: function() {\n return t.InfoType;\n } }), Object.defineProperty(e, \"MediumView\", { enumerable: !0, get: function() {\n return t.MediumView;\n } }), Object.defineProperty(e, \"MobileView\", { enumerable: !0, get: function() {\n return t.MobileView;\n } }), Object.defineProperty(e, \"NotificationType\", { enumerable: !0, get: function() {\n return t.NotificationType;\n } }), Object.defineProperty(e, \"PlatformType\", { enumerable: !0, get: function() {\n return t.PlatformType;\n } }), Object.defineProperty(e, \"RequestStatus\", { enumerable: !0, get: function() {\n return t.RequestStatus;\n } }), Object.defineProperty(e, \"SortOrder\", { enumerable: !0, get: function() {\n return t.SortOrder;\n } }), Object.defineProperty(e, \"SubscriptionAction\", { enumerable: !0, get: function() {\n return t.SubscriptionAction;\n } }), Object.defineProperty(e, \"Theme\", { enumerable: !0, get: function() {\n return t.Theme;\n } });\n var r = Cn();\n Object.defineProperty(e, \"getWalletConnectionState\", { enumerable: !0, get: function() {\n return r.getWalletConnectionState;\n } }), Object.defineProperty(e, \"isWalletConnected\", { enumerable: !0, get: function() {\n return r.isWalletConnected;\n } }), Object.defineProperty(e, \"isWalletVerified\", { enumerable: !0, get: function() {\n return r.isWalletVerified;\n } });\n var n = Gr();\n Object.defineProperty(e, \"MessageType\", { enumerable: !0, get: function() {\n return n.MessageType;\n } }), Object.defineProperty(e, \"PROTOCOL_CONSTANTS\", { enumerable: !0, get: function() {\n return n.PROTOCOL_CONSTANTS;\n } }), Object.defineProperty(e, \"TransactionStatus\", { enumerable: !0, get: function() {\n return n.TransactionStatus;\n } }), Object.defineProperty(e, \"isEvmAddress\", { enumerable: !0, get: function() {\n return n.isEvmAddress;\n } }), Object.defineProperty(e, \"isEvmRecipient\", { enumerable: !0, get: function() {\n return n.isEvmRecipient;\n } }), Object.defineProperty(e, \"isSolanaAddress\", { enumerable: !0, get: function() {\n return n.isSolanaAddress;\n } }), Object.defineProperty(e, \"isSolanaRecipient\", { enumerable: !0, get: function() {\n return n.isSolanaRecipient;\n } });\n var o = Sn();\n Object.defineProperty(e, \"validateAddress\", { enumerable: !0, get: function() {\n return o.validateAddress;\n } }), Object.defineProperty(e, \"validateAmount\", { enumerable: !0, get: function() {\n return o.validateAmount;\n } }), Object.defineProperty(e, \"validateDomain\", { enumerable: !0, get: function() {\n return o.validateDomain;\n } }), Object.defineProperty(e, \"validateMessage\", { enumerable: !0, get: function() {\n return o.validateMessage;\n } });\n var s = En();\n Object.defineProperty(e, \"StorageType\", { enumerable: !0, get: function() {\n return s.StorageType;\n } });\n var i = An();\n Object.defineProperty(e, \"AnalyticsEvent\", { enumerable: !0, get: function() {\n return i.AnalyticsEvent;\n } }), Object.defineProperty(e, \"AnalyticsEventBuilder\", { enumerable: !0, get: function() {\n return i.AnalyticsEventBuilder;\n } });\n var c = Tn();\n Object.defineProperty(e, \"ContractType\", { enumerable: !0, get: function() {\n return c.ContractType;\n } }), Object.defineProperty(e, \"ProcessedEventName\", { enumerable: !0, get: function() {\n return c.ProcessedEventName;\n } });\n var d = Ln();\n Object.defineProperty(e, \"NetworkError\", { enumerable: !0, get: function() {\n return d.NetworkError;\n } });\n var l = Mn();\n Object.defineProperty(e, \"WalletType\", { enumerable: !0, get: function() {\n return l.WalletType;\n } });\n var g = In();\n Object.defineProperty(e, \"RateLimitPeriodType\", { enumerable: !0, get: function() {\n return g.RateLimitPeriodType;\n } });\n var u = Kr();\n Object.defineProperty(e, \"EntityType\", { enumerable: !0, get: function() {\n return u.EntityType;\n } }), Object.defineProperty(e, \"EntityRole\", { enumerable: !0, get: function() {\n return u.EntityRole;\n } }), Object.defineProperty(e, \"InvitationStatus\", { enumerable: !0, get: function() {\n return u.InvitationStatus;\n } });\n var b = Pn();\n Object.defineProperty(e, \"OWNER_PERMISSIONS\", { enumerable: !0, get: function() {\n return b.OWNER_PERMISSIONS;\n } }), Object.defineProperty(e, \"MANAGER_PERMISSIONS\", { enumerable: !0, get: function() {\n return b.MANAGER_PERMISSIONS;\n } }), Object.defineProperty(e, \"MEMBER_PERMISSIONS\", { enumerable: !0, get: function() {\n return b.MEMBER_PERMISSIONS;\n } }), Object.defineProperty(e, \"getPermissionsForRole\", { enumerable: !0, get: function() {\n return b.getPermissionsForRole;\n } }), Object.defineProperty(e, \"hasPermission\", { enumerable: !0, get: function() {\n return b.hasPermission;\n } });\n var f = Rn();\n Object.defineProperty(e, \"Web3UsernameValidator\", { enumerable: !0, get: function() {\n return f.Web3UsernameValidator;\n } });\n var h = On();\n Object.defineProperty(e, \"createAssertion\", { enumerable: !0, get: function() {\n return h.createAssertion;\n } }), Object.defineProperty(e, \"createValidator\", { enumerable: !0, get: function() {\n return h.createValidator;\n } }), Object.defineProperty(e, \"hasRequiredProperties\", { enumerable: !0, get: function() {\n return h.hasRequiredProperties;\n } }), Object.defineProperty(e, \"isApiResponse\", { enumerable: !0, get: function() {\n return h.isApiResponse;\n } }), Object.defineProperty(e, \"isArray\", { enumerable: !0, get: function() {\n return h.isArray;\n } }), Object.defineProperty(e, \"isBoolean\", { enumerable: !0, get: function() {\n return h.isBoolean;\n } }), Object.defineProperty(e, \"isEmail\", { enumerable: !0, get: function() {\n return h.isEmail;\n } }), Object.defineProperty(e, \"isErrorResponse\", { enumerable: !0, get: function() {\n return h.isErrorResponse;\n } }), Object.defineProperty(e, \"isNullish\", { enumerable: !0, get: function() {\n return h.isNullish;\n } }), Object.defineProperty(e, \"isNumber\", { enumerable: !0, get: function() {\n return h.isNumber;\n } }), Object.defineProperty(e, \"isObject\", { enumerable: !0, get: function() {\n return h.isObject;\n } }), Object.defineProperty(e, \"isString\", { enumerable: !0, get: function() {\n return h.isString;\n } }), Object.defineProperty(e, \"isSuccessResponse\", { enumerable: !0, get: function() {\n return h.isSuccessResponse;\n } }), Object.defineProperty(e, \"isUrl\", { enumerable: !0, get: function() {\n return h.isUrl;\n } }), Object.defineProperty(e, \"isValidDate\", { enumerable: !0, get: function() {\n return h.isValidDate;\n } }), Object.defineProperty(e, \"optional\", { enumerable: !0, get: function() {\n return h.optional;\n } }), Object.defineProperty(e, \"parseJson\", { enumerable: !0, get: function() {\n return h.parseJson;\n } }), Object.defineProperty(e, \"validateArray\", { enumerable: !0, get: function() {\n return h.validateArray;\n } });\n var y = Yr();\n Object.defineProperty(e, \"AddressType\", { enumerable: !0, get: function() {\n return y.AddressType;\n } }), Object.defineProperty(e, \"formatWalletAddress\", { enumerable: !0, get: function() {\n return y.formatWalletAddress;\n } }), Object.defineProperty(e, \"getAddressType\", { enumerable: !0, get: function() {\n return y.getAddressType;\n } }), Object.defineProperty(e, \"getChainDisplayName\", { enumerable: !0, get: function() {\n return y.getChainDisplayName;\n } }), Object.defineProperty(e, \"isENSName\", { enumerable: !0, get: function() {\n return y.isENSName;\n } }), Object.defineProperty(e, \"isSNSName\", { enumerable: !0, get: function() {\n return y.isSNSName;\n } }), Object.defineProperty(e, \"isValidSignature\", { enumerable: !0, get: function() {\n return y.isValidSignature;\n } }), Object.defineProperty(e, \"isValidWalletAddress\", { enumerable: !0, get: function() {\n return y.isValidWalletAddress;\n } }), Object.defineProperty(e, \"parseEmailAddress\", { enumerable: !0, get: function() {\n return y.parseEmailAddress;\n } });\n var x = Dn();\n Object.defineProperty(e, \"createChainStatsId\", { enumerable: !0, get: function() {\n return x.createChainStatsId;\n } }), Object.defineProperty(e, \"createDelegationId\", { enumerable: !0, get: function() {\n return x.createDelegationId;\n } }), Object.defineProperty(e, \"createMultiChainId\", { enumerable: !0, get: function() {\n return x.createMultiChainId;\n } }), Object.defineProperty(e, \"createUserMultiChainId\", { enumerable: !0, get: function() {\n return x.createUserMultiChainId;\n } }), Object.defineProperty(e, \"formatBigInt\", { enumerable: !0, get: function() {\n return x.formatBigInt;\n } }), Object.defineProperty(e, \"isTestNet\", { enumerable: !0, get: function() {\n return x.isTestNet;\n } }), Object.defineProperty(e, \"isZeroAddress\", { enumerable: !0, get: function() {\n return x.isZeroAddress;\n } }), Object.defineProperty(e, \"normalizeAddress\", { enumerable: !0, get: function() {\n return x.normalizeAddress;\n } }), Object.defineProperty(e, \"validateEventArgs\", { enumerable: !0, get: function() {\n return x.validateEventArgs;\n } });\n var C = Un();\n Object.defineProperty(e, \"canAccessProtectedFeatures\", { enumerable: !0, get: function() {\n return C.canAccessProtectedFeatures;\n } }), Object.defineProperty(e, \"extractNonceFromMessage\", { enumerable: !0, get: function() {\n return C.extractNonceFromMessage;\n } }), Object.defineProperty(e, \"generateAuthMessage\", { enumerable: !0, get: function() {\n return C.generateAuthMessage;\n } }), Object.defineProperty(e, \"generateNonce\", { enumerable: !0, get: function() {\n return C.generateNonce;\n } }), Object.defineProperty(e, \"getAuthStatusText\", { enumerable: !0, get: function() {\n return C.getAuthStatusText;\n } }), Object.defineProperty(e, \"isAuthExpired\", { enumerable: !0, get: function() {\n return C.isAuthExpired;\n } }), Object.defineProperty(e, \"isAuthStatusConnected\", { enumerable: !0, get: function() {\n return C.isAuthStatusConnected;\n } }), Object.defineProperty(e, \"isValidNonce\", { enumerable: !0, get: function() {\n return C.isValidNonce;\n } });\n var v = jn();\n Object.defineProperty(e, \"parseAdminEmails\", { enumerable: !0, get: function() {\n return v.parseAdminEmails;\n } }), Object.defineProperty(e, \"isAdminEmail\", { enumerable: !0, get: function() {\n return v.isAdminEmail;\n } }), Object.defineProperty(e, \"createAdminChecker\", { enumerable: !0, get: function() {\n return v.createAdminChecker;\n } });\n var k = _n();\n Object.defineProperty(e, \"CLAIM_PERIOD_DAYS\", { enumerable: !0, get: function() {\n return k.CLAIM_PERIOD_DAYS;\n } }), Object.defineProperty(e, \"USDC_DECIMALS\", { enumerable: !0, get: function() {\n return k.USDC_DECIMALS;\n } }), Object.defineProperty(e, \"formatUSDC\", { enumerable: !0, get: function() {\n return k.formatUSDC;\n } }), Object.defineProperty(e, \"parseUSDC\", { enumerable: !0, get: function() {\n return k.parseUSDC;\n } });\n var w = zn();\n Object.defineProperty(e, \"addDays\", { enumerable: !0, get: function() {\n return w.addDays;\n } }), Object.defineProperty(e, \"addHours\", { enumerable: !0, get: function() {\n return w.addHours;\n } }), Object.defineProperty(e, \"formatEmailDate\", { enumerable: !0, get: function() {\n return w.formatEmailDate;\n } }), Object.defineProperty(e, \"formatRelativeTime\", { enumerable: !0, get: function() {\n return w.formatRelativeTime;\n } }), Object.defineProperty(e, \"formatTimestamp\", { enumerable: !0, get: function() {\n return w.formatTimestamp;\n } }), Object.defineProperty(e, \"isDateInRange\", { enumerable: !0, get: function() {\n return w.isDateInRange;\n } }), Object.defineProperty(e, \"parseDate\", { enumerable: !0, get: function() {\n return w.parseDate;\n } });\n var S = Bn();\n Object.defineProperty(e, \"capitalize\", { enumerable: !0, get: function() {\n return S.capitalize;\n } }), Object.defineProperty(e, \"escapeHtml\", { enumerable: !0, get: function() {\n return S.escapeHtml;\n } }), Object.defineProperty(e, \"formatBytes\", { enumerable: !0, get: function() {\n return S.formatBytes;\n } }), Object.defineProperty(e, \"formatNumber\", { enumerable: !0, get: function() {\n return S.formatNumber;\n } }), Object.defineProperty(e, \"getInitials\", { enumerable: !0, get: function() {\n return S.getInitials;\n } }), Object.defineProperty(e, \"isBlank\", { enumerable: !0, get: function() {\n return S.isBlank;\n } }), Object.defineProperty(e, \"isNotBlank\", { enumerable: !0, get: function() {\n return S.isNotBlank;\n } }), Object.defineProperty(e, \"normalizeWhitespace\", { enumerable: !0, get: function() {\n return S.normalizeWhitespace;\n } }), Object.defineProperty(e, \"pluralize\", { enumerable: !0, get: function() {\n return S.pluralize;\n } }), Object.defineProperty(e, \"randomString\", { enumerable: !0, get: function() {\n return S.randomString;\n } }), Object.defineProperty(e, \"stripHtml\", { enumerable: !0, get: function() {\n return S.stripHtml;\n } }), Object.defineProperty(e, \"toCamelCase\", { enumerable: !0, get: function() {\n return S.toCamelCase;\n } }), Object.defineProperty(e, \"toKebabCase\", { enumerable: !0, get: function() {\n return S.toKebabCase;\n } }), Object.defineProperty(e, \"toSnakeCase\", { enumerable: !0, get: function() {\n return S.toSnakeCase;\n } }), Object.defineProperty(e, \"toTitleCase\", { enumerable: !0, get: function() {\n return S.toTitleCase;\n } }), Object.defineProperty(e, \"truncate\", { enumerable: !0, get: function() {\n return S.truncate;\n } });\n var E = Fn();\n Object.defineProperty(e, \"API_TIMEOUT\", { enumerable: !0, get: function() {\n return E.API_TIMEOUT;\n } }), Object.defineProperty(e, \"API_RETRY_ATTEMPTS\", { enumerable: !0, get: function() {\n return E.API_RETRY_ATTEMPTS;\n } }), Object.defineProperty(e, \"API_RETRY_DELAY\", { enumerable: !0, get: function() {\n return E.API_RETRY_DELAY;\n } }), Object.defineProperty(e, \"AUTH_STATUS\", { enumerable: !0, get: function() {\n return E.AUTH_STATUS;\n } }), Object.defineProperty(e, \"CHAIN_TYPE\", { enumerable: !0, get: function() {\n return E.CHAIN_TYPE;\n } }), Object.defineProperty(e, \"STORAGE_KEYS\", { enumerable: !0, get: function() {\n return E.STORAGE_KEYS;\n } }), Object.defineProperty(e, \"EMAIL_CONFIG\", { enumerable: !0, get: function() {\n return E.EMAIL_CONFIG;\n } }), Object.defineProperty(e, \"SUBSCRIPTION_TIERS\", { enumerable: !0, get: function() {\n return E.SUBSCRIPTION_TIERS;\n } }), Object.defineProperty(e, \"TIME_FORMAT\", { enumerable: !0, get: function() {\n return E.TIME_FORMAT;\n } }), Object.defineProperty(e, \"ERROR_MESSAGES\", { enumerable: !0, get: function() {\n return E.ERROR_MESSAGES;\n } }), Object.defineProperty(e, \"SUCCESS_MESSAGES\", { enumerable: !0, get: function() {\n return E.SUCCESS_MESSAGES;\n } }), Object.defineProperty(e, \"ROUTES\", { enumerable: !0, get: function() {\n return E.ROUTES;\n } }), Object.defineProperty(e, \"CONTACT_INFO\", { enumerable: !0, get: function() {\n return E.CONTACT_INFO;\n } }), Object.defineProperty(e, \"WALLET_NAMES\", { enumerable: !0, get: function() {\n return E.WALLET_NAMES;\n } }), Object.defineProperty(e, \"NETWORK_IDS\", { enumerable: !0, get: function() {\n return E.NETWORK_IDS;\n } }), Object.defineProperty(e, \"ANIMATION\", { enumerable: !0, get: function() {\n return E.ANIMATION;\n } }), Object.defineProperty(e, \"Z_INDEX\", { enumerable: !0, get: function() {\n return E.Z_INDEX;\n } });\n var N = Wn();\n Object.defineProperty(e, \"STATUS_VALUES\", { enumerable: !0, get: function() {\n return N.STATUS_VALUES;\n } });\n var T = Zr();\n Object.defineProperty(e, \"LogLevel\", { enumerable: !0, get: function() {\n return T.LogLevel;\n } }), Object.defineProperty(e, \"logger\", { enumerable: !0, get: function() {\n return T.logger;\n } }), Object.defineProperty(e, \"authLogger\", { enumerable: !0, get: function() {\n return T.authLogger;\n } }), Object.defineProperty(e, \"apiLogger\", { enumerable: !0, get: function() {\n return T.apiLogger;\n } }), Object.defineProperty(e, \"contractLogger\", { enumerable: !0, get: function() {\n return T.contractLogger;\n } }), Object.defineProperty(e, \"ensLogger\", { enumerable: !0, get: function() {\n return T.ensLogger;\n } }), Object.defineProperty(e, \"storageLogger\", { enumerable: !0, get: function() {\n return T.storageLogger;\n } });\n var L = $n();\n Object.defineProperty(e, \"createURLSearchParams\", { enumerable: !0, get: function() {\n return L.createURLSearchParams;\n } }), Object.defineProperty(e, \"createSearchParams\", { enumerable: !0, get: function() {\n return L.createSearchParams;\n } }), Object.defineProperty(e, \"searchParamsToString\", { enumerable: !0, get: function() {\n return L.searchParamsToString;\n } }), Object.defineProperty(e, \"parseSearchParams\", { enumerable: !0, get: function() {\n return L.parseSearchParams;\n } });\n var P = Vn();\n Object.defineProperty(e, \"safeAsync\", { enumerable: !0, get: function() {\n return P.safeAsync;\n } }), Object.defineProperty(e, \"withLoadingState\", { enumerable: !0, get: function() {\n return P.withLoadingState;\n } }), Object.defineProperty(e, \"safeParallel\", { enumerable: !0, get: function() {\n return P.safeParallel;\n } }), Object.defineProperty(e, \"withTimeout\", { enumerable: !0, get: function() {\n return P.withTimeout;\n } }), Object.defineProperty(e, \"withCache\", { enumerable: !0, get: function() {\n return P.withCache;\n } }), Object.defineProperty(e, \"clearExpiredCache\", { enumerable: !0, get: function() {\n return P.clearExpiredCache;\n } }), Object.defineProperty(e, \"debounceAsync\", { enumerable: !0, get: function() {\n return P.debounceAsync;\n } });\n })(gt)), gt;\n}\nvar fe = Hn();\nconst qn = (e) => {\n switch (e) {\n case \"verified\":\n case \"success\":\n return Ee(\"success\");\n case \"connected\":\n case \"warning\":\n return Ee(\"warning\");\n case \"disconnected\":\n case \"error\":\n return Ee(\"error\");\n case \"pending\":\n return Ee(\"info\");\n default:\n return Ee(\"neutral\");\n }\n}, Gn = (e) => {\n switch (e) {\n case \"sm\":\n return \"w-1.5 h-1.5\";\n case \"lg\":\n return \"w-3 h-3\";\n default:\n return \"w-2 h-2\";\n }\n}, Gl = ({\n status: e,\n label: t,\n showDot: r = !0,\n size: n = \"md\"\n}) => {\n const s = t || {\n verified: \"Verified\",\n connected: \"Connected\",\n disconnected: \"Disconnected\",\n pending: \"Pending\",\n error: \"Error\",\n success: \"Success\",\n warning: \"Warning\"\n }[e], c = ((g, u) => {\n const b = { sm: \"small\", md: \"default\", lg: \"large\" }, h = {\n verified: \"success\",\n success: \"success\",\n connected: \"warning\",\n warning: \"warning\",\n disconnected: \"error\",\n error: \"error\",\n pending: \"primary\"\n }[g] || \"default\", y = b[u];\n return y === \"default\" ? F.badge[h]() : F.badge[y](h);\n })(e, n), d = qn(e), l = Gn(n);\n return /* @__PURE__ */ p(\"span\", { className: c, children: [\n r && /* @__PURE__ */ a(\n \"span\",\n {\n className: `inline-block ${l} rounded-full ${d} mr-1`\n }\n ),\n s\n ] });\n}, Yl = ({\n chainType: e,\n size: t = \"md\"\n}) => {\n if (!e) return null;\n const r = e === fe.ChainType.SOLANA ? \"SOL\" : \"ETH\", o = { sm: \"small\", md: \"default\", lg: \"large\" }[t];\n return /* @__PURE__ */ a(\"span\", { className: (() => {\n const i = e === fe.ChainType.SOLANA ? \"solana\" : \"ethereum\";\n return o === \"default\" ? F.badge[i]() : F.badge[o](i);\n })(), children: r });\n}, Yn = {\n xs: \"w-1.5 h-1.5\",\n sm: \"w-2 h-2\",\n md: \"w-3 h-3\",\n lg: \"w-4 h-4\"\n}, Kl = ({\n status: e,\n size: t = \"sm\",\n pulse: r = !1,\n className: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"rounded-full flex-shrink-0\",\n Ee(e),\n Yn[t],\n r && \"animate-pulse\",\n n\n )\n }\n), Zl = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UstatusUpipeline\",\n children: t || \"UstatusUpipeline Component\"\n }\n), Dt = Z.forwardRef(\n ({\n className: e,\n type: t,\n onTrack: r,\n trackingLabel: n,\n componentName: o,\n onBlur: s,\n onChange: i,\n ...c\n }, d) => {\n const l = (u) => {\n r && r({\n action: \"blur\",\n trackingLabel: n,\n componentName: o\n }), s?.(u);\n }, g = (u) => {\n r && r({\n action: \"change\",\n trackingLabel: n,\n componentName: o\n }), i?.(u);\n };\n return /* @__PURE__ */ a(\n \"input\",\n {\n type: t,\n className: m(F.input.default(), e),\n ref: d,\n onBlur: l,\n onChange: g,\n ...c\n }\n );\n }\n);\nDt.displayName = \"Input\";\nconst Xl = ({\n value: e,\n onChange: t,\n placeholder: r,\n rows: n = 4,\n disabled: o = !1,\n readOnly: s = !1,\n showCount: i = !1,\n maxLength: c,\n resize: d = \"vertical\",\n size: l = \"md\",\n className: g,\n textareaProps: u,\n onTrack: b,\n trackingLabel: f,\n componentName: h\n}) => {\n const y = {\n sm: \"p-2 text-sm\",\n md: \"p-3 text-base\",\n lg: \"p-4 text-lg\"\n }, x = {\n none: \"resize-none\",\n vertical: \"resize-y\",\n horizontal: \"resize-x\",\n both: \"resize\"\n }, C = (S) => {\n const E = S.target.value;\n c && E.length > c || (b && b({\n action: \"change\",\n trackingLabel: f,\n componentName: h\n }), t(E));\n }, v = () => {\n b && b({\n action: \"blur\",\n trackingLabel: f,\n componentName: h\n });\n }, k = e.length, w = i || c !== void 0;\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", g), children: [\n /* @__PURE__ */ a(\n \"textarea\",\n {\n value: e,\n onChange: C,\n onBlur: v,\n placeholder: r,\n rows: n,\n disabled: o,\n readOnly: s,\n maxLength: c,\n className: m(\n \"w-full rounded-lg border\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder-gray-400 dark:placeholder-gray-500\",\n \"border-gray-300 dark:border-gray-600\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\",\n \"transition-colors duration-200\",\n y[l],\n x[d],\n o && \"opacity-50 cursor-not-allowed\",\n s && \"bg-gray-50 dark:bg-gray-900 cursor-default\"\n ),\n ...u\n }\n ),\n w && /* @__PURE__ */ a(\"div\", { className: \"flex justify-end mt-1\", children: /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n \"text-xs\",\n c && k > c * 0.9 ? \"text-yellow-600 dark:text-yellow-400\" : \"text-gray-500 dark:text-gray-400\",\n c && k >= c && \"text-red-600 dark:text-red-400\"\n ),\n children: [\n k,\n c && ` / ${c}`\n ]\n }\n ) })\n ] });\n}, Jl = ({\n value: e,\n onChange: t,\n min: r,\n max: n,\n step: o = 1,\n disabled: s = !1,\n showSteppers: i = !1,\n stepperPosition: c = \"right\",\n placeholder: d,\n size: l = \"md\",\n className: g,\n inputProps: u,\n onTrack: b,\n trackingLabel: f,\n componentName: h\n}) => {\n const x = {\n sm: {\n input: \"py-1.5 px-3 text-sm\",\n button: \"w-6 h-6\",\n icon: \"h-3 w-3\"\n },\n md: {\n input: \"py-2 px-3 text-base\",\n button: \"w-8 h-8\",\n icon: \"h-4 w-4\"\n },\n lg: {\n input: \"py-3 px-4 text-lg\",\n button: \"w-10 h-10\",\n icon: \"h-5 w-5\"\n }\n }[l], C = (L) => ({\n action: L,\n trackingLabel: f,\n componentName: h\n }), v = (L) => {\n const P = parseFloat(L.target.value);\n if (isNaN(P)) {\n if (L.target.value === \"\") {\n const I = r ?? 0;\n b && b(C(\"input\")), t(I);\n }\n } else {\n const I = k(P);\n b && b(C(\"input\")), t(I);\n }\n }, k = (L) => {\n let P = L;\n return r !== void 0 && P < r && (P = r), n !== void 0 && P > n && (P = n), P;\n }, w = () => {\n const L = k(e + o);\n b && b(C(\"increment\")), t(L);\n }, S = () => {\n const L = k(e - o);\n b && b(C(\"decrement\")), t(L);\n }, E = n === void 0 || e < n, N = r === void 0 || e > r, T = ({\n onClick: L,\n icon: P,\n disabled: I,\n ariaLabel: D\n }) => /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: L,\n disabled: s || I,\n \"aria-label\": D,\n className: m(\n \"inline-flex items-center justify-center\",\n \"border border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-50 dark:hover:bg-gray-700\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500\",\n \"transition-colors\",\n x.button,\n (s || I) && \"opacity-50 cursor-not-allowed\"\n ),\n children: P\n }\n );\n return i && c === \"sides\" ? /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex items-stretch\", g), children: [\n /* @__PURE__ */ a(\n T,\n {\n onClick: S,\n disabled: !N,\n icon: /* @__PURE__ */ a(Vt, { className: x.icon }),\n ariaLabel: \"Decrement\"\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"number\",\n value: e,\n onChange: v,\n min: r,\n max: n,\n step: o,\n disabled: s,\n placeholder: d,\n className: m(\n \"border-x-0 text-center\",\n \"border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10\",\n \"transition-colors\",\n x.input,\n s && \"opacity-50 cursor-not-allowed\",\n // Hide number input spinners\n \"[appearance:textfield]\",\n \"[&::-webkit-outer-spin-button]:appearance-none\",\n \"[&::-webkit-inner-spin-button]:appearance-none\"\n ),\n ...u\n }\n ),\n /* @__PURE__ */ a(\n T,\n {\n onClick: w,\n disabled: !E,\n icon: /* @__PURE__ */ a(Ht, { className: x.icon }),\n ariaLabel: \"Increment\"\n }\n )\n ] }) : i && c === \"right\" ? /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex items-stretch gap-2\", g), children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"number\",\n value: e,\n onChange: v,\n min: r,\n max: n,\n step: o,\n disabled: s,\n placeholder: d,\n className: m(\n \"rounded-lg border\",\n \"border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder-gray-400 dark:placeholder-gray-500\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\",\n \"transition-colors\",\n x.input,\n s && \"opacity-50 cursor-not-allowed\",\n // Hide number input spinners\n \"[appearance:textfield]\",\n \"[&::-webkit-outer-spin-button]:appearance-none\",\n \"[&::-webkit-inner-spin-button]:appearance-none\"\n ),\n ...u\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"inline-flex flex-col gap-0.5\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: w,\n disabled: s || !E,\n \"aria-label\": \"Increment\",\n className: m(\n \"inline-flex items-center justify-center\",\n \"rounded border border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-50 dark:hover:bg-gray-700\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500\",\n \"transition-colors\",\n \"flex-1\",\n x.button.replace(/h-\\d+/, \"h-auto\"),\n (s || !E) && \"opacity-50 cursor-not-allowed\"\n ),\n children: /* @__PURE__ */ a(Ht, { className: m(x.icon, \"w-3 h-3\") })\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: S,\n disabled: s || !N,\n \"aria-label\": \"Decrement\",\n className: m(\n \"inline-flex items-center justify-center\",\n \"rounded border border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-50 dark:hover:bg-gray-700\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500\",\n \"transition-colors\",\n \"flex-1\",\n x.button.replace(/h-\\d+/, \"h-auto\"),\n (s || !N) && \"opacity-50 cursor-not-allowed\"\n ),\n children: /* @__PURE__ */ a(Vt, { className: m(x.icon, \"w-3 h-3\") })\n }\n )\n ] })\n ] }) : /* @__PURE__ */ a(\n \"input\",\n {\n type: \"number\",\n value: e,\n onChange: v,\n min: r,\n max: n,\n step: o,\n disabled: s,\n placeholder: d,\n className: m(\n \"rounded-lg border\",\n \"border-gray-300 dark:border-gray-600\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder-gray-400 dark:placeholder-gray-500\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\",\n \"transition-colors\",\n x.input,\n s && \"opacity-50 cursor-not-allowed\",\n g\n ),\n ...u\n }\n );\n}, Ql = ({\n value: e,\n onChange: t,\n placeholder: r = \"Search...\",\n autoFocus: n = !1,\n disabled: o = !1,\n size: s = \"md\",\n showIcon: i = !0,\n showClear: c = !0,\n loading: d = !1,\n className: l,\n inputProps: g,\n onTrack: u,\n trackingLabel: b,\n componentName: f\n}) => {\n const [h, y] = M(\"\"), x = e !== void 0 ? e : h, C = e !== void 0, k = {\n sm: {\n input: \"py-1.5 text-sm\",\n icon: \"h-4 w-4\",\n padding: i ? \"pl-8 pr-8\" : \"px-3\",\n iconLeft: \"left-0 pl-2.5\",\n iconRight: \"right-0 pr-2.5\"\n },\n md: {\n input: \"py-2 text-base\",\n icon: \"h-5 w-5\",\n padding: i ? \"pl-10 pr-10\" : \"px-3\",\n iconLeft: \"left-0 pl-3\",\n iconRight: \"right-0 pr-3\"\n },\n lg: {\n input: \"py-3 text-lg\",\n icon: \"h-6 w-6\",\n padding: i ? \"pl-12 pr-12\" : \"px-4\",\n iconLeft: \"left-0 pl-3.5\",\n iconRight: \"right-0 pr-3.5\"\n }\n }[s], w = _(\n (N) => {\n const T = N.target.value;\n C || y(T), t?.(T);\n },\n [t, C]\n ), S = _(() => {\n u && u({\n action: \"search\",\n trackingLabel: b,\n componentName: f\n });\n }, [u, b, f]), E = _(() => {\n C || y(\"\"), u && u({\n action: \"clear\",\n trackingLabel: b,\n componentName: f\n }), t?.(\"\");\n }, [t, C, u, b, f]);\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative w-full\", l), children: [\n i && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute inset-y-0 flex items-center pointer-events-none\",\n k.iconLeft\n ),\n children: /* @__PURE__ */ a(\n Ca,\n {\n className: m(k.icon, \"text-gray-400 dark:text-gray-500\")\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: x,\n onChange: w,\n onBlur: S,\n placeholder: r,\n autoFocus: n,\n disabled: o || d,\n className: m(\n \"block w-full rounded-lg border\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder-gray-400 dark:placeholder-gray-500\",\n \"border-gray-300 dark:border-gray-600\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\",\n \"transition-colors duration-200\",\n k.input,\n k.padding,\n o && \"opacity-50 cursor-not-allowed\",\n d && \"opacity-60\"\n ),\n ...g\n }\n ),\n c && x && !d && /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: E,\n disabled: o,\n className: m(\n \"absolute inset-y-0 flex items-center\",\n \"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300\",\n \"transition-colors\",\n o ? \"cursor-not-allowed\" : \"cursor-pointer\",\n k.iconRight\n ),\n \"aria-label\": \"Clear search\",\n children: /* @__PURE__ */ a(lt, { className: k.icon })\n }\n ),\n d && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute inset-y-0 flex items-center\",\n k.iconRight\n ),\n children: /* @__PURE__ */ p(\n \"svg\",\n {\n className: m(k.icon, \"animate-spin text-gray-400\"),\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n children: [\n /* @__PURE__ */ a(\n \"circle\",\n {\n className: \"opacity-25\",\n cx: \"12\",\n cy: \"12\",\n r: \"10\",\n stroke: \"currentColor\",\n strokeWidth: \"4\"\n }\n ),\n /* @__PURE__ */ a(\n \"path\",\n {\n className: \"opacity-75\",\n fill: \"currentColor\",\n d: \"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n }\n )\n ]\n }\n )\n }\n )\n ] });\n}, ec = ({\n value: e,\n onChange: t,\n type: r = \"date\",\n min: n,\n max: o,\n disabled: s = !1,\n showIcon: i = !1,\n placeholder: c,\n size: d = \"md\",\n className: l,\n inputProps: g\n}) => {\n const b = {\n sm: {\n input: \"py-1.5 text-sm\",\n icon: \"h-4 w-4\",\n padding: i ? \"pl-8 pr-3\" : \"px-3\",\n iconLeft: \"left-0 pl-2.5\"\n },\n md: {\n input: \"py-2 text-base\",\n icon: \"h-5 w-5\",\n padding: i ? \"pl-10 pr-4\" : \"px-4\",\n iconLeft: \"left-0 pl-3\"\n },\n lg: {\n input: \"py-3 text-lg\",\n icon: \"h-6 w-6\",\n padding: i ? \"pl-12 pr-4\" : \"px-4\",\n iconLeft: \"left-0 pl-3.5\"\n }\n }[d], f = e instanceof Date ? Kn(e, r) : e, h = (y) => {\n t(y.target.value);\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative\", l), children: [\n i && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute inset-y-0 flex items-center pointer-events-none\",\n b.iconLeft\n ),\n children: /* @__PURE__ */ a(\n Sa,\n {\n className: m(b.icon, \"text-gray-400 dark:text-gray-500\")\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: r,\n value: f,\n onChange: h,\n min: n,\n max: o,\n disabled: s,\n placeholder: c,\n className: m(\n \"block w-full rounded-lg border\",\n \"bg-white dark:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder-gray-400 dark:placeholder-gray-500\",\n \"border-gray-300 dark:border-gray-600\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\",\n \"transition-colors duration-200\",\n b.input,\n b.padding,\n s && \"opacity-50 cursor-not-allowed\",\n // Ensure calendar picker icon is visible on the right\n \"appearance-none\",\n \"[&::-webkit-calendar-picker-indicator]:opacity-100\",\n \"[&::-webkit-calendar-picker-indicator]:cursor-pointer\"\n ),\n ...g\n }\n )\n ] });\n};\nfunction Kn(e, t) {\n const r = (d) => String(d).padStart(2, \"0\"), n = e.getFullYear(), o = r(e.getMonth() + 1), s = r(e.getDate()), i = r(e.getHours()), c = r(e.getMinutes());\n switch (t) {\n case \"date\":\n return `${n}-${o}-${s}`;\n case \"time\":\n return `${i}:${c}`;\n case \"datetime-local\":\n return `${n}-${o}-${s}T${i}:${c}`;\n case \"month\":\n return `${n}-${o}`;\n case \"week\": {\n const d = new Date(n, 0, 1), l = Math.floor(\n (e.getTime() - d.getTime()) / (1440 * 60 * 1e3)\n ), g = Math.ceil(\n (l + d.getDay() + 1) / 7\n );\n return `${n}-W${r(g)}`;\n }\n default:\n return `${n}-${o}-${s}`;\n }\n}\nconst Zn = ({\n value: e,\n onChange: t,\n use12Hour: r = !1,\n minuteStep: n = 1,\n disabled: o = !1,\n className: s\n}) => {\n const [i, c] = M(!1), [d, l] = M(\"12\"), [g, u] = M(\"00\"), [b, f] = M(\"AM\"), h = j(null);\n R(() => {\n if (e) {\n const [k, w] = e.split(\":\"), S = parseInt(k, 10);\n if (r) {\n const E = S >= 12, N = S === 0 ? 12 : S > 12 ? S - 12 : S;\n l(N.toString().padStart(2, \"0\")), f(E ? \"PM\" : \"AM\");\n } else\n l(k);\n u(w);\n }\n }, [e, r]), R(() => {\n const k = (w) => {\n h.current && !h.current.contains(w.target) && c(!1);\n };\n return document.addEventListener(\"mousedown\", k), () => document.removeEventListener(\"mousedown\", k);\n }, []);\n const y = () => {\n if (!e) return \"\";\n const [k, w] = e.split(\":\"), S = parseInt(k, 10);\n if (r) {\n const E = S === 0 ? 12 : S > 12 ? S - 12 : S, N = S >= 12 ? \"PM\" : \"AM\";\n return `${E}:${w} ${N}`;\n }\n return `${k}:${w}`;\n }, x = (k, w, S) => {\n let E = parseInt(k, 10);\n const N = parseInt(w, 10);\n r && S && (S === \"PM\" && E !== 12 ? E += 12 : S === \"AM\" && E === 12 && (E = 0));\n const T = `${E.toString().padStart(2, \"0\")}:${N.toString().padStart(2, \"0\")}`;\n t(T);\n }, C = r ? Array.from({ length: 12 }, (k, w) => (w + 1).toString().padStart(2, \"0\")) : Array.from({ length: 24 }, (k, w) => w.toString().padStart(2, \"0\")), v = Array.from(\n { length: Math.ceil(60 / n) },\n (k, w) => (w * n).toString().padStart(2, \"0\")\n );\n return /* @__PURE__ */ p(\"div\", { ref: h, className: m(\"relative w-full\", s), children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => !o && c(!i),\n disabled: o,\n className: m(\n \"w-full px-3 py-2 text-sm text-left flex items-center justify-between\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n i && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: [\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n e ? \"text-gray-900 dark:text-white\" : \"text-gray-500 dark:text-gray-400\"\n ),\n children: e ? y() : \"Select time\"\n }\n ),\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-gray-600 dark:text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"\n }\n )\n }\n )\n ]\n }\n ),\n i && /* @__PURE__ */ a(\"div\", { className: \"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50\", children: /* @__PURE__ */ p(\"div\", { className: \"flex gap-1 p-2\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2\", children: \"Hour\" }),\n /* @__PURE__ */ a(\"div\", { className: \"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded\", children: C.map((k) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n l(k), x(\n k,\n g,\n r ? b : void 0\n );\n },\n className: m(\n \"w-full px-3 py-1.5 text-sm text-center\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n k === d && \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium\"\n ),\n children: k\n },\n k\n )) })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2\", children: \"Min\" }),\n /* @__PURE__ */ a(\"div\", { className: \"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded\", children: v.map((k) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n u(k), x(\n d,\n k,\n r ? b : void 0\n );\n },\n className: m(\n \"w-full px-3 py-1.5 text-sm text-center\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n k === g && \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium\"\n ),\n children: k\n },\n k\n )) })\n ] }),\n r && /* @__PURE__ */ p(\"div\", { className: \"flex flex-col\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2\", children: \" \" }),\n /* @__PURE__ */ p(\"div\", { className: \"h-48 flex flex-col justify-center gap-2 w-16\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n f(\"AM\"), x(d, g, \"AM\");\n },\n className: m(\n \"px-3 py-2 text-sm text-center rounded\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n b === \"AM\" && \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium\"\n ),\n children: \"AM\"\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n f(\"PM\"), x(d, g, \"PM\");\n },\n className: m(\n \"px-3 py-2 text-sm text-center rounded\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n b === \"PM\" && \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium\"\n ),\n children: \"PM\"\n }\n )\n ] })\n ] })\n ] }) })\n ] });\n}, Xn = [\n { code: \"US\", name: \"United States\", dialCode: \"+1\", flag: \"🇺🇸\" },\n { code: \"GB\", name: \"United Kingdom\", dialCode: \"+44\", flag: \"🇬🇧\" },\n { code: \"CA\", name: \"Canada\", dialCode: \"+1\", flag: \"🇨🇦\" },\n { code: \"AU\", name: \"Australia\", dialCode: \"+61\", flag: \"🇦🇺\" },\n { code: \"DE\", name: \"Germany\", dialCode: \"+49\", flag: \"🇩🇪\" },\n { code: \"FR\", name: \"France\", dialCode: \"+33\", flag: \"🇫🇷\" },\n { code: \"IT\", name: \"Italy\", dialCode: \"+39\", flag: \"🇮🇹\" },\n { code: \"ES\", name: \"Spain\", dialCode: \"+34\", flag: \"🇪🇸\" },\n { code: \"MX\", name: \"Mexico\", dialCode: \"+52\", flag: \"🇲🇽\" },\n { code: \"BR\", name: \"Brazil\", dialCode: \"+55\", flag: \"🇧🇷\" },\n { code: \"IN\", name: \"India\", dialCode: \"+91\", flag: \"🇮🇳\" },\n { code: \"CN\", name: \"China\", dialCode: \"+86\", flag: \"🇨🇳\" },\n { code: \"JP\", name: \"Japan\", dialCode: \"+81\", flag: \"🇯🇵\" },\n { code: \"KR\", name: \"South Korea\", dialCode: \"+82\", flag: \"🇰🇷\" },\n { code: \"SG\", name: \"Singapore\", dialCode: \"+65\", flag: \"🇸🇬\" }\n], tc = ({\n value: e,\n onChange: t,\n country: r,\n onCountryChange: n,\n countries: o = Xn,\n placeholder: s = \"Phone number\",\n disabled: i = !1,\n className: c\n}) => {\n const [d, l] = M(\n o[0]?.code || \"US\"\n ), [g, u] = M(!1), [b, f] = M(\"\"), h = r !== void 0 ? r : d, y = o.find((w) => w.code === h), x = (w) => {\n r !== void 0 && n ? n(w) : l(w), u(!1), f(\"\");\n }, C = (w) => {\n const S = w.replace(/\\D/g, \"\");\n return y?.dialCode === \"+1\" ? S.length <= 3 ? S : S.length <= 6 ? `(${S.slice(0, 3)}) ${S.slice(3)}` : `(${S.slice(0, 3)}) ${S.slice(3, 6)}-${S.slice(6, 10)}` : S;\n }, v = (w) => {\n const S = C(w.target.value);\n t(S);\n }, k = o.filter(\n (w) => w.name.toLowerCase().includes(b.toLowerCase()) || w.dialCode.includes(b) || w.code.toLowerCase().includes(b.toLowerCase())\n );\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative w-full\", c), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => !i && u(!g),\n disabled: i,\n className: m(\n \"flex items-center gap-2 px-3 py-2 min-w-[120px]\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n g && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-xl\", children: y?.flag }),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm font-medium text-gray-900 dark:text-white\", children: y?.dialCode }),\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform\",\n g && \"rotate-180\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n ]\n }\n ),\n g && /* @__PURE__ */ p(\"div\", { className: \"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"p-2 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: b,\n onChange: (w) => f(w.target.value),\n placeholder: \"Search countries...\",\n className: \"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n onClick: (w) => w.stopPropagation()\n }\n ) }),\n /* @__PURE__ */ a(\"div\", { className: \"max-h-60 overflow-y-auto py-1\", children: k.length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center\", children: \"No countries found\" }) : k.map((w) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => x(w.code),\n className: m(\n \"w-full px-3 py-2 text-left flex items-center gap-3\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n w.code === h && \"bg-blue-50 dark:bg-blue-900/30\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-xl\", children: w.flag }),\n /* @__PURE__ */ a(\"span\", { className: \"flex-1 text-sm text-gray-900 dark:text-white\", children: w.name }),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: w.dialCode })\n ]\n },\n w.code\n )) })\n ] })\n ] }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"tel\",\n value: e,\n onChange: v,\n placeholder: s,\n disabled: i,\n className: m(\n \"flex-1 px-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n )\n ] }),\n e && y && /* @__PURE__ */ p(\"p\", { className: \"mt-1.5 text-xs text-gray-600 dark:text-gray-400\", children: [\n \"Full number: \",\n y.dialCode,\n \" \",\n e\n ] }),\n g && /* @__PURE__ */ a(\"div\", { className: \"fixed inset-0 z-40\", onClick: () => u(!1) })\n ] });\n}, rc = ({\n checked: e,\n defaultChecked: t = !1,\n onChange: r,\n label: n,\n description: o,\n disabled: s = !1,\n size: i = \"md\",\n variant: c = \"primary\",\n color: d,\n className: l,\n id: g,\n name: u,\n value: b,\n required: f = !1,\n indeterminate: h = !1,\n error: y = !1,\n errorMessage: x,\n icon: C,\n onTrack: v,\n trackingLabel: k,\n componentName: w\n}) => {\n const [S, E] = M(t), N = e !== void 0, T = N ? e : S, L = {\n sm: {\n box: \"w-4 h-4\",\n check: \"w-3 h-3\",\n text: \"text-sm\",\n desc: \"text-xs\"\n },\n md: {\n box: \"w-5 h-5\",\n check: \"w-4 h-4\",\n text: \"text-base\",\n desc: \"text-sm\"\n },\n lg: {\n box: \"w-6 h-6\",\n check: \"w-5 h-5\",\n text: \"text-lg\",\n desc: \"text-base\"\n }\n }, I = d ? {\n blue: \"primary\",\n green: \"success\",\n yellow: \"warning\",\n red: \"error\"\n }[d] : c, D = () => y ? T ? \"bg-red-600 border-red-600\" : \"border-red-600 dark:border-red-500\" : {\n primary: T ? \"bg-blue-600 border-blue-600\" : \"border-gray-300 dark:border-gray-600\",\n success: T ? \"bg-green-600 border-green-600\" : \"border-gray-300 dark:border-gray-600\",\n warning: T ? \"bg-yellow-600 border-yellow-600\" : \"border-gray-300 dark:border-gray-600\",\n error: T ? \"bg-red-600 border-red-600\" : \"border-gray-300 dark:border-gray-600\"\n }[I], W = (q) => {\n if (s) return;\n const ee = q.target.checked;\n N || E(ee), v && v({\n action: \"toggle\",\n trackingLabel: k,\n componentName: w\n }), r?.(ee);\n }, z = (q) => {\n if (!s && (q.key === \" \" || q.key === \"Spacebar\")) {\n q.preventDefault();\n const ee = !T;\n N || E(ee), v && v({\n action: \"toggle\",\n trackingLabel: k,\n componentName: w\n }), r?.(ee);\n }\n }, $ = L[i];\n return /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex flex-col\", l), children: [\n /* @__PURE__ */ p(\n \"label\",\n {\n className: m(\n \"inline-flex items-start gap-2 cursor-pointer\",\n s && \"opacity-50 cursor-not-allowed\"\n ),\n children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative flex items-center\", children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"checkbox\",\n checked: T,\n defaultChecked: N ? void 0 : t,\n onChange: W,\n onKeyDown: z,\n disabled: s,\n id: g,\n name: u,\n value: b,\n required: f,\n className: \"sr-only peer\"\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n \"data-indeterminate\": h ? \"true\" : void 0,\n className: m(\n \"rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900\",\n $.box,\n D(),\n !s && \"hover:border-opacity-75\"\n ),\n children: h ? /* @__PURE__ */ a(Fa, { className: m(\"text-white\", $.check) }) : T ? C || /* @__PURE__ */ a(Wa, { className: m(\"text-white\", $.check) }) : null\n }\n )\n ] }),\n (n || o) && /* @__PURE__ */ p(\"div\", { className: \"flex flex-col\", children: [\n n && /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\"text-gray-900 dark:text-white\", $.text),\n children: n\n }\n ),\n o && /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\"text-gray-600 dark:text-gray-400\", $.desc),\n children: o\n }\n )\n ] })\n ]\n }\n ),\n x && /* @__PURE__ */ a(\"span\", { className: \"mt-1 text-sm text-red-600 dark:text-red-400\", children: x })\n ] });\n}, Jn = Z.forwardRef(\n ({\n className: e,\n onTrack: t,\n trackingLabel: r,\n componentName: n,\n onCheckedChange: o,\n ...s\n }, i) => {\n const c = (d) => {\n t && t({\n action: \"toggle\",\n trackingLabel: r,\n componentName: n\n }), o?.(d);\n };\n return /* @__PURE__ */ a(\n Br,\n {\n className: m(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700\",\n e\n ),\n onCheckedChange: c,\n ...s,\n ref: i,\n children: /* @__PURE__ */ a(\n $a,\n {\n className: m(\n \"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )\n }\n )\n }\n );\n }\n);\nJn.displayName = Br.displayName;\nconst ac = ({\n name: e = \"radio-group\",\n value: t,\n onChange: r,\n options: n,\n label: o,\n orientation: s = \"vertical\",\n disabled: i = !1,\n error: c = !1,\n errorMessage: d,\n required: l = !1,\n size: g = \"md\",\n renderOption: u,\n className: b\n}) => {\n const f = j(null), y = {\n sm: {\n radio: \"w-4 h-4\",\n label: \"text-sm\",\n description: \"text-xs\"\n },\n md: {\n radio: \"w-5 h-5\",\n label: \"text-base\",\n description: \"text-sm\"\n },\n lg: {\n radio: \"w-6 h-6\",\n label: \"text-lg\",\n description: \"text-base\"\n }\n }[g], x = (v, k) => {\n !i && !k && r(v);\n }, C = (v, k) => {\n const w = n.filter((E) => !E.disabled && !i), S = w.findIndex(\n (E) => E.value === n[k].value\n );\n if (v.key === \"ArrowDown\" || v.key === \"ArrowRight\") {\n v.preventDefault();\n const E = (S + 1) % w.length;\n r(w[E].value);\n } else if (v.key === \"ArrowUp\" || v.key === \"ArrowLeft\") {\n v.preventDefault();\n const E = (S - 1 + w.length) % w.length;\n r(w[E].value);\n }\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", b), children: [\n o && /* @__PURE__ */ a(\"div\", { className: \"mb-2\", children: /* @__PURE__ */ p(\"span\", { className: \"text-sm font-medium text-gray-700 dark:text-gray-300\", children: [\n o,\n l && /* @__PURE__ */ a(\"span\", { className: \"text-red-600 ml-1\", children: \"*\" })\n ] }) }),\n /* @__PURE__ */ a(\n \"div\",\n {\n ref: f,\n className: m(\n s === \"horizontal\" ? \"flex flex-row gap-4\" : \"flex flex-col space-y-2\"\n ),\n role: \"radiogroup\",\n children: n.map((v, k) => {\n const w = i || v.disabled, S = t === v.value;\n return /* @__PURE__ */ p(\n \"label\",\n {\n className: m(\n \"flex items-start cursor-pointer\",\n w && \"opacity-50 cursor-not-allowed\",\n c && \"border-red-600 dark:border-red-500\"\n ),\n children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"radio\",\n name: e,\n value: v.value,\n checked: S,\n onChange: () => x(v.value, !!v.disabled),\n onKeyDown: (E) => C(E, k),\n disabled: w,\n className: m(\n \"mt-0.5 mr-2\",\n y.radio,\n \"text-blue-600 bg-white dark:bg-gray-900\",\n \"border-gray-300 dark:border-gray-600\",\n \"focus:ring-blue-500 focus:ring-2\",\n \"transition-colors\",\n c && \"border-red-600 dark:border-red-500\",\n w && \"cursor-not-allowed\"\n )\n }\n ),\n /* @__PURE__ */ a(\"div\", { className: \"flex-1 min-w-0\", children: u ? u(v) : /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"font-medium text-gray-700 dark:text-gray-300\",\n y.label\n ),\n children: v.label\n }\n ),\n v.description && /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n \"text-gray-500 dark:text-gray-400 mt-0.5\",\n y.description\n ),\n children: v.description\n }\n )\n ] }) })\n ]\n },\n v.value\n );\n })\n }\n ),\n d && /* @__PURE__ */ a(\"p\", { className: \"mt-1 text-sm text-red-600 dark:text-red-400\", children: d })\n ] });\n}, kr = ({\n onTrack: e,\n trackingLabel: t,\n componentName: r,\n onValueChange: n,\n children: o,\n ...s\n}) => {\n const i = (c) => {\n e && e({\n action: \"change\",\n trackingLabel: t,\n componentName: r\n }), n?.(c);\n };\n return /* @__PURE__ */ a(G.Root, { onValueChange: i, ...s, children: o });\n}, nc = G.Group, Qn = G.Value, Nt = Z.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ p(\n G.Trigger,\n {\n ref: n,\n className: m(\n \"flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n e\n ),\n ...r,\n children: [\n t,\n /* @__PURE__ */ a(G.Icon, { asChild: !0, children: /* @__PURE__ */ a(Pt, { className: \"h-4 w-4 opacity-50 ml-2 flex-shrink-0\" }) })\n ]\n }\n));\nNt.displayName = G.Trigger.displayName;\nconst Xr = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n G.ScrollUpButton,\n {\n ref: r,\n className: m(\n \"flex cursor-default items-center justify-center py-1\",\n e\n ),\n ...t,\n children: /* @__PURE__ */ a(Va, { className: \"h-4 w-4\" })\n }\n));\nXr.displayName = G.ScrollUpButton.displayName;\nconst Jr = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n G.ScrollDownButton,\n {\n ref: r,\n className: m(\n \"flex cursor-default items-center justify-center py-1\",\n e\n ),\n ...t,\n children: /* @__PURE__ */ a(Pt, { className: \"h-4 w-4\" })\n }\n));\nJr.displayName = G.ScrollDownButton.displayName;\nconst Ct = Z.forwardRef(({ className: e, children: t, position: r = \"popper\", ...n }, o) => /* @__PURE__ */ a(G.Portal, { children: /* @__PURE__ */ p(\n G.Content,\n {\n ref: o,\n className: m(\n F.overlays.dropdown.menu(),\n \"z-[1000000] max-h-96 overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n r === \"popper\" && \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 w-[var(--radix-select-trigger-width)]\",\n e\n ),\n position: r,\n ...n,\n children: [\n /* @__PURE__ */ a(Xr, {}),\n /* @__PURE__ */ a(\n G.Viewport,\n {\n className: m(\n F.overlays.dropdown.itemContainer(),\n r === \"popper\" && \"h-[var(--radix-select-trigger-height)] w-full\"\n ),\n children: t\n }\n ),\n /* @__PURE__ */ a(Jr, {})\n ]\n }\n) }));\nCt.displayName = G.Content.displayName;\nconst eo = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n G.Label,\n {\n ref: r,\n className: m(F.overlays.dropdown.header(), \"py-1.5\", e),\n ...t\n }\n));\neo.displayName = G.Label.displayName;\nconst St = Z.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ p(\n G.Item,\n {\n ref: n,\n className: m(\n F.overlays.dropdown.item(),\n \"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n e\n ),\n ...r,\n children: [\n /* @__PURE__ */ a(G.ItemText, { children: t }),\n /* @__PURE__ */ a(\"span\", { className: \"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\", children: /* @__PURE__ */ a(G.ItemIndicator, { children: /* @__PURE__ */ a(Ha, { className: \"h-4 w-4\" }) }) })\n ]\n }\n));\nSt.displayName = G.Item.displayName;\nconst to = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n G.Separator,\n {\n ref: r,\n className: m(\"my-1 h-px bg-gray-200 dark:bg-gray-700\", e),\n ...t\n }\n));\nto.displayName = G.Separator.displayName;\nconst oc = ({\n options: e,\n value: t,\n onChange: r,\n placeholder: n = \"Select items...\",\n searchPlaceholder: o = \"Search...\",\n searchable: s = !0,\n maxDisplay: i = 3,\n disabled: c = !1,\n className: d\n}) => {\n const [l, g] = M(!1), [u, b] = M(\"\"), f = j(null), h = s ? e.filter(\n (w) => w.label.toLowerCase().includes(u.toLowerCase())\n ) : e, y = e.filter((w) => t.includes(w.value)), x = (w) => {\n t.includes(w) ? r(t.filter((S) => S !== w)) : r([...t, w]);\n }, C = (w) => {\n r(t.filter((S) => S !== w));\n };\n R(() => {\n const w = (S) => {\n f.current && !f.current.contains(S.target) && (g(!1), b(\"\"));\n };\n return document.addEventListener(\"mousedown\", w), () => document.removeEventListener(\"mousedown\", w);\n }, []);\n const v = y.length, k = v > i ? v - i : 0;\n return /* @__PURE__ */ p(\"div\", { ref: f, className: m(\"relative w-full\", d), children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: () => !c && g(!l),\n disabled: c,\n className: m(\n \"w-full min-h-[42px] px-3 py-2 text-sm text-left\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n l && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: /* @__PURE__ */ a(\"div\", { className: \"flex flex-wrap gap-1.5\", children: y.length === 0 ? /* @__PURE__ */ a(\"span\", { className: \"text-gray-500 dark:text-gray-400\", children: n }) : /* @__PURE__ */ p(H, { children: [\n y.slice(0, i).map((w) => /* @__PURE__ */ p(\n \"span\",\n {\n className: \"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium\",\n children: [\n w.label,\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (S) => {\n S.stopPropagation(), C(w.value);\n },\n className: \"hover:text-blue-900 dark:hover:text-blue-100\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-3 h-3\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ]\n },\n w.value\n )),\n k > 0 && /* @__PURE__ */ p(\"span\", { className: \"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium\", children: [\n \"+\",\n k,\n \" more\"\n ] })\n ] }) })\n }\n ),\n l && /* @__PURE__ */ p(\"div\", { className: \"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg\", children: [\n s && /* @__PURE__ */ a(\"div\", { className: \"p-2 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: u,\n onChange: (w) => b(w.target.value),\n placeholder: o,\n className: \"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n onClick: (w) => w.stopPropagation()\n }\n ) }),\n /* @__PURE__ */ a(\"div\", { className: \"max-h-60 overflow-y-auto py-1\", children: h.length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center\", children: \"No options found\" }) : h.map((w) => {\n const S = t.includes(w.value);\n return /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => !w.disabled && x(w.value),\n disabled: w.disabled,\n className: m(\n \"w-full px-3 py-2 text-sm text-left flex items-center gap-2\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-4 h-4 border-2 rounded flex items-center justify-center\",\n S ? \"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500\" : \"border-gray-300 dark:border-gray-600\"\n ),\n children: S && /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-3 h-3 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 3,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"flex-1 text-gray-900 dark:text-white\", children: w.label })\n ]\n },\n w.value\n );\n }) }),\n t.length > 0 && /* @__PURE__ */ p(\"div\", { className: \"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center\", children: [\n /* @__PURE__ */ p(\"span\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: [\n t.length,\n \" selected\"\n ] }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (w) => {\n w.stopPropagation(), r([]);\n },\n className: \"text-xs text-blue-600 dark:text-blue-400 hover:underline\",\n children: \"Clear all\"\n }\n )\n ] })\n ] })\n ] });\n}, sc = ({\n options: e,\n value: t,\n onChange: r,\n placeholder: n = \"Select option...\",\n searchPlaceholder: o = \"Search...\",\n emptyMessage: s = \"No results found.\",\n disabled: i = !1,\n className: c\n}) => {\n const [d, l] = M(!1), [g, u] = M(\"\"), [b, f] = M(0), h = j(null), y = j(null), x = e.filter(\n (w) => w.label.toLowerCase().includes(g.toLowerCase())\n ), C = e.find((w) => w.value === t);\n R(() => {\n if (!d) return;\n const w = (S) => {\n h.current && !h.current.contains(S.target) && (l(!1), u(\"\"));\n };\n return document.addEventListener(\"mousedown\", w), () => document.removeEventListener(\"mousedown\", w);\n }, [d]), R(() => {\n d && y.current && y.current.focus();\n }, [d]), R(() => {\n f(0);\n }, [g]);\n const v = (w) => {\n if (!d) {\n (w.key === \"Enter\" || w.key === \" \") && (w.preventDefault(), l(!0));\n return;\n }\n switch (w.key) {\n case \"ArrowDown\":\n w.preventDefault(), f(\n (S) => S < x.length - 1 ? S + 1 : S\n );\n break;\n case \"ArrowUp\":\n w.preventDefault(), f((S) => S > 0 ? S - 1 : S);\n break;\n case \"Enter\":\n w.preventDefault(), x[b] && !x[b].disabled && (r(x[b].value), l(!1), u(\"\"));\n break;\n case \"Escape\":\n w.preventDefault(), l(!1), u(\"\");\n break;\n }\n }, k = (w, S) => {\n S || (r(w), l(!1), u(\"\"));\n };\n return /* @__PURE__ */ p(\"div\", { ref: h, className: m(\"relative w-full\", c), children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => !i && l(!d),\n onKeyDown: v,\n disabled: i,\n className: m(\n \"w-full flex items-center justify-between\",\n \"px-3 py-2 text-sm text-left\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n d && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: [\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"truncate\",\n !C && \"text-gray-500 dark:text-gray-400\"\n ),\n children: C ? C.label : n\n }\n ),\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-4 h-4 ml-2 transition-transform\",\n d && \"rotate-180\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n ]\n }\n ),\n d && /* @__PURE__ */ p(\"div\", { className: \"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"p-2 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ a(\n \"input\",\n {\n ref: y,\n type: \"text\",\n value: g,\n onChange: (w) => u(w.target.value),\n onKeyDown: v,\n placeholder: o,\n className: \"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\"\n }\n ) }),\n /* @__PURE__ */ a(\"div\", { className: \"max-h-60 overflow-y-auto py-1\", children: x.length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center\", children: s }) : x.map((w, S) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => k(w.value, w.disabled),\n disabled: w.disabled,\n className: m(\n \"w-full px-3 py-2 text-sm text-left\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n w.value === t ? \"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300\" : S === b ? \"bg-gray-100 dark:bg-gray-800\" : \"hover:bg-gray-50 dark:hover:bg-gray-800\"\n ),\n children: w.label\n },\n w.value\n )) })\n ] })\n ] });\n}, ic = ({\n options: e,\n value: t,\n onChange: r,\n placeholder: n = \"Enter or select...\",\n disabled: o = !1,\n className: s,\n inputClassName: i,\n filterOptions: c = !0,\n emptyMessage: d = \"No matching options\"\n}) => {\n const [l, g] = M(!1), [u, b] = M(!1), [f, h] = M(!1), [y, x] = M(0), C = j(null), v = j(null), k = e.find((I) => I.value === t), w = k?.label && typeof k.label != \"string\", S = c && f ? e.filter((I) => (I.searchLabel || I.value).toLowerCase().includes(t.toLowerCase())) : e;\n R(() => {\n if (!l && !u) return;\n const I = (D) => {\n C.current && !C.current.contains(D.target) && (g(!1), b(!1), h(!1));\n };\n return document.addEventListener(\"mousedown\", I), () => document.removeEventListener(\"mousedown\", I);\n }, [l, u]), R(() => {\n x(0);\n }, [t, S.length]);\n const E = (I) => {\n if (!l) {\n I.key === \"ArrowDown\" && (I.preventDefault(), g(!0));\n return;\n }\n switch (I.key) {\n case \"ArrowDown\":\n I.preventDefault(), x(\n (D) => D < S.length - 1 ? D + 1 : D\n );\n break;\n case \"ArrowUp\":\n I.preventDefault(), x((D) => D > 0 ? D - 1 : D);\n break;\n case \"Enter\":\n I.preventDefault(), S[y] && !S[y].disabled && (r(S[y].value), g(!1), h(!1));\n break;\n case \"Escape\":\n I.preventDefault(), g(!1), h(!1);\n break;\n case \"Tab\":\n g(!1), h(!1);\n break;\n }\n }, N = (I, D) => {\n D || (r(I), g(!1), b(!1), h(!1));\n }, T = (I) => {\n r(I.target.value), h(!0), l || g(!0);\n }, L = () => {\n o || (g(!l), l || v.current?.focus());\n }, P = () => {\n o || (b(!0), g(!0), setTimeout(() => v.current?.focus(), 0));\n };\n return /* @__PURE__ */ p(\"div\", { ref: C, className: m(\"relative w-full\", s), children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative flex items-center\", children: [\n !u && w && t ? /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: P,\n disabled: o,\n className: m(\n F.input.default(),\n \"pr-10 text-left flex items-center\",\n o && \"opacity-50 cursor-not-allowed\",\n i\n ),\n children: k?.label\n }\n ) : /* @__PURE__ */ a(\n \"input\",\n {\n ref: v,\n type: \"text\",\n value: t,\n onChange: T,\n onKeyDown: E,\n onFocus: () => {\n b(!0), e.length > 0 && g(!0);\n },\n onBlur: () => {\n setTimeout(() => {\n l || b(!1);\n }, 150);\n },\n placeholder: n,\n disabled: o,\n className: m(\n F.input.default(),\n \"pr-10\",\n o && \"opacity-50 cursor-not-allowed\",\n i\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: L,\n disabled: o,\n className: m(\n \"absolute right-0 top-0 h-full px-3\",\n \"flex items-center justify-center\",\n \"text-gray-500 dark:text-gray-400\",\n \"hover:text-gray-700 dark:hover:text-gray-200\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n l && \"text-gray-700 dark:text-gray-200\"\n ),\n \"aria-label\": \"Toggle dropdown\",\n children: /* @__PURE__ */ a(\n Pt,\n {\n className: m(\n \"w-4 h-4 transition-transform\",\n l && \"rotate-180\"\n )\n }\n )\n }\n )\n ] }),\n l && e.length > 0 && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute z-50 w-full mt-1\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md shadow-lg\",\n \"max-h-60 overflow-y-auto\"\n ),\n children: S.length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center\", children: d }) : S.map((I, D) => /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: () => N(I.value, I.disabled),\n disabled: I.disabled,\n className: m(\n \"w-full px-3 py-2 text-sm text-left\",\n \"flex items-center gap-2\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n I.value === t ? \"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300\" : D === y ? \"bg-gray-100 dark:bg-gray-800\" : \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"text-gray-900 dark:text-gray-100\"\n ),\n children: I.label || I.value\n },\n I.value\n ))\n }\n )\n ] });\n};\nfunction Ut(e, t) {\n R(() => {\n const r = (n) => {\n const o = e?.current;\n !o || o.contains(n?.target || null) || t(n);\n };\n return document.addEventListener(\"mousedown\", r), document.addEventListener(\"touchstart\", r), () => {\n document.removeEventListener(\"mousedown\", r), document.removeEventListener(\"touchstart\", r);\n };\n }, [e, t]);\n}\nconst lc = ({\n trigger: e,\n items: t,\n align: r = \"right\",\n className: n = \"\",\n variant: o = \"default\",\n onTrack: s,\n trackingLabel: i,\n componentName: c\n}) => {\n const [d, l] = M(!1), g = U.useRef(null);\n Ut(g, () => l(!1));\n const u = (h) => {\n h.disabled || (s && s({\n action: \"select\",\n trackingLabel: i,\n componentName: c\n }), h.onClick(), l(!1));\n }, b = r === \"left\" ? F.overlays.dropdown.menuRight() : F.overlays.dropdown.menuLeft(), f = o === \"bordered\" ? F.overlays.dropdown.triggerBordered() : F.overlays.dropdown.trigger();\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: `${F.overlays.dropdown.container()} ${n}`,\n ref: g,\n children: [\n /* @__PURE__ */ a(\"div\", { className: f, onClick: () => l(!d), children: e }),\n d && /* @__PURE__ */ a(\n \"div\",\n {\n className: `${F.overlays.dropdown.menu()} ${b} ${F.overlays.dropdown.menuBottom()}`,\n children: /* @__PURE__ */ a(\"div\", { className: F.overlays.dropdown.itemContainer(), children: t.map(\n (h) => h.separator ? /* @__PURE__ */ a(\n \"div\",\n {\n className: \"my-1 h-px bg-gray-200 dark:bg-gray-700\",\n role: \"separator\"\n },\n h.id\n ) : /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => u(h),\n disabled: h.disabled,\n className: `${h.disabled ? F.overlays.dropdown.itemDisabled() : F.overlays.dropdown.item()} flex items-center gap-2`,\n children: [\n h.icon && /* @__PURE__ */ a(\n h.icon,\n {\n className: F.overlays.dropdown.itemIcon()\n }\n ),\n /* @__PURE__ */ a(\"span\", { children: h.label })\n ]\n },\n h.id\n )\n ) })\n }\n )\n ]\n }\n );\n}, cc = ({\n options: e,\n value: t,\n values: r = [],\n onChange: n,\n onValuesChange: o,\n multiple: s = !1,\n size: i = \"md\",\n variant: c = \"default\",\n className: d\n}) => {\n const l = (f, h) => {\n if (!h)\n if (s) {\n const y = r.includes(f) ? r.filter((x) => x !== f) : [...r, f];\n o?.(y);\n } else\n n?.(f);\n }, g = (f) => s ? r.includes(f) : t === f, u = {\n sm: \"text-xs px-2 py-1\",\n md: \"text-sm px-3 py-2\",\n lg: \"text-base px-4 py-2\"\n }, b = {\n default: {\n base: \"bg-gray-100 dark:bg-gray-800\",\n button: \"hover:bg-gray-200 dark:hover:bg-gray-700\",\n selected: \"bg-white dark:bg-gray-900 shadow-sm\"\n },\n outline: {\n base: \"border border-gray-200 dark:border-gray-700\",\n button: \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n selected: \"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600\"\n }\n };\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"inline-flex rounded-lg p-1 gap-1\",\n b[c].base,\n d\n ),\n role: \"group\",\n children: e.map((f) => {\n const h = g(f.value);\n return /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => l(f.value, f.disabled),\n disabled: f.disabled,\n className: m(\n \"inline-flex items-center justify-center gap-2\",\n \"rounded-md font-medium\",\n \"transition-all duration-150\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n u[i],\n h ? b[c].selected : b[c].button,\n h ? \"text-gray-900 dark:text-white\" : \"text-gray-600 dark:text-gray-400\"\n ),\n \"aria-pressed\": h,\n children: [\n f.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4\", children: f.icon }),\n f.label\n ]\n },\n f.value\n );\n })\n }\n );\n}, dc = ({\n value: e,\n onChange: t,\n min: r = 0,\n max: n = 100,\n step: o = 1,\n disabled: s = !1,\n showValue: i = !1,\n formatValue: c = (h) => String(h),\n showMinMax: d = !1,\n minLabel: l,\n maxLabel: g,\n variant: u = \"primary\",\n size: b = \"md\",\n className: f\n}) => {\n const h = {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-3\"\n }, y = {\n primary: \"accent-blue-600 dark:accent-blue-500\",\n success: \"accent-green-600 dark:accent-green-500\",\n warning: \"accent-yellow-600 dark:accent-yellow-500\",\n danger: \"accent-red-600 dark:accent-red-500\"\n }, x = (v) => {\n t(Number(v.target.value));\n }, C = (e - r) / (n - r) * 100;\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", f), children: [\n i && /* @__PURE__ */ p(\"div\", { className: \"flex justify-between items-center mb-2\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-sm font-medium text-gray-700 dark:text-gray-300\", children: c(e) }),\n d && /* @__PURE__ */ p(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: [\n l || r,\n \" - \",\n g || n\n ] })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute inset-0 rounded-full\",\n \"bg-gray-200 dark:bg-gray-700\",\n h[b]\n )\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute left-0 rounded-full transition-all\",\n \"bg-current\",\n y[u],\n h[b]\n ),\n style: { width: `${C}%` }\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: r,\n max: n,\n step: o,\n value: e,\n onChange: x,\n disabled: s,\n className: m(\n \"relative w-full appearance-none bg-transparent cursor-pointer\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\",\n \"rounded-lg\",\n h[b],\n y[u],\n s && \"opacity-50 cursor-not-allowed\",\n // Thumb styling\n \"[&::-webkit-slider-thumb]:appearance-none\",\n \"[&::-webkit-slider-thumb]:w-4\",\n \"[&::-webkit-slider-thumb]:h-4\",\n \"[&::-webkit-slider-thumb]:rounded-full\",\n \"[&::-webkit-slider-thumb]:bg-white\",\n \"[&::-webkit-slider-thumb]:border-2\",\n \"[&::-webkit-slider-thumb]:border-current\",\n \"[&::-webkit-slider-thumb]:shadow-md\",\n \"[&::-webkit-slider-thumb]:transition-transform\",\n \"[&::-webkit-slider-thumb]:hover:scale-110\",\n \"[&::-moz-range-thumb]:w-4\",\n \"[&::-moz-range-thumb]:h-4\",\n \"[&::-moz-range-thumb]:rounded-full\",\n \"[&::-moz-range-thumb]:bg-white\",\n \"[&::-moz-range-thumb]:border-2\",\n \"[&::-moz-range-thumb]:border-current\",\n \"[&::-moz-range-thumb]:shadow-md\",\n \"[&::-moz-range-thumb]:transition-transform\",\n \"[&::-moz-range-thumb]:hover:scale-110\"\n )\n }\n )\n ] }),\n d && !i && /* @__PURE__ */ p(\"div\", { className: \"flex justify-between mt-1\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: l || r }),\n /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: g || n })\n ] })\n ] });\n}, uc = ({\n value: e,\n onChange: t,\n min: r = 0,\n max: n = 100,\n step: o = 1,\n showValue: s = !0,\n className: i\n}) => /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center gap-4\", i), children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: r,\n max: n,\n step: o,\n value: e,\n onChange: (c) => t(Number(c.target.value)),\n className: \"flex-1 accent-blue-500\"\n }\n ),\n s && /* @__PURE__ */ a(\"span\", { className: \"w-12 text-center font-semibold text-gray-900 dark:text-white\", children: e })\n] }), gc = ({\n onChange: e,\n accept: t,\n multiple: r = !1,\n maxSize: n,\n maxFiles: o,\n disabled: s = !1,\n showDropZone: i = !1,\n showFileList: c = !0,\n files: d = [],\n onRemove: l,\n className: g,\n buttonText: u = \"Choose Files\",\n dropZoneText: b = \"Drop files here or click to browse\",\n onTrack: f,\n trackingLabel: h,\n componentName: y\n}) => {\n const x = j(null), [C, v] = M(!1), [k, w] = M(null), S = (z) => (w(null), o && d.length + z.length > o ? (w(`Maximum ${o} files allowed`), []) : z.filter((q) => n && q.size > n ? (w(\n `File \"${q.name}\" exceeds maximum size of ${Et(n)}`\n ), !1) : !0)), E = (z) => {\n f && f({\n action: z,\n trackingLabel: h,\n componentName: y\n });\n }, N = (z) => {\n const $ = Array.from(z.target.files || []), q = S($);\n q.length > 0 && (E(\"select\"), e(q)), x.current && (x.current.value = \"\");\n }, T = () => {\n x.current?.click();\n }, L = (z) => {\n z.preventDefault(), z.stopPropagation(), s || v(!0);\n }, P = (z) => {\n z.preventDefault(), z.stopPropagation(), v(!1);\n }, I = (z) => {\n z.preventDefault(), z.stopPropagation();\n }, D = (z) => {\n if (z.preventDefault(), z.stopPropagation(), v(!1), s) return;\n const $ = Array.from(z.dataTransfer.files), q = S($);\n q.length > 0 && (E(\"drop\"), e(q));\n }, W = (z) => {\n l && (E(\"remove\"), l(z));\n };\n return i ? /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", g), children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n ref: x,\n type: \"file\",\n onChange: N,\n accept: t,\n multiple: r,\n disabled: s,\n className: \"hidden\"\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n onClick: T,\n onDragEnter: L,\n onDragLeave: P,\n onDragOver: I,\n onDrop: D,\n className: m(\n \"relative border-2 border-dashed rounded-lg p-8\",\n \"transition-colors duration-200\",\n \"cursor-pointer\",\n C ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/10\" : \"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500\",\n s && \"opacity-50 cursor-not-allowed\"\n ),\n children: /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center justify-center space-y-3\", children: [\n /* @__PURE__ */ a(Ea, { className: \"h-12 w-12 text-gray-400 dark:text-gray-500\" }),\n /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400 text-center\", children: b }),\n n && /* @__PURE__ */ p(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-500\", children: [\n \"Max file size: \",\n Et(n)\n ] })\n ] })\n }\n ),\n k && /* @__PURE__ */ a(\"p\", { className: \"mt-2 text-sm text-red-600 dark:text-red-400\", children: k }),\n c && d.length > 0 && /* @__PURE__ */ a(Nr, { files: d, onRemove: W })\n ] }) : /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", g), children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n ref: x,\n type: \"file\",\n onChange: N,\n accept: t,\n multiple: r,\n disabled: s,\n className: \"hidden\"\n }\n ),\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: T,\n disabled: s,\n className: m(\n \"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600\",\n \"rounded-lg shadow-sm text-sm font-medium\",\n \"text-gray-700 dark:text-gray-300\",\n \"bg-white dark:bg-gray-800\",\n \"hover:bg-gray-50 dark:hover:bg-gray-700\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500\",\n \"transition-colors\",\n s && \"opacity-50 cursor-not-allowed\"\n ),\n children: [\n /* @__PURE__ */ a(_r, { className: \"h-5 w-5 mr-2\" }),\n u\n ]\n }\n ),\n k && /* @__PURE__ */ a(\"p\", { className: \"mt-2 text-sm text-red-600 dark:text-red-400\", children: k }),\n c && d.length > 0 && /* @__PURE__ */ a(Nr, { files: d, onRemove: W })\n ] });\n}, Nr = ({ files: e, onRemove: t }) => /* @__PURE__ */ a(\"div\", { className: \"mt-3 space-y-2\", children: e.map((r, n) => /* @__PURE__ */ p(\n \"div\",\n {\n className: \"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700\",\n children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center space-x-2 flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(_r, { className: \"h-5 w-5 text-gray-400 flex-shrink-0\" }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-900 dark:text-gray-100 truncate\", children: r.name }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: Et(r.size) })\n ] })\n ] }),\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: () => t(n),\n className: \"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors\",\n \"aria-label\": \"Remove file\",\n children: /* @__PURE__ */ a(lt, { className: \"h-5 w-5\" })\n }\n )\n ]\n },\n `${r.name}-${n}`\n)) });\nfunction Et(e) {\n if (e === 0) return \"0 Bytes\";\n const t = 1024, r = [\"Bytes\", \"KB\", \"MB\", \"GB\"], n = Math.floor(Math.log(e) / Math.log(t));\n return Math.round(e / Math.pow(t, n) * 100) / 100 + \" \" + r[n];\n}\nconst mc = ({\n value: e,\n onChange: t,\n placeholder: r = \"Type and press Enter...\",\n maxTags: n,\n validate: o,\n validator: s,\n separators: i = [],\n allowDuplicates: c = !1,\n disabled: d = !1,\n error: l = !1,\n errorMessage: g,\n variant: u = \"primary\",\n renderTag: b,\n className: f\n}) => {\n const h = o || s, [y, x] = M(\"\"), C = j(null), v = {\n primary: \"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300\",\n secondary: \"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300\",\n success: \"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300\",\n warning: \"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300\",\n error: \"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300\"\n }, k = (T) => {\n const L = T.trim();\n L && (n && e.length >= n || !c && e.includes(L) || h && !h(L) || (t([...e, L]), x(\"\")));\n }, w = (T) => {\n t(e.filter((L, P) => P !== T));\n }, S = (T) => {\n x(T.target.value);\n }, E = (T) => {\n T.key === \"Enter\" && (T.preventDefault(), y.trim() && k(y)), T.key === \",\" && (T.preventDefault(), y.trim() && k(y)), i.length > 0 && i.includes(T.key) && T.key !== \",\" && (T.preventDefault(), y.trim() && k(y)), T.key === \"Backspace\" && !y && e.length > 0 && w(e.length - 1), T.key === \"Escape\" && x(\"\");\n }, N = n !== void 0 && e.length >= n;\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", f), children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400\",\n \"transition-all\",\n d && \"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800\",\n l && \"border-red-500 dark:border-red-400\"\n ),\n onClick: () => !d && C.current?.focus(),\n children: [\n e.map(\n (T, L) => b ? /* @__PURE__ */ a(U.Fragment, { children: b(T, L, () => w(L)) }, L) : /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n \"inline-flex items-center gap-1.5 px-2.5 py-1\",\n v[u],\n \"text-sm font-medium\",\n \"rounded-md\",\n \"transition-colors\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"truncate max-w-[200px]\", children: T }),\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: (P) => {\n P.stopPropagation(), w(L);\n },\n disabled: d,\n className: m(\n \"flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100\",\n \"transition-colors\",\n \"disabled:cursor-not-allowed\"\n ),\n \"aria-label\": `Remove ${T}`,\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-3.5 h-3.5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ]\n },\n L\n )\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n ref: C,\n type: \"text\",\n value: y,\n onChange: S,\n onKeyDown: E,\n placeholder: e.length === 0 ? r : N ? `Max ${n} tags` : \"\",\n disabled: d,\n className: m(\n \"flex-1 min-w-[120px] outline-none bg-transparent\",\n \"text-sm text-gray-900 dark:text-white\",\n \"placeholder:text-gray-500 dark:placeholder:text-gray-400\",\n \"disabled:cursor-not-allowed\"\n )\n }\n )\n ]\n }\n ),\n g && /* @__PURE__ */ a(\"p\", { className: \"mt-1.5 text-xs text-red-600 dark:text-red-400\", children: g }),\n n && /* @__PURE__ */ p(\"p\", { className: \"mt-1.5 text-xs text-gray-600 dark:text-gray-400\", children: [\n e.length,\n \" / \",\n n,\n \" tags\"\n ] })\n ] });\n}, hc = ({\n value: e,\n onChange: t,\n mentions: r,\n trigger: n = \"@\",\n placeholder: o = \"Type a message...\",\n disabled: s = !1,\n className: i\n}) => {\n const [c, d] = M(!1), [l, g] = M([]), [u, b] = M(0), [f, h] = M(0), y = j(null), x = j(null), C = (w) => {\n const S = w.target.value, E = w.target.selectionStart || 0;\n t(S), h(E);\n const T = S.substring(0, E).split(/\\s/), L = T[T.length - 1];\n if (L.startsWith(n)) {\n const P = L.substring(n.length), I = r.filter(\n (D) => D.label.toLowerCase().includes(P.toLowerCase())\n );\n g(I), d(I.length > 0), b(0);\n } else\n d(!1);\n }, v = (w) => {\n const S = e.substring(0, f), E = e.substring(f), N = S.split(/\\s/), T = N[N.length - 1], L = S.length - T.length, P = e.substring(0, L) + n + w.label + \" \" + E;\n if (t(P), d(!1), y.current) {\n const I = L + n.length + w.label.length + 1;\n setTimeout(() => {\n y.current?.focus(), y.current?.setSelectionRange(I, I);\n }, 0);\n }\n }, k = (w) => {\n if (c)\n switch (w.key) {\n case \"ArrowDown\":\n w.preventDefault(), b(\n (S) => S < l.length - 1 ? S + 1 : S\n );\n break;\n case \"ArrowUp\":\n w.preventDefault(), b((S) => S > 0 ? S - 1 : S);\n break;\n case \"Enter\":\n w.preventDefault(), l[u] && v(l[u]);\n break;\n case \"Escape\":\n w.preventDefault(), d(!1);\n break;\n }\n };\n return R(() => {\n const w = (S) => {\n x.current && !x.current.contains(S.target) && y.current && !y.current.contains(S.target) && d(!1);\n };\n return document.addEventListener(\"mousedown\", w), () => document.removeEventListener(\"mousedown\", w);\n }, []), /* @__PURE__ */ p(\"div\", { className: m(\"relative w-full\", i), children: [\n /* @__PURE__ */ a(\n \"textarea\",\n {\n ref: y,\n value: e,\n onChange: C,\n onKeyDown: k,\n placeholder: o,\n disabled: s,\n className: m(\n \"w-full px-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n \"resize-none\",\n \"min-h-[100px]\"\n )\n }\n ),\n c && /* @__PURE__ */ a(\n \"div\",\n {\n ref: x,\n className: \"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto\",\n children: l.map((w, S) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => v(w),\n className: m(\n \"w-full px-3 py-2 text-left flex items-center gap-3\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n S === u && \"bg-blue-50 dark:bg-blue-900/30\"\n ),\n children: [\n w.avatar && /* @__PURE__ */ a(\n \"img\",\n {\n src: w.avatar,\n alt: w.label,\n className: \"w-8 h-8 rounded-full\"\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-900 dark:text-white truncate\", children: w.label }),\n w.metadata && /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400 truncate\", children: w.metadata })\n ] })\n ]\n },\n w.id\n ))\n }\n )\n ] });\n}, ro = Q(\n `${O.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`\n), Qr = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(Fr, { ref: r, className: m(ro(), e), ...t }));\nQr.displayName = Fr.displayName;\nconst fc = ({\n id: e,\n label: t,\n type: r = \"text\",\n value: n,\n onChange: o,\n placeholder: s,\n helperText: i,\n error: c,\n required: d = !1,\n disabled: l = !1,\n maxLength: g,\n autoFocus: u = !1,\n className: b,\n inputClassName: f\n}) => {\n const h = !!c, y = i || c ? `${e}-helper` : void 0;\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-2\", b), children: [\n /* @__PURE__ */ p(Qr, { htmlFor: e, children: [\n t,\n d && /* @__PURE__ */ a(\"span\", { className: \"text-red-500 ml-1\", children: \"*\" })\n ] }),\n /* @__PURE__ */ a(\n Dt,\n {\n type: r,\n id: e,\n value: n,\n onChange: o,\n placeholder: s,\n disabled: l,\n maxLength: g,\n autoFocus: u,\n required: d,\n \"aria-invalid\": h,\n \"aria-describedby\": y,\n className: f\n }\n ),\n (i || c) && /* @__PURE__ */ a(\n \"p\",\n {\n id: y,\n className: m(\n O.body.sm(),\n h ? \"text-red-600 dark:text-red-400\" : \"text-gray-500 dark:text-gray-400\"\n ),\n role: h ? \"alert\" : void 0,\n children: c || i\n }\n )\n ] });\n}, jt = ({\n label: e,\n required: t = !1,\n error: r,\n helpText: n,\n children: o,\n layout: s = \"vertical\",\n className: i = \"\",\n labelClassName: c = \"\",\n contentClassName: d = \"\"\n}) => {\n const l = s === \"horizontal\";\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: `${l ? \"grid grid-cols-1 md:grid-cols-3 gap-4 items-start\" : \"space-y-2\"} ${i}`,\n children: [\n /* @__PURE__ */ p(\"div\", { className: l ? \"md:col-span-1\" : \"\", children: [\n /* @__PURE__ */ p(\n \"label\",\n {\n className: `block text-sm font-medium text-gray-700 dark:text-gray-300 ${c}`,\n children: [\n e,\n t && /* @__PURE__ */ a(\"span\", { className: \"text-red-500 ml-1\", children: \"*\" })\n ]\n }\n ),\n n && !r && /* @__PURE__ */ p(\"div\", { className: \"mt-1 flex items-start\", children: [\n /* @__PURE__ */ a(Te, { className: \"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0\" }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: n })\n ] })\n ] }),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: `${l ? \"md:col-span-2\" : \"\"} ${d}`,\n children: [\n /* @__PURE__ */ a(\"div\", { className: r ? \"relative\" : \"\", children: o }),\n r && /* @__PURE__ */ p(\"div\", { className: \"mt-1 flex items-start\", children: [\n /* @__PURE__ */ a(kt, { className: \"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0\" }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-red-600 dark:text-red-400\", children: r })\n ] })\n ]\n }\n )\n ]\n }\n );\n}, bc = ({\n label: e,\n value: t,\n onChange: r,\n placeholder: n,\n required: o = !1,\n error: s,\n helpText: i,\n type: c = \"text\",\n layout: d = \"vertical\",\n className: l = \"\"\n}) => /* @__PURE__ */ a(\n jt,\n {\n label: e,\n required: o,\n error: s,\n helpText: i,\n layout: d,\n className: l,\n children: /* @__PURE__ */ a(\n \"input\",\n {\n type: c,\n value: t,\n onChange: (g) => r(g.target.value),\n placeholder: n,\n className: `\n block w-full px-3 py-2 border rounded-md shadow-sm\n focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500\n dark:bg-gray-800 dark:border-gray-600 dark:text-white\n transition-colors duration-200\n ${s ? \"border-red-300 focus:ring-red-500 focus:border-red-500\" : \"border-gray-300 dark:border-gray-600\"}\n `\n }\n )\n }\n), pc = ({\n label: e,\n value: t,\n onChange: r,\n placeholder: n,\n required: o = !1,\n error: s,\n helpText: i,\n rows: c = 4,\n layout: d = \"vertical\",\n className: l = \"\"\n}) => /* @__PURE__ */ a(\n jt,\n {\n label: e,\n required: o,\n error: s,\n helpText: i,\n layout: d,\n className: l,\n children: /* @__PURE__ */ a(\n \"textarea\",\n {\n value: t,\n onChange: (g) => r(g.target.value),\n placeholder: n,\n rows: c,\n className: `\n block w-full px-3 py-2 border rounded-md shadow-sm\n focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500\n dark:bg-gray-800 dark:border-gray-600 dark:text-white\n transition-colors duration-200 resize-vertical\n ${s ? \"border-red-300 focus:ring-red-500 focus:border-red-500\" : \"border-gray-300 dark:border-gray-600\"}\n `\n }\n )\n }\n), yc = ({\n label: e,\n value: t,\n onChange: r,\n options: n,\n required: o = !1,\n error: s,\n helpText: i,\n placeholder: c = \"Select an option\",\n layout: d = \"vertical\",\n className: l = \"\"\n}) => /* @__PURE__ */ a(\n jt,\n {\n label: e,\n required: o,\n error: s,\n helpText: i,\n layout: d,\n className: l,\n children: /* @__PURE__ */ p(\n \"select\",\n {\n value: t,\n onChange: (g) => r(g.target.value),\n className: `\n block w-full px-3 py-2 border rounded-md shadow-sm\n focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500\n dark:bg-gray-800 dark:border-gray-600 dark:text-white\n transition-colors duration-200\n ${s ? \"border-red-300 focus:ring-red-500 focus:border-red-500\" : \"border-gray-300 dark:border-gray-600\"}\n `,\n children: [\n c && /* @__PURE__ */ a(\"option\", { value: \"\", disabled: !0, children: c }),\n n.map((g) => /* @__PURE__ */ a(\n \"option\",\n {\n value: g.value,\n disabled: g.disabled,\n children: g.label\n },\n g.value\n ))\n ]\n }\n )\n }\n), xc = ({\n successMessage: e,\n errorMessage: t,\n successTitle: r = \"Success\",\n errorTitle: n = \"Error\",\n autoDismissDelay: o = 0,\n onSuccessDismiss: s,\n className: i = \"\"\n}) => (R(() => {\n if (e && o > 0 && s) {\n const c = setTimeout(() => {\n s();\n }, o);\n return () => clearTimeout(c);\n }\n}, [e, o, s]), !e && !t ? null : /* @__PURE__ */ p(\"div\", { className: `space-y-3 ${i}`, children: [\n t && /* @__PURE__ */ a(Yt, { variant: \"error\", title: n, description: t }),\n e && /* @__PURE__ */ a(\n Yt,\n {\n variant: \"success\",\n title: r,\n description: e\n }\n )\n] })), vc = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"PhoneDirectory\",\n children: t || \"PhoneDirectory Component\"\n }\n), ao = Q(\"min-h-[44px] touch-manipulation\", {\n variants: {\n variant: {\n // Clean variant definitions - let the variant system handle the classes\n default: \"\",\n primary: \"\",\n secondary: \"\",\n outline: \"\",\n ghost: \"\",\n destructive: \"\",\n \"destructive-outline\": \"\",\n success: \"\",\n link: \"\",\n gradient: \"\",\n \"gradient-secondary\": \"\",\n \"gradient-success\": \"\",\n // Web3 specific variants\n wallet: \"\",\n connect: \"\",\n disconnect: \"\"\n },\n size: {\n default: \"\",\n // Size handled by design system tokens\n sm: \"h-8\",\n // Override height for small\n lg: \"h-12\",\n // Override height for large\n icon: \"h-10 w-10 p-0\"\n },\n animation: {\n none: \"transition-colors duration-200\",\n hover: \"transition-all duration-200 hover:scale-105\",\n lift: \"transition-all duration-200 hover:scale-105\",\n scale: \"transition-transform duration-200 hover:scale-95\",\n glow: \"transition-all duration-200 hover:shadow-lg\",\n shimmer: \"transition-all duration-200\",\n tap: \"transition-transform duration-100 active:scale-95\",\n connect: \"transition-all duration-200 hover:scale-105\",\n transaction: \"transition-all duration-200 animate-pulse\",\n disconnect: \"transition-all duration-200 hover:opacity-80\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n animation: \"hover\"\n }\n}), me = Z.forwardRef(\n ({\n className: e,\n variant: t,\n size: r,\n animation: n,\n asChild: o = !1,\n onTrack: s,\n trackingLabel: i,\n componentName: c,\n onClick: d,\n children: l,\n ...g\n }, u) => {\n const b = o ? qa : \"button\", f = t || \"default\", h = r && r !== \"default\" && r !== \"icon\" ? r : void 0, y = (k) => k ? {\n sm: \"small\",\n lg: \"large\",\n default: \"default\"\n }[k] || k : \"default\", C = (() => {\n if (f.startsWith(\"gradient\")) {\n const k = f.replace(\"gradient-\", \"\").replace(\"gradient\", \"primary\");\n return F.button.gradient[k]?.() || F.button.primary.default();\n } else {\n if ([\"wallet\", \"connect\", \"disconnect\"].includes(f))\n return F.button.web3[f]?.() || F.button.primary.default();\n {\n const k = y(h);\n return F.button[f]?.[k]?.() || F.button.primary.default();\n }\n }\n })(), v = (k) => {\n s && s({\n action: \"click\",\n trackingLabel: i,\n componentName: c\n }), d?.(k);\n };\n return /* @__PURE__ */ a(\n b,\n {\n className: m(\n ao({ size: r, animation: n }),\n // Base styles and layout\n C,\n // Design system variant styles\n e\n // Custom overrides\n ),\n ref: u,\n onClick: v,\n ...g,\n children: l\n }\n );\n }\n);\nme.displayName = \"Button\";\nconst wc = ({\n children: e,\n isLoading: t = !1,\n loadingText: r = \"Loading...\",\n showSpinner: n = !0,\n disabled: o,\n ...s\n}) => /* @__PURE__ */ a(\n me,\n {\n ...s,\n disabled: o || t,\n className: s.className,\n children: t ? /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-2\", children: [\n n && /* @__PURE__ */ a(He, { size: \"small\" }),\n /* @__PURE__ */ a(\"span\", { children: r })\n ] }) : e\n }\n), no = ({\n value: e,\n onChange: t,\n minDate: r,\n maxDate: n,\n disabledDates: o = [],\n showOutsideDays: s = !0,\n className: i\n}) => {\n const [c, d] = M(e || /* @__PURE__ */ new Date()), l = (w) => {\n const S = w.getFullYear(), E = w.getMonth();\n return new Date(S, E + 1, 0).getDate();\n }, g = (w) => {\n const S = w.getFullYear(), E = w.getMonth();\n return new Date(S, E, 1).getDay();\n }, u = (w, S) => w.getFullYear() === S.getFullYear() && w.getMonth() === S.getMonth() && w.getDate() === S.getDate(), b = (w) => r && w < r || n && w > n ? !0 : o.some((S) => u(w, S)), f = () => {\n d(\n new Date(c.getFullYear(), c.getMonth() - 1)\n );\n }, h = () => {\n d(\n new Date(c.getFullYear(), c.getMonth() + 1)\n );\n }, x = (() => {\n const w = c.getFullYear(), S = c.getMonth(), E = l(c), N = g(c), T = [];\n if (s) {\n const L = l(new Date(w, S - 1));\n for (let P = N - 1; P >= 0; P--)\n T.push(new Date(w, S - 1, L - P));\n } else\n for (let L = 0; L < N; L++)\n T.push(null);\n for (let L = 1; L <= E; L++)\n T.push(new Date(w, S, L));\n if (s) {\n const L = 42 - T.length;\n for (let P = 1; P <= L; P++)\n T.push(new Date(w, S + 1, P));\n }\n return T;\n })(), C = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], v = (w) => {\n !w || b(w) || t(w);\n }, k = c.toLocaleDateString(\"en-US\", {\n month: \"long\",\n year: \"numeric\"\n });\n return /* @__PURE__ */ p(\"div\", { className: m(\"bg-white dark:bg-gray-900 rounded-lg p-4\", i), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between mb-4\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: f,\n className: \"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors\",\n \"aria-label\": \"Previous month\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M15 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"h2\", { className: \"text-base font-semibold text-gray-900 dark:text-white\", children: k }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: h,\n className: \"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors\",\n \"aria-label\": \"Next month\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-7 gap-1 mb-2\", children: C.map((w) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2\",\n children: w\n },\n w\n )) }),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-7 gap-1\", children: x.map((w, S) => {\n if (!w)\n return /* @__PURE__ */ a(\"div\", { className: \"aspect-square\" }, S);\n const E = w.getMonth() === c.getMonth(), N = e && u(w, e), T = u(w, /* @__PURE__ */ new Date()), L = b(w);\n return /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => v(w),\n disabled: L,\n className: m(\n \"aspect-square flex items-center justify-center rounded-md text-sm transition-colors\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent\",\n E ? \"text-gray-900 dark:text-white\" : \"text-gray-400 dark:text-gray-600\",\n N && \"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600\",\n T && !N && \"border-2 border-blue-600 dark:border-blue-400\"\n ),\n children: w.getDate()\n },\n S\n );\n }) })\n ] });\n}, kc = ({\n value: e,\n onChange: t,\n use12Hour: r = !1,\n minuteStep: n = 1,\n minDate: o,\n maxDate: s,\n disabled: i = !1,\n className: c\n}) => {\n const [d, l] = M(!1), [g, u] = M(e), b = (x) => {\n const C = x.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\"\n }), v = x.getHours(), k = x.getMinutes();\n if (r) {\n const w = v === 0 ? 12 : v > 12 ? v - 12 : v, S = v >= 12 ? \"PM\" : \"AM\";\n return `${C}, ${w}:${k.toString().padStart(2, \"0\")} ${S}`;\n }\n return `${C}, ${v.toString().padStart(2, \"0\")}:${k.toString().padStart(2, \"0\")}`;\n }, f = (x) => {\n const C = new Date(x);\n C.setHours(g.getHours()), C.setMinutes(g.getMinutes()), u(C), t(C);\n }, h = (x) => {\n const [C, v] = x.split(\":\").map(Number), k = new Date(g);\n k.setHours(C), k.setMinutes(v), u(k), t(k);\n }, y = (x) => {\n const C = x.getHours(), v = x.getMinutes();\n return `${C.toString().padStart(2, \"0\")}:${v.toString().padStart(2, \"0\")}`;\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative w-full\", c), children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => !i && l(!d),\n disabled: i,\n className: m(\n \"w-full px-3 py-2 text-sm text-left flex items-center justify-between\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n d && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-gray-900 dark:text-white\", children: b(e) }),\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-gray-600 dark:text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"\n }\n )\n }\n )\n ]\n }\n ),\n d && /* @__PURE__ */ a(\"div\", { className: \"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3\", children: /* @__PURE__ */ p(\"div\", { className: \"space-y-3\", children: [\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2\", children: \"Select Date\" }),\n /* @__PURE__ */ a(\n no,\n {\n value: g,\n onChange: f,\n minDate: o,\n maxDate: s\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"h-px bg-gray-200 dark:bg-gray-700\" }),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2\", children: \"Select Time\" }),\n /* @__PURE__ */ a(\n Zn,\n {\n value: y(g),\n onChange: h,\n use12Hour: r,\n minuteStep: n\n }\n )\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2 pt-2\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => l(!1),\n className: m(\n \"flex-1 px-3 py-1.5 text-sm\",\n \"bg-gray-100 dark:bg-gray-800\",\n \"text-gray-700 dark:text-gray-300\",\n \"rounded-md\",\n \"hover:bg-gray-200 dark:hover:bg-gray-700\",\n \"transition-colors\"\n ),\n children: \"Cancel\"\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n t(g), l(!1);\n },\n className: m(\n \"flex-1 px-3 py-1.5 text-sm\",\n \"bg-blue-600 dark:bg-blue-500\",\n \"text-white\",\n \"rounded-md\",\n \"hover:bg-blue-700 dark:hover:bg-blue-600\",\n \"transition-colors\"\n ),\n children: \"OK\"\n }\n )\n ] })\n ] }) }),\n d && /* @__PURE__ */ a(\"div\", { className: \"fixed inset-0 z-40\", onClick: () => l(!1) })\n ] });\n}, Nc = ({\n value: e,\n onChange: t,\n minDate: r,\n maxDate: n,\n disabledDates: o = [],\n months: s = 2,\n className: i\n}) => {\n const [c, d] = M(/* @__PURE__ */ new Date()), [l, g] = M(null), u = (N, T) => N.getFullYear() === T.getFullYear() && N.getMonth() === T.getMonth() && N.getDate() === T.getDate(), b = (N) => r && N < r || n && N > n ? !0 : o.some((T) => u(N, T)), f = (N) => {\n if (!e.start || !e.end && !l) return !1;\n const T = e.end || l;\n return T ? N > e.start && N < T : !1;\n }, h = (N) => e.start ? u(N, e.start) : !1, y = (N) => e.end ? u(N, e.end) : !1, x = (N) => {\n b(N) || (!e.start || e.start && e.end ? t({ start: N, end: null }) : N < e.start ? t({ start: N, end: e.start }) : t({ start: e.start, end: N }));\n }, C = (N) => {\n const T = N.getFullYear(), L = N.getMonth();\n return new Date(T, L + 1, 0).getDate();\n }, v = (N) => {\n const T = N.getFullYear(), L = N.getMonth();\n return new Date(T, L, 1).getDay();\n }, k = (N) => {\n const T = new Date(\n c.getFullYear(),\n c.getMonth() + N\n ), L = T.getFullYear(), P = T.getMonth(), I = C(T), D = v(T), W = [];\n for (let z = 0; z < D; z++)\n W.push(null);\n for (let z = 1; z <= I; z++)\n W.push(new Date(L, P, z));\n return {\n days: W,\n monthName: T.toLocaleDateString(\"en-US\", {\n month: \"long\",\n year: \"numeric\"\n })\n };\n }, w = () => {\n d(\n new Date(c.getFullYear(), c.getMonth() - 1)\n );\n }, S = () => {\n d(\n new Date(c.getFullYear(), c.getMonth() + 1)\n );\n }, E = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n return /* @__PURE__ */ p(\"div\", { className: m(\"bg-white dark:bg-gray-900 rounded-lg p-4\", i), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between mb-4\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: w,\n className: \"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors\",\n \"aria-label\": \"Previous month\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M15 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: S,\n className: \"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors\",\n \"aria-label\": \"Next month\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n )\n ] }),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"grid gap-4\",\n style: { gridTemplateColumns: `repeat(${s}, 1fr)` },\n children: Array.from({ length: s }, (N, T) => {\n const { days: L, monthName: P } = k(T);\n return /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"h3\", { className: \"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center\", children: P }),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-7 gap-1 mb-2\", children: E.map((I) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2\",\n children: I\n },\n I\n )) }),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-7 gap-1\", children: L.map((I, D) => {\n if (!I)\n return /* @__PURE__ */ a(\"div\", { className: \"aspect-square\" }, D);\n const W = b(I), z = h(I), $ = y(I), q = f(I), ee = u(I, /* @__PURE__ */ new Date());\n return /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => x(I),\n onMouseEnter: () => g(I),\n onMouseLeave: () => g(null),\n disabled: W,\n className: m(\n \"aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative\",\n \"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent\",\n q && \"bg-blue-100 dark:bg-blue-900/30\",\n (z || $) && \"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600\",\n !z && !$ && !q && \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n ee && !z && !$ && \"border-2 border-blue-600 dark:border-blue-400\"\n ),\n children: I.getDate()\n },\n D\n );\n }) })\n ] }, T);\n })\n }\n ),\n (e.start || e.end) && /* @__PURE__ */ a(\"div\", { className: \"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between text-sm\", children: [\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-gray-600 dark:text-gray-400\", children: \"Start: \" }),\n /* @__PURE__ */ a(\"span\", { className: \"font-medium text-gray-900 dark:text-white\", children: e.start?.toLocaleDateString() || \"Not selected\" })\n ] }),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-gray-600 dark:text-gray-400\", children: \"End: \" }),\n /* @__PURE__ */ a(\"span\", { className: \"font-medium text-gray-900 dark:text-white\", children: e.end?.toLocaleDateString() || \"Not selected\" })\n ] })\n ] }) })\n ] });\n}, Cc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UtimeUslotUpicker\",\n children: t || \"UtimeUslotUpicker Component\"\n }\n), Sc = ({\n value: e,\n onChange: t,\n presets: r = [\n \"#000000\",\n \"#FFFFFF\",\n \"#FF6B6B\",\n \"#4ECDC4\",\n \"#45B7D1\",\n \"#FFA07A\",\n \"#F7DC6F\",\n \"#BB8FCE\",\n \"#85C1E2\",\n \"#F8B500\",\n \"#52B788\",\n \"#E63946\",\n \"#1D3557\",\n \"#457B9D\",\n \"#A8DADC\",\n \"#F4A261\",\n \"#264653\",\n \"#2A9D8F\"\n ],\n showInput: n = !0,\n showOpacity: o = !1,\n className: s\n}) => {\n const [i, c] = M(e), [d, l] = M(100), g = (y) => {\n t(y), c(y);\n }, u = (y) => {\n const x = y.target.value;\n c(x), /^#[0-9A-F]{6}$/i.test(x) && t(x);\n }, b = (y) => {\n l(Number(y.target.value));\n }, h = o ? ((y, x) => {\n const C = parseInt(y.slice(1, 3), 16), v = parseInt(y.slice(3, 5), 16), k = parseInt(y.slice(5, 7), 16);\n return `rgba(${C}, ${v}, ${k}, ${x / 100})`;\n })(e, d) : e;\n return /* @__PURE__ */ p(\"div\", { className: m(\"bg-white dark:bg-gray-900 rounded-lg p-4\", s), children: [\n /* @__PURE__ */ a(\"div\", { className: \"mb-4\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm\",\n style: { backgroundColor: h }\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-900 dark:text-white\", children: \"Selected Color\" }),\n /* @__PURE__ */ p(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono\", children: [\n e,\n o && ` (${d}%)`\n ] })\n ] })\n ] }) }),\n /* @__PURE__ */ p(\"div\", { className: \"mb-4\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\", children: \"Preset Colors\" }),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-6 gap-2\", children: r.map((y) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => g(y),\n className: m(\n \"w-full aspect-square rounded-md border-2 transition-all hover:scale-110\",\n y === e ? \"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800\" : \"border-gray-200 dark:border-gray-700\"\n ),\n style: { backgroundColor: y },\n \"aria-label\": `Select color ${y}`\n },\n y\n )) })\n ] }),\n n && /* @__PURE__ */ p(\"div\", { className: \"mb-4\", children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\", children: \"Custom Color (Hex)\" }),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2\", children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: i,\n onChange: u,\n placeholder: \"#000000\",\n className: \"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\"\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"color\",\n value: e,\n onChange: (y) => g(y.target.value),\n className: \"w-12 h-10 rounded-md cursor-pointer\"\n }\n )\n ] })\n ] }),\n o && /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ p(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\", children: [\n \"Opacity: \",\n d,\n \"%\"\n ] }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: \"0\",\n max: \"100\",\n value: d,\n onChange: b,\n className: \"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer\"\n }\n )\n ] })\n ] });\n}, Ec = ({\n value: e,\n onChange: t,\n presets: r,\n className: n\n}) => {\n const s = r || [\n \"#000000\",\n \"#ffffff\",\n \"#ff0000\",\n \"#00ff00\",\n \"#0000ff\",\n \"#ffff00\",\n \"#ff00ff\",\n \"#00ffff\"\n ];\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-3\", n), children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"color\",\n value: e,\n onChange: (i) => t(i.target.value),\n className: \"w-full h-12 rounded cursor-pointer\"\n }\n ),\n /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-8 gap-2\", children: s.map((i) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => t(i),\n className: m(\n \"w-8 h-8 rounded border-2\",\n e === i ? \"border-blue-500\" : \"border-transparent\"\n ),\n style: { backgroundColor: i }\n },\n i\n )) })\n ] });\n}, Ac = ({\n colors: e,\n selectedColor: t,\n onColorSelect: r,\n size: n = \"md\",\n showNames: o = !1,\n showCopy: s = !1,\n className: i\n}) => {\n const [c, d] = M(null), l = {\n sm: \"w-8 h-8\",\n md: \"w-12 h-12\",\n lg: \"w-16 h-16\"\n }, g = () => e.map(\n (f) => typeof f == \"string\" ? { hex: f } : f\n ), u = async (f, h) => {\n h.stopPropagation(), await navigator.clipboard.writeText(f), d(f), setTimeout(() => d(null), 2e3);\n }, b = g();\n return /* @__PURE__ */ a(\"div\", { className: m(\"flex flex-wrap gap-3\", i), children: b.map((f, h) => {\n const y = t === f.hex, x = c === f.hex;\n return /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r?.(f.hex),\n className: m(\n \"rounded-lg transition-all relative group\",\n l[n],\n y && \"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900\",\n !y && \"hover:scale-110\"\n ),\n style: { backgroundColor: f.hex },\n \"aria-label\": f.name || f.hex,\n children: s && /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg\",\n onClick: (C) => u(f.hex, C),\n children: x ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n ) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"\n }\n )\n }\n )\n }\n )\n }\n ),\n o && /* @__PURE__ */ p(\"div\", { className: \"text-center\", children: [\n f.name && /* @__PURE__ */ a(\"p\", { className: \"text-xs font-medium text-gray-900 dark:text-white\", children: f.name }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400 font-mono\", children: f.hex })\n ] })\n ] }, h);\n }) });\n}, Tc = ({\n onSave: e,\n width: t = 400,\n height: r = 200,\n className: n\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"border border-gray-300 dark:border-gray-700 rounded-lg\",\n n\n ),\n children: [\n /* @__PURE__ */ a(\n \"canvas\",\n {\n width: t,\n height: r,\n className: \"bg-white dark:bg-gray-900\"\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2 p-2\", children: [\n /* @__PURE__ */ a(\"button\", { className: \"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600\", children: \"Clear\" }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => e?.(\"\"),\n className: \"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600\",\n children: \"Save\"\n }\n )\n ] })\n ]\n }\n), Lc = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"SignatureRequest\",\n children: t || \"SignatureRequest Component\"\n }\n), Mc = ({\n value: e,\n onChange: t,\n placeholder: r,\n className: n\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"border border-gray-300 dark:border-gray-700 rounded-lg\",\n n\n ),\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700\", children: [\"B\", \"I\", \"U\", \"H1\", \"H2\", \"List\", \"Link\"].map((o) => /* @__PURE__ */ a(\n \"button\",\n {\n className: \"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold\",\n children: o\n },\n o\n )) }),\n /* @__PURE__ */ a(\n \"textarea\",\n {\n value: e,\n onChange: (o) => t(o.target.value),\n placeholder: r,\n className: \"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none\",\n rows: 10\n }\n )\n ]\n }\n), Ic = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UmarkdownUrenderer\",\n children: t || \"UmarkdownUrenderer Component\"\n }\n), Pc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UcodeUhighlighter\",\n children: t || \"UcodeUhighlighter Component\"\n }\n), Rc = ({\n cardNumber: e,\n onCardNumberChange: t,\n expiryDate: r = \"\",\n onExpiryDateChange: n,\n cvv: o = \"\",\n onCVVChange: s,\n cardholderName: i = \"\",\n onCardholderNameChange: c,\n showAllFields: d = !1,\n disabled: l = !1,\n className: g\n}) => {\n const u = (w) => {\n const S = w.replace(/\\s/g, \"\");\n return /^4/.test(S) ? \"visa\" : /^5[1-5]/.test(S) ? \"mastercard\" : /^3[47]/.test(S) ? \"amex\" : /^6(?:011|5)/.test(S) ? \"discover\" : \"unknown\";\n }, b = u(e), f = (w) => {\n const S = w.replace(/\\D/g, \"\");\n if (u(S) === \"amex\") {\n const I = S.slice(0, 15);\n return [\n I.slice(0, 4),\n I.slice(4, 10),\n I.slice(10, 15)\n ].filter(Boolean).join(\" \");\n }\n return (S.slice(0, 16).match(/.{1,4}/g) || []).join(\" \");\n }, h = (w) => {\n const N = w.replace(/\\D/g, \"\").slice(0, 4);\n return N.length >= 2 ? `${N.slice(0, 2)}/${N.slice(2)}` : N;\n }, y = (w) => {\n const S = w.replace(/\\D/g, \"\"), E = b === \"amex\" ? 4 : 3;\n return S.slice(0, E);\n }, x = (w) => {\n const S = f(w.target.value);\n t(S);\n }, C = (w) => {\n if (!n) return;\n const S = h(w.target.value);\n n(S);\n }, v = (w) => {\n if (!s) return;\n const S = y(w.target.value);\n s(S);\n }, k = () => {\n switch (b) {\n case \"visa\":\n return /* @__PURE__ */ p(\"svg\", { className: \"w-8 h-5\", viewBox: \"0 0 48 32\", fill: \"none\", children: [\n /* @__PURE__ */ a(\"rect\", { width: \"48\", height: \"32\", rx: \"4\", fill: \"#1434CB\" }),\n /* @__PURE__ */ a(\n \"path\",\n {\n d: \"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z\",\n fill: \"white\"\n }\n )\n ] });\n case \"mastercard\":\n return /* @__PURE__ */ p(\"svg\", { className: \"w-8 h-5\", viewBox: \"0 0 48 32\", fill: \"none\", children: [\n /* @__PURE__ */ a(\"rect\", { width: \"48\", height: \"32\", rx: \"4\", fill: \"#EB001B\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"18\", cy: \"16\", r: \"8\", fill: \"#F79E1B\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"30\", cy: \"16\", r: \"8\", fill: \"#FF5F00\" })\n ] });\n case \"amex\":\n return /* @__PURE__ */ p(\"svg\", { className: \"w-8 h-5\", viewBox: \"0 0 48 32\", fill: \"none\", children: [\n /* @__PURE__ */ a(\"rect\", { width: \"48\", height: \"32\", rx: \"4\", fill: \"#006FCF\" }),\n /* @__PURE__ */ a(\"path\", { d: \"M10 12h8l2 8-2 8h-8l-2-8 2-8z\", fill: \"white\" })\n ] });\n case \"discover\":\n return /* @__PURE__ */ p(\"svg\", { className: \"w-8 h-5\", viewBox: \"0 0 48 32\", fill: \"none\", children: [\n /* @__PURE__ */ a(\"rect\", { width: \"48\", height: \"32\", rx: \"4\", fill: \"#FF6000\" }),\n /* @__PURE__ */ a(\"circle\", { cx: \"38\", cy: \"16\", r: \"6\", fill: \"#FFA500\" })\n ] });\n default:\n return /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\"\n }\n )\n }\n );\n }\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full space-y-3\", g), children: [\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\", children: \"Card number\" }),\n /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: e,\n onChange: x,\n placeholder: \"1234 5678 9012 3456\",\n disabled: l,\n className: m(\n \"w-full px-3 py-2 pr-12 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n ),\n /* @__PURE__ */ a(\"div\", { className: \"absolute right-3 top-1/2 -translate-y-1/2\", children: k() })\n ] })\n ] }),\n d && /* @__PURE__ */ p(\"div\", { className: \"grid grid-cols-2 gap-3\", children: [\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\", children: \"Expiry date\" }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: r,\n onChange: C,\n placeholder: \"MM/YY\",\n disabled: l,\n className: m(\n \"w-full px-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n )\n ] }),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\", children: \"CVV\" }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: o,\n onChange: v,\n placeholder: b === \"amex\" ? \"1234\" : \"123\",\n disabled: l,\n className: m(\n \"w-full px-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n )\n ] })\n ] }),\n d && /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"label\", { className: \"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\", children: \"Cardholder name\" }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: i,\n onChange: (w) => c?.(w.target.value),\n placeholder: \"John Doe\",\n disabled: l,\n className: m(\n \"w-full px-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n )\n ] })\n ] });\n}, Cr = [\n { code: \"USD\", symbol: \"$\", name: \"US Dollar\", decimals: 2 },\n { code: \"EUR\", symbol: \"€\", name: \"Euro\", decimals: 2 },\n { code: \"GBP\", symbol: \"£\", name: \"British Pound\", decimals: 2 },\n { code: \"JPY\", symbol: \"¥\", name: \"Japanese Yen\", decimals: 0 },\n { code: \"CNY\", symbol: \"¥\", name: \"Chinese Yuan\", decimals: 2 },\n { code: \"AUD\", symbol: \"A$\", name: \"Australian Dollar\", decimals: 2 },\n { code: \"CAD\", symbol: \"C$\", name: \"Canadian Dollar\", decimals: 2 },\n { code: \"CHF\", symbol: \"Fr\", name: \"Swiss Franc\", decimals: 2 },\n { code: \"INR\", symbol: \"₹\", name: \"Indian Rupee\", decimals: 2 },\n { code: \"BRL\", symbol: \"R$\", name: \"Brazilian Real\", decimals: 2 }\n], Oc = ({\n value: e,\n onChange: t,\n currency: r = \"USD\",\n onCurrencyChange: n,\n currencies: o = Cr,\n showCurrencySelector: s = !1,\n placeholder: i = \"0.00\",\n min: c,\n max: d,\n disabled: l = !1,\n className: g\n}) => {\n const [u, b] = M(\"\"), [f, h] = M(!1), [y, x] = M(!1), v = typeof r == \"string\" ? o.find((T) => T.code === r) || Cr[0] : r, k = _(\n (T) => {\n const L = v.decimals ?? 2;\n return T.toLocaleString(\"en-US\", {\n minimumFractionDigits: L,\n maximumFractionDigits: L\n });\n },\n [v]\n );\n R(() => {\n f || b(k(e || 0));\n }, [e, k, f]);\n const w = (T) => {\n const P = T.target.value.replace(/[^\\d.]/g, \"\"), I = P.split(\".\"), D = I.length > 2 ? `${I[0]}.${I.slice(1).join(\"\")}` : P;\n b(D);\n let z = parseFloat(D) || 0;\n c !== void 0 && z < c && (z = c), d !== void 0 && z > d && (z = d), t(z);\n }, S = () => {\n h(!0), b(e ? e.toString() : \"\");\n }, E = () => {\n h(!1), b(k(e || 0));\n }, N = (T) => {\n n?.(T), x(!1);\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative w-full\", g), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2\", children: [\n s && /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => !l && x(!y),\n disabled: l,\n className: m(\n \"flex items-center gap-2 px-3 py-2 min-w-[100px]\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n y && \"ring-2 ring-blue-500 dark:ring-blue-400\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-sm font-medium text-gray-900 dark:text-white\", children: v.code }),\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform\",\n y && \"rotate-180\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n ]\n }\n ),\n y && /* @__PURE__ */ a(\"div\", { className: \"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50\", children: /* @__PURE__ */ a(\"div\", { className: \"max-h-60 overflow-y-auto py-1\", children: o.map((T) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => N(T.code),\n className: m(\n \"w-full px-3 py-2 text-left flex items-center gap-3\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors\",\n T.code === v.code && \"bg-blue-50 dark:bg-blue-900/30\"\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-lg font-semibold w-8\", children: T.symbol }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-900 dark:text-white\", children: T.code }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: T.name })\n ] })\n ]\n },\n T.code\n )) }) })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"relative flex-1\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium\", children: v.symbol }),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: u,\n onChange: w,\n onFocus: S,\n onBlur: E,\n placeholder: i,\n disabled: l,\n className: m(\n \"w-full pl-8 pr-3 py-2 text-sm\",\n \"bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )\n }\n )\n ] })\n ] }),\n (c !== void 0 || d !== void 0) && /* @__PURE__ */ a(\"p\", { className: \"mt-1.5 text-xs text-gray-600 dark:text-gray-400\", children: c !== void 0 && d !== void 0 ? `Range: ${v.symbol}${k(c)} - ${v.symbol}${k(d)}` : c !== void 0 ? `Minimum: ${v.symbol}${k(c)}` : `Maximum: ${v.symbol}${k(d)}` }),\n y && /* @__PURE__ */ a(\"div\", { className: \"fixed inset-0 z-40\", onClick: () => x(!1) })\n ] });\n}, Dc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UcurrencyUconverter\",\n children: t || \"UcurrencyUconverter Component\"\n }\n), Uc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UcurrencyUrates\",\n children: t || \"UcurrencyUrates Component\"\n }\n), jc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UformUbuilder\",\n children: t || \"UformUbuilder Component\"\n }\n), _c = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UformUvalidator\",\n children: t || \"UformUvalidator Component\"\n }\n), zc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UformUtemplate\",\n children: t || \"UformUtemplate Component\"\n }\n), Bc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UschemaUvalidator\",\n children: t || \"UschemaUvalidator Component\"\n }\n), Fc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UfieldUmapper\",\n children: t || \"UfieldUmapper Component\"\n }\n), Wc = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UsurveyUbuilder\",\n children: t || \"UsurveyUbuilder Component\"\n }\n), $c = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"QuizBuilder\",\n children: t || \"QuizBuilder Component\"\n }\n), oo = (e, t, r) => {\n if (r)\n return `${r}/address/${e}`;\n if (!t)\n return null;\n if (t < 0)\n return `https://explorer.solana.com/address/${e}${t === -101 ? \"\" : t === -102 ? \"?cluster=devnet\" : \"?cluster=testnet\"}`;\n const o = {\n 1: \"https://etherscan.io\",\n // Ethereum Mainnet\n 11155111: \"https://sepolia.etherscan.io\",\n // Sepolia\n 5: \"https://goerli.etherscan.io\",\n // Goerli\n 137: \"https://polygonscan.com\",\n // Polygon\n 80002: \"https://amoy.polygonscan.com\",\n // Polygon Amoy\n 42161: \"https://arbiscan.io\",\n // Arbitrum One\n 421614: \"https://sepolia.arbiscan.io\",\n // Arbitrum Sepolia\n 10: \"https://optimistic.etherscan.io\",\n // Optimism\n 11155420: \"https://sepolia-optimism.etherscan.io\",\n // Optimism Sepolia\n 8453: \"https://basescan.org\",\n // Base\n 84532: \"https://sepolia.basescan.org\"\n // Base Sepolia\n }[t];\n return o ? `${o}/address/${e}` : null;\n}, so = (e, t) => t === \"full\" ? e : t === \"medium\" ? `${e.substring(0, 10)}...${e.substring(e.length - 8)}` : `${e.substring(0, 6)}...${e.substring(e.length - 4)}`, Vc = ({\n address: e,\n chainId: t,\n explorerUrl: r,\n label: n,\n format: o = \"short\",\n showCopy: s = !0,\n showExplorer: i = !0,\n className: c = \"\",\n textClassName: d = \"\"\n}) => {\n const [l, g] = M(!1), u = so(e, o), b = oo(e, t, r), f = async () => {\n try {\n await navigator.clipboard.writeText(e), g(!0), setTimeout(() => g(!1), 2e3);\n } catch {\n }\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center gap-2\", c), children: [\n n && /* @__PURE__ */ p(\"span\", { className: O.label.default(), children: [\n n,\n \":\"\n ] }),\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"font-mono text-sm\",\n o === \"full\" && \"break-all\",\n d\n ),\n children: u\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-1\", children: [\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: f,\n className: m(\n \"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors\",\n \"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200\"\n ),\n title: l ? \"Copied!\" : \"Copy address\",\n \"aria-label\": \"Copy address\",\n children: l ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n ) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"\n }\n )\n }\n )\n }\n ),\n i && b && /* @__PURE__ */ a(\n \"a\",\n {\n href: b,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n className: m(\n \"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors\",\n \"text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400\"\n ),\n title: \"View on block explorer\",\n \"aria-label\": \"View on block explorer\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\"\n }\n )\n }\n )\n }\n )\n ] })\n ] });\n}, Sr = () => typeof document < \"u\" && typeof document.createElement == \"function\" && typeof document.getElementById == \"function\", io = (e) => {\n if (typeof document < \"u\" && document.getElementById)\n try {\n return document.getElementById(e);\n } catch {\n }\n return null;\n}, lo = (e) => {\n if (typeof document < \"u\" && document.createElement)\n try {\n return document.createElement(e);\n } catch {\n }\n return null;\n}, co = (e) => {\n const t = typeof document < \"u\" ? document.head : null;\n if (t && e)\n try {\n return t.appendChild(e), !0;\n } catch {\n }\n return !1;\n}, _t = ({\n animation: e = \"fade-in-up\",\n delay: t = 0,\n duration: r = 600,\n once: n = !0,\n children: o,\n className: s = \"\",\n threshold: i = 0.1\n}) => {\n const [c, d] = M(!1), [l, g] = M(!1), u = j(null);\n R(() => {\n if (!Sr() || typeof IntersectionObserver > \"u\") {\n d(!0), n && g(!0);\n return;\n }\n const f = new IntersectionObserver(\n ([y]) => {\n y.isIntersecting && (!l || !n) ? (d(!0), n && g(!0)) : n || d(!1);\n },\n { threshold: i }\n ), h = u.current;\n return h && f.observe(h), () => {\n h && f.unobserve(h);\n };\n }, [i, n, l]);\n const b = () => {\n if (e === \"none\") return \"\";\n const f = `transition-all duration-${r} ease-out`, h = t > 0 ? `delay-${t}` : \"\", y = {\n \"fade-in-up\": c ? `opacity-100 translate-y-0 ${f} ${h}` : `opacity-0 translate-y-8 ${f} ${h}`,\n \"fade-in-scale\": c ? `opacity-100 scale-100 ${f} ${h}` : `opacity-0 scale-95 ${f} ${h}`,\n \"fade-in-left\": c ? `opacity-100 translate-x-0 ${f} ${h}` : `opacity-0 -translate-x-8 ${f} ${h}`,\n \"fade-in-right\": c ? `opacity-100 translate-x-0 ${f} ${h}` : `opacity-0 translate-x-8 ${f} ${h}`,\n \"slide-in-bottom\": c ? `translate-y-0 ${f} ${h}` : `translate-y-full ${f} ${h}`,\n \"zoom-in\": c ? `opacity-100 scale-100 ${f} ${h}` : `opacity-0 scale-50 ${f} ${h}`,\n float: \"animate-float\",\n // CSS keyframe animation\n \"bounce-slow\": \"animate-bounce-slow\"\n // CSS keyframe animation\n };\n return y[e] || y[\"fade-in-up\"];\n };\n return R(() => {\n if (Sr() && (e === \"float\" || e === \"bounce-slow\")) {\n const f = \"animated-section-keyframes\";\n if (!io(f)) {\n const h = lo(\"style\");\n h && (h.id = f, h.textContent = `\n @keyframes float {\n 0%, 100% { transform: translateY(0px); }\n 50% { transform: translateY(-20px); }\n }\n @keyframes bounce-slow {\n 0%, 100% { transform: translateY(0); }\n 50% { transform: translateY(-10px); }\n }\n .animate-float {\n animation: float 6s ease-in-out infinite;\n }\n .animate-bounce-slow {\n animation: bounce-slow 4s ease-in-out infinite;\n }\n `, co(h));\n }\n }\n }, [e]), /* @__PURE__ */ a(\"div\", { ref: u, className: `${b()} ${s}`, children: o });\n}, Hc = ({ children: e, delay: t = 0, className: r = \"\" }) => /* @__PURE__ */ a(_t, { animation: \"fade-in-up\", delay: t, className: r, children: e }), qc = ({ children: e, delay: t = 0, className: r = \"\" }) => /* @__PURE__ */ a(\n _t,\n {\n animation: \"fade-in-scale\",\n delay: t,\n className: r,\n children: e\n }\n), Gc = ({ children: e, className: t = \"\" }) => /* @__PURE__ */ a(_t, { animation: \"float\", className: t, children: e }), Yc = ({\n isOpen: e,\n onClick: t,\n opacity: r = \"medium\",\n blur: n = !1,\n zIndex: o = 50,\n className: s,\n children: i\n}) => {\n const c = {\n light: \"bg-black/20 dark:bg-black/30\",\n medium: \"bg-black/50 dark:bg-black/60\",\n dark: \"bg-black/75 dark:bg-black/80\"\n };\n return e ? /* @__PURE__ */ a(\n \"div\",\n {\n onClick: t,\n className: m(\n \"fixed inset-0\",\n \"transition-all duration-200\",\n c[r],\n n && \"backdrop-blur-sm\",\n s\n ),\n style: { zIndex: o },\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n children: i\n }\n ) : null;\n}, uo = {\n [fe.InfoType.INFO]: {\n icon: Te,\n container: \"bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800\",\n iconColor: \"text-blue-600 dark:text-blue-400\",\n titleColor: \"text-blue-900 dark:text-blue-100\",\n descriptionColor: \"text-blue-700 dark:text-blue-300\"\n },\n [fe.InfoType.SUCCESS]: {\n icon: it,\n container: \"bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800\",\n iconColor: \"text-green-600 dark:text-green-400\",\n titleColor: \"text-green-900 dark:text-green-100\",\n descriptionColor: \"text-green-700 dark:text-green-300\"\n },\n [fe.InfoType.WARNING]: {\n icon: Mt,\n container: \"bg-yellow-50 dark:bg-amber-950 border-yellow-200 dark:border-amber-800\",\n iconColor: \"text-yellow-600 dark:text-amber-400\",\n titleColor: \"text-yellow-900 dark:text-amber-100\",\n descriptionColor: \"text-yellow-700 dark:text-amber-300\"\n },\n [fe.InfoType.ERROR]: {\n icon: Lt,\n container: \"bg-red-50 dark:bg-red-950 border-red-200 dark:border-red-800\",\n iconColor: \"text-red-600 dark:text-red-400\",\n titleColor: \"text-red-900 dark:text-red-100\",\n descriptionColor: \"text-red-700 dark:text-red-300\"\n }\n}, Kc = ({\n isVisible: e,\n onDismiss: t,\n title: r,\n description: n,\n variant: o = fe.InfoType.INFO,\n duration: s = 5e3,\n icon: i,\n className: c,\n closeAriaLabel: d = \"Dismiss banner\"\n}) => {\n const [l, g] = M(\"hidden\"), u = j(null), b = j(\n null\n ), f = uo[o], h = f.icon, y = _(() => {\n u.current && (clearTimeout(u.current), u.current = null), b.current && (clearTimeout(b.current), b.current = null);\n }, []), x = _(() => {\n y(), g(\"exiting\"), b.current = setTimeout(() => {\n g(\"hidden\"), t();\n }, 300);\n }, [y, t]);\n if (R(() => {\n e ? (g(\"entering\"), b.current = setTimeout(() => {\n g(\"visible\");\n }, 10)) : (l === \"visible\" || l === \"entering\") && x();\n }, [e]), R(() => (l === \"visible\" && s > 0 && (u.current = setTimeout(() => {\n x();\n }, s)), () => {\n u.current && clearTimeout(u.current);\n }), [l, s, x]), R(() => () => y(), [y]), l === \"hidden\")\n return null;\n const C = /* @__PURE__ */ a(\n \"div\",\n {\n role: \"alert\",\n \"aria-live\": \"polite\",\n \"data-testid\": \"banner\",\n className: m(\n // Base styles - full width at top of screen (z-[100] to be above all other elements including topbar and breadcrumbs)\n \"fixed inset-x-0 top-0 z-[100] w-full\",\n // Animation\n \"transition-all duration-300 ease-out\",\n l === \"entering\" || l === \"exiting\" ? \"-translate-y-full opacity-0\" : \"translate-y-0 opacity-100\"\n ),\n children: /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n // Container styles - full width, no rounded corners\n \"flex items-start gap-3 p-4 border-b shadow-lg\",\n \"backdrop-blur-sm\",\n f.container,\n c\n ),\n children: [\n /* @__PURE__ */ a(\"div\", { className: m(\"flex-shrink-0 mt-0.5\", f.iconColor), children: i || /* @__PURE__ */ a(h, { className: \"h-5 w-5\" }) }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\"p\", { className: m(\"font-semibold\", f.titleColor), children: r }),\n n && /* @__PURE__ */ a(\"p\", { className: m(\"text-sm mt-1\", f.descriptionColor), children: n })\n ] }),\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: x,\n className: m(\n \"flex-shrink-0 p-1 rounded-md transition-colors\",\n \"hover:bg-black/10 dark:hover:bg-white/10\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2\",\n \"focus:ring-current\"\n ),\n \"aria-label\": d,\n children: /* @__PURE__ */ a(lt, { className: m(\"h-5 w-5\", f.iconColor) })\n }\n )\n ]\n }\n )\n }\n );\n return Tt(C, document.body);\n}, Zc = (e = {}) => {\n const { defaultDuration: t = 5e3 } = e, [r, n] = M(!1), [o, s] = M(null), i = _(\n ({\n title: d,\n description: l,\n variant: g = fe.InfoType.INFO,\n duration: u = t\n }) => {\n s({ title: d, description: l, variant: g, duration: u }), n(!0);\n },\n [t]\n ), c = _(() => {\n n(!1);\n }, []);\n return {\n isVisible: r,\n bannerProps: o,\n showBanner: i,\n hideBanner: c\n };\n}, go = ({\n isOpen: e,\n onClose: t,\n children: r,\n size: n = \"md\",\n showCloseButton: o = !0,\n closeOnOutsideClick: s = !0,\n closeOnEscape: i = !0,\n className: c\n}) => (R(() => {\n if (!i || !e || !t) return;\n const g = (u) => {\n u.key === \"Escape\" && t();\n };\n return document.addEventListener(\"keydown\", g), () => document.removeEventListener(\"keydown\", g);\n}, [e, t, i]), e ? /* @__PURE__ */ p(Le, { children: [\n /* @__PURE__ */ a(\n Ot,\n {\n isOpen: e,\n onClose: () => {\n s && t && t();\n },\n opacity: \"dark\",\n blur: !0\n }\n ),\n /* @__PURE__ */ a(\"div\", { className: \"fixed inset-0 z-50 flex items-center justify-center p-4\", children: /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"relative w-full\",\n {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n full: \"max-w-full mx-4\"\n }[n],\n \"bg-white dark:bg-gray-900\",\n \"rounded-lg shadow-xl\",\n \"animate-in fade-in zoom-in-95 duration-200\",\n c\n ),\n onClick: (g) => g.stopPropagation(),\n children: [\n o && t && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: t,\n className: \"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors\",\n \"aria-label\": \"Close dialog\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n ),\n r\n ]\n }\n ) })\n] }) : null), Xc = ({\n isOpen: e,\n onClose: t,\n items: r,\n placeholder: n = \"Type a command or search...\",\n emptyMessage: o = \"No results found.\",\n className: s\n}) => {\n const [i, c] = M(\"\"), [d, l] = M(0), g = j(null), u = r.filter((y) => {\n const x = i.toLowerCase();\n return y.label.toLowerCase().includes(x) || y.keywords?.some((C) => C.toLowerCase().includes(x)) || y.group?.toLowerCase().includes(x);\n }), b = u.reduce(\n (y, x) => {\n const C = x.group || \"Commands\";\n return y[C] || (y[C] = []), y[C].push(x), y;\n },\n {}\n );\n R(() => {\n e || (c(\"\"), l(0));\n }, [e]), R(() => {\n e && g.current && g.current.focus();\n }, [e]), R(() => {\n l(0);\n }, [i]);\n const f = (y) => {\n switch (y.key) {\n case \"ArrowDown\":\n y.preventDefault(), l(\n (x) => x < u.length - 1 ? x + 1 : x\n );\n break;\n case \"ArrowUp\":\n y.preventDefault(), l((x) => x > 0 ? x - 1 : x);\n break;\n case \"Enter\":\n y.preventDefault(), u[d] && (u[d].onSelect(), t());\n break;\n case \"Escape\":\n y.preventDefault(), t();\n break;\n }\n }, h = (y) => {\n y.onSelect(), t();\n };\n return /* @__PURE__ */ p(\n go,\n {\n isOpen: e,\n onClose: t,\n size: \"lg\",\n showCloseButton: !1,\n className: m(\"overflow-hidden p-0\", s),\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"border-b border-gray-200 dark:border-gray-700 p-4\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n ref: g,\n type: \"text\",\n value: i,\n onChange: (y) => c(y.target.value),\n onKeyDown: f,\n placeholder: n,\n className: \"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500\"\n }\n )\n ] }) }),\n /* @__PURE__ */ a(\"div\", { className: \"max-h-96 overflow-y-auto p-2\", children: Object.keys(b).length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center\", children: o }) : Object.entries(b).map(([y, x]) => /* @__PURE__ */ p(\"div\", { className: \"mb-4 last:mb-0\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider\", children: y }),\n /* @__PURE__ */ a(\"div\", { className: \"space-y-1\", children: x.map((C) => {\n const k = u.indexOf(C) === d;\n return /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => h(C),\n className: m(\n \"w-full flex items-center gap-3 px-3 py-2 rounded-md\",\n \"text-sm text-left transition-colors\",\n k ? \"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300\" : \"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white\"\n ),\n children: [\n C.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4\", children: C.icon }),\n /* @__PURE__ */ a(\"span\", { className: \"flex-1 truncate\", children: C.label }),\n C.shortcut && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono\", children: C.shortcut })\n ]\n },\n C.id\n );\n }) })\n ] }, y)) }),\n /* @__PURE__ */ p(\"div\", { className: \"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-4\", children: [\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"kbd\", { className: \"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded\", children: \"↑\" }),\n /* @__PURE__ */ a(\"kbd\", { className: \"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded\", children: \"↓\" }),\n \"to navigate\"\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"kbd\", { className: \"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded\", children: \"↵\" }),\n \"to select\"\n ] })\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"kbd\", { className: \"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded\", children: \"esc\" }),\n \"to close\"\n ] })\n ] })\n ]\n }\n );\n}, mo = Q(\n \"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200\",\n {\n variants: {\n variant: {\n default: \"border-gray-200 dark:border-gray-700 border hover:shadow-lg\",\n elevated: \"shadow-lg hover:shadow-xl\",\n minimal: \"bg-transparent shadow-none border-none p-4\"\n },\n trend: {\n none: \"\",\n up: \"border-l-4 border-green-500\",\n down: \"border-l-4 border-red-500\",\n neutral: \"border-l-4 border-gray-400\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n trend: \"none\"\n }\n }\n), Jc = ({\n label: e,\n value: t,\n change: r,\n trend: n = \"none\",\n icon: o,\n variant: s = \"default\",\n className: i\n}) => {\n const c = {\n up: \"text-green-600 dark:text-green-400\",\n down: \"text-red-600 dark:text-red-400\",\n neutral: \"text-gray-600 dark:text-gray-400\",\n none: \"text-gray-600 dark:text-gray-400\"\n }, d = {\n up: \"↗\",\n down: \"↘\",\n neutral: \"→\",\n none: \"\"\n };\n return /* @__PURE__ */ a(\"div\", { className: m(mo({ variant: s, trend: n }), i), children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between\", children: [\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1\", children: e }),\n /* @__PURE__ */ a(\"p\", { className: \"text-2xl font-bold text-gray-900 dark:text-white\", children: t }),\n r && /* @__PURE__ */ p(\n \"p\",\n {\n className: m(\n \"text-sm font-medium flex items-center gap-1 mt-1\",\n c[n || \"none\"]\n ),\n children: [\n /* @__PURE__ */ a(\"span\", { children: d[n || \"none\"] }),\n r\n ]\n }\n )\n ] }),\n o && /* @__PURE__ */ a(\"div\", { className: \"text-3xl opacity-80\", children: o })\n ] }) });\n}, ho = Q(\"space-y-6\", {\n variants: {\n variant: {\n default: \"\",\n card: \"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6\",\n minimal: \"space-y-4\"\n },\n spacing: {\n tight: \"space-y-3\",\n normal: \"space-y-4\",\n relaxed: \"space-y-6\",\n loose: \"space-y-8\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n spacing: \"normal\"\n }\n}), Qc = ({\n title: e,\n description: t,\n children: r,\n variant: n = \"default\",\n spacing: o = \"normal\",\n className: s\n}) => /* @__PURE__ */ p(\"div\", { className: m(ho({ variant: n, spacing: o }), s), children: [\n (e || t) && /* @__PURE__ */ p(\"div\", { className: \"space-y-1\", children: [\n e && /* @__PURE__ */ a(\"h3\", { className: \"text-lg font-medium text-gray-900 dark:text-white\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: t })\n ] }),\n r\n] }), fo = Q(\n \"flex flex-col items-center text-center space-y-4\",\n {\n variants: {\n layout: {\n vertical: \"flex-col items-center text-center\",\n horizontal: \"flex-row items-start text-left space-y-0 space-x-4\",\n minimal: \"flex-col space-y-2\"\n },\n spacing: {\n tight: \"space-y-2\",\n normal: \"space-y-4\",\n relaxed: \"space-y-6\"\n },\n interactive: {\n true: \"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer\",\n false: \"\"\n }\n },\n defaultVariants: {\n layout: \"vertical\",\n spacing: \"normal\",\n interactive: !1\n }\n }\n), ed = ({\n icon: e,\n title: t,\n description: r,\n layout: n = \"vertical\",\n spacing: o = \"normal\",\n interactive: s = !1,\n className: i,\n onClick: c\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n fo({ layout: n, spacing: o, interactive: s }),\n i\n ),\n onClick: c,\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"text-4xl mb-4 flex-shrink-0\", children: e }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-2\", children: [\n /* @__PURE__ */ a(\"h3\", { className: \"text-xl font-bold text-gray-900 dark:text-white\", children: t }),\n /* @__PURE__ */ a(\"div\", { className: \"text-gray-600 dark:text-gray-300 leading-relaxed\", children: r })\n ] })\n ]\n }\n), td = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UfocusUindicator\",\n children: t || \"UfocusUindicator Component\"\n }\n), rd = ({\n icon: e,\n size: t = \"md\",\n shape: r = \"rounded\",\n variant: n = \"blue-purple\",\n gradientClasses: o,\n className: s,\n iconClassName: i\n}) => {\n const c = {\n sm: {\n container: \"w-10 h-10\",\n icon: \"h-5 w-5\"\n },\n md: {\n container: \"w-12 h-12\",\n icon: \"h-6 w-6\"\n },\n lg: {\n container: \"w-16 h-16\",\n icon: \"h-8 w-8\"\n },\n xl: {\n container: \"w-20 h-20\",\n icon: \"h-10 w-10\"\n }\n }, d = {\n square: \"rounded-lg\",\n rounded: \"rounded-xl\",\n circle: \"rounded-full\"\n }, l = {\n \"blue-purple\": \"bg-gradient-to-r from-blue-600 to-purple-600\",\n \"green-blue\": \"bg-gradient-to-r from-green-600 to-blue-600\",\n \"orange-red\": \"bg-gradient-to-r from-orange-600 to-red-600\",\n gray: \"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900\",\n custom: o || \"bg-gradient-to-r from-blue-600 to-purple-600\"\n }, g = c[t];\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center flex-shrink-0\",\n g.container,\n d[r],\n l[n],\n s\n ),\n children: /* @__PURE__ */ a(e, { className: m(\"text-white\", g.icon, i) })\n }\n );\n}, bo = {\n sm: \"w-12 h-12\",\n md: \"w-16 h-16\",\n lg: \"w-20 h-20\",\n xl: \"w-24 h-24\"\n}, po = {\n sm: \"h-6 w-6\",\n md: \"h-8 w-8\",\n lg: \"h-10 w-10\",\n xl: \"h-12 w-12\"\n}, yo = {\n primary: \"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200\",\n secondary: \"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200\",\n success: \"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200\",\n warning: \"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200\",\n error: \"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200\",\n neutral: \"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200\"\n}, xo = {\n square: \"rounded-none\",\n rounded: \"rounded-2xl\",\n circle: \"rounded-full\"\n}, vo = {\n none: \"\",\n float: \"animate-float\",\n pulse: \"animate-pulse\",\n bounce: \"animate-bounce-slow\"\n}, ad = ({\n children: e,\n size: t = \"lg\",\n variant: r = \"primary\",\n shape: n = \"rounded\",\n animation: o = \"float\",\n className: s\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105\",\n bo[t],\n yo[r],\n xo[n],\n vo[o],\n s\n ),\n children: /* @__PURE__ */ a(\"div\", { className: m(po[t]), children: e })\n }\n), nd = ({\n icon: e,\n children: t,\n iconPosition: r = \"left\",\n gap: n = \"md\",\n iconSize: o = \"md\",\n align: s = \"left\",\n variant: i = \"default\",\n className: c,\n iconClassName: d,\n textClassName: l\n}) => {\n const g = {\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-3\",\n lg: \"gap-4\"\n }, u = {\n xs: \"h-3 w-3\",\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n xl: \"h-8 w-8\"\n }, b = {\n left: \"text-left\",\n center: \"text-center items-center\",\n right: \"text-right items-end\"\n }, f = {\n default: \"text-gray-700 dark:text-gray-300\",\n primary: \"text-blue-600 dark:text-blue-400\",\n success: \"text-green-600 dark:text-green-400\",\n warning: \"text-yellow-600 dark:text-yellow-400\",\n danger: \"text-red-600 dark:text-red-400\",\n muted: \"text-gray-500 dark:text-gray-400\"\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n {\n left: \"flex items-center\",\n right: \"flex flex-row-reverse items-center\",\n top: \"flex flex-col\"\n }[r],\n g[n],\n r === \"top\" && b[s],\n f[i],\n c\n ),\n children: [\n /* @__PURE__ */ a(\n e,\n {\n className: m(\n u[o],\n \"flex-shrink-0\",\n d\n )\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: m(l), children: t })\n ]\n }\n );\n};\nfunction od({\n title: e,\n subtitle: t,\n items: r,\n renderItem: n,\n keyExtractor: o,\n actions: s,\n emptyMessage: i = \"No items\",\n emptyIcon: c,\n emptyAction: d,\n loading: l = !1,\n className: g,\n headerClassName: u,\n listClassName: b,\n spacing: f = \"none\",\n showDividers: h = !1\n}) {\n const y = {\n none: \"\",\n sm: \"space-y-1\",\n md: \"space-y-2\",\n lg: \"space-y-4\"\n }, x = (C = \"secondary\") => {\n const v = \"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed\";\n switch (C) {\n case \"primary\":\n return m(\n v,\n \"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600\"\n );\n case \"ghost\":\n return m(\n v,\n \"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800\"\n );\n case \"secondary\":\n default:\n return m(\n v,\n \"bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700\"\n );\n }\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"\", g), children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"flex items-center justify-between gap-4 pb-4\",\n u\n ),\n children: [\n /* @__PURE__ */ p(\"div\", { className: \"min-w-0 flex-1\", children: [\n /* @__PURE__ */ a(\"h2\", { className: \"text-lg font-semibold text-gray-900 dark:text-gray-100 truncate\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: \"mt-0.5 text-sm text-gray-500 dark:text-gray-400\", children: t })\n ] }),\n s && s.length > 0 && /* @__PURE__ */ a(\"div\", { className: \"flex items-center gap-2 flex-shrink-0\", children: s.map((C) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: C.onClick,\n disabled: C.disabled,\n className: x(C.variant),\n children: [\n C.icon,\n C.label\n ]\n },\n C.id\n )) })\n ]\n }\n ),\n l && /* @__PURE__ */ a(\"div\", { className: \"flex items-center justify-center py-12\", children: /* @__PURE__ */ a(\"div\", { className: \"w-6 h-6 border-2 border-blue-600 border-t-transparent rounded-full animate-spin\" }) }),\n !l && r.length === 0 && /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center justify-center py-12 text-center\", children: [\n c && /* @__PURE__ */ a(\"div\", { className: \"mb-4 text-gray-400 dark:text-gray-500\", children: c }),\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-500 dark:text-gray-400\", children: i }),\n d && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: d.onClick,\n className: \"mt-4 text-sm font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300\",\n children: d.label\n }\n )\n ] }),\n !l && r.length > 0 && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n y[f],\n h && \"divide-y divide-gray-200 dark:divide-gray-700\",\n b\n ),\n children: r.map((C, v) => /* @__PURE__ */ a(\"div\", { children: n(C, v) }, o(C, v)))\n }\n )\n ] });\n}\nconst sd = ({\n children: e,\n title: t,\n variant: r = \"info\",\n size: n = \"md\",\n icon: o,\n bordered: s = !0,\n className: i\n}) => {\n const c = {\n info: {\n bg: \"bg-blue-50 dark:bg-blue-900/20\",\n border: \"border-blue-200 dark:border-blue-800\",\n title: \"text-blue-900 dark:text-blue-300\",\n text: \"text-blue-800 dark:text-blue-400\",\n icon: \"text-blue-600 dark:text-blue-400\"\n },\n success: {\n bg: \"bg-green-50 dark:bg-green-900/20\",\n border: \"border-green-200 dark:border-green-800\",\n title: \"text-green-900 dark:text-green-300\",\n text: \"text-green-800 dark:text-green-400\",\n icon: \"text-green-600 dark:text-green-400\"\n },\n warning: {\n bg: \"bg-yellow-50 dark:bg-yellow-900/20\",\n border: \"border-yellow-200 dark:border-yellow-800\",\n title: \"text-yellow-900 dark:text-yellow-300\",\n text: \"text-yellow-800 dark:text-yellow-400\",\n icon: \"text-yellow-600 dark:text-yellow-400\"\n },\n danger: {\n bg: \"bg-red-50 dark:bg-red-900/20\",\n border: \"border-red-200 dark:border-red-800\",\n title: \"text-red-900 dark:text-red-300\",\n text: \"text-red-800 dark:text-red-400\",\n icon: \"text-red-600 dark:text-red-400\"\n },\n neutral: {\n bg: \"bg-gray-50 dark:bg-gray-800\",\n border: \"border-gray-200 dark:border-gray-700\",\n title: \"text-gray-900 dark:text-gray-100\",\n text: \"text-gray-700 dark:text-gray-300\",\n icon: \"text-gray-600 dark:text-gray-400\"\n }\n }, d = {\n sm: \"p-3\",\n md: \"p-4\",\n lg: \"p-6\"\n }, l = c[r];\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"rounded-lg\",\n l.bg,\n s && `border ${l.border}`,\n d[n],\n i\n ),\n children: [\n (t || o) && /* @__PURE__ */ p(\"div\", { className: \"flex items-start gap-3 mb-2\", children: [\n o && /* @__PURE__ */ a(\n o,\n {\n className: m(\"h-5 w-5 flex-shrink-0 mt-0.5\", l.icon)\n }\n ),\n t && /* @__PURE__ */ a(\n \"h3\",\n {\n className: m(O.body.strong.md(), l.title),\n children: t\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: m(!t && !o && l.text), children: e })\n ]\n }\n );\n}, id = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UkeyboardUshortcut\",\n children: t || \"UkeyboardUshortcut Component\"\n }\n), ld = ({\n size: e = \"md\",\n className: t = \"\",\n showText: r = !0,\n onClick: n,\n logoSrc: o = \"/logo.png\",\n logoAlt: s = \"Logo\",\n logoText: i,\n fontFamily: c = \"Dancing Script, cursive\"\n}) => {\n const l = (() => {\n switch (e) {\n case \"sm\":\n return {\n container: \"space-x-2\",\n image: \"h-6 w-6\",\n text: \"text-lg\"\n };\n case \"md\":\n return {\n container: \"space-x-2\",\n image: \"h-8 w-8\",\n text: \"text-2xl\"\n };\n case \"lg\":\n return {\n container: \"space-x-3\",\n image: \"h-10 w-10\",\n text: \"text-3xl\"\n };\n case \"xl\":\n return {\n container: \"space-x-4\",\n image: \"h-12 w-12\",\n text: \"text-4xl\"\n };\n default:\n return {\n container: \"space-x-2\",\n image: \"h-8 w-8\",\n text: \"text-2xl\"\n };\n }\n })(), g = /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\"img\", { src: o, alt: s, className: l.image }),\n r && /* @__PURE__ */ a(\n \"div\",\n {\n className: `${l.text} font-bold text-gray-900 dark:text-gray-100`,\n style: { fontFamily: c, fontWeight: \"700\" },\n children: i\n }\n )\n ] });\n return n ? /* @__PURE__ */ a(\n \"button\",\n {\n onClick: n,\n className: `flex items-center ${l.container} ${t} hover:opacity-80 transition-opacity`,\n children: g\n }\n ) : /* @__PURE__ */ a(\"div\", { className: `flex items-center ${l.container} ${t}`, children: g });\n}, cd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UmorphUtransition\",\n children: t || \"UmorphUtransition Component\"\n }\n), dd = ({\n title: e,\n description: t,\n count: r,\n countLabel: n,\n action: o,\n loading: s = !1,\n loadingText: i = \"Loading...\",\n size: c = \"md\",\n className: d\n}) => {\n const g = {\n sm: {\n title: O.heading.h4(),\n description: O.body.sm(),\n count: O.caption.default()\n },\n md: {\n title: O.heading.h3(),\n description: O.body.md(),\n count: O.body.sm()\n },\n lg: {\n title: O.heading.h2(),\n description: O.body.lg(),\n count: O.body.md()\n }\n }[c];\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex items-start justify-between gap-4\", d), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3 flex-wrap\", children: [\n /* @__PURE__ */ a(\n \"h2\",\n {\n className: m(g.title, \"text-gray-900 dark:text-gray-100\"),\n children: e\n }\n ),\n r !== void 0 && /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n g.count,\n \"text-gray-500 dark:text-gray-400\"\n ),\n children: [\n \"(\",\n r,\n n && ` ${n}`,\n \")\"\n ]\n }\n ),\n s && /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n g.count,\n \"text-gray-500 dark:text-gray-400 flex items-center gap-2\"\n ),\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600\" }),\n i\n ]\n }\n )\n ] }),\n t && /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n g.description,\n \"mt-1 text-gray-600 dark:text-gray-400\"\n ),\n children: t\n }\n )\n ] }),\n o && /* @__PURE__ */ a(\"div\", { className: \"flex-shrink-0\", children: o })\n ] });\n}, ud = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UparallaxUscroll\",\n children: t || \"UparallaxUscroll Component\"\n }\n), gd = ({\n actions: e,\n orientation: t = \"horizontal\",\n columns: r = 3,\n className: n\n}) => {\n const o = {\n default: \"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700\",\n primary: \"bg-blue-500 hover:bg-blue-600 text-white border-blue-500\",\n success: \"bg-green-500 hover:bg-green-600 text-white border-green-500\",\n warning: \"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500\",\n danger: \"bg-red-500 hover:bg-red-600 text-white border-red-500\"\n };\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n {\n horizontal: \"flex flex-wrap gap-2\",\n vertical: \"flex flex-col gap-2\",\n grid: \"grid gap-2\"\n }[t],\n t === \"grid\" && `grid-cols-${r}`,\n n\n ),\n style: t === \"grid\" ? { gridTemplateColumns: `repeat(${r}, 1fr)` } : void 0,\n children: e.map((i) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: i.onClick,\n disabled: i.disabled,\n className: m(\n \"flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium\",\n o[i.variant || \"default\"],\n i.disabled && \"opacity-50 cursor-not-allowed\"\n ),\n children: [\n i.icon && /* @__PURE__ */ a(\"span\", { className: \"w-5 h-5\", children: i.icon }),\n /* @__PURE__ */ a(\"span\", { children: i.label })\n ]\n },\n i.id\n ))\n }\n );\n}, md = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UrevealUonUscroll\",\n children: t || \"UrevealUonUscroll Component\"\n }\n), wo = {\n sm: {\n container: \"px-6 py-3\",\n icon: \"h-5 w-5 mr-2\",\n text: \"font-semibold\"\n },\n md: {\n container: \"px-6 py-3\",\n icon: \"h-5 w-5 mr-2\",\n text: \"font-semibold\"\n },\n lg: {\n container: \"px-6 py-3\",\n icon: \"h-5 w-5 mr-2\",\n text: \"font-semibold\"\n }\n}, hd = ({\n icon: e,\n text: t,\n variant: r = \"default\",\n size: n = \"md\",\n className: o\n}) => {\n const { container: s, icon: i } = dn(r), c = wo[n];\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"inline-flex items-center rounded-full mb-6\",\n s,\n c.container,\n o\n ),\n children: [\n /* @__PURE__ */ a(\"div\", { className: m(\"animate-float-icon\", i, c.icon), children: e }),\n /* @__PURE__ */ a(\"span\", { className: c.text, children: t })\n ]\n }\n );\n}, fd = ({\n title: e,\n onAdd: t,\n addButtonTooltip: r,\n loading: n,\n className: o = \"\"\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: `p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between\", children: [\n /* @__PURE__ */ a(\"h2\", { className: \"text-lg font-semibold text-gray-900 dark:text-gray-100\", children: e }),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center space-x-2\", children: [\n n && /* @__PURE__ */ a(\"div\", { className: \"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin\" }),\n t && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: t,\n className: \"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors\",\n title: r,\n \"aria-label\": r || \"Add\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-gray-600 dark:text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M12 4v16m8-8H4\"\n }\n )\n }\n )\n }\n )\n ] })\n ] })\n }\n), ko = (e) => {\n switch (e) {\n case \"cog\":\n return qt;\n case \"arrow-right\":\n return zr;\n case \"shield\":\n return Pa;\n case \"reply\":\n case \"chat\":\n return Ia;\n case \"filter\":\n return Ma;\n case \"plug\":\n return La;\n case \"adjustments\":\n return Ta;\n case \"currency-dollar\":\n return Aa;\n default:\n return qt;\n }\n}, bd = ({\n settings: e,\n selectedSetting: t,\n onSettingSelect: r,\n className: n = \"\"\n}) => /* @__PURE__ */ a(\n \"nav\",\n {\n className: m(\"space-y-1\", n),\n \"aria-label\": \"Settings navigation\",\n children: /* @__PURE__ */ a(\"ul\", { className: \"space-y-1\", role: \"list\", children: e.map((o) => {\n const s = ko(o.icon), i = t === o.id;\n return /* @__PURE__ */ a(\"li\", { children: /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r(o.id),\n className: m(\n \"w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]\",\n O.body.sm(),\n i ? \"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300\" : \"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300\"\n ),\n \"aria-current\": i ? \"page\" : void 0,\n title: o.description,\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\n s,\n {\n className: \"h-5 w-5 mr-3 flex-shrink-0\",\n \"aria-hidden\": \"true\"\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"truncate\", children: o.title })\n ] })\n }\n ) }, o.id);\n }) })\n }\n), pd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UskipUnavigation\",\n children: t || \"UskipUnavigation Component\"\n }\n), yd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UsortUdropdown\",\n children: t || \"UsortUdropdown Component\"\n }\n), xd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UversionUbadge\",\n children: t || \"UversionUbadge Component\"\n }\n), vd = ({\n children: e,\n as: t = \"span\"\n}) => /* @__PURE__ */ a(t, { className: \"sr-only\", children: e }), wd = ({\n time: e,\n isActive: t = !0,\n size: r = \"sm\",\n showIcon: n = !0,\n className: o\n}) => {\n const s = {\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-2.5\"\n }, i = {\n sm: \"w-4 h-4\",\n md: \"w-5 h-5\",\n lg: \"w-6 h-6\"\n }, c = {\n sm: \"sm\",\n md: \"base\",\n lg: \"lg\"\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\"flex items-center\", s[r], o),\n role: \"timer\",\n \"aria-label\": `Timer: ${e}`,\n children: [\n n && /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n i[r],\n t ? \"text-blue-600 dark:text-blue-400\" : \"text-gray-400 dark:text-gray-500\"\n ),\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n gn,\n {\n as: \"span\",\n size: c[r],\n weight: \"medium\",\n color: t ? \"default\" : \"muted\",\n className: \"font-mono tabular-nums\",\n children: e\n }\n )\n ]\n }\n );\n}, No = [\n \"#3b82f6\",\n \"#10b981\",\n \"#f59e0b\",\n \"#ef4444\",\n \"#8b5cf6\",\n \"#ec4899\"\n], kd = ({\n show: e,\n onComplete: t,\n particleCount: r = 50,\n duration: n = 3e3,\n colors: o = No,\n className: s\n}) => {\n const [i, c] = M([]), [d, l] = M(!1);\n R(() => {\n if (e && !d) {\n l(!0);\n const u = [];\n for (let f = 0; f < r; f++) {\n const h = Math.PI * 2 * f / r + Math.random() * 0.5, y = 2 + Math.random() * 4;\n u.push({\n id: f,\n x: 50,\n // Center horizontally (%)\n y: 50,\n // Center vertically (%)\n vx: Math.cos(h) * y,\n vy: Math.sin(h) * y - 2,\n // Slight upward bias\n color: o[Math.floor(Math.random() * o.length)],\n size: 8 + Math.random() * 8,\n rotation: Math.random() * 360,\n rotationSpeed: (Math.random() - 0.5) * 20,\n isCircle: Math.random() > 0.5\n });\n }\n c(u);\n const b = setTimeout(() => {\n l(!1), c([]), t?.();\n }, n);\n return () => clearTimeout(b);\n }\n }, [e, d, t, r, n, o]);\n const g = _(() => {\n c(\n (u) => u.map((b) => ({\n ...b,\n x: b.x + b.vx * 0.5,\n y: b.y + b.vy * 0.5,\n vy: b.vy + 0.15,\n // Gravity\n rotation: b.rotation + b.rotationSpeed\n }))\n );\n }, []);\n return R(() => {\n if (!d || i.length === 0) return;\n const u = setInterval(g, 16);\n return () => clearInterval(u);\n }, [d, i.length, g]), !d || i.length === 0 ? null : /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"fixed inset-0 pointer-events-none z-50 overflow-hidden\",\n s\n ),\n \"aria-hidden\": \"true\",\n children: i.map((u) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute\",\n style: {\n left: `${u.x}%`,\n top: `${u.y}%`,\n width: u.size,\n height: u.size,\n backgroundColor: u.color,\n transform: `rotate(${u.rotation}deg)`,\n borderRadius: u.isCircle ? \"50%\" : \"2px\",\n opacity: Math.max(0, 1 - u.y / 150)\n }\n },\n u.id\n ))\n }\n );\n}, yt = Q(\n \"transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm\",\n {\n variants: {\n variant: {\n // Subtle internal link - barely noticeable color change\n subtle: O.link.subtle(),\n // Default internal link\n default: O.link.default(),\n // Muted link for secondary navigation\n muted: O.link.muted(),\n // External link with indicator\n external: O.link.external(),\n // Inherit parent styling with minimal changes\n inherit: \"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200\"\n },\n size: {\n sm: \"text-sm\",\n default: \"text-base\",\n lg: \"text-lg\"\n }\n },\n defaultVariants: {\n variant: \"subtle\",\n size: \"default\"\n }\n }\n), ea = Z.forwardRef(\n ({\n className: e,\n variant: t,\n size: r,\n to: n,\n href: o,\n external: s,\n children: i,\n onTrack: c,\n trackingLabel: d,\n componentName: l,\n onClick: g,\n ...u\n }, b) => {\n const f = n || o, h = s || f && (f.startsWith(\"http\") || f.startsWith(\"mailto:\")), y = (x) => {\n c && c({\n action: \"click\",\n trackingLabel: d,\n componentName: l\n }), g?.(\n x\n );\n };\n return f ? h ? /* @__PURE__ */ a(\n \"a\",\n {\n className: m(\n yt({\n variant: t === \"subtle\" ? \"external\" : t,\n size: r,\n className: e\n })\n ),\n href: f,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n ref: b,\n onClick: y,\n ...u,\n children: i\n }\n ) : /* @__PURE__ */ a(\n Ze,\n {\n className: m(yt({ variant: t, size: r, className: e })),\n to: f,\n ref: b,\n onClick: y,\n ...u,\n children: i\n }\n ) : /* @__PURE__ */ a(\n \"span\",\n {\n className: m(yt({ variant: t, size: r, className: e })),\n onClick: y,\n ...u,\n children: i\n }\n );\n }\n);\nea.displayName = \"SmartLink\";\nconst Nd = (e, t) => Z.useMemo(() => {\n let r = e;\n return Object.entries(t).forEach(([n, o]) => {\n const s = new RegExp(\n `\\\\b${n.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}\\\\b`,\n \"gi\"\n );\n r = r.replace(\n s,\n (i) => `<SmartLink to=\"${o}\" variant=\"subtle\">${i}</SmartLink>`\n );\n }), r;\n}, [e, t]), Co = {\n documentation: \"/document\",\n settings: \"/settings\",\n about: \"/about\",\n contact: \"/contact\",\n \"privacy policy\": \"/privacy\",\n privacy: \"/privacy\",\n \"terms of service\": \"/terms\",\n terms: \"/terms\",\n \"cookie policy\": \"/cookies\",\n cookies: \"/cookies\",\n points: \"/points\",\n \"earn points\": \"/how-to-earn-points\",\n \"how to earn points\": \"/how-to-earn-points\",\n \"connect wallet\": \"/connect\",\n \"connect your wallet\": \"/connect\",\n \"wallet connection\": \"/connect\",\n wallet: \"/connect\",\n compose: \"/compose\",\n \"compose email\": \"/compose\",\n \"send email\": \"/compose\",\n mail: \"/mail\",\n email: \"/mail\",\n inbox: \"/mail\",\n dashboard: \"/mail\",\n delegate: \"/delegate\",\n delegation: \"/delegate\",\n manage: \"/manage\",\n \"manage preferences\": \"/preferences\",\n profile: \"/settings\",\n account: \"/settings\",\n preferences: \"/preferences\",\n token: \"/token\",\n \"web3 users\": \"/web3-users\",\n \"web3 projects\": \"/web3-projects\",\n \"get started\": \"/connect\",\n \"start here\": \"/connect\",\n \"learn more\": \"/document\",\n \"read more\": \"/document\",\n \"our features\": \"/document\",\n support: \"/contact\",\n help: \"/document\",\n \"contact us\": \"/contact\"\n}, Cd = ({\n children: e,\n mappings: t = Co,\n className: r,\n variant: n = \"subtle\"\n}) => {\n const o = Z.useMemo(() => {\n if (!e || typeof e != \"string\")\n return e || \"\";\n let i = e;\n return Object.entries(t).sort(\n ([d], [l]) => l.length - d.length\n ).forEach(([d, l]) => {\n if (d && l) {\n const g = new RegExp(\n `\\\\b${d.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}\\\\b`,\n \"gi\"\n );\n i = i.replace(\n g,\n (u) => `__LINK_START__${l}__LINK_MID__${u}__LINK_END__`\n );\n }\n }), i;\n }, [e, t]);\n if (!o || typeof o != \"string\")\n return /* @__PURE__ */ a(\"span\", { className: r, children: e });\n const s = o.split(/(__LINK_START__.*?__LINK_END__)/);\n return /* @__PURE__ */ a(\"span\", { className: r, children: s.map((i, c) => {\n const d = i.match(\n /__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/\n );\n if (d) {\n const [, l, g] = d;\n return /* @__PURE__ */ a(ea, { to: l, variant: n, children: g }, c);\n }\n return i;\n }) });\n}, Sd = ({\n href: e,\n children: t,\n variant: r = \"default\",\n external: n = !1,\n showExternalIcon: o = !1,\n disabled: s = !1,\n className: i,\n onTrack: c,\n trackingLabel: d,\n componentName: l,\n onClick: g,\n ...u\n}) => {\n const b = n || e.startsWith(\"http://\") || e.startsWith(\"https://\"), f = {\n default: \"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300\",\n primary: \"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium\",\n secondary: \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100\",\n muted: \"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300\",\n underline: \"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline\"\n }, h = b ? {\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n } : {}, y = (x) => {\n c && c({\n action: \"click\",\n trackingLabel: d,\n componentName: l\n }), g?.(x);\n };\n return s ? /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n \"cursor-not-allowed opacity-50\",\n f[r],\n i\n ),\n children: [\n t,\n o && b && /* @__PURE__ */ a(et, { className: \"inline-block h-4 w-4 ml-1\" })\n ]\n }\n ) : /* @__PURE__ */ p(\n \"a\",\n {\n href: e,\n className: m(\n \"inline-flex items-center transition-colors\",\n f[r],\n i\n ),\n onClick: y,\n ...h,\n ...u,\n children: [\n t,\n o && b && /* @__PURE__ */ a(et, { className: \"inline-block h-4 w-4 ml-1 flex-shrink-0\" })\n ]\n }\n );\n}, Ed = ({\n href: e,\n children: t,\n showIcon: r = !0,\n iconPosition: n = \"right\",\n size: o = \"md\",\n variant: s = \"default\",\n className: i,\n onClick: c\n}) => {\n const d = {\n sm: {\n text: O.body.sm(),\n icon: \"h-3 w-3\",\n gap: \"gap-1\"\n },\n md: {\n text: O.body.md(),\n icon: \"h-4 w-4\",\n gap: \"gap-1.5\"\n },\n lg: {\n text: O.body.lg(),\n icon: \"h-5 w-5\",\n gap: \"gap-2\"\n }\n }, l = {\n default: \"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300\",\n primary: \"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold\",\n muted: \"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200\"\n }, g = d[o];\n return /* @__PURE__ */ p(\n \"a\",\n {\n href: e,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n onClick: c,\n className: m(\n \"inline-flex items-center\",\n g.gap,\n g.text,\n l[s],\n \"underline decoration-1 underline-offset-2\",\n \"hover:decoration-2\",\n \"transition-all duration-200\",\n i\n ),\n children: [\n r && n === \"left\" && /* @__PURE__ */ a(\n et,\n {\n className: m(g.icon, \"flex-shrink-0\")\n }\n ),\n /* @__PURE__ */ a(\"span\", { children: t }),\n r && n === \"right\" && /* @__PURE__ */ a(\n et,\n {\n className: m(g.icon, \"flex-shrink-0\")\n }\n )\n ]\n }\n );\n}, tt = /* @__PURE__ */ new Set(), Ad = () => {\n tt.clear();\n}, Td = (e) => tt.has(e);\nfunction So(e, t, r, n) {\n let o = e;\n if (r.length > 0) {\n const s = new RegExp(`^/(${r.join(\"|\")})/`);\n o = o.replace(s, \"/\");\n }\n for (const { pattern: s, replacement: i } of n)\n o = o.replace(s, i);\n if (t[o])\n return t[o];\n for (const [s, i] of Object.entries(t))\n if (o.endsWith(s))\n return i;\n}\nconst Ld = ({\n preload: e,\n preloadDelay: t = 50,\n routeModules: r = {},\n languagePrefixes: n = [],\n pathNormalizations: o = [],\n to: s,\n children: i,\n onMouseEnter: c,\n onMouseLeave: d,\n onFocus: l,\n ...g\n}) => {\n const u = j(null), b = _(() => {\n const C = typeof s == \"string\" ? s : s.pathname || \"\";\n if (tt.has(C))\n return;\n const v = e || So(\n C,\n r,\n n,\n o\n );\n v && (u.current = setTimeout(() => {\n v().then(() => {\n tt.add(C);\n }).catch(() => {\n });\n }, t));\n }, [\n e,\n t,\n s,\n r,\n n,\n o\n ]), f = _(() => {\n u.current && (clearTimeout(u.current), u.current = null);\n }, []), h = _(\n (C) => {\n b(), c?.(C);\n },\n [b, c]\n ), y = _(\n (C) => {\n f(), d?.(C);\n },\n [f, d]\n ), x = _(\n (C) => {\n b(), l?.(C);\n },\n [b, l]\n );\n return /* @__PURE__ */ a(\n Ze,\n {\n to: s,\n onMouseEnter: h,\n onMouseLeave: y,\n onFocus: x,\n ...g,\n children: i\n }\n );\n}, Md = ({\n items: e,\n separator: t = \"/\",\n className: r\n}) => /* @__PURE__ */ a(\"nav\", { className: m(\"flex items-center gap-2 text-sm\", r), children: e.map((n, o) => /* @__PURE__ */ p(U.Fragment, { children: [\n o > 0 && /* @__PURE__ */ a(\"span\", { className: \"text-gray-400 dark:text-gray-600\", children: t }),\n o === e.length - 1 ? /* @__PURE__ */ a(\"span\", { className: \"text-gray-900 dark:text-white font-medium\", children: n.label }) : /* @__PURE__ */ a(\n \"button\",\n {\n onClick: n.onClick,\n className: \"text-blue-600 dark:text-blue-400 hover:underline\",\n children: n.label\n }\n )\n] }, o)) }), Eo = Z.forwardRef(\n ({\n onTrack: e,\n trackingLabel: t,\n componentName: r,\n onValueChange: n,\n children: o,\n ...s\n }, i) => /* @__PURE__ */ a(Ka, { ref: i, onValueChange: (d) => {\n e && e({\n action: \"change\",\n trackingLabel: t,\n componentName: r\n }), n?.(d);\n }, ...s, children: o })\n);\nEo.displayName = \"Tabs\";\nconst Ao = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n Wr,\n {\n ref: r,\n className: m(F.navigation.tabs.list(), e),\n ...t\n }\n));\nAo.displayName = Wr.displayName;\nconst To = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n $r,\n {\n ref: r,\n className: m(F.navigation.tabs.trigger(), e),\n ...t\n }\n));\nTo.displayName = $r.displayName;\nconst Lo = Z.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(\n Vr,\n {\n ref: r,\n className: m(F.navigation.tabs.content(), e),\n ...t\n }\n));\nLo.displayName = Vr.displayName;\nconst Id = ({\n items: e,\n orientation: t = \"horizontal\",\n className: r\n}) => {\n const [n, o] = M(/* @__PURE__ */ new Set()), s = (c) => {\n o((d) => {\n const l = new Set(d);\n return l.has(c) ? l.delete(c) : l.add(c), l;\n });\n }, i = (c, d) => {\n const l = c.children && c.children.length > 0, g = n.has(d), u = /* @__PURE__ */ p(H, { children: [\n c.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4\", children: c.icon }),\n /* @__PURE__ */ a(\"span\", { className: \"flex-1\", children: c.label }),\n l && /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-4 h-4 transition-transform\",\n t === \"horizontal\" && !g && \"-rotate-90\",\n g && \"rotate-180\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n ] }), b = m(\n \"flex items-center gap-2 px-4 py-2 text-sm font-medium\",\n \"transition-colors\",\n c.active ? \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20\" : \"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800\"\n );\n return /* @__PURE__ */ p(\"div\", { children: [\n l ? /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => s(d),\n className: m(b, \"w-full\"),\n children: u\n }\n ) : c.href ? /* @__PURE__ */ a(\"a\", { href: c.href, className: b, onClick: c.onClick, children: u }) : /* @__PURE__ */ a(\"button\", { onClick: c.onClick, className: m(b, \"w-full\"), children: u }),\n l && g && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"bg-gray-50 dark:bg-gray-800/50\",\n t === \"horizontal\" ? \"pl-4\" : \"border-l-2 border-gray-200 dark:border-gray-700 ml-4\"\n ),\n children: c.children.map((f, h) => /* @__PURE__ */ a(\"div\", { children: f.href ? /* @__PURE__ */ p(\n \"a\",\n {\n href: f.href,\n onClick: f.onClick,\n className: m(\n \"flex items-center gap-2 px-4 py-2 text-sm\",\n \"transition-colors\",\n f.active ? \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700\"\n ),\n children: [\n f.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4\", children: f.icon }),\n f.label\n ]\n }\n ) : /* @__PURE__ */ p(\n \"button\",\n {\n onClick: f.onClick,\n className: m(\n \"w-full flex items-center gap-2 px-4 py-2 text-sm\",\n \"transition-colors\",\n f.active ? \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700\"\n ),\n children: [\n f.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4\", children: f.icon }),\n f.label\n ]\n }\n ) }, h))\n }\n )\n ] }, d);\n };\n return /* @__PURE__ */ a(\n \"nav\",\n {\n className: m(\n \"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg\",\n t === \"horizontal\" ? \"flex flex-wrap\" : \"flex flex-col\",\n r\n ),\n children: e.map((c, d) => i(c, d))\n }\n );\n}, Pd = ({\n items: e,\n selectedPath: t,\n onSelect: r,\n variant: n = \"default\",\n className: o\n}) => /* @__PURE__ */ a(\"div\", { className: m(n === \"compact\" ? \"space-y-1\" : \"space-y-0\", o), children: e.map((i) => {\n const c = i.icon, d = t === i.path, l = i.disabled, g = m(\n \"flex items-start cursor-pointer transition-colors\",\n n === \"compact\" ? \"p-3 rounded-lg\" : \"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0\",\n l && \"opacity-50 cursor-not-allowed\"\n );\n return /* @__PURE__ */ p(\n \"div\",\n {\n onClick: () => !l && r(i.path),\n className: m(g, !l && (d ? \"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400\" : \"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300\")),\n role: \"button\",\n tabIndex: l ? -1 : 0,\n \"aria-current\": d ? \"page\" : void 0,\n \"aria-disabled\": l,\n onKeyDown: (b) => {\n !l && (b.key === \"Enter\" || b.key === \" \") && (b.preventDefault(), r(i.path));\n },\n children: [\n /* @__PURE__ */ a(c, { className: \"h-5 w-5 mt-0.5 mr-3 flex-shrink-0\" }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ p(\"div\", { className: m(\"font-medium\", O.body.md()), children: [\n i.label,\n i.badge !== void 0 && i.badge > 0 && /* @__PURE__ */ a(\"span\", { className: \"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full\", children: i.badge })\n ] }),\n i.description && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"text-xs text-gray-500 dark:text-gray-400 mt-0.5\"\n ),\n children: i.description\n }\n )\n ] })\n ]\n },\n i.id\n );\n}) }), Rd = ({ items: e, className: t }) => /* @__PURE__ */ a(\"nav\", { className: m(\"flex flex-col gap-1\", t), children: e.map((r) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: r.onClick,\n className: m(\n \"flex items-center gap-3 px-4 py-3 rounded-lg transition-colors\",\n r.active ? \"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400\" : \"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800\"\n ),\n children: [\n r.icon && /* @__PURE__ */ a(\"span\", { className: \"w-5 h-5\", children: r.icon }),\n /* @__PURE__ */ a(\"span\", { className: \"flex-1 text-left font-medium\", children: r.label }),\n r.badge && /* @__PURE__ */ a(\"span\", { className: \"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs\", children: r.badge })\n ]\n },\n r.id\n)) }), Od = ({\n currentPage: e,\n totalPages: t,\n onPageChange: r,\n siblingCount: n = 1,\n showFirstLast: o = !1,\n size: s = \"md\",\n className: i\n}) => {\n const d = {\n sm: {\n button: \"h-8 w-8 text-xs\",\n icon: \"h-3 w-3\",\n text: O.body.sm()\n },\n md: {\n button: \"h-10 w-10 text-sm\",\n icon: \"h-4 w-4\",\n text: O.body.md()\n },\n lg: {\n button: \"h-12 w-12 text-base\",\n icon: \"h-5 w-5\",\n text: O.body.lg()\n }\n }[s], g = (() => {\n const v = [];\n v.push(1);\n const k = Math.max(e - n, 2), w = Math.min(\n e + n,\n t - 1\n );\n k > 2 && v.push(\"ellipsis\");\n for (let S = k; S <= w; S++)\n v.push(S);\n return w < t - 1 && v.push(\"ellipsis\"), t > 1 && v.push(t), v;\n })(), u = () => {\n e > 1 && r(e - 1);\n }, b = () => {\n e < t && r(e + 1);\n }, f = () => {\n r(1);\n }, h = () => {\n r(t);\n }, y = m(\n \"inline-flex items-center justify-center\",\n \"rounded-md border border-gray-300 dark:border-gray-600\",\n \"transition-all duration-200\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ), x = (v) => m(\n y,\n d.button,\n d.text,\n v ? \"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500\" : \"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700\"\n ), C = m(\n y,\n d.button,\n \"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-50 dark:hover:bg-gray-700\"\n );\n return /* @__PURE__ */ p(\n \"nav\",\n {\n className: m(\"flex items-center gap-1\", i),\n \"aria-label\": \"Pagination\",\n children: [\n o && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: f,\n disabled: e === 1,\n className: C,\n \"aria-label\": \"Go to first page\",\n children: /* @__PURE__ */ a(\"span\", { className: d.text, children: \"First\" })\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: u,\n disabled: e === 1,\n className: C,\n \"aria-label\": \"Go to previous page\",\n children: /* @__PURE__ */ a(Ra, { className: d.icon })\n }\n ),\n g.map((v, k) => v === \"ellipsis\" ? /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"inline-flex items-center justify-center\",\n d.button,\n \"text-gray-400 dark:text-gray-500\"\n ),\n children: \"...\"\n },\n `ellipsis-${k}`\n ) : /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r(v),\n className: x(v === e),\n \"aria-label\": `Go to page ${v}`,\n \"aria-current\": v === e ? \"page\" : void 0,\n children: v\n },\n v\n )),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: b,\n disabled: e === t,\n className: C,\n \"aria-label\": \"Go to next page\",\n children: /* @__PURE__ */ a(It, { className: d.icon })\n }\n ),\n o && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: h,\n disabled: e === t,\n className: C,\n \"aria-label\": \"Go to last page\",\n children: /* @__PURE__ */ a(\"span\", { className: d.text, children: \"Last\" })\n }\n )\n ]\n }\n );\n}, Dd = ({\n currentPage: e,\n totalPages: t,\n onPageChange: r,\n maxVisible: n = 7,\n className: o\n}) => {\n const s = [];\n if (t <= n)\n for (let i = 1; i <= t; i++) s.push(i);\n else {\n s.push(1), e > 3 && s.push(\"...\");\n const i = Math.max(2, e - 1), c = Math.min(t - 1, e + 1);\n for (let d = i; d <= c; d++) s.push(d);\n e < t - 2 && s.push(\"...\"), s.push(t);\n }\n return /* @__PURE__ */ p(\"nav\", { className: m(\"flex items-center gap-1\", o), children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r(e - 1),\n disabled: e === 1,\n className: \"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed\",\n children: \"Previous\"\n }\n ),\n s.map(\n (i, c) => i === \"...\" ? /* @__PURE__ */ a(\"span\", { className: \"px-3 py-2\", children: \"...\" }, `ellipsis-${c}`) : /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r(i),\n className: m(\n \"px-3 py-2 rounded\",\n i === e ? \"bg-blue-500 text-white\" : \"hover:bg-gray-100 dark:hover:bg-gray-800\"\n ),\n children: i\n },\n i\n )\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r(e + 1),\n disabled: e === t,\n className: \"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed\",\n children: \"Next\"\n }\n )\n ] });\n}, Ud = ({\n steps: e,\n currentStep: t,\n orientation: r = \"horizontal\",\n clickable: n = !1,\n onStepClick: o,\n className: s\n}) => {\n const i = (d) => {\n n && o && o(d);\n }, c = (d) => d < t ? \"completed\" : d === t ? \"active\" : \"upcoming\";\n return r === \"horizontal\" ? /* @__PURE__ */ a(\"div\", { className: m(\"w-full\", s), children: /* @__PURE__ */ a(\"div\", { className: \"flex items-center justify-between\", children: e.map((d, l) => {\n const g = c(l), u = l === e.length - 1;\n return /* @__PURE__ */ p(U.Fragment, { children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => i(l),\n disabled: !n,\n className: m(\n \"flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all\",\n \"disabled:cursor-default\",\n n && \"hover:scale-110\",\n g === \"completed\" && \"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500\",\n g === \"active\" && \"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500\",\n g === \"upcoming\" && \"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700\"\n ),\n children: g === \"completed\" ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 3,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n ) : d.icon ? /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"w-5 h-5\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : \"text-gray-400 dark:text-gray-600\"\n ),\n children: d.icon\n }\n ) : /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"text-sm font-semibold\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : \"text-gray-400 dark:text-gray-600\"\n ),\n children: l + 1\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"mt-2 text-center\", children: [\n /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n \"text-sm font-medium\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : g === \"completed\" ? \"text-gray-900 dark:text-white\" : \"text-gray-500 dark:text-gray-400\"\n ),\n children: d.label\n }\n ),\n d.description && /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400 mt-0.5\", children: d.description })\n ] })\n ] }),\n !u && /* @__PURE__ */ a(\"div\", { className: \"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative\", children: /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300\",\n l < t ? \"w-full\" : \"w-0\"\n )\n }\n ) })\n ] }, d.id);\n }) }) }) : /* @__PURE__ */ a(\"div\", { className: m(\"w-full\", s), children: /* @__PURE__ */ a(\"div\", { className: \"space-y-4\", children: e.map((d, l) => {\n const g = c(l), u = l === e.length - 1;\n return /* @__PURE__ */ p(\"div\", { className: \"flex gap-4\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => i(l),\n disabled: !n,\n className: m(\n \"flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all\",\n \"disabled:cursor-default flex-shrink-0\",\n n && \"hover:scale-110\",\n g === \"completed\" && \"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500\",\n g === \"active\" && \"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500\",\n g === \"upcoming\" && \"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700\"\n ),\n children: g === \"completed\" ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 3,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n ) : d.icon ? /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"w-5 h-5\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : \"text-gray-400 dark:text-gray-600\"\n ),\n children: d.icon\n }\n ) : /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"text-sm font-semibold\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : \"text-gray-400 dark:text-gray-600\"\n ),\n children: l + 1\n }\n )\n }\n ),\n !u && /* @__PURE__ */ a(\"div\", { className: \"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2\", children: /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300\",\n l < t ? \"h-full\" : \"h-0\"\n )\n }\n ) })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 pb-4\", children: [\n /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n \"text-sm font-medium\",\n g === \"active\" ? \"text-blue-600 dark:text-blue-500\" : g === \"completed\" ? \"text-gray-900 dark:text-white\" : \"text-gray-500 dark:text-gray-400\"\n ),\n children: d.label\n }\n ),\n d.description && /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400 mt-1\", children: d.description })\n ] })\n ] }, d.id);\n }) }) });\n}, jd = ({\n steps: e,\n currentStep: t,\n onStepClick: r,\n orientation: n = \"horizontal\",\n className: o\n}) => /* @__PURE__ */ a(\n \"nav\",\n {\n className: m(\n n === \"horizontal\" ? \"flex items-center\" : \"flex flex-col\",\n o\n ),\n children: e.map((s, i) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"flex items-center\",\n n === \"vertical\" && \"flex-col items-start\"\n ),\n children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => r?.(i),\n disabled: i > t,\n className: m(\n \"w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors\",\n i < t && \"bg-green-500 text-white\",\n i === t && \"bg-blue-500 text-white\",\n i > t && \"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400\"\n ),\n children: i < t ? \"✓\" : i + 1\n }\n ),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"p\", { className: \"font-medium text-gray-900 dark:text-white\", children: s.label }),\n s.description && /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: s.description })\n ] })\n ] }),\n i < e.length - 1 && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n n === \"horizontal\" ? \"w-full h-0.5 mx-4\" : \"h-8 w-0.5 ml-5 my-2\",\n \"bg-gray-300 dark:bg-gray-700\"\n )\n }\n )\n ]\n },\n s.id\n ))\n }\n), Mo = ({\n subsections: e,\n isExpanded: t,\n selectedSubsection: r,\n parentSectionId: n,\n onSubsectionSelect: o\n}) => {\n const s = j(null), [i, c] = M(void 0);\n return R(() => {\n if (s.current) {\n const d = s.current.scrollHeight;\n c(t ? d + 8 : 0);\n }\n }, [t, e]), /* @__PURE__ */ a(\n \"div\",\n {\n className: \"overflow-hidden transition-all duration-300 ease-in-out\",\n style: { height: i !== void 0 ? `${i}px` : \"auto\" },\n children: /* @__PURE__ */ a(\"div\", { ref: s, className: \"ml-6 mt-2 space-y-1\", children: e.map((d) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => o?.(d.id, n),\n className: `block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${r === d.id ? \"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm\" : \"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200\"}`,\n children: d.title\n },\n d.id\n )) })\n }\n );\n}, _d = ({\n sections: e,\n selectedSection: t,\n selectedSubsection: r,\n expandedSections: n,\n onSectionSelect: o,\n onSubsectionSelect: s,\n onToggleSection: i,\n className: c = \"\"\n}) => /* @__PURE__ */ a(\"nav\", { className: `space-y-2 ${c}`, children: e.map((d) => /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => o(d.id),\n className: `flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${t === d.id && !r ? \"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm\" : \"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100\"}`,\n children: d.title\n }\n ),\n d.subsections && d.subsections.length > 0 && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => i(d.id),\n className: \"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200\",\n children: /* @__PURE__ */ a(\n It,\n {\n className: `h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${n.includes(d.id) ? \"rotate-90\" : \"rotate-0\"}`\n }\n )\n }\n )\n ] }),\n d.subsections && /* @__PURE__ */ a(\n Mo,\n {\n subsections: d.subsections,\n isExpanded: n.includes(d.id),\n selectedSubsection: r,\n parentSectionId: d.id,\n onSubsectionSelect: s\n }\n )\n] }, d.id)) });\nfunction zd({\n columns: e,\n data: t,\n keyExtractor: r,\n sort: n,\n onSort: o,\n onRowClick: s,\n striped: i = !1,\n hoverable: c = !1,\n compact: d = !1,\n bordered: l = !1,\n emptyMessage: g = \"No data available\",\n className: u\n}) {\n const b = (h) => {\n h.sortable && o && o(h.key);\n }, f = {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n };\n return /* @__PURE__ */ a(\"div\", { className: m(\"w-full overflow-x-auto\", u), children: /* @__PURE__ */ p(\"table\", { className: \"w-full\", children: [\n /* @__PURE__ */ a(\"thead\", { className: \"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ a(\"tr\", { children: e.map((h) => /* @__PURE__ */ a(\n \"th\",\n {\n className: m(\n d ? \"px-3 py-2\" : \"px-6 py-3\",\n \"text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider\",\n f[h.align || \"left\"],\n h.sortable && \"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700\",\n l && \"border-r border-gray-200 dark:border-gray-700 last:border-r-0\"\n ),\n style: { width: h.width },\n onClick: () => h.sortable && b(h),\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n h.label,\n h.sortable && /* @__PURE__ */ a(\"span\", { className: \"flex flex-col\", children: n?.column === h.key ? n.direction === \"asc\" ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"currentColor\",\n viewBox: \"0 0 20 20\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M5 10l5-5 5 5H5z\" })\n }\n ) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"currentColor\",\n viewBox: \"0 0 20 20\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M15 10l-5 5-5-5h10z\" })\n }\n ) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-gray-400\",\n fill: \"currentColor\",\n viewBox: \"0 0 20 20\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M5 10l5-5 5 5H5z\" })\n }\n ) })\n ] })\n },\n h.key\n )) }) }),\n /* @__PURE__ */ a(\"tbody\", { className: \"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700\", children: t.length === 0 ? /* @__PURE__ */ a(\"tr\", { children: /* @__PURE__ */ a(\n \"td\",\n {\n colSpan: e.length,\n className: \"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400\",\n children: g\n }\n ) }) : t.map((h, y) => /* @__PURE__ */ a(\n \"tr\",\n {\n className: m(\n i && y % 2 === 1 && \"bg-gray-50 dark:bg-gray-800/50\",\n c && \"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors\",\n s && \"cursor-pointer\"\n ),\n onClick: () => s?.(h, y),\n children: e.map((x) => /* @__PURE__ */ a(\n \"td\",\n {\n className: m(\n d ? \"px-3 py-2\" : \"px-6 py-4\",\n \"text-sm text-gray-900 dark:text-white\",\n f[x.align || \"left\"],\n l && \"border-r border-gray-200 dark:border-gray-700 last:border-r-0\"\n ),\n children: x.render ? x.render(h, y) : h[x.key]\n },\n x.key\n ))\n },\n r(h, y)\n )) })\n ] }) });\n}\nconst Bd = ({\n data: e,\n columns: t,\n hasActions: r = !1,\n renderCell: n,\n renderAction: o,\n emptyMessage: s = \"No data available\",\n getRowKey: i = (d, l) => String(l),\n className: c = \"\"\n}) => !e || e.length === 0 ? /* @__PURE__ */ a(\n \"div\",\n {\n className: `text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${c}`,\n children: /* @__PURE__ */ a(\n \"p\",\n {\n className: `${O.body.sm()} text-gray-500 dark:text-gray-400`,\n children: s\n }\n )\n }\n) : /* @__PURE__ */ a(\"div\", { className: `relative ${c}`, children: /* @__PURE__ */ a(\"div\", { className: \"overflow-x-auto\", children: /* @__PURE__ */ p(\"table\", { className: \"w-full border-collapse\", children: [\n /* @__PURE__ */ a(\"thead\", { children: /* @__PURE__ */ p(\"tr\", { className: \"border-b border-gray-200 dark:border-gray-700\", children: [\n t.map((d, l) => /* @__PURE__ */ a(\n \"th\",\n {\n className: `${O.label.default()} text-left py-3 px-4 whitespace-nowrap`,\n children: d\n },\n l\n )),\n r && /* @__PURE__ */ a(\n \"th\",\n {\n className: `${O.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`\n }\n )\n ] }) }),\n /* @__PURE__ */ a(\"tbody\", { children: e.map((d, l) => /* @__PURE__ */ p(\n \"tr\",\n {\n className: \"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50\",\n children: [\n t.map((g, u) => {\n const b = n(d, u);\n return /* @__PURE__ */ a(\"td\", { className: \"py-3 px-4\", children: typeof b == \"string\" ? /* @__PURE__ */ a(\"span\", { className: O.body.sm(), children: b }) : b }, u);\n }),\n r && /* @__PURE__ */ a(\"td\", { className: \"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900\", children: o?.(d) })\n ]\n },\n i(d, l)\n )) })\n] }) }) }), Fd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UdataUgrid\",\n children: t || \"UdataUgrid Component\"\n }\n), Wd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UpivotUtable\",\n children: t || \"UpivotUtable Component\"\n }\n), $d = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UspreadsheetUgrid\",\n children: t || \"UspreadsheetUgrid Component\"\n }\n), Vd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UcolumnUresize\",\n children: t || \"UcolumnUresize Component\"\n }\n), Hd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UcellUeditor\",\n children: t || \"UcellUeditor Component\"\n }\n), qd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UtableUreservation\",\n children: t || \"UtableUreservation Component\"\n }\n), Gd = ({\n children: e,\n type: t = \"unordered\",\n spacing: r = \"sm\",\n marker: n,\n size: o = \"md\",\n className: s\n}) => {\n const i = t === \"ordered\" ? \"ol\" : \"ul\", c = {\n none: \"space-y-0\",\n sm: \"space-y-1\",\n md: \"space-y-2\",\n lg: \"space-y-4\"\n }, d = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\"\n };\n return /* @__PURE__ */ a(\n i,\n {\n className: m(\n \"ml-6\",\n n === \"none\" ? \"list-none\" : t === \"unordered\" ? {\n disc: \"list-disc\",\n circle: \"list-circle\",\n square: \"list-square\",\n decimal: \"list-disc\",\n // fallback\n alpha: \"list-disc\",\n // fallback\n roman: \"list-disc\",\n // fallback\n none: \"list-none\"\n }[n || \"disc\"] : {\n decimal: \"list-decimal\",\n alpha: \"list-alpha\",\n roman: \"list-roman\",\n disc: \"list-decimal\",\n // fallback\n circle: \"list-decimal\",\n // fallback\n square: \"list-decimal\",\n // fallback\n none: \"list-none\"\n }[n || \"decimal\"],\n c[r],\n d[o],\n \"text-gray-900 dark:text-gray-100\",\n s\n ),\n children: e\n }\n );\n}, Yd = ({ children: e, className: t }) => /* @__PURE__ */ a(\"li\", { className: m(\"leading-relaxed\", t), children: e }), Kd = ({\n children: e,\n onAction: t,\n actionText: r = \"Remove\",\n actionIcon: n = Oa,\n destructive: o = !0,\n isProcessing: s = !1,\n variant: i = \"default\",\n className: c\n}) => /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center justify-between p-4 rounded-lg transition-colors\", {\n default: \"bg-gray-50 dark:bg-gray-700\",\n compact: \"bg-gray-50 dark:bg-gray-700 py-2 px-3\",\n elevated: \"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md\"\n}[i], c), children: [\n /* @__PURE__ */ a(\"div\", { className: \"flex-1 text-sm text-gray-900 dark:text-white\", children: e }),\n /* @__PURE__ */ p(\n me,\n {\n variant: o ? \"ghost\" : \"outline\",\n size: \"sm\",\n onClick: t,\n disabled: s,\n className: m(\n \"ml-4\",\n o && \"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20\"\n ),\n children: [\n /* @__PURE__ */ a(n, { className: \"h-4 w-4 mr-1\" }),\n r\n ]\n }\n )\n] }), Zd = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UuserUtable\",\n children: t || \"UuserUtable Component\"\n }\n), Xd = ({\n source: e,\n target: t,\n onChange: r,\n sourceTitle: n = \"Available\",\n targetTitle: o = \"Selected\",\n searchable: s = !0,\n sourceSearchPlaceholder: i = \"Search available...\",\n targetSearchPlaceholder: c = \"Search selected...\",\n height: d = 300,\n disabled: l = !1,\n className: g\n}) => {\n const [u, b] = M(\"\"), [f, h] = M(\"\"), [y, x] = M(/* @__PURE__ */ new Set()), [C, v] = M(/* @__PURE__ */ new Set()), k = s ? e.filter(\n (D) => D.label.toLowerCase().includes(u.toLowerCase())\n ) : e, w = s ? t.filter(\n (D) => D.label.toLowerCase().includes(f.toLowerCase())\n ) : t, S = (D) => {\n const W = new Set(y);\n W.has(D) ? W.delete(D) : W.add(D), x(W);\n }, E = (D) => {\n const W = new Set(C);\n W.has(D) ? W.delete(D) : W.add(D), v(W);\n }, N = () => {\n const D = e.filter(($) => y.has($.id)), W = e.filter(($) => !y.has($.id)), z = [...t, ...D];\n r(W, z), x(/* @__PURE__ */ new Set());\n }, T = () => {\n const D = t.filter(($) => C.has($.id)), W = t.filter(($) => !C.has($.id)), z = [...e, ...D];\n r(z, W), v(/* @__PURE__ */ new Set());\n }, L = () => {\n const D = [...t, ...e];\n r([], D), x(/* @__PURE__ */ new Set());\n }, P = () => {\n const D = [...e, ...t];\n r(D, []), v(/* @__PURE__ */ new Set());\n }, I = (D, W, z, $, q, ee, xa) => /* @__PURE__ */ p(\"div\", { className: \"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800\", children: [\n /* @__PURE__ */ a(\"h3\", { className: \"text-sm font-semibold text-gray-900 dark:text-white\", children: W }),\n /* @__PURE__ */ p(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: [\n D.length,\n \" item\",\n D.length !== 1 ? \"s\" : \"\"\n ] })\n ] }),\n s && /* @__PURE__ */ a(\"div\", { className: \"p-2 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ a(\n \"input\",\n {\n type: \"text\",\n value: q,\n onChange: (se) => ee(se.target.value),\n placeholder: xa,\n className: \"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\"\n }\n ) }),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"overflow-y-auto p-2 space-y-1\",\n style: { height: s ? d - 120 : d - 60 },\n children: D.length === 0 ? /* @__PURE__ */ a(\"div\", { className: \"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400\", children: \"No items\" }) : D.map((se) => {\n const ut = z.has(se.id);\n return /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => !se.disabled && $(se.id),\n disabled: se.disabled || l,\n className: m(\n \"w-full px-3 py-2 text-left rounded-md transition-colors\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n ut && \"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700\"\n ),\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-start gap-2\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5\",\n ut ? \"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500\" : \"border-gray-300 dark:border-gray-600\"\n ),\n children: ut && /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-3 h-3 text-white\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 3,\n d: \"M5 13l4 4L19 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-sm font-medium text-gray-900 dark:text-white truncate\", children: se.label }),\n se.description && /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400 truncate\", children: se.description })\n ] })\n ] })\n },\n se.id\n );\n })\n }\n )\n ] });\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex gap-4\", g), children: [\n I(\n k,\n n,\n y,\n S,\n u,\n b,\n i\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col justify-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: L,\n disabled: l || e.length === 0,\n className: m(\n \"px-3 py-2 text-sm bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n title: \"Move all to selected\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M13 5l7 7-7 7M5 5l7 7-7 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: N,\n disabled: l || y.size === 0,\n className: m(\n \"px-3 py-2 text-sm bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n title: \"Move selected to target\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: T,\n disabled: l || C.size === 0,\n className: m(\n \"px-3 py-2 text-sm bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n title: \"Move selected to source\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M15 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: P,\n disabled: l || t.length === 0,\n className: m(\n \"px-3 py-2 text-sm bg-white dark:bg-gray-900\",\n \"border border-gray-300 dark:border-gray-700\",\n \"rounded-md\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n \"transition-colors\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n title: \"Move all to available\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M11 19l-7-7 7-7M19 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n )\n ] }),\n I(\n w,\n o,\n C,\n E,\n f,\n h,\n c\n )\n ] });\n};\nfunction Jd({\n items: e,\n itemHeight: t,\n height: r,\n renderItem: n,\n keyExtractor: o,\n overscan: s = 3,\n className: i\n}) {\n const [c, d] = M(0), l = j(null), g = (y) => {\n d(y.currentTarget.scrollTop);\n }, u = e.length * t, b = Math.max(0, Math.floor(c / t) - s), f = Math.min(\n e.length - 1,\n Math.ceil((c + r) / t) + s\n ), h = e.slice(b, f + 1);\n return /* @__PURE__ */ a(\n \"div\",\n {\n ref: l,\n className: m(\"overflow-auto\", i),\n style: { height: r },\n onScroll: g,\n children: /* @__PURE__ */ a(\"div\", { style: { height: u, position: \"relative\" }, children: h.map((y, x) => {\n const C = b + x;\n return /* @__PURE__ */ a(\n \"div\",\n {\n style: {\n position: \"absolute\",\n top: C * t,\n height: t,\n width: \"100%\"\n },\n children: n(y, C)\n },\n o(y, C)\n );\n }) })\n }\n );\n}\nconst Qd = ({\n data: e,\n selectedId: t,\n onSelect: r,\n expandedIds: n,\n onExpand: o,\n defaultExpanded: s = !1,\n showLines: i = !1,\n className: c\n}) => {\n const [d, l] = M(\n new Set(s ? e.map((h) => h.id) : [])\n ), g = n !== void 0 ? new Set(n) : d, u = (h) => {\n n !== void 0 && o ? o(h) : l((y) => {\n const x = new Set(y);\n return x.has(h) ? x.delete(h) : x.add(h), x;\n });\n }, b = (h) => {\n !h.disabled && r && r(h);\n }, f = (h, y = 0) => {\n const x = h.children && h.children.length > 0, C = g.has(h.id), v = t === h.id;\n return /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors\",\n !h.disabled && \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n v && \"bg-blue-50 dark:bg-blue-900/30\",\n h.disabled && \"opacity-50 cursor-not-allowed\",\n !h.disabled && \"cursor-pointer\"\n ),\n style: { paddingLeft: `${y * 1.5 + 0.5}rem` },\n onClick: () => b(h),\n children: [\n x ? /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (k) => {\n k.stopPropagation(), u(h.id);\n },\n className: \"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"w-3 h-3 transition-transform\",\n C && \"rotate-90\"\n ),\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n ) : /* @__PURE__ */ a(\"div\", { className: \"w-4 h-4 flex-shrink-0\" }),\n h.icon && /* @__PURE__ */ a(\"span\", { className: \"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400\", children: h.icon }),\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"flex-1 text-sm\",\n v ? \"text-blue-700 dark:text-blue-300 font-medium\" : \"text-gray-900 dark:text-white\"\n ),\n children: h.label\n }\n )\n ]\n }\n ),\n x && C && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n i && \"border-l-2 border-gray-200 dark:border-gray-700 ml-2\"\n ),\n children: h.children.map((k) => f(k, y + 1))\n }\n )\n ] }, h.id);\n };\n return /* @__PURE__ */ a(\"div\", { className: m(\"w-full\", c), children: e.map((h) => f(h, 0)) });\n}, e0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UlistingUform\",\n children: t || \"UlistingUform Component\"\n }\n), Io = \"bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800\", Po = {\n none: \"\",\n sm: \"p-3\",\n md: \"p-6\",\n lg: \"p-8\"\n}, ta = ({\n variant: e = \"elevated\",\n padding: t = \"md\",\n icon: r,\n onClose: n,\n className: o,\n children: s,\n ...i\n}) => {\n const d = [\"info\", \"success\", \"warning\", \"error\"].includes(\n e\n ) && (r || n), l = e === \"callout\" ? Io : ln(\n e\n );\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"rounded-lg\",\n l,\n Po[t],\n o\n ),\n ...i,\n children: d ? /* @__PURE__ */ p(\"div\", { className: \"flex items-start gap-3\", children: [\n r && /* @__PURE__ */ a(\"div\", { className: \"flex-shrink-0 text-lg\", children: r }),\n /* @__PURE__ */ a(\"div\", { className: \"flex-1 min-w-0\", children: s }),\n n && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: n,\n className: \"flex-shrink-0 text-current hover:opacity-70 transition-opacity\",\n \"aria-label\": \"Close\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ] }) : s\n }\n );\n}, t0 = ({\n title: e,\n description: t,\n className: r,\n children: n,\n ...o\n}) => /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1.5\", r), ...o, children: [\n e && /* @__PURE__ */ a(\"h3\", { className: O.heading.h4(), children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: O.body.sm(), children: t }),\n n\n] }), r0 = ({\n className: e,\n children: t,\n ...r\n}) => /* @__PURE__ */ a(\"div\", { className: m(\"\", e), ...r, children: t }), a0 = ({\n className: e,\n children: t,\n ...r\n}) => /* @__PURE__ */ a(\"div\", { className: m(\"flex items-center pt-4\", e), ...r, children: t }), n0 = ({\n title: e,\n children: t,\n variant: r = \"info\",\n size: n = \"default\",\n className: o\n}) => /* @__PURE__ */ p(\n ta,\n {\n variant: r === \"neutral\" ? \"bordered\" : r,\n padding: { sm: \"sm\", default: \"md\", lg: \"lg\" }[n],\n className: o,\n children: [\n e && /* @__PURE__ */ a(\n \"h3\",\n {\n className: m(\n \"font-semibold mb-2\",\n n === \"sm\" ? \"text-base\" : n === \"lg\" ? \"text-xl\" : \"text-lg\"\n ),\n children: e\n }\n ),\n t\n ]\n }\n), o0 = ({\n title: e,\n icon: t,\n children: r,\n variant: n = \"gradient\",\n size: o = \"default\",\n centered: s = !1,\n className: i\n}) => /* @__PURE__ */ a(\n ta,\n {\n variant: n === \"gradient\" || n === \"neutral\" ? \"callout\" : n,\n padding: { sm: \"sm\", default: \"md\", lg: \"lg\" }[o],\n className: i,\n children: /* @__PURE__ */ p(\"div\", { className: m(\"space-y-4\", s && \"text-center\"), children: [\n t && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"font-bold\",\n o === \"sm\" ? \"text-2xl\" : o === \"lg\" ? \"text-5xl\" : \"text-4xl\",\n s ? \"text-center\" : \"text-left\"\n ),\n children: t\n }\n ),\n e && /* @__PURE__ */ a(\n \"h3\",\n {\n className: m(\n \"font-bold mb-4\",\n o === \"sm\" ? \"text-lg\" : o === \"lg\" ? \"text-3xl\" : \"text-2xl\"\n ),\n children: e\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"text-gray-600 dark:text-gray-400\",\n o === \"sm\" ? \"text-sm\" : o === \"lg\" ? \"text-lg\" : \"text-base\"\n ),\n children: r\n }\n )\n ] })\n }\n), s0 = ({\n title: e,\n value: t,\n change: r,\n changePeriod: n = \"vs last period\",\n icon: o,\n variant: s = \"default\",\n className: i\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"rounded-lg border border-gray-200 dark:border-gray-700 p-6\",\n {\n default: \"bg-white dark:bg-gray-900\",\n primary: \"bg-blue-50 dark:bg-blue-900/20\",\n success: \"bg-green-50 dark:bg-green-900/20\",\n warning: \"bg-yellow-50 dark:bg-yellow-900/20\",\n danger: \"bg-red-50 dark:bg-red-900/20\"\n }[s],\n i\n ),\n children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-start justify-between mb-2\", children: [\n /* @__PURE__ */ a(\"h3\", { className: \"text-sm font-medium text-gray-600 dark:text-gray-400\", children: e }),\n o && /* @__PURE__ */ a(\"div\", { className: \"text-gray-400 dark:text-gray-600\", children: o })\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"flex items-end justify-between\", children: /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"p\", { className: \"text-3xl font-bold text-gray-900 dark:text-white\", children: t }),\n r !== void 0 && /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-1 mt-2\", children: [\n /* @__PURE__ */ p(\n \"span\",\n {\n className: m(\n \"text-sm font-medium\",\n r >= 0 ? \"text-green-600 dark:text-green-400\" : \"text-red-600 dark:text-red-400\"\n ),\n children: [\n r >= 0 ? \"↑\" : \"↓\",\n \" \",\n Math.abs(r),\n \"%\"\n ]\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: n })\n ] })\n ] }) })\n ]\n }\n), i0 = ({\n src: e,\n alt: t = \"Avatar\",\n fallback: r,\n name: n,\n size: o = \"md\",\n status: s,\n className: i,\n onClick: c\n}) => {\n const [d, l] = M(!1), g = {\n sm: \"w-8 h-8 text-xs\",\n md: \"w-10 h-10 text-sm\",\n lg: \"w-12 h-12 text-base\"\n }, u = {\n sm: \"w-2 h-2\",\n md: \"w-2.5 h-2.5\",\n lg: \"w-3 h-3\"\n }, b = {\n online: \"bg-green-500\",\n offline: \"bg-gray-400\",\n away: \"bg-yellow-500\",\n busy: \"bg-red-500\"\n }, h = r || (n ? ((C) => {\n const v = C.trim().split(/\\s+/);\n return v.length === 1 ? v[0].charAt(0).toUpperCase() : v[0].charAt(0).toUpperCase() + v[v.length - 1].charAt(0).toUpperCase();\n })(n) : \"\"), y = e && !d, x = () => {\n l(!0);\n };\n return /* @__PURE__ */ p(\"div\", { className: \"relative inline-block flex-shrink-0\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center overflow-hidden rounded-full\",\n g[o],\n !y && \"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200\",\n c && \"cursor-pointer hover:opacity-80 transition-opacity\",\n i\n ),\n onClick: c,\n role: c ? \"button\" : void 0,\n tabIndex: c ? 0 : void 0,\n children: y ? /* @__PURE__ */ a(\n \"img\",\n {\n src: e,\n alt: t,\n className: \"w-full h-full object-cover\",\n onError: x\n }\n ) : /* @__PURE__ */ a(\"span\", { className: \"font-semibold\", children: h })\n }\n ),\n s && /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800\",\n b[s],\n u[o]\n ),\n \"aria-label\": s\n }\n )\n ] });\n}, l0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UavatarUgroup\",\n children: t || \"UavatarUgroup Component\"\n }\n), c0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UprofileUheader\",\n children: t || \"UprofileUheader Component\"\n }\n), d0 = ({\n label: e,\n value: t,\n orientation: r = \"vertical\",\n align: n = \"start\",\n labelWidth: o = \"auto\",\n size: s = \"md\",\n separator: i = !1,\n labelVariant: c = \"muted\",\n valueVariant: d = \"default\",\n className: l,\n labelClassName: g,\n valueClassName: u\n}) => {\n const b = {\n sm: {\n label: O.body.sm(),\n value: O.body.sm(),\n gap: \"gap-1\"\n },\n md: {\n label: O.body.md(),\n value: O.body.md(),\n gap: \"gap-2\"\n },\n lg: {\n label: O.body.lg(),\n value: O.body.lg(),\n gap: \"gap-3\"\n }\n }, f = {\n auto: \"\",\n sm: \"w-24\",\n md: \"w-32\",\n lg: \"w-40\"\n }, h = {\n start: \"justify-start\",\n center: \"justify-center\",\n between: \"justify-between\"\n }, y = {\n default: \"text-gray-700 dark:text-gray-300\",\n muted: \"text-gray-600 dark:text-gray-400\",\n strong: \"text-gray-900 dark:text-gray-100 font-semibold\"\n }, x = {\n default: \"text-gray-900 dark:text-gray-100\",\n muted: \"text-gray-600 dark:text-gray-400\",\n strong: \"text-gray-900 dark:text-gray-100 font-semibold\",\n primary: \"text-blue-600 dark:text-blue-400\"\n }, C = b[s];\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n r === \"horizontal\" ? \"flex items-center\" : \"flex flex-col\",\n r === \"horizontal\" && h[n],\n C.gap,\n i && \"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700\",\n l\n ),\n children: [\n /* @__PURE__ */ a(\n \"dt\",\n {\n className: m(\n C.label,\n y[c],\n r === \"horizontal\" && f[o],\n r === \"horizontal\" && \"flex-shrink-0\",\n g\n ),\n children: e\n }\n ),\n /* @__PURE__ */ a(\n \"dd\",\n {\n className: m(\n C.value,\n x[d],\n r === \"horizontal\" && \"flex-1\",\n u\n ),\n children: t\n }\n )\n ]\n }\n );\n}, u0 = ({\n value: e,\n label: t,\n variant: r = \"neutral\",\n size: n = \"md\",\n align: o = \"center\",\n icon: s,\n iconPosition: i = \"top\",\n className: c,\n valueClassName: d,\n labelClassName: l\n}) => {\n const g = {\n primary: {\n value: \"text-blue-600 dark:text-blue-400\",\n label: \"text-blue-600/70 dark:text-blue-400/70\",\n icon: \"text-blue-600 dark:text-blue-400\"\n },\n success: {\n value: \"text-green-600 dark:text-green-400\",\n label: \"text-green-600/70 dark:text-green-400/70\",\n icon: \"text-green-600 dark:text-green-400\"\n },\n warning: {\n value: \"text-yellow-600 dark:text-yellow-400\",\n label: \"text-yellow-600/70 dark:text-yellow-400/70\",\n icon: \"text-yellow-600 dark:text-yellow-400\"\n },\n danger: {\n value: \"text-red-600 dark:text-red-400\",\n label: \"text-red-600/70 dark:text-red-400/70\",\n icon: \"text-red-600 dark:text-red-400\"\n },\n neutral: {\n value: \"text-gray-900 dark:text-gray-100\",\n label: \"text-gray-600 dark:text-gray-400\",\n icon: \"text-gray-600 dark:text-gray-400\"\n },\n white: {\n value: \"text-white\",\n label: \"text-white/70\",\n icon: \"text-white\"\n }\n }, u = {\n sm: {\n value: O.heading.h5(),\n label: O.caption.default(),\n icon: \"h-4 w-4\"\n },\n md: {\n value: O.heading.h4(),\n label: O.body.sm(),\n icon: \"h-5 w-5\"\n },\n lg: {\n value: O.heading.h3(),\n label: O.body.md(),\n icon: \"h-6 w-6\"\n },\n xl: {\n value: O.heading.h2(),\n label: O.body.lg(),\n icon: \"h-8 w-8\"\n }\n }, b = {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\"\n }, f = g[r], h = u[n];\n return /* @__PURE__ */ p(\"div\", { className: m(b[o], c), children: [\n s && i === \"top\" && /* @__PURE__ */ a(\n s,\n {\n className: m(\n h.icon,\n f.icon,\n \"mb-2\",\n o === \"center\" && \"mx-auto\"\n )\n }\n ),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n i === \"left\" && s && \"flex items-center gap-3\",\n o === \"center\" && i === \"left\" && \"justify-center\"\n ),\n children: [\n s && i === \"left\" && /* @__PURE__ */ a(s, { className: m(h.icon, f.icon) }),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"font-bold\",\n h.value,\n f.value,\n d\n ),\n children: e\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n h.label,\n f.label,\n l\n ),\n children: t\n }\n )\n ] })\n ]\n }\n )\n ] });\n}, Ro = ({\n icon: e,\n title: t = \"No data\",\n description: r,\n action: n,\n className: o\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"flex flex-col items-center justify-center py-12 px-4 text-center\",\n o\n ),\n children: [\n e && /* @__PURE__ */ a(\"div\", { className: \"mb-4 text-gray-400 dark:text-gray-600\", children: e }),\n /* @__PURE__ */ a(\"h3\", { className: m(O.heading.h3(), \"mb-2\"), children: t }),\n r && /* @__PURE__ */ a(\n \"p\",\n {\n className: m(\n O.body.sm(),\n \"text-gray-600 dark:text-gray-400 max-w-sm mb-6\"\n ),\n children: r\n }\n ),\n n && /* @__PURE__ */ a(\"div\", { className: \"mt-4\", children: n })\n ]\n }\n), g0 = ({\n title: e,\n subtext: t,\n className: r\n}) => /* @__PURE__ */ a(Ro, { title: e, description: t, className: r }), m0 = ({\n data: e,\n orientation: t = \"vertical\",\n showValues: r = !1,\n showGrid: n = !0,\n barWidth: o = 40,\n height: s = 300,\n className: i\n}) => {\n const c = Math.max(...e.map((l) => l.value)), d = \"#3b82f6\";\n return /* @__PURE__ */ a(\"div\", { className: m(\"w-full\", i), children: /* @__PURE__ */ p(\n \"div\",\n {\n className: \"relative bg-white dark:bg-gray-900 rounded-lg p-6\",\n style: { height: `${s}px` },\n children: [\n n && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-6 flex flex-col justify-between\", children: [...Array(5)].map((l, g) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"border-t border-gray-200 dark:border-gray-700\"\n },\n g\n )) }),\n t === \"vertical\" ? /* @__PURE__ */ a(\"div\", { className: \"relative h-full flex items-end justify-around gap-2\", children: e.map((l, g) => {\n const u = l.value / c * 100;\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: \"flex flex-col items-center gap-2\",\n style: { width: `${o}px` },\n children: [\n r && /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: l.value }),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"w-full rounded-t transition-all hover:opacity-80\",\n style: {\n height: `${u}%`,\n backgroundColor: l.color || d\n }\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: l.label })\n ]\n },\n g\n );\n }) }) : /* @__PURE__ */ a(\"div\", { className: \"relative h-full flex flex-col justify-around gap-2\", children: e.map((l, g) => {\n const u = l.value / c * 100;\n return /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-4\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-600 dark:text-gray-400 w-16 text-right\", children: l.label }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"h-8 rounded transition-all hover:opacity-80\",\n style: {\n width: `${u}%`,\n backgroundColor: l.color || d\n }\n }\n ),\n r && /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: l.value })\n ] })\n ] }, g);\n }) })\n ]\n }\n ) });\n}, h0 = ({\n series: e,\n showLegend: t = !0,\n showGrid: r = !0,\n showPoints: n = !0,\n height: o = 300,\n xLabels: s,\n className: i\n}) => {\n const c = e.flatMap((f) => f.data), d = Math.max(...c.map((f) => f.y)), l = Math.min(...c.map((f) => f.y)), g = Math.max(...c.map((f) => f.x)), u = [\"#3b82f6\", \"#10b981\", \"#f59e0b\", \"#ef4444\", \"#8b5cf6\"], b = (f) => f.length === 0 ? \"\" : `M ${f.map((y) => {\n const x = y.x / g * 100, C = 100 - (y.y - l) / (d - l) * 100;\n return `${x},${C}`;\n }).join(\" L \")}`;\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", i), children: [\n t && /* @__PURE__ */ a(\"div\", { className: \"flex flex-wrap gap-4 mb-4\", children: e.map((f, h) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"w-3 h-3 rounded-full\",\n style: {\n backgroundColor: f.color || u[h % u.length]\n }\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: f.name })\n ] }, h)) }),\n /* @__PURE__ */ p(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg p-6\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative\", style: { height: `${o}px` }, children: [\n r && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0\", children: [...Array(5)].map((f, h) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute w-full border-t border-gray-200 dark:border-gray-700\",\n style: { top: `${h * 25}%` }\n },\n h\n )) }),\n /* @__PURE__ */ a(\n \"svg\",\n {\n viewBox: \"0 0 100 100\",\n preserveAspectRatio: \"none\",\n className: \"absolute inset-0 w-full h-full\",\n children: e.map((f, h) => {\n const y = f.color || u[h % u.length];\n return /* @__PURE__ */ p(\"g\", { children: [\n /* @__PURE__ */ a(\n \"path\",\n {\n d: b(f.data),\n fill: \"none\",\n stroke: y,\n strokeWidth: \"0.5\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n n && f.data.map((x, C) => {\n const v = x.x / g * 100, k = 100 - (x.y - l) / (d - l) * 100;\n return /* @__PURE__ */ a(\n \"circle\",\n {\n cx: v,\n cy: k,\n r: \"1\",\n fill: y,\n vectorEffect: \"non-scaling-stroke\"\n },\n C\n );\n })\n ] }, h);\n })\n }\n )\n ] }),\n s && /* @__PURE__ */ a(\"div\", { className: \"flex justify-between mt-2\", children: s.map((f, h) => /* @__PURE__ */ a(\n \"span\",\n {\n className: \"text-xs text-gray-600 dark:text-gray-400\",\n children: f\n },\n h\n )) })\n ] })\n ] });\n}, f0 = ({\n data: e,\n variant: t = \"pie\",\n showLegend: r = !0,\n showPercentages: n = !1,\n size: o = 200,\n donutHoleSize: s = 40,\n className: i\n}) => {\n const c = e.reduce((h, y) => h + y.value, 0), d = [\n \"#3b82f6\",\n \"#10b981\",\n \"#f59e0b\",\n \"#ef4444\",\n \"#8b5cf6\",\n \"#ec4899\"\n ], l = e.reduce((h, y, x) => {\n const C = y.value / c * 100, v = C / 100 * 360, k = h.length > 0 ? h[h.length - 1].endAngle : -90, w = k + v;\n return h.push({\n ...y,\n percentage: C,\n startAngle: k,\n endAngle: w,\n color: y.color || d[x % d.length]\n }), h;\n }, []), g = (h, y, x, C) => {\n const v = (C - 90) * Math.PI / 180;\n return {\n x: h + x * Math.cos(v),\n y: y + x * Math.sin(v)\n };\n }, u = (h, y, x, C, v) => {\n const k = g(h, y, x, v), w = g(h, y, x, C), S = v - C <= 180 ? \"0\" : \"1\";\n if (t === \"donut\") {\n const E = x * s / 100, N = g(h, y, E, v), T = g(h, y, E, C);\n return [\n \"M\",\n k.x,\n k.y,\n \"A\",\n x,\n x,\n 0,\n S,\n 0,\n w.x,\n w.y,\n \"L\",\n T.x,\n T.y,\n \"A\",\n E,\n E,\n 0,\n S,\n 1,\n N.x,\n N.y,\n \"Z\"\n ].join(\" \");\n }\n return [\n \"M\",\n h,\n y,\n \"L\",\n k.x,\n k.y,\n \"A\",\n x,\n x,\n 0,\n S,\n 0,\n w.x,\n w.y,\n \"Z\"\n ].join(\" \");\n }, b = o / 2, f = o / 2 - 10;\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex flex-col items-center gap-4\", i), children: [\n /* @__PURE__ */ a(\"svg\", { width: o, height: o, className: \"transform rotate-0\", children: l.map((h, y) => /* @__PURE__ */ a(\n \"path\",\n {\n d: u(\n b,\n b,\n f,\n h.startAngle,\n h.endAngle\n ),\n fill: h.color,\n className: \"transition-opacity hover:opacity-80\"\n },\n y\n )) }),\n r && /* @__PURE__ */ a(\"div\", { className: \"flex flex-col gap-2\", children: l.map((h, y) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"w-3 h-3 rounded-sm\",\n style: { backgroundColor: h.color }\n }\n ),\n /* @__PURE__ */ p(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: [\n h.label,\n n && /* @__PURE__ */ p(\"span\", { className: \"text-gray-500 dark:text-gray-400 ml-1\", children: [\n \"(\",\n Math.round(h.percentage),\n \"%)\"\n ] })\n ] })\n ] }, y)) })\n ] });\n}, b0 = ({\n series: e,\n showLegend: t = !0,\n showGrid: r = !0,\n fillOpacity: n = 0.2,\n height: o = 300,\n xLabels: s,\n className: i\n}) => {\n const c = e.flatMap((h) => h.data), d = Math.max(...c.map((h) => h.y)), l = Math.min(...c.map((h) => h.y)), g = Math.max(...c.map((h) => h.x)), u = [\"#3b82f6\", \"#10b981\", \"#f59e0b\", \"#ef4444\", \"#8b5cf6\"], b = (h) => {\n if (h.length === 0) return \"\";\n const y = h.map((v) => {\n const k = v.x / g * 100, w = 100 - (v.y - l) / (d - l) * 100;\n return `${k},${w}`;\n }), x = h[0].x / g * 100, C = h[h.length - 1].x / g * 100;\n return `M ${x},100 L ${y.join(\" L \")} L ${C},100 Z`;\n }, f = (h) => h.length === 0 ? \"\" : `M ${h.map((x) => {\n const C = x.x / g * 100, v = 100 - (x.y - l) / (d - l) * 100;\n return `${C},${v}`;\n }).join(\" L \")}`;\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", i), children: [\n t && /* @__PURE__ */ a(\"div\", { className: \"flex flex-wrap gap-4 mb-4\", children: e.map((h, y) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"w-3 h-3 rounded-full\",\n style: {\n backgroundColor: h.color || u[y % u.length]\n }\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: h.name })\n ] }, y)) }),\n /* @__PURE__ */ p(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg p-6\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative\", style: { height: `${o}px` }, children: [\n r && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0\", children: [...Array(5)].map((h, y) => /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute w-full border-t border-gray-200 dark:border-gray-700\",\n style: { top: `${y * 25}%` }\n },\n y\n )) }),\n /* @__PURE__ */ a(\n \"svg\",\n {\n viewBox: \"0 0 100 100\",\n preserveAspectRatio: \"none\",\n className: \"absolute inset-0 w-full h-full\",\n children: e.map((h, y) => {\n const x = h.color || u[y % u.length];\n return /* @__PURE__ */ p(\"g\", { children: [\n /* @__PURE__ */ a(\n \"path\",\n {\n d: b(h.data),\n fill: x,\n fillOpacity: n\n }\n ),\n /* @__PURE__ */ a(\n \"path\",\n {\n d: f(h.data),\n fill: \"none\",\n stroke: x,\n strokeWidth: \"0.5\",\n vectorEffect: \"non-scaling-stroke\"\n }\n )\n ] }, y);\n })\n }\n )\n ] }),\n s && /* @__PURE__ */ a(\"div\", { className: \"flex justify-between mt-2\", children: s.map((h, y) => /* @__PURE__ */ a(\n \"span\",\n {\n className: \"text-xs text-gray-600 dark:text-gray-400\",\n children: h\n },\n y\n )) })\n ] })\n ] });\n}, p0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UradarUchart\",\n children: t || \"UradarUchart Component\"\n }\n), y0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UbubbleUchart\",\n children: t || \"UbubbleUchart Component\"\n }\n), x0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UscatterUplot\",\n children: t || \"UscatterUplot Component\"\n }\n), v0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UtreeUmap\",\n children: t || \"UtreeUmap Component\"\n }\n), w0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UsankeyUdiagram\",\n children: t || \"UsankeyUdiagram Component\"\n }\n), k0 = ({\n data: e,\n width: t = 100,\n height: r = 30,\n color: n = \"#3b82f6\",\n fill: o = !1,\n className: s\n}) => {\n if (e.length === 0) return null;\n const i = Math.max(...e), c = Math.min(...e), d = i - c || 1, l = e.map((g, u) => {\n const b = u / (e.length - 1) * t, f = r - (g - c) / d * r;\n return `${b},${f}`;\n }).join(\" \");\n return /* @__PURE__ */ p(\n \"svg\",\n {\n width: t,\n height: r,\n className: m(\"inline-block\", s),\n children: [\n o && /* @__PURE__ */ a(\n \"polygon\",\n {\n points: `0,${r} ${l} ${t},${r}`,\n fill: n,\n opacity: \"0.2\"\n }\n ),\n /* @__PURE__ */ a(\n \"polyline\",\n {\n points: l,\n fill: \"none\",\n stroke: n,\n strokeWidth: \"2\",\n strokeLinejoin: \"round\",\n strokeLinecap: \"round\"\n }\n )\n ]\n }\n );\n}, N0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"Uheatmap\",\n children: t || \"Uheatmap Component\"\n }\n), C0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UfunnelUchart\",\n children: t || \"UfunnelUchart Component\"\n }\n), S0 = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"BurndownChart\",\n children: t || \"BurndownChart Component\"\n }\n), E0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UperformanceUchart\",\n children: t || \"UperformanceUchart Component\"\n }\n), A0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UmetricUcomparison\",\n children: t || \"UmetricUcomparison Component\"\n }\n), T0 = ({\n value: e,\n min: t = 0,\n max: r = 100,\n size: n = 120,\n strokeWidth: o = 10,\n showValue: s = !0,\n label: i,\n variant: c = \"primary\",\n className: d\n}) => {\n const l = Math.min(r, Math.max(t, e)), g = (l - t) / (r - t) * 100, u = n / 2, b = (n - o) / 2, f = Math.PI * b, h = f - g / 100 * f, y = {\n primary: \"stroke-blue-600 dark:stroke-blue-500\",\n success: \"stroke-green-600 dark:stroke-green-500\",\n warning: \"stroke-yellow-600 dark:stroke-yellow-500\",\n danger: \"stroke-red-600 dark:stroke-red-500\"\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex flex-col items-center gap-2\", d), children: [\n /* @__PURE__ */ p(\"svg\", { width: n, height: n * 0.65, className: \"transform rotate-180\", children: [\n /* @__PURE__ */ a(\n \"path\",\n {\n d: `M ${o / 2} ${u} A ${b} ${b} 0 0 1 ${n - o / 2} ${u}`,\n fill: \"none\",\n className: \"stroke-gray-200 dark:stroke-gray-700\",\n strokeWidth: o,\n strokeLinecap: \"round\"\n }\n ),\n /* @__PURE__ */ a(\n \"path\",\n {\n d: `M ${o / 2} ${u} A ${b} ${b} 0 0 1 ${n - o / 2} ${u}`,\n fill: \"none\",\n className: m(y[c], \"transition-all duration-500\"),\n strokeWidth: o,\n strokeDasharray: f,\n strokeDashoffset: h,\n strokeLinecap: \"round\"\n }\n )\n ] }),\n s && /* @__PURE__ */ p(\"div\", { className: \"text-center -mt-8\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"text-2xl font-bold text-gray-900 dark:text-white\", children: Math.round(l) }),\n i && /* @__PURE__ */ a(\"div\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: i })\n ] })\n ] });\n}, L0 = ({\n value: e = 0,\n max: t = 100,\n variant: r = \"default\",\n size: n = \"md\",\n showLabel: o = !1,\n label: s,\n indeterminate: i = !1,\n striped: c = !1,\n animated: d = !1,\n className: l\n}) => {\n const g = Math.min(Math.max(e / t * 100, 0), 100), u = {\n default: \"bg-blue-600 dark:bg-blue-500\",\n success: \"bg-green-600 dark:bg-green-500\",\n warning: \"bg-yellow-600 dark:bg-yellow-500\",\n danger: \"bg-red-600 dark:bg-red-500\"\n }, b = {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-4\"\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"w-full\", l), children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden\",\n b[n]\n ),\n role: \"progressbar\",\n \"aria-valuenow\": i ? void 0 : g,\n \"aria-valuemin\": 0,\n \"aria-valuemax\": 100,\n children: i ? /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"h-full rounded-full animate-pulse\",\n u[r]\n ),\n style: { width: \"100%\" }\n }\n ) : /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"h-full rounded-full transition-all duration-300\",\n u[r],\n c && \"bg-stripe\",\n c && d && \"animate-stripe\"\n ),\n style: { width: `${g}%` }\n }\n )\n }\n ),\n (o || s) && /* @__PURE__ */ a(\"div\", { className: \"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right\", children: s || `${Math.round(g)}%` })\n ] });\n}, M0 = ({\n value: e,\n size: t = 100,\n strokeWidth: r = 8,\n showValue: n = !0,\n label: o,\n variant: s = \"primary\",\n color: i,\n trackColor: c,\n className: d\n}) => {\n const l = Math.min(100, Math.max(0, e)), g = t / 2, u = (t - r) / 2, b = 2 * Math.PI * u, f = b - l / 100 * b, h = {\n primary: \"stroke-blue-600 dark:stroke-blue-500\",\n success: \"stroke-green-600 dark:stroke-green-500\",\n warning: \"stroke-yellow-600 dark:stroke-yellow-500\",\n danger: \"stroke-red-600 dark:stroke-red-500\"\n }, y = c || \"stroke-gray-200 dark:stroke-gray-700\";\n return /* @__PURE__ */ a(\"div\", { className: m(\"inline-flex items-center justify-center\", d), children: /* @__PURE__ */ p(\"div\", { className: \"relative\", style: { width: t, height: t }, children: [\n /* @__PURE__ */ p(\"svg\", { width: t, height: t, className: \"transform -rotate-90\", children: [\n /* @__PURE__ */ a(\n \"circle\",\n {\n cx: g,\n cy: g,\n r: u,\n className: y,\n strokeWidth: r,\n fill: \"none\"\n }\n ),\n /* @__PURE__ */ a(\n \"circle\",\n {\n cx: g,\n cy: g,\n r: u,\n className: m(\n i ? \"\" : h[s],\n \"transition-all duration-300 ease-in-out\"\n ),\n stroke: i,\n strokeWidth: r,\n strokeDasharray: b,\n strokeDashoffset: f,\n strokeLinecap: \"round\",\n fill: \"none\"\n }\n )\n ] }),\n (n || o) && /* @__PURE__ */ p(\"div\", { className: \"absolute inset-0 flex flex-col items-center justify-center\", children: [\n n && !o && /* @__PURE__ */ p(\n \"span\",\n {\n className: \"text-gray-900 dark:text-white font-bold\",\n style: { fontSize: t * 0.2 },\n children: [\n Math.round(l),\n \"%\"\n ]\n }\n ),\n o && /* @__PURE__ */ a(\n \"span\",\n {\n className: \"text-gray-900 dark:text-white font-medium text-center px-2\",\n style: { fontSize: t * 0.15 },\n children: o\n }\n )\n ] })\n ] }) });\n}, I0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UprogressUtracker\",\n children: t || \"UprogressUtracker Component\"\n }\n), P0 = ({\n src: e,\n alt: t,\n fallback: r,\n width: n,\n height: o,\n objectFit: s = \"cover\",\n loading: i = \"lazy\",\n showLoader: c = !0,\n rounded: d = \"none\",\n border: l = !1,\n className: g,\n onLoad: u,\n onError: b\n}) => {\n const [f, h] = M(!0), [y, x] = M(!1), [C, v] = M(e);\n R(() => {\n h(!0), x(!1), v(e);\n }, [e]);\n const k = () => {\n h(!1), u?.();\n }, w = () => {\n h(!1), x(!0), r && C !== r && (v(r), x(!1), h(!0)), b?.();\n }, S = {\n none: \"\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n }, E = {\n contain: \"object-contain\",\n cover: \"object-cover\",\n fill: \"object-fill\",\n none: \"object-none\",\n \"scale-down\": \"object-scale-down\"\n }, N = {\n width: typeof n == \"number\" ? `${n}px` : n,\n height: typeof o == \"number\" ? `${o}px` : o\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800\",\n S[d],\n l && \"border border-gray-200 dark:border-gray-700\",\n g\n ),\n style: N,\n children: [\n c && f && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0 flex items-center justify-center\", children: /* @__PURE__ */ a(\"div\", { className: \"animate-pulse\", children: /* @__PURE__ */ a(Gt, { className: \"h-8 w-8 text-gray-400\" }) }) }),\n y && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0 flex items-center justify-center\", children: /* @__PURE__ */ a(Gt, { className: \"h-8 w-8 text-gray-400\" }) }),\n !y && /* @__PURE__ */ a(\n \"img\",\n {\n src: C,\n alt: t,\n loading: i,\n onLoad: k,\n onError: w,\n className: m(\n \"w-full h-full\",\n E[s],\n f && c && \"opacity-0\"\n )\n }\n )\n ]\n }\n );\n}, R0 = ({\n images: e,\n columns: t = 3,\n gap: r = 16,\n lightbox: n = !0,\n className: o\n}) => {\n const [s, i] = M(null), c = (u) => {\n n && i(u);\n }, d = () => {\n i(null);\n }, l = () => {\n if (!s) return;\n const u = e.findIndex((f) => f.id === s.id), b = u > 0 ? u - 1 : e.length - 1;\n i(e[b]);\n }, g = () => {\n if (!s) return;\n const u = e.findIndex((f) => f.id === s.id), b = u < e.length - 1 ? u + 1 : 0;\n i(e[b]);\n };\n return /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\"grid\", o),\n style: {\n gridTemplateColumns: `repeat(${t}, 1fr)`,\n gap: `${r}px`\n },\n children: e.map((u) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700\",\n n && \"cursor-pointer hover:opacity-90 transition-opacity\"\n ),\n onClick: () => c(u),\n children: [\n /* @__PURE__ */ a(\n \"img\",\n {\n src: u.thumbnail || u.src,\n alt: u.alt || \"\",\n className: \"w-full h-full object-cover\"\n }\n ),\n u.caption && /* @__PURE__ */ a(\"div\", { className: \"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2\", children: u.caption })\n ]\n },\n u.id\n ))\n }\n ),\n n && s && /* @__PURE__ */ p(\n \"div\",\n {\n className: \"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4\",\n onClick: d,\n children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: d,\n className: \"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (u) => {\n u.stopPropagation(), l();\n },\n className: \"absolute left-4 text-white hover:text-gray-300 transition-colors\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M15 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: (u) => {\n u.stopPropagation(), g();\n },\n className: \"absolute right-4 text-white hover:text-gray-300 transition-colors\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: \"max-w-4xl max-h-full\",\n onClick: (u) => u.stopPropagation(),\n children: [\n /* @__PURE__ */ a(\n \"img\",\n {\n src: s.src,\n alt: s.alt || \"\",\n className: \"max-w-full max-h-[80vh] object-contain\"\n }\n ),\n s.caption && /* @__PURE__ */ a(\"p\", { className: \"text-white text-center mt-4\", children: s.caption })\n ]\n }\n )\n ]\n }\n )\n ] });\n}, O0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UimageUcomparison\",\n children: t || \"UimageUcomparison Component\"\n }\n), D0 = ({\n src: e,\n onCropComplete: t,\n initialCrop: r,\n className: n\n}) => {\n const [o, s] = M(\n r || { x: 50, y: 50, width: 200, height: 200 }\n ), i = j(null), c = async () => {\n if (!i.current || !t) return;\n const d = document.createElement(\"canvas\"), l = d.getContext(\"2d\");\n if (!l) return;\n const g = i.current, u = g.naturalWidth / g.width, b = g.naturalHeight / g.height;\n d.width = o.width * u, d.height = o.height * b, l.drawImage(\n g,\n o.x * u,\n o.y * b,\n o.width * u,\n o.height * b,\n 0,\n 0,\n d.width,\n d.height\n );\n const f = d.toDataURL(\"image/png\");\n t(f, o);\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex flex-col gap-4\", n), children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative inline-block\", children: [\n /* @__PURE__ */ a(\n \"img\",\n {\n ref: i,\n src: e,\n alt: \"Crop preview\",\n className: \"max-w-full h-auto\",\n crossOrigin: \"anonymous\"\n }\n ),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: \"absolute border-2 border-blue-500 bg-blue-500/20\",\n style: {\n left: `${o.x}px`,\n top: `${o.y}px`,\n width: `${o.width}px`,\n height: `${o.height}px`,\n cursor: \"move\"\n },\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize\" }),\n /* @__PURE__ */ a(\"div\", { className: \"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize\" }),\n /* @__PURE__ */ a(\"div\", { className: \"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize\" }),\n /* @__PURE__ */ a(\"div\", { className: \"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize\" })\n ]\n }\n )\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-2\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: c,\n className: m(\n \"px-4 py-2 text-sm font-medium\",\n \"bg-blue-600 dark:bg-blue-500 text-white\",\n \"rounded-md\",\n \"hover:bg-blue-700 dark:hover:bg-blue-600\",\n \"transition-colors\"\n ),\n children: \"Crop Image\"\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => s(\n r || { x: 50, y: 50, width: 200, height: 200 }\n ),\n className: m(\n \"px-4 py-2 text-sm font-medium\",\n \"bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white\",\n \"rounded-md\",\n \"hover:bg-gray-300 dark:hover:bg-gray-600\",\n \"transition-colors\"\n ),\n children: \"Reset\"\n }\n )\n ] }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400\", children: 'Drag to adjust crop area. Click \"Crop Image\" to export.' })\n ] });\n}, U0 = ({\n images: e,\n index: t,\n isOpen: r,\n onClose: n,\n onIndexChange: o,\n showThumbnails: s = !1,\n showDownload: i = !1,\n showZoom: c = !0,\n className: d\n}) => {\n const [l, g] = M(1), u = e[t], b = t > 0, f = t < e.length - 1, h = _(() => {\n if (b) {\n const w = t - 1;\n o?.(w), g(1);\n }\n }, [b, t, o]), y = _(() => {\n if (f) {\n const w = t + 1;\n o?.(w), g(1);\n }\n }, [f, t, o]), x = () => {\n g((w) => Math.min(w + 0.5, 3));\n }, C = () => {\n g((w) => Math.max(w - 0.5, 0.5));\n }, v = () => {\n g(1);\n }, k = () => {\n const w = document.createElement(\"a\");\n w.href = u.src, w.download = u.alt || \"image\", w.click();\n };\n return R(() => {\n if (!r) return;\n const w = (S) => {\n switch (S.key) {\n case \"Escape\":\n n();\n break;\n case \"ArrowLeft\":\n h();\n break;\n case \"ArrowRight\":\n y();\n break;\n case \"+\":\n case \"=\":\n x();\n break;\n case \"-\":\n case \"_\":\n C();\n break;\n case \"0\":\n v();\n break;\n }\n };\n return document.addEventListener(\"keydown\", w), () => document.removeEventListener(\"keydown\", w);\n }, [r, t, e.length, n, h, y]), R(() => (r ? document.body.style.overflow = \"hidden\" : document.body.style.overflow = \"\", () => {\n document.body.style.overflow = \"\";\n }), [r]), R(() => {\n g(1);\n }, [t]), !r || !u ? null : /* @__PURE__ */ a(Le, { children: /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"fixed inset-0 z-50 flex items-center justify-center\",\n \"bg-black/95\",\n d\n ),\n children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute inset-0\",\n onClick: n,\n \"aria-label\": \"Close lightbox\"\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: n,\n className: \"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors\",\n \"aria-label\": \"Close\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n ),\n b && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: h,\n className: \"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all\",\n \"aria-label\": \"Previous image\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M15 19l-7-7 7-7\"\n }\n )\n }\n )\n }\n ),\n f && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: y,\n className: \"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all\",\n \"aria-label\": \"Next image\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"absolute top-4 left-4 z-10 flex gap-2\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md\", children: [\n t + 1,\n \" / \",\n e.length\n ] }),\n c && /* @__PURE__ */ p(\"div\", { className: \"flex gap-1 bg-black/50 rounded-md p-1\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: C,\n className: \"p-1.5 text-white hover:text-gray-300 transition-colors\",\n \"aria-label\": \"Zoom out\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ p(\n \"button\",\n {\n onClick: v,\n className: \"px-2 text-white text-sm hover:text-gray-300 transition-colors\",\n \"aria-label\": \"Reset zoom\",\n children: [\n Math.round(l * 100),\n \"%\"\n ]\n }\n ),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: x,\n className: \"p-1.5 text-white hover:text-gray-300 transition-colors\",\n \"aria-label\": \"Zoom in\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7\"\n }\n )\n }\n )\n }\n )\n ] }),\n i && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: k,\n className: \"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors\",\n \"aria-label\": \"Download image\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\"\n }\n )\n }\n )\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20\", children: /* @__PURE__ */ a(\n \"img\",\n {\n src: u.src,\n alt: u.alt || \"\",\n className: \"max-w-full max-h-full object-contain transition-transform\",\n style: {\n transform: `scale(${l})`\n }\n }\n ) }),\n u.caption && /* @__PURE__ */ a(\"div\", { className: \"absolute bottom-20 left-0 right-0 z-10 text-center\", children: /* @__PURE__ */ a(\"p\", { className: \"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl\", children: u.caption }) }),\n s && e.length > 1 && /* @__PURE__ */ a(\"div\", { className: \"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto\", children: e.map((w, S) => /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => {\n o?.(S), g(1);\n },\n className: m(\n \"flex-shrink-0 w-16 h-16 rounded-md overflow-hidden\",\n \"border-2 transition-all\",\n S === t ? \"border-white scale-110\" : \"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400\"\n ),\n children: /* @__PURE__ */ a(\n \"img\",\n {\n src: w.thumbnail || w.src,\n alt: w.alt || \"\",\n className: \"w-full h-full object-cover\"\n }\n )\n },\n S\n )) })\n ]\n }\n ) });\n}, j0 = ({\n src: e,\n alt: t,\n scale: r = 2,\n className: n,\n containerClassName: o,\n onLoad: s,\n onError: i\n}) => {\n const [c, d] = M(null), l = (u) => {\n const b = u.currentTarget;\n d({\n width: Math.round(b.naturalWidth / r),\n height: Math.round(b.naturalHeight / r)\n }), s?.();\n }, g = (u) => {\n i?.();\n };\n return /* @__PURE__ */ a(\n \"img\",\n {\n src: e,\n alt: t,\n className: m(\"max-w-full h-auto\", n),\n onLoad: l,\n onError: g,\n width: c?.width,\n height: c?.height,\n style: c ? void 0 : { visibility: \"hidden\" }\n }\n );\n}, _0 = ({\n src: e,\n poster: t,\n autoPlay: r = !1,\n loop: n = !1,\n muted: o = !1,\n controls: s = !0,\n className: i\n}) => {\n const c = j(null), [d, l] = M(r), [g, u] = M(1), [b, f] = M(0), [h, y] = M(0);\n R(() => {\n const S = c.current;\n if (!S) return;\n const E = () => f(S.currentTime), N = () => y(S.duration), T = () => l(!0), L = () => l(!1);\n return S.addEventListener(\"timeupdate\", E), S.addEventListener(\"loadedmetadata\", N), S.addEventListener(\"play\", T), S.addEventListener(\"pause\", L), () => {\n S.removeEventListener(\"timeupdate\", E), S.removeEventListener(\"loadedmetadata\", N), S.removeEventListener(\"play\", T), S.removeEventListener(\"pause\", L);\n };\n }, []);\n const x = () => {\n c.current && (d ? c.current.pause() : c.current.play());\n }, C = (S) => {\n const E = parseFloat(S.target.value);\n u(E), c.current && (c.current.volume = E);\n }, v = (S) => {\n const E = parseFloat(S.target.value);\n f(E), c.current && (c.current.currentTime = E);\n }, k = () => {\n c.current && (document.fullscreenElement ? document.exitFullscreen() : c.current.requestFullscreen());\n }, w = (S) => {\n const E = Math.floor(S / 60), N = Math.floor(S % 60);\n return `${E}:${N.toString().padStart(2, \"0\")}`;\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative group\", i), children: [\n /* @__PURE__ */ a(\n \"video\",\n {\n ref: c,\n src: e,\n poster: t,\n autoPlay: r,\n loop: n,\n muted: o,\n className: \"w-full rounded-lg\",\n onClick: x\n }\n ),\n s && /* @__PURE__ */ p(\"div\", { className: \"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity\", children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: \"0\",\n max: h || 0,\n value: b,\n onChange: v,\n className: \"w-full mb-2 accent-white\"\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between gap-4\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: x,\n className: \"text-white hover:text-gray-300 transition-colors\",\n children: d ? /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M6 4h4v16H6V4zm8 0h4v16h-4V4z\" })\n }\n ) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M8 5v14l11-7z\" })\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-white\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z\" })\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: \"0\",\n max: \"1\",\n step: \"0.1\",\n value: g,\n onChange: C,\n className: \"w-20 accent-white\"\n }\n )\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"text-white text-sm\", children: [\n w(b),\n \" / \",\n w(h)\n ] })\n ] }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: k,\n className: \"text-white hover:text-gray-300 transition-colors\",\n children: /* @__PURE__ */ a(\"svg\", { className: \"w-5 h-5\", fill: \"currentColor\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ a(\"path\", { d: \"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\" }) })\n }\n )\n ] })\n ] })\n ] });\n}, z0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UvideoUthumbnail\",\n children: t || \"UvideoUthumbnail Component\"\n }\n), B0 = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"VideoEditor\",\n children: t || \"VideoEditor Component\"\n }\n), F0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UvideoUcall\",\n children: t || \"UvideoUcall Component\"\n }\n), W0 = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"LiveStream\",\n children: t || \"LiveStream Component\"\n }\n), $0 = ({\n src: e,\n title: t,\n artist: r,\n artwork: n,\n autoPlay: o = !1,\n loop: s = !1,\n className: i\n}) => {\n const c = j(null), [d, l] = M(o), [g, u] = M(0), [b, f] = M(0), [h, y] = M(1);\n R(() => {\n const S = c.current;\n if (!S) return;\n const E = () => u(S.currentTime), N = () => f(S.duration), T = () => l(!0), L = () => l(!1), P = () => l(!1);\n return S.addEventListener(\"timeupdate\", E), S.addEventListener(\"loadedmetadata\", N), S.addEventListener(\"play\", T), S.addEventListener(\"pause\", L), S.addEventListener(\"ended\", P), () => {\n S.removeEventListener(\"timeupdate\", E), S.removeEventListener(\"loadedmetadata\", N), S.removeEventListener(\"play\", T), S.removeEventListener(\"pause\", L), S.removeEventListener(\"ended\", P);\n };\n }, []);\n const x = () => {\n c.current && (d ? c.current.pause() : c.current.play());\n }, C = (S) => {\n const E = parseFloat(S.target.value);\n u(E), c.current && (c.current.currentTime = E);\n }, v = (S) => {\n const E = parseFloat(S.target.value);\n y(E), c.current && (c.current.volume = E);\n }, k = (S) => {\n const E = Math.floor(S / 60), N = Math.floor(S % 60);\n return `${E}:${N.toString().padStart(2, \"0\")}`;\n }, w = b > 0 ? g / b * 100 : 0;\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg\",\n i\n ),\n children: [\n /* @__PURE__ */ a(\"audio\", { ref: c, src: e, autoPlay: o, loop: s }),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-4 mb-4\", children: [\n n && /* @__PURE__ */ a(\"div\", { className: \"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700\", children: /* @__PURE__ */ a(\n \"img\",\n {\n src: n,\n alt: t || \"Album artwork\",\n className: \"w-full h-full object-cover\"\n }\n ) }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n t && /* @__PURE__ */ a(\"h4\", { className: \"font-semibold text-gray-900 dark:text-white truncate\", children: t }),\n r && /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400 truncate\", children: r })\n ] })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"mb-4\", children: [\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: \"0\",\n max: b || 0,\n value: g,\n onChange: C,\n className: \"w-full accent-blue-500\"\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1\", children: [\n /* @__PURE__ */ a(\"span\", { children: k(g) }),\n /* @__PURE__ */ a(\"span\", { children: k(b) })\n ] })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-4\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: x,\n className: \"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors\",\n children: d ? /* @__PURE__ */ a(\"svg\", { className: \"w-5 h-5\", fill: \"currentColor\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ a(\"path\", { d: \"M6 4h4v16H6V4zm8 0h4v16h-4V4z\" }) }) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5 ml-0.5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M8 5v14l11-7z\" })\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 text-gray-600 dark:text-gray-400\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z\" })\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"range\",\n min: \"0\",\n max: \"1\",\n step: \"0.1\",\n value: h,\n onChange: v,\n className: \"w-24 accent-blue-500\"\n }\n )\n ] })\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: [\n w.toFixed(0),\n \"%\"\n ] })\n ] })\n ]\n }\n );\n}, V0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UaudioUwaveform\",\n children: t || \"UaudioUwaveform Component\"\n }\n), H0 = ({\n data: e,\n width: t = 200,\n height: r = 40,\n color: n = \"#3b82f6\",\n gap: o = 2,\n className: s\n}) => {\n if (e.length === 0) return null;\n const i = (t - (e.length - 1) * o) / e.length;\n return /* @__PURE__ */ a(\n \"svg\",\n {\n width: t,\n height: r,\n className: m(\"inline-block\", s),\n children: e.map((c, d) => {\n const l = Math.max(2, c * r), g = d * (i + o), u = (r - l) / 2;\n return /* @__PURE__ */ a(\n \"rect\",\n {\n x: g,\n y: u,\n width: i,\n height: l,\n fill: n,\n rx: i / 2\n },\n d\n );\n })\n }\n );\n}, q0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UvoiceUrecorder\",\n children: t || \"UvoiceUrecorder Component\"\n }\n), G0 = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"PodcastPlayer\",\n children: t || \"PodcastPlayer Component\"\n }\n), Y0 = ({\n accept: e = [\"image/*\", \"video/*\", \"audio/*\"],\n maxSize: t = 50 * 1024 * 1024,\n // 50MB default\n maxFiles: r = 10,\n multiple: n = !0,\n onUpload: o,\n onRemove: s,\n className: i\n}) => {\n const [c, d] = M([]), [l, g] = M(!1), u = j(null), b = (k) => {\n k.preventDefault(), g(!0);\n }, f = (k) => {\n k.preventDefault(), g(!1);\n }, h = (k) => {\n k.preventDefault(), g(!1);\n const w = Array.from(k.dataTransfer.files);\n x(w);\n }, y = (k) => {\n if (k.target.files) {\n const w = Array.from(k.target.files);\n x(w);\n }\n }, x = (k) => {\n const w = k.filter((T) => {\n const L = e.some((I) => {\n if (I.endsWith(\"/*\")) {\n const D = I.split(\"/\")[0];\n return T.type.startsWith(D);\n }\n return T.type === I;\n }), P = T.size <= t;\n return L && P;\n }), S = r - c.length, E = w.slice(0, S), N = E.map((T) => ({\n id: `${Date.now()}-${Math.random()}`,\n file: T,\n preview: T.type.startsWith(\"image/\") ? URL.createObjectURL(T) : void 0,\n status: \"pending\"\n }));\n d((T) => [...T, ...N]), o && o(E);\n }, C = (k) => {\n d((w) => w.filter((S) => S.id !== k)), s && s(k);\n }, v = (k) => k < 1024 ? `${k} B` : k < 1024 * 1024 ? `${(k / 1024).toFixed(1)} KB` : `${(k / (1024 * 1024)).toFixed(1)} MB`;\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-4\", i), children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n onDragEnter: b,\n onDragOver: (k) => k.preventDefault(),\n onDragLeave: f,\n onDrop: h,\n onClick: () => u.current?.click(),\n className: m(\n \"border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors\",\n l ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/20\" : \"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600\"\n ),\n children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-700 dark:text-gray-300 mb-2\", children: \"Drag and drop files here, or click to browse\" }),\n /* @__PURE__ */ p(\"p\", { className: \"text-sm text-gray-500 dark:text-gray-400\", children: [\n \"Max \",\n r,\n \" files, \",\n v(t),\n \" each\"\n ] }),\n /* @__PURE__ */ a(\n \"input\",\n {\n ref: u,\n type: \"file\",\n multiple: n,\n accept: e.join(\",\"),\n onChange: y,\n className: \"hidden\"\n }\n )\n ]\n }\n ),\n c.length > 0 && /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4\", children: c.map((k) => /* @__PURE__ */ p(\n \"div\",\n {\n className: \"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800\",\n children: [\n k.preview ? /* @__PURE__ */ a(\n \"img\",\n {\n src: k.preview,\n alt: k.file.name,\n className: \"w-full h-full object-cover\"\n }\n ) : /* @__PURE__ */ a(\"div\", { className: \"w-full h-full flex items-center justify-center\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-12 h-12 text-gray-400\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z\" })\n }\n ) }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => C(k.id),\n className: \"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"truncate\", children: k.file.name }),\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-300\", children: v(k.file.size) })\n ] })\n ]\n },\n k.id\n )) })\n ] });\n}, K0 = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UmediaUplaylist\",\n children: t || \"UmediaUplaylist Component\"\n }\n), Z0 = ({\n className: e,\n children: t,\n disabled: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n e\n ),\n role: \"region\",\n \"aria-label\": \"PlaylistManager\",\n children: t || \"PlaylistManager Component\"\n }\n), X0 = ({\n value: e,\n size: t = 200,\n fgColor: r = \"#000000\",\n bgColor: n = \"#ffffff\",\n showDownload: o = !1,\n className: s\n}) => {\n const i = j(null);\n R(() => {\n const d = i.current;\n if (!d) return;\n const l = d.getContext(\"2d\");\n if (!l) return;\n l.fillStyle = n, l.fillRect(0, 0, t, t), l.fillStyle = r;\n const g = 8, u = t / g, b = e.split(\"\").reduce((h, y) => h + y.charCodeAt(0), 0);\n for (let h = 0; h < g; h++)\n for (let y = 0; y < g; y++)\n (b + h * g + y) % 3 !== 0 && l.fillRect(y * u, h * u, u, u);\n const f = u * 3;\n [\n [0, 0],\n [t - f, 0],\n [0, t - f]\n ].forEach(([h, y]) => {\n l.strokeStyle = r, l.lineWidth = u, l.strokeRect(\n h + u / 2,\n y + u / 2,\n f - u,\n f - u\n );\n });\n }, [e, t, r, n]);\n const c = () => {\n const d = i.current;\n if (!d) return;\n const l = d.toDataURL(\"image/png\"), g = document.createElement(\"a\");\n g.download = \"qrcode.png\", g.href = l, g.click();\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"inline-flex flex-col items-center gap-3\", s), children: [\n /* @__PURE__ */ a(\n \"canvas\",\n {\n ref: i,\n width: t,\n height: t,\n className: \"border-2 border-gray-200 dark:border-gray-700 rounded-lg\"\n }\n ),\n o && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: c,\n className: m(\n \"px-4 py-2 text-sm font-medium\",\n \"bg-blue-600 dark:bg-blue-500 text-white\",\n \"rounded-md\",\n \"hover:bg-blue-700 dark:hover:bg-blue-600\",\n \"transition-colors\"\n ),\n children: \"Download QR Code\"\n }\n ),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all\", children: e })\n ] });\n}, ra = ({\n isOpen: e,\n onClose: t,\n title: r,\n size: n = \"medium\",\n variant: o = \"default\",\n overlay: s = \"default\",\n showCloseButton: i = !0,\n closeOnOverlayClick: c = !0,\n closeOnEscape: d = !0,\n children: l,\n className: g,\n \"aria-labelledby\": u,\n \"aria-describedby\": b,\n closeAriaLabel: f = \"Close modal\"\n}) => {\n const h = j(null), y = j(null);\n if (R(() => {\n if (!e || !d) return;\n const k = (w) => {\n w.key === \"Escape\" && t();\n };\n return document.addEventListener(\"keydown\", k), () => document.removeEventListener(\"keydown\", k);\n }, [e, d, t]), R(() => {\n if (e)\n return y.current = document.activeElement, h.current && h.current.focus(), document.body.style.overflow = \"hidden\", () => {\n document.body.style.overflow = \"unset\", y.current && y.current.focus();\n };\n }, [e]), !e) return null;\n const x = () => {\n const k = F.overlays.modal.content(), w = F.overlays.modal[n]();\n return m(k, w);\n }, C = (k) => {\n c && k.target === k.currentTarget && t();\n }, v = /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: F.overlays.modal.backdrop(),\n onClick: C\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: F.overlays.modal.container(),\n role: \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-labelledby\": u,\n \"aria-describedby\": b,\n children: /* @__PURE__ */ p(\n \"div\",\n {\n ref: h,\n \"data-testid\": \"modal-content\",\n className: m(x(), g),\n tabIndex: -1,\n onClick: (k) => k.stopPropagation(),\n children: [\n r && /* @__PURE__ */ p(\"div\", { className: F.overlays.modal.header(), children: [\n /* @__PURE__ */ a(\n \"h2\",\n {\n id: u,\n className: F.overlays.modal.title(),\n children: r\n }\n ),\n i && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: t,\n className: F.overlays.modal.closeButton(),\n \"aria-label\": f,\n children: /* @__PURE__ */ a(lt, { className: F.icon.variant.muted.md() })\n }\n )\n ] }),\n l\n ]\n }\n )\n }\n )\n ] });\n return Tt(v, document.body);\n}, J0 = ({\n children: e,\n variant: t = \"default\",\n className: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n \"data-testid\": \"modal-header\",\n className: m(F.overlays.modal.header(), r),\n children: e\n }\n), aa = ({\n children: e,\n variant: t = \"default\",\n className: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n \"data-testid\": \"modal-body\",\n className: m(F.overlays.modal.body(), r),\n children: e\n }\n), na = ({\n children: e,\n variant: t = \"default\",\n className: r\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n \"data-testid\": \"modal-footer\",\n className: m(F.overlays.modal.footer(), r),\n children: e\n }\n), Q0 = ({\n isOpen: e,\n onClose: t,\n children: r,\n side: n = \"right\",\n size: o = \"md\",\n showCloseButton: s = !0,\n title: i,\n footer: c,\n className: d\n}) => {\n if (R(() => {\n const b = (f) => {\n f.key === \"Escape\" && e && t();\n };\n if (e)\n return document.addEventListener(\"keydown\", b), () => document.removeEventListener(\"keydown\", b);\n }, [e, t]), !e) return null;\n const l = {\n left: {\n sm: \"w-64\",\n md: \"w-80\",\n lg: \"w-96\",\n full: \"w-full\"\n },\n right: {\n sm: \"w-64\",\n md: \"w-80\",\n lg: \"w-96\",\n full: \"w-full\"\n },\n top: {\n sm: \"h-64\",\n md: \"h-80\",\n lg: \"h-96\",\n full: \"h-full\"\n },\n bottom: {\n sm: \"h-64\",\n md: \"h-80\",\n lg: \"h-96\",\n full: \"h-full\"\n }\n }, g = {\n left: \"left-0 top-0 h-full\",\n right: \"right-0 top-0 h-full\",\n top: \"top-0 left-0 w-full\",\n bottom: \"bottom-0 left-0 w-full\"\n }, u = {\n left: e ? \"translate-x-0\" : \"-translate-x-full\",\n right: e ? \"translate-x-0\" : \"translate-x-full\",\n top: e ? \"translate-y-0\" : \"-translate-y-full\",\n bottom: e ? \"translate-y-0\" : \"translate-y-full\"\n };\n return /* @__PURE__ */ p(Le, { children: [\n /* @__PURE__ */ a(Ot, { isOpen: e, onClose: t, opacity: \"medium\" }),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"fixed z-50\",\n \"bg-white dark:bg-gray-900\",\n \"shadow-xl\",\n \"transition-transform duration-300 ease-in-out\",\n g[n],\n l[n][o],\n u[n],\n d\n ),\n children: [\n (i || s) && /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700\", children: [\n i && /* @__PURE__ */ a(\"h2\", { className: \"text-lg font-semibold text-gray-900 dark:text-white\", children: i }),\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: t,\n className: \"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors\",\n \"aria-label\": \"Close drawer\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"flex-1 overflow-y-auto p-6\", children: r }),\n c && /* @__PURE__ */ a(\"div\", { className: \"px-6 py-4 border-t border-gray-200 dark:border-gray-700\", children: c })\n ]\n }\n )\n ] });\n}, eu = ({\n children: e,\n active: t = !0,\n initialFocus: r,\n returnFocus: n = !0,\n className: o\n}) => {\n const s = j(null), i = j(null);\n return R(() => {\n if (!t) return;\n n && (i.current = document.activeElement);\n const c = () => {\n if (!s.current) return [];\n const u = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n '[tabindex]:not([tabindex=\"-1\"])'\n ].join(\",\");\n return Array.from(\n s.current.querySelectorAll(u)\n );\n }, d = () => {\n if (r) {\n const b = s.current?.querySelector(\n r\n );\n if (b) {\n b.focus();\n return;\n }\n }\n const u = c();\n u.length > 0 && u[0].focus();\n }, l = (u) => {\n if (u.key !== \"Tab\") return;\n const b = c();\n if (b.length === 0) {\n u.preventDefault();\n return;\n }\n const f = b[0], h = b[b.length - 1];\n u.shiftKey ? document.activeElement === f && (u.preventDefault(), h.focus()) : document.activeElement === h && (u.preventDefault(), f.focus());\n }, g = setTimeout(d, 0);\n return document.addEventListener(\"keydown\", l), () => {\n clearTimeout(g), document.removeEventListener(\"keydown\", l), n && i.current && i.current.focus();\n };\n }, [t, r, n]), t ? /* @__PURE__ */ a(\"div\", { ref: s, className: m(o), children: e }) : /* @__PURE__ */ a(H, { children: e });\n}, tu = ({\n children: e,\n onLoadMore: t,\n loading: r = !1,\n hasMore: n = !0,\n threshold: o = 100,\n loader: s,\n endMessage: i,\n height: c,\n scrollDirection: d = \"vertical\",\n reverse: l = !1,\n className: g\n}) => {\n const u = j(null), [b, f] = M(!1);\n R(() => {\n const C = u.current;\n if (!C || r || !n) return;\n const v = () => {\n const {\n scrollTop: k,\n scrollHeight: w,\n clientHeight: S,\n scrollLeft: E,\n scrollWidth: N,\n clientWidth: T\n } = C;\n d === \"vertical\" && f(k > 300);\n let L;\n d === \"vertical\" ? l ? L = k : L = w - k - S : l ? L = E : L = N - E - T, L < o && t();\n };\n return C.addEventListener(\"scroll\", v), () => C.removeEventListener(\"scroll\", v);\n }, [r, n, o, t, d, l]);\n const h = () => {\n u.current?.scrollTo({\n top: 0,\n behavior: \"smooth\"\n });\n }, y = /* @__PURE__ */ p(\"div\", { className: \"flex justify-center items-center py-4\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin\" }),\n /* @__PURE__ */ a(\"span\", { className: \"ml-2 text-sm text-gray-600 dark:text-gray-400\", children: \"Loading...\" })\n ] }), x = /* @__PURE__ */ a(\"div\", { className: \"flex justify-center items-center py-4\", children: /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: \"No more items to load\" }) });\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative\", g), children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n ref: u,\n className: m(\n d === \"vertical\" ? \"overflow-y-auto\" : \"overflow-x-auto\",\n \"overflow-auto\"\n ),\n style: {\n height: d === \"vertical\" ? c : void 0,\n width: d === \"horizontal\" ? \"100%\" : void 0,\n display: d === \"horizontal\" ? \"flex\" : void 0,\n flexDirection: l && d === \"vertical\" ? \"column-reverse\" : void 0\n },\n children: [\n l && r && (s || y),\n l && !r && !n && i,\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n d === \"horizontal\" && \"flex\",\n d === \"horizontal\" && l && \"flex-row-reverse\"\n ),\n children: e\n }\n ),\n !l && r && (s || y),\n !l && !r && !n && (i || x)\n ]\n }\n ),\n d === \"vertical\" && !l && b && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: h,\n className: m(\n \"absolute bottom-4 right-4\",\n \"p-3 rounded-full\",\n \"bg-blue-600 dark:bg-blue-500\",\n \"text-white\",\n \"shadow-lg\",\n \"hover:bg-blue-700 dark:hover:bg-blue-600\",\n \"transition-colors\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400\"\n ),\n \"aria-label\": \"Scroll to top\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M5 10l7-7m0 0l7 7m-7-7v18\"\n }\n )\n }\n )\n }\n )\n ] });\n}, ru = ({\n trigger: e,\n children: t,\n placement: r = \"bottom\",\n isOpen: n,\n onOpenChange: o,\n trigger_action: s = \"click\",\n showArrow: i = !0,\n className: c\n}) => {\n const [d, l] = M(!1), g = n !== void 0 ? n : d, u = _(\n (S) => {\n n === void 0 && l(S), o?.(S);\n },\n [n, o]\n ), b = j(null), f = j(null), [h, y] = M({ top: 0, left: 0 });\n R(() => {\n if (!g || !b.current) return;\n const S = () => {\n const E = b.current.getBoundingClientRect(), N = 8;\n let T = 0, L = 0;\n switch (r) {\n case \"top\":\n T = E.top - N, L = E.left + E.width / 2;\n break;\n case \"top-start\":\n T = E.top - N, L = E.left;\n break;\n case \"top-end\":\n T = E.top - N, L = E.right;\n break;\n case \"bottom\":\n T = E.bottom + N, L = E.left + E.width / 2;\n break;\n case \"bottom-start\":\n T = E.bottom + N, L = E.left;\n break;\n case \"bottom-end\":\n T = E.bottom + N, L = E.right;\n break;\n case \"left\":\n T = E.top + E.height / 2, L = E.left - N;\n break;\n case \"right\":\n T = E.top + E.height / 2, L = E.right + N;\n break;\n }\n y({ top: T, left: L });\n };\n return S(), window.addEventListener(\"scroll\", S), window.addEventListener(\"resize\", S), () => {\n window.removeEventListener(\"scroll\", S), window.removeEventListener(\"resize\", S);\n };\n }, [g, r]), R(() => {\n if (!g) return;\n const S = (E) => {\n b.current && !b.current.contains(E.target) && f.current && !f.current.contains(E.target) && u(!1);\n };\n return document.addEventListener(\"mousedown\", S), () => document.removeEventListener(\"mousedown\", S);\n }, [g, u]), R(() => {\n if (!g) return;\n const S = (E) => {\n E.key === \"Escape\" && u(!1);\n };\n return document.addEventListener(\"keydown\", S), () => document.removeEventListener(\"keydown\", S);\n }, [g, u]);\n const x = () => {\n s === \"click\" && u(!g);\n }, C = () => {\n s === \"hover\" && u(!0);\n }, v = () => {\n s === \"hover\" && u(!1);\n }, k = {\n top: \"origin-bottom\",\n \"top-start\": \"origin-bottom-left\",\n \"top-end\": \"origin-bottom-right\",\n bottom: \"origin-top\",\n \"bottom-start\": \"origin-top-left\",\n \"bottom-end\": \"origin-top-right\",\n left: \"origin-right\",\n right: \"origin-left\"\n }, w = {\n top: \"-translate-x-1/2 -translate-y-full\",\n \"top-start\": \"-translate-y-full\",\n \"top-end\": \"-translate-x-full -translate-y-full\",\n bottom: \"-translate-x-1/2\",\n \"bottom-start\": \"\",\n \"bottom-end\": \"-translate-x-full\",\n left: \"-translate-x-full -translate-y-1/2\",\n right: \"-translate-y-1/2\"\n };\n return /* @__PURE__ */ p(\"div\", { className: m(\"relative inline-block\", c), children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n ref: b,\n onClick: x,\n onMouseEnter: C,\n onMouseLeave: v,\n className: \"inline-block\",\n children: e\n }\n ),\n g && /* @__PURE__ */ p(\n \"div\",\n {\n ref: f,\n className: m(\n \"fixed z-50\",\n \"bg-white dark:bg-gray-800\",\n \"border border-gray-200 dark:border-gray-700\",\n \"rounded-lg shadow-lg\",\n \"transition-all duration-200\",\n \"animate-in fade-in zoom-in-95\",\n k[r],\n w[r]\n ),\n style: {\n position: \"fixed\",\n top: h.top + \"px\",\n left: h.left + \"px\"\n },\n onMouseEnter: s === \"hover\" ? () => u(!0) : void 0,\n onMouseLeave: s === \"hover\" ? () => u(!1) : void 0,\n children: [\n t,\n i && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45\",\n r.startsWith(\"top\") && \"bottom-[-5px] border-t-0 border-l-0\",\n r.startsWith(\"bottom\") && \"top-[-5px] border-b-0 border-r-0\",\n r === \"left\" && \"right-[-5px] border-l-0 border-b-0\",\n r === \"right\" && \"left-[-5px] border-r-0 border-t-0\",\n (r === \"top\" || r === \"bottom\") && \"left-1/2 -translate-x-1/2\",\n (r === \"left\" || r === \"right\") && \"top-1/2 -translate-y-1/2\"\n )\n }\n )\n ]\n }\n )\n ] });\n}, au = ({\n sections: e,\n activeId: t,\n onActiveChange: r,\n offset: n = 80,\n container: o,\n smoothScroll: s = !0,\n showSubsections: i = !0,\n className: c\n}) => {\n const [d, l] = M(\"\"), g = j(null), u = t !== void 0 ? t : d;\n R(() => {\n const h = o ? document.querySelector(o) : window;\n if (!h) return;\n const y = (v) => v.flatMap((k) => [\n k.id,\n ...k.subsections ? y(k.subsections) : []\n ]), C = y(e).map((v) => document.getElementById(v)).filter(Boolean);\n if (C.length !== 0)\n return g.current = new IntersectionObserver(\n (v) => {\n v.forEach((k) => {\n if (k.isIntersecting) {\n const w = k.target.id;\n t !== void 0 && r ? r(w) : l(w);\n }\n });\n },\n {\n root: o ? h : null,\n rootMargin: `-${n}px 0px -50% 0px`,\n threshold: 0\n }\n ), C.forEach((v) => {\n g.current?.observe(v);\n }), () => {\n g.current?.disconnect();\n };\n }, [e, o, n, t, r]);\n const b = (h) => {\n const y = document.getElementById(h);\n if (!y) return;\n const x = o ? document.querySelector(o) : window;\n if (!x) return;\n const v = y.offsetTop - n;\n s ? x === window ? window.scrollTo({\n top: v,\n behavior: \"smooth\"\n }) : x.scrollTo({\n top: v,\n behavior: \"smooth\"\n }) : x === window ? window.scrollTo(0, v) : x.scrollTop = v;\n }, f = (h, y = 0) => {\n const x = u === h.id, C = h.subsections?.some((v) => u === v.id) || !1;\n return /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => b(h.id),\n className: m(\n \"w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors\",\n y === 0 ? \"font-medium\" : \"pl-6 text-sm\",\n x ? \"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30\" : C ? \"text-gray-700 dark:text-gray-300\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800\"\n ),\n style: { paddingLeft: `${y * 0.75 + 0.75}rem` },\n children: h.label\n }\n ),\n i && h.subsections && h.subsections.length > 0 && /* @__PURE__ */ a(\"div\", { className: \"ml-2 border-l-2 border-gray-200 dark:border-gray-700\", children: h.subsections.map(\n (v) => f(v, y + 1)\n ) })\n ] }, h.id);\n };\n return /* @__PURE__ */ a(\"nav\", { className: m(\"space-y-1\", c), children: e.map((h) => f(h, 0)) });\n}, nu = ({\n isOpen: e,\n onClose: t,\n children: r,\n title: n,\n description: o,\n footer: s,\n side: i = \"bottom\",\n size: c = \"md\",\n showHandle: d = !0,\n showCloseButton: l = !0,\n className: g\n}) => {\n if (R(() => {\n if (!e) return;\n const h = (y) => {\n y.key === \"Escape\" && t();\n };\n return document.addEventListener(\"keydown\", h), () => document.removeEventListener(\"keydown\", h);\n }, [e, t]), !e) return null;\n const u = {\n bottom: {\n sm: \"h-1/3\",\n md: \"h-1/2\",\n lg: \"h-2/3\",\n full: \"h-full\"\n },\n top: {\n sm: \"h-1/3\",\n md: \"h-1/2\",\n lg: \"h-2/3\",\n full: \"h-full\"\n },\n left: {\n sm: \"w-80\",\n md: \"w-96\",\n lg: \"w-[32rem]\",\n full: \"w-full\"\n },\n right: {\n sm: \"w-80\",\n md: \"w-96\",\n lg: \"w-[32rem]\",\n full: \"w-full\"\n }\n }, b = {\n bottom: \"bottom-0 left-0 right-0 rounded-t-2xl\",\n top: \"top-0 left-0 right-0 rounded-b-2xl\",\n left: \"left-0 top-0 bottom-0 rounded-r-2xl\",\n right: \"right-0 top-0 bottom-0 rounded-l-2xl\"\n }, f = {\n bottom: \"animate-in slide-in-from-bottom duration-300\",\n top: \"animate-in slide-in-from-top duration-300\",\n left: \"animate-in slide-in-from-left duration-300\",\n right: \"animate-in slide-in-from-right duration-300\"\n };\n return /* @__PURE__ */ p(Le, { children: [\n /* @__PURE__ */ a(Ot, { isOpen: e, onClose: t, opacity: \"dark\" }),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"fixed z-50\",\n \"bg-white dark:bg-gray-900\",\n \"shadow-xl\",\n \"flex flex-col\",\n b[i],\n u[i][c],\n f[i],\n g\n ),\n children: [\n d && (i === \"bottom\" || i === \"top\") && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center\",\n i === \"bottom\" ? \"pt-3 pb-2\" : \"pb-3 pt-2\"\n ),\n children: /* @__PURE__ */ a(\"div\", { className: \"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full\" })\n }\n ),\n (n || o || l) && /* @__PURE__ */ a(\"div\", { className: \"px-6 py-4 border-b border-gray-200 dark:border-gray-700\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-start justify-between\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex-1\", children: [\n n && /* @__PURE__ */ a(\"h2\", { className: \"text-lg font-semibold text-gray-900 dark:text-white\", children: n }),\n o && /* @__PURE__ */ a(\"p\", { className: \"mt-1 text-sm text-gray-600 dark:text-gray-400\", children: o })\n ] }),\n l && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: t,\n className: \"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors\",\n \"aria-label\": \"Close sheet\",\n children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-6 h-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n )\n }\n )\n ] }) }),\n /* @__PURE__ */ a(\"div\", { className: \"flex-1 overflow-y-auto px-6 py-4\", children: r }),\n s && /* @__PURE__ */ a(\"div\", { className: \"px-6 py-4 border-t border-gray-200 dark:border-gray-700\", children: s })\n ]\n }\n )\n ] });\n}, ou = ({\n isOpen: e,\n onClose: t,\n onSubmit: r,\n title: n,\n description: o,\n placeholder: s = \"\",\n initialValue: i = \"\",\n cancelText: c = \"Cancel\",\n confirmText: d = \"Confirm\",\n isLoading: l = !1,\n loadingText: g = \"Processing...\",\n maxLength: u,\n required: b = !0,\n validate: f\n}) => {\n const [h, y] = M(i), [x, C] = M(null);\n R(() => {\n e && (y(i), C(null));\n }, [e, i]);\n const v = async (S) => {\n if (S.preventDefault(), C(null), b && !h.trim()) {\n C(\"This field is required\");\n return;\n }\n if (f) {\n const E = f(h);\n if (E) {\n C(E);\n return;\n }\n }\n try {\n await r(h.trim());\n } catch (E) {\n C(E instanceof Error ? E.message : \"An error occurred\");\n }\n }, k = () => {\n y(i), C(null), t();\n }, w = b ? h.trim().length > 0 : !0;\n return /* @__PURE__ */ a(\n ra,\n {\n isOpen: e,\n onClose: k,\n size: \"small\",\n \"aria-labelledby\": \"text-input-modal-title\",\n \"aria-describedby\": \"text-input-modal-description\",\n closeOnEscape: !l,\n closeOnOverlayClick: !l,\n children: /* @__PURE__ */ p(\"form\", { onSubmit: v, children: [\n /* @__PURE__ */ p(aa, { variant: \"padded\", children: [\n /* @__PURE__ */ a(\"h3\", { id: \"text-input-modal-title\", className: O.heading.h4(), children: n }),\n /* @__PURE__ */ a(\n \"p\",\n {\n id: \"text-input-modal-description\",\n className: `${O.body.md()} mt-2 mb-4`,\n children: o\n }\n ),\n /* @__PURE__ */ a(\n Dt,\n {\n type: \"text\",\n value: h,\n onChange: (S) => y(S.target.value),\n placeholder: s,\n maxLength: u,\n disabled: l,\n autoFocus: !0,\n \"aria-invalid\": !!x,\n \"aria-describedby\": x ? \"text-input-error\" : void 0\n }\n ),\n x && /* @__PURE__ */ a(\n \"p\",\n {\n id: \"text-input-error\",\n className: `${O.body.sm()} text-red-600 dark:text-red-400 mt-2`,\n role: \"alert\",\n children: x\n }\n )\n ] }),\n /* @__PURE__ */ p(na, { children: [\n /* @__PURE__ */ a(\n me,\n {\n type: \"button\",\n variant: \"outline\",\n onClick: k,\n disabled: l,\n children: c\n }\n ),\n /* @__PURE__ */ a(\n me,\n {\n type: \"submit\",\n variant: \"default\",\n disabled: !w || l,\n children: l ? g : d\n }\n )\n ] })\n ] })\n }\n );\n}, Oo = ({\n content: e,\n children: t,\n placement: r = \"top\",\n delayShow: n = 0,\n delayHide: o = 0,\n className: s,\n disabled: i = !1,\n showArrow: c = !0,\n variant: d = \"default\",\n trigger: l = \"hover\",\n isOpen: g,\n onVisibilityChange: u\n}) => {\n const [b, f] = M(!1), h = j(\n void 0\n ), y = j(\n void 0\n ), x = j(null), C = j(null), v = g !== void 0, k = v ? g : b, w = _(() => {\n i || v || (y.current && (clearTimeout(y.current), y.current = void 0), n > 0 ? h.current = setTimeout(() => {\n f(!0), u?.(!0);\n }, n) : (f(!0), u?.(!0)));\n }, [i, v, n, u]), S = _(() => {\n v || (h.current && (clearTimeout(h.current), h.current = void 0), o > 0 ? y.current = setTimeout(() => {\n f(!1), u?.(!1);\n }, o) : (f(!1), u?.(!1)));\n }, [v, o, u]);\n R(() => () => {\n h.current && clearTimeout(h.current), y.current && clearTimeout(y.current);\n }, []), R(() => {\n if (l !== \"click\" || !k) return;\n const $ = (q) => {\n x.current && !x.current.contains(q.target) && C.current && !C.current.contains(q.target) && S();\n };\n return document.addEventListener(\"mousedown\", $), () => {\n document.removeEventListener(\"mousedown\", $);\n };\n }, [l, k, S]);\n const E = () => {\n l === \"hover\" && w();\n }, N = () => {\n l === \"hover\" && S();\n }, T = () => {\n l === \"hover\" && w();\n }, L = () => {\n l === \"hover\" && S();\n }, P = () => {\n l === \"click\" && !v && (k ? (f(!1), u?.(!1)) : (f(!0), u?.(!0)));\n }, I = {\n top: \"bottom-full left-1/2 -translate-x-1/2 -translate-y-2\",\n bottom: \"top-full left-1/2 -translate-x-1/2 translate-y-2\",\n left: \"right-full top-1/2 -translate-x-2 -translate-y-1/2\",\n right: \"left-full top-1/2 translate-x-2 -translate-y-1/2\"\n }, D = {\n top: \"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent\",\n bottom: \"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent\",\n left: \"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent\",\n right: \"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent\"\n }, W = {\n default: \"bg-gray-900 dark:bg-gray-700 text-white\",\n info: \"bg-blue-600 dark:bg-blue-500 text-white\",\n success: \"bg-green-600 dark:bg-green-500 text-white\",\n warning: \"bg-yellow-600 dark:bg-yellow-500 text-white\",\n error: \"bg-red-600 dark:bg-red-500 text-white\"\n }, z = {\n default: {\n top: \"border-t-gray-900 dark:border-t-gray-700\",\n bottom: \"border-b-gray-900 dark:border-b-gray-700\",\n left: \"border-l-gray-900 dark:border-l-gray-700\",\n right: \"border-r-gray-900 dark:border-r-gray-700\"\n },\n info: {\n top: \"border-t-blue-600 dark:border-t-blue-500\",\n bottom: \"border-b-blue-600 dark:border-b-blue-500\",\n left: \"border-l-blue-600 dark:border-l-blue-500\",\n right: \"border-r-blue-600 dark:border-r-blue-500\"\n },\n success: {\n top: \"border-t-green-600 dark:border-t-green-500\",\n bottom: \"border-b-green-600 dark:border-b-green-500\",\n left: \"border-l-green-600 dark:border-l-green-500\",\n right: \"border-r-green-600 dark:border-r-green-500\"\n },\n warning: {\n top: \"border-t-yellow-600 dark:border-t-yellow-500\",\n bottom: \"border-b-yellow-600 dark:border-b-yellow-500\",\n left: \"border-l-yellow-600 dark:border-l-yellow-500\",\n right: \"border-r-yellow-600 dark:border-r-yellow-500\"\n },\n error: {\n top: \"border-t-red-600 dark:border-t-red-500\",\n bottom: \"border-b-red-600 dark:border-b-red-500\",\n left: \"border-l-red-600 dark:border-l-red-500\",\n right: \"border-r-red-600 dark:border-r-red-500\"\n }\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n ref: C,\n className: \"relative inline-block\",\n onMouseEnter: E,\n onMouseLeave: N,\n onFocus: T,\n onBlur: L,\n onClick: P,\n children: [\n t,\n k && !i && /* @__PURE__ */ p(\n \"div\",\n {\n ref: x,\n className: m(\n \"absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none\",\n I[r],\n W[d],\n s\n ),\n role: \"tooltip\",\n children: [\n e,\n c && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute w-0 h-0 border-4 arrow\",\n D[r],\n z[d][r]\n )\n }\n )\n ]\n }\n )\n ]\n }\n );\n}, Do = {\n default: Te,\n warning: Mt,\n danger: Lt,\n success: it,\n info: Te\n}, Uo = {\n default: () => F.icon.variant.default.lg(),\n warning: () => F.icon.variant.warning.lg(),\n danger: () => F.icon.variant.error.lg(),\n success: () => F.icon.variant.success.lg(),\n info: () => F.icon.variant.default.lg()\n}, jo = {\n default: \"default\",\n warning: \"default\",\n danger: \"destructive\",\n success: \"default\",\n info: \"default\"\n}, su = ({\n isOpen: e,\n onClose: t,\n onConfirm: r,\n title: n,\n message: o,\n confirmText: s = \"Confirm\",\n cancelText: i = \"Cancel\",\n loadingText: c = \"Processing...\",\n variant: d = \"default\",\n isLoading: l = !1\n}) => {\n const g = Do[d], u = Uo[d], b = jo[d];\n return /* @__PURE__ */ p(\n ra,\n {\n isOpen: e,\n onClose: t,\n size: \"small\",\n variant: \"web3confirmation\",\n \"aria-labelledby\": \"confirmation-dialog-title\",\n \"aria-describedby\": \"confirmation-dialog-description\",\n children: [\n /* @__PURE__ */ p(aa, { variant: \"padded\", children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex items-center gap-3 mb-4\", children: [\n /* @__PURE__ */ a(g, { className: u() }),\n /* @__PURE__ */ a(\n \"h3\",\n {\n id: \"confirmation-dialog-title\",\n className: O.heading.h4(),\n children: n\n }\n )\n ] }),\n /* @__PURE__ */ a(\n \"p\",\n {\n id: \"confirmation-dialog-description\",\n className: O.body.md(),\n children: o\n }\n )\n ] }),\n /* @__PURE__ */ p(na, { children: [\n /* @__PURE__ */ a(me, { variant: \"outline\", onClick: t, disabled: l, children: i }),\n /* @__PURE__ */ a(\n me,\n {\n variant: b,\n onClick: r,\n disabled: l,\n children: l ? c : s\n }\n )\n ] })\n ]\n }\n );\n}, iu = ({\n trigger: e,\n children: t,\n placement: r = \"bottom\",\n openDelay: n = 200,\n closeDelay: o = 300,\n className: s\n}) => {\n const [i, c] = M(!1), [d, l] = M({ top: 0, left: 0 }), g = j(null), u = j(null), b = j(void 0), f = j(void 0);\n R(() => {\n if (!i || !g.current) return;\n const v = () => {\n const k = g.current.getBoundingClientRect(), w = 8;\n let S = 0, E = 0;\n switch (r) {\n case \"top\":\n S = k.top - w, E = k.left + k.width / 2;\n break;\n case \"bottom\":\n S = k.bottom + w, E = k.left + k.width / 2;\n break;\n case \"left\":\n S = k.top + k.height / 2, E = k.left - w;\n break;\n case \"right\":\n S = k.top + k.height / 2, E = k.right + w;\n break;\n }\n l({ top: S, left: E });\n };\n return v(), window.addEventListener(\"scroll\", v), window.addEventListener(\"resize\", v), () => {\n window.removeEventListener(\"scroll\", v), window.removeEventListener(\"resize\", v);\n };\n }, [i, r]);\n const h = () => {\n f.current && clearTimeout(f.current), b.current = setTimeout(() => {\n c(!0);\n }, n);\n }, y = () => {\n b.current && clearTimeout(b.current), f.current = setTimeout(() => {\n c(!1);\n }, o);\n }, x = {\n top: \"origin-bottom\",\n bottom: \"origin-top\",\n left: \"origin-right\",\n right: \"origin-left\"\n }, C = {\n top: \"-translate-x-1/2 -translate-y-full\",\n bottom: \"-translate-x-1/2\",\n left: \"-translate-x-full -translate-y-1/2\",\n right: \"-translate-y-1/2\"\n };\n return /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n ref: g,\n onMouseEnter: h,\n onMouseLeave: y,\n className: \"inline-block\",\n children: e\n }\n ),\n i && /* @__PURE__ */ a(Le, { children: /* @__PURE__ */ a(\n \"div\",\n {\n ref: u,\n className: m(\n \"fixed z-50\",\n \"bg-white dark:bg-gray-800\",\n \"border border-gray-200 dark:border-gray-700\",\n \"rounded-lg shadow-lg\",\n \"transition-all duration-200\",\n \"animate-in fade-in zoom-in-95\",\n x[r],\n C[r],\n s\n ),\n style: {\n top: d.top + \"px\",\n left: d.left + \"px\"\n },\n onMouseEnter: () => {\n f.current && clearTimeout(f.current);\n },\n onMouseLeave: y,\n children: t\n }\n ) })\n ] });\n}, lu = ({\n children: e,\n onDrop: t,\n onDragOver: r,\n accept: n,\n showIndicator: o = !0,\n indicator: s,\n disabled: i = !1,\n className: c\n}) => {\n const [d, l] = M(!1), [g, u] = M(0), b = (C) => {\n C.preventDefault(), C.stopPropagation(), !i && (u((v) => v + 1), C.dataTransfer.items && C.dataTransfer.items.length > 0 && l(!0));\n }, f = (C) => {\n C.preventDefault(), C.stopPropagation(), !i && u((v) => {\n const k = v - 1;\n return k === 0 && l(!1), k;\n });\n }, h = (C) => {\n C.preventDefault(), C.stopPropagation(), !i && r && r(C);\n }, y = (C) => {\n if (C.preventDefault(), C.stopPropagation(), i) return;\n if (l(!1), u(0), C.dataTransfer.files && C.dataTransfer.files.length > 0) {\n const k = Array.from(C.dataTransfer.files);\n let w = k;\n n && n.length > 0 && (w = k.filter((S) => n.some((E) => {\n if (E.endsWith(\"/*\")) {\n const N = E.split(\"/\")[0];\n return S.type.startsWith(N);\n }\n return S.type === E;\n }))), t(w);\n return;\n }\n const v = C.dataTransfer.getData(\"text/plain\");\n if (v)\n try {\n const k = JSON.parse(v);\n t(k);\n } catch {\n t(v);\n }\n }, x = /* @__PURE__ */ p(\"div\", { className: \"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"p\", { className: \"text-blue-700 dark:text-blue-300 font-medium\", children: \"Drop here\" })\n ] });\n return /* @__PURE__ */ p(\n \"div\",\n {\n onDragEnter: b,\n onDragLeave: f,\n onDragOver: h,\n onDrop: y,\n className: m(\n \"relative\",\n i && \"opacity-50 cursor-not-allowed\",\n c\n ),\n children: [\n e,\n o && d && !i && (s || x)\n ]\n }\n );\n}, cu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UdragUdropUlist\",\n children: t || \"UdragUdropUlist Component\"\n }\n), du = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UsortableUgrid\",\n children: t || \"UsortableUgrid Component\"\n }\n), uu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UnestedUdrag\",\n children: t || \"UnestedUdrag Component\"\n }\n), gu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UgestureUdetector\",\n children: t || \"UgestureUdetector Component\"\n }\n), mu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UswipeUactions\",\n children: t || \"UswipeUactions Component\"\n }\n), hu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UpinchUzoom\",\n children: t || \"UpinchUzoom Component\"\n }\n), fu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UdoubleUtap\",\n children: t || \"UdoubleUtap Component\"\n }\n), bu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UlongUpress\",\n children: t || \"UlongUpress Component\"\n }\n), pu = ({\n className: e,\n children: t,\n disabled: r = !1,\n onClick: n\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"p-4 rounded-lg border transition-colors\",\n \"bg-white dark:bg-gray-900\",\n \"border-gray-200 dark:border-gray-700\",\n \"text-gray-900 dark:text-white\",\n r && \"opacity-50 cursor-not-allowed\",\n \"hover:bg-gray-50 dark:hover:bg-gray-800\",\n e\n ),\n onClick: r ? void 0 : n,\n role: \"region\",\n \"aria-label\": \"UradialUmenu\",\n children: t || \"UradialUmenu Component\"\n }\n), yu = ({\n children: e,\n onRefresh: t,\n disabled: r = !1,\n refreshingText: n = \"Refreshing...\",\n pullDownText: o = \"Pull down to refresh\",\n releaseText: s = \"Release to refresh\",\n threshold: i = 80,\n maxPullDistance: c = 120,\n className: d = \"\"\n}) => {\n const [l, g] = M(0), [u, b] = M(!1), [f, h] = M(!1), y = j(0), x = j(null);\n R(() => {\n const S = x.current;\n if (!S) return;\n const E = (L) => {\n if (r || u) return;\n S.scrollTop <= 0 && (y.current = L.touches[0].clientY, h(!0));\n }, N = (L) => {\n if (!f) return;\n const I = L.touches[0].clientY - y.current;\n if (I > 0 && S.scrollTop <= 0) {\n const D = Math.min(I / c, 1), W = Math.min(\n I * (1 - D * 0.5),\n c\n );\n g(W), I > 10 && L.preventDefault();\n }\n }, T = async () => {\n if (f)\n if (h(!1), l >= i && !u) {\n b(!0);\n try {\n await t();\n } catch {\n } finally {\n b(!1), g(0);\n }\n } else\n g(0);\n };\n return S.addEventListener(\"touchstart\", E, {\n passive: !0\n }), S.addEventListener(\"touchmove\", N, {\n passive: !1\n }), S.addEventListener(\"touchend\", T), () => {\n S.removeEventListener(\"touchstart\", E), S.removeEventListener(\"touchmove\", N), S.removeEventListener(\"touchend\", T);\n };\n }, [\n r,\n u,\n f,\n l,\n i,\n c,\n t\n ]);\n const C = Math.min(l / i, 1), v = f || u, k = f ? l : u ? i : 0, w = () => u ? n : l >= i ? s : o;\n return /* @__PURE__ */ p(\n \"div\",\n {\n ref: x,\n className: `relative ${d}`,\n style: {\n height: \"100%\",\n overflowY: \"auto\",\n WebkitOverflowScrolling: \"touch\"\n // Smooth scrolling on iOS\n },\n children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out\",\n style: {\n height: `${k}px`,\n marginTop: f ? 0 : `-${k}px`,\n opacity: v ? 1 : 0,\n pointerEvents: \"none\"\n },\n children: /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center justify-center gap-2\", children: [\n /* @__PURE__ */ a(\n Da,\n {\n className: `w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${u ? \"animate-spin\" : \"\"}`,\n style: {\n transform: `rotate(${C * 360}deg)`\n }\n }\n ),\n l > 20 && /* @__PURE__ */ a(\"span\", { className: \"text-xs font-medium text-blue-600 dark:text-blue-400\", children: w() })\n ] })\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n style: {\n paddingTop: f ? `${l}px` : 0,\n transition: f ? \"none\" : \"padding-top 200ms ease-out\"\n },\n children: e\n }\n )\n ]\n }\n );\n}, ce = {\n twitter: (e, t, r) => {\n const n = r.length > 0 ? `&hashtags=${r.join(\",\")}` : \"\";\n return `https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}${n}`;\n },\n facebook: (e) => `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,\n linkedin: (e, t, r) => `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,\n reddit: (e, t) => `https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(t)}`,\n telegram: (e, t) => `https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`,\n whatsapp: (e, t) => `https://wa.me/?text=${encodeURIComponent(t + \" \" + e)}`,\n email: (e, t, r) => `mailto:?subject=${encodeURIComponent(t)}&body=${encodeURIComponent(r + `\n\n` + e)}`,\n discord: (e, t) => `https://discord.com/channels/@me?message=${encodeURIComponent(t + `\n` + e)}`,\n messages: (e, t) => `sms:?&body=${encodeURIComponent(t + \" \" + e)}`\n}, _o = ({\n shareConfig: e\n}) => {\n const [t, r] = M(!1), [n, o] = M(\"\"), [s, i] = M(!1), [c, d] = M(!1), [l, g] = M(!1);\n U.useEffect(() => {\n const v = e.onBeforeShare;\n v && !n && (async () => {\n i(!0);\n try {\n const w = typeof window < \"u\" ? window.location.href : \"\", S = await v(w);\n o(S);\n } catch {\n const w = typeof window < \"u\" ? window.location.href : \"\";\n o(w);\n } finally {\n i(!1);\n }\n })();\n }, [e, n]);\n const u = n || (typeof window < \"u\" ? window.location.href : \"\"), b = typeof navigator < \"u\" && navigator.share !== void 0, f = async () => {\n if (!(!b || l)) {\n g(!0);\n try {\n await navigator.share({\n title: e.title,\n text: e.description,\n url: u\n }), r(!1);\n } catch (v) {\n v instanceof Error && v.name !== \"AbortError\" && (console.error(\"Share failed:\", v), v.name !== \"InvalidStateError\" && r(!0));\n } finally {\n g(!1);\n }\n }\n }, h = async () => {\n try {\n await navigator.clipboard.writeText(u), d(!0), setTimeout(() => {\n d(!1), r(!1);\n }, 1500);\n } catch {\n }\n }, y = () => {\n r(!t);\n }, x = (v) => {\n window.open(\n v,\n \"_blank\",\n \"noopener,noreferrer,width=600,height=400\"\n ), r(!1);\n }, C = [\n {\n name: \"Twitter\",\n url: ce.twitter(u, e.title, e.hashtags),\n color: \"text-blue-400\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84\" })\n },\n {\n name: \"Facebook\",\n url: ce.facebook(u),\n color: \"text-blue-600\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z\" })\n },\n {\n name: \"LinkedIn\",\n url: ce.linkedin(\n u,\n e.title,\n e.description\n ),\n color: \"text-blue-700\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\" })\n },\n {\n name: \"Reddit\",\n url: ce.reddit(u, e.title),\n color: \"text-orange-600\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z\" })\n },\n {\n name: \"Telegram\",\n url: ce.telegram(u, e.title),\n color: \"text-blue-500\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z\" })\n },\n {\n name: \"WhatsApp\",\n url: ce.whatsapp(u, e.title),\n color: \"text-green-600\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z\" })\n },\n {\n name: \"Discord\",\n url: ce.discord(u, e.title),\n color: \"text-indigo-500\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z\" })\n },\n {\n name: \"Messages\",\n url: ce.messages(u, e.title),\n color: \"text-green-500\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z\" })\n },\n {\n name: \"Email\",\n url: ce.email(\n u,\n e.title,\n e.description\n ),\n color: \"text-gray-600\",\n svg: /* @__PURE__ */ a(\"path\", { d: \"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z\" })\n }\n ];\n return /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: y,\n disabled: s || l,\n className: \"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed\",\n title: \"Share this page\",\n children: s || l ? /* @__PURE__ */ a(\"div\", { className: \"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin\" }) : /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z\"\n }\n )\n }\n )\n }\n ),\n t && /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"fixed inset-0 z-[999998]\",\n onClick: () => r(!1)\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1\", children: [\n C.map((v) => /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => x(v.url),\n className: \"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors\",\n children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: `w-4 h-4 mr-2 ${v.color}`,\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: v.svg\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: v.name })\n ]\n },\n v.name\n )),\n /* @__PURE__ */ a(\"div\", { className: \"border-t border-gray-200 dark:border-gray-700 my-1\" }),\n b && /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => {\n r(!1), f();\n },\n disabled: l,\n className: \"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50\",\n children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: \"More...\" })\n ]\n }\n ),\n /* @__PURE__ */ p(\n \"button\",\n {\n onClick: h,\n className: \"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors\",\n children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-700 dark:text-gray-300\", children: c ? \"Copied!\" : \"Copy Link\" })\n ]\n }\n )\n ] })\n ] })\n ] });\n}, zo = ({\n items: e,\n shareConfig: t,\n className: r,\n showHome: n\n}) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between\", children: [\n /* @__PURE__ */ a(\"nav\", { \"aria-label\": \"Breadcrumb\", children: /* @__PURE__ */ a(\"ol\", { className: \"flex items-center text-sm space-x-2\", children: e.map((o, s) => /* @__PURE__ */ p(U.Fragment, { children: [\n /* @__PURE__ */ a(\"li\", { children: o.current ? /* @__PURE__ */ a(\"span\", { className: \"text-gray-700 dark:text-gray-300\", children: o.label }) : /* @__PURE__ */ a(\n Ze,\n {\n to: o.href || \"#\",\n className: \"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors\",\n children: o.label\n }\n ) }),\n s < e.length - 1 && /* @__PURE__ */ a(\"li\", { children: /* @__PURE__ */ a(\"span\", { className: \"text-gray-400 dark:text-gray-500\", children: \"/\" }) })\n ] }, s)) }) }),\n t && /* @__PURE__ */ a(_o, { shareConfig: t })\n] }), oa = {\n standard: \"max-w-7xl mx-auto px-4\",\n wide: \"max-w-[1920px] mx-auto px-4\",\n full: \"w-full px-4\"\n}, sa = {\n standard: \"max-w-7xl mx-auto\",\n wide: \"max-w-[1920px] mx-auto\",\n full: \"w-full\"\n}, ia = \"px-4\", la = ot(void 0), Bo = ({\n mode: e = \"standard\",\n children: t\n}) => {\n const r = {\n mode: e,\n containerClass: oa[e],\n maxWidthClass: sa[e],\n paddingClass: ia\n };\n return /* @__PURE__ */ a(la.Provider, { value: r, children: t });\n}, ke = () => {\n const e = st(la);\n return e || {\n mode: \"standard\",\n containerClass: oa.standard,\n maxWidthClass: sa.standard,\n paddingClass: ia\n };\n}, xu = ({\n items: e,\n shareConfig: t\n}) => {\n const { containerClass: r } = ke();\n return /* @__PURE__ */ a(\"div\", { className: \"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50\", children: /* @__PURE__ */ a(\"div\", { className: `${r} py-3 relative`, children: /* @__PURE__ */ a(zo, { items: e, shareConfig: t }) }) });\n}, Fo = (e) => {\n const [t, r] = M(\"\"), [n, o] = M(!0), [s, i] = M(null);\n return R(() => {\n e && (async () => {\n try {\n o(!0), i(null);\n const d = await fetch(`/code/${e}`);\n if (!d.ok)\n throw new Error(`Failed to load code file: ${e}`);\n const l = await d.text();\n r(l);\n } catch (d) {\n i(d instanceof Error ? d.message : \"Unknown error\"), r(\"// Error loading code file\");\n } finally {\n o(!1);\n }\n })();\n }, [e]), { code: t, loading: n, error: s };\n}, vu = ({\n filename: e,\n code: t,\n language: r,\n title: n,\n className: o = \"\",\n showCopy: s = !0,\n showHeader: i = !0\n}) => {\n const { t: c } = dt(\"codeBlock\"), { code: d, loading: l, error: g } = Fo(e || \"\"), [u, b] = M(!1), f = t || d, y = r || (e ? ((C) => {\n switch (C.split(\".\").pop()?.toLowerCase()) {\n case \"sol\":\n return \"solidity\";\n case \"js\":\n case \"mjs\":\n return \"javascript\";\n case \"ts\":\n return \"typescript\";\n case \"sh\":\n return \"bash\";\n case \"graphql\":\n return \"graphql\";\n case \"json\":\n return \"json\";\n case \"css\":\n return \"css\";\n case \"html\":\n return \"html\";\n case \"jsx\":\n return \"jsx\";\n case \"tsx\":\n return \"tsx\";\n case \"py\":\n return \"python\";\n case \"java\":\n return \"java\";\n case \"cpp\":\n case \"c\":\n return \"cpp\";\n case \"go\":\n return \"go\";\n case \"rs\":\n return \"rust\";\n case \"php\":\n return \"php\";\n case \"rb\":\n return \"ruby\";\n default:\n return \"text\";\n }\n })(e) : \"text\"), x = async () => {\n if (f)\n try {\n await navigator.clipboard.writeText(f), b(!0), setTimeout(() => b(!1), 2e3);\n } catch {\n }\n };\n return e && l ? /* @__PURE__ */ a(\n \"div\",\n {\n className: `bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,\n children: /* @__PURE__ */ a(\"div\", { className: \"animate-pulse text-gray-500\", children: c(\"loadingCode\", \"Loading code...\") })\n }\n ) : e && g ? /* @__PURE__ */ p(\n \"div\",\n {\n className: `bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,\n children: [\n c(\"error\", \"Error\"),\n \": \",\n g\n ]\n }\n ) : f ? /* @__PURE__ */ p(\n \"div\",\n {\n className: `bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,\n children: [\n i && /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-green-400 font-mono\", children: n || e || `${y} code` }),\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: x,\n className: \"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group\",\n title: c(\"copyCode\", \"Copy code\"),\n children: u ? /* @__PURE__ */ a(Ua, { className: \"h-4 w-4 text-green-400\" }) : /* @__PURE__ */ a(ja, { className: \"h-4 w-4 group-hover:scale-110 transition-transform\" })\n }\n )\n ] }),\n /* @__PURE__ */ a(\"div\", { className: \"p-4 overflow-x-auto text-left\", children: /* @__PURE__ */ a(\"pre\", { className: `text-sm language-${y}`, children: /* @__PURE__ */ a(\"code\", { className: \"text-gray-100\", children: f }) }) })\n ]\n }\n ) : /* @__PURE__ */ a(\n \"div\",\n {\n className: `bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${o}`,\n children: c(\"noCode\", \"No code to display\")\n }\n );\n}, Wo = ({\n subsections: e,\n isExpanded: t,\n selectedSubsection: r,\n parentSectionId: n,\n onSubsectionSelect: o\n}) => {\n const s = j(null), [i, c] = M(void 0);\n return ka(() => {\n if (s.current) {\n const d = s.current.scrollHeight;\n c(t ? d + 16 : 0);\n }\n }, [t, e]), /* @__PURE__ */ a(\n \"div\",\n {\n className: \"overflow-hidden transition-all duration-300 ease-in-out\",\n style: { height: i !== void 0 ? `${i}px` : \"auto\" },\n children: /* @__PURE__ */ a(\"div\", { ref: s, className: \"ml-6 mt-1 mb-1 space-y-1\", children: e.map((d) => /* @__PURE__ */ p(\"div\", { className: \"relative group\", children: [\n r === d.id && /* @__PURE__ */ a(\"div\", { className: \"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none\" }),\n r !== d.id && /* @__PURE__ */ a(\"div\", { className: \"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200\" }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: () => o?.(d.id, n),\n className: `relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${r === d.id ? \"text-blue-700 dark:text-blue-300\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200\"}`,\n children: d.title\n }\n )\n ] }, d.id)) })\n }\n );\n}, wu = ({\n id: e,\n title: t,\n content: r,\n subsections: n,\n isSelected: o = !1,\n selectedSubsection: s = null,\n onSectionSelect: i,\n onSubsectionSelect: c,\n className: d = \"\"\n}) => {\n const [l, g] = M(!1), u = () => {\n g(!l);\n }, b = () => {\n i?.(e);\n }, f = n && n.length > 0;\n return /* @__PURE__ */ p(\"div\", { className: d, children: [\n /* @__PURE__ */ p(\"div\", { className: \"relative flex items-center group\", children: [\n o && !s && /* @__PURE__ */ a(\"div\", { className: \"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none\" }),\n !(o && !s) && /* @__PURE__ */ a(\"div\", { className: \"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200\" }),\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: b,\n className: `relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${o && !s ? \"text-blue-700 dark:text-blue-300\" : \"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100\"}`,\n children: t\n }\n ),\n f && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: u,\n className: \"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200\",\n \"aria-label\": l ? \"Collapse section\" : \"Expand section\",\n children: /* @__PURE__ */ a(\n It,\n {\n className: `h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${l ? \"rotate-90\" : \"rotate-0\"}`\n }\n )\n }\n )\n ] }),\n f && /* @__PURE__ */ a(\n Wo,\n {\n subsections: n,\n isExpanded: l,\n selectedSubsection: s,\n parentSectionId: e,\n onSubsectionSelect: c\n }\n )\n ] });\n}, ku = ({\n title: e,\n subtitle: t,\n buttonText: r,\n buttonIcon: n = \"envelope\",\n variant: o = \"default\",\n badgeText: s = \"FREE\",\n prominentBadgeText: i = \"100% Free\",\n onButtonClick: c,\n className: d = \"\"\n}) => {\n const l = () => n === \"envelope\" || n === \"both\" ? /* @__PURE__ */ a(\n _a,\n {\n className: o === \"prominent\" ? \"h-5 w-5 mr-2\" : \"h-4 w-4 mr-1\"\n }\n ) : n === \"none\" ? null : /* @__PURE__ */ a(\n \"svg\",\n {\n className: o === \"prominent\" ? \"h-5 w-5 mr-2\" : \"h-4 w-4 mr-1\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207\"\n }\n )\n }\n ), g = () => n === \"arrow\" || n === \"both\" ? /* @__PURE__ */ a(zr, { className: \"h-4 w-4 ml-2\" }) : null, u = () => o === \"prominent\" ? \"border-b-2 border-green-200 dark:border-green-700\" : \"border-b border-green-200 dark:border-green-700\", b = () => {\n const x = \"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer\";\n return o === \"prominent\" ? `${x} px-8 py-3 text-base` : `${x} px-6 py-2 text-sm`;\n }, f = () => o === \"prominent\" ? \"text-green-800 dark:text-green-200 font-semibold text-lg\" : \"text-green-800 dark:text-green-200 font-semibold\", h = o === \"prominent\" ? i : s, { containerClass: y } = ke();\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: `bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${u()} ${d}`,\n children: /* @__PURE__ */ a(\"div\", { className: `${y} py-4`, children: /* @__PURE__ */ p(\"div\", { className: \"flex flex-col sm:flex-row items-center justify-between gap-4\", children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n className: `flex items-center ${o === \"prominent\" ? \"text-center sm:text-left\" : \"\"}`,\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse\", children: h }),\n /* @__PURE__ */ p(\"div\", { children: [\n /* @__PURE__ */ a(\"span\", { className: f(), children: e }),\n t && /* @__PURE__ */ a(\"span\", { className: \"text-green-700 dark:text-green-300 text-sm block\", children: t })\n ] })\n ]\n }\n ),\n /* @__PURE__ */ p(\"button\", { onClick: c, className: b(), children: [\n l(),\n r,\n g()\n ] })\n ] }) })\n }\n );\n}, Nu = ({\n children: e,\n onClick: t,\n variant: r,\n size: n,\n disabled: o,\n className: s,\n type: i,\n trackingLabel: c,\n actionType: d,\n componentName: l,\n onTrack: g,\n trackingParams: u = {},\n ...b\n}) => /* @__PURE__ */ a(\n me,\n {\n ...b,\n variant: r,\n size: n,\n disabled: o,\n className: s,\n type: i,\n onClick: (h) => {\n if (g) {\n const y = c || (typeof e == \"string\" ? e : \"\") || \"Unknown Button\", C = r && [\n \"default\",\n \"primary\",\n \"secondary\",\n \"outline\",\n \"ghost\",\n \"destructive\",\n \"link\"\n ].includes(r) ? r : \"default\";\n g({\n button_text: y,\n button_type: C,\n component_name: l,\n action_type: d,\n ...u\n // Spread additional tracking parameters\n });\n }\n t && t(h);\n },\n children: e\n }\n), Cu = ({\n children: e,\n onClick: t,\n to: r,\n href: n,\n trackingLabel: o,\n componentName: s,\n onTrack: i,\n trackingParams: c = {},\n LinkComponent: d,\n linkProps: l = {},\n ...g\n}) => {\n const u = (f) => {\n if (i) {\n const h = o || (typeof e == \"string\" ? e : \"\") || \"Unknown Link\", y = r ? typeof r == \"string\" ? r : r.pathname || \"\" : n || \"\";\n i({\n link_text: h,\n link_url: y,\n to_page: y,\n navigation_type: d ? \"router_link\" : \"anchor_link\",\n component_name: s,\n ...c\n // Spread additional tracking parameters\n });\n }\n t && t(f);\n };\n if (d && r !== void 0)\n return /* @__PURE__ */ a(d, { ...l, to: r, onClick: u, ...g, children: e });\n const b = r ? typeof r == \"string\" ? r : r.pathname || \"#\" : n;\n return /* @__PURE__ */ a(\"a\", { ...g, href: b, onClick: u, children: e });\n}, Er = {\n en: { name: \"English\", flag: \"🇺🇸\" },\n ar: { name: \"العربية\", flag: \"🇸🇦\" },\n de: { name: \"Deutsch\", flag: \"🇩🇪\" },\n es: { name: \"Español\", flag: \"🇪🇸\" },\n fr: { name: \"Français\", flag: \"🇫🇷\" },\n it: { name: \"Italiano\", flag: \"🇮🇹\" },\n ja: { name: \"日本語\", flag: \"🇯🇵\" },\n ko: { name: \"한국어\", flag: \"🇰🇷\" },\n pt: { name: \"Português\", flag: \"🇵🇹\" },\n ru: { name: \"Русский\", flag: \"🇷🇺\" },\n sv: { name: \"Svenska\", flag: \"🇸🇪\" },\n th: { name: \"ไทย\", flag: \"🇹🇭\" },\n uk: { name: \"Українська\", flag: \"🇺🇦\" },\n vi: { name: \"Tiếng Việt\", flag: \"🇻🇳\" },\n zh: { name: \"简体中文\", flag: \"🇨🇳\" }\n}, Su = ({\n variant: e = \"compact\",\n className: t = \"\"\n}) => {\n const { i18n: r, t: n } = dt(\"languageSelector\"), [o, s] = U.useState(r.language), i = U.useMemo(() => r.options.supportedLngs ? r.options.supportedLngs.filter((l) => l !== \"cimode\").map((l) => ({\n code: l,\n name: Er[l]?.name || l.toUpperCase(),\n flag: Er[l]?.flag || \"🌐\"\n })).sort(\n (l, g) => l.name.localeCompare(g.name)\n ) : [], [r.options.supportedLngs]), c = i.find(\n (l) => l.code === o || l.code.toLowerCase() === o.toLowerCase()\n );\n U.useEffect(() => {\n s(r.language);\n }, [r.language]);\n const d = (l) => {\n localStorage.setItem(\"language\", l), r.changeLanguage(l).then(() => {\n s(r.language), setTimeout(() => {\n window.dispatchEvent(new Event(\"languagechange\"));\n }, 100);\n }).catch(() => {\n });\n };\n return e === \"compact\" ? /* @__PURE__ */ a(\"div\", { className: `relative ${t}`, children: /* @__PURE__ */ p(kr, { value: o, onValueChange: d, children: [\n /* @__PURE__ */ a(Nt, { className: \"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0\", children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center space-x-2\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-lg leading-none\", children: c?.flag }),\n /* @__PURE__ */ a(\"span\", { className: \"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300\", children: c?.name })\n ] }) }),\n /* @__PURE__ */ a(Ct, { children: i.map(\n (l) => /* @__PURE__ */ a(\n St,\n {\n value: l.code,\n className: \"cursor-pointer\",\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center space-x-2\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-lg leading-none\", children: l.flag }),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm\", children: l.name })\n ] })\n },\n l.code\n )\n ) })\n ] }) }) : /* @__PURE__ */ p(\"div\", { className: `space-y-2 ${t}`, children: [\n /* @__PURE__ */ p(\"label\", { className: \"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2\", children: [\n /* @__PURE__ */ a(za, { className: \"h-4 w-4 text-gray-500 dark:text-gray-400\" }),\n /* @__PURE__ */ a(\"span\", { children: n(\"language\", \"Language\") })\n ] }),\n /* @__PURE__ */ p(kr, { value: o, onValueChange: d, children: [\n /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(Qn, { placeholder: n(\"selectLanguage\", \"Select language\") }) }),\n /* @__PURE__ */ a(Ct, { children: i.map(\n (l) => /* @__PURE__ */ a(\n St,\n {\n value: l.code,\n className: \"cursor-pointer\",\n children: /* @__PURE__ */ p(\"div\", { className: \"flex items-center space-x-2\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-lg leading-none\", children: l.flag }),\n /* @__PURE__ */ a(\"span\", { children: l.name })\n ] })\n },\n l.code\n )\n ) })\n ] }),\n /* @__PURE__ */ a(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: n(\"selectPreferredLanguage\", \"Select your preferred language\") })\n ] });\n}, Eu = ({\n items: e,\n type: t = \"ordered\",\n variant: r = \"default\",\n className: n,\n itemClassName: o\n}) => {\n const s = () => {\n const l = \"space-y-2\", g = {\n ordered: t === \"ordered\" ? \"list-decimal\" : \"\",\n unordered: t === \"unordered\" ? \"list-disc\" : \"\"\n }, u = {\n default: \"list-inside\",\n enhanced: \"list-inside space-y-3\",\n minimal: \"list-none space-y-1\"\n };\n return m(\n l,\n g[t],\n u[r]\n );\n }, i = (l) => {\n const g = \"text-gray-600 dark:text-gray-400\";\n return r === \"enhanced\" ? m(\n g,\n \"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700\",\n l === e.length - 1 && \"border-l-transparent\"\n ) : r === \"minimal\" ? m(g, \"flex items-start\") : g;\n }, c = (l) => r === \"enhanced\" && t === \"ordered\" ? /* @__PURE__ */ a(\"div\", { className: \"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium\", children: l + 1 }) : null, d = (l, g) => {\n const u = typeof l == \"object\", b = u ? l.content : l, f = u ? l.subItems : void 0;\n return /* @__PURE__ */ p(\"li\", { className: m(i(g), o), children: [\n c(g),\n r === \"minimal\" && t === \"ordered\" && /* @__PURE__ */ a(\"span\", { className: \"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0\", children: g + 1 }),\n r === \"minimal\" && t === \"unordered\" && /* @__PURE__ */ a(\"span\", { className: \"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0\" }),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1\", children: [\n /* @__PURE__ */ a(\"div\", { children: b }),\n f && f.length > 0 && /* @__PURE__ */ a(\"ul\", { className: \"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500\", children: f.map((h, y) => /* @__PURE__ */ a(\"li\", { children: h }, y)) })\n ] })\n ] }, g);\n };\n return /* @__PURE__ */ a(\"ul\", { className: m(s(), n), children: e.map(d) });\n};\nclass Au extends jr {\n constructor() {\n super(...arguments), this.state = {\n hasError: !1\n };\n }\n static getDerivedStateFromError(t) {\n return { hasError: !0, error: t };\n }\n componentDidCatch(t, r) {\n console.error(\"ErrorBoundary caught an error:\", t, r), this.props.onError?.(t, r);\n }\n render() {\n return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ p(\n \"div\",\n {\n style: { padding: \"20px\", border: \"1px solid red\", margin: \"10px\" },\n children: [\n /* @__PURE__ */ a(\"h2\", { children: \"Something went wrong\" }),\n /* @__PURE__ */ p(\"p\", { children: [\n \"Error: \",\n this.state.error?.message || \"Unknown error\"\n ] }),\n /* @__PURE__ */ a(\"button\", { onClick: () => this.setState({ hasError: !1 }), children: \"Try again\" })\n ]\n }\n ) : this.props.children;\n }\n}\nclass zt extends jr {\n constructor(t) {\n super(t), this.retryTimer = null, this.sendErrorToMonitoring = (r, n) => {\n try {\n typeof window < \"u\" && window.Sentry && window.Sentry?.captureException(r, {\n contexts: {\n react: {\n componentStack: n.componentStack\n }\n },\n tags: {\n errorBoundary: !0,\n componentName: this.props.componentName || \"unknown\",\n lazyLoading: !0\n }\n }), typeof window < \"u\" && window.gtag && window.gtag?.(\"event\", \"exception\", {\n description: r.message,\n fatal: !1,\n custom_map: {\n component: this.props.componentName || \"unknown\"\n }\n });\n } catch {\n }\n }, this.handleRetry = () => {\n const { maxRetries: r = 3, retryDelay: n = 1e3 } = this.props, { retryCount: o } = this.state;\n if (o >= r)\n return;\n this.setState({\n isRetrying: !0\n }), this.retryTimer && clearTimeout(this.retryTimer);\n const s = n * Math.pow(2, o);\n this.retryTimer = setTimeout(() => {\n this.setState({\n hasError: !1,\n error: null,\n errorInfo: null,\n retryCount: o + 1,\n isRetrying: !1\n });\n }, s);\n }, this.handleReload = () => {\n window.location.reload();\n }, this.state = {\n hasError: !1,\n error: null,\n errorInfo: null,\n retryCount: 0,\n isRetrying: !1,\n lastErrorTime: 0\n };\n }\n static getDerivedStateFromError(t) {\n return {\n hasError: !0,\n error: t,\n lastErrorTime: Date.now()\n };\n }\n componentDidCatch(t, r) {\n const { onError: n, componentName: o } = this.props;\n this.setState({\n error: t,\n errorInfo: r\n }), console.error(\n `LazyErrorBoundary caught an error in ${o || \"Unknown Component\"}:`,\n t,\n r\n ), n?.(t, r), this.sendErrorToMonitoring(t, r);\n }\n componentWillUnmount() {\n this.retryTimer && clearTimeout(this.retryTimer);\n }\n render() {\n const {\n children: t,\n fallback: r,\n componentName: n,\n showRetryButton: o = !0,\n maxRetries: s = 3\n } = this.props, { hasError: i, error: c, isRetrying: d, retryCount: l } = this.state;\n return i && c ? r || /* @__PURE__ */ a(\"div\", { className: \"lazy-error-boundary error-boundary-container\", children: /* @__PURE__ */ p(\"div\", { className: \"error-content\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"error-icon\", children: \"⚠️\" }),\n /* @__PURE__ */ p(\"h3\", { className: \"error-title\", children: [\n \"Something went wrong loading \",\n n || \"this component\"\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"error-details\", children: [\n /* @__PURE__ */ a(\"p\", { className: \"error-message\", children: c.message }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ p(\"details\", { className: \"error-stack\", children: [\n /* @__PURE__ */ a(\"summary\", { children: \"Error Details (Development)\" }),\n /* @__PURE__ */ a(\"pre\", { children: c.stack })\n ] })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"error-actions\", children: [\n o && l < s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: this.handleRetry,\n disabled: d,\n className: \"retry-button\",\n children: d ? \"Retrying...\" : `Retry (${l}/${s})`\n }\n ),\n l >= s && /* @__PURE__ */ a(\"button\", { onClick: this.handleReload, className: \"reload-button\", children: \"Reload Page\" })\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"error-help\", children: [\n /* @__PURE__ */ a(\"p\", { children: \"This might be a temporary issue. Try refreshing the page.\" }),\n navigator.onLine === !1 && /* @__PURE__ */ a(\"p\", { className: \"offline-notice\", children: \"You appear to be offline. Check your connection and try again.\" })\n ] })\n ] }) }) : t;\n }\n}\nfunction Tu(e, t) {\n const r = (n) => /* @__PURE__ */ a(zt, { ...t, children: /* @__PURE__ */ a(e, { ...n }) });\n return r.displayName = `withLazyErrorBoundary(${e.displayName || e.name})`, r;\n}\nclass Lu extends zt {\n static getDerivedStateFromError(t) {\n return t.message.includes(\"Loading chunk\") || t.message.includes(\"Loading CSS chunk\") || t.message.includes(\"ChunkLoadError\") || t.name === \"ChunkLoadError\" ? {\n hasError: !0,\n error: new Error(\n \"Network error while loading component. Please check your connection and try again.\"\n ),\n lastErrorTime: Date.now()\n } : super.getDerivedStateFromError(t);\n }\n}\nfunction Mu() {\n const [e, t] = U.useState(0), r = U.useCallback(() => {\n t((n) => n + 1);\n }, []);\n return {\n errorRecoveryCount: e,\n triggerErrorRecovery: r\n };\n}\nfunction Iu({ children: e }) {\n return /* @__PURE__ */ a(\n zt,\n {\n onError: (r, n) => {\n console.error(\"Global lazy loading error:\", r, n), typeof window < \"u\" && window.Sentry && window.Sentry?.captureException(r, {\n level: \"error\",\n tags: {\n globalErrorBoundary: !0,\n lazyLoading: !0\n }\n });\n },\n componentName: \"Application\",\n maxRetries: 1,\n showRetryButton: !0,\n fallback: /* @__PURE__ */ p(\"div\", { className: \"global-error-fallback\", children: [\n /* @__PURE__ */ a(\"h1\", { children: \"Application Error\" }),\n /* @__PURE__ */ a(\"p\", { children: \"Something went wrong with the application. Please refresh the page.\" }),\n /* @__PURE__ */ a(\"button\", { onClick: () => window.location.reload(), children: \"Refresh Page\" })\n ] }),\n children: e\n }\n );\n}\nconst Pu = ({ children: e }) => /* @__PURE__ */ a(H, { children: e }), Ru = ({\n children: e\n}) => /* @__PURE__ */ a(H, { children: e }), Ou = (e, t, r) => {\n const n = Ye(e, t);\n return r && (n.displayName = `Memo(${r})`), process.env.NODE_ENV === \"development\" ? (o) => (ge(() => {\n let i = 0;\n return () => ++i;\n }, [])(), /* @__PURE__ */ a(n, { ...o })) : n;\n}, Du = (e, t) => Ye(e, (r, n) => t.every((o) => r[o] === n[o])), Uu = Ye(\n ({ children: e, compute: t, deps: r }) => {\n const n = U.useRef(r), o = U.useRef(t), s = U.useRef(void 0), i = ge(() => {\n const c = r.length !== n.current.length || r.some((l, g) => l !== n.current[g]), d = t !== o.current;\n if (c || d || s.current === void 0) {\n let l;\n return process.env.NODE_ENV === \"development\" ? (performance.now(), l = t(), performance.now()) : l = t(), n.current = r, o.current = t, s.current = l, l;\n }\n return s.current;\n }, [t, r]);\n return /* @__PURE__ */ a(H, { children: e(i) });\n }\n), ju = Ye(\n ({ item: e, index: t, style: r, renderItem: n }) => /* @__PURE__ */ a(\"div\", { style: r, children: n(e, t) }),\n (e, t) => e.index === t.index && e.item === t.item && e.style.height === t.style.height && e.style.top === t.style.top\n), _u = Ye(\n ({ condition: e, children: t, fallback: r = null }) => e ? /* @__PURE__ */ a(H, { children: t }) : /* @__PURE__ */ a(H, { children: r })\n), zu = ({\n children: e,\n threshold: t = 0.1,\n rootMargin: r = \"50px\",\n fallback: n = null\n}) => {\n const [o, s] = U.useState(!1), i = U.useRef(null);\n return U.useEffect(() => {\n const c = new IntersectionObserver(\n ([d]) => {\n d.isIntersecting && (s(!0), c.disconnect());\n },\n { threshold: t, rootMargin: r }\n );\n return i.current && c.observe(i.current), () => c.disconnect();\n }, [t, r]), /* @__PURE__ */ a(\"div\", { ref: i, children: o ? e : n });\n}, Bu = ({\n children: e,\n maxRenderTime: t = 16,\n // 16ms = 60fps\n onSlowRender: r\n}) => {\n const n = U.useRef(0);\n return U.useLayoutEffect(() => {\n n.current = performance.now();\n }), U.useEffect(() => {\n const o = performance.now() - n.current;\n o > t && r?.(o);\n }), /* @__PURE__ */ a(H, { children: e });\n}, Fu = ({\n children: e,\n batchSize: t = 5,\n delay: r = 0\n}) => {\n const [n, o] = U.useState(t);\n return U.useEffect(() => {\n if (n < e.length) {\n const s = setTimeout(() => {\n o((i) => Math.min(i + t, e.length));\n }, r);\n return () => clearTimeout(s);\n }\n }, [n, e.length, t, r]), /* @__PURE__ */ a(H, { children: e.slice(0, n) });\n}, Wu = ({\n src: e,\n alt: t,\n placeholder: r,\n lowQualitySrc: n,\n aspectRatio: o = \"16/9\",\n eager: s = !1,\n className: i = \"\",\n ...c\n}) => {\n const [d, l] = M(!1), [g, u] = M(s), [b, f] = M(!1), h = j(null), y = j(null);\n R(() => {\n if (s) {\n u(!0);\n return;\n }\n return y.current = new IntersectionObserver(\n (v) => {\n v.forEach((k) => {\n k.isIntersecting && (u(!0), y.current && h.current && y.current.unobserve(h.current));\n });\n },\n {\n rootMargin: \"50px\",\n // Start loading 50px before entering viewport\n threshold: 0.01\n }\n ), h.current && y.current.observe(h.current), () => {\n y.current && y.current.disconnect();\n };\n }, [s]);\n const x = () => {\n l(!0);\n }, C = () => {\n f(!0);\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: `relative overflow-hidden ${i}`,\n style: { aspectRatio: o },\n children: [\n n && !d && /* @__PURE__ */ a(\n \"img\",\n {\n src: n,\n alt: \"\",\n className: \"absolute inset-0 w-full h-full object-cover blur-sm\",\n \"aria-hidden\": \"true\"\n }\n ),\n !n && !d && /* @__PURE__ */ a(\n \"div\",\n {\n className: \"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse\",\n \"aria-hidden\": \"true\"\n }\n ),\n g && !b && /* @__PURE__ */ a(\n \"img\",\n {\n ref: h,\n src: e,\n alt: t,\n onLoad: x,\n onError: C,\n className: `absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d ? \"opacity-100\" : \"opacity-0\"}`,\n loading: s ? \"eager\" : \"lazy\",\n ...c\n }\n ),\n b && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800\", children: /* @__PURE__ */ p(\"div\", { className: \"text-center text-gray-500 dark:text-gray-400\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"mx-auto h-12 w-12 mb-2\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\"p\", { className: \"text-sm\", children: \"Failed to load image\" })\n ] }) })\n ]\n }\n );\n}, $o = (e) => /^[a-z]{2}(-[a-z]+)?$/.test(e);\nfunction $u({\n to: e,\n language: t,\n children: r,\n isLanguageSupported: n = $o,\n defaultLanguage: o = \"en\",\n ...s\n}) {\n const { lang: i } = ct(), c = i && n(i) ? i : o, d = t || c, l = e.startsWith(`/${d}`) ? e : `/${d}${e.startsWith(\"/\") ? e : `/${e}`}`;\n return /* @__PURE__ */ a(Ze, { to: l, ...s, children: r });\n}\nfunction Vu({\n isLanguageSupported: e,\n defaultLanguage: t = \"en\",\n storageKey: r = \"language\",\n fallback: n = null\n}) {\n const { lang: o } = ct(), s = Rt(), { i18n: i } = dt();\n return R(() => {\n if (!o || !e(o)) {\n s(`/${t}`, { replace: !0 });\n return;\n }\n i.language !== o && i.changeLanguage(o);\n try {\n localStorage.setItem(r, o);\n } catch {\n }\n }, [o, i, s, e, t, r]), !o || !e(o) ? /* @__PURE__ */ a(H, { children: n }) : /* @__PURE__ */ a(Ga, {});\n}\nfunction Ar(e, t) {\n const r = ca(e);\n return `/${t}${r.startsWith(\"/\") ? r : `/${r}`}`;\n}\nfunction ca(e, t) {\n const r = e.split(\"/\").filter(Boolean);\n if (r.length > 0) {\n const n = r[0];\n if (/^[a-z]{2}(-[a-z]+)?$/.test(n) && (!t || t(n)))\n return \"/\" + r.slice(1).join(\"/\");\n }\n return e;\n}\nfunction Hu(e = {}) {\n const {\n isLanguageSupported: t = (g) => /^[a-z]{2}(-[a-z]+)?$/.test(g),\n defaultLanguage: r = \"en\",\n storageKey: n = \"language\"\n } = e, o = Rt(), { lang: s } = ct(), { i18n: i } = dt(), c = s && t(s) ? s : i.language || r, d = _(\n (g, u) => {\n if (typeof g == \"number\") {\n o(g);\n return;\n }\n const b = Ar(g, c);\n o(b, u);\n },\n [o, c]\n ), l = _(\n (g, u) => {\n i.changeLanguage(g);\n const b = ca(\n u || (typeof window < \"u\" ? window.location.pathname : \"/\"),\n t\n ), f = Ar(b, g);\n o(f, { replace: !0 });\n try {\n localStorage.setItem(n, g);\n } catch {\n }\n },\n [o, i, t, n]\n );\n return { navigate: d, switchLanguage: l, currentLanguage: c };\n}\nfunction Vo() {\n return /* @__PURE__ */ a(\"div\", { className: \"min-h-screen flex items-center justify-center bg-theme-bg-primary\", children: /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600\" }) });\n}\nfunction qu({\n children: e,\n isAuthenticated: t,\n isLoading: r = !1,\n redirectPath: n,\n loadingComponent: o,\n fallback: s = null\n}) {\n const i = Rt(), { lang: c } = ct();\n return R(() => {\n if (!r && !t) {\n const d = n ? n.replace(\":lang\", c || \"en\") : `/${c || \"en\"}`;\n i(d, { replace: !0 });\n }\n }, [t, r, i, c, n]), r ? /* @__PURE__ */ a(H, { children: o ?? /* @__PURE__ */ a(Vo, {}) }) : t ? /* @__PURE__ */ a(H, { children: e }) : /* @__PURE__ */ a(H, { children: s });\n}\nfunction Ho() {\n return /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8 text-red-600 dark:text-red-400\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n }\n )\n }\n );\n}\nfunction qo({\n spinning: e = !1\n}) {\n return /* @__PURE__ */ a(\n \"svg\",\n {\n className: `w-4 h-4 ${e ? \"animate-spin\" : \"\"}`,\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\"\n }\n )\n }\n );\n}\nfunction Gu({\n title: e = \"Something went wrong\",\n message: t = \"An unexpected error occurred. Please try again.\",\n onRetry: r,\n isRetrying: n = !1,\n retryText: o = \"Retry\",\n loadingText: s = \"Loading...\",\n icon: i,\n className: c = \"\"\n}) {\n return /* @__PURE__ */ a(\n \"div\",\n {\n className: `flex flex-col items-center justify-center py-12 px-4 ${c}`,\n children: /* @__PURE__ */ p(\"div\", { className: \"flex flex-col items-center max-w-md text-center\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"w-16 h-16 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center mb-4\", children: i ?? /* @__PURE__ */ a(Ho, {}) }),\n /* @__PURE__ */ a(\"h3\", { className: \"text-lg font-semibold text-theme-text-primary mb-2\", children: e }),\n /* @__PURE__ */ a(\"p\", { className: \"text-sm text-theme-text-secondary mb-6\", children: t }),\n r && /* @__PURE__ */ p(\n \"button\",\n {\n onClick: r,\n disabled: n,\n className: \"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50\",\n children: [\n /* @__PURE__ */ a(qo, { spinning: n }),\n n ? s : o\n ]\n }\n )\n ] })\n }\n );\n}\nvar oe = /* @__PURE__ */ ((e) => (e.LIGHT = \"light\", e.DARK = \"dark\", e.SYSTEM = \"system\", e))(oe || {}), da = /* @__PURE__ */ ((e) => (e.SMALL = \"small\", e.MEDIUM = \"medium\", e.LARGE = \"large\", e))(da || {});\nconst Je = {\n getItem: (e) => {\n try {\n return localStorage.getItem(e);\n } catch {\n return null;\n }\n },\n setItem: (e, t) => {\n try {\n localStorage.setItem(e, t);\n } catch {\n }\n }\n}, ua = ot(\n void 0\n);\nfunction Yu() {\n const e = st(ua);\n if (e === void 0)\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n return e;\n}\nfunction Ku({\n children: e,\n themeStorageKey: t = \"theme\",\n fontSizeStorageKey: r = \"font-size\",\n defaultTheme: n = oe.LIGHT,\n defaultFontSize: o = da.MEDIUM\n}) {\n const [s, i] = M(() => Je.getItem(t) || n), [c, d] = M(() => Je.getItem(r) || o), [l, g] = M(\n () => s === oe.SYSTEM ? typeof window < \"u\" && window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? oe.DARK : oe.LIGHT : s\n ), u = _(\n (h) => {\n i(h), Je.setItem(t, h);\n },\n [t]\n ), b = _(\n (h) => {\n d(h), Je.setItem(r, h);\n },\n [r]\n );\n R(() => {\n const h = document.documentElement;\n let y = s;\n s === oe.SYSTEM && (y = window.matchMedia(\n \"(prefers-color-scheme: dark)\"\n ).matches ? oe.DARK : oe.LIGHT), g(y), h.classList.remove(\"light\", \"dark\"), h.classList.add(y), h.classList.remove(\"font-small\", \"font-medium\", \"font-large\"), h.classList.add(`font-${c}`);\n }, [s, c]), R(() => {\n if (s === oe.SYSTEM) {\n const h = window.matchMedia(\"(prefers-color-scheme: dark)\"), y = (x) => {\n const C = document.documentElement, v = x.matches ? oe.DARK : oe.LIGHT;\n g(v), C.classList.remove(\"light\", \"dark\"), C.classList.add(v);\n };\n return h.addEventListener(\"change\", y), () => {\n h.removeEventListener(\"change\", y);\n };\n }\n }, [s]);\n const f = ge(\n () => ({\n theme: s,\n fontSize: c,\n setTheme: u,\n setFontSize: b,\n resolvedTheme: l\n }),\n [s, c, u, b, l]\n );\n return /* @__PURE__ */ a(ua.Provider, { value: f, children: e });\n}\nconst Zu = ({\n icon: e,\n title: t,\n description: r,\n benefits: n,\n metrics: o,\n color: s = \"blue\",\n isHighlight: i = !1,\n learnMoreUrl: c,\n cta: d,\n onClick: l,\n interactive: g = !1,\n borderColor: u = !1,\n className: b\n}) => {\n const f = {\n blue: \"text-blue-600 dark:text-blue-400\",\n green: \"text-green-600 dark:text-green-400\",\n purple: \"text-purple-600 dark:text-purple-400\",\n orange: \"text-orange-600 dark:text-orange-400\",\n pink: \"text-pink-600 dark:text-pink-400\",\n gray: \"text-gray-600 dark:text-gray-400\",\n red: \"text-red-600 dark:text-red-400\",\n indigo: \"text-indigo-600 dark:text-indigo-400\",\n cyan: \"text-cyan-600 dark:text-cyan-400\",\n emerald: \"text-emerald-600 dark:text-emerald-400\"\n }, h = {\n green: \"border-l-4 border-green-500\",\n blue: \"border-l-4 border-blue-500\",\n purple: \"border-l-4 border-purple-500\",\n orange: \"border-l-4 border-orange-500\",\n red: \"border-l-4 border-red-500\",\n indigo: \"border-l-4 border-indigo-500\",\n cyan: \"border-l-4 border-cyan-500\",\n emerald: \"border-l-4 border-emerald-500\",\n pink: \"border-l-4 border-pink-500\",\n gray: \"border-l-4 border-gray-500\"\n }, y = {\n green: \"bg-green-100 dark:bg-green-900/20\",\n blue: \"bg-blue-100 dark:bg-blue-900/20\",\n purple: \"bg-purple-100 dark:bg-purple-900/20\",\n orange: \"bg-orange-100 dark:bg-orange-900/20\",\n red: \"bg-red-100 dark:bg-red-900/20\",\n indigo: \"bg-indigo-100 dark:bg-indigo-900/20\",\n cyan: \"bg-cyan-100 dark:bg-cyan-900/20\",\n emerald: \"bg-emerald-100 dark:bg-emerald-900/20\",\n pink: \"bg-pink-100 dark:bg-pink-900/20\",\n gray: \"bg-gray-100 dark:bg-gray-900/20\"\n }, x = f[s], C = typeof e == \"string\", v = () => /* @__PURE__ */ p(H, { children: [\n C ? (\n // Emoji or text icon\n /* @__PURE__ */ a(\"div\", { className: \"text-4xl mb-4\", children: e })\n ) : u ? (\n // Icon with colored background (when borderColor is enabled)\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-12 h-12\",\n \"rounded-lg\",\n \"flex items-center justify-center\",\n \"mb-4\",\n y[s],\n x\n ),\n children: e\n }\n )\n ) : (\n // Regular icon\n /* @__PURE__ */ a(\"div\", { className: m(\"flex-shrink-0 mb-4\", x), children: e })\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1\", children: [\n /* @__PURE__ */ a(\"h3\", { className: \"text-xl font-semibold text-gray-900 dark:text-white mb-3\", children: t }),\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed\", children: r }),\n d && /* @__PURE__ */ a(\"div\", { className: \"mt-3 mb-4\", children: d }),\n n && n.length > 0 && /* @__PURE__ */ a(\"ul\", { className: \"space-y-2 mb-4\", children: n.map((S, E) => /* @__PURE__ */ p(\"li\", { className: \"flex items-start\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0\",\n `bg-${s}-500`\n )\n }\n ),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm text-gray-600 dark:text-gray-400\", children: S })\n ] }, E)) }),\n o && Object.keys(o).length > 0 && /* @__PURE__ */ a(\"div\", { className: \"grid grid-cols-2 gap-4 mt-4\", children: Object.entries(o).map(([S, E], N) => /* @__PURE__ */ p(\n \"div\",\n {\n className: \"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg\",\n children: [\n /* @__PURE__ */ a(\"div\", { className: m(\"text-lg font-bold\", x), children: E }),\n /* @__PURE__ */ a(\"div\", { className: \"text-xs text-gray-500 dark:text-gray-400 mt-1\", children: S })\n ]\n },\n N\n )) })\n ] })\n ] }), k = m(\n \"p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200\",\n u && h[s],\n (g || l) && \"cursor-pointer hover:scale-[1.02]\",\n i ? \"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border\" : \"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border\",\n b\n ), w = (S) => {\n l && (\"key\" in S ? (S.key === \"Enter\" || S.key === \" \") && (S.preventDefault(), l()) : l());\n };\n return c ? /* @__PURE__ */ a(\n \"a\",\n {\n href: c,\n className: m(k, \"block group\"),\n onClick: l ? (S) => {\n S.preventDefault(), w(S);\n } : void 0,\n children: /* @__PURE__ */ a(v, {})\n }\n ) : l ? /* @__PURE__ */ a(\n \"div\",\n {\n className: k,\n onClick: w,\n onKeyDown: w,\n role: \"button\",\n tabIndex: 0,\n \"aria-label\": t,\n children: /* @__PURE__ */ a(v, {})\n }\n ) : /* @__PURE__ */ a(\"div\", { className: k, children: /* @__PURE__ */ a(v, {}) });\n}, Go = Q(\"grid gap-8\", {\n variants: {\n columns: {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-1 md:grid-cols-2\",\n 3: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\",\n 4: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\"\n },\n spacing: {\n sm: \"gap-4\",\n md: \"gap-8\",\n lg: \"gap-12\"\n }\n },\n defaultVariants: {\n columns: 3,\n spacing: \"md\"\n }\n}), Yo = Q(\"group transition-all duration-300\", {\n variants: {\n variant: {\n default: \"text-center\",\n left: \"text-left\",\n hoverable: \"text-center hover:transform hover:scale-105 cursor-pointer\",\n card: \"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center\",\n minimal: \"text-center space-y-4\"\n },\n animation: {\n none: \"\",\n hover: \"hover:transform hover:scale-105\",\n float: \"hover:-translate-y-2\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n animation: \"hover\"\n }\n}), Ko = Q(\n \"flex items-center justify-center rounded-2xl mb-6 transition-all duration-300\",\n {\n variants: {\n size: {\n sm: \"w-16 h-16\",\n md: \"w-20 h-20\",\n lg: \"w-24 h-24\"\n },\n style: {\n gradient: \"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40\",\n solid: \"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40\",\n outline: \"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700\",\n colorful: \"group-hover:scale-110\"\n },\n position: {\n center: \"mx-auto\",\n left: \"\",\n right: \"ml-auto\"\n }\n },\n defaultVariants: {\n size: \"md\",\n style: \"gradient\",\n position: \"center\"\n }\n }\n), Zo = {\n success: \"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300\",\n info: \"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300\",\n warning: \"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300\",\n default: \"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300\"\n}, Xu = ({\n className: e,\n features: t,\n columns: r = 3,\n spacing: n = \"md\",\n cardVariant: o = \"default\",\n cardAnimation: s = \"hover\",\n iconSize: i = \"md\",\n iconStyle: c = \"gradient\",\n iconPosition: d = \"center\",\n titleClass: l,\n descriptionClass: g,\n animate: u = !0,\n animationDelay: b = 0,\n staggerDelay: f = 100,\n onFeatureClick: h,\n defaultLinkText: y = \"Learn more\"\n}) => {\n const x = (v, k) => {\n if (c === \"colorful\" && v.gradient)\n return {\n background: `linear-gradient(135deg, ${v.gradient.from}, ${v.gradient.to})`\n };\n if (c === \"colorful\") {\n const w = [\n { from: \"#3B82F6\", to: \"#1D4ED8\" },\n // blue\n { from: \"#10B981\", to: \"#059669\" },\n // emerald\n { from: \"#8B5CF6\", to: \"#7C3AED\" },\n // violet\n { from: \"#F59E0B\", to: \"#D97706\" },\n // amber\n { from: \"#EF4444\", to: \"#DC2626\" },\n // red\n { from: \"#06B6D4\", to: \"#0891B2\" }\n // cyan\n ], S = w[k % w.length];\n return {\n background: `linear-gradient(135deg, ${S.from}, ${S.to})`\n };\n }\n }, C = (v, k) => {\n const w = /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n Yo({ variant: o, animation: s })\n ),\n onClick: () => h?.(v),\n role: h ? \"button\" : void 0,\n tabIndex: h ? 0 : void 0,\n children: [\n v.badge && /* @__PURE__ */ a(\"div\", { className: \"mb-4\", children: /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium\",\n Zo[v.badge.variant || \"default\"]\n ),\n children: v.badge.text\n }\n ) }),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n Ko({\n size: i,\n style: c,\n position: d\n })\n ),\n style: x(v, k),\n children: /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center\",\n c === \"colorful\" ? \"text-white\" : \"text-blue-600 dark:text-blue-400\"\n ),\n children: v.icon\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"h3\",\n {\n className: m(\n \"text-xl font-bold text-gray-900 dark:text-white mb-4\",\n l\n ),\n children: v.title\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"text-gray-600 dark:text-gray-300 leading-relaxed\",\n g\n ),\n children: v.description\n }\n ),\n v.link && /* @__PURE__ */ a(\"div\", { className: \"mt-6\", children: /* @__PURE__ */ p(\n \"a\",\n {\n href: v.link.href,\n className: \"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200\",\n children: [\n v.link.text || y,\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-4 h-4 ml-1\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 5l7 7-7 7\"\n }\n )\n }\n )\n ]\n }\n ) })\n ]\n }\n );\n return /* @__PURE__ */ a(\"div\", { children: w }, v.id || k);\n };\n return /* @__PURE__ */ a(\"div\", { className: m(Go({ columns: r, spacing: n }), e), children: t.map(C) });\n}, Tr = (e, t, r, n) => ({\n icon: e,\n title: t,\n description: r,\n ...n\n}), Ju = (e) => [\n Tr(\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n }\n )\n }\n ),\n e?.passwordlessTitle || \"Passwordless Security\",\n e?.passwordlessDescription || \"Authenticate using your Web3 wallet - no passwords to remember or lose.\"\n ),\n Tr(\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-8 h-8\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z\"\n }\n )\n }\n ),\n e?.encryptionTitle || \"End-to-End Encryption\",\n e?.encryptionDescription || \"Your emails are encrypted and only you can read them.\"\n )\n], Qu = ({\n title: e,\n description: t,\n primaryButton: r,\n secondaryButton: n,\n gradient: o = { from: \"blue-600\", to: \"purple-600\" },\n textColor: s = \"light\",\n className: i = \"\",\n size: c = \"lg\"\n}) => {\n const { paddingClass: d } = ke(), g = (() => {\n const x = o.via ? `${o.from}-${o.via}-${o.to}` : `${o.from}-${o.to}`;\n return {\n \"blue-600-purple-600\": \"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700\",\n \"orange-900-red-900\": \"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700\",\n \"green-600-blue-600\": \"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700\",\n \"purple-600-pink-600\": \"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700\"\n }[x] || \"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700\";\n })(), u = s === \"light\" ? \"text-white\" : \"text-gray-900 dark:text-gray-100\", b = {\n sm: \"py-12\",\n md: \"py-16\",\n lg: \"py-20\"\n }, f = {\n sm: \"text-2xl md:text-3xl\",\n md: \"text-3xl md:text-4xl\",\n lg: \"text-4xl md:text-5xl\"\n }, h = {\n sm: \"text-base md:text-lg\",\n md: \"text-lg md:text-xl\",\n lg: \"text-xl md:text-2xl\"\n }, y = (x, C = !1) => {\n const k = /* @__PURE__ */ a(\n me,\n {\n variant: x.variant === \"primary\" || C ? \"gradient\" : (x.variant === \"secondary\", \"outline\"),\n size: \"lg\",\n className: C ? \"\" : \"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30\",\n children: x.label\n }\n );\n return x.external ? /* @__PURE__ */ a(\"a\", { href: x.href, target: \"_blank\", rel: \"noopener noreferrer\", children: k }) : /* @__PURE__ */ a(Ze, { to: x.href, children: k });\n };\n return /* @__PURE__ */ p(\n \"section\",\n {\n className: `${g} ${b[c]} relative overflow-hidden ${i}`,\n children: [\n /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0 bg-black/20\" }),\n /* @__PURE__ */ p(\"div\", { className: \"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl\" }),\n /* @__PURE__ */ a(\"div\", { className: \"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl\" })\n ] }),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: `relative z-10 max-w-4xl mx-auto ${d} text-center`,\n children: [\n /* @__PURE__ */ a(\n \"h2\",\n {\n className: `${f[c]} font-bold ${u} mb-6`,\n children: e\n }\n ),\n /* @__PURE__ */ a(\n \"p\",\n {\n className: `${h[c]} ${u}/90 mb-8 max-w-2xl mx-auto`,\n children: t\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col sm:flex-row gap-4 justify-center\", children: [\n y(r, !0),\n n && y(n, !1)\n ] })\n ]\n }\n )\n ]\n }\n );\n}, Xo = {\n pending: {\n label: \"Pending\",\n color: \"bg-gray-500\",\n textColor: \"text-white\"\n },\n in_progress: {\n label: \"In Progress\",\n color: \"bg-blue-500\",\n textColor: \"text-white\"\n },\n verified: {\n label: \"Verified\",\n color: \"bg-green-500\",\n textColor: \"text-white\"\n },\n rejected: {\n label: \"Rejected\",\n color: \"bg-red-500\",\n textColor: \"text-white\"\n }\n}, Jo = {\n basic: \"Basic KYC\",\n enhanced: \"Enhanced KYC\",\n accredited: \"Accredited Investor\"\n}, eg = ({\n status: e,\n level: t,\n className: r = \"\"\n}) => {\n const n = Xo[e], o = Jo[t];\n return /* @__PURE__ */ a(\"div\", { className: `inline-flex items-center gap-2 ${r}`, children: /* @__PURE__ */ p(\n \"span\",\n {\n className: `px-3 py-1 rounded-full text-sm font-medium ${n.color} ${n.textColor}`,\n children: [\n o,\n \": \",\n n.label\n ]\n }\n ) });\n}, tg = ({\n accessToken: e,\n onComplete: t,\n onError: r,\n className: n = \"\"\n}) => {\n const o = j(null), s = j(null);\n return R(() => {\n if (!e)\n return;\n const i = document.createElement(\"script\");\n return i.src = \"https://static.sumsub.com/idensic/static/sns-websdk-builder.js\", i.async = !0, i.onload = () => {\n if (o.current && window.snsWebSdk)\n try {\n const c = window.snsWebSdk.init(e, () => e).withConf({\n lang: \"en\"\n }).withOptions({\n addViewportTag: !1,\n adaptIframeHeight: !0\n }).on(\"idCheck.onStepCompleted\", (d) => {\n }).on(\"idCheck.onApplicantSubmitted\", (d) => {\n t?.();\n }).on(\"idCheck.onError\", (d) => {\n console.error(\"SumsubWebSDK: Error\", d), r?.(d);\n }).build();\n s.current = c, c.launch(\"#sumsub-websdk-container\");\n } catch (c) {\n console.error(\"Failed to initialize Sumsub SDK:\", c), r?.(c);\n }\n else\n console.error(\n \"SumsubWebSDK: Missing requirements - containerRef:\",\n !!o.current,\n \"snsWebSdk:\",\n !!window.snsWebSdk\n );\n }, i.onerror = () => {\n const c = new Error(\"Failed to load Sumsub Web SDK script\");\n console.error(c), r?.(c);\n }, document.body.appendChild(i), () => {\n document.body.contains(i) && document.body.removeChild(i), s.current && typeof s.current.destroy == \"function\" && s.current.destroy();\n };\n }, [e, t, r]), /* @__PURE__ */ a(\"div\", { className: `sumsub-sdk-container ${n}`, children: /* @__PURE__ */ a(\"div\", { ref: o, id: \"sumsub-websdk-container\" }) });\n}, Qo = {\n basic: {\n title: \"Basic KYC\",\n description: \"Age & Identity Verification\",\n color: \"border-blue-200\",\n activeColor: \"border-blue-500 bg-blue-50\"\n },\n enhanced: {\n title: \"Enhanced KYC\",\n description: \"Basic + Country & Compliance\",\n color: \"border-purple-200\",\n activeColor: \"border-purple-500 bg-purple-50\"\n },\n accredited: {\n title: \"Accredited Investor\",\n description: \"Enhanced + Financial Verification\",\n color: \"border-gold-200\",\n activeColor: \"border-gold-500 bg-gold-50\"\n }\n}, rg = ({\n level: e,\n price: t,\n features: r,\n isActive: n = !1,\n isVerified: o = !1,\n onSelect: s,\n className: i = \"\"\n}) => {\n const c = Qo[e];\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: `\n relative border-2 rounded-lg p-6 transition-all\n ${n ? c.activeColor : `${c.color} hover:border-gray-400`}\n ${i}\n `,\n children: [\n o && /* @__PURE__ */ a(\"div\", { className: \"absolute top-4 right-4\", children: /* @__PURE__ */ a(\"span\", { className: \"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800\", children: \"✓ Verified\" }) }),\n /* @__PURE__ */ a(\"h3\", { className: \"text-xl font-bold mb-2\", children: c.title }),\n /* @__PURE__ */ a(\"p\", { className: \"text-gray-600 mb-4\", children: c.description }),\n /* @__PURE__ */ p(\"p\", { className: \"text-3xl font-bold mb-4\", children: [\n t,\n /* @__PURE__ */ a(\"span\", { className: \"text-sm font-normal text-gray-600\", children: \"/year\" })\n ] }),\n /* @__PURE__ */ a(\"ul\", { className: \"space-y-2 mb-6\", children: r.map((d, l) => /* @__PURE__ */ p(\"li\", { className: \"flex items-start gap-2\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-green-500 mt-0.5\", children: \"✓\" }),\n /* @__PURE__ */ a(\"span\", { className: \"text-sm\", children: d })\n ] }, l)) }),\n s && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: s,\n disabled: o,\n className: `\n w-full py-2 px-4 rounded font-medium transition-colors\n ${o ? \"bg-gray-200 text-gray-500 cursor-not-allowed\" : n ? \"bg-blue-600 text-white hover:bg-blue-700\" : \"bg-gray-200 text-gray-700 hover:bg-gray-300\"}\n `,\n children: o ? \"Verified\" : n ? \"Current Plan\" : \"Select Plan\"\n }\n )\n ]\n }\n );\n}, ag = ({\n children: e,\n backgroundClassName: t = \"\",\n contentClassName: r = \"\"\n}) => /* @__PURE__ */ a(\"div\", { className: t, children: /* @__PURE__ */ a(\"div\", { className: r, children: e }) }), ng = ({ title: e, description: t }) => /* @__PURE__ */ p(\"div\", { className: \"mb-8\", children: [\n /* @__PURE__ */ a(\"h1\", { className: \"text-3xl font-bold text-gray-900 dark:text-white\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: \"mt-2 text-gray-600 dark:text-gray-400\", children: t })\n] }), og = ({\n children: e,\n mode: t,\n className: r,\n as: n = \"div\",\n withPadding: o = !0\n}) => {\n const s = ke(), i = t ? es(t, o) : o ? s.containerClass : s.maxWidthClass;\n return /* @__PURE__ */ a(n, { className: m(i, r), children: e });\n};\nfunction es(e, t) {\n const r = {\n standard: \"max-w-7xl mx-auto\",\n wide: \"max-w-[1920px] mx-auto\",\n full: \"w-full\"\n };\n return t ? `${r[e]} px-4` : r[e];\n}\nconst sg = ({\n variant: e = \"full\",\n sticky: t = !1,\n className: r,\n children: n\n}) => {\n const { containerClass: o } = ke();\n return /* @__PURE__ */ a(\n \"footer\",\n {\n className: m(\n \"bg-gray-900 text-white transition-all duration-300 ease-in-out\",\n e === \"compact\" ? \"py-4\" : \"py-12\",\n t ? \"sticky bottom-0 z-50 border-t border-gray-700\" : \"relative z-10\",\n \"pointer-events-auto\",\n r\n ),\n children: /* @__PURE__ */ a(\"div\", { className: o, children: n })\n }\n );\n}, ig = ({ children: e, className: t }) => /* @__PURE__ */ a(\"div\", { className: m(\"grid md:grid-cols-5 gap-8\", t), children: e }), lg = ({\n children: e,\n description: t,\n className: r\n}) => /* @__PURE__ */ p(\"div\", { className: r, children: [\n /* @__PURE__ */ a(\"div\", { className: \"mb-4\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: O.body.sm(), children: t })\n] }), cg = ({\n title: e,\n children: t,\n className: r\n}) => /* @__PURE__ */ p(\"div\", { className: r, children: [\n /* @__PURE__ */ a(\"h3\", { className: m(O.heading.h5(), \"mb-4 text-white\"), children: e }),\n /* @__PURE__ */ a(\"ul\", { className: m(\"space-y-2\", O.body.sm()), children: t })\n] }), dg = ({\n children: e,\n className: t\n}) => /* @__PURE__ */ a(\"li\", { className: m(\"hover:text-white transition-colors\", t), children: e }), ug = ({ children: e, className: t }) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"border-t mt-8 pt-8 text-center space-y-4\",\n un.border.default,\n t\n ),\n children: e\n }\n), gg = ({\n children: e,\n className: t\n}) => U.Children.toArray(e).filter(Boolean).length === 0 ? null : /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center justify-center gap-3 text-gray-400 text-sm\",\n t\n ),\n children: e\n }\n), mg = ({ children: e, className: t }) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0\",\n t\n ),\n children: e\n }\n), hg = ({\n children: e,\n className: t\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\"flex items-center gap-3 text-gray-400 text-sm\", t),\n children: e\n }\n), fg = ({\n children: e,\n className: t\n}) => /* @__PURE__ */ a(\"div\", { className: m(\"flex space-x-6 text-sm\", t), children: e }), bg = ({\n version: e,\n className: t\n}) => /* @__PURE__ */ p(\"span\", { className: m(\"text-gray-500\", t), children: [\n \"v\",\n e\n] }), pg = ({\n year: e,\n companyName: t,\n rightsText: r,\n companyLink: n,\n className: o\n}) => /* @__PURE__ */ p(\"span\", { className: o, children: [\n \"© \",\n e,\n \" \",\n n || /* @__PURE__ */ a(\"span\", { className: \"text-blue-400\", children: t }),\n r && `. ${r}`\n] }), xe = ({ href: e, label: t, children: r }) => /* @__PURE__ */ a(Oo, { content: t, children: /* @__PURE__ */ a(\n \"a\",\n {\n href: e,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n className: \"text-gray-400 hover:text-white transition-colors\",\n \"aria-label\": t,\n children: r\n }\n) }), yg = ({\n twitterUrl: e,\n redditUrl: t,\n discordUrl: r,\n linkedinUrl: n,\n farcasterUrl: o,\n telegramUrl: s,\n githubUrl: i,\n className: c\n}) => e || t || r || n || o || s || i ? /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center gap-4\", c), children: [\n e && /* @__PURE__ */ a(xe, { href: e, label: \"Twitter / X\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" })\n }\n ) }),\n t && /* @__PURE__ */ a(xe, { href: t, label: \"Reddit\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z\" })\n }\n ) }),\n r && /* @__PURE__ */ a(xe, { href: r, label: \"Discord\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z\" })\n }\n ) }),\n n && /* @__PURE__ */ a(xe, { href: n, label: \"LinkedIn\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\" })\n }\n ) }),\n o && /* @__PURE__ */ a(xe, { href: o, label: \"Farcaster\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M18.24 2.4H5.76a3.36 3.36 0 0 0-3.36 3.36v12.48a3.36 3.36 0 0 0 3.36 3.36h12.48a3.36 3.36 0 0 0 3.36-3.36V5.76a3.36 3.36 0 0 0-3.36-3.36zm-2.16 13.2h-1.2v-4.8h-5.76v4.8H7.92V8.4h1.2v3.6h5.76V8.4h1.2v7.2z\" })\n }\n ) }),\n s && /* @__PURE__ */ a(xe, { href: s, label: \"Telegram\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\"path\", { d: \"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z\" })\n }\n ) }),\n i && /* @__PURE__ */ a(xe, { href: i, label: \"GitHub\", children: /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"w-5 h-5\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n fillRule: \"evenodd\",\n d: \"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z\",\n clipRule: \"evenodd\"\n }\n )\n }\n ) })\n] }) : null, xg = ({\n isSelected: e,\n onClick: t,\n icon: r,\n label: n,\n description: o,\n className: s = \"\"\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n onClick: t,\n className: `relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,\n children: [\n e && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none\" }),\n /* @__PURE__ */ p(\"div\", { className: \"relative z-10 flex items-start w-full\", children: [\n r && /* @__PURE__ */ a(\n r,\n {\n className: `h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e ? \"text-blue-600 dark:text-blue-400\" : \"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300\"}`\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: `font-medium transition-colors ${e ? \"text-blue-600 dark:text-blue-400\" : \"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300\"}`,\n children: n\n }\n ),\n o && /* @__PURE__ */ a(\n \"div\",\n {\n className: `text-xs mt-0.5 transition-colors ${e ? \"text-blue-500 dark:text-blue-300\" : \"text-gray-500 dark:text-gray-400\"}`,\n children: o\n }\n )\n ] })\n ] })\n ]\n }\n), vg = ({\n masterTitle: e,\n masterSubtitle: t,\n backButtonText: r,\n masterContent: n,\n detailContent: o,\n detailTitle: s,\n mobileView: i = \"navigation\",\n onBackToNavigation: c,\n masterClassName: d = \"\",\n detailClassName: l = \"\",\n detailTitleClassName: g = \"\",\n masterWidth: u = 320,\n stickyMaster: b = !0,\n stickyTopOffset: f = 96,\n desktopGap: h = 32,\n showMasterBackground: y = !0,\n enableAnimations: x = !0,\n animationDuration: C = 300,\n animationRef: v\n}) => {\n const { containerClass: k } = ke(), w = `gap-${Math.round(h / 4)}` || \"gap-8\", S = (q) => q ? q.split(\"-\")[0].trim() : \"Back\", E = r ? S(r) : e ? S(e) : \"Back\", [N, T] = M(!1), [L, P] = M(\"auto\"), I = j(null), D = j(\n null\n );\n R(() => (v && (v.current = {\n triggerTransition: (q) => {\n if (!x) {\n q();\n return;\n }\n if (I.current) {\n const ee = I.current.scrollHeight;\n P(ee);\n }\n T(!0), D.current && clearTimeout(D.current), D.current = setTimeout(() => {\n q(), setTimeout(() => {\n if (I.current) {\n const ee = I.current.scrollHeight;\n P(ee), setTimeout(() => {\n P(\"auto\"), T(!1);\n }, C);\n }\n }, 50);\n }, C / 2);\n }\n }), () => {\n D.current && clearTimeout(D.current);\n }), [x, C, v]);\n const W = x ? {\n height: L === \"auto\" ? \"auto\" : `${L}px`,\n transition: `height ${C}ms cubic-bezier(0.4, 0, 0.2, 1)`,\n width: \"100%\",\n maxWidth: \"100%\"\n } : { width: \"100%\", maxWidth: \"100%\" }, z = x ? `${N ? \"opacity-0 transform translate-y-2\" : \"opacity-100 transform translate-y-0\"}` : \"\", $ = x ? {\n transition: `opacity ${C}ms ease-in-out, transform ${C}ms ease-in-out`\n } : {};\n return /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n \"div\",\n {\n className: `md:hidden ${i === \"navigation\" ? \"block\" : \"hidden\"} flex-1`,\n children: /* @__PURE__ */ p(\n \"div\",\n {\n className: y ? \"bg-white dark:bg-gray-800 p-6\" : \"p-6\",\n children: [\n e && /* @__PURE__ */ p(\"div\", { className: k, children: [\n /* @__PURE__ */ a(\"h2\", { className: \"text-xl font-semibold text-gray-900 dark:text-white mb-4\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all\", children: t })\n ] }),\n /* @__PURE__ */ a(\"div\", { className: d, children: n })\n ]\n }\n )\n }\n ),\n /* @__PURE__ */ p(\"div\", { className: `${k} py-8`, children: [\n /* @__PURE__ */ p(\n \"div\",\n {\n className: `md:hidden ${i === \"content\" ? \"block\" : \"hidden\"}`,\n children: [\n i === \"content\" && c && /* @__PURE__ */ p(\n \"button\",\n {\n onClick: c,\n className: \"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors\",\n children: [\n \"← \",\n E\n ]\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n ref: I,\n className: `bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${l}`,\n style: W,\n children: /* @__PURE__ */ p(\"div\", { className: z, style: $, children: [\n s && /* @__PURE__ */ a(\n \"h1\",\n {\n className: `text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,\n children: s\n }\n ),\n o\n ] })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ p(\n \"div\",\n {\n className: `hidden md:flex min-h-full ${w}`,\n style: { width: \"100%\" },\n children: [\n /* @__PURE__ */ a(\n \"aside\",\n {\n className: \"flex-shrink-0\",\n style: { width: `${u}px`, minWidth: `${u}px` },\n children: /* @__PURE__ */ p(\n \"div\",\n {\n className: b ? \"sticky\" : \"\",\n style: b ? { top: `${f}px` } : void 0,\n children: [\n e && /* @__PURE__ */ a(\"h2\", { className: \"text-lg font-semibold text-gray-900 dark:text-white mb-4\", children: e }),\n t && /* @__PURE__ */ a(\"p\", { className: \"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all\", children: t }),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: `bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${b ? \"max-h-[calc(100vh-200px)] overflow-y-auto\" : \"\"} ${d}`,\n children: n\n }\n )\n ]\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: \"flex-1 min-w-0\",\n style: { width: `calc(100% - ${u + h}px)` },\n children: /* @__PURE__ */ a(\n \"div\",\n {\n ref: I,\n className: `bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${l}`,\n style: W,\n children: /* @__PURE__ */ p(\"div\", { className: z, style: $, children: [\n s && /* @__PURE__ */ a(\n \"h1\",\n {\n className: `text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,\n children: s\n }\n ),\n o\n ] })\n }\n )\n }\n )\n ]\n }\n )\n ] })\n ] });\n}, wg = ({\n children: e,\n topBar: t,\n footer: r,\n breadcrumbSection: n,\n stickyHeader: o = !0,\n layoutMode: s = \"standard\",\n className: i,\n contentClassName: c,\n headerZIndex: d = 40\n}) => {\n const l = t || n;\n return /* @__PURE__ */ a(Bo, { mode: s, children: /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col\",\n i\n ),\n children: [\n l && /* @__PURE__ */ p(\n \"div\",\n {\n className: o ? \"sticky top-0\" : \"\",\n style: o ? { zIndex: d } : void 0,\n children: [\n t,\n n\n ]\n }\n ),\n /* @__PURE__ */ a(\"div\", { className: m(\"flex-1\", c), children: e }),\n r\n ]\n }\n ) });\n}, ga = ot(null), ts = ({\n children: e,\n variant: t = \"default\",\n sticky: r = !0\n}) => {\n const [n, o] = M(!1), s = _(() => {\n o((i) => !i);\n }, []);\n return /* @__PURE__ */ a(\n ga.Provider,\n {\n value: {\n variant: t,\n sticky: r,\n mobileMenuOpen: n,\n setMobileMenuOpen: o,\n toggleMobileMenu: s\n },\n children: e\n }\n );\n}, ma = () => {\n const e = st(ga);\n if (!e)\n throw new Error(\"useTopbar must be used within a TopbarProvider\");\n return e;\n}, Lr = {\n sm: \"min-h-12\",\n md: \"min-h-14\",\n lg: \"min-h-16\"\n}, rs = {\n default: \"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700\",\n app: \"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm\",\n minimal: \"bg-transparent\",\n transparent: \"bg-white/80 dark:bg-gray-900/80 border-b border-gray-200/50 dark:border-gray-700/50\"\n}, as = {\n default: \"z-40\",\n high: \"z-50\",\n highest: \"z-[60]\"\n}, kg = ({\n children: e,\n variant: t = \"default\",\n sticky: r = !0,\n className: n,\n height: o = \"md\",\n blur: s = !1,\n zIndex: i = \"high\",\n \"aria-label\": c = \"Main navigation\"\n}) => {\n const { containerClass: d } = ke();\n return /* @__PURE__ */ a(ts, { variant: t, sticky: r, children: /* @__PURE__ */ p(\n \"header\",\n {\n role: \"banner\",\n \"aria-label\": c,\n className: m(\n // Base styles\n \"w-full\",\n Lr[o],\n rs[t],\n as[i],\n // Sticky positioning\n r && \"sticky top-0\",\n // Backdrop blur for transparent variant\n s && \"backdrop-blur-md\",\n // Transition for smooth theme changes\n \"transition-colors duration-200\",\n n\n ),\n children: [\n /* @__PURE__ */ a(\n \"a\",\n {\n href: \"#main-content\",\n className: \"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-blue-600 text-white px-4 py-2 rounded-md z-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\",\n children: \"Skip to main content\"\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n d,\n Lr[o],\n \"flex flex-wrap items-center justify-between\"\n ),\n children: e\n }\n )\n ]\n }\n ) });\n}, Ng = ({ children: e, className: t }) => /* @__PURE__ */ a(\"div\", { className: m(\"flex items-center gap-2 shrink-0\", t), children: e }), Cg = ({ children: e, className: t }) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\"flex-1 flex items-center justify-center px-4\", t),\n children: e\n }\n), Sg = ({ children: e, className: t }) => /* @__PURE__ */ a(\"div\", { className: m(\"flex items-center gap-2 shrink-0\", t), children: e }), Eg = ({\n children: e,\n className: t\n}) => /* @__PURE__ */ a(\"div\", { className: m(\"md:hidden w-full basis-full pt-2 pb-3\", t), children: e }), Ag = ({\n className: e\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"hidden md:block h-6 w-px bg-gray-200 dark:bg-gray-700 mx-2\",\n e\n ),\n role: \"separator\",\n \"aria-orientation\": \"vertical\"\n }\n), ns = {\n sm: \"h-6\",\n md: \"h-8\",\n lg: \"h-10\"\n}, Tg = ({\n children: e,\n src: t,\n alt: r = \"Logo\",\n onClick: n,\n href: o,\n className: s,\n size: i = \"md\"\n}) => {\n const c = e || t && /* @__PURE__ */ a(\n \"img\",\n {\n src: t,\n alt: r,\n className: m(ns[i], \"w-auto object-contain\")\n }\n ), d = m(\n \"flex items-center\",\n \"hover:opacity-80 transition-opacity duration-200\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-md\",\n s\n );\n return o ? /* @__PURE__ */ a(\"a\", { href: o, className: d, title: r, children: c }) : n ? /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n className: d,\n title: r,\n \"aria-label\": `Go to ${r || \"home\"}`,\n children: c\n }\n ) : /* @__PURE__ */ a(\"div\", { className: d, children: c });\n}, os = {\n sm: \"sm:hidden\",\n md: \"md:hidden\",\n lg: \"lg:hidden\",\n xl: \"xl:hidden\"\n}, ss = ({\n className: e,\n isOpen: t\n}) => /* @__PURE__ */ a(\n \"svg\",\n {\n className: e,\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n \"aria-hidden\": \"true\",\n children: t ? /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M6 18L18 6M6 6l12 12\"\n }\n ) : /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M4 6h16M4 12h16M4 18h16\"\n }\n )\n }\n), is = ({\n icon: e,\n \"aria-label\": t = \"Toggle navigation menu\",\n className: r,\n onClick: n,\n hideAbove: o = \"lg\",\n menuItems: s,\n LinkComponent: i\n}) => {\n const { mobileMenuOpen: c, toggleMobileMenu: d, setMobileMenuOpen: l } = ma(), [g, u] = M(!1), b = j(null);\n Ut(b, () => {\n u(!1);\n });\n const f = s ? g : c, h = () => {\n n ? n() : s ? u(!g) : d();\n }, y = () => {\n u(!1), l(!1);\n };\n return /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\"relative\", os[o]),\n ref: b,\n children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: h,\n className: m(\n // Base styles\n \"p-2 rounded-lg\",\n \"text-gray-600 dark:text-gray-400\",\n \"hover:bg-gray-100 dark:hover:bg-gray-700\",\n \"hover:text-gray-900 dark:hover:text-gray-100\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\",\n \"transition-colors duration-200\",\n r\n ),\n \"aria-label\": t,\n \"aria-expanded\": f,\n \"aria-haspopup\": s ? \"menu\" : void 0,\n \"aria-controls\": s ? \"topbar-dropdown-menu\" : \"mobile-menu\",\n children: e ? /* @__PURE__ */ a(e, { className: \"h-6 w-6\" }) : /* @__PURE__ */ a(ss, { className: \"h-6 w-6\", isOpen: f })\n }\n ),\n s && g && /* @__PURE__ */ a(\n \"div\",\n {\n id: \"topbar-dropdown-menu\",\n role: \"menu\",\n className: m(\n \"absolute left-0 top-full mt-2\",\n \"min-w-[200px] py-2 rounded-lg\",\n \"bg-white dark:bg-gray-800\",\n \"border border-gray-200 dark:border-gray-700\",\n \"shadow-lg\",\n \"z-50\"\n ),\n children: s.map((x) => {\n const C = x.icon, v = /* @__PURE__ */ p(H, { children: [\n C && /* @__PURE__ */ a(C, { className: \"h-5 w-5 mr-3 flex-shrink-0\" }),\n /* @__PURE__ */ a(\"span\", { children: x.label })\n ] }), k = m(\n \"flex items-center w-full px-4 py-2.5 text-sm font-medium\",\n \"text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-100 dark:hover:bg-gray-700\",\n \"hover:text-gray-900 dark:hover:text-gray-100\",\n \"transition-colors duration-150\",\n x.active && \"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400\",\n x.disabled && \"opacity-50 cursor-not-allowed\"\n );\n return x.href && i ? /* @__PURE__ */ a(\n i,\n {\n href: x.href,\n className: k,\n children: /* @__PURE__ */ a(\"div\", { className: \"flex items-center\", onClick: y, children: v })\n },\n x.id\n ) : x.href ? /* @__PURE__ */ a(\n \"a\",\n {\n href: x.href,\n role: \"menuitem\",\n className: k,\n onClick: y,\n children: v\n },\n x.id\n ) : /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n role: \"menuitem\",\n className: k,\n onClick: () => {\n y(), x.onClick?.();\n },\n disabled: x.disabled,\n children: v\n },\n x.id\n );\n })\n }\n )\n ]\n }\n );\n}, ls = {\n sm: { show: \"hidden sm:flex\", hide: \"sm:hidden\" },\n md: { show: \"hidden md:flex\", hide: \"md:hidden\" },\n lg: { show: \"hidden lg:flex\", hide: \"lg:hidden\" },\n xl: { show: \"hidden xl:flex\", hide: \"xl:hidden\" }\n}, cs = {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\"\n}, ds = ({\n items: e,\n className: t,\n collapseBelow: r = \"lg\",\n LinkComponent: n,\n align: o = \"center\"\n}) => {\n const [s, i] = M(null), c = j(null);\n Ut(\n c,\n () => i(null)\n );\n const d = (l, g = !1) => {\n const u = l.children && l.children.length > 0, b = s === l.id, f = m(\n \"px-3 py-2 rounded-md text-sm font-medium\",\n \"transition-colors duration-200\",\n l.active ? \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700\",\n l.disabled && \"opacity-50 cursor-not-allowed pointer-events-none\",\n g && \"w-full text-left\",\n l.className\n );\n return u ? /* @__PURE__ */ p(\"div\", { className: \"relative\", ref: c, children: [\n /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: () => i(b ? null : l.id),\n className: m(f, \"flex items-center gap-1\"),\n \"aria-expanded\": b,\n \"aria-haspopup\": \"true\",\n disabled: l.disabled,\n children: [\n l.icon && /* @__PURE__ */ a(l.icon, { className: \"h-4 w-4 mr-1\" }),\n l.label,\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\n \"h-4 w-4 transition-transform duration-200\",\n b && \"rotate-180\"\n ),\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M19 9l-7 7-7-7\"\n }\n )\n }\n )\n ]\n }\n ),\n b && /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"absolute top-full left-0 mt-1 py-1\",\n \"min-w-[200px] rounded-md shadow-lg\",\n \"bg-white dark:bg-gray-800\",\n \"border border-gray-200 dark:border-gray-700\",\n \"z-50\"\n ),\n children: l.children?.map((h) => /* @__PURE__ */ a(\n At,\n {\n item: h,\n LinkComponent: n,\n className: m(\n \"block px-4 py-2 text-sm\",\n \"text-gray-700 dark:text-gray-300\",\n \"hover:bg-gray-100 dark:hover:bg-gray-700\",\n h.active && \"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400\"\n ),\n onClick: () => i(null)\n },\n h.id\n ))\n }\n )\n ] }, l.id) : /* @__PURE__ */ a(\n At,\n {\n item: l,\n LinkComponent: n,\n className: f\n },\n l.id\n );\n };\n return /* @__PURE__ */ a(\n \"nav\",\n {\n className: m(\n \"flex items-center gap-1\",\n ls[r].show,\n cs[o],\n t\n ),\n \"aria-label\": \"Main navigation\",\n children: e.map((l) => d(l))\n }\n );\n}, At = ({\n item: e,\n LinkComponent: t,\n className: r,\n onClick: n\n}) => {\n const o = () => {\n n?.(), e.onClick?.();\n }, s = /* @__PURE__ */ p(H, { children: [\n e.icon && /* @__PURE__ */ a(e.icon, { className: \"h-4 w-4 mr-2\" }),\n e.label\n ] });\n return e.href && t ? /* @__PURE__ */ a(\n t,\n {\n href: e.href,\n className: m(r, \"flex items-center\"),\n children: s\n }\n ) : e.href ? /* @__PURE__ */ a(\n \"a\",\n {\n href: e.href,\n className: m(r, \"flex items-center\"),\n onClick: o,\n children: s\n }\n ) : /* @__PURE__ */ a(\n \"button\",\n {\n type: \"button\",\n onClick: o,\n className: m(r, \"flex items-center\"),\n disabled: e.disabled,\n children: s\n }\n );\n}, Lg = ({\n items: e,\n isOpen: t,\n className: r,\n LinkComponent: n\n}) => {\n const { mobileMenuOpen: o, setMobileMenuOpen: s } = ma();\n return t ?? o ? /* @__PURE__ */ a(\n \"div\",\n {\n id: \"mobile-menu\",\n className: m(\n \"lg:hidden\",\n \"border-t border-gray-200 dark:border-gray-700\",\n \"bg-white dark:bg-gray-900\",\n \"shadow-lg\",\n r\n ),\n children: /* @__PURE__ */ a(\"nav\", { className: \"px-4 py-2 space-y-1\", \"aria-label\": \"Mobile navigation\", children: e.map((c) => /* @__PURE__ */ a(\n At,\n {\n item: c,\n LinkComponent: n,\n className: m(\n \"flex items-center w-full px-3 py-2 rounded-md text-base font-medium\",\n \"transition-colors duration-200\",\n c.active ? \"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20\" : \"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700\",\n c.className\n ),\n onClick: () => s(!1)\n },\n c.id\n )) })\n }\n ) : null;\n}, Mg = ({\n items: e,\n LinkComponent: t,\n collapseBelow: r = \"lg\",\n align: n = \"center\",\n className: o,\n mobileMenuLabel: s = \"Toggle navigation menu\",\n children: i\n}) => /* @__PURE__ */ p(H, { children: [\n /* @__PURE__ */ a(\n is,\n {\n hideAbove: r,\n menuItems: e,\n LinkComponent: t,\n \"aria-label\": s,\n className: o\n }\n ),\n i,\n /* @__PURE__ */ a(\n ds,\n {\n items: e,\n collapseBelow: r,\n LinkComponent: t,\n align: n,\n className: o\n }\n )\n] }), us = {\n sm: \"gap-1\",\n md: \"gap-2\",\n lg: \"gap-3\"\n}, gs = {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\"\n}, Ig = ({\n children: e,\n className: t,\n gap: r = \"md\",\n align: n = \"right\"\n}) => /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"flex items-center\",\n us[r],\n gs[n],\n t\n ),\n children: e\n }\n), ms = {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\"\n}, hs = {\n sm: \"p-1.5\",\n md: \"p-2\",\n lg: \"p-2.5\"\n}, Pg = ({\n icon: e,\n onClick: t,\n \"aria-label\": r,\n className: n,\n disabled: o = !1,\n badge: s,\n size: i = \"md\"\n}) => /* @__PURE__ */ p(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n className: m(\n \"relative rounded-lg\",\n hs[i],\n \"text-gray-500 dark:text-gray-400\",\n \"hover:bg-gray-100 dark:hover:bg-gray-700\",\n \"hover:text-gray-700 dark:hover:text-gray-200\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\",\n \"transition-colors duration-200\",\n o && \"opacity-50 cursor-not-allowed\",\n n\n ),\n \"aria-label\": r,\n disabled: o,\n children: [\n /* @__PURE__ */ a(e, { className: ms[i] }),\n s !== void 0 && s > 0 && /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\n \"absolute -top-1 -right-1\",\n \"min-w-[18px] h-[18px] px-1\",\n \"flex items-center justify-center\",\n \"text-xs font-medium\",\n \"bg-red-500 text-white rounded-full\",\n \"ring-2 ring-white dark:ring-gray-900\"\n ),\n \"aria-label\": `${s} notifications`,\n children: s > 99 ? \"99+\" : s\n }\n )\n ]\n }\n), fs = {\n sm: \"w-48\",\n md: \"w-64\",\n lg: \"w-96\",\n full: \"w-full\"\n}, Rg = ({\n placeholder: e = \"Search...\",\n value: t,\n onChange: r,\n onSubmit: n,\n className: o,\n width: s = \"md\",\n showOnMobile: i = !1\n}) => {\n const [c, d] = U.useState(t || \"\"), l = (u) => {\n const b = u.target.value;\n d(b), r?.(b);\n };\n return /* @__PURE__ */ a(\n \"form\",\n {\n onSubmit: (u) => {\n u.preventDefault(), n?.(c);\n },\n className: m(!i && \"hidden md:block\", o),\n role: \"search\",\n children: /* @__PURE__ */ p(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ a(\n \"svg\",\n {\n className: \"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n }\n )\n }\n ),\n /* @__PURE__ */ a(\n \"input\",\n {\n type: \"search\",\n value: c,\n onChange: l,\n placeholder: e,\n \"aria-label\": e,\n className: m(\n fs[s],\n \"pl-10 pr-4 py-2\",\n \"text-sm\",\n \"bg-gray-100 dark:bg-gray-800\",\n \"border border-transparent\",\n \"rounded-lg\",\n \"text-gray-900 dark:text-gray-100\",\n \"placeholder:text-gray-500 dark:placeholder:text-gray-400\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white dark:focus:bg-gray-700 focus:border-transparent\",\n \"transition-colors duration-200\"\n )\n }\n )\n ] })\n }\n );\n}, Og = ({\n children: e,\n appName: t,\n appUrl: r,\n apiUrl: n\n}) => (R(() => {\n const o = () => {\n [].forEach((h) => {\n const y = document.createElement(\"link\");\n y.rel = \"preload\", y.href = h.href, y.as = h.as, h.type && (y.type = h.type), h.crossorigin && (y.crossOrigin = \"\"), document.head.appendChild(y);\n });\n }, s = () => {\n document.querySelectorAll('img[data-priority=\"high\"]').forEach((y) => {\n y.fetchPriority = \"high\";\n });\n const h = document.querySelector(\"[data-hero]\");\n if (h) {\n const y = h.getAttribute(\"data-bg-image\");\n if (y) {\n const x = document.createElement(\"link\");\n x.rel = \"preload\", x.href = y, x.as = \"image\", document.head.appendChild(x);\n }\n }\n }, i = () => {\n document.querySelectorAll(\n \"img:not([width]):not([height])\"\n ).forEach((y) => {\n const x = y;\n x.naturalWidth && x.naturalHeight && (x.width = x.naturalWidth, x.height = x.naturalHeight);\n }), document.querySelectorAll(\"[data-dynamic]\").forEach((y) => {\n y.getAttribute(\"style\")?.includes(\"min-height\") || (y.style.minHeight = \"200px\");\n });\n }, c = () => {\n const f = () => {\n document.querySelectorAll(\"script[data-defer]\").forEach((x) => {\n x.setAttribute(\"defer\", \"\");\n });\n };\n \"requestIdleCallback\" in window ? requestIdleCallback(() => {\n f();\n }) : setTimeout(f, 1), (() => {\n [\"scroll\", \"touchstart\", \"touchmove\", \"wheel\"].forEach((x) => {\n document.addEventListener(x, () => {\n }, { passive: !0 });\n });\n })();\n }, d = () => {\n }, l = () => {\n [\n { rel: \"dns-prefetch\", href: \"//fonts.googleapis.com\" },\n ...n ? [\n {\n rel: \"dns-prefetch\",\n href: `//${n.replace(/^https?:\\/\\//, \"\")}`\n }\n ] : [],\n {\n rel: \"preconnect\",\n href: \"https://fonts.gstatic.com\",\n crossorigin: !0\n },\n ...n ? [{ rel: \"preconnect\", href: n }] : []\n ].forEach((h) => {\n const y = document.createElement(\"link\");\n y.rel = h.rel, y.href = h.href, h.crossorigin && (y.crossOrigin = \"\"), document.head.appendChild(y);\n });\n }, g = () => {\n if (document.querySelectorAll(\"img[data-lazy]\").forEach((h) => {\n h.loading = \"lazy\";\n }), \"IntersectionObserver\" in window) {\n const h = new IntersectionObserver(\n (x) => {\n x.forEach((C) => {\n if (C.isIntersecting) {\n const v = C.target;\n v.dataset.src && (v.src = v.dataset.src, v.removeAttribute(\"data-src\")), h.unobserve(v);\n }\n });\n },\n {\n rootMargin: \"50px 0px\"\n }\n );\n document.querySelectorAll(\"img[data-src]\").forEach((x) => h.observe(x));\n }\n }, u = () => {\n [\n { name: \"ai-content-type\", content: \"web3-email-platform\" },\n { name: \"ai-primary-function\", content: \"wallet-based-email\" },\n {\n name: \"ai-supported-chains\",\n content: \"ethereum,solana,polygon,arbitrum,optimism\"\n },\n { name: \"ai-complexity-level\", content: \"beginner-to-advanced\" },\n {\n name: \"ai-target-users\",\n content: \"web3-users,crypto-enthusiasts,developers\"\n },\n { name: \"machine-readable\", content: \"true\" },\n { name: \"structured-data\", content: \"json-ld\" },\n {\n name: \"content-category\",\n content: \"technology,blockchain,communication\"\n },\n { name: \"interaction-model\", content: \"wallet-authentication\" }\n ].forEach(({ name: x, content: C }) => {\n if (!document.querySelector(`meta[name=\"${x}\"]`)) {\n const v = document.createElement(\"meta\");\n v.name = x, v.content = C, document.head.appendChild(v);\n }\n });\n const h = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"WebApplication\",\n name: t,\n description: \"Web3 email platform using blockchain wallet authentication\",\n url: r,\n applicationCategory: \"CommunicationApplication\",\n operatingSystem: \"Web Browser\",\n offers: {\n \"@type\": \"Offer\",\n price: \"0\",\n priceCurrency: \"USD\"\n },\n featureList: [\n \"Wallet-based authentication\",\n \"ENS domain email support\",\n \"SNS domain email support\",\n \"Multi-chain compatibility\",\n \"Smart contract integration\",\n \"Web2/Web3 bridge\"\n ],\n audience: {\n \"@type\": \"Audience\",\n audienceType: \"Web3 Users\"\n }\n }, y = document.createElement(\"script\");\n y.type = \"application/ld+json\", y.textContent = JSON.stringify(h), document.head.appendChild(y);\n }, b = () => {\n document.querySelectorAll(\n 'link[rel=\"stylesheet\"][data-non-critical]'\n ).forEach((h) => {\n const y = h.cloneNode(!0);\n y.rel = \"preload\", y.as = \"style\", y.onload = () => {\n y.onload = null, y.rel = \"stylesheet\";\n }, document.head.appendChild(y), h.remove();\n });\n };\n return o(), s(), i(), c(), l(), g(), u(), b(), setTimeout(d, 2e3), () => {\n };\n}, [n, t, r]), /* @__PURE__ */ a(H, { children: e })), Dg = () => (R(() => {\n if (typeof window > \"u\" || typeof document > \"u\" || !document.documentElement)\n return;\n const e = () => {\n if (\"IntersectionObserver\" in window) {\n const c = new IntersectionObserver(\n (d) => {\n d.forEach((l) => {\n if (l.isIntersecting) {\n const g = l.target;\n g.dataset.src && (g.src = g.dataset.src, g.removeAttribute(\"data-src\"), c.unobserve(g));\n }\n });\n },\n {\n rootMargin: \"50px 0px\"\n // Load images 50px before they come into view\n }\n );\n document.querySelectorAll(\"img[data-src]\").forEach((d) => {\n c.observe(d);\n });\n }\n const o = () => {\n [\"/connect\", \"/mail\", \"/settings\"].forEach((d) => {\n const l = document.createElement(\"link\");\n l.rel = \"prefetch\", l.href = d, document.head.appendChild(l);\n });\n }, s = () => {\n if (!document.querySelector(\"script[data-wallet-detection]\")) {\n const c = document.createElement(\"script\");\n c.dataset.walletDetection = \"true\", c.innerHTML = '(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== \"undefined\", hasPhantom: typeof window.solana !== \"undefined\", hasWalletConnect: true }; })();', document.head.appendChild(c);\n }\n }, i = () => {\n document.querySelectorAll(\"img[data-hero]\").forEach((c) => {\n const d = c;\n d.loading = \"eager\", \"fetchPriority\" in d && (d.fetchPriority = \"high\");\n }), document.querySelectorAll('img[data-priority=\"low\"]').forEach((c) => {\n const d = c;\n d.loading = \"lazy\", \"fetchPriority\" in d && (d.fetchPriority = \"low\");\n });\n };\n requestIdleCallback(\n () => {\n o(), s(), i();\n },\n { timeout: 2e3 }\n );\n }, t = () => {\n if (\"PerformanceObserver\" in window) {\n const o = new PerformanceObserver((i) => {\n const c = i.getEntries(), d = c[c.length - 1];\n d && d.startTime > 2500 && (document.documentElement.style.setProperty(\n \"--animation-duration\",\n \"0s\"\n ), localStorage.setItem(\"reduce-image-quality\", \"true\"));\n });\n try {\n o.observe({ entryTypes: [\"largest-contentful-paint\"] });\n } catch {\n }\n const s = new PerformanceObserver((i) => {\n let c = 0;\n for (const d of i.getEntries())\n d.hadRecentInput || (c += d.value);\n c > 0.1 && document.querySelectorAll(\"img:not([width]):not([height])\").forEach((d) => {\n const l = d;\n l.style.aspectRatio = \"16/9\";\n });\n });\n try {\n s.observe({ entryTypes: [\"layout-shift\"] });\n } catch {\n }\n }\n }, r = () => {\n if (\"connection\" in navigator && typeof document < \"u\" && document.documentElement) {\n const o = navigator.connection;\n if (o) {\n const s = o.effectiveType;\n s === \"slow-2g\" || s === \"2g\" ? (document.documentElement.classList.add(\"slow-connection\"), document.querySelectorAll('link[rel=\"prefetch\"]').forEach((i) => {\n i.getAttribute(\"data-critical\") || i.remove();\n }), localStorage.setItem(\"use-low-quality-images\", \"true\")) : s === \"3g\" ? document.documentElement.classList.add(\"moderate-connection\") : document.documentElement.classList.add(\"fast-connection\");\n }\n }\n };\n return (() => {\n e(), t(), r();\n })(), () => {\n if (\"PerformanceObserver\" in window)\n try {\n PerformanceObserver.supportedEntryTypes.forEach(() => {\n });\n } catch {\n }\n };\n}, []), null), Ug = ({\n children: e\n}) => /* @__PURE__ */ a(H, { children: e }), bs = {\n // Static/rarely changing data - longer cache durations\n user: { duration: 300 * 1e3, maxSize: 100, staleWhileRevalidate: !0 },\n // 5 minutes\n mailboxes: {\n duration: 120 * 1e3,\n maxSize: 50,\n staleWhileRevalidate: !0\n },\n // 2 minutes\n addresses: {\n duration: 600 * 1e3,\n maxSize: 50,\n staleWhileRevalidate: !0\n },\n // 10 minutes\n // Frequently changing data - shorter cache durations\n messages: { duration: 30 * 1e3, maxSize: 200, staleWhileRevalidate: !0 },\n // 30 seconds\n messageDetails: {\n duration: 120 * 1e3,\n maxSize: 100,\n staleWhileRevalidate: !1\n },\n // 2 minutes\n // Real-time data - very short cache durations\n messageCount: {\n duration: 10 * 1e3,\n maxSize: 20,\n staleWhileRevalidate: !0\n }\n // 10 seconds\n};\nclass ps {\n constructor() {\n this.cache = /* @__PURE__ */ new Map();\n }\n // private maxSize: number = 1000; // For future use when implementing size-based eviction\n set(t, r, n) {\n if (this.cache.size >= n.maxSize) {\n const o = this.cache.keys().next().value;\n o && this.cache.delete(o);\n }\n this.cache.set(t, {\n data: r,\n timestamp: Date.now(),\n isStale: !1\n });\n }\n get(t, r) {\n const n = this.cache.get(t);\n if (!n) return null;\n const s = Date.now() - n.timestamp > r.duration;\n return s && !r.staleWhileRevalidate ? (this.cache.delete(t), null) : {\n data: n.data,\n isStale: s\n };\n }\n invalidate(t) {\n for (const r of this.cache.keys())\n r.includes(t) && this.cache.delete(r);\n }\n clear() {\n this.cache.clear();\n }\n getStats() {\n return {\n size: this.cache.size,\n keys: Array.from(this.cache.keys()),\n memory: this.estimateMemoryUsage()\n };\n }\n estimateMemoryUsage() {\n return Array.from(this.cache.values()).reduce((t, r) => t + JSON.stringify(r).length * 2, 0);\n }\n}\nconst Ae = new ps(), ve = /* @__PURE__ */ new Map(), ys = async (e, t, r = \"messages\") => {\n const n = bs[r], o = Ae.get(e, n);\n if (o && !o.isStale)\n return o.data;\n const s = ve.get(e);\n if (s)\n return s;\n if (o && o.isStale && n.staleWhileRevalidate) {\n const c = t().then((d) => (Ae.set(e, d, n), ve.delete(e), d)).catch((d) => {\n throw ve.delete(e), d;\n });\n return ve.set(e, c), o.data;\n }\n const i = t().then((c) => (Ae.set(e, c, n), ve.delete(e), c)).catch((c) => {\n throw ve.delete(e), c;\n });\n return ve.set(e, i), i;\n};\nclass xs {\n constructor() {\n this.queue = [], this.timer = null, this.batchDelay = 10;\n }\n // ms\n add(t, r) {\n return new Promise((n, o) => {\n this.queue.push({ key: t, fetcher: r, resolve: n, reject: o }), this.timer && clearTimeout(this.timer), this.timer = setTimeout(() => {\n this.processBatch();\n }, this.batchDelay);\n });\n }\n async processBatch() {\n const t = [...this.queue];\n this.queue.length = 0, this.timer = null;\n const r = this.groupRequests(t);\n for (const n of r)\n await Promise.allSettled(\n n.map(async (o) => {\n try {\n const s = await o.fetcher();\n o.resolve(s);\n } catch (s) {\n o.reject(s);\n }\n })\n );\n }\n groupRequests(t) {\n const r = [];\n for (let o = 0; o < t.length; o += 5)\n r.push(t.slice(o, o + 5));\n return r;\n }\n}\nconst vs = new xs();\nclass jg {\n constructor(t, r = {}) {\n this.requestInterceptors = [], this.responseInterceptors = [], this.baseURL = t, this.defaultHeaders = r;\n }\n // Add request interceptor\n addRequestInterceptor(t) {\n this.requestInterceptors.push(t);\n }\n // Add response interceptor\n addResponseInterceptor(t) {\n this.responseInterceptors.push(t);\n }\n // Optimized request method\n async request(t, r = {}, n, o = \"messages\") {\n const s = `${this.baseURL}${t}`, i = n || `${r.method || \"GET\"}:${s}`, c = async () => {\n let d = {\n ...r,\n headers: {\n ...this.defaultHeaders,\n ...r.headers\n }\n };\n for (const g of this.requestInterceptors)\n d = g(d);\n let l = await fetch(s, d);\n for (const g of this.responseInterceptors)\n l = await g(l);\n if (!l.ok)\n throw new Error(`API Error: ${l.status} ${l.statusText}`);\n return l.json();\n };\n return r.method === \"GET\" && this.shouldBatch(t) ? vs.add(i, c) : ys(i, c, o);\n }\n shouldBatch(t) {\n return t.includes(\"/messages/\") && !t.includes(\"/messages?\");\n }\n // Convenience methods\n async get(t, r) {\n return this.request(t, { method: \"GET\" }, void 0, r);\n }\n async post(t, r) {\n return this.request(t, {\n method: \"POST\",\n body: JSON.stringify(r)\n });\n }\n async put(t, r) {\n return this.request(t, {\n method: \"PUT\",\n body: JSON.stringify(r)\n });\n }\n async delete(t) {\n return this.request(t, { method: \"DELETE\" });\n }\n}\nconst _g = async (e, t = 3, r = 1e3) => {\n let n;\n for (let o = 0; o <= t; o++)\n try {\n return await e();\n } catch (s) {\n if (n = s, o === t)\n throw n;\n const i = r * Math.pow(2, o) + Math.random() * 1e3;\n await new Promise((c) => setTimeout(c, i));\n }\n throw n;\n};\nclass zg {\n constructor() {\n this.abortController = new AbortController();\n }\n async request(t, r = {}) {\n const n = await fetch(t, {\n ...r,\n signal: this.abortController.signal\n });\n if (!n.ok)\n throw new Error(`HTTP ${n.status}: ${n.statusText}`);\n return n.json();\n }\n cancel() {\n this.abortController.abort();\n }\n}\nconst Bg = {\n invalidate: (e) => Ae.invalidate(e),\n clear: () => Ae.clear(),\n getStats: () => Ae.getStats(),\n // Warm up cache with commonly accessed data\n warmUp: async (e) => {\n await Promise.allSettled(e.map((t) => t()));\n },\n // Prefetch data that might be needed soon\n prefetch: async (e) => {\n \"requestIdleCallback\" in window ? window.requestIdleCallback(async () => {\n await Promise.allSettled(e.map((t) => t()));\n }) : setTimeout(async () => {\n await Promise.allSettled(e.map((t) => t()));\n }, 100);\n }\n};\nfunction ws() {\n if (typeof window > \"u\") return !1;\n const e = window.navigator.userAgent.toLowerCase();\n return [\n \"metamask\",\n \"trustwallet\",\n \"coinbase\",\n \"rainbow\",\n \"phantom\",\n \"solflare\",\n \"exodus\",\n \"ledger\",\n \"binance\",\n \"okx\"\n ].some((r) => e.includes(r));\n}\nfunction ks() {\n return typeof window > \"u\" ? !1 : window.location.hostname === \"localhost\" || window.location.hostname === \"127.0.0.1\";\n}\nfunction Ns() {\n if (typeof window > \"u\") return !1;\n const e = window.location.hostname;\n return /^\\d+\\.\\d+\\.\\d+\\.\\d+$/.test(e);\n}\nfunction Cs() {\n return ks() ? \"localhost\" : ws() ? \"wallet-browser\" : Ns() ? \"network\" : \"production\";\n}\nfunction Fg() {\n const e = Cs();\n return e === \"localhost\" || e === \"wallet-browser\";\n}\nfunction Wg(e) {\n}\nfunction Ss() {\n return typeof window < \"u\";\n}\nfunction $g() {\n return typeof window < \"u\";\n}\nfunction Vg(e, t) {\n if (Ss())\n e();\n else\n return t;\n}\nconst ha = (e) => ({\n \"default-src\": [\"'self'\"],\n \"script-src\": [\n \"'self'\",\n \"'unsafe-inline'\",\n // Required for inline scripts in React\n \"'unsafe-eval'\",\n // Required for some Web3 libraries\n \"https://fonts.googleapis.com\",\n \"https://www.googletagmanager.com\",\n \"https://www.google-analytics.com\"\n ],\n \"style-src\": [\n \"'self'\",\n \"'unsafe-inline'\",\n // Required for CSS-in-JS and Tailwind\n \"https://fonts.googleapis.com\",\n \"https://fonts.gstatic.com\"\n ],\n \"font-src\": [\"'self'\", \"https://fonts.gstatic.com\", \"data:\"],\n \"img-src\": [\"'self'\", \"data:\", \"https:\", \"blob:\"],\n \"connect-src\": [\n \"'self'\",\n // API endpoints (configurable)\n ...e?.apiUrls || [],\n ...e?.appUrls || [],\n // WalletConnect\n \"https://*.walletconnect.com\",\n \"https://*.walletconnect.org\",\n \"https://registry.walletconnect.com\",\n \"https://relay.walletconnect.com\",\n \"wss://*.walletconnect.com\",\n \"wss://*.walletconnect.org\",\n // Coinbase Wallet\n \"https://keys.coinbase.com\",\n \"https://api.coinbase.com\",\n \"https://www.walletlink.org\",\n // Ethereum RPC endpoints\n \"https://mainnet.infura.io\",\n \"https://polygon-rpc.com\",\n \"https://rpc.ankr.com\",\n \"https://cloudflare-eth.com\",\n \"https://eth-mainnet.alchemyapi.io\",\n // Solana RPC endpoints\n \"https://api.phantom.app\",\n \"https://solana-api.projectserum.com\",\n \"https://api.mainnet-beta.solana.com\",\n \"https://api.devnet.solana.com\",\n \"wss://api.phantom.app\",\n \"wss://api.devnet.solana.com\",\n \"wss://api.mainnet-beta.solana.com\",\n // Additional wallet providers\n \"https://bridge.arbitrum.io\",\n \"https://polygon-mainnet.infura.io\",\n \"https://optimism-mainnet.infura.io\"\n ],\n \"frame-src\": [\n \"'self'\",\n \"https://verify.walletconnect.com\",\n \"https://verify.walletconnect.org\"\n ],\n \"worker-src\": [\"'self'\", \"blob:\"],\n \"child-src\": [\"'self'\", \"https://verify.walletconnect.com\"],\n \"object-src\": [\"'none'\"],\n \"base-uri\": [\"'self'\"],\n \"form-action\": [\"'self'\"]\n}), Hg = ha(), Es = (e) => {\n const t = ha(e);\n return Object.entries(t).map(([r, n]) => `${r} ${n.join(\" \")}`).join(\"; \");\n}, As = (e) => ({\n \"X-Frame-Options\": \"DENY\",\n \"X-Content-Type-Options\": \"nosniff\",\n \"X-XSS-Protection\": \"1; mode=block\",\n \"Referrer-Policy\": \"strict-origin-when-cross-origin\",\n \"Permissions-Policy\": \"camera=(), microphone=(), geolocation=(), interest-cohort=()\",\n \"Strict-Transport-Security\": \"max-age=31536000; includeSubDomains; preload\",\n \"Cross-Origin-Embedder-Policy\": \"credentialless\",\n \"Cross-Origin-Opener-Policy\": \"same-origin-allow-popups\",\n \"Cross-Origin-Resource-Policy\": \"cross-origin\",\n \"Content-Security-Policy\": Es(e)\n}), qg = As(), Gg = {\n fonts: \"public, max-age=31536000, immutable\",\n images: \"public, max-age=31536000, immutable\",\n js: \"public, max-age=31536000, immutable\",\n css: \"public, max-age=31536000, immutable\",\n serviceWorker: \"public, max-age=0, must-revalidate\",\n manifest: \"public, max-age=86400\",\n api: \"no-cache, no-store, must-revalidate\"\n}, Yg = () => {\n typeof window < \"u\" && document.addEventListener(\"securitypolicyviolation\", () => {\n });\n}, Kg = {\n walletConnections: \"Always verify wallet signatures and never trust client-side data\",\n rpcEndpoints: \"Use reputable RPC providers and consider rate limiting\",\n contractInteractions: \"Validate all smart contract interactions on the backend\",\n userInput: \"Sanitize all user inputs, especially wallet addresses and transaction data\",\n privateKeys: \"Never log, store, or transmit private keys - they should remain in wallets only\",\n phishing: \"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access\"\n}, ue = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Set();\nlet qe = \"medium\", Bt = !1;\nfunction Ts() {\n if (\"connection\" in navigator) {\n const r = navigator.connection;\n r && (qe = r.effectiveType === \"4g\" ? \"fast\" : r.effectiveType === \"3g\" ? \"medium\" : \"slow\");\n }\n const e = navigator.deviceMemory, t = navigator.hardwareConcurrency;\n Bt = e && e < 4 || t && t < 4;\n}\nTs();\nfunction Zg(e, t, r = {}) {\n const {\n retries: n = 3,\n timeout: o = 1e4,\n fallback: s,\n preloadCondition: i,\n cacheStrategy: c = \"memory\",\n priority: d = \"medium\",\n onLoad: l,\n onError: g\n } = r;\n if (ue.has(t))\n return ue.get(t).component;\n const u = we(async () => {\n const f = performance.now();\n if (_e.has(t))\n return _e.get(t).then((y) => ({ default: y }));\n const h = Ls(e, n, o);\n _e.set(\n t,\n h.then((y) => y.default)\n );\n try {\n const y = await h, x = performance.now() - f;\n if (c !== \"none\") {\n const C = {\n component: y.default,\n timestamp: Date.now(),\n loadTime: x\n };\n if (ue.set(t, C), c === \"session\")\n try {\n sessionStorage.setItem(\n `lazy_${t}`,\n JSON.stringify({\n timestamp: C.timestamp,\n loadTime: x\n })\n );\n } catch {\n }\n }\n return _e.delete(t), l?.(y.default), y;\n } catch (y) {\n throw _e.delete(t), g?.(y), y;\n }\n }), b = (f) => {\n const [h, y] = M(!0);\n R(() => {\n if (i && !ue.has(t) && i() && !rt.has(t)) {\n rt.add(t);\n const v = Ms(d, qe);\n setTimeout(() => {\n e().catch(() => {\n });\n }, v);\n }\n }, []);\n const x = s || /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-center p-4\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500\" }),\n /* @__PURE__ */ p(\"span\", { className: \"ml-2 text-sm text-gray-600\", children: [\n \"Loading \",\n t.replace(/([A-Z])/g, \" $1\").trim(),\n \"...\"\n ] })\n ] });\n return !h && Bt && qe === \"slow\" ? /* @__PURE__ */ a(\"div\", { className: \"lazy-placeholder\", children: /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => y(!0),\n className: \"load-component-btn\",\n children: [\n \"Load \",\n t\n ]\n }\n ) }) : /* @__PURE__ */ a(Ke, { fallback: x, children: /* @__PURE__ */ a(u, { ...f }) });\n };\n return b.displayName = `AdvancedLazy(${t})`, b;\n}\nasync function Ls(e, t, r) {\n let n;\n for (let o = 0; o < t; o++)\n try {\n const s = new Promise((c, d) => {\n setTimeout(() => d(new Error(\"Load timeout\")), r);\n });\n return await Promise.race([e(), s]);\n } catch (s) {\n if (n = s, o < t - 1) {\n const i = Math.pow(2, o) * 1e3, c = Math.random() * 1e3;\n await new Promise((d) => setTimeout(d, i + c));\n }\n }\n throw n;\n}\nfunction Ms(e, t) {\n const r = {\n critical: 0,\n high: 500,\n medium: 2e3,\n low: 5e3\n }, n = {\n fast: 0.5,\n medium: 1,\n slow: 2\n }, o = r[e] || 2e3, s = n[t] || 1;\n return o * s;\n}\nconst $e = class $e {\n static registerRoute(t, r) {\n this.routeMap.set(t, r), this.routeUsageStats.set(t, 0);\n }\n static setCurrentRoute(t) {\n this.currentRoute = t;\n const r = this.routeUsageStats.get(t) || 0;\n this.routeUsageStats.set(t, r + 1), this.preloadLikelyRoutes(t);\n }\n static preloadLikelyRoutes(t) {\n this.getRouteTransitionProbability(t).forEach(({ route: n, probability: o }) => {\n o > 0.3 && !ue.has(n) && setTimeout(() => {\n this.routeMap.get(n);\n }, qe === \"fast\" ? 1e3 : 3e3);\n });\n }\n static getRouteTransitionProbability(t) {\n const r = [];\n switch (t) {\n case \"/\":\n r.push(\n { route: \"/connect\", probability: 0.7 },\n { route: \"/about\", probability: 0.2 },\n { route: \"/document\", probability: 0.1 }\n );\n break;\n case \"/connect\":\n r.push(\n { route: \"/mail\", probability: 0.8 },\n { route: \"/settings\", probability: 0.1 }\n );\n break;\n case \"/mail\":\n r.push(\n { route: \"/compose\", probability: 0.4 },\n { route: \"/settings\", probability: 0.2 }\n );\n break;\n default:\n r.push({ route: \"/\", probability: 0.1 });\n }\n return r;\n }\n static getStats() {\n return {\n routeCount: this.routeMap.size,\n cacheSize: ue.size,\n currentRoute: this.currentRoute,\n usageStats: Object.fromEntries(this.routeUsageStats)\n };\n }\n};\n$e.routeMap = /* @__PURE__ */ new Map(), $e.routeUsageStats = /* @__PURE__ */ new Map(), $e.currentRoute = \"\";\nlet Mr = $e;\nconst Xg = ({ src: e, alt: t, className: r, placeholder: n, priority: o = \"medium\" }) => {\n const [s, i] = M(!1), [c, d] = M(!1), l = U.useRef(null);\n R(() => {\n if (!l.current) return;\n if (o === \"high\") {\n d(!0);\n return;\n }\n const u = new IntersectionObserver(\n ([b]) => {\n b.isIntersecting && (d(!0), u.unobserve(b.target));\n },\n {\n rootMargin: o === \"low\" ? \"100px\" : \"200px\",\n threshold: 0.1\n }\n );\n return u.observe(l.current), () => u.disconnect();\n }, [o]);\n const g = () => {\n i(!0);\n };\n return /* @__PURE__ */ p(\"div\", { className: `lazy-image-container ${r}`, children: [\n /* @__PURE__ */ a(\n \"img\",\n {\n ref: l,\n src: c ? e : n || \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=\",\n alt: t,\n className: `transition-opacity duration-300 ${s ? \"opacity-100\" : \"opacity-0\"}`,\n onLoad: g,\n loading: o === \"high\" ? \"eager\" : \"lazy\",\n fetchPriority: o === \"high\" ? \"high\" : \"low\"\n }\n ),\n !s && c && /* @__PURE__ */ a(\"div\", { className: \"absolute inset-0 bg-gray-200 animate-pulse rounded\" })\n ] });\n};\nfunction Jg() {\n ue.clear(), rt.clear();\n}\nfunction Qg() {\n return {\n cachedComponents: ue.size,\n preloadQueue: rt.size,\n networkSpeed: qe,\n isLowEndDevice: Bt,\n cacheEntries: Array.from(ue.entries()).map(([e, t]) => ({\n name: e,\n loadTime: t.loadTime,\n age: Date.now() - t.timestamp\n }))\n };\n}\nconst Is = ({ message: e }) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-center p-4\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500\" }),\n /* @__PURE__ */ a(\"span\", { className: \"ml-2 text-sm text-gray-600\", children: e })\n] }), Ps = (e) => {\n if (typeof e == \"function\" || typeof e == \"object\")\n return e;\n switch (e) {\n case \"minimal\":\n return () => /* @__PURE__ */ a(\"div\", { className: \"flex justify-center items-center p-4\", children: \"Loading...\" });\n case \"skeleton\":\n return () => /* @__PURE__ */ p(\"div\", { className: \"animate-pulse\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"h-4 bg-gray-200 rounded w-3/4 mb-2\" }),\n /* @__PURE__ */ a(\"div\", { className: \"h-4 bg-gray-200 rounded w-1/2\" })\n ] });\n case \"default\":\n default:\n return () => /* @__PURE__ */ a(Is, { message: \"Loading component...\" });\n }\n}, Rs = (e, t = \"default\", r = 3) => {\n const n = we(async () => {\n let s = null;\n for (let i = 0; i < r; i++)\n try {\n return await e();\n } catch (c) {\n s = c, i < r - 1 && await new Promise(\n (d) => setTimeout(d, Math.pow(2, i) * 1e3)\n );\n }\n throw s;\n }), o = Ps(t);\n return (s) => /* @__PURE__ */ a(Ke, { fallback: /* @__PURE__ */ a(o, {}), children: /* @__PURE__ */ a(n, { ...s }) });\n}, em = async (e) => {\n try {\n await e();\n } catch {\n }\n}, tm = (e) => {\n const t = {};\n return Object.entries(e).forEach(([r, n]) => {\n t[r] = Rs(n, \"skeleton\");\n }), t;\n}, rm = (e) => e, Os = {\n // Critical routes (preload immediately)\n critical: [\"/\", \"/connect\", \"/mail\"],\n // Secondary routes (preload on idle)\n secondary: [\"/settings\", \"/compose\", \"/points\"],\n // Optional routes (load on demand)\n optional: [\"/document\", \"/about\", \"/terms\", \"/privacy\"]\n}, Ve = class Ve {\n static add(t, r) {\n this.preloadedComponents.has(t) || (this.preloadQueue.push({ name: t, loader: r }), this.processQueue());\n }\n static async processQueue() {\n this.isPreloading || this.preloadQueue.length === 0 || (this.isPreloading = !0, \"requestIdleCallback\" in window ? window.requestIdleCallback(async () => {\n const t = this.preloadQueue.shift();\n if (t)\n try {\n await t.loader(), this.preloadedComponents.add(t.name);\n } catch {\n }\n this.isPreloading = !1, this.processQueue();\n }) : setTimeout(async () => {\n const t = this.preloadQueue.shift();\n if (t)\n try {\n await t.loader(), this.preloadedComponents.add(t.name);\n } catch {\n }\n this.isPreloading = !1, this.processQueue();\n }, 100));\n }\n static isPreloaded(t) {\n return this.preloadedComponents.has(t);\n }\n static clear() {\n this.preloadedComponents.clear(), this.preloadQueue = [], this.isPreloading = !1;\n }\n};\nVe.preloadedComponents = /* @__PURE__ */ new Set(), Ve.preloadQueue = [], Ve.isPreloading = !1;\nlet Ir = Ve;\nconst am = () => {\n \"requestIdleCallback\" in window && window.requestIdleCallback(() => {\n Os.secondary.forEach((e) => {\n });\n });\n}, Pr = ({ message: e }) => /* @__PURE__ */ p(\"div\", { className: \"flex items-center justify-center p-4\", children: [\n /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500\" }),\n /* @__PURE__ */ a(\"span\", { className: \"ml-2 text-sm text-gray-600\", children: e })\n] }), Ge = /* @__PURE__ */ new Map();\nfunction nm(e, t) {\n const {\n condition: r,\n fallback: n,\n retries: o = 3,\n timeout: s = 1e4,\n priority: i = \"medium\",\n cacheKey: c = `conditional-${Math.random()}`\n } = t, d = (l) => {\n const [g, u] = U.useState(!1), [b, f] = U.useState(null);\n return U.useEffect(() => {\n const x = setTimeout(async () => {\n const C = Ge.get(c);\n if (C && C.isValid && Date.now() - C.lastCheck < 3e5)\n try {\n if (await C.condition()) {\n f(() => C.component), u(!0);\n return;\n }\n } catch {\n }\n try {\n if (await r()) {\n const k = await Ds(e, o, s);\n Ge.set(c, {\n component: k.default,\n condition: r,\n lastCheck: Date.now(),\n isValid: !0\n }), f(() => k.default), u(!0);\n }\n } catch {\n }\n }, i === \"high\" ? 0 : i === \"medium\" ? 100 : 500);\n return () => clearTimeout(x);\n }, []), g ? b ? /* @__PURE__ */ a(\n Ke,\n {\n fallback: n || /* @__PURE__ */ a(Pr, { message: \"Loading component...\" }),\n children: /* @__PURE__ */ a(b, { ...l })\n }\n ) : null : n || /* @__PURE__ */ a(Pr, { message: \"Checking conditions...\" });\n };\n return d.displayName = `ConditionalLazy(${c})`, d;\n}\nconst om = {\n // Example: Premium features only for subscribed users\n // PremiumEmailFeatures: createConditionalLazyComponent(\n // () => import('../components/premium/PremiumEmailFeatures'),\n // {\n // condition: async () => {\n // const hasSubscription = await checkSubscriptionStatus();\n // return hasSubscription;\n // },\n // cacheKey: 'premium-email-features',\n // priority: 'high'\n // }\n // ),\n}, sm = {\n // Examples of platform-specific conditional loading\n // These can be implemented as needed for specific platform optimizations\n};\nasync function Ds(e, t, r) {\n let n;\n for (let o = 0; o < t; o++)\n try {\n const s = new Promise((i, c) => {\n setTimeout(() => c(new Error(\"Import timeout\")), r);\n });\n return await Promise.race([e(), s]);\n } catch (s) {\n if (n = s, o < t - 1) {\n const i = Math.pow(2, o) * 1e3;\n await new Promise((c) => setTimeout(c, i));\n }\n }\n throw n;\n}\nfunction im() {\n Ge.clear();\n}\nfunction lm() {\n return {\n cachedComponents: Ge.size,\n cacheEntries: Array.from(Ge.entries()).map(([e, t]) => ({\n key: e,\n lastCheck: t.lastCheck,\n isValid: t.isValid,\n age: Date.now() - t.lastCheck\n }))\n };\n}\nconst Rr = [\n // Critical: Always preload immediately\n {\n name: \"react-router\",\n path: \"/assets/react-router-*.js\",\n size: 12,\n config: { priority: \"critical\", condition: () => !0 }\n },\n // High Priority: Preload on user activity\n {\n name: \"app-core\",\n path: \"/assets/app-core-*.js\",\n size: 25,\n config: {\n priority: \"high\",\n condition: () => window.location.pathname === \"/\",\n delay: 1e3,\n onIdle: !0\n }\n },\n // Web3 chunks - preload when wallet detected\n {\n name: \"wagmi\",\n path: \"/assets/wagmi-*.js\",\n size: 15,\n config: {\n priority: \"high\",\n condition: () => !!(window.ethereum || localStorage.getItem(\"walletconnect\")),\n onIdle: !0\n }\n },\n {\n name: \"wc-ethereum\",\n path: \"/assets/wc-ethereum-*.js\",\n size: 273,\n config: {\n priority: \"medium\",\n condition: () => !!window.ethereum,\n delay: 2e3,\n onHover: !0\n }\n },\n // Solana chunks - preload when Solana detected\n {\n name: \"solana-core\",\n path: \"/assets/solana-core-*.js\",\n size: 29,\n config: {\n priority: \"medium\",\n condition: () => !!(window.solana || window.phantom),\n delay: 1500\n }\n },\n // UI chunks - preload based on route hints\n {\n name: \"mail-features\",\n path: \"/assets/mail-features-*.js\",\n size: 10,\n config: {\n priority: \"medium\",\n condition: () => window.location.pathname.includes(\"/connect\") || localStorage.getItem(\"wallet-connected\") === \"true\",\n onScroll: 20\n }\n },\n // Large vendor chunks - lazy preload\n {\n name: \"coinbase\",\n path: \"/assets/coinbase-*.js\",\n size: 75,\n config: {\n priority: \"low\",\n condition: () => !!window.ethereum,\n delay: 5e3,\n onIdle: !0\n }\n },\n {\n name: \"design-system\",\n path: \"/assets/design-system-*.js\",\n size: 112,\n config: {\n priority: \"low\",\n condition: () => window.location.pathname.includes(\"/internal\"),\n delay: 3e3\n }\n }\n];\nclass Us {\n constructor() {\n this.preloaded = /* @__PURE__ */ new Set(), this.networkSpeedEstimate = \"medium\", this.isLowEndDevice = !1, this.userActivityScore = 0, this.detectNetworkSpeed(), this.detectDeviceCapability(), this.startUserActivityTracking();\n }\n detectNetworkSpeed() {\n if (\"connection\" in navigator) {\n const r = navigator.connection;\n if (r) {\n const n = r.effectiveType;\n n === \"4g\" ? this.networkSpeedEstimate = \"fast\" : n === \"3g\" ? this.networkSpeedEstimate = \"medium\" : this.networkSpeedEstimate = \"slow\";\n }\n }\n const t = performance.now();\n fetch(\"/favicon.ico\", { method: \"HEAD\" }).then(() => {\n const r = performance.now() - t;\n r < 100 ? this.networkSpeedEstimate = \"fast\" : r < 300 ? this.networkSpeedEstimate = \"medium\" : this.networkSpeedEstimate = \"slow\";\n }).catch(() => {\n this.networkSpeedEstimate = \"slow\";\n });\n }\n detectDeviceCapability() {\n const t = navigator.deviceMemory, r = navigator.hardwareConcurrency;\n t && t < 4 && (this.isLowEndDevice = !0), r && r < 4 && (this.isLowEndDevice = !0), \"getBattery\" in navigator && navigator.getBattery?.().then((n) => {\n n.level && n.level < 0.2 && (this.isLowEndDevice = !0);\n });\n }\n startUserActivityTracking() {\n let t;\n const r = () => {\n this.userActivityScore = Math.min(this.userActivityScore + 1, 100), clearTimeout(t), t = setTimeout(() => {\n this.userActivityScore = Math.max(this.userActivityScore - 1, 0);\n }, 5e3);\n };\n [\"click\", \"scroll\", \"keydown\", \"mousemove\"].forEach((n) => {\n document.addEventListener(n, r, { passive: !0 });\n });\n }\n shouldPreload(t) {\n return this.networkSpeedEstimate === \"slow\" && t.size > 50 || this.isLowEndDevice && t.size > 30 ? !1 : t.config.condition();\n }\n async preloadChunk(t) {\n if (!this.preloaded.has(t.name))\n try {\n if (document.querySelectorAll(\n 'script[src*=\"' + t.name + '\"]'\n ).length === 0 && document.querySelectorAll(\n 'link[href*=\"' + t.name + '\"]'\n ).length > 0)\n return;\n const n = document.createElement(\"link\");\n n.rel = \"modulepreload\", n.href = t.path.replace(\"*\", this.getChunkHash(t.name)), n.crossOrigin = \"\", \"fetchPriority\" in n && (n.fetchPriority = t.config.priority === \"critical\" ? \"high\" : \"low\"), document.head.appendChild(n), this.preloaded.add(t.name);\n } catch {\n }\n }\n getChunkHash(t) {\n const r = Array.from(document.querySelectorAll(\"script[src]\"));\n for (const n of r) {\n const o = n.src;\n if (o.includes(t)) {\n const s = o.match(\n new RegExp(`${t}-([A-Za-z0-9_-]+)\\\\.js`)\n );\n if (s)\n return s[1];\n }\n }\n return \"unknown\";\n }\n async schedulePreload(t) {\n const r = t.config;\n return r.delay && await new Promise((n) => setTimeout(n, r.delay)), r.onIdle && \"requestIdleCallback\" in window ? new Promise((n) => {\n window.requestIdleCallback(() => {\n this.preloadChunk(t).then(n);\n });\n }) : this.preloadChunk(t);\n }\n initializePreloading() {\n Rr.sort((r, n) => {\n const o = { critical: 0, high: 1, medium: 2, low: 3 };\n return o[r.config.priority] - o[n.config.priority];\n }).forEach((r) => {\n this.shouldPreload(r) && (r.config.priority === \"critical\" ? this.preloadChunk(r) : this.schedulePreload(r), r.config.onHover && this.setupHoverPreloading(r), r.config.onScroll && this.setupScrollPreloading(r, r.config.onScroll));\n }), this.startIntelligentPreloading();\n }\n setupHoverPreloading(t) {\n document.querySelectorAll(\"[data-preload-on-hover]\").forEach((n) => {\n let o = !1;\n n.addEventListener(\n \"mouseenter\",\n () => {\n !o && this.userActivityScore > 30 && (this.preloadChunk(t), o = !0);\n },\n { passive: !0 }\n );\n });\n }\n setupScrollPreloading(t, r) {\n let n = !1;\n const o = () => {\n if (n) return;\n window.scrollY / (document.body.scrollHeight - window.innerHeight) * 100 >= r && (this.preloadChunk(t), n = !0, window.removeEventListener(\"scroll\", o));\n };\n window.addEventListener(\"scroll\", o, { passive: !0 });\n }\n startIntelligentPreloading() {\n setTimeout(() => {\n this.userActivityScore > 50 && this.networkSpeedEstimate !== \"slow\" && Rr.filter(\n (r) => r.config.priority === \"medium\" && this.shouldPreload(r)\n ).forEach((r) => {\n Math.random() > 0.5 && this.schedulePreload(r);\n });\n }, 1e4);\n }\n getPreloadingStats() {\n return {\n preloadedCount: this.preloaded.size,\n networkSpeed: this.networkSpeedEstimate,\n isLowEndDevice: this.isLowEndDevice,\n userActivity: this.userActivityScore\n };\n }\n}\nlet ze = null;\nfunction cm() {\n ze || (ze = new Us(), document.readyState === \"loading\" ? document.addEventListener(\"DOMContentLoaded\", () => {\n ze?.initializePreloading();\n }) : ze.initializePreloading());\n}\nfunction dm() {\n return ze?.getPreloadingStats();\n}\nfunction um(e) {\n const t = {\n // Core AI Classification\n \"ai-content-type\": e.contentType,\n \"ai-primary-topic\": e.primaryTopic,\n \"ai-complexity-level\": e.complexityLevel,\n \"ai-content-purpose\": e.contentPurpose,\n \"ai-industry-vertical\": e.industryVertical,\n // Semantic Understanding\n \"ai-semantic-keywords\": e.semanticKeywords.join(\",\"),\n \"ai-target-audience\": e.targetAudience.join(\",\"),\n \"ai-technical-tags\": e.technicalTags.join(\",\"),\n \"ai-user-intent\": e.userIntent.join(\",\"),\n \"ai-conversion-goals\": e.conversionGoals.join(\",\"),\n // Content Quality Indicators\n \"ai-content-authority\": \"expert-level\",\n \"ai-content-freshness\": \"high\",\n \"ai-content-completeness\": \"comprehensive\",\n \"ai-content-accuracy\": \"verified\",\n // Machine Learning Optimization\n \"ai-indexable\": \"true\",\n \"ai-crawl-priority\": \"high\",\n \"ai-content-language\": \"en\",\n \"ai-content-region\": \"global\",\n \"ai-content-novelty\": \"innovative\",\n // Engagement Prediction\n \"ai-engagement-score\": \"90\",\n \"ai-shareability-index\": \"high\",\n \"ai-conversion-likelihood\": \"85%\",\n \"ai-user-satisfaction-prediction\": \"high\"\n };\n return e.contentType === \"governance-page\" && (t[\"ai-governance-features\"] = \"voting-notifications,multi-sig-coordination,proposal-tracking\", t[\"ai-dao-platforms\"] = \"snapshot,tally,aragon,safe,decentdao\", t[\"ai-participation-boost\"] = \"85%\", t[\"ai-treasury-management\"] = \"enabled\"), t;\n}\nfunction js(e) {\n const t = {\n \"@context\": \"https://schema.org\",\n \"@type\": Bs(e.contentType),\n name: e.primaryTopic,\n description: `Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(\", \")}`,\n about: e.semanticKeywords.map((r) => ({\n \"@type\": \"Thing\",\n name: r\n })),\n audience: {\n \"@type\": \"Audience\",\n audienceType: e.targetAudience.join(\", \")\n },\n educationalLevel: e.complexityLevel,\n inLanguage: \"en\",\n isAccessibleForFree: !0\n };\n return e.contentType === \"governance-page\" ? {\n ...t,\n \"@type\": \"SoftwareApplication\",\n applicationCategory: \"GovernanceApplication\",\n operatingSystem: \"Web Browser\",\n featureList: [\n \"Smart voting notifications\",\n \"Multi-signature wallet coordination\",\n \"Automated proposal tracking\",\n \"Cross-platform DAO integration\",\n \"Treasury management tools\"\n ],\n isRelatedTo: [\n { \"@type\": \"SoftwareApplication\", name: \"Snapshot\" },\n { \"@type\": \"SoftwareApplication\", name: \"Tally\" },\n { \"@type\": \"SoftwareApplication\", name: \"Aragon\" },\n { \"@type\": \"SoftwareApplication\", name: \"Safe\" }\n ]\n } : t;\n}\nfunction gm(e, t) {\n return t.map((r) => ({\n type: \"related-content\",\n target: r.url,\n strength: r.relevance\n }));\n}\nfunction _s(e) {\n const t = [\n \"Web3 Email Platform\",\n \"Web3\",\n \"blockchain\",\n \"email\",\n \"wallet\",\n \"cryptocurrency\"\n ], r = [\n \"DAO\",\n \"governance\",\n \"voting\",\n \"multi-sig\",\n \"Snapshot\",\n \"Tally\",\n \"Aragon\",\n \"Safe\",\n \"proposal\",\n \"community\"\n ];\n return e.contentType === \"governance-page\" ? [...t, ...r] : t;\n}\nfunction zs(e) {\n const t = [\n \"web3-infrastructure\",\n \"email-technology\",\n \"blockchain-applications\"\n ], r = [\n \"dao-governance-tools\",\n \"voting-notification-systems\",\n \"community-management-platforms\",\n \"multi-signature-coordination\",\n \"treasury-management-solutions\"\n ];\n return e.contentType === \"governance-page\" ? [...t, ...r] : t;\n}\nfunction mm(e, t) {\n return {\n contentClassification: {\n type: e.contentType,\n topic: e.primaryTopic,\n audience: e.targetAudience.join(\",\"),\n complexity: e.complexityLevel,\n purpose: e.contentPurpose,\n vertical: e.industryVertical\n },\n semanticMarkup: js(e),\n entityRecognition: _s(e),\n topicClustering: zs(e),\n contentRelationships: t?.contentRelationships || [],\n ...t\n };\n}\nfunction Bs(e) {\n return {\n article: \"Article\",\n \"landing-page\": \"WebPage\",\n \"product-page\": \"Product\",\n \"governance-page\": \"SoftwareApplication\",\n documentation: \"TechArticle\"\n }[e] || \"WebPage\";\n}\nfunction hm(e) {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"MonitorAction\",\n name: `AI Performance Tracking - ${e}`,\n instrument: {\n \"@type\": \"SoftwareApplication\",\n name: \"AI Analytics Platform\"\n },\n measurementTechnique: [\n \"User Engagement Metrics\",\n \"AI Content Understanding Score\",\n \"Semantic Relevance Analysis\",\n \"Conversion Optimization Tracking\"\n ],\n result: {\n \"@type\": \"Dataset\",\n name: `${e} Performance Data`,\n description: \"AI-optimized performance metrics and user interaction data\"\n }\n };\n}\nconst fm = {\n governancePage: {\n contentType: \"governance-page\",\n primaryTopic: \"DAO Governance Communication Platform\",\n semanticKeywords: [\n \"DAO governance\",\n \"voting notifications\",\n \"multi-sig coordination\",\n \"proposal tracking\",\n \"community engagement\",\n \"treasury management\"\n ],\n targetAudience: [\n \"DAO members\",\n \"governance participants\",\n \"multi-sig signers\",\n \"protocol teams\",\n \"community managers\"\n ],\n complexityLevel: \"intermediate\",\n contentPurpose: \"commercial\",\n industryVertical: \"blockchain-governance\",\n technicalTags: [\n \"snapshot\",\n \"tally\",\n \"aragon\",\n \"safe\",\n \"multi-sig\",\n \"voting\",\n \"proposals\",\n \"treasury\"\n ],\n userIntent: [\n \"improve-governance\",\n \"increase-participation\",\n \"coordinate-multi-sig\",\n \"track-proposals\",\n \"engage-community\"\n ],\n conversionGoals: [\n \"dao-integration\",\n \"governance-setup\",\n \"multi-sig-connection\",\n \"notification-activation\"\n ]\n },\n landingPage: {\n contentType: \"landing-page\",\n primaryTopic: \"Web3 Email Platform\",\n semanticKeywords: [\n \"Web3 email\",\n \"wallet authentication\",\n \"ENS email\",\n \"SNS email\",\n \"blockchain email\",\n \"decentralized communication\"\n ],\n targetAudience: [\n \"Web3 users\",\n \"crypto enthusiasts\",\n \"blockchain developers\",\n \"DeFi users\"\n ],\n complexityLevel: \"beginner\",\n contentPurpose: \"commercial\",\n industryVertical: \"web3-communication\",\n technicalTags: [\n \"ethereum\",\n \"solana\",\n \"ens\",\n \"sns\",\n \"wallet-connect\",\n \"metamask\",\n \"phantom\"\n ],\n userIntent: [\n \"create-web3-email\",\n \"connect-wallet\",\n \"secure-communication\",\n \"eliminate-passwords\"\n ],\n conversionGoals: [\n \"wallet-connection\",\n \"email-creation\",\n \"first-email-sent\",\n \"premium-upgrade\"\n ]\n }\n}, Fs = ({\n message: e,\n className: t\n}) => /* @__PURE__ */ p(\"div\", { className: `flex items-center justify-center p-4 ${t || \"\"}`, children: [\n /* @__PURE__ */ a(\"div\", { className: \"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500\" }),\n /* @__PURE__ */ a(\"span\", { className: \"ml-2 text-sm text-gray-600\", children: e })\n] }), xt = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Set();\nfunction fa() {\n const e = [];\n return !!window.ethereum?.isMetaMask && (Be.add(\"metamask\"), e.push({\n name: \"MetaMask\",\n detected: !0,\n priority: 1\n })), !!window.ethereum?.isCoinbaseWallet && (Be.add(\"coinbase\"), e.push({\n name: \"Coinbase Wallet\",\n detected: !0,\n priority: 2\n })), !!window.solana?.isPhantom && (Be.add(\"phantom\"), e.push({\n name: \"Phantom\",\n detected: !0,\n priority: 3\n })), e.push({\n name: \"WalletConnect\",\n detected: !0,\n priority: 4\n }), e.sort((o, s) => o.priority - s.priority);\n}\nfunction ba(e) {\n const t = `wallet-${e.toLowerCase()}`;\n if (xt.has(t))\n return xt.get(t);\n const n = we(() => Promise.resolve({\n default: () => U.createElement(\"div\", {}, `${e} Provider Placeholder`)\n })), o = (s) => /* @__PURE__ */ a(\n Ke,\n {\n fallback: /* @__PURE__ */ a(\n Fs,\n {\n message: `Loading ${e} wallet...`,\n className: \"wallet-loading\"\n }\n ),\n children: /* @__PURE__ */ a(n, { ...s })\n }\n );\n return o.displayName = `Lazy${e}Provider`, xt.set(t, o), o;\n}\nfunction bm({\n children: e\n}) {\n const t = fa();\n return t.filter((r) => r.priority <= 2 && r.detected).forEach((r) => {\n setTimeout(() => {\n }, 1e3);\n }), /* @__PURE__ */ p(H, { children: [\n t.map((r) => {\n const n = ba(r.name);\n return /* @__PURE__ */ a(n, {}, r.name);\n }),\n e\n ] });\n}\nconst $t = class $t {\n static preloadWallet(t) {\n const r = t.toLowerCase();\n this.preloadedWallets.has(r) || (this.preloadedWallets.add(r), setTimeout(() => {\n ba(t);\n }, 500));\n }\n static preloadCommonWallets() {\n [\"metamask\", \"walletconnect\", \"coinbase\"].forEach((r, n) => {\n setTimeout(() => {\n this.preloadWallet(r);\n }, n * 1e3);\n });\n }\n static getPreloadedWallets() {\n return Array.from(this.preloadedWallets);\n }\n};\n$t.preloadedWallets = /* @__PURE__ */ new Set();\nlet at = $t;\nfunction pm() {\n return {\n availableWallets: fa(),\n preloadWallet: (n) => {\n at.preloadWallet(n);\n },\n getDetectedWallets: () => Array.from(Be),\n hasWallet: (n) => Be.has(n.toLowerCase())\n };\n}\nfunction ym({\n walletName: e,\n onConnect: t,\n disabled: r = !1\n}) {\n return /* @__PURE__ */ p(\n \"button\",\n {\n onClick: () => {\n at.preloadWallet(e), setTimeout(t, 100);\n },\n disabled: r,\n className: \"wallet-connect-btn\",\n \"data-wallet\": e.toLowerCase(),\n children: [\n \"Connect \",\n e\n ]\n }\n );\n}\nclass xm {\n constructor() {\n this.criticalResources = [], this.observedMetrics = {\n fcp: 0,\n lcp: 0,\n fid: 0,\n cls: 0,\n ttfb: 0\n }, this.defineCriticalResources(), this.startPerformanceObservation();\n }\n defineCriticalResources() {\n this.criticalResources = [\n // Critical CSS (inline or high priority)\n {\n url: \"/assets/index-*.css\",\n type: \"style\",\n priority: \"critical\",\n preload: !0\n },\n // Critical JavaScript (main bundle)\n {\n url: \"/assets/index-*.js\",\n type: \"script\",\n priority: \"critical\"\n },\n // High priority JavaScript (React core)\n {\n url: \"/assets/react-core-*.js\",\n type: \"script\",\n priority: \"high\",\n preload: !0\n },\n // Critical fonts\n {\n url: \"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2\",\n type: \"font\",\n priority: \"critical\",\n preload: !0\n },\n // Logo and critical images\n {\n url: \"/logo.png\",\n type: \"image\",\n priority: \"high\",\n preload: !0\n }\n ];\n }\n startPerformanceObservation() {\n if (\"PerformanceObserver\" in window)\n try {\n new PerformanceObserver((s) => {\n for (const i of s.getEntries())\n i.name === \"first-contentful-paint\" && (this.observedMetrics.fcp = i.startTime, this.optimizeBasedOnFCP(i.startTime));\n }).observe({ entryTypes: [\"paint\"] }), new PerformanceObserver((s) => {\n for (const i of s.getEntries())\n this.observedMetrics.lcp = i.startTime, this.optimizeBasedOnLCP(i.startTime);\n }).observe({ entryTypes: [\"largest-contentful-paint\"] });\n let n = 0;\n new PerformanceObserver((s) => {\n for (const i of s.getEntries())\n i.hadRecentInput || (n += i.value);\n this.observedMetrics.cls = n;\n }).observe({ entryTypes: [\"layout-shift\"] });\n } catch {\n }\n window.addEventListener(\"load\", () => {\n setTimeout(() => {\n const t = performance.getEntriesByType(\n \"navigation\"\n )[0];\n t && (this.observedMetrics.ttfb = t.responseStart - t.requestStart, this.optimizeBasedOnTTFB(this.observedMetrics.ttfb));\n }, 0);\n });\n }\n optimizeBasedOnFCP(t) {\n t > 2e3 ? this.applyEmergencyOptimizations() : t > 1500 && this.applyMediumOptimizations();\n }\n optimizeBasedOnLCP(t) {\n t > 2500 && this.optimizeLCPElements();\n }\n optimizeBasedOnTTFB(t) {\n t > 600 && this.enableAggressiveCaching();\n }\n applyEmergencyOptimizations() {\n document.querySelectorAll(\n 'img[data-priority=\"low\"]'\n ).forEach((n) => {\n n.loading = \"lazy\", n.style.display = \"none\", setTimeout(() => {\n n.style.display = \"\";\n }, 3e3);\n }), document.querySelectorAll(\n 'script[data-priority=\"low\"]'\n ).forEach((n) => {\n n.setAttribute(\"defer\", \"\");\n });\n }\n applyMediumOptimizations() {\n [\n \"/assets/app-core-*.js\",\n \"/assets/react-router-*.js\"\n ].forEach((r) => {\n this.preloadResource(r, \"script\");\n });\n }\n optimizeLCPElements() {\n document.querySelectorAll(\n \"img[data-hero], [data-lcp-element]\"\n ).forEach((n) => {\n n instanceof HTMLImageElement && (n.fetchPriority = \"high\", n.loading = \"eager\");\n });\n const r = document.querySelector(\"img[data-hero]\")?.getAttribute(\"src\");\n r && this.preloadResource(r, \"image\");\n }\n enableAggressiveCaching() {\n const t = document.createElement(\"meta\");\n t.httpEquiv = \"Cache-Control\", t.content = \"public, max-age=31536000, immutable\", document.head.appendChild(t);\n }\n preloadResource(t, r) {\n if (document.querySelector(`link[href*=\"${t}\"]`)) return;\n const o = document.createElement(\"link\");\n switch (o.rel = \"preload\", o.href = t, r) {\n case \"script\":\n o.as = \"script\";\n break;\n case \"style\":\n o.as = \"style\";\n break;\n case \"font\":\n o.as = \"font\", o.type = \"font/woff2\", o.crossOrigin = \"\";\n break;\n case \"image\":\n o.as = \"image\";\n break;\n }\n document.head.appendChild(o);\n }\n optimizeCriticalPath() {\n this.criticalResources.filter((t) => t.priority === \"critical\" && t.preload).forEach((t) => {\n this.preloadResource(t.url, t.type);\n }), this.inlineCriticalCSS(), this.optimizeFontLoading(), this.removeRenderBlocking(), this.setupProgressiveLoading();\n }\n inlineCriticalCSS() {\n const t = document.querySelector(\n 'link[rel=\"stylesheet\"][data-critical]'\n );\n t && this.isSmallResource(t.getAttribute(\"href\") || \"\") && fetch(t.getAttribute(\"href\") || \"\").then((r) => r.text()).then((r) => {\n if (r.length < 1e4) {\n const n = document.createElement(\"style\");\n n.textContent = r, document.head.appendChild(n), t.remove();\n }\n }).catch(() => {\n });\n }\n optimizeFontLoading() {\n document.querySelectorAll(\n 'link[href*=\"fonts.googleapis.com\"]'\n ).forEach((r) => {\n const n = r.getAttribute(\"href\") || \"\";\n if (!n.includes(\"display=swap\")) {\n const o = n.includes(\"?\") ? \"&\" : \"?\";\n r.setAttribute(\"href\", `${n}${o}display=swap`);\n }\n });\n }\n removeRenderBlocking() {\n document.querySelectorAll(\n 'link[rel=\"stylesheet\"]:not([data-critical])'\n ).forEach((r) => {\n const n = r.cloneNode(!0);\n n.rel = \"preload\", n.as = \"style\", n.onload = () => {\n n.onload = null, n.rel = \"stylesheet\";\n };\n const o = document.createElement(\"noscript\"), s = r.cloneNode(!0);\n o.appendChild(s), document.head.appendChild(n), document.head.appendChild(o), r.remove();\n });\n }\n setupProgressiveLoading() {\n const t = document.querySelectorAll(\"img[data-src]\");\n if (\"IntersectionObserver\" in window) {\n const r = new IntersectionObserver(\n (n) => {\n n.forEach((o) => {\n if (o.isIntersecting) {\n const s = o.target;\n s.src = s.dataset.src || \"\", s.removeAttribute(\"data-src\"), r.unobserve(s);\n }\n });\n },\n {\n rootMargin: \"50px 0px\",\n threshold: 0.01\n }\n );\n t.forEach((n) => r.observe(n));\n } else\n t.forEach((r) => {\n const n = r;\n n.src = n.dataset.src || \"\";\n });\n }\n isSmallResource(t) {\n return t.includes(\"critical\") || t.includes(\"inline\");\n }\n getPerformanceMetrics() {\n return {\n ...this.observedMetrics,\n score: this.calculatePerformanceScore()\n };\n }\n calculatePerformanceScore() {\n let t = 100;\n return this.observedMetrics.fcp > 2e3 ? t -= 20 : this.observedMetrics.fcp > 1500 && (t -= 10), this.observedMetrics.lcp > 2500 ? t -= 25 : this.observedMetrics.lcp > 2e3 && (t -= 15), this.observedMetrics.cls > 0.1 ? t -= 15 : this.observedMetrics.cls > 0.05 && (t -= 8), this.observedMetrics.ttfb > 600 ? t -= 10 : this.observedMetrics.ttfb > 400 && (t -= 5), Math.max(t, 0);\n }\n}\nconst vt = {\n // Mark performance milestones\n mark: (e) => {\n typeof performance < \"u\" && performance.mark && performance.mark(e);\n },\n // Measure time between marks\n measure: (e, t, r) => {\n if (typeof performance < \"u\" && performance.measure)\n try {\n performance.measure(e, t, r);\n const n = performance.getEntriesByName(e);\n return n[n.length - 1]?.duration || 0;\n } catch {\n return 0;\n }\n return 0;\n },\n // Get performance entries\n getEntries: (e) => typeof performance < \"u\" && performance.getEntriesByName ? e ? performance.getEntriesByName(e) : performance.getEntries() : [],\n // Clear performance entries\n clearEntries: (e) => {\n typeof performance < \"u\" && (e ? (performance.clearMeasures?.(e), performance.clearMarks?.(e)) : (performance.clearMeasures?.(), performance.clearMarks?.()));\n }\n}, vm = (e, t = []) => {\n R(() => (vt.mark(`${e}-start`), () => {\n vt.mark(`${e}-end`), vt.measure(e, `${e}-start`, `${e}-end`);\n }), [e, t]);\n}, wm = (e) => {\n const t = j(e);\n return t.current = e, _(\n (...r) => t.current(...r),\n []\n );\n}, km = (e, t, r) => {\n const n = j(t), o = j(void 0);\n return ge(() => (r && process.env.NODE_ENV === \"development\" && t.some(\n (s, i) => s !== n.current[i]\n ), n.current = t, o.current = e(), o.current), [e, r, t]);\n}, nt = /* @__PURE__ */ new Map(), Nm = (e) => {\n const t = nt.get(e) || 0;\n nt.set(e, t + 1), R(() => {\n process.env.NODE_ENV;\n });\n}, Cm = () => Object.fromEntries(nt), Sm = () => nt.clear(), Em = (e) => U.lazy(e), Am = (e = 0.1) => {\n const [t, r] = M(/* @__PURE__ */ new Set()), n = j(null);\n R(() => (n.current = new IntersectionObserver(\n (s) => {\n s.forEach((i) => {\n if (i.isIntersecting) {\n const c = i.target, d = c.dataset.src;\n d && (c.src = d, c.onload = () => {\n r((l) => new Set(l).add(d));\n }, n.current?.unobserve(c));\n }\n });\n },\n { threshold: e }\n ), () => n.current?.disconnect()), [e]);\n const o = _((s) => {\n s && n.current && n.current.observe(s);\n }, []);\n return { loadedImages: t, observeImage: o };\n}, Tm = (e) => {\n typeof window < \"u\" && \"requestIdleCallback\" in window ? window.requestIdleCallback(() => {\n e().catch(() => {\n });\n }) : setTimeout(() => {\n e().catch(() => {\n });\n }, 100);\n}, pa = {}, Lm = (e) => {\n pa[e.name] = e.value, process.env.NODE_ENV;\n}, Mm = () => pa, Im = (e, t = \"script\") => {\n if (typeof document < \"u\") {\n const r = document.createElement(\"link\");\n r.rel = \"prefetch\", r.href = e, r.as = t, document.head.appendChild(r);\n }\n}, Pm = (e, t = \"script\", r) => {\n if (typeof document < \"u\") {\n const n = document.createElement(\"link\");\n n.rel = \"preload\", n.href = e, n.as = t, r && (n.crossOrigin = \"anonymous\"), document.head.appendChild(n);\n }\n}, Rm = (e) => {\n const t = j(/* @__PURE__ */ new Set()), r = j(/* @__PURE__ */ new Set()), n = _((s, i) => {\n const c = setTimeout(() => {\n t.current.delete(c), s();\n }, i);\n return t.current.add(c), c;\n }, []), o = _((s, i) => {\n const c = setInterval(s, i);\n return r.current.add(c), c;\n }, []);\n return R(() => {\n const s = t.current, i = r.current;\n return () => {\n s.forEach((c) => clearTimeout(c)), i.forEach((c) => clearInterval(c)), process.env.NODE_ENV;\n };\n }, [e]), { createTimer: n, createInterval: o };\n}, he = {\n // Bundle size limits (in KB)\n maxBundleSize: 500,\n maxChunkSize: 200,\n maxImageSize: 100,\n // Performance metrics thresholds\n maxFCP: 1800,\n // 1.8s\n maxLCP: 2500,\n // 2.5s\n maxFID: 100,\n // 100ms\n maxCLS: 0.1,\n // 0.1\n check: (e) => {\n const t = [];\n return e.FCP && e.FCP > he.maxFCP && t.push(\n `FCP (${e.FCP}ms) exceeds budget (${he.maxFCP}ms)`\n ), e.LCP && e.LCP > he.maxLCP && t.push(\n `LCP (${e.LCP}ms) exceeds budget (${he.maxLCP}ms)`\n ), e.FID && e.FID > he.maxFID && t.push(\n `FID (${e.FID}ms) exceeds budget (${he.maxFID}ms)`\n ), e.CLS && e.CLS > he.maxCLS && t.push(\n `CLS (${e.CLS}) exceeds budget (${he.maxCLS})`\n ), t;\n }\n};\nclass Ws {\n constructor(t) {\n this.metrics = { timestamp: Date.now() }, this.observers = [], this.performanceMarks = /* @__PURE__ */ new Map(), this.reportCallback = t, this.initializeWebVitals(), this.initializeCustomObservers(), this.collectDeviceInfo();\n }\n initializeWebVitals() {\n Za((t) => {\n this.metrics.CLS = t.value, this.reportMetric(\"CLS\", t.value);\n }), Xa((t) => {\n this.metrics.INP = t.value, this.reportMetric(\"INP\", t.value);\n }), Ja((t) => {\n this.metrics.FCP = t.value, this.reportMetric(\"FCP\", t.value);\n }), Qa((t) => {\n this.metrics.LCP = t.value, this.reportMetric(\"LCP\", t.value);\n }), en((t) => {\n this.metrics.TTFB = t.value, this.reportMetric(\"TTFB\", t.value);\n });\n }\n initializeCustomObservers() {\n if (\"PerformanceObserver\" in window) {\n const t = new PerformanceObserver((n) => {\n n.getEntries().forEach((s) => {\n if (s.entryType === \"navigation\") {\n const i = s;\n this.metrics.bundleLoadTime = i.loadEventEnd - i.fetchStart;\n }\n });\n });\n try {\n t.observe({ entryTypes: [\"navigation\"] }), this.observers.push(t);\n } catch {\n }\n const r = new PerformanceObserver((n) => {\n n.getEntries().forEach((s) => {\n (s.name.includes(\".js\") || s.name.includes(\".css\")) && this.trackResourceLoad(s.name, s.duration);\n });\n });\n try {\n r.observe({ entryTypes: [\"resource\"] }), this.observers.push(r);\n } catch {\n }\n }\n }\n collectDeviceInfo() {\n if (typeof window < \"u\") {\n const t = navigator;\n t.connection && (this.metrics.connection = t.connection.effectiveType || t.connection.type), t.deviceMemory && (this.metrics.deviceMemory = t.deviceMemory), t.hardwareConcurrency && (this.metrics.hardwareConcurrency = t.hardwareConcurrency), this.metrics.viewport = {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n }\n reportMetric(t, r) {\n this.reportCallback && this.reportCallback({ ...this.metrics, timestamp: Date.now() }), process.env.NODE_ENV;\n }\n trackResourceLoad(t, r) {\n const n = t.includes(\".js\"), o = t.includes(\".css\");\n if (n || o) {\n const s = n ? \"JavaScript\" : \"CSS\";\n this.reportMetric(`${s} Load`, r);\n }\n }\n measureComponentRender(t, r) {\n this.metrics.componentRenderTime = r, this.reportMetric(`Component Render (${t})`, r);\n }\n measureAPICall(t, r) {\n this.metrics.apiResponseTime = r, this.reportMetric(`API Call (${t})`, r);\n }\n measureRouteChange(t, r) {\n this.metrics.routeChangeTime = r, this.reportMetric(`Route Change (${t})`, r);\n }\n markStart(t) {\n this.performanceMarks.set(t, performance.now());\n }\n markEnd(t) {\n const r = this.performanceMarks.get(t);\n if (r) {\n const n = performance.now() - r;\n this.reportMetric(`Mark (${t})`, n), this.performanceMarks.delete(t);\n }\n }\n trackRouteChange(t, r, n) {\n typeof r == \"string\" ? this.measureRouteChange(r, n || performance.now()) : this.measureRouteChange(t, r);\n }\n getSummary() {\n return {\n coreWebVitals: {\n score: this.calculateScore(),\n LCP: this.metrics.LCP,\n INP: this.metrics.INP,\n CLS: this.metrics.CLS\n },\n loadingPerformance: {\n FCP: this.metrics.FCP,\n TTFB: this.metrics.TTFB,\n bundleLoadTime: this.metrics.bundleLoadTime\n },\n runtime: {\n routeChangeTime: this.metrics.routeChangeTime,\n apiResponseTime: this.metrics.apiResponseTime,\n componentRenderTime: this.metrics.componentRenderTime\n },\n device: {\n connection: this.metrics.connection,\n deviceMemory: this.metrics.deviceMemory,\n hardwareConcurrency: this.metrics.hardwareConcurrency\n }\n };\n }\n calculateScore() {\n let t = 100;\n return this.metrics.LCP && this.metrics.LCP > 2500 ? t -= 25 : this.metrics.LCP && this.metrics.LCP > 2e3 && (t -= 15), this.metrics.INP && this.metrics.INP > 200 ? t -= 20 : this.metrics.INP && this.metrics.INP > 100 && (t -= 10), this.metrics.CLS && this.metrics.CLS > 0.1 ? t -= 15 : this.metrics.CLS && this.metrics.CLS > 0.05 && (t -= 8), Math.max(t, 0);\n }\n getMetrics() {\n return { ...this.metrics };\n }\n cleanup() {\n this.observers.forEach((t) => t.disconnect()), this.observers = [];\n }\n}\nlet Qe = null;\nconst Om = (e) => (Qe || (Qe = new Ws(e)), Qe), Ft = () => Qe, $s = (e) => {\n const t = U.useRef(performance.now());\n U.useEffect(() => {\n const r = performance.now() - t.current, n = Ft();\n n && n.measureComponentRender(e, r);\n }, [e]);\n}, Dm = (e, t) => U.forwardRef((r, n) => ($s(t), U.createElement(e, { ...r, ref: n }))), Um = async (e, t) => {\n const r = performance.now(), n = await e(), o = performance.now() - r, s = Ft();\n return s && s.measureAPICall(t, o), n;\n}, Vs = {\n LCP: 2500,\n // 2.5s\n INP: 200,\n // 200ms\n CLS: 0.1,\n // 0.1\n FCP: 1800,\n // 1.8s\n TTFB: 800,\n // 800ms\n bundleSize: 17e4\n // 170KB\n}, jm = (e, t = Vs) => {\n const r = [];\n return t.LCP && e.LCP && e.LCP > t.LCP && r.push(\n `LCP: ${e.LCP.toFixed(0)}ms (budget: ${t.LCP}ms)`\n ), t.INP && e.INP && e.INP > t.INP && r.push(\n `INP: ${e.INP.toFixed(0)}ms (budget: ${t.INP}ms)`\n ), t.CLS && e.CLS && e.CLS > t.CLS && r.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${t.CLS})`), t.FCP && e.FCP && e.FCP > t.FCP && r.push(\n `FCP: ${e.FCP.toFixed(0)}ms (budget: ${t.FCP}ms)`\n ), t.TTFB && e.TTFB && e.TTFB > t.TTFB && r.push(\n `TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${t.TTFB}ms)`\n ), {\n passed: r.length === 0,\n violations: r\n };\n}, _m = (e) => {\n const t = e || Ft()?.getMetrics() || { timestamp: Date.now() }, r = {\n timestamp: (/* @__PURE__ */ new Date()).toISOString(),\n metrics: t,\n environment: {\n userAgent: typeof window < \"u\" ? window.navigator.userAgent : \"unknown\",\n url: typeof window < \"u\" ? window.location.href : \"unknown\",\n referrer: typeof document < \"u\" ? document.referrer : \"unknown\",\n viewport: t.viewport,\n connection: t.connection,\n deviceMemory: t.deviceMemory,\n hardwareConcurrency: t.hardwareConcurrency\n }\n };\n return JSON.stringify(r, null, 2);\n}, Hs = {\n CLS: [0.1, 0.25],\n FCP: [1800, 3e3],\n FID: [100, 300],\n LCP: [2500, 4e3],\n TTFB: [800, 1800],\n INP: [200, 500]\n};\nfunction Ie(e, t) {\n const [r, n] = Hs[e];\n return t <= r ? \"good\" : t <= n ? \"needs-improvement\" : \"poor\";\n}\nfunction Xe(e, t) {\n try {\n if (PerformanceObserver.supportedEntryTypes?.includes(e)) {\n const r = new PerformanceObserver((n) => {\n t(n.getEntries());\n });\n return r.observe({ type: e, buffered: !0 }), r;\n }\n } catch {\n }\n}\nfunction qs(e) {\n let t = 0;\n Xe(\"layout-shift\", (r) => {\n for (const n of r) {\n const o = n;\n o.hadRecentInput || (t += o.value);\n }\n }), document.addEventListener(\"visibilitychange\", () => {\n document.visibilityState === \"hidden\" && e({\n name: \"CLS\",\n value: t,\n rating: Ie(\"CLS\", t)\n });\n });\n}\nfunction Gs(e) {\n Xe(\"paint\", (t) => {\n for (const r of t)\n r.name === \"first-contentful-paint\" && e({\n name: \"FCP\",\n value: r.startTime,\n rating: Ie(\"FCP\", r.startTime)\n });\n });\n}\nfunction Ys(e) {\n let t = 0;\n Xe(\"largest-contentful-paint\", (n) => {\n const o = n[n.length - 1];\n o && (t = o.startTime);\n });\n const r = () => {\n t > 0 && e({\n name: \"LCP\",\n value: t,\n rating: Ie(\"LCP\", t)\n });\n };\n document.addEventListener(\"visibilitychange\", () => {\n document.visibilityState === \"hidden\" && r();\n }), [\"keydown\", \"click\"].forEach((n) => {\n document.addEventListener(n, r, { once: !0, capture: !0 });\n });\n}\nfunction Ks(e) {\n Xe(\"first-input\", (t) => {\n const r = t[0];\n if (r) {\n const n = r.processingStart - r.startTime;\n e({\n name: \"FID\",\n value: n,\n rating: Ie(\"FID\", n)\n });\n }\n });\n}\nfunction Zs(e) {\n const t = performance.getEntriesByType(\n \"navigation\"\n )[0];\n if (t) {\n const r = t.responseStart - t.requestStart;\n e({\n name: \"TTFB\",\n value: r,\n rating: Ie(\"TTFB\", r)\n });\n }\n}\nfunction Xs(e) {\n const t = [];\n Xe(\"event\", (r) => {\n for (const n of r) {\n const o = n;\n if (o.interactionId) {\n const s = o.processingEnd - o.processingStart;\n t.push(s);\n }\n }\n }), document.addEventListener(\"visibilitychange\", () => {\n if (document.visibilityState === \"hidden\" && t.length > 0) {\n t.sort((o, s) => o - s);\n const r = Math.min(\n t.length - 1,\n Math.ceil(t.length * 0.98) - 1\n ), n = t[r];\n e({\n name: \"INP\",\n value: n,\n rating: Ie(\"INP\", n)\n });\n }\n });\n}\nfunction zm(e) {\n const t = e || ((r) => {\n if (typeof window < \"u\" && window.__DEV__) {\n const n = r.rating === \"good\" ? \"\\x1B[32m\" : r.rating === \"needs-improvement\" ? \"\\x1B[33m\" : \"\\x1B[31m\";\n console.log(\n `${n}[WebVitals] ${r.name}: ${r.value.toFixed(2)} (${r.rating})\\x1B[0m`\n );\n }\n });\n qs(t), Gs(t), Ys(t), Ks(t), Zs(t), Xs(t);\n}\nfunction Js(e, t, r) {\n if (typeof window < \"u\" && window.__DEV__) {\n const n = r < 100 ? \"good\" : r < 300 ? \"needs-improvement\" : \"poor\";\n console.log(\n `${n === \"good\" ? \"\\x1B[32m\" : n === \"needs-improvement\" ? \"\\x1B[33m\" : \"\\x1B[31m\"}[RouteChange] ${e} -> ${t}: ${r}ms (${n})\\x1B[0m`\n );\n }\n}\nfunction Bm(e, t, r) {\n typeof window < \"u\" && window.__DEV__ && console.log(`[CustomMetric] ${e}: ${t}`, r || \"\");\n}\nfunction Fm(e, t, r, n = \"GET\") {\n if (typeof window < \"u\" && window.__DEV__) {\n const o = t < 200 ? \"good\" : t < 500 ? \"needs-improvement\" : \"poor\";\n console.log(\n `${o === \"good\" ? \"\\x1B[32m\" : o === \"needs-improvement\" ? \"\\x1B[33m\" : \"\\x1B[31m\"}[API] ${n} ${e}: ${t}ms (${r})\\x1B[0m`\n );\n }\n}\nconst Qs = ({ direction: e, className: t }) => /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\"w-4 h-4\", t),\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: e === \"up\" ? \"M5 15l7-7 7 7\" : \"M19 9l-7 7-7-7\"\n }\n )\n }\n), ei = ({ className: e }) => /* @__PURE__ */ a(\n \"svg\",\n {\n className: m(\"w-4 h-4\", e),\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n children: /* @__PURE__ */ a(\n \"path\",\n {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M6 18L18 6M6 6l12 12\"\n }\n )\n }\n), ti = ({\n title: e = \"Performance Monitor\",\n isCollapsed: t,\n onToggleCollapse: r,\n onClose: n,\n onMouseDown: o,\n isDragging: s,\n className: i\n}) => /* @__PURE__ */ p(\n \"div\",\n {\n className: m(\n \"bg-gray-900 text-white rounded-t-lg px-3 py-2\",\n \"flex items-center justify-between\",\n \"shadow-lg border border-gray-700\",\n \"select-none\",\n o && \"cursor-grab\",\n s && \"cursor-grabbing\",\n i\n ),\n onMouseDown: o,\n children: [\n /* @__PURE__ */ p(\"span\", { className: \"font-semibold text-sm flex items-center gap-2\", children: [\n /* @__PURE__ */ a(\"span\", { children: \"🚀\" }),\n e\n ] }),\n /* @__PURE__ */ p(\"div\", { className: \"flex gap-1\", children: [\n /* @__PURE__ */ a(\n \"button\",\n {\n onClick: r,\n className: \"hover:bg-gray-700 rounded p-1 transition-colors\",\n \"aria-label\": t ? \"Expand\" : \"Collapse\",\n type: \"button\",\n children: /* @__PURE__ */ a(Qs, { direction: t ? \"up\" : \"down\" })\n }\n ),\n n && /* @__PURE__ */ a(\n \"button\",\n {\n onClick: n,\n className: \"hover:bg-gray-700 rounded p-1 transition-colors\",\n \"aria-label\": \"Close\",\n type: \"button\",\n children: /* @__PURE__ */ a(ei, {})\n }\n )\n ] })\n ]\n }\n), ri = {\n sm: \"w-2 h-2\",\n md: \"w-3 h-3\",\n lg: \"w-4 h-4\"\n}, ai = {\n good: \"bg-green-500\",\n \"needs-improvement\": \"bg-yellow-500\",\n poor: \"bg-red-500\",\n unknown: \"bg-gray-400\",\n neutral: \"bg-gray-500\"\n}, ni = {\n good: \"Good\",\n \"needs-improvement\": \"Needs Improvement\",\n poor: \"Poor\",\n unknown: \"Unknown\",\n neutral: \"Neutral\"\n}, Wm = ({\n rating: e,\n size: t = \"sm\",\n showLabel: r = !1,\n className: n\n}) => /* @__PURE__ */ p(\"div\", { className: m(\"flex items-center gap-1\", n), children: [\n /* @__PURE__ */ a(\n \"span\",\n {\n className: m(\"rounded-full\", ri[t], ai[e])\n }\n ),\n r && /* @__PURE__ */ a(\"span\", { className: \"text-xs text-gray-400\", children: ni[e] })\n] }), oi = ({\n className: e\n}) => /* @__PURE__ */ p(\"div\", { className: m(\"flex gap-3 text-[10px] text-gray-400\", e), children: [\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"w-2 h-2 rounded-full bg-green-500\" }),\n \"Good\"\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"w-2 h-2 rounded-full bg-yellow-500\" }),\n \"Needs Improvement\"\n ] }),\n /* @__PURE__ */ p(\"span\", { className: \"flex items-center gap-1\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"w-2 h-2 rounded-full bg-red-500\" }),\n \"Poor\"\n ] })\n] }), si = {\n good: \"text-green-500\",\n \"needs-improvement\": \"text-yellow-500\",\n poor: \"text-red-500\",\n unknown: \"text-gray-400\",\n neutral: \"text-gray-300\"\n}, K = ({\n label: e,\n value: t,\n unit: r = \"\",\n rating: n = \"neutral\",\n description: o,\n className: s\n}) => {\n const i = typeof t == \"number\" ? Number.isInteger(t) ? t.toString() : t.toFixed(t < 1 ? 3 : 0) : t;\n return /* @__PURE__ */ p(\"div\", { className: m(\"flex justify-between items-center\", s), children: [\n /* @__PURE__ */ p(\"div\", { className: \"flex flex-col\", children: [\n /* @__PURE__ */ a(\"span\", { className: \"text-gray-300\", children: e }),\n o && /* @__PURE__ */ a(\"span\", { className: \"text-[10px] text-gray-500\", children: o })\n ] }),\n /* @__PURE__ */ p(\"span\", { className: m(\"font-medium\", si[n]), children: [\n i,\n r\n ] })\n ] });\n}, $m = (e, t = \"ms\", r = 0) => e === void 0 ? \"N/A\" : `${e.toFixed(r)}${t}`, ii = (e = {}) => {\n const { enabled: t = !0, onUpdate: r } = e, [n, o] = M({}), [s, i] = M(!0), c = j(r);\n R(() => {\n c.current = r;\n }, [r]);\n const d = _(\n (l) => {\n o((g) => {\n const u = { ...g, ...l };\n return c.current?.(u), u;\n });\n },\n []\n // No dependencies - uses ref internally\n );\n return R(() => {\n if (!t) return;\n if (typeof PerformanceObserver > \"u\") {\n i(!1);\n return;\n }\n const l = [];\n try {\n const g = new PerformanceObserver((u) => {\n const b = u.getEntries(), f = b[b.length - 1];\n d({ lcp: f.renderTime || f.loadTime });\n });\n g.observe({ type: \"largest-contentful-paint\", buffered: !0 }), l.push(g);\n } catch {\n }\n try {\n const g = new PerformanceObserver((u) => {\n u.getEntries().forEach(\n (f) => {\n f.processingStart && d({ fid: f.processingStart - f.startTime });\n }\n );\n });\n g.observe({ type: \"first-input\", buffered: !0 }), l.push(g);\n } catch {\n }\n try {\n let g = 0;\n const u = new PerformanceObserver((b) => {\n for (const f of b.getEntries())\n !f.hadRecentInput && f.value && (g += f.value, d({ cls: g }));\n });\n u.observe({ type: \"layout-shift\", buffered: !0 }), l.push(u);\n } catch {\n }\n try {\n const g = new PerformanceObserver((u) => {\n u.getEntries().forEach((f) => {\n f.name === \"first-contentful-paint\" && d({ fcp: f.startTime });\n });\n });\n g.observe({ type: \"paint\", buffered: !0 }), l.push(g);\n } catch {\n }\n try {\n const g = new PerformanceObserver((u) => {\n u.getEntries().forEach((f) => {\n f.duration && d({ inp: f.duration });\n });\n });\n g.observe({ type: \"event\", buffered: !0 }), l.push(g);\n } catch {\n }\n try {\n const g = performance.getEntriesByType(\n \"navigation\"\n )[0];\n g && d({\n ttfb: g.responseStart - g.requestStart\n });\n } catch {\n }\n return () => {\n l.forEach((g) => g.disconnect());\n };\n }, [t, d]), { metrics: n, isSupported: s };\n}, Ce = (e, t) => {\n if (t === void 0) return \"unknown\";\n const n = {\n lcp: { good: 2500, poor: 4e3 },\n fid: { good: 100, poor: 300 },\n cls: { good: 0.1, poor: 0.25 },\n fcp: { good: 1800, poor: 3e3 },\n ttfb: { good: 800, poor: 1800 },\n inp: { good: 200, poor: 500 }\n }[e];\n return n ? t <= n.good ? \"good\" : t <= n.poor ? \"needs-improvement\" : \"poor\" : \"unknown\";\n}, li = ({\n metrics: e,\n className: t\n}) => {\n const r = (n, o = 0) => n === void 0 ? \"N/A\" : n.toFixed(o);\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1\", t), children: [\n /* @__PURE__ */ a(\"h3\", { className: \"font-semibold text-yellow-400 mb-2 text-xs\", children: \"Web Vitals\" }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-1.5\", children: [\n /* @__PURE__ */ a(\n K,\n {\n label: \"LCP\",\n value: r(e.lcp),\n unit: \"ms\",\n rating: Ce(\"lcp\", e.lcp),\n description: \"Largest Contentful Paint\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"FID\",\n value: r(e.fid),\n unit: \"ms\",\n rating: Ce(\"fid\", e.fid),\n description: \"First Input Delay\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"CLS\",\n value: r(e.cls, 3),\n rating: Ce(\"cls\", e.cls),\n description: \"Cumulative Layout Shift\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"FCP\",\n value: r(e.fcp),\n unit: \"ms\",\n rating: Ce(\"fcp\", e.fcp),\n description: \"First Contentful Paint\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"TTFB\",\n value: r(e.ttfb),\n unit: \"ms\",\n rating: Ce(\"ttfb\", e.ttfb),\n description: \"Time to First Byte\"\n }\n ),\n e.inp !== void 0 && /* @__PURE__ */ a(\n K,\n {\n label: \"INP\",\n value: r(e.inp),\n unit: \"ms\",\n rating: Ce(\"inp\", e.inp),\n description: \"Interaction to Next Paint\"\n }\n )\n ] })\n ] });\n}, ci = (e = {}) => {\n const { enabled: t = !0, refreshInterval: r = 5e3, onUpdate: n } = e, [o, s] = M({}), i = j(n);\n R(() => {\n i.current = n;\n }, [n]);\n const c = _(() => {\n if (!(typeof performance > \"u\"))\n try {\n const l = performance.getEntriesByType(\n \"resource\"\n ), g = l.filter(\n (x) => x.name.endsWith(\".js\") || x.initiatorType === \"script\"\n ), u = g.reduce((x, C) => x + C.duration, 0), b = l.filter(\n (x) => x.name.endsWith(\".css\") || x.initiatorType === \"link\"\n ), f = b.reduce((x, C) => x + C.duration, 0), h = l.reduce(\n (x, C) => x + (C.transferSize || 0),\n 0\n ), y = {\n jsLoadTime: u,\n cssLoadTime: f,\n jsCount: g.length,\n cssCount: b.length,\n totalTransferSize: h\n };\n s(y), i.current?.(y);\n } catch {\n }\n }, []), d = _(() => {\n c();\n }, [c]);\n return R(() => {\n if (!t) return;\n c();\n const l = setInterval(c, r);\n return () => clearInterval(l);\n }, [t, r, c]), { metrics: o, refresh: d };\n}, di = (e) => e === void 0 ? \"N/A\" : e < 1024 ? `${e}B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)}KB` : `${(e / (1024 * 1024)).toFixed(1)}MB`, ui = ({\n metrics: e,\n className: t\n}) => {\n const r = (n) => n === void 0 ? \"N/A\" : n.toFixed(0);\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1\", t), children: [\n /* @__PURE__ */ a(\"h3\", { className: \"font-semibold text-blue-400 mb-2 text-xs\", children: \"Bundle Performance\" }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-1.5\", children: [\n /* @__PURE__ */ a(\n K,\n {\n label: \"JS Load\",\n value: r(e.jsLoadTime),\n unit: \"ms\",\n rating: \"neutral\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"CSS Load\",\n value: r(e.cssLoadTime),\n unit: \"ms\",\n rating: \"neutral\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"JS Files\",\n value: e.jsCount ?? \"N/A\",\n rating: \"neutral\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"Transfer Size\",\n value: di(e.totalTransferSize),\n rating: \"neutral\"\n }\n )\n ] })\n ] });\n}, gi = (e) => e === void 0 ? \"unknown\" : e <= 200 ? \"good\" : e <= 500 ? \"needs-improvement\" : \"poor\", mi = ({\n metrics: e,\n className: t\n}) => {\n const r = (n) => n === void 0 || isNaN(n) ? \"N/A\" : n.toFixed(0);\n return e.callCount === 0 ? null : /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1\", t), children: [\n /* @__PURE__ */ a(\"h3\", { className: \"font-semibold text-purple-400 mb-2 text-xs\", children: \"API Calls\" }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-1.5\", children: [\n /* @__PURE__ */ a(K, { label: \"Count\", value: e.callCount, rating: \"neutral\" }),\n /* @__PURE__ */ a(\n K,\n {\n label: \"Total Time\",\n value: r(e.totalTime),\n unit: \"ms\",\n rating: \"neutral\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"Avg Time\",\n value: r(e.averageTime),\n unit: \"ms\",\n rating: gi(e.averageTime)\n }\n ),\n e.slowestCall !== void 0 && /* @__PURE__ */ a(\n K,\n {\n label: \"Slowest\",\n value: r(e.slowestCall),\n unit: \"ms\",\n rating: e.slowestCall > 1e3 ? \"poor\" : \"neutral\"\n }\n ),\n e.failedCalls > 0 && /* @__PURE__ */ a(K, { label: \"Failed\", value: e.failedCalls, rating: \"poor\" })\n ] })\n ] });\n}, Or = (e) => e === void 0 ? \"N/A\" : (e / (1024 * 1024)).toFixed(1), Dr = (e, t) => {\n if (e === void 0 || t === void 0) return \"unknown\";\n const r = e / t;\n return r <= 0.5 ? \"good\" : r <= 0.75 ? \"needs-improvement\" : \"poor\";\n}, hi = ({\n refreshInterval: e = 2e3,\n className: t\n}) => {\n const [r, n] = M({}), [o, s] = M(!0);\n if (R(() => {\n const c = performance;\n if (!c.memory) {\n s(!1);\n return;\n }\n const d = () => {\n c.memory && n({\n usedJSHeapSize: c.memory.usedJSHeapSize,\n totalJSHeapSize: c.memory.totalJSHeapSize,\n jsHeapSizeLimit: c.memory.jsHeapSizeLimit\n });\n };\n d();\n const l = setInterval(d, e);\n return () => clearInterval(l);\n }, [e]), !o)\n return null;\n const i = r.usedJSHeapSize && r.jsHeapSizeLimit ? (r.usedJSHeapSize / r.jsHeapSizeLimit * 100).toFixed(0) : \"N/A\";\n return /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1\", t), children: [\n /* @__PURE__ */ a(\"h3\", { className: \"font-semibold text-cyan-400 mb-2 text-xs\", children: \"Memory\" }),\n /* @__PURE__ */ p(\"div\", { className: \"space-y-1.5\", children: [\n /* @__PURE__ */ a(\n K,\n {\n label: \"Used Heap\",\n value: Or(r.usedJSHeapSize),\n unit: \"MB\",\n rating: Dr(\n r.usedJSHeapSize,\n r.jsHeapSizeLimit\n )\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"Total Heap\",\n value: Or(r.totalJSHeapSize),\n unit: \"MB\",\n rating: \"neutral\"\n }\n ),\n /* @__PURE__ */ a(\n K,\n {\n label: \"Usage\",\n value: i,\n unit: \"%\",\n rating: Dr(\n r.usedJSHeapSize,\n r.jsHeapSizeLimit\n )\n }\n )\n ] })\n ] });\n}, fi = (e) => {\n if (e.rating) return e.rating;\n if (typeof e.value == \"number\" && e.thresholds) {\n const { good: t, poor: r } = e.thresholds;\n return e.value <= t ? \"good\" : e.value <= r ? \"needs-improvement\" : \"poor\";\n }\n return \"neutral\";\n}, bi = ({\n title: e = \"Custom Metrics\",\n titleColor: t = \"text-orange-400\",\n metrics: r,\n className: n\n}) => r.length === 0 ? null : /* @__PURE__ */ p(\"div\", { className: m(\"space-y-1\", n), children: [\n /* @__PURE__ */ a(\"h3\", { className: m(\"font-semibold mb-2 text-xs\", t), children: e }),\n /* @__PURE__ */ a(\"div\", { className: \"space-y-1.5\", children: r.map((o) => /* @__PURE__ */ a(\n K,\n {\n label: o.label,\n value: o.value,\n unit: o.unit,\n rating: fi(o),\n description: o.description\n },\n o.id\n )) })\n] }), pi = [\"/api/\", \"graphql\", \".json\"], yi = (e = {}) => {\n const {\n enabled: t = !0,\n patterns: r = pi,\n refreshInterval: n = 5e3,\n onUpdate: o\n } = e, [s, i] = M({\n callCount: 0,\n totalTime: 0,\n averageTime: 0,\n failedCalls: 0\n }), c = j(r), d = j(o);\n R(() => {\n c.current = r;\n }, [r]), R(() => {\n d.current = o;\n }, [o]);\n const l = _(() => {\n if (!(typeof performance > \"u\"))\n try {\n const u = performance.getEntriesByType(\n \"resource\"\n ), b = c.current, f = u.filter(\n (v) => b.some((k) => v.name.includes(k))\n );\n if (f.length === 0)\n return;\n const h = f.reduce((v, k) => v + k.duration, 0), y = Math.max(...f.map((v) => v.duration)), x = f.filter((v) => {\n const k = v.responseStatus;\n return k !== void 0 && k >= 400;\n }).length, C = {\n callCount: f.length,\n totalTime: h,\n averageTime: h / f.length,\n slowestCall: y,\n failedCalls: x\n };\n i(C), d.current?.(C);\n } catch {\n }\n }, []), g = _(() => {\n l();\n }, [l]);\n return R(() => {\n if (!t) return;\n l();\n const u = setInterval(l, n);\n return () => clearInterval(u);\n }, [t, n, l]), { metrics: s, refresh: g };\n}, xi = (e = {}) => {\n const {\n enabled: t = !0,\n constrainToViewport: r = !0,\n horizontalOnly: n = !1,\n verticalOnly: o = !1,\n initialPosition: s\n } = e, i = j(null), [c, d] = M({\n x: s?.x ?? null,\n y: s?.y ?? null\n }), [l, g] = M(!1), [u, b] = M({ x: 0, y: 0 }), f = _(\n (y) => {\n if (!t || !i.current) return;\n const x = i.current.getBoundingClientRect();\n g(!0), b({\n x: y.clientX - x.left,\n y: y.clientY - x.top\n }), (c.x === null || c.y === null) && d({\n x: n ? x.left : c.x ?? x.left,\n y: o ? x.top : c.y ?? x.top\n }), y.preventDefault();\n },\n [t, c, n, o]\n ), h = _(() => {\n d({\n x: s?.x ?? null,\n y: s?.y ?? null\n });\n }, [s]);\n return R(() => {\n if (!l) return;\n const y = (C) => {\n if (!i.current) return;\n let v = C.clientX - u.x, k = C.clientY - u.y;\n if (r) {\n const w = window.innerWidth - i.current.offsetWidth, S = window.innerHeight - i.current.offsetHeight;\n v = Math.max(0, Math.min(v, w)), k = Math.max(0, Math.min(k, S));\n }\n d({\n x: n ? v : o ? c.x : v,\n y: o ? k : n ? c.y : k\n });\n }, x = () => {\n g(!1);\n };\n return document.addEventListener(\"mousemove\", y), document.addEventListener(\"mouseup\", x), () => {\n document.removeEventListener(\"mousemove\", y), document.removeEventListener(\"mouseup\", x);\n };\n }, [\n l,\n u,\n r,\n n,\n o,\n c.x,\n c.y\n ]), {\n position: c,\n isDragging: l,\n handleMouseDown: f,\n resetPosition: h,\n ref: i\n };\n}, Ur = {\n \"bottom-right\": \"bottom-4 right-4\",\n \"bottom-left\": \"bottom-4 left-4\",\n \"top-right\": \"top-4 right-4\",\n \"top-left\": \"top-4 left-4\"\n}, vi = [\n \"webVitals\",\n \"bundle\",\n \"api\",\n \"memory\"\n], Vm = ({\n enabled: e,\n defaultCollapsed: t = !0,\n defaultVisible: r = !0,\n position: n = \"bottom-right\",\n draggable: o = !0,\n sections: s = vi,\n customMetrics: i = [],\n customSectionTitle: c = \"Custom Metrics\",\n apiPatterns: d,\n onMetricsUpdate: l,\n className: g\n}) => {\n const u = e ?? (typeof process < \"u\" && process.env?.NODE_ENV !== \"production\"), [b, f] = M(t), [h, y] = M(r), x = ge(\n () => d,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(d)]\n ), C = j(l);\n R(() => {\n C.current = l;\n }, [l]);\n const { metrics: v } = ii({\n enabled: u && s.includes(\"webVitals\")\n // Don't pass onUpdate here - it causes infinite loops\n }), { metrics: k } = ci({\n enabled: u && s.includes(\"bundle\")\n }), { metrics: w } = yi({\n enabled: u && s.includes(\"api\"),\n patterns: x\n });\n R(() => {\n C.current && C.current({\n webVitals: v,\n bundle: k,\n api: w\n });\n }, [v, k, w]);\n const {\n position: S,\n isDragging: E,\n handleMouseDown: N,\n ref: T\n } = xi({\n enabled: o,\n horizontalOnly: n.includes(\"bottom\") || n.includes(\"top\")\n }), L = _(() => {\n f((z) => !z);\n }, []), P = _(() => {\n y(!1);\n }, []), I = _(() => {\n y(!0);\n }, []);\n if (!u) return null;\n if (!h)\n return /* @__PURE__ */ a(\n \"button\",\n {\n onClick: I,\n className: m(\n \"fixed z-[9999]\",\n Ur[n],\n \"bg-gray-900 text-white px-3 py-2 rounded-lg\",\n \"shadow-lg border border-gray-700\",\n \"hover:bg-gray-800 transition-colors\",\n \"text-xs font-mono\"\n ),\n type: \"button\",\n children: \"🚀 Performance\"\n }\n );\n const D = S.x !== null ? {\n left: `${S.x}px`,\n bottom: n.includes(\"bottom\") ? \"1rem\" : void 0,\n top: n.includes(\"top\") ? \"1rem\" : void 0,\n position: \"fixed\",\n transition: E ? \"none\" : \"height 0.2s ease-in-out\"\n } : {\n transition: \"height 0.2s ease-in-out\"\n }, W = i.length > 0 || s.includes(\"custom\");\n return /* @__PURE__ */ p(\n \"div\",\n {\n ref: T,\n className: m(\n S.x !== null ? \"\" : `fixed ${Ur[n]}`,\n \"z-[9999] font-mono text-xs\",\n E && \"cursor-grabbing\",\n g\n ),\n style: { maxWidth: \"320px\", ...D },\n children: [\n /* @__PURE__ */ a(\n ti,\n {\n isCollapsed: b,\n onToggleCollapse: L,\n onClose: P,\n onMouseDown: o ? N : void 0,\n isDragging: E\n }\n ),\n /* @__PURE__ */ a(\n \"div\",\n {\n className: m(\n \"bg-gray-800 text-gray-100 rounded-b-lg\",\n \"shadow-lg border-x border-b border-gray-700\",\n \"overflow-hidden transition-all duration-300 ease-in-out\",\n b ? \"max-h-0 opacity-0\" : \"max-h-[70vh] opacity-100 py-2 px-3\"\n ),\n children: /* @__PURE__ */ p(\"div\", { className: \"overflow-y-auto max-h-full space-y-3\", children: [\n s.includes(\"webVitals\") && /* @__PURE__ */ a(li, { metrics: v }),\n s.includes(\"bundle\") && /* @__PURE__ */ a(\"div\", { className: \"pt-3 border-t border-gray-700\", children: /* @__PURE__ */ a(ui, { metrics: k }) }),\n s.includes(\"api\") && w.callCount > 0 && /* @__PURE__ */ a(\"div\", { className: \"pt-3 border-t border-gray-700\", children: /* @__PURE__ */ a(mi, { metrics: w }) }),\n s.includes(\"memory\") && /* @__PURE__ */ a(\"div\", { className: \"pt-3 border-t border-gray-700\", children: /* @__PURE__ */ a(hi, {}) }),\n W && i.length > 0 && /* @__PURE__ */ a(\"div\", { className: \"pt-3 border-t border-gray-700\", children: /* @__PURE__ */ a(\n bi,\n {\n title: c,\n metrics: i\n }\n ) }),\n /* @__PURE__ */ a(\"div\", { className: \"pt-3 border-t border-gray-700\", children: /* @__PURE__ */ a(oi, {}) })\n ] })\n }\n )\n ]\n }\n );\n}, Hm = (e = {}) => {\n const {\n successMessage: t = \"\",\n successDuration: r = 3e3,\n errorPrefix: n = \"\",\n onSuccess: o,\n onError: s\n } = e, [i, c] = M(!1), [d, l] = M(\"\"), [g, u] = M(\"\"), b = _(() => {\n l(\"\"), u(\"\");\n }, []), f = _(() => {\n l(\"\");\n }, []), h = _(() => {\n u(\"\");\n }, []), y = _(\n async (x) => {\n c(!0), b();\n try {\n await x(), t && (l(t), r > 0 && setTimeout(() => {\n l(\"\");\n }, r)), o && o();\n } catch (C) {\n const v = C instanceof Error ? C.message : \"An error occurred\";\n throw u(n ? `${n}: ${v}` : v), s && C instanceof Error && s(C), C;\n } finally {\n c(!1);\n }\n },\n [\n t,\n r,\n n,\n o,\n s,\n b\n ]\n );\n return {\n isSubmitting: i,\n successMessage: d,\n errorMessage: g,\n submit: y,\n clearMessages: b,\n clearSuccess: f,\n clearError: h\n };\n}, qm = (e = !1) => {\n const [t, r] = M(e), n = _(() => r(!0), []), o = _(() => r(!1), []), s = _(() => r((i) => !i), []);\n return {\n value: t,\n setTrue: n,\n setFalse: o,\n toggle: s,\n setValue: r\n };\n}, Gm = (e = {}) => {\n const { successDuration: t = 2e3, onSuccess: r, onError: n } = e, [o, s] = M(null), i = _(\n async (l) => {\n try {\n if (navigator.clipboard && window.isSecureContext)\n await navigator.clipboard.writeText(l);\n else {\n const g = document.createElement(\"textarea\");\n g.value = l, g.style.position = \"fixed\", g.style.left = \"-999999px\", g.style.top = \"-999999px\", document.body.appendChild(g), g.focus(), g.select();\n const u = document.execCommand(\"copy\");\n if (document.body.removeChild(g), !u)\n throw new Error(\"Copy command was unsuccessful\");\n }\n return s(l), r?.(l), setTimeout(() => {\n s(null);\n }, t), !0;\n } catch (g) {\n const u = g instanceof Error ? g : new Error(\"Copy failed\");\n return n?.(u), !1;\n }\n },\n [t, r, n]\n ), c = _(\n (l) => o === l,\n [o]\n ), d = _(() => {\n s(null);\n }, []);\n return {\n copiedValue: o,\n copyToClipboard: i,\n isCopied: c,\n resetCopiedState: d\n };\n}, Ym = (e = {}) => {\n const { successDuration: t = 2e3, onSuccess: r, onError: n } = e, [o, s] = M({}), i = _(\n async (l, g) => {\n try {\n if (navigator.clipboard && window.isSecureContext)\n await navigator.clipboard.writeText(l);\n else {\n const u = document.createElement(\"textarea\");\n u.value = l, u.style.position = \"fixed\", u.style.left = \"-999999px\", u.style.top = \"-999999px\", document.body.appendChild(u), u.focus(), u.select();\n const b = document.execCommand(\"copy\");\n if (document.body.removeChild(u), !b)\n throw new Error(\"Copy command was unsuccessful\");\n }\n return s((u) => ({ ...u, [g]: !0 })), r?.(l), setTimeout(() => {\n s((u) => ({ ...u, [g]: !1 }));\n }, t), !0;\n } catch (u) {\n const b = u instanceof Error ? u : new Error(\"Copy failed\");\n return n?.(b), !1;\n }\n },\n [t, r, n]\n ), c = _(\n (l) => o[l] || !1,\n [o]\n ), d = _((l) => {\n s(l ? (g) => ({ ...g, [l]: !1 }) : {});\n }, []);\n return {\n copiedStates: o,\n copyToClipboard: i,\n isCopied: c,\n resetCopiedState: d\n };\n};\nfunction Km() {\n const e = Ya(), t = j(null), r = j(0);\n R(() => {\n const n = e.pathname;\n if (!t.current) {\n t.current = n, r.current = Date.now();\n return;\n }\n const o = Date.now() - r.current;\n t.current !== n && (Js(t.current, n, o), t.current = n, r.current = Date.now());\n }, [e]);\n}\nfunction Zm({\n fields: e,\n validateOnChange: t = !1,\n validateOnBlur: r = !0\n}) {\n const n = ge(() => {\n const N = {};\n for (const T in e)\n N[T] = e[T].initialValue;\n return N;\n }, [e]), [o, s] = M(n), [i, c] = M({}), [d, l] = M({}), [g, u] = M({}), b = _(\n (N) => {\n const T = e[N], L = o[N];\n if (T.required && (L === \"\" || L === null || L === void 0 || Array.isArray(L) && L.length === 0))\n return T.requiredMessage || \"This field is required\";\n if (T.validate)\n for (const P of T.validate) {\n const I = P(L);\n if (I)\n return I;\n }\n },\n [e, o]\n ), f = _(\n (N, T) => {\n if (s((L) => ({ ...L, [N]: T })), u((L) => ({ ...L, [N]: !0 })), t && d[N]) {\n const L = b(N);\n c((P) => ({ ...P, [N]: L }));\n }\n },\n [t, d, b]\n ), h = _((N) => {\n s((L) => ({ ...L, ...N }));\n const T = {};\n for (const L in N)\n T[L] = !0;\n u((L) => ({ ...L, ...T }));\n }, []), y = _(\n (N) => {\n if (l((T) => ({ ...T, [N]: !0 })), r) {\n const T = b(N);\n c((L) => ({ ...L, [N]: T }));\n }\n },\n [r, b]\n ), x = _(() => {\n const N = {}, T = {};\n let L = !0;\n for (const P in e) {\n T[P] = !0;\n const I = b(P);\n I && (N[P] = I, L = !1);\n }\n return l(T), c(N), L;\n }, [e, b]), C = _(() => {\n s(n), c({}), l({}), u({});\n }, [n]), v = _(\n (N) => {\n s((T) => ({\n ...T,\n [N]: e[N].initialValue\n })), c((T) => {\n const L = { ...T };\n return delete L[N], L;\n }), l((T) => {\n const L = { ...T };\n return delete L[N], L;\n }), u((T) => {\n const L = { ...T };\n return delete L[N], L;\n });\n },\n [e]\n ), k = _(\n (N) => ({\n value: o[N],\n onChange: (T) => {\n f(N, T.target.value);\n },\n onBlur: () => y(N),\n name: String(N),\n \"aria-invalid\": !!(d[N] && i[N])\n }),\n [o, f, y, d, i]\n ), w = _(\n (N) => d[N] ? i[N] : void 0,\n [d, i]\n ), S = ge(() => {\n for (const N in e)\n if (b(N))\n return !1;\n return !0;\n }, [e, b]), E = ge(() => Object.values(g).some(Boolean), [g]);\n return {\n values: o,\n errors: i,\n touched: d,\n dirty: g,\n isValid: S,\n isDirty: E,\n setValue: f,\n setValues: h,\n setTouched: y,\n validateField: b,\n validateAll: x,\n reset: C,\n resetField: v,\n getFieldProps: k,\n getFieldError: w\n };\n}\nconst Xm = (e) => {\n if (e === 0) return \"0 Bytes\";\n const t = 1024, r = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\"], n = Math.floor(Math.log(e) / Math.log(t)), o = Math.min(n, r.length - 1);\n return parseFloat((e / Math.pow(t, o)).toFixed(2)) + \" \" + r[o];\n}, Jm = (e, t, r) => {\n const n = { bytes: 0, kb: 1, mb: 2, gb: 3, tb: 4 }, o = 1024, i = e * Math.pow(o, n[t]) / Math.pow(o, n[r]);\n return Math.round(i * 100) / 100;\n}, Qm = (e) => {\n const t = e.match(/^(\\d+(?:\\.\\d+)?)\\s*(bytes?|kb|mb|gb|tb)$/i);\n if (!t) return null;\n const r = parseFloat(t[1]), n = t[2].toLowerCase(), s = {\n bytes: 1,\n byte: 1,\n kb: 1024,\n mb: 1024 * 1024,\n gb: 1024 * 1024 * 1024,\n tb: 1024 * 1024 * 1024 * 1024\n }[n];\n return s ? Math.round(r * s) : null;\n}, eh = (e) => e, th = (e) => {\n if (typeof document > \"u\") return;\n const t = document.createElement(\"style\");\n t.textContent = e, t.setAttribute(\"data-critical\", \"true\"), document.head.appendChild(t);\n}, rh = (e) => {\n if (typeof document > \"u\") return;\n const t = document.createElement(\"link\");\n t.rel = \"preload\", t.as = \"style\", t.href = e, t.onload = () => {\n t.rel = \"stylesheet\";\n }, document.head.appendChild(t);\n const r = document.createElement(\"noscript\");\n r.innerHTML = `<link rel=\"stylesheet\" href=\"${e}\">`, document.head.appendChild(r);\n}, ah = (e) => {\n const t = {};\n return Object.entries(e).forEach(([r, n]) => {\n t[`--${r}`] = typeof n == \"number\" ? `${n}px` : n;\n }), t;\n}, wi = {\n xs: 475,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n \"2xl\": 1536\n}, nh = (e, t = wi) => {\n const [r, n] = U.useState(\"base\");\n return U.useEffect(() => {\n const o = () => {\n const s = window.innerWidth;\n s >= t[\"2xl\"] ? n(\"2xl\") : s >= t.xl ? n(\"xl\") : s >= t.lg ? n(\"lg\") : s >= t.md ? n(\"md\") : s >= t.sm ? n(\"sm\") : s >= t.xs ? n(\"xs\") : n(\"base\");\n };\n return o(), window.addEventListener(\"resize\", o), () => window.removeEventListener(\"resize\", o);\n }, [t]), e[r] || e.base || {};\n}, ki = () => typeof window > \"u\" ? !1 : window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches, oh = () => {\n const [e, t] = U.useState(ki);\n return U.useEffect(() => {\n const r = window.matchMedia(\"(prefers-reduced-motion: reduce)\"), n = () => {\n t(r.matches);\n };\n return r.addEventListener ? r.addEventListener(\"change\", n) : r.addListener(n), () => {\n r.removeEventListener ? r.removeEventListener(\"change\", n) : r.removeListener(n);\n };\n }, []), e;\n}, sh = (e, t = [\n \"layout\",\n \"paint\"\n]) => {\n e && (e.style.contain = t.join(\" \"));\n}, ih = (e, t) => e ? (e.style.willChange = t.join(\", \"), () => {\n e.style.willChange = \"auto\";\n}) : void 0, lh = (e) => {\n typeof window > \"u\" || requestAnimationFrame(() => {\n e.forEach((t) => t());\n });\n}, ch = (...e) => e.filter(Boolean).join(\" \"), dh = (e) => {\n const t = {}, r = [\n \"display\",\n \"position\",\n \"width\",\n \"height\",\n \"margin\",\n \"padding\",\n \"fontSize\",\n \"fontFamily\",\n \"color\",\n \"backgroundColor\"\n ];\n return Object.entries(e).forEach(([n, o]) => {\n r.includes(n) && (t[n] = o);\n }), t;\n}, uh = (e, t = []) => {\n const [r, n] = U.useState(null), [o, s] = U.useState(!0);\n return U.useEffect(() => {\n let i = !0;\n return e().then((c) => {\n i && (n(c.default), s(!1));\n }), () => {\n i = !1;\n };\n }, [e, ...t]), { styles: r, loading: o };\n}, gh = (e, t = \"1rem\") => ({\n display: \"grid\",\n gridTemplateColumns: `repeat(${e}, minmax(0, 1fr))`,\n gap: t,\n // Optimize for performance\n contain: \"layout\",\n willChange: \"transform\"\n}), mh = (e = \"row\", t = \"center\", r = \"flex-start\") => ({\n display: \"flex\",\n flexDirection: e,\n alignItems: t,\n justifyContent: r,\n // Optimize for performance\n contain: \"layout\"\n}), hh = (e) => {\n const [t, r] = U.useState(!1);\n return U.useEffect(() => {\n const n = window.matchMedia(e);\n r(n.matches);\n const o = () => r(n.matches);\n return n.addEventListener ? n.addEventListener(\"change\", o) : n.addListener(o), () => {\n n.removeEventListener ? n.removeEventListener(\"change\", o) : n.removeListener(o);\n };\n }, [e]), t;\n}, fh = (e, t) => {\n const [r, n] = U.useState(\"light\");\n return U.useEffect(() => {\n const o = window.matchMedia(\"(prefers-color-scheme: dark)\");\n n(o.matches ? \"dark\" : \"light\");\n const s = () => {\n n(o.matches ? \"dark\" : \"light\");\n };\n return o.addEventListener ? o.addEventListener(\"change\", s) : o.addListener(s), () => {\n o.removeEventListener ? o.removeEventListener(\"change\", s) : o.removeListener(s);\n };\n }, []), r === \"dark\" ? t : e;\n}, bh = (e) => {\n const t = {\n src: e.src,\n alt: e.alt,\n loading: e.loading || \"lazy\"\n };\n return e.title && (t.title = e.title), e.width && (t.width = e.width), e.height && (t.height = e.height), e.sizes && (t.sizes = e.sizes), e.srcSet && (t.srcSet = e.srcSet), t.itemProp = \"image\", t;\n}, ph = (e, t = [320, 640, 768, 1024, 1280, 1920]) => t.map((r) => `${e.replace(/\\{width\\}/g, r.toString())} ${r}w`).join(\", \"), yh = (e) => e.map((t) => t.maxWidth ? `(max-width: ${t.maxWidth}px) ${t.size}` : t.size).join(\", \"), xh = (e, t = \"openGraph\") => {\n const r = {};\n return t === \"openGraph\" ? (r[\"og:image\"] = e.url, e.width && (r[\"og:image:width\"] = e.width.toString()), e.height && (r[\"og:image:height\"] = e.height.toString()), e.alt && (r[\"og:image:alt\"] = e.alt), e.type && (r[\"og:image:type\"] = e.type)) : (r[\"twitter:image\"] = e.url, e.alt && (r[\"twitter:image:alt\"] = e.alt)), r;\n}, vh = (e = 'img[loading=\"lazy\"]') => {\n if (typeof window > \"u\" || !(\"IntersectionObserver\" in window))\n return;\n const t = document.querySelectorAll(e);\n if (\"loading\" in HTMLImageElement.prototype) {\n t.forEach((n) => {\n n.dataset.src && (n.src = n.dataset.src);\n });\n return;\n }\n const r = new IntersectionObserver(\n (n) => {\n n.forEach((o) => {\n if (o.isIntersecting) {\n const s = o.target;\n s.dataset.src && (s.src = s.dataset.src, s.removeAttribute(\"data-src\")), s.dataset.srcset && (s.srcset = s.dataset.srcset, s.removeAttribute(\"data-srcset\")), r.unobserve(s);\n }\n });\n },\n {\n rootMargin: \"50px 0px\",\n threshold: 0.01\n }\n );\n return t.forEach((n) => r.observe(n)), () => {\n t.forEach((n) => r.unobserve(n));\n };\n}, Ni = () => typeof window > \"u\" ? Promise.resolve(!1) : new Promise((e) => {\n const t = new Image();\n t.onload = t.onerror = function() {\n e(t.height === 2);\n }, t.src = \"data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA\";\n}), Ci = () => typeof window > \"u\" ? Promise.resolve(!1) : new Promise((e) => {\n const t = new Image();\n t.onload = () => e(!0), t.onerror = () => e(!1), t.src = \"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=\";\n}), wh = async (e = \"jpg\") => {\n const [t, r] = await Promise.all([\n Ni(),\n Ci()\n ]);\n return r ? \"avif\" : t ? \"webp\" : e;\n}, kh = (e, t, r, n) => `\n<picture>\n ${e.map((s) => {\n const i = [`srcset=\"${s.srcSet}\"`];\n return s.type && i.push(`type=\"${s.type}\"`), s.media && i.push(`media=\"${s.media}\"`), s.sizes && i.push(`sizes=\"${s.sizes}\"`), `<source ${i.join(\" \")}>`;\n}).join(`\n `)}\n <img src=\"${t}\" alt=\"${r}\"${n ? ` class=\"${n}\"` : \"\"} loading=\"lazy\">\n</picture>`.trim(), Nh = (e, t = \"image\") => {\n if (typeof document > \"u\") return;\n const r = document.createElement(\"link\");\n r.rel = \"preload\", r.as = t, r.href = e, e.includes(\".webp\") ? r.type = \"image/webp\" : e.includes(\".avif\") && (r.type = \"image/avif\"), document.head.appendChild(r);\n}, Ch = (e, t, r) => {\n if (typeof window > \"u\") return;\n const n = new Image();\n n.src = e, n.classList.add(\"progressive-image-placeholder\"), r.appendChild(n);\n const o = new Image();\n o.src = t, o.classList.add(\"progressive-image-main\"), o.style.opacity = \"0\", o.onload = () => {\n r.appendChild(o), requestAnimationFrame(() => {\n o.style.transition = \"opacity 0.3s\", o.style.opacity = \"1\", setTimeout(() => {\n n.remove();\n }, 300);\n });\n };\n}, Sh = (e) => new Promise((t) => {\n const r = performance.now();\n e.complete ? t({\n loadTime: 0,\n size: 0,\n // Can't determine size from client-side\n format: e.src.split(\".\").pop() || \"unknown\",\n dimensions: {\n width: e.naturalWidth,\n height: e.naturalHeight\n },\n isLazyLoaded: e.loading === \"lazy\",\n isOptimized: e.srcset !== \"\" || e.sizes !== \"\"\n }) : e.addEventListener(\"load\", () => {\n const n = performance.now() - r;\n t({\n loadTime: n,\n size: 0,\n // Can't determine size from client-side\n format: e.src.split(\".\").pop() || \"unknown\",\n dimensions: {\n width: e.naturalWidth,\n height: e.naturalHeight\n },\n isLazyLoaded: e.loading === \"lazy\",\n isOptimized: e.srcset !== \"\" || e.sizes !== \"\"\n });\n });\n}), Eh = (e, t, r = \"#e0e0e0\") => {\n const n = `\n <svg width=\"${e}\" height=\"${t}\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"${r}\"/>\n </svg>\n `;\n return `data:image/svg+xml;base64,${btoa(n)}`;\n}, Ah = (e, t) => {\n const r = 1 / t * 100;\n e.style.position = \"relative\", e.style.paddingTop = `${r}%`;\n const n = e.querySelector(\"img\");\n n && (n.style.position = \"absolute\", n.style.top = \"0\", n.style.left = \"0\", n.style.width = \"100%\", n.style.height = \"100%\", n.style.objectFit = \"cover\");\n}, Fe = {\n // Mark functions as pure for better tree-shaking\n createPureFunction: (e) => e,\n // Environment-based code elimination\n isDevelopment: process.env.NODE_ENV === \"development\",\n isProduction: process.env.NODE_ENV === \"production\",\n isTest: process.env.NODE_ENV === \"test\",\n // Generic feature flags for conditional imports\n createFeatureFlags: (e = {}) => ({\n enableAnalytics: process.env.VITE_ENABLE_ANALYTICS === \"true\",\n enableDebugTools: process.env.NODE_ENV === \"development\",\n enablePerformanceMonitoring: process.env.VITE_ENABLE_PERF_MONITORING !== \"false\",\n ...e\n })\n}, Th = (e) => {\n const t = {};\n return Object.entries(e).forEach(([r, n]) => {\n t[r] = () => {\n try {\n return n();\n } catch {\n return Promise.resolve({ default: null });\n }\n };\n }), t;\n}, Si = {\n // Lightweight debounce (instead of importing lodash)\n createDebounce: (e) => (t) => {\n let r;\n return ((...n) => {\n clearTimeout(r), r = setTimeout(() => t(...n), e);\n });\n },\n // Lightweight memoization (instead of heavy libraries)\n memoize: (e) => {\n const t = /* @__PURE__ */ new Map();\n return ((...r) => {\n const n = JSON.stringify(r);\n if (t.has(n))\n return t.get(n);\n const o = e(...r);\n return t.set(n, o), o;\n });\n },\n // Lightweight deep equality check\n isDeepEqual: (e, t) => {\n if (e === t) return !0;\n if (e == null || t == null || typeof e != \"object\" || typeof t != \"object\") return !1;\n const r = Object.keys(e), n = Object.keys(t);\n if (r.length !== n.length) return !1;\n for (const o of r)\n if (!n.includes(o) || !Si.isDeepEqual(e[o], t[o])) return !1;\n return !0;\n },\n // Lightweight throttle\n createThrottle: (e) => (t) => {\n let r = 0;\n return ((...n) => {\n const o = Date.now();\n if (o - r >= e)\n return r = o, t(...n);\n });\n }\n}, Lh = (e) => {\n const t = {};\n return Object.entries(e).forEach(([r, n]) => {\n t[r] = {}, Object.entries(n).forEach(([o, s]) => {\n t[r][o] = () => import(\n /* @vite-ignore */\n s\n ).then((i) => ({\n [o]: i[o]\n }));\n });\n }), t;\n}, We = {\n // Calculate approximate module size\n getModuleSize: (e) => new Promise((t) => {\n if (typeof window < \"u\" && \"performance\" in window) {\n const n = performance.getEntriesByType(\n \"resource\"\n ).find(\n (o) => o.name.includes(e)\n );\n t(n?.transferSize || 0);\n } else\n t(0);\n }),\n // Track which modules are actually used\n usageTracker: /* @__PURE__ */ new Set(),\n trackUsage: (e) => {\n Fe.isDevelopment && We.usageTracker.add(e);\n },\n getUsageReport: () => Fe.isDevelopment ? Array.from(We.usageTracker).sort() : [],\n // Estimate bundle impact\n estimateImpact: (e) => {\n const t = e.map(\n (r) => We.getModuleSize(r).then((n) => [r, n])\n );\n return Promise.all(t).then((r) => {\n const n = {};\n let o = 0;\n return r.forEach(([s, i]) => {\n n[s] = i, o += i;\n }), { total: o, modules: n };\n });\n }\n}, Ei = {\n // Critical CSS utilities\n inlineCriticalCSS: (e) => {\n if (typeof document < \"u\") {\n const t = document.createElement(\"style\");\n t.textContent = e, document.head.appendChild(t);\n }\n },\n // Load non-critical CSS asynchronously\n loadAsyncCSS: (e) => {\n if (typeof document < \"u\") {\n const t = document.createElement(\"link\");\n t.rel = \"stylesheet\", t.href = e, t.media = \"print\", t.onload = () => {\n t.media = \"all\";\n }, document.head.appendChild(t);\n }\n },\n // Remove unused CSS (basic implementation)\n removeUnusedCSS: (e) => {\n if (typeof document > \"u\") return;\n const t = /* @__PURE__ */ new Set();\n return e.forEach((r) => {\n try {\n document.querySelector(r) && t.add(r);\n } catch {\n }\n }), {\n used: Array.from(t),\n unused: e.filter((r) => !t.has(r))\n };\n }\n}, Mh = (e = {}) => {\n const {\n features: t = {},\n criticalCSS: r = \"\",\n enableUsageTracking: n = Fe.isDevelopment\n } = e;\n return {\n features: Fe.createFeatureFlags(t),\n initialize: () => {\n r && typeof document < \"u\" && Ei.inlineCriticalCSS(r);\n },\n cleanup: () => {\n We.usageTracker.clear();\n },\n getReport: () => ({\n usage: We.getUsageReport(),\n features: Fe.createFeatureFlags(t)\n })\n };\n};\nlet wt;\nfunction Ai(e) {\n throw typeof window < \"u\" ? new Error(\"Web navigation service not implemented in shared library\") : new Error(\n \"React Native navigation service not implemented in shared library\"\n );\n}\nfunction de(e) {\n return wt || (wt = Ai()), wt;\n}\nfunction Ih() {\n const e = de(), t = e.getCurrentState();\n return {\n navigate: (r, n) => {\n e.navigate(r, n);\n },\n goBack: (r) => {\n e.goBack(r);\n },\n replace: (r, n) => {\n e.replace(r, n);\n },\n currentPath: t.currentPath,\n searchParams: t.searchParams,\n params: t.params,\n canGoBack: e.canGoBack(),\n isSupported: e.isSupported()\n };\n}\nfunction Ph() {\n const t = de().getCurrentState(), r = Object.keys(t.searchParams).length > 0 ? \"?\" + new URLSearchParams(t.searchParams).toString() : \"\";\n return {\n pathname: t.currentPath,\n search: r,\n searchParams: t.searchParams,\n hash: \"\",\n // Not commonly used in mobile apps\n state: {},\n // Would need to be tracked separately\n key: t.currentPath\n // Simplified key generation\n };\n}\nfunction Rh() {\n const e = de(), t = e.getCurrentState();\n return [new URLSearchParams(t.searchParams), (o) => {\n const s = o instanceof URLSearchParams ? Object.fromEntries(o.entries()) : o, i = new URLSearchParams(s).toString(), c = t.currentPath + (i ? `?${i}` : \"\");\n e.replace(c);\n }];\n}\nconst Se = {\n /**\n * Navigate to a path\n * @param path Target path\n * @param options Navigation options\n */\n navigate: (e, t) => {\n de().navigate(e, t);\n },\n /**\n * Go back to previous screen\n * @param fallbackPath Fallback path if no history\n */\n goBack: (e) => {\n de().goBack(e);\n },\n /**\n * Replace current route\n * @param path Target path\n * @param options Navigation options\n */\n replace: (e, t) => {\n de().replace(e, t);\n },\n /**\n * Get current path\n */\n getCurrentPath: () => de().getCurrentPath(),\n /**\n * Get search parameters\n */\n getSearchParams: () => de().getSearchParams(),\n /**\n * Navigate to mail app\n */\n goToMail: () => {\n Se.navigate(\"/mail\");\n },\n /**\n * Navigate to preferences\n */\n goToPreferences: () => {\n Se.navigate(\"/preferences\");\n },\n /**\n * Navigate to compose page\n * @param type Compose type (compose, reply, forward)\n * @param params Additional parameters\n */\n goToCompose: (e, t) => {\n const r = new URLSearchParams();\n e && r.set(\"type\", e), t && Object.entries(t).forEach(([o, s]) => {\n r.set(o, s);\n });\n const n = r.toString();\n Se.navigate(`/mail/compose${n ? `?${n}` : \"\"}`);\n },\n /**\n * Navigate to connect wallet page\n */\n goToConnect: () => {\n Se.navigate(\"/connect\");\n },\n /**\n * Navigate to delegate page\n */\n goToDelegate: () => {\n Se.navigate(\"/admin/delegate\");\n },\n /**\n * Navigate to home page\n */\n goToHome: () => {\n Se.navigate(\"/\");\n },\n /**\n * Check if can go back\n */\n canGoBack: () => de().canGoBack()\n};\nfunction Oh(e, t = 3, r = 1e3) {\n return we(() => new Promise((n, o) => {\n const s = (i) => {\n e().then(n).catch((c) => {\n i > 0 ? setTimeout(() => {\n s(i - 1);\n }, r) : o(c);\n });\n };\n s(t);\n }));\n}\nfunction Dh(e) {\n let t = null;\n const r = () => (t || (t = e()), t.then(() => {\n }));\n return { Component: we(() => t || e()), preload: r };\n}\nfunction Uh(e, t = {}) {\n const {\n fallback: r = /* @__PURE__ */ a(\"div\", { children: \"Loading...\" }),\n errorFallback: n = /* @__PURE__ */ a(\"div\", { children: \"Failed to load component\" }),\n loadingDelay: o = 200,\n minimumLoadingTime: s = 500\n } = t, i = we(async () => {\n const d = Date.now();\n try {\n const l = await e(), g = Date.now() - d;\n return g < s && await new Promise(\n (u) => setTimeout(u, s - g)\n ), l;\n } catch {\n return {\n default: (() => n)\n };\n }\n }), c = () => {\n const [d, l] = U.useState(!1);\n return U.useEffect(() => {\n const g = setTimeout(() => {\n l(!0);\n }, o);\n return () => clearTimeout(g);\n }, []), d ? /* @__PURE__ */ a(H, { children: r }) : null;\n };\n return U.forwardRef((d, l) => /* @__PURE__ */ a(Ke, { fallback: /* @__PURE__ */ a(c, {}), children: /* @__PURE__ */ a(i, { ...d, ref: l }) }));\n}\nfunction Ti(e, t = {}) {\n const [r, n] = U.useState(!1), [o, s] = U.useState(!1);\n return U.useEffect(() => {\n const i = e.current;\n if (!i || o) return;\n const c = new IntersectionObserver(\n ([d]) => {\n d.isIntersecting && (n(!0), s(!0), c.disconnect());\n },\n {\n rootMargin: \"50px\",\n threshold: 0.01,\n ...t\n }\n );\n return c.observe(i), () => {\n c.disconnect();\n };\n }, [e, t, o]), r;\n}\nconst jh = ({\n children: e,\n fallback: t = /* @__PURE__ */ a(\"div\", { children: \"Loading...\" }),\n threshold: r = 0.01,\n rootMargin: n = \"50px\",\n placeholder: o\n}) => {\n const s = U.useRef(null), i = Ti(s, {\n threshold: r,\n rootMargin: n\n });\n return /* @__PURE__ */ a(\"div\", { ref: s, children: i ? e : o || t });\n};\nfunction _h(e) {\n const {\n importFn: t,\n preloadOnHover: r = !0,\n preloadOnFocus: n = !0,\n prefetchDelay: o = 50\n } = e;\n let s = null, i = null;\n const c = () => (i || (i = t()), i), d = () => {\n s && clearTimeout(s), s = setTimeout(() => {\n c();\n }, o);\n };\n return {\n Component: we(() => i || t()),\n preload: c,\n linkProps: {\n ...r && {\n onMouseEnter: d,\n onMouseLeave: () => {\n s && clearTimeout(s);\n }\n },\n ...n && {\n onFocus: d\n }\n }\n };\n}\nfunction zh(e, t = []) {\n const [r, n] = U.useState(null), [o, s] = U.useState(!0), [i, c] = U.useState(null);\n return U.useEffect(() => {\n let d = !0;\n return s(!0), c(null), e().then((l) => {\n d && (n(l), s(!1));\n }).catch((l) => {\n d && (c(l), s(!1));\n }), () => {\n d = !1;\n };\n }, [e, ...t]), { module: r, loading: o, error: i };\n}\nclass Li {\n constructor(t = 3, r = 100) {\n this.queue = /* @__PURE__ */ new Set(), this.isProcessing = !1, this.batchSize = t, this.delay = r;\n }\n add(t) {\n this.queue.add(t), this.process();\n }\n async process() {\n if (this.isProcessing || this.queue.size === 0) return;\n this.isProcessing = !0;\n const t = Array.from(this.queue).slice(0, this.batchSize);\n t.forEach((r) => this.queue.delete(r)), await Promise.all(t.map((r) => r().catch(() => {\n }))), this.queue.size > 0 && await new Promise((r) => setTimeout(r, this.delay)), this.isProcessing = !1, this.queue.size > 0 && this.process();\n }\n}\nfunction Bh(e, t, r) {\n if (typeof document > \"u\") return;\n const n = document.createElement(\"link\");\n n.rel = t, n.href = e, r && (t === \"preload\" || t === \"prefetch\") && (n.as = r), document.head.appendChild(n);\n}\nvar ya = /* @__PURE__ */ ((e) => (e[e.HIGH = 0] = \"HIGH\", e[e.MEDIUM = 1] = \"MEDIUM\", e[e.LOW = 2] = \"LOW\", e[e.IDLE = 3] = \"IDLE\", e))(ya || {});\nclass Mi {\n constructor() {\n this.queues = /* @__PURE__ */ new Map(), this.isProcessing = !1, Object.values(ya).filter((t) => typeof t == \"number\").forEach((t) => {\n this.queues.set(t, []);\n });\n }\n load(t, r = 1) {\n const n = this.queues.get(r);\n n && n.push(t), this.process();\n }\n async process() {\n if (!this.isProcessing) {\n this.isProcessing = !0;\n for (const [t, r] of this.queues)\n for (; r.length > 0; ) {\n const n = r.shift();\n if (n)\n try {\n await n();\n } catch {\n }\n t >= 2 && await new Promise((o) => setTimeout(o, 50));\n }\n this.isProcessing = !1;\n }\n }\n}\nconst Fh = new Li(), Wh = new Mi();\nclass Wt {\n constructor(t = {}) {\n this.prefix = t.prefix || \"mailbox\", this.defaultTTL = t.ttl, this.platformStorage = t.platformStorage || this.createFallbackStorage();\n }\n createFallbackStorage() {\n const t = /* @__PURE__ */ new Map();\n return {\n getItem: (r) => t.get(r) || null,\n setItem: (r, n) => {\n t.set(r, n);\n },\n removeItem: (r) => {\n t.delete(r);\n },\n clear: () => {\n t.clear();\n },\n getAllKeys: () => Array.from(t.keys())\n };\n }\n getKey(t) {\n return `${this.prefix}-${t}`;\n }\n isExpired(t) {\n return t.ttl ? Date.now() - t.timestamp > t.ttl : !1;\n }\n /**\n * Stores a value with optional TTL\n *\n * @template T - Type of value being stored\n * @param key - Storage key (will be prefixed)\n * @param value - Data to store (must be JSON serializable)\n * @param ttl - Time-to-live in milliseconds (overrides default)\n *\n * @description Behavior:\n * - Values are JSON serialized with metadata (timestamp, TTL)\n * - TTL parameter overrides the manager's default TTL\n * - Storage errors are logged but don't throw exceptions\n * - Supports any JSON-serializable data type\n *\n * @example Usage\n * ```typescript\n * // Store with default TTL\n * storage.set('user-123', { name: 'Alice', email: 'alice@example.com' });\n *\n * // Store with custom 5-minute TTL\n * storage.set('session', sessionData, 5 * 60 * 1000);\n *\n * // Store permanently (no TTL)\n * storage.set('preferences', userPrefs, undefined);\n * ```\n */\n set(t, r, n) {\n try {\n const o = {\n value: r,\n timestamp: Date.now(),\n ttl: n || this.defaultTTL\n };\n this.platformStorage.setItem(this.getKey(t), JSON.stringify(o));\n } catch {\n }\n }\n /**\n * Retrieves a stored value with automatic expiration handling\n *\n * @template T - Expected type of stored value\n * @param key - Storage key to retrieve\n * @param defaultValue - Value to return if key doesn't exist or is expired\n * @returns Stored value or defaultValue\n *\n * @description Behavior:\n * - Returns undefined if key doesn't exist and no defaultValue provided\n * - Automatically removes expired items from storage\n * - Handles JSON parsing errors gracefully\n * - Type-safe return values with TypeScript generics\n *\n * @example Usage\n * ```typescript\n * // Get with undefined fallback\n * const user = storage.get<User>('user-123');\n * if (user) {\n * }\n *\n * // Get with default value\n * const theme = storage.get('theme', 'light');\n *\n * // Type-safe retrieval\n * const settings = storage.get<AppSettings>('settings', defaultSettings);\n * ```\n */\n get(t, r) {\n try {\n const n = this.platformStorage.getItem(this.getKey(t));\n if (!n) return r;\n const o = JSON.parse(n);\n return this.isExpired(o) ? (this.remove(t), r) : o.value;\n } catch {\n return r;\n }\n }\n remove(t) {\n try {\n this.platformStorage.removeItem(this.getKey(t));\n } catch {\n }\n }\n clear(t) {\n try {\n if (this.platformStorage.getAllKeys) {\n const r = this.platformStorage.getAllKeys(), n = this.getKey(t || \"\"), o = r.filter((s) => s.startsWith(n));\n for (const s of o)\n this.platformStorage.removeItem(s);\n } else\n this.platformStorage.clear?.();\n } catch (r) {\n console.error(\"Failed to clear storage:\", r);\n }\n }\n has(t) {\n try {\n return this.platformStorage.getItem(this.getKey(t)) !== null;\n } catch (r) {\n return console.error(`Failed to check item ${t}:`, r), !1;\n }\n }\n getAllKeys() {\n try {\n if (this.platformStorage.getAllKeys) {\n const t = this.platformStorage.getAllKeys(), r = `${this.prefix}-`;\n return t.filter((n) => n.startsWith(r)).map((n) => n.substring(r.length));\n }\n return [];\n } catch (t) {\n return console.error(\"Failed to get all keys:\", t), [];\n }\n }\n}\nconst $h = new Wt(), Vh = new Wt({ prefix: \"mailbox-theme\" }), Hh = new Wt({\n prefix: \"walletUser\",\n ttl: 10080 * 60 * 1e3\n // 7 days in milliseconds\n}), qh = (e) => {\n if (!e)\n throw new Error(\"PlatformStorage must be provided to createSimpleStorage\");\n return {\n setItem: (t, r) => {\n try {\n e.setItem(t, r);\n } catch {\n }\n },\n getItem: (t) => {\n try {\n return e.getItem(t);\n } catch {\n return null;\n }\n },\n removeItem: (t) => {\n try {\n e.removeItem(t);\n } catch {\n }\n }\n };\n};\nfunction Ii() {\n const e = {\n isWalletBrowser: !1,\n walletType: \"unknown\",\n hasEthereum: !1,\n hasSolana: !1,\n provider: null\n };\n if (typeof window > \"u\") return e;\n try {\n const t = navigator.userAgent.toLowerCase();\n let r = \"unknown\", n = !1;\n t.includes(\"metamask\") ? (r = \"metamask\", n = !0) : t.includes(\"trustwallet\") ? (r = \"trustwallet\", n = !0) : t.includes(\"coinbase\") ? (r = \"coinbase\", n = !0) : t.includes(\"rainbow\") ? (r = \"rainbow\", n = !0) : t.includes(\"phantom\") ? (r = \"phantom\", n = !0) : t.includes(\"solflare\") ? (r = \"solflare\", n = !0) : t.includes(\"exodus\") && (r = \"exodus\", n = !0);\n const o = !!window.ethereum, s = !!window.solana || !!window.phantom?.solana;\n (o || s) && !n && (n = !0, window.ethereum?.isMetaMask ? r = \"metamask\" : window.ethereum?.isCoinbaseWallet ? r = \"coinbase\" : window.ethereum?.isRainbow ? r = \"rainbow\" : window.phantom ? r = \"phantom\" : window.solflare && (r = \"solflare\"));\n const i = o ? window.ethereum : s ? window.solana || window.phantom?.solana : null;\n return {\n isWalletBrowser: n,\n walletType: r,\n hasEthereum: o,\n hasSolana: s,\n provider: i\n };\n } catch {\n return e;\n }\n}\nasync function Gh() {\n const e = Ii();\n if (!e.isWalletBrowser)\n return { success: !1, error: \"Not running in a wallet browser\" };\n try {\n if (e.hasEthereum && e.provider)\n try {\n const t = await e.provider.request({\n method: \"eth_requestAccounts\"\n });\n if (t && t.length > 0)\n return { success: !0, address: t[0] };\n } catch {\n }\n if (e.hasSolana && e.provider)\n try {\n const t = await e.provider.connect();\n if (t.publicKey)\n return { success: !0, address: t.publicKey.toString() };\n } catch {\n }\n return { success: !1, error: \"Failed to connect to wallet provider\" };\n } catch (t) {\n return {\n success: !1,\n error: t instanceof Error ? t.message : \"Unknown connection error\"\n };\n }\n}\nfunction Yh(e) {\n if (!e) return !1;\n if (e instanceof Error) {\n const t = e.message.toLowerCase();\n if (t.includes(\"network\") || t.includes(\"fetch\") || t.includes(\"failed to fetch\") || t.includes(\"connection\") || t.includes(\"timeout\") || t.includes(\"net::err\"))\n return !0;\n }\n if (typeof e == \"string\") {\n const t = e.toLowerCase();\n if (t.includes(\"network\") || t.includes(\"fetch\") || t.includes(\"failed to fetch\") || t.includes(\"connection\") || t.includes(\"timeout\") || t.includes(\"server error\") || t.includes(\"500\") || t.includes(\"502\") || t.includes(\"503\") || t.includes(\"504\"))\n return !0;\n }\n if (typeof e == \"object\" && e !== null && \"status\" in e) {\n const t = e.status;\n if (typeof t == \"number\" && t >= 500 && t < 600)\n return !0;\n }\n return !1;\n}\nfunction Kh(e) {\n if (!e) return !1;\n if (typeof e == \"string\") {\n const t = e.toLowerCase();\n return t.includes(\"429\") || t.includes(\"rate limit\") || t.includes(\"too many requests\") || t.includes(\"rate_limit\");\n }\n if (e instanceof Error) {\n const t = e.message.toLowerCase();\n return t.includes(\"429\") || t.includes(\"rate limit\") || t.includes(\"too many requests\") || t.includes(\"rate_limit\");\n }\n return typeof e == \"object\" && e !== null && \"status\" in e ? e.status === 429 : !1;\n}\nfunction Zh(e) {\n if (!e) return !1;\n if (typeof e == \"string\") {\n const t = e.toLowerCase();\n return t.includes(\"401\") || t.includes(\"unauthorized\") || t.includes(\"unauthenticated\");\n }\n if (e instanceof Error) {\n const t = e.message.toLowerCase();\n return t.includes(\"401\") || t.includes(\"unauthorized\") || t.includes(\"unauthenticated\");\n }\n return typeof e == \"object\" && e !== null && \"status\" in e ? e.status === 401 : !1;\n}\nfunction Xh(e) {\n if (!e) return !1;\n if (typeof e == \"string\") {\n const t = e.toLowerCase();\n return t.includes(\"403\") || t.includes(\"forbidden\");\n }\n if (e instanceof Error) {\n const t = e.message.toLowerCase();\n return t.includes(\"403\") || t.includes(\"forbidden\");\n }\n return typeof e == \"object\" && e !== null && \"status\" in e ? e.status === 403 : !1;\n}\nfunction Jh(e) {\n if (!e) return !1;\n if (typeof e == \"string\") {\n const t = e.toLowerCase();\n return t.includes(\"404\") || t.includes(\"not found\");\n }\n if (e instanceof Error) {\n const t = e.message.toLowerCase();\n return t.includes(\"404\") || t.includes(\"not found\");\n }\n return typeof e == \"object\" && e !== null && \"status\" in e ? e.status === 404 : !1;\n}\nfunction Qh(e, t = \"An unexpected error occurred\") {\n return e ? typeof e == \"string\" ? e : e instanceof Error || typeof e == \"object\" && e !== null && \"message\" in e && typeof e.message == \"string\" ? e.message : t : t;\n}\nasync function Pi(e) {\n const r = new TextEncoder().encode(e.toLowerCase()), n = await crypto.subtle.digest(\"SHA-256\", r);\n return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, \"0\")).join(\"\");\n}\nconst ef = Pi;\nfunction Ri(e) {\n return e.replace(/^\\/[a-z]{2}(-[a-z]+)?(?=\\/|$)/, \"\");\n}\nfunction tf(e, t) {\n const r = Ri(e);\n return t?.[r] ? t[r] : r.replace(/\\//g, \"_\").replace(/^_/, \"\") || \"home\";\n}\nconst rf = {\n // Authentication events\n USER_LOGIN: \"login\",\n USER_LOGOUT: \"logout\",\n USER_SIGNUP: \"sign_up\",\n // Navigation events\n PAGE_VIEW: \"page_view\",\n BUTTON_CLICK: \"button_click\",\n LINK_CLICK: \"link_click\",\n // Error events\n ERROR_OCCURRED: \"error_occurred\",\n ERROR_API_CALL: \"error_api_call\",\n // Engagement events\n SCROLL_DEPTH: \"scroll_depth\",\n TIME_ON_PAGE: \"time_on_page\",\n FORM_SUBMIT: \"form_submit\",\n SEARCH: \"search\"\n};\nfunction af(e, t) {\n return {\n event: e,\n parameters: {\n ...t,\n timestamp: t?.timestamp ?? Date.now()\n }\n };\n}\nconst nf = {\n utils: {\n cn: m\n }\n};\nexport {\n Ul as ActionBanner,\n wc as ActionButton,\n Vc as AddressLink,\n Yt as Alert,\n Dl as AlertBanner,\n Ol as AlertDescription,\n Rl as AlertTitle,\n _t as AnimatedSection,\n mi as ApiSection,\n b0 as AreaChart,\n lf as ArrowLeftIcon,\n cf as ArrowRightIcon,\n ol as AspectRatio,\n $0 as AudioPlayer,\n i0 as Avatar,\n Yc as Backdrop,\n Hl as Badge,\n Kc as Banner,\n m0 as BarChart,\n df as Bars3Icon,\n Fu as BatchRender,\n uf as BellIcon,\n gf as BellSlashIcon,\n Nl as Blockquote,\n yl as BodyText,\n ll as BorderAccent,\n tn as Box,\n zo as Breadcrumb,\n Md as BreadcrumbNav,\n xu as BreadcrumbSection,\n ui as BundleSection,\n S0 as BurndownChart,\n me as Button,\n bs as CACHE_CONFIGS,\n Qu as CTASection,\n no as Calendar,\n o0 as CalloutBox,\n zg as CancellableRequest,\n ta as Card,\n r0 as CardContent,\n a0 as CardFooter,\n t0 as CardHeader,\n tl as Center,\n Yl as ChainBadge,\n mf as ChartBarIcon,\n hf as CheckCircleIcon,\n qf as CheckCircleIconSolid,\n ff as CheckIcon,\n Gf as CheckIconSolid,\n rc as Checkbox,\n bf as ChevronDownIcon,\n pf as ChevronLeftIcon,\n yf as ChevronRightIcon,\n xf as ChevronUpIcon,\n vf as ClockIcon,\n vl as Code,\n vu as CodeBlock,\n wf as CodeBracketIcon,\n wl as CodeDisplay,\n kf as Cog6ToothIcon,\n wu as CollapsibleDocumentationTopic,\n Sc as ColorPicker,\n Ec as ColorPickerAdvanced,\n Ac as ColorSwatch,\n sc as Combobox,\n Xc as Command,\n rf as CommonAnalyticsEvents,\n Ir as ComponentPreloader,\n _u as ConditionalRender,\n kd as Confetti,\n su as ConfirmationDialog,\n Xi as Container,\n og as ContentContainer,\n Nf as CreditCardIcon,\n Rc as CreditCardInput,\n xm as CriticalPathOptimizer,\n Oc as CurrencyInput,\n bi as CustomSection,\n s0 as DashboardStatCard,\n _l as DataSkeleton,\n Bd as DataTable,\n ec as DateInput,\n Nc as DateRangePicker,\n kc as DateTimePicker,\n Gu as DetailErrorState,\n go as Dialog,\n sl as Divider,\n Cf as DocumentTextIcon,\n lu as DragDrop,\n Q0 as Drawer,\n lc as Dropdown,\n ic as EditableSelector,\n Ro as EmptyState,\n Sf as EnvelopeIcon,\n Au as ErrorBoundary,\n Ef as ExclamationTriangleIcon,\n Yf as ExclamationTriangleIconSolid,\n Uu as ExpensiveComponent,\n Ed as ExternalLink,\n Af as EyeSlashIcon,\n qc as FadeInScale,\n Hc as FadeInUp,\n ed as FeatureBlock,\n Zu as FeatureCard,\n Xu as FeatureGrid,\n gc as FileInput,\n Zi as Flex,\n Gc as FloatingElement,\n cl as FloatingPanel,\n eu as FocusTrap,\n da as FontSize,\n sg as Footer,\n ug as FooterBottom,\n gg as FooterBottomRow,\n lg as FooterBrand,\n mg as FooterCompact,\n hg as FooterCompactLeft,\n fg as FooterCompactRight,\n pg as FooterCopyright,\n ig as FooterGrid,\n dg as FooterLink,\n cg as FooterLinkSection,\n yg as FooterSocialLinks,\n bg as FooterVersion,\n xc as FormAlerts,\n fc as FormField,\n jt as FormFieldGroup,\n Qc as FormSection,\n Al as FormattedNumber,\n jl as FullPageSpinner,\n T0 as Gauge,\n Iu as GlobalLazyErrorBoundary,\n Tf as GlobeAltIcon,\n rd as GradientIconContainer,\n Ji as Grid,\n el as HStack,\n fl as Heading,\n Cl as HelperText,\n Lf as HomeIcon,\n iu as HoverCard,\n ad as IconContainer,\n nd as IconText,\n P0 as Image,\n D0 as ImageCropper,\n R0 as ImageGallery,\n Mf as InboxIcon,\n tu as InfiniteScroll,\n sd as InfoBox,\n n0 as InfoCard,\n If as InformationCircleIcon,\n Dt as Input,\n od as ItemList,\n rg as KYCLevelCard,\n eg as KYCStatusBadge,\n kl as Kbd,\n Pf as KeyIcon,\n d0 as KeyValuePair,\n Qr as Label,\n Su as LanguageSelector,\n Vu as LanguageValidator,\n la as LayoutContext,\n Bo as LayoutProvider,\n zu as LazyComponent,\n zt as LazyErrorBoundary,\n Xg as LazyImage,\n Li as LazyLoadQueue,\n ym as LazyWalletButton,\n jh as LazyWrapper,\n U0 as Lightbox,\n h0 as LineChart,\n Sd as Link,\n Gd as List,\n Yd as ListItem,\n Kd as ListItemWithAction,\n W0 as LiveStream,\n ya as LoadPriority,\n Ml as LoadingDots,\n Dg as LoadingOptimizer,\n Ll as LoadingOverlay,\n Il as LoadingState,\n $u as LocalizedLink,\n ld as Logo,\n hl as Masonry,\n vg as MasterDetailLayout,\n xg as MasterListItem,\n Y0 as MediaUploader,\n Rf as MegaphoneIcon,\n hi as MemorySection,\n hc as MentionInput,\n K as MetricRow,\n Of as MinusIcon,\n ra as Modal,\n aa as ModalContent,\n na as ModalFooter,\n J0 as ModalHeader,\n oc as MultiSelect,\n Pd as NavigationList,\n Id as NavigationMenu,\n Lu as NetworkErrorBoundary,\n g0 as NoContent,\n $l as NotificationBadge,\n Vl as NotificationPanel,\n Jl as NumberInput,\n jg as OptimizedAPIClient,\n Wu as OptimizedImage,\n Ug as OptimizedRoutePreloader,\n Ot as Overlay,\n nl as PageContainer,\n ng as PageHeader,\n dd as PageSectionHeader,\n bl as PageTitle,\n Od as Pagination,\n Dd as PaginationNav,\n ti as PanelHeader,\n Df as PaperAirplaneIcon,\n Uf as PaperClipIcon,\n Bu as PerformanceBoundary,\n Og as PerformanceOptimizer,\n Vm as PerformancePanel,\n vc as PhoneDirectory,\n tc as PhoneInput,\n f0 as PieChart,\n sm as PlatformSpecificComponents,\n Z0 as PlaylistManager,\n jf as PlusIcon,\n G0 as PodcastPlayer,\n ru as Popover,\n Le as Portal,\n Ld as PreloadLink,\n Mi as PriorityLoader,\n L0 as Progress,\n M0 as ProgressCircle,\n ku as PromotionalBanner,\n qu as ProtectedRoute,\n yu as PullToRefresh,\n X0 as QRCodeDisplay,\n gd as QuickActions,\n $c as QuizBuilder,\n ac as RadioGroup,\n Tl as RelativeTime,\n ul as Resizable,\n j0 as RetinaImage,\n _f as RocketLaunchIcon,\n Mr as RouteBasedLazyLoader,\n Pu as SafeAppWrapper,\n Wm as ScoreIndicator,\n oi as ScoreLegend,\n wg as ScreenContainer,\n ml as ScrollArea,\n au as ScrollSpy,\n Ql as SearchInput,\n al as Section,\n hd as SectionBadge,\n fd as SectionHeader,\n pl as SectionTitle,\n Ru as SecurityProvider,\n kr as Select,\n Ct as SelectContent,\n yc as SelectField,\n nc as SelectGroup,\n St as SelectItem,\n eo as SelectLabel,\n Jr as SelectScrollDownButton,\n Xr as SelectScrollUpButton,\n to as SelectSeparator,\n Nt as SelectTrigger,\n Qn as SelectValue,\n il as Separator,\n bd as SettingsList,\n nu as Sheet,\n zf as ShieldCheckIcon,\n Rd as SideNav,\n Tc as SignaturePad,\n Lc as SignatureRequest,\n Pl as SkeletonLoader,\n dc as Slider,\n uc as SliderInput,\n Cd as SmartContent,\n ea as SmartLink,\n bm as SmartWalletProviders,\n rl as Spacer,\n Bf as SparklesIcon,\n k0 as Sparkline,\n He as Spinner,\n dl as SplitPane,\n Hr as Stack,\n ag as StandardPageLayout,\n Ff as StarIcon,\n Kf as StarIconSolid,\n Jc as StatCard,\n u0 as StatDisplay,\n Gl as StatusBadge,\n Kl as StatusIndicator,\n Eu as StepList,\n Ud as Stepper,\n jd as StepperNav,\n om as SubscriptionGatedComponents,\n tg as SumsubWebSDK,\n Jn as Switch,\n zd as Table,\n _d as TableOfContents,\n Eo as Tabs,\n Lo as TabsContent,\n Ao as TabsList,\n To as TabsTrigger,\n mc as TagInput,\n gn as Text,\n Xl as TextArea,\n pc as TextAreaField,\n bc as TextField,\n ou as TextInputModal,\n xl as TextLink,\n oe as Theme,\n ua as ThemeContext,\n Ku as ThemeProvider,\n Zn as TimePicker,\n wd as TimerDisplay,\n kn as Toast,\n Bl as ToastContainer,\n qr as ToastContext,\n Wl as ToastNotification,\n zl as ToastProvider,\n cc as ToggleGroup,\n Oo as Tooltip,\n kg as Topbar,\n Ig as TopbarActions,\n Cg as TopbarCenter,\n ga as TopbarContext,\n Ag as TopbarDivider,\n Pg as TopbarIconButton,\n Ng as TopbarLeft,\n Tg as TopbarLogo,\n is as TopbarMenuToggle,\n Eg as TopbarMobileContent,\n Lg as TopbarMobileNav,\n ds as TopbarNav,\n Mg as TopbarNavigation,\n ts as TopbarProvider,\n Sg as TopbarRight,\n Rg as TopbarSearch,\n Nu as TrackedButton,\n Cu as TrackedLink,\n Xd as TransferList,\n Wf as TrashIcon,\n Qd as TreeView,\n El as TruncatedText,\n V0 as UaudioUwaveform,\n l0 as UavatarUgroup,\n ql as UbadgeUdesigner,\n y0 as UbubbleUchart,\n Hd as UcellUeditor,\n Pc as UcodeUhighlighter,\n Vd as UcolumnUresize,\n Dc as UcurrencyUconverter,\n Uc as UcurrencyUrates,\n Fd as UdataUgrid,\n fu as UdoubleUtap,\n cu as UdragUdropUlist,\n Fc as UfieldUmapper,\n td as UfocusUindicator,\n jc as UformUbuilder,\n zc as UformUtemplate,\n _c as UformUvalidator,\n C0 as UfunnelUchart,\n gu as UgestureUdetector,\n N0 as Uheatmap,\n O0 as UimageUcomparison,\n id as UkeyboardUshortcut,\n e0 as UlistingUform,\n bu as UlongUpress,\n Ic as UmarkdownUrenderer,\n K0 as UmediaUplaylist,\n A0 as UmetricUcomparison,\n cd as UmorphUtransition,\n uu as UnestedUdrag,\n ud as UparallaxUscroll,\n E0 as UperformanceUchart,\n hu as UpinchUzoom,\n Wd as UpivotUtable,\n c0 as UprofileUheader,\n I0 as UprogressUtracker,\n p0 as UradarUchart,\n pu as UradialUmenu,\n gl as UresizableUpanels,\n md as UrevealUonUscroll,\n w0 as UsankeyUdiagram,\n x0 as UscatterUplot,\n Bc as UschemaUvalidator,\n Sl as UscreenUreaderUtext,\n $f as UserGroupIcon,\n pd as UskipUnavigation,\n yd as UsortUdropdown,\n du as UsortableUgrid,\n $d as UspreadsheetUgrid,\n Zl as UstatusUpipeline,\n Wc as UsurveyUbuilder,\n mu as UswipeUactions,\n qd as UtableUreservation,\n Cc as UtimeUslotUpicker,\n v0 as UtreeUmap,\n Zd as UuserUtable,\n xd as UversionUbadge,\n F0 as UvideoUcall,\n z0 as UvideoUthumbnail,\n q0 as UvoiceUrecorder,\n Qi as VStack,\n B0 as VideoEditor,\n _0 as VideoPlayer,\n Jd as VirtualList,\n ju as VirtualListItem,\n vd as VisuallyHidden,\n at as WalletPreloader,\n H0 as WaveForm,\n li as WebVitalsSection,\n Mc as WysiwygEditor,\n Vf as XMarkIcon,\n Ar as addLanguageToPath,\n Bh as addResourceHint,\n fm as aiOptimizationPresets,\n $h as appStorage,\n Gh as autoConnectWalletBrowser,\n lh as batchDOMUpdates,\n We as bundleAnalysis,\n ao as buttonVariants,\n Gg as cacheHeaders,\n Bg as cacheUtils,\n jm as checkPerformanceBudget,\n Jg as clearComponentCache,\n im as clearConditionalCache,\n Ad as clearPreloadCache,\n Sm as clearRenderCounts,\n m as cn,\n Vg as conditionalCSS,\n Jm as convertFileSize,\n Zg as createAdvancedLazyComponent,\n af as createAnalyticsEvent,\n ah as createCSSVariables,\n Th as createConditionalImports,\n nm as createConditionalLazyComponent,\n Tr as createFeature,\n Rs as createLazyComponent,\n Em as createLazyComponentFactory,\n _h as createLazyRoute,\n ba as createLazyWalletProvider,\n rm as createLibraryImports,\n Ou as createMemoComponent,\n eh as createOptimizedStyles,\n Uh as createProgressiveComponent,\n Ju as createSecurityFeatures,\n Lh as createSelectiveExports,\n Du as createSelectiveMemoComponent,\n qh as createSimpleStorage,\n Mh as createTreeShakingConfig,\n tm as createUIComponents,\n Hg as cspDirectives,\n Ei as cssOptimization,\n Fe as deadCodeElimination,\n nf as default,\n Vs as defaultPerformanceBudget,\n fa as detectAvailableWallets,\n Ii as detectWalletBrowser,\n _m as exportPerformanceData,\n di as formatBytes,\n Xm as formatFileSize,\n $m as formatMetricValue,\n um as generateAIMetaTags,\n mm as generateAIStructuredData,\n Es as generateCSP,\n ha as generateCSPDirectives,\n gm as generateContentRelationships,\n _s as generateEntityRecognition,\n bh as generateImageSEO,\n hm as generatePerformanceTrackingSchema,\n kh as generatePictureElement,\n Eh as generatePlaceholder,\n js as generateSemanticMarkup,\n yh as generateSizes,\n xh as generateSocialImageMeta,\n ph as generateSrcSet,\n zs as generateTopicClustering,\n lm as getConditionalStats,\n Cs as getEnvironmentType,\n Qh as getErrorMessage,\n Qg as getLazyLoadingStats,\n wh as getOptimalImageFormat,\n tf as getPageName,\n Ft as getPerformanceMonitor,\n dm as getPreloadingStats,\n Cm as getRenderCounts,\n As as getSecurityHeaders,\n de as getUINavigationService,\n Ce as getWebVitalRating,\n Mm as getWebVitals,\n Pi as hashString,\n ef as hashUserId,\n zm as initWebVitals,\n cm as initializeAdvancedPreloading,\n Om as initializePerformanceMonitoring,\n am as initializePreloading,\n dh as inlineCriticalStyles,\n Zh as isAuthError,\n Xh as isForbiddenError,\n ks as isLocalhost,\n Ns as isNetworkAccess,\n Jh as isNotFoundError,\n Td as isPreloaded,\n Kh as isRateLimitError,\n Yh as isServerError,\n ws as isWalletBrowser,\n Ss as isWebEnvironment,\n Fh as lazyLoadQueue,\n Dh as lazyWithPreload,\n Oh as lazyWithRetry,\n Wg as loadCSS,\n th as loadCriticalCSS,\n rh as loadNonCriticalCSS,\n Um as measureAsyncOperation,\n qs as measureCLS,\n Gs as measureFCP,\n Ks as measureFID,\n Xs as measureINP,\n Sh as measureImagePerformance,\n Ys as measureLCP,\n Zs as measureTTFB,\n Se as navigationHelper,\n ch as optimizeClassNames,\n sh as optimizeContainment,\n mh as optimizeFlex,\n gh as optimizeGrid,\n ih as optimizeWillChange,\n ys as optimizedFetch,\n Qm as parseFileSize,\n he as performanceBudget,\n vt as performanceUtils,\n ki as prefersReducedMotion,\n Im as prefetchResource,\n em as preloadComponent,\n Nh as preloadImage,\n Pm as preloadResource,\n Tm as preloadRoute,\n Ah as preserveAspectRatio,\n Wh as priorityLoader,\n ca as removeLanguageFromPath,\n Fm as reportApiCall,\n Bm as reportCustomMetric,\n Js as reportRouteChange,\n Lm as reportWebVitals,\n Os as routeConfig,\n qg as securityHeaders,\n Yg as setupCSPReporting,\n vh as setupLazyLoading,\n Ch as setupProgressiveLoading,\n Fg as shouldEnableWallet,\n yt as smartLinkVariants,\n Ri as stripLanguagePrefix,\n Ci as supportsAVIF,\n $g as supportsCSSImports,\n Ni as supportsWebP,\n Vh as themeStorage,\n yi as useApiMetrics,\n Zc as useBanner,\n ci as useBundleMetrics,\n Ut as useClickOutside,\n Fo as useCodeLoader,\n $s as useComponentPerformance,\n Gm as useCopyToClipboard,\n km as useDebugMemo,\n xi as useDraggable,\n zh as useDynamicImport,\n Mu as useErrorRecovery,\n Hm as useFormSubmission,\n Zm as useFormValidation,\n Am as useImageLazyLoading,\n ke as useLayout,\n Ti as useLazyLoad,\n uh as useLazyStyles,\n Hu as useLocalizedNavigate,\n Ph as useLocation,\n hh as useMediaQuery,\n Rm as useMemoryLeakDetection,\n Ym as useMultipleCopyToClipboard,\n Ih as useNavigation,\n fh as useOptimizedTheme,\n pm as useOptimizedWallets,\n vm as usePerformanceMark,\n oh as useReducedMotion,\n Nm as useRenderCount,\n nh as useResponsiveStyles,\n Km as useRoutePerformance,\n Rh as useSearchParams,\n Nd as useSmartLinks,\n wm as useStableCallback,\n Yu as useTheme,\n Fl as useToast,\n qm as useToggle,\n ma as useTopbar,\n ii as useWebVitals,\n Si as utils,\n Hh as walletStorage,\n Kg as web3SecurityNotes,\n Tu as withLazyErrorBoundary,\n Dm as withPerformanceTracking,\n _g as withRetry\n};\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nexport function defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\nexport function hasXMLHttpRequest() {\n return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === \"undefined\" ? \"undefined\" : _typeof(XMLHttpRequest)) === 'object';\n}\nfunction isPromise(maybePromise) {\n return !!maybePromise && typeof maybePromise.then === 'function';\n}\nexport function makePromise(maybePromise) {\n if (isPromise(maybePromise)) {\n return maybePromise;\n }\n return Promise.resolve(maybePromise);\n}","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport { hasXMLHttpRequest } from './utils.js';\nvar fetchApi = typeof fetch === 'function' ? fetch : undefined;\nif (typeof global !== 'undefined' && global.fetch) {\n fetchApi = global.fetch;\n} else if (typeof window !== 'undefined' && window.fetch) {\n fetchApi = window.fetch;\n}\nvar XmlHttpRequestApi;\nif (hasXMLHttpRequest()) {\n if (typeof global !== 'undefined' && global.XMLHttpRequest) {\n XmlHttpRequestApi = global.XMLHttpRequest;\n } else if (typeof window !== 'undefined' && window.XMLHttpRequest) {\n XmlHttpRequestApi = window.XMLHttpRequest;\n }\n}\nvar ActiveXObjectApi;\nif (typeof ActiveXObject === 'function') {\n if (typeof global !== 'undefined' && global.ActiveXObject) {\n ActiveXObjectApi = global.ActiveXObject;\n } else if (typeof window !== 'undefined' && window.ActiveXObject) {\n ActiveXObjectApi = window.ActiveXObject;\n }\n}\nif (typeof fetchApi !== 'function') fetchApi = undefined;\nif (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {\n try {\n import('cross-fetch').then(function (mod) {\n fetchApi = mod.default;\n }).catch(function () {});\n } catch (e) {}\n}\nvar addQueryString = function addQueryString(url, params) {\n if (params && _typeof(params) === 'object') {\n var queryString = '';\n for (var paramName in params) {\n queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);\n }\n if (!queryString) return url;\n url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);\n }\n return url;\n};\nvar fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {\n var resolver = function resolver(response) {\n if (!response.ok) return callback(response.statusText || 'Error', {\n status: response.status\n });\n response.text().then(function (data) {\n callback(null, {\n status: response.status,\n data: data\n });\n }).catch(callback);\n };\n if (altFetch) {\n var altResponse = altFetch(url, fetchOptions);\n if (altResponse instanceof Promise) {\n altResponse.then(resolver).catch(callback);\n return;\n }\n }\n if (typeof fetch === 'function') {\n fetch(url, fetchOptions).then(resolver).catch(callback);\n } else {\n fetchApi(url, fetchOptions).then(resolver).catch(callback);\n }\n};\nvar omitFetchOptions = false;\nvar requestWithFetch = function requestWithFetch(options, url, payload, callback) {\n if (options.queryStringParams) {\n url = addQueryString(url, options.queryStringParams);\n }\n var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);\n if (typeof window === 'undefined' && typeof global !== 'undefined' && typeof global.process !== 'undefined' && global.process.versions && global.process.versions.node) {\n headers['User-Agent'] = \"i18next-http-backend (node/\".concat(global.process.version, \"; \").concat(global.process.platform, \" \").concat(global.process.arch, \")\");\n }\n if (payload) headers['Content-Type'] = 'application/json';\n var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;\n var fetchOptions = _objectSpread({\n method: payload ? 'POST' : 'GET',\n body: payload ? options.stringify(payload) : undefined,\n headers: headers\n }, omitFetchOptions ? {} : reqOptions);\n var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;\n try {\n fetchIt(url, fetchOptions, callback, altFetch);\n } catch (e) {\n if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {\n return callback(e);\n }\n try {\n Object.keys(reqOptions).forEach(function (opt) {\n delete fetchOptions[opt];\n });\n fetchIt(url, fetchOptions, callback, altFetch);\n omitFetchOptions = true;\n } catch (err) {\n callback(err);\n }\n }\n};\nvar requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {\n if (payload && _typeof(payload) === 'object') {\n payload = addQueryString('', payload).slice(1);\n }\n if (options.queryStringParams) {\n url = addQueryString(url, options.queryStringParams);\n }\n try {\n var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');\n x.open(payload ? 'POST' : 'GET', url, 1);\n if (!options.crossDomain) {\n x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n x.withCredentials = !!options.withCredentials;\n if (payload) {\n x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n if (x.overrideMimeType) {\n x.overrideMimeType('application/json');\n }\n var h = options.customHeaders;\n h = typeof h === 'function' ? h() : h;\n if (h) {\n for (var i in h) {\n x.setRequestHeader(i, h[i]);\n }\n }\n x.onreadystatechange = function () {\n x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {\n status: x.status,\n data: x.responseText\n });\n };\n x.send(payload);\n } catch (e) {\n console && console.log(e);\n }\n};\nvar request = function request(options, url, payload, callback) {\n if (typeof payload === 'function') {\n callback = payload;\n payload = undefined;\n }\n callback = callback || function () {};\n if (fetchApi && url.indexOf('file:') !== 0) {\n return requestWithFetch(options, url, payload, callback);\n }\n if (hasXMLHttpRequest() || typeof ActiveXObject === 'function') {\n return requestWithXmlHttpRequest(options, url, payload, callback);\n }\n callback(new Error('No fetch and no xhr implementation found!'));\n};\nexport default request;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { makePromise } from './utils.js';\nimport request from './request.js';\nvar getDefaults = function getDefaults() {\n return {\n loadPath: '/locales/{{lng}}/{{ns}}.json',\n addPath: '/locales/add/{{lng}}/{{ns}}',\n parse: function parse(data) {\n return JSON.parse(data);\n },\n stringify: JSON.stringify,\n parsePayload: function parsePayload(namespace, key, fallbackValue) {\n return _defineProperty({}, key, fallbackValue || '');\n },\n parseLoadPayload: function parseLoadPayload(languages, namespaces) {\n return undefined;\n },\n request: request,\n reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,\n customHeaders: {},\n queryStringParams: {},\n crossDomain: false,\n withCredentials: false,\n overrideMimeType: false,\n requestOptions: {\n mode: 'cors',\n credentials: 'same-origin',\n cache: 'default'\n }\n };\n};\nvar Backend = function () {\n function Backend(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n _classCallCheck(this, Backend);\n this.services = services;\n this.options = options;\n this.allOptions = allOptions;\n this.type = 'backend';\n this.init(services, options, allOptions);\n }\n return _createClass(Backend, [{\n key: \"init\",\n value: function init(services) {\n var _this = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);\n this.allOptions = allOptions;\n if (this.services && this.options.reloadInterval) {\n var timer = setInterval(function () {\n return _this.reload();\n }, this.options.reloadInterval);\n if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();\n }\n }\n }, {\n key: \"readMulti\",\n value: function readMulti(languages, namespaces, callback) {\n this._readAny(languages, languages, namespaces, namespaces, callback);\n }\n }, {\n key: \"read\",\n value: function read(language, namespace, callback) {\n this._readAny([language], language, [namespace], namespace, callback);\n }\n }, {\n key: \"_readAny\",\n value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {\n var _this2 = this;\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === 'function') {\n loadPath = this.options.loadPath(languages, namespaces);\n }\n loadPath = makePromise(loadPath);\n loadPath.then(function (resolvedLoadPath) {\n if (!resolvedLoadPath) return callback(null, {});\n var url = _this2.services.interpolator.interpolate(resolvedLoadPath, {\n lng: languages.join('+'),\n ns: namespaces.join('+')\n });\n _this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);\n });\n }\n }, {\n key: \"loadUrl\",\n value: function loadUrl(url, callback, languages, namespaces) {\n var _this3 = this;\n var lng = typeof languages === 'string' ? [languages] : languages;\n var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;\n var payload = this.options.parseLoadPayload(lng, ns);\n this.options.request(this.options, url, payload, function (err, res) {\n if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + url + '; status code: ' + res.status, true);\n if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + url + '; status code: ' + res.status, false);\n if (!res && err && err.message) {\n var errorMessage = err.message.toLowerCase();\n var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {\n return errorMessage.indexOf(term) > -1;\n });\n if (isNetworkError) {\n return callback('failed loading ' + url + ': ' + err.message, true);\n }\n }\n if (err) return callback(err, false);\n var ret, parseErr;\n try {\n if (typeof res.data === 'string') {\n ret = _this3.options.parse(res.data, languages, namespaces);\n } else {\n ret = res.data;\n }\n } catch (e) {\n parseErr = 'failed parsing ' + url + ' to json';\n }\n if (parseErr) return callback(parseErr, false);\n callback(null, ret);\n });\n }\n }, {\n key: \"create\",\n value: function create(languages, namespace, key, fallbackValue, callback) {\n var _this4 = this;\n if (!this.options.addPath) return;\n if (typeof languages === 'string') languages = [languages];\n var payload = this.options.parsePayload(namespace, key, fallbackValue);\n var finished = 0;\n var dataArray = [];\n var resArray = [];\n languages.forEach(function (lng) {\n var addPath = _this4.options.addPath;\n if (typeof _this4.options.addPath === 'function') {\n addPath = _this4.options.addPath(lng, namespace);\n }\n var url = _this4.services.interpolator.interpolate(addPath, {\n lng: lng,\n ns: namespace\n });\n _this4.options.request(_this4.options, url, payload, function (data, res) {\n finished += 1;\n dataArray.push(data);\n resArray.push(res);\n if (finished === languages.length) {\n if (typeof callback === 'function') callback(dataArray, resArray);\n }\n });\n });\n }\n }, {\n key: \"reload\",\n value: function reload() {\n var _this5 = this;\n var _this$services = this.services,\n backendConnector = _this$services.backendConnector,\n languageUtils = _this$services.languageUtils,\n logger = _this$services.logger;\n var currentLanguage = backendConnector.language;\n if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;\n var toLoad = [];\n var append = function append(lng) {\n var lngs = languageUtils.toResolveHierarchy(lng);\n lngs.forEach(function (l) {\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n append(currentLanguage);\n if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {\n return append(l);\n });\n toLoad.forEach(function (lng) {\n _this5.allOptions.ns.forEach(function (ns) {\n backendConnector.read(lng, ns, 'read', null, null, function (err, data) {\n if (err) logger.warn(\"loading namespace \".concat(ns, \" for language \").concat(lng, \" failed\"), err);\n if (!err && data) logger.log(\"loaded namespace \".concat(ns, \" for language \").concat(lng), data);\n backendConnector.loaded(\"\".concat(lng, \"|\").concat(ns), err, data);\n });\n });\n });\n }\n }]);\n}();\nBackend.type = 'backend';\nexport default Backend;","const {\n slice,\n forEach\n} = [];\nfunction defaults(obj) {\n forEach.call(slice.call(arguments, 1), source => {\n if (source) {\n for (const prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\nfunction hasXSS(input) {\n if (typeof input !== 'string') return false;\n\n // Common XSS attack patterns\n const xssPatterns = [/<\\s*script.*?>/i, /<\\s*\\/\\s*script\\s*>/i, /<\\s*img.*?on\\w+\\s*=/i, /<\\s*\\w+\\s*on\\w+\\s*=.*?>/i, /javascript\\s*:/i, /vbscript\\s*:/i, /expression\\s*\\(/i, /eval\\s*\\(/i, /alert\\s*\\(/i, /document\\.cookie/i, /document\\.write\\s*\\(/i, /window\\.location/i, /innerHTML/i];\n return xssPatterns.some(pattern => pattern.test(input));\n}\n\n// eslint-disable-next-line no-control-regex\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\nconst serializeCookie = function (name, val) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n path: '/'\n };\n const opt = options;\n const value = encodeURIComponent(val);\n let str = `${name}=${value}`;\n if (opt.maxAge > 0) {\n const maxAge = opt.maxAge - 0;\n if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += `; Max-Age=${Math.floor(maxAge)}`;\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += `; Domain=${opt.domain}`;\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += `; Path=${opt.path}`;\n }\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n str += `; Expires=${opt.expires.toUTCString()}`;\n }\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n if (opt.sameSite) {\n const sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n if (opt.partitioned) str += '; Partitioned';\n return str;\n};\nconst cookie = {\n create(name, value, minutes, domain) {\n let cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, value, cookieOptions);\n },\n read(name) {\n const nameEQ = `${name}=`;\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n },\n remove(name, domain) {\n this.create(name, '', -1, domain);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n // Deconstruct the options object and extract the lookupCookie property\n lookup(_ref) {\n let {\n lookupCookie\n } = _ref;\n if (lookupCookie && typeof document !== 'undefined') {\n return cookie.read(lookupCookie) || undefined;\n }\n return undefined;\n },\n // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupCookie,\n cookieMinutes,\n cookieDomain,\n cookieOptions\n } = _ref2;\n if (lookupCookie && typeof document !== 'undefined') {\n cookie.create(lookupCookie, lng, cookieMinutes, cookieDomain, cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n // Deconstruct the options object and extract the lookupQuerystring property\n lookup(_ref) {\n let {\n lookupQuerystring\n } = _ref;\n let found;\n if (typeof window !== 'undefined') {\n let {\n search\n } = window.location;\n if (!window.location.search && window.location.hash?.indexOf('?') > -1) {\n search = window.location.hash.substring(window.location.hash.indexOf('?'));\n }\n const query = search.substring(1);\n const params = query.split('&');\n for (let i = 0; i < params.length; i++) {\n const pos = params[i].indexOf('=');\n if (pos > 0) {\n const key = params[i].substring(0, pos);\n if (key === lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n return found;\n }\n};\n\nvar hash = {\n name: 'hash',\n // Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property\n lookup(_ref) {\n let {\n lookupHash,\n lookupFromHashIndex\n } = _ref;\n let found;\n if (typeof window !== 'undefined') {\n const {\n hash\n } = window.location;\n if (hash && hash.length > 2) {\n const query = hash.substring(1);\n if (lookupHash) {\n const params = query.split('&');\n for (let i = 0; i < params.length; i++) {\n const pos = params[i].indexOf('=');\n if (pos > 0) {\n const key = params[i].substring(0, pos);\n if (key === lookupHash) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n if (found) return found;\n if (!found && lookupFromHashIndex > -1) {\n const language = hash.match(/\\/([a-zA-Z-]*)/g);\n if (!Array.isArray(language)) return undefined;\n const index = typeof lookupFromHashIndex === 'number' ? lookupFromHashIndex : 0;\n return language[index]?.replace('/', '');\n }\n }\n }\n return found;\n }\n};\n\nlet hasLocalStorageSupport = null;\nconst localStorageAvailable = () => {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n try {\n hasLocalStorageSupport = typeof window !== 'undefined' && window.localStorage !== null;\n if (!hasLocalStorageSupport) {\n return false;\n }\n const testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n return hasLocalStorageSupport;\n};\nvar localStorage = {\n name: 'localStorage',\n // Deconstruct the options object and extract the lookupLocalStorage property\n lookup(_ref) {\n let {\n lookupLocalStorage\n } = _ref;\n if (lookupLocalStorage && localStorageAvailable()) {\n return window.localStorage.getItem(lookupLocalStorage) || undefined; // Undefined ensures type consistency with the previous version of this function\n }\n return undefined;\n },\n // Deconstruct the options object and extract the lookupLocalStorage property\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupLocalStorage\n } = _ref2;\n if (lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(lookupLocalStorage, lng);\n }\n }\n};\n\nlet hasSessionStorageSupport = null;\nconst sessionStorageAvailable = () => {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n try {\n hasSessionStorageSupport = typeof window !== 'undefined' && window.sessionStorage !== null;\n if (!hasSessionStorageSupport) {\n return false;\n }\n const testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n return hasSessionStorageSupport;\n};\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup(_ref) {\n let {\n lookupSessionStorage\n } = _ref;\n if (lookupSessionStorage && sessionStorageAvailable()) {\n return window.sessionStorage.getItem(lookupSessionStorage) || undefined;\n }\n return undefined;\n },\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupSessionStorage\n } = _ref2;\n if (lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup(options) {\n const found = [];\n if (typeof navigator !== 'undefined') {\n const {\n languages,\n userLanguage,\n language\n } = navigator;\n if (languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (let i = 0; i < languages.length; i++) {\n found.push(languages[i]);\n }\n }\n if (userLanguage) {\n found.push(userLanguage);\n }\n if (language) {\n found.push(language);\n }\n }\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n // Deconstruct the options object and extract the htmlTag property\n lookup(_ref) {\n let {\n htmlTag\n } = _ref;\n let found;\n const internalHtmlTag = htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n if (internalHtmlTag && typeof internalHtmlTag.getAttribute === 'function') {\n found = internalHtmlTag.getAttribute('lang');\n }\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n // Deconstruct the options object and extract the lookupFromPathIndex property\n lookup(_ref) {\n let {\n lookupFromPathIndex\n } = _ref;\n if (typeof window === 'undefined') return undefined;\n const language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n if (!Array.isArray(language)) return undefined;\n const index = typeof lookupFromPathIndex === 'number' ? lookupFromPathIndex : 0;\n return language[index]?.replace('/', '');\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup(_ref) {\n let {\n lookupFromSubdomainIndex\n } = _ref;\n // If given get the subdomain index else 1\n const internalLookupFromSubdomainIndex = typeof lookupFromSubdomainIndex === 'number' ? lookupFromSubdomainIndex + 1 : 1;\n // get all matches if window.location. is existing\n // first item of match is the match itself and the second is the first group match which should be the first subdomain match\n // is the hostname no public domain get the or option of localhost\n const language = typeof window !== 'undefined' && window.location?.hostname?.match(/^(\\w{2,5})\\.(([a-z0-9-]{1,63}\\.[a-z]{2,6})|localhost)/i);\n\n // if there is no match (null) return undefined\n if (!language) return undefined;\n // return the given group match\n return language[internalLookupFromSubdomainIndex];\n }\n};\n\n// some environments, throws when accessing document.cookie\nlet canCookies = false;\ntry {\n // eslint-disable-next-line no-unused-expressions\n document.cookie;\n canCookies = true;\n // eslint-disable-next-line no-empty\n} catch (e) {}\nconst order = ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'];\nif (!canCookies) order.splice(1, 1);\nconst getDefaults = () => ({\n order,\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'],\n // cookieMinutes: 10,\n // cookieDomain: 'myDomain'\n\n convertDetectedLanguage: l => l\n});\nclass Browser {\n constructor(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n init() {\n let services = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n languageUtils: {}\n };\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults());\n if (typeof this.options.convertDetectedLanguage === 'string' && this.options.convertDetectedLanguage.indexOf('15897') > -1) {\n this.options.convertDetectedLanguage = l => l.replace('-', '_');\n }\n\n // backwards compatibility\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n this.addDetector(hash);\n }\n addDetector(detector) {\n this.detectors[detector.name] = detector;\n return this;\n }\n detect() {\n let detectionOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.order;\n let detected = [];\n detectionOrder.forEach(detectorName => {\n if (this.detectors[detectorName]) {\n let lookup = this.detectors[detectorName].lookup(this.options);\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n detected = detected.filter(d => d !== undefined && d !== null && !hasXSS(d)).map(d => this.options.convertDetectedLanguage(d));\n if (this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n cacheUserLanguage(lng) {\n let caches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(cacheName => {\n if (this.detectors[cacheName]) this.detectors[cacheName].cacheUserLanguage(lng, this.options);\n });\n }\n}\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n","/**\n * Default i18n configuration for Sudobility apps\n *\n * Creates a pre-configured i18next instance with:\n * - HTTP backend for loading translations from /locales/\n * - Language detection from URL path, localStorage, navigator\n * - React integration\n */\n\nimport i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport Backend from 'i18next-http-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\n\n// Default supported languages\nconst DEFAULT_SUPPORTED_LANGUAGES = ['en'];\n\n// Default namespaces\nconst DEFAULT_NAMESPACES = [\n 'common',\n 'home',\n 'pricing',\n 'docs',\n 'dashboard',\n 'auth',\n 'privacy',\n 'terms',\n 'settings',\n];\n\n/**\n * Detect language from URL path first, then localStorage\n */\nfunction detectLanguageFromPath(supportedLanguages: string[]): string {\n if (typeof window === 'undefined') {\n return 'en';\n }\n\n // Check URL path first\n const pathLang = window.location.pathname.split('/')[1];\n if (pathLang && supportedLanguages.includes(pathLang)) {\n return pathLang;\n }\n\n // Fall back to localStorage\n try {\n const stored = localStorage.getItem('language');\n if (stored && supportedLanguages.includes(stored)) {\n return stored;\n }\n } catch {\n // localStorage may throw in Safari private browsing\n }\n\n return 'en';\n}\n\nexport interface I18nConfig {\n /**\n * Supported language codes.\n * Defaults to [\"en\"].\n */\n supportedLanguages?: string[];\n\n /**\n * Translation namespaces to load.\n * Defaults to common app namespaces.\n */\n namespaces?: string[];\n\n /**\n * Default namespace.\n * Defaults to \"common\".\n */\n defaultNamespace?: string;\n\n /**\n * Path pattern for loading translations.\n * Defaults to \"/locales/{{lng}}/{{ns}}.json\".\n */\n loadPath?: string;\n\n /**\n * Enable debug logging.\n * Defaults to false.\n */\n debug?: boolean;\n}\n\nlet initialized = false;\n\n/**\n * Initialize the default i18n instance.\n * Safe to call multiple times - only initializes once.\n */\nexport function initializeI18n(config: I18nConfig = {}): typeof i18n {\n if (initialized) {\n return i18n;\n }\n initialized = true;\n\n const {\n supportedLanguages = DEFAULT_SUPPORTED_LANGUAGES,\n namespaces = DEFAULT_NAMESPACES,\n defaultNamespace = 'common',\n loadPath = '/locales/{{lng}}/{{ns}}.json',\n debug = false,\n } = config;\n\n i18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n lng: detectLanguageFromPath(supportedLanguages),\n fallbackLng: {\n zh: ['zh', 'en'],\n 'zh-hant': ['zh-hant', 'zh', 'en'],\n default: ['en'],\n },\n initImmediate: false,\n supportedLngs: supportedLanguages,\n debug,\n nonExplicitSupportedLngs: true,\n\n interpolation: {\n escapeValue: false,\n },\n\n backend: {\n loadPath,\n },\n\n detection: {\n order: ['path', 'localStorage', 'navigator'],\n caches: ['localStorage'],\n lookupLocalStorage: 'language',\n lookupFromPathIndex: 0,\n },\n\n load: 'languageOnly',\n preload: [],\n cleanCode: false,\n lowerCaseLng: false,\n\n defaultNS: defaultNamespace,\n ns: namespaces,\n });\n\n return i18n;\n}\n\n/**\n * Get the i18n instance.\n * Initializes with defaults if not already initialized.\n */\nexport function getI18n(): typeof i18n {\n if (!initialized) {\n initializeI18n();\n }\n return i18n;\n}\n\nexport { i18n };\nexport default i18n;\n","/**\n * SudobilityApp - Base app wrapper for all Sudobility apps\n *\n * Provides common infrastructure with sensible defaults:\n * - HelmetProvider for SEO\n * - I18nextProvider for localization\n * - ThemeProvider for theming (built-in default)\n * - NetworkProvider for online/offline status (built-in default)\n * - QueryClientProvider for TanStack Query (built-in default)\n * - ToastProvider for notifications (built-in default)\n * - BrowserRouter for routing\n * - InfoBanner for system notifications (built-in default)\n *\n * All providers have sensible defaults - only pass props to override.\n */\nimport {\n Suspense,\n ComponentType,\n ReactNode,\n useMemo,\n useRef,\n useEffect,\n} from 'react';\nimport { BrowserRouter } from 'react-router-dom';\nimport {\n QueryClient,\n QueryClientProvider,\n type QueryClient as QueryClientType,\n} from '@tanstack/react-query';\nimport { HelmetProvider } from 'react-helmet-async';\nimport { I18nextProvider } from 'react-i18next';\nimport type { i18n } from 'i18next';\nimport { useLocation } from 'react-router-dom';\nimport { NetworkProvider } from '@sudobility/devops-components';\nimport { getNetworkService } from '@sudobility/di';\nimport { getFirebaseService, InfoBanner } from '@sudobility/di_web';\nimport {\n ThemeProvider as SharedThemeProvider,\n Theme,\n FontSize,\n} from '@sudobility/components';\nimport {\n ToastProvider as SharedToastProvider,\n ToastContainer as SharedToastContainer,\n useToast,\n} from '@sudobility/components/ui/toast';\nimport { getI18n } from '../../i18n';\n\n/**\n * QueryClient type that's compatible across different package versions.\n * Uses structural typing to avoid cross-package type conflicts when using bun link.\n */\ntype QueryClientLike = {\n getDefaultOptions: () => unknown;\n getQueryCache: () => unknown;\n getMutationCache: () => unknown;\n};\n\n/**\n * i18n type that's compatible across different package versions.\n * Uses structural typing to avoid cross-package type conflicts when using bun link.\n */\ntype I18nLike = {\n language: string;\n languages: readonly string[];\n\n t: (...args: any[]) => any;\n};\n\nexport interface SudobilityAppProps {\n /** App routes and content */\n children: ReactNode;\n\n /**\n * i18next instance for localization (optional).\n * Defaults to built-in i18n that loads translations from /locales/.\n * Pass your own if you need custom configuration.\n */\n i18n?: I18nLike;\n\n /**\n * TanStack Query client instance (optional).\n * Defaults to a QueryClient with sensible settings.\n */\n queryClient?: QueryClientLike;\n\n /**\n * Custom ThemeProvider component (optional).\n * Defaults to SharedThemeProvider from @sudobility/components.\n */\n ThemeProvider?: ComponentType<{ children: ReactNode }>;\n\n /**\n * Custom ToastProvider component (optional).\n * Defaults to ToastProvider from @sudobility/components.\n */\n ToastProvider?: ComponentType<{ children: ReactNode }>;\n\n /**\n * Toast container component rendered after routes (optional).\n * Defaults to a built-in container that renders toasts from context at bottom-right.\n */\n ToastContainer?: ComponentType;\n\n /**\n * Whether to show the InfoBanner for notifications/errors.\n * Defaults to true. Set to false to disable.\n */\n showInfoBanner?: boolean;\n\n /** Custom loading fallback for Suspense (optional) */\n LoadingFallback?: ComponentType;\n\n /**\n * Custom NetworkProvider component (optional).\n * By default, uses the built-in NetworkProvider with getNetworkService().\n * Set to false to disable network status tracking entirely.\n */\n NetworkProvider?: ComponentType<{ children: ReactNode }> | false;\n\n /**\n * Page tracker component for analytics (optional).\n * By default, uses Firebase Analytics to track page_view events.\n * Pass a custom component to override, or false to disable.\n */\n PageTracker?: ComponentType | false;\n\n /**\n * Additional providers to wrap around the router content.\n * These are rendered inside ToastProvider but outside BrowserRouter.\n * Use this for app-specific providers like ApiProvider, SettingsProvider, etc.\n */\n AppProviders?: ComponentType<{ children: ReactNode }>;\n\n /**\n * Storage key prefix for theme persistence (optional).\n * Defaults to \"sudobility\". Used for localStorage keys (e.g., \"sudobility-theme\").\n * Since localStorage is origin-scoped, apps on different domains don't need\n * different prefixes. Only override if running multiple app instances on the\n * same origin or if you want app-specific debugging visibility.\n */\n storageKeyPrefix?: string;\n\n /**\n * Custom router wrapper component (optional).\n * Defaults to BrowserRouter. Pass a fragment wrapper `({ children }) => <>{children}</>`\n * to skip the router entirely (useful when nesting inside an existing router).\n */\n RouterWrapper?: ComponentType<{ children: ReactNode }>;\n}\n\n/**\n * Default loading fallback component\n */\nfunction DefaultLoadingFallback() {\n return (\n <div className='min-h-screen flex items-center justify-center bg-theme-bg-primary'>\n <div className='animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600' />\n </div>\n );\n}\n\n/**\n * Default page tracker using Firebase Analytics.\n * Tracks page_view events on route changes.\n */\nfunction DefaultPageTracker(): null {\n const location = useLocation();\n const previousPathRef = useRef<string | null>(null);\n\n useEffect(() => {\n const currentPath = location.pathname;\n\n // Skip if same path\n if (previousPathRef.current === currentPath) {\n return;\n }\n\n previousPathRef.current = currentPath;\n\n // Track page view via Firebase Analytics\n try {\n const firebaseService = getFirebaseService();\n if (firebaseService?.analytics?.isSupported()) {\n firebaseService.analytics.logEvent('page_view', {\n page_path: currentPath,\n page_location: window.location.href,\n });\n }\n } catch {\n // Firebase not configured - silently skip tracking\n }\n }, [location.pathname]);\n\n return null;\n}\n\n/**\n * Default network provider that uses getNetworkService()\n */\nfunction DefaultNetworkProvider({ children }: { children: ReactNode }) {\n const networkService = useMemo(() => getNetworkService(), []);\n return (\n <NetworkProvider networkService={networkService}>\n {children}\n </NetworkProvider>\n );\n}\n\n/**\n * Create default QueryClient with sensible settings\n */\nfunction createDefaultQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000, // 5 minutes\n gcTime: 10 * 60 * 1000, // 10 minutes\n // Smart retry: don't retry on 4xx client errors, retry up to 3 times otherwise\n retry: (failureCount, error: unknown) => {\n const statusCode = (error as { statusCode?: number })?.statusCode;\n if (statusCode && statusCode >= 400 && statusCode < 500) {\n return false;\n }\n return failureCount < 3;\n },\n // Exponential backoff: 1s, 2s, 4s... up to 30s\n retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000),\n refetchOnWindowFocus: true,\n },\n mutations: {\n retry: false,\n },\n },\n });\n}\n\n// Singleton default QueryClient\nlet defaultQueryClient: QueryClient | null = null;\nfunction getDefaultQueryClient(): QueryClient {\n if (!defaultQueryClient) {\n defaultQueryClient = createDefaultQueryClient();\n }\n return defaultQueryClient;\n}\n\n/**\n * Default theme provider using SharedThemeProvider from @sudobility/components\n */\nfunction createDefaultThemeProvider(storageKeyPrefix: string) {\n return function DefaultThemeProvider({ children }: { children: ReactNode }) {\n return (\n <SharedThemeProvider\n themeStorageKey={`${storageKeyPrefix}-theme`}\n fontSizeStorageKey={`${storageKeyPrefix}-font-size`}\n defaultTheme={Theme.LIGHT}\n defaultFontSize={FontSize.MEDIUM}\n >\n {children}\n </SharedThemeProvider>\n );\n };\n}\n\n/**\n * Default toast provider using SharedToastProvider from @sudobility/components\n */\nfunction DefaultToastProvider({ children }: { children: ReactNode }) {\n return <SharedToastProvider>{children}</SharedToastProvider>;\n}\n\n/**\n * Default toast container that renders toasts from context.\n * Wraps SharedToastContainer with useToast consumer.\n */\nfunction DefaultToastContainer() {\n const { toasts, removeToast } = useToast();\n\n if (toasts.length === 0) return null;\n\n return (\n <SharedToastContainer\n toasts={toasts}\n onDismiss={removeToast}\n position='bottom-right'\n />\n );\n}\n\n/**\n * SudobilityApp - Base app wrapper for all Sudobility apps\n *\n * @example\n * ```tsx\n * // Minimal usage - only i18n is required\n * import { SudobilityApp } from '@sudobility/building_blocks';\n * import i18n from './i18n';\n *\n * function App() {\n * return (\n * <SudobilityApp i18n={i18n}>\n * <Routes>\n * <Route path=\"/\" element={<HomePage />} />\n * </Routes>\n * </SudobilityApp>\n * );\n * }\n *\n * // With custom providers\n * function App() {\n * return (\n * <SudobilityApp\n * i18n={i18n}\n * ThemeProvider={MyCustomThemeProvider}\n * AppProviders={ApiProvider}\n * storageKeyPrefix=\"myapp\"\n * >\n * <Routes>\n * <Route path=\"/\" element={<HomePage />} />\n * </Routes>\n * </SudobilityApp>\n * );\n * }\n * ```\n */\nexport function SudobilityApp({\n children,\n i18n: i18nInstance,\n queryClient,\n ThemeProvider: ThemeProviderProp,\n ToastProvider: ToastProviderProp,\n ToastContainer,\n showInfoBanner = true,\n LoadingFallback = DefaultLoadingFallback,\n NetworkProvider: NetworkProviderProp,\n PageTracker: PageTrackerProp,\n AppProviders,\n storageKeyPrefix = 'sudobility',\n RouterWrapper,\n}: SudobilityAppProps) {\n // Get i18n instance (custom or default)\n const i18nToUse = i18nInstance ?? getI18n();\n\n // Determine which providers to use (custom or default)\n const NetworkProviderComponent =\n NetworkProviderProp === false\n ? null\n : (NetworkProviderProp ?? DefaultNetworkProvider);\n\n const PageTrackerComponent =\n PageTrackerProp === false ? null : (PageTrackerProp ?? DefaultPageTracker);\n\n const ThemeProviderComponent =\n ThemeProviderProp ?? createDefaultThemeProvider(storageKeyPrefix);\n\n const ToastProviderComponent = ToastProviderProp ?? DefaultToastProvider;\n\n const ToastContainerComponent = ToastContainer ?? DefaultToastContainer;\n\n const queryClientInstance = queryClient ?? getDefaultQueryClient();\n\n // Use custom RouterWrapper or default BrowserRouter\n const RouterWrapperComponent = RouterWrapper ?? BrowserRouter;\n\n // Build the router content\n let routerContent: ReactNode = (\n <>\n {PageTrackerComponent && <PageTrackerComponent />}\n <Suspense fallback={<LoadingFallback />}>{children}</Suspense>\n <ToastContainerComponent />\n {showInfoBanner && <InfoBanner />}\n </>\n );\n\n // Wrap with Router\n routerContent = (\n <RouterWrapperComponent>{routerContent}</RouterWrapperComponent>\n );\n\n // Wrap with AppProviders if provided\n if (AppProviders) {\n routerContent = <AppProviders>{routerContent}</AppProviders>;\n }\n\n // Wrap with ToastProvider\n routerContent = (\n <ToastProviderComponent>{routerContent}</ToastProviderComponent>\n );\n\n // Wrap with QueryClientProvider\n routerContent = (\n <QueryClientProvider client={queryClientInstance as QueryClientType}>\n {routerContent}\n </QueryClientProvider>\n );\n\n // Wrap with NetworkProvider (uses default if not explicitly disabled)\n if (NetworkProviderComponent) {\n routerContent = (\n <NetworkProviderComponent>{routerContent}</NetworkProviderComponent>\n );\n }\n\n // Wrap with ThemeProvider\n routerContent = (\n <ThemeProviderComponent>{routerContent}</ThemeProviderComponent>\n );\n\n // Wrap with I18nextProvider\n routerContent = (\n <I18nextProvider i18n={i18nToUse as i18n}>{routerContent}</I18nextProvider>\n );\n\n // Wrap with HelmetProvider\n return <HelmetProvider>{routerContent}</HelmetProvider>;\n}\n\nexport default SudobilityApp;\n","/**\n * Safe Subscription Context\n *\n * Provides a context that can be safely used even when subscription\n * provider isn't loaded yet. Returns stub values for unauthenticated users.\n */\n\nimport { createContext, useContext } from 'react';\nimport type { SubscriptionContextValue } from '@sudobility/subscription-components';\n\n/**\n * Stub subscription value for unauthenticated users or when\n * subscription provider hasn't loaded yet.\n */\nexport const STUB_SUBSCRIPTION_VALUE: SubscriptionContextValue = {\n products: [],\n currentSubscription: null,\n isLoading: false,\n error: null,\n initialize: () => Promise.resolve(),\n purchase: () => Promise.resolve(false),\n restore: () => Promise.resolve(false),\n refresh: () => Promise.resolve(),\n clearError: () => {},\n};\n\n/**\n * Context that provides subscription state with safe defaults.\n */\nexport const SafeSubscriptionContext = createContext<SubscriptionContextValue>(\n STUB_SUBSCRIPTION_VALUE\n);\n\n/**\n * Hook to safely access subscription context.\n * Returns stub values if provider isn't available.\n */\nexport function useSafeSubscription(): SubscriptionContextValue {\n return useContext(SafeSubscriptionContext);\n}\n"],"names":["index","useLayoutEffect","to","size","createSlot","createSlotClone","isSlottable","getElementRef","mergeProps","SLOTTABLE_IDENTIFIER","NODES","Primitive","Slot","Node","BUBBLE_INPUT_NAME","Root","clamp","min","max","createCollectionScope","React","useCollection","useCallbackRef","count","EVENT_OPTIONS","focusFirst","computePosition","platform","arrow","offset","flip","sides","side","placement","overflow","hide","shift","x","y","limitShift","getComputedStyle","offset$1","shift$1","flip$1","size$1","hide$1","arrow$1","limitShift$1","noop","data","NAME","Arrow","CONTENT_NAME","floatingUIarrow","ARROW_NAME","ArrowPrimitive.Root","Content","PORTAL_NAME","Portal","ReactDOM","__assign","ar","defaults","cbs","SideCar","Style","Collection","TRIGGER_NAME","PopperPrimitive.Anchor","PortalPrimitive","RemoveScroll","PopperPrimitive.Content","GROUP_NAME","ITEM_NAME","PopperPrimitive.Arrow","wrapArray","Trigger","Label","Item","ForwardRef","React2","RovingFocusGroup.Root","RovingFocusGroup.Item","wa","va","Q","ot","M","_","ge","a","R","p","st","Z","Br","$a","G.Trigger","G.Icon","Pt","G.ScrollUpButton","Va","G.ScrollDownButton","G.Portal","G.Content","G.Viewport","G.Label","G.Item","G.ItemText","G.ItemIndicator","Ha","G.Separator","Fr","qa","Ze","Ka","Wr","$r","Vr","Ye","U","H","_typeof","o","ownKeys","r","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","addQueryString","fetchIt","resolver","requestWithFetch","requestWithXmlHttpRequest","request","getDefaults","parse","Backend","append","hash","localStorage","htmlTag","LanguageDetector","SharedThemeProvider","SharedToastProvider","useToast","SharedToastContainer"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,SAAS,qBAAqB,sBAAsB,iBAAiB,EAAE,2BAA2B,KAAI,IAAK,IAAI;AAC7G,SAAO,SAAS,YAAY,OAAO;AACjC,iEAAuB;AACvB,QAAI,6BAA6B,SAA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