ivt 0.1.4 → 0.1.5

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.
Files changed (126) hide show
  1. package/dist/accordion/index.mjs +1 -1
  2. package/dist/alert/index.mjs +1 -1
  3. package/dist/alert-dialog/index.mjs +1 -1
  4. package/dist/avatar/index.mjs +1 -1
  5. package/dist/badge/index.mjs +1 -1
  6. package/dist/base/index.mjs +1 -1
  7. package/dist/button/index.mjs +1 -1
  8. package/dist/calendar/index.mjs +1 -1
  9. package/dist/card/index.mjs +1 -1
  10. package/dist/checkbox/index.mjs +1 -1
  11. package/dist/chunks/TextWrap-qkVOkHiw.mjs +2 -0
  12. package/dist/chunks/TextWrap-qkVOkHiw.mjs.map +1 -0
  13. package/dist/chunks/{accordion-b7tkR278.mjs → accordion-DCSVhB7Z.mjs} +2 -2
  14. package/dist/chunks/{accordion-b7tkR278.mjs.map → accordion-DCSVhB7Z.mjs.map} +1 -1
  15. package/dist/chunks/{badge-CGDtT1AM.mjs → badge-D_x3BlPA.mjs} +2 -2
  16. package/dist/chunks/{badge-CGDtT1AM.mjs.map → badge-D_x3BlPA.mjs.map} +1 -1
  17. package/dist/chunks/{bundle-mjs-uUK5gBZL.mjs → bundle-mjs-Dthp4wMi.mjs} +1 -1
  18. package/dist/chunks/{bundle-mjs-uUK5gBZL.mjs.map → bundle-mjs-Dthp4wMi.mjs.map} +1 -1
  19. package/dist/chunks/{button-BQuGoSwo.mjs → button-KMRgpiAy.mjs} +2 -2
  20. package/dist/chunks/{button-BQuGoSwo.mjs.map → button-KMRgpiAy.mjs.map} +1 -1
  21. package/dist/chunks/{calendar-D6nh7E7c.mjs → calendar-CmSMkDgI.mjs} +2 -2
  22. package/dist/chunks/{calendar-D6nh7E7c.mjs.map → calendar-CmSMkDgI.mjs.map} +1 -1
  23. package/dist/chunks/check-BSduI23k.mjs +2 -0
  24. package/dist/chunks/{check-BTM93edU.mjs.map → check-BSduI23k.mjs.map} +1 -1
  25. package/dist/chunks/chevron-down-BjVZhjFJ.mjs +2 -0
  26. package/dist/chunks/{chevron-down-ByXueUKH.mjs.map → chevron-down-BjVZhjFJ.mjs.map} +1 -1
  27. package/dist/chunks/chevron-left-DjmYjuTW.mjs +2 -0
  28. package/dist/chunks/{chevron-left-Dj6YqHMd.mjs.map → chevron-left-DjmYjuTW.mjs.map} +1 -1
  29. package/dist/chunks/chevron-right-DOvHale5.mjs +2 -0
  30. package/dist/chunks/{chevron-right-D2IT905d.mjs.map → chevron-right-DOvHale5.mjs.map} +1 -1
  31. package/dist/chunks/{command-B-ANHdE6.mjs → command-DMdzlCRK.mjs} +2 -2
  32. package/dist/chunks/{command-B-ANHdE6.mjs.map → command-DMdzlCRK.mjs.map} +1 -1
  33. package/dist/chunks/{createLucideIcon-KUe_eRSY.mjs → createLucideIcon-BPtXaGDX.mjs} +1 -1
  34. package/dist/chunks/{createLucideIcon-KUe_eRSY.mjs.map → createLucideIcon-BPtXaGDX.mjs.map} +1 -1
  35. package/dist/chunks/{dialog-BXMw3pOb.mjs → dialog-DT-LxfeE.mjs} +2 -2
  36. package/dist/chunks/{dialog-BXMw3pOb.mjs.map → dialog-DT-LxfeE.mjs.map} +1 -1
  37. package/dist/chunks/{hover-card-DvOyhTNF.mjs → hover-card-D0WoNHd_.mjs} +2 -2
  38. package/dist/chunks/{hover-card-DvOyhTNF.mjs.map → hover-card-D0WoNHd_.mjs.map} +1 -1
  39. package/dist/chunks/{index-FVFSIN6j.mjs → index-BE7U1lz3.mjs} +2 -2
  40. package/dist/chunks/{index-FVFSIN6j.mjs.map → index-BE7U1lz3.mjs.map} +1 -1
  41. package/dist/chunks/{index-DDy3w3P8.mjs → index-BEeVpO2_.mjs} +1 -1
  42. package/dist/chunks/{index-DDy3w3P8.mjs.map → index-BEeVpO2_.mjs.map} +1 -1
  43. package/dist/chunks/{index-CCvvm74Y.mjs → index-BOtb6ofV.mjs} +1 -1
  44. package/dist/chunks/{index-CCvvm74Y.mjs.map → index-BOtb6ofV.mjs.map} +1 -1
  45. package/dist/chunks/{index-CEACCVIV.mjs → index-BYaJxqBC.mjs} +2 -2
  46. package/dist/chunks/{index-CEACCVIV.mjs.map → index-BYaJxqBC.mjs.map} +1 -1
  47. package/dist/chunks/{index-CsbH4Chn.mjs → index-C8ZqoA88.mjs} +2 -2
  48. package/dist/chunks/{index-CsbH4Chn.mjs.map → index-C8ZqoA88.mjs.map} +1 -1
  49. package/dist/chunks/{index-BA0myTwh.mjs → index-CIfe3UIG.mjs} +1 -1
  50. package/dist/chunks/{index-BA0myTwh.mjs.map → index-CIfe3UIG.mjs.map} +1 -1
  51. package/dist/chunks/{index-BuuxNXqh.mjs → index-CVg6WODB.mjs} +2 -2
  52. package/dist/chunks/{index-BuuxNXqh.mjs.map → index-CVg6WODB.mjs.map} +1 -1
  53. package/dist/chunks/{index-ZlUuVpwn.mjs → index-ChEz--fx.mjs} +1 -1
  54. package/dist/chunks/{index-ZlUuVpwn.mjs.map → index-ChEz--fx.mjs.map} +1 -1
  55. package/dist/chunks/{index-Wrq-dJAT.mjs → index-D1WqwlXc.mjs} +2 -2
  56. package/dist/chunks/{index-Wrq-dJAT.mjs.map → index-D1WqwlXc.mjs.map} +1 -1
  57. package/dist/chunks/{index-DGdby9BP.mjs → index-DrgyjxdM.mjs} +2 -2
  58. package/dist/chunks/{index-DGdby9BP.mjs.map → index-DrgyjxdM.mjs.map} +1 -1
  59. package/dist/chunks/{index-BfrEVNZH.mjs → index-Ds-NL_xb.mjs} +2 -2
  60. package/dist/chunks/{index-BfrEVNZH.mjs.map → index-Ds-NL_xb.mjs.map} +1 -1
  61. package/dist/chunks/{index-CFXZ99Xo.mjs → index-DspU1Pyo.mjs} +1 -1
  62. package/dist/chunks/{index-CFXZ99Xo.mjs.map → index-DspU1Pyo.mjs.map} +1 -1
  63. package/dist/chunks/{index-CVVWvftS.mjs → index-k-LDQli2.mjs} +2 -2
  64. package/dist/chunks/{index-CVVWvftS.mjs.map → index-k-LDQli2.mjs.map} +1 -1
  65. package/dist/chunks/{index-Czv0ydhM.mjs → index-mlVBNiql.mjs} +2 -2
  66. package/dist/chunks/{index-Czv0ydhM.mjs.map → index-mlVBNiql.mjs.map} +1 -1
  67. package/dist/chunks/{index-DeHHC7Lr.mjs → index-rHca3YxT.mjs} +2 -2
  68. package/dist/chunks/{index-DeHHC7Lr.mjs.map → index-rHca3YxT.mjs.map} +1 -1
  69. package/dist/chunks/{input-DXANRHEg.mjs → input-CjX7cpsJ.mjs} +2 -2
  70. package/dist/chunks/{input-DXANRHEg.mjs.map → input-CjX7cpsJ.mjs.map} +1 -1
  71. package/dist/chunks/{label-bMd4Mzbg.mjs → label-B0a5aNu2.mjs} +2 -2
  72. package/dist/chunks/{label-bMd4Mzbg.mjs.map → label-B0a5aNu2.mjs.map} +1 -1
  73. package/dist/chunks/{pagination-DdTkX4SE.mjs → pagination-XvM9skZV.mjs} +2 -2
  74. package/dist/chunks/{pagination-DdTkX4SE.mjs.map → pagination-XvM9skZV.mjs.map} +1 -1
  75. package/dist/chunks/{popover-CEah8B_Q.mjs → popover-COG3isxJ.mjs} +2 -2
  76. package/dist/chunks/{popover-CEah8B_Q.mjs.map → popover-COG3isxJ.mjs.map} +1 -1
  77. package/dist/chunks/{progress-CqZxViuL.mjs → progress-KQNbvdmu.mjs} +2 -2
  78. package/dist/chunks/{progress-CqZxViuL.mjs.map → progress-KQNbvdmu.mjs.map} +1 -1
  79. package/dist/chunks/{scroll-area-Bc6fe1gs.mjs → scroll-area-Bof4yc1z.mjs} +2 -2
  80. package/dist/chunks/{scroll-area-Bc6fe1gs.mjs.map → scroll-area-Bof4yc1z.mjs.map} +1 -1
  81. package/dist/chunks/{select-CGYt_Y93.mjs → select-rpTSdR8q.mjs} +2 -2
  82. package/dist/chunks/{select-CGYt_Y93.mjs.map → select-rpTSdR8q.mjs.map} +1 -1
  83. package/dist/chunks/{skeleton-BdpInwiZ.mjs → skeleton-DwcR7I_w.mjs} +2 -2
  84. package/dist/chunks/{skeleton-BdpInwiZ.mjs.map → skeleton-DwcR7I_w.mjs.map} +1 -1
  85. package/dist/chunks/{sortable-CYb9HX1G.mjs → sortable-BKqLwBgJ.mjs} +2 -2
  86. package/dist/chunks/{sortable-CYb9HX1G.mjs.map → sortable-BKqLwBgJ.mjs.map} +1 -1
  87. package/dist/chunks/{table-jCCqMuXZ.mjs → table-DapXfoMY.mjs} +2 -2
  88. package/dist/chunks/{table-jCCqMuXZ.mjs.map → table-DapXfoMY.mjs.map} +1 -1
  89. package/dist/chunks/{tslib.es6-C_EBDYxc.mjs → tslib.es6-D-trMiel.mjs} +1 -1
  90. package/dist/chunks/{tslib.es6-C_EBDYxc.mjs.map → tslib.es6-D-trMiel.mjs.map} +1 -1
  91. package/dist/chunks/{utils-DxzrhakI.mjs → utils-BDlXiHS3.mjs} +2 -2
  92. package/dist/chunks/{utils-DxzrhakI.mjs.map → utils-BDlXiHS3.mjs.map} +1 -1
  93. package/dist/chunks/x-BIoR0tgq.mjs +2 -0
  94. package/dist/chunks/{x-BzuwgR7h.mjs.map → x-BIoR0tgq.mjs.map} +1 -1
  95. package/dist/command/index.mjs +1 -1
  96. package/dist/data-table/index.mjs +1 -1
  97. package/dist/dialog/index.mjs +1 -1
  98. package/dist/dropdown-menu/index.mjs +1 -1
  99. package/dist/dropzone/index.mjs +1 -1
  100. package/dist/form/index.mjs +1 -1
  101. package/dist/hover-card/index.mjs +1 -1
  102. package/dist/icon/index.mjs +1 -1
  103. package/dist/index.css +1 -1
  104. package/dist/input/index.mjs +1 -1
  105. package/dist/label/index.mjs +1 -1
  106. package/dist/pagination/index.mjs +1 -1
  107. package/dist/popover/index.mjs +1 -1
  108. package/dist/progress/index.mjs +1 -1
  109. package/dist/scroll-area/index.mjs +1 -1
  110. package/dist/select/index.mjs +1 -1
  111. package/dist/separator/index.mjs +1 -1
  112. package/dist/sheet/index.mjs +1 -1
  113. package/dist/skeleton/index.mjs +1 -1
  114. package/dist/sortable/index.mjs +1 -1
  115. package/dist/table/index.mjs +1 -1
  116. package/dist/tabs/index.mjs +1 -1
  117. package/dist/toast/index.mjs +1 -1
  118. package/dist/tooltip/index.mjs +1 -1
  119. package/package.json +1 -1
  120. package/dist/chunks/TextWrap-BoRBN55H.mjs +0 -2
  121. package/dist/chunks/TextWrap-BoRBN55H.mjs.map +0 -1
  122. package/dist/chunks/check-BTM93edU.mjs +0 -2
  123. package/dist/chunks/chevron-down-ByXueUKH.mjs +0 -2
  124. package/dist/chunks/chevron-left-Dj6YqHMd.mjs +0 -2
  125. package/dist/chunks/chevron-right-D2IT905d.mjs +0 -2
  126. package/dist/chunks/x-BzuwgR7h.mjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index-FVFSIN6j.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// 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/core/primitive/src/primitive.tsx\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}\nexport {\n composeEventHandlers\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(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"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,KAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,CAAA,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,EAEJ,CAEJ,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAO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IAIvB,OAAO4E,EAAQtD,MAAMtB,KAAQ4E,EAAgB5E,GAC/C,CAzK4CmF,CAAcV,IAExD,MADuC,mBAAbjD,GACLC,EAAS6C,UAAkB3C,EAAAyD,aAAaX,EAAO,CAAEzE,QAAS,IAAA,EA6IjF,SAAS8C,EAAiBE,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-BE7U1lz3.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// 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/core/primitive/src/primitive.tsx\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}\nexport {\n composeEventHandlers\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(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"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,KAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,CAAA,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,EAEJ,CAEJ,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAASW,EACPC,EACAC,GACAC,yBAAEA,GAA2B,GAAS,IAEtC,OAAO,SAAqBC,GAG1B,GAFAH,IAAuBG,IAEU,IAA7BD,IAAuCC,EAAMC,iBAC/C,OAAOH,IAA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AS,IAAA,EA6IjF,SAAS8C,EAAiBE,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","x_google_ignoreList":[0,1,2]}
