ivt 0.1.5 → 0.1.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 (128) hide show
  1. package/dist/accordion/index.mjs +1 -1
  2. package/dist/alert/index.mjs +1 -1
  3. package/dist/alert-dialog/index.mjs +1 -1
  4. package/dist/avatar/index.mjs +1 -1
  5. package/dist/badge/index.mjs +1 -1
  6. package/dist/base/index.d.ts +1 -2
  7. package/dist/base/index.mjs +1 -1
  8. package/dist/base/index.mjs.map +1 -1
  9. package/dist/button/index.mjs +1 -1
  10. package/dist/calendar/index.mjs +1 -1
  11. package/dist/card/index.mjs +1 -1
  12. package/dist/checkbox/index.mjs +1 -1
  13. package/dist/checkbox/index.mjs.map +1 -1
  14. package/dist/chunks/{accordion-DCSVhB7Z.mjs → accordion-BIDBqkzp.mjs} +2 -2
  15. package/dist/chunks/{accordion-DCSVhB7Z.mjs.map → accordion-BIDBqkzp.mjs.map} +1 -1
  16. package/dist/chunks/{badge-D_x3BlPA.mjs → badge-Crkpk9z-.mjs} +2 -2
  17. package/dist/chunks/{badge-D_x3BlPA.mjs.map → badge-Crkpk9z-.mjs.map} +1 -1
  18. package/dist/chunks/{bundle-mjs-Dthp4wMi.mjs → bundle-mjs-BzWySkoH.mjs} +1 -1
  19. package/dist/chunks/{bundle-mjs-Dthp4wMi.mjs.map → bundle-mjs-BzWySkoH.mjs.map} +1 -1
  20. package/dist/chunks/{button-KMRgpiAy.mjs → button-CzvqIZ8x.mjs} +2 -2
  21. package/dist/chunks/{button-KMRgpiAy.mjs.map → button-CzvqIZ8x.mjs.map} +1 -1
  22. package/dist/chunks/{calendar-CmSMkDgI.mjs → calendar-BfJtFJt1.mjs} +2 -2
  23. package/dist/chunks/{calendar-CmSMkDgI.mjs.map → calendar-BfJtFJt1.mjs.map} +1 -1
  24. package/dist/chunks/check-DwxiwVdL.mjs +2 -0
  25. package/dist/chunks/{check-BSduI23k.mjs.map → check-DwxiwVdL.mjs.map} +1 -1
  26. package/dist/chunks/chevron-down-DDbMNTUh.mjs +2 -0
  27. package/dist/chunks/{chevron-down-BjVZhjFJ.mjs.map → chevron-down-DDbMNTUh.mjs.map} +1 -1
  28. package/dist/chunks/chevron-left-Nq3OZhzU.mjs +2 -0
  29. package/dist/chunks/{chevron-left-DjmYjuTW.mjs.map → chevron-left-Nq3OZhzU.mjs.map} +1 -1
  30. package/dist/chunks/chevron-right-JC2xkPwU.mjs +2 -0
  31. package/dist/chunks/{chevron-right-DOvHale5.mjs.map → chevron-right-JC2xkPwU.mjs.map} +1 -1
  32. package/dist/chunks/{command-DMdzlCRK.mjs → command-BfhQKbG7.mjs} +2 -2
  33. package/dist/chunks/{command-DMdzlCRK.mjs.map → command-BfhQKbG7.mjs.map} +1 -1
  34. package/dist/chunks/{createLucideIcon-BPtXaGDX.mjs → createLucideIcon-DODpMbL1.mjs} +1 -1
  35. package/dist/chunks/{createLucideIcon-BPtXaGDX.mjs.map → createLucideIcon-DODpMbL1.mjs.map} +1 -1
  36. package/dist/chunks/{dialog-DT-LxfeE.mjs → dialog-hqBsyFIm.mjs} +2 -2
  37. package/dist/chunks/{dialog-DT-LxfeE.mjs.map → dialog-hqBsyFIm.mjs.map} +1 -1
  38. package/dist/chunks/{hover-card-D0WoNHd_.mjs → hover-card-BqYHz0TY.mjs} +2 -2
  39. package/dist/chunks/{hover-card-D0WoNHd_.mjs.map → hover-card-BqYHz0TY.mjs.map} +1 -1
  40. package/dist/chunks/{index-BOtb6ofV.mjs → index-B9IG-aGl.mjs} +1 -1
  41. package/dist/chunks/{index-BOtb6ofV.mjs.map → index-B9IG-aGl.mjs.map} +1 -1
  42. package/dist/chunks/{index-Ds-NL_xb.mjs → index-BCS8JLlu.mjs} +2 -2
  43. package/dist/chunks/{index-Ds-NL_xb.mjs.map → index-BCS8JLlu.mjs.map} +1 -1
  44. package/dist/chunks/{index-C8ZqoA88.mjs → index-BX1w0_z_.mjs} +2 -2
  45. package/dist/chunks/{index-C8ZqoA88.mjs.map → index-BX1w0_z_.mjs.map} +1 -1
  46. package/dist/chunks/{index-DspU1Pyo.mjs → index-By-2lawf.mjs} +1 -1
  47. package/dist/chunks/{index-DspU1Pyo.mjs.map → index-By-2lawf.mjs.map} +1 -1
  48. package/dist/chunks/{index-k-LDQli2.mjs → index-C-wyvA9Y.mjs} +2 -2
  49. package/dist/chunks/{index-k-LDQli2.mjs.map → index-C-wyvA9Y.mjs.map} +1 -1
  50. package/dist/chunks/{index-rHca3YxT.mjs → index-C9z8vXb2.mjs} +2 -2
  51. package/dist/chunks/{index-rHca3YxT.mjs.map → index-C9z8vXb2.mjs.map} +1 -1
  52. package/dist/chunks/{index-BYaJxqBC.mjs → index-CAfYtpma.mjs} +2 -2
  53. package/dist/chunks/{index-BYaJxqBC.mjs.map → index-CAfYtpma.mjs.map} +1 -1
  54. package/dist/chunks/{index-BEeVpO2_.mjs → index-CGiKhmTw.mjs} +1 -1
  55. package/dist/chunks/{index-BEeVpO2_.mjs.map → index-CGiKhmTw.mjs.map} +1 -1
  56. package/dist/chunks/{index-ChEz--fx.mjs → index-CldmvP4a.mjs} +1 -1
  57. package/dist/chunks/{index-ChEz--fx.mjs.map → index-CldmvP4a.mjs.map} +1 -1
  58. package/dist/chunks/{index-CIfe3UIG.mjs → index-CtowYOV1.mjs} +1 -1
  59. package/dist/chunks/{index-CIfe3UIG.mjs.map → index-CtowYOV1.mjs.map} +1 -1
  60. package/dist/chunks/{index-DrgyjxdM.mjs → index-D1CAbWF5.mjs} +2 -2
  61. package/dist/chunks/{index-DrgyjxdM.mjs.map → index-D1CAbWF5.mjs.map} +1 -1
  62. package/dist/chunks/{index-D1WqwlXc.mjs → index-D5qrkYzi.mjs} +2 -2
  63. package/dist/chunks/{index-D1WqwlXc.mjs.map → index-D5qrkYzi.mjs.map} +1 -1
  64. package/dist/chunks/{index-mlVBNiql.mjs → index-DIH-sx20.mjs} +2 -2
  65. package/dist/chunks/{index-mlVBNiql.mjs.map → index-DIH-sx20.mjs.map} +1 -1
  66. package/dist/chunks/{index-BE7U1lz3.mjs → index-Dq1ur1Tt.mjs} +2 -2
  67. package/dist/chunks/{index-BE7U1lz3.mjs.map → index-Dq1ur1Tt.mjs.map} +1 -1
  68. package/dist/chunks/{index-CVg6WODB.mjs → index-xxvFw8CT.mjs} +2 -2
  69. package/dist/chunks/{index-CVg6WODB.mjs.map → index-xxvFw8CT.mjs.map} +1 -1
  70. package/dist/chunks/{input-CjX7cpsJ.mjs → input-tCLL6Wag.mjs} +2 -2
  71. package/dist/chunks/{input-CjX7cpsJ.mjs.map → input-tCLL6Wag.mjs.map} +1 -1
  72. package/dist/chunks/{label-B0a5aNu2.mjs → label-AIwucBj-.mjs} +2 -2
  73. package/dist/chunks/{label-B0a5aNu2.mjs.map → label-AIwucBj-.mjs.map} +1 -1
  74. package/dist/chunks/{pagination-XvM9skZV.mjs → pagination-Bf7ENC51.mjs} +2 -2
  75. package/dist/chunks/{pagination-XvM9skZV.mjs.map → pagination-Bf7ENC51.mjs.map} +1 -1
  76. package/dist/chunks/{popover-COG3isxJ.mjs → popover-Bzt13jKn.mjs} +2 -2
  77. package/dist/chunks/{popover-COG3isxJ.mjs.map → popover-Bzt13jKn.mjs.map} +1 -1
  78. package/dist/chunks/{progress-KQNbvdmu.mjs → progress-D14txtgz.mjs} +2 -2
  79. package/dist/chunks/{progress-KQNbvdmu.mjs.map → progress-D14txtgz.mjs.map} +1 -1
  80. package/dist/chunks/{scroll-area-Bof4yc1z.mjs → scroll-area-sPJ30O8-.mjs} +2 -2
  81. package/dist/chunks/{scroll-area-Bof4yc1z.mjs.map → scroll-area-sPJ30O8-.mjs.map} +1 -1
  82. package/dist/chunks/{select-rpTSdR8q.mjs → select-BhU-ychz.mjs} +2 -2
  83. package/dist/chunks/{select-rpTSdR8q.mjs.map → select-BhU-ychz.mjs.map} +1 -1
  84. package/dist/chunks/{skeleton-DwcR7I_w.mjs → skeleton-CVWv0wrj.mjs} +2 -2
  85. package/dist/chunks/{skeleton-DwcR7I_w.mjs.map → skeleton-CVWv0wrj.mjs.map} +1 -1
  86. package/dist/chunks/{sortable-BKqLwBgJ.mjs → sortable-DCp-B983.mjs} +2 -2
  87. package/dist/chunks/{sortable-BKqLwBgJ.mjs.map → sortable-DCp-B983.mjs.map} +1 -1
  88. package/dist/chunks/{table-DapXfoMY.mjs → table-P-qxwuu2.mjs} +2 -2
  89. package/dist/chunks/{table-DapXfoMY.mjs.map → table-P-qxwuu2.mjs.map} +1 -1
  90. package/dist/chunks/{tslib.es6-D-trMiel.mjs → tslib.es6-BSLL1h-C.mjs} +1 -1
  91. package/dist/chunks/{tslib.es6-D-trMiel.mjs.map → tslib.es6-BSLL1h-C.mjs.map} +1 -1
  92. package/dist/chunks/{utils-BDlXiHS3.mjs → utils-D72sTWl4.mjs} +2 -2
  93. package/dist/chunks/{utils-BDlXiHS3.mjs.map → utils-D72sTWl4.mjs.map} +1 -1
  94. package/dist/chunks/x-CSzM0CiJ.mjs +2 -0
  95. package/dist/chunks/{x-BIoR0tgq.mjs.map → x-CSzM0CiJ.mjs.map} +1 -1
  96. package/dist/command/index.mjs +1 -1
  97. package/dist/data-table/index.mjs +1 -1
  98. package/dist/data-table/index.mjs.map +1 -1
  99. package/dist/dialog/index.mjs +1 -1
  100. package/dist/dropdown-menu/index.mjs +1 -1
  101. package/dist/dropzone/index.mjs +1 -1
  102. package/dist/form/index.mjs +1 -1
  103. package/dist/hover-card/index.mjs +1 -1
  104. package/dist/icon/index.mjs +1 -1
  105. package/dist/index.css +1 -1
  106. package/dist/input/index.mjs +1 -1
  107. package/dist/label/index.mjs +1 -1
  108. package/dist/pagination/index.mjs +1 -1
  109. package/dist/popover/index.mjs +1 -1
  110. package/dist/progress/index.mjs +1 -1
  111. package/dist/scroll-area/index.mjs +1 -1
  112. package/dist/select/index.mjs +1 -1
  113. package/dist/separator/index.mjs +1 -1
  114. package/dist/sheet/index.mjs +1 -1
  115. package/dist/skeleton/index.mjs +1 -1
  116. package/dist/sortable/index.mjs +1 -1
  117. package/dist/table/index.mjs +1 -1
  118. package/dist/tabs/index.mjs +1 -1
  119. package/dist/toast/index.mjs +1 -1
  120. package/dist/tooltip/index.mjs +1 -1
  121. package/package.json +1 -1
  122. package/dist/chunks/TextWrap-qkVOkHiw.mjs +0 -2
  123. package/dist/chunks/TextWrap-qkVOkHiw.mjs.map +0 -1
  124. package/dist/chunks/check-BSduI23k.mjs +0 -2
  125. package/dist/chunks/chevron-down-BjVZhjFJ.mjs +0 -2
  126. package/dist/chunks/chevron-left-DjmYjuTW.mjs +0 -2
  127. package/dist/chunks/chevron-right-DOvHale5.mjs +0 -2
  128. package/dist/chunks/x-BIoR0tgq.mjs +0 -2
