@vlrc-fe/components 3.0.3 → 3.0.4

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 (682) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +10 -1
  3. package/bin/registry.mjs +1124 -0
  4. package/bin/vlrc.mjs +102 -7
  5. package/dist/ConfirmModal.cjs +276 -1
  6. package/dist/ConfirmModal.js +119 -103
  7. package/dist/DataTable/DataTable.cjs +203 -1
  8. package/dist/DataTable/DataTable.js +161 -120
  9. package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
  10. package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
  11. package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
  12. package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
  13. package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
  14. package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
  15. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  16. package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
  17. package/dist/DataTable/components/DataTablePagination.cjs +200 -1
  18. package/dist/DataTable/components/DataTablePagination.js +188 -91
  19. package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
  20. package/dist/DataTable/components/DataTableRowActions.js +161 -62
  21. package/dist/DataTable/components/DataTableTable.cjs +100 -1
  22. package/dist/DataTable/components/DataTableTable.js +87 -35
  23. package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
  24. package/dist/DataTable/components/DataTableToolbar.js +106 -44
  25. package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
  26. package/dist/DataTable/components/DataTableViewOptions.js +105 -44
  27. package/dist/DataTable/render/createColumns.cjs +84 -1
  28. package/dist/DataTable/render/createColumns.js +65 -44
  29. package/dist/DataTable/render/defaults.cjs +38 -1
  30. package/dist/DataTable/render/defaults.js +18 -13
  31. package/dist/Dropdown/Dropdown.cjs +255 -1
  32. package/dist/Dropdown/Dropdown.js +138 -108
  33. package/dist/Form/Form.cjs +439 -1
  34. package/dist/Form/Form.js +417 -206
  35. package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
  36. package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
  37. package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
  38. package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
  39. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
  40. package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
  41. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
  42. package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
  43. package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
  44. package/dist/Form/FormDatePicker/TimeInput.js +162 -79
  45. package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
  46. package/dist/Form/FormDatePicker/TimePicker.js +58 -43
  47. package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
  48. package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
  49. package/dist/Form/FormDatePicker/types.cjs +10 -1
  50. package/dist/Form/FormDatePicker/types.js +8 -3
  51. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
  52. package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
  53. package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
  54. package/dist/Form/FormFileUpload/FileUpload.js +452 -306
  55. package/dist/Form/FormFileUpload/index.cjs +175 -1
  56. package/dist/Form/FormFileUpload/index.js +164 -50
  57. package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
  58. package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
  59. package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
  60. package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
  61. package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
  62. package/dist/Form/FormNumberInput/StepperControls.js +78 -43
  63. package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
  64. package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
  65. package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
  66. package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
  67. package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
  68. package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
  69. package/dist/Form/FormSelect/FormSelect.cjs +46 -1
  70. package/dist/Form/FormSelect/FormSelect.js +40 -26
  71. package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
  72. package/dist/Form/FormSelect/useFormSelect.js +52 -43
  73. package/dist/Icons/Icons.cjs +155 -1
  74. package/dist/Icons/Icons.js +142 -142
  75. package/dist/Modal.cjs +135 -1
  76. package/dist/Modal.js +67 -54
  77. package/dist/MultiSelect/MultiSelect.cjs +211 -1
  78. package/dist/MultiSelect/MultiSelect.js +127 -117
  79. package/dist/MultiSelect/renderers.cjs +571 -1
  80. package/dist/MultiSelect/renderers.js +508 -309
  81. package/dist/MultiSelect/useMultiSelect.cjs +243 -1
  82. package/dist/MultiSelect/useMultiSelect.js +207 -127
  83. package/dist/MultiSelect/utils.cjs +123 -1
  84. package/dist/MultiSelect/utils.js +79 -51
  85. package/dist/Select/BaseSelect.cjs +265 -1
  86. package/dist/Select/BaseSelect.js +165 -126
  87. package/dist/Select/MultiSelectTags.cjs +129 -1
  88. package/dist/Select/MultiSelectTags.js +82 -56
  89. package/dist/Typography/Blockquote.cjs +79 -1
  90. package/dist/Typography/Blockquote.js +40 -38
  91. package/dist/Typography/Code.cjs +131 -1
  92. package/dist/Typography/Code.js +64 -58
  93. package/dist/Typography/Link.cjs +141 -1
  94. package/dist/Typography/Link.d.ts +1 -2
  95. package/dist/Typography/Link.d.ts.map +1 -1
  96. package/dist/Typography/Link.js +74 -63
  97. package/dist/Typography/Paragraph.cjs +226 -1
  98. package/dist/Typography/Paragraph.d.ts +1 -2
  99. package/dist/Typography/Paragraph.d.ts.map +1 -1
  100. package/dist/Typography/Paragraph.js +119 -107
  101. package/dist/Typography/Text.cjs +224 -1
  102. package/dist/Typography/Text.d.ts +1 -2
  103. package/dist/Typography/Text.d.ts.map +1 -1
  104. package/dist/Typography/Text.js +117 -100
  105. package/dist/Typography/Title.cjs +220 -1
  106. package/dist/Typography/Title.d.ts +1 -2
  107. package/dist/Typography/Title.d.ts.map +1 -1
  108. package/dist/Typography/Title.js +125 -103
  109. package/dist/Typography/Typography.cjs +17 -1
  110. package/dist/Typography/Typography.js +14 -14
  111. package/dist/Typography/index.d.ts +1 -1
  112. package/dist/Typography/index.d.ts.map +1 -1
  113. package/dist/Typography/index.js +13 -13
  114. package/dist/Typography/tooltip.cjs +42 -1
  115. package/dist/Typography/tooltip.js +34 -14
  116. package/dist/Typography/types.cjs +20 -1
  117. package/dist/Typography/types.js +5 -2
  118. package/dist/Typography/utils.cjs +52 -1
  119. package/dist/Typography/utils.js +48 -21
  120. package/dist/Typography/weightStyles.cjs +58 -1
  121. package/dist/Typography/weightStyles.js +26 -25
  122. package/dist/_virtual/_rolldown/runtime.cjs +32 -1
  123. package/dist/_virtual/_rolldown/runtime.js +9 -7
  124. package/dist/assets/stylex.css +135 -1
  125. package/dist/astryx.cjs +18 -1
  126. package/dist/astryx.d.ts.map +1 -1
  127. package/dist/astryx.js +2 -1
  128. package/dist/index.cjs +789 -1
  129. package/dist/index.js +122 -118
  130. package/dist/layout/Box.cjs +203 -1
  131. package/dist/layout/Box.d.ts +8 -8
  132. package/dist/layout/Box.d.ts.map +1 -1
  133. package/dist/layout/Box.js +138 -49
  134. package/dist/layout/Center.cjs +51 -1
  135. package/dist/layout/Center.d.ts +3 -3
  136. package/dist/layout/Center.d.ts.map +1 -1
  137. package/dist/layout/Center.js +49 -20
  138. package/dist/layout/Container.cjs +81 -1
  139. package/dist/layout/Container.d.ts +8 -8
  140. package/dist/layout/Container.d.ts.map +1 -1
  141. package/dist/layout/Container.js +34 -30
  142. package/dist/layout/Stack.cjs +237 -1
  143. package/dist/layout/Stack.d.ts +9 -9
  144. package/dist/layout/Stack.d.ts.map +1 -1
  145. package/dist/layout/Stack.js +220 -75
  146. package/dist/layout/index.js +9 -9
  147. package/dist/lazyLoad.cjs +13 -1
  148. package/dist/lazyLoad.js +9 -9
  149. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
  150. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
  151. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
  152. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
  153. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +330 -1
  154. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +272 -164
  155. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
  156. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
  157. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
  158. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
  159. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
  160. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
  161. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
  162. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
  163. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +145 -1
  164. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +111 -73
  165. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +38 -1
  166. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +19 -16
  167. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +126 -1
  168. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +103 -72
  169. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +134 -1
  170. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +113 -79
  171. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +541 -1
  172. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +459 -331
  173. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +39 -1
  174. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +26 -22
  175. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +304 -1
  176. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +234 -160
  177. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +108 -1
  178. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +82 -67
  179. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +19 -1
  180. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +12 -10
  181. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +275 -1
  182. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +228 -127
  183. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +53 -1
  184. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +40 -22
  185. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +215 -1
  186. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +171 -117
  187. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +219 -1
  188. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +178 -118
  189. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +22 -1
  190. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +17 -13
  191. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +802 -1
  192. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +648 -422
  193. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +410 -1
  194. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +313 -212
  195. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +741 -1
  196. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +602 -417
  197. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +246 -1
  198. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +195 -121
  199. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +27 -1
  200. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +20 -17
  201. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +148 -1
  202. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +115 -67
  203. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +55 -1
  204. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +27 -21
  205. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +223 -1
  206. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -131
  207. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +576 -1
  208. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +437 -308
  209. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +202 -1
  210. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +160 -125
  211. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +159 -1
  212. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +125 -93
  213. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +158 -1
  214. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +128 -98
  215. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +39 -1
  216. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +29 -24
  217. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +19 -1
  218. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -11
  219. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +109 -1
  220. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +91 -68
  221. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +28 -1
  222. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +22 -17
  223. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +33 -1
  224. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +25 -19
  225. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +7 -1
  226. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  227. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +25 -1
  228. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +18 -11
  229. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +47 -1
  230. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +38 -28
  231. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +38 -1
  232. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +19 -15
  233. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
  234. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
  235. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
  236. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
  237. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
  238. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
  239. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
  240. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
  241. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
  242. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
  243. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
  244. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
  245. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
  246. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
  247. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
  248. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
  249. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
  250. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
  251. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
  252. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
  253. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
  254. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
  255. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
  256. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
  257. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
  258. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
  259. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
  260. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
  261. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
  262. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
  263. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
  264. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
  265. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
  266. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
  267. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
  268. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
  269. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
  270. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
  271. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
  272. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
  273. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
  274. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
  275. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
  276. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
  277. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
  278. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
  279. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
  280. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
  281. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
  282. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
  283. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
  284. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
  285. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
  286. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
  287. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
  288. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
  289. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
  290. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
  291. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
  292. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
  293. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
  294. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
  295. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
  296. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
  297. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
  298. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
  299. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
  300. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
  301. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
  302. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
  303. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
  304. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
  305. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
  306. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
  307. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +34 -1
  308. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +32 -21
  309. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +39 -1
  310. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +27 -20
  311. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
  312. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
  313. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
  314. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
  315. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +369 -2
  316. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +282 -238
  317. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +625 -1
  318. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +545 -276
  319. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +1033 -9
  320. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +898 -460
  321. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +47 -38
  322. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +38 -64
  323. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +13 -1
  324. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +9 -2
  325. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +4 -1
  326. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +36 -1
  327. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -16
  328. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +15 -1
  329. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -10
  330. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +167 -4
  331. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +144 -93
  332. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +63 -1
  333. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +45 -35
  334. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +14 -1
  335. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +11 -9
  336. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +84 -1
  337. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +75 -43
  338. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +3 -1
  339. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
  340. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
  341. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
  342. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +1617 -1
  343. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +1332 -874
  344. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +18 -1
  345. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +15 -7
  346. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +26 -1
  347. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +20 -10
  348. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +4 -1
  349. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +40 -1
  350. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +29 -16
  351. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
  352. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
  353. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +20 -1
  354. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +18 -3
  355. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +46 -1
  356. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +38 -19
  357. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +39 -1
  358. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +29 -11
  359. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +18 -1
  360. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +13 -12
  361. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +81 -1
  362. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +58 -45
  363. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +1252 -3
  364. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +1003 -648
  365. package/dist/theme/index.cjs +63 -1
  366. package/dist/theme/index.js +31 -31
  367. package/dist/theme/spacing.cjs +93 -1
  368. package/dist/theme/spacing.js +52 -26
  369. package/dist/theme/tokens.stylex.cjs +210 -1
  370. package/dist/theme/tokens.stylex.js +58 -26
  371. package/dist/theme/types.cjs +13 -1
  372. package/dist/theme/types.js +4 -3
  373. package/dist/theme/width.cjs +39 -1
  374. package/dist/theme/width.js +16 -4
  375. package/dist/theme/zIndex.cjs +64 -1
  376. package/dist/theme/zIndex.js +44 -15
  377. package/dist/theme.css +135 -1
  378. package/dist/ui/accordion.cjs +431 -1
  379. package/dist/ui/accordion.d.ts +10 -10
  380. package/dist/ui/accordion.d.ts.map +1 -1
  381. package/dist/ui/accordion.js +276 -136
  382. package/dist/ui/action-bar.cjs +274 -1
  383. package/dist/ui/action-bar.d.ts +11 -11
  384. package/dist/ui/action-bar.d.ts.map +1 -1
  385. package/dist/ui/action-bar.js +204 -98
  386. package/dist/ui/alert-dialog.cjs +538 -1
  387. package/dist/ui/alert-dialog.d.ts +19 -19
  388. package/dist/ui/alert-dialog.d.ts.map +1 -1
  389. package/dist/ui/alert-dialog.js +459 -167
  390. package/dist/ui/alert.cjs +163 -1
  391. package/dist/ui/alert.d.ts +7 -7
  392. package/dist/ui/alert.d.ts.map +1 -1
  393. package/dist/ui/alert.js +111 -50
  394. package/dist/ui/aspect-ratio.cjs +25 -1
  395. package/dist/ui/aspect-ratio.d.ts +2 -2
  396. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  397. package/dist/ui/aspect-ratio.js +22 -12
  398. package/dist/ui/avatar.cjs +341 -1
  399. package/dist/ui/avatar.d.ts +10 -10
  400. package/dist/ui/avatar.d.ts.map +1 -1
  401. package/dist/ui/avatar.js +226 -114
  402. package/dist/ui/badge-overflow.cjs +66 -1
  403. package/dist/ui/badge-overflow.d.ts +5 -5
  404. package/dist/ui/badge-overflow.d.ts.map +1 -1
  405. package/dist/ui/badge-overflow.js +34 -27
  406. package/dist/ui/badge.cjs +167 -1
  407. package/dist/ui/badge.d.ts +3 -3
  408. package/dist/ui/badge.d.ts.map +1 -1
  409. package/dist/ui/badge.js +48 -42
  410. package/dist/ui/breadcrumb.cjs +508 -1
  411. package/dist/ui/breadcrumb.d.ts +15 -15
  412. package/dist/ui/breadcrumb.d.ts.map +1 -1
  413. package/dist/ui/breadcrumb.js +386 -159
  414. package/dist/ui/button.cjs +425 -1
  415. package/dist/ui/button.d.ts +3 -3
  416. package/dist/ui/button.d.ts.map +1 -1
  417. package/dist/ui/button.js +137 -117
  418. package/dist/ui/calendar.cjs +626 -1
  419. package/dist/ui/calendar.d.ts +5 -5
  420. package/dist/ui/calendar.d.ts.map +1 -1
  421. package/dist/ui/calendar.js +309 -192
  422. package/dist/ui/card.cjs +401 -1
  423. package/dist/ui/card.d.ts +15 -15
  424. package/dist/ui/card.d.ts.map +1 -1
  425. package/dist/ui/card.js +300 -119
  426. package/dist/ui/carousel.cjs +333 -1
  427. package/dist/ui/carousel.d.ts +10 -10
  428. package/dist/ui/carousel.d.ts.map +1 -1
  429. package/dist/ui/carousel.js +245 -126
  430. package/dist/ui/checkbox.cjs +167 -1
  431. package/dist/ui/checkbox.d.ts +4 -4
  432. package/dist/ui/checkbox.d.ts.map +1 -1
  433. package/dist/ui/checkbox.js +66 -58
  434. package/dist/ui/circular-progress.cjs +139 -1
  435. package/dist/ui/circular-progress.d.ts +4 -4
  436. package/dist/ui/circular-progress.d.ts.map +1 -1
  437. package/dist/ui/circular-progress.js +65 -52
  438. package/dist/ui/code-block.cjs +819 -0
  439. package/dist/ui/code-block.d.ts +81 -0
  440. package/dist/ui/code-block.d.ts.map +1 -0
  441. package/dist/ui/code-block.js +809 -0
  442. package/dist/ui/collapsible.cjs +65 -1
  443. package/dist/ui/collapsible.d.ts +4 -4
  444. package/dist/ui/collapsible.d.ts.map +1 -1
  445. package/dist/ui/collapsible.js +58 -28
  446. package/dist/ui/command.cjs +556 -1
  447. package/dist/ui/command.d.ts +19 -19
  448. package/dist/ui/command.d.ts.map +1 -1
  449. package/dist/ui/command.js +432 -163
  450. package/dist/ui/compare-slider.cjs +170 -1
  451. package/dist/ui/compare-slider.d.ts +7 -7
  452. package/dist/ui/compare-slider.d.ts.map +1 -1
  453. package/dist/ui/compare-slider.js +106 -72
  454. package/dist/ui/context-menu.cjs +811 -1
  455. package/dist/ui/context-menu.d.ts +26 -26
  456. package/dist/ui/context-menu.d.ts.map +1 -1
  457. package/dist/ui/context-menu.js +693 -228
  458. package/dist/ui/copy-button.cjs +94 -1
  459. package/dist/ui/copy-button.d.ts +1 -2
  460. package/dist/ui/copy-button.d.ts.map +1 -1
  461. package/dist/ui/copy-button.js +56 -44
  462. package/dist/ui/dialog.cjs +409 -1
  463. package/dist/ui/dialog.d.ts +18 -18
  464. package/dist/ui/dialog.d.ts.map +1 -1
  465. package/dist/ui/dialog.js +317 -131
  466. package/dist/ui/drawer.cjs +476 -1
  467. package/dist/ui/drawer.d.ts +17 -17
  468. package/dist/ui/drawer.d.ts.map +1 -1
  469. package/dist/ui/drawer.js +394 -151
  470. package/dist/ui/dropdown-menu.cjs +638 -1
  471. package/dist/ui/dropdown-menu.d.ts +26 -26
  472. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  473. package/dist/ui/dropdown-menu.js +511 -208
  474. package/dist/ui/editable.cjs +608 -1
  475. package/dist/ui/editable.d.ts +14 -14
  476. package/dist/ui/editable.d.ts.map +1 -1
  477. package/dist/ui/editable.js +478 -218
  478. package/dist/ui/empty.cjs +310 -1
  479. package/dist/ui/empty.d.ts +15 -15
  480. package/dist/ui/empty.d.ts.map +1 -1
  481. package/dist/ui/empty.js +277 -107
  482. package/dist/ui/field.cjs +621 -1
  483. package/dist/ui/field.d.ts +21 -21
  484. package/dist/ui/field.d.ts.map +1 -1
  485. package/dist/ui/field.js +468 -198
  486. package/dist/ui/file-upload-adapters.cjs +289 -1
  487. package/dist/ui/file-upload-adapters.d.ts +1 -2
  488. package/dist/ui/file-upload-adapters.d.ts.map +1 -1
  489. package/dist/ui/file-upload-adapters.js +244 -170
  490. package/dist/ui/file-upload.cjs +1481 -1
  491. package/dist/ui/file-upload.d.ts +22 -22
  492. package/dist/ui/file-upload.d.ts.map +1 -1
  493. package/dist/ui/file-upload.js +1064 -598
  494. package/dist/ui/flex.cjs +203 -1
  495. package/dist/ui/flex.d.ts +6 -6
  496. package/dist/ui/flex.d.ts.map +1 -1
  497. package/dist/ui/flex.js +111 -92
  498. package/dist/ui/form.cjs +454 -1
  499. package/dist/ui/form.d.ts +11 -11
  500. package/dist/ui/form.d.ts.map +1 -1
  501. package/dist/ui/form.js +421 -135
  502. package/dist/ui/gauge.cjs +127 -1
  503. package/dist/ui/gauge.d.ts +6 -6
  504. package/dist/ui/gauge.d.ts.map +1 -1
  505. package/dist/ui/gauge.js +61 -52
  506. package/dist/ui/grid.cjs +224 -1
  507. package/dist/ui/grid.d.ts +7 -7
  508. package/dist/ui/grid.d.ts.map +1 -1
  509. package/dist/ui/grid.js +125 -94
  510. package/dist/ui/hover-card.cjs +86 -1
  511. package/dist/ui/hover-card.d.ts +6 -6
  512. package/dist/ui/hover-card.d.ts.map +1 -1
  513. package/dist/ui/hover-card.js +57 -36
  514. package/dist/ui/index.d.ts +4 -0
  515. package/dist/ui/index.d.ts.map +1 -1
  516. package/dist/ui/input-group.cjs +328 -1
  517. package/dist/ui/input-group.d.ts +12 -12
  518. package/dist/ui/input-group.d.ts.map +1 -1
  519. package/dist/ui/input-group.js +207 -105
  520. package/dist/ui/input-otp.cjs +312 -1
  521. package/dist/ui/input-otp.d.ts +10 -10
  522. package/dist/ui/input-otp.d.ts.map +1 -1
  523. package/dist/ui/input-otp.js +217 -94
  524. package/dist/ui/input.cjs +388 -1
  525. package/dist/ui/input.d.ts +3 -3
  526. package/dist/ui/input.d.ts.map +1 -1
  527. package/dist/ui/input.js +137 -119
  528. package/dist/ui/item.cjs +585 -1
  529. package/dist/ui/item.d.ts +20 -20
  530. package/dist/ui/item.d.ts.map +1 -1
  531. package/dist/ui/item.js +460 -162
  532. package/dist/ui/kbd.cjs +115 -1
  533. package/dist/ui/kbd.d.ts +5 -5
  534. package/dist/ui/kbd.d.ts.map +1 -1
  535. package/dist/ui/kbd.js +42 -37
  536. package/dist/ui/label.cjs +67 -1
  537. package/dist/ui/label.d.ts +4 -4
  538. package/dist/ui/label.d.ts.map +1 -1
  539. package/dist/ui/label.js +51 -21
  540. package/dist/ui/marker.cjs +294 -0
  541. package/dist/ui/marker.d.ts +22 -0
  542. package/dist/ui/marker.d.ts.map +1 -0
  543. package/dist/ui/marker.js +290 -0
  544. package/dist/ui/masonry.cjs +58 -1
  545. package/dist/ui/masonry.d.ts +4 -4
  546. package/dist/ui/masonry.d.ts.map +1 -1
  547. package/dist/ui/masonry.js +41 -36
  548. package/dist/ui/menubar.cjs +908 -1
  549. package/dist/ui/menubar.d.ts +29 -29
  550. package/dist/ui/menubar.d.ts.map +1 -1
  551. package/dist/ui/menubar.js +737 -251
  552. package/dist/ui/navigation-menu.cjs +560 -1
  553. package/dist/ui/navigation-menu.d.ts +18 -18
  554. package/dist/ui/navigation-menu.d.ts.map +1 -1
  555. package/dist/ui/navigation-menu.js +442 -148
  556. package/dist/ui/pagination.cjs +575 -1
  557. package/dist/ui/pagination.d.ts +13 -13
  558. package/dist/ui/pagination.d.ts.map +1 -1
  559. package/dist/ui/pagination.js +422 -172
  560. package/dist/ui/popover.cjs +93 -1
  561. package/dist/ui/popover.d.ts +7 -7
  562. package/dist/ui/popover.d.ts.map +1 -1
  563. package/dist/ui/popover.js +61 -42
  564. package/dist/ui/progress.cjs +33 -1
  565. package/dist/ui/progress.d.ts +3 -3
  566. package/dist/ui/progress.d.ts.map +1 -1
  567. package/dist/ui/progress.js +19 -17
  568. package/dist/ui/questionnaire.cjs +679 -0
  569. package/dist/ui/questionnaire.d.ts +101 -0
  570. package/dist/ui/questionnaire.d.ts.map +1 -0
  571. package/dist/ui/questionnaire.js +667 -0
  572. package/dist/ui/radio-group.cjs +221 -1
  573. package/dist/ui/radio-group.d.ts +6 -6
  574. package/dist/ui/radio-group.d.ts.map +1 -1
  575. package/dist/ui/radio-group.js +125 -74
  576. package/dist/ui/rating.cjs +191 -1
  577. package/dist/ui/rating.d.ts +3 -3
  578. package/dist/ui/rating.d.ts.map +1 -1
  579. package/dist/ui/rating.js +96 -78
  580. package/dist/ui/resizable.cjs +175 -1
  581. package/dist/ui/resizable.d.ts +7 -7
  582. package/dist/ui/resizable.d.ts.map +1 -1
  583. package/dist/ui/resizable.js +150 -54
  584. package/dist/ui/responsive-dialog.cjs +400 -1
  585. package/dist/ui/responsive-dialog.d.ts +17 -17
  586. package/dist/ui/responsive-dialog.d.ts.map +1 -1
  587. package/dist/ui/responsive-dialog.js +372 -155
  588. package/dist/ui/row-col.cjs +510 -1
  589. package/dist/ui/row-col.d.ts +11 -11
  590. package/dist/ui/row-col.d.ts.map +1 -1
  591. package/dist/ui/row-col.js +238 -205
  592. package/dist/ui/scroll-area.cjs +142 -1
  593. package/dist/ui/scroll-area.d.ts +6 -6
  594. package/dist/ui/scroll-area.d.ts.map +1 -1
  595. package/dist/ui/scroll-area.js +103 -47
  596. package/dist/ui/segmented.cjs +170 -1
  597. package/dist/ui/segmented.d.ts +5 -5
  598. package/dist/ui/segmented.d.ts.map +1 -1
  599. package/dist/ui/segmented.js +75 -62
  600. package/dist/ui/select.cjs +484 -1
  601. package/dist/ui/select.d.ts +17 -17
  602. package/dist/ui/select.d.ts.map +1 -1
  603. package/dist/ui/select.js +353 -160
  604. package/dist/ui/separator.cjs +44 -1
  605. package/dist/ui/separator.d.ts +4 -4
  606. package/dist/ui/separator.d.ts.map +1 -1
  607. package/dist/ui/separator.js +17 -17
  608. package/dist/ui/sheet.cjs +460 -1
  609. package/dist/ui/sheet.d.ts +16 -16
  610. package/dist/ui/sheet.d.ts.map +1 -1
  611. package/dist/ui/sheet.js +329 -141
  612. package/dist/ui/sidebar.cjs +1453 -1
  613. package/dist/ui/sidebar.d.ts +48 -48
  614. package/dist/ui/sidebar.d.ts.map +1 -1
  615. package/dist/ui/sidebar.js +1057 -438
  616. package/dist/ui/signature-pad.cjs +740 -0
  617. package/dist/ui/signature-pad.d.ts +107 -0
  618. package/dist/ui/signature-pad.d.ts.map +1 -0
  619. package/dist/ui/signature-pad.js +730 -0
  620. package/dist/ui/skeleton.cjs +62 -1
  621. package/dist/ui/skeleton.d.ts +3 -3
  622. package/dist/ui/skeleton.d.ts.map +1 -1
  623. package/dist/ui/skeleton.js +50 -20
  624. package/dist/ui/slider.cjs +47 -1
  625. package/dist/ui/slider.d.ts +4 -4
  626. package/dist/ui/slider.d.ts.map +1 -1
  627. package/dist/ui/slider.js +27 -26
  628. package/dist/ui/sonner.cjs +28 -1
  629. package/dist/ui/sonner.js +24 -22
  630. package/dist/ui/spinner.cjs +73 -1
  631. package/dist/ui/spinner.d.ts +3 -3
  632. package/dist/ui/spinner.d.ts.map +1 -1
  633. package/dist/ui/spinner.js +29 -28
  634. package/dist/ui/stat.cjs +334 -1
  635. package/dist/ui/stat.d.ts +15 -15
  636. package/dist/ui/stat.d.ts.map +1 -1
  637. package/dist/ui/stat.js +271 -130
  638. package/dist/ui/stepper.cjs +785 -1
  639. package/dist/ui/stepper.d.ts +24 -24
  640. package/dist/ui/stepper.d.ts.map +1 -1
  641. package/dist/ui/stepper.js +594 -281
  642. package/dist/ui/switch.cjs +203 -1
  643. package/dist/ui/switch.d.ts +4 -4
  644. package/dist/ui/switch.d.ts.map +1 -1
  645. package/dist/ui/switch.js +83 -72
  646. package/dist/ui/table.cjs +435 -1
  647. package/dist/ui/table.d.ts +17 -17
  648. package/dist/ui/table.d.ts.map +1 -1
  649. package/dist/ui/table.js +369 -129
  650. package/dist/ui/tabs.cjs +340 -1
  651. package/dist/ui/tabs.d.ts +10 -10
  652. package/dist/ui/tabs.d.ts.map +1 -1
  653. package/dist/ui/tabs.js +204 -95
  654. package/dist/ui/tags-input.cjs +585 -1
  655. package/dist/ui/tags-input.d.ts +13 -13
  656. package/dist/ui/tags-input.d.ts.map +1 -1
  657. package/dist/ui/tags-input.js +446 -221
  658. package/dist/ui/textarea.cjs +119 -1
  659. package/dist/ui/textarea.d.ts +3 -3
  660. package/dist/ui/textarea.d.ts.map +1 -1
  661. package/dist/ui/textarea.js +37 -33
  662. package/dist/ui/timeline.cjs +583 -1
  663. package/dist/ui/timeline.d.ts +22 -22
  664. package/dist/ui/timeline.d.ts.map +1 -1
  665. package/dist/ui/timeline.js +409 -198
  666. package/dist/ui/toggle-group.cjs +128 -1
  667. package/dist/ui/toggle-group.d.ts +7 -7
  668. package/dist/ui/toggle-group.d.ts.map +1 -1
  669. package/dist/ui/toggle-group.js +92 -41
  670. package/dist/ui/toggle.cjs +145 -1
  671. package/dist/ui/toggle.d.ts +4 -4
  672. package/dist/ui/toggle.d.ts.map +1 -1
  673. package/dist/ui/toggle.js +38 -34
  674. package/dist/ui/tooltip.cjs +81 -1
  675. package/dist/ui/tooltip.d.ts +7 -7
  676. package/dist/ui/tooltip.d.ts.map +1 -1
  677. package/dist/ui/tooltip.js +50 -37
  678. package/dist/ui/useBreakpoint.cjs +91 -1
  679. package/dist/ui/useBreakpoint.js +66 -43
  680. package/dist/utils.cjs +9 -1
  681. package/dist/utils.js +4 -4
  682. package/package.json +10 -2