@@ -1,2 +1,2 @@
1
1
  import*as r from"react";import*as i from"react-dom";import{createSlot as t}from"@radix-ui/react-slot";import{jsx as o}from"react/jsx-runtime";var e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((i,e)=>{const a=t(`Primitive.${e}`),n=r.forwardRef(((r,i)=>{const{asChild:t,...n}=r,m=t?a:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),o(m,{...n,ref:i})}));return n.displayName=`Primitive.${e}`,{...i,[e]:n}}),{});function a(r,t){r&&i.flushSync((()=>r.dispatchEvent(t)))}export{e as P,a as d};
2
- //# sourceMappingURL=index-DDy3w3P8.mjs.map
2
+ //# sourceMappingURL=index-BEeVpO2_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DDy3w3P8.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// 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"],"names":["Primitive","reduce","primitive","node","Slot","createSlot","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"8IAIA,IAgCMA,EAhCQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAOC,EAAW,aAAaF,KAC/BG,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUP,EAAOD,EAMnC,MAJsB,oBAAXW,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACJ,EAAA,IAASD,EAAgBM,IAAKR,GAAc,IAKtD,OAFAJ,EAAKa,YAAc,aAAahB,IAEzB,IAAKD,EAAWC,CAACA,GAAOG,EAAK,GACnC,CAAgB,GA2CnB,SAASc,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-BEeVpO2_.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// 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"],"names":["Primitive","reduce","primitive","node","Slot","createSlot","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"8IAIA,IAgCMA,EAhCQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAOC,EAAW,aAAaF,KAC/BG,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUP,EAAOD,EAMnC,MAJsB,oBAAXW,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACJ,EAAA,IAASD,EAAgBM,IAAKR,GAAc,IAKtD,OAFAJ,EAAKa,YAAc,aAAahB,IAEzB,IAAKD,EAAWC,CAACA,GAAOG,EAAK,GACnC,CAAgB,GA2CnB,SAASc,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
1
  import*as e from"react";import{jsx as t}from"react/jsx-runtime";function r(r,n){const o=e.createContext(n),c=r=>{const{children:n,...c}=r,s=e.useMemo((()=>c),Object.values(c));return t(o.Provider,{value:s,children:n})};return c.displayName=r+"Provider",[c,function(t){const c=e.useContext(o);if(c)return c;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${r}\``)}]}function n(r,n=[]){let c=[];const s=()=>{const t=c.map((t=>e.createContext(t)));return function(n){const o=n?.[r]||t;return e.useMemo((()=>({[`__scope${r}`]:{...n,[r]:o}})),[n,o])}};return s.scopeName=r,[function(n,o){const s=e.createContext(o),u=c.length;c=[...c,o];const i=n=>{const{scope:o,children:c,...i}=n,a=o?.[r]?.[u]||s,m=e.useMemo((()=>i),Object.values(i));return t(a.Provider,{value:m,children:c})};return i.displayName=n+"Provider",[i,function(t,c){const i=c?.[r]?.[u]||s,a=e.useContext(i);if(a)return a;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},o(s,...n)]}function o(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}export{r as a,n as c};
2
- //# sourceMappingURL=index-CCvvm74Y.mjs.map
2
+ //# sourceMappingURL=index-BOtb6ofV.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CCvvm74Y.mjs","sources":["../../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// 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"],"names":["createContext","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","useMemo","Object","values","jsx","displayName","consumerName","useContext","Error","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createScope","scopeContexts","map","scope","contexts","BaseContext","index","length","composeContextScopes","scopes","baseScope","scopeHooks","useScope","overrideScopes","nextScopes","reduce"],"mappings":"gEAEA,SAASA,EACPC,EACAC,GAEA,MAAMC,EAAgBC,EAAAJ,cAA4CE,GAE5DG,EAAwEC,IAC5E,MAAMC,SAAEA,KAAaC,GAAYF,EAG3BG,EAAcL,EAAAM,SAAQ,IAAMF,GAASG,OAAOC,OAAOJ,IACzD,OAAOK,EAACV,EAAQE,SAAR,CAAiBI,QAAeF,YAAS,EAanD,OAVAF,EAASS,YAAcb,EAAoB,WAUpC,CAACI,EARR,SAAoBU,GAClB,MAAMP,EAAgBJ,EAAAY,WAAWb,GACjC,GAAIK,EAAS,OAAOA,EACpB,QAAuB,IAAnBN,EAA8B,OAAOA,EAEzC,MAAM,IAAIe,MAAM,KAAKF,6BAAwCd,MAC/D,EAGF,CAaA,SAASiB,EAAmBC,EAAmBC,EAAwC,IACrF,IAAIC,EAAyB,GA2C7B,MAAMC,EAA2B,KAC/B,MAAMC,EAAgBF,EAAgBG,KAAKtB,GAC5BE,EAAAJ,cAAcE,KAE7B,OAAO,SAAkBuB,GACvB,MAAMC,EAAWD,IAAQN,IAAcI,EACvC,OAAanB,EAAAM,SACX,KAAO,CAAE,CAAC,UAAUS,KAAc,IAAKM,EAAON,CAACA,GAAYO,MAC3D,CAACD,EAAOC,GAEZ,CAAA,EAIF,OADAJ,EAAYH,UAAYA,EACjB,CAnDP,SACElB,EACAC,GAEA,MAAMyB,EAAoBvB,EAAAJ,cAA4CE,GAChE0B,EAAQP,EAAgBQ,OAC9BR,EAAkB,IAAIA,EAAiBnB,GAEvC,MAAMG,EAEDC,IACH,MAAMmB,MAAEA,EAAAlB,SAAOA,KAAaC,GAAYF,EAClCH,EAAUsB,IAAQN,KAAaS,IAAUD,EAGzClB,EAAcL,EAAAM,SAAQ,IAAMF,GAASG,OAAOC,OAAOJ,IACzD,OAAOK,EAACV,EAAQE,SAAR,CAAiBI,QAAeF,YAAS,EAcnD,OAXAF,EAASS,YAAcb,EAAoB,WAWpC,CAACI,EATR,SAAoBU,EAAsBU,GACxC,MAAMtB,EAAUsB,IAAQN,KAAaS,IAAUD,EACzCnB,EAAgBJ,EAAAY,WAAWb,GACjC,GAAIK,EAAS,OAAOA,EACpB,QAAuB,IAAnBN,EAA8B,OAAOA,EAEzC,MAAM,IAAIe,MAAM,KAAKF,6BAAwCd,MAC/D,EAGF,EAoBuB6B,EAAqBR,KAAgBF,GAC9D,CAMA,SAASU,KAAwBC,GAC/B,MAAMC,EAAYD,EAAO,GACzB,GAAsB,IAAlBA,EAAOF,OAAc,OAAOG,EAEhC,MAAMV,EAA2B,KAC/B,MAAMW,EAAaF,EAAOP,KAAKF,IAAiB,CAC9CY,SAAUZ,IACVH,UAAWG,EAAYH,cAGzB,OAAO,SAA2BgB,GAChC,MAAMC,EAAaH,EAAWI,QAAO,CAACD,GAAcF,WAAUf,gBAMrD,IAAKiB,KAFOF,EAASC,GACI,UAAUhB,QAEzC,IAEH,OAAaf,EAAAM,SAAQ,KAAO,CAAE,CAAC,UAAUsB,EAAUb,aAAciB,KAAe,CAACA,GACnF,CAAA,EAIF,OADAd,EAAYH,UAAYa,EAAUb,UAC3BG,CACT","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-BOtb6ofV.mjs","sources":["../../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// 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"],"names":["createContext","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","useMemo","Object","values","jsx","displayName","consumerName","useContext","Error","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createScope","scopeContexts","map","scope","contexts","BaseContext","index","length","composeContextScopes","scopes","baseScope","scopeHooks","useScope","overrideScopes","nextScopes","reduce"],"mappings":"gEAEA,SAASA,EACPC,EACAC,GAEA,MAAMC,EAAgBC,EAAAJ,cAA4CE,GAE5DG,EAAwEC,IAC5E,MAAMC,SAAEA,KAAaC,GAAYF,EAG3BG,EAAcL,EAAAM,SAAQ,IAAMF,GAASG,OAAOC,OAAOJ,IACzD,OAAOK,EAACV,EAAQE,SAAR,CAAiBI,QAAeF,YAAS,EAanD,OAVAF,EAASS,YAAcb,EAAoB,WAUpC,CAACI,EARR,SAAoBU,GAClB,MAAMP,EAAgBJ,EAAAY,WAAWb,GACjC,GAAIK,EAAS,OAAOA,EACpB,QAAuB,IAAnBN,EAA8B,OAAOA,EAEzC,MAAM,IAAIe,MAAM,KAAKF,6BAAwCd,MAC/D,EAGF,CAaA,SAASiB,EAAmBC,EAAmBC,EAAwC,IACrF,IAAIC,EAAyB,GA2C7B,MAAMC,EAA2B,KAC/B,MAAMC,EAAgBF,EAAgBG,KAAKtB,GAC5BE,EAAAJ,cAAcE,KAE7B,OAAO,SAAkBuB,GACvB,MAAMC,EAAWD,IAAQN,IAAcI,EACvC,OAAanB,EAAAM,SACX,KAAO,CAAE,CAAC,UAAUS,KAAc,IAAKM,EAAON,CAACA,GAAYO,MA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}from"./index-FVFSIN6j.mjs";import{c as r,a}from"./index-CCvvm74Y.mjs";import{u as i}from"./index-DGdby9BP.mjs";import{u as s}from"./index-Czv0ydhM.mjs";import{P as c,D as l}from"./index-Wrq-dJAT.mjs";import{h as d,R as u,u as p,F as f}from"./index-BuuxNXqh.mjs";import{P as m}from"./index-DDy3w3P8.mjs";import{createSlot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as v}from"react/jsx-runtime";var R="Dialog",[_,y]=r(R),[b,C]=_(R),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,d=e.useRef(null),u=e.useRef(null),[p,f]=s({prop:r,defaultProp:a??!1,onChange:c,caller:R});return D(b,{scope:t,triggerRef:d,contentRef:u,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=R;var O="DialogTrigger",w=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(O,r),s=n(t,i.triggerRef);return D(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Z(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));w.displayName=O;var F="DialogPortal",[N,P]=_(F,{forceMount:void 0}),x=o=>{const{__scopeDialog:n,forceMount:r,children:a,container:i}=o,s=C(F,n);return D(N,{scope:n,forceMount:r,children:e.Children.map(a,(e=>D(t,{present:r||s.open,children:D(c,{asChild:!0,container:i,children:e})})))})};x.displayName=F;var E="DialogOverlay",A=e.forwardRef(((e,o)=>{const n=P(E,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(E,e.__scopeDialog);return i.modal?D(t,{present:r||i.open,children:D(j,{...a,ref:o})}):null}));A.displayName=E;var M=g("DialogOverlay.RemoveScroll"),j=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(u,{as:M,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":Z(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),k="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(k,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(k,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D($,{...a,ref:o}):D(W,{...a,ref:o})})}));T.displayName=k;var $=e.forwardRef(((t,r)=>{const a=C(k,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return d(e)}),[]),D(S,{...t,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:o(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.triggerRef.current?.focus()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:o(t.onFocusOutside,(e=>e.preventDefault()))})})),W=e.forwardRef(((o,t)=>{const n=C(k,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(S,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,i=n.triggerRef.current?.contains(t);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),S=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,d=C(k,r),u=e.useRef(null),m=n(t,u);return p(),h(v,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Z(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h(v,{children:[D(L,{titleId:d.titleId}),D(Q,{contentRef:u,descriptionId:d.descriptionId})]})]})})),B="DialogTitle",q=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));q.displayName=B;var H="DialogDescription",K=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(H,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));K.displayName=H;var U="DialogClose",V=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(U,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z(e){return e?"open":"closed"}V.displayName=U;var z="DialogTitleWarning",[G,J]=a(z,{contentName:k,titleName:B,docsSlug:"dialog"}),L=({titleId:o})=>{const t=J(z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return e.useEffect((()=>{if(o){document.getElementById(o)}}),[n,o]),null},Q=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)}}),[n,o,t]),null},X=I,Y=w,ee=x,oe=A,te=T,ne=q,re=K,ae=V;export{ae as C,re as D,oe as O,ee as P,X as R,ne as T,G as W,te as a,Y as b,y as c};
2
- //# sourceMappingURL=index-CEACCVIV.mjs.map
1
+ import*as e from"react";import{c as o,P as t,u as n}from"./index-BE7U1lz3.mjs";import{c as r,a}from"./index-BOtb6ofV.mjs";import{u as i}from"./index-DrgyjxdM.mjs";import{u as s}from"./index-mlVBNiql.mjs";import{P as c,D as l}from"./index-D1WqwlXc.mjs";import{h as d,R as u,u as p,F as f}from"./index-CVg6WODB.mjs";import{P as m}from"./index-BEeVpO2_.mjs";import{createSlot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as v}from"react/jsx-runtime";var R="Dialog",[_,y]=r(R),[b,C]=_(R),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,d=e.useRef(null),u=e.useRef(null),[p,f]=s({prop:r,defaultProp:a??!1,onChange:c,caller:R});return D(b,{scope:t,triggerRef:d,contentRef:u,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=R;var O="DialogTrigger",w=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(O,r),s=n(t,i.triggerRef);return D(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Z(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));w.displayName=O;var F="DialogPortal",[N,P]=_(F,{forceMount:void 0}),x=o=>{const{__scopeDialog:n,forceMount:r,children:a,container:i}=o,s=C(F,n);return D(N,{scope:n,forceMount:r,children:e.Children.map(a,(e=>D(t,{present:r||s.open,children:D(c,{asChild:!0,container:i,children:e})})))})};x.displayName=F;var E="DialogOverlay",A=e.forwardRef(((e,o)=>{const n=P(E,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(E,e.__scopeDialog);return i.modal?D(t,{present:r||i.open,children:D(j,{...a,ref:o})}):null}));A.displayName=E;var M=g("DialogOverlay.RemoveScroll"),j=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(u,{as:M,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":Z(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),k="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(k,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(k,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D($,{...a,ref:o}):D(W,{...a,ref:o})})}));T.displayName=k;var $=e.forwardRef(((t,r)=>{const a=C(k,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return d(e)}),[]),D(S,{...t,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:o(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.triggerRef.current?.focus()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:o(t.onFocusOutside,(e=>e.preventDefault()))})})),W=e.forwardRef(((o,t)=>{const n=C(k,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(S,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,i=n.triggerRef.current?.contains(t);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),S=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,d=C(k,r),u=e.useRef(null),m=n(t,u);return p(),h(v,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Z(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h(v,{children:[D(L,{titleId:d.titleId}),D(Q,{contentRef:u,descriptionId:d.descriptionId})]})]})})),B="DialogTitle",q=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));q.displayName=B;var H="DialogDescription",K=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(H,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));K.displayName=H;var U="DialogClose",V=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(U,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z(e){return e?"open":"closed"}V.displayName=U;var z="DialogTitleWarning",[G,J]=a(z,{contentName:k,titleName:B,docsSlug:"dialog"}),L=({titleId:o})=>{const t=J(z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return e.useEffect((()=>{if(o){document.getElementById(o)}}),[n,o]),null},Q=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)}}),[n,o,t]),null},X=I,Y=w,ee=x,oe=A,te=T,ne=q,re=K,ae=V;export{ae as C,re as D,oe as O,ee as P,X as R,ne as T,G as W,te as a,Y as b,y as c};
2
+ //# sourceMappingURL=index-BYaJxqBC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CEACCVIV.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","as","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","describedById","getAttribute","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,EAAMS,GAAWC,EAAqB,CAC3CC,KAAMV,EACNW,YAAaV,IAAe,EAC5BW,SAAUV,EACVW,OAAQxB,IAGV,OACEyB,EAACrB,EAAA,CACCsB,MAAOlB,EACPO,aACAG,aACAS,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACflB,OACAG,aAAcM,EACdY,aAAoBf,EAAAgB,aAAY,IAAMb,GAASc,IAAcA,KAAW,CAACd,IACzEL,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iB6H,EAAY1H,GAC7C,OACEiB,EAACkB,EAAUC,OAAV,CACCC,KAAK,YACDuF,EACJrF,IAAKT,EACLU,QAASC,EAAqB1C,EAAMyC,SAAS,IAAMR,EAAQ3B,cAAa,MAAM,IAUtF,SAASiC,EAASpC,GAChB,OAAOA,EAAO,OAAS,QACzB,CANAyH,EAAYjG,YAAcgG,EAQ1B,IAAMG,EAAqB,sBAEpBC,EAAiBC,GAAqBC,EAAcH,EAAoB,CAC7EI,YAAa5D,EACb6D,UAAWhB,EACXiB,SAAU,WAKNnB,EAA4C,EAAG3F,cACnD,MAAM+G,EAAsBL,EAAkBF,GAExCQ,EAAU,KAAKD,EAAoBH,8BAA8BG,EAAoBF,wGAEjEE,EAAoBF,gJAE4BE,EAAoBD,WAS9F,OAPM3H,EAAAmE,WAAU,KACd,GAAItD,EAAS,CACMiH,SAASC,eAAelH,EAE3C,IACC,CAACgH,EAAShH,IAEN,IAAA,EAUH4F,EAAwD,EAAGvG,aAAYY,oBAC3E,MACM+G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMzH,EAAAmE,WAAU,KACd,MAAM6D,EAAgB9H,EAAWmE,SAAS4D,aAAa,oBAEvD,GAAInH,GAAiBkH,EAAe,CACXF,SAASC,eAAejH,EAEjD,IACC,CAAC+G,EAAS3H,EAAYY,IAElB,IAAA,EAGHoH,EAAO5I,EACP6I,EAAU/G,EACVgH,GAAS9F,EACT+F,GAAUrF,EACVsF,GAAUxE,EACVyE,GAAQ5B,EACR6B,GAAczB,EACd0B,GAAQtB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-BYaJxqBC.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","as","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","describedById","getAttribute","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,EAAMS,GAAWC,EAAqB,CAC3CC,KAAMV,EACNW,YAAaV,IAAe,EAC5BW,SAAUV,EACVW,OAAQxB,IAGV,OACEyB,EAACrB,EAAA,CACCsB,MAAOlB,EACPO,aACAG,aACAS,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACflB,OACAG,aAAcM,EACdY,aAAoBf,EAAAgB,aAAY,IAAMb,GAASc,IAAcA,KAAW,CAACd,IACzEL,QAECL,YAAA,EAKPH,EAAO4B,YAAclC,EAMrB,IAAMmC,EAAe,gBAMfC,EAAsBpB,E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IAAKT,EACLU,QAASC,EAAqB1C,EAAMyC,SAAS,IAAMR,EAAQ3B,cAAa,MAAM,IAUtF,SAASiC,EAASpC,GAChB,OAAOA,EAAO,OAAS,QACzB,CANAyH,EAAYjG,YAAcgG,EAQ1B,IAAMG,EAAqB,sBAEpBC,EAAiBC,GAAqBC,EAAcH,EAAoB,CAC7EI,YAAa5D,EACb6D,UAAWhB,EACXiB,SAAU,WAKNnB,EAA4C,EAAG3F,cACnD,MAAM+G,EAAsBL,EAAkBF,GAExCQ,EAAU,KAAKD,EAAoBH,8BAA8BG,EAAoBF,wGAEjEE,EAAoBF,gJAE4BE,EAAoBD,WAS9F,OAPM3H,EAAAmE,WAAU,KACd,GAAItD,EAAS,CACMiH,SAASC,eAAelH,EAE3C,IACC,CAACgH,EAAShH,IAEN,IAAA,EAUH4F,EAAwD,EAAGvG,aAAYY,oBAC3E,MACM+G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMzH,EAAAmE,WAAU,KACd,MAAM6D,EAAgB9H,EAAWmE,SAAS4D,aAAa,oBAEvD,GAAInH,GAAiBkH,EAAe,CACXF,SAASC,eAAejH,EAEjD,IACC,CAAC+G,EAAS3H,EAAYY,IAElB,IAAA,EAGHoH,EAAO5I,EACP6I,EAAU/G,EACVgH,GAAS9F,EACT+F,GAAUrF,EACVsF,GAAUxE,EACVyE,GAAQ5B,EACR6B,GAAczB,EACd0B,GAAQtB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{useLayoutEffect as e,useEffect as n}from"react";import*as r from"react-dom";import{P as o}from"./index-DDy3w3P8.mjs";import{jsx as i}from"react/jsx-runtime";import{u as l}from"./index-FVFSIN6j.mjs";import{c as a}from"./index-CCvvm74Y.mjs";import{u as s}from"./index-CFXZ99Xo.mjs";import{u as c}from"./index-BA0myTwh.mjs";import{u as f}from"./index-DeHHC7Lr.mjs";const u=["top","right","bottom","left"],d=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=t=>({x:t,y:t}),y={left:"right",right:"left",bottom:"top",top:"bottom"},w={start:"end",end:"start"};function x(t,e,n){return p(t,d(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function b(t){return t.split("-")[0]}function R(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function P(t){return"y"===t?"height":"width"}function S(t){return["top","bottom"].includes(b(t))?"y":"x"}function O(t){return A(S(t))}function T(t){return t.replace(/start|end/g,(t=>w[t]))}function L(t){return t.replace(/left|right|bottom|top/g,(t=>y[t]))}function C(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function E(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:r,floating:o}=t;const i=S(e),l=O(e),a=P(l),s=b(e),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(R(e)){case"start":p[l]-=d*(n&&c?-1:1);break;case"end":p[l]+=d*(n&&c?-1:1)}return p}async function H(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=v(e,t),m=C(p),h=a[d?"floating"===u?"reference":"floating":u],g=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(g.top-b.top+m.top)/x.y,bottom:(b.bottom-g.bottom+m.bottom)/x.y,left:(g.left-b.left+m.left)/x.x,right:(b.right-g.right+m.right)/x.x}}function k(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return u.some((e=>t[e]>=0))}function W(){return"undefined"!=typeof window}function B(t){return j(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(j(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function j(t){return!!W()&&(t instanceof Node||t instanceof M(t).Node)}function N(t){return!!W()&&(t instanceof Element||t instanceof M(t).Element)}function _(t){return!!W()&&(t instanceof HTMLElement||t instanceof M(t).HTMLElement)}function z(t){return!(!W()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function V(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=J(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Y(t){return["table","td","th"].includes(B(t))}function X(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function I(t){const e=q(),n=N(t)?J(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(B(t))}function J(t){return M(t).getComputedStyle(t)}function K(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Q(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||z(t)&&t.host||$(t);return z(e)?e.host:e}function U(t){const e=Q(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&V(e)?e:U(e)}function Z(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=U(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),l=M(o);if(i){const t=tt(l);return e.concat(l,l.visualViewport||[],V(o)?o:[],t&&n?Z(t):[])}return e.concat(o,Z(o,[],n))}function tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function et(t){const e=J(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=_(t),i=o?t.offsetWidth:n,l=o?t.offsetHeight:r,a=m(n)!==i||m(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function nt(t){return N(t)?t:t.contextElement}function rt(t){const e=nt(t);if(!_(e))return g(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=et(e);let l=(i?m(n.width):n.width)/r,a=(i?m(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ot=g(0);function it(t){const e=M(t);return q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ot}function lt(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=nt(t);let l=g(1);e&&(r?N(r)&&(l=rt(r)):l=rt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==M(t))&&e}(i,n,r)?it(i):g(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,f=o.width/l.x,u=o.height/l.y;if(i){const t=M(i),e=r&&N(r)?M(r):r;let n=t,o=tt(n);for(;o&&r&&e!==n;){const t=rt(o),e=o.getBoundingClientRect(),r=J(o),i=e.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,l=e.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x,c*=t.y,f*=t.x,u*=t.y,s+=i,c+=l,n=M(o),o=tt(n)}}return E({width:f,height:u,x:s,y:c})}function at(t,e){const n=K(t).scrollLeft;return e?e.left+n:lt($(t)).left+n}function st(t,e,n){void 0===n&&(n=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(n?0:at(t,r)),y:r.top+e.scrollTop}}function ct(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=M(t),r=$(t),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const t=q();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(t,n);else if("document"===e)r=function(t){const e=$(t),n=K(t),r=t.ownerDocument.body,o=p(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=p(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+at(t);const a=-n.scrollTop;return"rtl"===J(r).direction&&(l+=p(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}($(t));else if(N(e))r=function(t,e){const n=lt(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=_(t)?rt(t):g(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=it(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return E(r)}function ft(t,e){const n=Q(t);return!(n===e||!N(n)||G(n))&&("fixed"===J(n).position||ft(n,e))}function ut(t,e,n){const r=_(e),o=$(e),i="fixed"===n,l=lt(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const s=g(0);function c(){s.x=at(o)}if(r||!r&&!i)if(("body"!==B(e)||V(o))&&(a=K(e)),r){const t=lt(e,!0,i,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?g(0):st(o,a);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function dt(t){return"static"===J(t).position}function pt(t,e){if(!_(t)||"fixed"===J(t).position)return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function mt(t,e){const n=M(t);if(X(t))return n;if(!_(t)){let e=Q(t);for(;e&&!G(e);){if(N(e)&&!dt(e))return e;e=Q(e)}return n}let r=pt(t,e);for(;r&&Y(r)&&dt(r);)r=pt(r,e);return r&&G(r)&&dt(r)&&!I(r)?n:r||function(t){let e=Q(t);for(;_(e)&&!G(e);){if(I(e))return e;if(X(e))return null;e=Q(e)}return null}(t)||n}const ht={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i="fixed"===o,l=$(r),a=!!e&&X(e.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=g(1);const f=g(0),u=_(r);if((u||!u&&!i)&&(("body"!==B(r)||V(l))&&(s=K(r)),_(r))){const t=lt(r);c=rt(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}const d=!l||u||i?g(0):st(l,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[..."clippingAncestors"===n?X(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Z(t,[],!1).filter((t=>N(t)&&"body"!==B(t))),o=null;const i="fixed"===J(t).position;let l=i?Q(t):t;for(;N(l)&&!G(l);){const e=J(l),n=I(l);n||"fixed"!==e.position||(o=null),(i?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||V(l)&&!n&&ft(t,l))?r=r.filter((t=>t!==l)):o=e,l=Q(l)}return e.set(t,r),r}(e,this._c):[].concat(n),r],l=i[0],a=i.reduce(((t,n)=>{const r=ct(e,n,o);return t.top=p(r.top,t.top),t.right=d(r.right,t.right),t.bottom=d(r.bottom,t.bottom),t.left=p(r.left,t.left),t}),ct(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:mt,getElementRects:async function(t){const e=this.getOffsetParent||mt,n=this.getDimensions,r=await n(t.floating);return{reference:ut(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=et(t);return{width:e,height:n}},getScale:rt,isElement:N,isRTL:function(t){return"rtl"===J(t).direction}};function gt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function yt(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=nt(t),f=o||i?[...c?Z(c):[],...Z(e)]:[];f.forEach((t=>{o&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const u=c&&a?function(t,e){let n,r=null;const o=$(t);function i(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=t.getBoundingClientRect(),{left:f,top:u,width:m,height:g}=c;if(a||e(),!m||!g)return;const y={rootMargin:-h(u)+"px "+-h(o.clientWidth-(f+m))+"px "+-h(o.clientHeight-(u+g))+"px "+-h(f)+"px",threshold:p(0,d(1,s))||1};let w=!0;function x(e){const r=e[0].intersectionRatio;if(r!==s){if(!w)return l();r?l(!1,r):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}1!==r||gt(c,t.getBoundingClientRect())||l(),w=!1}try{r=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch(t){r=new IntersectionObserver(x,y)}r.observe(t)}(!0),i}(c,n):null;let m,g=-1,y=null;l&&(y=new ResizeObserver((t=>{let[r]=t;r&&r.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),c&&!s&&y.observe(c),y.observe(e));let w=s?lt(t):null;return s&&function e(){const r=lt(t);w&&!gt(w,r)&&n();w=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach((t=>{o&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==u||u(),null==(t=y)||t.disconnect(),y=null,s&&cancelAnimationFrame(m)}}const wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=e,s=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=b(n),a=R(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,u=v(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(e,t);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},xt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...s}=v(t,e),c={x:n,y:r},f=await H(e,s),u=S(b(o)),d=A(u);let p=c[d],m=c[u];if(i){const t="y"===d?"bottom":"right";p=x(p+f["y"===d?"top":"left"],p,p-f[t])}if(l){const t="y"===u?"bottom":"right";m=x(m+f["y"===u?"top":"left"],m,m-f[t])}const h=a.fn({...e,[d]:p,[u]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:i,[u]:l}}}}}},vt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=b(o),w=S(a),x=b(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=d||(x||!h?[L(a)]:function(t){const e=L(t);return[T(t),e,T(e)]}(a)),E="none"!==m;!d&&E&&C.push(...function(t,e,n,r){const o=R(t);let i=function(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:l;default:return[]}}(b(t),"start"===n,r);return o&&(i=i.map((t=>t+"-"+o)),e&&(i=i.concat(i.map(T)))),i}(a,h,m,A));const D=[a,...C],k=await H(e,g),F=[];let W=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&F.push(k[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const r=R(t),o=O(t),i=P(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(l=L(l)),[l,L(l)]}(o,l,A);F.push(k[t[0]],k[t[1]])}if(W=[...W,{placement:o,overflows:F}],!F.every((t=>t<=0))){var B,M;const t=((null==(B=i.flip)?void 0:B.index)||0)+1,e=D[t];if(e){var $;const n="alignment"===u&&w!==S(e),r=(null==($=W[0])?void 0:$.overflows[0])>0;if(!n||r)return{data:{index:t,overflows:W},reset:{placement:e}}}let n=null==(M=W.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var j;const t=null==(j=W.filter((t=>{if(E){const e=S(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},bt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:i,platform:l,elements:a}=e,{apply:s=()=>{},...c}=v(t,e),f=await H(e,c),u=b(o),m=R(o),h="y"===S(o),{width:g,height:y}=i.floating;let w,x;"top"===u||"bottom"===u?(w=u,x=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(x=u,w="end"===m?"top":"bottom");const A=y-f.top-f.bottom,P=g-f.left-f.right,O=d(y-f[w],A),T=d(g-f[x],P),L=!e.middlewareData.shift;let C=O,E=T;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(E=P),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(C=A),L&&!m){const t=p(f.left,0),e=p(f.right,0),n=p(f.top,0),r=p(f.bottom,0);h?E=g-2*(0!==t||0!==e?t+e:p(f.left,f.right)):C=y-2*(0!==n||0!==r?n+r:p(f.top,f.bottom))}await s({...e,availableWidth:E,availableHeight:C});const D=await l.getDimensions(a.floating);return g!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}},Rt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=v(t,e);switch(r){case"referenceHidden":{const t=k(await H(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=k(await H(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}},At=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:s}=e,{element:c,padding:f=0}=v(t,e)||{};if(null==c)return{};const u=C(f),p={x:n,y:r},m=O(o),h=P(m),g=await l.getDimensions(c),y="y"===m,w=y?"top":"left",b=y?"bottom":"right",A=y?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[m]-p[m]-i.floating[h],T=p[m]-i.reference[m],L=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let E=L?L[A]:0;E&&await(null==l.isElement?void 0:l.isElement(L))||(E=a.floating[A]||i.floating[h]);const D=S/2-T/2,H=E/2-g[h]/2-1,k=d(u[w],H),F=d(u[b],H),W=k,B=E-g[h]-F,M=E/2-g[h]/2+D,$=x(W,M,B),j=!s.arrow&&null!=R(o)&&M!==$&&i.reference[h]/2-(M<W?k:F)-g[h]/2<0,N=j?M<W?M-W:M-B:0;return{[m]:p[m]+N,data:{[m]:$,centerOffset:M-$-N,...j&&{alignmentOffset:N}},reset:j}}}),Pt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=v(t,e),f={x:n,y:r},u=S(o),d=A(u);let p=f[d],m=f[u];const h=v(a,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const t="y"===d?"height":"width",e=i.reference[d]-i.floating[t]+g.mainAxis,n=i.reference[d]+i.reference[t]-g.mainAxis;p<e?p=e:p>n&&(p=n)}if(c){var y,w;const t="y"===d?"width":"height",e=["top","left"].includes(b(o)),n=i.reference[u]-i.floating[t]+(e&&(null==(y=l.offset)?void 0:y[u])||0)+(e?0:g.crossAxis),r=i.reference[u]+i.reference[t]+(e?0:(null==(w=l.offset)?void 0:w[u])||0)-(e?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},St=(t,e,n)=>{const r=new Map,o={platform:ht,...n},i={...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=D(c,r,s),d=r,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:y,data:w,reset:x}=await h({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,p={...p,[i]:{...p[i],...w}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:f,y:u}=D(c,d,s))),n=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:p}})(t,e,{...o,platform:i})};var Ot="undefined"!=typeof document?e:n;function Tt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!Tt(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!t.$$typeof)&&!Tt(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function Lt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ct(t,e){const n=Lt(t);return Math.round(e*n)/n}function Et(e){const n=t.useRef(e);return Ot((()=>{n.current=e})),n}const Dt=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:r}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?At({element:n.current,padding:r}).fn(e):{}:n?At({element:n,padding:r}).fn(e):{};var o}}),Ht=(t,e)=>({...xt(t),options:[t,e]}),kt=(t,e)=>({...Pt(t),options:[t,e]}),Ft=(t,e)=>({...vt(t),options:[t,e]}),Wt=(t,e)=>({...bt(t),options:[t,e]}),Bt=(t,e)=>({...Rt(t),options:[t,e]}),Mt=(t,e)=>({...Dt(t),options:[t,e]});var $t=t.forwardRef(((t,e)=>{const{children:n,width:r=10,height:l=5,...a}=t;return i(o.svg,{...a,ref:e,width:r,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:i("polygon",{points:"0,0 30,0 15,10"})})}));$t.displayName="Arrow";var jt=$t,Nt="Popper",[_t,zt]=a(Nt),[Vt,Yt]=_t(Nt),Xt=e=>{const{__scopePopper:n,children:r}=e,[o,l]=t.useState(null);return i(Vt,{scope:n,anchor:o,onAnchorChange:l,children:r})};Xt.displayName=Nt;var It="PopperAnchor",qt=t.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:a,...s}=e,c=Yt(It,r),f=t.useRef(null),u=l(n,f);return t.useEffect((()=>{c.onAnchorChange(a?.current||f.current)})),a?null:i(o.div,{...s,ref:u})}));qt.displayName=It;var Gt="PopperContent",[Jt,Kt]=_t(Gt),Qt=t.forwardRef(((e,n)=>{const{__scopePopper:a,side:u="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:R,...A}=e,P=Yt(Gt,a),[S,O]=t.useState(null),T=l(n,(t=>O(t))),[L,C]=t.useState(null),E=f(L),D=E?.width??0,H=E?.height??0,k=u+("center"!==p?"-"+p:""),F="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},W=Array.isArray(y)?y:[y],B=W.length>0,M={padding:F,boundary:W.filter(ee),altBoundary:B},{refs:$,floatingStyles:j,placement:N,isPositioned:_,middlewareData:z}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[d,p]=t.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(i);Tt(m,i)||h(i);const[g,y]=t.useState(null),[w,x]=t.useState(null),v=t.useCallback((t=>{t!==P.current&&(P.current=t,y(t))}),[]),b=t.useCallback((t=>{t!==S.current&&(S.current=t,x(t))}),[]),R=a||g,A=s||w,P=t.useRef(null),S=t.useRef(null),O=t.useRef(d),T=null!=f,L=Et(f),C=Et(l),E=Et(u),D=t.useCallback((()=>{if(!P.current||!S.current)return;const t={placement:n,strategy:o,middleware:m};C.current&&(t.platform=C.current),St(P.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==E.current};H.current&&!Tt(O.current,e)&&(O.current=e,r.flushSync((()=>{p(e)})))}))}),[m,n,o,C,E]);Ot((()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p((t=>({...t,isPositioned:!1}))))}),[u]);const H=t.useRef(!1);Ot((()=>(H.current=!0,()=>{H.current=!1})),[]),Ot((()=>{if(R&&(P.current=R),A&&(S.current=A),R&&A){if(L.current)return L.current(R,A,D);D()}}),[R,A,D,L,T]);const k=t.useMemo((()=>({reference:P,floating:S,setReference:v,setFloating:b})),[v,b]),F=t.useMemo((()=>({reference:R,floating:A})),[R,A]),W=t.useMemo((()=>{const t={position:o,left:0,top:0};if(!F.floating)return t;const e=Ct(F.floating,d.x),n=Ct(F.floating,d.y);return c?{...t,transform:"translate("+e+"px, "+n+"px)",...Lt(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:e,top:n}}),[o,c,F.floating,d.x,d.y]);return t.useMemo((()=>({...d,update:D,refs:k,elements:F,floatingStyles:W})),[d,D,k,F,W])}({strategy:"fixed",placement:k,whileElementsMounted:(...t)=>yt(...t,{animationFrame:"always"===b}),elements:{reference:P.anchor},middleware:[(V={mainAxis:d+H,alignmentAxis:m},{...wt(V),options:[V,Y]}),g&&Ht({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?kt():void 0,...M}),g&&Ft({...M}),Wt({...M,apply:({elements:t,rects:e,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=e.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}}),L&&Mt({element:L,padding:h}),ne({arrowWidth:D,arrowHeight:H}),v&&Bt({strategy:"referenceHidden",...M})]});var V,Y;const[X,I]=re(N),q=s(R);c((()=>{_&&q?.()}),[_,q]);const G=z.arrow?.x,J=z.arrow?.y,K=0!==z.arrow?.centerOffset,[Q,U]=t.useState();return c((()=>{S&&U(window.getComputedStyle(S).zIndex)}),[S]),i("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:_?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i(Jt,{scope:a,placedSide:X,onArrowChange:C,arrowX:G,arrowY:J,shouldHideArrow:K,children:i(o.div,{"data-side":X,"data-align":I,...A,ref:T,style:{...A.style,animation:_?void 0:"none"}})})})}));Qt.displayName=Gt;var Ut="PopperArrow",Zt={top:"bottom",right:"left",bottom:"top",left:"right"},te=t.forwardRef((function(t,e){const{__scopePopper:n,...r}=t,o=Kt(Ut,n),l=Zt[o.placedSide];return i("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i(jt,{...r,ref:e,style:{...r.style,display:"block"}})})}));function ee(t){return null!==t}te.displayName=Ut;var ne=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:o}=e,i=0!==o.arrow?.centerOffset,l=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[s,c]=re(n),f={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+l/2,d=(o.arrow?.y??0)+a/2;let p="",m="";return"bottom"===s?(p=i?f:`${u}px`,m=-a+"px"):"top"===s?(p=i?f:`${u}px`,m=`${r.floating.height+a}px`):"right"===s?(p=-a+"px",m=i?f:`${d}px`):"left"===s&&(p=`${r.floating.width+a}px`,m=i?f:`${d}px`),{data:{x:p,y:m}}}});function re(t){const[e,n="center"]=t.split("-");return[e,n]}var oe=Xt,ie=qt,le=Qt,ae=te;export{ie as A,le as C,oe as R,ae as a,zt as c};
2
- //# sourceMappingURL=index-CsbH4Chn.mjs.map
1
+ import*as t from"react";import{useLayoutEffect as e,useEffect as n}from"react";import*as r from"react-dom";import{P as o}from"./index-BEeVpO2_.mjs";import{jsx as i}from"react/jsx-runtime";import{u as l}from"./index-BE7U1lz3.mjs";import{c as a}from"./index-BOtb6ofV.mjs";import{u as s}from"./index-DspU1Pyo.mjs";import{u as c}from"./index-CIfe3UIG.mjs";import{u as f}from"./index-rHca3YxT.mjs";const u=["top","right","bottom","left"],d=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=t=>({x:t,y:t}),y={left:"right",right:"left",bottom:"top",top:"bottom"},w={start:"end",end:"start"};function x(t,e,n){return p(t,d(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function b(t){return t.split("-")[0]}function R(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function P(t){return"y"===t?"height":"width"}function S(t){return["top","bottom"].includes(b(t))?"y":"x"}function O(t){return A(S(t))}function T(t){return t.replace(/start|end/g,(t=>w[t]))}function L(t){return t.replace(/left|right|bottom|top/g,(t=>y[t]))}function C(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function E(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:r,floating:o}=t;const i=S(e),l=O(e),a=P(l),s=b(e),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(R(e)){case"start":p[l]-=d*(n&&c?-1:1);break;case"end":p[l]+=d*(n&&c?-1:1)}return p}async function H(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=v(e,t),m=C(p),h=a[d?"floating"===u?"reference":"floating":u],g=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(g.top-b.top+m.top)/x.y,bottom:(b.bottom-g.bottom+m.bottom)/x.y,left:(g.left-b.left+m.left)/x.x,right:(b.right-g.right+m.right)/x.x}}function k(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return u.some((e=>t[e]>=0))}function W(){return"undefined"!=typeof window}function B(t){return j(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(j(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function j(t){return!!W()&&(t instanceof Node||t instanceof M(t).Node)}function N(t){return!!W()&&(t instanceof Element||t instanceof M(t).Element)}function _(t){return!!W()&&(t instanceof HTMLElement||t instanceof M(t).HTMLElement)}function z(t){return!(!W()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function V(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=J(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Y(t){return["table","td","th"].includes(B(t))}function X(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function I(t){const e=q(),n=N(t)?J(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(B(t))}function J(t){return M(t).getComputedStyle(t)}function K(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Q(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||z(t)&&t.host||$(t);return z(e)?e.host:e}function U(t){const e=Q(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&V(e)?e:U(e)}function Z(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=U(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),l=M(o);if(i){const t=tt(l);return e.concat(l,l.visualViewport||[],V(o)?o:[],t&&n?Z(t):[])}return e.concat(o,Z(o,[],n))}function tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function et(t){const e=J(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=_(t),i=o?t.offsetWidth:n,l=o?t.offsetHeight:r,a=m(n)!==i||m(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function nt(t){return N(t)?t:t.contextElement}function rt(t){const e=nt(t);if(!_(e))return g(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=et(e);let l=(i?m(n.width):n.width)/r,a=(i?m(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ot=g(0);function it(t){const e=M(t);return q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ot}function lt(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=nt(t);let l=g(1);e&&(r?N(r)&&(l=rt(r)):l=rt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==M(t))&&e}(i,n,r)?it(i):g(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,f=o.width/l.x,u=o.height/l.y;if(i){const t=M(i),e=r&&N(r)?M(r):r;let n=t,o=tt(n);for(;o&&r&&e!==n;){const t=rt(o),e=o.getBoundingClientRect(),r=J(o),i=e.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,l=e.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x,c*=t.y,f*=t.x,u*=t.y,s+=i,c+=l,n=M(o),o=tt(n)}}return E({width:f,height:u,x:s,y:c})}function at(t,e){const n=K(t).scrollLeft;return e?e.left+n:lt($(t)).left+n}function st(t,e,n){void 0===n&&(n=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(n?0:at(t,r)),y:r.top+e.scrollTop}}function ct(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=M(t),r=$(t),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const t=q();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(t,n);else if("document"===e)r=function(t){const e=$(t),n=K(t),r=t.ownerDocument.body,o=p(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=p(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+at(t);const a=-n.scrollTop;return"rtl"===J(r).direction&&(l+=p(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}($(t));else if(N(e))r=function(t,e){const n=lt(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=_(t)?rt(t):g(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=it(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return E(r)}function ft(t,e){const n=Q(t);return!(n===e||!N(n)||G(n))&&("fixed"===J(n).position||ft(n,e))}function ut(t,e,n){const r=_(e),o=$(e),i="fixed"===n,l=lt(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const s=g(0);function c(){s.x=at(o)}if(r||!r&&!i)if(("body"!==B(e)||V(o))&&(a=K(e)),r){const t=lt(e,!0,i,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?g(0):st(o,a);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function dt(t){return"static"===J(t).position}function pt(t,e){if(!_(t)||"fixed"===J(t).position)return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function mt(t,e){const n=M(t);if(X(t))return n;if(!_(t)){let e=Q(t);for(;e&&!G(e);){if(N(e)&&!dt(e))return e;e=Q(e)}return n}let r=pt(t,e);for(;r&&Y(r)&&dt(r);)r=pt(r,e);return r&&G(r)&&dt(r)&&!I(r)?n:r||function(t){let e=Q(t);for(;_(e)&&!G(e);){if(I(e))return e;if(X(e))return null;e=Q(e)}return null}(t)||n}const ht={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i="fixed"===o,l=$(r),a=!!e&&X(e.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=g(1);const f=g(0),u=_(r);if((u||!u&&!i)&&(("body"!==B(r)||V(l))&&(s=K(r)),_(r))){const t=lt(r);c=rt(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}const d=!l||u||i?g(0):st(l,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[..."clippingAncestors"===n?X(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Z(t,[],!1).filter((t=>N(t)&&"body"!==B(t))),o=null;const i="fixed"===J(t).position;let l=i?Q(t):t;for(;N(l)&&!G(l);){const e=J(l),n=I(l);n||"fixed"!==e.position||(o=null),(i?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||V(l)&&!n&&ft(t,l))?r=r.filter((t=>t!==l)):o=e,l=Q(l)}return e.set(t,r),r}(e,this._c):[].concat(n),r],l=i[0],a=i.reduce(((t,n)=>{const r=ct(e,n,o);return t.top=p(r.top,t.top),t.right=d(r.right,t.right),t.bottom=d(r.bottom,t.bottom),t.left=p(r.left,t.left),t}),ct(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:mt,getElementRects:async function(t){const e=this.getOffsetParent||mt,n=this.getDimensions,r=await n(t.floating);return{reference:ut(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=et(t);return{width:e,height:n}},getScale:rt,isElement:N,isRTL:function(t){return"rtl"===J(t).direction}};function gt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function yt(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=nt(t),f=o||i?[...c?Z(c):[],...Z(e)]:[];f.forEach((t=>{o&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const u=c&&a?function(t,e){let n,r=null;const o=$(t);function i(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=t.getBoundingClientRect(),{left:f,top:u,width:m,height:g}=c;if(a||e(),!m||!g)return;const y={rootMargin:-h(u)+"px "+-h(o.clientWidth-(f+m))+"px "+-h(o.clientHeight-(u+g))+"px "+-h(f)+"px",threshold:p(0,d(1,s))||1};let w=!0;function x(e){const r=e[0].intersectionRatio;if(r!==s){if(!w)return l();r?l(!1,r):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}1!==r||gt(c,t.getBoundingClientRect())||l(),w=!1}try{r=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch(t){r=new IntersectionObserver(x,y)}r.observe(t)}(!0),i}(c,n):null;let m,g=-1,y=null;l&&(y=new ResizeObserver((t=>{let[r]=t;r&&r.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),c&&!s&&y.observe(c),y.observe(e));let w=s?lt(t):null;return s&&function e(){const r=lt(t);w&&!gt(w,r)&&n();w=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach((t=>{o&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==u||u(),null==(t=y)||t.disconnect(),y=null,s&&cancelAnimationFrame(m)}}const wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=e,s=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=b(n),a=R(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,u=v(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(e,t);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},xt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...s}=v(t,e),c={x:n,y:r},f=await H(e,s),u=S(b(o)),d=A(u);let p=c[d],m=c[u];if(i){const t="y"===d?"bottom":"right";p=x(p+f["y"===d?"top":"left"],p,p-f[t])}if(l){const t="y"===u?"bottom":"right";m=x(m+f["y"===u?"top":"left"],m,m-f[t])}const h=a.fn({...e,[d]:p,[u]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:i,[u]:l}}}}}},vt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=b(o),w=S(a),x=b(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=d||(x||!h?[L(a)]:function(t){const e=L(t);return[T(t),e,T(e)]}(a)),E="none"!==m;!d&&E&&C.push(...function(t,e,n,r){const o=R(t);let i=function(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:l;default:return[]}}(b(t),"start"===n,r);return o&&(i=i.map((t=>t+"-"+o)),e&&(i=i.concat(i.map(T)))),i}(a,h,m,A));const D=[a,...C],k=await H(e,g),F=[];let W=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&F.push(k[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const r=R(t),o=O(t),i=P(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(l=L(l)),[l,L(l)]}(o,l,A);F.push(k[t[0]],k[t[1]])}if(W=[...W,{placement:o,overflows:F}],!F.every((t=>t<=0))){var B,M;const t=((null==(B=i.flip)?void 0:B.index)||0)+1,e=D[t];if(e){var $;const n="alignment"===u&&w!==S(e),r=(null==($=W[0])?void 0:$.overflows[0])>0;if(!n||r)return{data:{index:t,overflows:W},reset:{placement:e}}}let n=null==(M=W.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var j;const t=null==(j=W.filter((t=>{if(E){const e=S(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},bt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:i,platform:l,elements:a}=e,{apply:s=()=>{},...c}=v(t,e),f=await H(e,c),u=b(o),m=R(o),h="y"===S(o),{width:g,height:y}=i.floating;let w,x;"top"===u||"bottom"===u?(w=u,x=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(x=u,w="end"===m?"top":"bottom");const A=y-f.top-f.bottom,P=g-f.left-f.right,O=d(y-f[w],A),T=d(g-f[x],P),L=!e.middlewareData.shift;let C=O,E=T;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(E=P),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(C=A),L&&!m){const t=p(f.left,0),e=p(f.right,0),n=p(f.top,0),r=p(f.bottom,0);h?E=g-2*(0!==t||0!==e?t+e:p(f.left,f.right)):C=y-2*(0!==n||0!==r?n+r:p(f.top,f.bottom))}await s({...e,availableWidth:E,availableHeight:C});const D=await l.getDimensions(a.floating);return g!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}},Rt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=v(t,e);switch(r){case"referenceHidden":{const t=k(await H(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=k(await H(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}},At=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:s}=e,{element:c,padding:f=0}=v(t,e)||{};if(null==c)return{};const u=C(f),p={x:n,y:r},m=O(o),h=P(m),g=await l.getDimensions(c),y="y"===m,w=y?"top":"left",b=y?"bottom":"right",A=y?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[m]-p[m]-i.floating[h],T=p[m]-i.reference[m],L=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let E=L?L[A]:0;E&&await(null==l.isElement?void 0:l.isElement(L))||(E=a.floating[A]||i.floating[h]);const D=S/2-T/2,H=E/2-g[h]/2-1,k=d(u[w],H),F=d(u[b],H),W=k,B=E-g[h]-F,M=E/2-g[h]/2+D,$=x(W,M,B),j=!s.arrow&&null!=R(o)&&M!==$&&i.reference[h]/2-(M<W?k:F)-g[h]/2<0,N=j?M<W?M-W:M-B:0;return{[m]:p[m]+N,data:{[m]:$,centerOffset:M-$-N,...j&&{alignmentOffset:N}},reset:j}}}),Pt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=v(t,e),f={x:n,y:r},u=S(o),d=A(u);let p=f[d],m=f[u];const h=v(a,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const t="y"===d?"height":"width",e=i.reference[d]-i.floating[t]+g.mainAxis,n=i.reference[d]+i.reference[t]-g.mainAxis;p<e?p=e:p>n&&(p=n)}if(c){var y,w;const t="y"===d?"width":"height",e=["top","left"].includes(b(o)),n=i.reference[u]-i.floating[t]+(e&&(null==(y=l.offset)?void 0:y[u])||0)+(e?0:g.crossAxis),r=i.reference[u]+i.reference[t]+(e?0:(null==(w=l.offset)?void 0:w[u])||0)-(e?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},St=(t,e,n)=>{const r=new Map,o={platform:ht,...n},i={...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=D(c,r,s),d=r,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:y,data:w,reset:x}=await h({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,p={...p,[i]:{...p[i],...w}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:f,y:u}=D(c,d,s))),n=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:p}})(t,e,{...o,platform:i})};var Ot="undefined"!=typeof document?e:n;function Tt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!Tt(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!t.$$typeof)&&!Tt(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function Lt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ct(t,e){const n=Lt(t);return Math.round(e*n)/n}function Et(e){const n=t.useRef(e);return Ot((()=>{n.current=e})),n}const Dt=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:r}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?At({element:n.current,padding:r}).fn(e):{}:n?At({element:n,padding:r}).fn(e):{};var o}}),Ht=(t,e)=>({...xt(t),options:[t,e]}),kt=(t,e)=>({...Pt(t),options:[t,e]}),Ft=(t,e)=>({...vt(t),options:[t,e]}),Wt=(t,e)=>({...bt(t),options:[t,e]}),Bt=(t,e)=>({...Rt(t),options:[t,e]}),Mt=(t,e)=>({...Dt(t),options:[t,e]});var $t=t.forwardRef(((t,e)=>{const{children:n,width:r=10,height:l=5,...a}=t;return i(o.svg,{...a,ref:e,width:r,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:i("polygon",{points:"0,0 30,0 15,10"})})}));$t.displayName="Arrow";var jt=$t,Nt="Popper",[_t,zt]=a(Nt),[Vt,Yt]=_t(Nt),Xt=e=>{const{__scopePopper:n,children:r}=e,[o,l]=t.useState(null);return i(Vt,{scope:n,anchor:o,onAnchorChange:l,children:r})};Xt.displayName=Nt;var It="PopperAnchor",qt=t.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:a,...s}=e,c=Yt(It,r),f=t.useRef(null),u=l(n,f);return t.useEffect((()=>{c.onAnchorChange(a?.current||f.current)})),a?null:i(o.div,{...s,ref:u})}));qt.displayName=It;var Gt="PopperContent",[Jt,Kt]=_t(Gt),Qt=t.forwardRef(((e,n)=>{const{__scopePopper:a,side:u="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:R,...A}=e,P=Yt(Gt,a),[S,O]=t.useState(null),T=l(n,(t=>O(t))),[L,C]=t.useState(null),E=f(L),D=E?.width??0,H=E?.height??0,k=u+("center"!==p?"-"+p:""),F="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},W=Array.isArray(y)?y:[y],B=W.length>0,M={padding:F,boundary:W.filter(ee),altBoundary:B},{refs:$,floatingStyles:j,placement:N,isPositioned:_,middlewareData:z}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[d,p]=t.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(i);Tt(m,i)||h(i);const[g,y]=t.useState(null),[w,x]=t.useState(null),v=t.useCallback((t=>{t!==P.current&&(P.current=t,y(t))}),[]),b=t.useCallback((t=>{t!==S.current&&(S.current=t,x(t))}),[]),R=a||g,A=s||w,P=t.useRef(null),S=t.useRef(null),O=t.useRef(d),T=null!=f,L=Et(f),C=Et(l),E=Et(u),D=t.useCallback((()=>{if(!P.current||!S.current)return;const t={placement:n,strategy:o,middleware:m};C.current&&(t.platform=C.current),St(P.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==E.current};H.current&&!Tt(O.current,e)&&(O.current=e,r.flushSync((()=>{p(e)})))}))}),[m,n,o,C,E]);Ot((()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p((t=>({...t,isPositioned:!1}))))}),[u]);const H=t.useRef(!1);Ot((()=>(H.current=!0,()=>{H.current=!1})),[]),Ot((()=>{if(R&&(P.current=R),A&&(S.current=A),R&&A){if(L.current)return L.current(R,A,D);D()}}),[R,A,D,L,T]);const k=t.useMemo((()=>({reference:P,floating:S,setReference:v,setFloating:b})),[v,b]),F=t.useMemo((()=>({reference:R,floating:A})),[R,A]),W=t.useMemo((()=>{const t={position:o,left:0,top:0};if(!F.floating)return t;const e=Ct(F.floating,d.x),n=Ct(F.floating,d.y);return c?{...t,transform:"translate("+e+"px, "+n+"px)",...Lt(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:e,top:n}}),[o,c,F.floating,d.x,d.y]);return t.useMemo((()=>({...d,update:D,refs:k,elements:F,floatingStyles:W})),[d,D,k,F,W])}({strategy:"fixed",placement:k,whileElementsMounted:(...t)=>yt(...t,{animationFrame:"always"===b}),elements:{reference:P.anchor},middleware:[(V={mainAxis:d+H,alignmentAxis:m},{...wt(V),options:[V,Y]}),g&&Ht({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?kt():void 0,...M}),g&&Ft({...M}),Wt({...M,apply:({elements:t,rects:e,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=e.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}}),L&&Mt({element:L,padding:h}),ne({arrowWidth:D,arrowHeight:H}),v&&Bt({strategy:"referenceHidden",...M})]});var V,Y;const[X,I]=re(N),q=s(R);c((()=>{_&&q?.()}),[_,q]);const G=z.arrow?.x,J=z.arrow?.y,K=0!==z.arrow?.centerOffset,[Q,U]=t.useState();return c((()=>{S&&U(window.getComputedStyle(S).zIndex)}),[S]),i("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:_?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i(Jt,{scope:a,placedSide:X,onArrowChange:C,arrowX:G,arrowY:J,shouldHideArrow:K,children:i(o.div,{"data-side":X,"data-align":I,...A,ref:T,style:{...A.style,animation:_?void 0:"none"}})})})}));Qt.displayName=Gt;var Ut="PopperArrow",Zt={top:"bottom",right:"left",bottom:"top",left:"right"},te=t.forwardRef((function(t,e){const{__scopePopper:n,...r}=t,o=Kt(Ut,n),l=Zt[o.placedSide];return i("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i(jt,{...r,ref:e,style:{...r.style,display:"block"}})})}));function ee(t){return null!==t}te.displayName=Ut;var ne=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:o}=e,i=0!==o.arrow?.centerOffset,l=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[s,c]=re(n),f={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+l/2,d=(o.arrow?.y??0)+a/2;let p="",m="";return"bottom"===s?(p=i?f:`${u}px`,m=-a+"px"):"top"===s?(p=i?f:`${u}px`,m=`${r.floating.height+a}px`):"right"===s?(p=-a+"px",m=i?f:`${d}px`):"left"===s&&(p=`${r.floating.width+a}px`,m=i?f:`${d}px`),{data:{x:p,y:m}}}});function re(t){const[e,n="center"]=t.split("-");return[e,n]}var oe=Xt,ie=qt,le=Qt,ae=te;export{ie as A,le as C,oe as R,ae as a,zt as c};
2
+ //# sourceMappingURL=index-C8ZqoA88.mjs.map