@@ -1,2 +1,2 @@
1
1
  import*as e from"react";function r(r){const t=e.useRef(r);return e.useEffect((()=>{t.current=r})),e.useMemo((()=>(...e)=>t.current?.(...e)),[])}export{r as u};
2
- //# sourceMappingURL=index-DspU1Pyo.mjs.map
2
+ //# sourceMappingURL=index-By-2lawf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DspU1Pyo.mjs","sources":["../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","useRef","useEffect","current","useMemo","args"],"mappings":"wBAMA,SAASA,EAAkDC,GACzD,MAAMC,EAAoBC,EAAAC,OAAOH,GAOjC,OALME,EAAAE,WAAU,KACdH,EAAYI,QAAUL,CAAA,IAIXE,EAAAI,SAAQ,IAAO,IAAIC,IAASN,EAAYI,aAAaE,IAAa,GACjF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-By-2lawf.mjs","sources":["../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","useRef","useEffect","current","useMemo","args"],"mappings":"wBAMA,SAASA,EAAkDC,GACzD,MAAMC,EAAoBC,EAAAC,OAAOH,GAOjC,OALME,EAAAE,WAAU,KACdH,EAAYI,QAAUL,CAAA,IAIXE,EAAAI,SAAQ,IAAO,IAAIC,IAASN,EAAYI,aAAaE,IAAa,GACjF","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{P as e}from"./index-BEeVpO2_.mjs";import{jsx as a}from"react/jsx-runtime";var i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef(((r,o)=>a(e.span,{...r,ref:o,style:{...i,...r.style}})));o.displayName="VisuallyHidden";var t=o;export{t as R,o as V};
2
- //# sourceMappingURL=index-k-LDQli2.mjs.map
1
+ import*as r from"react";import{P as e}from"./index-CGiKhmTw.mjs";import{jsx as a}from"react/jsx-runtime";var i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef(((r,o)=>a(e.span,{...r,ref:o,style:{...i,...r.style}})));o.displayName="VisuallyHidden";var t=o;export{t as R,o as V};
2
+ //# sourceMappingURL=index-C-wyvA9Y.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-k-LDQli2.mjs","sources":["../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"],"sourcesContent":["// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["VISUALLY_HIDDEN_STYLES","Object","freeze","position","border","width","height","padding","margin","overflow","clip","whiteSpace","wordWrap","VisuallyHidden","React","forwardRef","props","forwardedRef","jsx","Primitive","span","ref","style","displayName","Root"],"mappings":"yGAOA,IAAMA,EAAyBC,OAAOC,OAAO,CAE3CC,SAAU,WACVC,OAAQ,EACRC,MAAO,EACPC,OAAQ,EACRC,QAAS,EACTC,QAAQ,EACRC,SAAU,SACVC,KAAM,mBACNC,WAAY,SACZC,SAAU,WASNC,EAAuBC,EAAAC,YAC3B,CAACC,EAAOC,IAEJC,EAACC,EAAUC,KAAV,IACKJ,EACJK,IAAKJ,EACLK,MAAO,IAAKtB,KAA2BgB,EAAMM,WAMrDT,EAAeU,YAlBF,iBAsBb,IAAMC,EAAOX","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-C-wyvA9Y.mjs","sources":["../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"],"sourcesContent":["// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["VISUALLY_HIDDEN_STYLES","Object","freeze","position","border","width","height","padding","margin","overflow","clip","whiteSpace","wordWrap","VisuallyHidden","React","forwardRef","props","forwardedRef","jsx","Primitive","span","ref","style","displayName","Root"],"mappings":"yGAOA,IAAMA,EAAyBC,OAAOC,OAAO,CAE3CC,SAAU,WACVC,OAAQ,EACRC,MAAO,EACPC,OAAQ,EACRC,QAAS,EACTC,QAAQ,EACRC,SAAU,SACVC,KAAM,mBACNC,WAAY,SACZC,SAAU,WASNC,EAAuBC,EAAAC,YAC3B,CAACC,EAAOC,IAEJC,EAACC,EAAUC,KAAV,IACKJ,EACJK,IAAKJ,EACLK,MAAO,IAAKtB,KAA2BgB,EAAMM,WAMrDT,EAAeU,YAlBF,iBAsBb,IAAMC,EAAOX","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{u as r}from"./index-CIfe3UIG.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-rHca3YxT.mjs.map
1
+ import*as e from"react";import{u as r}from"./index-CtowYOV1.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-C9z8vXb2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-rHca3YxT.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"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-C9z8vXb2.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"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
- import*as e from"react";import{c as o,P as t,u as n}from"./index-BE7U1lz3.mjs";import{c as r,a}from"./index-BOtb6ofV.mjs";import{u as i}from"./index-DrgyjxdM.mjs";import{u as s}from"./index-mlVBNiql.mjs";import{P as c,D as l}from"./index-D1WqwlXc.mjs";import{h as d,R as u,u as p,F as f}from"./index-CVg6WODB.mjs";import{P as m}from"./index-BEeVpO2_.mjs";import{createSlot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as v}from"react/jsx-runtime";var R="Dialog",[_,y]=r(R),[b,C]=_(R),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,d=e.useRef(null),u=e.useRef(null),[p,f]=s({prop:r,defaultProp:a??!1,onChange:c,caller:R});return D(b,{scope:t,triggerRef:d,contentRef:u,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=R;var O="DialogTrigger",w=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(O,r),s=n(t,i.triggerRef);return D(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Z(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));w.displayName=O;var F="DialogPortal",[N,P]=_(F,{forceMount:void 0}),x=o=>{const{__scopeDialog:n,forceMount:r,children:a,container:i}=o,s=C(F,n);return D(N,{scope:n,forceMount:r,children:e.Children.map(a,(e=>D(t,{present:r||s.open,children:D(c,{asChild:!0,container:i,children:e})})))})};x.displayName=F;var E="DialogOverlay",A=e.forwardRef(((e,o)=>{const n=P(E,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(E,e.__scopeDialog);return i.modal?D(t,{present:r||i.open,children:D(j,{...a,ref:o})}):null}));A.displayName=E;var M=g("DialogOverlay.RemoveScroll"),j=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(u,{as:M,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":Z(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),k="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(k,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(k,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D($,{...a,ref:o}):D(W,{...a,ref:o})})}));T.displayName=k;var $=e.forwardRef(((t,r)=>{const a=C(k,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return d(e)}),[]),D(S,{...t,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:o(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.triggerRef.current?.focus()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:o(t.onFocusOutside,(e=>e.preventDefault()))})})),W=e.forwardRef(((o,t)=>{const n=C(k,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(S,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,i=n.triggerRef.current?.contains(t);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),S=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,d=C(k,r),u=e.useRef(null),m=n(t,u);return p(),h(v,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Z(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h(v,{children:[D(L,{titleId:d.titleId}),D(Q,{contentRef:u,descriptionId:d.descriptionId})]})]})})),B="DialogTitle",q=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));q.displayName=B;var H="DialogDescription",K=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(H,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));K.displayName=H;var U="DialogClose",V=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(U,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z(e){return e?"open":"closed"}V.displayName=U;var z="DialogTitleWarning",[G,J]=a(z,{contentName:k,titleName:B,docsSlug:"dialog"}),L=({titleId:o})=>{const t=J(z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return e.useEffect((()=>{if(o){document.getElementById(o)}}),[n,o]),null},Q=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)}}),[n,o,t]),null},X=I,Y=w,ee=x,oe=A,te=T,ne=q,re=K,ae=V;export{ae as C,re as D,oe as O,ee as P,X as R,ne as T,G as W,te as a,Y as b,y as c};
2
- //# sourceMappingURL=index-BYaJxqBC.mjs.map
1
+ import*as e from"react";import{c as o,P as t,u as n}from"./index-Dq1ur1Tt.mjs";import{c as r,a}from"./index-B9IG-aGl.mjs";import{u as i}from"./index-D1CAbWF5.mjs";import{u as s}from"./index-DIH-sx20.mjs";import{P as c,D as l}from"./index-D5qrkYzi.mjs";import{h as d,R as u,u as p,F as f}from"./index-xxvFw8CT.mjs";import{P as m}from"./index-CGiKhmTw.mjs";import{createSlot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as v}from"react/jsx-runtime";var R="Dialog",[_,y]=r(R),[b,C]=_(R),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,d=e.useRef(null),u=e.useRef(null),[p,f]=s({prop:r,defaultProp:a??!1,onChange:c,caller:R});return D(b,{scope:t,triggerRef:d,contentRef:u,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=R;var O="DialogTrigger",w=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(O,r),s=n(t,i.triggerRef);return D(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Z(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));w.displayName=O;var F="DialogPortal",[N,P]=_(F,{forceMount:void 0}),x=o=>{const{__scopeDialog:n,forceMount:r,children:a,container:i}=o,s=C(F,n);return D(N,{scope:n,forceMount:r,children:e.Children.map(a,(e=>D(t,{present:r||s.open,children:D(c,{asChild:!0,container:i,children:e})})))})};x.displayName=F;var E="DialogOverlay",A=e.forwardRef(((e,o)=>{const n=P(E,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(E,e.__scopeDialog);return i.modal?D(t,{present:r||i.open,children:D(j,{...a,ref:o})}):null}));A.displayName=E;var M=g("DialogOverlay.RemoveScroll"),j=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(u,{as:M,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":Z(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),k="DialogContent",T=e.forwardRef(((e,o)=>{const n=P(k,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(k,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D($,{...a,ref:o}):D(W,{...a,ref:o})})}));T.displayName=k;var $=e.forwardRef(((t,r)=>{const a=C(k,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return d(e)}),[]),D(S,{...t,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:o(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.triggerRef.current?.focus()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:o(t.onFocusOutside,(e=>e.preventDefault()))})})),W=e.forwardRef(((o,t)=>{const n=C(k,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(S,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,i=n.triggerRef.current?.contains(t);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),S=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,d=C(k,r),u=e.useRef(null),m=n(t,u);return p(),h(v,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Z(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h(v,{children:[D(L,{titleId:d.titleId}),D(Q,{contentRef:u,descriptionId:d.descriptionId})]})]})})),B="DialogTitle",q=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));q.displayName=B;var H="DialogDescription",K=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(H,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));K.displayName=H;var U="DialogClose",V=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(U,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z(e){return e?"open":"closed"}V.displayName=U;var z="DialogTitleWarning",[G,J]=a(z,{contentName:k,titleName:B,docsSlug:"dialog"}),L=({titleId:o})=>{const t=J(z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return e.useEffect((()=>{if(o){document.getElementById(o)}}),[n,o]),null},Q=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)}}),[n,o,t]),null},X=I,Y=w,ee=x,oe=A,te=T,ne=q,re=K,ae=V;export{ae as C,re as D,oe as O,ee as P,X as R,ne as T,G as W,te as a,Y as b,y as c};
2
+ //# sourceMappingURL=index-CAfYtpma.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BYaJxqBC.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","as","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","describedById","getAttribute","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,EAAMS,GAAWC,EAAqB,CAC3CC,KAAMV,EACNW,YAAaV,IAAe,EAC5BW,SAAUV,EACVW,OAAQxB,IAGV,OACEyB,EAACrB,EAAA,CACCsB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EAAkB7F,YAAc4F,EAMhC,IAAMI,EAAa,cAKbC,EAAoBnH,EAAAqB,YACxB,CAAC9B,EAAsC+B,KACrC,MAAM9B,cAAEA,KAAkB4H,GAAe7H,EACnCiC,EAAUnC,EAAiB6H,EAAY1H,GAC7C,OACEiB,EAACkB,EAAUC,OAAV,CACCC,KAAK,YACDuF,EACJrF,IAAKT,EACLU,QAASC,EAAqB1C,EAAMyC,SAAS,IAAMR,EAAQ3B,cAAa,MAAM,IAUtF,SAASiC,EAASpC,GAChB,OAAOA,EAAO,OAAS,QACzB,CANAyH,EAAYjG,YAAcgG,EAQ1B,IAAMG,EAAqB,sBAEpBC,EAAiBC,GAAqBC,EAAcH,EAAoB,CAC7EI,YAAa5D,EACb6D,UAAWhB,EACXiB,SAAU,WAKNnB,EAA4C,EAAG3F,cACnD,MAAM+G,EAAsBL,EAAkBF,GAExCQ,EAAU,KAAKD,EAAoBH,8BAA8BG,EAAoBF,wGAEjEE,EAAoBF,gJAE4BE,EAAoBD,WAS9F,OAPM3H,EAAAmE,WAAU,KACd,GAAItD,EAAS,CACMiH,SAASC,eAAelH,EAE3C,IACC,CAACgH,EAAShH,IAEN,IAAA,EAUH4F,EAAwD,EAAGvG,aAAYY,oBAC3E,MACM+G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMzH,EAAAmE,WAAU,KACd,MAAM6D,EAAgB9H,EAAWmE,SAAS4D,aAAa,oBAEvD,GAAInH,GAAiBkH,EAAe,CACXF,SAASC,eAAejH,EAEjD,IACC,CAAC+G,EAAS3H,EAAYY,IAElB,IAAA,EAGHoH,EAAO5I,EACP6I,EAAU/G,EACVgH,GAAS9F,EACT+F,GAAUrF,EACVsF,GAAUxE,EACVyE,GAAQ5B,EACR6B,GAAczB,EACd0B,GAAQtB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-CAfYtpma.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","as","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","describedById","getAttribute","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,EAAMS,GAAWC,EAAqB,CAC3CC,KAAMV,EACNW,YAAaV,IAAe,EAC5BW,SAAUV,EACVW,OAAQxB,IAGV,OACEyB,EAACrB,EAAA,CACCsB,MAAOlB,EACPO,aACAG,aACAS,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACflB,OACAG,aAAc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,EAAsC+B,KACrC,MAAM9B,cAAEA,KAAkB4H,GAAe7H,EACnCiC,EAAUnC,EAAiB6H,EAAY1H,GAC7C,OACEiB,EAACkB,EAAUC,OAAV,CACCC,KAAK,YACDuF,EACJrF,IAAKT,EACLU,QAASC,EAAqB1C,EAAMyC,SAAS,IAAMR,EAAQ3B,cAAa,MAAM,IAUtF,SAASiC,EAASpC,GAChB,OAAOA,EAAO,OAAS,QACzB,CANAyH,EAAYjG,YAAcgG,EAQ1B,IAAMG,EAAqB,sBAEpBC,EAAiBC,GAAqBC,EAAcH,EAAoB,CAC7EI,YAAa5D,EACb6D,UAAWhB,EACXiB,SAAU,WAKNnB,EAA4C,EAAG3F,cACnD,MAAM+G,EAAsBL,EAAkBF,GAExCQ,EAAU,KAAKD,EAAoBH,8BAA8BG,EAAoBF,wGAEjEE,EAAoBF,gJAE4BE,EAAoBD,WAS9F,OAPM3H,EAAAmE,WAAU,KACd,GAAItD,EAAS,CACMiH,SAASC,eAAelH,EAE3C,IACC,CAACgH,EAAShH,IAEN,IAAA,EAUH4F,EAAwD,EAAGvG,aAAYY,oBAC3E,MACM+G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMzH,EAAAmE,WAAU,KACd,MAAM6D,EAAgB9H,EAAWmE,SAAS4D,aAAa,oBAEvD,GAAInH,GAAiBkH,EAAe,CACXF,SAASC,eAAejH,EAEjD,IACC,CAAC+G,EAAS3H,EAAYY,IAElB,IAAA,EAGHoH,EAAO5I,EACP6I,EAAU/G,EACVgH,GAAS9F,EACT+F,GAAUrF,EACVsF,GAAUxE,EACVyE,GAAQ5B,EACR6B,GAAczB,EACd0B,GAAQtB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
1
  import*as r from"react";import*as i from"react-dom";import{createSlot as t}from"@radix-ui/react-slot";import{jsx as o}from"react/jsx-runtime";var e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((i,e)=>{const a=t(`Primitive.${e}`),n=r.forwardRef(((r,i)=>{const{asChild:t,...n}=r,m=t?a:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),o(m,{...n,ref:i})}));return n.displayName=`Primitive.${e}`,{...i,[e]:n}}),{});function a(r,t){r&&i.flushSync((()=>r.dispatchEvent(t)))}export{e as P,a as d};
2
- //# sourceMappingURL=index-BEeVpO2_.mjs.map
2
+ //# sourceMappingURL=index-CGiKhmTw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BEeVpO2_.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Slot","createSlot","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"8IAIA,IAgCMA,EAhCQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAOC,EAAW,aAAaF,KAC/BG,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUP,EAAOD,EAMnC,MAJsB,oBAAXW,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACJ,EAAA,IAASD,EAAgBM,IAAKR,GAAc,IAKtD,OAFAJ,EAAKa,YAAc,aAAahB,IAEzB,IAAKD,EAAWC,CAACA,GAAOG,EAAK,GACnC,CAAgB,GA2CnB,SAASc,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-CGiKhmTw.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Slot","createSlot","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"8IAIA,IAgCMA,EAhCQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAOC,EAAW,aAAaF,KAC/BG,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUP,EAAOD,EAMnC,MAJsB,oBAAXW,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACJ,EAAA,IAASD,EAAgBM,IAAKR,GAAc,IAKtD,OAFAJ,EAAKa,YAAc,aAAahB,IAEzB,IAAKD,EAAWC,CAACA,GAAOG,EAAK,GACnC,CAAgB,GA2CnB,SAASc,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
1
  import*as 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-ChEz--fx.mjs.map
2
+ //# sourceMappingURL=index-CldmvP4a.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-ChEz--fx.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-CldmvP4a.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
1
  import*as a from"react";var o=globalThis?.document?a.useLayoutEffect:()=>{};export{o as u};
2
- //# sourceMappingURL=index-CIfe3UIG.mjs.map
2
+ //# sourceMappingURL=index-CtowYOV1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CIfe3UIG.mjs","sources":["../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect","globalThis","document","React"],"mappings":"wBASA,IAAMA,EAAkBC,YAAYC,SAAiBC,EAAAH,gBAAkB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-CtowYOV1.mjs","sources":["../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect","globalThis","document","React"],"mappings":"wBASA,IAAMA,EAAkBC,YAAYC,SAAiBC,EAAAH,gBAAkB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{u as t}from"./index-CIfe3UIG.mjs";var i=r[" useId ".trim().toString()]||(()=>{}),o=0;function a(a){const[e,n]=r.useState(i());return t((()=>{n((r=>r??String(o++)))}),[a]),e?`radix-${e}`:""}export{a as u};
2
- //# sourceMappingURL=index-DrgyjxdM.mjs.map
1
+ import*as r from"react";import{u as t}from"./index-CtowYOV1.mjs";var i=r[" useId ".trim().toString()]||(()=>{}),o=0;function a(a){const[e,n]=r.useState(i());return t((()=>{n((r=>r??String(o++)))}),[a]),e?`radix-${e}`:""}export{a as u};
2
+ //# sourceMappingURL=index-D1CAbWF5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DrgyjxdM.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 \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useReactId","React","trim","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,UAAUC,OAAOC,aAAgB,MAAM,GACrEC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeP,EAAAQ,SAA6BT,KAKvD,OAHAU,GAAgB,KACQF,GAAOG,GAAYA,GAAWC,OAAOR,MAAQ,GAClE,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-D1CAbWF5.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 \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useReactId","React","trim","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,UAAUC,OAAOC,aAAgB,MAAM,GACrEC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeP,EAAAQ,SAA6BT,KAKvD,OAHAU,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{u as t,c as n}from"./index-BE7U1lz3.mjs";import{P as r,d as s}from"./index-BEeVpO2_.mjs";import{u as o}from"./index-DspU1Pyo.mjs";import{jsx as i}from"react/jsx-runtime";import a from"react-dom";import{u}from"./index-CIfe3UIG.mjs";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",m=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v=e.forwardRef(((s,a)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:v,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(m),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=t(a,(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,j=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){let t=function(){y(l,r,s,{discrete:!0})};const s={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);s.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>s.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),F=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){y(f,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(t,n=globalThis?.document){const r=o(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{W===P.layers.size-1&&(v?.(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)}),[]),i(r.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:n(s.onFocusCapture,F.onFocusCapture),onBlurCapture:n(s.onBlurCapture,F.onBlurCapture),onPointerDownCapture:n(s.onPointerDownCapture,j.onPointerDownCapture)})}));v.displayName="DismissableLayer";var E=e.forwardRef(((n,s)=>{const o=e.useContext(m),a=e.useRef(null),u=t(s,a);return e.useEffect((()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}}),[o.branches]),i(r.div,{...n,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?s(o,i):o.dispatchEvent(i)}E.displayName="DismissableLayerBranch";var b=v,w=E,h=e.forwardRef(((t,n)=>{const{container:s,...o}=t,[c,d]=e.useState(!1);u((()=>d(!0)),[]);const l=s||c&&globalThis?.document?.body;return l?a.createPortal(i(r.div,{...o,ref:n}),l):null}));h.displayName="Portal";export{w as B,v as D,h as P,b as R};
2
- //# sourceMappingURL=index-D1WqwlXc.mjs.map
1
+ import*as e from"react";import{u as t,c as n}from"./index-Dq1ur1Tt.mjs";import{P as r,d as s}from"./index-CGiKhmTw.mjs";import{u as o}from"./index-By-2lawf.mjs";import{jsx as i}from"react/jsx-runtime";import a from"react-dom";import{u}from"./index-CtowYOV1.mjs";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",m=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v=e.forwardRef(((s,a)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:v,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(m),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=t(a,(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,j=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){let t=function(){y(l,r,s,{discrete:!0})};const s={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);s.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>s.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),F=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){y(f,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(t,n=globalThis?.document){const r=o(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{W===P.layers.size-1&&(v?.(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)}),[]),i(r.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:n(s.onFocusCapture,F.onFocusCapture),onBlurCapture:n(s.onBlurCapture,F.onBlurCapture),onPointerDownCapture:n(s.onPointerDownCapture,j.onPointerDownCapture)})}));v.displayName="DismissableLayer";var E=e.forwardRef(((n,s)=>{const o=e.useContext(m),a=e.useRef(null),u=t(s,a);return e.useEffect((()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}}),[o.branches]),i(r.div,{...n,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?s(o,i):o.dispatchEvent(i)}E.displayName="DismissableLayerBranch";var b=v,w=E,h=e.forwardRef(((t,n)=>{const{container:s,...o}=t,[c,d]=e.useState(!1);u((()=>d(!0)),[]);const l=s||c&&globalThis?.document?.body;return l?a.createPortal(i(r.div,{...o,ref:n}),l):null}));h.displayName="Portal";export{w as B,v as D,h as P,b as R};
2
+ //# sourceMappingURL=index-D5qrkYzi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D1WqwlXc.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// 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/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/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"],"mapp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kB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-D5qrkYzi.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// 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/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/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":"sQAWA,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,GAAezB,EAAAqB,SAAS,CAAA,GAC3BK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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{u as t}from"./index-CIfe3UIG.mjs";var r=e[" useInsertionEffect ".trim().toString()]||t;function n({prop:t,defaultProp:n,onChange:o=()=>{},caller:u}){const[c,f,s]=function({defaultProp:t,onChange:n}){const[o,u]=e.useState(t),c=e.useRef(o),f=e.useRef(n);return r((()=>{f.current=n}),[n]),e.useEffect((()=>{c.current!==o&&(f.current?.(o),c.current=o)}),[o,c]),[o,u,f]}({defaultProp:n,onChange:o}),a=void 0!==t,i=a?t:c;{const r=e.useRef(void 0!==t);e.useEffect((()=>{const e=r.current;if(e!==a){}r.current=a}),[a,u])}const p=e.useCallback((e=>{if(a){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&s.current?.(r)}else f(e)}),[a,t,f,s]);return[i,p]}export{n as u};
2
- //# sourceMappingURL=index-mlVBNiql.mjs.map
1
+ import*as e from"react";import{u as t}from"./index-CtowYOV1.mjs";var r=e[" useInsertionEffect ".trim().toString()]||t;function n({prop:t,defaultProp:n,onChange:o=()=>{},caller:u}){const[c,f,s]=function({defaultProp:t,onChange:n}){const[o,u]=e.useState(t),c=e.useRef(o),f=e.useRef(n);return r((()=>{f.current=n}),[n]),e.useEffect((()=>{c.current!==o&&(f.current?.(o),c.current=o)}),[o,c]),[o,u,f]}({defaultProp:n,onChange:o}),a=void 0!==t,i=a?t:c;{const r=e.useRef(void 0!==t);e.useEffect((()=>{const e=r.current;if(e!==a){}r.current=a}),[a,u])}const p=e.useCallback((e=>{if(a){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&s.current?.(r)}else f(e)}),[a,t,f,s]);return[i,p]}export{n as u};
2
+ //# sourceMappingURL=index-DIH-sx20.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-mlVBNiql.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useInsertionEffect","React","trim","toString","useLayoutEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","value","setValue","useState","prevValueRef","useRef","current","useEffect","useUncontrolledState","isControlled","isControlledRef","wasControlled","useCallback","nextValue","isFunction"],"mappings":"iEAIA,IAAMA,EACHC,EAAc,uBAAuBC,OAAOC,aAAeC,EAYvD,SAASC,GAAwBC,KACtCA,EAAAC,YACAA,EAAAC,SACAA,EAAW,OAAMC,OACjBA,IAEA,MAAOC,EAAkBC,EAAqBC,GA4ChD,UAAiCL,YAC/BA,EAAAC,SACAA,IAMA,MAAOK,EAAOC,GAAkBb,EAAAc,SAASR,GACnCS,EAAqBf,EAAAgB,OAAOJ,GAE5BD,EAAoBX,EAAAgB,OAAOT,GAYjC,OAXAR,GAAmB,KACjBY,EAAYM,QAAUV,CAAA,GACrB,CAACA,IAEEP,EAAAkB,WAAU,KACVH,EAAaE,UAAYL,IAC3BD,EAAYM,UAAUL,GACtBG,EAAaE,QAAUL,EACzB,GACC,CAACA,EAAOG,IAEJ,CAACH,EAAOC,EAAUF,EAC3B,CApE+DQ,CAAqB,CAChFb,cACAC,aAEIa,OAAwB,IAATf,EACfO,EAAQQ,EAAef,EAAOI,EAMO,CACzC,MAAMY,EAAwBrB,EAAAgB,YAAgB,IAATX,GAC/BL,EAAAkB,WAAU,KACd,MAAMI,EAAgBD,EAAgBJ,QACtC,GAAIK,IAAkBF,EAAc,CAMpC,CACAC,EAAgBJ,QAAUG,CAAA,GACzB,CAACA,EAAcZ,GACpB,CAGA,MAAMK,EAAiBb,EAAAuB,aACpBC,IACC,GAAIJ,EAAc,CAChB,MAAMR,EAwCd,SAAoBA,GAClB,MAAwB,mBAAVA,CAChB,CA1CsBa,CAAWD,GAAaA,EAAUnB,GAAQmB,EACpDZ,IAAUP,GACZM,EAAYM,UAAUL,QAGxBF,EAAoBc,EACtB,GAEF,CAACJ,EAAcf,EAAMK,EAAqBC,IAG5C,MAAO,CAACC,EAAOC,EACjB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-DIH-sx20.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useInsertionEffect","React","trim","toString","useLayoutEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","value","setValue","useState","prevValueRef","useRef","current","useEffect","useUncontrolledState","isControlled","isControlledRef","wasControlled","useCallback","nextValue","isFunction"],"mappings":"iEAIA,IAAMA,EACHC,EAAc,uBAAuBC,OAAOC,aAAeC,EAYvD,SAASC,GAAwBC,KACtCA,EAAAC,YACAA,EAAAC,SACAA,EAAW,OAAMC,OACjBA,IAEA,MAAOC,EAAkBC,EAAqBC,GA4ChD,UAAiCL,YAC/BA,EAAAC,SACAA,IAMA,MAAOK,EAAOC,GAAkBb,EAAAc,SAASR,GACnCS,EAAqBf,EAAAgB,OAAOJ,GAE5BD,EAAoBX,EAAAgB,OAAOT,GAYjC,OAXAR,GAAmB,KACjBY,EAAYM,QAAUV,CAAA,GACrB,CAACA,IAEEP,EAAAkB,WAAU,KACVH,EAAaE,UAAYL,IAC3BD,EAAYM,UAAUL,GACtBG,EAAaE,QAAUL,EACzB,GACC,CAACA,EAAOG,IAEJ,CAACH,EAAOC,EAAUF,EAC3B,CApE+DQ,CAAqB,CAChFb,cACAC,aAEIa,OAAwB,IAATf,EACfO,EAAQQ,EAAef,EAAOI,EAMO,CACzC,MAAMY,EAAwBrB,EAAAgB,YAAgB,IAATX,GAC/BL,EAAAkB,WAAU,KACd,MAAMI,EAAgBD,EAAgBJ,QACtC,GAAIK,IAAkBF,EAAc,CAMpC,CACAC,EAAgBJ,QAAUG,CAAA,GACzB,CAACA,EAAcZ,GACpB,CAGA,MAAMK,EAAiBb,EAAAuB,aACpBC,IACC,GAAIJ,EAAc,CAChB,MAAMR,EAwCd,SAAoBA,GAClB,MAAwB,mBAAVA,CAChB,CA1CsBa,CAAWD,GAAaA,EAAUnB,GAAQmB,EACpDZ,IAAUP,GACZM,EAAYM,UAAUL,QAGxBF,EAAoBc,EACtB,GAEF,CAACJ,EAAcf,EAAMK,EAAqBC,IAG5C,MAAO,CAACC,EAAOC,EACjB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{u as n}from"./index-CIfe3UIG.mjs";function t(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function r(...e){return n=>{let r=!1;const o=e.map((e=>{const o=t(e,n);return r||"function"!=typeof o||(r=!0),o}));if(r)return()=>{for(let n=0;n<o.length;n++){const r=o[n];"function"==typeof r?r():t(e[n],null)}}}}function o(...n){return e.useCallback(r(...n),n)}function u(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}var i=t=>{const{present:r,children:u}=t,i=function(t){const[r,o]=e.useState(),u=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),c=t?"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=s(u.current);a.current="mounted"===f?e:"none"}),[f]),n((()=>{const e=u.current,n=i.current;if(n!==t){const r=a.current,o=s(e);if(t)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,l]),n((()=>{if(r){let e;const n=r.ownerDocument.defaultView??window,t=t=>{const o=s(u.current).includes(t.animationName);if(t.target===r&&o&&(l("ANIMATION_END"),!i.current)){const t=r.style.animationFillMode;r.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=t)}))}},o=e=>{e.target===r&&(a.current=s(u.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",t),r.addEventListener("animationend",t),()=>{n.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",t),r.removeEventListener("animationend",t)}}l("ANIMATION_END")}),[r,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{u.current=e?getComputedStyle(e):null,o(e)}),[])}}(r),a="function"==typeof u?u({present:i.isPresent}):e.Children.only(u),c=o(i.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}(a));return"function"==typeof u||i.isPresent?e.cloneElement(a,{ref:c}):null};function s(e){return e?.animationName||"none"}i.displayName="Presence";export{i as P,r as a,u as c,o as u};
2
- //# sourceMappingURL=index-BE7U1lz3.mjs.map
1
+ import*as e from"react";import{u as n}from"./index-CtowYOV1.mjs";function t(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function r(...e){return n=>{let r=!1;const o=e.map((e=>{const o=t(e,n);return r||"function"!=typeof o||(r=!0),o}));if(r)return()=>{for(let n=0;n<o.length;n++){const r=o[n];"function"==typeof r?r():t(e[n],null)}}}}function o(...n){return e.useCallback(r(...n),n)}function u(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}var i=t=>{const{present:r,children:u}=t,i=function(t){const[r,o]=e.useState(),u=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),c=t?"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=s(u.current);a.current="mounted"===f?e:"none"}),[f]),n((()=>{const e=u.current,n=i.current;if(n!==t){const r=a.current,o=s(e);if(t)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,l]),n((()=>{if(r){let e;const n=r.ownerDocument.defaultView??window,t=t=>{const o=s(u.current).includes(t.animationName);if(t.target===r&&o&&(l("ANIMATION_END"),!i.current)){const t=r.style.animationFillMode;r.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=t)}))}},o=e=>{e.target===r&&(a.current=s(u.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",t),r.addEventListener("animationend",t),()=>{n.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",t),r.removeEventListener("animationend",t)}}l("ANIMATION_END")}),[r,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{u.current=e?getComputedStyle(e):null,o(e)}),[])}}(r),a="function"==typeof u?u({present:i.isPresent}):e.Children.only(u),c=o(i.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}(a));return"function"==typeof u||i.isPresent?e.cloneElement(a,{ref:c}):null};function s(e){return e?.animationName||"none"}i.displayName="Presence";export{i as P,r as a,u as c,o as u};
2
+ //# sourceMappingURL=index-Dq1ur1Tt.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BE7U1lz3.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,KAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,CAAA,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,EAEJ,CAEJ,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAAS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QtD,MAAMtB,KAAQ4E,EAAgB5E,GAC/C,CAzK4CmF,CAAcV,IAExD,MADuC,mBAAbjD,GACLC,EAAS6C,UAAkB3C,EAAAyD,aAAaX,EAAO,CAAEzE,QAAS,IAAA,EA6IjF,SAAS8C,EAAiBE,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-Dq1ur1Tt.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,KAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,CAAA,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,EAEJ,CAEJ,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAASW,EACPC,EACAC,GACAC,yBAAEA,GAA2B,GAAS,IAEtC,OAAO,SAAqBC,GAG1B,GAFAH,IAAuBG,IAEU,IAA7BD,IAAuCC,EAAMC,iBAC/C,OAAOH,IAAkBE,EAE7B,CACF,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