{"version":3,"file":"NavLink-C1ABbG6m.js","sources":["../../../node_modules/@mantine/core/esm/components/Collapse/use-collapse.mjs","../../../node_modules/@mantine/core/esm/components/Collapse/Collapse.mjs","../../../node_modules/@mantine/core/esm/components/NavLink/NavLink.module.css.mjs","../../../node_modules/@mantine/core/esm/components/NavLink/NavLink.mjs"],"sourcesContent":["'use client';\nimport { useRef, useState } from 'react';\nimport { flushSync } from 'react-dom';\nimport { useDidUpdate, mergeRefs } from '@mantine/hooks';\n\nfunction getAutoHeightDuration(height) {\n if (!height || typeof height === \"string\") {\n return 0;\n }\n const constant = height / 36;\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nfunction getElementHeight(el) {\n return el?.current ? el.current.scrollHeight : \"auto\";\n}\nconst raf = typeof window !== \"undefined\" && window.requestAnimationFrame;\nfunction useCollapse({\n transitionDuration,\n transitionTimingFunction = \"ease\",\n onTransitionEnd = () => {\n },\n opened\n}) {\n const el = useRef(null);\n const collapsedHeight = 0;\n const collapsedStyles = {\n display: \"none\",\n height: 0,\n overflow: \"hidden\"\n };\n const [styles, setStylesRaw] = useState(opened ? {} : collapsedStyles);\n const setStyles = (newStyles) => {\n flushSync(() => setStylesRaw(newStyles));\n };\n const mergeStyles = (newStyles) => {\n setStyles((oldStyles) => ({ ...oldStyles, ...newStyles }));\n };\n function getTransitionStyles(height) {\n const _duration = transitionDuration || getAutoHeightDuration(height);\n return {\n transition: `height ${_duration}ms ${transitionTimingFunction}, opacity ${_duration}ms ${transitionTimingFunction}`\n };\n }\n useDidUpdate(() => {\n if (typeof raf === \"function\") {\n if (opened) {\n raf(() => {\n mergeStyles({ willChange: \"height\", display: \"block\", overflow: \"hidden\" });\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), height });\n });\n });\n } else {\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), willChange: \"height\", height });\n raf(() => mergeStyles({ height: collapsedHeight, overflow: \"hidden\" }));\n });\n }\n }\n }, [opened]);\n const handleTransitionEnd = (e) => {\n if (e.target !== el.current || e.propertyName !== \"height\") {\n return;\n }\n if (opened) {\n const height = getElementHeight(el);\n if (height === styles.height) {\n setStyles({});\n } else {\n mergeStyles({ height });\n }\n onTransitionEnd();\n } else if (styles.height === collapsedHeight) {\n setStyles(collapsedStyles);\n onTransitionEnd();\n }\n };\n function getCollapseProps({ style = {}, refKey = \"ref\", ...rest } = {}) {\n const theirRef = rest[refKey];\n return {\n \"aria-hidden\": !opened,\n ...rest,\n [refKey]: mergeRefs(el, theirRef),\n onTransitionEnd: handleTransitionEnd,\n style: { boxSizing: \"border-box\", ...style, ...styles }\n };\n }\n return getCollapseProps;\n}\n\nexport { getElementHeight, useCollapse };\n//# sourceMappingURL=use-collapse.mjs.map\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { useReducedMotion } from '@mantine/hooks';\nimport 'react';\nimport 'clsx';\nimport '../../core/MantineProvider/Mantine.context.mjs';\nimport '../../core/MantineProvider/default-theme.mjs';\nimport '../../core/MantineProvider/MantineProvider.mjs';\nimport { useMantineTheme } from '../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.mjs';\nimport { useProps } from '../../core/MantineProvider/use-props/use-props.mjs';\nimport '../../core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs';\nimport { getStyleObject } from '../../core/Box/get-style-object/get-style-object.mjs';\nimport { Box } from '../../core/Box/Box.mjs';\nimport { factory } from '../../core/factory/factory.mjs';\nimport '../../core/DirectionProvider/DirectionProvider.mjs';\nimport { useCollapse } from './use-collapse.mjs';\n\nconst defaultProps = {\n transitionDuration: 200,\n transitionTimingFunction: \"ease\",\n animateOpacity: true\n};\nconst Collapse = factory((props, ref) => {\n const {\n children,\n in: opened,\n transitionDuration,\n transitionTimingFunction,\n style,\n onTransitionEnd,\n animateOpacity,\n ...others\n } = useProps(\"Collapse\", defaultProps, props);\n const theme = useMantineTheme();\n const shouldReduceMotion = useReducedMotion();\n const reduceMotion = theme.respectReducedMotion ? shouldReduceMotion : false;\n const duration = reduceMotion ? 0 : transitionDuration;\n const getCollapseProps = useCollapse({\n opened,\n transitionDuration: duration,\n transitionTimingFunction,\n onTransitionEnd\n });\n if (duration === 0) {\n return opened ? /* @__PURE__ */ jsx(Box, { ...others, children }) : null;\n }\n return /* @__PURE__ */ jsx(\n Box,\n {\n ...getCollapseProps({\n style: {\n opacity: opened || !animateOpacity ? 1 : 0,\n transition: animateOpacity ? `opacity ${duration}ms ${transitionTimingFunction}` : \"none\",\n ...getStyleObject(style, theme)\n },\n ref,\n ...others\n }),\n children\n }\n );\n});\nCollapse.displayName = \"@mantine/core/Collapse\";\n\nexport { Collapse };\n//# sourceMappingURL=Collapse.mjs.map\n","'use client';\nvar classes = {\"root\":\"m_f0824112\",\"description\":\"m_57492dcc\",\"section\":\"m_690090b5\",\"label\":\"m_1f6ac4c4\",\"body\":\"m_f07af9d2\",\"children\":\"m_e17b862f\",\"chevron\":\"m_1fd8a00b\"};\n\nexport { classes as default };\n//# sourceMappingURL=NavLink.module.css.mjs.map\n","'use client';\nimport { jsxs, Fragment, jsx } from 'react/jsx-runtime';\nimport { useUncontrolled } from '@mantine/hooks';\nimport 'react';\nimport { getSpacing } from '../../core/utils/get-size/get-size.mjs';\nimport { createVarsResolver } from '../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs';\nimport 'clsx';\nimport '../../core/MantineProvider/Mantine.context.mjs';\nimport '../../core/MantineProvider/default-theme.mjs';\nimport '../../core/MantineProvider/MantineProvider.mjs';\nimport '../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.mjs';\nimport { useProps } from '../../core/MantineProvider/use-props/use-props.mjs';\nimport '../../core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs';\nimport { useStyles } from '../../core/styles-api/use-styles/use-styles.mjs';\nimport { Box } from '../../core/Box/Box.mjs';\nimport { polymorphicFactory } from '../../core/factory/polymorphic-factory.mjs';\nimport '../../core/DirectionProvider/DirectionProvider.mjs';\nimport '../Accordion/Accordion.mjs';\nimport { AccordionChevron } from '../Accordion/AccordionChevron.mjs';\nimport '../Accordion/AccordionItem/AccordionItem.mjs';\nimport '../Accordion/AccordionPanel/AccordionPanel.mjs';\nimport '../Accordion/AccordionControl/AccordionControl.mjs';\nimport { Collapse } from '../Collapse/Collapse.mjs';\nimport { UnstyledButton } from '../UnstyledButton/UnstyledButton.mjs';\nimport classes from './NavLink.module.css.mjs';\n\nconst defaultProps = {};\nconst varsResolver = createVarsResolver(\n (theme, { variant, color, childrenOffset, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n variant: variant || \"light\",\n autoContrast\n });\n return {\n root: {\n \"--nl-bg\": color || variant ? colors.background : void 0,\n \"--nl-hover\": color || variant ? colors.hover : void 0,\n \"--nl-color\": color || variant ? colors.color : void 0\n },\n children: {\n \"--nl-offset\": getSpacing(childrenOffset)\n }\n };\n }\n);\nconst NavLink = polymorphicFactory((_props, ref) => {\n const props = useProps(\"NavLink\", defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n opened,\n defaultOpened,\n onChange,\n children,\n onClick,\n active,\n disabled,\n leftSection,\n rightSection,\n label,\n description,\n disableRightSectionRotation,\n noWrap,\n childrenOffset,\n onKeyDown,\n autoContrast,\n mod,\n ...others\n } = props;\n const getStyles = useStyles({\n name: \"NavLink\",\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver\n });\n const [_opened, setOpened] = useUncontrolled({\n value: opened,\n defaultValue: defaultOpened,\n finalValue: false,\n onChange\n });\n const withChildren = !!children;\n const handleClick = (event) => {\n onClick?.(event);\n if (withChildren) {\n event.preventDefault();\n setOpened(!_opened);\n }\n };\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsxs(\n UnstyledButton,\n {\n ...getStyles(\"root\"),\n component: \"a\",\n ref,\n onClick: handleClick,\n onKeyDown: (event) => {\n onKeyDown?.(event);\n if (event.nativeEvent.code === \"Space\" && withChildren) {\n event.preventDefault();\n setOpened(!_opened);\n }\n },\n unstyled,\n mod: [{ disabled, active, expanded: _opened }, mod],\n ...others,\n children: [\n leftSection && /* @__PURE__ */ jsx(Box, { component: \"span\", ...getStyles(\"section\"), mod: { position: \"left\" }, children: leftSection }),\n /* @__PURE__ */ jsxs(Box, { ...getStyles(\"body\"), mod: { \"no-wrap\": noWrap }, children: [\n /* @__PURE__ */ jsx(Box, { component: \"span\", ...getStyles(\"label\"), children: label }),\n /* @__PURE__ */ jsx(Box, { component: \"span\", mod: { active }, ...getStyles(\"description\"), children: description })\n ] }),\n (withChildren || rightSection) && /* @__PURE__ */ jsx(\n Box,\n {\n ...getStyles(\"section\"),\n component: \"span\",\n mod: { rotate: _opened && !disableRightSectionRotation, position: \"right\" },\n children: withChildren ? rightSection || /* @__PURE__ */ jsx(AccordionChevron, { ...getStyles(\"chevron\") }) : rightSection\n }\n )\n ]\n }\n ),\n withChildren && /* @__PURE__ */ jsx(Collapse, { in: _opened, ...getStyles(\"collapse\"), children: /* @__PURE__ */ jsx(\"div\", { ...getStyles(\"children\"), children }) })\n ] });\n});\nNavLink.classes = classes;\nNavLink.displayName = \"@mantine/core/NavLink\";\n\nexport { NavLink };\n//# sourceMappingURL=NavLink.mjs.map\n"],"names":["getAutoHeightDuration","height","constant","getElementHeight","el","raf","useCollapse","transitionDuration","transitionTimingFunction","onTransitionEnd","opened","useRef","collapsedHeight","collapsedStyles","styles","setStylesRaw","useState","setStyles","newStyles","flushSync","mergeStyles","oldStyles","getTransitionStyles","_duration","useDidUpdate","handleTransitionEnd","getCollapseProps","style","refKey","rest","theirRef","mergeRefs","defaultProps","Collapse","factory","props","ref","children","animateOpacity","others","useProps","theme","useMantineTheme","shouldReduceMotion","useReducedMotion","duration","jsx","Box","getStyleObject","classes","varsResolver","createVarsResolver","variant","color","childrenOffset","autoContrast","colors","getSpacing","NavLink","polymorphicFactory","_props","classNames","className","unstyled","vars","defaultOpened","onChange","onClick","active","disabled","leftSection","rightSection","label","description","disableRightSectionRotation","noWrap","onKeyDown","mod","getStyles","useStyles","_opened","setOpened","useUncontrolled","withChildren","handleClick","event","jsxs","Fragment","UnstyledButton","AccordionChevron"],"mappings":"2RAKA,SAASA,GAAsBC,EAAQ,CACrC,GAAI,CAACA,GAAU,OAAOA,GAAW,SAC/B,MAAO,GAET,MAAMC,EAAWD,EAAS,GAC1B,OAAO,KAAK,OAAO,EAAI,GAAKC,GAAY,IAAOA,EAAW,GAAK,EAAE,CACnE,CACA,SAASC,EAAiBC,EAAI,CAC5B,OAAOA,GAAA,MAAAA,EAAI,QAAUA,EAAG,QAAQ,aAAe,MACjD,CACA,MAAMC,EAAM,OAAO,OAAW,KAAe,OAAO,sBACpD,SAASC,GAAY,CACnB,mBAAAC,EACA,yBAAAC,EAA2B,OAC3B,gBAAAC,EAAkB,IAAM,CACvB,EACD,OAAAC,CACF,EAAG,CACD,MAAMN,EAAKO,EAAM,OAAC,IAAI,EAChBC,EAAkB,EAClBC,EAAkB,CACtB,QAAS,OACT,OAAQ,EACR,SAAU,QACX,EACK,CAACC,EAAQC,CAAY,EAAIC,EAAQ,SAACN,EAAS,CAAE,EAAGG,CAAe,EAC/DI,EAAaC,GAAc,CAC/BC,YAAU,IAAMJ,EAAaG,CAAS,CAAC,CACxC,EACKE,EAAeF,GAAc,CACjCD,EAAWI,IAAe,CAAE,GAAGA,EAAW,GAAGH,CAAS,EAAG,CAC1D,EACD,SAASI,EAAoBrB,EAAQ,CACnC,MAAMsB,EAAYhB,GAAsBP,GAAsBC,CAAM,EACpE,MAAO,CACL,WAAY,UAAUsB,CAAS,MAAMf,CAAwB,aAAae,CAAS,MAAMf,CAAwB,EAClH,CACL,CACEgB,EAAa,IAAM,CACb,OAAOnB,GAAQ,YAEfA,EADEK,EACE,IAAM,CACRU,EAAY,CAAE,WAAY,SAAU,QAAS,QAAS,SAAU,SAAU,EAC1Ef,EAAI,IAAM,CACR,MAAMJ,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