ivt 0.1.5 → 0.1.6

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 (191) hide show
  1. package/package.json +1 -1
  2. package/dist/accordion/index.d.ts +0 -13
  3. package/dist/accordion/index.mjs +0 -2
  4. package/dist/accordion/index.mjs.map +0 -1
  5. package/dist/alert/index.d.ts +0 -13
  6. package/dist/alert/index.mjs +0 -2
  7. package/dist/alert/index.mjs.map +0 -1
  8. package/dist/alert-dialog/index.d.ts +0 -17
  9. package/dist/alert-dialog/index.mjs +0 -2
  10. package/dist/alert-dialog/index.mjs.map +0 -1
  11. package/dist/avatar/index.d.ts +0 -9
  12. package/dist/avatar/index.mjs +0 -2
  13. package/dist/avatar/index.mjs.map +0 -1
  14. package/dist/badge/index.d.ts +0 -17
  15. package/dist/badge/index.mjs +0 -2
  16. package/dist/badge/index.mjs.map +0 -1
  17. package/dist/base/index.d.ts +0 -39
  18. package/dist/base/index.mjs +0 -2
  19. package/dist/base/index.mjs.map +0 -1
  20. package/dist/button/index.d.ts +0 -15
  21. package/dist/button/index.mjs +0 -2
  22. package/dist/button/index.mjs.map +0 -1
  23. package/dist/calendar/index.d.ts +0 -12
  24. package/dist/calendar/index.mjs +0 -2
  25. package/dist/calendar/index.mjs.map +0 -1
  26. package/dist/card/index.d.ts +0 -12
  27. package/dist/card/index.mjs +0 -2
  28. package/dist/card/index.mjs.map +0 -1
  29. package/dist/checkbox/index.d.ts +0 -7
  30. package/dist/checkbox/index.mjs +0 -2
  31. package/dist/checkbox/index.mjs.map +0 -1
  32. package/dist/chunks/TextWrap-qkVOkHiw.mjs +0 -2
  33. package/dist/chunks/TextWrap-qkVOkHiw.mjs.map +0 -1
  34. package/dist/chunks/accordion-DCSVhB7Z.mjs +0 -2
  35. package/dist/chunks/accordion-DCSVhB7Z.mjs.map +0 -1
  36. package/dist/chunks/badge-D_x3BlPA.mjs +0 -2
  37. package/dist/chunks/badge-D_x3BlPA.mjs.map +0 -1
  38. package/dist/chunks/bundle-mjs-Dthp4wMi.mjs +0 -2
  39. package/dist/chunks/bundle-mjs-Dthp4wMi.mjs.map +0 -1
  40. package/dist/chunks/button-KMRgpiAy.mjs +0 -2
  41. package/dist/chunks/button-KMRgpiAy.mjs.map +0 -1
  42. package/dist/chunks/calendar-CmSMkDgI.mjs +0 -2
  43. package/dist/chunks/calendar-CmSMkDgI.mjs.map +0 -1
  44. package/dist/chunks/check-BSduI23k.mjs +0 -2
  45. package/dist/chunks/check-BSduI23k.mjs.map +0 -1
  46. package/dist/chunks/chevron-down-BjVZhjFJ.mjs +0 -2
  47. package/dist/chunks/chevron-down-BjVZhjFJ.mjs.map +0 -1
  48. package/dist/chunks/chevron-left-DjmYjuTW.mjs +0 -2
  49. package/dist/chunks/chevron-left-DjmYjuTW.mjs.map +0 -1
  50. package/dist/chunks/chevron-right-DOvHale5.mjs +0 -2
  51. package/dist/chunks/chevron-right-DOvHale5.mjs.map +0 -1
  52. package/dist/chunks/command-DMdzlCRK.mjs +0 -2
  53. package/dist/chunks/command-DMdzlCRK.mjs.map +0 -1
  54. package/dist/chunks/createLucideIcon-BPtXaGDX.mjs +0 -2
  55. package/dist/chunks/createLucideIcon-BPtXaGDX.mjs.map +0 -1
  56. package/dist/chunks/dialog-DT-LxfeE.mjs +0 -2
  57. package/dist/chunks/dialog-DT-LxfeE.mjs.map +0 -1
  58. package/dist/chunks/hover-card-D0WoNHd_.mjs +0 -2
  59. package/dist/chunks/hover-card-D0WoNHd_.mjs.map +0 -1
  60. package/dist/chunks/index-BE7U1lz3.mjs +0 -2
  61. package/dist/chunks/index-BE7U1lz3.mjs.map +0 -1
  62. package/dist/chunks/index-BEeVpO2_.mjs +0 -2
  63. package/dist/chunks/index-BEeVpO2_.mjs.map +0 -1
  64. package/dist/chunks/index-BOtb6ofV.mjs +0 -2
  65. package/dist/chunks/index-BOtb6ofV.mjs.map +0 -1
  66. package/dist/chunks/index-BYaJxqBC.mjs +0 -2
  67. package/dist/chunks/index-BYaJxqBC.mjs.map +0 -1
  68. package/dist/chunks/index-C8ZqoA88.mjs +0 -2
  69. package/dist/chunks/index-C8ZqoA88.mjs.map +0 -1
  70. package/dist/chunks/index-CIfe3UIG.mjs +0 -2
  71. package/dist/chunks/index-CIfe3UIG.mjs.map +0 -1
  72. package/dist/chunks/index-CVg6WODB.mjs +0 -2
  73. package/dist/chunks/index-CVg6WODB.mjs.map +0 -1
  74. package/dist/chunks/index-ChEz--fx.mjs +0 -2
  75. package/dist/chunks/index-ChEz--fx.mjs.map +0 -1
  76. package/dist/chunks/index-D1WqwlXc.mjs +0 -2
  77. package/dist/chunks/index-D1WqwlXc.mjs.map +0 -1
  78. package/dist/chunks/index-DrgyjxdM.mjs +0 -2
  79. package/dist/chunks/index-DrgyjxdM.mjs.map +0 -1
  80. package/dist/chunks/index-Ds-NL_xb.mjs +0 -2
  81. package/dist/chunks/index-Ds-NL_xb.mjs.map +0 -1
  82. package/dist/chunks/index-DspU1Pyo.mjs +0 -2
  83. package/dist/chunks/index-DspU1Pyo.mjs.map +0 -1
  84. package/dist/chunks/index-k-LDQli2.mjs +0 -2
  85. package/dist/chunks/index-k-LDQli2.mjs.map +0 -1
  86. package/dist/chunks/index-mlVBNiql.mjs +0 -2
  87. package/dist/chunks/index-mlVBNiql.mjs.map +0 -1
  88. package/dist/chunks/index-rHca3YxT.mjs +0 -2
  89. package/dist/chunks/index-rHca3YxT.mjs.map +0 -1
  90. package/dist/chunks/input-CjX7cpsJ.mjs +0 -2
  91. package/dist/chunks/input-CjX7cpsJ.mjs.map +0 -1
  92. package/dist/chunks/label-B0a5aNu2.mjs +0 -2
  93. package/dist/chunks/label-B0a5aNu2.mjs.map +0 -1
  94. package/dist/chunks/pagination-XvM9skZV.mjs +0 -2
  95. package/dist/chunks/pagination-XvM9skZV.mjs.map +0 -1
  96. package/dist/chunks/popover-COG3isxJ.mjs +0 -2
  97. package/dist/chunks/popover-COG3isxJ.mjs.map +0 -1
  98. package/dist/chunks/progress-KQNbvdmu.mjs +0 -2
  99. package/dist/chunks/progress-KQNbvdmu.mjs.map +0 -1
  100. package/dist/chunks/scroll-area-Bof4yc1z.mjs +0 -2
  101. package/dist/chunks/scroll-area-Bof4yc1z.mjs.map +0 -1
  102. package/dist/chunks/select-rpTSdR8q.mjs +0 -2
  103. package/dist/chunks/select-rpTSdR8q.mjs.map +0 -1
  104. package/dist/chunks/skeleton-DwcR7I_w.mjs +0 -2
  105. package/dist/chunks/skeleton-DwcR7I_w.mjs.map +0 -1
  106. package/dist/chunks/sortable-BKqLwBgJ.mjs +0 -2
  107. package/dist/chunks/sortable-BKqLwBgJ.mjs.map +0 -1
  108. package/dist/chunks/table-DapXfoMY.mjs +0 -2
  109. package/dist/chunks/table-DapXfoMY.mjs.map +0 -1
  110. package/dist/chunks/tslib.es6-D-trMiel.mjs +0 -2
  111. package/dist/chunks/tslib.es6-D-trMiel.mjs.map +0 -1
  112. package/dist/chunks/utils-BDlXiHS3.mjs +0 -2
  113. package/dist/chunks/utils-BDlXiHS3.mjs.map +0 -1
  114. package/dist/chunks/x-BIoR0tgq.mjs +0 -2
  115. package/dist/chunks/x-BIoR0tgq.mjs.map +0 -1
  116. package/dist/command/index.d.ts +0 -20
  117. package/dist/command/index.mjs +0 -2
  118. package/dist/command/index.mjs.map +0 -1
  119. package/dist/data-table/index.d.ts +0 -132
  120. package/dist/data-table/index.mjs +0 -2
  121. package/dist/data-table/index.mjs.map +0 -1
  122. package/dist/dialog/index.d.ts +0 -16
  123. package/dist/dialog/index.mjs +0 -2
  124. package/dist/dialog/index.mjs.map +0 -1
  125. package/dist/dropdown-menu/index.d.ts +0 -28
  126. package/dist/dropdown-menu/index.mjs +0 -2
  127. package/dist/dropdown-menu/index.mjs.map +0 -1
  128. package/dist/dropzone/index.d.ts +0 -127
  129. package/dist/dropzone/index.mjs +0 -2
  130. package/dist/dropzone/index.mjs.map +0 -1
  131. package/dist/form/index.d.ts +0 -28
  132. package/dist/form/index.mjs +0 -2
  133. package/dist/form/index.mjs.map +0 -1
  134. package/dist/hover-card/index.d.ts +0 -9
  135. package/dist/hover-card/index.mjs +0 -2
  136. package/dist/hover-card/index.mjs.map +0 -1
  137. package/dist/icon/index.d.ts +0 -16
  138. package/dist/icon/index.mjs +0 -2
  139. package/dist/icon/index.mjs.map +0 -1
  140. package/dist/index/index.d.ts +0 -2
  141. package/dist/index/index.mjs +0 -2
  142. package/dist/index/index.mjs.map +0 -1
  143. package/dist/index.css +0 -1
  144. package/dist/input/index.d.ts +0 -6
  145. package/dist/input/index.mjs +0 -2
  146. package/dist/input/index.mjs.map +0 -1
  147. package/dist/label/index.d.ts +0 -7
  148. package/dist/label/index.mjs +0 -2
  149. package/dist/label/index.mjs.map +0 -1
  150. package/dist/pagination/index.d.ts +0 -18
  151. package/dist/pagination/index.mjs +0 -2
  152. package/dist/pagination/index.mjs.map +0 -1
  153. package/dist/popover/index.d.ts +0 -10
  154. package/dist/popover/index.mjs +0 -2
  155. package/dist/popover/index.mjs.map +0 -1
  156. package/dist/progress/index.d.ts +0 -7
  157. package/dist/progress/index.mjs +0 -2
  158. package/dist/progress/index.mjs.map +0 -1
  159. package/dist/scroll-area/index.d.ts +0 -8
  160. package/dist/scroll-area/index.mjs +0 -2
  161. package/dist/scroll-area/index.mjs.map +0 -1
  162. package/dist/select/index.d.ts +0 -16
  163. package/dist/select/index.mjs +0 -2
  164. package/dist/select/index.mjs.map +0 -1
  165. package/dist/separator/index.d.ts +0 -7
  166. package/dist/separator/index.mjs +0 -2
  167. package/dist/separator/index.mjs.map +0 -1
  168. package/dist/sheet/index.d.ts +0 -16
  169. package/dist/sheet/index.mjs +0 -2
  170. package/dist/sheet/index.mjs.map +0 -1
  171. package/dist/skeleton/index.d.ts +0 -6
  172. package/dist/skeleton/index.mjs +0 -2
  173. package/dist/skeleton/index.mjs.map +0 -1
  174. package/dist/sonner/index.d.ts +0 -5
  175. package/dist/sonner/index.mjs +0 -2
  176. package/dist/sonner/index.mjs.map +0 -1
  177. package/dist/sortable/index.d.ts +0 -109
  178. package/dist/sortable/index.mjs +0 -2
  179. package/dist/sortable/index.mjs.map +0 -1
  180. package/dist/table/index.d.ts +0 -13
  181. package/dist/table/index.mjs +0 -2
  182. package/dist/table/index.mjs.map +0 -1
  183. package/dist/tabs/index.d.ts +0 -10
  184. package/dist/tabs/index.mjs +0 -2
  185. package/dist/tabs/index.mjs.map +0 -1
  186. package/dist/toast/index.d.ts +0 -21
  187. package/dist/toast/index.mjs +0 -2
  188. package/dist/toast/index.mjs.map +0 -1
  189. package/dist/tooltip/index.d.ts +0 -10
  190. package/dist/tooltip/index.mjs +0 -2
  191. package/dist/tooltip/index.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../node_modules/sonner/dist/index.mjs","../../src/components/ui/sonner/sonner.tsx"],"sourcesContent":["'use client';\nfunction __insertCSS(code) {\n if (!code || typeof document == 'undefined') return\n let head = document.head || document.getElementsByTagName('head')[0]\n let style = document.createElement('style')\n style.type = 'text/css'\n head.appendChild(style)\n ;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))\n}\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst getAsset = (type)=>{\n switch(type){\n case 'success':\n return SuccessIcon;\n case 'info':\n return InfoIcon;\n case 'warning':\n return WarningIcon;\n case 'error':\n return ErrorIcon;\n default:\n return null;\n }\n};\nconst bars = Array(12).fill(0);\nconst Loader = ({ visible, className })=>{\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: [\n 'sonner-loading-wrapper',\n className\n ].filter(Boolean).join(' '),\n \"data-visible\": visible\n }, /*#__PURE__*/ React.createElement(\"div\", {\n className: \"sonner-spinner\"\n }, bars.map((_, i)=>/*#__PURE__*/ React.createElement(\"div\", {\n className: \"sonner-loading-bar\",\n key: `spinner-bar-${i}`\n }))));\n};\nconst SuccessIcon = /*#__PURE__*/ React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n height: \"20\",\n width: \"20\"\n}, /*#__PURE__*/ React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\",\n clipRule: \"evenodd\"\n}));\nconst WarningIcon = /*#__PURE__*/ React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n height: \"20\",\n width: \"20\"\n}, /*#__PURE__*/ React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z\",\n clipRule: \"evenodd\"\n}));\nconst InfoIcon = /*#__PURE__*/ React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n height: \"20\",\n width: \"20\"\n}, /*#__PURE__*/ React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z\",\n clipRule: \"evenodd\"\n}));\nconst ErrorIcon = /*#__PURE__*/ React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n height: \"20\",\n width: \"20\"\n}, /*#__PURE__*/ React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\",\n clipRule: \"evenodd\"\n}));\nconst CloseIcon = /*#__PURE__*/ React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"12\",\n height: \"12\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"1.5\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, /*#__PURE__*/ React.createElement(\"line\", {\n x1: \"18\",\n y1: \"6\",\n x2: \"6\",\n y2: \"18\"\n}), /*#__PURE__*/ React.createElement(\"line\", {\n x1: \"6\",\n y1: \"6\",\n x2: \"18\",\n y2: \"18\"\n}));\n\nconst useIsDocumentHidden = ()=>{\n const [isDocumentHidden, setIsDocumentHidden] = React.useState(document.hidden);\n React.useEffect(()=>{\n const callback = ()=>{\n setIsDocumentHidden(document.hidden);\n };\n document.addEventListener('visibilitychange', callback);\n return ()=>window.removeEventListener('visibilitychange', callback);\n }, []);\n return isDocumentHidden;\n};\n\nlet toastsCounter = 1;\nclass Observer {\n constructor(){\n // We use arrow functions to maintain the correct `this` reference\n this.subscribe = (subscriber)=>{\n this.subscribers.push(subscriber);\n return ()=>{\n const index = this.subscribers.indexOf(subscriber);\n this.subscribers.splice(index, 1);\n };\n };\n this.publish = (data)=>{\n this.subscribers.forEach((subscriber)=>subscriber(data));\n };\n this.addToast = (data)=>{\n this.publish(data);\n this.toasts = [\n ...this.toasts,\n data\n ];\n };\n this.create = (data)=>{\n var _data_id;\n const { message, ...rest } = data;\n const id = typeof (data == null ? void 0 : data.id) === 'number' || ((_data_id = data.id) == null ? void 0 : _data_id.length) > 0 ? data.id : toastsCounter++;\n const alreadyExists = this.toasts.find((toast)=>{\n return toast.id === id;\n });\n const dismissible = data.dismissible === undefined ? true : data.dismissible;\n if (this.dismissedToasts.has(id)) {\n this.dismissedToasts.delete(id);\n }\n if (alreadyExists) {\n this.toasts = this.toasts.map((toast)=>{\n if (toast.id === id) {\n this.publish({\n ...toast,\n ...data,\n id,\n title: message\n });\n return {\n ...toast,\n ...data,\n id,\n dismissible,\n title: message\n };\n }\n return toast;\n });\n } else {\n this.addToast({\n title: message,\n ...rest,\n dismissible,\n id\n });\n }\n return id;\n };\n this.dismiss = (id)=>{\n if (id) {\n this.dismissedToasts.add(id);\n requestAnimationFrame(()=>this.subscribers.forEach((subscriber)=>subscriber({\n id,\n dismiss: true\n })));\n } else {\n this.toasts.forEach((toast)=>{\n this.subscribers.forEach((subscriber)=>subscriber({\n id: toast.id,\n dismiss: true\n }));\n });\n }\n return id;\n };\n this.message = (message, data)=>{\n return this.create({\n ...data,\n message\n });\n };\n this.error = (message, data)=>{\n return this.create({\n ...data,\n message,\n type: 'error'\n });\n };\n this.success = (message, data)=>{\n return this.create({\n ...data,\n type: 'success',\n message\n });\n };\n this.info = (message, data)=>{\n return this.create({\n ...data,\n type: 'info',\n message\n });\n };\n this.warning = (message, data)=>{\n return this.create({\n ...data,\n type: 'warning',\n message\n });\n };\n this.loading = (message, data)=>{\n return this.create({\n ...data,\n type: 'loading',\n message\n });\n };\n this.promise = (promise, data)=>{\n if (!data) {\n // Nothing to show\n return;\n }\n let id = undefined;\n if (data.loading !== undefined) {\n id = this.create({\n ...data,\n promise,\n type: 'loading',\n message: data.loading,\n description: typeof data.description !== 'function' ? data.description : undefined\n });\n }\n const p = Promise.resolve(promise instanceof Function ? promise() : promise);\n let shouldDismiss = id !== undefined;\n let result;\n const originalPromise = p.then(async (response)=>{\n result = [\n 'resolve',\n response\n ];\n const isReactElementResponse = React.isValidElement(response);\n if (isReactElementResponse) {\n shouldDismiss = false;\n this.create({\n id,\n type: 'default',\n message: response\n });\n } else if (isHttpResponse(response) && !response.ok) {\n shouldDismiss = false;\n const promiseData = typeof data.error === 'function' ? await data.error(`HTTP error! status: ${response.status}`) : data.error;\n const description = typeof data.description === 'function' ? await data.description(`HTTP error! status: ${response.status}`) : data.description;\n const isExtendedResult = typeof promiseData === 'object' && !React.isValidElement(promiseData);\n const toastSettings = isExtendedResult ? promiseData : {\n message: promiseData\n };\n this.create({\n id,\n type: 'error',\n description,\n ...toastSettings\n });\n } else if (response instanceof Error) {\n shouldDismiss = false;\n const promiseData = typeof data.error === 'function' ? await data.error(response) : data.error;\n const description = typeof data.description === 'function' ? await data.description(response) : data.description;\n const isExtendedResult = typeof promiseData === 'object' && !React.isValidElement(promiseData);\n const toastSettings = isExtendedResult ? promiseData : {\n message: promiseData\n };\n this.create({\n id,\n type: 'error',\n description,\n ...toastSettings\n });\n } else if (data.success !== undefined) {\n shouldDismiss = false;\n const promiseData = typeof data.success === 'function' ? await data.success(response) : data.success;\n const description = typeof data.description === 'function' ? await data.description(response) : data.description;\n const isExtendedResult = typeof promiseData === 'object' && !React.isValidElement(promiseData);\n const toastSettings = isExtendedResult ? promiseData : {\n message: promiseData\n };\n this.create({\n id,\n type: 'success',\n description,\n ...toastSettings\n });\n }\n }).catch(async (error)=>{\n result = [\n 'reject',\n error\n ];\n if (data.error !== undefined) {\n shouldDismiss = false;\n const promiseData = typeof data.error === 'function' ? await data.error(error) : data.error;\n const description = typeof data.description === 'function' ? await data.description(error) : data.description;\n const isExtendedResult = typeof promiseData === 'object' && !React.isValidElement(promiseData);\n const toastSettings = isExtendedResult ? promiseData : {\n message: promiseData\n };\n this.create({\n id,\n type: 'error',\n description,\n ...toastSettings\n });\n }\n }).finally(()=>{\n if (shouldDismiss) {\n // Toast is still in load state (and will be indefinitely — dismiss it)\n this.dismiss(id);\n id = undefined;\n }\n data.finally == null ? void 0 : data.finally.call(data);\n });\n const unwrap = ()=>new Promise((resolve, reject)=>originalPromise.then(()=>result[0] === 'reject' ? reject(result[1]) : resolve(result[1])).catch(reject));\n if (typeof id !== 'string' && typeof id !== 'number') {\n // cannot Object.assign on undefined\n return {\n unwrap\n };\n } else {\n return Object.assign(id, {\n unwrap\n });\n }\n };\n this.custom = (jsx, data)=>{\n const id = (data == null ? void 0 : data.id) || toastsCounter++;\n this.create({\n jsx: jsx(id),\n id,\n ...data\n });\n return id;\n };\n this.getActiveToasts = ()=>{\n return this.toasts.filter((toast)=>!this.dismissedToasts.has(toast.id));\n };\n this.subscribers = [];\n this.toasts = [];\n this.dismissedToasts = new Set();\n }\n}\nconst ToastState = new Observer();\n// bind this to the toast function\nconst toastFunction = (message, data)=>{\n const id = (data == null ? void 0 : data.id) || toastsCounter++;\n ToastState.addToast({\n title: message,\n ...data,\n id\n });\n return id;\n};\nconst isHttpResponse = (data)=>{\n return data && typeof data === 'object' && 'ok' in data && typeof data.ok === 'boolean' && 'status' in data && typeof data.status === 'number';\n};\nconst basicToast = toastFunction;\nconst getHistory = ()=>ToastState.toasts;\nconst getToasts = ()=>ToastState.getActiveToasts();\n// We use `Object.assign` to maintain the correct types as we would lose them otherwise\nconst toast = Object.assign(basicToast, {\n success: ToastState.success,\n info: ToastState.info,\n warning: ToastState.warning,\n error: ToastState.error,\n custom: ToastState.custom,\n message: ToastState.message,\n promise: ToastState.promise,\n dismiss: ToastState.dismiss,\n loading: ToastState.loading\n}, {\n getHistory,\n getToasts\n});\n\n__insertCSS(\"[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\");\n\nfunction isAction(action) {\n return action.label !== undefined;\n}\n\n// Visible toasts amount\nconst VISIBLE_TOASTS_AMOUNT = 3;\n// Viewport padding\nconst VIEWPORT_OFFSET = '24px';\n// Mobile viewport padding\nconst MOBILE_VIEWPORT_OFFSET = '16px';\n// Default lifetime of a toasts (in ms)\nconst TOAST_LIFETIME = 4000;\n// Default toast width\nconst TOAST_WIDTH = 356;\n// Default gap between toasts\nconst GAP = 14;\n// Threshold to dismiss a toast\nconst SWIPE_THRESHOLD = 45;\n// Equal to exit animation duration\nconst TIME_BEFORE_UNMOUNT = 200;\nfunction cn(...classes) {\n return classes.filter(Boolean).join(' ');\n}\nfunction getDefaultSwipeDirections(position) {\n const [y, x] = position.split('-');\n const directions = [];\n if (y) {\n directions.push(y);\n }\n if (x) {\n directions.push(x);\n }\n return directions;\n}\nconst Toast = (props)=>{\n var _toast_classNames, _toast_classNames1, _toast_classNames2, _toast_classNames3, _toast_classNames4, _toast_classNames5, _toast_classNames6, _toast_classNames7, _toast_classNames8;\n const { invert: ToasterInvert, toast, unstyled, interacting, setHeights, visibleToasts, heights, index, toasts, expanded, removeToast, defaultRichColors, closeButton: closeButtonFromToaster, style, cancelButtonStyle, actionButtonStyle, className = '', descriptionClassName = '', duration: durationFromToaster, position, gap, expandByDefault, classNames, icons, closeButtonAriaLabel = 'Close toast' } = props;\n const [swipeDirection, setSwipeDirection] = React.useState(null);\n const [swipeOutDirection, setSwipeOutDirection] = React.useState(null);\n const [mounted, setMounted] = React.useState(false);\n const [removed, setRemoved] = React.useState(false);\n const [swiping, setSwiping] = React.useState(false);\n const [swipeOut, setSwipeOut] = React.useState(false);\n const [isSwiped, setIsSwiped] = React.useState(false);\n const [offsetBeforeRemove, setOffsetBeforeRemove] = React.useState(0);\n const [initialHeight, setInitialHeight] = React.useState(0);\n const remainingTime = React.useRef(toast.duration || durationFromToaster || TOAST_LIFETIME);\n const dragStartTime = React.useRef(null);\n const toastRef = React.useRef(null);\n const isFront = index === 0;\n const isVisible = index + 1 <= visibleToasts;\n const toastType = toast.type;\n const dismissible = toast.dismissible !== false;\n const toastClassname = toast.className || '';\n const toastDescriptionClassname = toast.descriptionClassName || '';\n // Height index is used to calculate the offset as it gets updated before the toast array, which means we can calculate the new layout faster.\n const heightIndex = React.useMemo(()=>heights.findIndex((height)=>height.toastId === toast.id) || 0, [\n heights,\n toast.id\n ]);\n const closeButton = React.useMemo(()=>{\n var _toast_closeButton;\n return (_toast_closeButton = toast.closeButton) != null ? _toast_closeButton : closeButtonFromToaster;\n }, [\n toast.closeButton,\n closeButtonFromToaster\n ]);\n const duration = React.useMemo(()=>toast.duration || durationFromToaster || TOAST_LIFETIME, [\n toast.duration,\n durationFromToaster\n ]);\n const closeTimerStartTimeRef = React.useRef(0);\n const offset = React.useRef(0);\n const lastCloseTimerStartTimeRef = React.useRef(0);\n const pointerStartRef = React.useRef(null);\n const [y, x] = position.split('-');\n const toastsHeightBefore = React.useMemo(()=>{\n return heights.reduce((prev, curr, reducerIndex)=>{\n // Calculate offset up until current toast\n if (reducerIndex >= heightIndex) {\n return prev;\n }\n return prev + curr.height;\n }, 0);\n }, [\n heights,\n heightIndex\n ]);\n const isDocumentHidden = useIsDocumentHidden();\n const invert = toast.invert || ToasterInvert;\n const disabled = toastType === 'loading';\n offset.current = React.useMemo(()=>heightIndex * gap + toastsHeightBefore, [\n heightIndex,\n toastsHeightBefore\n ]);\n React.useEffect(()=>{\n remainingTime.current = duration;\n }, [\n duration\n ]);\n React.useEffect(()=>{\n // Trigger enter animation without using CSS animation\n setMounted(true);\n }, []);\n React.useEffect(()=>{\n const toastNode = toastRef.current;\n if (toastNode) {\n const height = toastNode.getBoundingClientRect().height;\n // Add toast height to heights array after the toast is mounted\n setInitialHeight(height);\n setHeights((h)=>[\n {\n toastId: toast.id,\n height,\n position: toast.position\n },\n ...h\n ]);\n return ()=>setHeights((h)=>h.filter((height)=>height.toastId !== toast.id));\n }\n }, [\n setHeights,\n toast.id\n ]);\n React.useLayoutEffect(()=>{\n if (!mounted) return;\n const toastNode = toastRef.current;\n const originalHeight = toastNode.style.height;\n toastNode.style.height = 'auto';\n const newHeight = toastNode.getBoundingClientRect().height;\n toastNode.style.height = originalHeight;\n setInitialHeight(newHeight);\n setHeights((heights)=>{\n const alreadyExists = heights.find((height)=>height.toastId === toast.id);\n if (!alreadyExists) {\n return [\n {\n toastId: toast.id,\n height: newHeight,\n position: toast.position\n },\n ...heights\n ];\n } else {\n return heights.map((height)=>height.toastId === toast.id ? {\n ...height,\n height: newHeight\n } : height);\n }\n });\n }, [\n mounted,\n toast.title,\n toast.description,\n setHeights,\n toast.id\n ]);\n const deleteToast = React.useCallback(()=>{\n // Save the offset for the exit swipe animation\n setRemoved(true);\n setOffsetBeforeRemove(offset.current);\n setHeights((h)=>h.filter((height)=>height.toastId !== toast.id));\n setTimeout(()=>{\n removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, [\n toast,\n removeToast,\n setHeights,\n offset\n ]);\n React.useEffect(()=>{\n if (toast.promise && toastType === 'loading' || toast.duration === Infinity || toast.type === 'loading') return;\n let timeoutId;\n // Pause the timer on each hover\n const pauseTimer = ()=>{\n if (lastCloseTimerStartTimeRef.current < closeTimerStartTimeRef.current) {\n // Get the elapsed time since the timer started\n const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;\n remainingTime.current = remainingTime.current - elapsedTime;\n }\n lastCloseTimerStartTimeRef.current = new Date().getTime();\n };\n const startTimer = ()=>{\n // setTimeout(, Infinity) behaves as if the delay is 0.\n // As a result, the toast would be closed immediately, giving the appearance that it was never rendered.\n // See: https://github.com/denysdovhan/wtfjs?tab=readme-ov-file#an-infinite-timeout\n if (remainingTime.current === Infinity) return;\n closeTimerStartTimeRef.current = new Date().getTime();\n // Let the toast know it has started\n timeoutId = setTimeout(()=>{\n toast.onAutoClose == null ? void 0 : toast.onAutoClose.call(toast, toast);\n deleteToast();\n }, remainingTime.current);\n };\n if (expanded || interacting || isDocumentHidden) {\n pauseTimer();\n } else {\n startTimer();\n }\n return ()=>clearTimeout(timeoutId);\n }, [\n expanded,\n interacting,\n toast,\n toastType,\n isDocumentHidden,\n deleteToast\n ]);\n React.useEffect(()=>{\n if (toast.delete) {\n deleteToast();\n }\n }, [\n deleteToast,\n toast.delete\n ]);\n function getLoadingIcon() {\n var _toast_classNames;\n if (icons == null ? void 0 : icons.loading) {\n var _toast_classNames1;\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: cn(classNames == null ? void 0 : classNames.loader, toast == null ? void 0 : (_toast_classNames1 = toast.classNames) == null ? void 0 : _toast_classNames1.loader, 'sonner-loader'),\n \"data-visible\": toastType === 'loading'\n }, icons.loading);\n }\n return /*#__PURE__*/ React.createElement(Loader, {\n className: cn(classNames == null ? void 0 : classNames.loader, toast == null ? void 0 : (_toast_classNames = toast.classNames) == null ? void 0 : _toast_classNames.loader),\n visible: toastType === 'loading'\n });\n }\n const icon = toast.icon || (icons == null ? void 0 : icons[toastType]) || getAsset(toastType);\n var _toast_richColors, _icons_close;\n return /*#__PURE__*/ React.createElement(\"li\", {\n tabIndex: 0,\n ref: toastRef,\n className: cn(className, toastClassname, classNames == null ? void 0 : classNames.toast, toast == null ? void 0 : (_toast_classNames = toast.classNames) == null ? void 0 : _toast_classNames.toast, classNames == null ? void 0 : classNames.default, classNames == null ? void 0 : classNames[toastType], toast == null ? void 0 : (_toast_classNames1 = toast.classNames) == null ? void 0 : _toast_classNames1[toastType]),\n \"data-sonner-toast\": \"\",\n \"data-rich-colors\": (_toast_richColors = toast.richColors) != null ? _toast_richColors : defaultRichColors,\n \"data-styled\": !Boolean(toast.jsx || toast.unstyled || unstyled),\n \"data-mounted\": mounted,\n \"data-promise\": Boolean(toast.promise),\n \"data-swiped\": isSwiped,\n \"data-removed\": removed,\n \"data-visible\": isVisible,\n \"data-y-position\": y,\n \"data-x-position\": x,\n \"data-index\": index,\n \"data-front\": isFront,\n \"data-swiping\": swiping,\n \"data-dismissible\": dismissible,\n \"data-type\": toastType,\n \"data-invert\": invert,\n \"data-swipe-out\": swipeOut,\n \"data-swipe-direction\": swipeOutDirection,\n \"data-expanded\": Boolean(expanded || expandByDefault && mounted),\n style: {\n '--index': index,\n '--toasts-before': index,\n '--z-index': toasts.length - index,\n '--offset': `${removed ? offsetBeforeRemove : offset.current}px`,\n '--initial-height': expandByDefault ? 'auto' : `${initialHeight}px`,\n ...style,\n ...toast.style\n },\n onDragEnd: ()=>{\n setSwiping(false);\n setSwipeDirection(null);\n pointerStartRef.current = null;\n },\n onPointerDown: (event)=>{\n if (disabled || !dismissible) return;\n dragStartTime.current = new Date();\n setOffsetBeforeRemove(offset.current);\n // Ensure we maintain correct pointer capture even when going outside of the toast (e.g. when swiping)\n event.target.setPointerCapture(event.pointerId);\n if (event.target.tagName === 'BUTTON') return;\n setSwiping(true);\n pointerStartRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n },\n onPointerUp: ()=>{\n var _toastRef_current, _toastRef_current1, _dragStartTime_current;\n if (swipeOut || !dismissible) return;\n pointerStartRef.current = null;\n const swipeAmountX = Number(((_toastRef_current = toastRef.current) == null ? void 0 : _toastRef_current.style.getPropertyValue('--swipe-amount-x').replace('px', '')) || 0);\n const swipeAmountY = Number(((_toastRef_current1 = toastRef.current) == null ? void 0 : _toastRef_current1.style.getPropertyValue('--swipe-amount-y').replace('px', '')) || 0);\n const timeTaken = new Date().getTime() - ((_dragStartTime_current = dragStartTime.current) == null ? void 0 : _dragStartTime_current.getTime());\n const swipeAmount = swipeDirection === 'x' ? swipeAmountX : swipeAmountY;\n const velocity = Math.abs(swipeAmount) / timeTaken;\n if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {\n setOffsetBeforeRemove(offset.current);\n toast.onDismiss == null ? void 0 : toast.onDismiss.call(toast, toast);\n if (swipeDirection === 'x') {\n setSwipeOutDirection(swipeAmountX > 0 ? 'right' : 'left');\n } else {\n setSwipeOutDirection(swipeAmountY > 0 ? 'down' : 'up');\n }\n deleteToast();\n setSwipeOut(true);\n return;\n } else {\n var _toastRef_current2, _toastRef_current3;\n (_toastRef_current2 = toastRef.current) == null ? void 0 : _toastRef_current2.style.setProperty('--swipe-amount-x', `0px`);\n (_toastRef_current3 = toastRef.current) == null ? void 0 : _toastRef_current3.style.setProperty('--swipe-amount-y', `0px`);\n }\n setIsSwiped(false);\n setSwiping(false);\n setSwipeDirection(null);\n },\n onPointerMove: (event)=>{\n var _window_getSelection, // Apply transform using both x and y values\n _toastRef_current, _toastRef_current1;\n if (!pointerStartRef.current || !dismissible) return;\n const isHighlighted = ((_window_getSelection = window.getSelection()) == null ? void 0 : _window_getSelection.toString().length) > 0;\n if (isHighlighted) return;\n const yDelta = event.clientY - pointerStartRef.current.y;\n const xDelta = event.clientX - pointerStartRef.current.x;\n var _props_swipeDirections;\n const swipeDirections = (_props_swipeDirections = props.swipeDirections) != null ? _props_swipeDirections : getDefaultSwipeDirections(position);\n // Determine swipe direction if not already locked\n if (!swipeDirection && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {\n setSwipeDirection(Math.abs(xDelta) > Math.abs(yDelta) ? 'x' : 'y');\n }\n let swipeAmount = {\n x: 0,\n y: 0\n };\n const getDampening = (delta)=>{\n const factor = Math.abs(delta) / 20;\n return 1 / (1.5 + factor);\n };\n // Only apply swipe in the locked direction\n if (swipeDirection === 'y') {\n // Handle vertical swipes\n if (swipeDirections.includes('top') || swipeDirections.includes('bottom')) {\n if (swipeDirections.includes('top') && yDelta < 0 || swipeDirections.includes('bottom') && yDelta > 0) {\n swipeAmount.y = yDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = yDelta * getDampening(yDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.y = Math.abs(dampenedDelta) < Math.abs(yDelta) ? dampenedDelta : yDelta;\n }\n }\n } else if (swipeDirection === 'x') {\n // Handle horizontal swipes\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n if (swipeDirections.includes('left') && xDelta < 0 || swipeDirections.includes('right') && xDelta > 0) {\n swipeAmount.x = xDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = xDelta * getDampening(xDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.x = Math.abs(dampenedDelta) < Math.abs(xDelta) ? dampenedDelta : xDelta;\n }\n }\n }\n if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) {\n setIsSwiped(true);\n }\n (_toastRef_current = toastRef.current) == null ? void 0 : _toastRef_current.style.setProperty('--swipe-amount-x', `${swipeAmount.x}px`);\n (_toastRef_current1 = toastRef.current) == null ? void 0 : _toastRef_current1.style.setProperty('--swipe-amount-y', `${swipeAmount.y}px`);\n }\n }, closeButton && !toast.jsx && toastType !== 'loading' ? /*#__PURE__*/ React.createElement(\"button\", {\n \"aria-label\": closeButtonAriaLabel,\n \"data-disabled\": disabled,\n \"data-close-button\": true,\n onClick: disabled || !dismissible ? ()=>{} : ()=>{\n deleteToast();\n toast.onDismiss == null ? void 0 : toast.onDismiss.call(toast, toast);\n },\n className: cn(classNames == null ? void 0 : classNames.closeButton, toast == null ? void 0 : (_toast_classNames2 = toast.classNames) == null ? void 0 : _toast_classNames2.closeButton)\n }, (_icons_close = icons == null ? void 0 : icons.close) != null ? _icons_close : CloseIcon) : null, (toastType || toast.icon || toast.promise) && toast.icon !== null && ((icons == null ? void 0 : icons[toastType]) !== null || toast.icon) ? /*#__PURE__*/ React.createElement(\"div\", {\n \"data-icon\": \"\",\n className: cn(classNames == null ? void 0 : classNames.icon, toast == null ? void 0 : (_toast_classNames3 = toast.classNames) == null ? void 0 : _toast_classNames3.icon)\n }, toast.promise || toast.type === 'loading' && !toast.icon ? toast.icon || getLoadingIcon() : null, toast.type !== 'loading' ? icon : null) : null, /*#__PURE__*/ React.createElement(\"div\", {\n \"data-content\": \"\",\n className: cn(classNames == null ? void 0 : classNames.content, toast == null ? void 0 : (_toast_classNames4 = toast.classNames) == null ? void 0 : _toast_classNames4.content)\n }, /*#__PURE__*/ React.createElement(\"div\", {\n \"data-title\": \"\",\n className: cn(classNames == null ? void 0 : classNames.title, toast == null ? void 0 : (_toast_classNames5 = toast.classNames) == null ? void 0 : _toast_classNames5.title)\n }, toast.jsx ? toast.jsx : typeof toast.title === 'function' ? toast.title() : toast.title), toast.description ? /*#__PURE__*/ React.createElement(\"div\", {\n \"data-description\": \"\",\n className: cn(descriptionClassName, toastDescriptionClassname, classNames == null ? void 0 : classNames.description, toast == null ? void 0 : (_toast_classNames6 = toast.classNames) == null ? void 0 : _toast_classNames6.description)\n }, typeof toast.description === 'function' ? toast.description() : toast.description) : null), /*#__PURE__*/ React.isValidElement(toast.cancel) ? toast.cancel : toast.cancel && isAction(toast.cancel) ? /*#__PURE__*/ React.createElement(\"button\", {\n \"data-button\": true,\n \"data-cancel\": true,\n style: toast.cancelButtonStyle || cancelButtonStyle,\n onClick: (event)=>{\n // We need to check twice because typescript\n if (!isAction(toast.cancel)) return;\n if (!dismissible) return;\n toast.cancel.onClick == null ? void 0 : toast.cancel.onClick.call(toast.cancel, event);\n deleteToast();\n },\n className: cn(classNames == null ? void 0 : classNames.cancelButton, toast == null ? void 0 : (_toast_classNames7 = toast.classNames) == null ? void 0 : _toast_classNames7.cancelButton)\n }, toast.cancel.label) : null, /*#__PURE__*/ React.isValidElement(toast.action) ? toast.action : toast.action && isAction(toast.action) ? /*#__PURE__*/ React.createElement(\"button\", {\n \"data-button\": true,\n \"data-action\": true,\n style: toast.actionButtonStyle || actionButtonStyle,\n onClick: (event)=>{\n // We need to check twice because typescript\n if (!isAction(toast.action)) return;\n toast.action.onClick == null ? void 0 : toast.action.onClick.call(toast.action, event);\n if (event.defaultPrevented) return;\n deleteToast();\n },\n className: cn(classNames == null ? void 0 : classNames.actionButton, toast == null ? void 0 : (_toast_classNames8 = toast.classNames) == null ? void 0 : _toast_classNames8.actionButton)\n }, toast.action.label) : null);\n};\nfunction getDocumentDirection() {\n if (typeof window === 'undefined') return 'ltr';\n if (typeof document === 'undefined') return 'ltr'; // For Fresh purpose\n const dirAttribute = document.documentElement.getAttribute('dir');\n if (dirAttribute === 'auto' || !dirAttribute) {\n return window.getComputedStyle(document.documentElement).direction;\n }\n return dirAttribute;\n}\nfunction assignOffset(defaultOffset, mobileOffset) {\n const styles = {};\n [\n defaultOffset,\n mobileOffset\n ].forEach((offset, index)=>{\n const isMobile = index === 1;\n const prefix = isMobile ? '--mobile-offset' : '--offset';\n const defaultValue = isMobile ? MOBILE_VIEWPORT_OFFSET : VIEWPORT_OFFSET;\n function assignAll(offset) {\n [\n 'top',\n 'right',\n 'bottom',\n 'left'\n ].forEach((key)=>{\n styles[`${prefix}-${key}`] = typeof offset === 'number' ? `${offset}px` : offset;\n });\n }\n if (typeof offset === 'number' || typeof offset === 'string') {\n assignAll(offset);\n } else if (typeof offset === 'object') {\n [\n 'top',\n 'right',\n 'bottom',\n 'left'\n ].forEach((key)=>{\n if (offset[key] === undefined) {\n styles[`${prefix}-${key}`] = defaultValue;\n } else {\n styles[`${prefix}-${key}`] = typeof offset[key] === 'number' ? `${offset[key]}px` : offset[key];\n }\n });\n } else {\n assignAll(defaultValue);\n }\n });\n return styles;\n}\nfunction useSonner() {\n const [activeToasts, setActiveToasts] = React.useState([]);\n React.useEffect(()=>{\n return ToastState.subscribe((toast)=>{\n if (toast.dismiss) {\n setTimeout(()=>{\n ReactDOM.flushSync(()=>{\n setActiveToasts((toasts)=>toasts.filter((t)=>t.id !== toast.id));\n });\n });\n return;\n }\n // Prevent batching, temp solution.\n setTimeout(()=>{\n ReactDOM.flushSync(()=>{\n setActiveToasts((toasts)=>{\n const indexOfExistingToast = toasts.findIndex((t)=>t.id === toast.id);\n // Update the toast if it already exists\n if (indexOfExistingToast !== -1) {\n return [\n ...toasts.slice(0, indexOfExistingToast),\n {\n ...toasts[indexOfExistingToast],\n ...toast\n },\n ...toasts.slice(indexOfExistingToast + 1)\n ];\n }\n return [\n toast,\n ...toasts\n ];\n });\n });\n });\n });\n }, []);\n return {\n toasts: activeToasts\n };\n}\nconst Toaster = /*#__PURE__*/ React.forwardRef(function Toaster(props, ref) {\n const { invert, position = 'bottom-right', hotkey = [\n 'altKey',\n 'KeyT'\n ], expand, closeButton, className, offset, mobileOffset, theme = 'light', richColors, duration, style, visibleToasts = VISIBLE_TOASTS_AMOUNT, toastOptions, dir = getDocumentDirection(), gap = GAP, icons, containerAriaLabel = 'Notifications' } = props;\n const [toasts, setToasts] = React.useState([]);\n const possiblePositions = React.useMemo(()=>{\n return Array.from(new Set([\n position\n ].concat(toasts.filter((toast)=>toast.position).map((toast)=>toast.position))));\n }, [\n toasts,\n position\n ]);\n const [heights, setHeights] = React.useState([]);\n const [expanded, setExpanded] = React.useState(false);\n const [interacting, setInteracting] = React.useState(false);\n const [actualTheme, setActualTheme] = React.useState(theme !== 'system' ? theme : typeof window !== 'undefined' ? window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' : 'light');\n const listRef = React.useRef(null);\n const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');\n const lastFocusedElementRef = React.useRef(null);\n const isFocusWithinRef = React.useRef(false);\n const removeToast = React.useCallback((toastToRemove)=>{\n setToasts((toasts)=>{\n var _toasts_find;\n if (!((_toasts_find = toasts.find((toast)=>toast.id === toastToRemove.id)) == null ? void 0 : _toasts_find.delete)) {\n ToastState.dismiss(toastToRemove.id);\n }\n return toasts.filter(({ id })=>id !== toastToRemove.id);\n });\n }, []);\n React.useEffect(()=>{\n return ToastState.subscribe((toast)=>{\n if (toast.dismiss) {\n // Prevent batching of other state updates\n requestAnimationFrame(()=>{\n setToasts((toasts)=>toasts.map((t)=>t.id === toast.id ? {\n ...t,\n delete: true\n } : t));\n });\n return;\n }\n // Prevent batching, temp solution.\n setTimeout(()=>{\n ReactDOM.flushSync(()=>{\n setToasts((toasts)=>{\n const indexOfExistingToast = toasts.findIndex((t)=>t.id === toast.id);\n // Update the toast if it already exists\n if (indexOfExistingToast !== -1) {\n return [\n ...toasts.slice(0, indexOfExistingToast),\n {\n ...toasts[indexOfExistingToast],\n ...toast\n },\n ...toasts.slice(indexOfExistingToast + 1)\n ];\n }\n return [\n toast,\n ...toasts\n ];\n });\n });\n });\n });\n }, [\n toasts\n ]);\n React.useEffect(()=>{\n if (theme !== 'system') {\n setActualTheme(theme);\n return;\n }\n if (theme === 'system') {\n // check if current preference is dark\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n // it's currently dark\n setActualTheme('dark');\n } else {\n // it's not dark\n setActualTheme('light');\n }\n }\n if (typeof window === 'undefined') return;\n const darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n try {\n // Chrome & Firefox\n darkMediaQuery.addEventListener('change', ({ matches })=>{\n if (matches) {\n setActualTheme('dark');\n } else {\n setActualTheme('light');\n }\n });\n } catch (error) {\n // Safari < 14\n darkMediaQuery.addListener(({ matches })=>{\n try {\n if (matches) {\n setActualTheme('dark');\n } else {\n setActualTheme('light');\n }\n } catch (e) {\n console.error(e);\n }\n });\n }\n }, [\n theme\n ]);\n React.useEffect(()=>{\n // Ensure expanded is always false when no toasts are present / only one left\n if (toasts.length <= 1) {\n setExpanded(false);\n }\n }, [\n toasts\n ]);\n React.useEffect(()=>{\n const handleKeyDown = (event)=>{\n var _listRef_current;\n const isHotkeyPressed = hotkey.every((key)=>event[key] || event.code === key);\n if (isHotkeyPressed) {\n var _listRef_current1;\n setExpanded(true);\n (_listRef_current1 = listRef.current) == null ? void 0 : _listRef_current1.focus();\n }\n if (event.code === 'Escape' && (document.activeElement === listRef.current || ((_listRef_current = listRef.current) == null ? void 0 : _listRef_current.contains(document.activeElement)))) {\n setExpanded(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n return ()=>document.removeEventListener('keydown', handleKeyDown);\n }, [\n hotkey\n ]);\n React.useEffect(()=>{\n if (listRef.current) {\n return ()=>{\n if (lastFocusedElementRef.current) {\n lastFocusedElementRef.current.focus({\n preventScroll: true\n });\n lastFocusedElementRef.current = null;\n isFocusWithinRef.current = false;\n }\n };\n }\n }, [\n listRef.current\n ]);\n return(// Remove item from normal navigation flow, only available via hotkey\n /*#__PURE__*/ React.createElement(\"section\", {\n ref: ref,\n \"aria-label\": `${containerAriaLabel} ${hotkeyLabel}`,\n tabIndex: -1,\n \"aria-live\": \"polite\",\n \"aria-relevant\": \"additions text\",\n \"aria-atomic\": \"false\",\n suppressHydrationWarning: true\n }, possiblePositions.map((position, index)=>{\n var _heights_;\n const [y, x] = position.split('-');\n if (!toasts.length) return null;\n return /*#__PURE__*/ React.createElement(\"ol\", {\n key: position,\n dir: dir === 'auto' ? getDocumentDirection() : dir,\n tabIndex: -1,\n ref: listRef,\n className: className,\n \"data-sonner-toaster\": true,\n \"data-sonner-theme\": actualTheme,\n \"data-y-position\": y,\n \"data-lifted\": expanded && toasts.length > 1 && !expand,\n \"data-x-position\": x,\n style: {\n '--front-toast-height': `${((_heights_ = heights[0]) == null ? void 0 : _heights_.height) || 0}px`,\n '--width': `${TOAST_WIDTH}px`,\n '--gap': `${gap}px`,\n ...style,\n ...assignOffset(offset, mobileOffset)\n },\n onBlur: (event)=>{\n if (isFocusWithinRef.current && !event.currentTarget.contains(event.relatedTarget)) {\n isFocusWithinRef.current = false;\n if (lastFocusedElementRef.current) {\n lastFocusedElementRef.current.focus({\n preventScroll: true\n });\n lastFocusedElementRef.current = null;\n }\n }\n },\n onFocus: (event)=>{\n const isNotDismissible = event.target instanceof HTMLElement && event.target.dataset.dismissible === 'false';\n if (isNotDismissible) return;\n if (!isFocusWithinRef.current) {\n isFocusWithinRef.current = true;\n lastFocusedElementRef.current = event.relatedTarget;\n }\n },\n onMouseEnter: ()=>setExpanded(true),\n onMouseMove: ()=>setExpanded(true),\n onMouseLeave: ()=>{\n // Avoid setting expanded to false when interacting with a toast, e.g. swiping\n if (!interacting) {\n setExpanded(false);\n }\n },\n onDragEnd: ()=>setExpanded(false),\n onPointerDown: (event)=>{\n const isNotDismissible = event.target instanceof HTMLElement && event.target.dataset.dismissible === 'false';\n if (isNotDismissible) return;\n setInteracting(true);\n },\n onPointerUp: ()=>setInteracting(false)\n }, toasts.filter((toast)=>!toast.position && index === 0 || toast.position === position).map((toast, index)=>{\n var _toastOptions_duration, _toastOptions_closeButton;\n return /*#__PURE__*/ React.createElement(Toast, {\n key: toast.id,\n icons: icons,\n index: index,\n toast: toast,\n defaultRichColors: richColors,\n duration: (_toastOptions_duration = toastOptions == null ? void 0 : toastOptions.duration) != null ? _toastOptions_duration : duration,\n className: toastOptions == null ? void 0 : toastOptions.className,\n descriptionClassName: toastOptions == null ? void 0 : toastOptions.descriptionClassName,\n invert: invert,\n visibleToasts: visibleToasts,\n closeButton: (_toastOptions_closeButton = toastOptions == null ? void 0 : toastOptions.closeButton) != null ? _toastOptions_closeButton : closeButton,\n interacting: interacting,\n position: position,\n style: toastOptions == null ? void 0 : toastOptions.style,\n unstyled: toastOptions == null ? void 0 : toastOptions.unstyled,\n classNames: toastOptions == null ? void 0 : toastOptions.classNames,\n cancelButtonStyle: toastOptions == null ? void 0 : toastOptions.cancelButtonStyle,\n actionButtonStyle: toastOptions == null ? void 0 : toastOptions.actionButtonStyle,\n closeButtonAriaLabel: toastOptions == null ? void 0 : toastOptions.closeButtonAriaLabel,\n removeToast: removeToast,\n toasts: toasts.filter((t)=>t.position == toast.position),\n heights: heights.filter((h)=>h.position == toast.position),\n setHeights: setHeights,\n expandByDefault: expand,\n gap: gap,\n expanded: expanded,\n swipeDirections: props.swipeDirections\n });\n }));\n })));\n});\n\nexport { Toaster, toast, useSonner };\n","import React from \"react\";\nimport { Toaster as Sonner, ToasterProps } from \"sonner\";\n\nconst Toaster: React.FC = ({ ...props }: ToasterProps) => {\n\treturn (\n\t\t<Sonner\n\t\t\tclassName=\"toaster group\"\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t\"--normal-bg\": \"var(--popover)\",\n\t\t\t\t\t\"--normal-text\": \"var(--popover-foreground)\",\n\t\t\t\t\t\"--normal-border\": \"var(--border)\",\n\t\t\t\t} as React.CSSProperties\n\t\t\t}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport { Toaster };\n"],"names":["bars","Array","fill","Loader","visible","className","React","createElement","filter","Boolean","join","map","_","i","key","SuccessIcon","xmlns","viewBox","height","width","fillRule","d","clipRule","WarningIcon","InfoIcon","ErrorIcon","CloseIcon","stroke","strokeWidth","strokeLinecap","strokeLinejoin","x1","y1","x2","y2","toastsCounter","ToastState","constructor","this","subscribe","subscriber","subscribers","push","index","indexOf","splice","publish","data","forEach","addToast","toasts","create","_data_id","message","rest","id","length","alreadyExists","find","toast","dismissible","undefined","dismissedToasts","has","delete","title","dismiss","add","requestAnimationFrame","error","type","success","info","warning","loading","promise","description","p","Promise","resolve","Function","result","shouldDismiss","originalPromise","then","async","response","isValidElement","isHttpResponse","ok","promiseData","status","toastSettings","Error","catch","finally","call","unwrap","reject","Object","assign","custom","jsx","getActiveToasts","Set","basicToast","isAction","action","label","getHistory","getToasts","code","document","head","getElementsByTagName","style","appendChild","styleSheet","cssText","createTextNode","__insertCSS","VISIBLE_TOASTS_AMOUNT","GAP","cn","classes","Toast","props","_toast_classNames","_toast_classNames1","_toast_classNames2","_toast_classNames3","_toast_classNames4","_toast_classNames5","_toast_classNames6","_toast_classNames7","_toast_classNames8","invert","ToasterInvert","unstyled","interacting","setHeights","visibleToasts","heights","expanded","removeToast","defaultRichColors","closeButton","closeButtonFromToaster","cancelButtonStyle","actionButtonStyle","descriptionClassName","duration","durationFromToaster","position","gap","expandByDefault","classNames","icons","closeButtonAriaLabel","swipeDirection","setSwipeDirection","useState","swipeOutDirection","setSwipeOutDirection","mounted","setMounted","removed","setRemoved","swiping","setSwiping","swipeOut","setSwipeOut","isSwiped","setIsSwiped","offsetBeforeRemove","setOffsetBeforeRemove","initialHeight","setInitialHeight","remainingTime","useRef","dragStartTime","toastRef","isFront","isVisible","toastType","toastClassname","toastDescriptionClassname","heightIndex","useMemo","findIndex","toastId","_toast_closeButton","closeTimerStartTimeRef","offset","lastCloseTimerStartTimeRef","pointerStartRef","y","x","split","toastsHeightBefore","reduce","prev","curr","reducerIndex","isDocumentHidden","setIsDocumentHidden","hidden","useEffect","callback","addEventListener","window","removeEventListener","useIsDocumentHidden","disabled","current","toastNode","getBoundingClientRect","h","useLayoutEffect","originalHeight","newHeight","deleteToast","useCallback","setTimeout","TIME_BEFORE_UNMOUNT","Infinity","timeoutId","elapsedTime","Date","getTime","pauseTimer","onAutoClose","clearTimeout","icon","getAsset","_toast_richColors","_icons_close","tabIndex","ref","default","richColors","onDragEnd","onPointerDown","event","target","setPointerCapture","pointerId","tagName","clientX","clientY","onPointerUp","_toastRef_current","_toastRef_current1","_dragStartTime_current","swipeAmountX","Number","getPropertyValue","replace","swipeAmountY","timeTaken","swipeAmount","velocity","Math","abs","onDismiss","_toastRef_current2","_toastRef_current3","setProperty","onPointerMove","_window_getSelection","getSelection","toString","yDelta","xDelta","_props_swipeDirections","swipeDirections","directions","getDefaultSwipeDirections","getDampening","delta","includes","dampenedDelta","onClick","close","loader","getLoadingIcon","content","cancel","cancelButton","defaultPrevented","actionButton","getDocumentDirection","dirAttribute","documentElement","getAttribute","getComputedStyle","direction","assignOffset","defaultOffset","mobileOffset","styles","isMobile","prefix","defaultValue","assignAll","Toaster","forwardRef","hotkey","expand","theme","toastOptions","dir","containerAriaLabel","setToasts","possiblePositions","from","concat","setExpanded","setInteracting","actualTheme","setActualTheme","matchMedia","matches","listRef","hotkeyLabel","lastFocusedElementRef","isFocusWithinRef","toastToRemove","_toasts_find","t","ReactDOM","flushSync","indexOfExistingToast","slice","darkMediaQuery","addListener","e","handleKeyDown","_listRef_current","_listRef_current1","every","focus","activeElement","contains","preventScroll","suppressHydrationWarning","_heights_","onBlur","currentTarget","relatedTarget","onFocus","HTMLElement","dataset","onMouseEnter","onMouseMove","onMouseLeave","_toastOptions_duration","_toastOptions_closeButton","Sonner"],"mappings":"8CAaA,MAcMA,EAAOC,MAAM,IAAIC,KAAK,GACtBC,EAAS,EAAGC,UAASC,eACFC,EAAMC,cAAc,MAAO,CAC5CF,UAAW,CACP,yBACAA,GACFG,OAAOC,SAASC,KAAK,KACvB,eAAgBN,GACHE,EAAMC,cAAc,MAAO,CACxCF,UAAW,kBACZL,EAAKW,KAAI,CAACC,EAAGC,IAAkBP,EAAMC,cAAc,MAAO,CACrDF,UAAW,qBACXS,IAAK,eAAeD,UAG1BE,EAA4BT,EAAMC,cAAc,MAAO,CACzDS,MAAO,6BACP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MAAhB/C,OAAuB,EAASA,EAAapK,aAAuBmN,EAA4BnN,EAC1IP,YAAaA,EACbc,SAAUA,EACVtC,MAAuB,MAAhBmM,OAAuB,EAASA,EAAanM,MACpDuB,SAA0B,MAAhB4K,OAAuB,EAASA,EAAa5K,SACvDkB,WAA4B,MAAhB0J,OAAuB,EAASA,EAAa1J,WACzDR,kBAAmC,MAAhBkK,OAAuB,EAASA,EAAalK,kBAChEC,kBAAmC,MAAhBiK,OAAuB,EAASA,EAAajK,kBAChES,qBAAsC,MAAhBwJ,OAAuB,EAASA,EAAaxJ,qBACnEd,YAAaA,EACb9F,OAAQA,EAAO1C,QAAQiU,GAAIA,EAAEhL,UAAY9F,EAAM8F,WAC/CX,QAASA,EAAQtI,QAAQiN,GAAIA,EAAEhE,UAAY9F,EAAM8F,WACjDb,WAAYA,EACZe,gBAAiByJ,EACjB1J,IAAKA,EACLX,SAAUA,EACVoI,gBAAiBrJ,EAAMqJ,iBAC3B,KAnFuB,IAoF3B,IAER,ICroCM8B,EAAoB,KAAMnL,KAE9BxH,EAACgW,cAAAA,EAAAA,CACAjW,UAAU,gBACV8G,MACC,CACC,cAAe,iBACf,gBAAiB,4BACjB,kBAAmB,oBAGjBW","x_google_ignoreList":[0]}
