ivt 0.0.6 → 0.0.7

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 (123) hide show
  1. package/dist/accordion/index.mjs +1 -1
  2. package/dist/badge/index.mjs +1 -1
  3. package/dist/base/index.mjs +1 -1
  4. package/dist/button/index.d.ts +4 -3
  5. package/dist/button/index.mjs +1 -1
  6. package/dist/calendar/index.d.ts +2 -1
  7. package/dist/calendar/index.mjs +1 -1
  8. package/dist/card/index.mjs +1 -1
  9. package/dist/checkbox/index.mjs +1 -1
  10. package/dist/chunks/{Combination-w1gWj54H.mjs → Combination-CyYyS_SM.mjs} +2 -2
  11. package/dist/chunks/{Combination-w1gWj54H.mjs.map → Combination-CyYyS_SM.mjs.map} +1 -1
  12. package/dist/chunks/{TextWrap-CjH4DiRJ.mjs → TextWrap-aRTaok1G.mjs} +2 -2
  13. package/dist/chunks/{TextWrap-CjH4DiRJ.mjs.map → TextWrap-aRTaok1G.mjs.map} +1 -1
  14. package/dist/chunks/{accordion-B9KfEWUD.mjs → accordion-DpawKek3.mjs} +2 -2
  15. package/dist/chunks/{accordion-B9KfEWUD.mjs.map → accordion-DpawKek3.mjs.map} +1 -1
  16. package/dist/chunks/{bundle-mjs-WLX8GCHw.mjs → bundle-mjs-DnMeAVOT.mjs} +1 -1
  17. package/dist/chunks/{bundle-mjs-WLX8GCHw.mjs.map → bundle-mjs-DnMeAVOT.mjs.map} +1 -1
  18. package/dist/chunks/{button-C25JgpF1.mjs → button-CUUUd-GC.mjs} +2 -2
  19. package/dist/chunks/{button-C25JgpF1.mjs.map → button-CUUUd-GC.mjs.map} +1 -1
  20. package/dist/chunks/{calendar-Bg8q2q0f.mjs → calendar-Bgc5EEL2.mjs} +2 -2
  21. package/dist/chunks/calendar-Bgc5EEL2.mjs.map +1 -0
  22. package/dist/chunks/check-0el77MKz.mjs +2 -0
  23. package/dist/chunks/{check-B7qxEGdi.mjs.map → check-0el77MKz.mjs.map} +1 -1
  24. package/dist/chunks/chevron-down-D5Xyp48A.mjs +2 -0
  25. package/dist/chunks/{chevron-down-C5QWUB1b.mjs.map → chevron-down-D5Xyp48A.mjs.map} +1 -1
  26. package/dist/chunks/chevron-left-DSinxt9A.mjs +2 -0
  27. package/dist/chunks/{chevron-left-yZO8_iYx.mjs.map → chevron-left-DSinxt9A.mjs.map} +1 -1
  28. package/dist/chunks/chevron-right-DvIJOX9A.mjs +2 -0
  29. package/dist/chunks/{chevron-right-DX1OAykB.mjs.map → chevron-right-DvIJOX9A.mjs.map} +1 -1
  30. package/dist/chunks/{command-BdZ-rcJh.mjs → command-BkvrXopz.mjs} +2 -2
  31. package/dist/chunks/{command-BdZ-rcJh.mjs.map → command-BkvrXopz.mjs.map} +1 -1
  32. package/dist/chunks/{createLucideIcon-CRElQpLA.mjs → createLucideIcon-De2tZJhv.mjs} +1 -1
  33. package/dist/chunks/{createLucideIcon-CRElQpLA.mjs.map → createLucideIcon-De2tZJhv.mjs.map} +1 -1
  34. package/dist/chunks/{dialog-BEfPREgp.mjs → dialog-Ci5YNXh2.mjs} +2 -2
  35. package/dist/chunks/{dialog-BEfPREgp.mjs.map → dialog-Ci5YNXh2.mjs.map} +1 -1
  36. package/dist/chunks/{index-BFX-PqV0.mjs → index-0ulImjdF.mjs} +2 -2
  37. package/dist/chunks/{index-BFX-PqV0.mjs.map → index-0ulImjdF.mjs.map} +1 -1
  38. package/dist/chunks/{index-D1rtromL.mjs → index-BGhqW2Il.mjs} +1 -1
  39. package/dist/chunks/{index-D1rtromL.mjs.map → index-BGhqW2Il.mjs.map} +1 -1
  40. package/dist/chunks/{index-CIU1Xq1J.mjs → index-BuGzJybI.mjs} +2 -2
  41. package/dist/chunks/{index-CIU1Xq1J.mjs.map → index-BuGzJybI.mjs.map} +1 -1
  42. package/dist/chunks/{index-oT2uIdb1.mjs → index-C5go0LX8.mjs} +1 -1
  43. package/dist/chunks/{index-oT2uIdb1.mjs.map → index-C5go0LX8.mjs.map} +1 -1
  44. package/dist/chunks/{index-COE6uEyP.mjs → index-CVTJI-8T.mjs} +2 -2
  45. package/dist/chunks/{index-COE6uEyP.mjs.map → index-CVTJI-8T.mjs.map} +1 -1
  46. package/dist/chunks/{index-DP22y5yX.mjs → index-CllKujAS.mjs} +2 -2
  47. package/dist/chunks/{index-DP22y5yX.mjs.map → index-CllKujAS.mjs.map} +1 -1
  48. package/dist/chunks/{index-CN1SA0_I.mjs → index-CmGsz_8M.mjs} +1 -1
  49. package/dist/chunks/{index-CN1SA0_I.mjs.map → index-CmGsz_8M.mjs.map} +1 -1
  50. package/dist/chunks/{index-46Dn4Q--.mjs → index-DMXVIqDM.mjs} +2 -2
  51. package/dist/chunks/{index-46Dn4Q--.mjs.map → index-DMXVIqDM.mjs.map} +1 -1
  52. package/dist/chunks/{index-DyAmMjEH.mjs → index-DhIMkiDX.mjs} +2 -2
  53. package/dist/chunks/{index-DyAmMjEH.mjs.map → index-DhIMkiDX.mjs.map} +1 -1
  54. package/dist/chunks/{index-CYJu5yO5.mjs → index-Eo-UV7HL.mjs} +2 -2
  55. package/dist/chunks/{index-CYJu5yO5.mjs.map → index-Eo-UV7HL.mjs.map} +1 -1
  56. package/dist/chunks/{index-DM6C2fpF.mjs → index-SI7n7FwH.mjs} +2 -2
  57. package/dist/chunks/{index-DM6C2fpF.mjs.map → index-SI7n7FwH.mjs.map} +1 -1
  58. package/dist/chunks/{index-ClSqYyO3.mjs → index-wbuw6FYR.mjs} +1 -1
  59. package/dist/chunks/{index-ClSqYyO3.mjs.map → index-wbuw6FYR.mjs.map} +1 -1
  60. package/dist/chunks/{input-D7H1CxUv.mjs → input-YYNIX4HJ.mjs} +2 -2
  61. package/dist/chunks/{input-D7H1CxUv.mjs.map → input-YYNIX4HJ.mjs.map} +1 -1
  62. package/dist/chunks/{label-Cue4yhAm.mjs → label-xCRg1H88.mjs} +2 -2
  63. package/dist/chunks/{label-Cue4yhAm.mjs.map → label-xCRg1H88.mjs.map} +1 -1
  64. package/dist/chunks/{pagination-BYLwRYiM.mjs → pagination-CJBX9rpr.mjs} +2 -2
  65. package/dist/chunks/{pagination-BYLwRYiM.mjs.map → pagination-CJBX9rpr.mjs.map} +1 -1
  66. package/dist/chunks/{popover-fxWu9ghI.mjs → popover-C5RxsRcQ.mjs} +2 -2
  67. package/dist/chunks/{popover-fxWu9ghI.mjs.map → popover-C5RxsRcQ.mjs.map} +1 -1
  68. package/dist/chunks/{progress-CKxTxjba.mjs → progress-D1bk3yWe.mjs} +2 -2
  69. package/dist/chunks/{progress-CKxTxjba.mjs.map → progress-D1bk3yWe.mjs.map} +1 -1
  70. package/dist/chunks/{scroll-area-DSDAk121.mjs → scroll-area-00P-K3zA.mjs} +2 -2
  71. package/dist/chunks/{scroll-area-DSDAk121.mjs.map → scroll-area-00P-K3zA.mjs.map} +1 -1
  72. package/dist/chunks/{select-BtEQWkQs.mjs → select-3Bu7wZI4.mjs} +2 -2
  73. package/dist/chunks/{select-BtEQWkQs.mjs.map → select-3Bu7wZI4.mjs.map} +1 -1
  74. package/dist/chunks/{skeleton-DsvXPbHg.mjs → skeleton-Cug3TaOR.mjs} +2 -2
  75. package/dist/chunks/{skeleton-DsvXPbHg.mjs.map → skeleton-Cug3TaOR.mjs.map} +1 -1
  76. package/dist/chunks/{sortable-D4tl3H9D.mjs → sortable-BfuXuKfa.mjs} +2 -2
  77. package/dist/chunks/{sortable-D4tl3H9D.mjs.map → sortable-BfuXuKfa.mjs.map} +1 -1
  78. package/dist/chunks/{table-Cql47amq.mjs → table-BEFxdl4s.mjs} +2 -2
  79. package/dist/chunks/{table-Cql47amq.mjs.map → table-BEFxdl4s.mjs.map} +1 -1
  80. package/dist/chunks/{tslib.es6-C59-pKsO.mjs → tslib.es6-BF29wwud.mjs} +1 -1
  81. package/dist/chunks/{tslib.es6-C59-pKsO.mjs.map → tslib.es6-BF29wwud.mjs.map} +1 -1
  82. package/dist/chunks/{utils-Dd3mX7Lt.mjs → utils-ihtedRak.mjs} +2 -2
  83. package/dist/chunks/{utils-Dd3mX7Lt.mjs.map → utils-ihtedRak.mjs.map} +1 -1
  84. package/dist/chunks/x-CTH8w2xf.mjs +2 -0
  85. package/dist/chunks/{x-CYyikW5M.mjs.map → x-CTH8w2xf.mjs.map} +1 -1
  86. package/dist/command/index.mjs +1 -1
  87. package/dist/data-table/index.d.ts +1 -0
  88. package/dist/data-table/index.mjs +1 -1
  89. package/dist/data-table/index.mjs.map +1 -1
  90. package/dist/dialog/index.mjs +1 -1
  91. package/dist/dropdown-menu/index.mjs +1 -1
  92. package/dist/dropzone/index.d.ts +3 -1
  93. package/dist/dropzone/index.mjs +2 -2
  94. package/dist/dropzone/index.mjs.map +1 -1
  95. package/dist/form/index.mjs +1 -1
  96. package/dist/icon/index.mjs +1 -1
  97. package/dist/index/index.d.ts +1 -1
  98. package/dist/index.css +1 -7
  99. package/dist/input/index.mjs +1 -1
  100. package/dist/label/index.mjs +1 -1
  101. package/dist/pagination/index.mjs +1 -1
  102. package/dist/popover/index.mjs +1 -1
  103. package/dist/progress/index.mjs +1 -1
  104. package/dist/scroll-area/index.mjs +1 -1
  105. package/dist/select/index.mjs +1 -1
  106. package/dist/separator/index.mjs +1 -1
  107. package/dist/sheet/index.mjs +1 -1
  108. package/dist/skeleton/index.mjs +1 -1
  109. package/dist/sortable/index.mjs +1 -1
  110. package/dist/table/index.mjs +1 -1
  111. package/dist/tabs/index.mjs +1 -1
  112. package/dist/toast/index.d.ts +2 -1
  113. package/dist/toast/index.mjs +1 -1
  114. package/dist/toast/index.mjs.map +1 -1
  115. package/dist/tooltip/index.mjs +1 -1
  116. package/dist/tooltip/index.mjs.map +1 -1
  117. package/package.json +5 -4
  118. package/dist/chunks/calendar-Bg8q2q0f.mjs.map +0 -1
  119. package/dist/chunks/check-B7qxEGdi.mjs +0 -2
  120. package/dist/chunks/chevron-down-C5QWUB1b.mjs +0 -2
  121. package/dist/chunks/chevron-left-yZO8_iYx.mjs +0 -2
  122. package/dist/chunks/chevron-right-DX1OAykB.mjs +0 -2
  123. package/dist/chunks/x-CYyikW5M.mjs +0 -2
