@tcn/ui 0.2.0 → 0.3.1

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 (341) hide show
  1. package/dist/Color-ASIRERSW-B4GaVKuQ.js +990 -0
  2. package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
  3. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
  4. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
  5. package/dist/actions/__docs__/components/gallery.d.ts +8 -0
  6. package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
  7. package/dist/actions/__docs__/components/gallery.js +20 -0
  8. package/dist/actions/__docs__/components/gallery.js.map +1 -0
  9. package/dist/actions/__docs__/components/showcase.d.ts +27 -0
  10. package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
  11. package/dist/actions/__docs__/components/showcase.js +15 -0
  12. package/dist/actions/__docs__/components/showcase.js.map +1 -0
  13. package/dist/actions/button/base_button/base_button.d.ts +2 -0
  14. package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
  15. package/dist/actions/button/base_button/base_button.js +18 -16
  16. package/dist/actions/button/base_button/base_button.js.map +1 -1
  17. package/dist/actions/button/button/button.js +6 -6
  18. package/dist/actions/button/button_group/button_group.js +1 -1
  19. package/dist/actions/button/select_group/select_group.js +13 -13
  20. package/dist/actions/button/select_group/single_select_group.js +6 -6
  21. package/dist/actions/button/slim_button/slim_button.js +2 -2
  22. package/dist/actions/types.d.ts +2 -0
  23. package/dist/actions/types.d.ts.map +1 -0
  24. package/dist/actions/types.js +2 -0
  25. package/dist/actions/types.js.map +1 -0
  26. package/dist/divider.module-FptFV0PX.js +5 -0
  27. package/dist/divider.module-FptFV0PX.js.map +1 -0
  28. package/dist/feedback/loading/loading.js +12 -12
  29. package/dist/feedback/loading/loading.js.map +1 -1
  30. package/dist/feedback/progress/progress_bar.js +1 -1
  31. package/dist/form/field/common/field_control/field_control.js +8 -8
  32. package/dist/form/field/common/status_input/status_input.js +6 -6
  33. package/dist/form/field/field.js +6 -6
  34. package/dist/form/field/h_field/h_field.js +11 -11
  35. package/dist/form/field/v_field/v_field.js +10 -10
  36. package/dist/form/field_set/field_set.js +3 -3
  37. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
  38. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
  39. package/dist/frame.css +1 -0
  40. package/dist/gallery.css +1 -0
  41. package/dist/inputs/checkbox/checkbox.js +11 -11
  42. package/dist/inputs/color_input/color_input.js +1 -1
  43. package/dist/inputs/color_input/color_input.js.map +1 -1
  44. package/dist/inputs/color_input/color_picker.js +6 -6
  45. package/dist/inputs/combo_box/combo_box.js +17 -17
  46. package/dist/inputs/date_picker/date_picker.js +19 -19
  47. package/dist/inputs/date_picker/date_picker_body.js +2 -2
  48. package/dist/inputs/date_picker/date_picker_input.js +20 -20
  49. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  50. package/dist/inputs/date_picker/date_picker_year_input.js +1 -1
  51. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  52. package/dist/inputs/date_picker/date_picker_year_selector.js +1 -1
  53. package/dist/inputs/input/input.js +5 -5
  54. package/dist/inputs/mask_input/key_capture_input.js +8 -8
  55. package/dist/inputs/mask_input/mask_input.js +5 -5
  56. package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
  57. package/dist/inputs/multiselect/multiselect.js +14 -14
  58. package/dist/inputs/multiselect/multiselect_row.js +8 -8
  59. package/dist/inputs/phone_number_input/phone_number_input.js +12 -12
  60. package/dist/inputs/radio/radio.js +10 -10
  61. package/dist/inputs/radio/radio_row.js +3 -3
  62. package/dist/inputs/select/select.js +15 -15
  63. package/dist/inputs/slider/slider.js +11 -11
  64. package/dist/inputs/suggestions/suggestion_list.js +2 -2
  65. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  66. package/dist/inputs/switch/switch.js +5 -5
  67. package/dist/inputs/textarea/textarea.js +7 -7
  68. package/dist/inputs/unit_input/unit_input.js +5 -5
  69. package/dist/layouts/body/h_body.js +7 -7
  70. package/dist/layouts/body/v_body.js +6 -6
  71. package/dist/layouts/column/column.js +17 -17
  72. package/dist/layouts/divider/divider.js +24 -23
  73. package/dist/layouts/divider/divider.js.map +1 -1
  74. package/dist/layouts/footer/footer.js +7 -7
  75. package/dist/layouts/grid/grid.js +24 -24
  76. package/dist/layouts/header/header.js +2 -2
  77. package/dist/layouts/index.d.ts +6 -5
  78. package/dist/layouts/index.d.ts.map +1 -1
  79. package/dist/layouts/index.js +28 -26
  80. package/dist/layouts/index.js.map +1 -1
  81. package/dist/layouts/list/item.js +2 -2
  82. package/dist/layouts/list/list.js +7 -7
  83. package/dist/layouts/list/section_header.js +6 -6
  84. package/dist/layouts/scaffold/scaffold.d.ts +9 -0
  85. package/dist/layouts/scaffold/scaffold.d.ts.map +1 -0
  86. package/dist/layouts/scaffold/scaffold.js +55 -0
  87. package/dist/layouts/scaffold/scaffold.js.map +1 -0
  88. package/dist/layouts/sidebar_end/sidebar_end.js +14 -14
  89. package/dist/layouts/sidebar_start/sidebar_start.js +10 -10
  90. package/dist/layouts/utility_bar/utility_bar.js +10 -10
  91. package/dist/modal.css +1 -1
  92. package/dist/overlay/frame/frame.d.ts.map +1 -1
  93. package/dist/overlay/frame/frame.js +22 -5
  94. package/dist/overlay/frame/frame.js.map +1 -1
  95. package/dist/overlay/index.d.ts +9 -2
  96. package/dist/overlay/index.d.ts.map +1 -1
  97. package/dist/overlay/index.js +22 -10
  98. package/dist/overlay/index.js.map +1 -1
  99. package/dist/overlay/menu/menu.d.ts +1 -1
  100. package/dist/overlay/menu/menu.d.ts.map +1 -1
  101. package/dist/overlay/menu/menu.js +36 -36
  102. package/dist/overlay/menu/menu.js.map +1 -1
  103. package/dist/overlay/popper/base/base_popper.d.ts +11 -0
  104. package/dist/overlay/popper/base/base_popper.d.ts.map +1 -0
  105. package/dist/overlay/popper/base/base_popper.js +27 -0
  106. package/dist/overlay/popper/base/base_popper.js.map +1 -0
  107. package/dist/overlay/popper/base/dismissal_decorator.d.ts +16 -0
  108. package/dist/overlay/popper/base/dismissal_decorator.d.ts.map +1 -0
  109. package/dist/overlay/popper/base/dismissal_decorator.js +69 -0
  110. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -0
  111. package/dist/overlay/popper/context_popper.d.ts +11 -0
  112. package/dist/overlay/popper/context_popper.d.ts.map +1 -0
  113. package/dist/overlay/popper/context_popper.js +33 -0
  114. package/dist/overlay/popper/context_popper.js.map +1 -0
  115. package/dist/overlay/popper/element_popper.d.ts +7 -0
  116. package/dist/overlay/popper/element_popper.d.ts.map +1 -0
  117. package/dist/overlay/popper/element_popper.js +33 -0
  118. package/dist/overlay/popper/element_popper.js.map +1 -0
  119. package/dist/overlay/popper/hooks/use_context_trigger.d.ts +7 -0
  120. package/dist/overlay/popper/hooks/use_context_trigger.d.ts.map +1 -0
  121. package/dist/overlay/popper/hooks/use_context_trigger.js +31 -0
  122. package/dist/overlay/popper/hooks/use_context_trigger.js.map +1 -0
  123. package/dist/overlay/popper/hooks/use_hover_trigger.d.ts +6 -0
  124. package/dist/overlay/popper/hooks/use_hover_trigger.d.ts.map +1 -0
  125. package/dist/overlay/popper/hooks/use_hover_trigger.js +17 -0
  126. package/dist/overlay/popper/hooks/use_hover_trigger.js.map +1 -0
  127. package/dist/overlay/popper/hooks/use_restore_focus.d.ts +2 -0
  128. package/dist/overlay/popper/hooks/use_restore_focus.d.ts.map +1 -0
  129. package/dist/overlay/popper/hooks/use_restore_focus.js +18 -0
  130. package/dist/overlay/popper/hooks/use_restore_focus.js.map +1 -0
  131. package/dist/overlay/popper/legacy/popper.d.ts.map +1 -0
  132. package/dist/overlay/popper/{popper.js → legacy/popper.js} +6 -6
  133. package/dist/overlay/popper/legacy/popper.js.map +1 -0
  134. package/dist/overlay/popper/preview_popper.d.ts +7 -0
  135. package/dist/overlay/popper/preview_popper.d.ts.map +1 -0
  136. package/dist/overlay/popper/preview_popper.js +46 -0
  137. package/dist/overlay/popper/preview_popper.js.map +1 -0
  138. package/dist/overlay/portal/portal_platform_context.js +4 -4
  139. package/dist/overlay/tethered/element_tethered.d.ts +8 -0
  140. package/dist/overlay/tethered/element_tethered.d.ts.map +1 -0
  141. package/dist/overlay/tethered/element_tethered.js +33 -0
  142. package/dist/overlay/tethered/element_tethered.js.map +1 -0
  143. package/dist/overlay/tethered/hooks/calculate_position.d.ts +19 -0
  144. package/dist/overlay/tethered/hooks/calculate_position.d.ts.map +1 -0
  145. package/dist/overlay/tethered/hooks/calculate_position.js +43 -0
  146. package/dist/overlay/tethered/hooks/calculate_position.js.map +1 -0
  147. package/dist/overlay/tethered/hooks/useTether.d.ts +19 -0
  148. package/dist/overlay/tethered/hooks/useTether.d.ts.map +1 -0
  149. package/dist/overlay/tethered/hooks/useTether.js +61 -0
  150. package/dist/overlay/tethered/hooks/useTether.js.map +1 -0
  151. package/dist/overlay/tethered/tethered.d.ts +20 -0
  152. package/dist/overlay/tethered/tethered.d.ts.map +1 -0
  153. package/dist/overlay/tethered/tethered.js +59 -0
  154. package/dist/overlay/tethered/tethered.js.map +1 -0
  155. package/dist/overlay/tethered/types.d.ts +3 -0
  156. package/dist/overlay/tethered/types.d.ts.map +1 -0
  157. package/dist/overlay/tethered/types.js +2 -0
  158. package/dist/overlay/tethered/types.js.map +1 -0
  159. package/dist/popper.css +1 -1
  160. package/dist/scaffold.css +1 -0
  161. package/dist/showcase-WfP6kBEb.js +58401 -0
  162. package/dist/showcase-WfP6kBEb.js.map +1 -0
  163. package/dist/showcase.css +1 -0
  164. package/dist/stacks/box/box.js +24 -24
  165. package/dist/stacks/h_collapsible_box.js +3 -3
  166. package/dist/stacks/h_stack.js +41 -41
  167. package/dist/stacks/spacer.js +11 -11
  168. package/dist/stacks/story_components/circle.js +10 -10
  169. package/dist/stacks/story_components/picture_placeholder.js +9 -9
  170. package/dist/stacks/story_components/rect.js +7 -7
  171. package/dist/stacks/story_components/style_box.js +4 -4
  172. package/dist/stacks/utils/use_is_collapsed.js +6 -6
  173. package/dist/stacks/v_collapsible_box.js +3 -3
  174. package/dist/stacks/v_stack.js +42 -42
  175. package/dist/stacks/z_stack.js +39 -39
  176. package/dist/surfaces/alert/alert.js +4 -4
  177. package/dist/surfaces/card/card.d.ts +2 -2
  178. package/dist/surfaces/card/card.d.ts.map +1 -1
  179. package/dist/surfaces/card/card.js +7 -7
  180. package/dist/surfaces/card/card.js.map +1 -1
  181. package/dist/surfaces/confirm/confirm.js +9 -9
  182. package/dist/surfaces/drawers/drawer_start/drawer_start.js +2 -2
  183. package/dist/surfaces/drawers/drawer_top/drawer_top.js +2 -2
  184. package/dist/surfaces/index.d.ts +2 -0
  185. package/dist/surfaces/index.d.ts.map +1 -1
  186. package/dist/surfaces/index.js +22 -18
  187. package/dist/surfaces/index.js.map +1 -1
  188. package/dist/surfaces/modal/modal.d.ts +3 -3
  189. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  190. package/dist/surfaces/modal/modal.js +14 -14
  191. package/dist/surfaces/modal/modal.js.map +1 -1
  192. package/dist/surfaces/page/h_page.js +7 -7
  193. package/dist/surfaces/page/v_page.js +5 -5
  194. package/dist/surfaces/panel/h_panel.js +29 -30
  195. package/dist/surfaces/panel/h_panel.js.map +1 -1
  196. package/dist/surfaces/panel/v_panel.d.ts +3 -7
  197. package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
  198. package/dist/surfaces/panel/v_panel.js +12 -54
  199. package/dist/surfaces/panel/v_panel.js.map +1 -1
  200. package/dist/surfaces/pop_confirm/pop_confirm.d.ts +5 -0
  201. package/dist/surfaces/pop_confirm/pop_confirm.d.ts.map +1 -0
  202. package/dist/surfaces/pop_confirm/pop_confirm.js +37 -0
  203. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -0
  204. package/dist/surfaces/popconfirm/pop_confirm.d.ts +5 -0
  205. package/dist/surfaces/popconfirm/pop_confirm.d.ts.map +1 -0
  206. package/dist/surfaces/popconfirm/pop_confirm.js +13 -0
  207. package/dist/surfaces/popconfirm/pop_confirm.js.map +1 -0
  208. package/dist/surfaces/popover/popover.d.ts +1 -1
  209. package/dist/surfaces/popover/popover.d.ts.map +1 -1
  210. package/dist/surfaces/popover/popover.js +1 -1
  211. package/dist/surfaces/popover/popover.js.map +1 -1
  212. package/dist/surfaces/tooltip/tooltip.d.ts +10 -0
  213. package/dist/surfaces/tooltip/tooltip.d.ts.map +1 -0
  214. package/dist/surfaces/tooltip/tooltip.js +38 -0
  215. package/dist/surfaces/tooltip/tooltip.js.map +1 -0
  216. package/dist/surfaces/window/window.d.ts +3 -3
  217. package/dist/surfaces/window/window.d.ts.map +1 -1
  218. package/dist/surfaces/window/window.js +15 -13
  219. package/dist/surfaces/window/window.js.map +1 -1
  220. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
  221. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
  222. package/dist/tethered.css +1 -0
  223. package/dist/themes/themes/ergo/ergo_theme.js +177 -206
  224. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  225. package/dist/tokens/badge/badge.js +9 -9
  226. package/dist/tokens/bubble/bubble.js +8 -8
  227. package/dist/tokens/chip/chip.js +3 -3
  228. package/dist/tooltip.css +1 -1
  229. package/dist/utility_bar.css +1 -1
  230. package/dist/utils/click_away_listener.d.ts +1 -0
  231. package/dist/utils/click_away_listener.d.ts.map +1 -1
  232. package/dist/utils/click_away_listener.js +12 -11
  233. package/dist/utils/click_away_listener.js.map +1 -1
  234. package/dist/utils/dnd/draggable/draggable.js +4 -4
  235. package/dist/utils/dnd/handle.js +8 -8
  236. package/dist/utils/focus_redirect.js +5 -5
  237. package/dist/utils/hooks/make_context_hook.js +4 -4
  238. package/dist/utils/hooks/use_media_query.js +2 -2
  239. package/dist/utils/hooks/use_media_query.js.map +1 -1
  240. package/dist/utils/index.d.ts +6 -5
  241. package/dist/utils/index.d.ts.map +1 -1
  242. package/dist/utils/index.js +26 -23
  243. package/dist/utils/index.js.map +1 -1
  244. package/dist/utils/mouse_leave_region.d.ts +8 -0
  245. package/dist/utils/mouse_leave_region.d.ts.map +1 -0
  246. package/dist/utils/mouse_leave_region.js +26 -0
  247. package/dist/utils/mouse_leave_region.js.map +1 -0
  248. package/dist/utils/types/dimensions.d.ts +11 -1
  249. package/dist/utils/types/dimensions.d.ts.map +1 -1
  250. package/package.json +3 -3
  251. package/src/actions/__docs__/actions.mdx +131 -0
  252. package/src/actions/__docs__/actions.stories.tsx +309 -0
  253. package/src/actions/__docs__/components/gallery.module.css +6 -0
  254. package/src/actions/__docs__/components/gallery.tsx +28 -0
  255. package/src/actions/__docs__/components/showcase.module.css +55 -0
  256. package/src/actions/__docs__/components/showcase.tsx +121 -0
  257. package/src/actions/button/base_button/base_button.tsx +5 -1
  258. package/src/actions/types.ts +6 -0
  259. package/src/inputs/color_input/color_input.tsx +1 -1
  260. package/src/inputs/date_picker/date_picker_input.tsx +1 -1
  261. package/src/inputs/date_picker/date_picker_year_input.tsx +1 -1
  262. package/src/inputs/suggestions/suggestion_list.tsx +1 -1
  263. package/src/layouts/index.ts +7 -5
  264. package/src/layouts/scaffold/scaffold.module.css +5 -0
  265. package/src/layouts/scaffold/scaffold.tsx +60 -0
  266. package/src/layouts/utility_bar/utility_bar.module.css +0 -3
  267. package/src/overlay/frame/frame.module.css +5 -0
  268. package/src/overlay/frame/frame.stories.tsx +1 -1
  269. package/src/overlay/frame/frame.tsx +19 -3
  270. package/src/overlay/index.ts +29 -2
  271. package/src/overlay/menu/menu.tsx +1 -1
  272. package/src/overlay/popper/__stories__/base_args.ts +75 -0
  273. package/src/overlay/popper/__stories__/context_popper.stories.tsx +77 -0
  274. package/src/overlay/popper/__stories__/element_popper.stories.tsx +80 -0
  275. package/src/overlay/popper/__stories__/preview_popper.stories.tsx +73 -0
  276. package/src/overlay/popper/base/base_popper.tsx +55 -0
  277. package/src/overlay/popper/base/dismissal_decorator.tsx +80 -0
  278. package/src/overlay/popper/context_popper.tsx +43 -0
  279. package/src/overlay/popper/element_popper.tsx +42 -0
  280. package/src/overlay/popper/hooks/use_context_trigger.ts +50 -0
  281. package/src/overlay/popper/hooks/use_hover_trigger.ts +24 -0
  282. package/src/overlay/popper/hooks/use_restore_focus.ts +16 -0
  283. package/src/overlay/popper/{popper.stories.tsx → legacy/popper.stories.tsx} +11 -5
  284. package/src/overlay/popper/{popper.tsx → legacy/popper.tsx} +3 -2
  285. package/src/overlay/popper/preview_popper.tsx +54 -0
  286. package/src/overlay/tethered/__stories__/element/element_tethered.stories.tsx +57 -0
  287. package/src/overlay/tethered/__stories__/element/element_tethered_stories.module.css +14 -0
  288. package/src/overlay/tethered/__stories__/shared/base_story_config.ts +52 -0
  289. package/src/overlay/tethered/__stories__/shared/components/sb_point.module.css +20 -0
  290. package/src/overlay/tethered/__stories__/shared/components/sb_point.tsx +34 -0
  291. package/src/overlay/tethered/__stories__/shared/components/sb_reference_points.tsx +54 -0
  292. package/src/overlay/tethered/__stories__/tethered/tethered.stories.tsx +90 -0
  293. package/src/overlay/tethered/__stories__/tethered/tethered_stories.module.css +25 -0
  294. package/src/overlay/tethered/element_tethered.tsx +62 -0
  295. package/src/overlay/tethered/hooks/calculate_position.ts +110 -0
  296. package/src/overlay/tethered/hooks/useTether.ts +85 -0
  297. package/src/overlay/tethered/tethered.module.css +8 -0
  298. package/src/overlay/tethered/tethered.tsx +72 -0
  299. package/src/overlay/tethered/types.ts +2 -0
  300. package/src/stacks/h_stack.stories.tsx +2 -2
  301. package/src/stacks/v_stack.stories.tsx +2 -2
  302. package/src/surfaces/card/card.stories.tsx +64 -0
  303. package/src/surfaces/card/card.tsx +4 -4
  304. package/src/surfaces/card/card_stories.module.css +13 -0
  305. package/src/surfaces/index.ts +2 -0
  306. package/src/surfaces/modal/__stories__/modal.stories.tsx +12 -1
  307. package/src/surfaces/modal/modal.module.css +2 -2
  308. package/src/surfaces/modal/modal.tsx +14 -12
  309. package/src/surfaces/panel/__stories__/panel.stories.tsx +1 -1
  310. package/src/surfaces/panel/v_panel.tsx +8 -53
  311. package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +70 -0
  312. package/src/surfaces/pop_confirm/pop_confirm.tsx +30 -0
  313. package/src/surfaces/popconfirm/pop_confirm.tsx +18 -0
  314. package/src/surfaces/popover/popover.tsx +1 -1
  315. package/src/surfaces/tooltip/tooltip.stories.tsx +54 -0
  316. package/src/surfaces/tooltip/tooltip.tsx +59 -0
  317. package/src/surfaces/window/window.stories.tsx +15 -1
  318. package/src/surfaces/window/window.tsx +16 -12
  319. package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +7 -9
  320. package/src/themes/themes/ergo/__stories__/material.stories.tsx +2 -6
  321. package/src/themes/themes/ergo/__stories__/sb_materials.module.css +29 -21
  322. package/src/themes/themes/ergo/ergo_theme.css +177 -206
  323. package/src/utils/click_away_listener.tsx +1 -1
  324. package/src/utils/index.ts +7 -5
  325. package/src/utils/mouse_leave_region.tsx +38 -0
  326. package/src/utils/types/dimensions.ts +13 -1
  327. package/tsconfig.json +3 -0
  328. package/dist/overlay/popper/popper.d.ts.map +0 -1
  329. package/dist/overlay/popper/popper.js.map +0 -1
  330. package/dist/overlay/tooltip/tooltip.d.ts +0 -7
  331. package/dist/overlay/tooltip/tooltip.d.ts.map +0 -1
  332. package/dist/overlay/tooltip/tooltip.js +0 -20
  333. package/dist/overlay/tooltip/tooltip.js.map +0 -1
  334. package/dist/panel.module-DwGKncon.js +0 -5
  335. package/dist/panel.module-DwGKncon.js.map +0 -1
  336. package/src/overlay/tooltip/tooltip.stories.tsx +0 -22
  337. package/src/overlay/tooltip/tooltip.tsx +0 -24
  338. /package/dist/{panel.css → h_panel.css} +0 -0
  339. /package/dist/overlay/popper/{popper.d.ts → legacy/popper.d.ts} +0 -0
  340. /package/src/overlay/popper/{popper.module.css → legacy/popper.module.css} +0 -0
  341. /package/src/{overlay → surfaces}/tooltip/tooltip.module.css +0 -0