@@ -1,109 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UniqueIdentifier, DndContextProps, DragOverlay } from '@dnd-kit/core';
3
- import { SortableContextProps } from '@dnd-kit/sortable';
4
- import { SlotProps } from '@radix-ui/react-slot';
5
- import * as React from 'react';
6
- import { ButtonProps } from '../button/index.js';
7
- import 'class-variance-authority/types';
8
- import 'class-variance-authority';
9
-
10
- interface SortableProps<TData extends {
11
- id: UniqueIdentifier;
12
- }> extends DndContextProps {
13
- /**
14
- * An array of data items that the sortable component will render.
15
- * @example
16
- * value={[
17
- * { id: 1, name: 'Item 1' },
18
- * { id: 2, name: 'Item 2' },
19
- * ]}
20
- */
21
- value: TData[];
22
- /**
23
- * An optional callback function that is called when the order of the data items changes.
24
- * It receives the new array of items as its argument.
25
- * @example
26
- * onValueChange={(items) => console.log(items)}
27
- */
28
- onValueChange?: (items: TData[]) => void;
29
- /**
30
- * An optional callback function that is called when an item is moved.
31
- * It receives an event object with `activeIndex` and `overIndex` properties, representing the original and new positions of the moved item.
32
- * This will override the default behavior of updating the order of the data items.
33
- * @type (event: { activeIndex: number; overIndex: number }) => void
34
- * @example
35
- * onMove={(event) => console.log(`Item moved from index ${event.activeIndex} to index ${event.overIndex}`)}
36
- */
37
- onMove?: (event: {
38
- activeIndex: number;
39
- overIndex: number;
40
- }) => void;
41
- /**
42
- * A collision detection strategy that will be used to determine the closest sortable item.
43
- * @default closestCenter
44
- * @type DndContextProps["collisionDetection"]
45
- */
46
- collisionDetection?: DndContextProps["collisionDetection"];
47
- /**
48
- * An array of modifiers that will be used to modify the behavior of the sortable component.
49
- * @default
50
- * [restrictToVerticalAxis, restrictToParentElement]
51
- * @type Modifier[]
52
- */
53
- modifiers?: DndContextProps["modifiers"];
54
- /**
55
- * A sorting strategy that will be used to determine the new order of the data items.
56
- * @default verticalListSortingStrategy
57
- * @type SortableContextProps["strategy"]
58
- */
59
- strategy?: SortableContextProps["strategy"];
60
- /**
61
- * Specifies the axis for the drag-and-drop operation. It can be "vertical", "horizontal", or "both".
62
- * @default "vertical"
63
- * @type "vertical" | "horizontal" | "mixed"
64
- */
65
- orientation?: "vertical" | "horizontal" | "mixed";
66
- /**
67
- * An optional React node that is rendered on top of the sortable component.
68
- * It can be used to display additional information or controls.
69
- * @default null
70
- * @type React.ReactNode | null
71
- * @example
72
- * overlay={<Skeleton className="w-full h-8" />}
73
- */
74
- overlay?: React.ReactNode | null;
75
- }
76
- declare function Sortable<TData extends {
77
- id: UniqueIdentifier;
78
- }>({ value, onValueChange, collisionDetection, modifiers, strategy, onMove, orientation, overlay, children, ...props }: SortableProps<TData>): react_jsx_runtime.JSX.Element;
79
- interface SortableOverlayProps extends React.ComponentPropsWithRef<typeof DragOverlay> {
80
- activeId?: UniqueIdentifier | null;
81
- }
82
- declare const SortableOverlay: React.ForwardRefExoticComponent<SortableOverlayProps & React.RefAttributes<HTMLDivElement>>;
83
- interface SortableItemProps extends SlotProps {
84
- /**
85
- * The unique identifier of the item.
86
- * @example "item-1"
87
- * @type UniqueIdentifier
88
- */
89
- value: UniqueIdentifier;
90
- /**
91
- * Specifies whether the item should act as a trigger for the drag-and-drop action.
92
- * @default false
93
- * @type boolean | undefined
94
- */
95
- asTrigger?: boolean;
96
- /**
97
- * Merges the item's props into its immediate child.
98
- * @default false
99
- * @type boolean | undefined
100
- */
101
- asChild?: boolean;
102
- }
103
- declare const SortableItem: React.ForwardRefExoticComponent<SortableItemProps & React.RefAttributes<HTMLDivElement>>;
104
- interface SortableDragHandleProps extends ButtonProps {
105
- withHandle?: boolean;
106
- }
107
- declare const SortableDragHandle: React.ForwardRefExoticComponent<SortableDragHandleProps & React.RefAttributes<HTMLButtonElement>>;
108
-
109
- export { Sortable, SortableDragHandle, SortableItem, SortableOverlay };
@@ -1,2 +0,0 @@
1
- export{S as Sortable,a as SortableDragHandle,b as SortableItem,c as SortableOverlay}from"../chunks/sortable-BKqLwBgJ.mjs";import"react";import"react-dom";import"@radix-ui/react-slot";import"../chunks/utils-BDlXiHS3.mjs";import"../chunks/bundle-mjs-Dthp4wMi.mjs";import"../chunks/button-KMRgpiAy.mjs";import"class-variance-authority";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default from 'react';
3
-
4
- declare function Table({ className, ...props }: React__default.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
5
- declare function TableHeader({ className, ...props }: React__default.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
6
- declare function TableBody({ className, ...props }: React__default.ComponentProps<"tbody">): react_jsx_runtime.JSX.Element;
7
- declare function TableFooter({ className, ...props }: React__default.ComponentProps<"tfoot">): react_jsx_runtime.JSX.Element;
8
- declare function TableRow({ className, ...props }: React__default.ComponentProps<"tr">): react_jsx_runtime.JSX.Element;
9
- declare function TableHead({ className, ...props }: React__default.ComponentProps<"th">): react_jsx_runtime.JSX.Element;
10
- declare function TableCell({ className, ...props }: React__default.ComponentProps<"td">): react_jsx_runtime.JSX.Element;
11
- declare function TableCaption({ className, ...props }: React__default.ComponentProps<"caption">): react_jsx_runtime.JSX.Element;
12
-
13
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,2 +0,0 @@
1
- export{T as Table,b as TableBody,g as TableCaption,f as TableCell,c as TableFooter,d as TableHead,a as TableHeader,e as TableRow}from"../chunks/table-DapXfoMY.mjs";import"../chunks/utils-BDlXiHS3.mjs";import"../chunks/bundle-mjs-Dthp4wMi.mjs";import"react";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as TabsPrimitive from '@radix-ui/react-tabs';
3
- import React__default from 'react';
4
-
5
- declare function Tabs({ className, ...props }: React__default.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
- declare function TabsList({ className, ...props }: React__default.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
7
- declare function TabsTrigger({ className, ...props }: React__default.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
8
- declare function TabsContent({ className, ...props }: React__default.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
9
-
10
- export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -1,2 +0,0 @@
1
- import{c as e}from"../chunks/utils-BDlXiHS3.mjs";import*as t from"react";import a from"react";import{c as n,P as r}from"../chunks/index-BE7U1lz3.mjs";import{c as o}from"../chunks/index-BOtb6ofV.mjs";import{c as i,R as s,I as c}from"../chunks/index-Ds-NL_xb.mjs";import{P as d}from"../chunks/index-BEeVpO2_.mjs";import{u as l}from"../chunks/index-ChEz--fx.mjs";import{u}from"../chunks/index-mlVBNiql.mjs";import{u as m}from"../chunks/index-DrgyjxdM.mjs";import{jsx as f}from"react/jsx-runtime";import"../chunks/bundle-mjs-Dthp4wMi.mjs";import"../chunks/index-CIfe3UIG.mjs";import"@radix-ui/react-collection";import"../chunks/index-DspU1Pyo.mjs";import"react-dom";import"@radix-ui/react-slot";var p="Tabs",[b,v]=o(p,[i]),h=i(),[g,x]=b(p),k=t.forwardRef(((e,t)=>{const{__scopeTabs:a,value:n,onValueChange:r,defaultValue:o,orientation:i="horizontal",dir:s,activationMode:c="automatic",...b}=e,v=l(s),[h,x]=u({prop:n,onChange:r,defaultProp:o??"",caller:p});return f(g,{scope:a,baseId:m(),value:h,onValueChange:x,orientation:i,dir:v,activationMode:c,children:f(d.div,{dir:v,"data-orientation":i,...b,ref:t})})}));k.displayName=p;var y="TabsList",j=t.forwardRef(((e,t)=>{const{__scopeTabs:a,loop:n=!0,...r}=e,o=x(y,a),i=h(a);return f(s,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:n,children:f(d.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:t})})}));j.displayName=y;var w="TabsTrigger",N=t.forwardRef(((e,t)=>{const{__scopeTabs:a,value:r,disabled:o=!1,...i}=e,s=x(w,a),l=h(a),u=T(s.baseId,r),m=I(s.baseId,r),p=r===s.value;return f(c,{asChild:!0,...l,focusable:!o,active:p,children:f(d.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":m,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:n(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)})),onKeyDown:n(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)})),onFocus:n(e.onFocus,(()=>{const e="manual"!==s.activationMode;p||o||!e||s.onValueChange(r)}))})})}));N.displayName=w;var _="TabsContent",C=t.forwardRef(((e,a)=>{const{__scopeTabs:n,value:o,forceMount:i,children:s,...c}=e,l=x(_,n),u=T(l.baseId,o),m=I(l.baseId,o),p=o===l.value,b=t.useRef(p);return t.useEffect((()=>{const e=requestAnimationFrame((()=>b.current=!1));return()=>cancelAnimationFrame(e)}),[]),f(r,{present:i||p,children:({present:t})=>f(d.div,{"data-state":p?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:m,tabIndex:0,...c,ref:a,style:{...e.style,animationDuration:b.current?"0s":void 0},children:t&&s})})}));function T(e,t){return`${e}-trigger-${t}`}function I(e,t){return`${e}-content-${t}`}C.displayName=_;var D=k,E=j,M=N,R=C;function V({className:t,...n}){return a.createElement(D,{"data-slot":"tabs",className:e("flex flex-col gap-2",t),...n})}function F({className:t,...n}){return a.createElement(E,{"data-slot":"tabs-list",className:e("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...n})}function $({className:t,...n}){return a.createElement(M,{"data-slot":"tabs-trigger",className:e("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/50 inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}function z({className:t,...n}){return a.createElement(R,{"data-slot":"tabs-content",className:e("flex-1 outline-none",t),...n})}export{V as Tabs,z as TabsContent,F as TabsList,$ as TabsTrigger};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { cn } from \"@/lib/utils\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport React from \"react\";\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n\treturn (\n\t\t<TabsPrimitive.Root\n\t\t\tdata-slot=\"tabs\"\n\t\t\tclassName={cn(\"flex flex-col gap-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tdata-slot=\"tabs-list\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tdata-slot=\"tabs-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/50 inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tdata-slot=\"tabs-content\"\n\t\t\tclassName={cn(\"flex-1 outline-none\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["TABS_NAME","createTabsContext","createTabsScope","createContextScope","createRovingFocusGroupScope","useRovingFocusGroupScope","TabsProvider","useTabsContext","Tabs","React","forwardRef","props","forwardedRef","__scopeTabs","value","valueProp","onValueChange","defaultValue","orientation","dir","activationMode","tabsProps","direction","useDirection","setValue","useControllableState","prop","onChange","defaultProp","caller","jsx","scope","baseId","useId","children","Primitive","div","ref","displayName","TAB_LIST_NAME","TabsList","loop","listProps","context","rovingFocusGroupScope","RovingFocusGroup.Root","asChild","role","TRIGGER_NAME","TabsTrigger","disabled","triggerProps","triggerId","makeTriggerId","contentId","makeContentId","isSelected","RovingFocusGroup.Item","focusable","active","button","type","id","onMouseDown","composeEventHandlers","event","ctrlKey","preventDefault","onKeyDown","includes","key","onFocus","isAutomaticActivation","CONTENT_NAME","TabsContent","forceMount","contentProps","isMountAnimationPreventedRef","useRef","useEffect","rAF","requestAnimationFrame","current","cancelAnimationFrame","Presence","present","hidden","tabIndex","style","animationDuration","Root","List","Trigger","Content","className","createElement","TabsPrimitive","data-slot","cn"],"mappings":"mrBAiBA,IAAMA,EAAY,QAGXC,EAAmBC,GAAmBC,EAAmBH,EAAW,CACzEI,IAEIC,EAA2BD,KAW1BE,EAAcC,GAAkBN,EAAoCD,GA6BrEQ,EAAaC,EAAAC,YACjB,CAACC,EAA+BC,KAC9B,MAAMC,YACJA,EACAC,MAAOC,EAAAC,cACPA,EAAAC,aACAA,EAAAC,YACAA,EAAc,aAAAC,IACdA,EAAAC,eACAA,EAAiB,eACdC,GACDV,EACEW,EAAYC,EAAaJ,IACxBL,EAAOU,GAAYC,EAAqB,CAC7CC,KAAMX,EACNY,SAAUX,EACVY,YAAaX,GAAgB,GAC7BY,OAAQ7B,IAGV,OACE8B,EAACxB,EAAA,CACCyB,MAAOlB,EACPmB,OAAQC,IACRnB,QACAE,cAAeQ,EACfN,cACAC,IAAKG,EACLF,iBAEAc,SAAAJ,EAACK,EAAUC,IAAV,CACCjB,IAAKG,EACL,mBAAkBJ,KACdG,EACJgB,IAAKzB,KACP,IAMRJ,EAAK8B,YAActC,EAMnB,IAAMuC,EAAgB,WAOhBC,EAAiB/B,EAAAC,YACrB,CAACC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AAG,sBAAuBJ,MACjCnF,GAGP,CAEA,SAAS6B,GAASsD,UAAEA,KAAcnF,IACjC,OACCF,EAAAsF,cAACC,EAAkB,CAClBC,YAAU,YACVH,UAAWI,EACV,sGACAJ,MAEGnF,GAGP,CAEA,SAASsC,GAAY6C,UAAEA,KAAcnF,IACpC,OACCF,EAAAsF,cAACC,EAAqB,CACrBC,YAAU,eACVH,UAAWI,EACV,ioBACAJ,MAEGnF,GAGP,CAEA,SAAS+D,GAAYoB,UAAEA,KAAcnF,IACpC,OACCF,EAAAsF,cAACC,EAAqB,CACrBC,YAAU,eACVH,UAAWI,EAAG,sBAAuBJ,MACjCnF,GAGP","x_google_ignoreList":[0]}
@@ -1,21 +0,0 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as ToastPrimitives from '@radix-ui/react-toast';
4
- import { VariantProps } from 'class-variance-authority';
5
- import React__default from 'react';
6
-
7
- declare const ToastProvider: React__default.FC<ToastPrimitives.ToastProviderProps>;
8
- declare const ToastViewport: ({ className, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Viewport>) => react_jsx_runtime.JSX.Element;
9
- declare const toastVariants: (props?: ({
10
- variant?: "default" | "destructive" | null | undefined;
11
- } & class_variance_authority_types.ClassProp) | undefined) => string;
12
- declare const Toast: ({ className, variant, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>) => react_jsx_runtime.JSX.Element;
13
- declare const ToastAction: ({ className, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Action>) => react_jsx_runtime.JSX.Element;
14
- declare const ToastClose: ({ className, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Close>) => react_jsx_runtime.JSX.Element;
15
- declare const ToastTitle: ({ className, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Title>) => react_jsx_runtime.JSX.Element;
16
- declare const ToastDescription: ({ className, ...props }: React__default.ComponentProps<typeof ToastPrimitives.Description>) => react_jsx_runtime.JSX.Element;
17
- type ToastProps = React__default.ComponentPropsWithoutRef<typeof Toast>;
18
- type ToastActionElement = React__default.ReactElement<typeof ToastAction>;
19
-
20
- export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport };
21
- export type { ToastActionElement, ToastProps };
@@ -1,2 +0,0 @@
1
- import{c as e}from"../chunks/utils-BDlXiHS3.mjs";import*as t from"react";import r from"react";import*as o from"react-dom";import{u as n,P as s,c as a}from"../chunks/index-BE7U1lz3.mjs";import{createCollection as i}from"@radix-ui/react-collection";import{c}from"../chunks/index-BOtb6ofV.mjs";import{B as d,R as u,P as l}from"../chunks/index-D1WqwlXc.mjs";import{P as p,d as m}from"../chunks/index-BEeVpO2_.mjs";import{u as f}from"../chunks/index-DspU1Pyo.mjs";import{u as v}from"../chunks/index-mlVBNiql.mjs";import{u as w}from"../chunks/index-CIfe3UIG.mjs";import{V as h}from"../chunks/index-k-LDQli2.mjs";import{jsx as x,jsxs as y,Fragment as g}from"react/jsx-runtime";import{cva as E}from"class-variance-authority";import{X as T}from"../chunks/x-BIoR0tgq.mjs";import"../chunks/bundle-mjs-Dthp4wMi.mjs";import"@radix-ui/react-slot";import"../chunks/createLucideIcon-BPtXaGDX.mjs";var b="ToastProvider",[C,P,R]=i("Toast"),[N,k]=c("Toast",[R]),[D,L]=N(b),S=e=>{const{__scopeToast:r,label:o="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:i}=e,[c,d]=t.useState(null),[u,l]=t.useState(0),p=t.useRef(!1),m=t.useRef(!1);return o.trim(),x(C.Provider,{scope:r,children:x(D,{scope:r,label:o,duration:n,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:t.useCallback((()=>l((e=>e+1))),[]),onToastRemove:t.useCallback((()=>l((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:i})})};S.displayName=b;var _="ToastViewport",F=["F8"],j="toast.viewportPause",A="toast.viewportResume",I=t.forwardRef(((e,r)=>{const{__scopeToast:o,hotkey:s=F,label:a="Notifications ({hotkey})",...i}=e,c=L(_,o),u=P(o),l=t.useRef(null),m=t.useRef(null),f=t.useRef(null),v=t.useRef(null),w=n(r,v,c.onViewportChange),h=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=c.toastCount>0;t.useEffect((()=>{const e=e=>{0!==s.length&&s.every((t=>e[t]||e.code===t))&&v.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[s]),t.useEffect((()=>{const e=l.current,t=v.current;if(g&&e&&t){const r=()=>{if(!c.isClosePausedRef.current){const e=new CustomEvent(j);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},o=()=>{if(c.isClosePausedRef.current){const e=new CustomEvent(A);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},n=t=>{!e.contains(t.relatedTarget)&&o()},s=()=>{e.contains(document.activeElement)||o()};return e.addEventListener("focusin",r),e.addEventListener("focusout",n),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",o),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",n),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",o)}}}),[g,c.isClosePausedRef]);const E=t.useCallback((({tabbingDirection:e})=>{const t=u().map((t=>{const r=t.ref.current,o=[r,...ee(r)];return"forwards"===e?o:o.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[u]);return t.useEffect((()=>{const e=v.current;if(e){const t=t=>{const r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){const r=document.activeElement,o=t.shiftKey;if(t.target===e&&o)return void m.current?.focus();const n=E({tabbingDirection:o?"backwards":"forwards"}),s=n.findIndex((e=>e===r));te(n.slice(s+1))?t.preventDefault():o?m.current?.focus():f.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[u,E]),y(d,{ref:l,role:"region","aria-label":a.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&x(K,{ref:m,onFocusFromOutsideViewport:()=>{te(E({tabbingDirection:"forwards"}))}}),x(C.Slot,{scope:o,children:x(p.ol,{tabIndex:-1,...i,ref:w})}),g&&x(K,{ref:f,onFocusFromOutsideViewport:()=>{te(E({tabbingDirection:"backwards"}))}})]})}));I.displayName=_;var M="ToastFocusProxy",K=t.forwardRef(((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,s=L(M,r);return x(h,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!s.viewport?.contains(t)&&o()}})}));K.displayName=M;var O="Toast",V=t.forwardRef(((e,t)=>{const{forceMount:r,open:o,defaultOpen:n,onOpenChange:i,...c}=e,[d,u]=v({prop:o,defaultProp:n??!0,onChange:i,caller:O});return x(s,{present:r||d,children:x(X,{open:d,...c,ref:t,onClose:()=>u(!1),onPause:f(e.onPause),onResume:f(e.onResume),onSwipeStart:a(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:a(e.onSwipeMove,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)})),onSwipeCancel:a(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:a(e.onSwipeEnd,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),u(!1)}))})})}));V.displayName=O;var[$,U]=N(O,{onClose(){}}),X=t.forwardRef(((e,r)=>{const{__scopeToast:s,type:i="foreground",duration:c,open:d,onClose:l,onEscapeKeyDown:m,onPause:v,onResume:w,onSwipeStart:h,onSwipeMove:E,onSwipeCancel:T,onSwipeEnd:b,...P}=e,R=L(O,s),[N,k]=t.useState(null),D=n(r,(e=>k(e))),S=t.useRef(null),_=t.useRef(null),F=c||R.duration,I=t.useRef(0),M=t.useRef(F),K=t.useRef(0),{onToastAdd:V,onToastRemove:U}=R,X=f((()=>{const e=N?.contains(document.activeElement);e&&R.viewport?.focus(),l()})),B=t.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(K.current),I.current=(new Date).getTime(),K.current=window.setTimeout(X,e))}),[X]);t.useEffect((()=>{const e=R.viewport;if(e){const t=()=>{B(M.current),w?.()},r=()=>{const e=(new Date).getTime()-I.current;M.current=M.current-e,window.clearTimeout(K.current),v?.()};return e.addEventListener(j,r),e.addEventListener(A,t),()=>{e.removeEventListener(j,r),e.removeEventListener(A,t)}}}),[R.viewport,F,v,w,B]),t.useEffect((()=>{d&&!R.isClosePausedRef.current&&B(F)}),[d,F,R.isClosePausedRef,B]),t.useEffect((()=>(V(),()=>U())),[V,U]);const H=t.useMemo((()=>N?J(N):null),[N]);return R.viewport?y(g,{children:[H&&x(q,{__scopeToast:s,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0,children:H}),x($,{scope:s,onClose:X,children:o.createPortal(x(C.ItemSlot,{scope:s,children:x(u,{asChild:!0,onEscapeKeyDown:a(m,(()=>{R.isFocusedToastEscapeKeyDownRef.current||X(),R.isFocusedToastEscapeKeyDownRef.current=!1})),children:x(p.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":R.swipeDirection,...P,ref:D,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:a(e.onKeyDown,(e=>{"Escape"===e.key&&(m?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(R.isFocusedToastEscapeKeyDownRef.current=!0,X()))})),onPointerDown:a(e.onPointerDown,(e=>{0===e.button&&(S.current={x:e.clientX,y:e.clientY})})),onPointerMove:a(e.onPointerMove,(e=>{if(!S.current)return;const t=e.clientX-S.current.x,r=e.clientY-S.current.y,o=Boolean(_.current),n=["left","right"].includes(R.swipeDirection),s=["left","up"].includes(R.swipeDirection)?Math.min:Math.max,a=n?s(0,t):0,i=n?0:s(0,r),c="touch"===e.pointerType?10:2,d={x:a,y:i},u={originalEvent:e,delta:d};o?(_.current=d,Q("toast.swipeMove",E,u,{discrete:!1})):Z(d,R.swipeDirection,c)?(_.current=d,Q("toast.swipeStart",h,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(r)>c)&&(S.current=null)})),onPointerUp:a(e.onPointerUp,(e=>{const t=_.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),_.current=null,S.current=null,t){const r=e.currentTarget,o={originalEvent:e,delta:t};Z(t,R.swipeDirection,R.swipeThreshold)?Q("toast.swipeEnd",b,o,{discrete:!0}):Q("toast.swipeCancel",T,o,{discrete:!0}),r.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})})}),R.viewport)})]}):null})),q=e=>{const{__scopeToast:r,children:o,...n}=e,s=L(O,r),[a,i]=t.useState(!1),[c,d]=t.useState(!1);return function(e=()=>{}){const t=f(e);w((()=>{let e=0,r=0;return e=window.requestAnimationFrame((()=>r=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}}),[t])}((()=>i(!0))),t.useEffect((()=>{const e=window.setTimeout((()=>d(!0)),1e3);return()=>window.clearTimeout(e)}),[]),c?null:x(l,{asChild:!0,children:x(h,{...n,children:a&&y(g,{children:[s.label," ",o]})})})},B=t.forwardRef(((e,t)=>{const{__scopeToast:r,...o}=e;return x(p.div,{...o,ref:t})}));B.displayName="ToastTitle";var H=t.forwardRef(((e,t)=>{const{__scopeToast:r,...o}=e;return x(p.div,{...o,ref:t})}));H.displayName="ToastDescription";var W=t.forwardRef(((e,t)=>{const{altText:r,...o}=e;return r.trim()?x(G,{altText:r,asChild:!0,children:x(z,{...o,ref:t})}):null}));W.displayName="ToastAction";var Y="ToastClose",z=t.forwardRef(((e,t)=>{const{__scopeToast:r,...o}=e,n=U(Y,r);return x(G,{asChild:!0,children:x(p.button,{type:"button",...o,ref:t,onClick:a(e.onClick,n.onClose)})})}));z.displayName=Y;var G=t.forwardRef(((e,t)=>{const{__scopeToast:r,altText:o,...n}=e;return x(p.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})}));function J(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const r=e.ariaHidden||e.hidden||"none"===e.style.display,o=""===e.dataset.radixToastAnnounceExclude;if(!r)if(o){const r=e.dataset.radixToastAnnounceAlt;r&&t.push(r)}else t.push(...J(e))}})),t}function Q(e,t,r,{discrete:o}){const n=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?m(n,s):n.dispatchEvent(s)}var Z=(e,t,r=0)=>{const o=Math.abs(e.x),n=Math.abs(e.y),s=o>n;return"left"===t||"right"===t?s&&o>r:!s&&n>r};function ee(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function te(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}var re=I,oe=V,ne=B,se=H,ae=W,ie=z;const ce=S,de=({className:t,...o})=>r.createElement(re,{"data-slot":"toast-viewport",className:e("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]",t),...o}),ue=E("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive-foreground bg-destructive-foreground text-destructive border-destructive"}},defaultVariants:{variant:"default"}}),le=({className:t,variant:o,...n})=>r.createElement(oe,{"data-slot":"toast-root",className:e(ue({variant:o}),t),...n}),pe=({className:t,...o})=>r.createElement(ae,{"data-slot":"toast-action",className:e("ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50",t),...o}),me=({className:t,...o})=>r.createElement(ie,{"data-slot":"toast-close",className:e("text-foreground/50 hover:text-foreground absolute top-2 right-2 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-2 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...o},r.createElement(T,{className:"h-4 w-4"})),fe=({className:t,...o})=>r.createElement(ne,{"data-slot":"toast-title",className:e("text-sm font-semibold",t),...o}),ve=({className:t,...o})=>r.createElement(se,{"data-slot":"toast-description",className:e("text-sm opacity-90",t),...o});export{le as Toast,pe as ToastAction,me as ToastClose,ve as ToastDescription,ce as ToastProvider,fe as ToastTitle,de as ToastViewport};
2
- //# sourceMappingURL=index.mjs.map