@@ -1,2 +1,2 @@
1
1
  import*as t from"react";import"react/jsx-runtime";var r=t.createContext(void 0);function e(e){const o=t.useContext(r);return e||o||"ltr"}export{e as u};
2
- //# sourceMappingURL=index-oT2uIdb1.mjs.map
2
+ //# sourceMappingURL=index-C5go0LX8.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-oT2uIdb1.mjs","sources":["../../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/Direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","createContext","useDirection","localDir","globalDir","useContext"],"mappings":"kDAGA,IAAMA,EAAyBC,EAAAC,mBAAqC,GAiBpE,SAASC,EAAaC,GACpB,MAAMC,EAAkBJ,EAAAK,WAAWN,GACnC,OAAOI,GAAYC,GAAa,KAClC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-C5go0LX8.mjs","sources":["../../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/Direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","createContext","useDirection","localDir","globalDir","useContext"],"mappings":"kDAGA,IAAMA,EAAyBC,EAAAC,mBAAqC,GAiBpE,SAASC,EAAaC,GACpB,MAAMC,EAAkBJ,EAAAK,WAAWN,GACnC,OAAOI,GAAYC,GAAa,KAClC","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{a as t,u as n,c as r,b as s}from"./index-ClSqYyO3.mjs";import{P as o,d as i}from"./index-CN1SA0_I.mjs";import{jsx as a}from"react/jsx-runtime";import u from"react-dom";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",v=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=e.forwardRef(((s,i)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(v),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=n(i,(e=>C(e))),R=Array.from(P.layers),[T]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),k=R.indexOf(T),W=L?R.indexOf(L):-1,B=P.layersWithOutsidePointerEventsDisabled.size>0,S=W>=k,F=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){y(l,s,n,{discrete:!0})};const n={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,s]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...P.branches].some((e=>e.contains(t)));S&&!n&&(E?.(e),w?.(e),e.defaultPrevented||h?.())}),O),z=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){y(f,s,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(n,r=globalThis?.document){const s=t(n);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&s(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[s,r])}((e=>{W===P.layers.size-1&&(m?.(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))}),O),e.useEffect((()=>{if(L)return u&&(0===P.layersWithOutsidePointerEventsDisabled.size&&(c=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(L)),P.layers.add(L),p(),()=>{u&&1===P.layersWithOutsidePointerEventsDisabled.size&&(O.body.style.pointerEvents=c)}}),[L,O,u,P]),e.useEffect((()=>()=>{L&&(P.layers.delete(L),P.layersWithOutsidePointerEventsDisabled.delete(L),p())}),[L,P]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)}),[]),a(o.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:r(s.onFocusCapture,z.onFocusCapture),onBlurCapture:r(s.onBlurCapture,z.onBlurCapture),onPointerDownCapture:r(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var E=e.forwardRef(((t,r)=>{const s=e.useContext(v),i=e.useRef(null),u=n(r,i);return e.useEffect((()=>{const e=i.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}}),[s.branches]),a(o.div,{...t,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?i(s,o):s.dispatchEvent(o)}E.displayName="DismissableLayerBranch";var b=m,w=E,h=e.forwardRef(((t,n)=>{const{container:r,...i}=t,[c,d]=e.useState(!1);s((()=>d(!0)),[]);const l=r||c&&globalThis?.document?.body;return l?u.createPortal(a(o.div,{...i,ref:n}),l):null}));h.displayName="Portal";export{w as B,m as D,h as P,b as R};
2
- //# sourceMappingURL=index-COE6uEyP.mjs.map
1
+ import*as e from"react";import{a as t,u as n,c as r,b as s}from"./index-wbuw6FYR.mjs";import{P as o,d as i}from"./index-CmGsz_8M.mjs";import{jsx as a}from"react/jsx-runtime";import u from"react-dom";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",v=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=e.forwardRef(((s,i)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(v),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=n(i,(e=>C(e))),R=Array.from(P.layers),[T]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),k=R.indexOf(T),W=L?R.indexOf(L):-1,B=P.layersWithOutsidePointerEventsDisabled.size>0,S=W>=k,F=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){y(l,s,n,{discrete:!0})};const n={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,s]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...P.branches].some((e=>e.contains(t)));S&&!n&&(E?.(e),w?.(e),e.defaultPrevented||h?.())}),O),z=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){y(f,s,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(n,r=globalThis?.document){const s=t(n);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&s(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[s,r])}((e=>{W===P.layers.size-1&&(m?.(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))}),O),e.useEffect((()=>{if(L)return u&&(0===P.layersWithOutsidePointerEventsDisabled.size&&(c=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(L)),P.layers.add(L),p(),()=>{u&&1===P.layersWithOutsidePointerEventsDisabled.size&&(O.body.style.pointerEvents=c)}}),[L,O,u,P]),e.useEffect((()=>()=>{L&&(P.layers.delete(L),P.layersWithOutsidePointerEventsDisabled.delete(L),p())}),[L,P]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)}),[]),a(o.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:r(s.onFocusCapture,z.onFocusCapture),onBlurCapture:r(s.onBlurCapture,z.onBlurCapture),onPointerDownCapture:r(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var E=e.forwardRef(((t,r)=>{const s=e.useContext(v),i=e.useRef(null),u=n(r,i);return e.useEffect((()=>{const e=i.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}}),[s.branches]),a(o.div,{...t,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?i(s,o):s.dispatchEvent(o)}E.displayName="DismissableLayerBranch";var b=m,w=E,h=e.forwardRef(((t,n)=>{const{container:r,...i}=t,[c,d]=e.useState(!1);s((()=>d(!0)),[]);const l=r||c&&globalThis?.document?.body;return l?u.createPortal(a(o.div,{...i,ref:n}),l):null}));h.displayName="Portal";export{w as B,m as D,h as P,b as R};
2
+ //# sourceMappingURL=index-CVTJI-8T.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-COE6uEyP.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","DismissableLayerBranch","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Root","Branch","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],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AkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-CVTJI-8T.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","DismissableLayerBranch","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Root","Branch","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],"mappings":"uMAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAMC,GAAiBpB,EAAAqB,SAAyC,MACjEC,EAAgBH,GAAMG,eAAiBC,YAAYC,UAChD,CAAAC,GAAez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AI,CAEhC,GACC,CAACF,EAAQZ,WAELoF,EAACC,EAAUC,IAAV,IAAkBnF,EAAOoF,IAAKlE,GAAc,IA0HtD,SAAS4D,IACP,MAAMxC,EAAQ,IAAIkD,YAAYpG,GAC9B4B,SAASyE,cAAcnD,EACzB,CAEA,SAASI,EACPgD,EACAC,EACAC,GACAhD,SAAEA,IAEF,MAAML,EAASqD,EAAO/C,cAAcN,OAC9BD,EAAQ,IAAIkD,YAAYE,EAAM,CAAEG,SAAS,EAAOC,YAAY,EAAMF,WACpED,GAASpD,EAAOS,iBAAiB0C,EAAMC,EAA0B,CAAE1C,MAAM,IAEzEL,EACFmD,EAA4BxD,EAAQD,GAEpCC,EAAOkD,cAAcnD,EAEzB,CA3IAiD,EAAuBD,YA1BH,yBAuKpB,IAAMU,EAAOlG,EACPmG,EAASV,EE1UTW,EAAe1G,EAAAO,YAAuC,CAACC,EAAOC,KAClE,MAAQkG,UAAWC,KAAkBC,GAAgBrG,GAC9CsG,EAASC,GAAoB/G,EAAAqB,UAAS,GAC7C2F,GAAgB,IAAMD,GAAW,IAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{c as o,P as t,u as n}from"./index-ClSqYyO3.mjs";import{c as r,a}from"./index-D1rtromL.mjs";import{u as i}from"./index-DyAmMjEH.mjs";import{u as s}from"./index-46Dn4Q--.mjs";import{P as c,D as l}from"./index-COE6uEyP.mjs";import{h as u,R as d,u as p,F as f}from"./Combination-w1gWj54H.mjs";import{P as m}from"./index-CN1SA0_I.mjs";import{Slot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as R}from"react/jsx-runtime";var _="Dialog",[v,y]=r(_),[b,C]=v(_),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,u=e.useRef(null),d=e.useRef(null),[p=!1,f]=s({prop:r,defaultProp:a,onChange:c});return D(b,{scope:t,triggerRef:u,contentRef:d,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=_;var w="DialogTrigger",O=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(w,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":V(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));O.displayName=w;var F="DialogPortal",[N,P]=v(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",j=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(A,{...a,ref:o})}):null}));j.displayName=E;var A=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(d,{as:g,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":V(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),M="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(M,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(M,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D(k,{...a,ref:o}):D($,{...a,ref:o})})}));T.displayName=M;var k=e.forwardRef(((t,r)=>{const a=C(M,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return u(e)}),[]),D(W,{...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()))})})),$=e.forwardRef(((o,t)=>{const n=C(M,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(W,{...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()}})})),W=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,u=C(M,r),d=e.useRef(null),m=n(t,d);return p(),h(R,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":V(u.open),...c,ref:m,onDismiss:()=>u.onOpenChange(!1)})}),h(R,{children:[D(J,{titleId:u.titleId}),D(L,{contentRef:d,descriptionId:u.descriptionId})]})]})})),B="DialogTitle",S=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));S.displayName=B;var q="DialogDescription",H=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(q,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));H.displayName=q;var K="DialogClose",U=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(K,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function V(e){return e?"open":"closed"}U.displayName=K;var Z="DialogTitleWarning",[z,G]=a(Z,{contentName:M,titleName:B,docsSlug:"dialog"}),J=({titleId:o})=>{const t=G(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)||console.error(n)}}),[n,o]),null},L=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)||console.warn(n)}}),[n,o,t]),null},Q=I,X=O,Y=x,ee=j,oe=T,te=S,ne=H,re=U;export{re as C,ne as D,ee as O,Y as P,Q as R,te as T,oe as a,X as b};
2
- //# sourceMappingURL=index-DP22y5yX.mjs.map
1
+ import*as e from"react";import{c as o,P as t,u as n}from"./index-wbuw6FYR.mjs";import{c as r,a}from"./index-BGhqW2Il.mjs";import{u as i}from"./index-DhIMkiDX.mjs";import{u as s}from"./index-DMXVIqDM.mjs";import{P as c,D as l}from"./index-CVTJI-8T.mjs";import{h as u,R as d,u as p,F as f}from"./Combination-CyYyS_SM.mjs";import{P as m}from"./index-CmGsz_8M.mjs";import{Slot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as R}from"react/jsx-runtime";var _="Dialog",[v,y]=r(_),[b,C]=v(_),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,u=e.useRef(null),d=e.useRef(null),[p=!1,f]=s({prop:r,defaultProp:a,onChange:c});return D(b,{scope:t,triggerRef:u,contentRef:d,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=_;var w="DialogTrigger",O=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(w,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":V(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));O.displayName=w;var F="DialogPortal",[N,P]=v(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",j=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(A,{...a,ref:o})}):null}));j.displayName=E;var A=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(d,{as:g,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":V(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),M="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(M,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(M,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D(k,{...a,ref:o}):D($,{...a,ref:o})})}));T.displayName=M;var k=e.forwardRef(((t,r)=>{const a=C(M,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return u(e)}),[]),D(W,{...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()))})})),$=e.forwardRef(((o,t)=>{const n=C(M,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(W,{...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()}})})),W=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,u=C(M,r),d=e.useRef(null),m=n(t,d);return p(),h(R,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":V(u.open),...c,ref:m,onDismiss:()=>u.onOpenChange(!1)})}),h(R,{children:[D(J,{titleId:u.titleId}),D(L,{contentRef:d,descriptionId:u.descriptionId})]})]})})),B="DialogTitle",S=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));S.displayName=B;var q="DialogDescription",H=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(q,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));H.displayName=q;var K="DialogClose",U=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(K,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function V(e){return e?"open":"closed"}U.displayName=K;var Z="DialogTitleWarning",[z,G]=a(Z,{contentName:M,titleName:B,docsSlug:"dialog"}),J=({titleId:o})=>{const t=G(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)||console.error(n)}}),[n,o]),null},L=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)||console.warn(n)}}),[n,o,t]),null},Q=I,X=O,Y=x,ee=j,oe=T,te=S,ne=H,re=U;export{re as C,ne as D,ee as O,Y as P,Q as R,te as T,oe as a,X as b};
2
+ //# sourceMappingURL=index-CllKujAS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DP22y5yX.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/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 { Slot } 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 = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\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 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","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","RemoveScroll","as","Slot","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","console","error","describedById","getAttribute","warn","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,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAGZ,OACEW,EAACpB,EAAA,CACCqB,MAAOjB,EACPO,aACAG,aACAQ,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACfjB,OACAG,aAAcM,EACdW,aAAoBd,EAAAe,aAAY,IAAMZ,GAASa,IAAcA,KAAW,CAACb,IACzEL,QAECL,YAAA,EAKPH,EAAO2B,YAAcjC,EAMrB,IAAMkC,EAAe,gBAMfC,EAAsBnB,EAAAoB,YAC1B,CAAC7B,EAAwC8B,KACvC,MAAM7B,cAAEA,KAAkB8B,GAAiB/B,EACrCgC,EAAUlC,EAAiB6B,EAAc1B,GACzCgC,EAAqBC,EAAgBJ,EAAcE,EAAQxB,YACjE,OACES,EAACkB,EAAUC,OAAV,CACCC,KAAK,SACL,gBAAc,SACd,gBAAeL,EAAQ7B,KACvB,gBAAe6B,EAAQb,UACvB,aAAYmB,EAASN,EAAQ7B,SACzB4B,EACJQ,IAAKN,EACLO,QAASC,EAAqBzC,EAAMwC,QAASR,EAAQT,eAAY,I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BF,gJAE4BE,EAAoBD,WAS9F,OAPMzH,EAAAiE,WAAU,KACd,GAAIrD,EAAS,CACMgH,SAASC,eAAejH,IAC1BkH,QAAQC,MAAMJ,EAC/B,IACC,CAACA,EAAS/G,IAEN,IAAA,EAUH2F,EAAwD,EAAGrG,aAAYW,oBAC3E,MACM8G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMvH,EAAAiE,WAAU,KACd,MAAM+D,EAAgB9H,EAAWiE,SAAS8D,aAAa,oBAEvD,GAAIpH,GAAiBmH,EAAe,CACXJ,SAASC,eAAehH,IAC1BiH,QAAQI,KAAKP,EACpC,IACC,CAACA,EAASzH,EAAYW,IAElB,IAAA,EAGHsH,EAAO7I,EACP8I,EAAUjH,EACVkH,EAAShG,EACTiG,GAAUvF,EACVwF,GAAU3E,EACV4E,GAAQ/B,EACRgC,GAAc5B,EACd6B,GAAQzB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-CllKujAS.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/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 { Slot } 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 = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\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 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","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","RemoveScroll","as","Slot","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","console","error","describedById","getAttribute","warn","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,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAGZ,OACEW,EAACpB,EAAA,CACCqB,MAAOjB,EACPO,aACAG,aACAQ,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACfjB,OACAG,aAAcM,EACdW,aAAoBd,EAAAe,aAAY,IAAMZ,GAASa,IAAcA,KAAW,CAACb,IACzEL,QAECL,YAAA,EAKPH,EAAO2B,YAAcjC,EAMrB,IAAMkC,EAAe,gBAMfC,EAAsBnB,EAAAoB,YAC1B,CAAC7B,EAAwC8B,KACvC,MAAM7B,cAAEA,KAAkB8B,GAAiB/B,EACrCgC,EAAUlC,EAAiB6B,EAAc1B,GACzCgC,EAAqBC,EAAgBJ,EAAcE,EAAQxB,YACjE,OACES,EAACkB,EAAUC,OAAV,CACCC,KAAK,SACL,gBAAc,SACd,gBAAeL,EAAQ7B,KACvB,gBAAe6B,EAAQb,UACvB,aAAYmB,EAASN,EAAQ7B,SACzB4B,EACJQ,IAAKN,EACLO,QAASC,EAAqBzC,EAAMwC,QAASR,EAAQT,eAAY,IAMzEK,EAAcF,YAAcC,EAM5B,IAAMe,EAAc,gBAGbC,EAAgBC,GAAoBlD,EAAwCgD,EAAa,CAC9FG,gBAAY,IAiBRC,EAA6C9C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EAC/B,IACC,CAACA,EAAS/G,IAEN,IAAA,EAUH2F,EAAwD,EAAGrG,aAAYW,oBAC3E,MACM8G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMvH,EAAAiE,WAAU,KACd,MAAM+D,EAAgB9H,EAAWiE,SAAS8D,aAAa,oBAEvD,GAAIpH,GAAiBmH,EAAe,CACXJ,SAASC,eAAehH,IAC1BiH,QAAQI,KAAKP,EACpC,IACC,CAACA,EAASzH,EAAYW,IAElB,IAAA,EAGHsH,EAAO7I,EACP8I,EAAUjH,EACVkH,EAAShG,EACTiG,GAAUvF,EACVwF,GAAU3E,EACV4E,GAAQ/B,EACRgC,GAAc5B,EACd6B,GAAQzB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
1
  import*as r from"react";import*as i from"react-dom";import{Slot as o}from"@radix-ui/react-slot";import{jsx as t}from"react/jsx-runtime";var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((i,a)=>{const e=r.forwardRef(((r,i)=>{const{asChild:e,...n}=r,m=e?o:a;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t(m,{...n,ref:i})}));return e.displayName=`Primitive.${a}`,{...i,[a]:e}}),{});function e(r,o){r&&i.flushSync((()=>r.dispatchEvent(o)))}export{a as P,e as d};