@@ -0,0 +1,1485 @@
1
+ import { s as kt, a as Pt, b as te, c as Bt, e as Ce, _ as We, l as pe, f as ft, r as Mt } from "./showcase-WfP6kBEb.js";
2
+ import * as S from "react";
3
+ import Y, { useState as _t, useCallback as Ht, useEffect as Vt } from "react";
4
+ import * as Nt from "react-dom";
5
+ import qt from "react-dom";
6
+ var zt = ft({
7
+ "../node_modules/react-fast-compare/index.js"(e, t) {
8
+ var r = typeof Element < "u", o = typeof Map == "function", n = typeof Set == "function", u = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
9
+ function c(s, i) {
10
+ if (s === i) return !0;
11
+ if (s && i && typeof s == "object" && typeof i == "object") {
12
+ if (s.constructor !== i.constructor) return !1;
13
+ var a, f, p;
14
+ if (Array.isArray(s)) {
15
+ if (a = s.length, a != i.length) return !1;
16
+ for (f = a; f-- !== 0; )
17
+ if (!c(s[f], i[f])) return !1;
18
+ return !0;
19
+ }
20
+ var l;
21
+ if (o && s instanceof Map && i instanceof Map) {
22
+ if (s.size !== i.size) return !1;
23
+ for (l = s.entries(); !(f = l.next()).done; )
24
+ if (!i.has(f.value[0])) return !1;
25
+ for (l = s.entries(); !(f = l.next()).done; )
26
+ if (!c(f.value[1], i.get(f.value[0]))) return !1;
27
+ return !0;
28
+ }
29
+ if (n && s instanceof Set && i instanceof Set) {
30
+ if (s.size !== i.size) return !1;
31
+ for (l = s.entries(); !(f = l.next()).done; )
32
+ if (!i.has(f.value[0])) return !1;
33
+ return !0;
34
+ }
35
+ if (u && ArrayBuffer.isView(s) && ArrayBuffer.isView(i)) {
36
+ if (a = s.length, a != i.length) return !1;
37
+ for (f = a; f-- !== 0; )
38
+ if (s[f] !== i[f]) return !1;
39
+ return !0;
40
+ }
41
+ if (s.constructor === RegExp) return s.source === i.source && s.flags === i.flags;
42
+ if (s.valueOf !== Object.prototype.valueOf && typeof s.valueOf == "function" && typeof i.valueOf == "function") return s.valueOf() === i.valueOf();
43
+ if (s.toString !== Object.prototype.toString && typeof s.toString == "function" && typeof i.toString == "function") return s.toString() === i.toString();
44
+ if (p = Object.keys(s), a = p.length, a !== Object.keys(i).length) return !1;
45
+ for (f = a; f-- !== 0; )
46
+ if (!Object.prototype.hasOwnProperty.call(i, p[f])) return !1;
47
+ if (r && s instanceof Element) return !1;
48
+ for (f = a; f-- !== 0; )
49
+ if (!((p[f] === "_owner" || p[f] === "__v" || p[f] === "__o") && s.$$typeof) && !c(s[p[f]], i[p[f]]))
50
+ return !1;
51
+ return !0;
52
+ }
53
+ return s !== s && i !== i;
54
+ }
55
+ t.exports = function(s, i) {
56
+ try {
57
+ return c(s, i);
58
+ } catch (a) {
59
+ if ((a.message || "").match(/stack|recursion/i))
60
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
61
+ throw a;
62
+ }
63
+ };
64
+ }
65
+ }), It = ft({
66
+ "../node_modules/warning/warning.js"(e, t) {
67
+ var r = process.env.NODE_ENV !== "production", o = function() {
68
+ };
69
+ r && (n = function(u, c) {
70
+ var s = arguments.length;
71
+ c = new Array(s > 1 ? s - 1 : 0);
72
+ for (var i = 1; i < s; i++)
73
+ c[i - 1] = arguments[i];
74
+ var a = 0, f = "Warning: " + u.replace(/%s/g, function() {
75
+ return c[a++];
76
+ });
77
+ typeof console < "u" && console.error(f);
78
+ try {
79
+ throw new Error(f);
80
+ } catch {
81
+ }
82
+ }, o = function(u, c, s) {
83
+ var i = arguments.length;
84
+ s = new Array(i > 2 ? i - 2 : 0);
85
+ for (var a = 2; a < i; a++)
86
+ s[a - 2] = arguments[a];
87
+ if (c === void 0)
88
+ throw new Error(
89
+ "`warning(condition, format, ...args)` requires a warning message argument"
90
+ );
91
+ u || n.apply(null, [c].concat(s));
92
+ });
93
+ var n;
94
+ t.exports = o;
95
+ }
96
+ }), Ut = We(Mt(), 1);
97
+ S.createContext();
98
+ S.createContext();
99
+ var Je = function(e) {
100
+ return e.reduce(function(t, r) {
101
+ var o = r[0], n = r[1];
102
+ return t[o] = n, t;
103
+ }, {});
104
+ }, Ke = typeof window < "u" && window.document && window.document.createElement ? S.useLayoutEffect : S.useEffect, k = "top", H = "bottom", V = "right", P = "left", je = "auto", ye = [k, H, V, P], ie = "start", ge = "end", Xt = "clippingParents", ct = "viewport", le = "popper", Yt = "reference", Qe = ye.reduce(function(e, t) {
105
+ return e.concat([t + "-" + ie, t + "-" + ge]);
106
+ }, []), lt = [].concat(ye, [je]).reduce(function(e, t) {
107
+ return e.concat([t, t + "-" + ie, t + "-" + ge]);
108
+ }, []), Ft = "beforeRead", Gt = "read", Jt = "afterRead", Kt = "beforeMain", Qt = "main", Zt = "afterMain", er = "beforeWrite", tr = "write", rr = "afterWrite", nr = [Ft, Gt, Jt, Kt, Qt, Zt, er, tr, rr];
109
+ function I(e) {
110
+ return e ? (e.nodeName || "").toLowerCase() : null;
111
+ }
112
+ function B(e) {
113
+ if (e == null)
114
+ return window;
115
+ if (e.toString() !== "[object Window]") {
116
+ var t = e.ownerDocument;
117
+ return t && t.defaultView || window;
118
+ }
119
+ return e;
120
+ }
121
+ function ne(e) {
122
+ var t = B(e).Element;
123
+ return e instanceof t || e instanceof Element;
124
+ }
125
+ function _(e) {
126
+ var t = B(e).HTMLElement;
127
+ return e instanceof t || e instanceof HTMLElement;
128
+ }
129
+ function ke(e) {
130
+ if (typeof ShadowRoot > "u")
131
+ return !1;
132
+ var t = B(e).ShadowRoot;
133
+ return e instanceof t || e instanceof ShadowRoot;
134
+ }
135
+ function or(e) {
136
+ var t = e.state;
137
+ Object.keys(t.elements).forEach(function(r) {
138
+ var o = t.styles[r] || {}, n = t.attributes[r] || {}, u = t.elements[r];
139
+ !_(u) || !I(u) || (Object.assign(u.style, o), Object.keys(n).forEach(function(c) {
140
+ var s = n[c];
141
+ s === !1 ? u.removeAttribute(c) : u.setAttribute(c, s === !0 ? "" : s);
142
+ }));
143
+ });
144
+ }
145
+ function ir(e) {
146
+ var t = e.state, r = {
147
+ popper: {
148
+ position: t.options.strategy,
149
+ left: "0",
150
+ top: "0",
151
+ margin: "0"
152
+ },
153
+ arrow: {
154
+ position: "absolute"
155
+ },
156
+ reference: {}
157
+ };
158
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
159
+ Object.keys(t.elements).forEach(function(o) {
160
+ var n = t.elements[o], u = t.attributes[o] || {}, c = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : r[o]), s = c.reduce(function(i, a) {
161
+ return i[a] = "", i;
162
+ }, {});
163
+ !_(n) || !I(n) || (Object.assign(n.style, s), Object.keys(u).forEach(function(i) {
164
+ n.removeAttribute(i);
165
+ }));
166
+ });
167
+ };
168
+ }
169
+ var pt = {
170
+ name: "applyStyles",
171
+ enabled: !0,
172
+ phase: "write",
173
+ fn: or,
174
+ effect: ir,
175
+ requires: ["computeStyles"]
176
+ };
177
+ function z(e) {
178
+ return e.split("-")[0];
179
+ }
180
+ var re = Math.max, Re = Math.min, ae = Math.round;
181
+ function De() {
182
+ var e = navigator.userAgentData;
183
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
184
+ return t.brand + "/" + t.version;
185
+ }).join(" ") : navigator.userAgent;
186
+ }
187
+ function dt() {
188
+ return !/^((?!chrome|android).)*safari/i.test(De());
189
+ }
190
+ function se(e, t, r) {
191
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
192
+ var o = e.getBoundingClientRect(), n = 1, u = 1;
193
+ t && _(e) && (n = e.offsetWidth > 0 && ae(o.width) / e.offsetWidth || 1, u = e.offsetHeight > 0 && ae(o.height) / e.offsetHeight || 1);
194
+ var c = ne(e) ? B(e) : window, s = c.visualViewport, i = !dt() && r, a = (o.left + (i && s ? s.offsetLeft : 0)) / n, f = (o.top + (i && s ? s.offsetTop : 0)) / u, p = o.width / n, l = o.height / u;
195
+ return {
196
+ width: p,
197
+ height: l,
198
+ top: f,
199
+ right: a + p,
200
+ bottom: f + l,
201
+ left: a,
202
+ x: a,
203
+ y: f
204
+ };
205
+ }
206
+ function Pe(e) {
207
+ var t = se(e), r = e.offsetWidth, o = e.offsetHeight;
208
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
209
+ x: e.offsetLeft,
210
+ y: e.offsetTop,
211
+ width: r,
212
+ height: o
213
+ };
214
+ }
215
+ function vt(e, t) {
216
+ var r = t.getRootNode && t.getRootNode();
217
+ if (e.contains(t))
218
+ return !0;
219
+ if (r && ke(r)) {
220
+ var o = t;
221
+ do {
222
+ if (o && e.isSameNode(o))
223
+ return !0;
224
+ o = o.parentNode || o.host;
225
+ } while (o);
226
+ }
227
+ return !1;
228
+ }
229
+ function F(e) {
230
+ return B(e).getComputedStyle(e);
231
+ }
232
+ function ar(e) {
233
+ return ["table", "td", "th"].indexOf(I(e)) >= 0;
234
+ }
235
+ function J(e) {
236
+ return ((ne(e) ? e.ownerDocument : (
237
+ // $FlowFixMe[prop-missing]
238
+ e.document
239
+ )) || window.document).documentElement;
240
+ }
241
+ function Te(e) {
242
+ return I(e) === "html" ? e : (
243
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
244
+ // $FlowFixMe[incompatible-return]
245
+ // $FlowFixMe[prop-missing]
246
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
247
+ e.parentNode || // DOM Element detected
248
+ (ke(e) ? e.host : null) || // ShadowRoot detected
249
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
250
+ J(e)
251
+ );
252
+ }
253
+ function Ze(e) {
254
+ return !_(e) || // https://github.com/popperjs/popper-core/issues/837
255
+ F(e).position === "fixed" ? null : e.offsetParent;
256
+ }
257
+ function sr(e) {
258
+ var t = /firefox/i.test(De()), r = /Trident/i.test(De());
259
+ if (r && _(e)) {
260
+ var o = F(e);
261
+ if (o.position === "fixed")
262
+ return null;
263
+ }
264
+ var n = Te(e);
265
+ for (ke(n) && (n = n.host); _(n) && ["html", "body"].indexOf(I(n)) < 0; ) {
266
+ var u = F(n);
267
+ if (u.transform !== "none" || u.perspective !== "none" || u.contain === "paint" || ["transform", "perspective"].indexOf(u.willChange) !== -1 || t && u.willChange === "filter" || t && u.filter && u.filter !== "none")
268
+ return n;
269
+ n = n.parentNode;
270
+ }
271
+ return null;
272
+ }
273
+ function be(e) {
274
+ for (var t = B(e), r = Ze(e); r && ar(r) && F(r).position === "static"; )
275
+ r = Ze(r);
276
+ return r && (I(r) === "html" || I(r) === "body" && F(r).position === "static") ? t : r || sr(e) || t;
277
+ }
278
+ function Be(e) {
279
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
280
+ }
281
+ function de(e, t, r) {
282
+ return re(e, Re(t, r));
283
+ }
284
+ function ur(e, t, r) {
285
+ var o = de(e, t, r);
286
+ return o > r ? r : o;
287
+ }
288
+ function mt() {
289
+ return {
290
+ top: 0,
291
+ right: 0,
292
+ bottom: 0,
293
+ left: 0
294
+ };
295
+ }
296
+ function gt(e) {
297
+ return Object.assign({}, mt(), e);
298
+ }
299
+ function ht(e, t) {
300
+ return t.reduce(function(r, o) {
301
+ return r[o] = e, r;
302
+ }, {});
303
+ }
304
+ var fr = function(e, t) {
305
+ return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
306
+ placement: t.placement
307
+ })) : e, gt(typeof e != "number" ? e : ht(e, ye));
308
+ };
309
+ function cr(e) {
310
+ var t, r = e.state, o = e.name, n = e.options, u = r.elements.arrow, c = r.modifiersData.popperOffsets, s = z(r.placement), i = Be(s), a = [P, V].indexOf(s) >= 0, f = a ? "height" : "width";
311
+ if (!(!u || !c)) {
312
+ var p = fr(n.padding, r), l = Pe(u), v = i === "y" ? k : P, g = i === "y" ? H : V, d = r.rects.reference[f] + r.rects.reference[i] - c[i] - r.rects.popper[f], w = c[i] - r.rects.reference[i], x = be(u), T = x ? i === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, L = d / 2 - w / 2, m = p[v], y = T - l[f] - p[g], O = T / 2 - l[f] / 2 + L, R = de(m, O, y), E = i;
313
+ r.modifiersData[o] = (t = {}, t[E] = R, t.centerOffset = R - O, t);
314
+ }
315
+ }
316
+ function lr(e) {
317
+ var t = e.state, r = e.options, o = r.element, n = o === void 0 ? "[data-popper-arrow]" : o;
318
+ n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
319
+ }
320
+ var pr = {
321
+ name: "arrow",
322
+ enabled: !0,
323
+ phase: "main",
324
+ fn: cr,
325
+ effect: lr,
326
+ requires: ["popperOffsets"],
327
+ requiresIfExists: ["preventOverflow"]
328
+ };
329
+ function ue(e) {
330
+ return e.split("-")[1];
331
+ }
332
+ var dr = {
333
+ top: "auto",
334
+ right: "auto",
335
+ bottom: "auto",
336
+ left: "auto"
337
+ };
338
+ function vr(e, t) {
339
+ var r = e.x, o = e.y, n = t.devicePixelRatio || 1;
340
+ return {
341
+ x: ae(r * n) / n || 0,
342
+ y: ae(o * n) / n || 0
343
+ };
344
+ }
345
+ function et(e) {
346
+ var t, r = e.popper, o = e.popperRect, n = e.placement, u = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, a = e.adaptive, f = e.roundOffsets, p = e.isFixed, l = c.x, v = l === void 0 ? 0 : l, g = c.y, d = g === void 0 ? 0 : g, w = typeof f == "function" ? f({
347
+ x: v,
348
+ y: d
349
+ }) : {
350
+ x: v,
351
+ y: d
352
+ };
353
+ v = w.x, d = w.y;
354
+ var x = c.hasOwnProperty("x"), T = c.hasOwnProperty("y"), L = P, m = k, y = window;
355
+ if (a) {
356
+ var O = be(r), R = "clientHeight", E = "clientWidth";
357
+ if (O === B(r) && (O = J(r), F(O).position !== "static" && s === "absolute" && (R = "scrollHeight", E = "scrollWidth")), O = O, n === k || (n === P || n === V) && u === ge) {
358
+ m = H;
359
+ var b = p && O === y && y.visualViewport ? y.visualViewport.height : (
360
+ // $FlowFixMe[prop-missing]
361
+ O[R]
362
+ );
363
+ d -= b - o.height, d *= i ? 1 : -1;
364
+ }
365
+ if (n === P || (n === k || n === H) && u === ge) {
366
+ L = V;
367
+ var C = p && O === y && y.visualViewport ? y.visualViewport.width : (
368
+ // $FlowFixMe[prop-missing]
369
+ O[E]
370
+ );
371
+ v -= C - o.width, v *= i ? 1 : -1;
372
+ }
373
+ }
374
+ var D = Object.assign({
375
+ position: s
376
+ }, a && dr), j = f === !0 ? vr({
377
+ x: v,
378
+ y: d
379
+ }, B(r)) : {
380
+ x: v,
381
+ y: d
382
+ };
383
+ if (v = j.x, d = j.y, i) {
384
+ var W;
385
+ return Object.assign({}, D, (W = {}, W[m] = T ? "0" : "", W[L] = x ? "0" : "", W.transform = (y.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + d + "px)" : "translate3d(" + v + "px, " + d + "px, 0)", W));
386
+ }
387
+ return Object.assign({}, D, (t = {}, t[m] = T ? d + "px" : "", t[L] = x ? v + "px" : "", t.transform = "", t));
388
+ }
389
+ function mr(e) {
390
+ var t = e.state, r = e.options, o = r.gpuAcceleration, n = o === void 0 ? !0 : o, u = r.adaptive, c = u === void 0 ? !0 : u, s = r.roundOffsets, i = s === void 0 ? !0 : s, a = {
391
+ placement: z(t.placement),
392
+ variation: ue(t.placement),
393
+ popper: t.elements.popper,
394
+ popperRect: t.rects.popper,
395
+ gpuAcceleration: n,
396
+ isFixed: t.options.strategy === "fixed"
397
+ };
398
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, et(Object.assign({}, a, {
399
+ offsets: t.modifiersData.popperOffsets,
400
+ position: t.options.strategy,
401
+ adaptive: c,
402
+ roundOffsets: i
403
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, et(Object.assign({}, a, {
404
+ offsets: t.modifiersData.arrow,
405
+ position: "absolute",
406
+ adaptive: !1,
407
+ roundOffsets: i
408
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
409
+ "data-popper-placement": t.placement
410
+ });
411
+ }
412
+ var yt = {
413
+ name: "computeStyles",
414
+ enabled: !0,
415
+ phase: "beforeWrite",
416
+ fn: mr,
417
+ data: {}
418
+ }, Ee = {
419
+ passive: !0
420
+ };
421
+ function gr(e) {
422
+ var t = e.state, r = e.instance, o = e.options, n = o.scroll, u = n === void 0 ? !0 : n, c = o.resize, s = c === void 0 ? !0 : c, i = B(t.elements.popper), a = [].concat(t.scrollParents.reference, t.scrollParents.popper);
423
+ return u && a.forEach(function(f) {
424
+ f.addEventListener("scroll", r.update, Ee);
425
+ }), s && i.addEventListener("resize", r.update, Ee), function() {
426
+ u && a.forEach(function(f) {
427
+ f.removeEventListener("scroll", r.update, Ee);
428
+ }), s && i.removeEventListener("resize", r.update, Ee);
429
+ };
430
+ }
431
+ var bt = {
432
+ name: "eventListeners",
433
+ enabled: !0,
434
+ phase: "write",
435
+ fn: function() {
436
+ },
437
+ effect: gr,
438
+ data: {}
439
+ }, hr = {
440
+ left: "right",
441
+ right: "left",
442
+ bottom: "top",
443
+ top: "bottom"
444
+ };
445
+ function Se(e) {
446
+ return e.replace(/left|right|bottom|top/g, function(t) {
447
+ return hr[t];
448
+ });
449
+ }
450
+ var yr = {
451
+ start: "end",
452
+ end: "start"
453
+ };
454
+ function tt(e) {
455
+ return e.replace(/start|end/g, function(t) {
456
+ return yr[t];
457
+ });
458
+ }
459
+ function Me(e) {
460
+ var t = B(e), r = t.pageXOffset, o = t.pageYOffset;
461
+ return {
462
+ scrollLeft: r,
463
+ scrollTop: o
464
+ };
465
+ }
466
+ function _e(e) {
467
+ return se(J(e)).left + Me(e).scrollLeft;
468
+ }
469
+ function br(e, t) {
470
+ var r = B(e), o = J(e), n = r.visualViewport, u = o.clientWidth, c = o.clientHeight, s = 0, i = 0;
471
+ if (n) {
472
+ u = n.width, c = n.height;
473
+ var a = dt();
474
+ (a || !a && t === "fixed") && (s = n.offsetLeft, i = n.offsetTop);
475
+ }
476
+ return {
477
+ width: u,
478
+ height: c,
479
+ x: s + _e(e),
480
+ y: i
481
+ };
482
+ }
483
+ function wr(e) {
484
+ var t, r = J(e), o = Me(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, u = re(r.scrollWidth, r.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), c = re(r.scrollHeight, r.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s = -o.scrollLeft + _e(e), i = -o.scrollTop;
485
+ return F(n || r).direction === "rtl" && (s += re(r.clientWidth, n ? n.clientWidth : 0) - u), {
486
+ width: u,
487
+ height: c,
488
+ x: s,
489
+ y: i
490
+ };
491
+ }
492
+ function He(e) {
493
+ var t = F(e), r = t.overflow, o = t.overflowX, n = t.overflowY;
494
+ return /auto|scroll|overlay|hidden/.test(r + n + o);
495
+ }
496
+ function wt(e) {
497
+ return ["html", "body", "#document"].indexOf(I(e)) >= 0 ? e.ownerDocument.body : _(e) && He(e) ? e : wt(Te(e));
498
+ }
499
+ function ve(e, t) {
500
+ var r;
501
+ t === void 0 && (t = []);
502
+ var o = wt(e), n = o === ((r = e.ownerDocument) == null ? void 0 : r.body), u = B(o), c = n ? [u].concat(u.visualViewport || [], He(o) ? o : []) : o, s = t.concat(c);
503
+ return n ? s : (
504
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
505
+ s.concat(ve(Te(c)))
506
+ );
507
+ }
508
+ function $e(e) {
509
+ return Object.assign({}, e, {
510
+ left: e.x,
511
+ top: e.y,
512
+ right: e.x + e.width,
513
+ bottom: e.y + e.height
514
+ });
515
+ }
516
+ function xr(e, t) {
517
+ var r = se(e, !1, t === "fixed");
518
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
519
+ }
520
+ function rt(e, t, r) {
521
+ return t === ct ? $e(br(e, r)) : ne(t) ? xr(t, r) : $e(wr(J(e)));
522
+ }
523
+ function Or(e) {
524
+ var t = ve(Te(e)), r = ["absolute", "fixed"].indexOf(F(e).position) >= 0, o = r && _(e) ? be(e) : e;
525
+ return ne(o) ? t.filter(function(n) {
526
+ return ne(n) && vt(n, o) && I(n) !== "body";
527
+ }) : [];
528
+ }
529
+ function Er(e, t, r, o) {
530
+ var n = t === "clippingParents" ? Or(e) : [].concat(t), u = [].concat(n, [r]), c = u[0], s = u.reduce(function(i, a) {
531
+ var f = rt(e, a, o);
532
+ return i.top = re(f.top, i.top), i.right = Re(f.right, i.right), i.bottom = Re(f.bottom, i.bottom), i.left = re(f.left, i.left), i;
533
+ }, rt(e, c, o));
534
+ return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
535
+ }
536
+ function xt(e) {
537
+ var t = e.reference, r = e.element, o = e.placement, n = o ? z(o) : null, u = o ? ue(o) : null, c = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, i;
538
+ switch (n) {
539
+ case k:
540
+ i = {
541
+ x: c,
542
+ y: t.y - r.height
543
+ };
544
+ break;
545
+ case H:
546
+ i = {
547
+ x: c,
548
+ y: t.y + t.height
549
+ };
550
+ break;
551
+ case V:
552
+ i = {
553
+ x: t.x + t.width,
554
+ y: s
555
+ };
556
+ break;
557
+ case P:
558
+ i = {
559
+ x: t.x - r.width,
560
+ y: s
561
+ };
562
+ break;
563
+ default:
564
+ i = {
565
+ x: t.x,
566
+ y: t.y
567
+ };
568
+ }
569
+ var a = n ? Be(n) : null;
570
+ if (a != null) {
571
+ var f = a === "y" ? "height" : "width";
572
+ switch (u) {
573
+ case ie:
574
+ i[a] = i[a] - (t[f] / 2 - r[f] / 2);
575
+ break;
576
+ case ge:
577
+ i[a] = i[a] + (t[f] / 2 - r[f] / 2);
578
+ break;
579
+ }
580
+ }
581
+ return i;
582
+ }
583
+ function he(e, t) {
584
+ t === void 0 && (t = {});
585
+ var r = t, o = r.placement, n = o === void 0 ? e.placement : o, u = r.strategy, c = u === void 0 ? e.strategy : u, s = r.boundary, i = s === void 0 ? Xt : s, a = r.rootBoundary, f = a === void 0 ? ct : a, p = r.elementContext, l = p === void 0 ? le : p, v = r.altBoundary, g = v === void 0 ? !1 : v, d = r.padding, w = d === void 0 ? 0 : d, x = gt(typeof w != "number" ? w : ht(w, ye)), T = l === le ? Yt : le, L = e.rects.popper, m = e.elements[g ? T : l], y = Er(ne(m) ? m : m.contextElement || J(e.elements.popper), i, f, c), O = se(e.elements.reference), R = xt({
586
+ reference: O,
587
+ element: L,
588
+ placement: n
589
+ }), E = $e(Object.assign({}, L, R)), b = l === le ? E : O, C = {
590
+ top: y.top - b.top + x.top,
591
+ bottom: b.bottom - y.bottom + x.bottom,
592
+ left: y.left - b.left + x.left,
593
+ right: b.right - y.right + x.right
594
+ }, D = e.modifiersData.offset;
595
+ if (l === le && D) {
596
+ var j = D[n];
597
+ Object.keys(C).forEach(function(W) {
598
+ var N = [V, H].indexOf(W) >= 0 ? 1 : -1, h = [k, H].indexOf(W) >= 0 ? "y" : "x";
599
+ C[W] += j[h] * N;
600
+ });
601
+ }
602
+ return C;
603
+ }
604
+ function Sr(e, t) {
605
+ t === void 0 && (t = {});
606
+ var r = t, o = r.placement, n = r.boundary, u = r.rootBoundary, c = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, a = i === void 0 ? lt : i, f = ue(o), p = f ? s ? Qe : Qe.filter(function(g) {
607
+ return ue(g) === f;
608
+ }) : ye, l = p.filter(function(g) {
609
+ return a.indexOf(g) >= 0;
610
+ });
611
+ l.length === 0 && (l = p);
612
+ var v = l.reduce(function(g, d) {
613
+ return g[d] = he(e, {
614
+ placement: d,
615
+ boundary: n,
616
+ rootBoundary: u,
617
+ padding: c
618
+ })[z(d)], g;
619
+ }, {});
620
+ return Object.keys(v).sort(function(g, d) {
621
+ return v[g] - v[d];
622
+ });
623
+ }
624
+ function Rr(e) {
625
+ if (z(e) === je)
626
+ return [];
627
+ var t = Se(e);
628
+ return [tt(e), t, tt(t)];
629
+ }
630
+ function Cr(e) {
631
+ var t = e.state, r = e.options, o = e.name;
632
+ if (!t.modifiersData[o]._skip) {
633
+ for (var n = r.mainAxis, u = n === void 0 ? !0 : n, c = r.altAxis, s = c === void 0 ? !0 : c, i = r.fallbackPlacements, a = r.padding, f = r.boundary, p = r.rootBoundary, l = r.altBoundary, v = r.flipVariations, g = v === void 0 ? !0 : v, d = r.allowedAutoPlacements, w = t.options.placement, x = z(w), T = x === w, L = i || (T || !g ? [Se(w)] : Rr(w)), m = [w].concat(L).reduce(function(Z, X) {
634
+ return Z.concat(z(X) === je ? Sr(t, {
635
+ placement: X,
636
+ boundary: f,
637
+ rootBoundary: p,
638
+ padding: a,
639
+ flipVariations: g,
640
+ allowedAutoPlacements: d
641
+ }) : X);
642
+ }, []), y = t.rects.reference, O = t.rects.popper, R = /* @__PURE__ */ new Map(), E = !0, b = m[0], C = 0; C < m.length; C++) {
643
+ var D = m[C], j = z(D), W = ue(D) === ie, N = [k, H].indexOf(j) >= 0, h = N ? "width" : "height", A = he(t, {
644
+ placement: D,
645
+ boundary: f,
646
+ rootBoundary: p,
647
+ altBoundary: l,
648
+ padding: a
649
+ }), $ = N ? W ? V : P : W ? H : k;
650
+ y[h] > O[h] && ($ = Se($));
651
+ var U = Se($), q = [];
652
+ if (u && q.push(A[j] <= 0), s && q.push(A[$] <= 0, A[U] <= 0), q.every(function(Z) {
653
+ return Z;
654
+ })) {
655
+ b = D, E = !1;
656
+ break;
657
+ }
658
+ R.set(D, q);
659
+ }
660
+ if (E)
661
+ for (var K = g ? 3 : 1, Q = function(Z) {
662
+ var X = m.find(function(xe) {
663
+ var ce = R.get(xe);
664
+ if (ce)
665
+ return ce.slice(0, Z).every(function(oe) {
666
+ return oe;
667
+ });
668
+ });
669
+ if (X)
670
+ return b = X, "break";
671
+ }, fe = K; fe > 0; fe--) {
672
+ var we = Q(fe);
673
+ if (we === "break") break;
674
+ }
675
+ t.placement !== b && (t.modifiersData[o]._skip = !0, t.placement = b, t.reset = !0);
676
+ }
677
+ }
678
+ var Tr = {
679
+ name: "flip",
680
+ enabled: !0,
681
+ phase: "main",
682
+ fn: Cr,
683
+ requiresIfExists: ["offset"],
684
+ data: {
685
+ _skip: !1
686
+ }
687
+ };
688
+ function nt(e, t, r) {
689
+ return r === void 0 && (r = {
690
+ x: 0,
691
+ y: 0
692
+ }), {
693
+ top: e.top - t.height - r.y,
694
+ right: e.right - t.width + r.x,
695
+ bottom: e.bottom - t.height + r.y,
696
+ left: e.left - t.width - r.x
697
+ };
698
+ }
699
+ function ot(e) {
700
+ return [k, V, H, P].some(function(t) {
701
+ return e[t] >= 0;
702
+ });
703
+ }
704
+ function Ar(e) {
705
+ var t = e.state, r = e.name, o = t.rects.reference, n = t.rects.popper, u = t.modifiersData.preventOverflow, c = he(t, {
706
+ elementContext: "reference"
707
+ }), s = he(t, {
708
+ altBoundary: !0
709
+ }), i = nt(c, o), a = nt(s, n, u), f = ot(i), p = ot(a);
710
+ t.modifiersData[r] = {
711
+ referenceClippingOffsets: i,
712
+ popperEscapeOffsets: a,
713
+ isReferenceHidden: f,
714
+ hasPopperEscaped: p
715
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
716
+ "data-popper-reference-hidden": f,
717
+ "data-popper-escaped": p
718
+ });
719
+ }
720
+ var Lr = {
721
+ name: "hide",
722
+ enabled: !0,
723
+ phase: "main",
724
+ requiresIfExists: ["preventOverflow"],
725
+ fn: Ar
726
+ };
727
+ function Dr(e, t, r) {
728
+ var o = z(e), n = [P, k].indexOf(o) >= 0 ? -1 : 1, u = typeof r == "function" ? r(Object.assign({}, t, {
729
+ placement: e
730
+ })) : r, c = u[0], s = u[1];
731
+ return c = c || 0, s = (s || 0) * n, [P, V].indexOf(o) >= 0 ? {
732
+ x: s,
733
+ y: c
734
+ } : {
735
+ x: c,
736
+ y: s
737
+ };
738
+ }
739
+ function $r(e) {
740
+ var t = e.state, r = e.options, o = e.name, n = r.offset, u = n === void 0 ? [0, 0] : n, c = lt.reduce(function(f, p) {
741
+ return f[p] = Dr(p, t.rects, u), f;
742
+ }, {}), s = c[t.placement], i = s.x, a = s.y;
743
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += a), t.modifiersData[o] = c;
744
+ }
745
+ var Wr = {
746
+ name: "offset",
747
+ enabled: !0,
748
+ phase: "main",
749
+ requires: ["popperOffsets"],
750
+ fn: $r
751
+ };
752
+ function jr(e) {
753
+ var t = e.state, r = e.name;
754
+ t.modifiersData[r] = xt({
755
+ reference: t.rects.reference,
756
+ element: t.rects.popper,
757
+ placement: t.placement
758
+ });
759
+ }
760
+ var Ot = {
761
+ name: "popperOffsets",
762
+ enabled: !0,
763
+ phase: "read",
764
+ fn: jr,
765
+ data: {}
766
+ };
767
+ function kr(e) {
768
+ return e === "x" ? "y" : "x";
769
+ }
770
+ function Pr(e) {
771
+ var t = e.state, r = e.options, o = e.name, n = r.mainAxis, u = n === void 0 ? !0 : n, c = r.altAxis, s = c === void 0 ? !1 : c, i = r.boundary, a = r.rootBoundary, f = r.altBoundary, p = r.padding, l = r.tether, v = l === void 0 ? !0 : l, g = r.tetherOffset, d = g === void 0 ? 0 : g, w = he(t, {
772
+ boundary: i,
773
+ rootBoundary: a,
774
+ padding: p,
775
+ altBoundary: f
776
+ }), x = z(t.placement), T = ue(t.placement), L = !T, m = Be(x), y = kr(m), O = t.modifiersData.popperOffsets, R = t.rects.reference, E = t.rects.popper, b = typeof d == "function" ? d(Object.assign({}, t.rects, {
777
+ placement: t.placement
778
+ })) : d, C = typeof b == "number" ? {
779
+ mainAxis: b,
780
+ altAxis: b
781
+ } : Object.assign({
782
+ mainAxis: 0,
783
+ altAxis: 0
784
+ }, b), D = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j = {
785
+ x: 0,
786
+ y: 0
787
+ };
788
+ if (O) {
789
+ if (u) {
790
+ var W, N = m === "y" ? k : P, h = m === "y" ? H : V, A = m === "y" ? "height" : "width", $ = O[m], U = $ + w[N], q = $ - w[h], K = v ? -E[A] / 2 : 0, Q = T === ie ? R[A] : E[A], fe = T === ie ? -E[A] : -R[A], we = t.elements.arrow, Z = v && we ? Pe(we) : {
791
+ width: 0,
792
+ height: 0
793
+ }, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : mt(), xe = X[N], ce = X[h], oe = de(0, R[A], Z[A]), Tt = L ? R[A] / 2 - K - oe - xe - C.mainAxis : Q - oe - xe - C.mainAxis, At = L ? -R[A] / 2 + K + oe + ce + C.mainAxis : fe + oe + ce + C.mainAxis, Ae = t.elements.arrow && be(t.elements.arrow), Lt = Ae ? m === "y" ? Ae.clientTop || 0 : Ae.clientLeft || 0 : 0, Ne = (W = D?.[m]) != null ? W : 0, Dt = $ + Tt - Ne - Lt, $t = $ + At - Ne, qe = de(v ? Re(U, Dt) : U, $, v ? re(q, $t) : q);
794
+ O[m] = qe, j[m] = qe - $;
795
+ }
796
+ if (s) {
797
+ var ze, Wt = m === "x" ? k : P, jt = m === "x" ? H : V, ee = O[y], Oe = y === "y" ? "height" : "width", Ie = ee + w[Wt], Ue = ee - w[jt], Le = [k, P].indexOf(x) !== -1, Xe = (ze = D?.[y]) != null ? ze : 0, Ye = Le ? Ie : ee - R[Oe] - E[Oe] - Xe + C.altAxis, Fe = Le ? ee + R[Oe] + E[Oe] - Xe - C.altAxis : Ue, Ge = v && Le ? ur(Ye, ee, Fe) : de(v ? Ye : Ie, ee, v ? Fe : Ue);
798
+ O[y] = Ge, j[y] = Ge - ee;
799
+ }
800
+ t.modifiersData[o] = j;
801
+ }
802
+ }
803
+ var Br = {
804
+ name: "preventOverflow",
805
+ enabled: !0,
806
+ phase: "main",
807
+ fn: Pr,
808
+ requiresIfExists: ["offset"]
809
+ };
810
+ function Mr(e) {
811
+ return {
812
+ scrollLeft: e.scrollLeft,
813
+ scrollTop: e.scrollTop
814
+ };
815
+ }
816
+ function _r(e) {
817
+ return e === B(e) || !_(e) ? Me(e) : Mr(e);
818
+ }
819
+ function Hr(e) {
820
+ var t = e.getBoundingClientRect(), r = ae(t.width) / e.offsetWidth || 1, o = ae(t.height) / e.offsetHeight || 1;
821
+ return r !== 1 || o !== 1;
822
+ }
823
+ function Vr(e, t, r) {
824
+ r === void 0 && (r = !1);
825
+ var o = _(t), n = _(t) && Hr(t), u = J(t), c = se(e, n, r), s = {
826
+ scrollLeft: 0,
827
+ scrollTop: 0
828
+ }, i = {
829
+ x: 0,
830
+ y: 0
831
+ };
832
+ return (o || !o && !r) && ((I(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
833
+ He(u)) && (s = _r(t)), _(t) ? (i = se(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : u && (i.x = _e(u))), {
834
+ x: c.left + s.scrollLeft - i.x,
835
+ y: c.top + s.scrollTop - i.y,
836
+ width: c.width,
837
+ height: c.height
838
+ };
839
+ }
840
+ function Nr(e) {
841
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), o = [];
842
+ e.forEach(function(u) {
843
+ t.set(u.name, u);
844
+ });
845
+ function n(u) {
846
+ r.add(u.name);
847
+ var c = [].concat(u.requires || [], u.requiresIfExists || []);
848
+ c.forEach(function(s) {
849
+ if (!r.has(s)) {
850
+ var i = t.get(s);
851
+ i && n(i);
852
+ }
853
+ }), o.push(u);
854
+ }
855
+ return e.forEach(function(u) {
856
+ r.has(u.name) || n(u);
857
+ }), o;
858
+ }
859
+ function qr(e) {
860
+ var t = Nr(e);
861
+ return nr.reduce(function(r, o) {
862
+ return r.concat(t.filter(function(n) {
863
+ return n.phase === o;
864
+ }));
865
+ }, []);
866
+ }
867
+ function zr(e) {
868
+ var t;
869
+ return function() {
870
+ return t || (t = new Promise(function(r) {
871
+ Promise.resolve().then(function() {
872
+ t = void 0, r(e());
873
+ });
874
+ })), t;
875
+ };
876
+ }
877
+ function Ir(e) {
878
+ var t = e.reduce(function(r, o) {
879
+ var n = r[o.name];
880
+ return r[o.name] = n ? Object.assign({}, n, o, {
881
+ options: Object.assign({}, n.options, o.options),
882
+ data: Object.assign({}, n.data, o.data)
883
+ }) : o, r;
884
+ }, {});
885
+ return Object.keys(t).map(function(r) {
886
+ return t[r];
887
+ });
888
+ }
889
+ var it = {
890
+ placement: "bottom",
891
+ modifiers: [],
892
+ strategy: "absolute"
893
+ };
894
+ function at() {
895
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
896
+ t[r] = arguments[r];
897
+ return !t.some(function(o) {
898
+ return !(o && typeof o.getBoundingClientRect == "function");
899
+ });
900
+ }
901
+ function Ve(e) {
902
+ e === void 0 && (e = {});
903
+ var t = e, r = t.defaultModifiers, o = r === void 0 ? [] : r, n = t.defaultOptions, u = n === void 0 ? it : n;
904
+ return function(c, s, i) {
905
+ i === void 0 && (i = u);
906
+ var a = {
907
+ placement: "bottom",
908
+ orderedModifiers: [],
909
+ options: Object.assign({}, it, u),
910
+ modifiersData: {},
911
+ elements: {
912
+ reference: c,
913
+ popper: s
914
+ },
915
+ attributes: {},
916
+ styles: {}
917
+ }, f = [], p = !1, l = {
918
+ state: a,
919
+ setOptions: function(d) {
920
+ var w = typeof d == "function" ? d(a.options) : d;
921
+ g(), a.options = Object.assign({}, u, a.options, w), a.scrollParents = {
922
+ reference: ne(c) ? ve(c) : c.contextElement ? ve(c.contextElement) : [],
923
+ popper: ve(s)
924
+ };
925
+ var x = qr(Ir([].concat(o, a.options.modifiers)));
926
+ return a.orderedModifiers = x.filter(function(T) {
927
+ return T.enabled;
928
+ }), v(), l.update();
929
+ },
930
+ // Sync update – it will always be executed, even if not necessary. This
931
+ // is useful for low frequency updates where sync behavior simplifies the
932
+ // logic.
933
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
934
+ // prefer the async Popper#update method
935
+ forceUpdate: function() {
936
+ if (!p) {
937
+ var d = a.elements, w = d.reference, x = d.popper;
938
+ if (at(w, x)) {
939
+ a.rects = {
940
+ reference: Vr(w, be(x), a.options.strategy === "fixed"),
941
+ popper: Pe(x)
942
+ }, a.reset = !1, a.placement = a.options.placement, a.orderedModifiers.forEach(function(E) {
943
+ return a.modifiersData[E.name] = Object.assign({}, E.data);
944
+ });
945
+ for (var T = 0; T < a.orderedModifiers.length; T++) {
946
+ if (a.reset === !0) {
947
+ a.reset = !1, T = -1;
948
+ continue;
949
+ }
950
+ var L = a.orderedModifiers[T], m = L.fn, y = L.options, O = y === void 0 ? {} : y, R = L.name;
951
+ typeof m == "function" && (a = m({
952
+ state: a,
953
+ options: O,
954
+ name: R,
955
+ instance: l
956
+ }) || a);
957
+ }
958
+ }
959
+ }
960
+ },
961
+ // Async and optimistically optimized update – it will not be executed if
962
+ // not necessary (debounced to run at most once-per-tick)
963
+ update: zr(function() {
964
+ return new Promise(function(d) {
965
+ l.forceUpdate(), d(a);
966
+ });
967
+ }),
968
+ destroy: function() {
969
+ g(), p = !0;
970
+ }
971
+ };
972
+ if (!at(c, s))
973
+ return l;
974
+ l.setOptions(i).then(function(d) {
975
+ !p && i.onFirstUpdate && i.onFirstUpdate(d);
976
+ });
977
+ function v() {
978
+ a.orderedModifiers.forEach(function(d) {
979
+ var w = d.name, x = d.options, T = x === void 0 ? {} : x, L = d.effect;
980
+ if (typeof L == "function") {
981
+ var m = L({
982
+ state: a,
983
+ name: w,
984
+ instance: l,
985
+ options: T
986
+ }), y = function() {
987
+ };
988
+ f.push(m || y);
989
+ }
990
+ });
991
+ }
992
+ function g() {
993
+ f.forEach(function(d) {
994
+ return d();
995
+ }), f = [];
996
+ }
997
+ return l;
998
+ };
999
+ }
1000
+ Ve();
1001
+ var Ur = [bt, Ot, yt, pt];
1002
+ Ve({
1003
+ defaultModifiers: Ur
1004
+ });
1005
+ var Xr = [bt, Ot, yt, pt, Wr, Tr, Br, pr, Lr], Yr = Ve({
1006
+ defaultModifiers: Xr
1007
+ }), Fr = We(zt()), Gr = [], Jr = function(e, t, r) {
1008
+ r === void 0 && (r = {});
1009
+ var o = S.useRef(null), n = {
1010
+ onFirstUpdate: r.onFirstUpdate,
1011
+ placement: r.placement || "bottom",
1012
+ strategy: r.strategy || "absolute",
1013
+ modifiers: r.modifiers || Gr
1014
+ }, u = S.useState({
1015
+ styles: {
1016
+ popper: {
1017
+ position: n.strategy,
1018
+ left: "0",
1019
+ top: "0"
1020
+ },
1021
+ arrow: {
1022
+ position: "absolute"
1023
+ }
1024
+ },
1025
+ attributes: {}
1026
+ }), c = u[0], s = u[1], i = S.useMemo(function() {
1027
+ return {
1028
+ name: "updateState",
1029
+ enabled: !0,
1030
+ phase: "write",
1031
+ fn: function(p) {
1032
+ var l = p.state, v = Object.keys(l.elements);
1033
+ Nt.flushSync(function() {
1034
+ s({
1035
+ styles: Je(v.map(function(g) {
1036
+ return [g, l.styles[g] || {}];
1037
+ })),
1038
+ attributes: Je(v.map(function(g) {
1039
+ return [g, l.attributes[g]];
1040
+ }))
1041
+ });
1042
+ });
1043
+ },
1044
+ requires: ["computeStyles"]
1045
+ };
1046
+ }, []), a = S.useMemo(function() {
1047
+ var p = {
1048
+ onFirstUpdate: n.onFirstUpdate,
1049
+ placement: n.placement,
1050
+ strategy: n.strategy,
1051
+ modifiers: [].concat(n.modifiers, [i, {
1052
+ name: "applyStyles",
1053
+ enabled: !1
1054
+ }])
1055
+ };
1056
+ return (0, Fr.default)(o.current, p) ? o.current || p : (o.current = p, p);
1057
+ }, [n.onFirstUpdate, n.placement, n.strategy, n.modifiers, i]), f = S.useRef();
1058
+ return Ke(function() {
1059
+ f.current && f.current.setOptions(a);
1060
+ }, [a]), Ke(function() {
1061
+ if (!(e == null || t == null)) {
1062
+ var p = r.createPopper || Yr, l = p(e, t, a);
1063
+ return f.current = l, function() {
1064
+ l.destroy(), f.current = null;
1065
+ };
1066
+ }
1067
+ }, [e, t, r.createPopper]), {
1068
+ state: f.current ? f.current.state : null,
1069
+ styles: c.styles,
1070
+ attributes: c.attributes,
1071
+ update: f.current ? f.current.update : null,
1072
+ forceUpdate: f.current ? f.current.forceUpdate : null
1073
+ };
1074
+ };
1075
+ We(It());
1076
+ function Et(e) {
1077
+ var t = S.useRef(e);
1078
+ return t.current = e, S.useCallback(function() {
1079
+ return t.current;
1080
+ }, []);
1081
+ }
1082
+ var Kr = function() {
1083
+ };
1084
+ function Qr(e) {
1085
+ var t = e.initial, r = e.value, o = e.onChange, n = o === void 0 ? Kr : o;
1086
+ if (t === void 0 && r === void 0)
1087
+ throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');
1088
+ var u = S.useState(t), c = u[0], s = u[1], i = Et(c), a = S.useCallback(function(p) {
1089
+ var l = i(), v = typeof p == "function" ? p(l) : p;
1090
+ typeof v.persist == "function" && v.persist(), s(v), typeof n == "function" && n(v);
1091
+ }, [i, n]), f = r !== void 0;
1092
+ return [f ? r : c, f ? n : a];
1093
+ }
1094
+ function St(e, t) {
1095
+ return e === void 0 && (e = 0), t === void 0 && (t = 0), function() {
1096
+ return {
1097
+ width: 0,
1098
+ height: 0,
1099
+ top: t,
1100
+ right: e,
1101
+ bottom: t,
1102
+ left: e,
1103
+ x: 0,
1104
+ y: 0,
1105
+ toJSON: function() {
1106
+ return null;
1107
+ }
1108
+ };
1109
+ };
1110
+ }
1111
+ var Zr = ["styles", "attributes"], st = {
1112
+ getBoundingClientRect: St()
1113
+ }, ut = {
1114
+ closeOnOutsideClick: !0,
1115
+ closeOnTriggerHidden: !1,
1116
+ defaultVisible: !1,
1117
+ delayHide: 0,
1118
+ delayShow: 0,
1119
+ followCursor: !1,
1120
+ interactive: !1,
1121
+ mutationObserverOptions: {
1122
+ attributes: !0,
1123
+ childList: !0,
1124
+ subtree: !0
1125
+ },
1126
+ offset: [0, 6],
1127
+ trigger: "hover"
1128
+ };
1129
+ function en(e, t) {
1130
+ var r, o, n;
1131
+ e === void 0 && (e = {}), t === void 0 && (t = {});
1132
+ var u = Object.keys(ut).reduce(function(h, A) {
1133
+ var $;
1134
+ return te({}, h, ($ = {}, $[A] = h[A] !== void 0 ? h[A] : ut[A], $));
1135
+ }, e), c = S.useMemo(
1136
+ function() {
1137
+ return [{
1138
+ name: "offset",
1139
+ options: {
1140
+ offset: u.offset
1141
+ }
1142
+ }];
1143
+ },
1144
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1145
+ Array.isArray(u.offset) ? u.offset : []
1146
+ ), s = te({}, t, {
1147
+ placement: t.placement || u.placement,
1148
+ modifiers: t.modifiers || c
1149
+ }), i = S.useState(null), a = i[0], f = i[1], p = S.useState(null), l = p[0], v = p[1], g = Qr({
1150
+ initial: u.defaultVisible,
1151
+ value: u.visible,
1152
+ onChange: u.onVisibleChange
1153
+ }), d = g[0], w = g[1], x = S.useRef();
1154
+ S.useEffect(function() {
1155
+ return function() {
1156
+ return clearTimeout(x.current);
1157
+ };
1158
+ }, []);
1159
+ var T = Jr(u.followCursor ? st : a, l, s), L = T.styles, m = T.attributes, y = Bt(T, Zr), O = y.update, R = Et({
1160
+ visible: d,
1161
+ triggerRef: a,
1162
+ tooltipRef: l,
1163
+ finalConfig: u
1164
+ }), E = S.useCallback(
1165
+ function(h) {
1166
+ return Array.isArray(u.trigger) ? u.trigger.includes(h) : u.trigger === h;
1167
+ },
1168
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1169
+ Array.isArray(u.trigger) ? u.trigger : [u.trigger]
1170
+ ), b = S.useCallback(function() {
1171
+ clearTimeout(x.current), x.current = window.setTimeout(function() {
1172
+ return w(!1);
1173
+ }, u.delayHide);
1174
+ }, [u.delayHide, w]), C = S.useCallback(function() {
1175
+ clearTimeout(x.current), x.current = window.setTimeout(function() {
1176
+ return w(!0);
1177
+ }, u.delayShow);
1178
+ }, [u.delayShow, w]), D = S.useCallback(function() {
1179
+ R().visible ? b() : C();
1180
+ }, [R, b, C]);
1181
+ S.useEffect(function() {
1182
+ if (R().finalConfig.closeOnOutsideClick) {
1183
+ var h = function(A) {
1184
+ var $, U = R(), q = U.tooltipRef, K = U.triggerRef, Q = (A.composedPath == null || ($ = A.composedPath()) == null ? void 0 : $[0]) || A.target;
1185
+ Q instanceof Node && q != null && K != null && !q.contains(Q) && !K.contains(Q) && b();
1186
+ };
1187
+ return document.addEventListener("mousedown", h), function() {
1188
+ return document.removeEventListener("mousedown", h);
1189
+ };
1190
+ }
1191
+ }, [R, b]), S.useEffect(function() {
1192
+ if (!(a == null || !E("click")))
1193
+ return a.addEventListener("click", D), function() {
1194
+ return a.removeEventListener("click", D);
1195
+ };
1196
+ }, [a, E, D]), S.useEffect(function() {
1197
+ if (!(a == null || !E("double-click")))
1198
+ return a.addEventListener("dblclick", D), function() {
1199
+ return a.removeEventListener("dblclick", D);
1200
+ };
1201
+ }, [a, E, D]), S.useEffect(function() {
1202
+ if (!(a == null || !E("right-click"))) {
1203
+ var h = function(A) {
1204
+ A.preventDefault(), D();
1205
+ };
1206
+ return a.addEventListener("contextmenu", h), function() {
1207
+ return a.removeEventListener("contextmenu", h);
1208
+ };
1209
+ }
1210
+ }, [a, E, D]), S.useEffect(function() {
1211
+ if (!(a == null || !E("focus")))
1212
+ return a.addEventListener("focus", C), a.addEventListener("blur", b), function() {
1213
+ a.removeEventListener("focus", C), a.removeEventListener("blur", b);
1214
+ };
1215
+ }, [a, E, C, b]), S.useEffect(function() {
1216
+ if (!(a == null || !E("hover")))
1217
+ return a.addEventListener("mouseenter", C), a.addEventListener("mouseleave", b), function() {
1218
+ a.removeEventListener("mouseenter", C), a.removeEventListener("mouseleave", b);
1219
+ };
1220
+ }, [a, E, C, b]), S.useEffect(function() {
1221
+ if (!(l == null || !E("hover") || !R().finalConfig.interactive))
1222
+ return l.addEventListener("mouseenter", C), l.addEventListener("mouseleave", b), function() {
1223
+ l.removeEventListener("mouseenter", C), l.removeEventListener("mouseleave", b);
1224
+ };
1225
+ }, [l, E, C, b, R]);
1226
+ var j = y == null || (r = y.state) == null || (o = r.modifiersData) == null || (n = o.hide) == null ? void 0 : n.isReferenceHidden;
1227
+ S.useEffect(function() {
1228
+ u.closeOnTriggerHidden && j && b();
1229
+ }, [u.closeOnTriggerHidden, b, j]), S.useEffect(function() {
1230
+ if (!u.followCursor || a == null) return;
1231
+ function h(A) {
1232
+ var $ = A.clientX, U = A.clientY;
1233
+ st.getBoundingClientRect = St($, U), O?.();
1234
+ }
1235
+ return a.addEventListener("mousemove", h), function() {
1236
+ return a.removeEventListener("mousemove", h);
1237
+ };
1238
+ }, [u.followCursor, a, O]), S.useEffect(function() {
1239
+ if (!(l == null || O == null || u.mutationObserverOptions == null)) {
1240
+ var h = new MutationObserver(O);
1241
+ return h.observe(l, u.mutationObserverOptions), function() {
1242
+ return h.disconnect();
1243
+ };
1244
+ }
1245
+ }, [u.mutationObserverOptions, l, O]);
1246
+ var W = function(h) {
1247
+ return h === void 0 && (h = {}), te({}, h, {
1248
+ style: te({}, h.style, L.popper)
1249
+ }, m.popper, {
1250
+ "data-popper-interactive": u.interactive
1251
+ });
1252
+ }, N = function(h) {
1253
+ return h === void 0 && (h = {}), te({}, h, m.arrow, {
1254
+ style: te({}, h.style, L.arrow),
1255
+ "data-popper-arrow": !0
1256
+ });
1257
+ };
1258
+ return te({
1259
+ getArrowProps: N,
1260
+ getTooltipProps: W,
1261
+ setTooltipRef: v,
1262
+ setTriggerRef: f,
1263
+ tooltipRef: l,
1264
+ triggerRef: a,
1265
+ visible: d
1266
+ }, y);
1267
+ }
1268
+ var { document: me } = kt, M = (0, Ut.default)(1e3)(
1269
+ (e, t, r, o = 0) => t.split("-")[0] === e ? r : o
1270
+ ), G = 8, tn = Ce.div(
1271
+ {
1272
+ position: "absolute",
1273
+ borderStyle: "solid"
1274
+ },
1275
+ ({ placement: e }) => {
1276
+ let t = 0, r = 0;
1277
+ switch (!0) {
1278
+ case (e.startsWith("left") || e.startsWith("right")): {
1279
+ r = 8;
1280
+ break;
1281
+ }
1282
+ case (e.startsWith("top") || e.startsWith("bottom")): {
1283
+ t = 8;
1284
+ break;
1285
+ }
1286
+ }
1287
+ return { transform: `translate3d(${t}px, ${r}px, 0px)` };
1288
+ },
1289
+ ({ theme: e, color: t, placement: r }) => ({
1290
+ bottom: `${M("top", r, `${G * -1}px`, "auto")}`,
1291
+ top: `${M("bottom", r, `${G * -1}px`, "auto")}`,
1292
+ right: `${M("left", r, `${G * -1}px`, "auto")}`,
1293
+ left: `${M("right", r, `${G * -1}px`, "auto")}`,
1294
+ borderBottomWidth: `${M("top", r, "0", G)}px`,
1295
+ borderTopWidth: `${M("bottom", r, "0", G)}px`,
1296
+ borderRightWidth: `${M("left", r, "0", G)}px`,
1297
+ borderLeftWidth: `${M("right", r, "0", G)}px`,
1298
+ borderTopColor: M(
1299
+ "top",
1300
+ r,
1301
+ e.color[t] || t || e.base === "light" ? pe(e.background.app) : e.background.app,
1302
+ "transparent"
1303
+ ),
1304
+ borderBottomColor: M(
1305
+ "bottom",
1306
+ r,
1307
+ e.color[t] || t || e.base === "light" ? pe(e.background.app) : e.background.app,
1308
+ "transparent"
1309
+ ),
1310
+ borderLeftColor: M(
1311
+ "left",
1312
+ r,
1313
+ e.color[t] || t || e.base === "light" ? pe(e.background.app) : e.background.app,
1314
+ "transparent"
1315
+ ),
1316
+ borderRightColor: M(
1317
+ "right",
1318
+ r,
1319
+ e.color[t] || t || e.base === "light" ? pe(e.background.app) : e.background.app,
1320
+ "transparent"
1321
+ )
1322
+ })
1323
+ ), rn = Ce.div(
1324
+ ({ hidden: e }) => ({
1325
+ display: e ? "none" : "inline-block",
1326
+ zIndex: 2147483647,
1327
+ colorScheme: "light dark"
1328
+ }),
1329
+ ({ theme: e, color: t, hasChrome: r }) => r ? {
1330
+ background: t && e.color[t] || t || e.base === "light" ? pe(e.background.app) : e.background.app,
1331
+ filter: `
1332
+ drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
1333
+ drop-shadow(0 1px 3px rgba(0,0,0,0.1))
1334
+ `,
1335
+ borderRadius: e.appBorderRadius + 2,
1336
+ fontSize: e.typography.size.s1
1337
+ } : {}
1338
+ ), Rt = Y.forwardRef(
1339
+ ({
1340
+ placement: e = "top",
1341
+ hasChrome: t = !0,
1342
+ children: r,
1343
+ arrowProps: o = {},
1344
+ tooltipRef: n,
1345
+ color: u,
1346
+ withArrows: c,
1347
+ ...s
1348
+ }, i) => Y.createElement(rn, { "data-testid": "tooltip", hasChrome: t, ref: i, ...s, color: u }, t && c && Y.createElement(tn, { placement: e, ...o, color: u }), r)
1349
+ );
1350
+ Rt.displayName = "Tooltip";
1351
+ var nn = Ce.div`
1352
+ display: inline-block;
1353
+ cursor: ${(e) => e.trigger === "hover" || e.trigger?.includes("hover") ? "default" : "pointer"};
1354
+ `, on = Ce.g`
1355
+ cursor: ${(e) => e.trigger === "hover" || e.trigger?.includes("hover") ? "default" : "pointer"};
1356
+ `, Ct = ({
1357
+ svg: e = !1,
1358
+ trigger: t = "click",
1359
+ closeOnOutsideClick: r = !1,
1360
+ placement: o = "top",
1361
+ modifiers: n = [
1362
+ {
1363
+ name: "preventOverflow",
1364
+ options: {
1365
+ padding: 8
1366
+ }
1367
+ },
1368
+ {
1369
+ name: "offset",
1370
+ options: {
1371
+ offset: [8, 8]
1372
+ }
1373
+ },
1374
+ {
1375
+ name: "arrow",
1376
+ options: {
1377
+ padding: 8
1378
+ }
1379
+ }
1380
+ ],
1381
+ hasChrome: u = !0,
1382
+ defaultVisible: c = !1,
1383
+ withArrows: s,
1384
+ offset: i,
1385
+ tooltip: a,
1386
+ children: f,
1387
+ closeOnTriggerHidden: p,
1388
+ mutationObserverOptions: l,
1389
+ delayHide: v = t === "hover" ? 200 : 0,
1390
+ visible: g,
1391
+ interactive: d,
1392
+ delayShow: w = t === "hover" ? 400 : 0,
1393
+ strategy: x,
1394
+ followCursor: T,
1395
+ onVisibleChange: L,
1396
+ portalContainer: m,
1397
+ ...y
1398
+ }) => {
1399
+ let O = e ? on : nn, {
1400
+ getArrowProps: R,
1401
+ getTooltipProps: E,
1402
+ setTooltipRef: b,
1403
+ setTriggerRef: C,
1404
+ visible: D,
1405
+ state: j
1406
+ } = en(
1407
+ {
1408
+ trigger: t,
1409
+ placement: o,
1410
+ defaultVisible: c,
1411
+ delayHide: v,
1412
+ interactive: d,
1413
+ closeOnOutsideClick: r,
1414
+ closeOnTriggerHidden: p,
1415
+ onVisibleChange: L,
1416
+ delayShow: w,
1417
+ followCursor: T,
1418
+ mutationObserverOptions: l,
1419
+ visible: g,
1420
+ offset: i
1421
+ },
1422
+ {
1423
+ modifiers: n,
1424
+ strategy: x
1425
+ }
1426
+ ), W = (typeof m == "string" ? me.querySelector(m) : m) || me.body, N = D ? Y.createElement(
1427
+ Rt,
1428
+ {
1429
+ placement: j?.placement,
1430
+ ref: b,
1431
+ hasChrome: u,
1432
+ arrowProps: R(),
1433
+ withArrows: s,
1434
+ ...E()
1435
+ },
1436
+ typeof a == "function" ? a({ onHide: () => L(!1) }) : a
1437
+ ) : null;
1438
+ return Y.createElement(Y.Fragment, null, Y.createElement(O, { trigger: t, ref: C, ...y }, f), D && qt.createPortal(N, W));
1439
+ }, fn = ({
1440
+ startOpen: e = !1,
1441
+ onVisibleChange: t,
1442
+ ...r
1443
+ }) => {
1444
+ let [o, n] = _t(e), u = Ht(
1445
+ (c) => {
1446
+ t && t(c) === !1 || n(c);
1447
+ },
1448
+ [t]
1449
+ );
1450
+ return Vt(() => {
1451
+ let c = () => u(!1), s = (f) => {
1452
+ f.key === "Escape" && c();
1453
+ };
1454
+ me.addEventListener("keydown", s, !1);
1455
+ let i = Array.from(me.getElementsByTagName("iframe")), a = [];
1456
+ return i.forEach((f) => {
1457
+ let p = () => {
1458
+ try {
1459
+ f.contentWindow.document && (f.contentWindow.document.addEventListener("click", c), a.push(() => {
1460
+ try {
1461
+ f.contentWindow.document.removeEventListener("click", c);
1462
+ } catch {
1463
+ }
1464
+ }));
1465
+ } catch {
1466
+ }
1467
+ };
1468
+ p(), f.addEventListener("load", p), a.push(() => {
1469
+ f.removeEventListener("load", p);
1470
+ });
1471
+ }), () => {
1472
+ me.removeEventListener("keydown", s), a.forEach((f) => {
1473
+ f();
1474
+ });
1475
+ };
1476
+ }), Y.createElement(Ct, { ...r, visible: o, onVisibleChange: u });
1477
+ }, cn = (e) => (Pt(
1478
+ "WithTooltipPure is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."
1479
+ ), Y.createElement(Ct, { "data-deprecated": "WithTooltipPure", ...e }));
1480
+ export {
1481
+ Rt as Tooltip,
1482
+ fn as WithTooltip,
1483
+ cn as WithTooltipPure
1484
+ };
1485
+ //# sourceMappingURL=WithTooltip-IO6J4KBT-B1oq93K5.js.map