@@ -1 +1,1617 @@
1
- const e=require("../../../../../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t);var n=(0,t.createContext)(null);n.displayName=`PanelGroupContext`;var r={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},i=10,a=t.useLayoutEffect,o=t.useId,s=typeof o==`function`?o:()=>null,c=0;function l(e=null){let n=s(),r=(0,t.useRef)(e||n||null);return r.current===null&&(r.current=``+c++),e??r.current}function u({children:e,className:i=``,collapsedSize:o,collapsible:s,defaultSize:c,forwardedRef:u,id:d,maxSize:f,minSize:p,onCollapse:m,onExpand:h,onResize:g,order:_,style:v,tagName:y=`div`,...b}){let x=(0,t.useContext)(n);if(x===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:S,expandPanel:C,getPanelSize:w,getPanelStyle:T,groupId:E,isPanelCollapsed:D,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:A,unregisterPanel:j}=x,M=l(d),N=(0,t.useRef)({callbacks:{onCollapse:m,onExpand:h,onResize:g},constraints:{collapsedSize:o,collapsible:s,defaultSize:c,maxSize:f,minSize:p},id:M,idIsFromProps:d!==void 0,order:_});(0,t.useRef)({didLogMissingDefaultSizeWarning:!1}),a(()=>{let{callbacks:e,constraints:t}=N.current,n={...t};N.current.id=M,N.current.idIsFromProps=d!==void 0,N.current.order=_,e.onCollapse=m,e.onExpand=h,e.onResize=g,t.collapsedSize=o,t.collapsible=s,t.defaultSize=c,t.maxSize=f,t.minSize=p,(n.collapsedSize!==t.collapsedSize||n.collapsible!==t.collapsible||n.maxSize!==t.maxSize||n.minSize!==t.minSize)&&O(N.current,n)}),a(()=>{let e=N.current;return k(e),()=>{j(e)}},[_,M,k,j]),(0,t.useImperativeHandle)(u,()=>({collapse:()=>{S(N.current)},expand:e=>{C(N.current,e)},getId(){return M},getSize(){return w(N.current)},isCollapsed(){return D(N.current)},isExpanded(){return!D(N.current)},resize:e=>{A(N.current,e)}}),[S,C,w,D,M,A]);let P=T(N.current,c);return(0,t.createElement)(y,{...b,children:e,className:i,id:M,style:{...P,...v},[r.groupId]:E,[r.panel]:``,[r.panelCollapsible]:s||void 0,[r.panelId]:M,[r.panelSize]:parseFloat(``+P.flexGrow).toFixed(1)})}var d=(0,t.forwardRef)((e,n)=>(0,t.createElement)(u,{...e,forwardedRef:n}));u.displayName=`Panel`,d.displayName=`forwardRef(Panel)`;var f;function p(){return f}var m=null,h=!0,g=-1,_=null;function v(e,t){if(t){let e=(t&ee)!==0,n=(t&te)!==0,r=(t&ne)!==0,i=(t&re)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function y(){_!==null&&(document.head.removeChild(_),m=null,_=null,g=-1)}function b(e,t){if(!h)return;let n=v(e,t);if(m!==n){if(m=n,_===null){_=document.createElement(`style`);let e=p();e&&_.setAttribute(`nonce`,e),document.head.appendChild(_)}if(g>=0){var r;(r=_.sheet)==null||r.removeRule(g)}g=_.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function x(e){return e.type===`keydown`}function S(e){return e.type.startsWith(`pointer`)}function C(e){return e.type.startsWith(`mouse`)}function w(e){if(S(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(C(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function T(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function E(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function D(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:N(e),b:N(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;H(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:M(j(n.a)),b:M(j(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var O=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function k(e){let t=getComputedStyle(P(e)??e).display;return t===`flex`||t===`inline-flex`}function A(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||k(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||O.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function j(e){let t=e.length;for(;t--;){let n=e[t];if(H(n,`Missing node`),A(n))return n}return null}function M(e){return e&&Number(getComputedStyle(e).zIndex)||0}function N(e){let t=[];for(;e;)t.push(e),e=P(e);return t}function P(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var ee=1,te=2,ne=4,re=8,ie=T()===`coarse`,F=[],I=!1,L=new Map,R=new Map,z=new Set;function ae(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=L.get(a)??0;return L.set(a,s+1),z.add(o),fe(),function(){R.delete(e),z.delete(o);let t=L.get(a)??1;if(L.set(a,t-1),fe(),t===1&&L.delete(a),F.includes(o)){let e=F.indexOf(o);e>=0&&F.splice(e,1),ue(),i(`up`,!0,null)}}}function oe(e){let{target:t}=e,{x:n,y:r}=w(e);I=!0,ce({target:t,x:n,y:r}),fe(),F.length>0&&(pe(`down`,e),e.preventDefault(),se(t)||e.stopImmediatePropagation())}function B(e){let{x:t,y:n}=w(e);if(I&&e.buttons===0&&(I=!1,pe(`up`,e)),!I){let{target:r}=e;ce({target:r,x:t,y:n})}pe(`move`,e),ue(),F.length>0&&e.preventDefault()}function V(e){let{target:t}=e,{x:n,y:r}=w(e);R.clear(),I=!1,F.length>0&&(e.preventDefault(),se(t)||e.stopImmediatePropagation()),pe(`up`,e),ce({target:t,x:n,y:r}),ue(),fe()}function se(e){let t=e;for(;t;){if(t.hasAttribute(r.resizeHandle))return!0;t=t.parentElement}return!1}function ce({target:e,x:t,y:n}){F.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),z.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=ie?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&D(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(E(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}F.push(e)}})}function le(e,t){R.set(e,t)}function ue(){let e=!1,t=!1;F.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;R.forEach(e=>{n|=e}),e&&t?b(`intersection`,n):e?b(`horizontal`,n):t?b(`vertical`,n):y()}var de=new AbortController;function fe(){de.abort(),de=new AbortController;let e={capture:!0,signal:de.signal};z.size&&(I?(F.length>0&&L.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,V,e),r.addEventListener(`pointerleave`,B,e),r.addEventListener(`pointermove`,B,e))}),window.addEventListener(`pointerup`,V,e),window.addEventListener(`pointercancel`,V,e)):L.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,oe,e),r.addEventListener(`pointermove`,B,e))}))}function pe(e,t){z.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,F.includes(n),t)})}function me(){let[e,n]=(0,t.useState)(0);return(0,t.useCallback)(()=>n(e=>e+1),[])}function H(e,t){if(!e)throw console.error(t),Error(t)}function U(e,t,n=i){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function W(e,t,n=i){return U(e,t,n)===0}function G(e,t,n){return U(e,t,n)===0}function he(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!G(i,a,n))return!1}return!0}function K({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];H(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:o,maxSize:s=100,minSize:c=0}=r;if(U(n,c)<0){if(o){let e=(a+c)/2;n=U(n,e)<0?a:c}else n=c}return n=Math.min(s,n),n=parseFloat(n.toFixed(i)),n}function q({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(G(e,0))return t;let o=[...t],[s,c]=r;H(s!=null,`Invalid first pivot index`),H(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];H(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(H(n!=null,`Previous layout not found for panel index ${r}`),G(n,a)){let t=l-n;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];H(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(H(n!=null,`Previous layout not found for panel index ${r}`),G(n,l)){let t=n-a;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];H(e!=null,`Previous layout not found for panel index ${i}`);let o=K({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];H(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=K({panelConstraints:n,panelIndex:r,size:s});if(!G(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(he(i,o))return i;{let r=e<0?c:s,i=t[r];H(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=K({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!G(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];H(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=K({panelConstraints:n,panelIndex:r,size:a});if(G(i,s)||(t-=s-i,o[r]=s),G(t,0))break;e>0?r--:r++}}}return G(o.reduce((e,t)=>t+e,0),100)?o:i}function ge({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return H(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function J(e,t=document){return Array.from(t.querySelectorAll(`[${r.resizeHandleId}][data-panel-group-id="${e}"]`))}function _e(e,t,n=document){return J(e,n).findIndex(e=>e.getAttribute(r.resizeHandleId)===t)??null}function ve(e,t,n){let r=_e(e,t,n);return r==null?[-1,-1]:[r,r+1]}function ye(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Y(e,t=document){return t.querySelector(`[${r.resizeHandleId}="${e}"]`)||null}function be(e,t,n,r=document){let i=Y(t,r),a=J(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function xe({committedValuesRef:e,eagerValuesRef:n,groupId:i,layout:o,panelDataArray:s,panelGroupElement:c,setLayout:l}){(0,t.useRef)({didWarnAboutMissingResizeHandle:!1}),a(()=>{if(!c)return;let e=J(i,c);for(let t=0;t<s.length-1;t++){let{valueMax:n,valueMin:r,valueNow:i}=ge({layout:o,panelsArray:s,pivotIndices:[t,t+1]}),a=e[t];if(a!=null){let e=s[t];H(e,`No panel data found for index "${t}"`),a.setAttribute(`aria-controls`,e.id),a.setAttribute(`aria-valuemax`,``+Math.round(n)),a.setAttribute(`aria-valuemin`,``+Math.round(r)),a.setAttribute(`aria-valuenow`,i==null?``:``+Math.round(i))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[i,o,s,c]),(0,t.useEffect)(()=>{if(!c)return;let e=n.current;H(e,`Eager values not found`);let{panelDataArray:t}=e;H(ye(i,c)!=null,`No group found for id "${i}"`);let a=J(i,c);H(a,`No resize handles found for group id "${i}"`);let s=a.map(e=>{let n=e.getAttribute(r.resizeHandleId);H(n,`Resize handle element has no handle id attribute`);let[a,s]=be(i,n,t,c);if(a==null||s==null)return()=>{};let u=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let r=t.findIndex(e=>e.id===a);if(r>=0){let e=t[r];H(e,`No panel data found for index ${r}`);let a=o[r],{collapsedSize:s=0,collapsible:u,minSize:d=0}=e.constraints;if(a!=null&&u){let e=q({delta:G(a,s)?d-s:s-a,initialLayout:o,panelConstraints:t.map(e=>e.constraints),pivotIndices:ve(i,n,c),prevLayout:o,trigger:`keyboard`});o!==e&&l(e)}}break}}};return e.addEventListener(`keydown`,u),()=>{e.removeEventListener(`keydown`,u)}});return()=>{s.forEach(e=>e())}},[c,e,n,i,o,s,l])}function Se(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ce(e,t){let n=e===`horizontal`,{x:r,y:i}=w(t);return n?r:i}function we(e,t,n,i,a){let o=n===`horizontal`,s=Y(t,a);H(s,`No resize handle element found for id "${t}"`);let c=s.getAttribute(r.groupId);H(c,`Resize handle element has no group id attribute`);let{initialCursorPosition:l}=i,u=Ce(n,e),d=ye(c,a);H(d,`No group element found for id "${c}"`);let f=d.getBoundingClientRect(),p=o?f.width:f.height;return(u-l)/p*100}function Te(e,t,n,r,i,a){if(x(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100}return a}return r==null?0:we(e,t,n,r,a)}function Ee({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];H(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];H(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function X(e,t,n){t.forEach((t,r)=>{let i=e[r];H(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||W(u,c))&&!W(t,c)&&r(),e&&(u==null||!W(u,c))&&W(t,c)&&e())}})}function De(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Oe({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function ke(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Ae(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function je(e){return`react-resizable-panels:${e}`}function Me(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function Ne(e,t){try{let n=je(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function Pe(e,t,n){return(Ne(e,n)??{})[Me(t)]??null}function Fe(e,t,n,r,i){let a=je(e),o=Me(t),s=Ne(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function Ie({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!G(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];H(t!=null,`No layout data found for index ${e}`);let i=100/r*t;n[e]=i}let i=0;for(let e=0;e<t.length;e++){let r=n[e];H(r!=null,`No layout data found for index ${e}`);let a=K({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!G(i,0))for(let e=0;e<t.length;e++){let r=n[e];H(r!=null,`No layout data found for index ${e}`);let a=r+i,o=K({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,G(i,0)))break}return n}var Le=100,Z={getItem:e=>(Ae(Z),Z.getItem(e)),setItem:(e,t)=>{Ae(Z),Z.setItem(e,t)}},Re={};function ze({autoSaveId:e=null,children:i,className:o=``,direction:s,forwardedRef:c,id:u=null,onLayout:d=null,keyboardResizeBy:f=null,storage:p=Z,style:m,tagName:h=`div`,...g}){let _=l(u),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(null),[w,T]=(0,t.useState)([]),E=me(),D=(0,t.useRef)({}),O=(0,t.useRef)(new Map),k=(0,t.useRef)(0),A=(0,t.useRef)({autoSaveId:e,direction:s,dragState:y,id:_,keyboardResizeBy:f,onLayout:d,storage:p}),j=(0,t.useRef)({layout:w,panelDataArray:[],panelDataArrayChanged:!1});(0,t.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,t.useImperativeHandle)(c,()=>({getId:()=>A.current.id,getLayout:()=>{let{layout:e}=j.current;return e},setLayout:e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current,i=Ie({layout:e,panelConstraints:r.map(e=>e.constraints)});Se(n,i)||(T(i),j.current.layout=i,t&&t(i),X(r,i,D.current))}}),[]),a(()=>{A.current.autoSaveId=e,A.current.direction=s,A.current.dragState=y,A.current.id=_,A.current.onLayout=d,A.current.storage=p}),xe({committedValuesRef:A,eagerValuesRef:j,groupId:_,layout:w,panelDataArray:j.current.panelDataArray,setLayout:T,panelGroupElement:v.current}),(0,t.useEffect)(()=>{let{panelDataArray:t}=j.current;if(e){if(w.length===0||w.length!==t.length)return;let n=Re[e];n??(n=ke(Fe,Le),Re[e]=n);let r=[...t],i=new Map(O.current);n(e,r,i,w,p)}},[e,w,p]),(0,t.useEffect)(()=>{});let M=(0,t.useCallback)(e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=$(r,e,n);if(H(o!=null,`Panel size not found for panel "${e.id}"`),!W(o,a)){O.current.set(e.id,o);let c=q({delta:Q(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});De(n,c)||(T(c),j.current.layout=c,t&&t(c),X(r,c,D.current))}}},[]),N=(0,t.useCallback)((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=$(i,e,r),u=t??c;if(W(s,o)){let t=O.current.get(e.id),o=t!=null&&t>=u?t:u,c=q({delta:Q(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});De(r,c)||(T(c),j.current.layout=c,n&&n(c),X(i,c,D.current))}}},[]),P=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{panelSize:r}=$(n,e,t);return H(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),ie=(0,t.useCallback)((e,t)=>{let{panelDataArray:n}=j.current,r=Q(n,e);return Oe({defaultSize:t,dragState:y,layout:w,panelData:n,panelIndex:r})},[y,w]),F=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=$(n,e,t);return H(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&W(a,r)},[]),I=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=$(n,e,t);return H(a!=null,`Panel size not found for panel "${e.id}"`),!i||U(a,r)>0},[]),L=(0,t.useCallback)(e=>{let{panelDataArray:t}=j.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),j.current.panelDataArrayChanged=!0,E()},[E]);a(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=null;if(e){let t=Pe(e,i,n);t&&(O.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=Ee({panelDataArray:i});let o=Ie({layout:a,panelConstraints:i.map(e=>e.constraints)});Se(r,o)||(T(o),j.current.layout=o,t&&t(o),X(i,o,D.current))}}),a(()=>{let e=j.current;return()=>{e.layout=[]}},[]);let R=(0,t.useCallback)(e=>{let t=!1,n=v.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=v.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=A.current,{layout:l,panelDataArray:u}=j.current,{initialLayout:d}=a??{},f=ve(o,e,r),p=Te(n,e,i,a,s,r),m=i===`horizontal`;m&&t&&(p=-p);let h=u.map(e=>e.constraints),g=q({delta:p,initialLayout:d??l,panelConstraints:h,pivotIndices:f,prevLayout:l,trigger:x(n)?`keyboard`:`mouse-or-touch`}),_=!De(l,g);(S(n)||C(n))&&k.current!=p&&(k.current=p,!_&&p!==0?m?le(e,p<0?ee:te):le(e,p<0?ne:re):le(e,0)),_&&(T(g),j.current.layout=g,c&&c(g),X(u,g,D.current))}},[]),z=(0,t.useCallback)((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=$(i,e,r);H(o!=null,`Panel size not found for panel "${e.id}"`);let c=q({delta:Q(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});De(r,c)||(T(c),j.current.layout=c,n&&n(c),X(i,c,D.current))},[]),ae=(0,t.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=j.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=$(r,e,n);u!=null&&(a&&s&&W(u,i)?W(i,o)||z(e,o):u<l?z(e,l):u>c&&z(e,c))},[z]),oe=(0,t.useCallback)((e,t)=>{let{direction:n}=A.current,{layout:r}=j.current;if(!v.current)return;let i=Y(e,v.current);H(i,`Drag handle element not found for id "${e}"`);let a=Ce(n,t);b({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),B=(0,t.useCallback)(()=>{b(null)},[]),V=(0,t.useCallback)(e=>{let{panelDataArray:t}=j.current,n=Q(t,e);n>=0&&(t.splice(n,1),delete D.current[e.id],j.current.panelDataArrayChanged=!0,E())},[E]),se=(0,t.useMemo)(()=>({collapsePanel:M,direction:s,dragState:y,expandPanel:N,getPanelSize:P,getPanelStyle:ie,groupId:_,isPanelCollapsed:F,isPanelExpanded:I,reevaluatePanelConstraints:ae,registerPanel:L,registerResizeHandle:R,resizePanel:z,startDragging:oe,stopDragging:B,unregisterPanel:V,panelGroupElement:v.current}),[M,y,s,N,P,ie,_,F,I,ae,L,R,z,oe,B,V]),ce={display:`flex`,flexDirection:s===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,t.createElement)(n.Provider,{value:se},(0,t.createElement)(h,{...g,children:i,className:o,id:u,ref:v,style:{...ce,...m},[r.group]:``,[r.groupDirection]:s,[r.groupId]:_}))}var Be=(0,t.forwardRef)((e,n)=>(0,t.createElement)(ze,{...e,forwardedRef:n}));ze.displayName=`PanelGroup`,Be.displayName=`forwardRef(PanelGroup)`;function Q(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function $(e,t,n){let r=Q(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function Ve({disabled:e,handleId:n,resizeHandler:i,panelGroupElement:a}){(0,t.useEffect)(()=>{if(e||i==null||a==null)return;let t=Y(n,a);if(t==null)return;let o=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),i(e);break;case`F6`:{e.preventDefault();let i=t.getAttribute(r.groupId);H(i,`No group element found for id "${i}"`);let o=J(i,a),s=_e(i,n,a);H(s!==null,`No resize element found for id "${n}"`),o[e.shiftKey?s>0?s-1:o.length-1:s+1<o.length?s+1:0].focus();break}}};return t.addEventListener(`keydown`,o),()=>{t.removeEventListener(`keydown`,o)}},[a,e,n,i])}function He({children:e=null,className:i=``,disabled:o=!1,hitAreaMargins:s,id:c,onBlur:u,onClick:d,onDragging:f,onFocus:p,onPointerDown:m,onPointerUp:h,style:g={},tabIndex:_=0,tagName:v=`div`,...y}){let b=(0,t.useRef)(null),x=(0,t.useRef)({onClick:d,onDragging:f,onPointerDown:m,onPointerUp:h});(0,t.useEffect)(()=>{x.current.onClick=d,x.current.onDragging=f,x.current.onPointerDown=m,x.current.onPointerUp=h});let S=(0,t.useContext)(n);if(S===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:C,groupId:w,registerResizeHandle:T,startDragging:E,stopDragging:D,panelGroupElement:O}=S,k=l(c),[A,j]=(0,t.useState)(`inactive`),[M,N]=(0,t.useState)(!1),[P,ee]=(0,t.useState)(null),te=(0,t.useRef)({state:A});a(()=>{te.current.state=A}),(0,t.useEffect)(()=>{if(o)ee(null);else{let e=T(k);ee(()=>e)}},[o,k,T]);let ne=s?.coarse??15,re=s?.fine??5;(0,t.useEffect)(()=>{if(o||P==null)return;let e=b.current;H(e,`Element ref not attached`);let t=!1;return ae(k,e,C,{coarse:ne,fine:re},(e,n,r)=>{if(!n)j(`inactive`);else switch(e){case`down`:{j(`drag`),t=!1,H(r,`Expected event to be defined for "down" action`),E(k,r);let{onDragging:e,onPointerDown:n}=x.current;e?.(!0),n?.();break}case`move`:{let{state:e}=te.current;t=!0,e!==`drag`&&j(`hover`),H(r,`Expected event to be defined for "move" action`),P(r);break}case`up`:{j(`hover`),D();let{onClick:e,onDragging:n,onPointerUp:r}=x.current;n?.(!1),r?.(),t||e?.();break}}})},[ne,C,o,re,T,k,P,E,D]),Ve({disabled:o,handleId:k,resizeHandler:P,panelGroupElement:O});let ie={touchAction:`none`,userSelect:`none`};return(0,t.createElement)(v,{...y,children:e,className:i,id:c,onBlur:()=>{N(!1),u?.()},onFocus:()=>{N(!0),p?.()},ref:b,role:`separator`,style:{...ie,...g},tabIndex:_,[r.groupDirection]:C,[r.groupId]:w,[r.resizeHandle]:``,[r.resizeHandleActive]:A===`drag`?`pointer`:M?`keyboard`:void 0,[r.resizeHandleEnabled]:!o,[r.resizeHandleId]:k,[r.resizeHandleState]:A})}He.displayName=`PanelResizeHandle`,exports.DATA_ATTRIBUTES=r,exports.Panel=d,exports.PanelGroup=Be,exports.PanelResizeHandle=He,exports.assert=H,exports.getPanelGroupElement=ye,exports.getResizeHandleElement=Y,exports.getResizeHandleElementIndex=_e,exports.getResizeHandleElementsForGroup=J,exports.getResizeHandlePanelIds=be,exports.intersects=E;
1
+ const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
2
+ let react = require("react");
3
+ react = require_runtime.__toESM(react);
4
+ // ../../node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js
5
+ var PanelGroupContext = (0, react.createContext)(null);
6
+ PanelGroupContext.displayName = "PanelGroupContext";
7
+ var DATA_ATTRIBUTES = {
8
+ group: "data-panel-group",
9
+ groupDirection: "data-panel-group-direction",
10
+ groupId: "data-panel-group-id",
11
+ panel: "data-panel",
12
+ panelCollapsible: "data-panel-collapsible",
13
+ panelId: "data-panel-id",
14
+ panelSize: "data-panel-size",
15
+ resizeHandle: "data-resize-handle",
16
+ resizeHandleActive: "data-resize-handle-active",
17
+ resizeHandleEnabled: "data-panel-resize-handle-enabled",
18
+ resizeHandleId: "data-panel-resize-handle-id",
19
+ resizeHandleState: "data-resize-handle-state"
20
+ };
21
+ var PRECISION = 10;
22
+ var useIsomorphicLayoutEffect = react.useLayoutEffect;
23
+ var useId = react["useId".toString()];
24
+ var wrappedUseId = typeof useId === "function" ? useId : () => null;
25
+ var counter = 0;
26
+ function useUniqueId(idFromParams = null) {
27
+ const idFromUseId = wrappedUseId();
28
+ const idRef = (0, react.useRef)(idFromParams || idFromUseId || null);
29
+ if (idRef.current === null) idRef.current = "" + counter++;
30
+ return idFromParams !== null && idFromParams !== void 0 ? idFromParams : idRef.current;
31
+ }
32
+ function PanelWithForwardedRef({ children, className: classNameFromProps = "", collapsedSize, collapsible, defaultSize, forwardedRef, id: idFromProps, maxSize, minSize, onCollapse, onExpand, onResize, order, style: styleFromProps, tagName: Type = "div", ...rest }) {
33
+ const context = (0, react.useContext)(PanelGroupContext);
34
+ if (context === null) throw Error(`Panel components must be rendered within a PanelGroup container`);
35
+ const { collapsePanel, expandPanel, getPanelSize, getPanelStyle, groupId, isPanelCollapsed, reevaluatePanelConstraints, registerPanel, resizePanel, unregisterPanel } = context;
36
+ const panelId = useUniqueId(idFromProps);
37
+ const panelDataRef = (0, react.useRef)({
38
+ callbacks: {
39
+ onCollapse,
40
+ onExpand,
41
+ onResize
42
+ },
43
+ constraints: {
44
+ collapsedSize,
45
+ collapsible,
46
+ defaultSize,
47
+ maxSize,
48
+ minSize
49
+ },
50
+ id: panelId,
51
+ idIsFromProps: idFromProps !== void 0,
52
+ order
53
+ });
54
+ (0, react.useRef)({ didLogMissingDefaultSizeWarning: false });
55
+ useIsomorphicLayoutEffect(() => {
56
+ const { callbacks, constraints } = panelDataRef.current;
57
+ const prevConstraints = { ...constraints };
58
+ panelDataRef.current.id = panelId;
59
+ panelDataRef.current.idIsFromProps = idFromProps !== void 0;
60
+ panelDataRef.current.order = order;
61
+ callbacks.onCollapse = onCollapse;
62
+ callbacks.onExpand = onExpand;
63
+ callbacks.onResize = onResize;
64
+ constraints.collapsedSize = collapsedSize;
65
+ constraints.collapsible = collapsible;
66
+ constraints.defaultSize = defaultSize;
67
+ constraints.maxSize = maxSize;
68
+ constraints.minSize = minSize;
69
+ if (prevConstraints.collapsedSize !== constraints.collapsedSize || prevConstraints.collapsible !== constraints.collapsible || prevConstraints.maxSize !== constraints.maxSize || prevConstraints.minSize !== constraints.minSize) reevaluatePanelConstraints(panelDataRef.current, prevConstraints);
70
+ });
71
+ useIsomorphicLayoutEffect(() => {
72
+ const panelData = panelDataRef.current;
73
+ registerPanel(panelData);
74
+ return () => {
75
+ unregisterPanel(panelData);
76
+ };
77
+ }, [
78
+ order,
79
+ panelId,
80
+ registerPanel,
81
+ unregisterPanel
82
+ ]);
83
+ (0, react.useImperativeHandle)(forwardedRef, () => ({
84
+ collapse: () => {
85
+ collapsePanel(panelDataRef.current);
86
+ },
87
+ expand: (minSize) => {
88
+ expandPanel(panelDataRef.current, minSize);
89
+ },
90
+ getId() {
91
+ return panelId;
92
+ },
93
+ getSize() {
94
+ return getPanelSize(panelDataRef.current);
95
+ },
96
+ isCollapsed() {
97
+ return isPanelCollapsed(panelDataRef.current);
98
+ },
99
+ isExpanded() {
100
+ return !isPanelCollapsed(panelDataRef.current);
101
+ },
102
+ resize: (size) => {
103
+ resizePanel(panelDataRef.current, size);
104
+ }
105
+ }), [
106
+ collapsePanel,
107
+ expandPanel,
108
+ getPanelSize,
109
+ isPanelCollapsed,
110
+ panelId,
111
+ resizePanel
112
+ ]);
113
+ const style = getPanelStyle(panelDataRef.current, defaultSize);
114
+ return (0, react.createElement)(Type, {
115
+ ...rest,
116
+ children,
117
+ className: classNameFromProps,
118
+ id: panelId,
119
+ style: {
120
+ ...style,
121
+ ...styleFromProps
122
+ },
123
+ [DATA_ATTRIBUTES.groupId]: groupId,
124
+ [DATA_ATTRIBUTES.panel]: "",
125
+ [DATA_ATTRIBUTES.panelCollapsible]: collapsible || void 0,
126
+ [DATA_ATTRIBUTES.panelId]: panelId,
127
+ [DATA_ATTRIBUTES.panelSize]: parseFloat("" + style.flexGrow).toFixed(1)
128
+ });
129
+ }
130
+ var Panel = (0, react.forwardRef)((props, ref) => (0, react.createElement)(PanelWithForwardedRef, {
131
+ ...props,
132
+ forwardedRef: ref
133
+ }));
134
+ PanelWithForwardedRef.displayName = "Panel";
135
+ Panel.displayName = "forwardRef(Panel)";
136
+ var nonce;
137
+ function getNonce() {
138
+ return nonce;
139
+ }
140
+ var currentCursorStyle = null;
141
+ var enabled = true;
142
+ var prevRuleIndex = -1;
143
+ var styleElement = null;
144
+ function getCursorStyle(state, constraintFlags) {
145
+ if (constraintFlags) {
146
+ const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
147
+ const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
148
+ const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
149
+ const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
150
+ if (horizontalMin) {
151
+ if (verticalMin) return "se-resize";
152
+ else if (verticalMax) return "ne-resize";
153
+ else return "e-resize";
154
+ } else if (horizontalMax) {
155
+ if (verticalMin) return "sw-resize";
156
+ else if (verticalMax) return "nw-resize";
157
+ else return "w-resize";
158
+ } else if (verticalMin) return "s-resize";
159
+ else if (verticalMax) return "n-resize";
160
+ }
161
+ switch (state) {
162
+ case "horizontal": return "ew-resize";
163
+ case "intersection": return "move";
164
+ case "vertical": return "ns-resize";
165
+ }
166
+ }
167
+ function resetGlobalCursorStyle() {
168
+ if (styleElement !== null) {
169
+ document.head.removeChild(styleElement);
170
+ currentCursorStyle = null;
171
+ styleElement = null;
172
+ prevRuleIndex = -1;
173
+ }
174
+ }
175
+ function setGlobalCursorStyle(state, constraintFlags) {
176
+ var _styleElement$sheet$i, _styleElement$sheet2;
177
+ if (!enabled) return;
178
+ const style = getCursorStyle(state, constraintFlags);
179
+ if (currentCursorStyle === style) return;
180
+ currentCursorStyle = style;
181
+ if (styleElement === null) {
182
+ styleElement = document.createElement("style");
183
+ const nonce = getNonce();
184
+ if (nonce) styleElement.setAttribute("nonce", nonce);
185
+ document.head.appendChild(styleElement);
186
+ }
187
+ if (prevRuleIndex >= 0) {
188
+ var _styleElement$sheet;
189
+ (_styleElement$sheet = styleElement.sheet) === null || _styleElement$sheet === void 0 || _styleElement$sheet.removeRule(prevRuleIndex);
190
+ }
191
+ prevRuleIndex = (_styleElement$sheet$i = (_styleElement$sheet2 = styleElement.sheet) === null || _styleElement$sheet2 === void 0 ? void 0 : _styleElement$sheet2.insertRule(`*{cursor: ${style} !important;}`)) !== null && _styleElement$sheet$i !== void 0 ? _styleElement$sheet$i : -1;
192
+ }
193
+ function isKeyDown(event) {
194
+ return event.type === "keydown";
195
+ }
196
+ function isPointerEvent(event) {
197
+ return event.type.startsWith("pointer");
198
+ }
199
+ function isMouseEvent(event) {
200
+ return event.type.startsWith("mouse");
201
+ }
202
+ function getResizeEventCoordinates(event) {
203
+ if (isPointerEvent(event)) {
204
+ if (event.isPrimary) return {
205
+ x: event.clientX,
206
+ y: event.clientY
207
+ };
208
+ } else if (isMouseEvent(event)) return {
209
+ x: event.clientX,
210
+ y: event.clientY
211
+ };
212
+ return {
213
+ x: Infinity,
214
+ y: Infinity
215
+ };
216
+ }
217
+ function getInputType() {
218
+ if (typeof matchMedia === "function") return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
219
+ }
220
+ function intersects(rectOne, rectTwo, strict) {
221
+ if (strict) return rectOne.x < rectTwo.x + rectTwo.width && rectOne.x + rectOne.width > rectTwo.x && rectOne.y < rectTwo.y + rectTwo.height && rectOne.y + rectOne.height > rectTwo.y;
222
+ else return rectOne.x <= rectTwo.x + rectTwo.width && rectOne.x + rectOne.width >= rectTwo.x && rectOne.y <= rectTwo.y + rectTwo.height && rectOne.y + rectOne.height >= rectTwo.y;
223
+ }
224
+ /**
225
+ * Determine which of two nodes appears in front of the other —
226
+ * if `a` is in front, returns 1, otherwise returns -1
227
+ * @param {HTMLElement | SVGElement} a
228
+ * @param {HTMLElement | SVGElement} b
229
+ */
230
+ function compare(a, b) {
231
+ if (a === b) throw new Error("Cannot compare node with itself");
232
+ const ancestors = {
233
+ a: get_ancestors(a),
234
+ b: get_ancestors(b)
235
+ };
236
+ let common_ancestor;
237
+ while (ancestors.a.at(-1) === ancestors.b.at(-1)) {
238
+ a = ancestors.a.pop();
239
+ b = ancestors.b.pop();
240
+ common_ancestor = a;
241
+ }
242
+ assert(common_ancestor, "Stacking order can only be calculated for elements with a common ancestor");
243
+ const z_indexes = {
244
+ a: get_z_index(find_stacking_context(ancestors.a)),
245
+ b: get_z_index(find_stacking_context(ancestors.b))
246
+ };
247
+ if (z_indexes.a === z_indexes.b) {
248
+ const children = common_ancestor.childNodes;
249
+ const furthest_ancestors = {
250
+ a: ancestors.a.at(-1),
251
+ b: ancestors.b.at(-1)
252
+ };
253
+ let i = children.length;
254
+ while (i--) {
255
+ const child = children[i];
256
+ if (child === furthest_ancestors.a) return 1;
257
+ if (child === furthest_ancestors.b) return -1;
258
+ }
259
+ }
260
+ return Math.sign(z_indexes.a - z_indexes.b);
261
+ }
262
+ var props = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
263
+ /** @param {HTMLElement | SVGElement} node */
264
+ function is_flex_item(node) {
265
+ var _get_parent;
266
+ const display = getComputedStyle((_get_parent = get_parent(node)) !== null && _get_parent !== void 0 ? _get_parent : node).display;
267
+ return display === "flex" || display === "inline-flex";
268
+ }
269
+ /** @param {HTMLElement | SVGElement} node */
270
+ function creates_stacking_context(node) {
271
+ const style = getComputedStyle(node);
272
+ if (style.position === "fixed") return true;
273
+ if (style.zIndex !== "auto" && (style.position !== "static" || is_flex_item(node))) return true;
274
+ if (+style.opacity < 1) return true;
275
+ if ("transform" in style && style.transform !== "none") return true;
276
+ if ("webkitTransform" in style && style.webkitTransform !== "none") return true;
277
+ if ("mixBlendMode" in style && style.mixBlendMode !== "normal") return true;
278
+ if ("filter" in style && style.filter !== "none") return true;
279
+ if ("webkitFilter" in style && style.webkitFilter !== "none") return true;
280
+ if ("isolation" in style && style.isolation === "isolate") return true;
281
+ if (props.test(style.willChange)) return true;
282
+ if (style.webkitOverflowScrolling === "touch") return true;
283
+ return false;
284
+ }
285
+ /** @param {(HTMLElement| SVGElement)[]} nodes */
286
+ function find_stacking_context(nodes) {
287
+ let i = nodes.length;
288
+ while (i--) {
289
+ const node = nodes[i];
290
+ assert(node, "Missing node");
291
+ if (creates_stacking_context(node)) return node;
292
+ }
293
+ return null;
294
+ }
295
+ /** @param {HTMLElement | SVGElement} node */
296
+ function get_z_index(node) {
297
+ return node && Number(getComputedStyle(node).zIndex) || 0;
298
+ }
299
+ /** @param {HTMLElement} node */
300
+ function get_ancestors(node) {
301
+ const ancestors = [];
302
+ while (node) {
303
+ ancestors.push(node);
304
+ node = get_parent(node);
305
+ }
306
+ return ancestors;
307
+ }
308
+ /** @param {HTMLElement} node */
309
+ function get_parent(node) {
310
+ const { parentNode } = node;
311
+ if (parentNode && parentNode instanceof ShadowRoot) return parentNode.host;
312
+ return parentNode;
313
+ }
314
+ var EXCEEDED_HORIZONTAL_MIN = 1;
315
+ var EXCEEDED_HORIZONTAL_MAX = 2;
316
+ var EXCEEDED_VERTICAL_MIN = 4;
317
+ var EXCEEDED_VERTICAL_MAX = 8;
318
+ var isCoarsePointer = getInputType() === "coarse";
319
+ var intersectingHandles = [];
320
+ var isPointerDown = false;
321
+ var ownerDocumentCounts = /* @__PURE__ */ new Map();
322
+ var panelConstraintFlags = /* @__PURE__ */ new Map();
323
+ var registeredResizeHandlers = /* @__PURE__ */ new Set();
324
+ function registerResizeHandle(resizeHandleId, element, direction, hitAreaMargins, setResizeHandlerState) {
325
+ var _ownerDocumentCounts$;
326
+ const { ownerDocument } = element;
327
+ const data = {
328
+ direction,
329
+ element,
330
+ hitAreaMargins,
331
+ setResizeHandlerState
332
+ };
333
+ const count = (_ownerDocumentCounts$ = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$ !== void 0 ? _ownerDocumentCounts$ : 0;
334
+ ownerDocumentCounts.set(ownerDocument, count + 1);
335
+ registeredResizeHandlers.add(data);
336
+ updateListeners();
337
+ return function unregisterResizeHandle() {
338
+ var _ownerDocumentCounts$2;
339
+ panelConstraintFlags.delete(resizeHandleId);
340
+ registeredResizeHandlers.delete(data);
341
+ const count = (_ownerDocumentCounts$2 = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$2 !== void 0 ? _ownerDocumentCounts$2 : 1;
342
+ ownerDocumentCounts.set(ownerDocument, count - 1);
343
+ updateListeners();
344
+ if (count === 1) ownerDocumentCounts.delete(ownerDocument);
345
+ if (intersectingHandles.includes(data)) {
346
+ const index = intersectingHandles.indexOf(data);
347
+ if (index >= 0) intersectingHandles.splice(index, 1);
348
+ updateCursor();
349
+ setResizeHandlerState("up", true, null);
350
+ }
351
+ };
352
+ }
353
+ function handlePointerDown(event) {
354
+ const { target } = event;
355
+ const { x, y } = getResizeEventCoordinates(event);
356
+ isPointerDown = true;
357
+ recalculateIntersectingHandles({
358
+ target,
359
+ x,
360
+ y
361
+ });
362
+ updateListeners();
363
+ if (intersectingHandles.length > 0) {
364
+ updateResizeHandlerStates("down", event);
365
+ event.preventDefault();
366
+ if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
367
+ }
368
+ }
369
+ function handlePointerMove(event) {
370
+ const { x, y } = getResizeEventCoordinates(event);
371
+ if (isPointerDown && event.buttons === 0) {
372
+ isPointerDown = false;
373
+ updateResizeHandlerStates("up", event);
374
+ }
375
+ if (!isPointerDown) {
376
+ const { target } = event;
377
+ recalculateIntersectingHandles({
378
+ target,
379
+ x,
380
+ y
381
+ });
382
+ }
383
+ updateResizeHandlerStates("move", event);
384
+ updateCursor();
385
+ if (intersectingHandles.length > 0) event.preventDefault();
386
+ }
387
+ function handlePointerUp(event) {
388
+ const { target } = event;
389
+ const { x, y } = getResizeEventCoordinates(event);
390
+ panelConstraintFlags.clear();
391
+ isPointerDown = false;
392
+ if (intersectingHandles.length > 0) {
393
+ event.preventDefault();
394
+ if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
395
+ }
396
+ updateResizeHandlerStates("up", event);
397
+ recalculateIntersectingHandles({
398
+ target,
399
+ x,
400
+ y
401
+ });
402
+ updateCursor();
403
+ updateListeners();
404
+ }
405
+ function isWithinResizeHandle(element) {
406
+ let currentElement = element;
407
+ while (currentElement) {
408
+ if (currentElement.hasAttribute(DATA_ATTRIBUTES.resizeHandle)) return true;
409
+ currentElement = currentElement.parentElement;
410
+ }
411
+ return false;
412
+ }
413
+ function recalculateIntersectingHandles({ target, x, y }) {
414
+ intersectingHandles.splice(0);
415
+ let targetElement = null;
416
+ if (target instanceof HTMLElement || target instanceof SVGElement) targetElement = target;
417
+ registeredResizeHandlers.forEach((data) => {
418
+ const { element: dragHandleElement, hitAreaMargins } = data;
419
+ const dragHandleRect = dragHandleElement.getBoundingClientRect();
420
+ const { bottom, left, right, top } = dragHandleRect;
421
+ const margin = isCoarsePointer ? hitAreaMargins.coarse : hitAreaMargins.fine;
422
+ if (x >= left - margin && x <= right + margin && y >= top - margin && y <= bottom + margin) {
423
+ if (targetElement !== null && document.contains(targetElement) && dragHandleElement !== targetElement && !dragHandleElement.contains(targetElement) && !targetElement.contains(dragHandleElement) && compare(targetElement, dragHandleElement) > 0) {
424
+ let currentElement = targetElement;
425
+ let didIntersect = false;
426
+ while (currentElement) {
427
+ if (currentElement.contains(dragHandleElement)) break;
428
+ else if (intersects(currentElement.getBoundingClientRect(), dragHandleRect, true)) {
429
+ didIntersect = true;
430
+ break;
431
+ }
432
+ currentElement = currentElement.parentElement;
433
+ }
434
+ if (didIntersect) return;
435
+ }
436
+ intersectingHandles.push(data);
437
+ }
438
+ });
439
+ }
440
+ function reportConstraintsViolation(resizeHandleId, flag) {
441
+ panelConstraintFlags.set(resizeHandleId, flag);
442
+ }
443
+ function updateCursor() {
444
+ let intersectsHorizontal = false;
445
+ let intersectsVertical = false;
446
+ intersectingHandles.forEach((data) => {
447
+ const { direction } = data;
448
+ if (direction === "horizontal") intersectsHorizontal = true;
449
+ else intersectsVertical = true;
450
+ });
451
+ let constraintFlags = 0;
452
+ panelConstraintFlags.forEach((flag) => {
453
+ constraintFlags |= flag;
454
+ });
455
+ if (intersectsHorizontal && intersectsVertical) setGlobalCursorStyle("intersection", constraintFlags);
456
+ else if (intersectsHorizontal) setGlobalCursorStyle("horizontal", constraintFlags);
457
+ else if (intersectsVertical) setGlobalCursorStyle("vertical", constraintFlags);
458
+ else resetGlobalCursorStyle();
459
+ }
460
+ var listenersAbortController = new AbortController();
461
+ function updateListeners() {
462
+ listenersAbortController.abort();
463
+ listenersAbortController = new AbortController();
464
+ const options = {
465
+ capture: true,
466
+ signal: listenersAbortController.signal
467
+ };
468
+ if (!registeredResizeHandlers.size) return;
469
+ if (isPointerDown) {
470
+ if (intersectingHandles.length > 0) ownerDocumentCounts.forEach((count, ownerDocument) => {
471
+ const { body } = ownerDocument;
472
+ if (count > 0) {
473
+ body.addEventListener("contextmenu", handlePointerUp, options);
474
+ body.addEventListener("pointerleave", handlePointerMove, options);
475
+ body.addEventListener("pointermove", handlePointerMove, options);
476
+ }
477
+ });
478
+ window.addEventListener("pointerup", handlePointerUp, options);
479
+ window.addEventListener("pointercancel", handlePointerUp, options);
480
+ } else ownerDocumentCounts.forEach((count, ownerDocument) => {
481
+ const { body } = ownerDocument;
482
+ if (count > 0) {
483
+ body.addEventListener("pointerdown", handlePointerDown, options);
484
+ body.addEventListener("pointermove", handlePointerMove, options);
485
+ }
486
+ });
487
+ }
488
+ function updateResizeHandlerStates(action, event) {
489
+ registeredResizeHandlers.forEach((data) => {
490
+ const { setResizeHandlerState } = data;
491
+ setResizeHandlerState(action, intersectingHandles.includes(data), event);
492
+ });
493
+ }
494
+ function useForceUpdate() {
495
+ const [_, setCount] = (0, react.useState)(0);
496
+ return (0, react.useCallback)(() => setCount((prevCount) => prevCount + 1), []);
497
+ }
498
+ function assert(expectedCondition, message) {
499
+ if (!expectedCondition) {
500
+ console.error(message);
501
+ throw Error(message);
502
+ }
503
+ }
504
+ function fuzzyCompareNumbers(actual, expected, fractionDigits = PRECISION) {
505
+ if (actual.toFixed(fractionDigits) === expected.toFixed(fractionDigits)) return 0;
506
+ else return actual > expected ? 1 : -1;
507
+ }
508
+ function fuzzyNumbersEqual$1(actual, expected, fractionDigits = PRECISION) {
509
+ return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
510
+ }
511
+ function fuzzyNumbersEqual(actual, expected, fractionDigits) {
512
+ return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
513
+ }
514
+ function fuzzyLayoutsEqual(actual, expected, fractionDigits) {
515
+ if (actual.length !== expected.length) return false;
516
+ for (let index = 0; index < actual.length; index++) {
517
+ const actualSize = actual[index];
518
+ const expectedSize = expected[index];
519
+ if (!fuzzyNumbersEqual(actualSize, expectedSize, fractionDigits)) return false;
520
+ }
521
+ return true;
522
+ }
523
+ function resizePanel({ panelConstraints: panelConstraintsArray, panelIndex, size }) {
524
+ const panelConstraints = panelConstraintsArray[panelIndex];
525
+ assert(panelConstraints != null, `Panel constraints not found for index ${panelIndex}`);
526
+ let { collapsedSize = 0, collapsible, maxSize = 100, minSize = 0 } = panelConstraints;
527
+ if (fuzzyCompareNumbers(size, minSize) < 0) {
528
+ if (collapsible) {
529
+ const halfwayPoint = (collapsedSize + minSize) / 2;
530
+ if (fuzzyCompareNumbers(size, halfwayPoint) < 0) size = collapsedSize;
531
+ else size = minSize;
532
+ } else size = minSize;
533
+ }
534
+ size = Math.min(maxSize, size);
535
+ size = parseFloat(size.toFixed(PRECISION));
536
+ return size;
537
+ }
538
+ function adjustLayoutByDelta({ delta, initialLayout, panelConstraints: panelConstraintsArray, pivotIndices, prevLayout, trigger }) {
539
+ if (fuzzyNumbersEqual(delta, 0)) return initialLayout;
540
+ const nextLayout = [...initialLayout];
541
+ const [firstPivotIndex, secondPivotIndex] = pivotIndices;
542
+ assert(firstPivotIndex != null, "Invalid first pivot index");
543
+ assert(secondPivotIndex != null, "Invalid second pivot index");
544
+ let deltaApplied = 0;
545
+ if (trigger === "keyboard") {
546
+ {
547
+ const index = delta < 0 ? secondPivotIndex : firstPivotIndex;
548
+ const panelConstraints = panelConstraintsArray[index];
549
+ assert(panelConstraints, `Panel constraints not found for index ${index}`);
550
+ const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
551
+ if (collapsible) {
552
+ const prevSize = initialLayout[index];
553
+ assert(prevSize != null, `Previous layout not found for panel index ${index}`);
554
+ if (fuzzyNumbersEqual(prevSize, collapsedSize)) {
555
+ const localDelta = minSize - prevSize;
556
+ if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
557
+ }
558
+ }
559
+ }
560
+ {
561
+ const index = delta < 0 ? firstPivotIndex : secondPivotIndex;
562
+ const panelConstraints = panelConstraintsArray[index];
563
+ assert(panelConstraints, `No panel constraints found for index ${index}`);
564
+ const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
565
+ if (collapsible) {
566
+ const prevSize = initialLayout[index];
567
+ assert(prevSize != null, `Previous layout not found for panel index ${index}`);
568
+ if (fuzzyNumbersEqual(prevSize, minSize)) {
569
+ const localDelta = prevSize - collapsedSize;
570
+ if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
571
+ }
572
+ }
573
+ }
574
+ }
575
+ {
576
+ const increment = delta < 0 ? 1 : -1;
577
+ let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
578
+ let maxAvailableDelta = 0;
579
+ while (true) {
580
+ const prevSize = initialLayout[index];
581
+ assert(prevSize != null, `Previous layout not found for panel index ${index}`);
582
+ const delta = resizePanel({
583
+ panelConstraints: panelConstraintsArray,
584
+ panelIndex: index,
585
+ size: 100
586
+ }) - prevSize;
587
+ maxAvailableDelta += delta;
588
+ index += increment;
589
+ if (index < 0 || index >= panelConstraintsArray.length) break;
590
+ }
591
+ const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));
592
+ delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta;
593
+ }
594
+ {
595
+ let index = delta < 0 ? firstPivotIndex : secondPivotIndex;
596
+ while (index >= 0 && index < panelConstraintsArray.length) {
597
+ const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);
598
+ const prevSize = initialLayout[index];
599
+ assert(prevSize != null, `Previous layout not found for panel index ${index}`);
600
+ const unsafeSize = prevSize - deltaRemaining;
601
+ const safeSize = resizePanel({
602
+ panelConstraints: panelConstraintsArray,
603
+ panelIndex: index,
604
+ size: unsafeSize
605
+ });
606
+ if (!fuzzyNumbersEqual(prevSize, safeSize)) {
607
+ deltaApplied += prevSize - safeSize;
608
+ nextLayout[index] = safeSize;
609
+ if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, { numeric: true }) >= 0) break;
610
+ }
611
+ if (delta < 0) index--;
612
+ else index++;
613
+ }
614
+ }
615
+ if (fuzzyLayoutsEqual(prevLayout, nextLayout)) return prevLayout;
616
+ {
617
+ const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;
618
+ const prevSize = initialLayout[pivotIndex];
619
+ assert(prevSize != null, `Previous layout not found for panel index ${pivotIndex}`);
620
+ const unsafeSize = prevSize + deltaApplied;
621
+ const safeSize = resizePanel({
622
+ panelConstraints: panelConstraintsArray,
623
+ panelIndex: pivotIndex,
624
+ size: unsafeSize
625
+ });
626
+ nextLayout[pivotIndex] = safeSize;
627
+ if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {
628
+ let deltaRemaining = unsafeSize - safeSize;
629
+ let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
630
+ while (index >= 0 && index < panelConstraintsArray.length) {
631
+ const prevSize = nextLayout[index];
632
+ assert(prevSize != null, `Previous layout not found for panel index ${index}`);
633
+ const unsafeSize = prevSize + deltaRemaining;
634
+ const safeSize = resizePanel({
635
+ panelConstraints: panelConstraintsArray,
636
+ panelIndex: index,
637
+ size: unsafeSize
638
+ });
639
+ if (!fuzzyNumbersEqual(prevSize, safeSize)) {
640
+ deltaRemaining -= safeSize - prevSize;
641
+ nextLayout[index] = safeSize;
642
+ }
643
+ if (fuzzyNumbersEqual(deltaRemaining, 0)) break;
644
+ if (delta > 0) index--;
645
+ else index++;
646
+ }
647
+ }
648
+ }
649
+ if (!fuzzyNumbersEqual(nextLayout.reduce((total, size) => size + total, 0), 100)) return prevLayout;
650
+ return nextLayout;
651
+ }
652
+ function calculateAriaValues({ layout, panelsArray, pivotIndices }) {
653
+ let currentMinSize = 0;
654
+ let currentMaxSize = 100;
655
+ let totalMinSize = 0;
656
+ let totalMaxSize = 0;
657
+ const firstIndex = pivotIndices[0];
658
+ assert(firstIndex != null, "No pivot index found");
659
+ panelsArray.forEach((panelData, index) => {
660
+ const { constraints } = panelData;
661
+ const { maxSize = 100, minSize = 0 } = constraints;
662
+ if (index === firstIndex) {
663
+ currentMinSize = minSize;
664
+ currentMaxSize = maxSize;
665
+ } else {
666
+ totalMinSize += minSize;
667
+ totalMaxSize += maxSize;
668
+ }
669
+ });
670
+ return {
671
+ valueMax: Math.min(currentMaxSize, 100 - totalMinSize),
672
+ valueMin: Math.max(currentMinSize, 100 - totalMaxSize),
673
+ valueNow: layout[firstIndex]
674
+ };
675
+ }
676
+ function getResizeHandleElementsForGroup(groupId, scope = document) {
677
+ return Array.from(scope.querySelectorAll(`[${DATA_ATTRIBUTES.resizeHandleId}][data-panel-group-id="${groupId}"]`));
678
+ }
679
+ function getResizeHandleElementIndex(groupId, id, scope = document) {
680
+ const index = getResizeHandleElementsForGroup(groupId, scope).findIndex((handle) => handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId) === id);
681
+ return index !== null && index !== void 0 ? index : null;
682
+ }
683
+ function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
684
+ const index = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
685
+ return index != null ? [index, index + 1] : [-1, -1];
686
+ }
687
+ function getPanelGroupElement(id, rootElement = document) {
688
+ var _dataset;
689
+ if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) return rootElement;
690
+ const element = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
691
+ if (element) return element;
692
+ return null;
693
+ }
694
+ function getResizeHandleElement(id, scope = document) {
695
+ const element = scope.querySelector(`[${DATA_ATTRIBUTES.resizeHandleId}="${id}"]`);
696
+ if (element) return element;
697
+ return null;
698
+ }
699
+ function getResizeHandlePanelIds(groupId, handleId, panelsArray, scope = document) {
700
+ var _panelsArray$index$id, _panelsArray$index, _panelsArray$id, _panelsArray;
701
+ const handle = getResizeHandleElement(handleId, scope);
702
+ const handles = getResizeHandleElementsForGroup(groupId, scope);
703
+ const index = handle ? handles.indexOf(handle) : -1;
704
+ return [(_panelsArray$index$id = (_panelsArray$index = panelsArray[index]) === null || _panelsArray$index === void 0 ? void 0 : _panelsArray$index.id) !== null && _panelsArray$index$id !== void 0 ? _panelsArray$index$id : null, (_panelsArray$id = (_panelsArray = panelsArray[index + 1]) === null || _panelsArray === void 0 ? void 0 : _panelsArray.id) !== null && _panelsArray$id !== void 0 ? _panelsArray$id : null];
705
+ }
706
+ function useWindowSplitterPanelGroupBehavior({ committedValuesRef, eagerValuesRef, groupId, layout, panelDataArray, panelGroupElement, setLayout }) {
707
+ (0, react.useRef)({ didWarnAboutMissingResizeHandle: false });
708
+ useIsomorphicLayoutEffect(() => {
709
+ if (!panelGroupElement) return;
710
+ const resizeHandleElements = getResizeHandleElementsForGroup(groupId, panelGroupElement);
711
+ for (let index = 0; index < panelDataArray.length - 1; index++) {
712
+ const { valueMax, valueMin, valueNow } = calculateAriaValues({
713
+ layout,
714
+ panelsArray: panelDataArray,
715
+ pivotIndices: [index, index + 1]
716
+ });
717
+ const resizeHandleElement = resizeHandleElements[index];
718
+ if (resizeHandleElement == null);
719
+ else {
720
+ const panelData = panelDataArray[index];
721
+ assert(panelData, `No panel data found for index "${index}"`);
722
+ resizeHandleElement.setAttribute("aria-controls", panelData.id);
723
+ resizeHandleElement.setAttribute("aria-valuemax", "" + Math.round(valueMax));
724
+ resizeHandleElement.setAttribute("aria-valuemin", "" + Math.round(valueMin));
725
+ resizeHandleElement.setAttribute("aria-valuenow", valueNow != null ? "" + Math.round(valueNow) : "");
726
+ }
727
+ }
728
+ return () => {
729
+ resizeHandleElements.forEach((resizeHandleElement, index) => {
730
+ resizeHandleElement.removeAttribute("aria-controls");
731
+ resizeHandleElement.removeAttribute("aria-valuemax");
732
+ resizeHandleElement.removeAttribute("aria-valuemin");
733
+ resizeHandleElement.removeAttribute("aria-valuenow");
734
+ });
735
+ };
736
+ }, [
737
+ groupId,
738
+ layout,
739
+ panelDataArray,
740
+ panelGroupElement
741
+ ]);
742
+ (0, react.useEffect)(() => {
743
+ if (!panelGroupElement) return;
744
+ const eagerValues = eagerValuesRef.current;
745
+ assert(eagerValues, `Eager values not found`);
746
+ const { panelDataArray } = eagerValues;
747
+ assert(getPanelGroupElement(groupId, panelGroupElement) != null, `No group found for id "${groupId}"`);
748
+ const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
749
+ assert(handles, `No resize handles found for group id "${groupId}"`);
750
+ const cleanupFunctions = handles.map((handle) => {
751
+ const handleId = handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId);
752
+ assert(handleId, `Resize handle element has no handle id attribute`);
753
+ const [idBefore, idAfter] = getResizeHandlePanelIds(groupId, handleId, panelDataArray, panelGroupElement);
754
+ if (idBefore == null || idAfter == null) return () => {};
755
+ const onKeyDown = (event) => {
756
+ if (event.defaultPrevented) return;
757
+ switch (event.key) {
758
+ case "Enter": {
759
+ event.preventDefault();
760
+ const index = panelDataArray.findIndex((panelData) => panelData.id === idBefore);
761
+ if (index >= 0) {
762
+ const panelData = panelDataArray[index];
763
+ assert(panelData, `No panel data found for index ${index}`);
764
+ const size = layout[index];
765
+ const { collapsedSize = 0, collapsible, minSize = 0 } = panelData.constraints;
766
+ if (size != null && collapsible) {
767
+ const nextLayout = adjustLayoutByDelta({
768
+ delta: fuzzyNumbersEqual(size, collapsedSize) ? minSize - collapsedSize : collapsedSize - size,
769
+ initialLayout: layout,
770
+ panelConstraints: panelDataArray.map((panelData) => panelData.constraints),
771
+ pivotIndices: determinePivotIndices(groupId, handleId, panelGroupElement),
772
+ prevLayout: layout,
773
+ trigger: "keyboard"
774
+ });
775
+ if (layout !== nextLayout) setLayout(nextLayout);
776
+ }
777
+ }
778
+ break;
779
+ }
780
+ }
781
+ };
782
+ handle.addEventListener("keydown", onKeyDown);
783
+ return () => {
784
+ handle.removeEventListener("keydown", onKeyDown);
785
+ };
786
+ });
787
+ return () => {
788
+ cleanupFunctions.forEach((cleanupFunction) => cleanupFunction());
789
+ };
790
+ }, [
791
+ panelGroupElement,
792
+ committedValuesRef,
793
+ eagerValuesRef,
794
+ groupId,
795
+ layout,
796
+ panelDataArray,
797
+ setLayout
798
+ ]);
799
+ }
800
+ function areEqual(arrayA, arrayB) {
801
+ if (arrayA.length !== arrayB.length) return false;
802
+ for (let index = 0; index < arrayA.length; index++) if (arrayA[index] !== arrayB[index]) return false;
803
+ return true;
804
+ }
805
+ function getResizeEventCursorPosition(direction, event) {
806
+ const isHorizontal = direction === "horizontal";
807
+ const { x, y } = getResizeEventCoordinates(event);
808
+ return isHorizontal ? x : y;
809
+ }
810
+ function calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement) {
811
+ const isHorizontal = direction === "horizontal";
812
+ const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement);
813
+ assert(handleElement, `No resize handle element found for id "${dragHandleId}"`);
814
+ const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
815
+ assert(groupId, `Resize handle element has no group id attribute`);
816
+ let { initialCursorPosition } = initialDragState;
817
+ const cursorPosition = getResizeEventCursorPosition(direction, event);
818
+ const groupElement = getPanelGroupElement(groupId, panelGroupElement);
819
+ assert(groupElement, `No group element found for id "${groupId}"`);
820
+ const groupRect = groupElement.getBoundingClientRect();
821
+ const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height;
822
+ return (cursorPosition - initialCursorPosition) / groupSizeInPixels * 100;
823
+ }
824
+ function calculateDeltaPercentage(event, dragHandleId, direction, initialDragState, keyboardResizeBy, panelGroupElement) {
825
+ if (isKeyDown(event)) {
826
+ const isHorizontal = direction === "horizontal";
827
+ let delta = 0;
828
+ if (event.shiftKey) delta = 100;
829
+ else if (keyboardResizeBy != null) delta = keyboardResizeBy;
830
+ else delta = 10;
831
+ let movement = 0;
832
+ switch (event.key) {
833
+ case "ArrowDown":
834
+ movement = isHorizontal ? 0 : delta;
835
+ break;
836
+ case "ArrowLeft":
837
+ movement = isHorizontal ? -delta : 0;
838
+ break;
839
+ case "ArrowRight":
840
+ movement = isHorizontal ? delta : 0;
841
+ break;
842
+ case "ArrowUp":
843
+ movement = isHorizontal ? 0 : -delta;
844
+ break;
845
+ case "End":
846
+ movement = 100;
847
+ break;
848
+ case "Home": movement = -100;
849
+ }
850
+ return movement;
851
+ } else {
852
+ if (initialDragState == null) return 0;
853
+ return calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement);
854
+ }
855
+ }
856
+ function calculateUnsafeDefaultLayout({ panelDataArray }) {
857
+ const layout = Array(panelDataArray.length);
858
+ const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
859
+ let numPanelsWithSizes = 0;
860
+ let remainingSize = 100;
861
+ for (let index = 0; index < panelDataArray.length; index++) {
862
+ const panelConstraints = panelConstraintsArray[index];
863
+ assert(panelConstraints, `Panel constraints not found for index ${index}`);
864
+ const { defaultSize } = panelConstraints;
865
+ if (defaultSize != null) {
866
+ numPanelsWithSizes++;
867
+ layout[index] = defaultSize;
868
+ remainingSize -= defaultSize;
869
+ }
870
+ }
871
+ for (let index = 0; index < panelDataArray.length; index++) {
872
+ const panelConstraints = panelConstraintsArray[index];
873
+ assert(panelConstraints, `Panel constraints not found for index ${index}`);
874
+ const { defaultSize } = panelConstraints;
875
+ if (defaultSize != null) continue;
876
+ const numRemainingPanels = panelDataArray.length - numPanelsWithSizes;
877
+ const size = remainingSize / numRemainingPanels;
878
+ numPanelsWithSizes++;
879
+ layout[index] = size;
880
+ remainingSize -= size;
881
+ }
882
+ return layout;
883
+ }
884
+ function callPanelCallbacks(panelsArray, layout, panelIdToLastNotifiedSizeMap) {
885
+ layout.forEach((size, index) => {
886
+ const panelData = panelsArray[index];
887
+ assert(panelData, `Panel data not found for index ${index}`);
888
+ const { callbacks, constraints, id: panelId } = panelData;
889
+ const { collapsedSize = 0, collapsible } = constraints;
890
+ const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId];
891
+ if (lastNotifiedSize == null || size !== lastNotifiedSize) {
892
+ panelIdToLastNotifiedSizeMap[panelId] = size;
893
+ const { onCollapse, onExpand, onResize } = callbacks;
894
+ if (onResize) onResize(size, lastNotifiedSize);
895
+ if (collapsible && (onCollapse || onExpand)) {
896
+ if (onExpand && (lastNotifiedSize == null || fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && !fuzzyNumbersEqual$1(size, collapsedSize)) onExpand();
897
+ if (onCollapse && (lastNotifiedSize == null || !fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && fuzzyNumbersEqual$1(size, collapsedSize)) onCollapse();
898
+ }
899
+ }
900
+ });
901
+ }
902
+ function compareLayouts(a, b) {
903
+ if (a.length !== b.length) return false;
904
+ else for (let index = 0; index < a.length; index++) if (a[index] != b[index]) return false;
905
+ return true;
906
+ }
907
+ function computePanelFlexBoxStyle({ defaultSize, dragState, layout, panelData, panelIndex, precision = 3 }) {
908
+ const size = layout[panelIndex];
909
+ let flexGrow;
910
+ if (size == null) flexGrow = defaultSize != void 0 ? defaultSize.toPrecision(precision) : "1";
911
+ else if (panelData.length === 1) flexGrow = "1";
912
+ else flexGrow = size.toPrecision(precision);
913
+ return {
914
+ flexBasis: 0,
915
+ flexGrow,
916
+ flexShrink: 1,
917
+ overflow: "hidden",
918
+ pointerEvents: dragState !== null ? "none" : void 0
919
+ };
920
+ }
921
+ function debounce(callback, durationMs = 10) {
922
+ let timeoutId = null;
923
+ let callable = (...args) => {
924
+ if (timeoutId !== null) clearTimeout(timeoutId);
925
+ timeoutId = setTimeout(() => {
926
+ callback(...args);
927
+ }, durationMs);
928
+ };
929
+ return callable;
930
+ }
931
+ function initializeDefaultStorage(storageObject) {
932
+ try {
933
+ if (typeof localStorage !== "undefined") {
934
+ storageObject.getItem = (name) => {
935
+ return localStorage.getItem(name);
936
+ };
937
+ storageObject.setItem = (name, value) => {
938
+ localStorage.setItem(name, value);
939
+ };
940
+ } else throw new Error("localStorage not supported in this environment");
941
+ } catch (error) {
942
+ console.error(error);
943
+ storageObject.getItem = () => null;
944
+ storageObject.setItem = () => {};
945
+ }
946
+ }
947
+ function getPanelGroupKey(autoSaveId) {
948
+ return `react-resizable-panels:${autoSaveId}`;
949
+ }
950
+ function getPanelKey(panels) {
951
+ return panels.map((panel) => {
952
+ const { constraints, id, idIsFromProps, order } = panel;
953
+ if (idIsFromProps) return id;
954
+ else return order ? `${order}:${JSON.stringify(constraints)}` : JSON.stringify(constraints);
955
+ }).sort((a, b) => a.localeCompare(b)).join(",");
956
+ }
957
+ function loadSerializedPanelGroupState(autoSaveId, storage) {
958
+ try {
959
+ const panelGroupKey = getPanelGroupKey(autoSaveId);
960
+ const serialized = storage.getItem(panelGroupKey);
961
+ if (serialized) {
962
+ const parsed = JSON.parse(serialized);
963
+ if (typeof parsed === "object" && parsed != null) return parsed;
964
+ }
965
+ } catch (error) {}
966
+ return null;
967
+ }
968
+ function loadPanelGroupState(autoSaveId, panels, storage) {
969
+ var _loadSerializedPanelG, _state$panelKey;
970
+ return (_state$panelKey = ((_loadSerializedPanelG = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG !== void 0 ? _loadSerializedPanelG : {})[getPanelKey(panels)]) !== null && _state$panelKey !== void 0 ? _state$panelKey : null;
971
+ }
972
+ function savePanelGroupState(autoSaveId, panels, panelSizesBeforeCollapse, sizes, storage) {
973
+ var _loadSerializedPanelG2;
974
+ const panelGroupKey = getPanelGroupKey(autoSaveId);
975
+ const panelKey = getPanelKey(panels);
976
+ const state = (_loadSerializedPanelG2 = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG2 !== void 0 ? _loadSerializedPanelG2 : {};
977
+ state[panelKey] = {
978
+ expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),
979
+ layout: sizes
980
+ };
981
+ try {
982
+ storage.setItem(panelGroupKey, JSON.stringify(state));
983
+ } catch (error) {
984
+ console.error(error);
985
+ }
986
+ }
987
+ function validatePanelGroupLayout({ layout: prevLayout, panelConstraints }) {
988
+ const nextLayout = [...prevLayout];
989
+ const nextLayoutTotalSize = nextLayout.reduce((accumulated, current) => accumulated + current, 0);
990
+ if (nextLayout.length !== panelConstraints.length) throw Error(`Invalid ${panelConstraints.length} panel layout: ${nextLayout.map((size) => `${size}%`).join(", ")}`);
991
+ else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100) && nextLayout.length > 0) for (let index = 0; index < panelConstraints.length; index++) {
992
+ const unsafeSize = nextLayout[index];
993
+ assert(unsafeSize != null, `No layout data found for index ${index}`);
994
+ const safeSize = 100 / nextLayoutTotalSize * unsafeSize;
995
+ nextLayout[index] = safeSize;
996
+ }
997
+ let remainingSize = 0;
998
+ for (let index = 0; index < panelConstraints.length; index++) {
999
+ const unsafeSize = nextLayout[index];
1000
+ assert(unsafeSize != null, `No layout data found for index ${index}`);
1001
+ const safeSize = resizePanel({
1002
+ panelConstraints,
1003
+ panelIndex: index,
1004
+ size: unsafeSize
1005
+ });
1006
+ if (unsafeSize != safeSize) {
1007
+ remainingSize += unsafeSize - safeSize;
1008
+ nextLayout[index] = safeSize;
1009
+ }
1010
+ }
1011
+ if (!fuzzyNumbersEqual(remainingSize, 0)) for (let index = 0; index < panelConstraints.length; index++) {
1012
+ const prevSize = nextLayout[index];
1013
+ assert(prevSize != null, `No layout data found for index ${index}`);
1014
+ const unsafeSize = prevSize + remainingSize;
1015
+ const safeSize = resizePanel({
1016
+ panelConstraints,
1017
+ panelIndex: index,
1018
+ size: unsafeSize
1019
+ });
1020
+ if (prevSize !== safeSize) {
1021
+ remainingSize -= safeSize - prevSize;
1022
+ nextLayout[index] = safeSize;
1023
+ if (fuzzyNumbersEqual(remainingSize, 0)) break;
1024
+ }
1025
+ }
1026
+ return nextLayout;
1027
+ }
1028
+ var LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100;
1029
+ var defaultStorage = {
1030
+ getItem: (name) => {
1031
+ initializeDefaultStorage(defaultStorage);
1032
+ return defaultStorage.getItem(name);
1033
+ },
1034
+ setItem: (name, value) => {
1035
+ initializeDefaultStorage(defaultStorage);
1036
+ defaultStorage.setItem(name, value);
1037
+ }
1038
+ };
1039
+ var debounceMap = {};
1040
+ function PanelGroupWithForwardedRef({ autoSaveId = null, children, className: classNameFromProps = "", direction, forwardedRef, id: idFromProps = null, onLayout = null, keyboardResizeBy = null, storage = defaultStorage, style: styleFromProps, tagName: Type = "div", ...rest }) {
1041
+ const groupId = useUniqueId(idFromProps);
1042
+ const panelGroupElementRef = (0, react.useRef)(null);
1043
+ const [dragState, setDragState] = (0, react.useState)(null);
1044
+ const [layout, setLayout] = (0, react.useState)([]);
1045
+ const forceUpdate = useForceUpdate();
1046
+ const panelIdToLastNotifiedSizeMapRef = (0, react.useRef)({});
1047
+ const panelSizeBeforeCollapseRef = (0, react.useRef)(/* @__PURE__ */ new Map());
1048
+ const prevDeltaRef = (0, react.useRef)(0);
1049
+ const committedValuesRef = (0, react.useRef)({
1050
+ autoSaveId,
1051
+ direction,
1052
+ dragState,
1053
+ id: groupId,
1054
+ keyboardResizeBy,
1055
+ onLayout,
1056
+ storage
1057
+ });
1058
+ const eagerValuesRef = (0, react.useRef)({
1059
+ layout,
1060
+ panelDataArray: [],
1061
+ panelDataArrayChanged: false
1062
+ });
1063
+ (0, react.useRef)({
1064
+ didLogIdAndOrderWarning: false,
1065
+ didLogPanelConstraintsWarning: false,
1066
+ prevPanelIds: []
1067
+ });
1068
+ (0, react.useImperativeHandle)(forwardedRef, () => ({
1069
+ getId: () => committedValuesRef.current.id,
1070
+ getLayout: () => {
1071
+ const { layout } = eagerValuesRef.current;
1072
+ return layout;
1073
+ },
1074
+ setLayout: (unsafeLayout) => {
1075
+ const { onLayout } = committedValuesRef.current;
1076
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1077
+ const safeLayout = validatePanelGroupLayout({
1078
+ layout: unsafeLayout,
1079
+ panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
1080
+ });
1081
+ if (!areEqual(prevLayout, safeLayout)) {
1082
+ setLayout(safeLayout);
1083
+ eagerValuesRef.current.layout = safeLayout;
1084
+ if (onLayout) onLayout(safeLayout);
1085
+ callPanelCallbacks(panelDataArray, safeLayout, panelIdToLastNotifiedSizeMapRef.current);
1086
+ }
1087
+ }
1088
+ }), []);
1089
+ useIsomorphicLayoutEffect(() => {
1090
+ committedValuesRef.current.autoSaveId = autoSaveId;
1091
+ committedValuesRef.current.direction = direction;
1092
+ committedValuesRef.current.dragState = dragState;
1093
+ committedValuesRef.current.id = groupId;
1094
+ committedValuesRef.current.onLayout = onLayout;
1095
+ committedValuesRef.current.storage = storage;
1096
+ });
1097
+ useWindowSplitterPanelGroupBehavior({
1098
+ committedValuesRef,
1099
+ eagerValuesRef,
1100
+ groupId,
1101
+ layout,
1102
+ panelDataArray: eagerValuesRef.current.panelDataArray,
1103
+ setLayout,
1104
+ panelGroupElement: panelGroupElementRef.current
1105
+ });
1106
+ (0, react.useEffect)(() => {
1107
+ const { panelDataArray } = eagerValuesRef.current;
1108
+ if (autoSaveId) {
1109
+ if (layout.length === 0 || layout.length !== panelDataArray.length) return;
1110
+ let debouncedSave = debounceMap[autoSaveId];
1111
+ if (debouncedSave == null) {
1112
+ debouncedSave = debounce(savePanelGroupState, LOCAL_STORAGE_DEBOUNCE_INTERVAL);
1113
+ debounceMap[autoSaveId] = debouncedSave;
1114
+ }
1115
+ const clonedPanelDataArray = [...panelDataArray];
1116
+ const clonedPanelSizesBeforeCollapse = new Map(panelSizeBeforeCollapseRef.current);
1117
+ debouncedSave(autoSaveId, clonedPanelDataArray, clonedPanelSizesBeforeCollapse, layout, storage);
1118
+ }
1119
+ }, [
1120
+ autoSaveId,
1121
+ layout,
1122
+ storage
1123
+ ]);
1124
+ (0, react.useEffect)(() => {});
1125
+ const collapsePanel = (0, react.useCallback)((panelData) => {
1126
+ const { onLayout } = committedValuesRef.current;
1127
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1128
+ if (panelData.constraints.collapsible) {
1129
+ const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1130
+ const { collapsedSize = 0, panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1131
+ assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1132
+ if (!fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
1133
+ panelSizeBeforeCollapseRef.current.set(panelData.id, panelSize);
1134
+ const nextLayout = adjustLayoutByDelta({
1135
+ delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - collapsedSize : collapsedSize - panelSize,
1136
+ initialLayout: prevLayout,
1137
+ panelConstraints: panelConstraintsArray,
1138
+ pivotIndices,
1139
+ prevLayout,
1140
+ trigger: "imperative-api"
1141
+ });
1142
+ if (!compareLayouts(prevLayout, nextLayout)) {
1143
+ setLayout(nextLayout);
1144
+ eagerValuesRef.current.layout = nextLayout;
1145
+ if (onLayout) onLayout(nextLayout);
1146
+ callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1147
+ }
1148
+ }
1149
+ }
1150
+ }, []);
1151
+ const expandPanel = (0, react.useCallback)((panelData, minSizeOverride) => {
1152
+ const { onLayout } = committedValuesRef.current;
1153
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1154
+ if (panelData.constraints.collapsible) {
1155
+ const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1156
+ const { collapsedSize = 0, panelSize = 0, minSize: minSizeFromProps = 0, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1157
+ const minSize = minSizeOverride !== null && minSizeOverride !== void 0 ? minSizeOverride : minSizeFromProps;
1158
+ if (fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
1159
+ const prevPanelSize = panelSizeBeforeCollapseRef.current.get(panelData.id);
1160
+ const baseSize = prevPanelSize != null && prevPanelSize >= minSize ? prevPanelSize : minSize;
1161
+ const nextLayout = adjustLayoutByDelta({
1162
+ delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - baseSize : baseSize - panelSize,
1163
+ initialLayout: prevLayout,
1164
+ panelConstraints: panelConstraintsArray,
1165
+ pivotIndices,
1166
+ prevLayout,
1167
+ trigger: "imperative-api"
1168
+ });
1169
+ if (!compareLayouts(prevLayout, nextLayout)) {
1170
+ setLayout(nextLayout);
1171
+ eagerValuesRef.current.layout = nextLayout;
1172
+ if (onLayout) onLayout(nextLayout);
1173
+ callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1174
+ }
1175
+ }
1176
+ }
1177
+ }, []);
1178
+ const getPanelSize = (0, react.useCallback)((panelData) => {
1179
+ const { layout, panelDataArray } = eagerValuesRef.current;
1180
+ const { panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1181
+ assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1182
+ return panelSize;
1183
+ }, []);
1184
+ const getPanelStyle = (0, react.useCallback)((panelData, defaultSize) => {
1185
+ const { panelDataArray } = eagerValuesRef.current;
1186
+ const panelIndex = findPanelDataIndex(panelDataArray, panelData);
1187
+ return computePanelFlexBoxStyle({
1188
+ defaultSize,
1189
+ dragState,
1190
+ layout,
1191
+ panelData: panelDataArray,
1192
+ panelIndex
1193
+ });
1194
+ }, [dragState, layout]);
1195
+ const isPanelCollapsed = (0, react.useCallback)((panelData) => {
1196
+ const { layout, panelDataArray } = eagerValuesRef.current;
1197
+ const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1198
+ assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1199
+ return collapsible === true && fuzzyNumbersEqual$1(panelSize, collapsedSize);
1200
+ }, []);
1201
+ const isPanelExpanded = (0, react.useCallback)((panelData) => {
1202
+ const { layout, panelDataArray } = eagerValuesRef.current;
1203
+ const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1204
+ assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1205
+ return !collapsible || fuzzyCompareNumbers(panelSize, collapsedSize) > 0;
1206
+ }, []);
1207
+ const registerPanel = (0, react.useCallback)((panelData) => {
1208
+ const { panelDataArray } = eagerValuesRef.current;
1209
+ panelDataArray.push(panelData);
1210
+ panelDataArray.sort((panelA, panelB) => {
1211
+ const orderA = panelA.order;
1212
+ const orderB = panelB.order;
1213
+ if (orderA == null && orderB == null) return 0;
1214
+ else if (orderA == null) return -1;
1215
+ else if (orderB == null) return 1;
1216
+ else return orderA - orderB;
1217
+ });
1218
+ eagerValuesRef.current.panelDataArrayChanged = true;
1219
+ forceUpdate();
1220
+ }, [forceUpdate]);
1221
+ useIsomorphicLayoutEffect(() => {
1222
+ if (eagerValuesRef.current.panelDataArrayChanged) {
1223
+ eagerValuesRef.current.panelDataArrayChanged = false;
1224
+ const { autoSaveId, onLayout, storage } = committedValuesRef.current;
1225
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1226
+ let unsafeLayout = null;
1227
+ if (autoSaveId) {
1228
+ const state = loadPanelGroupState(autoSaveId, panelDataArray, storage);
1229
+ if (state) {
1230
+ panelSizeBeforeCollapseRef.current = new Map(Object.entries(state.expandToSizes));
1231
+ unsafeLayout = state.layout;
1232
+ }
1233
+ }
1234
+ if (unsafeLayout == null) unsafeLayout = calculateUnsafeDefaultLayout({ panelDataArray });
1235
+ const nextLayout = validatePanelGroupLayout({
1236
+ layout: unsafeLayout,
1237
+ panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
1238
+ });
1239
+ if (!areEqual(prevLayout, nextLayout)) {
1240
+ setLayout(nextLayout);
1241
+ eagerValuesRef.current.layout = nextLayout;
1242
+ if (onLayout) onLayout(nextLayout);
1243
+ callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1244
+ }
1245
+ }
1246
+ });
1247
+ useIsomorphicLayoutEffect(() => {
1248
+ const eagerValues = eagerValuesRef.current;
1249
+ return () => {
1250
+ eagerValues.layout = [];
1251
+ };
1252
+ }, []);
1253
+ const registerResizeHandle = (0, react.useCallback)((dragHandleId) => {
1254
+ let isRTL = false;
1255
+ const panelGroupElement = panelGroupElementRef.current;
1256
+ if (panelGroupElement) {
1257
+ if (window.getComputedStyle(panelGroupElement, null).getPropertyValue("direction") === "rtl") isRTL = true;
1258
+ }
1259
+ return function resizeHandler(event) {
1260
+ event.preventDefault();
1261
+ const panelGroupElement = panelGroupElementRef.current;
1262
+ if (!panelGroupElement) return () => null;
1263
+ const { direction, dragState, id: groupId, keyboardResizeBy, onLayout } = committedValuesRef.current;
1264
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1265
+ const { initialLayout } = dragState !== null && dragState !== void 0 ? dragState : {};
1266
+ const pivotIndices = determinePivotIndices(groupId, dragHandleId, panelGroupElement);
1267
+ let delta = calculateDeltaPercentage(event, dragHandleId, direction, dragState, keyboardResizeBy, panelGroupElement);
1268
+ const isHorizontal = direction === "horizontal";
1269
+ if (isHorizontal && isRTL) delta = -delta;
1270
+ const panelConstraints = panelDataArray.map((panelData) => panelData.constraints);
1271
+ const nextLayout = adjustLayoutByDelta({
1272
+ delta,
1273
+ initialLayout: initialLayout !== null && initialLayout !== void 0 ? initialLayout : prevLayout,
1274
+ panelConstraints,
1275
+ pivotIndices,
1276
+ prevLayout,
1277
+ trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
1278
+ });
1279
+ const layoutChanged = !compareLayouts(prevLayout, nextLayout);
1280
+ if (isPointerEvent(event) || isMouseEvent(event)) {
1281
+ if (prevDeltaRef.current != delta) {
1282
+ prevDeltaRef.current = delta;
1283
+ if (!layoutChanged && delta !== 0) {
1284
+ if (isHorizontal) reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX);
1285
+ else reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX);
1286
+ } else reportConstraintsViolation(dragHandleId, 0);
1287
+ }
1288
+ }
1289
+ if (layoutChanged) {
1290
+ setLayout(nextLayout);
1291
+ eagerValuesRef.current.layout = nextLayout;
1292
+ if (onLayout) onLayout(nextLayout);
1293
+ callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1294
+ }
1295
+ };
1296
+ }, []);
1297
+ const resizePanel = (0, react.useCallback)((panelData, unsafePanelSize) => {
1298
+ const { onLayout } = committedValuesRef.current;
1299
+ const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1300
+ const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1301
+ const { panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1302
+ assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1303
+ const nextLayout = adjustLayoutByDelta({
1304
+ delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - unsafePanelSize : unsafePanelSize - panelSize,
1305
+ initialLayout: prevLayout,
1306
+ panelConstraints: panelConstraintsArray,
1307
+ pivotIndices,
1308
+ prevLayout,
1309
+ trigger: "imperative-api"
1310
+ });
1311
+ if (!compareLayouts(prevLayout, nextLayout)) {
1312
+ setLayout(nextLayout);
1313
+ eagerValuesRef.current.layout = nextLayout;
1314
+ if (onLayout) onLayout(nextLayout);
1315
+ callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1316
+ }
1317
+ }, []);
1318
+ const reevaluatePanelConstraints = (0, react.useCallback)((panelData, prevConstraints) => {
1319
+ const { layout, panelDataArray } = eagerValuesRef.current;
1320
+ const { collapsedSize: prevCollapsedSize = 0, collapsible: prevCollapsible } = prevConstraints;
1321
+ const { collapsedSize: nextCollapsedSize = 0, collapsible: nextCollapsible, maxSize: nextMaxSize = 100, minSize: nextMinSize = 0 } = panelData.constraints;
1322
+ const { panelSize: prevPanelSize } = panelDataHelper(panelDataArray, panelData, layout);
1323
+ if (prevPanelSize == null) return;
1324
+ if (prevCollapsible && nextCollapsible && fuzzyNumbersEqual$1(prevPanelSize, prevCollapsedSize)) {
1325
+ if (!fuzzyNumbersEqual$1(prevCollapsedSize, nextCollapsedSize)) resizePanel(panelData, nextCollapsedSize);
1326
+ } else if (prevPanelSize < nextMinSize) resizePanel(panelData, nextMinSize);
1327
+ else if (prevPanelSize > nextMaxSize) resizePanel(panelData, nextMaxSize);
1328
+ }, [resizePanel]);
1329
+ const startDragging = (0, react.useCallback)((dragHandleId, event) => {
1330
+ const { direction } = committedValuesRef.current;
1331
+ const { layout } = eagerValuesRef.current;
1332
+ if (!panelGroupElementRef.current) return;
1333
+ const handleElement = getResizeHandleElement(dragHandleId, panelGroupElementRef.current);
1334
+ assert(handleElement, `Drag handle element not found for id "${dragHandleId}"`);
1335
+ const initialCursorPosition = getResizeEventCursorPosition(direction, event);
1336
+ setDragState({
1337
+ dragHandleId,
1338
+ dragHandleRect: handleElement.getBoundingClientRect(),
1339
+ initialCursorPosition,
1340
+ initialLayout: layout
1341
+ });
1342
+ }, []);
1343
+ const stopDragging = (0, react.useCallback)(() => {
1344
+ setDragState(null);
1345
+ }, []);
1346
+ const unregisterPanel = (0, react.useCallback)((panelData) => {
1347
+ const { panelDataArray } = eagerValuesRef.current;
1348
+ const index = findPanelDataIndex(panelDataArray, panelData);
1349
+ if (index >= 0) {
1350
+ panelDataArray.splice(index, 1);
1351
+ delete panelIdToLastNotifiedSizeMapRef.current[panelData.id];
1352
+ eagerValuesRef.current.panelDataArrayChanged = true;
1353
+ forceUpdate();
1354
+ }
1355
+ }, [forceUpdate]);
1356
+ const context = (0, react.useMemo)(() => ({
1357
+ collapsePanel,
1358
+ direction,
1359
+ dragState,
1360
+ expandPanel,
1361
+ getPanelSize,
1362
+ getPanelStyle,
1363
+ groupId,
1364
+ isPanelCollapsed,
1365
+ isPanelExpanded,
1366
+ reevaluatePanelConstraints,
1367
+ registerPanel,
1368
+ registerResizeHandle,
1369
+ resizePanel,
1370
+ startDragging,
1371
+ stopDragging,
1372
+ unregisterPanel,
1373
+ panelGroupElement: panelGroupElementRef.current
1374
+ }), [
1375
+ collapsePanel,
1376
+ dragState,
1377
+ direction,
1378
+ expandPanel,
1379
+ getPanelSize,
1380
+ getPanelStyle,
1381
+ groupId,
1382
+ isPanelCollapsed,
1383
+ isPanelExpanded,
1384
+ reevaluatePanelConstraints,
1385
+ registerPanel,
1386
+ registerResizeHandle,
1387
+ resizePanel,
1388
+ startDragging,
1389
+ stopDragging,
1390
+ unregisterPanel
1391
+ ]);
1392
+ const style = {
1393
+ display: "flex",
1394
+ flexDirection: direction === "horizontal" ? "row" : "column",
1395
+ height: "100%",
1396
+ overflow: "hidden",
1397
+ width: "100%"
1398
+ };
1399
+ return (0, react.createElement)(PanelGroupContext.Provider, { value: context }, (0, react.createElement)(Type, {
1400
+ ...rest,
1401
+ children,
1402
+ className: classNameFromProps,
1403
+ id: idFromProps,
1404
+ ref: panelGroupElementRef,
1405
+ style: {
1406
+ ...style,
1407
+ ...styleFromProps
1408
+ },
1409
+ [DATA_ATTRIBUTES.group]: "",
1410
+ [DATA_ATTRIBUTES.groupDirection]: direction,
1411
+ [DATA_ATTRIBUTES.groupId]: groupId
1412
+ }));
1413
+ }
1414
+ var PanelGroup = (0, react.forwardRef)((props, ref) => (0, react.createElement)(PanelGroupWithForwardedRef, {
1415
+ ...props,
1416
+ forwardedRef: ref
1417
+ }));
1418
+ PanelGroupWithForwardedRef.displayName = "PanelGroup";
1419
+ PanelGroup.displayName = "forwardRef(PanelGroup)";
1420
+ function findPanelDataIndex(panelDataArray, panelData) {
1421
+ return panelDataArray.findIndex((prevPanelData) => prevPanelData === panelData || prevPanelData.id === panelData.id);
1422
+ }
1423
+ function panelDataHelper(panelDataArray, panelData, layout) {
1424
+ const panelIndex = findPanelDataIndex(panelDataArray, panelData);
1425
+ const pivotIndices = panelIndex === panelDataArray.length - 1 ? [panelIndex - 1, panelIndex] : [panelIndex, panelIndex + 1];
1426
+ const panelSize = layout[panelIndex];
1427
+ return {
1428
+ ...panelData.constraints,
1429
+ panelSize,
1430
+ pivotIndices
1431
+ };
1432
+ }
1433
+ function useWindowSplitterResizeHandlerBehavior({ disabled, handleId, resizeHandler, panelGroupElement }) {
1434
+ (0, react.useEffect)(() => {
1435
+ if (disabled || resizeHandler == null || panelGroupElement == null) return;
1436
+ const handleElement = getResizeHandleElement(handleId, panelGroupElement);
1437
+ if (handleElement == null) return;
1438
+ const onKeyDown = (event) => {
1439
+ if (event.defaultPrevented) return;
1440
+ switch (event.key) {
1441
+ case "ArrowDown":
1442
+ case "ArrowLeft":
1443
+ case "ArrowRight":
1444
+ case "ArrowUp":
1445
+ case "End":
1446
+ case "Home":
1447
+ event.preventDefault();
1448
+ resizeHandler(event);
1449
+ break;
1450
+ case "F6": {
1451
+ event.preventDefault();
1452
+ const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
1453
+ assert(groupId, `No group element found for id "${groupId}"`);
1454
+ const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
1455
+ const index = getResizeHandleElementIndex(groupId, handleId, panelGroupElement);
1456
+ assert(index !== null, `No resize element found for id "${handleId}"`);
1457
+ handles[event.shiftKey ? index > 0 ? index - 1 : handles.length - 1 : index + 1 < handles.length ? index + 1 : 0].focus();
1458
+ break;
1459
+ }
1460
+ }
1461
+ };
1462
+ handleElement.addEventListener("keydown", onKeyDown);
1463
+ return () => {
1464
+ handleElement.removeEventListener("keydown", onKeyDown);
1465
+ };
1466
+ }, [
1467
+ panelGroupElement,
1468
+ disabled,
1469
+ handleId,
1470
+ resizeHandler
1471
+ ]);
1472
+ }
1473
+ function PanelResizeHandle({ children = null, className: classNameFromProps = "", disabled = false, hitAreaMargins, id: idFromProps, onBlur, onClick, onDragging, onFocus, onPointerDown, onPointerUp, style: styleFromProps = {}, tabIndex = 0, tagName: Type = "div", ...rest }) {
1474
+ var _hitAreaMargins$coars, _hitAreaMargins$fine;
1475
+ const elementRef = (0, react.useRef)(null);
1476
+ const callbacksRef = (0, react.useRef)({
1477
+ onClick,
1478
+ onDragging,
1479
+ onPointerDown,
1480
+ onPointerUp
1481
+ });
1482
+ (0, react.useEffect)(() => {
1483
+ callbacksRef.current.onClick = onClick;
1484
+ callbacksRef.current.onDragging = onDragging;
1485
+ callbacksRef.current.onPointerDown = onPointerDown;
1486
+ callbacksRef.current.onPointerUp = onPointerUp;
1487
+ });
1488
+ const panelGroupContext = (0, react.useContext)(PanelGroupContext);
1489
+ if (panelGroupContext === null) throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);
1490
+ const { direction, groupId, registerResizeHandle: registerResizeHandleWithParentGroup, startDragging, stopDragging, panelGroupElement } = panelGroupContext;
1491
+ const resizeHandleId = useUniqueId(idFromProps);
1492
+ const [state, setState] = (0, react.useState)("inactive");
1493
+ const [isFocused, setIsFocused] = (0, react.useState)(false);
1494
+ const [resizeHandler, setResizeHandler] = (0, react.useState)(null);
1495
+ const committedValuesRef = (0, react.useRef)({ state });
1496
+ useIsomorphicLayoutEffect(() => {
1497
+ committedValuesRef.current.state = state;
1498
+ });
1499
+ (0, react.useEffect)(() => {
1500
+ if (disabled) setResizeHandler(null);
1501
+ else {
1502
+ const resizeHandler = registerResizeHandleWithParentGroup(resizeHandleId);
1503
+ setResizeHandler(() => resizeHandler);
1504
+ }
1505
+ }, [
1506
+ disabled,
1507
+ resizeHandleId,
1508
+ registerResizeHandleWithParentGroup
1509
+ ]);
1510
+ const coarseHitAreaMargins = (_hitAreaMargins$coars = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.coarse) !== null && _hitAreaMargins$coars !== void 0 ? _hitAreaMargins$coars : 15;
1511
+ const fineHitAreaMargins = (_hitAreaMargins$fine = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.fine) !== null && _hitAreaMargins$fine !== void 0 ? _hitAreaMargins$fine : 5;
1512
+ (0, react.useEffect)(() => {
1513
+ if (disabled || resizeHandler == null) return;
1514
+ const element = elementRef.current;
1515
+ assert(element, "Element ref not attached");
1516
+ let didMove = false;
1517
+ const setResizeHandlerState = (action, isActive, event) => {
1518
+ if (!isActive) {
1519
+ setState("inactive");
1520
+ return;
1521
+ }
1522
+ switch (action) {
1523
+ case "down": {
1524
+ setState("drag");
1525
+ didMove = false;
1526
+ assert(event, "Expected event to be defined for \"down\" action");
1527
+ startDragging(resizeHandleId, event);
1528
+ const { onDragging, onPointerDown } = callbacksRef.current;
1529
+ onDragging === null || onDragging === void 0 || onDragging(true);
1530
+ onPointerDown === null || onPointerDown === void 0 || onPointerDown();
1531
+ break;
1532
+ }
1533
+ case "move": {
1534
+ const { state } = committedValuesRef.current;
1535
+ didMove = true;
1536
+ if (state !== "drag") setState("hover");
1537
+ assert(event, "Expected event to be defined for \"move\" action");
1538
+ resizeHandler(event);
1539
+ break;
1540
+ }
1541
+ case "up": {
1542
+ setState("hover");
1543
+ stopDragging();
1544
+ const { onClick, onDragging, onPointerUp } = callbacksRef.current;
1545
+ onDragging === null || onDragging === void 0 || onDragging(false);
1546
+ onPointerUp === null || onPointerUp === void 0 || onPointerUp();
1547
+ if (!didMove) onClick === null || onClick === void 0 || onClick();
1548
+ break;
1549
+ }
1550
+ }
1551
+ };
1552
+ return registerResizeHandle(resizeHandleId, element, direction, {
1553
+ coarse: coarseHitAreaMargins,
1554
+ fine: fineHitAreaMargins
1555
+ }, setResizeHandlerState);
1556
+ }, [
1557
+ coarseHitAreaMargins,
1558
+ direction,
1559
+ disabled,
1560
+ fineHitAreaMargins,
1561
+ registerResizeHandleWithParentGroup,
1562
+ resizeHandleId,
1563
+ resizeHandler,
1564
+ startDragging,
1565
+ stopDragging
1566
+ ]);
1567
+ useWindowSplitterResizeHandlerBehavior({
1568
+ disabled,
1569
+ handleId: resizeHandleId,
1570
+ resizeHandler,
1571
+ panelGroupElement
1572
+ });
1573
+ const style = {
1574
+ touchAction: "none",
1575
+ userSelect: "none"
1576
+ };
1577
+ return (0, react.createElement)(Type, {
1578
+ ...rest,
1579
+ children,
1580
+ className: classNameFromProps,
1581
+ id: idFromProps,
1582
+ onBlur: () => {
1583
+ setIsFocused(false);
1584
+ onBlur === null || onBlur === void 0 || onBlur();
1585
+ },
1586
+ onFocus: () => {
1587
+ setIsFocused(true);
1588
+ onFocus === null || onFocus === void 0 || onFocus();
1589
+ },
1590
+ ref: elementRef,
1591
+ role: "separator",
1592
+ style: {
1593
+ ...style,
1594
+ ...styleFromProps
1595
+ },
1596
+ tabIndex,
1597
+ [DATA_ATTRIBUTES.groupDirection]: direction,
1598
+ [DATA_ATTRIBUTES.groupId]: groupId,
1599
+ [DATA_ATTRIBUTES.resizeHandle]: "",
1600
+ [DATA_ATTRIBUTES.resizeHandleActive]: state === "drag" ? "pointer" : isFocused ? "keyboard" : void 0,
1601
+ [DATA_ATTRIBUTES.resizeHandleEnabled]: !disabled,
1602
+ [DATA_ATTRIBUTES.resizeHandleId]: resizeHandleId,
1603
+ [DATA_ATTRIBUTES.resizeHandleState]: state
1604
+ });
1605
+ }
1606
+ PanelResizeHandle.displayName = "PanelResizeHandle";
1607
+ exports.DATA_ATTRIBUTES = DATA_ATTRIBUTES;
1608
+ exports.Panel = Panel;
1609
+ exports.PanelGroup = PanelGroup;
1610
+ exports.PanelResizeHandle = PanelResizeHandle;
1611
+ exports.assert = assert;
1612
+ exports.getPanelGroupElement = getPanelGroupElement;
1613
+ exports.getResizeHandleElement = getResizeHandleElement;
1614
+ exports.getResizeHandleElementIndex = getResizeHandleElementIndex;
1615
+ exports.getResizeHandleElementsForGroup = getResizeHandleElementsForGroup;
1616
+ exports.getResizeHandlePanelIds = getResizeHandlePanelIds;
1617
+ exports.intersects = intersects;