2
- //# sourceMappingURL=index-CN1SA0_I.mjs.map
2
+ //# sourceMappingURL=index-CmGsz_8M.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CN1SA0_I.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } 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 \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((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","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"wIAIA,IA+BMA,EA/BQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOT,EAMnC,MAJsB,oBAAXU,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACL,EAAA,IAASD,EAAgBO,IAAKT,GAAc,IAKtD,OAFAJ,EAAKc,YAAc,aAAaf,IAEzB,IAAKD,EAAWC,CAACA,GAAOC,EAAK,GACnC,CAAgB,GA2CnB,SAASe,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-CmGsz_8M.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } 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 \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((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","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"wIAIA,IA+BMA,EA/BQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOT,EAMnC,MAJsB,oBAAXU,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACL,EAAA,IAASD,EAAgBO,IAAKT,GAAc,IAKtD,OAFAJ,EAAKc,YAAc,aAAaf,IAEzB,IAAKD,EAAWC,CAACA,GAAOC,EAAK,GACnC,CAAgB,GA2CnB,SAASe,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{a as t}from"./index-ClSqYyO3.mjs";function n({prop:n,defaultProp:o,onChange:r=()=>{}}){const[u,a]=function({defaultProp:n,onChange:o}){const r=e.useState(n),[u]=r,a=e.useRef(u),f=t(o);return e.useEffect((()=>{a.current!==u&&(f(u),a.current=u)}),[u,a,f]),r}({defaultProp:o,onChange:r}),f=void 0!==n,s=f?n:u,c=t(r);return[s,e.useCallback((e=>{if(f){const t="function"==typeof e?e(n):e;t!==n&&c(t)}else a(e)}),[f,n,a,c])]}export{n as u};
2
- //# sourceMappingURL=index-46Dn4Q--.mjs.map
1
+ import*as e from"react";import{a as t}from"./index-wbuw6FYR.mjs";function n({prop:n,defaultProp:o,onChange:r=()=>{}}){const[u,a]=function({defaultProp:n,onChange:o}){const r=e.useState(n),[u]=r,a=e.useRef(u),f=t(o);return e.useEffect((()=>{a.current!==u&&(f(u),a.current=u)}),[u,a,f]),r}({defaultProp:o,onChange:r}),f=void 0!==n,s=f?n:u,c=t(r);return[s,e.useCallback((e=>{if(f){const t="function"==typeof e?e(n):e;t!==n&&c(t)}else a(e)}),[f,n,a,c])]}export{n as u};
2
+ //# sourceMappingURL=index-DMXVIqDM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-46Dn4Q--.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","uncontrolledState","React","useState","value","prevValueRef","useRef","handleChange","useCallbackRef","useEffect","current","useUncontrolledState","isControlled","useCallback","nextValue"],"mappings":"iEAWA,SAASA,GAAwBC,KAC/BA,EAAAC,YACAA,EAAAC,SACAA,EAAW,SAEX,MAAOC,EAAkBC,GAqB3B,UAAiCH,YAC/BA,EAAAC,SACAA,IAEA,MAAMG,EAA0BC,EAAAC,SAAwBN,IACjDO,GAASH,EACVI,EAAqBH,EAAAI,OAAOF,GAC5BG,EAAeC,EAAeV,GASpC,OAPMI,EAAAO,WAAU,KACVJ,EAAaK,UAAYN,IAC3BG,EAAaH,GACbC,EAAaK,QAAUN,EACzB,GACC,CAACA,EAAOC,EAAcE,IAElBN,CACT,CAtCkDU,CAAqB,CAAEd,cAAaC,aAC9Ec,OAAwB,IAAThB,EACfQ,EAAQQ,EAAehB,EAAOG,EAC9BQ,EAAeC,EAAeV,GAepC,MAAO,CAACM,EAboEF,EAAAW,aACzEC,IACC,GAAIF,EAAc,CAChB,MACMR,EAA6B,mBAAdU,EADNA,EACwClB,GAAQkB,EAC3DV,IAAUR,GAAMW,EAAaH,QAEjCJ,EAAoBc,EACtB,GAEF,CAACF,EAAchB,EAAMI,EAAqBO,IAI9C","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-DMXVIqDM.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","uncontrolledState","React","useState","value","prevValueRef","useRef","handleChange","useCallbackRef","useEffect","current","useUncontrolledState","isControlled","useCallback","nextValue"],"mappings":"iEAWA,SAASA,GAAwBC,KAC/BA,EAAAC,YACAA,EAAAC,SACAA,EAAW,SAEX,MAAOC,EAAkBC,GAqB3B,UAAiCH,YAC/BA,EAAAC,SACAA,IAEA,MAAMG,EAA0BC,EAAAC,SAAwBN,IACjDO,GAASH,EACVI,EAAqBH,EAAAI,OAAOF,GAC5BG,EAAeC,EAAeV,GASpC,OAPMI,EAAAO,WAAU,KACVJ,EAAaK,UAAYN,IAC3BG,EAAaH,GACbC,EAAaK,QAAUN,EACzB,GACC,CAACA,EAAOC,EAAcE,IAElBN,CACT,CAtCkDU,CAAqB,CAAEd,cAAaC,aAC9Ec,OAAwB,IAAThB,EACfQ,EAAQQ,EAAehB,EAAOG,EAC9BQ,EAAeC,EAAeV,GAepC,MAAO,CAACM,EAboEF,EAAAW,aACzEC,IACC,GAAIF,EAAc,CAChB,MACMR,EAA6B,mBAAdU,EADNA,EACwClB,GAAQkB,EAC3DV,IAAUR,GAAMW,EAAaH,QAEjCJ,EAAoBc,EACtB,GAEF,CAACF,EAAchB,EAAMI,EAAqBO,IAI9C","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{b as t}from"./index-ClSqYyO3.mjs";var o=r["useId".toString()]||(()=>{}),a=0;function e(e){const[i,n]=r.useState(o());return t((()=>{n((r=>r??String(a++)))}),[e]),i?`radix-${i}`:""}export{e as u};
2
- //# sourceMappingURL=index-DyAmMjEH.mjs.map
1
+ import*as r from"react";import{b as t}from"./index-wbuw6FYR.mjs";var o=r["useId".toString()]||(()=>{}),a=0;function e(e){const[i,n]=r.useState(o());return t((()=>{n((r=>r??String(a++)))}),[e]),i?`radix-${i}`:""}export{e as u};
2
+ //# sourceMappingURL=index-DhIMkiDX.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DyAmMjEH.mjs","sources":["../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\"useId\".toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useReactId","React","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,QAAQC,aAAU,MAAY,GAC5DC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeN,EAAAO,SAA6BR,KAKvD,OAHAS,GAAgB,KACQF,GAAOG,GAAYA,GAAWC,OAAOR,MAAQ,GAClE,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-DhIMkiDX.mjs","sources":["../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\"useId\".toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useReactId","React","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,QAAQC,aAAU,MAAY,GAC5DC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeN,EAAAO,SAA6BR,KAKvD,OAHAS,GAAgB,KACQF,GAAOG,GAAYA,GAAWC,OAAOR,MAAQ,GAClE,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{c as o,u as r,a as t}from"./index-ClSqYyO3.mjs";import{createCollection as n}from"@radix-ui/react-collection";import{c as a}from"./index-D1rtromL.mjs";import{u as s}from"./index-DyAmMjEH.mjs";import{P as i}from"./index-CN1SA0_I.mjs";import{u}from"./index-46Dn4Q--.mjs";import{u as c}from"./index-oT2uIdb1.mjs";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,v,b]=n(p),[w,g]=a(p,[b]),[F,I]=w(p),R=e.forwardRef(((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(h,{...e,ref:o})})})));R.displayName=p;var h=e.forwardRef(((n,a)=>{const{__scopeRovingFocusGroup:s,orientation:p,loop:m=!1,dir:b,currentTabStopId:w,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:I,onEntryFocus:R,preventScrollOnEntryFocus:h=!1,...y}=n,x=e.useRef(null),A=r(a,x),T=c(b),[E=null,D]=u({prop:w,defaultProp:g,onChange:I}),[C,_]=e.useState(!1),j=t(R),G=v(s),K=e.useRef(!1),[k,L]=e.useState(0);return e.useEffect((()=>{const e=x.current;if(e)return e.addEventListener(f,j),()=>e.removeEventListener(f,j)}),[j]),l(F,{scope:s,orientation:p,dir:T,loop:m,currentTabStopId:E,onItemFocus:e.useCallback((e=>D(e)),[D]),onItemShiftTab:e.useCallback((()=>_(!0)),[]),onFocusableItemAdd:e.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>L((e=>e-1))),[]),children:l(i.div,{tabIndex:C||0===k?-1:0,"data-orientation":p,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:o(n.onMouseDown,(()=>{K.current=!0})),onFocus:o(n.onFocus,(e=>{const o=!K.current;if(e.target===e.currentTarget&&o&&!C){const o=new CustomEvent(f,d);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=G().filter((e=>e.focusable));S([e.find((e=>e.active)),e.find((e=>e.id===E)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}K.current=!1})),onBlur:o(n.onBlur,(()=>_(!1)))})})})),y="RovingFocusGroupItem",x=e.forwardRef(((r,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:u=!1,tabStopId:c,...f}=r,d=s(),p=c||d,b=I(y,n),w=b.currentTabStopId===p,g=v(n),{onFocusableItemAdd:F,onFocusableItemRemove:R}=b;return e.useEffect((()=>{if(a)return F(),()=>R()}),[a,F,R]),l(m.ItemSlot,{scope:n,id:p,focusable:a,active:u,children:l(i.span,{tabIndex:w?0:-1,"data-orientation":b.orientation,...f,ref:t,onMouseDown:o(r.onMouseDown,(e=>{a?b.onItemFocus(p):e.preventDefault()})),onFocus:o(r.onFocus,(()=>b.onItemFocus(p))),onKeyDown:o(r.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:A[t]}(e,b.orientation,b.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=b.loop?(t=a+1,(r=n).map(((e,o)=>r[(t+o)%r.length]))):n.slice(a+1)}setTimeout((()=>S(n)))}var r,t}))})})}));x.displayName=y;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var T=R,E=x;export{E as I,T as R,g as c};
2
- //# sourceMappingURL=index-CYJu5yO5.mjs.map
1
+ import*as e from"react";import{c as o,u as r,a as t}from"./index-wbuw6FYR.mjs";import{createCollection as n}from"@radix-ui/react-collection";import{c as a}from"./index-BGhqW2Il.mjs";import{u as s}from"./index-DhIMkiDX.mjs";import{P as i}from"./index-CmGsz_8M.mjs";import{u}from"./index-DMXVIqDM.mjs";import{u as c}from"./index-C5go0LX8.mjs";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,v,b]=n(p),[w,g]=a(p,[b]),[F,I]=w(p),R=e.forwardRef(((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(h,{...e,ref:o})})})));R.displayName=p;var h=e.forwardRef(((n,a)=>{const{__scopeRovingFocusGroup:s,orientation:p,loop:m=!1,dir:b,currentTabStopId:w,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:I,onEntryFocus:R,preventScrollOnEntryFocus:h=!1,...y}=n,x=e.useRef(null),A=r(a,x),T=c(b),[E=null,D]=u({prop:w,defaultProp:g,onChange:I}),[C,_]=e.useState(!1),j=t(R),G=v(s),K=e.useRef(!1),[k,L]=e.useState(0);return e.useEffect((()=>{const e=x.current;if(e)return e.addEventListener(f,j),()=>e.removeEventListener(f,j)}),[j]),l(F,{scope:s,orientation:p,dir:T,loop:m,currentTabStopId:E,onItemFocus:e.useCallback((e=>D(e)),[D]),onItemShiftTab:e.useCallback((()=>_(!0)),[]),onFocusableItemAdd:e.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>L((e=>e-1))),[]),children:l(i.div,{tabIndex:C||0===k?-1:0,"data-orientation":p,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:o(n.onMouseDown,(()=>{K.current=!0})),onFocus:o(n.onFocus,(e=>{const o=!K.current;if(e.target===e.currentTarget&&o&&!C){const o=new CustomEvent(f,d);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=G().filter((e=>e.focusable));S([e.find((e=>e.active)),e.find((e=>e.id===E)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}K.current=!1})),onBlur:o(n.onBlur,(()=>_(!1)))})})})),y="RovingFocusGroupItem",x=e.forwardRef(((r,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:u=!1,tabStopId:c,...f}=r,d=s(),p=c||d,b=I(y,n),w=b.currentTabStopId===p,g=v(n),{onFocusableItemAdd:F,onFocusableItemRemove:R}=b;return e.useEffect((()=>{if(a)return F(),()=>R()}),[a,F,R]),l(m.ItemSlot,{scope:n,id:p,focusable:a,active:u,children:l(i.span,{tabIndex:w?0:-1,"data-orientation":b.orientation,...f,ref:t,onMouseDown:o(r.onMouseDown,(e=>{a?b.onItemFocus(p):e.preventDefault()})),onFocus:o(r.onFocus,(()=>b.onItemFocus(p))),onKeyDown:o(r.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:A[t]}(e,b.orientation,b.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=b.loop?(t=a+1,(r=n).map(((e,o)=>r[(t+o)%r.length]))):n.slice(a+1)}setTimeout((()=>S(n)))}var r,t}))})})}));x.displayName=y;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var T=R,E=x;export{E as I,T as R,g as c};
2
+ //# sourceMappingURL=index-Eo-UV7HL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CYJu5yO5.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6XAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAOS,IAAKR,UAOhDJ,EAAiBa,YAAcvB,EAgB/B,IAAMqB,EAA6BV,EAAAC,YAGjC,CAACC,EAA+CC,KAChD,MAAMI,wBACJA,EAAAM,YACAA,EAAAC,KACAA,GAAO,EAAAC,IACPA,EACAC,iBAAkBC,EAAAC,wBAClBA,EAAAC,yBACAA,EAAAC,aACAA,EAAAC,0BACAA,GAA4B,KACzBC,GACDpB,EACES,EAAYX,EAAAuB,OAAoC,MAChDC,EAAeC,EAAgBtB,EAAcQ,GAC7Ce,EAAYC,EAAaZ,IACxBC,EAAmB,KAAMY,GAAuBC,EAAqB,CAC1EC,KAAMb,EACNc,YAAab,EACbc,SAAUb,KAELc,EAAkBC,GAA6BlC,EAAAmC,UAAS,GACzDC,EAAmBC,EAAejB,GAClCkB,EAAW/C,EAAcgB,GACzBgC,EAAwBvC,EAAAuB,QAAO,IAC9BiB,EAAqBC,GAAgCzC,EAAAmC,SAAS,GAUrE,OARMnC,EAAA0C,WAAU,KACd,MAAMC,EAAOhC,EAAIiC,QACjB,GAAID,EAEF,OADAA,EAAKE,iBAAiB5D,EAAamD,GAC5B,IAAMO,EAAKG,oBAAoB7D,EAAamD,EACrD,GACC,CAACA,IAGFhC,EA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AAMsC,SAAWtC,EAAMuC,QAAUvC,EAAM+B,SAAU,OACtE/B,EAAM4B,iBAEN,IAAIY,EADUhE,IAAWiC,QAAQC,GAASA,EAAKC,YACpBM,KAAKP,GAASA,EAAK7D,IAAIiC,UAElD,GAAoB,SAAhBkD,EAAwBQ,EAAeC,eAAQ,GAC1B,SAAhBT,GAA0C,SAAhBA,EAAwB,CACrC,SAAhBA,GAAwBQ,EAAeC,UAC3C,MAAMC,EAAeF,EAAeG,QAAQ3C,EAAMG,eAClDqC,EAAiBhB,EAAQxE,MA0DP4F,EAzDYF,EAAe,GAyDvCG,EAzDQL,GA0DfvB,KAAI,CAAC6B,EAAGC,IAAUF,GAAOD,EAAaG,GAASF,EAAMG,WAzDhDR,EAAeS,MAAMP,EAAe,EAC1C,CAMAQ,YAAW,IAAMtC,EAAW4B,IAC9B,CAgDZ,IAAsBK,EAAYD,CAhDtB,OAEJ,IAMRxB,EAAqBtE,YAAcqE,EAKnC,IAAMgB,EAAuD,CAC3DgB,UAAW,OAAQC,QAAS,OAC5BC,WAAY,OAAQC,UAAW,OAC/BC,OAAQ,QAASC,KAAM,QACvBC,SAAU,OAAQC,IAAK,QAiBzB,SAAS9C,EAAW+C,EAA2BC,GAAgB,GAC7D,MAAMC,EAA6BC,SAASC,cAC5C,IAAA,MAAWC,KAAaL,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOjI,EACPkI,EAAO/C","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-Eo-UV7HL.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6XAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH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GAAOD,EAAaG,GAASF,EAAMG,WAzDhDR,EAAeS,MAAMP,EAAe,EAC1C,CAMAQ,YAAW,IAAMtC,EAAW4B,IAC9B,CAgDZ,IAAsBK,EAAYD,CAhDtB,OAEJ,IAMRxB,EAAqBtE,YAAcqE,EAKnC,IAAMgB,EAAuD,CAC3DgB,UAAW,OAAQC,QAAS,OAC5BC,WAAY,OAAQC,UAAW,OAC/BC,OAAQ,QAASC,KAAM,QACvBC,SAAU,OAAQC,IAAK,QAiBzB,SAAS9C,EAAW+C,EAA2BC,GAAgB,GAC7D,MAAMC,EAA6BC,SAASC,cAC5C,IAAA,MAAWC,KAAaL,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOjI,EACPkI,EAAO/C","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{b as r}from"./index-ClSqYyO3.mjs";function t(t){const[i,o]=e.useState(void 0);return r((()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let i,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=t.offsetWidth,s=t.offsetHeight;o({width:i,height:s})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)}),[t]),i}export{t as u};
2
- //# sourceMappingURL=index-DM6C2fpF.mjs.map
1
+ import*as e from"react";import{b as r}from"./index-wbuw6FYR.mjs";function t(t){const[i,o]=e.useState(void 0);return r((()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let i,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=t.offsetWidth,s=t.offsetHeight;o({width:i,height:s})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)}),[t]),i}export{t as u};
2
+ //# sourceMappingURL=index-SI7n7FwH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DM6C2fpF.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/useSize.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useState","useLayoutEffect","width","offsetWidth","height","offsetHeight","resizeObserver","ResizeObserver","entries","Array","isArray","length","entry","borderSizeEntry","borderSize","observe","box","unobserve"],"mappings":"iEAKA,SAASA,EAAQC,GACf,MAAOC,EAAMC,GAAiBC,EAAAC,cAAwD,GAgDtF,OA9CAC,GAAgB,KACd,GAAIL,EAAS,CAEXE,EAAQ,CAAEI,MAAON,EAAQO,YAAaC,OAAQR,EAAQS,eAEtD,MAAMC,EAAiB,IAAIC,gBAAgBC,IACzC,IAAKC,MAAMC,QAAQF,GACjB,OAKF,IAAKA,EAAQG,OACX,OAGF,MAAMC,EAAQJ,EAAQ,GACtB,IAAIN,EACAE,EAEJ,GAAI,kBAAmBQ,EAAO,CAC5B,MAAMC,EAAkBD,EAAqB,cAEvCE,EAAaL,MAAMC,QAAQG,GAAmBA,EAAgB,GAAKA,EACzEX,EAAQY,EAAuB,WAC/BV,EAASU,EAAsB,eAI/BZ,EAAQN,EAAQO,YAChBC,EAASR,EAAQS,aAGnBP,EAAQ,CAAEI,QAAOE,UAAQ,IAK3B,OAFAE,EAAeS,QAAQnB,EAAS,CAAEoB,IAAK,eAEhC,IAAMV,EAAeW,UAAUrB,GAItCE,OAAQ,EACV,GACC,CAACF,IAEGC,CACT","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-SI7n7FwH.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/useSize.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useState","useLayoutEffect","width","offsetWidth","height","offsetHeight","resizeObserver","ResizeObserver","entries","Array","isArray","length","entry","borderSizeEntry","borderSize","observe","box","unobserve"],"mappings":"iEAKA,SAASA,EAAQC,GACf,MAAOC,EAAMC,GAAiBC,EAAAC,cAAwD,GAgDtF,OA9CAC,GAAgB,KACd,GAAIL,EAAS,CAEXE,EAAQ,CAAEI,MAAON,EAAQO,YAAaC,OAAQR,EAAQS,eAEtD,MAAMC,EAAiB,IAAIC,gBAAgBC,IACzC,IAAKC,MAAMC,QAAQF,GACjB,OAKF,IAAKA,EAAQG,OACX,OAGF,MAAMC,EAAQJ,EAAQ,GACtB,IAAIN,EACAE,EAEJ,GAAI,kBAAmBQ,EAAO,CAC5B,MAAMC,EAAkBD,EAAqB,cAEvCE,EAAaL,MAAMC,QAAQG,GAAmBA,EAAgB,GAAKA,EACzEX,EAAQY,EAAuB,WAC/BV,EAASU,EAAsB,eAI/BZ,EAAQN,EAAQO,YAChBC,EAASR,EAAQS,aAGnBP,EAAQ,CAAEI,QAAOE,UAAQ,IAK3B,OAFAE,EAAeS,QAAQnB,EAAS,CAAEoB,IAAK,eAEhC,IAAMV,EAAeW,UAAUrB,GAItCE,OAAQ,EACV,GACC,CAACF,IAEGC,CACT","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
1
  import*as e from"react";function n(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function t(...e){return t=>{let r=!1;const o=e.map((e=>{const o=n(e,t);return r||"function"!=typeof o||(r=!0),o}));if(r)return()=>{for(let t=0;t<o.length;t++){const r=o[t];"function"==typeof r?r():n(e[t],null)}}}}function r(...n){return e.useCallback(t(...n),n)}function o(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}function u(n){const t=e.useRef(n);return e.useEffect((()=>{t.current=n})),e.useMemo((()=>(...e)=>t.current?.(...e)),[])}var i=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};var s=n=>{const{present:t,children:o}=n,u=function(n){const[t,r]=e.useState(),o=e.useRef({}),u=e.useRef(n),s=e.useRef("none"),c=n?"mounted":"unmounted",[f,l]=function(n,t){return e.useReducer(((e,n)=>t[e][n]??e),n)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=a(o.current);s.current="mounted"===f?e:"none"}),[f]),i((()=>{const e=o.current,t=u.current;if(t!==n){const r=s.current,o=a(e);if(n)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}u.current=n}}),[n,l]),i((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const i=a(o.current).includes(r.animationName);if(r.target===t&&i&&(l("ANIMATION_END"),!u.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},i=e=>{e.target===t&&(s.current=a(o.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),s="function"==typeof o?o({present:u.isPresent}):e.Children.only(o),c=r(u.ref,function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(s));return"function"==typeof o||u.isPresent?e.cloneElement(s,{ref:c}):null};function a(e){return e?.animationName||"none"}s.displayName="Presence";export{s as P,u as a,i as b,o as c,t as d,r as u};
2
- //# sourceMappingURL=index-ClSqYyO3.mjs.map
2
+ //# sourceMappingURL=index-wbuw6FYR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-ClSqYyO3.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-use-callback-ref/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.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","// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/useLayoutEffect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/presence/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// packages/react/presence/src/useStateMachine.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// packages/react/presence/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({});\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 if (node2) stylesRef.current = getComputedStyle(node2);\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}\nexport {\n Presence\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","useCallbackRef","callback","callbackRef","useRef","useEffect","useMemo","args","useLayoutEffect","Boolean","globalThis","document","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","currentAnimationName","getAnimationName","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":"wBAQA,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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X,IAEP,CAnJmB2E,CAAY9C,GAEvB+C,EACgB,mBAAb9C,EACHA,EAAS,CAAED,QAASE,EAAS0C,YACvBxC,EAAA4C,SAASC,KAAKhD,GAGpBnC,EAAMY,EAAgBwB,EAASpC,IAwJvC,SAAuBoF,GAErB,IAAIC,EAASC,OAAOC,yBAAyBH,EAAQnD,MAAO,QAAQuD,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAQL,EAAgBpF,IAM1B,GAFAqF,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQnD,MAAMjC,IAIvB,OAAOoF,EAAQnD,MAAMjC,KAAQoF,EAAgBpF,GAC/C,CAzK4C2F,CAAcV,IAExD,MADuC,mBAAb9C,GACLC,EAAS0C,UAAkBxC,EAAAsD,aAAaX,EAAO,CAAEjF,QAAS,IAAA,EA6IjF,SAASuD,EAAiBC,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IApC,EAAS6D,YAAc","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"index-wbuw6FYR.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-use-callback-ref/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.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","// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/useLayoutEffect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/presence/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// packages/react/presence/src/useStateMachine.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// packages/react/presence/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({});\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 if (node2) stylesRef.current = getComputedStyle(node2);\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}\nexport {\n Presence\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","useCallbackRef","callback","callbackRef","useRef","useEffect","useMemo","args","useLayoutEffect","Boolean","globalThis","document","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","currentAnimationName","getAnimationName","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":"wBAQA,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,IAAwCC,EAA2BC,iBACrE,OAAOH,IAAkBE,EAE7B,CACF,CCNA,SAASE,EAAkDC,GACzD,MAAMC,EAAoBV,EAAAW,OAAOF,GAOjC,OALMT,EAAAY,WAAU,KACdF,EAAYrB,QAAUoB,CAAA,IAIXT,EAAAa,SAAQ,IAAO,IAAIC,IAASJ,EAAYrB,aAAayB,IAAa,GACjF,CCNMC,IAAAA,EAAkBC,QAAQC,YAAYC,UAAkBlB,EAAAe,gBAAkB,OCC1E,IAAAI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xB,OAAOA,GAAQY,eAAiB,MAClC,CA5IApC,EAAS6D,YAAc","x_google_ignoreList":[0,1,2,3,4]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{c as t}from"./utils-Dd3mX7Lt.mjs";function r({className:r,type:o,...i}){return e.createElement("input",{type:o,"data-slot":"input",className:t("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),...i})}export{r as I};
2
- //# sourceMappingURL=input-D7H1CxUv.mjs.map
1
+ import*as e from"react";import{c as t}from"./utils-ihtedRak.mjs";function r({className:r,type:o,...i}){return e.createElement("input",{type:o,"data-slot":"input",className:t("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),...i})}export{r as I};
2
+ //# sourceMappingURL=input-YYNIX4HJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-D7H1CxUv.mjs","sources":["../../src/components/ui/input/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","React","input","data-slot","cn"],"mappings":"iEAIA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACnC,OACEC,EAACC,cAAAA,QAAAA,CACCH,KAAMA,EACNI,YAAU,QACVL,UAAWM,EACT,2WACAN,MAEEE,GAGV"}
1
+ {"version":3,"file":"input-YYNIX4HJ.mjs","sources":["../../src/components/ui/input/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","React","input","data-slot","cn"],"mappings":"iEAIA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACnC,OACEC,EAACC,cAAAA,QAAAA,CACCH,KAAMA,EACNI,YAAU,QACVL,UAAWM,EACT,2WACAN,MAEEE,GAGV"}